gdbserver/gdbsupport: Add .dir-locals.el file
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2
3 * .dir-locals.el: New file.
4
5 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
6
7 * .gitattributes: New file.
8
9 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
10
11 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
12 reply into an S reply.
13 * server.cc (disable_packet_T): New global.
14 (captured_main): Set new global when appropriate.
15 * server.h (disable_packet_T): Declare.
16
17 2020-02-21 Tom Tromey <tom@tromey.com>
18
19 * Makefile.in (mostlyclean): New target.
20
21 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
22
23 * target.h (struct process_stratum_target): Remove.
24 (class process_target): Rename to ...
25 (class process_stratum_target): ... this.
26 * linux-low.h (class linux_process_target): Derive from
27 'process_stratum_target'.
28 * linux-low.cc (linux_target_ops): Remove.
29 (initialize_low): Set the_target to the singleton instance of
30 linux_process_target.
31 * lynx-low.h (class lynx_process_target): Derive from
32 'process_stratum_target'.
33 * lynx-low.cc (lynx_target_ops): Remove.
34 (initialize_low): Set the_target to the singleton instance of
35 lynx_process_target.
36 * nto-low.h (class nto_process_target): Derive from
37 'process_stratum_target'.
38 * nto-low.cc (nto_target_ops): Remove.
39 (initialize_low): Set the_target to the singleton instance of
40 nto_process_target.
41 * win32-low.h (class win32_process_target): Derive from
42 'process_stratum_target'.
43 * win32-low.cc (win32_target_ops): Remove.
44 (initialize_low): Set the_target to the singleton instance of
45 win32_process_target.
46
47 Replace 'the_target->pt' with 'the_target' in the uses below.
48
49 * hostio.cc (hostio_error)
50 (handle_setfs)
51 (handle_open)
52 (handle_unlink)
53 (handle_readlink)
54 * linux-aarch32-low.cc (arm_breakpoint_at)
55 * linux-aarch64-low.cc (aarch64_breakpoint_at)
56 * linux-arm-low.cc (arm_sigreturn_next_pc)
57 (arm_get_hwcap)
58 (arm_get_syscall_trapinfo)
59 * linux-cris-low.cc (cris_breakpoint_at)
60 * linux-crisv32-low.cc (cris_breakpoint_at)
61 * linux-low.cc (handle_extended_wait)
62 (linux_wait_1)
63 (linux_read_memory)
64 (linux_process_target::breakpoint_kind_from_pc)
65 (linux_get_auxv)
66 * linux-m32r-low.cc (m32r_breakpoint_at)
67 * linux-mips-low.cc (mips_breakpoint_at)
68 * linux-nios2-low.cc (nios2_breakpoint_at)
69 * linux-ppc-low.cc (ppc_breakpoint_at)
70 * linux-s390-low.cc (s390_get_hwcap)
71 * linux-sh-low.cc (sh_breakpoint_at)
72 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
73 (sparc_store_gregset_from_stack)
74 (sparc_breakpoint_at)
75 * linux-tic6x-low.cc (tic6x_breakpoint_at)
76 * linux-tile-low.cc (tile_breakpoint_at)
77 * linux-x86-low.cc (x86_breakpoint_at)
78 * linux-xtensa-low.cc (xtensa_breakpoint_at)
79 * mem-break.cc (bp_size)
80 (bp_opcode)
81 (insert_memory_breakpoint)
82 (set_raw_breakpoint_at)
83 (delete_raw_breakpoint)
84 (z_type_supported)
85 (uninsert_raw_breakpoint)
86 (reinsert_raw_breakpoint)
87 (validate_inserted_breakpoint)
88 * regcache.cc (regcache_read_pc)
89 (regcache_write_pc)
90 * remote-utils.cc (putpkt_binary_1)
91 (input_interrupt)
92 (getpkt)
93 (prepare_resume_reply)
94 * server.cc (handle_general_set)
95 (handle_detach)
96 (handle_qxfer_auxv)
97 (handle_qxfer_exec_file)
98 (handle_qxfer_libraries_svr4)
99 (handle_qxfer_osdata)
100 (handle_qxfer_siginfo)
101 (handle_qxfer_fdpic)
102 (handle_query)
103 (resume)
104 (handle_v_requests)
105 (queue_stop_reply_callback)
106 (captured_main)
107 * target.cc (prepare_to_access_memory)
108 (done_accessing_memory)
109 (read_inferior_memory)
110 (target_write_memory)
111 (target_stop_and_wait)
112 (target_wait)
113 (target_mourn_inferior)
114 (target_continue_no_signal)
115 (target_continue)
116 (target_supports_multi_process)
117 (kill_inferior)
118 * target.h
119 (target_create_inferior)
120 (target_post_create_inferior)
121 (myattach)
122 (target_supports_fork_events)
123 (target_supports_vfork_events)
124 (target_supports_exec_events)
125 (target_handle_new_gdb_connection)
126 (detach_inferior)
127 (mythread_alive)
128 (fetch_inferior_registers)
129 (store_inferior_registers)
130 (join_inferior)
131 (target_supports_non_stop)
132 (target_async)
133 (target_process_qsupported)
134 (target_supports_catch_syscall)
135 (target_get_ipa_tdesc_idx)
136 (target_supports_tracepoints)
137 (target_supports_fast_tracepoints)
138 (target_get_min_fast_tracepoint_insn_len)
139 (target_thread_stopped)
140 (target_pause_all)
141 (target_unpause_all)
142 (target_stabilize_threads)
143 (target_install_fast_tracepoint_jump_pad)
144 (target_emit_ops)
145 (target_supports_disable_randomization)
146 (target_supports_agent)
147 (target_enable_btrace)
148 (target_disable_btrace)
149 (target_read_btrace)
150 (target_read_btrace_conf)
151 (target_supports_range_stepping)
152 (target_supports_stopped_by_sw_breakpoint)
153 (target_stopped_by_sw_breakpoint)
154 (target_supports_stopped_by_hw_breakpoint)
155 (target_supports_hardware_single_step)
156 (target_stopped_by_hw_breakpoint)
157 (target_breakpoint_kind_from_pc)
158 (target_breakpoint_kind_from_current_state)
159 (target_supports_software_single_step)
160 (target_core_of_thread)
161 (target_thread_name)
162 (target_thread_handle)
163 * win32-low.cc (do_initial_child_stuff)
164
165 Rename target op default definitions listed below.
166
167 * target.cc (process_target::post_create_inferior): Rename as ...
168 (process_stratum_target::post_create_inferior): ... this.
169 (process_target::prepare_to_access_memory): Rename as ...
170 (process_stratum_target::prepare_to_access_memory): ... this.
171 (process_target::done_accessing_memory): Rename as ...
172 (process_stratum_target::done_accessing_memory): ... this.
173 (process_target::look_up_symbols): Rename as ...
174 (process_stratum_target::look_up_symbols): ... this.
175 (process_target::supports_read_auxv): Rename as ...
176 (process_stratum_target::supports_read_auxv): ... this.
177 (process_target::read_auxv): Rename as ...
178 (process_stratum_target::read_auxv): ... this.
179 (process_target::supports_z_point_type): Rename as ...
180 (process_stratum_target::supports_z_point_type): ... this.
181 (process_target::insert_point): Rename as ...
182 (process_stratum_target::insert_point): ... this.
183 (process_target::remove_point): Rename as ...
184 (process_stratum_target::remove_point): ... this.
185 (process_target::stopped_by_sw_breakpoint): Rename as ...
186 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
187 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
188 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
189 (process_target::stopped_by_hw_breakpoint): Rename as ...
190 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
191 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
192 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
193 (process_target::supports_hardware_single_step): Rename as ...
194 (process_stratum_target::supports_hardware_single_step): ... this.
195 (process_target::stopped_by_watchpoint): Rename as ...
196 (process_stratum_target::stopped_by_watchpoint): ... this.
197 (process_target::stopped_data_address): Rename as ...
198 (process_stratum_target::stopped_data_address): ... this.
199 (process_target::supports_read_offsets): Rename as ...
200 (process_stratum_target::supports_read_offsets): ... this.
201 (process_target::read_offsets): Rename as ...
202 (process_stratum_target::read_offsets): ... this.
203 (process_target::supports_get_tls_address): Rename as ...
204 (process_stratum_target::supports_get_tls_address): ... this.
205 (process_target::get_tls_address): Rename as ...
206 (process_stratum_target::get_tls_address): ... this.
207 (process_target::hostio_last_error): Rename as ...
208 (process_stratum_target::hostio_last_error): ... this.
209 (process_target::supports_qxfer_osdata): Rename as ...
210 (process_stratum_target::supports_qxfer_osdata): ... this.
211 (process_target::qxfer_osdata): Rename as ...
212 (process_stratum_target::qxfer_osdata): ... this.
213 (process_target::supports_qxfer_siginfo): Rename as ...
214 (process_stratum_target::supports_qxfer_siginfo): ... this.
215 (process_target::qxfer_siginfo): Rename as ...
216 (process_stratum_target::qxfer_siginfo): ... this.
217 (process_target::supports_non_stop): Rename as ...
218 (process_stratum_target::supports_non_stop): ... this.
219 (process_target::async): Rename as ...
220 (process_stratum_target::async): ... this.
221 (process_target::start_non_stop): Rename as ...
222 (process_stratum_target::start_non_stop): ... this.
223 (process_target::supports_multi_process): Rename as ...
224 (process_stratum_target::supports_multi_process): ... this.
225 (process_target::supports_fork_events): Rename as ...
226 (process_stratum_target::supports_fork_events): ... this.
227 (process_target::supports_vfork_events): Rename as ...
228 (process_stratum_target::supports_vfork_events): ... this.
229 (process_target::supports_exec_events): Rename as ...
230 (process_stratum_target::supports_exec_events): ... this.
231 (process_target::handle_new_gdb_connection): Rename as ...
232 (process_stratum_target::handle_new_gdb_connection): ... this.
233 (process_target::handle_monitor_command): Rename as ...
234 (process_stratum_target::handle_monitor_command): ... this.
235 (process_target::core_of_thread): Rename as ...
236 (process_stratum_target::core_of_thread): ... this.
237 (process_target::supports_read_loadmap): Rename as ...
238 (process_stratum_target::supports_read_loadmap): ... this.
239 (process_target::read_loadmap): Rename as ...
240 (process_stratum_target::read_loadmap): ... this.
241 (process_target::process_qsupported): Rename as ...
242 (process_stratum_target::process_qsupported): ... this.
243 (process_target::supports_tracepoints): Rename as ...
244 (process_stratum_target::supports_tracepoints): ... this.
245 (process_target::read_pc): Rename as ...
246 (process_stratum_target::read_pc): ... this.
247 (process_target::write_pc): Rename as ...
248 (process_stratum_target::write_pc): ... this.
249 (process_target::supports_thread_stopped): Rename as ...
250 (process_stratum_target::supports_thread_stopped): ... this.
251 (process_target::thread_stopped): Rename as ...
252 (process_stratum_target::thread_stopped): ... this.
253 (process_target::supports_get_tib_address): Rename as ...
254 (process_stratum_target::supports_get_tib_address): ... this.
255 (process_target::get_tib_address): Rename as ...
256 (process_stratum_target::get_tib_address): ... this.
257 (process_target::pause_all): Rename as ...
258 (process_stratum_target::pause_all): ... this.
259 (process_target::unpause_all): Rename as ...
260 (process_stratum_target::unpause_all): ... this.
261 (process_target::stabilize_threads): Rename as ...
262 (process_stratum_target::stabilize_threads): ... this.
263 (process_target::supports_fast_tracepoints): Rename as ...
264 (process_stratum_target::supports_fast_tracepoints): ... this.
265 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
266 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
267 (process_target::emit_ops): Rename as ...
268 (process_stratum_target::emit_ops): ... this.
269 (process_target::supports_disable_randomization): Rename as ...
270 (process_stratum_target::supports_disable_randomization): ... this.
271 (process_target::supports_qxfer_libraries_svr4): Rename as ...
272 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
273 (process_target::qxfer_libraries_svr4): Rename as ...
274 (process_stratum_target::qxfer_libraries_svr4): ... this.
275 (process_target::supports_agent): Rename as ...
276 (process_stratum_target::supports_agent): ... this.
277 (process_target::enable_btrace): Rename as ...
278 (process_stratum_target::enable_btrace): ... this.
279 (process_target::disable_btrace): Rename as ...
280 (process_stratum_target::disable_btrace): ... this.
281 (process_target::read_btrace): Rename as ...
282 (process_stratum_target::read_btrace): ... this.
283 (process_target::read_btrace_conf): Rename as ...
284 (process_stratum_target::read_btrace_conf): ... this.
285 (process_target::supports_range_stepping): Rename as ...
286 (process_stratum_target::supports_range_stepping): ... this.
287 (process_target::supports_pid_to_exec_file): Rename as ...
288 (process_stratum_target::supports_pid_to_exec_file): ... this.
289 (process_target::pid_to_exec_file): Rename as ...
290 (process_stratum_target::pid_to_exec_file): ... this.
291 (process_target::supports_multifs): Rename as ...
292 (process_stratum_target::supports_multifs): ... this.
293 (process_target::multifs_open): Rename as ...
294 (process_stratum_target::multifs_open): ... this.
295 (process_target::multifs_unlink): Rename as ...
296 (process_stratum_target::multifs_unlink): ... this.
297 (process_target::multifs_readlink): Rename as ...
298 (process_stratum_target::multifs_readlink): ... this.
299 (process_target::breakpoint_kind_from_pc): Rename as ...
300 (process_stratum_target::breakpoint_kind_from_pc): ... this.
301 (process_target::breakpoint_kind_from_current_state): Rename as ...
302 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
303 (process_target::thread_name): Rename as ...
304 (process_stratum_target::thread_name): ... this.
305 (process_target::thread_handle): Rename as ...
306 (process_stratum_target::thread_handle): ... this.
307 (process_target::supports_software_single_step): Rename as ...
308 (process_stratum_target::supports_software_single_step): ... this.
309 (process_target::supports_catch_syscall): Rename as ...
310 (process_stratum_target::supports_catch_syscall): ... this.
311 (process_target::get_ipa_tdesc_idx): Rename as ...
312 (process_stratum_target::get_ipa_tdesc_idx): ... this.
313
314 2020-02-20 Pedro Alves <palves@redhat.com>
315
316 * target.cc (set_target_ops): Simply copy the given target pointer
317 instead of creating a copy of the pointed object.
318
319 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
320
321 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
322 of process_target.
323
324 * target.h (struct process_stratum_target): Remove the target op.
325 (class process_target): Add the target op.
326 (target_get_ipa_tdesc_idx): Update the macro.
327 * target.cc (process_target::get_ipa_tdesc_idx): Define.
328
329 Update the derived classes and callers below.
330
331 * linux-low.cc (linux_target_ops): Update.
332 (linux_get_ipa_tdesc_idx): Turn into ...
333 (linux_process_target::get_ipa_tdesc_idx): ... this.
334 * linux-low.h (class linux_process_target): Update.
335 * lynx-low.cc (lynx_target_ops): Update.
336 * nto-low.cc (nto_target_ops): Update.
337 * win32-low.cc (win32_target_ops): Update.
338
339 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
340
341 Turn process_stratum_target's supports_catch_syscall op into a
342 method of process_target.
343
344 * target.h (struct process_stratum_target): Remove the target op.
345 (class process_target): Add the target op.
346 (target_supports_catch_syscall): Update the macro.
347 * target.cc (process_target::supports_catch_syscall): Define.
348
349 Update the derived classes and callers below.
350
351 * linux-low.cc (linux_target_ops): Update.
352 (linux_supports_catch_syscall): Turn into ...
353 (linux_process_target::supports_catch_syscall): ... this.
354 * linux-low.h (class linux_process_target): Update.
355 * lynx-low.cc (lynx_target_ops): Update.
356 * nto-low.cc (nto_target_ops): Update.
357 * win32-low.cc (win32_target_ops): Update.
358
359 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
360
361 Turn process_stratum_target's supports_software_single_step op
362 into a method of process_target.
363
364 * target.h (struct process_stratum_target): Remove the target op.
365 (class process_target): Add the target op.
366 (target_supports_software_single_step): Update the macro.
367 * target.cc (process_target::supports_software_single_step): Define.
368
369 Update the derived classes and callers below.
370
371 * linux-low.cc (linux_target_ops): Update.
372 (linux_supports_software_single_step): Turn into ...
373 (linux_process_target::supports_software_single_step): ... this.
374 * linux-low.h (class linux_process_target): Update.
375 * lynx-low.cc (lynx_target_ops): Update.
376 * nto-low.cc (nto_target_ops): Update.
377 * win32-low.cc (win32_target_ops): Update.
378
379 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
380
381 Turn process_stratum_target's thread_name and thread_handle ops
382 into methods of process_target.
383
384 * target.h (struct process_stratum_target): Remove the target ops.
385 (class process_target): Add the target ops.
386 (target_thread_name): Update the macro.
387 (target_thread_handle): Update the macro.
388 * target.cc (process_target::thread_name): Define.
389 (process_target::thread_handle): Define.
390
391 Update the derived classes and callers below.
392
393 * linux-low.cc (linux_target_ops): Update.
394 (linux_process_target::thread_name): Define.
395 (linux_process_target::thread_handle): Define.
396 * linux-low.h (class linux_process_target): Update.
397 * lynx-low.cc (lynx_target_ops): Update.
398 * nto-low.cc (nto_target_ops): Update.
399 * win32-low.cc (win32_target_ops): Update.
400
401 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
402
403 Turn process_stratum_target's breakpoint_kind_from_pc,
404 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
405 ops into methods of process_target.
406
407 * target.h (struct process_stratum_target): Remove the target op.
408 (class process_target): Add the target op.
409 (target_breakpoint_kind_from_pc): Update the macro.
410 (target_breakpoint_kind_from_current_state): Update the macro.
411 (default_breakpoint_kind_from_pc): Remove declaration.
412 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
413 (process_target::breakpoint_kind_from_pc): ... this.
414 (process_target::breakpoint_kind_from_current_state): Define.
415
416 Update the derived classes and callers below.
417
418 * mem-break.cc (bp_size): Update.
419 (bp_opcode): Update.
420 * linux-low.cc (linux_target_ops): Update.
421 (linux_wait_1): Update.
422 (linux_breakpoint_kind_from_pc): Turn into ...
423 (linux_process_target::breakpoint_kind_from_pc): ... this.
424 (linux_sw_breakpoint_from_kind): Turn into ...
425 (linux_process_target::sw_breakpoint_from_kind): ... this.
426 (linux_breakpoint_kind_from_current_state): Turn into ...
427 (linux_process_target::breakpoint_kind_from_current_state): ... this.
428 * linux-low.h (class linux_process_target): Update.
429 * lynx-low.cc (lynx_target_ops): Update.
430 (lynx_process_target::sw_breakpoint_from_kind): Define.
431 * lynx-low.h (class lynx_process_target): Update.
432 * nto-low.cc (nto_target_ops): Update.
433 (nto_sw_breakpoint_from_kind): Turn into ...
434 (nto_process_target::sw_breakpoint_from_kind): ... this.
435 * nto-low.h (class nto_process_target): Update.
436 * win32-low.cc (win32_target_ops): Update.
437 (win32_sw_breakpoint_from_kind): Turn into ...
438 (win32_process_target::sw_breakpoint_from_kind): ... this.
439 * win32-low.h (class win32_process_target): Update.
440
441 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
442
443 Turn process_stratum_target's multifs_open, multifs_readlink,
444 multifs_unlink ops into methods of process_target.
445
446 * target.h (struct process_stratum_target): Remove the target ops.
447 (class process_target): Add the target ops. Also add
448 'supports_multifs'.
449 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
450 "sys/stat.h".
451 (process_target::supports_multifs): Define.
452 (process_target::multifs_open): Define.
453 (process_target::multifs_readlink): Define.
454 (process_target::multifs_unlink): Define.
455
456 Update the derived classes and callers below.
457
458 * hostio.cc (handle_setfs): Update.
459 (handle_open): Update.
460 (handle_unlink): Update.
461 (handle_readlink): Update.
462 * linux-low.cc (linux_target_ops): Update.
463 (linux_process_target::supports_multifs): Define.
464 (linux_process_target::multifs_open): Define.
465 (linux_process_target::multifs_readlink): Define.
466 (linux_process_target::multifs_unlink): Define.
467 * linux-low.h (class linux_process_target): Update.
468 * lynx-low.cc (lynx_target_ops): Update.
469 * nto-low.cc (nto_target_ops): Update.
470 * win32-low.cc (win32_target_ops): Update.
471
472 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
473
474 Turn process_stratum_target's pid_to_exec_file op into a method
475 of process_target.
476
477 * target.h (struct process_stratum_target): Remove the target op.
478 (class process_target): Add the target op. Also add
479 'supports_pid_to_exec_file'.
480 * target.cc (process_target::pid_to_exec_file): Define.
481 (process_target::supports_pid_to_exec_file): Define.
482
483 Update the derived classes and callers below.
484
485 * server.cc (handle_qxfer_exec_file): Update.
486 (handle_query): Update.
487 * linux-low.cc (linux_target_ops): Update.
488 (linux_process_target::supports_pid_to_exec_file): Define.
489 (linux_process_target::pid_to_exec_file): Define.
490 * linux-low.h (class linux_process_target): Update.
491 * lynx-low.cc (lynx_target_ops): Update.
492 * nto-low.cc (nto_target_ops): Update.
493 * win32-low.cc (win32_target_ops): Update.
494
495 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
496
497 Turn process_stratum_target's supports_range_stepping op into a
498 method of process_target.
499
500 * target.h (struct process_stratum_target): Remove the target op.
501 (class process_target): Add the target op.
502 (target_supports_range_stepping): Update the macro.
503 * target.cc (process_target::supports_range_stepping): Define.
504
505 Update the derived classes and callers below.
506
507 * linux-low.cc (linux_target_ops): Update.
508 (linux_supports_range_stepping): Turn into ...
509 (linux_process_target::supports_range_stepping): ... this.
510 * linux-low.h (class linux_process_target): Update.
511 * lynx-low.cc (lynx_target_ops): Update.
512 * nto-low.cc (nto_target_ops): Update.
513 * win32-low.cc (win32_target_ops): Update.
514
515 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
516
517 Turn process_stratum_target's btrace-related ops (enable_btrace,
518 disable_btrace, read_btrace, read_btrace_conf) into methods of
519 process_target.
520
521 * target.h (struct process_stratum_target): Remove the target ops.
522 (class process_target): Add the target ops.
523 (target_enable_btrace): Update.
524 (target_disable_btrace): Update.
525 (target_read_btrace): Update.
526 (target_read_btrace_conf): Update.
527 * target.cc (process_target::enable_btrace): Define.
528 (process_target::disable_btrace): Define.
529 (process_target::read_btrace): Define.
530 (process_target::read_btrace_conf): Define.
531
532 Update the derived classes and callers below.
533
534 * linux-low.cc (linux_target_ops): Update.
535 (linux_process_target:enable_btrace): Define as a wrapper around
536 linux_enable_btrace.
537 (linux_low_disable_btrace): Turn into ...
538 (linux_process_target::disable_btrace): ... this.
539 (linux_low_read_btrace): Turn into ...
540 (linux_process_target::read_btrace): ... this.
541 (linux_low_btrace_conf): Turn into ...
542 (linux_process_target::read_btrace_conf): ... this.
543 * linux-low.h (class linux_process_target): Update.
544 * lynx-low.cc (lynx_target_ops): Update.
545 * nto-low.cc (nto_target_ops): Update.
546 * win32-low.cc (win32_target_ops): Update.
547
548 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
549
550 Turn process_stratum_target's supports_agent op into a method of
551 process_target.
552
553 * target.h (struct process_stratum_target): Remove the target op.
554 (class process_target): Add the target op.
555 (target_supports_agent): Update the macro.
556 * target.cc (process_target::supports_agent): Define.
557
558 Update the derived classes and callers below.
559
560 * linux-low.cc (linux_target_ops): Update.
561 (linux_supports_agent): Turn into ...
562 (linux_process_target::supports_agent): ... this.
563 * linux-low.h (class linux_process_target): Update.
564 * lynx-low.cc (lynx_target_ops): Update.
565 * nto-low.cc (nto_target_ops): Update.
566 * win32-low.cc (win32_target_ops): Update.
567
568 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
569
570 Turn process_stratum_target's qxfer_libraries_svr4 op into a
571 method of process_target.
572
573 * target.h (struct process_stratum_target): Remove the target op.
574 (class process_target): Add the target op. Also add
575 'supports_qxfer_libraries_svr4'.
576 * target.cc (process_target::qxfer_libraries_svr4): Define.
577 (process_target::supports_qxfer_libraries_svr4): Define.
578
579 Update the derived classes and callers below.
580
581 * server.cc (handle_qxfer_libraries_svr4): Update.
582 (handle_query): Update.
583 * linux-low.cc (linux_target_ops): Update.
584 (linux_process_target::supports_qxfer_libraries_svr4): Define.
585 (linux_qxfer_libraries_svr4): Turn into ...
586 (linux_process_target::qxfer_libraries_svr4): ... this.
587 * linux-low.h (class linux_process_target): Update.
588 * lynx-low.cc (lynx_target_ops): Update.
589 * nto-low.cc (nto_target_ops): Update.
590 * win32-low.cc (win32_target_ops): Update.
591
592 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
593
594 Turn process_stratum_target's supports_disable_randomization op
595 into a method of process_target.
596
597 * target.h (struct process_stratum_target): Remove the target op.
598 (class process_target): Add the target op.
599 (target_supports_disable_randomization): Update the macro.
600 * target.cc (process_target::supports_disable_randomization): Define.
601
602 Update the derived classes and callers below.
603
604 * linux-low.cc (linux_target_ops): Update.
605 (linux_supports_disable_randomization): Turn into ...
606 (linux_process_target::supports_disable_randomization): ... this.
607 * linux-low.h (class linux_process_target): Update.
608 * lynx-low.cc (lynx_target_ops): Update.
609 * nto-low.cc (nto_target_ops): Update.
610 * win32-low.cc (win32_target_ops): Update.
611
612 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
613
614 Turn process_stratum_target's emit_ops op into a method of
615 process_target.
616
617 * target.h (struct process_stratum_target): Remove the target op.
618 (class process_target): Add the target op.
619 (target_emit_ops): Update the macro.
620 * target.cc (process_target::emit_ops): Define.
621
622 Update the derived classes and callers below.
623
624 * linux-low.cc (linux_target_ops): Update.
625 (linux_emit_ops): Turn into ...
626 (linux_process_target::emit_ops): ... this.
627 * linux-low.h (class linux_process_target): Update.
628 * lynx-low.cc (lynx_target_ops): Update.
629 * nto-low.cc (nto_target_ops): Update.
630 * win32-low.cc (win32_target_ops): Update.
631
632 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
633
634 Turn process_stratum_target's install_fast_tracepoint_jump_pad
635 and get_min_fast_tracepoint_insn_len ops into methods of
636 process_target.
637
638 * target.h (struct process_stratum_target): Remove the target ops.
639 (class process_target): Add the target ops. Also add
640 'supports_fast_tracepoints'.
641 (target_supports_fast_tracepoints): Update the macro.
642 (target_get_min_fast_tracepoint_insn_len): Update the macro.
643 (install_fast_tracepoint_jump_pad): Update and rename the macro
644 to ...
645 (target_install_fast_tracepoint_jump_pad): ... this.
646 * target.cc (process_target::supports_fast_tracepoints): Define.
647 (process_target::install_fast_tracepoint_jump_pad): Define.
648 (process_target::get_min_fast_tracepoint_insn_len): Define.
649
650 Update the derived classes and callers below.
651
652 * tracepoint.cc (install_fast_tracepoint): Update.
653 * linux-low.cc (linux_target_ops): Update.
654 (linux_process_target::supports_fast_tracepoints): Define.
655 (linux_install_fast_tracepoint_jump_pad): Turn into ...
656 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
657 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
658 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
659 * linux-low.h (class linux_process_target): Update.
660 * lynx-low.cc (lynx_target_ops): Update.
661 * nto-low.cc (nto_target_ops): Update.
662 * win32-low.cc (win32_target_ops): Update.
663
664 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
665
666 Turn process_stratum_target's stabilize_threads op into a
667 method of process_target.
668
669 * target.h (struct process_stratum_target): Remove the target op.
670 (class process_target): Add the target op.
671 (target_stabilize_threads): Update the macro.
672 * target.cc (process_target::stabilize_threads): Define.
673
674 Update the derived classes and callers below.
675
676 * server.cc (handle_status): Update.
677 * tracepoint.cc (cmd_qtdp): Update.
678 (cmd_qtstart): Update.
679 * linux-low.cc (linux_target_ops): Update.
680 (linux_stabilize_threads): Turn into ...
681 (linux_process_target::stabilize_threads): ... this.
682 (linux_wait_1): Update.
683 * linux-low.h (class linux_process_target): Update.
684 * lynx-low.cc (lynx_target_ops): Update.
685 * nto-low.cc (nto_target_ops): Update.
686 * win32-low.cc (win32_target_ops): Update.
687
688 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
689
690 Turn process_stratum_target's pause_all and unpause_all ops
691 into methods of process_target.
692
693 * target.h (struct process_stratum_target): Remove the target ops.
694 (class process_target): Add the target ops.
695 (pause_all): Update the macro and rename to...
696 (target_pause_all): ... this.
697 (unpause_all): Update the macro and rename to...
698 (target_unpause_all): ... this.
699 * target.cc (process_target::pause_all): Define.
700 (process_target::unpause_all): Define.
701
702 Update the derived classes and callers below.
703
704 * server.cc (handle_status): Update.
705 * tracepoint.cc (clear_installed_tracepoints): Update.
706 (cmd_qtdp): Update.
707 (cmd_qtstart): Update.
708 (stop_tracing): Update.
709 (cmd_qtstatus): Update.
710 (upload_fast_traceframes): Update.
711 (run_inferior_command): Update.
712 * linux-low.cc (linux_target_ops): Update.
713 (linux_pause_all): Turn into ...
714 (linux_process_target::pause_all): ... this.
715 (linux_unpause_all): Turn into ...
716 (linux_process_target::unpause_all): ... this.
717 (linux_process_target::prepare_to_access_memory): Update.
718 (linux_process_target::done_accessing_memory): Update.
719 * linux-low.h (class linux_process_target): Update.
720 * lynx-low.cc (lynx_target_ops): Update.
721 * nto-low.cc (nto_target_ops): Update.
722 * win32-low.cc (win32_target_ops): Update.
723
724 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
725
726 Turn process_stratum_target's get_tib_address op into a method of
727 process_target.
728
729 * target.h (struct process_stratum_target): Remove the target op.
730 (class process_target): Add the target op. Also add
731 'supports_get_tib_address'.
732 * target.cc (process_target::get_tib_address): Define.
733 (process_target::supports_get_tib_address): Define.
734
735 Update the derived classes and callers below.
736
737 * server.cc (handle_query): Update.
738 * linux-low.cc (win32_target_ops): Update.
739 * lynx-low.cc (lynx_target_ops): Update.
740 * nto-low.cc (nto_target_ops): Update.
741 * win32-low.cc (win32_target_ops): Update.
742 (win32_process_target::supports_get_tib_address): Define.
743 (win32_get_tib_address): Turn into ...
744 (win32_process_target::get_tib_address): ... this.
745 * win32-low.h (class win32_process_target): Update.
746
747 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
748
749 Turn process_stratum_target's thread_stopped op into a method of
750 process_target.
751
752 * target.h (struct process_stratum_target): Remove the target op.
753 (class process_target): Add the target op. Also add
754 'supports_thread_stopped'.
755 (target_thread_stopped): Update the macro.
756 * target.cc (process_target::thread_stopped): Define.
757 (process_target::supports_thread_stopped): Define.
758 (prepare_to_access_memory): Update.
759
760 Update the derived classes and callers below.
761
762 * server.cc (queue_stop_reply_callback): Update.
763 * linux-low.cc (linux_target_ops): Update.
764 (linux_process_target::supports_thread_stopped): Define.
765 (linux_thread_stopped): Turn into ...
766 (linux_process_target::thread_stopped): ... this.
767 * linux-low.h (class linux_process_target): Update.
768 * lynx-low.cc (lynx_target_ops): Update.
769 * nto-low.cc (nto_target_ops): Update.
770 * win32-low.cc (win32_target_ops): Update.
771
772 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
773
774 Turn process_stratum_target's read_pc and write_pc ops into
775 methods of process_target.
776
777 * target.h (struct process_stratum_target): Remove the target ops.
778 (class process_target): Add the target ops.
779 * target.cc (process_target::read_pc): Define.
780 (process_target::write_pc): Define.
781
782 Update the derived classes and callers below.
783
784 * regcache.cc (regcache_read_pc): Update.
785 (regcache_write_pc): Update.
786 * linux-low.cc (linux_target_ops): Update.
787 (linux_read_pc): Turn into ...
788 (linux_process_target::read_pc): ... this.
789 (linux_write_pc): Turn into ...
790 (linux_process_target::write_pc): ... this.
791 * linux-low.h (class linux_process_target): Update.
792 * lynx-low.cc (lynx_target_ops): Update.
793 * nto-low.cc (nto_target_ops): Update.
794 * win32-low.cc (win32_target_ops): Update.
795
796 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
797
798 Turn process_stratum_target's supports_tracepoints op into a
799 method of process_target.
800
801 * target.h (struct process_stratum_target): Remove the target op.
802 (class process_target): Add the target op.
803 (target_supports_tracepoints): Update the macro.
804 * target.cc (process_target::supports_tracepoints): Define.
805
806 Update the derived classes and callers below.
807
808 * linux-low.cc (linux_target_ops): Update.
809 (linux_supports_tracepoints): Turn into ...
810 (linux_process_target::supports_tracepoints): ... this.
811 * linux-low.h (class linux_process_target): Update.
812 * lynx-low.cc (lynx_target_ops): Update.
813 * nto-low.cc (nto_target_ops): Update.
814 * win32-low.cc (win32_target_ops): Update.
815
816 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
817
818 Turn process_stratum_target's process_qsupported op into a method
819 of process_target.
820
821 * target.h (struct process_stratum_target): Remove the target op.
822 (class process_target): Add the target op.
823 (target_process_qsupported): Update the macro.
824 * target.cc (process_target::process_qsupported): Define.
825
826 Update the derived classes and callers below.
827
828 * linux-low.cc (linux_target_ops): Update.
829 (linux_process_qsupported): Turn into ...
830 (linux_process_target::process_qsupported): ... this.
831 * linux-low.h (class linux_process_target): Update.
832 * lynx-low.cc (lynx_target_ops): Update.
833 * nto-low.cc (nto_target_ops): Update.
834 * win32-low.cc (win32_target_ops): Update.
835
836 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
837
838 Turn process_stratum_target's read_loadmap op into a method of
839 process_target.
840
841 * target.h (struct process_stratum_target): Remove the target op.
842 (class process_target): Add the target op. Also add
843 'supports_read_loadmap'.
844 * target.cc (process_target::read_loadmap): Define.
845 (process_target::supports_read_loadmap): Define.
846
847 Update the derived classes and callers below.
848
849 * server.cc (handle_qxfer_fdpic): Update.
850 (handle_query): Update.
851 * linux-low.cc (linux_target_ops): Update.
852 (linux_process_target::supports_read_loadmap): Define.
853 (linux_read_loadmap): Turn into ...
854 (linux_process_target::read_loadmap): ... this.
855 * linux-low.h (class linux_process_target): Update.
856 * lynx-low.cc (lynx_target_ops): Update.
857 * nto-low.cc (nto_target_ops): Update.
858 * win32-low.cc (win32_target_ops): Update.
859
860 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
861
862 Turn process_stratum_target's core_of_thread op into a method of
863 process_target.
864
865 * target.h (struct process_stratum_target): Remove the target op.
866 (class process_target): Add the target op.
867 (target_core_of_thread): Update the macro.
868 * target.cc (process_target::core_of_thread): Define.
869
870 Update the derived classes and callers below.
871
872 * linux-low.cc (linux_target_ops): Update.
873 (linux_process_target::core_of_thread): Define.
874 * linux-low.h (class linux_process_target): Update.
875 * lynx-low.cc (lynx_target_ops): Update.
876 * nto-low.cc (nto_target_ops): Update.
877 * win32-low.cc (win32_target_ops): Update.
878
879 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
880
881 Turn process_stratum_target's handle_monitor_command op into a
882 method of process_target.
883
884 * target.h (struct process_stratum_target): Remove the target op.
885 (class process_target): Add the target op.
886 (target_handle_monitor_command): Update the macro.
887 * target.cc (process_target::handle_monitor_command): Define.
888
889 Update the derived classes and callers below.
890
891 * server.cc (handle_query): Update.
892 * linux-low.cc (linux_target_ops): Update.
893 (linux_process_target::handle_monitor_command): Define.
894 * linux-low.h (class linux_process_target): Update.
895 * lynx-low.cc (lynx_target_ops): Update.
896 * nto-low.cc (nto_target_ops): Update.
897 * win32-low.cc (win32_target_ops): Update.
898
899 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
900
901 Turn process_stratum_target's handle_new_gdb_connection op into a
902 method of process_target.
903
904 * target.h (struct process_stratum_target): Remove the target op.
905 (class process_target): Add the target op.
906 (target_handle_new_gdb_connection): Update the macro.
907 * target.cc (process_target::handle_new_gdb_connection): Define.
908
909 Update the derived classes and callers below.
910
911 * linux-low.cc (linux_target_ops): Update.
912 (linux_handle_new_gdb_connection): Turn into ...
913 (linux_process_target::handle_new_gdb_connection): ... this.
914 * linux-low.h (class linux_process_target): Update.
915 * lynx-low.cc (lynx_target_ops): Update.
916 * nto-low.cc (nto_target_ops): Update.
917 * win32-low.cc (win32_target_ops): Update.
918
919 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
920
921 Turn process_stratum_target's supports_fork_events,
922 supports_vfork_events, and supports_exec_events ops into methods
923 of process_target.
924
925 * target.h (struct process_stratum_target): Remove the target ops.
926 (class process_target): Add the target ops.
927 (target_supports_fork_events): Update the macro.
928 (target_supports_vfork_events): Update the macro.
929 (target_supports_exec_events): Update the macro.
930 * target.cc (process_target::supports_fork_events): Define.
931 (process_target::supports_vfork_events): Define.
932 (process_target::supports_exec_events): Define.
933
934 Update the derived classes and callers below.
935
936 * linux-low.cc (linux_target_ops): Update.
937 (linux_supports_fork_events): Turn into ...
938 (linux_process_target::supports_fork_events): ... this.
939 (linux_supports_vfork_events): Turn into ...
940 (linux_process_target::supports_vfork_events): ... this.
941 (linux_supports_exec_events): Turn into ...
942 (linux_process_target::supports_exec_events): ... this.
943 * linux-low.h (class linux_process_target): Update.
944 * lynx-low.cc (lynx_target_ops): Update.
945 * nto-low.cc (nto_target_ops): Update.
946 * win32-low.cc (win32_target_ops): Update.
947
948 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
949
950 Turn process_stratum_target's supports_multi_process op into a
951 method of process_target.
952
953 * target.h (struct process_stratum_target): Remove the target op.
954 (class process_target): Add the target op.
955 * target.cc (process_target::supports_multi_process): Define.
956 (target_supports_multi_process): Update.
957
958 Update the derived classes and callers below.
959
960 * linux-low.cc (linux_target_ops): Update.
961 (linux_supports_multi_process): Turn into ...
962 (linux_process_target::supports_multi_process): ... this.
963 * linux-low.h (class linux_process_target): Update.
964 * lynx-low.cc (lynx_target_ops): Update.
965 * nto-low.cc (nto_target_ops): Update.
966 * win32-low.cc (win32_target_ops): Update.
967
968 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
969
970 Turn process_stratum_target's supports_non_stop, async, and
971 start_non_stop ops into methods of process_target.
972
973 * target.h (struct process_stratum_target): Remove the target ops.
974 (class process_target): Add the target ops.
975 (target_supports_non_stop): Update the macro.
976 (target_async): Update the macro.
977 (start_non_stop): Remove declaration.
978 * target.cc (process_target::supports_non_stop): Define.
979 (process_target::async): Define.
980 (process_target::start_non_stop): Define.
981 (start_non_stop): Remove.
982
983 Update the derived classes and callers below.
984
985 * server.cc (handle_qxfer_siginfo): Update.
986 (handle_query): Update.
987 * linux-low.cc (linux_target_ops): Update.
988 (linux_supports_non_stop): Turn into ...
989 (linux_process_target::supports_non_stop): ... this.
990 (linux_async): Turn into ...
991 (linux_process_target::async): ... this.
992 (linux_start_non_stop): Turn into ...
993 (linux_process_target::start_non_stop): ... this.
994 * linux-low.h (class linux_process_target): Update.
995 * lynx-low.cc (lynx_target_ops): Update.
996 * nto-low.cc (nto_target_ops): Update.
997 (nto_supports_non_stop): Remove; rely on the default behavior
998 instead.
999 * win32-low.cc (win32_target_ops): Update.
1000
1001 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1002
1003 Turn process_stratum_target's qxfer_siginfo op into a method of
1004 process_target.
1005
1006 * target.h (struct process_stratum_target): Remove the target op.
1007 (class process_target): Add the target op. Also add
1008 'supports_qxfer_siginfo'.
1009 * target.cc (process_target::qxfer_siginfo): Define.
1010 (process_target::supports_qxfer_siginfo): Define.
1011
1012 Update the derived classes and callers below.
1013
1014 * server.cc (handle_qxfer_siginfo): Update.
1015 (handle_query): Update.
1016 * linux-low.cc (linux_target_ops): Update.
1017 (linux_process_target::supports_qxfer_siginfo): Define.
1018 (linux_xfer_siginfo): Turn into ...
1019 (linux_process_target::qxfer_siginfo): ... this.
1020 * linux-low.h (class linux_process_target): Update.
1021 * lynx-low.cc (lynx_target_ops): Update.
1022 * nto-low.cc (nto_target_ops): Update.
1023 * win32-low.cc (win32_target_ops): Update.
1024
1025 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1026
1027 Turn process_stratum_target's qxfer_osdata op into a method of
1028 process_target.
1029
1030 * target.h (struct process_stratum_target): Remove the target op.
1031 (class process_target): Add the target op. Also add
1032 'supports_qxfer_osdata'.
1033 * target.cc (process_target::qxfer_osdata): Define.
1034 (process_target::supports_qxfer_osdata): Define.
1035
1036 Update the derived classes and callers below.
1037
1038 * server.cc (handle_qxfer_osdata): Update.
1039 (handle_query): Update.
1040 * linux-low.cc (linux_target_ops): Update.
1041 (linux_process_target::supports_qxfer_osdata): Define.
1042 (linux_qxfer_osdata): Turn into ...
1043 (linux_process_target::qxfer_osdata): ... this.
1044 * linux-low.h (class linux_process_target): Update.
1045 * lynx-low.cc (lynx_target_ops): Update.
1046 * nto-low.cc (nto_target_ops): Update.
1047 * win32-low.cc (win32_target_ops): Update.
1048
1049 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1050
1051 Turn process_stratum_target's hostio_last_error op into a
1052 method of process_target.
1053
1054 * target.h (struct process_stratum_target): Remove the target op.
1055 (class process_target): Add the target op.
1056 * target.cc: Add "hostio.h" to includes.
1057 (process_target::hostio_last_error): Define.
1058
1059 Update the derived classes and callers below.
1060
1061 * hostio.cc (hostio_error): Update.
1062 * linux-low.cc: Remove "hostio.h" from includes.
1063 (linux_target_ops): Update.
1064 * lynx-low.cc (lynx_target_ops): Update.
1065 * nto-low.cc (nto_target_ops): Update.
1066 * win32-low.h (class win32_process_target): Update.
1067 * win32-low.cc (win32_target_ops): Update.
1068 (wince_hostio_last_error): Turn into ...
1069 (win32_process_target::hostio_last_error): ... this.
1070
1071 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1072
1073 Turn process_stratum_target's get_tls_address op into a method of
1074 process_target.
1075
1076 * target.h (struct process_stratum_target): Remove the target op.
1077 (class process_target): Add the target op. Also add
1078 'supports_get_tls_address'.
1079 * target.cc (process_target::get_tls_address): Define.
1080 (process_target::supports_get_tls_address): Define.
1081
1082 Update the derived classes and callers below.
1083
1084 * server.cc (handle_query): Update.
1085 * linux-low.cc (linux_target_ops): Update.
1086 (linux_process_target::supports_get_tls_address): Define.
1087 (linux_process_target::get_tls_address): Define.
1088 * linux-low.h (class linux_process_target): Update.
1089 * lynx-low.cc (lynx_target_ops): Update.
1090 * nto-low.cc (nto_target_ops): Update.
1091 * win32-low.cc (win32_target_ops): Update.
1092
1093 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1094
1095 Turn process_stratum_target's read_offsets op into a method of
1096 process_target.
1097
1098 * target.h (struct process_stratum_target): Remove the target op.
1099 (class process_target): Add the target op. Also add
1100 'supports_read_offsets'.
1101 * target.cc (process_target::read_offsets): Define.
1102 (process_target::supports_read_offsets): Define.
1103
1104 Update the derived classes and callers below.
1105
1106 * server.cc (handle_query): Update.
1107 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
1108 (linux_target_ops): Update.
1109 (linux_process_target::supports_read_offsets): Define.
1110 (linux_read_offsets): Turn into ...
1111 (linux_process_target::read_offsets): ... this.
1112 * linux-low.h (class linux_process_target): Update.
1113 * lynx-low.cc (lynx_target_ops): Update.
1114 * nto-low.cc (nto_target_ops): Update.
1115 * win32-low.cc (win32_target_ops): Update.
1116
1117 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1118
1119 Turn process_stratum_target's stopped_by_watchpoint and
1120 stopped_data_address ops into methods of process_target.
1121
1122 * target.h (struct process_stratum_target): Remove the target ops.
1123 (class process_target): Add the target ops.
1124 * target.cc (process_target::stopped_by_watchpoint): Define.
1125 (process_target::stopped_data_address): Define.
1126
1127 Update the derived classes and callers below.
1128
1129 * remote-utils.cc (prepare_resume_reply): Update.
1130 * linux-low.cc (linux_target_ops): Update.
1131 (linux_stopped_by_watchpoint): Turn into ...
1132 (linux_process_target::stopped_by_watchpoint): ... this.
1133 (linux_stopped_data_address): Turn into ...
1134 (linux_process_target::stopped_data_address): ... this.
1135 * linux-low.h (class linux_process_target): Update.
1136 * lynx-low.cc (lynx_target_ops): Update.
1137 * nto-low.cc (nto_target_ops): Update.
1138 (nto_stopped_by_watchpoint): Turn into ...
1139 (nto_process_target::stopped_by_watchpoint): ... this.
1140 (nto_stopped_data_address): Turn into ...
1141 (nto_process_target::stopped_data_address): ... this.
1142 * nto-low.h (class nto_process_target): Update.
1143 * win32-low.cc (win32_target_ops): Update.
1144 (win32_stopped_by_watchpoint): Turn into ...
1145 (win32_process_target::stopped_by_watchpoint): ... this.
1146 (win32_stopped_data_address): Turn into ...
1147 (win32_process_target::stopped_data_address): ... this.
1148 * win32-low.h (class win32_process_target): Update.
1149
1150 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1151
1152 Turn process_stratum_target's supports_hardware_single_step op into
1153 a method of process_target.
1154
1155 * target.h (struct process_stratum_target): Remove the target op.
1156 (class process_target): Add the target op.
1157 (target_supports_hardware_single_step): Update the macro.
1158 (target_can_do_hardware_single_step): Remove declaration.
1159 * target.cc (process_target::supports_hardware_single_step): Define.
1160 (target_can_do_hardware_single_step): Remove.
1161
1162 Update the derived classes and callers below.
1163
1164 * linux-low.h (class linux_process_target): Update.
1165 * linux-low.cc (linux_target_ops): Update.
1166 (linux_supports_hardware_single_step): Turn into ...
1167 (linux_process_target::supports_hardware_single_step): ... this.
1168 * lynx-low.h (class lynx_process_target): Update.
1169 * lynx-low.cc (lynx_target_ops): Update.
1170 (lynx_process_target::supports_hardware_single_step): Define.
1171 * nto-low.h (class nto_process_target): Update.
1172 * nto-low.cc (nto_target_ops): Update.
1173 (nto_process_target::supports_hardware_single_step): Define.
1174 * win32-low.h (class win32_process_target): Update.
1175 * win32-low.cc (win32_target_ops): Update.
1176 (win32_process_target::supports_hardware_single_step): Define.
1177
1178 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1179
1180 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
1181 ops into methods of process_target.
1182
1183 * target.h (struct process_stratum_target): Remove the target ops.
1184 (class process_target): Add the target ops.
1185 (target_stopped_by_hw_breakpoint): Update the macro.
1186 (target_supports_stopped_by_hw_breakpoint): Update the macro.
1187 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
1188 (process_target::supports_stopped_by_hw_breakpoint): Define.
1189
1190 Update the derived classes and callers below.
1191
1192 * linux-low.cc (linux_target_ops): Update.
1193 (linux_stopped_by_hw_breakpoint): Turn into ...
1194 (linux_process_target::stopped_by_hw_breakpoint): ... this.
1195 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
1196 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
1197 * linux-low.h (class linux_process_target): Update.
1198 * lynx-low.cc (lynx_target_ops): Update.
1199 * nto-low.cc (nto_target_ops): Update.
1200 * win32-low.cc (win32_target_ops): Update.
1201
1202 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1203
1204 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
1205 ops into methods of process_target.
1206
1207 * target.h (struct process_stratum_target): Remove the target ops.
1208 (class process_target): Add the target ops.
1209 (target_stopped_by_sw_breakpoint): Update the macro.
1210 (target_supports_stopped_by_sw_breakpoint): Update the macro.
1211 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
1212 (process_target::supports_stopped_by_sw_breakpoint): Define.
1213
1214 Update the derived classes and callers below.
1215
1216 * linux-low.cc (linux_target_ops): Update.
1217 (linux_stopped_by_sw_breakpoint): Turn into ...
1218 (linux_process_target::stopped_by_sw_breakpoint): ... this.
1219 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
1220 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
1221 * linux-low.h (class linux_process_target): Update.
1222 * lynx-low.cc (lynx_target_ops): Update.
1223 * nto-low.cc (nto_target_ops): Update.
1224 * win32-low.cc (win32_target_ops): Update.
1225
1226 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1227
1228 Turn process_stratum_target's insert_point and remove_point ops
1229 into methods of process_target.
1230
1231 * target.h (struct process_stratum_target): Remove the target ops.
1232 (class process_target): Add the target ops.
1233 * target.cc (process_target::insert_point): Define.
1234 (process_target::remove_point): Define.
1235
1236 Update the derived classes and callers below.
1237
1238 * mem-break.cc (set_raw_breakpoint_at): Update.
1239 (delete_raw_breakpoint): Update.
1240 (uninsert_raw_breakpoint): Update.
1241 (reinsert_raw_breakpoint): Update.
1242 * linux-low.cc (linux_target_ops): Update.
1243 (linux_insert_point): Turn into ...
1244 (linux_process_target::insert_point): ... this.
1245 (linux_remove_point): Turn into ...
1246 (linux_process_target::remove_point): ... this.
1247 * linux-low.h (class linux_process_target): Update.
1248 * lynx-low.cc (lynx_target_ops): Update.
1249 * nto-low.cc (nto_target_ops): Update.
1250 (nto_insert_point): Turn into ...
1251 (nto_process_target::insert_point): ... this.
1252 (nto_remove_point): Turn into ...
1253 (nto_process_target::remove_point): ... this.
1254 * nto-low.h (class nto_process_target): Update.
1255 * win32-low.cc (win32_target_ops): Update.
1256 (win32_insert_point): Turn into ...
1257 (win32_process_target::insert_point): ... this.
1258 (win32_remove_point): Turn into ...
1259 (win32_process_target::remove_point): ... this.
1260 * win32-low.h (class win32_process_target): Update.
1261
1262 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1263
1264 Turn process_stratum_target's supports_z_point_type op into a
1265 method of process_target.
1266
1267 * target.h (struct process_stratum_target): Remove the target op.
1268 (class process_target): Add the target op.
1269 * target.cc (process_target::supports_z_point_type): Define.
1270
1271 Update the derived classes and callers below.
1272
1273 * mem-break.cc (z_type_supported): Update.
1274 * linux-low.cc (linux_target_ops): Update.
1275 (linux_supports_z_point_type): Turn into ...
1276 (linux_process_target::supports_z_point_type): ... this.
1277 * linux-low.h (class linux_process_target): Update.
1278 * lynx-low.cc (lynx_target_ops): Update.
1279 * nto-low.cc (nto_target_ops): Update.
1280 (nto_supports_z_point_type): Turn into ...
1281 (nto_process_target::supports_z_point_type): ... this.
1282 * nto-low.h (class nto_process_target): Update.
1283 * win32-low.cc (win32_target_ops): Update.
1284 (win32_supports_z_point_type): Turn into ...
1285 (win32_process_target::supports_z_point_type): ... this.
1286 * win32-low.h (class win32_process_target): Update.
1287
1288 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1289
1290 Turn process_stratum_target's read_auxv op into a method of
1291 process_target.
1292
1293 * target.h (class process_stratum_target): Remove the target op.
1294 (struct process_target): Add the target op. Also add
1295 'supports_read_auxv'.
1296 * target.cc (process_target::read_auxv): Define.
1297 (process_target::supports_read_auxv): Define.
1298
1299 Update the derived classes and callers below.
1300
1301 * server.cc (handle_qxfer_auxv): Update.
1302 (handle_query): Update.
1303 * linux-low.cc (linux_target_ops): Update.
1304 (linux_process_target::supports_read_auxv): Define.
1305 (linux_read_auxv): Turn into ...
1306 (linux_process_target::read_auxv): ... this.
1307 * linux-low.h (class linux_process_target): Update.
1308 * lynx-low.cc (lynx_target_ops): Update.
1309 * nto-low.cc (nto_target_ops): Update.
1310 (nto_process_target::supports_read_auxv): Define.
1311 (nto_read_auxv): Turn into ...
1312 (nto_process_target::read_auxv): ... this.
1313 * nto-low.h (class nto_process_target): Update.
1314 * win32-low.cc (win32_target_ops): Update.
1315
1316 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1317
1318 Turn process_stratum_target's request_interrupt op into a method of
1319 process_target.
1320
1321 * target.h (struct process_stratum_target): Remove the target op.
1322 (class process_target): Add the target op.
1323
1324 Update the derived classes and callers below.
1325
1326 * remote-utils.cc (putpkt_binary_1): Update.
1327 (input_interrupt): Update.
1328 (getpkt): Update.
1329 * server.cc (handle_v_requests): Update.
1330 * linux-low.cc (linux_target_ops): Update.
1331 (linux_request_interrupt): Turn into ...
1332 (linux_process_target::request_interrupt): ... this.
1333 * linux-low.h (class linux_process_target): Update.
1334 * lynx-low.cc (lynx_target_ops): Update.
1335 (lynx_request_interrupt): Turn into ...
1336 (lynx_process_target::request_interrupt): ... this.
1337 * lynx-low.h (class lynx_process_target): Update.
1338 * nto-low.cc (nto_target_ops): Update.
1339 (nto_request_interrupt): Turn into ...
1340 (nto_process_target::request_interrupt): ... this.
1341 * nto-low.h (class nto_process_target): Update.
1342 * win32-low.cc (win32_target_ops): Update.
1343 (win32_request_interrupt): Turn into ...
1344 (win32_process_target::request_interrupt): ... this.
1345 * win32-low.h (class win32_process_target): Update.
1346
1347 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1348
1349 Turn process_stratum_target's look_up_symbols op into a method of
1350 process_target.
1351
1352 * target.h (struct process_stratum_target): Remove the target op.
1353 (class process_target): Add the target op.
1354 * target.cc (process_target::look_up_symbols): Define.
1355
1356 Update the derived classes and callers below.
1357
1358 * server.cc (handle_query): Update.
1359 * linux-low.cc (linux_target_ops): Update.
1360 (linux_look_up_symbols): Turn into ...
1361 (linux_process_target::look_up_symbols): ... this.
1362 * linux-low.h (class linux_process_target): Update.
1363 * lynx-low.cc (lynx_target_ops): Update.
1364 * nto-low.cc (nto_target_ops): Update.
1365 * win32-low.cc (win32_target_ops): Update.
1366
1367 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1368
1369 Turn process_stratum_target's read_memory and write_memory
1370 ops into methods of process_target.
1371
1372 * target.h (struct process_stratum_target): Remove the target ops.
1373 (class process_target): Add the target ops.
1374
1375 Update the derived classes and callers below.
1376
1377 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
1378 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
1379 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
1380 (arm_get_syscall_trapinfo): Update.
1381 * linux-cris-low.cc (cris_breakpoint_at): Update.
1382 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
1383 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
1384 * linux-mips-low.cc (mips_breakpoint_at): Update.
1385 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
1386 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
1387 * linux-sh-low.cc (sh_breakpoint_at): Update.
1388 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
1389 (sparc_store_gregset_from_stack): Update.
1390 (sparc_breakpoint_at): Update.
1391 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
1392 * linux-tile-low.cc (tile_breakpoint_at): Update.
1393 * linux-x86-low.cc (x86_breakpoint_at): Update.
1394 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
1395 * mem-brea.cc (insert_memory_breakpoint): Update.
1396 (validate_inserted_breakpoint): Update.
1397 * target.cc (read_inferior_memory): Update.
1398 (target_write_memory): Update.
1399 * linux-low.cc (linux_target_ops): Update.
1400 (linux_read_memory): Make a wrapper around the read_memory target
1401 op call.
1402 (linux_process_target::read_memory): Rename from linux_read_memory.
1403 (linux_write_memory): Turn into ...
1404 (linux_process_target::write_memory): ... this.
1405 * linux-low.h (class linux_process_target): Update.
1406 * lynx-low.cc (lynx_target_ops): Update.
1407 (lynx_read_memory): Turn into ...
1408 (lynx_process_target::read_memory): ... this.
1409 (lynx_write_memory): Turn into ...
1410 (lynx_process_target::write_memory): ... this.
1411 * lynx-low.h (class lynx_process_target): Update.
1412 * nto-low.cc (nto_target_ops): Update.
1413 (nto_read_memory): Turn into ...
1414 (nto_process_target::read_memory): ... this.
1415 (nto_write_memory): Turn into ...
1416 (nto_process_target::write_memory): ... this.
1417 * nto-low.h (class nto_process_target): Update.
1418 * win32-low.cc (win32_target_ops): Update.
1419 (win32_read_inferior_memory): Turn into ...
1420 (win32_process_target::read_memory): ... this.
1421 (win32_write_inferior_memory): Turn into ...
1422 (win32_process_target::write_memory): ... this.
1423 * win32-low.h (class win32_process_target): Update.
1424
1425 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1426
1427 Turn process_stratum_target's prepare_to_access_memory and
1428 done_accessing_memory ops into methods of process_target.
1429
1430 * target.h (struct process_stratum_target): Remove the target ops.
1431 (class process_target): Add the target ops.
1432 * target.cc (process_target::prepare_to_access_memory): Define.
1433 (process_target::done_accessing_memory): Define.
1434 (prepare_to_access_memory): Update.
1435 (done_accessing_memory): Update.
1436
1437 Update the derived classes and callers below.
1438
1439 * linux-low.cc (linux_target_ops): Update.
1440 (linux_prepare_to_access_memory): Turn into ...
1441 (linux_process_target::prepare_to_access_memory): ... this.
1442 (linux_done_accessing_memory): Turn into ...
1443 (linux_process_target::done_accessing_memory): ... this.
1444 * linux-low.h (class linux_process_target): Update.
1445 * lynx-low.cc (lynx_target_ops): Update.
1446 * nto-low.cc (nto_target_ops): Update.
1447 * win32-low.cc (win32_target_ops): Update.
1448
1449 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1450
1451 Turn process_stratum_target's fetch_registers and store_registers
1452 ops into methods of process_target.
1453
1454 * target.h (struct process_stratum_target): Remove the target ops.
1455 (class process_target): Add the target ops.
1456 (fetch_inferior_registers): Update the macro.
1457 (store_inferior_registers): Update the macro.
1458
1459 Update the derived classes and callers below.
1460
1461 * linux-low.cc (linux_target_ops): Update.
1462 (linux_fetch_registers): Turn into ...
1463 (linux_process_target::fetch_registers): ... this.
1464 (linux_store_registers): Turn into ...
1465 (linux_process_target::store_registers): ... this.
1466 * linux-low.h (class linux_process_target): Update.
1467 * lynx-low.cc (lynx_target_ops): Update.
1468 (lynx_fetch_registers): Turn into ...
1469 (lynx_process_target::fetch_registers): ... this.
1470 (lynx_store_registers): Turn into ...
1471 (lynx_process_target::store_registers): ... this.
1472 * lynx-low.h (class lynx_process_target): Update.
1473 * nto-low.cc (nto_target_ops): Update.
1474 (nto_fetch_registers): Turn into ...
1475 (nto_process_target::fetch_registers): ... this.
1476 (nto_store_registers): Turn into ...
1477 (nto_process_target::store_registers): ... this.
1478 * nto-low.h (class nto_process_target): Update.
1479 * win32-low.cc (win32_target_ops): Update.
1480 (win32_fetch_inferior_registers): Turn into ...
1481 (win32_process_target::fetch_registers): ... this.
1482 (win32_store_inferior_registers): Turn into ...
1483 (win32_process_target::store_registers): ... this.
1484 * win32-low.h (class win32_process_target): Update.
1485
1486 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1487
1488 Turn process_stratum_target's wait op into a method of
1489 process_target.
1490
1491 * target.h (struct process_stratum_target): Remove the target op.
1492 (class process_target): Add the target op.
1493
1494 Update the derived classes and callers below.
1495
1496 * target.cc (target_wait): Update.
1497 * linux-low.cc (linux_target_ops): Update.
1498 (linux_wait): Turn into ...
1499 (linux_process_target::wait): ... this.
1500 * linux-low.h (class linux_process_target): Update.
1501 * lynx-low.cc (lynx_target_ops): Update.
1502 (lynx_wait): Turn into ...
1503 (lynx_process_target::wait): ... this.
1504 * lynx-low.h (class lynx_process_target): Update.
1505 * nto-low.cc (nto_target_ops): Update.
1506 (nto_wait): Turn into ...
1507 (nto_process_target::wait): ... this.
1508 * nto-low.h (class nto_process_target): Update.
1509 * win32-low.cc (win32_target_ops): Update.
1510 (win32_wait): Turn into ...
1511 (win32_process_target::wait): ... this.
1512 (do_initial_child_stuff): Update.
1513 * win32-low.h (class win32_process_target): Update.
1514
1515 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1516
1517 Turn process_stratum_target's resume op into a method of
1518 process_target.
1519
1520 * target.h (struct process_stratum_target): Remove the target op.
1521 (class process_target): Add the target op.
1522
1523 Update the derived classes and callers below.
1524
1525 * server.cc (resume): Update.
1526 * target.cc (target_stop_and_wait): Update.
1527 (target_continue_no_signal): Update.
1528 (target_continue): Update.
1529 * linux-low.cc (linux_target_ops): Update.
1530 (linux_resume): Turn into ...
1531 (linux_process_target::resume): ... this.
1532 * linux-low.h (class linux_process_target): Update.
1533 * lynx-low.cc (lynx_target_ops): Update.
1534 (lynx_resume): Turn into ...
1535 (lynx_process_target::resume): ... this.
1536 * lynx-low.h (class lynx_process_target): Update.
1537 * nto-low.cc (nto_target_ops): Update.
1538 (nto_resume): Turn into ...
1539 (nto_process_target::resume): ... this.
1540 * nto-low.h (class nto_process_target): Update.
1541 * win32-low.cc (win32_target_ops): Update.
1542 (win32_resume): Turn into ...
1543 (win32_process_target::resume): ... this.
1544 (win32_process_target::detach): Update.
1545 (do_initial_child_stuff): Update.
1546 * win32-low.h (class win32_process_target): Update.
1547
1548 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1549
1550 Turn process_stratum_target's thread_alive op into a method of
1551 process_target.
1552
1553 * target.h (struct process_stratum_target): Remove the target op.
1554 (class process_target): Add the target op.
1555 (mythread_alive): Update the macro.
1556
1557 Update the derived classes and callers below.
1558
1559 * linux-low.cc (linux_target_ops): Update.
1560 (linux_thread_alive): Turn into ...
1561 (linux_process_target::thread_alive): ... this.
1562 (wait_for_sigstop): Update.
1563 * linux-low.h (class linux_process_target): Update.
1564 * lynx-low.cc (lynx_target_ops): Update.
1565 (lynx_thread_alive): Turn into ...
1566 (lynx_process_target::thread_alive): ... this.
1567 * lynx-low.h (class lynx_process_target): Update.
1568 * nto-low.cc (nto_target_ops): Update.
1569 (nto_thread_alive): Turn into ...
1570 (nto_process_target::thread_alive): ... this.
1571 * nto-low.h (class nto_process_target): Update.
1572 * win32-low.cc (win32_target_ops): Update.
1573 (win32_thread_alive): Turn into ...
1574 (win32_process_target::thread_alive): ... this.
1575 * win32-low.h (class win32_process_target): Update.
1576
1577 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1578
1579 Turn process_stratum_target's join op into a method of
1580 process_target.
1581
1582 * target.h (struct process_stratum_target): Remove the target op.
1583 (class process_target): Add the target op.
1584 (join_inferior): Update the macro.
1585
1586 Update the derived classes and callers below.
1587
1588 * linux-low.cc (linux_target_ops): Update.
1589 (linux_join): Turn into ...
1590 (linux_process_target::join): ... this.
1591 * linux-low.h (class linux_process_target): Update.
1592 * lynx-low.cc (lynx_target_ops): Update.
1593 (lynx_join): Turn into ...
1594 (lynx_process_target::join): ... this.
1595 * lynx-low.h (class lynx_process_target): Update.
1596 * nto-low.cc (nto_target_ops): Update.
1597 (nto_process_target::join): Define.
1598 * nto-low.h (class nto_process_target): Update.
1599 * win32-low.cc (win32_target_ops): Update.
1600 (win32_join): Turn into ...
1601 (win32_process_target::join): ... this.
1602 * win32-low.h (class win32_process_target): Update.
1603
1604 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1605
1606 Turn process_stratum_target's mourn op into a method of
1607 process_target.
1608
1609 * target.h (struct process_stratum_target): Remove the target op.
1610 (class process_target): Add the target op.
1611
1612 Update the derived classes and callers below.
1613
1614 * target.cc (target_mourn_inferior): Update.
1615 * linux-low.cc (linux_target_ops): Update.
1616 (linux_mourn): Turn into ...
1617 (linux_process_target::mourn): ... this.
1618 (handle_extended_wait): Update.
1619 (linux_process_target::kill): Update.
1620 (linux_process_target::detach): Update.
1621 * linux-low.h (class linux_process_target): Update.
1622 * lynx-low.cc (lynx_target_ops): Update.
1623 (lynx_mourn): Turn into ...
1624 (lynx_process_target::mourn): ... this.
1625 * lynx-low.h (class lynx_process_target): Update.
1626 * nto-low.cc (nto_target_ops): Update.
1627 (nto_mourn): Turn into ...
1628 (nto_process_target::mourn): ... this.
1629 * nto-low.h (class nto_process_target): Update.
1630 * win32-low.cc (win32_target_ops): Update.
1631 (win32_mourn): Turn into ...
1632 (win32_process_target::mourn): ... this.
1633 * win32-low.h (class win32_process_target): Update.
1634
1635 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1636
1637 Turn process_stratum_target's detach op into a method of
1638 process_target.
1639
1640 * target.h (struct process_stratum_target): Remove the target op.
1641 (class process_target): Add the target op.
1642 (detach_inferior): Update the macro.
1643
1644 Update the derived classes and callers below.
1645
1646 * linux-low.cc (linux_target_ops): Update.
1647 (linux_detach): Turn into ...
1648 (linux_process_target::detach): ... this.
1649 * linux-low.h (class linux_process_target): Update.
1650 * lynx-low.cc (lynx_target_ops): Update.
1651 (lynx_detach): Turn into ...
1652 (lynx_process_target::detach): ... this.
1653 * lynx-low.h (class lynx_process_target): Update.
1654 * nto-low.cc (nto_target_ops): Update.
1655 (nto_detach): Turn into ...
1656 (nto_process_target::detach): ... this.
1657 * nto-low.h (class nto_process_target): Update.
1658 * win32-low.cc (win32_target_ops): Update.
1659 (win32_detach): Turn into ...
1660 (win32_process_target::detach): ... this.
1661 * win32-low.h (class win32_process_target): Update.
1662
1663 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1664
1665 Turn process_stratum_target's kill op into a method of
1666 process_target.
1667
1668 * target.h (struct process_stratum_target): Remove the target op.
1669 (class process_target): Add the target op.
1670
1671 Update the derived classes and callers below.
1672
1673 * target.cc (kill_inferior): Update.
1674 * linux-low.cc (linux_target_ops): Update.
1675 (linux_kill): Turn into ...
1676 (linux_process_target::kill): ... this.
1677 * linux-low.h (class linux_process_target): Update.
1678 * lynx-low.cc (lynx_target_ops): Update.
1679 (lynx_kill): Turn into ...
1680 (lynx_process_target::kill): ... this.
1681 * lynx-low.h (class lynx_process_target): Update.
1682 * nto-low.cc (nto_target_ops): Update.
1683 (nto_kill): Turn into ...
1684 (nto_process_target::kill): ... this.
1685 * nto-low.h (class nto_process_target): Update.
1686 * win32-low.cc (win32_target_ops): Update.
1687 (win32_kill): Turn into ...
1688 (win32_process_target::kill): ... this.
1689 * win32-low.h (class win32_process_target): Update.
1690
1691 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1692
1693 Turn process_stratum_target's attach op into a method of
1694 process_target.
1695
1696 * target.h (struct process_stratum_target): Remove the target op.
1697 (class process_target): Add the target op.
1698 (myattach): Update the macro.
1699
1700 Update the derived classes and callers below.
1701
1702 * linux-low.cc (linux_target_ops): Update.
1703 (linux_attach): Turn into ...
1704 (linux_process_target::attach): ... this.
1705 * linux-low.h (class linux_process_target): Update.
1706 * lynx-low.cc (lynx_target_ops): Update.
1707 (lynx_attach): Turn into ...
1708 (lynx_process_target::attach): ... this.
1709 * lynx-low.h (class lynx_process_target): Update.
1710 * nto-low.cc (nto_target_ops): Update.
1711 (nto_attach): Turn into ...
1712 (nto_process_target::attach): ... this.
1713 * nto-low.h (class nto_process_target): Update.
1714 * win32-low.cc (win32_target_ops): Update.
1715 (win32_attach): Turn into ...
1716 (win32_process_target::attach): ... this.
1717 * win32-low.h (class win32_process_target): Update.
1718
1719 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1720
1721 Turn process_stratum_target's post_create_inferior op into a method
1722 of process_target.
1723
1724 * target.h (struct process_stratum_target): Remove the target op.
1725 (class process_target): Add the target op.
1726 (target_post_create_inferior): Update the macro.
1727 * target.cc (process_target::post_create_inferior): Define.
1728
1729 Update the derived classes and callers below.
1730
1731 * linux-low.cc (linux_target_ops): Update.
1732 (linux_post_create_inferior): Turn into ...
1733 (linux_process_target::post_create_inferior): ... this.
1734 * linux-low.h (class linux_process_target): Update.
1735 * lynx-low.cc (lynx_target_ops): Update.
1736 * nto-low.cc (nto_target_ops): Update.
1737 * win32-low.cc (win32_target_ops): Update.
1738
1739 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1740
1741 Turn process_stratum_target's create_inferior op into a method of
1742 process_target.
1743
1744 * target.h (struct process_stratum_target): Remove the target op.
1745 (class process_target): Add the target op.
1746 (create_inferior): Rename the macro to ...
1747 (target_create_inferior): ... this.
1748
1749 Update the derived classes and callers below.
1750
1751 * server.cc (handle_v_run): Update.
1752 (captured_main): Update.
1753 (process_serial_event): Update.
1754 * linux-low.cc (linux_target_ops): Update.
1755 (linux_create_inferior): Turn into ...
1756 (linux_process_target::create_inferior): ... this.
1757 * linux-low.h (class linux_process_target): Update.
1758 * lynx-low.cc (lynx_target_ops): Update.
1759 (lynx_create_inferior): Turn into ...
1760 (lynx_process_target::create_inferior): ... this.
1761 * lynx-low.h (class lynx_process_target): Update.
1762 * nto-low.cc (nto_target_ops): Update.
1763 (nto_create_inferior): Turn into ...
1764 (nto_process_target::create_inferior): ... this.
1765 * nto-low.h (class nto_process_target): Update.
1766 * win32-low.cc (win32_target_ops): Update.
1767 (win32_create_inferior): Turn into ...
1768 (win32_process_target::create_inferior): ... this.
1769 * win32-low.h (class win32_process_target): Update.
1770
1771 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1772
1773 * target.h (class process_target): New class definition.
1774 (struct process_stratum_target) <pt>: New field with type
1775 'process_target*'.
1776 * linux-low.h (class linux_process_target): Define as a derived
1777 class of 'process_target'.
1778 * linux-low.cc (linux_target_ops): Add a linux_process_target*
1779 as the 'pt' field.
1780 * lynx-low.h (class lynx_process_target): Define as a derived
1781 class of 'process_target'.
1782 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
1783 as the 'pt' field.
1784 * nto-low.h (class nto_process_target): Define as a derived
1785 class of 'process_target'.
1786 * nto-low.cc (nto_target_ops): Add an nto_process_target*
1787 as the 'pt' field.
1788 * win32-low.h (class win32_process_target): Define as a derived
1789 class of 'process_target'.
1790 * win32-low.cc (win32_target_ops): Add a win32_process_target*
1791 as the 'pt' field.
1792
1793 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
1794
1795 * configure: Regenerate.
1796
1797 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
1798 Andrew Burgess <andrew.burgess@embecosm.com>
1799
1800 * linux-riscv-low.cc: New file.
1801 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
1802 and nat/riscv-linux-tdesc.c.
1803 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
1804 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
1805 Define.
1806
1807 2020-02-14 Tom Tromey <tom@tromey.com>
1808
1809 * acinclude.m4: Don't include acx_configure_dir.m4.
1810 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
1811 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
1812 (all, install-only, uninstall, clean-info, clean)
1813 (maintainer-clean): Don't recurse.
1814 (subdir_do, all-lib): Remove.
1815 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
1816 (GNULIB_H): Remove.
1817 (generated_files): Update.
1818 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
1819 * configure: Rebuild.
1820 * configure.ac: Don't configure gnulib or libiberty.
1821 (GNULIB): Update.
1822
1823 2020-02-14 Eli Zaretskii <eliz@gnu.org>
1824
1825 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
1826 preparing the command line for CreateProcess.
1827 (win32_create_inferior): Reflect the program name in debugging
1828 output that shows the process and its command line.
1829
1830 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1831
1832 * Makefile.in: Rename source files from .c to .cc.
1833 * %.c: Rename to %.cc.
1834 * configure.ac: Rename server.c to server.cc.
1835 * configure: Re-generate.
1836
1837 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1838
1839 * Makefile.in: Rename gdbsupport source files from .c to .cc.
1840
1841 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
1842
1843 * win32-low.c (win32_create_inferior): Set signal_pid.
1844
1845 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
1846 Pedro Alves <palves@redhat.com>
1847
1848 Skip building gdbserver in a cross-configuration.
1849 * configure.srv: Set $gdbserver_host depending on whether $target
1850 is $host. Use $gdbserver_host instead of $host.
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 * configure: Re-generate.
1859
1860 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1861
1862 * acinclude.m4: Update warning.m4 path.
1863
1864 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
1865
1866 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
1867 (handle_exception): Set siginfo_er.
1868 (win32_xfer_siginfo): New function.
1869
1870 2020-02-07 Tom Tromey <tom@tromey.com>
1871 Pedro Alves <palves@redhat.com>
1872
1873 * README: Update build documentation.
1874 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
1875 host, not target.
1876 * configure.ac: Update paths.
1877 * configure: Rebuild.
1878 * acinclude.m4: Update paths.
1879 * Makefile.in: Update include paths.
1880 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
1881 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
1882 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
1883 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
1884 (%-generated.c): Update paths.
1885 * Move entire directory from ../gdb/gdbserver.
1886
1887 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
1888
1889 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
1890
1891 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1892
1893 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
1894 assignment instead of srv_linux_obj.
1895
1896 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
1897
1898 * server.c (handle_qxfer_libraries): Write segment-address with
1899 paddress.
1900
1901 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
1902
1903 * Makefile.in (install-strip): New target.
1904 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
1905 * aclocal.m4: Regenerate.
1906 * configure: Regenerate.
1907 * configure.ac: Add AM_PROG_INSTALL_STRIP.
1908
1909 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1910
1911 * Makefile.in (SFILES): Adjust paths to point to real files.
1912 (OBS): Move waitstatus.o to target/waitstatus.o.
1913 (TAGS): Transform paths appropriately.
1914 (%.o): Rename to...
1915 (nat/%.o): ... this pattern rule.
1916 (%.o): Rename to...
1917 (target/%.o): ... this pattern rule.
1918 * configure.srv: Adjust paths throughout to include nat/ prefix
1919 with the revant files.
1920 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
1921 * configure: Regenerate.
1922
1923 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1924
1925 * Makefile.in (TAGS): Remove config files from the recipe.
1926
1927 2020-01-14 Tom Tromey <tom@tromey.com>
1928
1929 * configure: Rebuild.
1930 * configure.ac: Remove any checks that were added to common.m4.
1931 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
1932 lib-link.m4.
1933
1934 2020-01-14 Tom Tromey <tom@tromey.com>
1935
1936 * server.h: Include config.h.
1937 * gdbreplay.c: Include config.h.
1938 * configure: Rebuild.
1939 * configure.ac: Don't source common.host.
1940 * acinclude.m4: Update path.
1941 * Makefile.in (INCSUPPORT): New variable.
1942 (INCLUDE_CFLAGS): Add INCSUPPORT.
1943 (SFILES): Update paths.
1944 (version-generated.c): Update path to create-version.sh.
1945 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
1946
1947 2020-01-14 Tom Tromey <tom@tromey.com>
1948
1949 * configure.ac (LIBS): Use WIN32APILIBS.
1950 (USE_WIN32API): Don't define.
1951 * configure: Rebuild.
1952
1953 2020-01-14 Tom Tromey <tom@tromey.com>
1954
1955 * configure: Rebuild.
1956
1957 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1958
1959 * Makefile.in (%-generated.c): Remove rule for files from
1960 regformats/i386.
1961
1962 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1963
1964 * configure: Re-generate.
1965
1966 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1967
1968 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
1969 Define to static.
1970 * tracepoint.c (stop_tracing, flush_trace_buffer,
1971 about_to_request_buffer_space, get_trace_state_variable_value,
1972 set_trace_state_variable_value, gdb_collect): Add declaration.
1973
1974 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1975
1976 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
1977 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
1978 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
1979 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
1980 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
1981 static.
1982
1983 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1984
1985 * inferiors.c: Include gdbsupport/common-inferior.h.
1986
1987 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1988
1989 * hostio-errno.c: Include hostio.h.
1990
1991 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1992
1993 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
1994 prerequisite.
1995
1996 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1997
1998 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
1999 * linux-arm-tdesc.h: Include arch/arm.h.
2000
2001 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
2002
2003 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
2004
2005 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
2006
2007 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
2008 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
2009
2010 2020-01-10 Pedro Alves <palves@redhat.com>
2011
2012 * fork-child.c (post_fork_inferior): Pass target down to
2013 startup_inferior.
2014 * inferiors.c (switch_to_thread): Add process_stratum_target
2015 parameter.
2016 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
2017 * nto-low.c (nto_target_ops): Now a process_stratum_target.
2018 * linux-low.c (linux_target_ops): Now a process_stratum_target.
2019 * remote-utils.c (prepare_resume_reply): Pass the target to
2020 switch_to_thread.
2021 * target.c (the_target): Now a process_stratum_target.
2022 (done_accessing_memory): Pass the target to switch_to_thread.
2023 (set_target_ops): Ajust to use process_stratum_target.
2024 * target.h (struct target_ops): Rename to ...
2025 (struct process_stratum_target): ... this.
2026 (the_target, set_target_ops): Adjust.
2027 (prepare_to_access_memory): Adjust comment.
2028 * win32-low.c (child_xfer_memory): Adjust to use
2029 process_stratum_target.
2030 (win32_target_ops): Now a process_stratum_target.
2031
2032 2020-01-06 Eli Zaretskii <eliz@gnu.org>
2033 Pedro Alves <palves@redhat.com>
2034
2035 * win32-low.c (get_child_debug_event): Extract the fatal exception
2036 from the exit status and convert to the equivalent Posix signal
2037 number.
2038 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
2039 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
2040
2041 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
2042
2043 * Makefile.in: Use INSTALL_PROGRAM_ENV.
2044
2045 2020-01-01 Joel Brobecker <brobecker@adacore.com>
2046
2047 * server.c (gdbserver_version): Change copyright year to 2020.
2048 * gdbreplay.c (gdbreplay_version): Likewise.
2049
2050 2019-12-19 Christian Biesinger <cbiesinger@google.com>
2051
2052 * configure: Regenerate.
2053 * configure.ac: Quote variable arguments of test.
2054
2055 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
2056
2057 * Makefile.in: Fix build with GNU Make 3.81
2058
2059 2019-12-16 Tom Tromey <tromey@adacore.com>
2060
2061 * server.c (get_exec_file): Constify result.
2062
2063 2019-12-10 Christian Biesinger <cbiesinger@google.com>
2064
2065 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
2066 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
2067 * config.in: Regenerate.
2068 * configure: Regenerate.
2069 * configure.ac: Don't check for strerror.
2070 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
2071 Call safe_strerror instead of strerror.
2072 * server.h (strerror): Remove this now-unnecessary declaration.
2073 * tracepoint.c (init_named_socket): Call safe_strerror instead of
2074 strerror.
2075 (gdb_agent_helper_thread): Likewise.
2076 * utils.c (perror_with_name): Likewise.
2077
2078 2019-11-26 Tom Tromey <tom@tromey.com>
2079
2080 * configure, config.in: Rebuild.
2081
2082 2019-11-26 Tom Tromey <tom@tromey.com>
2083
2084 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
2085 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
2086 gdb_sigmask.
2087 * configure, config.in: Rebuild.
2088
2089 2019-11-26 Tom Tromey <tom@tromey.com>
2090
2091 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
2092 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
2093 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
2094 * acinclude.m4: Include ax_pthread.m4.
2095 * config.in, configure: Rebuild.
2096
2097 2019-11-26 Christian Biesinger <cbiesinger@google.com>
2098
2099 * debug.c (debug_set_output): Call safe_strerror instead of
2100 strerror.
2101 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
2102 (linux_kill_one_lwp): Likewise.
2103 (linux_detach_one_lwp): Likewise.
2104 (linux_wait_for_event_filtered): Likewise.
2105 (store_register): Likewise.
2106 * lynx-low.c (lynx_attach): Likewise.
2107 * mem-break.c (insert_memory_breakpoint): Likewise.
2108 (remove_memory_breakpoint): Likewise.
2109 (delete_fast_tracepoint_jump): Likewise.
2110 (set_fast_tracepoint_jump): Likewise.
2111 (uninsert_fast_tracepoint_jumps_at): Likewise.
2112 (reinsert_fast_tracepoint_jumps_at): Likewise.
2113 * nto-low.c (nto_xfer_memory): Likewise.
2114 (nto_resume): Likewise.
2115
2116 2019-11-20 Luis Machado <luis.machado@linaro.org>
2117
2118 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
2119 instead of register count.
2120 * tdesc.c (tdesc_contains_feature): New function.
2121 * tdesc.h (tdesc_contains_feature): New prototype.
2122
2123 2019-11-15 Christian Biesinger <cbiesinger@google.com>
2124
2125 * Makefile.in: Add safe-strerror.c.
2126 * configure: Regenerate.
2127 * configure.ac: Don't source common.host.
2128
2129 2019-11-15 Christian Biesinger <cbiesinger@google.com>
2130
2131 * config.in: Regenerate.
2132 * configure: Regenerate.
2133
2134 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
2135
2136 * ax.c (ax_printf): Handle size_t_arg.
2137
2138 2019-11-06 Christian Biesinger <cbiesinger@google.com>
2139
2140 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
2141 * mi/mi-main.c (output_cores): Likewise.
2142 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
2143 (linux_xfer_osdata_modules): Likewise.
2144 * remote.c (register_remote_support_xml): Likewise.
2145 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
2146 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
2147
2148 2019-11-01 Christian Biesinger <cbiesinger@google.com>
2149
2150 * configure: Regenerate.
2151 * configure.ac: Remove check for strerror_r.
2152
2153 2019-10-31 Christian Biesinger <cbiesinger@google.com>
2154
2155 * config.in: Regenerate.
2156 * configure: Regenerate.
2157 * configure.ac: Also check for strerror_r.
2158
2159 2019-10-31 Christian Biesinger <cbiesinger@google.com>
2160
2161 * ax.h (debug_agent): Remove duplicate declaration.
2162
2163 2019-10-26 Tom de Vries <tdevries@suse.de>
2164
2165 * linux-aarch64-low.c: Fix typos in comments.
2166 * linux-arm-low.c: Same.
2167 * linux-low.c: Same.
2168 * linux-ppc-low.c: Same.
2169 * proc-service.c: Same.
2170 * regcache.h: Same.
2171 * server.c: Same.
2172 * tracepoint.c: Same.
2173 * win32-low.c: Same.
2174
2175 2019-10-25 Tom Tromey <tromey@adacore.com>
2176
2177 * utils.c (xstrdup): Remove.
2178
2179 2019-10-23 Tom Tromey <tom@tromey.com>
2180
2181 * configure, config.in: Rebuild.
2182
2183 2019-10-23 Tom Tromey <tom@tromey.com>
2184
2185 * configure: Rebuild.
2186 * acinclude.m4: Use m4_include, not sinclude.
2187
2188 2019-10-17 Tom Tromey <tromey@adacore.com>
2189
2190 * configure: Rebuild.
2191 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
2192 in AC_CONFIG_FILES invocation.
2193 * Makefile.in (stamp-h, Makefile): Use new-style config.status
2194 invocation.
2195
2196 2019-10-16 Christian Biesinger <cbiesinger@google.com>
2197
2198 * server.c: Include xml-builtin.h.
2199 (get_xml_features): Don't declare xml_builtins here.
2200
2201 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
2202
2203 * Makefile.in: Remove references to vec-ipa.o.
2204
2205 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
2206
2207 * Makefile.in: Remove references to vec.c.
2208
2209 2019-10-02 Christian Biesinger <cbiesinger@google.com>
2210
2211 * server.c (server_waiting): Change to bool.
2212 (extended_protocol): Likewise.
2213 (response_needed): Likewise.
2214 (exit_requested): Likewise.
2215 (run_once): Likewise.
2216 (report_no_resumed): Likewise.
2217 (non_stop): Likewise.
2218 (disable_packet_vCont): Likewise.
2219 (disable_packet_Tthread): Likewise.
2220 (disable_packet_qC): Likewise.
2221 (disable_packet_qfThreadInfo): Likewise.
2222 (handle_general_set): Update.
2223 (handle_detach): Update.
2224 (handle_monitor_command): Update.
2225 (handle_query): Update.
2226 (captured_main): Update.
2227 (process_serial_event): Update.
2228 * server.h (server_waiting): Change to bool.
2229 (disable_packet_vCont): Likewise.
2230 (disable_packet_Tthread): Likewise.
2231 (disable_packet_qC): Likewise.
2232 (disable_packet_qfThreadInfo): Likewise.
2233 (run_once): Likewise.
2234 (non_stop): Likewise.
2235 * target.c (target_stop_and_wait): Update.
2236
2237 2019-10-02 Tom Tromey <tromey@adacore.com>
2238
2239 * Makefile.in (SFILES): Add common-inferior.c.
2240 (OBS): Add common-inferior.o.
2241 * server.c (startup_with_shell): Don't define.
2242
2243 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
2244
2245 * linux-low.c (linux_low_read_btrace): Update for change to
2246 std::vector.
2247
2248 2019-09-20 Christian Biesinger <cbiesinger@google.com>
2249
2250 * debug.c (debug_threads): Remove comment in favor of the header.
2251 * debug.h (using_threads): Add declaration.
2252 (debug_threads): Add comment.
2253 * linux-aarch64-low.c: Include debug.h and remove declaration of
2254 debug_threads.
2255 * nto-low.c: Likewise.
2256 * remote-utils.c: Likewise.
2257 * thread-db.c: Likewise.
2258
2259 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
2260
2261 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
2262 and powerpc-cell64l-ipa.o.
2263 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
2264 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
2265 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
2266 (spu*-*-*): Remove.
2267
2268 * spu-low.c: Remove file.
2269
2270 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
2271 (parse_spufs_run): Remove.
2272 (ppc_get_pc): Remove Cell/B.E. support.
2273 (ppc_set_pc): Likewise.
2274 (ppc_breakpoint_at): Likewise.
2275 (ppc_arch_setup): Likewise.
2276 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
2277 tdesc_powerpc_cell32l.
2278 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
2279 or init_registers_powerpc_cell32l.
2280 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
2281 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
2282 or init_registers_powerpc_cell32l.
2283 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
2284 (init_registers_powerpc_cell32l): Remove prototype.
2285 (init_registers_powerpc_cell64l): Likewise.
2286
2287 * target.h (struct target_ops): Remove qxfer_spu member.
2288 * server.c (handle_qxfer_spu): Remove.
2289 (qxfer_packets): Remove entry for "spu".
2290 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
2291 * linux-low.c (SPUFS_MAGIC): Remove.
2292 (spu_enumerate_spu_ids): Remove.
2293 (linux_qxfer_spu): Remove.
2294 (linux_target_ops): Remove qxfer_spu member.
2295 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
2296 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
2297 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
2298
2299 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
2300
2301 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
2302 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
2303 * config.in: Regenerate.
2304 * configure: Regenerate.
2305
2306 2019-08-15 Tom Tromey <tromey@adacore.com>
2307
2308 * target.c (target_write_memory): Use gdb::byte_vector.
2309
2310 2019-08-15 Tom Tromey <tromey@adacore.com>
2311
2312 * tracepoint.c (write_inferior_data_pointer)
2313 (write_inferior_integer, write_inferior_int8)
2314 (write_inferior_uinteger, m_tracepoint_action_download)
2315 (r_tracepoint_action_download, x_tracepoint_action_download)
2316 (l_tracepoint_action_download, clear_inferior_trace_buffer)
2317 (download_agent_expr, download_tracepoint_1)
2318 (download_trace_state_variables, upload_fast_traceframes): Update.
2319 * server.c (gdb_write_memory): Update.
2320 * remote-utils.c (relocate_instruction): Update.
2321 * proc-service.c (ps_pdwrite): Update.
2322 * mem-break.c (remove_memory_breakpoint)
2323 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
2324 (uninsert_fast_tracepoint_jumps_at)
2325 (reinsert_fast_tracepoint_jumps_at): Update.
2326 * linux-x86-low.c (append_insns)
2327 (i386_install_fast_tracepoint_jump_pad)
2328 (amd64_write_goto_address, i386_write_goto_address): Update.
2329 * linux-s390-low.c (append_insns, s390_write_goto_address):
2330 Update.
2331 * linux-ppc-low.c (ppc_relocate_instruction)
2332 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
2333 (ppc_write_goto_address): Update.
2334 * linux-aarch64-low.c (append_insns): Update.
2335 * target.h (struct target_ops): Update.
2336 (write_inferior_memory): Don't declare.
2337 * target.c (target_write_memory): Rename from
2338 write_inferior_memory. Remove old target_write_memory.
2339
2340 2019-08-15 Tom Tromey <tromey@adacore.com>
2341
2342 * target.c (write_inferior_memory): Use std::vector.
2343
2344 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
2345
2346 PR build/24886
2347 * configure.ac: Drop enable-libmcheck support.
2348 * configure, config.in: Rebuild.
2349 * acinclude.m4: Don't include it.
2350
2351 2019-07-19 Alan Hayward <alan.hayward@arm.com>
2352
2353 * configure.srv: Remove Arm xml files.
2354
2355 2019-07-19 Alan Hayward <alan.hayward@arm.com>
2356
2357 * configure.srv: Add new files. Remove xml generated files.
2358 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
2359 registers.
2360 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
2361 * linux-aarch32-tdesc.c: New file.
2362 * linux-aarch32-tdesc.h: New file.
2363 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
2364 * linux-arm-low.c (init_registers_arm, tdesc_arm)
2365 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
2366 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
2367 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
2368 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
2369 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
2370 (arm_read_description): Call arm_linux_read_description.
2371 (initialize_low_arch): Don't init registers.
2372 * linux-arm-tdesc.c: New file.
2373 * linux-arm-tdesc.h: New file.
2374
2375 2019-07-10 Alan Hayward <alan.hayward@arm.com>
2376
2377 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
2378 Move counter inside for.
2379 (arm_read_description): Check ptrace earlier.
2380 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
2381
2382 2019-07-09 Tom Tromey <tom@tromey.com>
2383
2384 * configure: Rebuild.
2385 * configure.ac: Change common to gdbsupport.
2386 * acinclude.m4: Change common to gdbsupport.
2387 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
2388 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
2389 common to gdbsupport.
2390 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
2391 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
2392 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
2393 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
2394 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
2395 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
2396 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
2397 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
2398 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
2399 common to gdbsupport.
2400
2401 2019-07-04 Alan Hayward <alan.hayward@arm.com>
2402
2403 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
2404 defines.
2405 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
2406
2407 2019-07-04 Alan Hayward <alan.hayward@arm.com>
2408
2409 * configure.srv: Remove legacy xml.
2410 * linux-aarch64-low.c (initialize_low_arch): Remove
2411 initialize_low_tdesc call.
2412 * linux-aarch64-tdesc-selftest.c: Remove file.
2413 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
2414 * linux-x86-low.c (initialize_low_arch): Remove
2415 initialize_low_tdesc call.
2416 * linux-x86-tdesc-selftest.c: Remove file.
2417 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
2418
2419 2019-06-20 Tom de Vries <tdevries@suse.de>
2420
2421 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
2422 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
2423
2424 2019-06-19 Tom de Vries <tdevries@suse.de>
2425
2426 * debug.h (debug_write): Change return type to ssize_t.
2427 * debug.c (debug_write): Same.
2428
2429 2019-06-14 Tom Tromey <tom@tromey.com>
2430
2431 * configure.ac: Use new path to gnulib.
2432 * configure: Rebuild.
2433 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
2434 to gnulib.
2435
2436 2019-06-11 Tom Tromey <tom@tromey.com>
2437
2438 * Makefile.in (SFILES): Add alloc.c.
2439 (OBS): Add alloc.o.
2440 (IPA_OBJS): Add alloc-ipa.o.
2441 (alloc-ipa.o): New target.
2442 (%.o: ../%.c): New pattern rule.
2443
2444 2019-06-10 Tom Tromey <tromey@adacore.com>
2445
2446 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
2447 end warning with a newline.
2448 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
2449 newline.
2450 * thread-db.c (attach_thread): Don't end warning with a newline.
2451 (thread_db_notice_clone): Likewise.
2452 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
2453 newline.
2454 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
2455 end warning with a newline.
2456
2457 2019-06-04 Pedro Alves <palves@redhat.com>
2458
2459 * server.c (captured_main): Use make_unique_xstrdup.
2460
2461 2019-06-02 Tom Tromey <tom@tromey.com>
2462
2463 * gdbreplay.c (fromhex): Remove.
2464 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
2465
2466 2019-05-29 Tom Tromey <tromey@adacore.com>
2467
2468 * configure: Rebuild.
2469
2470 2019-05-06 Kevin Buettner <kevinb@redhat.com>
2471
2472 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
2473 sign extension code on 32-bit builds.
2474
2475 2019-05-03 Eli Zaretskii <eliz@gnu.org>
2476
2477 * remote-utils.c:
2478 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
2479
2480 2019-04-19 Tom Tromey <tom@tromey.com>
2481
2482 * server.c (struct vstop_notif): Derive from notif_event.
2483 <base>: Remove.
2484 (queue_stop_reply): Update.
2485 (remove_all_on_match_ptid): Change type. Rewrite.
2486 (discard_queued_stop_replies): Rewrite.
2487 (in_queued_stop_replies_ptid): Change type.
2488 (in_queued_stop_replies): Rewrite.
2489 (notif_stop): Update.
2490 (queue_stop_reply_callback): Update.
2491 (captured_main): Don't call initialize_notif.
2492 (push_stop_notification): Update.
2493 * notif.c (notif_write_event, handle_notif_ack)
2494 (notif_event_enque, notif_push): Update.
2495 (notif_event_xfree, initialize_notif): Remove.
2496 * notif.h (struct notif_event): Include <list>, not
2497 "common/queue.h".
2498 (struct notif_server) <queue>: Now a std::list.
2499 (notif_event_p): Remove typedef.
2500 (initialize_notif): Don't declare.
2501 (struct notif_event): Add virtual destructor.
2502
2503 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2504
2505 * ax.c (ax_vdebug): Call debug_printf.
2506 * debug.c (debug_write): New function.
2507 * debug.h (debug_write): New declaration.
2508 * linux-low.c (sigchld_handler): Call debug_write.
2509
2510 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2511
2512 * debug.c (debug_set_output): New function.
2513 (debug_vprintf): Send output to debug_file.
2514 (debug_flush): Likewise.
2515 * debug.h (debug_set_output): New declaration.
2516 * server.c (handle_monitor_command): Add debug-file option.
2517 (captured_main): Likewise.
2518
2519 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2520
2521 * debug.c (remote_debug): Add definition.
2522 * debug.h (remote_debug): Add declaration.
2523 * hostio.c (remote_debug): Remove declaration.
2524 * remote-utils.c (struct ui_file): Likewise.
2525 (remote_debug): Likewise.
2526 * remote-utils.h (remote_debug): Likewise,
2527 * server.c (remote_debug): Remove definition.
2528
2529 2019-04-10 Kevin Buettner <kevinb@redhat.com>
2530
2531 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
2532 when using a 64-bit gdbserver.
2533
2534 2019-04-09 Tom Tromey <tromey@adacore.com>
2535
2536 * linux-low.c (select_event_lwp): Use find_thread_in_random.
2537
2538 2019-04-08 Tom Tromey <tom@tromey.com>
2539
2540 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
2541 throw.
2542 (linux_resume_one_lwp): Likewise.
2543
2544 2019-04-08 Tom Tromey <tom@tromey.com>
2545
2546 * gdbreplay.c: Update.
2547 * linux-low.c: Update.
2548 * server.c: Update.
2549
2550 2019-04-08 Tom Tromey <tom@tromey.com>
2551
2552 * server.c: Use C++ exception handling.
2553 * linux-low.c: Use C++ exception handling.
2554 * gdbreplay.c: Use C++ exception handling.
2555
2556 2019-04-08 Tom Tromey <tom@tromey.com>
2557
2558 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
2559 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
2560 (captured_main, main): Update.
2561 * gdbreplay.c (main): Update.
2562
2563 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2564
2565 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
2566 value in argument pointer, return 1 if the entry is found and 0
2567 otherwise. Move comment.
2568 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
2569 * linux-low.h (linux_get_auxv): Declare.
2570 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
2571
2572 2019-04-05 Tom Tromey <tromey@adacore.com>
2573
2574 * server.c (gdbserver_usage): Use upper-case for metasyntactic
2575 variables.
2576
2577 2019-03-28 Alan Hayward <alan.hayward@arm.com>
2578
2579 * linux-low.c (AT_HWCAP2): Add define if not already included.
2580
2581 2019-03-26 Alan Hayward <alan.hayward@arm.com>
2582
2583 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
2584 (aarch64_arch_setup): Call linux_get_hwcap.
2585 * linux-arm-low.c (arm_get_hwcap): Remove function.
2586 (arm_read_description): Call linux_get_hwcap.
2587 * linux-low.c (linux_get_auxv): New function.
2588 (linux_get_hwcap): Likewise.
2589 (linux_get_hwcap2): Likewise.
2590 * linux-low.h (linux_get_hwcap): New declaration.
2591 (linux_get_hwcap2): Likewise.
2592 * linux-ppc-low.c (ppc_get_auxv): Remove function.
2593 (ppc_arch_setup): Call linux_get_hwcap.
2594 * linux-s390-low.c (s390_get_hwcap): Remove function.
2595 (s390_arch_setup): Call linux_get_hwcap.
2596
2597 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2598 Jiong Wang <jiong.wang@arm.com>
2599
2600 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
2601 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
2602 to fail.
2603 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
2604
2605 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2606 Jiong Wang <jiong.wang@arm.com>
2607
2608 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
2609 (aarch64_get_hwcap): New function.
2610 (aarch64_arch_setup): Read APIA hwcap.
2611
2612 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2613 Jiong Wang <jiong.wang@arm.com>
2614
2615 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
2616 (initialize_low_tracepoint): Likewise.
2617 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
2618 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
2619 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
2620 (aarch64_linux_read_description): Likewise.
2621 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
2622
2623 2019-03-12 John Baldwin <jhb@FreeBSD.org>
2624
2625 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
2626 i386_create_target_description for 'segments' parameter.
2627 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
2628 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2629 * win32-i386-low.c (i386_arch_setup): Likewise.
2630
2631 2019-03-12 Tom Tromey <tromey@adacore.com>
2632
2633 * linux-low.c (iterate_over_lwps): Update.
2634
2635 2019-03-06 Tom Tromey <tom@tromey.com>
2636
2637 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
2638 (captured_main): Use SCOPE_EXIT.
2639
2640 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
2641
2642 * configure.srv: Use '$enable_unittest' instead of '$development'
2643 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
2644 case.
2645
2646 2019-02-27 Tom Tromey <tromey@adacore.com>
2647
2648 * gdbreplay.c (logchar): Handle \r\n.
2649
2650 2019-02-07 Alan Hayward <alan.hayward@arm.com>
2651
2652 * linux-low.c (linux_attach): Add process before lwp.
2653 * server.c (attach_inferior): Check if already attached.
2654
2655 2019-02-07 Tom Tromey <tom@tromey.com>
2656
2657 * x86-tdesc.h: Rename include guard.
2658 * x86-low.h: Add include guard.
2659 * wincecompat.h: Rename include guard.
2660 * win32-low.h: Add include guard.
2661 * utils.h: Rename include guard.
2662 * tracepoint.h: Rename include guard.
2663 * tdesc.h: Rename include guard.
2664 * target.h: Rename include guard.
2665 * server.h: Rename include guard.
2666 * remote-utils.h: Rename include guard.
2667 * regcache.h: Rename include guard.
2668 * nto-low.h: Rename include guard.
2669 * notif.h: Add include guard.
2670 * mem-break.h: Rename include guard.
2671 * lynx-low.h: Add include guard.
2672 * linux-x86-tdesc.h: Add include guard.
2673 * linux-s390-tdesc.h: Add include guard.
2674 * linux-ppc-tdesc-init.h: Add include guard.
2675 * linux-low.h: Add include guard.
2676 * linux-aarch64-tdesc.h: Add include guard.
2677 * linux-aarch32-low.h: Add include guard.
2678 * inferiors.h: Rename include guard.
2679 * i387-fp.h: Rename include guard.
2680 * hostio.h: Rename include guard.
2681 * gdbthread.h: Rename include guard.
2682 * gdb_proc_service.h: Rename include guard.
2683 * event-loop.h: Rename include guard.
2684 * dll.h: Rename include guard.
2685 * debug.h: Rename include guard.
2686 * ax.h: Rename include guard.
2687
2688 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
2689
2690 PR gdb/23985
2691 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
2692 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
2693
2694 2019-01-25 Tom Tromey <tom@tromey.com>
2695
2696 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
2697
2698 2019-01-25 Tom Tromey <tom@tromey.com>
2699
2700 * win32-low.c: Fix common/ includes.
2701 * win32-i386-low.c: Fix common/ includes.
2702 * tracepoint.c: Fix common/ includes.
2703 * thread-db.c: Fix common/ includes.
2704 * target.h: Fix common/ includes.
2705 * symbol.c: Fix common/ includes.
2706 * spu-low.c: Fix common/ includes.
2707 * server.h: Fix common/ includes.
2708 * server.c: Fix common/ includes.
2709 * remote-utils.c: Fix common/ includes.
2710 * regcache.h: Fix common/ includes.
2711 * regcache.c: Fix common/ includes.
2712 * nto-x86-low.c: Fix common/ includes.
2713 * notif.h: Fix common/ includes.
2714 * mem-break.h: Fix common/ includes.
2715 * lynx-low.c: Fix common/ includes.
2716 * lynx-i386-low.c: Fix common/ includes.
2717 * linux-x86-tdesc-selftest.c: Fix common/ includes.
2718 * linux-x86-low.c: Fix common/ includes.
2719 * linux-low.c: Fix common/ includes.
2720 * inferiors.h: Fix common/ includes.
2721 * i387-fp.c: Fix common/ includes.
2722 * hostio.c: Fix common/ includes.
2723 * hostio-errno.c: Fix common/ includes.
2724 * gdbthread.h: Fix common/ includes.
2725 * gdbreplay.c: Fix common/ includes.
2726 * fork-child.c: Fix common/ includes.
2727 * event-loop.c: Fix common/ includes.
2728 * ax.c:
2729 (enum gdb_agent_op): Fix common/ includes.
2730
2731 2019-01-21 Tom Tromey <tom@tromey.com>
2732
2733 * tracepoint.c: Fix includes.
2734 * remote-utils.c: Fix includes.
2735 * linux-x86-low.c: Fix includes.
2736
2737 2019-01-01 Joel Brobecker <brobecker@adacore.com>
2738
2739 * gdbreplay.c (gdbreplay_version): Update copyright year in
2740 version message.
2741 * server.c (gdbserver_version): Likewise.
2742
2743 2018-12-05 Alan Hayward <alan.hayward@arm.com>
2744
2745 * linux-low.c (add_lwp): Switch ordering.
2746
2747 2018-11-29 Tom Tromey <tom@tromey.com>
2748
2749 * win32-low.c (win32_join): Take pid, not process.
2750 * target.h (struct target_ops) <join>: Change argument type.
2751 (join_inferior): Change argument name.
2752 * spu-low.c (spu_join): Take pid, not process.
2753 * server.c (handle_detach): Preserve pid before destroying
2754 process.
2755 * lynx-low.c (lynx_join): Take pid, not process.
2756 * linux-low.c (linux_join): Take pid, not process.
2757
2758 2018-11-23 Alan Hayward <alan.hayward@arm.com>
2759
2760 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
2761 (aarch64_cannot_fetch_register): Likewise.
2762 (struct linux_target_ops): Update references.
2763
2764 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2765
2766 * linux-ppc-low.c: Include nat/linux-ptrace.h.
2767
2768 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2769
2770 * configure.srv (ipa_ppc_linux_regobj): Add
2771 powerpc-isa207-htm-vsx32l-ipa.o and
2772 powerpc-isa207-htm-vsx64l-ipa.o.
2773 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
2774 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
2775 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
2776 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
2777 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
2778 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
2779 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
2780 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
2781 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2782 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
2783 (init_registers_powerpc_isa207_htm_vsx32l)
2784 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
2785 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
2786 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
2787 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
2788 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
2789 (ppc_store_tm_ctarregset): New functions.
2790 (ppc_regsets): Add entries for HTM regsets.
2791 (ppc_arch_setup): Set htm in features struct when needed. Set
2792 sizes for the HTM regsets.
2793 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
2794 (initialize_low_arch): Call
2795 init_registers_powerpc_isa207_htm_vsx32l and
2796 init_registers_powerpc_isa207_htm_vsx64l.
2797 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2798 PPC_TDESC_ISA207_HTM_VSX.
2799 (initialize_low_tracepoint): Call
2800 init_registers_powerpc_isa207_htm_vsx32l and
2801 init_registers_powerpc_isa207_htm_vsx64l.
2802
2803 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2804
2805 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
2806 rs6000/power-linux-pmu.xml to srv_xmlfiles.
2807 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
2808 (ppc_store_pmuregset): New functions.
2809 (ppc_regsets): Add entries for ebb and pmu regsets.
2810 (ppc_arch_setup): Set isa207 in features struct if the ebb and
2811 pmu regsets are available. Set sizes for these regsets.
2812
2813 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2814
2815 * configure.srv (ipa_ppc_linux_regobj): Add
2816 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
2817 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
2818 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
2819 rs6000/powerpc-isa207-vsx32l.xml, and
2820 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
2821 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2822 <PPC_TDESC_ISA207_VSX>: New enum value.
2823 (init_registers_powerpc_isa207_vsx32l): Declare.
2824 (init_registers_powerpc_isa207_vsx64l): Declare.
2825 * linux-ppc-low.c (ppc_fill_tarregset): New function.
2826 (ppc_store_tarregset): New function.
2827 (ppc_regsets): Add entry for the TAR regset.
2828 (ppc_arch_setup): Set isa207 in features struct when needed. Set
2829 size for the TAR regsets.
2830 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
2831 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
2832 and init_registers_powerpc_isa207_vsx64l.
2833 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
2834 (initialize_low_tracepoint): Call
2835 init_registers_powerpc_isa207_vsx32l and
2836 init_registers_powerpc_isa207_vsx64l.
2837
2838 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2839 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2840
2841 * configure.srv (ipa_ppc_linux_regobj): Add
2842 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
2843 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
2844 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
2845 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
2846 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
2847 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
2848 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
2849 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2850 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
2851 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
2852 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
2853 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
2854 (ppc_hwcap): Add comment.
2855 (ppc_hwcap2): New global.
2856 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
2857 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
2858 (ppc_regsets): Add entries for the DSCR and PPR regsets.
2859 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
2860 when needed. Set sizes for the the DSCR and PPR regsets.
2861 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
2862 (initialize_low_arch): Call
2863 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2864 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2865 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2866 PPC_TDESC_ISA205_PPR_DSCR_VSX.
2867 (initialize_low_tracepoint): Call
2868 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2869 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2870
2871 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2872
2873 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
2874
2875 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
2876 Simon Marchi <simark@simark.ca>
2877
2878 * acinclude.m4: Include "../selftest.m4".
2879 * configure: Regenerate.
2880 * configure.ac: Use "GDB_AC_SELFTEST".
2881 * configure.srv: Use "$enable_unittests" instead of
2882 "$development" when checking whether unit tests have been
2883 enabled.
2884 * server.c (captured_main): Update message informing that
2885 selftests have been disabled.
2886
2887 2018-10-04 Tom Tromey <tom@tromey.com>
2888
2889 * configure: Rebuild.
2890
2891 2018-10-04 Tom Tromey <tom@tromey.com>
2892
2893 * server.c (handle_status): Rename inner "thread".
2894 (process_serial_event): Declare "res" in 'm' case.
2895 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
2896 (iterate_over_lwps): Rename inner "thread".
2897 (linux_qxfer_libraries_svr4): Rename inner "len".
2898 * gdbthread.h (find_thread_in_random): Rename inner "thread".
2899
2900 2018-10-01 Gary Benson <gbenson@redhat.com>
2901
2902 * gdb_proc_service.h: Moved common code to
2903 common/gdb_proc_service.h.
2904
2905 2018-10-01 Gary Benson <gbenson@redhat.com>
2906
2907 * gdb_proc_service.h: Synchronize comments and whitespace with
2908 GDB's version of this file.
2909
2910 2018-09-25 Tom Tromey <tom@tromey.com>
2911
2912 * configure: Rebuild.
2913 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
2914
2915 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2916
2917 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
2918 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
2919 ($(IPA_LIB)): Sort IPA_OBJS.
2920
2921 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2922
2923 * Makefile.in: Remove references to $(ADD_DEPS).
2924
2925 2018-09-16 Tom Tromey <tom@tromey.com>
2926
2927 * remote-utils.c (remote_open): Use GNU style for metasyntactic
2928 variables.
2929 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
2930 variables.
2931
2932 2018-09-05 Tom Tromey <tom@tromey.com>
2933
2934 * configure: Rebuild.
2935
2936 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2937
2938 PR build/23399
2939 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
2940
2941 2018-08-27 Tom Tromey <tom@tromey.com>
2942
2943 PR build/23087:
2944 * configure: Rebuild.
2945
2946 2018-08-27 Tom Tromey <tom@tromey.com>
2947
2948 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
2949 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
2950 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
2951 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
2952 (s390x_emit_stack_adjust): Add casts to unsigned char.
2953
2954 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
2955
2956 PR gdb/23374
2957 PR gdb/23375
2958 * server.h (struct client_state) <disable_randomization>:
2959 Initialize to 1.
2960
2961 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2962
2963 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
2964 variable.
2965 (mips_supply_ptrace_register): Likewise.
2966
2967 2018-07-22 Tom Tromey <tom@tromey.com>
2968
2969 * configure: Rebuild.
2970
2971 2018-07-22 Tom Tromey <tom@tromey.com>
2972
2973 * win32-low.c (win32_create_inferior): Remove unused variables.
2974 * gdbreplay.c (remote_open): Remove unused variable.
2975 * remote-utils.c (remote_prepare): Remove unused variable.
2976 * x86-tdesc.h (X86_TDESC_H): Define.
2977 (amd64_expedite_regs): Define conditionally.
2978 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
2979 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
2980 * remote-utils.c (readchar): Remove unused variable.
2981
2982 2018-07-13 Pedro Alves <palves@redhat.com>
2983
2984 * linux-low.c (linux_kill): Change parameter to process_info
2985 pointer instead of pid. Adjust.
2986 * lynx-low.c (lynx_kill): Likewise.
2987 * nto-low.c (nto_kill): Likewise.
2988 * spu-low.c (spu_kill): Likewise.
2989 * win32-low.c (win32_kill): Likewise.
2990 * server.c (handle_v_kill, kill_inferior_callback)
2991 (detach_or_kill_for_exit): Adjust.
2992 * target.c (kill_inferior): Change parameter to process_info
2993 pointer instead of pid. Adjust.
2994 * target.h (struct target_ops) <kill>: Change parameter to
2995 process_info pointer instead of pid. Adjust all implementations
2996 and callers.
2997 (kill_inferior): Likewise.
2998
2999 2018-07-13 Pedro Alves <palves@redhat.com>
3000
3001 * linux-low.c (linux_detach, linux_join): Change parameter to
3002 process_info pointer instead of pid. Adjust.
3003 * lynx-low.c (lynx_detach, lynx_join): Likewise.
3004 * nto-low.c (nto_detach): Likewise.
3005 * spu-low.c (spu_detach, spu_join): Likewise.
3006 * win32-low.c (win32_detach, win32_join): Likewise.
3007 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
3008 * target.h (struct target_ops) <detach, join>: Change parameter to
3009 process_info pointer instead of pid. Adjust all implementations
3010 and callers.
3011 (detach_inferior, join_inferior): Rename 'pid' parameter to
3012 'proc'.
3013
3014 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
3015 Jan Kratochvil <jan.kratochvil@redhat.com>
3016 Paul Fertser <fercerpav@gmail.com>
3017 Tsutomu Seki <sekiriki@gmail.com>
3018
3019 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
3020 (OBS): Add 'common/netstuff.o'.
3021 (GDBREPLAY_OBS): Likewise.
3022 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
3023 (remote_open): Implement support for IPv6
3024 connections.
3025 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
3026 and 'wspiapi.h'.
3027 (handle_accept_event): Accept connections from IPv6 sources.
3028 (remote_prepare): Handle IPv6-style hostnames; implement
3029 support for IPv6 connections.
3030 (remote_open): Implement support for printing connections from
3031 IPv6 sources.
3032
3033 2018-07-11 Pedro Alves <palves@redhat.com>
3034
3035 PR gdb/23377
3036 * mem-break.c (any_persistent_commands): Add process_info
3037 parameter and use it instead of relying on the current process.
3038 Change return type to bool.
3039 * mem-break.h (any_persistent_commands): Add process_info
3040 parameter and change return type to bool.
3041 * server.c (handle_detach): Remove require_running_or_return call.
3042 Look up the process_info for the process we're about to detach.
3043 If not found, return back error to GDB. Adjust
3044 any_persistent_commands call to pass down a process pointer.
3045
3046 2018-07-11 Pedro Alves <palves@redhat.com>
3047
3048 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
3049 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
3050 instead of collect_register_by_name.
3051 * regcache.c (regcache_raw_get_unsigned_by_name): New.
3052 * regcache.h (regcache_raw_get_unsigned_by_name): New.
3053
3054 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
3055 Pedro Alves <palves@redhat.com>
3056
3057 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
3058
3059 2018-07-03 Tom Tromey <tom@tromey.com>
3060
3061 * linux-low.c: Update.
3062 * lynx-low.c: Update.
3063 * mem-break.c: Update.
3064 * nto-low.c: Update.
3065 * remote-utils.c: Update.
3066 * server.c: Update.
3067 * spu-low.c: Update.
3068 * target.c: Update.
3069 * win32-low.c: Update.
3070
3071 2018-07-03 Tom Tromey <tom@tromey.com>
3072
3073 * server.c: Update.
3074
3075 2018-07-03 Tom Tromey <tom@tromey.com>
3076
3077 * linux-low.c: Update.
3078
3079 2018-07-03 Tom Tromey <tom@tromey.com>
3080
3081 * target.c: Update.
3082
3083 2018-07-03 Tom Tromey <tom@tromey.com>
3084
3085 * linux-low.c: Update.
3086 * linux-mips-low.c: Update.
3087 * lynx-low.c: Update.
3088 * nto-low.c: Update.
3089 * remote-utils.c: Update.
3090 * server.c: Update.
3091 * spu-low.c: Update.
3092 * target.c: Update.
3093 * thread-db.c: Update.
3094
3095 2018-07-03 Tom Tromey <tom@tromey.com>
3096
3097 * linux-low.c: Update.
3098 * linux-mips-low.c: Update.
3099 * lynx-low.c: Update.
3100 * mem-break.c: Update.
3101 * nto-low.c: Update.
3102 * remote-utils.c: Update.
3103 * server.c: Update.
3104 * spu-low.c: Update.
3105 * target.c: Update.
3106 * tracepoint.c: Update.
3107
3108 2018-07-03 Tom Tromey <tom@tromey.com>
3109
3110 * linux-low.c: Update.
3111 * linux-ppc-low.c: Update.
3112 * linux-x86-low.c: Update.
3113 * proc-service.c: Update.
3114 * server.c: Update.
3115 * spu-low.c: Update.
3116 * thread-db.c: Update.
3117 * win32-low.c: Update.
3118
3119 2018-07-03 Tom Tromey <tom@tromey.com>
3120
3121 * linux-low.c: Update.
3122 * lynx-low.c: Update.
3123 * nto-low.c: Update.
3124 * remote-utils.c: Update.
3125 * spu-low.c: Update.
3126 * thread-db.c: Update.
3127 * win32-low.c: Update.
3128
3129 2018-06-29 Joel Brobecker <brobecker@adacore.com>
3130
3131 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
3132 parameter in call to 'amd64_create_target_description'.
3133
3134 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3135
3136 * x86-tdesc.h: Remove executable permission flag.
3137
3138 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
3139
3140 * configure.ac: Remove AC_PREREQ, add missing quoting.
3141 * configure: Re-generate.
3142 * config.in: Re-generate.
3143 * aclocal.m4: Re-generate.
3144
3145 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
3146
3147 * tracepoint.h (current_traceframe): Remove declaration.
3148
3149 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3150
3151 * linux-aarch64-low.c (is_sve_tdesc): New function.
3152 (aarch64_sve_regs_copy_to_regcache): Likewise.
3153 (aarch64_sve_regs_copy_from_regcache): Likewise.
3154 (aarch64_regs_info): Add SVE checks.
3155 (initialize_low_arch): Initialize SVE.
3156
3157 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3158
3159 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
3160
3161 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3162
3163 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
3164 (initialize_low_tracepoint): Likewise
3165 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
3166 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
3167 param.
3168 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
3169 checks.
3170 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
3171
3172 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3173
3174 * server.h (PBUFSIZ): Increase size
3175
3176 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3177
3178 * regcache.c (regcache::raw_compare): New function.
3179 * regcache.h (regcache::raw_compare): New declaration.
3180
3181 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3182
3183 * regcache.c (new_register_cache): Use new.
3184 (free_register_cache): Use delete.
3185 (register_data): Use const.
3186 (supply_register): Move body inside regcache.
3187 (regcache::raw_supply): New override function.
3188 (collect_register): Move body inside regcache.
3189 (regcache::raw_collect): New override function.
3190 (regcache::get_register_status): New override function.
3191 * regcache.h (struct regcache): Inherit from reg_buffer_common.
3192
3193 2018-06-09 Tom Tromey <tom@tromey.com>
3194
3195 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
3196 declare queue.
3197 (event_queue): Use std::queue.
3198 (gdb_event_xfree): Remove.
3199 (initialize_event_loop, process_event, wait_for_event): Update.
3200
3201 2018-06-08 Stan Cox <scox@redhat.com>
3202
3203 * win32-low.c (win32_create_inferior): last_ptid and last_status
3204 moved to client_state.
3205
3206 2018-06-08 Pedro Alves <palves@redhat.com>
3207
3208 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
3209 common/common-exceptions.o, common/common-utils.o,
3210 common/errors.o, common/print-utils.o and utils.o.
3211 * gdbreplay.c: Include "common-defs.h" instead of the two
3212 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
3213 string.h or alloca.h.
3214 (perror_with_name): Delete.
3215 (remote_open): Use xstrdup instead of strdup.
3216 (main): Rename to ...
3217 (captured_main): ... this.
3218 (main): New.
3219
3220 2018-06-08 Tom Tromey <tom@tromey.com>
3221
3222 * linux-low.c (linux_low_read_btrace): Update.
3223
3224 2018-06-04 Stan Cox <scox@redhat.com>
3225
3226 * server.h (struct client_state): New.
3227 * server.c (cont_thread, general_thread, multi_process)
3228 (report_fork_events, report_vfork_events, report_exec_events)
3229 (report_thread_events, swbreak_feature, hwbreak_feature)
3230 (vCont_supported, disable_randomization, pass_signals)
3231 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
3232 Moved to client_state.
3233 * remote-utils.c (remote_debug, noack_mode)
3234 (transport_is_reliable): Moved to client_state.
3235 * tracepoint.c (current_traceframe): Moved to client_state.
3236
3237 Update all callers.
3238 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
3239 linux-low.c, remote-utils.h, target.c: Use client_state.
3240
3241 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3242
3243 * configure.srv: Add new c/h file.
3244
3245 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3246
3247 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
3248 null VQ.
3249
3250 2018-05-25 Maciej W. Rozycki <macro@mips.com>
3251
3252 * gdb.arch/mips-fpregset-core.exp: New test.
3253 * gdb.arch/mips-fpregset-core.c: New test source.
3254
3255 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
3256
3257 PR server/23198
3258 * hostio.c (require_int): Do not report overflow for integers
3259 between 0xfffffff and 0x7fffffff.
3260
3261 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3262
3263 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
3264 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
3265 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
3266 functions.
3267 (the_low_target): Wire them.
3268
3269 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3270
3271 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
3272 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
3273 mode. Call collect_register_by_name with vscr using
3274 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
3275 (ppc_store_vrregset): Add and set vscr_offset variable as in
3276 ppc_fill_vrregset. Call supply_register_by_name with vscr using
3277 vscr_offset.
3278
3279 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3280
3281 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
3282 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
3283 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
3284
3285 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3286
3287 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
3288 (ppc_store_vsxregset): Likewise.
3289 (ppc_fill_vrregset): Likewise.
3290 (ppc_store_vrregset): Likewise.
3291 (ppc_fill_evrregset): Likewise.
3292 (ppc_store_evrregset): Likewise.
3293 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
3294 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
3295 needed.
3296
3297 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3298
3299 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
3300 wordsize of the inferior. Call ppc_linux_target_wordsize.
3301
3302 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3303
3304 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
3305 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
3306 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
3307 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
3308 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
3309 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
3310 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
3311 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
3312 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
3313 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
3314 (tdesc_powerpc_e500l): Remove.
3315 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
3316 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
3317 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
3318 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
3319 linux-ppc-tdesc.h.
3320 (ppc_arch_setup): Remove target description matching code. Fill a
3321 ppc_linux_features struct and call ppc_linux_match_description
3322 with it.
3323
3324 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3325
3326 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
3327 width of the requested register exceeds the width of the
3328 `ptrace' data type.
3329 (mips_cannot_store_register): Likewise.
3330
3331 2018-05-21 Maciej W. Rozycki <macro@mips.com>
3332
3333 * linux-mips-low.c (mips_fetch_register): New function. Update
3334 preceding comment.
3335 (mips_store_gregset): Supply 0 rather than $restart for $zero.
3336 (the_low_target): Wire `mips_fetch_register'.
3337
3338 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3339
3340 * lynx-i386-low.c (LYNXOS_178): New macro.
3341 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
3342 the layout on LynxOS-178.
3343 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
3344 handle floating point registers that are not supported by
3345 LynxOS-178.
3346
3347 2018-05-10 Tom Tromey <tom@tromey.com>
3348
3349 * configure: Rebuild.
3350
3351 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3352
3353 PR server/23158:
3354 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
3355 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
3356 Use it to set the expedite_regs field in the given tdesc.
3357 * x86-tdesc.h: New file.
3358 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
3359 Adjust following the addition of the new expedite_regs parameter
3360 to init_target_desc.
3361 * linux-tic6x-low.c (tic6x_read_description): Likewise.
3362 * linux-x86-tdesc.c: #include "x86-tdesc.h".
3363 (i386_linux_read_description, amd64_linux_read_description):
3364 Adjust following the addition of the new expedite_regs parameter
3365 to init_target_desc.
3366 * lynx-i386-low.c: #include "x86-tdesc.h".
3367 (lynx_i386_arch_setup): Adjust following the addition of the new
3368 expedite_regs parameter to init_target_desc.
3369 * nto-x86-low.c: #include "x86-tdesc.h".
3370 (nto_x86_arch_setup): Adjust following the addition of the new
3371 expedite_regs parameter to init_target_desc.
3372 * win32-i386-low.c: #include "x86-tdesc.h".
3373 (i386_arch_setup): Adjust following the addition of the new
3374 expedite_regs parameter to init_target_desc.
3375
3376 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3377
3378 PR server/23158:
3379 * win32-low.c (win32_create_inferior): Add call to my_wait
3380 setting last_status global.
3381
3382 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3383
3384 PR server/23158:
3385 * win32-low.c (create_process): Only call gdb_tilde_expand if
3386 inferior_cwd is not NULL.
3387
3388 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
3389
3390 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
3391 registers to the cache if their values have changed.
3392 (i387_xsave_to_cache): Provide default values for x87 control
3393 registers when these features are available, but disabled.
3394 * regcache.c (supply_register_by_name_zeroed): New function.
3395 * regcache.h (supply_register_by_name_zeroed): Declare new
3396 function.
3397
3398 2018-05-07 Tom Tromey <tom@tromey.com>
3399
3400 * configure: Rebuild.
3401
3402 2018-05-04 Tom Tromey <tom@tromey.com>
3403
3404 * configure: Rebuild.
3405
3406 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
3407 Pedro Alves <palves@redhat.com>
3408
3409 * linux-aarch64-low.c (aarch64_stopped_data_address):
3410 Likewise.
3411
3412 2018-04-27 Tom Tromey <tom@tromey.com>
3413
3414 * configure: Rebuild.
3415
3416 2018-04-23 Tom Tromey <tom@tromey.com>
3417
3418 * configure: Rebuild.
3419
3420 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
3421
3422 * Makefile.in (depcomp): Add "..".
3423 (all_deps_files): New and use it.
3424
3425 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3426
3427 * configure.srv (aarch64*-*-linux*): Don't include xml.
3428 (i[34567]86-*-cygwin*): Likewise.
3429 (i[34567]86-*-linux*): Likewise.
3430 (i[34567]86-*-lynxos*): Likewise.
3431 (i[34567]86-*-mingw32ce*): Likewise.
3432 (i[34567]86-*-mingw*): Likewise.
3433 (i[34567]86-*-nto*): Likewise.
3434 (tic6x-*-uclinux): Likewise.
3435 (x86_64-*-linux*): Likewise.
3436 (x86_64-*-mingw*): Likewise.
3437 (x86_64-*-cygwin*): Likewise.
3438
3439 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3440
3441 * tdesc.c: Remove xml parameter.
3442
3443 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3444
3445 * server.c (get_features_xml): Remove cast.
3446 * tdesc.c (void target_desc::accept): Fill in function.
3447 (tdesc_get_features_xml): Remove old xml creation.
3448 (print_xml_feature::visit_pre): Add xml vistor.
3449 * tdesc.h (struct target_desc): Make xmltarget mutable.
3450 (tdesc_get_features_xml): Remove declaration.
3451
3452 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3453
3454 * tdesc.c (tdesc_architecture_name): Add new function.
3455 (tdesc_osabi_name): Likewise.
3456 (tdesc_get_features_xml): Use new functions.
3457
3458 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3459
3460 * tdesc.c (tdesc_create_flags): Remove.
3461 (tdesc_add_flag): Likewise.
3462 (tdesc_named_type): Likewise.
3463 (tdesc_create_union): Likewise.
3464 (tdesc_create_struct): Likewise.
3465 (tdesc_create_vector): Likewise.
3466 (tdesc_add_bitfield): Likewise.
3467 (tdesc_add_field): Likewise.
3468 (tdesc_set_struct_size): Likewise.
3469
3470 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3471
3472 * tdesc.c (~target_desc): Remove implictly deleted items.
3473 (init_target_desc): Iterate all features.
3474 (tdesc_get_features_xml): Use vector.
3475 (tdesc_create_feature): Create feature.
3476 * tdesc.h (tdesc_feature) Remove
3477 (target_desc): Add features.
3478
3479 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3480
3481 * Makefile.in: Add common/tdesc.c
3482 * tdesc.c (init_target_desc): init all reg_defs from register
3483 vector.
3484 (tdesc_create_reg): Create tdesc_reg.
3485 * tdesc.h (tdesc_feature): Add register vector.
3486
3487 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
3488
3489 * tdesc.h (struct target_desc) <features>: Change type to
3490 std::vector<std::string>.
3491 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
3492 changes.
3493 (tdesc_get_features_xml): Likewise.
3494 (tdesc_create_feature): Likewise.
3495
3496 2018-03-26 Alan Hayward <alan.hayward@arm.com>
3497
3498 * regcache.c (find_register_by_number): Return a ref.
3499 (find_regno): Use references.
3500 (register_size): Likewise.
3501 (register_data): Likewise.
3502 * tdesc.c (target_desc::~target_desc): Remove free calls.
3503 (target_desc::operator==): Use std::vector compare.
3504 (init_target_desc): Use reference.
3505 (tdesc_create_reg): Use reg constructors.
3506 * tdesc.h (struct target_desc): Replace pointer with object.
3507
3508 2018-03-23 Alan Hayward <alan.hayward@arm.com>
3509
3510 * regcache.c (find_register_by_number): Make static.
3511 (find_regno): Use find_register_by_number
3512 * regcache.h (struct reg): Remove declaration.
3513
3514 2018-03-23 Alan Hayward <alan.hayward@arm.com>
3515
3516 * tdesc.c (target_desc::~target_desc): Move to here.
3517 (target_desc::operator==): Likewise.
3518 * tdesc.h (target_desc::~target_desc): Move from here.
3519 (target_desc::operator==): Likewise.
3520
3521 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
3522
3523 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
3524
3525 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3526
3527 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
3528 S390_TDESC_GS.
3529 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
3530 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
3531 and init_registers_s390_gs_linux64.
3532
3533 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3534
3535 * linux-s390-low.c (s390_fill_gs): Remove function.
3536 (s390_fill_gsbc): Remove function.
3537 (s390_regsets): Set fill functions for the guarded storage regsets
3538 to NULL.
3539
3540 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3541
3542 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
3543 the word size. Add comment.
3544 (s390_get_wordsize): New function.
3545 (s390_arch_setup): No longer select a temporary tdesc to fetch the
3546 pswm with it. Instead, use s390_get_wordsize to determine the
3547 word size first and derive the correct tdesc from that directly.
3548
3549 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
3550
3551 * Makefile.in: Include silent-rules.mk.
3552 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
3553 (COMPILE): Add ECHO_CXX.
3554 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3555 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3556 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
3557 (version-generated.c): Add ECHO_GEN.
3558 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
3559 (IPAGENT_COMPILE): Add ECHO_CXX.
3560 (%-generated.c): Add ECHO_REGDAT.
3561
3562 2018-03-14 Tom Tromey <tom@tromey.com>
3563
3564 PR cli/14977:
3565 * ax.c (ax_printf): Special case for NULL.
3566
3567 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3568
3569 * linux-low.c (linux_qxfer_libraries_svr4): Use
3570 xml_escape_text_append.
3571
3572 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3573
3574 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
3575
3576 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3577
3578 * server.c (handle_general_set): Remove unnecessary xstrdup.
3579
3580 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3581
3582 * server.c (parse_debug_format_options): Adjust to
3583 delim_string_to_char_ptr_vec changes.
3584 * thread-db.c (thread_db_load_search): Adjust to
3585 dirnames_to_char_ptr_vec changes.
3586
3587 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
3588
3589 * target.h (target_enable_btrace, target_disable_btrace)
3590 (target_read_btrace, target_read_btrace_conf): Turn macro into
3591 inline function. Throw error if target method is not defined.
3592 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
3593 check for btrace target method. Be prepared to handle exceptions
3594 from btrace target methods.
3595
3596 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3597
3598 * server.c (captured_main): Change order of error message printed
3599 when the current working directory cannot be found.
3600
3601 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3602
3603 * server.c: Include "filenames.h" and "pathstuff.h".
3604 (program_name): Delete variable.
3605 (program_path): New anonymous class.
3606 (get_exec_wrapper): Use "program_path" instead of
3607 "program_name".
3608 (handle_v_run): Likewise.
3609 (captured_main): Likewise.
3610 (process_serial_event): Likewise.
3611
3612 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3613
3614 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
3615 (OBJS): Add "pathstuff.o".
3616 * server.c (current_directory): New global variable.
3617 (captured_main): Initialize "current_directory".
3618
3619 2018-02-26 Alan Hayward <alan.hayward@arm.com>
3620
3621 * tdesc.c: Use common/tdesc.h.
3622 * tdesc.h: Likewise.
3623
3624 2018-02-20 Alan Hayward <alan.hayward@arm.com>
3625 Simon Marchi <simon.marchi@ericsson.com>
3626
3627 * Makefile.in: Switch order of make rules.
3628
3629 2018-02-19 Alan Hayward <alan.hayward@arm.com>
3630
3631 * Makefile.in: Add common directory in build.
3632 * configure.ac: Add common reference.
3633 * configure: Regenerate.
3634
3635 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3636
3637 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
3638 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
3639 * spu-low.c (spu_target_ops): Likewise.
3640 * win32-low.c (win32_target_ops): Likewise.
3641 * server.c (supported_btrace_packets): Report packets unconditionally.
3642 * target.h (target_ops) <supports_btrace>: Remove.
3643 (target_supports_btrace): Remove.
3644
3645 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3646
3647 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
3648 (handle_btrace_disable): Change return type to void. Use exceptions
3649 to report errors.
3650 (handle_btrace_general_set): Catch exception and copy message to
3651 return message.
3652
3653 2018-02-08 Tom Tromey <tom@tromey.com>
3654
3655 * linux-low.c (install_software_single_step_breakpoints): Use
3656 make_scoped_restore.
3657 * inferiors.c (make_cleanup_restore_current_thread): Remove.
3658 (do_restore_current_thread_cleanup): Remove.
3659 * gdbthread.h (make_cleanup_restore_current_thread): Don't
3660 declare.
3661
3662 2018-02-08 Tom Tromey <tom@tromey.com>
3663
3664 * mem-break.c (set_raw_breakpoint_at): Use
3665 gdb::unique_xmalloc_ptr.
3666
3667 2018-01-30 Pedro Alves <palves@redhat.com>
3668
3669 PR gdb/13211
3670 * target.c (target_terminal::terminal_state): Rename to ...
3671 (target_terminal::m_terminal_state): ... this.
3672
3673 2018-01-19 James Clarke <jrtc27@jrtc27.com>
3674
3675 * linux-low.c (handle_extended_wait): Surround call to
3676 thread_db_notice_clone with #ifdef USE_THREAD_DB.
3677
3678 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
3679
3680 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
3681 linux_ptrace_attach_fail_reason_string now returning an
3682 std::string.
3683 (linux_attach): Likewise.
3684 * thread-db.c (attach_thread): Likewise.
3685
3686 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
3687
3688 PR gdb/21559
3689 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
3690 checking for fs_base/gs_base fields in struct user_regs_struct.
3691 * configure: Regenerate.
3692
3693 2018-01-16 Yao Qi <yao.qi@linaro.org>
3694
3695 PR gdb/18749
3696 * linux-low.c (fetch_register): Call supply_register instead of
3697 error.
3698
3699 2018-01-08 Yao Qi <yao.qi@linaro.org>
3700 Simon Marchi <simon.marchi@ericsson.com>
3701
3702 * Makefile.in (OBS): Remove selftest.o.
3703 * configure.ac: Set srv_selftest_objs if $development is true.
3704 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
3705 * configure: Re-generated.
3706 * server.c (captured_main): Wrap variable selftest_filter with
3707 GDB_SELF_TEST.
3708
3709 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
3710
3711 * server.c (parse_debug_format_options): Return std::string.
3712 (handle_monitor_command, captured_main): Adjust.
3713
3714 2018-01-05 Pedro Alves <palves@redhat.com>
3715
3716 PR gdb/18653
3717 * server.c (captured_main): Pass quiet=false to
3718 save_original_signals_state.
3719
3720 2018-01-01 Joel Brobecker <brobecker@adacore.com>
3721
3722 * gdbreplay.c (gdbreplay_version): Update copyright year in
3723 version message.
3724 * server.c (gdbserver_version): Likewise.
3725
3726 2017-12-08 Tom Tromey <tom@tromey.com>
3727
3728 * ax.c (ax_printf): Update.
3729
3730 2017-12-07 Yao Qi <yao.qi@linaro.org>
3731
3732 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
3733 aarch64_linux_read_description.
3734 * linux-amd64-ipa.c (idx2mask): New array.
3735 (get_ipa_tdesc): Move idx2mask out.
3736 (initialize_low_tracepoint): Initialize target descriptions.
3737 * linux-i386-ipa.c (idx2mask): New array.
3738 (get_ipa_tdesc): Move idx2mask out.
3739 (initialize_low_tracepoint): Initialize target descriptions.
3740
3741 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
3742
3743 * tdesc.c (struct tdesc_type): Change return type.
3744 (tdesc_add_flag): Change parameter type.
3745 (tdesc_add_bitfield): Likewise.
3746 (tdesc_add_field): Likewise.
3747 (tdesc_set_struct_size): Likewise.
3748
3749 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
3750
3751 * regcache.c (registers_to_string): Remove unused variable.
3752
3753 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3754
3755 * inferiors.c (for_each_inferior_with_data): Remove.
3756 * inferiors.h (for_each_inferior_with_data): Remove.
3757 * server.c (handle_qxfer_threads_worker): Change parameter type.
3758 (handle_qxfer_threads_proper): Use for_each_thread.
3759
3760 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3761
3762 * inferiors.c (for_each_inferior): Remove.
3763 (clear_inferiors): Use for_each_thread.
3764 * inferiors.h (for_each_inferior): Remove.
3765 * linux-low.c (linux_wait_for_event_filtered): Use
3766 for_each_thread.
3767 (linux_stabilize_threads): Likewise.
3768 * regcache.c (regcache_release): Likewise.
3769 * server.c (gdb_wants_all_threads_stopped): Likewise.
3770 (clear_pending_status_callback): Remove.
3771 (handle_status): Use for_each_thread.
3772 (captured_main): Likewise.
3773 * win32-low.c (child_init_thread_list): Likewise.
3774 (win32_clear_inferiors): Likewise.
3775 (fake_breakpoint_event): Likewise.
3776
3777 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3778
3779 * inferiors.h (find_inferior): Remove.
3780 * inferiors.c (find_inferior): Remove.
3781
3782 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3783
3784 * linux-low.c (resume_status_pending_p): Update comment.
3785 (need_step_over_p): Update comment.
3786
3787 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3788
3789 * linux-low.c (proceed_one_lwp): Return void, change parameter
3790 type.
3791 (unsuspend_and_proceed_one_lwp): Likewise.
3792 (proceed_all_lwps): Use for_each_thread.
3793 (unstop_all_lwps): Likewise.
3794
3795 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3796
3797 * linux-low.c (linux_resume_one_thread): Return void, take
3798 parameter directly.
3799 (linux_resume): Use for_each_thread.
3800
3801 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3802
3803 * linux-low.c (send_sigstop_callback): Return void, change
3804 parameter type. Rename to...
3805 (send_sigstop): ... this.
3806 (suspend_and_send_sigstop_callback): Return void, change parameter
3807 type. Rename to...
3808 (suspend_and_send_sigstop): ... this.
3809 (stop_all_lwps): Use for_each_thread.
3810
3811 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3812
3813 * linux-low.c (lwp_running): Return bool, remove unused
3814 argument.
3815 (linux_stabilize_threads): Use find_thread.
3816
3817 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3818
3819 * linux-low.c (select_singlestep_lwp_callback): Remove.
3820 (count_events_callback): Remove.
3821 (select_event_lwp_callback): Remove.
3822 (select_event_lwp): Use find_thread/for_each_thread.
3823
3824 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3825
3826 * linux-low.c (not_stopped_callback): Return bool, take filter
3827 argument directly.
3828 (linux_wait_for_event_filtered): Use find_thread.
3829 (linux_wait_1): Likewise.
3830
3831 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3832
3833 * linux-low.c (same_lwp): Remove.
3834 (find_lwp_pid): Use find_thread.
3835
3836 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3837
3838 * linux-low.c (delete_lwp_callback): Remove.
3839 (linux_mourn): Use for_each_thread.
3840
3841 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3842
3843 * linux-low.c (linux_detach_lwp_callback): Return void, remove
3844 args parameter, don't check for pid.
3845 (linux_detach): Use for_each_thread.
3846
3847 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3848
3849 * linux-low.c (struct counter): Remove.
3850 (second_thread_of_pid_p): Remove.
3851 (last_thread_of_process_p): Use find_thread.
3852
3853 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3854
3855 * inferiors.c (find_inferior_in_random): Remove.
3856 * inferiors.h (find_inferior_in_random): Remove.
3857 * linux-low.c (status_pending_p_callback): Return bool, accept
3858 parameter ptid directly.
3859 (linux_wait_for_event_filtered): Use find_thread_in_random.
3860 (linux_wait_1): Likewise.
3861
3862 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3863
3864 * inferiors.c (find_inferior_id): Remove.
3865 (find_thread_ptid): Move implemention from find_inferior_id to
3866 here.
3867 * inferiors.h (find_inferior_id): Remove.
3868 * server.c (handle_status): Use find_thread_ptid.
3869 (process_serial_event): Likewise.
3870 * thread-db.c (find_one_thread): Likewise.
3871 (thread_db_thread_handle): Likewise.
3872 * win32-low.c (thread_rec): Likewise.
3873 (child_delete_thread): Likewise.
3874 (win32_thread_alive): Likewise.
3875 (get_child_debug_event): Likewise.
3876
3877 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3878
3879 * linux-mips-low.c (update_watch_registers_callback): Return
3880 void, remove pid_p parameter, don't check for pid.
3881 (mips_insert_point, mips_remove_point): Use for_each_thread.
3882
3883 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3884
3885 * lynx.low (lynx_delete_thread_callback): Remove.
3886 (lynx_mourn): Use for_each_thread.
3887
3888 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3889
3890 * regcache.c (regcache_invalidate_one): Remove.
3891 (regcache_invalidate_pid): use for_each_thread.
3892
3893 2017-11-26 Tom Tromey <tom@tromey.com>
3894
3895 * linux-low.c (linux_create_inferior): Update.
3896
3897 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
3898
3899 * spu-low.c (spu_create_inferior): Fix typo in argument name.
3900
3901 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3902
3903 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
3904 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3905 * linux-aarch64-tdesc-selftest.c: New file.
3906 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3907
3908 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3909
3910 * configure.srv: Add new file.
3911 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3912 * linux-aarch64-tdesc-selftest.c: New file.
3913 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3914
3915 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3916
3917 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
3918 * linux-aarch64-low.c (initialize_low_arch): Remove init.
3919 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
3920
3921 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3922
3923 * configure.srv: Add new files.
3924 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
3925 aarch64_linux_read_description.
3926 * linux-aarch64-low.c (aarch64_linux_read_description):
3927 Merge with aarch64_arch_setup.
3928 (aarch64_arch_setup): Call aarch64_linux_read_description.
3929 * linux-aarch64-tdesc.c: New file.
3930 * linux-aarch64-tdesc.h: New file.
3931
3932 2017-11-24 Yao Qi <yao.qi@linaro.org>
3933
3934 * configure.srv: Set $srv_regobj for tic6x-linux.
3935 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
3936 (tic6x_read_description): Move some code to tic6x_arch_setup.
3937 (tic6x_tdesc_test): New function.
3938 (initialize_low_arch): Call selftests::register_test.
3939
3940 2017-11-22 Yao Qi <yao.qi@linaro.org>
3941
3942 * remote-utils.c (prepare_resume_reply): Use memcpy.
3943
3944 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3945
3946 * linux-low.c (kill_one_lwp_callback): Return void, take
3947 argument directly, don't filter on pid.
3948 (linux_kill): Use for_each_thread.
3949
3950 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3951
3952 * linux-low.c (need_step_over_p): Return bool, remove dummy
3953 argument.
3954 (linux_resume, proceed_all_lwps): Use find_thread.
3955
3956 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3957
3958 * linux-low.c (resume_status_pending_p): Return bool, remove
3959 flag_p argument.
3960 (linux_resume): Use find_thread.
3961
3962 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3963
3964 * linux-low.c (struct thread_resume_array): Remove.
3965 (linux_set_resume_request): Return void, take arguments
3966 directly.
3967 (linux_resume): Use for_each_thread.
3968
3969 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3970
3971 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
3972 return bool, remove data argument.
3973 (linux_stabilize_threads): Use find_thread.
3974
3975 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3976
3977 * linux-low.c (unsuspend_one_lwp): Remove.
3978 (unsuspend_all_lwps): Use for_each_thread, inline code from
3979 unsuspend_one_lwp.
3980
3981 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3982
3983 * gdbthread.h (find_thread): Add overload with ptid_t filter.
3984 * linux-low.c (struct iterate_over_lwps_args): Remove.
3985 (iterate_over_lwps_filter): Remove.
3986 (iterate_over_lwps): Use find_thread.
3987
3988 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3989
3990 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
3991 (linux_handle_new_gdb_connection): Use for_each_thread, inline
3992 code from reset_lwp_ptrace_options_callback.
3993
3994 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3995
3996 * linux-arm-low.c (struct update_registers_data): Remove.
3997 (update_registers_callback): Return void, take arguments
3998 directly, don't check thread's pid.
3999 (arm_insert_point, arm_remove_point): Use for_each_thread.
4000
4001 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4002
4003 * win32-low.c (continue_one_thread): Return void, take argument
4004 directly.
4005 (child_continue): Use for_each_thread.
4006
4007 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4008
4009 * win32-i386-low.c (update_debug_registers_callback): Rename
4010 to ...
4011 (update_debug_registers): ... this, return void, remove pid_p arg.
4012 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
4013
4014 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4015
4016 * inferiors.h (struct process_info): Add constructor, initialize
4017 fields..
4018 <syscalls_to_catch>: Change type to std::vector<int>.
4019 * inferiors.c (add_process): Allocate process_info with new.
4020 (remove_process): Free process_info with delete.
4021 * linux-low.c (handle_extended_wait): Adjust.
4022 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
4023 * server.c (handle_general_set): Adjust.
4024
4025 2017-11-16 Pedro Alves <palves@redhat.com>
4026
4027 * remote-utils.c (remote_close): Block SIGIO signals instead of
4028 uninstalling the SIGIO handler.
4029
4030 2017-11-16 Alan Hayward <alan.hayward@arm.com>
4031
4032 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
4033
4034 2017-11-16 Yao Qi <yao.qi@linaro.org>
4035
4036 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
4037 (tic6x_store_gregset): Likewise.
4038 (tic6x_usrregs_info): Move it up.
4039
4040 2017-11-15 Alan Hayward <alan.hayward@arm.com>
4041
4042 * Makefile.in: Update arch rules.
4043 * configure.srv: Explicitly mark arch/ files.
4044
4045 2017-11-13 Andreas Schwab <schwab@suse.de>
4046
4047 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
4048 function.
4049 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4050
4051 2017-11-06 Pedro Alves <palves@redhat.com>
4052
4053 * config.in, configure: Regenerate.
4054
4055 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4056
4057 * target.c (struct thread_search): Remove.
4058 (thread_search_callback): Remove.
4059 (prepare_to_access_memory): Use for_each_thread instead of
4060 find_inferior. Inline code from thread_search_callback.
4061
4062 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4063
4064 * server.c (struct visit_actioned_threads_data): Remove.
4065 (visit_actioned_threads): Change prototype to take arguments
4066 directly.
4067 (resume): Use find_thread instead of find_inferior.
4068
4069 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4070
4071 * server.c (queue_stop_reply_callback): Change prototype, return
4072 void.
4073 (find_status_pending_thread_callback): Remove.
4074 (handle_status): Replace find_inferior with find_thread and
4075 for_each_thread.
4076
4077 2017-10-25 Alan Hayward <alan.hayward@arm.com>
4078
4079 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
4080 with REGNO.
4081 (aarch64_store_gregset): Likewise.
4082 (aarch64_fill_fpregset): Likewise.
4083 (aarch64_store_fpregset): Likewise.
4084
4085 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
4086
4087 * gdbthread.h (find_thread, for_each_thread): New functions.
4088 * inferiors.c (thread_of_pid): Remove.
4089 (find_any_thread_of_pid): Use find_thread.
4090 * linux-low.c (num_lwps): Use for_each_thread.
4091
4092 2017-10-17 Yao Qi <yao.qi@linaro.org>
4093
4094 * Makefile.in: Remove one rule.
4095 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
4096
4097 2017-10-17 Yao Qi <yao.qi@linaro.org>
4098
4099 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
4100 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
4101
4102 2017-10-17 Yao Qi <yao.qi@linaro.org>
4103
4104 * configure.srv: Rename arm.o with arch/arm.o.
4105
4106 2017-10-17 Yao Qi <yao.qi@linaro.org>
4107
4108 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
4109 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
4110 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
4111 (arch-i386.o, arch-amd64.o): Remove rules.
4112 (arch/%.o): New rule.
4113 Update POSTCOMPILE and COMPILE.pre.
4114 * configure.ac: Invoke AC_CONFIG_COMMANDS.
4115 * configure: Re-generated.
4116 * configure.srv: Replace arch-i386.o with arch/i386.o.
4117 Replace arch-amd64.o with arch/amd64.o.
4118
4119 2017-10-16 Yao Qi <yao.qi@linaro.org>
4120
4121 * configure: Regenerated.
4122
4123 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4124
4125 * inferiors.h: (struct inferior_list): Remove.
4126 (struct inferior_list_entry); Remove.
4127 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
4128 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
4129 get_first_inferior): Remove.
4130 (for_each_inferior, for_each_inferior_with_data, find_inferior,
4131 find_inferior_id, find_inferior_in_random): Change signature.
4132 * inferiors.c (all_threads): Change type to
4133 std::list<thread_info *>.
4134 (get_thread): Remove macro.
4135 (find_inferior, find_inferior_id): Change signature, implement
4136 using find_thread.
4137 (find_inferior_in_random): Change signature, implement using
4138 find_thread_in_random.
4139 (for_each_inferior, for_each_inferior_with_data): Change
4140 signature, implement using for_each_thread.
4141 (add_inferior_to_list, remove_inferior): Remove.
4142 (add_thread, get_first_thread, thread_of_pid,
4143 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
4144 (get_first_inferior, one_inferior_p, clear_inferior_list):
4145 Remove.
4146 (clear_inferiors, get_thread_process): Update.
4147 * gdbthread.h: Include <list>.
4148 (struct thread_info) <entry>: Remove field.
4149 <id>: New field.
4150 (all_threads): Change type to std::list<thread_info *>.
4151 (get_first_inferior): Add doc.
4152 (find_thread, for_each_thread, find_thread_in_random): New
4153 functions.
4154 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
4155 * linux-arm-low.c (update_registers_callback): Update.
4156 * linux-low.c (second_thread_of_pid_p): Update.
4157 (kill_one_lwp_callback, linux_detach_lwp_callback,
4158 delete_lwp_callback, status_pending_p_callback, same_lwp,
4159 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
4160 iterate_over_lwps, not_stopped_callback,
4161 resume_stopped_resumed_lwps, count_events_callback,
4162 select_singlestep_lwp_callback, select_event_lwp_callback,
4163 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
4164 suspend_and_send_sigstop_callback, wait_for_sigstop,
4165 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
4166 lwp_running, linux_set_resume_request, resume_status_pending_p,
4167 need_step_over_p, start_step_over, linux_resume_one_thread,
4168 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
4169 reset_lwp_ptrace_options_callback): Update.
4170 * linux-mips-low.c (update_watch_registers_callback): Update.
4171 * regcache.c (regcache_invalidate_one, regcache_invalidate):
4172 Update.
4173 (free_register_cache_thread_one): Remove.
4174 (regcache_release): Update.
4175 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
4176 handle_qxfer_threads_worker): Update.
4177 (handle_query): Update, use list iterator.
4178 (visit_actioned_threads, handle_pending_status,
4179 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
4180 clear_pending_status_callback, set_pending_status_callback,
4181 find_status_pending_thread_callback, handle_status,
4182 process_serial_event): Update.
4183 * target.c (thread_search_callback): Update.
4184 * thread-db.c (thread_db_get_tls_address): Update.
4185 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
4186 Update.
4187 * win32-i386-low.c (update_debug_registers_callback): Update.
4188 * win32-low.c (delete_thread_info, child_delete_thread,
4189 continue_one_thread, suspend_one_thread,
4190 get_child_debug_event): Adjust.
4191
4192 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4193
4194 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
4195 * inferiors.h: Include <list>.
4196 (struct process_info) <entry>: Remove field.
4197 <pid>: New field.
4198 (pid_of): Change macro to function.
4199 (ptid_of, lwpid_of): Remove macro.
4200 (all_processes): Change type to std::list<process_info *>.
4201 (ALL_PROCESSES): Remove macro.
4202 (for_each_process, find_process): New function.
4203 * inferiors.c (all_processes): Change type to
4204 std::list<process_info *>.
4205 (find_thread_process): Adjust.
4206 (add_process): Likewise.
4207 (remove_process): Likewise.
4208 (find_process_pid): Likewise.
4209 (get_first_process): Likewise.
4210 (started_inferior_callback): Remove.
4211 (have_started_inferiors_p): Adjust.
4212 (attached_inferior_callback): Remove.
4213 (have_attached_inferiors_p): Adjust.
4214 * linux-low.c (check_zombie_leaders): Likewise.
4215 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
4216 (x86_linux_update_xmltarget): Adjust.
4217 * server.c (handle_query): Likewise.
4218 (gdb_reattached_process): Remove.
4219 (handle_status): Adjust.
4220 (kill_inferior_callback): Likewise.
4221 (detach_or_kill_inferior): Remove.
4222 (print_started_pid): Likewise.
4223 (print_attached_pid): Likewise.
4224 (detach_or_kill_for_exit): Update.
4225 (process_serial_event): Likewise.
4226 * linux-arm-low.c (arm_new_fork): Likewise.
4227
4228 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4229
4230 * dll.h: Include <list>.
4231 (struct dll_info): Add constructor.
4232 <entry>: Remove field.
4233 (all_dlls): Change type to std::list<dll_info>.
4234 * dll.c: Include <algorithm>.
4235 (get_dll): Remove macro.
4236 (all_dlls): Change type to std::list<dll_info *>.
4237 (free_one_dll): Remove.
4238 (match_dll): Likewise.
4239 (loaded_dll): Adjust.
4240 (unloaded_dll): Adjust to all_dlls type change, use
4241 std::find_if. Inline code from match_dll.
4242 (clear_dlls): Adjust to all_dlls type change.
4243 * server.c (emit_dll_description): Remove.
4244 (handle_qxfer_libraries): Adjust to all_dlls type change,
4245 integrate emit_dll_description's functionality.
4246
4247 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4248
4249 * linux-low.h (struct linux_target_ops) <delete_process>: New
4250 field.
4251 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
4252 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
4253 (struct linux_target_ops): Add delete_process callback.
4254 * linux-arm-low.c (arm_delete_process): New.
4255 (struct linux_target_ops): Add delete_process callback.
4256 * linux-bfin-low.c (struct linux_target_ops): Likewise.
4257 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
4258 * linux-m32r-low.c (struct linux_target_ops): Likewise.
4259 * linux-mips-low.c (mips_linux_delete_process): New.
4260 (struct linux_target_ops): Add delete_process callback.
4261 * linux-ppc-low.c (struct linux_target_ops): Likewise.
4262 * linux-s390-low.c (struct linux_target_ops): Likewise.
4263 * linux-sh-low.c (struct linux_target_ops): Likewise.
4264 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
4265 * linux-tile-low.c (struct linux_target_ops): Likewise.
4266 * linux-x86-low.c (x86_linux_delete_process): New.
4267 (struct linux_target_ops): Add delete_process callback.
4268 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
4269
4270 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4271
4272 * linux-aarch64-low.c (the_low_target): Add thread delete
4273 callback.
4274 * linux-arm-low.c (arm_delete_thread): New function.
4275 (the_low_target): Add thread delete callback.
4276 * linux-bfin-low.c (the_low_target): Likewise.
4277 * linux-crisv32-low.c (the_low_target): Likewise.
4278 * linux-low.c (delete_lwp): Invoke delete_thread callback if
4279 set.
4280 * linux-low.h (struct linux_target_ops) <delete_thread>: New
4281 field.
4282 * linux-m32r-low.c (the_low_target): Add thread delete callback.
4283 * linux-mips-low.c (mips_linux_delete_thread): New function.
4284 (the_low_target): Add thread delete callback.
4285 * linux-ppc-low.c (the_low_target): Likewise.
4286 * linux-s390-low.c (the_low_target): Likewise.
4287 * linux-sh-low.c (the_low_target): Likewise.
4288 * linux-tic6x-low.c (the_low_target): Likewise.
4289 * linux-tile-low.c (the_low_target): Likewise.
4290 * linux-x86-low.c (the_low_target): Likewise.
4291 * linux-xtensa-low.c (the_low_target): Likewise.
4292
4293 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
4294
4295 * win32-low.c: Include "common-inferior.h".
4296
4297 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4298
4299 * inferiors.c (set_inferior_cwd): New function.
4300 * server.c (handle_general_set): Handle QSetWorkingDir packet.
4301 (handle_query): Inform that QSetWorkingDir is supported.
4302 * win32-low.c (create_process): Pass the inferior's cwd to
4303 CreateProcess.
4304
4305 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4306
4307 * inferiors.c (current_inferior_cwd): New global variable.
4308 (get_inferior_cwd): New function.
4309 * inferiors.h (struct process_info) <cwd>: New field.
4310
4311 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4312
4313 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
4314 (OBS): Add gdb_tilde_expand.o.
4315
4316 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
4317
4318 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
4319 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
4320
4321 2017-09-29 Pedro Alves <palves@redhat.com>
4322
4323 * ax.c (gdb_parse_agent_expr): Constify.
4324 * ax.h (gdb_parse_agent_expr): Constify.
4325 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4326 Constify.
4327 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
4328 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
4329 * remote-utils.h (read_ptid): Constify.
4330 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
4331 (process_point_options, process_serial_event): Constify.
4332 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
4333 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
4334 (cmd_qtbuffer): Constify.
4335
4336 2017-09-29 Pedro Alves <palves@redhat.com>
4337
4338 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
4339 fails.
4340
4341 2017-09-29 Pedro Alves <palves@redhat.com>
4342
4343 * linux-low.c (handle_extended_wait): Pass parent thread instead
4344 of process to thread_db_notice_clone.
4345 * linux-low.h (thread_db_notice_clone): Replace parent process
4346 parameter with parent thread parameter.
4347 * thread-db.c (find_one_thread): Add comment.
4348 (thread_db_notice_clone): Replace parent process parameter with
4349 parent thread parameter. Temporarily switch to the parent thread.
4350
4351 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
4352
4353 * gdbthread.h: Include "common-gdbthread.h".
4354 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
4355 "if" when validating the ptid.
4356 * remote-utils.c: Include "gdbthread.h".
4357 (prepare_resume_reply): Use "switch_to_thread".
4358 * target.c (done_accessing_memory): Likewise.
4359
4360 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4361
4362 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
4363 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
4364 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
4365 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
4366 s390x-gs-linux64-ipa.o to ipa_obj.
4367 * linux-s390-low.c (HWCAP_S390_GS): New define.
4368 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
4369 New functions.
4370 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
4371 (s390_arch_setup): Check for guarded-storage support and choose
4372 appropriate tdesc.
4373 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
4374 init_registers_s390x_gs_linux64.
4375 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
4376 enum value.
4377 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
4378 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
4379
4380 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
4381
4382 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
4383
4384 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4385
4386 * linux-low.h (struct lwp_info): Add new field, thread_handle.
4387 (thread_db_thread_handle): Declare.
4388 * linux-low.c (linux_target_ops): Initialize thread_handle.
4389 * server.c (handle_qxfer_threads_worker): Add support for
4390 "handle" attribute.
4391 * target.h (struct target_ops): Add new function pointer,
4392 thread_handle.
4393 (target_thread_handle): Define.
4394 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
4395 field in lwp.
4396 (thread_db_thread_handle): New function.
4397
4398 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4399
4400 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
4401 * linux-low.h (thread_db_notice_clone): Declare.
4402 * thread-db.c (thread_db_notice_clone): New function.
4403
4404 2017-09-21 Pedro Alves <palves@redhat.com>
4405
4406 * server.c (gdb_read_memory, handle_status, process_serial_event)
4407 (handle_serial_event, handle_target_event): Adjust to
4408 set_desired_thread prototype change.
4409 * target.c (set_desired_thread): Remove 'use_general' parameter
4410 and adjust.
4411 * target.h (set_desired_thread): Remove 'use_general' parameter.
4412
4413 2017-09-20 Tom Tromey <tom@tromey.com>
4414
4415 * target.c (target_terminal::terminal_state): Define.
4416 (target_terminal::init): Rename from target_terminal_init.
4417 (target_terminal::inferior): Rename from
4418 target_terminal_inferior.
4419 (target_terminal::ours): Rename from target_terminal_ours.
4420 (target_terminal::ours_for_output, target_terminal::info): New.
4421
4422 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4423
4424 * server.c (accumulate_file_name_length): Remove.
4425 (emit_dll_description): Adjust to std::string change.
4426 (handle_qxfer_libraries): Use std::string to hold document.
4427
4428 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4429
4430 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
4431 return type of xml_escape_text.
4432 * server.c (emit_dll_description): Likewise.
4433
4434 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4435
4436 * server.c (captured_main): Accept argument for --selftest.
4437 Update run_tests call.
4438 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
4439 when registering selftests.
4440
4441 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
4442
4443 * regcache.c (get_thread_regcache): Update code to use "std::vector"
4444 instead of "VEC" for "target_desc.reg_defs".
4445 (regcache_cpy): Likewise.
4446 (registers_to_string): Likewise.
4447 (registers_from_string): Likewise.
4448 (find_regno): Likewise.
4449 (supply_regblock): Likewise.
4450 (regcache_raw_read_unsigned): Likewise.
4451 * tdesc.c (init_target_desc): Likewise.
4452 (tdesc_create_reg): Likewise.
4453 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
4454 (struct target_desc) <reg_defs>: Convert to "std::vector".
4455 (target_desc): Do not initialize "reg_defs".
4456 (~target_desc): Update code to use "std::vector" instead of "VEC"
4457 for "target_desc.reg_defs".
4458 (operator==): Likewise.
4459
4460 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4461
4462 * inferiors.h (thread_to_gdb_id): Remove.
4463 * inferiors.c (thread_to_gdb_id): Remove.
4464 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
4465 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
4466 lynx_store_registers, lynx_read_memory, lynx_write_memory):
4467 Likewise.
4468 * nto-low.c (nto_fetch_registers, nto_store_registers,
4469 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
4470
4471 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4472
4473 * inferiors.h (gdb_id_to_thread_id): Remove.
4474 * inferiors.c (gdb_id_to_thread_id): Remove.
4475 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
4476 removal. Move pid declaration closer to where it's used.
4477
4478 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4479
4480 * server.c (handle_detach): New function.
4481 (process_serial_event): Move code out, call handle_detach.
4482
4483 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4484
4485 * server.c (require_running): Rename to ...
4486 (require_running_or_return): ... this ...
4487 (require_running_or_break): ... and this.
4488 (handle_query, process_serial_event): Adjust.
4489
4490 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4491
4492 * linux-low.c (linux_set_resume_request): Remove unused
4493 variables.
4494
4495 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4496
4497 * server.c (first_thread_of): Remove.
4498 (process_serial_event): Replace usage of first_thread_of with
4499 find_any_thread_of_pid.
4500 * tracepoint.c (same_process_p): Remove.
4501 (gdb_agent_about_to_close): Replace usage of same_process_p with
4502 find_any_thread_of_pid.
4503 * linux-x86-low.c (same_process_callback): Remove.
4504 (x86_arch_setup_process_callback): Replace usage of
4505 same_process_callback with find_any_thread_of_pid.
4506 * thread-db.c (any_thread_of): Remove.
4507 (switch_to_process): Replace usage of any_thread_of with
4508 find_any_thread_of_pid.
4509 * inferiors.c (thread_pid_matches_callback): Remove.
4510 (find_thread_process): Adjust to use find_any_thread_of_pid.
4511
4512 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
4513
4514 * regcache.c (get_thread_regcache): Guard calls to "memset"
4515 with "!VEC_empty".
4516
4517 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
4518
4519 * linux-low.c (handle_extended_wait): Use
4520 "allocate_target_description" instead of "XNEW".
4521 * linux-x86-low.c (initialize_low_arch): Likewise.
4522
4523 2017-09-05 Yao Qi <yao.qi@linaro.org>
4524
4525 * configure.srv (srv_i386_regobj): Remove.
4526 (srv_amd64_regobj): Remove.
4527 (srv_regobj): Set it to "" for x86 non-linux targets.
4528 * linux-x86-tdesc.c (i386_linux_read_description):
4529 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
4530 (init_registers_i386): Remove the declaration.
4531 (tdesc_i386): Remove the declaration.
4532 (lynx_i386_arch_setup): Call i386_create_target_description.
4533 * nto-x86-low.c: Likewise.
4534 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
4535 [!__x86_64__]: include arch/i386.h.
4536 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
4537
4538 2017-09-05 Yao Qi <yao.qi@linaro.org>
4539
4540 * configure.srv (srv_amd64_linux_xmlfiles): Remove
4541 i386/amd64-XXX-linux from it.
4542
4543 2017-09-05 Yao Qi <yao.qi@linaro.org>
4544
4545 * configure.srv: Empty srv_amd64_linux_regobj if $development is
4546 false.
4547 (ipa_amd64_linux_regobj): Remove.
4548 (ipa_x32_linux_regobj): Remove.
4549
4550 2017-09-05 Yao Qi <yao.qi@linaro.org>
4551
4552 * Makefile.in (arch-amd64.o): New rule.
4553 * configure.srv: Append arch-amd64.o.
4554 * linux-amd64-ipa.c: Include common/x86-xstate.h.
4555 (get_ipa_tdesc): Call amd64_linux_read_description.
4556 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
4557 and init_registers_amd64_XXX.
4558 * linux-x86-low.c (x86_linux_read_description): Call
4559 amd64_linux_read_description.
4560 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
4561 (initialize_low_arch): Don't call init_registers_x32_XXX and
4562 init_registers_amd64_XXX.
4563 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
4564 and tdesc_amd64_XXX.
4565 [__x86_64__] (amd64_tdesc_test): New function.
4566 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
4567 and init_registers_amd64_XXX.
4568 * linux-x86-tdesc.c: Include arch/amd64.h.
4569 (xcr0_to_tdesc_idx): New function.
4570 (i386_linux_read_description): New function.
4571 (amd64_get_ipa_tdesc_idx): New function.
4572 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
4573 (amd64_get_ipa_tdesc): Declare.
4574
4575 2017-09-05 Yao Qi <yao.qi@linaro.org>
4576
4577 * configure.srv (srv_i386_linux_xmlfiles): Remove
4578 i386/i386-XXX-linux.xml from it.
4579
4580 2017-09-05 Yao Qi <yao.qi@linaro.org>
4581
4582 * configure.srv: Set srv_i386_linux_regobj empty if $development
4583 is false.
4584 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
4585 initialize_low_tdesc.
4586 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
4587 with #if initialize_low_tdesc.
4588 * linux-x86-tdesc-selftest.c: New file.
4589 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
4590
4591 2017-09-05 Yao Qi <yao.qi@linaro.org>
4592
4593 * Makefile.in (arch-i386.o): New rule.
4594 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
4595 (x86_64-*-linux*): Likewise.
4596 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
4597 include arch/i386.h.
4598 (i386_linux_read_description): Remove code and call
4599 i386_create_target_description.
4600 * tdesc.c (allocate_target_description): New function.
4601 * tdesc.h (set_tdesc_architecture): Remove declaration.
4602 (set_tdesc_osabi): Likewise.
4603
4604 2017-09-05 Yao Qi <yao.qi@linaro.org>
4605
4606 * linux-x86-tdesc.c: Don't include <inttypes.h>.
4607 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
4608 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
4609 .xmltarget.
4610 * server.c (get_features_xml): Call tdesc_get_features_xml.
4611 * tdesc.c (set_tdesc_architecture): New function.
4612 (set_tdesc_osabi): New function.
4613 (tdesc_get_features_xml): New function.
4614 (tdesc_create_feature): Add an argument.
4615 * tdesc.h (struct target_desc) <features>: New field.
4616 <arch, osabi>: New field.
4617 (~target_desc): xfree features, arch, and osabi.
4618 (target_desc::oerator==): Don't compare .xmltarget.
4619 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
4620 (set_tdesc_osabi): Likewise.
4621 (tdesc_get_features_xml): Likewise.
4622
4623 2017-09-05 Yao Qi <yao.qi@linaro.org>
4624
4625 * linux-x86-tdesc.c: Include selftest.h.
4626 (i386_tdesc_test): New function.
4627 (initialize_low_tdesc): Call selftests::register_test.
4628 * tdesc.h: Include regdef.h.
4629 (target_desc): Override operator == and !=.
4630
4631 2017-09-05 Yao Qi <yao.qi@linaro.org>
4632
4633 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
4634 (ipa_obj): Likewise.
4635 * linux-i386-ipa.c: Include common/x86-xstate.h
4636 (get_ipa_tdesc): Call i386_linux_read_description.
4637 (initialize_low_tracepoint): Don't call init_registers_XXX
4638 functions, call initialize_low_tdesc instead.
4639 * linux-x86-low.c (x86_linux_read_description): Call
4640 i386_linux_read_description.
4641 (initialize_low_arch): Don't call init_registers_i386_XXX
4642 functions, call initialize_low_tdesc.
4643 * linux-x86-tdesc.c: New file.
4644 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
4645 (i386_get_ipa_tdesc_idx): Declare.
4646 (i386_get_ipa_tdesc): Declare.
4647 (initialize_low_tdesc): Declare.
4648
4649 2017-09-05 Yao Qi <yao.qi@linaro.org>
4650
4651 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
4652 instead of 0.
4653
4654 2017-09-05 Yao Qi <yao.qi@linaro.org>
4655
4656 * Makefile.in (IPA_OBJS): Add vec-ipa.o
4657 * regcache.c (get_thread_regcache): Use VEC_length.
4658 (init_register_cache): Likewise.
4659 (regcache_cpy): Likewise.
4660 (registers_to_string): Iterate reg_defs via VEC_iterate.
4661 (find_regno): Likewise.
4662 (find_register_by_number): Use VEC_index.
4663 (register_size): Call find_register_by_number.
4664 (register_data): Call find_register_by_number.
4665 (supply_regblock): Use VEC_length.
4666 (regcache_raw_read_unsigned): Likewise.
4667 * tdesc.c (init_target_desc): Iterate reg_defs via
4668 VEC_iterate.
4669 (default_description): Update initializer.
4670 (copy_target_description): Don't update field num_registers.
4671 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
4672 <num_registers>: Remove.
4673
4674 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4675
4676 * Makefile.in (.SECONDARY): Define target.
4677
4678 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
4679
4680 * linux-low.c (linux_wait_1): Adjust.
4681 * server.c (queue_stop_reply_callback): Adjust.
4682
4683 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
4684
4685 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
4686 QEnvironmentUnset and QEnvironmentReset packets.
4687 (handle_query): Inform remote that QEnvironmentHexEncoded,
4688 QEnvironmentUnset and QEnvironmentReset are supported.
4689
4690 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
4691
4692 * inferiors.h (inferior_target_data): Rename to ...
4693 (thread_target_data): ... this.
4694 (inferior_regcache_data): Rename to ...
4695 (thread_regcache_data): ... this.
4696 (set_inferior_regcache_data): Rename to ...
4697 (set_thread_regcache_data): ... this.
4698 * inferiors.c (inferior_target_data): Rename to ...
4699 (thread_target_data): ... this.
4700 (inferior_regcache_data): Rename to ...
4701 (thread_regcache_data): ... this.
4702 (set_inferior_regcache_data): Rename to ...
4703 (set_thread_regcache_data): ... this.
4704 (free_one_thread): Update.
4705 * linux-low.h (get_thread_lwp): Update.
4706 * regcache.c (get_thread_regcache): Update.
4707 (regcache_invalidate_thread): Update.
4708 (free_register_cache_thread): Update.
4709 * win32-i386-low.c (update_debug_registers_callback): Update.
4710 (win32_get_current_dr): Update.
4711 * win32-low.c (thread_rec): Update.
4712 (delete_thread_info): Update.
4713 (continue_one_thread): Update.
4714 (suspend_one_thread): Update.
4715
4716 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
4717
4718 * inferiors.c (set_inferior_target_data): Remove.
4719 * inferiors.h (set_inferior_target_data): Remove.
4720
4721 2017-08-18 Yao Qi <yao.qi@linaro.org>
4722
4723 * Makefile.in (OBS): Add selftest.o.
4724 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
4725 * configure, config.in: Re-generated.
4726 * server.c: Include common/sefltest.h.
4727 (captured_main): Handle option --selftest.
4728
4729 2017-08-09 Yao Qi <yao.qi@linaro.org>
4730
4731 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
4732 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
4733 i386-avx-mpx.o and i386-mmx.o.
4734 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
4735 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
4736 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
4737 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
4738 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
4739 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
4740 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
4741 i386/amd64-avx-mpx.xml.
4742
4743 2017-08-09 Yao Qi <yao.qi@linaro.org>
4744
4745 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
4746 and x32-avx-avx512.o.
4747 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
4748 i386/x32-avx-avx512.xml.
4749
4750 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
4751
4752 * tracepoint.h (enum class fast_tpoint_collect_result): New
4753 enumeration.
4754 (fast_tracepoint_collecting): Change return type to
4755 fast_tpoint_collect_result.
4756 * tracepoint.c (fast_tracepoint_collecting): Likewise.
4757 * linux-low.h: Include tracepoint.h.
4758 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
4759 fast_tpoint_collect_result.
4760 * linux-low.c (handle_tracepoints): Adjust.
4761 (linux_fast_tracepoint_collecting): Change return type to
4762 fast_tpoint_collect_result.
4763 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
4764 linux_wait_1, stuck_in_jump_pad_callback,
4765 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
4766 proceed_one_lwp): Adjust to type change.
4767
4768 2017-07-10 Yao Qi <yao.qi@linaro.org>
4769
4770 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
4771
4772 2017-06-29 Yao Qi <yao.qi@linaro.org>
4773
4774 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
4775 Remove.
4776 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
4777
4778 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
4779
4780 * Makefile.in (IPA_OBJS): Sort and format one item per line.
4781
4782 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4783
4784 * linux-low.c (linux_create_inferior): Adjust code to access the
4785 environment information via 'gdb_environ' class.
4786 * lynx-low.c (lynx_create_inferior): Likewise.
4787 * server.c (our_environ): Make it an instance of 'gdb_environ'.
4788 (get_environ): Return a pointer to 'our_environ'.
4789 (captured_main): Initialize 'our_environ'.
4790 * server.h (get_environ): Adjust prototype.
4791 * spu-low.c (spu_create_inferior): Adjust code to access the
4792 environment information via 'gdb_environ' class.
4793
4794 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4795
4796 * linux-low.c (linux_read_memory, linux_write_memory): Remove
4797 usage of "register" keyword.
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 * configure: Re-generate.
4806
4807 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4808
4809 * Makefile.in (COMPILE.pre): Add "-x c++".
4810
4811 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
4812
4813 * fork-child.c: Conditionally include <signal.h>.
4814
4815 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4816
4817 * server.c (handle_general_set): Handle new packet
4818 "QStartupWithShell".
4819 (handle_query): Add "QStartupWithShell" to the list of supported
4820 packets.
4821 (gdbserver_usage): Add help text explaining the
4822 new "--startup-with-shell" and "--no-startup-with-shell" CLI
4823 options.
4824 (captured_main): Recognize and act upon the presence of the new
4825 CLI options.
4826
4827 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4828 Pedro Alves <palves@redhat.com>
4829
4830 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
4831 * configure: Regenerate.
4832 * configure.srv (srv_linux_obj): Add "fork-child.o" and
4833 "fork-inferior.o".
4834 (i[34567]86-*-lynxos*): Likewise.
4835 (spu*-*-*): Likewise.
4836 * fork-child.c: New file.
4837 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
4838 and "environ.h".
4839 (linux_ptrace_fun): New function.
4840 (linux_create_inferior): Adjust function prototype to reflect
4841 change on "target.h". Adjust function code to use
4842 "fork_inferior".
4843 (linux_request_interrupt): Delete "signal_pid".
4844 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4845 (lynx_ptrace_fun): New function.
4846 (lynx_create_inferior): Adjust function prototype to reflect
4847 change on "target.h". Adjust function code to use
4848 "fork_inferior".
4849 * nto-low.c (nto_create_inferior): Adjust function prototype and
4850 code to reflect change on "target.h". Update comments.
4851 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
4852 "common-terminal.h" and "environ.h".
4853 (terminal_fd): Moved to fork-child.c.
4854 (old_foreground_pgrp): Likewise.
4855 (restore_old_foreground_pgrp): Likewise.
4856 (last_status): Make it global.
4857 (last_ptid): Likewise.
4858 (our_environ): New variable.
4859 (startup_with_shell): Likewise.
4860 (program_name): Likewise.
4861 (program_argv): Rename to...
4862 (program_args): ...this.
4863 (wrapper_argv): New variable.
4864 (start_inferior): Delete function.
4865 (get_exec_wrapper): New function.
4866 (get_exec_file): Likewise.
4867 (get_environ): Likewise.
4868 (prefork_hook): Likewise.
4869 (post_fork_inferior): Likewise.
4870 (postfork_hook): Likewise.
4871 (postfork_child_hook): Likewise.
4872 (handle_v_run): Update code to deal with arguments coming from the
4873 remote host. Update calls from "start_inferior" to
4874 "create_inferior".
4875 (captured_main): Likewise. Initialize environment variable. Call
4876 "have_job_control".
4877 * server.h (post_fork_inferior): New prototype.
4878 (get_environ): Likewise.
4879 (last_status): Declare.
4880 (last_ptid): Likewise.
4881 (signal_pid): Likewise.
4882 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4883 (spu_ptrace_fun): New function.
4884 (spu_create_inferior): Adjust function prototype to reflect change
4885 on "target.h". Adjust function code to use "fork_inferior".
4886 * target.c (target_terminal_init): New function.
4887 (target_terminal_inferior): Likewise.
4888 (target_terminal_ours): Likewise.
4889 * target.h: Include <vector>.
4890 (struct target_ops) <create_inferior>: Update prototype.
4891 (create_inferior): Update macro.
4892 * utils.c (gdb_flush_out_err): New function.
4893 * win32-low.c (win32_create_inferior): Adjust function prototype
4894 and code to reflect change on "target.h".
4895
4896 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4897
4898 * inferiors.c (switch_to_thread): New function.
4899
4900 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4901
4902 * Makefile.in (SFILE): Add "common/job-control.c".
4903 (OBS): Add "job-control.o".
4904
4905 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
4906
4907 * Makefile: Remove "@host_makefile_frag@".
4908
4909 2017-05-05 Pedro Alves <palves@redhat.com>
4910
4911 * configure: Regenerate.
4912
4913 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
4914
4915 * configure: Regenerate.
4916
4917 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4918
4919 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
4920 software_single_step change of return type to
4921 std::vector<CORE_ADDR>.
4922 * linux-low.c (install_software_single_step_breakpoints):
4923 Likewise.
4924 * linux-low.h (install_software_single_step_breakpoints):
4925 Likewise.
4926
4927 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4928
4929 * remote-utils.c: Include "gdb_termios.h" instead of
4930 "terminal.h".
4931 * terminal.h: Delete file.
4932
4933 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4934
4935 * server.c: Include <vector>.
4936 <program_argv, wrapper_argv>: Convert to std::vector.
4937 (start_inferior): Rewrite function to use C++.
4938 (handle_v_run): Likewise. Update code that calculates the argv
4939 based on the vRun packet; use C++.
4940 (captured_main): Likewise.
4941
4942 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
4943
4944 * server.c (handle_v_cont): Initialize thread_resume::thread
4945 with null_ptid.
4946
4947 2017-04-05 Pedro Alves <palves@redhat.com>
4948
4949 * configure: Regenerate.
4950
4951 2017-04-05 Pedro Alves <palves@redhat.com>
4952
4953 * gdbreplay.c (sync_error): Constify.
4954 * linux-x86-low.c (push_opcode): Constify.
4955
4956 2017-04-05 Pedro Alves <palves@redhat.com>
4957
4958 * win32-low.c (get_child_debug_event)
4959 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
4960 Report TARGET_WAITKIND_SPURIOUS instead.
4961
4962 2017-04-05 Pedro Alves <palves@redhat.com>
4963
4964 * remote-utils.c (remote_prepare, remote_open): Constify.
4965 * remote-utils.h (remote_prepare, remote_open): Constify.
4966 * server.c (captured_main): Constify 'port' handling.
4967
4968 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
4969
4970 * Makefile.in (clean): Clear .deps.
4971
4972 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
4973
4974 * .gitignore: Remove generated files, replace with wildcard.
4975 * (clean): Replace removal of generated files with wildcard.
4976 (version.c): Replace with...
4977 (version-generated.c): ...this.
4978 (xml-builtin.c): Replace with...
4979 (xml-builtin-generated.c): ...this.
4980 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
4981 (%.c: *regformats*): Replace with...
4982 (%-generated.c: *regformats*): ...this.
4983
4984 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4985
4986 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
4987 (xtensa_fill_gregset): Call collect_register_by_name for
4988 threadptr register.
4989 (xtensa_store_gregset): Call supply_register_by_name for
4990 threadptr register.
4991
4992 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4993
4994 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
4995 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
4996 (xtensa_store_gregset): Call supply_register for all registers in
4997 a0_regnum..a0_regnum + C0_NREGS range.
4998
4999 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5000
5001 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
5002 (ax-ipa.o: ax.c): Remove.
5003 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
5004 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
5005 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
5006 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
5007 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
5008
5009 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5010
5011 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
5012 (print-utils-ipa.o: ../common/print-utils.c): Remove.
5013 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
5014 (errors-ipa.o: ../common/errors.c): Remove.
5015 (format-ipa.o: ../common/format.c): Remove.
5016 (common-utils-ipa.o: ../common/common-utils.c): Remove.
5017
5018 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5019
5020 * Makefile.in (%-ipa.o: %.c): New rule.
5021 (tracepoint-ipa.o: tracepoint.c): Remove.
5022 (utils-ipa.o: utils.c): Remove.
5023 (remote-utils-ipa.o: remote-utils.c): Remove.
5024 (regcache-ipa.o: regcache.c): Remove.
5025 (i386-linux-ipa.o: i386-linux.c): Remove.
5026 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
5027 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
5028 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
5029 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
5030 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
5031 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
5032 (amd64-linux-ipa.o: amd64-linux.c): Remove.
5033 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
5034 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
5035 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
5036 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
5037 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
5038 (aarch64-ipa.o: aarch64.c): Remove.
5039 (s390-linux32-ipa.o: s390-linux32.c): Remove.
5040 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
5041 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
5042 (s390-linux64-ipa.o: s390-linux64.c): Remove.
5043 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
5044 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
5045 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
5046 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
5047 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
5048 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
5049 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
5050 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
5051 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
5052 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
5053 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
5054 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
5055 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
5056 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
5057 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
5058 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
5059 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
5060 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
5061 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
5062 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
5063 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
5064 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
5065 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
5066 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
5067 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
5068 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
5069 (tdesc-ipa.o: tdesc.c): Remove.
5070 (x32-linux-ipa.o: x32-linux.c): Remove.
5071 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
5072 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
5073
5074 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5075
5076 * Makefile.in (%.o: ../arch/%.c): New rule.
5077 (arm.o: ../arch/arm.c): Remove.
5078 (arm-linux.o: ../arch/arm-linux.c): Remove.
5079 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
5080 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
5081
5082 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5083
5084 * Makefile.in (%.o: ../nat/%.c): New rule.
5085 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
5086 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
5087 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
5088 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
5089 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
5090 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
5091 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
5092 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
5093 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
5094 (linux-personality.o: ../nat/linux-personality.c): Remove.
5095 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
5096 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
5097 (x86-linux.o: ../nat/x86-linux.c): Remove.
5098 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
5099 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
5100
5101 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5102
5103 * Makefile.in (%.o: ../common/%.c): New rule.
5104 (signals.o: ../common/signals.c): Remove.
5105 (print-utils.o: ../common/print-utils.c): Remove.
5106 (rsp-low.o: ../common/rsp-low.c): Remove.
5107 (common-utils.o: ../common/common-utils.c): Remove.
5108 (posix-strerror.o: ../common/posix-strerror.c): Remove.
5109 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
5110 (vec.o: ../common/vec.c): Remove.
5111 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
5112 (xml-utils.o: ../common/xml-utils.c): Remove.
5113 (ptid.o: ../common/ptid.c): Remove.
5114 (buffer.o: ../common/buffer.c): Remove.
5115 (format.o: ../common/format.c): Remove.
5116 (filestuff.o: ../common/filestuff.c): Remove.
5117 (agent.o: ../common/agent.c): Remove.
5118 (errors.o: ../common/errors.c): Remove.
5119 (environ.o: ../common/environ.c): Remove.
5120 (common-debug.o: ../common/common-debug.c): Remove.
5121 (cleanups.o: ../common/cleanups.c): Remove.
5122 (common-exceptions.o: ../common/common-exceptions.c): Remove.
5123 (fileio.o: ../common/fileio.c): Remove.
5124 (common-regcache.o: ../common/common-regcache.c): Remove.
5125 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
5126 (new-op.o: ../common/new-op.c): Remove.
5127 (btrace-common.o: ../common/btrace-common.c): Remove.
5128
5129 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5130
5131 * Makefile.in (%.o: ../target/%.c): New rule.
5132 (waitstatus.o: ../target/waitstatus.c): Remove.
5133
5134 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5135
5136 * Makefile.in
5137 (%.c: ../regformats/%.dat,
5138 (%.c: ../regformats/arm/%.dat,
5139 (%.c: ../regformats/i386/%.dat,
5140 (%.c: ../regformats/rs6000/%.dat): New rules.
5141 (aarch64.c): Remove.
5142 (reg-arm.c): Remove.
5143 (arm-with-iwmmxt.c): Remove.
5144 (arm-with-vfpv2.c): Remove.
5145 (arm-with-vfpv3.c): Remove.
5146 (arm-with-neon.c): Remove.
5147 (reg-bfin.c): Remove.
5148 (reg-cris.c): Remove.
5149 (reg-crisv32.c): Remove.
5150 (i386.c): Remove.
5151 (i386-linux.c): Remove.
5152 (i386-avx.c): Remove.
5153 (i386-avx-linux.c): Remove.
5154 (i386-avx-avx512.c): Remove.
5155 (i386-avx-avx512-linux.c): Remove.
5156 (i386-mpx.c): Remove.
5157 (i386-mpx-linux.c): Remove.
5158 (i386-avx-mpx-avx512-pku.c): Remove.
5159 (i386-avx-mpx-avx512-pku-linux.c): Remove.
5160 (i386-avx-mpx.c): Remove.
5161 (i386-avx-mpx-linux.c): Remove.
5162 (i386-mmx.c): Remove.
5163 (i386-mmx-linux.c): Remove.
5164 (reg-ia64.c): Remove.
5165 (reg-m32r.c): Remove.
5166 (reg-m68k.c): Remove.
5167 (reg-cf.c): Remove.
5168 (mips-linux.c): Remove.
5169 (mips-dsp-linux.c): Remove.
5170 (mips64-linux.c): Remove.
5171 (mips64-dsp-linux.c): Remove.
5172 (nios2-linux.c): Remove.
5173 (powerpc-32.c): Remove.
5174 (powerpc-32l.c): Remove.
5175 (powerpc-altivec32l.c): Remove.
5176 (powerpc-cell32l.c): Remove.
5177 (powerpc-vsx32l.c): Remove.
5178 (powerpc-isa205-32l.c): Remove.
5179 (powerpc-isa205-altivec32l.c): Remove.
5180 (powerpc-isa205-vsx32l.c): Remove.
5181 (powerpc-e500l.c): Remove.
5182 (powerpc-64l.c): Remove.
5183 (powerpc-altivec64l.c): Remove.
5184 (powerpc-cell64l.c): Remove.
5185 (powerpc-vsx64l.c): Remove.
5186 (powerpc-isa205-64l.c): Remove.
5187 (powerpc-isa205-altivec64l.c): Remove.
5188 (powerpc-isa205-vsx64l.c): Remove.
5189 (s390-linux32.c): Remove.
5190 (s390-linux32v1.c): Remove.
5191 (s390-linux32v2.c): Remove.
5192 (s390-linux64.c): Remove.
5193 (s390-linux64v1.c): Remove.
5194 (s390-linux64v2.c): Remove.
5195 (s390-te-linux64.c): Remove.
5196 (s390-vx-linux64.c): Remove.
5197 (s390-tevx-linux64.c): Remove.
5198 (s390x-linux64.c): Remove.
5199 (s390x-linux64v1.c): Remove.
5200 (s390x-linux64v2.c): Remove.
5201 (s390x-te-linux64.c): Remove.
5202 (s390x-vx-linux64.c): Remove.
5203 (s390x-tevx-linux64.c): Remove.
5204 (tic6x-c64xp-linux.c): Remove.
5205 (tic6x-c64x-linux.c): Remove.
5206 (tic6x-c62x-linux.c): Remove.
5207 (reg-sh.c): Remove.
5208 (reg-sparc64.c): Remove.
5209 (reg-spu.c): Remove.
5210 (amd64.c): Remove.
5211 (amd64-linux.c): Remove.
5212 (amd64-avx.c): Remove.
5213 (amd64-avx-linux.c): Remove.
5214 (amd64-avx-avx512.c): Remove.
5215 (amd64-avx-avx512-linux.c): Remove.
5216 (amd64-mpx.c): Remove.
5217 (amd64-mpx-linux.c): Remove.
5218 (amd64-avx-mpx-avx512-pku.c): Remove.
5219 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
5220 (amd64-avx-mpx.c): Remove.
5221 (amd64-avx-mpx-linux.c): Remove.
5222 (x32.c): Remove.
5223 (x32-linux.c): Remove.
5224 (x32-avx.c): Remove.
5225 (x32-avx-linux.c): Remove.
5226 (x32-avx-avx512.c): Remove.
5227 (x32-avx-avx512-linux.c): Remove.
5228 (reg-xtensa.c): Remove.
5229 (reg-tilegx.c): Remove.
5230 (reg-tilegx32.c): Remove.
5231
5232 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
5233
5234 * Makefile.in (SFILES): Add "common/environ.c".
5235 (OBJS): Add "common/environ.h".
5236
5237 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
5238
5239 * configure.ac: Check if the fs_base and gs_base members of
5240 `struct user_regs_struct' exist.
5241 * config.in: Regenerated.
5242 * configure: Likewise.
5243
5244 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
5245
5246 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
5247 target_read_memory.
5248 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
5249 (get_next_pcs_syscall_next_pc): Likewise.
5250
5251 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
5252
5253 * win32-i386-low.c: Fix incorrect reference to a couple source files.
5254 * nto-x86-low.c: Likewise.
5255
5256 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
5257
5258 * Makefile.in: Include disable-implicit-rules.mk.
5259
5260 2016-11-23 Pedro Alves <palves@redhat.com>
5261
5262 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
5263 (debug_vprintf): Use std::chrono::steady_clock instead of
5264 gettimeofday. Use '.' instead of ':'.
5265 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
5266 (get_timestamp): Use std::chrono::steady_clock instead of
5267 gettimeofday.
5268
5269 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
5270
5271 * Makefile.in: Fix whitespace formatting.
5272
5273 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
5274
5275 * Makefile.in (SFILES, OBS): Flatten list and order
5276 alphabetically.
5277
5278 2016-11-23 Pedro Alves <palves@redhat.com>
5279
5280 * event-loop.c (handle_file_event): Use warning.
5281 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
5282 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5283 Use warning.
5284
5285 2016-11-23 Pedro Alves <palves@redhat.com>
5286
5287 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
5288 output.
5289 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
5290 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
5291 debug_printf and debug_flush for debug output.
5292 * server.c (handle_general_set): Likewise.
5293 * thread-db.c (try_thread_db_load): Use debug_printf for debug
5294 output.
5295
5296 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
5297
5298 * Makefile.in (.c.o): Replace rule with ...
5299 (%.o: %.c): ... this one.
5300
5301 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
5302
5303 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
5304 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
5305 make.
5306 * configure.ac: Remove checks for the make program.
5307 * configure: Re-generate.
5308
5309 2016-10-28 Pedro Alves <palves@redhat.com>
5310
5311 * Makefile.in (CXX_DIALECT): Get from configure.
5312 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
5313 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
5314 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
5315 * config.in: Regenerate.
5316 * configure: Regenerate.
5317
5318 2016-10-27 Yao Qi <yao.qi@linaro.org>
5319
5320 * linux-low.c (linux_supports_range_stepping): Return true if
5321 can_software_single_step return true.
5322
5323 2016-10-27 Yao Qi <yao.qi@linaro.org>
5324
5325 * inferiors.c (find_inferior_in_random): New function.
5326 * inferiors.h (find_inferior_in_random): Declare.
5327 * linux-low.c (linux_wait_for_event_filtered): Call
5328 find_inferior_in_random instead of find_inferior.
5329
5330 2016-10-27 Yao Qi <yao.qi@linaro.org>
5331
5332 * linux-low.c (linux_wait_1): If single-step breakpoints are
5333 inserted, remove them.
5334
5335 2016-10-26 Pedro Alves <palves@redhat.com>
5336
5337 * linux-low.c (handle_extended_wait): Link parent/child fork
5338 threads.
5339 (linux_wait_1): Unlink them.
5340 (linux_set_resume_request): Ignore resume requests for
5341 already-resumed and unhandled fork child threads.
5342 * linux-low.h (struct lwp_info) <fork_relative>: New field.
5343 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
5344 New functions.
5345 (handle_v_requests) <vCont>: Don't call require_running.
5346 * server.h (in_queued_stop_replies): New declaration.
5347
5348 2016-10-24 Yao Qi <yao.qi@linaro.org>
5349
5350 PR server/20733
5351 * linux-aarch64-low.c (append_insns): Cast the return value to
5352 'uint32_t *'.
5353
5354 2016-10-10 Yao Qi <yao.qi@linaro.org>
5355
5356 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
5357
5358 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
5359
5360 * target.c (target_supports_multi_process): New function, moved
5361 from...
5362 * target.h (target_supports_multi_process): ... here. Remove
5363 macro.
5364
5365 2016-10-05 Tom Tromey <tom@tromey.com>
5366
5367 PR remote/20655:
5368 * tracepoint.c (handle_tracepoint_bkpts): Check
5369 ipa_error_tracepoint, not ipa_stopping_tracepoint.
5370
5371 2016-10-05 Yao Qi <yao.qi@linaro.org>
5372
5373 * configure.srv: Update the path of arm-*.xml files.
5374
5375 2016-10-05 Terry Guo <terry.guo@arm.com>
5376 Yao Qi <yao.qi@linaro.org>
5377
5378 * Makefile.in: Adjust the path of rules.
5379 * configure.srv: Update the path of xml files.
5380 * regformats/arm-with-iwmmxt.dat: Regenerated.
5381 * regformats/arm-with-neon.dat: Likewise.
5382 * regformats/arm-with-vfpv2.dat: Likewise.
5383 * regformats/arm-with-vfpv3.dat Likewise.
5384
5385 2016-09-30 Yao Qi <yao.qi@linaro.org>
5386
5387 PR gdbserver/20627
5388 * target.c (target_stop_and_wait): Don't call
5389 target_continue_no_signal, use resume_stop instead.
5390
5391 2016-09-26 Yao Qi <yao.qi@linaro.org>
5392
5393 * linux-low.c (linux_wait_1): Call debug_exit.
5394
5395 2016-09-23 Pedro Alves <palves@redhat.com>
5396
5397 * Makefile.in (SFILES): Add common/new-op.c.
5398 (OBS): Add common/new-op.o.
5399 (new-op.o): New rule.
5400
5401 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
5402
5403 * .gitinore: Ignore more files.
5404
5405 2016-09-21 Yao Qi <yao.qi@linaro.org>
5406
5407 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
5408 23.
5409
5410 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
5411
5412 * server.c (start_inferior): Call target_mourn_inferior instead of
5413 mourn_inferior; pass ptid_t argument to it.
5414 (resume): Likewise.
5415 (handle_target_event): Likewise.
5416 * target.c (target_mourn_inferior): New function.
5417 * target.h (mourn_inferior): Delete macro.
5418
5419 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
5420
5421 * linux-low.c (lwp_is_stepping): New function.
5422
5423 2016-09-06 Carl Love <cel@us.ibm.com>
5424
5425 * server.c (start_inferior): Fixed comment, requested comment change
5426 didn't get updated correctly. Removed reference to ptrace () call as
5427 it is only true on Linux systems.
5428
5429 2016-09-06 Carl Love <cel@us.ibm.com>
5430
5431 * server.c (start_inferior): Do not call
5432 function target_post_create_inferior () if the
5433 inferior process has already exited.
5434
5435 2016-09-05 Pedro Alves <palves@redhat.com>
5436
5437 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
5438 (COMPILE.pre, CC_LD): Use CXX directly.
5439 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
5440 * acinclude.m4: Don't include build-with-cxx.m4.
5441 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
5442 * configure: Regenerate.
5443
5444 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
5445
5446 PR gdb/19495
5447 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
5448 call writing data to own_buf.
5449
5450 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
5451
5452 * target.c (mywait): Call target_wait instead of
5453 the_target->wait.
5454 (target_wait): New function.
5455
5456 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
5457
5458 * server.c (start_inferior): New variable 'ptid'. Replace calls
5459 to the_target->resume by target_continue{,_no_signal}, depending
5460 on the case.
5461 * target.c (target_stop_and_wait): Call target_continue_no_signal
5462 instead of the_target->resume.
5463 (target_continue): New function.
5464
5465 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
5466
5467 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
5468
5469 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
5470
5471 PR server/20491
5472 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
5473 ps_prochandle.
5474 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
5475 * linux-arm-low.c (ps_get_thread_area): Likewise.
5476 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
5477 * linux-m68k-low.c (ps_get_thread_area): Likewise.
5478 * linux-mips-low.c (ps_get_thread_area): Likewise.
5479 * linux-nios2-low.c (ps_get_thread_area): Likewise.
5480 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
5481 * linux-x86-low.c (ps_get_thread_area): Likewise.
5482 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
5483
5484 2016-08-19 Pedro Alves <palves@redhat.com>
5485
5486 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
5487
5488 2016-08-19 Pedro Alves <palves@redhat.com>
5489
5490 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
5491 comment. Use memcpy instead of casting through unsigned long.
5492
5493 2016-08-19 Pedro Alves <palves@redhat.com>
5494
5495 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
5496 allocating around 0x80000000.
5497
5498 2016-08-19 Pedro Alves <palves@redhat.com>
5499
5500 PR gdb/20415
5501 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
5502 (x32-avx512-linux-ipa.o): New rules.
5503 * configure.ac (x86_64-*-linux*): New x32 check.
5504 * configure.srv (ipa_x32_linux_regobj): New.
5505 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
5506 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
5507 descriptions.
5508 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
5509 descriptions.
5510 * configure: Regenerate.
5511
5512 2016-08-09 Pedro Alves <palves@redhat.com>
5513
5514 PR gdb/18653
5515 * Makefile.in (OBS): Add signals-state-save-restore.o.
5516 (signals-state-save-restore.o): New rule.
5517 * config.in: Regenerate.
5518 * configure: Regenerate.
5519 * linux-low.c: Include "signals-state-save-restore.h".
5520 (linux_create_inferior): Call
5521 restore_original_signals_state.
5522 * server.c: Include "dispositions-save-restore.h".
5523 (captured_main): Call save_original_signals_state.
5524
5525 2016-08-05 Pedro Alves <palves@redhat.com>
5526
5527 * configure: Regenerate.
5528
5529 2016-08-04 Yao Qi <yao.qi@linaro.org>
5530
5531 * linux-low.c (regsets_fetch_inferior_registers): Check
5532 errno is ESRCH or not.
5533
5534 2016-08-02 Yao Qi <yao.qi@linaro.org>
5535
5536 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
5537 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
5538 (thread_db_load_search): Update.
5539 (try_thread_db_load_1): Don't look for td_ta_event_addr,
5540 td_ta_set_event and td_ta_event_getmsg.
5541
5542 2016-07-26 Pedro Alves <palves@redhat.com>
5543
5544 PR server/20414
5545 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
5546 of unsigned long for 64-bit registers and use uint32_t instead of
5547 unsigned int for 32-bit registers.
5548
5549 2016-07-26 Pedro Alves <palves@redhat.com>
5550
5551 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
5552 to 'ptrace'.
5553
5554 2016-07-21 Tom Tromey <tom@tromey.com>
5555
5556 * configure: Rebuild.
5557
5558 2016-07-21 Yao Qi <yao.qi@linaro.org>
5559
5560 * mem-break.c (find_gdb_breakpoint): Cast bp to
5561 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
5562
5563 2016-07-21 Yao Qi <yao.qi@linaro.org>
5564
5565 * server.c (handle_v_requests): Support s and S actions
5566 if target_supports_software_single_step return true.
5567
5568 2016-07-21 Yao Qi <yao.qi@linaro.org>
5569
5570 * linux-low.c (resume_stopped_resumed_lwps): If resume request
5571 is resume_step, call maybe_hw_step.
5572 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
5573 and unstop them.
5574 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
5575 breakpoints or not.
5576 (proceed_one_lwp): If resume request is resume_step, install
5577 reinsert breakpoints and call maybe_hw_step.
5578
5579 2016-07-21 Yao Qi <yao.qi@linaro.org>
5580
5581 * linux-low.c (proceed_one_lwp): Declare.
5582 (linux_resume_one_thread): Remove local variable 'step'.
5583 Lift code enqueue signal. Call proceed_one_lwp instead of
5584 linux_resume_one_lwp.
5585
5586 2016-07-21 Yao Qi <yao.qi@linaro.org>
5587
5588 * linux-low.c (linux_resume_one_thread): Call
5589 enqueue_pending_signal.
5590
5591 2016-07-21 Yao Qi <yao.qi@linaro.org>
5592
5593 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
5594 * inferiors.c (do_restore_current_thread_cleanup): New function.
5595 (make_cleanup_restore_current_thread): Likewise.
5596 * linux-low.c (install_software_single_step_breakpoints): Call
5597 make_cleanup_restore_current_thread. Switch current_thread to
5598 thread.
5599
5600 2016-07-21 Yao Qi <yao.qi@linaro.org>
5601
5602 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
5603 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
5604 (clone_one_breakpoint): Likewise.
5605 (delete_reinsert_breakpoints): Change parameter to thread.
5606 Callers updated.
5607 (has_reinsert_breakpoints): Likewise.
5608 (uninsert_reinsert_breakpoints): Likewise.
5609 (reinsert_reinsert_breakpoints): Likewise.
5610 * mem-break.h (set_reinsert_breakpoint): Update declaration.
5611 (delete_reinsert_breakpoints): Likewise.
5612 (reinsert_reinsert_breakpoints): Likewise.
5613 (uninsert_reinsert_breakpoints): Likewise.
5614 (has_reinsert_breakpoints): Likewise.
5615
5616 2016-07-21 Yao Qi <yao.qi@linaro.org>
5617
5618 * inferiors.c (get_thread_process): Make parameter const.
5619 * inferiors.h (get_thread_process): Update declaration.
5620 * mem-break.c (clone_all_breakpoints): Remove all parameters.
5621 Add new parameters child_thread and parent_thread. Callers
5622 updated.
5623 * mem-break.h (clone_all_breakpoints): Update declaration.
5624
5625 2016-07-21 Yao Qi <yao.qi@linaro.org>
5626
5627 * mem-break.c (struct breakpoint) <cond_list>: Remove.
5628 <command_list, handler>: Remove.
5629 (struct gdb_breakpoint): New.
5630 (struct other_breakpoint): New.
5631 (struct reinsert_breakpoint): New.
5632 (is_gdb_breakpoint): New function.
5633 (any_persistent_commands): Update command_list if
5634 is_gdb_breakpoint returns true.
5635 (set_breakpoint): Create breakpoints according to their types.
5636 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
5637 (set_gdb_breakpoint_1): Likewise.
5638 (set_gdb_breakpoint): Likewise.
5639 (clear_breakpoint_conditions): Change parameter type to
5640 'struct gdb_breakpoint *'.
5641 (clear_breakpoint_commands): Likewise.
5642 (clear_breakpoint_conditions_and_commands): Likewise.
5643 (add_condition_to_breakpoint): Likewise.
5644 (add_breakpoint_condition): Likewise.
5645 (add_commands_to_breakpoint): Likewise.
5646 (check_breakpoints): Check other_breakpoint.
5647 (clone_one_breakpoint): Clone breakpopint according to its type.
5648 * mem-break.h (struct gdb_breakpoint): Declare.
5649 (set_gdb_breakpoint): Update declaration.
5650 (clear_breakpoint_conditions_and_commands): Likewise.
5651 (add_breakpoint_condition): Likewise.
5652 (add_breakpoint_commands): Likewise.
5653 * server.c (process_point_options): Change parameter type to
5654 'struct gdb_breakpoint *'.
5655
5656 2016-07-21 Yao Qi <yao.qi@linaro.org>
5657
5658 * mem-break.c (set_breakpoint_at): Rename it to ...
5659 (set_breakpoint_type_at): ... it.
5660 (set_breakpoint_at): Call set_breakpoint_type_at.
5661 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
5662 * mem-break.h (set_breakpoint_at): Update comments.
5663
5664 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
5665
5666 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
5667 to buf parameter.
5668 (nios2_store_gregset): Likewise.
5669
5670 2016-07-01 Pedro Alves <palves@redhat.com>
5671 Antoine Tremblay <antoine.tremblay@ericsson.com>
5672
5673 * linux-low.c: Change interface to take the target lwp_info
5674 pointer directly and return void. Handle detaching from a zombie
5675 thread.
5676 (linux_detach_lwp_callback): New function.
5677 (linux_detach): Detach from the leader thread after detaching from
5678 the clone threads.
5679
5680 2016-06-28 Yao Qi <yao.qi@linaro.org>
5681
5682 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
5683 for variable new_offset.
5684 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5685 (aarch64_ftrace_insn_reloc_cb): Likewise.
5686 (aarch64_ftrace_insn_reloc_tb): Likewise.
5687 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
5688 PRIx64 instead of PRIx32.
5689
5690 2016-06-28 Yao Qi <yao.qi@linaro.org>
5691
5692 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
5693 (the_low_target): Install arm_get_syscall_trapinfo.
5694
5695 2016-06-28 Yao Qi <yao.qi@linaro.org>
5696
5697 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
5698 function.
5699 (the_low_target): Install aarch64_get_syscall_trapinfo.
5700
5701 2016-06-28 Yao Qi <yao.qi@linaro.org>
5702
5703 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
5704 Callers updated.
5705 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
5706 Remove parameter sysno.
5707 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
5708 sysret.
5709
5710 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5711
5712 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
5713 (s390_emit_ne_goto): Likewise.
5714 (s390_emit_lt_goto): Likewise.
5715 (s390_emit_le_goto): Likewise.
5716 (s390_emit_gt_goto): Likewise.
5717 (s390_emit_ge_goto): Likewise.
5718 (s390x_emit_eq_goto): Likewise.
5719 (s390x_emit_ne_goto): Likewise.
5720 (s390x_emit_lt_goto): Likewise.
5721 (s390x_emit_le_goto): Likewise.
5722 (s390x_emit_gt_goto): Likewise.
5723 (s390x_emit_ge_goto): Likewise.
5724 (s390_emit_ops_impl): Mark variable static.
5725 (s390x_emit_ops): Likewise.
5726
5727 2016-06-17 Yao Qi <yao.qi@linaro.org>
5728
5729 * linux-low.c (handle_extended_wait): Call
5730 uninsert_reinsert_breakpoints for the parent process. Remove
5731 reinsert breakpoints from the child process. Reinsert them to
5732 the parent process when vfork is done.
5733 * mem-break.c (uninsert_reinsert_breakpoints): New function.
5734 (reinsert_reinsert_breakpoints): New function.
5735 * mem-break.h (uninsert_reinsert_breakpoints): Declare
5736 (reinsert_reinsert_breakpoints): Declare.
5737
5738 2016-06-17 Yao Qi <yao.qi@linaro.org>
5739
5740 * linux-low.c (handle_extended_wait): If the parent is doing
5741 step-over, remove the reinsert breakpoints from the forked child.
5742
5743 2016-06-17 Yao Qi <yao.qi@linaro.org>
5744
5745 * linux-low.c (unsuspend_all_lwps): Declare.
5746 (linux_low_filter_event): If thread exited, call finish_step_over.
5747 If step-over is finished, unsuspend other threads.
5748
5749 2016-06-17 Yao Qi <yao.qi@linaro.org>
5750
5751 * linux-low.c (linux_resume_one_lwp_throw): Assert
5752 has_reinsert_breakpoints returns false.
5753 * mem-break.c (delete_disabled_breakpoints): Assert
5754 bp type isn't reinsert_breakpoint.
5755
5756 2016-06-17 Yao Qi <yao.qi@linaro.org>
5757
5758 * linux-low.c (maybe_hw_step): New function.
5759 (linux_resume_one_lwp_throw): Call maybe_hw_step.
5760 (finish_step_over): Switch current_thread to lwp temporarily,
5761 and assert has_reinsert_breakpoints returns true.
5762 (proceed_one_lwp): Call maybe_hw_step.
5763 * mem-break.c (has_reinsert_breakpoints): New function.
5764 * mem-break.h (has_reinsert_breakpoints): Declare.
5765
5766 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
5767
5768 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
5769
5770 2016-05-17 Yao Qi <yao.qi@linaro.org>
5771
5772 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
5773 instead of find_inferior.
5774
5775 2016-05-05 Yao Qi <yao.qi@linaro.org>
5776
5777 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
5778 Initialize res to zero.
5779
5780 2016-05-05 Yao Qi <yao.qi@linaro.org>
5781
5782 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
5783 to uint32_t.
5784
5785 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5786
5787 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
5788 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
5789 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
5790
5791 2016-04-28 Par Olsson <par.olsson@windriver.com>
5792 Simon Marchi <simon.marchi@ericsson.com>
5793
5794 * tracepoint.c (write_inferior_int8): New function.
5795 (cmd_qtenable_disable): Write enable flag using
5796 write_inferior_int8.
5797
5798 2016-04-25 Yao Qi <yao.qi@linaro.org>
5799
5800 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
5801 (need_step_over_p): Return zero if the LWP has pending signals
5802 can be delivered on software single step target.
5803
5804 2016-04-25 Yao Qi <yao.qi@linaro.org>
5805
5806 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
5807 return instead of error.
5808
5809 2016-04-22 Yao Qi <yao.qi@linaro.org>
5810
5811 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
5812 to 23.
5813
5814 2016-04-22 Yao Qi <yao.qi@linaro.org>
5815
5816 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
5817 signal when stepping over breakpoint with software single
5818 step.
5819
5820 2016-04-21 Pedro Alves <palves@redhat.com>
5821
5822 * linux-s390-low.c (s390_collect_ptrace_register)
5823 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
5824 add casts.
5825 (s390_check_regset): Use void * instead of gdb_byte *.
5826
5827 2016-04-20 Pedro Alves <palves@redhat.com>
5828
5829 * configure: Renegerate.
5830
5831 2016-04-20 Yao Qi <yao.qi@linaro.org>
5832
5833 * linux-aarch32-low.c: Include "arch/arm-linux.h".
5834 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
5835 number 16.
5836 (arm_store_gregset): Likewise.
5837
5838 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
5839
5840 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
5841 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
5842 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
5843 (amd64-avx-mpx-linux.c): New rules.
5844 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
5845 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
5846 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
5847 (srv_amd64_regobj): Add amd64-avx-mpx.o.
5848 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
5849 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
5850 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
5851 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
5852 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
5853 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
5854 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
5855 * linux-x86-low.c (x86_linux_read_description): Add case for
5856 X86_XSTATE_AVX_MPX_MASK.
5857 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
5858 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
5859 init_registers_i386_avx_mpx_linux.
5860 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5861 (initialize_low_tracepoint): Call
5862 init_registers_i386_avx_mpx_linux.
5863 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5864 (initialize_low_tracepoint): Call
5865 init_registers_amd64_avx_mpx_linux.
5866 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
5867 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
5868 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
5869 declarations.
5870
5871 2016-04-18 Pedro Alves <palves@redhat.com>
5872
5873 * configure: Regenerate.
5874
5875 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
5876
5877 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
5878 (aarch64_emit_sub): Likewise.
5879
5880 2016-04-12 Pedro Alves <palves@redhat.com>
5881
5882 * utils.c (prepare_to_throw_exception): Delete.
5883
5884 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
5885
5886 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
5887
5888 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
5889
5890 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
5891
5892 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
5893
5894 * linux-aarch64-ipa.c: Add <elf.h> include.
5895 * linux-ppc-ipa.c: Add <elf.h> include.
5896 * linux-s390-ipa.c: Add <elf.h> include.
5897
5898 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5899
5900 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
5901 (get_raw_reg_ptr): Likewise.
5902 (get_trace_state_variable_value_ptr): Likewise.
5903 (set_trace_state_variable_value_ptr): Likewise.
5904 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
5905 char *.
5906
5907 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5908 Marcin Kościelnicki <koriakin@0x04.net>
5909
5910 PR/17221
5911 * linux-ppc-low.c (emit_insns): New function.
5912 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
5913 (ppc_emit_prologue): New function.
5914 (ppc_emit_epilogue): New function.
5915 (ppc_emit_add): New function.
5916 (ppc_emit_sub): New function.
5917 (ppc_emit_mul): New function.
5918 (ppc_emit_lsh): New function.
5919 (ppc_emit_rsh_signed): New function.
5920 (ppc_emit_rsh_unsigned): New function.
5921 (ppc_emit_ext): New function.
5922 (ppc_emit_zero_ext): New function.
5923 (ppc_emit_log_not): New function.
5924 (ppc_emit_bit_and): New function.
5925 (ppc_emit_bit_or): New function.
5926 (ppc_emit_bit_xor): New function.
5927 (ppc_emit_bit_not): New function.
5928 (ppc_emit_equal): New function.
5929 (ppc_emit_less_signed): New function.
5930 (ppc_emit_less_unsigned): New function.
5931 (ppc_emit_ref): New function.
5932 (ppc_emit_const): New function.
5933 (ppc_emit_reg): New function.
5934 (ppc_emit_pop): New function.
5935 (ppc_emit_stack_flush): New function.
5936 (ppc_emit_swap): New function.
5937 (ppc_emit_stack_adjust): New function.
5938 (ppc_emit_call): New function.
5939 (ppc_emit_int_call_1): New function.
5940 (ppc_emit_void_call_2): New function.
5941 (ppc_emit_if_goto): New function.
5942 (ppc_emit_goto): New function.
5943 (ppc_emit_eq_goto): New function.
5944 (ppc_emit_ne_goto): New function.
5945 (ppc_emit_lt_goto): New function.
5946 (ppc_emit_le_goto): New function.
5947 (ppc_emit_gt_goto): New function.
5948 (ppc_emit_ge_goto): New function.
5949 (ppc_write_goto_address): New function.
5950 (ppc_emit_ops_impl): New static variable.
5951 (ppc64v1_emit_prologue): New function.
5952 (ppc64v2_emit_prologue): New function.
5953 (ppc64_emit_epilogue): New function.
5954 (ppc64_emit_add): New function.
5955 (ppc64_emit_sub): New function.
5956 (ppc64_emit_mul): New function.
5957 (ppc64_emit_lsh): New function.
5958 (ppc64_emit_rsh_signed): New function.
5959 (ppc64_emit_rsh_unsigned): New function.
5960 (ppc64_emit_ext): New function.
5961 (ppc64_emit_zero_ext): New function.
5962 (ppc64_emit_log_not): New function.
5963 (ppc64_emit_bit_and): New function.
5964 (ppc64_emit_bit_or): New function.
5965 (ppc64_emit_bit_xor): New function.
5966 (ppc64_emit_bit_not): New function.
5967 (ppc64_emit_equal): New function.
5968 (ppc64_emit_less_signed): New function.
5969 (ppc64_emit_less_unsigned): New function.
5970 (ppc64_emit_ref): New function.
5971 (ppc64_emit_const): New function.
5972 (ppc64v1_emit_reg): New function.
5973 (ppc64v2_emit_reg): New function.
5974 (ppc64_emit_pop): New function.
5975 (ppc64_emit_stack_flush): New function.
5976 (ppc64_emit_swap): New function.
5977 (ppc64v1_emit_call): New function.
5978 (ppc64v2_emit_call): New function.
5979 (ppc64v1_emit_int_call_1): New function.
5980 (ppc64v2_emit_int_call_1): New function.
5981 (ppc64v1_emit_void_call_2): New function.
5982 (ppc64v2_emit_void_call_2): New function.
5983 (ppc64_emit_if_goto): New function.
5984 (ppc64_emit_eq_goto): New function.
5985 (ppc64_emit_ne_goto): New function.
5986 (ppc64_emit_lt_goto): New function.
5987 (ppc64_emit_le_goto): New function.
5988 (ppc64_emit_gt_goto): New function.
5989 (ppc64_emit_ge_goto): New function.
5990 (ppc64v1_emit_ops_impl): New static variable.
5991 (ppc64v2_emit_ops_impl): New static variable.
5992 (ppc_emit_ops): New function.
5993 (linux_low_target): Wire in ppc_emit_ops.
5994
5995 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5996 Marcin Kościelnicki <koriakin@0x04.net>
5997
5998 PR/17221
5999 * Makefile.in: Add powerpc-*-ipa.o
6000 * configure.srv: Add ipa_obj for powerpc*-linux.
6001 * linux-ppc-ipa.c: New file.
6002 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
6003 includes.
6004 (PPC_FIELD): New macro.
6005 (PPC_SEXT): New macro.
6006 (PPC_OP6): New macro.
6007 (PPC_BO): New macro.
6008 (PPC_LI): New macro.
6009 (PPC_BD): New macro.
6010 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
6011 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
6012 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
6013 (ppc_get_thread_area): New function.
6014 (is_elfv2_inferior): New function.
6015 (gen_ds_form): New function.
6016 (GEN_STD): New macro.
6017 (GEN_STDU): New macro.
6018 (GEN_LD): New macro.
6019 (GEN_LDU): New macro.
6020 (gen_d_form): New function.
6021 (GEN_ADDI): New macro.
6022 (GEN_ADDIS): New macro.
6023 (GEN_LI): New macro.
6024 (GEN_LIS): New macro.
6025 (GEN_ORI): New macro.
6026 (GEN_ORIS): New macro.
6027 (GEN_LWZ): New macro.
6028 (GEN_STW): New macro.
6029 (GEN_STWU): New macro.
6030 (gen_xfx_form): New function.
6031 (GEN_MFSPR): New macro.
6032 (GEN_MTSPR): New macro.
6033 (GEN_MFCR): New macro.
6034 (GEN_MTCR): New macro.
6035 (GEN_SYNC): New macro.
6036 (GEN_LWSYNC): New macro.
6037 (gen_x_form): New function.
6038 (GEN_OR): New macro.
6039 (GEN_MR): New macro.
6040 (GEN_LWARX): New macro.
6041 (GEN_STWCX): New macro.
6042 (GEN_CMPW): New macro.
6043 (gen_md_form): New function.
6044 (GEN_RLDICL): New macro.
6045 (GEN_RLDICR): New macro.
6046 (gen_i_form): New function.
6047 (GEN_B): New macro.
6048 (GEN_BL): New macro.
6049 (gen_b_form): New function.
6050 (GEN_BNE): New macro.
6051 (GEN_LOAD): New macro.
6052 (GEN_STORE): New macro.
6053 (gen_limm): New function.
6054 (gen_atomic_xchg): New function.
6055 (gen_call): New function.
6056 (ppc_relocate_instruction): New function.
6057 (ppc_install_fast_tracepoint_jump_pad): New function.
6058 (ppc_get_min_fast_tracepoint_insn_len): New function.
6059 (ppc_get_ipa_tdesc_idx): New function.
6060 (the_low_target): Wire in the new functions.
6061 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
6062 tdescs.
6063 * linux-ppc-tdesc.h: New file.
6064
6065 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
6066
6067 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
6068 (alloc_jump_pad_buffer): New function.
6069 * linux-amd64-ipa.c: Add <sys/mman.h> include.
6070 (alloc_jump_pad_buffer): New function.
6071 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
6072 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
6073 (alloc_jump_pad_buffer): New function.
6074 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
6075 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
6076 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
6077 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
6078
6079 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
6080
6081 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
6082 * linux-amd64-ipa.c: Likewise.
6083 * linux-i386-ipa.c: Likewise.
6084 * linux-s390-ipa.c: Likewise.
6085 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
6086 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
6087 set_trace_state_variable_value_ptr.
6088 (struct ipa_sym_addresses): Likewise.
6089 (symbol_list): Likewise.
6090 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
6091 accessing gdb_collect directly.
6092 (gdb_collect_ptr_type): New typedef.
6093 (get_raw_reg_ptr_type): New typedef.
6094 (get_trace_state_variable_value_ptr_type): New typedef.
6095 (set_trace_state_variable_value_ptr_type): New typedef.
6096 (gdb_collect_ptr): New global.
6097 (get_raw_reg_ptr): New global.
6098 (get_trace_state_variable_value_ptr): New global.
6099 (set_trace_state_variable_value_ptr): New global.
6100 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
6101 accessing get_raw_reg directly.
6102 (get_get_tsv_func_addr): Likewise for
6103 get_trace_state_variable_value_ptr.
6104 (get_set_tsv_func_addr): Likewise for
6105 set_trace_state_variable_value_ptr.
6106 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
6107
6108 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
6109
6110 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
6111
6112 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
6113
6114 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
6115 packets.
6116 (relocate_instruction): Remove own_buf.
6117 * server.c (own_buf): Make global.
6118 (handle_v_requests): Make global.
6119 * server.h (own_buf): New declaration.
6120 (handle_v_requests): New prototype.
6121
6122 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
6123
6124 PR 18377
6125 * linux-s390-low.c (add_insns): New function.
6126 (s390_emit_prologue): New function.
6127 (s390_emit_epilogue): New function.
6128 (s390_emit_add): New function.
6129 (s390_emit_sub): New function.
6130 (s390_emit_mul): New function.
6131 (s390_emit_lsh): New function.
6132 (s390_emit_rsh_signed): New function.
6133 (s390_emit_rsh_unsigned): New function.
6134 (s390_emit_ext): New function.
6135 (s390_emit_log_not): New function.
6136 (s390_emit_bit_and): New function.
6137 (s390_emit_bit_or): New function.
6138 (s390_emit_bit_xor): New function.
6139 (s390_emit_bit_not): New function.
6140 (s390_emit_equal): New function.
6141 (s390_emit_less_signed): New function.
6142 (s390_emit_less_unsigned): New function.
6143 (s390_emit_ref): New function.
6144 (s390_emit_if_goto): New function.
6145 (s390_emit_goto): New function.
6146 (s390_write_goto_address): New function.
6147 (s390_emit_litpool): New function.
6148 (s390_emit_const): New function.
6149 (s390_emit_call): New function.
6150 (s390_emit_reg): New function.
6151 (s390_emit_pop): New function.
6152 (s390_emit_stack_flush): New function.
6153 (s390_emit_zero_ext): New function.
6154 (s390_emit_swap): New function.
6155 (s390_emit_stack_adjust): New function.
6156 (s390_emit_set_r2): New function.
6157 (s390_emit_int_call_1): New function.
6158 (s390_emit_void_call_2): New function.
6159 (s390_emit_eq_goto): New function.
6160 (s390_emit_ne_goto): New function.
6161 (s390_emit_lt_goto): New function.
6162 (s390_emit_le_goto): New function.
6163 (s390_emit_gt_goto): New function.
6164 (s390_emit_ge_goto): New function.
6165 (s390x_emit_prologue): New function.
6166 (s390x_emit_epilogue): New function.
6167 (s390x_emit_add): New function.
6168 (s390x_emit_sub): New function.
6169 (s390x_emit_mul): New function.
6170 (s390x_emit_lsh): New function.
6171 (s390x_emit_rsh_signed): New function.
6172 (s390x_emit_rsh_unsigned): New function.
6173 (s390x_emit_ext): New function.
6174 (s390x_emit_log_not): New function.
6175 (s390x_emit_bit_and): New function.
6176 (s390x_emit_bit_or): New function.
6177 (s390x_emit_bit_xor): New function.
6178 (s390x_emit_bit_not): New function.
6179 (s390x_emit_equal): New function.
6180 (s390x_emit_less_signed): New function.
6181 (s390x_emit_less_unsigned): New function.
6182 (s390x_emit_ref): New function.
6183 (s390x_emit_if_goto): New function.
6184 (s390x_emit_const): New function.
6185 (s390x_emit_call): New function.
6186 (s390x_emit_reg): New function.
6187 (s390x_emit_pop): New function.
6188 (s390x_emit_stack_flush): New function.
6189 (s390x_emit_zero_ext): New function.
6190 (s390x_emit_swap): New function.
6191 (s390x_emit_stack_adjust): New function.
6192 (s390x_emit_int_call_1): New function.
6193 (s390x_emit_void_call_2): New function.
6194 (s390x_emit_eq_goto): New function.
6195 (s390x_emit_ne_goto): New function.
6196 (s390x_emit_lt_goto): New function.
6197 (s390x_emit_le_goto): New function.
6198 (s390x_emit_gt_goto): New function.
6199 (s390x_emit_ge_goto): New function.
6200 (s390_emit_ops): New function.
6201 (struct linux_target_ops): Fill in emit_ops hook.
6202
6203 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
6204
6205 PR 18377
6206 * Makefile.in: Add s390 IPA files.
6207 * configure.srv: Build IPA for s390.
6208 * linux-s390-ipa.c: New file.
6209 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
6210 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
6211 (tdesc_s390_linux32): Likewise.
6212 (init_registers_s390_linux32v1): Likewise.
6213 (tdesc_s390_linux32v1): Likewise.
6214 (init_registers_s390_linux32v2): Likewise.
6215 (tdesc_s390_linux32v2): Likewise.
6216 (init_registers_s390_linux64): Likewise.
6217 (tdesc_s390_linux64): Likewise.
6218 (init_registers_s390_linux64v1): Likewise.
6219 (tdesc_s390_linux64v1): Likewise.
6220 (init_registers_s390_linux64v2): Likewise.
6221 (tdesc_s390_linux64v2): Likewise.
6222 (init_registers_s390_te_linux64): Likewise.
6223 (tdesc_s390_te_linux64): Likewise.
6224 (init_registers_s390_vx_linux64): Likewise.
6225 (tdesc_s390_vx_linux64): Likewise.
6226 (init_registers_s390_tevx_linux64): Likewise.
6227 (tdesc_s390_tevx_linux64): Likewise.
6228 (init_registers_s390x_linux64): Likewise.
6229 (tdesc_s390x_linux64): Likewise.
6230 (init_registers_s390x_linux64v1): Likewise.
6231 (tdesc_s390x_linux64v1): Likewise.
6232 (init_registers_s390x_linux64v2): Likewise.
6233 (tdesc_s390x_linux64v2): Likewise.
6234 (init_registers_s390x_te_linux64): Likewise.
6235 (tdesc_s390x_te_linux64): Likewise.
6236 (init_registers_s390x_vx_linux64): Likewise.
6237 (tdesc_s390x_vx_linux64): Likewise.
6238 (init_registers_s390x_tevx_linux64): Likewise.
6239 (tdesc_s390x_tevx_linux64): Likewise.
6240 (have_hwcap_s390_vx): New static variable.
6241 (s390_arch_setup): Fill have_hwcap_s390_vx.
6242 (s390_get_thread_area): New function.
6243 (s390_ft_entry_gpr_esa): New const.
6244 (s390_ft_entry_gpr_zarch): New const.
6245 (s390_ft_entry_misc): New const.
6246 (s390_ft_entry_fr): New const.
6247 (s390_ft_entry_vr): New const.
6248 (s390_ft_main_31): New const.
6249 (s390_ft_main_64): New const.
6250 (s390_ft_exit_fr): New const.
6251 (s390_ft_exit_vr): New const.
6252 (s390_ft_exit_misc): New const.
6253 (s390_ft_exit_gpr_esa): New const.
6254 (s390_ft_exit_gpr_zarch): New const.
6255 (append_insns): New function.
6256 (s390_relocate_instruction): New function.
6257 (s390_install_fast_tracepoint_jump_pad): New function.
6258 (s390_get_min_fast_tracepoint_insn_len): New function.
6259 (s390_get_ipa_tdesc_idx): New function.
6260 (struct linux_target_ops): Wire in the above functions.
6261 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
6262 * linux-s390-tdesc.h: New file.
6263
6264 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
6265
6266 * linux-s390-low.c (s390_supports_tracepoints): New function.
6267 (struct linux_target_ops): Fill supports_tracepoints hook.
6268
6269 2016-03-18 Yao Qi <yao.qi@linaro.org>
6270
6271 * linux-low.c (lwp_signal_can_be_delivered): New function.
6272 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
6273
6274 2016-03-18 Yao Qi <yao.qi@linaro.org>
6275
6276 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
6277 0 if signal is enqueued. Remove 'signal' from one debugging
6278 message. Move one debugging message to some lines below.
6279 Remove code setting 'signal' to 0.
6280
6281 2016-03-18 Yao Qi <yao.qi@linaro.org>
6282
6283 * linux-low.c (linux_low_filter_event): Remove redundant
6284 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
6285
6286 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
6287
6288 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
6289 (struct linux_target_ops): Wire in the above.
6290
6291 2016-03-03 Yao Qi <yao.qi@linaro.org>
6292
6293 * linux-low.c: Update comments to start_step_over.
6294
6295 2016-03-03 Yao Qi <yao.qi@linaro.org>
6296
6297 PR server/19736
6298 * linux-low.c (handle_extended_wait): Set child suspended
6299 if event_lwp->bp_reinsert isn't zero.
6300
6301 2016-03-02 Yao Qi <yao.qi@linaro.org>
6302
6303 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
6304 enqueue_pending_signal.
6305
6306 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
6307
6308 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
6309 is actually loaded.
6310
6311 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
6312
6313 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
6314 (s390_regmap_3264) [!__s390x__]: New global.
6315 (s390_collect_ptrace_register): Skip map entries containing -1.
6316 (s390_supply_ptrace_register): Ditto.
6317 (s390_fill_gprs_high): New function.
6318 (s390_store_gprs_high): New function.
6319 (s390_regsets): Add NT_S390_HIGH_GPRS.
6320 (s390_get_hwcap): Enable on 31-bit.
6321 (have_hwcap_s390_high_gprs): Enable on 31-bit.
6322 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
6323 Detect NT_S390_HIGH_GPRS.
6324 (s390_usrregs_info_3264): Enable on 31-bit.
6325 (s390_regs_info): Enable regs_info_3264 on 31-bit.
6326 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
6327
6328 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
6329
6330 PR gdb/13808
6331 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
6332 * configure.srv: Ditto.
6333 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
6334 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
6335 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
6336 (init_registers_amd64_linux): Remove prototype.
6337 (tdesc_amd64_linux): Remove declaration.
6338 (get_ipa_tdesc): New function.
6339 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
6340 initialize remaining tdescs.
6341 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
6342 (init_registers_i386_linux): Remove prototype.
6343 (tdesc_i386_linux): Remove declaration.
6344 (get_ipa_tdesc): New function.
6345 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
6346 initialize remaining tdescs.
6347 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
6348 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
6349 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
6350 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
6351 (x86_get_ipa_tdesc_idx): New function.
6352 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
6353 * linux-x86-tdesc.h: New file.
6354 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
6355 (target_get_ipa_tdesc_idx): New macro.
6356 * tracepoint.c (ipa_tdesc_idx): New macro.
6357 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
6358 (symbol_list): Add ipa_tdesc_idx.
6359 (cmd_qtstart): Write ipa_tdesc_idx in the target.
6360 (ipa_tdesc): Remove.
6361 (ipa_tdesc_idx): New variable.
6362 (get_context_regcache): Use get_ipa_tdesc.
6363 (gdb_collect): Ditto.
6364 (gdb_probe): Ditto.
6365 * tracepoint.h (get_ipa_tdesc): New prototype.
6366 (ipa_tdesc): Remove.
6367
6368 2016-02-24 Pedro Alves <palves@redhat.com>
6369
6370 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
6371 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
6372 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
6373 Factor out common code between the USE_SIGTRAP_SIGINFO and
6374 !USE_SIGTRAP_SIGINFO blocks.
6375 (linux_low_filter_event): Call save_stop_reason instead of
6376 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
6377 Update comments.
6378 (linux_wait_1): Update comments.
6379
6380 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
6381
6382 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
6383 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
6384 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
6385 ppc_insert_point, ppc_remove_point.
6386
6387 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
6388
6389 * linux-s390-low.c (s390_supports_z_point_type): New function.
6390 (struct linux_target_ops): Wire s390_supports_z_point_type in.
6391
6392 2016-02-16 Yao Qi <yao.qi@linaro.org>
6393
6394 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
6395 PC. Get pc from regcache_read_pc.
6396
6397 2016-02-12 Yao Qi <yao.qi@linaro.org>
6398
6399 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
6400 or linux_get_pc_32bit.
6401 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
6402
6403 2016-02-12 Yao Qi <yao.qi@linaro.org>
6404
6405 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
6406 arm_linux_get_next_pcs_fixup.
6407
6408 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
6409
6410 * tracepoint.c (x_tracepoint_action_download): Change
6411 write_inferior_data_ptr to write_inferior_data_pointer.
6412 (cmd_qtstart): Likewise.
6413 (write_inferior_data_ptr): Remove.
6414 (download_agent_expr): Change write_inferior_data_ptr to
6415 write_inferior_data_pointer.
6416 (download_tracepoint_1): Likewise.
6417 (download_tracepoint): Likewise.
6418 (download_trace_state_variables): Likewise.
6419
6420 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
6421 Marcin Kościelnicki <koriakin@0x04.net>
6422
6423 * tracepoint.c (struct tracepoint_action_ops): Remove.
6424 (struct tracepoint_action): Remove ops.
6425 (m_tracepoint_action_download, r_tracepoint_action_download)
6426 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
6427 size and offset accordingly.
6428 (m_tracepoint_action_ops, r_tracepoint_action_ops)
6429 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
6430 (tracepoint_action_send, tracepoint_action_download): New functions.
6431 Helpers for trace action handlers.
6432 (add_tracepoint_action): Remove setup actions ops.
6433 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
6434
6435 2016-02-10 Yao Qi <yao.qi@linaro.org>
6436
6437 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
6438
6439 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
6440
6441 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
6442 to AC_OUTPUT.
6443 * configure: Regenerate.
6444
6445 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
6446
6447 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
6448 void * to gdb_byte *.
6449 * linux-low.c (siginfo_fixup): Likewise.
6450 (linux_xfer_siginfo): Likewise.
6451 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
6452 Likewise.
6453 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6454
6455 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
6456
6457 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
6458 to srv_tgtobj.
6459 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
6460 to srv_tgtobj.
6461 * linux-x86-low.c [__x86_64__]: Include
6462 "nat/amd64-linux-siginfo.h".
6463 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
6464 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
6465 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
6466 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
6467 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
6468 (cpt_si_fd, si_timerid, si_overrun): Move from
6469 nat/amd64-linux-siginfo.c.
6470 * Makefile.in (amd64-linux-siginfo.o:): New rule.
6471
6472 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
6473
6474 * server.c (skip_to_semicolon): Remove.
6475 (process_point_options): Use strchrnul instead of
6476 skip_to_semicolon.
6477
6478 2016-01-26 Yao Qi <yao.qi@linaro.org>
6479
6480 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
6481 * linux-low.c (install_software_single_step_breakpoints): Don't
6482 call regcache_read_pc.
6483 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
6484 argument pc.
6485
6486 2016-01-26 Yao Qi <yao.qi@linaro.org>
6487
6488 * linux-low.c (install_software_single_step_breakpoints): Call
6489 regcache_read_pc instead of get_pc.
6490
6491 2016-01-26 Yao Qi <yao.qi@linaro.org>
6492
6493 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
6494 (unblock_async_io): Rename to ...
6495 (block_unblock_async_io): ... it. New function.
6496 (enable_async_io): Don't install SIGIO handler. Unblock it
6497 instead.
6498 (disable_async_io): Don't ignore SIGIO. Block it instead.
6499 (initialize_async_io): Install SIGIO handler. Don't call
6500 unblock_async_io.
6501
6502 2016-01-26 Yao Qi <yao.qi@linaro.org>
6503
6504 * remote-utils.c (getpkt): If the buffer isn't empty, and the
6505 first character is '\003', call *the_target->request_interrupt.
6506
6507 2016-01-25 Yao Qi <yao.qi@linaro.org>
6508
6509 * remote-utils.c (new_thread_notify): Remove.
6510 (dead_thread_notify): Likewise.
6511 * remote-utils.h (new_thread_notify): Remove declaration.
6512 (dead_thread_notify): Likewise.
6513
6514 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
6515
6516 * gdb.trace/pending.exp: Fix expected message on continue.
6517
6518 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
6519
6520 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
6521 it works properly on big-endian machines where sizeof (CORE_ADDR)
6522 != sizeof (void *).
6523
6524 2016-01-21 Pedro Alves <palves@redhat.com>
6525
6526 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
6527 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
6528 * configure: Regenerate.
6529
6530 2016-01-21 Yao Qi <yao.qi@linaro.org>
6531
6532 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
6533 is_thumb and set it according to CPSR saved on the stack.
6534 (get_next_pcs_syscall_next_pc): Pass is_thumb to
6535 arm_sigreturn_next_pc.
6536
6537 2016-01-18 Yao Qi <yao.qi@linaro.org>
6538
6539 * linux-low.c (linux_set_pc_64bit): New function.
6540 (linux_get_pc_64bit): New function.
6541 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
6542 Declare.
6543 * linux-sparc-low.c (debug_threads): Remove declaration.
6544 (sparc_get_pc): Remove.
6545 (the_low_target): Use linux_get_pc_64bit instead of
6546 sparc_get_pc.
6547 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
6548 (the_low_target): Use linux_get_pc_64bit and
6549 linux_set_pc_64bit.
6550
6551 2016-01-18 Yao Qi <yao.qi@linaro.org>
6552
6553 * linux-arm-low.c (debug_threads): Remove declaration.
6554 (arm_get_pc, arm_set_pc): Remove.
6555 (the_low_target): Use linux_get_pc_32bit and
6556 linux_set_pc_32bit.
6557 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
6558 (the_low_target): Use linux_get_pc_32bit and
6559 linux_set_pc_32bit.
6560 * linux-cris-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-crisv32-low.c (debug_threads): Remove declaration.
6565 (cris_get_pc, cris_set_pc): Remove.
6566 (the_low_target): Use linux_get_pc_32bit and
6567 linux_set_pc_32bit.
6568 * linux-low.c: Include inttypes.h.
6569 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
6570 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
6571 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
6572 (the_low_target): Use linux_get_pc_32bit and
6573 linux_set_pc_32bit.
6574 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
6575 (the_low_target): Use linux_get_pc_32bit and
6576 linux_set_pc_32bit.
6577 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
6578 (the_low_target): Use linux_get_pc_32bit and
6579 linux_set_pc_32bit.
6580 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
6581 (the_low_target): Use linux_get_pc_32bit and
6582 linux_set_pc_32bit.
6583 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
6584 (the_low_target): Use linux_get_pc_32bit and
6585 linux_set_pc_32bit.
6586
6587 2016-01-18 Gary Benson <gbenson@redhat.com>
6588
6589 * configure.ac (AC_FUNC_FORK): New check.
6590 * config.in: Regenerate.
6591 * configure: Likewise.
6592
6593 2016-01-14 Yao Qi <yao.qi@linaro.org>
6594
6595 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
6596 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
6597 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
6598 arm_get_next_pcs_ctor.
6599
6600 2016-01-12 Josh Stone <jistone@redhat.com>
6601 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6602
6603 * inferiors.h: Include "gdb_vecs.h".
6604 (struct process_info): Add syscalls_to_catch.
6605 * inferiors.c (remove_process): Free syscalls_to_catch.
6606 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
6607 syscall_return stops.
6608 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
6609 * server.c (handle_general_set): Handle QCatchSyscalls.
6610 (handle_query): Report support for QCatchSyscalls.
6611 * target.h (struct target_ops): Add supports_catch_syscall.
6612 (target_supports_catch_syscall): New macro.
6613 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
6614 (struct lwp_info): Add syscall_state.
6615 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
6616 Maintain syscall_state and syscalls_to_catch across exec.
6617 (get_syscall_trapinfo): New function, proxy to the_low_target.
6618 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
6619 (linux_low_filter_event): Toggle syscall_state entry/return for
6620 syscall traps, and set it ignored for all others.
6621 (gdb_catching_syscalls_p): New function.
6622 (gdb_catch_this_syscall_p): New function.
6623 (linux_wait_1): Handle SYSCALL_SIGTRAP.
6624 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
6625 (linux_supports_catch_syscall): New function.
6626 (linux_target_ops): Install it.
6627 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
6628 (the_low_target): Install it.
6629
6630 2016-01-12 Mike Frysinger <vapier@gentoo.org>
6631
6632 * acinclude.m4: Include new ../warning.m4 file.
6633 * configure: Regenerated.
6634 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
6635
6636 2016-01-12 Mike Frysinger <vapier@gentoo.org>
6637
6638 * ax.c (is_goto_target): Mark static.
6639 * linux-low.c (register_addr): Likewise.
6640 (linux_fetch_registers, linux_store_registers): Likewise.
6641 * mem-break.c (any_persistent_commands): Fix old prototype.
6642 (add_commands_to_breakpoint): Mark static.
6643 * regcache.c (find_register_by_name): Delete unused func.
6644 * remote-utils.c (hex_or_minus_one): Mark static.
6645 * server.c (monitor_show_help): Mark static.
6646 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
6647 handle_v_requests): Likewise.
6648
6649 2016-01-12 Pedro Alves <palves@redhat.com>
6650
6651 Remove use of the registered trademark symbol throughout.
6652
6653 2016-01-08 Yao Qi <yao.qi@linaro.org>
6654
6655 * remote-utils.c (getpkt): If c is '\003', call target hook
6656 request_interrupt.
6657
6658 2016-01-06 Yao Qi <yao.qi@linaro.org>
6659
6660 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
6661 linux-aarch32-low.c.
6662 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6663 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6664 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6665 (thumb2_breakpoint): Declare.
6666 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
6667 linux-aarch32-low.h.
6668 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6669 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6670 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6671
6672 2016-01-01 Joel Brobecker <brobecker@adacore.com>
6673
6674 * gdbreplay.c (gdbreplay_version): Change copyright year in
6675 version message.
6676 * server.c (gdbserver_version): Likewise.
6677
6678 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
6679
6680 * server.c (crc32_table): Delete.
6681 (crc32): Use libiberty's xcrc32 function.
6682
6683 2015-12-22 Joel Brobecker <brobecker@adacore.com>
6684
6685 * lynx-low.c (lynx_delete_thread_callback): New function.
6686 (lynx_mourn): Properly delete our process and all of its
6687 threads. Remove call to clear_inferiors.
6688
6689 2015-12-22 Joel Brobecker <brobecker@adacore.com>
6690
6691 * target.c (thread_search_callback): Add check that
6692 the thread_stopped target callback is not NULL before
6693 calling it.
6694
6695 2015-12-21 Yao Qi <yao.qi@linaro.org>
6696
6697 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
6698 arm breakpoint.
6699
6700 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6701
6702 * server.c (handle_query): Call target_supports_software_single_step.
6703
6704 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6705
6706 * linux-low.c (single_step): New function.
6707 (linux_resume_one_lwp_throw): Call single_step.
6708 (start_step_over): Likewise.
6709
6710 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6711
6712 * Makefile.in (SFILES): Append arch/arm-linux.c,
6713 arch/arm-get-next-pcs.c.
6714 (arm-linux.o): New rule.
6715 (arm-get-next-pcs.o): New rule.
6716 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
6717 arm-linux.o.
6718 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
6719 to linux-aarch32-low.c.
6720 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6721 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6722 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6723 (thumb2_breakpoint_len): Likewise.
6724 (arm_is_thumb_mode): Make non-static.
6725 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
6726 from linux-aarch32-low.c.
6727 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6728 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6729 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6730 (thumb2_breakpoint_len): Likewise.
6731 (arm_is_thumb_mode): New declaration.
6732 * linux-arm-low.c: Include arch/arm-linux.h
6733 aarch/arm-get-next-pcs.h, sys/syscall.h.
6734 (get_next_pcs_ops): New struct.
6735 (get_next_pcs_addr_bits_remove): New function.
6736 (get_next_pcs_is_thumb): New function.
6737 (get_next_pcs_read_memory_unsigned_integer): Likewise.
6738 (arm_sigreturn_next_pc): Likewise.
6739 (get_next_pcs_syscall_next_pc): Likewise.
6740 (arm_gdbserver_get_next_pcs): Likewise.
6741 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
6742 Initialize.
6743 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
6744 * server.h: Include gdb_vecs.h.
6745
6746 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6747
6748 * Makefile.in (SFILES): Append common/common-regcache.c.
6749 (OBS): Append common-regcache.o.
6750 (common-regcache.o): New rule.
6751 * regcache.c (init_register_cache): Initialize cache to
6752 REG_UNAVAILABLE.
6753 (regcache_raw_read_unsigned): New function.
6754 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
6755 register_status enum.
6756
6757 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6758
6759 * linux-aarch64-low.c (the_low_targets): Rename
6760 breakpoint_reinsert_addr to get_next_pcs.
6761 * linux-arm-low.c (the_low_targets): Likewise.
6762 * linux-bfin-low.c (the_low_targets): Likewise.
6763 * linux-cris-low.c (the_low_targets): Likewise.
6764 * linux-crisv32-low.c (the_low_targets): Likewise.
6765 * linux-low.c (can_software_single_step): Likewise.
6766 (install_software_single_step_breakpoints): New function.
6767 (start_step_over): Use install_software_single_step_breakpoints.
6768 * linux-low.h: New CORE_ADDR vector.
6769 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
6770 get_next_pcs.
6771 * linux-mips-low.c (the_low_targets): Likewise.
6772 * linux-nios2-low.c (the_low_targets): Likewise.
6773 * linux-sparc-low.c (the_low_targets): Likewise.
6774
6775 2015-12-17 Pedro Alves <palves@redhat.com>
6776
6777 * linux-low.c (linux_kill_one_lwp): Remove references to
6778 LinuxThreads.
6779 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
6780 to 'kill'.
6781 (linux_init_signals): Delete.
6782 (initialize_low): Adjust.
6783 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
6784
6785 2015-12-16 Pedro Alves <palves@redhat.com>
6786
6787 * configure.ac (compiler warning flags): When testing a
6788 -Wno-foo option, check whether -Wfoo works instead.
6789 * configure: Regenerate.
6790
6791 2015-12-11 Don Breazeal <donb@codesourcery.com>
6792
6793 * server.c (process_serial_event): Don't exit from gdbserver
6794 in remote mode if there are still active inferiors.
6795
6796 2015-12-11 Yao Qi <yao.qi@linaro.org>
6797
6798 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
6799 arm_breakpoint_at if the process is 32-bit.
6800
6801 2015-12-11 Yao Qi <yao.qi@linaro.org>
6802
6803 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
6804 arm breakpoint.
6805
6806 2015-12-07 Yao Qi <yao.qi@linaro.org>
6807
6808 * configure.srv: Append arm.o to srv_tgtobj for
6809 aarch64*-*-linux* target.
6810 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
6811 from linux-arm-low.c.
6812 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6813 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6814 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6815 (thumb2_breakpoint_len): Likewise.
6816 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
6817 (arm_breakpoint_kinds): Likewise.
6818 (arm_breakpoint_kind_from_pc): Likewise.
6819 (arm_sw_breakpoint_from_kind): Likewise.
6820 (arm_breakpoint_kind_from_current_state): Likewise.
6821 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
6822 (arm_sw_breakpoint_from_kind): Declare.
6823 (arm_breakpoint_kind_from_current_state): Declare.
6824 (arm_breakpoint_at): Declare.
6825 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
6826 arm_sw_breakpoint_from_kind if process is 32-bit.
6827 (aarch64_breakpoint_kind_from_pc): New function.
6828 (aarch64_breakpoint_kind_from_current_state): New function.
6829 (the_low_target): Initialize fields breakpoint_kind_from_pc
6830 and breakpoint_kind_from_current_state.
6831 * linux-arm-low.c (arm_breakpoint_kinds): Move to
6832 linux-aarch32-low.c.
6833 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
6834 (arm_breakpoint, arm_breakpoint_len): Likewise.
6835 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
6836 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6837 (arm_is_thumb_mode): Likewise.
6838 (arm_breakpoint_at): Likewise.
6839 (arm_breakpoint_kind_from_pc): Likewise.
6840 (arm_sw_breakpoint_from_kind): Likewise.
6841 (arm_breakpoint_kind_from_current_state): Likewise.
6842
6843 Revert:
6844 2015-08-04 Yao Qi <yao.qi@linaro.org>
6845
6846 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6847 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6848 * server.c (extended_protocol): Remove "static".
6849 * server.h (extended_protocol): Declare it.
6850
6851 2015-12-04 Josh Stone <jistone@redhat.com>
6852
6853 * target.h (struct target_ops) <arch_setup>: Rename to ...
6854 (struct target_ops) <post_create_inferior>: ... this.
6855 (target_arch_setup): Rename to ...
6856 (target_post_create_inferior): ... this, calling post_create_inferior.
6857 * server.c (start_inferior): Update target_arch_setup calls to
6858 target_post_create_inferior.
6859 * linux-low.c (linux_low_ptrace_options): Forward declare.
6860 (linux_arch_setup): Update its comment for general use.
6861 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
6862 (struct linux_target_ops): Use linux_post_create_inferior.
6863 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
6864 to post_create_inferior.
6865 * nto-low.c (struct nto_target_ops): Likewise.
6866 * spu-low.c (struct spu_target_ops): Likewise.
6867 * win32-low.c (struct win32_target_ops): Likewise.
6868
6869 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
6870
6871 * linux-arm-low.c: Remove duplicate arch/arm.h include.
6872
6873 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6874
6875 * linux-arm-low.c (arm_reinsert_addr): Remove function.
6876 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
6877 * linux-cris-low.c (cris_reinsert_addr> Remove function.
6878 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6879 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
6880 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6881 * linux-mips-low.c (mips_reinsert_addr): Remove function.
6882 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6883 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
6884 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6885 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
6886 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6887
6888 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6889
6890 * linux-low.c (linux_look_up_symbols): Don't call
6891 linux_supports_traceclone.
6892 * linux-low.h (thread_db_init): Remove use_events argument.
6893 * thread-db.c (thread_db_use_event): Remove global variable.
6894 (struct thread_db) <td_thr_event_enable_p>: Remove field.
6895 (struct thread_db) <td_create_bp>: Remove field.
6896 (thread_db_create_event): Remove function.
6897 (thread_db_enable_reporting): Likewise.
6898 (find_one_thread): Don't check for thread_db_use_events.
6899 (attach_thread): Likewise.
6900 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
6901 (try_thread_db_load_1): Don't check for thread_db_use_events.
6902 (thread_db_init): Remove use_events argument and thread events
6903 handling.
6904 (remove_thread_event_breakpoints): Remove function.
6905 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
6906
6907 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6908
6909 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
6910 New function.
6911 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6912 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
6913 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6914 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
6915 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
6916 Initialize.
6917 * linux-crisv32-low.c (cris_supports_hardware_single_step):
6918 New function.
6919 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6920 * linux-low.c (can_hardware_single_step): Use
6921 supports_hardware_single_step.
6922 (can_software_single_step): New function.
6923 (start_step_over): Call can_software_single_step.
6924 (linux_supports_hardware_single_step): New function.
6925 (struct target_ops) <supports_software_single_step>: Initialize.
6926 * linux-low.h (struct linux_target_ops)
6927 <supports_hardware_single_step>: Initialize.
6928 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
6929 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6930 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
6931 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
6932 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
6933 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6934 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
6935 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6936 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
6937 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
6938 Initialize.
6939 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
6940 (struct linux_target_ops) <tile_supports_hardware_single_step>:
6941 Initialize.
6942 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
6943 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6944 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
6945 New function.
6946 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6947 * target.h (struct target_ops): <supports_software_single_step>:
6948 New field.
6949 (target_supports_software_single_step): New macro.
6950
6951 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6952
6953 * linux-low.c (linux_wait_1): Fix pc advance condition.
6954 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
6955 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
6956
6957 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6958
6959 * linux-arm-low.c (arm_is_thumb_mode): New function.
6960 (arm_breakpoint_at): Use arm_is_thumb_mode.
6961 (arm_breakpoint_kind_from_current_state): New function.
6962 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
6963 Initialize.
6964 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
6965 (linux_breakpoint_kind_from_current_state): New function.
6966 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
6967 * linux-low.h (struct linux_target_ops)
6968 <breakpoint_kind_from_current_state>: New field.
6969 * target.h (struct target_ops): Likewise.
6970 (target_breakpoint_kind_from_current_state): New macro.
6971
6972 2015-11-30 Pedro Alves <palves@redhat.com>
6973
6974 * linux-low.c (linux_resume): Wake up the event loop before
6975 returning.
6976
6977 2015-11-30 Pedro Alves <palves@redhat.com>
6978
6979 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
6980 check.
6981 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
6982 to -1.
6983 * target.c (struct thread_search): New structure.
6984 (thread_search_callback): New function.
6985 (prev_general_thread): New global.
6986 (prepare_to_access_memory, done_accessing_memory): New functions.
6987 * target.h (prepare_to_access_memory, done_accessing_memory):
6988 Replace macros with function declarations.
6989
6990 2015-11-30 Pedro Alves <palves@redhat.com>
6991
6992 PR 14618
6993 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
6994 report TARGET_WAITKIND_NO_RESUMED.
6995 * remote-utils.c (prepare_resume_reply): Handle
6996 TARGET_WAITKIND_NO_RESUMED.
6997 * server.c (report_no_resumed): New global.
6998 (handle_query) <qSupported>: Handle "no-resumed+". Report
6999 "no-resumed+" support.
7000 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
7001 return error if the client doesn't support no-resumed events.
7002 (push_stop_notification): New function.
7003 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
7004 events if the client supports them.
7005
7006 2015-11-30 Pedro Alves <palves@redhat.com>
7007
7008 * linux-low.c (thread_still_has_status_pending_p): Don't check
7009 vCont;t here.
7010 (lwp_resumed): New function.
7011 (status_pending_p_callback): Return early if the LWP is not
7012 supposed to be resumed.
7013
7014 2015-11-30 Pedro Alves <palves@redhat.com>
7015
7016 * linux-low.c (handle_extended_wait): Assert that the LWP's
7017 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
7018 thread create events, leave the new child's status pending.
7019 (linux_low_filter_event): If GDB wants to hear about thread exit
7020 events, leave the LWP marked dead and don't delete it.
7021 (linux_wait_for_event_filtered): Don't check for thread exit.
7022 (filter_exit_event): New function.
7023 (linux_wait_1): Use it, when returning an exit event.
7024 (linux_resume_one_lwp_throw): Assert that the LWP's
7025 waitstatus is TARGET_WAITKIND_IGNORE.
7026 * remote-utils.c (prepare_resume_reply): Handle
7027 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
7028 * server.c (report_thread_events): New global.
7029 (handle_general_set): Handle QThreadEvents.
7030 (handle_query) <qSupported>: Handle and report QThreadEvents+;
7031 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
7032 TARGET_WAITKIND_THREAD_EXITED.
7033 * server.h (report_thread_events): Declare.
7034
7035 2015-11-30 Pedro Alves <palves@redhat.com>
7036
7037 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
7038 the thread's last_resume_kind was resume_stop.
7039
7040 2015-11-30 Pedro Alves <palves@redhat.com>
7041
7042 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
7043 before returning.
7044
7045 2015-11-30 Pedro Alves <palves@redhat.com>
7046
7047 * server.c (handle_v_requests): Handle vCtrlC.
7048
7049 2015-11-30 Pedro Alves <palves@redhat.com>
7050
7051 * gdbthread.h (find_any_thread_of_pid): Declare.
7052 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
7053 functions.
7054 * server.c (handle_query): If current_thread is NULL, look for
7055 another thread of the selected process.
7056
7057 2015-11-26 Daniel Colascione <dancol@dancol.org>
7058 Simon Marchi <simon.marchi@ericsson.com>
7059
7060 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
7061 * server.c (handle_qxfer_threads_worker): Refactor to include thread
7062 name in reply.
7063 * target.h (struct target_ops) <thread_name>: New field.
7064 (target_thread_name): New macro.
7065
7066 2015-11-23 Joel Brobecker <brobecker@adacore.com>
7067
7068 * regcache.h (regcache_invalidate_pid): Add declaration.
7069 * regcache.c (regcache_invalidate_pid): New function, extracted
7070 from regcache_invalidate.
7071 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
7072 Add trivial documentation comment.
7073 * lynx-low.c: Use regcache_invalidate_pid instead of
7074 regcache_invalidate.
7075
7076 2015-11-23 Joel Brobecker <brobecker@adacore.com>
7077
7078 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
7079 and Elf64_auxv_t if the target is Android.
7080
7081 2015-11-22 Doug Evans <xdje42@gmail.com>
7082
7083 * target.h: #include <sys/types.h>.
7084
7085 2015-11-19 Pedro Alves <palves@redhat.com>
7086
7087 * linux-low.c (linux_process_qsupported): Change prototype.
7088 Adjust.
7089 * linux-low.h (struct linux_target_ops) <process_qsupported>:
7090 Change prototype.
7091 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
7092 and adjust to loop over all features.
7093 * server.c (handle_query) <qSupported>: Adjust to call
7094 target_process_qsupported once, passing it a vector of unprocessed
7095 features.
7096 * target.h (struct target_ops) <process_qsupported>: Change
7097 prototype.
7098 (target_process_qsupported): Adjust.
7099
7100 2015-11-19 Pedro Alves <palves@redhat.com>
7101
7102 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
7103 mode.
7104 * configure: Regenerate.
7105
7106 2015-11-19 Pedro Alves <palves@redhat.com>
7107
7108 * configure: Regenerate.
7109
7110 2015-11-19 Yao Qi <yao.qi@linaro.org>
7111
7112 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
7113 type to uint32_t.
7114
7115 2015-11-19 Yao Qi <yao.qi@linaro.org>
7116
7117 * linux-aarch64-low.c (enum aarch64_operand_type): New.
7118 (struct aarch64_operand): Move enum out.
7119
7120 2015-11-19 Yao Qi <yao.qi@linaro.org>
7121
7122 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
7123 struct user_fpsimd_state *.
7124 (aarch64_store_fpregset): Likewise.
7125
7126 2015-11-19 Yao Qi <yao.qi@linaro.org>
7127
7128 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
7129 struct user_pt_regs *.
7130 (aarch64_store_gregset): Likewise.
7131
7132 2015-11-18 Pedro Alves <palves@redhat.com>
7133
7134 * Makefile.in (all_object_files): Add $IPA_OBJS.
7135
7136 2015-11-17 Pedro Alves <palves@redhat.com>
7137
7138 * win32-low.c (win32_resume): Use gdb_signal_from_host,
7139 GDB_SIGNAL_0 and gdb_signal_to_string.
7140
7141 2015-11-17 Pedro Alves <palves@redhat.com>
7142
7143 * win32-low.c (handle_output_debug_string): Remove parameter.
7144 (win32_kill): Remove our_status local and adjust call to
7145 handle_output_debug_string.
7146 (get_child_debug_event): Adjust call to
7147 handle_output_debug_string.
7148
7149 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7150
7151 * linux-mips-low.c (mips_fill_gregset): Add cast.
7152 (mips_store_gregset): Likewise.
7153 (mips_fill_fpregset): Likewise.
7154 (mips_store_fpregset): Likewise.
7155
7156 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7157
7158 * linux-mips-low.c (mips_add_watchpoint): Rename private to
7159 priv.
7160
7161 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7162
7163 * linux-mips-low.c (mips_linux_new_thread): Change type of
7164 watch_type to enum target_hw_bp_type.
7165
7166 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7167
7168 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
7169 Change return type to arm_hwbp_type.
7170
7171 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7172
7173 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
7174 (arm_store_gregset): Likewise.
7175 * linux-arm-low.c (arm_get_hwcap): Likewise.
7176 (arm_read_description): Likewise.
7177
7178 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7179
7180 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
7181
7182 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7183
7184 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
7185 (ppc_fill_vsxregset): Likewise.
7186 (ppc_store_vsxregset): Likewise.
7187 (ppc_fill_vrregset): Likewise.
7188 (ppc_store_vrregset): Likewise.
7189 (ppc_fill_evrregset): Likewise.
7190 (ppc_store_evrregset): Likewise.
7191
7192 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7193
7194 * linux-ppc-low.c (ppc_usrregs_info): Remove
7195 forward-declaration.
7196 (ppc_arch_setup): Move lower in file.
7197
7198 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
7199
7200 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
7201 (ps_pdwrite): Likewise.
7202
7203 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
7204
7205 * linux-arm-low.c (arm_new_thread): Move pointer dereference
7206 to after assert checks.
7207
7208 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
7209
7210 * proc-service.c (ps_pdread): Add/adjust casts.
7211 (ps_pdwrite): Add/adjust casts.
7212
7213 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
7214
7215 * server.c (handle_search_memory_1): Cast return value of
7216 memmem.
7217
7218 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
7219
7220 * server.c (write_qxfer_response): Change type of data to
7221 gdb_byte *.
7222
7223 2015-10-29 Pedro Alves <palves@redhat.com>
7224
7225 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
7226
7227 2015-10-29 Pedro Alves <palves@redhat.com>
7228
7229 * tracepoint.c (clear_installed_tracepoints): Add casts.
7230
7231 2015-10-29 Pedro Alves <palves@redhat.com>
7232
7233 * server.c (handle_v_cont, process_serial_event): Add enum
7234 gdb_signal casts to signal parsing code.
7235
7236 2015-10-29 Pedro Alves <palves@redhat.com>
7237
7238 * linux-low.h (NULL_REGSET): Define.
7239 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
7240 * linux-arm-low.c (arm_regsets): Likewise.
7241 * linux-crisv32-low.c (cris_regsets): Likewise.
7242 * linux-m68k-low.c (m68k_regsets): Likewise.
7243 * linux-mips-low.c (mips_regsets): Likewise.
7244 * linux-nios2-low.c (nios2_regsets): Likewise.
7245 * linux-ppc-low.c (ppc_regsets): Likewise.
7246 * linux-s390-low.c (s390_regsets): Likewise.
7247 * linux-sh-low.c (sh_regsets): Likewise.
7248 * linux-sparc-low.c (sparc_regsets): Likewise.
7249 * linux-tic6x-low.c (tic6x_regsets): Likewise.
7250 * linux-tile-low.c (tile_regsets): Likewise.
7251 * linux-x86-low.c (x86_regsets): Likewise.
7252 * linux-xtensa-low.c (xtensa_regsets): Likewise.
7253
7254 2015-10-29 Pedro Alves <palves@redhat.com>
7255
7256 * linux-low.h (NULL_REGSET): Define.
7257 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
7258 * linux-arm-low.c (arm_regsets): Likewise.
7259 * linux-crisv32-low.c (cris_regsets): Likewise.
7260 * linux-m68k-low.c (m68k_regsets): Likewise.
7261 * linux-mips-low.c (mips_regsets): Likewise.
7262 * linux-nios2-low.c (nios2_regsets): Likewise.
7263 * linux-ppc-low.c (ppc_regsets): Likewise.
7264 * linux-s390-low.c (s390_regsets): Likewise.
7265 * linux-sh-low.c (sh_regsets): Likewise.
7266 * linux-sparc-low.c (sparc_regsets): Likewise.
7267 * linux-tic6x-low.c (tic6x_regsets): Likewise.
7268 * linux-tile-low.c (tile_regsets): Likewise.
7269 * linux-x86-low.c (x86_regsets): Likewise.
7270 * linux-xtensa-low.c (xtensa_regsets): Likewise.
7271
7272 2015-10-26 Doug Evans <dje@google.com>
7273
7274 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
7275
7276 2015-10-26 Doug Evans <dje@google.com>
7277
7278 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
7279
7280 2015-10-26 Doug Evans <dje@google.com>
7281
7282 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
7283 for debug_printf.
7284 (attach_thread, find_new_threads_callback): Ditto.
7285
7286 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
7287
7288 * mem-break.h (set_breakpoint_data): Remove.
7289
7290 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
7291
7292 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
7293 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
7294 (initialize_low): Remove set_breakpoint_data call.
7295 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
7296 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
7297 (initialize_low): Remove set_breakpoint_data call.
7298 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
7299 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
7300 (initialize_low): Remove set_breakpoint_data call.
7301
7302 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
7303
7304 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
7305 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
7306 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
7307 * target.h (target_breakpoint_kind_from_pc): New macro.
7308
7309 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
7310
7311 * linux-low.c (default_breakpoint_kind_from_pc): New function.
7312 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
7313 the default breakpoint kind.
7314
7315 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7316
7317 * linux-arm-low.c (arm_supports_z_point_type): Add software
7318 breakpoint support.
7319
7320 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7321
7322 * linux-arm-low.c: Refactor breakpoint definitions.
7323 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
7324 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
7325
7326 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7327
7328 * Makefile.in: Add arm.c/o.
7329 * configure.srv: Likewise.
7330 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
7331 (arm_breakpoint_kind_from_pc): New function.
7332 (arm_sw_breakpoint_from_kind): Return proper kind.
7333 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
7334
7335 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7336
7337 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
7338 removal.
7339 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
7340 (struct raw_breakpoint) <size>: Remove.
7341 (struct raw_breakpoint) <kind>: Add.
7342 (bp_size): New function.
7343 (bp_opcode): Likewise.
7344 (find_raw_breakpoint_at): Adjust for kind.
7345 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
7346 (remove_memory_breakpoint): Adjust for kind call bp_size.
7347 (set_raw_breakpoint_at): Adjust for kind.
7348 (set_breakpoint): Likewise.
7349 (set_breakpoint_at): Call breakpoint_kind_from_pc.
7350 (delete_raw_breakpoint): Adjust for kind.
7351 (delete_breakpoint): Likewise.
7352 (find_gdb_breakpoint): Likewise.
7353 (set_gdb_breakpoint_1): Likewise.
7354 (set_gdb_breakpoint): Likewise.
7355 (delete_gdb_breakpoint_1): Likewise.
7356 (delete_gdb_breakpoint): Likewise.
7357 (uninsert_raw_breakpoint): Likewise.
7358 (reinsert_raw_breakpoint): Likewise.
7359 (set_breakpoint_data): Remove.
7360 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
7361 (check_mem_read): Adjust for kind call bp_size.
7362 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
7363 (clone_one_breakpoint): Adjust for kind.
7364 * mem-break.h (set_gdb_breakpoint): Likewise.
7365 (delete_gdb_breakpoint): Likewise.
7366 * server.c (process_serial_event): Likewise.
7367
7368 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7369
7370 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
7371 (struct linux_target_ops) <breakpoint>: Remove.
7372 (struct linux_target_ops) <breakpoint_len>: Remove.
7373 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7374 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7375 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
7376 (arm_sw_breakpoint_from_kind): New function.
7377 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
7378 (struct linux_target_ops) <breakpoint>: Remove.
7379 (struct linux_target_ops) <breakpoint_len>: Remove.
7380 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7381 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7382 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
7383 (struct linux_target_ops) <breakpoint>: Remove.
7384 (struct linux_target_ops) <breakpoint_len>: Remove.
7385 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7386 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7387 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
7388 (struct linux_target_ops) <breakpoint>: Remove.
7389 (struct linux_target_ops) <breakpoint_len>: Remove.
7390 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7391 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7392 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
7393 and sw_breakpoint_from_kind to increment the pc.
7394 (linux_breakpoint_kind_from_pc): New function.
7395 (linux_sw_breakpoint_from_kind): New function.
7396 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
7397 (initialize_low): Call breakpoint_kind_from_pc and
7398 sw_breakpoint_from_kind to replace breakpoint_data/len.
7399 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
7400 New field.
7401 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
7402 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
7403 (struct linux_target_ops) <breakpoint>: Remove.
7404 (struct linux_target_ops) <breakpoint_len>: Remove.
7405 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7406 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7407 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
7408 (struct linux_target_ops) <breakpoint>: Remove.
7409 (struct linux_target_ops) <breakpoint_len>: Remove.
7410 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7411 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7412 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
7413 (struct linux_target_ops) <breakpoint>: Remove.
7414 (struct linux_target_ops) <breakpoint_len>: Remove.
7415 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7416 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7417 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
7418 (struct linux_target_ops) <breakpoint>: Remove.
7419 (struct linux_target_ops) <breakpoint_len>: Remove.
7420 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7421 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7422 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
7423 (struct linux_target_ops) <breakpoint>: Remove.
7424 (struct linux_target_ops) <breakpoint_len>: Remove.
7425 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7426 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7427 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
7428 (struct linux_target_ops) <breakpoint>: Remove.
7429 (struct linux_target_ops) <breakpoint_len>: Remove.
7430 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7431 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7432 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
7433 (struct linux_target_ops) <breakpoint>: Remove.
7434 (struct linux_target_ops) <breakpoint_len>: Remove.
7435 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7436 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7437 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
7438 (struct linux_target_ops) <breakpoint>: Remove.
7439 (struct linux_target_ops) <breakpoint_len>: Remove.
7440 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7441 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7442 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
7443 (struct linux_target_ops) <breakpoint>: Remove.
7444 (struct linux_target_ops) <breakpoint_len>: Remove.
7445 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7446 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7447 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
7448 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
7449 (struct linux_target_ops) <breakpoint>: Remove.
7450 (struct linux_target_ops) <breakpoint_len>: Remove.
7451 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7452 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7453 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
7454 (struct linux_target_ops) <breakpoint>: Remove.
7455 (struct linux_target_ops) <breakpoint_len>: Remove.
7456 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7457 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7458
7459 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7460
7461 * linux-cris-low.c (cris_get_pc): Remove void arg.
7462
7463 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
7464
7465 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
7466 variable name.
7467
7468 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
7469
7470 * inferiors.c (thread_pid_matches_callback): New function.
7471 (find_thread_process): New function.
7472 (remove_thread): Reset current_thread.
7473 (remove_process): Assert threads have been removed first.
7474
7475 2015-10-15 Yao Qi <yao.qi@linaro.org>
7476
7477 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
7478 if it is 3.
7479 (aarch64_remove_point): Likewise.
7480 * regcache.c (regcache_register_size): New function.
7481
7482 2015-10-12 Yao Qi <yao.qi@linaro.org>
7483
7484 * linux-aarch64-low.c: Update all callers as emit_load_store
7485 is renamed to aarch64_emit_load_store.
7486
7487 2015-10-12 Yao Qi <yao.qi@linaro.org>
7488
7489 * linux-aarch64-low.c: Update all callers of function renaming
7490 from emit_insn to aarch64_emit_insn.
7491
7492 2015-10-12 Yao Qi <yao.qi@linaro.org>
7493
7494 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
7495 arch/aarch64-insn.h.
7496 (struct aarch64_memory_operand): Likewise.
7497 (ENCODE): Likewise.
7498 (emit_insn): Move to arch/aarch64-insn.c.
7499 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
7500 (emit_load_store): Move to arch/aarch64-insn.c.
7501 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
7502 (can_encode_int32): Remove.
7503
7504 2015-10-12 Yao Qi <yao.qi@linaro.org>
7505
7506 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
7507 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
7508 (aarch64_relocate_instruction): Likewise.
7509 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
7510 (struct aarch64_insn_visitor): Likewise.
7511
7512 2015-10-12 Yao Qi <yao.qi@linaro.org>
7513
7514 * linux-aarch64-low.c (struct aarch64_insn_data): New.
7515 (struct aarch64_insn_visitor): New.
7516 (struct aarch64_insn_relocation_data): New.
7517 (aarch64_ftrace_insn_reloc_b): New function.
7518 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
7519 (aarch64_ftrace_insn_reloc_cb): Likewise.
7520 (aarch64_ftrace_insn_reloc_tb): Likewise.
7521 (aarch64_ftrace_insn_reloc_adr): Likewise.
7522 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
7523 (aarch64_ftrace_insn_reloc_others): Likewise.
7524 (visitor): New.
7525 (aarch64_relocate_instruction): Use visitor.
7526
7527 2015-10-12 Yao Qi <yao.qi@linaro.org>
7528
7529 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
7530 int. Add argument buf.
7531 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
7532 aarch64_relocate_instruction.
7533
7534 2015-10-12 Yao Qi <yao.qi@linaro.org>
7535
7536 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
7537 argument insn. Remove local variable insn. Don't call
7538 target_read_uint32.
7539 (aarch64_install_fast_tracepoint_jump_pad): Call
7540 target_read_uint32.
7541
7542 2015-09-30 Yao Qi <yao.qi@linaro.org>
7543
7544 * linux-aarch64-low.c (emit_movk): Shorten a long line.
7545 (emit_load_store_pair): Likewise.
7546
7547 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
7548
7549 * dll.c (match_dll): Add cast(s).
7550 (unloaded_dll): Likewise.
7551 * linux-low.c (second_thread_of_pid_p): Likewise.
7552 (delete_lwp_callback): Likewise.
7553 (count_events_callback): Likewise.
7554 (select_event_lwp_callback): Likewise.
7555 (linux_set_resume_request): Likewise.
7556 * server.c (accumulate_file_name_length): Likewise.
7557 (emit_dll_description): Likewise.
7558 (handle_qxfer_threads_worker): Likewise.
7559 (visit_actioned_threads): Likewise.
7560 * thread-db.c (any_thread_of): Likewise.
7561 * tracepoint.c (same_process_p): Likewise.
7562 (match_blocktype): Likewise.
7563 (build_traceframe_info_xml): Likewise.
7564
7565 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
7566
7567 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
7568 assignment.
7569 (gdb_unparse_agent_expr): Likewise.
7570 * hostio.c (require_data): Likewise.
7571 (handle_pread): Likewise.
7572 * linux-low.c (disable_regset): Likewise.
7573 (fetch_register): Likewise.
7574 (store_register): Likewise.
7575 (get_dynamic): Likewise.
7576 (linux_qxfer_libraries_svr4): Likewise.
7577 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
7578 (set_fast_tracepoint_jump): Likewise.
7579 (uninsert_fast_tracepoint_jumps_at): Likewise.
7580 (reinsert_fast_tracepoint_jumps_at): Likewise.
7581 (validate_inserted_breakpoint): Likewise.
7582 (clone_agent_expr): Likewise.
7583 * regcache.c (init_register_cache): Likewise.
7584 * remote-utils.c (putpkt_binary_1): Likewise.
7585 (decode_M_packet): Likewise.
7586 (decode_X_packet): Likewise.
7587 (look_up_one_symbol): Likewise.
7588 (relocate_instruction): Likewise.
7589 (monitor_output): Likewise.
7590 * server.c (handle_search_memory): Likewise.
7591 (handle_qxfer_exec_file): Likewise.
7592 (handle_qxfer_libraries): Likewise.
7593 (handle_qxfer): Likewise.
7594 (handle_query): Likewise.
7595 (handle_v_cont): Likewise.
7596 (handle_v_run): Likewise.
7597 (captured_main): Likewise.
7598 * target.c (write_inferior_memory): Likewise.
7599 * thread-db.c (try_thread_db_load_from_dir): Likewise.
7600 * tracepoint.c (init_trace_buffer): Likewise.
7601 (add_tracepoint_action): Likewise.
7602 (add_traceframe): Likewise.
7603 (add_traceframe_block): Likewise.
7604 (cmd_qtdpsrc): Likewise.
7605 (cmd_qtdv): Likewise.
7606 (cmd_qtstatus): Likewise.
7607 (response_source): Likewise.
7608 (response_tsv): Likewise.
7609 (cmd_qtnotes): Likewise.
7610 (gdb_collect): Likewise.
7611 (initialize_tracepoint): Likewise.
7612
7613 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7614
7615 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
7616 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
7617 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
7618 <NOP>: New.
7619 (enum aarch64_condition_codes): New enum.
7620 (w0): New static global.
7621 (fp): Likewise.
7622 (lr): Likewise.
7623 (struct aarch64_memory_operand) <type>: New
7624 MEMORY_OPERAND_POSTINDEX type.
7625 (postindex_memory_operand): New helper function.
7626 (emit_ret): New function.
7627 (emit_load_store_pair): New function, factored out of emit_stp
7628 with support for MEMORY_OPERAND_POSTINDEX.
7629 (emit_stp): Rewrite using emit_load_store_pair.
7630 (emit_ldp): New function.
7631 (emit_load_store): Likewise.
7632 (emit_ldr): Mention post-index instruction in comment.
7633 (emit_ldrh): New function.
7634 (emit_ldrb): New function.
7635 (emit_ldrsw): Mention post-index instruction in comment.
7636 (emit_str): Likewise.
7637 (emit_subs): New function.
7638 (emit_cmp): Likewise.
7639 (emit_and): Likewise.
7640 (emit_orr): Likewise.
7641 (emit_orn): Likewise.
7642 (emit_eor): Likewise.
7643 (emit_mvn): Likewise.
7644 (emit_lslv): Likewise.
7645 (emit_lsrv): Likewise.
7646 (emit_asrv): Likewise.
7647 (emit_mul): Likewise.
7648 (emit_sbfm): Likewise.
7649 (emit_sbfx): Likewise.
7650 (emit_ubfm): Likewise.
7651 (emit_ubfx): Likewise.
7652 (emit_csinc): Likewise.
7653 (emit_cset): Likewise.
7654 (emit_nop): Likewise.
7655 (emit_ops_insns): New helper function.
7656 (emit_pop): Likewise.
7657 (emit_push): Likewise.
7658 (aarch64_emit_prologue): New function.
7659 (aarch64_emit_epilogue): Likewise.
7660 (aarch64_emit_add): Likewise.
7661 (aarch64_emit_sub): Likewise.
7662 (aarch64_emit_mul): Likewise.
7663 (aarch64_emit_lsh): Likewise.
7664 (aarch64_emit_rsh_signed): Likewise.
7665 (aarch64_emit_rsh_unsigned): Likewise.
7666 (aarch64_emit_ext): Likewise.
7667 (aarch64_emit_log_not): Likewise.
7668 (aarch64_emit_bit_and): Likewise.
7669 (aarch64_emit_bit_or): Likewise.
7670 (aarch64_emit_bit_xor): Likewise.
7671 (aarch64_emit_bit_not): Likewise.
7672 (aarch64_emit_equal): Likewise.
7673 (aarch64_emit_less_signed): Likewise.
7674 (aarch64_emit_less_unsigned): Likewise.
7675 (aarch64_emit_ref): Likewise.
7676 (aarch64_emit_if_goto): Likewise.
7677 (aarch64_emit_goto): Likewise.
7678 (aarch64_write_goto_address): Likewise.
7679 (aarch64_emit_const): Likewise.
7680 (aarch64_emit_call): Likewise.
7681 (aarch64_emit_reg): Likewise.
7682 (aarch64_emit_pop): Likewise.
7683 (aarch64_emit_stack_flush): Likewise.
7684 (aarch64_emit_zero_ext): Likewise.
7685 (aarch64_emit_swap): Likewise.
7686 (aarch64_emit_stack_adjust): Likewise.
7687 (aarch64_emit_int_call_1): Likewise.
7688 (aarch64_emit_void_call_2): Likewise.
7689 (aarch64_emit_eq_goto): Likewise.
7690 (aarch64_emit_ne_goto): Likewise.
7691 (aarch64_emit_lt_goto): Likewise.
7692 (aarch64_emit_le_goto): Likewise.
7693 (aarch64_emit_gt_goto): Likewise.
7694 (aarch64_emit_ge_got): Likewise.
7695 (aarch64_emit_ops_impl): New static global variable.
7696 (aarch64_emit_ops): New target function, return
7697 &aarch64_emit_ops_impl.
7698 (struct linux_target_ops): Install it.
7699
7700 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7701
7702 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
7703 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
7704 aarch64-ipa.o.
7705 * linux-aarch64-ipa.c: New file.
7706 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
7707 and endian.h.
7708 (aarch64_get_thread_area): New target method.
7709 (extract_signed_bitfield): New helper function.
7710 (aarch64_decode_ldr_literal): New function.
7711 (enum aarch64_opcodes): New enum.
7712 (struct aarch64_register): New struct.
7713 (struct aarch64_operand): New struct.
7714 (x0): New static global.
7715 (x1): Likewise.
7716 (x2): Likewise.
7717 (x3): Likewise.
7718 (x4): Likewise.
7719 (w2): Likewise.
7720 (ip0): Likewise.
7721 (sp): Likewise.
7722 (xzr): Likewise.
7723 (aarch64_register): New helper function.
7724 (register_operand): Likewise.
7725 (immediate_operand): Likewise.
7726 (struct aarch64_memory_operand): New struct.
7727 (offset_memory_operand): New helper function.
7728 (preindex_memory_operand): Likewise.
7729 (enum aarch64_system_control_registers): New enum.
7730 (ENCODE): New macro.
7731 (emit_insn): New helper function.
7732 (emit_b): New function.
7733 (emit_bcond): Likewise.
7734 (emit_cb): Likewise.
7735 (emit_tb): Likewise.
7736 (emit_blr): Likewise.
7737 (emit_stp): Likewise.
7738 (emit_ldp_q_offset): Likewise.
7739 (emit_stp_q_offset): Likewise.
7740 (emit_load_store): Likewise.
7741 (emit_ldr): Likewise.
7742 (emit_ldrsw): Likewise.
7743 (emit_str): Likewise.
7744 (emit_ldaxr): Likewise.
7745 (emit_stxr): Likewise.
7746 (emit_stlr): Likewise.
7747 (emit_data_processing_reg): Likewise.
7748 (emit_data_processing): Likewise.
7749 (emit_add): Likewise.
7750 (emit_sub): Likewise.
7751 (emit_mov): Likewise.
7752 (emit_movk): Likewise.
7753 (emit_mov_addr): Likewise.
7754 (emit_mrs): Likewise.
7755 (emit_msr): Likewise.
7756 (emit_sevl): Likewise.
7757 (emit_wfe): Likewise.
7758 (append_insns): Likewise.
7759 (can_encode_int32_in): New helper function.
7760 (aarch64_relocate_instruction): New function.
7761 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
7762 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
7763 (struct linux_target_ops): Install aarch64_get_thread_area,
7764 aarch64_install_fast_tracepoint_jump_pad and
7765 aarch64_get_min_fast_tracepoint_insn_len.
7766
7767 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7768
7769 * Makefile.in (aarch64-insn.o): New rule.
7770 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
7771
7772 2015-09-21 Yao Qi <yao.qi@linaro.org>
7773
7774 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
7775
7776 2015-09-21 Yao Qi <yao.qi@linaro.org>
7777
7778 * tracepoint.c (max_jump_pad_size): Remove.
7779
7780 2015-09-18 Yao Qi <yao.qi@linaro.org>
7781
7782 * linux-aarch64-low.c: Don't include sys/uio.h.
7783 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
7784
7785 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
7786
7787 * tracepoint.c (eval_result_type): Change prototype.
7788 (condition_true_at_tracepoint): Fix argument to compiled_cond.
7789
7790 2015-09-15 Pedro Alves <palves@redhat.com>
7791
7792 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
7793 Check whether to report exec events instead of checking whether
7794 multiprocess is enabled.
7795
7796 2015-09-15 Pedro Alves <palves@redhat.com>
7797
7798 PR remote/18965
7799 * remote-utils.c (prepare_resume_reply): Merge
7800 TARGET_WAITKIND_VFORK_DONE switch case with the
7801 TARGET_WAITKIND_FORKED case.
7802
7803 2015-09-15 Yao Qi <yao.qi@linaro.org>
7804
7805 * server.c (handle_query): Check string comparison using
7806 "else if" instead of "if".
7807
7808 2015-09-15 Yao Qi <yao.qi@linaro.org>
7809
7810 * server.c (vCont_supported): New global variable.
7811 (handle_query): Set vCont_supported to 1 if "vContSupported+"
7812 matches. Append ";vContSupported+" to own_buf.
7813 (handle_v_requests): Append ";s;S" to own_buf if target supports
7814 hardware single step or vCont_supported is false.
7815 (capture_main): Set vCont_supported to zero.
7816
7817 2015-09-15 Yao Qi <yao.qi@linaro.org>
7818
7819 * linux-low.c (linux_supports_conditional_breakpoints): Rename
7820 it to ...
7821 (linux_supports_hardware_single_step): ... New function.
7822 (linux_target_ops): Update.
7823 * lynx-low.c (lynx_target_ops): Set field
7824 supports_hardware_single_step to target_can_do_hardware_single_step.
7825 * nto-low.c (nto_target_ops): Likewise.
7826 * spu-low.c (spu_target_ops): Likewise.
7827 * win32-low.c (win32_target_ops): Likewise.
7828 * target.c (target_can_do_hardware_single_step): New function.
7829 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7830 Remove. <supports_hardware_single_step>: New field.
7831 (target_supports_conditional_breakpoints): Remove.
7832 (target_supports_hardware_single_step): New macro.
7833 (target_can_do_hardware_single_step): Declare.
7834 * server.c (handle_query): Use target_supports_hardware_single_step
7835 instead of target_supports_conditional_breakpoints.
7836
7837 2015-09-15 Yao Qi <yao.qi@linaro.org>
7838
7839 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
7840 function.
7841 (struct linux_target_ops the_low_target): Install
7842 aarch64_linux_siginfo_fixup.
7843
7844 2015-09-11 Don Breazeal <donb@codesourcery.com>
7845 Luis Machado <lgustavo@codesourcery.com>
7846
7847 * linux-low.c (linux_mourn): Static declaration.
7848 (linux_arch_setup): Move in front of
7849 handle_extended_wait.
7850 (linux_arch_setup_thread): New function.
7851 (handle_extended_wait): Handle exec events. Call
7852 linux_arch_setup_thread. Make event_lwp argument a
7853 pointer-to-a-pointer.
7854 (check_zombie_leaders): Do not check stopped threads.
7855 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
7856 (linux_low_filter_event): Add lwp and thread for exec'ing
7857 non-leader thread if leader thread has been deleted.
7858 Refactor code into linux_arch_setup_thread and call it.
7859 Pass child lwp pointer by reference to handle_extended_wait.
7860 (linux_wait_for_event_filtered): Update comment.
7861 (linux_wait_1): Prevent clobbering exec event status.
7862 (linux_supports_exec_events): New function.
7863 (linux_target_ops) <supports_exec_events>: Initialize new member.
7864 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
7865 new member.
7866 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
7867 * server.c (report_exec_events): New global variable.
7868 (handle_query): Handle qSupported query for exec-events feature.
7869 (captured_main): Initialize report_exec_events.
7870 * server.h (report_exec_events): Declare new global variable.
7871 * target.h (struct target_ops) <supports_exec_events>: New
7872 member.
7873 (target_supports_exec_events): New macro.
7874 * win32-low.c (win32_target_ops) <supports_exec_events>:
7875 Initialize new member.
7876
7877 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
7878
7879 * linux-low.c (linux_low_enable_btrace): Remove.
7880 (linux_target_ops): Replace linux_low_enable_btrace with
7881 linux_enable_btrace.
7882
7883 2015-09-03 Yao Qi <yao.qi@linaro.org>
7884
7885 * linux-aarch64-low.c (aarch64_insert_point): Call
7886 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
7887 returns true.
7888
7889 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7890
7891 * linux-low.c (check_stopped_by_breakpoint): Use
7892 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
7893
7894 2015-08-27 Pedro Alves <palves@redhat.com>
7895
7896 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
7897
7898 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
7899
7900 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
7901 the XNEW-family equivalent.
7902 (compile_bytecodes): Likewise.
7903 * dll.c (loaded_dll): Likewise.
7904 * event-loop.c (append_callback_event): Likewise.
7905 (create_file_handler): Likewise.
7906 (create_file_event): Likewise.
7907 * hostio.c (handle_open): Likewise.
7908 * inferiors.c (add_thread): Likewise.
7909 (add_process): Likewise.
7910 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
7911 * linux-arm-low.c (arm_new_process): Likewise.
7912 (arm_new_thread): Likewise.
7913 * linux-low.c (add_to_pid_list): Likewise.
7914 (linux_add_process): Likewise.
7915 (handle_extended_wait): Likewise.
7916 (add_lwp): Likewise.
7917 (enqueue_one_deferred_signal): Likewise.
7918 (enqueue_pending_signal): Likewise.
7919 (linux_resume_one_lwp_throw): Likewise.
7920 (linux_resume_one_thread): Likewise.
7921 (linux_read_memory): Likewise.
7922 (linux_write_memory): Likewise.
7923 * linux-mips-low.c (mips_linux_new_process): Likewise.
7924 (mips_linux_new_thread): Likewise.
7925 (mips_add_watchpoint): Likewise.
7926 * linux-x86-low.c (initialize_low_arch): Likewise.
7927 * lynx-low.c (lynx_add_process): Likewise.
7928 * mem-break.c (set_raw_breakpoint_at): Likewise.
7929 (set_breakpoint): Likewise.
7930 (add_condition_to_breakpoint): Likewise.
7931 (add_commands_to_breakpoint): Likewise.
7932 (clone_agent_expr): Likewise.
7933 (clone_one_breakpoint): Likewise.
7934 * regcache.c (new_register_cache): Likewise.
7935 * remote-utils.c (look_up_one_symbol): Likewise.
7936 * server.c (queue_stop_reply): Likewise.
7937 (start_inferior): Likewise.
7938 (queue_stop_reply_callback): Likewise.
7939 (handle_target_event): Likewise.
7940 * spu-low.c (fetch_ppc_memory): Likewise.
7941 (store_ppc_memory): Likewise.
7942 * target.c (set_target_ops): Likewise.
7943 * thread-db.c (thread_db_load_search): Likewise.
7944 (try_thread_db_load_1): Likewise.
7945 * tracepoint.c (add_tracepoint): Likewise.
7946 (add_tracepoint_action): Likewise.
7947 (create_trace_state_variable): Likewise.
7948 (cmd_qtdpsrc): Likewise.
7949 (cmd_qtro): Likewise.
7950 (add_while_stepping_state): Likewise.
7951 * win32-low.c (child_add_thread): Likewise.
7952 (get_image_name): Likewise.
7953
7954 2015-08-25 Yao Qi <yao.qi@linaro.org>
7955
7956 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
7957
7958 2015-08-25 Yao Qi <yao.qi@linaro.org>
7959
7960 * Makefile.in (aarch64-linux.o): New rule.
7961 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
7962 srv_tgtobj.
7963 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
7964 (aarch64_init_debug_reg_state): Make it extern.
7965 (aarch64_linux_prepare_to_resume): Remove.
7966
7967 2015-08-25 Yao Qi <yao.qi@linaro.org>
7968
7969 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
7970 lwp_arch_private_info and ptid_of_lwp.
7971
7972 2015-08-25 Yao Qi <yao.qi@linaro.org>
7973
7974 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
7975 Find proc_info by find_process_pid. All callers updated.
7976
7977 2015-08-25 Yao Qi <yao.qi@linaro.org>
7978
7979 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
7980 Remove.
7981 (debug_reg_change_callback): Remove.
7982 (aarch64_notify_debug_reg_change): Remove.
7983
7984 2015-08-25 Yao Qi <yao.qi@linaro.org>
7985
7986 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
7987 Call current_lwp_ptid.
7988
7989 2015-08-25 Yao Qi <yao.qi@linaro.org>
7990
7991 * linux-aarch64-low.c (debug_reg_change_callback): Use
7992 debug_printf.
7993
7994 2015-08-25 Yao Qi <yao.qi@linaro.org>
7995
7996 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
7997
7998 2015-08-25 Yao Qi <yao.qi@linaro.org>
7999
8000 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
8001
8002 2015-08-25 Yao Qi <yao.qi@linaro.org>
8003
8004 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
8005 the code.
8006
8007 2015-08-25 Yao Qi <yao.qi@linaro.org>
8008
8009 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
8010 Remove.
8011 (debug_reg_change_callback): Remove argument entry and add argument
8012 lwp. Remove local variable thread. Don't print thread id in the
8013 debugging output. Don't check whether pid of thread equals to pid.
8014 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
8015 iterate_over_lwps instead find_inferior.
8016
8017 2015-08-24 Pedro Alves <palves@redhat.com>
8018
8019 * inferiors.c (get_first_process): New function.
8020 * inferiors.h (get_first_process): New declaration.
8021 * remote-utils.c (read_ptid): Default to the first process in the
8022 list, instead of to the current thread's process.
8023
8024 2015-08-24 Pedro Alves <palves@redhat.com>
8025
8026 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
8027 * event-loop.c: Likewise.
8028 * remote-utils.c: Likewise.
8029 * tracepoint.c: Likewise.
8030
8031 2015-08-24 Pedro Alves <palves@redhat.com>
8032
8033 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
8034 ptid_get_lwp.
8035
8036 2015-08-21 Pedro Alves <palves@redhat.com>
8037
8038 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
8039 instead of literal 1.
8040
8041 2015-08-21 Pedro Alves <palves@redhat.com>
8042
8043 * tdesc.c (default_description): Explicitly zero-initialize.
8044
8045 2015-08-21 Pedro Alves <palves@redhat.com>
8046
8047 PR gdb/18749
8048 * inferiors.c (remove_thread): Discard any pending stop reply for
8049 this thread.
8050 * server.c (remove_all_on_match_pid): Rename to ...
8051 (remove_all_on_match_ptid): ... this. Work with a filter ptid
8052 instead of a pid.
8053 (discard_queued_stop_replies): Change parameter to a ptid. Now
8054 extern.
8055 (handle_v_kill, kill_inferior_callback, captured_main)
8056 (process_serial_event): Adjust.
8057 * server.h (discard_queued_stop_replies): Declare.
8058
8059 2015-08-21 Pedro Alves <palves@redhat.com>
8060
8061 * linux-low.c (wait_for_sigstop): Always switch to no thread
8062 selected if the previously current thread dies.
8063 * lynx-low.c (lynx_request_interrupt): Use the first thread's
8064 process instead of the current thread's.
8065 * remote-utils.c (input_interrupt): Don't check if there's no
8066 current thread.
8067 * server.c (gdb_read_memory, gdb_write_memory): If setting the
8068 current thread to the general thread fails, error out.
8069 (handle_qxfer_auxv, handle_qxfer_libraries)
8070 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
8071 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
8072 (handle_query): Check if there's a thread selected instead of
8073 checking whether there's any thread in the thread list.
8074 (handle_qxfer_threads, handle_qxfer_btrace)
8075 (handle_qxfer_btrace_conf): Don't error out early if there's no
8076 thread in the thread list.
8077 (handle_v_cont, myresume): Don't set the current thread to the
8078 continue thread.
8079 (process_serial_event) <Hg handling>: Also set thread_id if the
8080 previous general thread is still alive.
8081 (process_serial_event) <g/G handling>: If setting the current
8082 thread to the general thread fails, error out.
8083 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
8084 thread's lwp instead of the current thread's.
8085 * target.c (set_desired_thread): If the desired thread was not
8086 found, leave the current thread pointing to NULL. Return an int
8087 (boolean) indicating success.
8088 * target.h (set_desired_thread): Change return type to int.
8089
8090 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
8091
8092 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
8093 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
8094 #includes.
8095 (ps_get_thread_area): New function.
8096
8097 2015-08-19 Gary Benson <gbenson@redhat.com>
8098
8099 * hostio.c (handle_pread): Do not attempt to read more data
8100 than hostio_reply_with_data can fit in a packet.
8101
8102 2015-08-18 Joel Brobecker <brobecker@adacore.com>
8103
8104 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
8105
8106 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
8107
8108 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
8109
8110 2015-08-06 Pedro Alves <palves@redhat.com>
8111
8112 * tracepoint.c (expr_eval_result): Now an int.
8113
8114 2015-08-06 Pedro Alves <palves@redhat.com>
8115
8116 * gdbthread.h (struct regcache): Forward declare.
8117 (struct thread_info) <regcache_data>: Now a struct regcache
8118 pointer.
8119 * inferiors.c (inferior_regcache_data)
8120 (set_inferior_regcache_data): Now work with struct regcache
8121 pointers.
8122 * inferiors.h (struct regcache): Forward declare.
8123 (inferior_regcache_data, set_inferior_regcache_data): Now work
8124 with struct regcache pointers.
8125 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
8126 (free_register_cache_thread): Remove struct regcache pointer
8127 casts.
8128
8129 2015-08-06 Pedro Alves <palves@redhat.com>
8130
8131 * server.c (captured_main): On error, print the exception message
8132 to stderr, and if run_once is set, throw a quit.
8133
8134 2015-08-06 Pedro Alves <palves@redhat.com>
8135
8136 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
8137 the current thread.
8138
8139 2015-08-06 Pedro Alves <palves@redhat.com>
8140
8141 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
8142 reading beyond the passed in buffer length.
8143
8144 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
8145
8146 * tracepoint.c (symbol_list) <required>: Remove.
8147
8148 2015-08-06 Pedro Alves <palves@redhat.com>
8149
8150 * linux-low.c (handle_extended_wait): Set the fork child's suspend
8151 count if stopping and suspending threads.
8152 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
8153 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
8154 (linux_detach): Complete an ongoing step-over.
8155 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
8156 throughout.
8157 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
8158 (linux_wait_1): If passing a signal to the inferior after
8159 finishing a step-over, unsuspend and re-resume all lwps. If we
8160 see a single-step event but the thread should be continuing, don't
8161 pass the trap to gdb.
8162 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
8163 internal_error instead of gdb_assert.
8164 (enqueue_pending_signal): New function.
8165 (check_ptrace_stopped_lwp_gone): Add debug output.
8166 (start_step_over): Use internal_error instead of gdb_assert.
8167 (complete_ongoing_step_over): New function.
8168 (linux_resume_one_thread): Don't resume a suspended thread.
8169 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
8170 it stepping.
8171
8172 2015-08-06 Pedro Alves <palves@redhat.com>
8173
8174 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
8175 (linux_thread_alive): Use lwp_is_marked_dead.
8176 (extended_event_reported): Delete.
8177 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
8178 instead of extended_event_reported.
8179 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
8180 as well.
8181 (lwp_is_marked_dead): New function.
8182 (lwp_running): Use lwp_is_marked_dead.
8183 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
8184 comment.
8185
8186 2015-08-06 Pedro Alves <palves@redhat.com>
8187
8188 * linux-low.c (linux_wait_1): Move fork event output out of the
8189 !report_to_gdb check. Pass event_child->waitstatus to
8190 target_waitstatus_to_string instead of ourstatus.
8191
8192 2015-08-04 Yao Qi <yao.qi@linaro.org>
8193
8194 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
8195 if current_thread is 32 bit.
8196
8197 2015-08-04 Yao Qi <yao.qi@linaro.org>
8198
8199 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
8200 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
8201 * server.c (extended_protocol): Remove "static".
8202 * server.h (extended_protocol): Declare it.
8203
8204 2015-08-04 Yao Qi <yao.qi@linaro.org>
8205
8206 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
8207 both aarch64 and aarch32.
8208 (aarch64_set_pc): Likewise.
8209
8210 2015-08-04 Yao Qi <yao.qi@linaro.org>
8211
8212 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
8213 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
8214 arm-with-neon.xml to srv_xmlfiles.
8215 * linux-aarch64-low.c: Include linux-aarch32-low.h.
8216 (is_64bit_tdesc): New function.
8217 (aarch64_linux_read_description): New function.
8218 (aarch64_arch_setup): Call aarch64_linux_read_description.
8219 (regs_info): Rename to regs_info_aarch64.
8220 (aarch64_regs_info): Return right regs_info.
8221 (initialize_low_arch): Call initialize_low_arch_aarch32.
8222
8223 2015-08-04 Yao Qi <yao.qi@linaro.org>
8224
8225 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
8226 * linux-aarch32-low.c: New file.
8227 * linux-aarch32-low.h: New file.
8228 * linux-arm-low.c (arm_fill_gregset): Move it to
8229 linux-aarch32-low.c.
8230 (arm_store_gregset): Likewise.
8231 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
8232 (arm_store_vfpregset): Call arm_store_vfpregset_num.
8233 (arm_arch_setup): Check if PTRACE_GETREGSET works.
8234 (regs_info): Rename to regs_info_arm.
8235 (arm_regs_info): Return regs_info_aarch32 if
8236 have_ptrace_getregset is 1 and target description is
8237 arm_with_neon or arm_with_vfpv3.
8238 (initialize_low_arch): Don't call init_registers_arm_with_neon.
8239 Call initialize_low_arch_aarch32 instead.
8240
8241 2015-08-04 Yao Qi <yao.qi@linaro.org>
8242
8243 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
8244 * linux-low.c: ... here.
8245 * linux-low.h (have_ptrace_getregset): Declare it.
8246
8247 2015-08-04 Pedro Alves <palves@redhat.com>
8248
8249 * thread-db.c (struct thread_db): Use new typedefs.
8250 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
8251 CHK calls.
8252 (disable_thread_event_reporting): Cast result of dlsym to
8253 destination function pointer type.
8254 (thread_db_mourn): Use td_ta_delete_ftype.
8255
8256 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
8257
8258 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
8259 arch variant.
8260 (CDX_BREAKPOINT): Define for R2.
8261 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
8262 (the_low_target): Add comments.
8263
8264 2015-07-30 Yao Qi <yao.qi@linaro.org>
8265
8266 * linux-arm-low.c (arm_hwcap): Remove it.
8267 (arm_read_description): New local variable arm_hwcap. Don't
8268 set arm_hwcap to zero.
8269
8270 2015-07-30 Yao Qi <yao.qi@linaro.org>
8271
8272 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
8273 Use regcache->tdesc instead.
8274 (arm_store_wmmxregset): Likewise.
8275 (arm_fill_vfpregset): Likewise.
8276 (arm_store_vfpregset): Likewise.
8277
8278 2015-07-30 Yao Qi <yao.qi@linaro.org>
8279
8280 * linux-arm-low.c: Include arch/arm.h.
8281 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
8282 (arm_store_gregset): Likewise.
8283
8284 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
8285
8286 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
8287 ptrace's 4th parameter.
8288
8289 2015-07-27 Yao Qi <yao.qi@linaro.org>
8290
8291 * configure.srv (case aarch64*-*-linux*): Don't set
8292 srv_linux_usrregs.
8293
8294 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
8295
8296 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
8297 sys/ptrace.h.
8298 * linux-arm-low.c: Likewise.
8299 * linux-cris-low.c: Likewise.
8300 * linux-crisv32-low.c: Likewise.
8301 * linux-low.c: Likewise.
8302 * linux-m68k-low.c: Likewise.
8303 * linux-mips-low.c: Likewise.
8304 * linux-nios2-low.c: Likewise.
8305 * linux-s390-low.c: Likewise.
8306 * linux-sparc-low.c: Likewise.
8307 * linux-tic6x-low.c: Likewise.
8308 * linux-tile-low.c: Likewise.
8309 * linux-x86-low.c: Likewise.
8310
8311 2015-07-24 Pedro Alves <palves@redhat.com>
8312
8313 * config.in: Regenerate.
8314 * configure: Regenerate.
8315
8316 2015-07-24 Pedro Alves <palves@redhat.com>
8317
8318 * acinclude.m4: Include ../ptrace.m4.
8319 * configure.ac: Call GDB_AC_PTRACE.
8320 * config.in, configure: Regenerate.
8321
8322 2015-07-24 Yao Qi <yao.qi@linaro.org>
8323
8324 * linux-low.c (linux_create_inferior): Remove setting to
8325 proc->priv->new_inferior.
8326 (linux_attach): Likewise.
8327 (linux_low_filter_event): Likewise.
8328 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
8329
8330 2015-07-24 Yao Qi <yao.qi@linaro.org>
8331
8332 * linux-low.c (linux_arch_setup): New function.
8333 (linux_low_filter_event): If proc->tdesc is NULL and
8334 proc->attached is true, call the_low_target.arch_setup.
8335 Otherwise, keep status pending, and return.
8336 (linux_resume_one_lwp_throw): Don't call get_pc if
8337 thread->while_stepping isn't NULL. Don't call
8338 get_thread_regcache if proc->tdesc is NULL.
8339 (need_step_over_p): Return 0 if proc->tdesc is NULL.
8340 (linux_target_ops): Install arch_setup.
8341 * server.c (start_inferior): Call the_target->arch_setup.
8342 * target.h (struct target_ops) <arch_setup>: New field.
8343 (target_arch_setup): New marco.
8344 * lynx-low.c (lynx_target_ops): Update.
8345 * nto-low.c (nto_target_ops): Update.
8346 * spu-low.c (spu_target_ops): Update.
8347 * win32-low.c (win32_target_ops): Update.
8348
8349 2015-07-24 Yao Qi <yao.qi@linaro.org>
8350
8351 * linux-low.c (linux_add_process): Don't set
8352 proc->priv->new_inferior.
8353 (linux_create_inferior): Set proc->priv->new_inferior to 1.
8354 (linux_attach): Likewise.
8355
8356 2015-07-24 Yao Qi <yao.qi@linaro.org>
8357
8358 * server.c (start_inferior): Code refactor.
8359
8360 2015-07-24 Yao Qi <yao.qi@linaro.org>
8361
8362 * server.c (process_serial_event): Set general_thread.
8363
8364 2015-07-21 Yao Qi <yao.qi@linaro.org>
8365
8366 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
8367 aarch64_linux_get_debug_reg_capacity.
8368
8369 2015-07-17 Yao Qi <yao.qi@linaro.org>
8370
8371 * Makefile.in (aarch64-linux-hw-point.o): New rule.
8372 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
8373 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
8374 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
8375 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
8376 (AARCH64_HWP_ALIGNMENT): Likewise.
8377 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
8378 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
8379 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
8380 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
8381 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
8382 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
8383 (struct aarch64_debug_reg_state): Likewise.
8384 (struct arch_lwp_info): Likewise.
8385 (aarch64_align_watchpoint): Likewise.
8386 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
8387 (aarch64_watchpoint_length): Likewise.
8388 (aarch64_point_encode_ctrl_reg): Likewise
8389 (aarch64_point_is_aligned): Likewise.
8390 (aarch64_align_watchpoint): Likewise.
8391 (aarch64_linux_set_debug_regs):
8392 (aarch64_dr_state_insert_one_point): Likewise.
8393 (aarch64_dr_state_remove_one_point): Likewise.
8394 (aarch64_handle_breakpoint): Likewise.
8395 (aarch64_handle_aligned_watchpoint): Likewise.
8396 (aarch64_handle_unaligned_watchpoint): Likewise.
8397 (aarch64_handle_watchpoint): Likewise.
8398
8399 2015-07-17 Yao Qi <yao.qi@linaro.org>
8400
8401 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
8402 and don't aarch64_get_debug_reg_state. All callers update.
8403 (aarch64_handle_aligned_watchpoint): Likewise.
8404 (aarch64_handle_unaligned_watchpoint): Likewise.
8405 (aarch64_handle_watchpoint): Likewise.
8406 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
8407 (aarch64_remove_point): Likewise.
8408
8409 2015-07-17 Yao Qi <yao.qi@linaro.org>
8410
8411 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
8412 debug_printf.
8413 (aarch64_handle_unaligned_watchpoint): Likewise.
8414
8415 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8416
8417 Revert the previous 3 commits:
8418 Move gdb_regex* to common/
8419 Move linux_find_memory_regions_full & co.
8420 gdbserver build-id attribute generator
8421
8422 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
8423 Jan Kratochvil <jan.kratochvil@redhat.com>
8424
8425 gdbserver build-id attribute generator.
8426 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
8427 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
8428 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
8429 (find_phdr): New.
8430 (get_dynamic): Use find_pdhr to traverse program headers.
8431 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
8432 (compare_mapping_entry_range, struct find_memory_region_callback_data)
8433 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
8434 (get_hex_build_id): New.
8435 (linux_qxfer_libraries_svr4): Add optional build-id attribute
8436 to reply XML document.
8437
8438 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
8439 Jan Kratochvil <jan.kratochvil@redhat.com>
8440
8441 * target.c: Include target/target-utils.h and fcntl.h.
8442 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
8443 (target_fileio_read_stralloc): New functions.
8444
8445 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8446
8447 * Makefile.in (OBS): Add gdb_regex.o.
8448 (gdb_regex.o): New.
8449 * config.in: Rebuilt.
8450 * configure: Rebuilt.
8451
8452 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
8453 Jan Kratochvil <jan.kratochvil@redhat.com>
8454
8455 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
8456 * Makefile.in (OBS): Add target-utils.o.
8457 (linux-maps.o, target-utils.o): New.
8458 * configure.srv (srv_linux_obj): Add linux-maps.o.
8459
8460 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
8461
8462 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
8463 function, return 1.
8464 (the_low_target): Install it.
8465
8466 2015-07-14 Pedro Alves <palves@redhat.com>
8467
8468 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
8469 Instead, ignore ECHILD, and throw an error for other errnos.
8470
8471 2015-07-10 Pedro Alves <palves@redhat.com>
8472
8473 * event-loop.c (struct callback_event) <data>: Change type to
8474 gdb_client_data instance instead of gdb_client_data pointer.
8475 (append_callback_event): Adjust.
8476
8477 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
8478
8479 * linux-aarch64-low.c: Add comments for each linux_target_ops
8480 method. Remove comments already covered in target_ops and
8481 linux_target_ops definitions.
8482 (the_low_target): Add comments for each unimplemented method.
8483
8484 2015-07-09 Yao Qi <yao.qi@linaro.org>
8485
8486 * linux-aarch64-low.c (aarch64_regmap): Remove.
8487 (aarch64_usrregs_info): Remove.
8488 (regs_info): Set field usrregs to NULL.
8489
8490 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
8491
8492 * linux-low.c: Include "rsp-low.h"
8493 (linux_low_encode_pt_config, linux_low_encode_raw): New.
8494 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
8495 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
8496 (handle_btrace_enable_pt): New.
8497 (handle_btrace_general_set): Support "pt".
8498 (handle_btrace_conf_general_set): Support "pt:size".
8499
8500 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
8501
8502 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
8503 Z_PACKET_SW_BP.
8504
8505 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
8506
8507 * linux-aarch64-low.c: Remove comment about endianness.
8508 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
8509 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
8510 memcmp.
8511
8512 2015-06-24 Gary Benson <gbenson@redhat.com>
8513
8514 * linux-i386-ipa.c (stdint.h): Do not include.
8515 * lynx-i386-low.c (stdint.h): Likewise.
8516 * lynx-ppc-low.c (stdint.h): Likewise.
8517 * mem-break.c (stdint.h): Likewise.
8518 * thread-db.c (stdint.h): Likewise.
8519 * tracepoint.c (stdint.h): Likewise.
8520 * win32-low.c (stdint.h): Likewise.
8521
8522 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
8523
8524 * server.c (write_qxfer_response): Update call to
8525 remote_escape_output.
8526
8527 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
8528 Jan Kratochvil <jan.kratochvil@redhat.com>
8529
8530 Merge multiple hex conversions.
8531 * gdbreplay.c (tohex): Rename to 'fromhex'.
8532 (logchar): Use fromhex.
8533
8534 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
8535
8536 * server.c (handle_qxfer_libraries): Set `version' attribute for
8537 <library-list>.
8538
8539 2015-06-10 Gary Benson <gbenson@redhat.com>
8540
8541 * target.h (struct target_ops) <multifs_open>: New field.
8542 <multifs_unlink>: Likewise.
8543 <multifs_readlink>: Likewise.
8544 * linux-low.c (nat/linux-namespaces.h): New include.
8545 (linux_target_ops): Initialize the_target->multifs_open,
8546 the_target->multifs_unlink and the_target->multifs_readlink.
8547 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
8548 * hostio.c (hostio_fs_pid): New static variable.
8549 (hostio_handle_new_gdb_connection): New function.
8550 (handle_setfs): Likewise.
8551 (handle_open): Use the_target->multifs_open as appropriate.
8552 (handle_unlink): Use the_target->multifs_unlink as appropriate.
8553 (handle_readlink): Use the_target->multifs_readlink as
8554 appropriate.
8555 (handle_vFile): Handle vFile:setfs packets.
8556 * server.c (handle_query): Call hostio_handle_new_gdb_connection
8557 after target_handle_new_gdb_connection.
8558
8559 2015-06-10 Gary Benson <gbenson@redhat.com>
8560
8561 * configure.ac (AC_CHECK_FUNCS): Add setns.
8562 * config.in: Regenerate.
8563 * configure: Likewise.
8564 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
8565 (linux-namespaces.o): New rule.
8566 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
8567
8568 2015-06-09 Gary Benson <gbenson@redhat.com>
8569
8570 * hostio.c (handle_open): Process mode argument with
8571 fileio_to_host_mode.
8572
8573 2015-06-01 Yao Qi <yao.qi@linaro.org>
8574
8575 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
8576 * linux-x86-low.c: Likewise.
8577
8578 2015-05-28 Don Breazeal <donb@codesourcery.com>
8579
8580 * linux-low.c (handle_extended_wait): Initialize
8581 thread_info.last_resume_kind for new fork children.
8582
8583 2015-05-15 Pedro Alves <palves@redhat.com>
8584
8585 * target.h (target_handle_new_gdb_connection): Rewrite using if
8586 wrapped in do/while.
8587
8588 2015-05-14 Joel Brobecker <brobecker@adacore.com>
8589
8590 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
8591 * configure, config.in: Regenerate.
8592 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
8593 Declare typedef.
8594
8595 2015-05-12 Don Breazeal <donb@codesourcery.com>
8596
8597 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
8598 PTRACE_EVENT_VFORK_DONE.
8599 (linux_low_ptrace_options, extended_event_reported): Add vfork
8600 events.
8601 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
8602 and "vforkdone" for RSP 'T' Stop Reply Packet.
8603 * server.h (report_vfork_events): Declare
8604 global variable.
8605
8606 2015-05-12 Don Breazeal <donb@codesourcery.com>
8607
8608 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
8609 (the_low_target) <new_fork>: Initialize new member.
8610 * linux-arm-low.c (arm_new_fork): New function.
8611 (the_low_target) <new_fork>: Initialize new member.
8612 * linux-low.c (handle_extended_wait): Call new target function
8613 new_fork.
8614 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
8615 * linux-mips-low.c (mips_add_watchpoint): New function
8616 extracted from mips_insert_point.
8617 (the_low_target) <new_fork>: Initialize new member.
8618 (mips_linux_new_fork): New function.
8619 (mips_insert_point): Call mips_add_watchpoint.
8620 * linux-x86-low.c (x86_linux_new_fork): New function.
8621 (the_low_target) <new_fork>: Initialize new member.
8622
8623 2015-05-12 Don Breazeal <donb@codesourcery.com>
8624
8625 * linux-low.c (handle_extended_wait): Implement return value,
8626 rename argument 'event_child' to 'event_lwp', handle
8627 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
8628 (linux_low_ptrace_options): New function.
8629 (linux_low_filter_event): Call linux_low_ptrace_options,
8630 use different argument fo linux_enable_event_reporting,
8631 use return value from handle_extended_wait.
8632 (extended_event_reported): New function.
8633 (linux_wait_1): Call extended_event_reported and set
8634 status to report fork events.
8635 (linux_write_memory): Add pid to debug message.
8636 (reset_lwp_ptrace_options_callback): New function.
8637 (linux_handle_new_gdb_connection): New function.
8638 (linux_target_ops): Initialize new structure member.
8639 * linux-low.h (struct lwp_info) <waitstatus>: New member.
8640 * lynx-low.c: Initialize new structure member.
8641 * remote-utils.c (prepare_resume_reply): Implement stop reason
8642 "fork" for "T" stop message.
8643 * server.c (handle_query): Call handle_new_gdb_connection.
8644 * server.h (report_fork_events): Declare global flag.
8645 * target.h (struct target_ops) <handle_new_gdb_connection>:
8646 New member.
8647 (target_handle_new_gdb_connection): New macro.
8648 * win32-low.c: Initialize new structure member.
8649
8650 2015-05-12 Don Breazeal <donb@codesourcery.com>
8651
8652 * mem-break.c (APPEND_TO_LIST): Define macro.
8653 (clone_agent_expr): New function.
8654 (clone_one_breakpoint): New function.
8655 (clone_all_breakpoints): New function.
8656 * mem-break.h: Declare new functions.
8657
8658 2015-05-12 Don Breazeal <donb@codesourcery.com>
8659
8660 * linux-low.c (linux_supports_fork_events): New function.
8661 (linux_supports_vfork_events): New function.
8662 (linux_target_ops): Initialize new structure members.
8663 (initialize_low): Call linux_check_ptrace_features.
8664 * lynx-low.c (lynx_target_ops): Initialize new structure
8665 members.
8666 * server.c (report_fork_events, report_vfork_events):
8667 New global flags.
8668 (handle_query): Add new features to qSupported packet and
8669 response.
8670 (captured_main): Initialize new global variables.
8671 * target.h (struct target_ops) <supports_fork_events>:
8672 New member.
8673 <supports_vfork_events>: New member.
8674 (target_supports_fork_events): New macro.
8675 (target_supports_vfork_events): New macro.
8676 * win32-low.c (win32_target_ops): Initialize new structure
8677 members.
8678
8679 2015-05-12 Gary Benson <gbenson@redhat.com>
8680
8681 * server.c (handle_qxfer_exec_file): Use current process
8682 if annex is empty.
8683
8684 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
8685
8686 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
8687 Remove HAVE_PTRACE_GETREGS conditionals.
8688 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
8689 instead of PTRACE_GETREGS and PTRACE_SETREGS.
8690
8691 2015-05-08 Yao Qi <yao.qi@linaro.org>
8692
8693 * linux-low.c (linux_supports_conditional_breakpoints): New
8694 function.
8695 (linux_target_ops): Install new target method.
8696 * lynx-low.c (lynx_target_ops): Install NULL hook for
8697 supports_conditional_breakpoints.
8698 * nto-low.c (nto_target_ops): Likewise.
8699 * spu-low.c (spu_target_ops): Likewise.
8700 * win32-low.c (win32_target_ops): Likewise.
8701 * server.c (handle_query): Check
8702 target_supports_conditional_breakpoints.
8703 * target.h (struct target_ops) <supports_conditional_breakpoints>:
8704 New field.
8705 (target_supports_conditional_breakpoints): New macro.
8706
8707 2015-05-06 Pedro Alves <palves@redhat.com>
8708
8709 PR server/18081
8710 * server.c (start_inferior): If the process exits, mourn it.
8711
8712 2015-04-21 Gary Benson <gbenson@redhat.com>
8713
8714 * hostio.c (fileio_open_flags_to_host): Factored out to
8715 fileio_to_host_openflags in common/fileio.c. Single use
8716 updated.
8717
8718 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8719
8720 * linux-xtensa-low.c (xtensa_fill_gregset)
8721 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
8722 XCHAL_HAVE_LOOP.
8723
8724 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8725
8726 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
8727 (regs_info): Replace usrregs pointer with NULL.
8728
8729 2015-04-17 Gary Benson <gbenson@redhat.com>
8730
8731 * target.h (struct target_ops) <pid_to_exec_file>: New field.
8732 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
8733 * server.c (handle_qxfer_exec_file): New function.
8734 (qxfer_packets): Add exec-file entry.
8735 (handle_query): Report qXfer:exec-file:read as supported packet.
8736
8737 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
8738
8739 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
8740
8741 2015-04-09 Gary Benson <gbenson@redhat.com>
8742
8743 * hostio-errno.c (errno_to_fileio_error): Remove function.
8744 Update caller to use remote_fileio_to_fio_error.
8745
8746 2015-04-09 Yao Qi <yao.qi@linaro.org>
8747
8748 * linux-low.c (linux_insert_point): Call
8749 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
8750 (linux_remove_point): Call remove_memory_breakpoint if type is
8751 raw_bkpt_type_sw.
8752 * linux-x86-low.c (x86_insert_point): Don't call
8753 insert_memory_breakpoint.
8754 (x86_remove_point): Don't call remove_memory_breakpoint.
8755
8756 2015-04-01 Pedro Alves <palves@redhat.com>
8757 Cleber Rosa <crosa@redhat.com>
8758
8759 * server.c (gdbserver_usage): Reorganize and extend the usage
8760 message.
8761
8762 2015-03-24 Pedro Alves <palves@redhat.com>
8763
8764 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
8765 output. Also dump TRAP_TRACE.
8766 (linux_low_filter_event): In debug output, distinguish a
8767 resume_stop SIGSTOP from a delayed SIGSTOP.
8768
8769 2015-03-24 Gary Benson <gbenson@redhat.com>
8770
8771 * linux-x86-low.c (x86_linux_new_thread): Moved to
8772 nat/x86-linux.c.
8773 (x86_linux_prepare_to_resume): Likewise.
8774
8775 2015-03-24 Gary Benson <gbenson@redhat.com>
8776
8777 * Makefile.in (x86-linux-dregs.o): New rule.
8778 * configure.srv: Add x86-linux-dregs.o to relevant targets.
8779 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
8780 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
8781 (x86_linux_dr_get): Likewise.
8782 (x86_linux_dr_set): Likewise.
8783 (update_debug_registers_callback): Likewise.
8784 (x86_linux_dr_set_addr): Likewise.
8785 (x86_linux_dr_get_addr): Likewise.
8786 (x86_linux_dr_set_control): Likewise.
8787 (x86_linux_dr_get_control): Likewise.
8788 (x86_linux_dr_get_status): Likewise.
8789 (x86_linux_update_debug_registers): Likewise.
8790
8791 2015-03-24 Gary Benson <gbenson@redhat.com>
8792
8793 * linux-x86-low.c (x86_linux_update_debug_registers):
8794 New function, factored out from...
8795 (x86_linux_prepare_to_resume): ...this.
8796
8797 2015-03-24 Gary Benson <gbenson@redhat.com>
8798
8799 * linux-x86-low.c (x86_linux_dr_get): Update comments.
8800 (x86_linux_dr_set): Likewise.
8801 (update_debug_registers_callback): Likewise.
8802 (x86_linux_dr_set_addr): Likewise.
8803 (x86_linux_dr_get_addr): Likewise.
8804 (x86_linux_dr_set_control): Likewise.
8805 (x86_linux_dr_get_control): Likewise.
8806 (x86_linux_dr_get_status): Likewise.
8807 (x86_linux_prepare_to_resume): Likewise.
8808
8809 2015-03-24 Gary Benson <gbenson@redhat.com>
8810
8811 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
8812 Use perror_with_name. Pass string through gettext.
8813 (x86_linux_dr_set): Likewise.
8814
8815 2015-03-24 Gary Benson <gbenson@redhat.com>
8816
8817 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
8818 (x86_linux_dr_set_addr): ...this.
8819 (x86_dr_low_get_addr): Rename to...
8820 (x86_linux_dr_get_addr): ...this.
8821 (x86_dr_low_set_control): Rename to...
8822 (x86_linux_dr_set_control): ...this.
8823 (x86_dr_low_get_control): Rename to...
8824 (x86_linux_dr_get_control): ...this.
8825 (x86_dr_low_get_status): Rename to...
8826 (x86_linux_dr_get_status): ...this.
8827 (x86_dr_low): Update with new function names.
8828
8829 2015-03-24 Gary Benson <gbenson@redhat.com>
8830
8831 * Makefile.in (x86-linux.o): New rule.
8832 * configure.srv: Add x86-linux.o to relevant targets.
8833 * linux-low.c (lwp_set_arch_private_info): New function.
8834 (lwp_arch_private_info): Likewise.
8835 * linux-x86-low.c: Include nat/x86-linux.h.
8836 (arch_lwp_info): Removed structure.
8837 (update_debug_registers_callback):
8838 Use lwp_set_debug_registers_changed.
8839 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
8840 and lwp_set_debug_registers_changed.
8841 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
8842
8843 2015-03-24 Gary Benson <gbenson@redhat.com>
8844
8845 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
8846 * linux-arm-low.c (arm_new_thread): Likewise.
8847 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
8848 * linux-mips-low.c (mips_linux_new_thread): Likewise.
8849 * linux-x86-low.c (x86_linux_new_thread): Likewise.
8850 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
8851
8852 2015-03-24 Gary Benson <gbenson@redhat.com>
8853
8854 * linux-low.c (ptid_of_lwp): New function.
8855 (lwp_is_stopped): Likewise.
8856 (lwp_stop_reason): Likewise.
8857 * linux-x86-low.c (update_debug_registers_callback):
8858 Use lwp_is_stopped.
8859 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
8860 lwp_stop_reason.
8861
8862 2015-03-24 Gary Benson <gbenson@redhat.com>
8863
8864 * linux-low.h (linux_stop_lwp): Remove declaration.
8865
8866 2015-03-24 Gary Benson <gbenson@redhat.com>
8867
8868 * linux-low.h: Include nat/linux-nat.h.
8869 * linux-low.c (iterate_over_lwps_args): New structure.
8870 (iterate_over_lwps_filter): New function.
8871 (iterate_over_lwps): Likewise.
8872 * linux-x86-low.c (update_debug_registers_callback):
8873 Update signature to what iterate_over_lwps expects.
8874 Remove PID check that iterate_over_lwps now performs.
8875 (x86_dr_low_set_addr): Use iterate_over_lwps.
8876 (x86_dr_low_set_control): Likewise.
8877
8878 2015-03-24 Gary Benson <gbenson@redhat.com>
8879
8880 * linux-x86-low.c (x86_debug_reg_state): New function.
8881 (x86_linux_prepare_to_resume): Use the above.
8882
8883 2015-03-24 Gary Benson <gbenson@redhat.com>
8884
8885 * linux-low.c (current_lwp_ptid): New function.
8886 * linux-x86-low.c: Include nat/linux-nat.h.
8887 (x86_dr_low_get_addr): Use current_lwp_ptid.
8888 (x86_dr_low_get_control): Likewise.
8889 (x86_dr_low_get_status): Likewise.
8890
8891 2015-03-20 Pedro Alves <palves@redhat.com>
8892
8893 * tracepoint.c (cmd_qtstatus): Make "str" const.
8894
8895 2015-03-20 Pedro Alves <palves@redhat.com>
8896
8897 * server.c (handle_general_set): Make "req_str" const.
8898
8899 2015-03-19 Pedro Alves <palves@redhat.com>
8900
8901 * linux-low.c (linux_resume_one_lwp): Rename to ...
8902 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
8903 instead call perror_with_name.
8904 (check_ptrace_stopped_lwp_gone): New function.
8905 (linux_resume_one_lwp): Reimplement as wrapper around
8906 linux_resume_one_lwp_throw that swallows errors if the LWP is
8907 gone.
8908
8909 2015-03-19 Pedro Alves <palves@redhat.com>
8910
8911 * linux-low.c (count_events_callback, select_event_lwp_callback):
8912 No longer check whether the thread has resume_stop as last resume
8913 kind.
8914
8915 2015-03-19 Pedro Alves <palves@redhat.com>
8916
8917 * linux-low.c (count_events_callback, select_event_lwp_callback):
8918 Use the lwp's status_pending_p field, not the thread's.
8919
8920 2015-03-19 Pedro Alves <palves@redhat.com>
8921
8922 * linux-low.c (select_event_lwp_callback): Update comments to
8923 no longer mention SIGTRAP.
8924
8925 2015-03-18 Gary Benson <gbenson@redhat.com>
8926
8927 * server.c (handle_query): Do not report vFile:fstat as supported.
8928
8929 2015-03-11 Gary Benson <gbenson@redhat.com>
8930
8931 * hostio.c (sys/types.h): New include.
8932 (sys/stat.h): Likewise.
8933 (common-remote-fileio.h): Likewise.
8934 (handle_fstat): New function.
8935 (handle_vFile): Handle vFile:fstat packets.
8936
8937 2015-03-11 Gary Benson <gbenson@redhat.com>
8938
8939 * configure.ac (AC_CHECK_MEMBERS): Add checks for
8940 struct stat.st_blocks and struct stat.st_blksize.
8941 * configure: Regenerate.
8942 * config.in: Likewise.
8943 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
8944 (OBS): Add common-remote-fileio.o.
8945 (common-remote-fileio.o): New rule.
8946
8947 2015-03-09 Pedro Alves <palves@redhat.com>
8948
8949 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
8950 'struct sockaddr' pointer in 'accept' call.
8951
8952 2015-03-09 Pedro Alves <palves@redhat.com>
8953
8954 Revert:
8955 2015-03-07 Pedro Alves <palves@redhat.com>
8956 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8957 or <winsock2.h> here. Instead include "gdb_socket.h".
8958 (remote_open): Use union gdb_sockaddr_u.
8959 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8960 or <winsock2.h> here. Instead include "gdb_socket.h".
8961 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8962 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8963 or <sys/un.h>.
8964 (init_named_socket, gdb_agent_helper_thread): Use union
8965 gdb_sockaddr_u.
8966
8967 2015-03-07 Pedro Alves <palves@redhat.com>
8968
8969 * configure.ac (build_warnings): Move
8970 -Wdeclaration-after-statement to the C-specific set.
8971 * configure: Regenerate.
8972
8973 2015-03-07 Pedro Alves <palves@redhat.com>
8974
8975 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8976 or <winsock2.h> here. Instead include "gdb_socket.h".
8977 (remote_open): Use union gdb_sockaddr_u.
8978 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8979 or <winsock2.h> here. Instead include "gdb_socket.h".
8980 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8981 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8982 or <sys/un.h>.
8983 (init_named_socket, gdb_agent_helper_thread): Use union
8984 gdb_sockaddr_u.
8985
8986 2015-03-07 Pedro Alves <palves@redhat.com>
8987
8988 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
8989 instead.
8990
8991 2015-03-06 Yao Qi <yao.qi@linaro.org>
8992
8993 * linux-aarch64-low.c (aarch64_insert_point): Use
8994 show_debug_regs as a boolean.
8995 (aarch64_remove_point): Likewise.
8996
8997 2015-03-05 Pedro Alves <palves@redhat.com>
8998
8999 * lynx-low.c (lynx_target_ops): Install NULL hooks for
9000 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
9001 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
9002 * nto-low.c (nto_target_ops): Likewise.
9003 * spu-low.c (spu_target_ops): Likewise.
9004 * win32-low.c (win32_target_ops): Likewise.
9005
9006 2015-03-04 Pedro Alves <palves@redhat.com>
9007
9008 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
9009 Decide whether a breakpoint triggered based on the SIGTRAP's
9010 siginfo.si_code.
9011 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
9012 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
9013 (linux_low_filter_event): Check for breakpoints before checking
9014 watchpoints.
9015 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
9016 siginfo.si_code.
9017 (linux_stopped_by_sw_breakpoint)
9018 (linux_supports_stopped_by_sw_breakpoint)
9019 (linux_stopped_by_hw_breakpoint)
9020 (linux_supports_stopped_by_hw_breakpoint): New functions.
9021 (linux_target_ops): Install new target methods.
9022
9023 2015-03-04 Pedro Alves <palves@redhat.com>
9024
9025 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
9026 * server.c (swbreak_feature, hwbreak_feature): New globals.
9027 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
9028 (captured_main): Clear swbreak_feature and hwbreak_feature.
9029 * server.h (swbreak_feature, hwbreak_feature): Declare.
9030 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
9031 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
9032 supports_stopped_by_hw_breakpoint>: New fields.
9033 (target_supports_stopped_by_sw_breakpoint)
9034 (target_stopped_by_sw_breakpoint)
9035 (target_supports_stopped_by_hw_breakpoint)
9036 (target_stopped_by_hw_breakpoint): Declare.
9037
9038 2015-03-04 Pedro Alves <palves@redhat.com>
9039
9040 enum lwp_stop_reason -> enum target_stop_reason
9041 * linux-low.c (check_stopped_by_breakpoint): Adjust.
9042 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
9043 (linux_wait_1, stuck_in_jump_pad_callback)
9044 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
9045 (linux_stopped_by_watchpoint):
9046 * linux-low.h (enum lwp_stop_reason): Delete.
9047 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
9048 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
9049
9050 2015-03-04 Yao Qi <yao.qi@linaro.org>
9051
9052 * Makefile.in (SFILES): Add linux-aarch64-low.c.
9053
9054 2015-03-03 Gary Benson <gbenson@redhat.com>
9055
9056 * hostio.c (handle_vFile): Fix prefix lengths.
9057
9058 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
9059
9060 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
9061 ptr_bits.
9062
9063 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
9064
9065 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
9066 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
9067 (clean): Add "rm -f" for above C files.
9068 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
9069 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
9070 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
9071 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
9072 * linux-s390-low.c (HWCAP_S390_VX): New macro.
9073 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
9074 (init_registers_s390x_vx_linux64)
9075 (init_registers_s390x_tevx_linux64)
9076 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
9077 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
9078 declarations.
9079 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
9080 (s390_store_vxrs_high): New functions.
9081 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
9082 NT_S390_VXRS_HIGH.
9083 (s390_arch_setup): Add logic for selecting one of the new target
9084 descriptions. Activate the new vector regsets if applicable.
9085 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
9086 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
9087 and init_registers_s390x_tevx_linux64.
9088
9089 2015-03-01 Pedro Alves <palves@redhat.com>
9090
9091 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
9092 parameter.
9093
9094 2015-02-27 Pedro Alves <palves@redhat.com>
9095
9096 * linux-x86-low.c (u_debugreg_offset): New function.
9097 (x86_linux_dr_get, x86_linux_dr_set): Use it.
9098
9099 2015-02-27 Pedro Alves <palves@redhat.com>
9100
9101 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
9102 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
9103 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
9104 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
9105 (ps_lsetfpregs, ps_getpid)
9106 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
9107 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
9108 (ps_lsetxregs, ps_plog): Declare.
9109
9110 2015-02-27 Pedro Alves <palves@redhat.com>
9111
9112 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
9113 IP_AGENT_EXPORT_FUNC.
9114 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
9115 IP_AGENT_EXPORT_FUNC.
9116 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
9117 (IP_AGENT_EXPORT): Delete.
9118 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9119 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
9120 (gdb_trampoline_buffer_error, collecting, gdb_collect)
9121 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
9122 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
9123 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
9124 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
9125 (traceframe_read_count, traceframe_write_count)
9126 (traceframes_created, trace_state_variables, get_raw_reg)
9127 (get_trace_state_variable_value, set_trace_state_variable_value)
9128 (ust_loaded, helper_thread_id, cmd_buf): Use
9129 IPA_SYM_EXPORTED_NAME.
9130 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
9131 (tracepoints) Use IP_AGENT_EXPORT_VAR.
9132 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
9133 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
9134 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
9135 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
9136 EXTERN_C_PUSH/EXTERN_C_POP.
9137 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
9138 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
9139 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
9140 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
9141 (traceframe_write_count, traceframe_read_count)
9142 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
9143 (about_to_request_buffer_space, get_trace_state_variable_value)
9144 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
9145 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
9146 EXTERN_C_PUSH/EXTERN_C_POP.
9147 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
9148 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
9149 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
9150 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
9151 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9152 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
9153 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
9154 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
9155 Define.
9156 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
9157 (IP_AGENT_EXPORT_VAR_DECL): Define.
9158 (tracing): Declare.
9159 (gdb_agent_get_raw_reg): Declare.
9160
9161 2015-02-27 Tom Tromey <tromey@redhat.com>
9162 Pedro Alves <palves@redhat.com>
9163
9164 Rename symbols whose names are reserved C++ keywords throughout.
9165
9166 2015-02-27 Pedro Alves <palves@redhat.com>
9167
9168 * Makefile.in (COMPILER): New, get it from autoconf.
9169 (CXX): Get from autoconf instead.
9170 (COMPILE.pre): Use COMPILER.
9171 (CC-LD): Rename to ...
9172 (CC_LD): ... this. Use COMPILER.
9173 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
9174 (CXX_FOR_TARGET): Default to g++ instead of gcc.
9175 * acinclude.m4: Include build-with-cxx.m4.
9176 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
9177 Disable -Werror by default if building in C++ mode.
9178 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
9179 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
9180 the C++ compiler. Save/restore CXXFLAGS too.
9181 * configure: Regenerate.
9182
9183 2015-02-27 Pedro Alves <palves@redhat.com>
9184
9185 * acinclude.m4: Include libiberty.m4.
9186 * configure.ac: Call libiberty_INIT.
9187 * config.in, configure: Regenerate.
9188
9189 2015-02-26 Pedro Alves <palves@redhat.com>
9190
9191 * linux-low.c (linux_wait_1): When incrementing the PC past a
9192 program breakpoint always use the_low_target.breakpoint_len as
9193 increment, rather than the maximum between that and
9194 the_low_target.decr_pc_after_break.
9195
9196 2015-02-23 Pedro Alves <palves@redhat.com>
9197
9198 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
9199 thread was doing a step-over; always adjust the PC if
9200 we stepped over a permanent breakpoint.
9201 (linux_wait_1): If we stepped over breakpoint that was on top of a
9202 permanent breakpoint, manually advance the PC past it.
9203
9204 2015-02-23 Pedro Alves <palves@redhat.com>
9205
9206 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
9207 modes.
9208 (x86_fill_gregset, x86_store_gregset): Use it when handling
9209 $orig_eax.
9210
9211 2015-02-20 Pedro Alves <palves@redhat.com>
9212
9213 * thread-db.c: Include "nat/linux-procfs.h".
9214 (thread_db_init): Skip listing new threads if the kernel supports
9215 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
9216
9217 2015-02-20 Pedro Alves <palves@redhat.com>
9218
9219 * linux-low.c (status_pending_p_callback): Use ptid_match.
9220
9221 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
9222
9223 PR breakpoints/16812
9224 * linux-low.c (wstatus_maybe_breakpoint): Remove.
9225 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
9226 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
9227
9228 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
9229
9230 PR breakpoints/15956
9231 * tracepoint.c (cmd_qtinit): Add check for current_thread.
9232
9233 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
9234
9235 * linux-low.c (linux_low_btrace_conf): Print size.
9236 * server.c (handle_btrace_conf_general_set): New.
9237 (hanle_general_set): Call handle_btrace_conf_general_set.
9238 (handle_query): Report Qbtrace-conf:bts:size as supported.
9239
9240 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
9241
9242 * linux-low.c (linux_low_enable_btrace): Update parameters.
9243 (linux_low_btrace_conf): New.
9244 (linux_target_ops)<to_btrace_conf>: Initialize.
9245 * server.c (current_btrace_conf): New.
9246 (handle_btrace_enable): Rename to ...
9247 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
9248 to target_enable_btrace. Update comment. Update users.
9249 (handle_qxfer_btrace_conf): New.
9250 (qxfer_packets): Add btrace-conf entry.
9251 (handle_query): Report qXfer:btrace-conf:read as supported packet.
9252 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
9253 (target_ops)<read_btrace_conf>: New.
9254 (target_enable_btrace): Update parameters.
9255 (target_read_btrace_conf): New.
9256
9257 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
9258
9259 * server.c (handle_btrace_general_set): Remove call to
9260 target_supports_btrace.
9261 (supported_btrace_packets): New.
9262 (handle_query): Call supported_btrace_packets.
9263 * target.h: include btrace-common.h.
9264 (btrace_target_info): Removed.
9265 (supports_btrace, target_supports_btrace): Update parameters.
9266
9267 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
9268
9269 * Makefile.in (SFILES): Add common/btrace-common.c.
9270 (OBS): Add common/btrace-common.o.
9271 (btrace-common.o): Add build rules.
9272 * linux-low: Include btrace-common.h.
9273 (linux_low_read_btrace): Use struct btrace_data. Call
9274 btrace_data_init and btrace_data_fini.
9275
9276 2015-02-06 Pedro Alves <palves@redhat.com>
9277
9278 * thread-db.c (find_new_threads_callback): Add debug output.
9279
9280 2015-02-04 Pedro Alves <palves@redhat.com>
9281
9282 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
9283 (resume_stopped_resumed_lwps): New function.
9284 (linux_wait_for_event_filtered): Use it.
9285
9286 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
9287
9288 * Makefile.in (SFILES): Add linux-personality.c.
9289 (linux-personality.o): New rule.
9290 * configure.srv (srv_linux_obj): Add linux-personality.o to the
9291 list of objects to be built.
9292 * linux-low.c: Include nat/linux-personality.h.
9293 (linux_create_inferior): Remove code to disable address space
9294 randomization (moved to ../nat/linux-personality.c). Create
9295 cleanup to disable address space randomization.
9296
9297 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
9298
9299 * Makefile.in (posix-strerror.o): New rule.
9300 (mingw-strerror.o): Likewise.
9301 * configure: Regenerated.
9302 * configure.ac: Source file ../common/common.host. Initialize new
9303 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
9304
9305 2015-01-14 Yao Qi <yao@codesourcery.com>
9306
9307 * Makefile.in (SFILES): Add nat/ppc-linux.c.
9308 (ppc-linux.o): New rule.
9309 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
9310 * configure.ac: AC_CHECK_FUNCS(getauxval).
9311 * config.in: Re-generated.
9312 * configure: Re-generated.
9313 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
9314 ppc64_64bit_inferior_p
9315
9316 2015-01-14 Yao Qi <yao@codesourcery.com>
9317
9318 * linux-ppc-low.c: Include "nat/ppc-linux.h".
9319 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
9320 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
9321 (PT_ORIG_R3, PT_TRAP): Likewise.
9322 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
9323 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
9324 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
9325
9326 2015-01-10 Joel Brobecker <brobecker@adacore.com>
9327
9328 * i387-fp.c (i387_cache_to_xsave): In look over
9329 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
9330 zmmh_low_space field by use of zmmh_high_space.
9331
9332 2015-01-09 Pedro Alves <palves@redhat.com>
9333
9334 * linux-low.c (step_over_bkpt): Move higher up in the file.
9335 (handle_extended_wait): Don't store the stop_pc here.
9336 (get_stop_pc): Adjust comments and rename to ...
9337 (check_stopped_by_breakpoint): ... this. Record whether the LWP
9338 stopped for a software breakpoint or hardware breakpoint.
9339 (thread_still_has_status_pending_p): New function.
9340 (status_pending_p_callback): Use
9341 thread_still_has_status_pending_p. If the event is no longer
9342 interesting, resume the LWP.
9343 (handle_tracepoints): Add assert.
9344 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
9345 (wstatus_maybe_breakpoint): New function.
9346 (cancel_breakpoint): Delete function.
9347 (check_stopped_by_watchpoint): New function, factored out from
9348 linux_low_filter_event.
9349 (lp_status_maybe_breakpoint): Delete function.
9350 (linux_low_filter_event): Remove filter_ptid argument.
9351 Leave thread group exits pending here. Store the LWP's stop PC.
9352 Always leave events pending.
9353 (linux_wait_for_event_filtered): Pull all events out of the
9354 kernel, and leave them all pending.
9355 (count_events_callback, select_event_lwp_callback): Consider all
9356 events.
9357 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
9358 (select_event_lwp): Only give preference to the stepping LWP in
9359 all-stop mode. Adjust comments.
9360 (ignore_event): New function.
9361 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
9362 references to cancel_breakpoints. Adjust to renames. Also give
9363 equal priority to all LWPs that have had events in non-stop mode.
9364 If reporting a software breakpoint event, unadjust the LWP's PC.
9365 (linux_wait): If linux_wait_1 returned an ignored event, retry.
9366 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
9367 Adjust.
9368 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
9369 (resume_status_pending_p): Use thread_still_has_status_pending_p.
9370 (linux_stopped_by_watchpoint): Adjust.
9371 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
9372 * linux-low.h (enum lwp_stop_reason): New.
9373 (struct lwp_info) <stop_pc>: Adjust comment.
9374 <stopped_by_watchpoint>: Delete field.
9375 <stop_reason>: New field.
9376 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
9377 * mem-break.c (software_breakpoint_inserted_here)
9378 (hardware_breakpoint_inserted_here): New function.
9379 * mem-break.h (software_breakpoint_inserted_here)
9380 (hardware_breakpoint_inserted_here): Declare.
9381 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
9382 (cancel_breakpoints): Delete.
9383 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
9384 (upload_fast_traceframes): Remove references to
9385 cancel_breakpoints.
9386
9387 2015-01-09 Pedro Alves <palves@redhat.com>
9388
9389 * thread-db.c (find_new_threads_callback): Ignore thread if the
9390 kernel thread ID is -1.
9391
9392 2015-01-09 Pedro Alves <palves@redhat.com>
9393
9394 * linux-low.c (linux_attach_fail_reason_string): Move to
9395 nat/linux-ptrace.c, and rename.
9396 (linux_attach_lwp): Update comment.
9397 (attach_proc_task_lwp_callback): New function.
9398 (linux_attach): Adjust to rename and use
9399 linux_proc_attach_tgid_threads.
9400 (linux_attach_fail_reason_string): Delete declaration.
9401
9402 2015-01-01 Joel Brobecker <brobecker@adacore.com>
9403
9404 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
9405 * server.c (gdbserver_version): Likewise.
9406
9407 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
9408
9409 * remote-utils.c: Include ctype.h.
9410 (input_interrupt): Explicitly handle the case when the char
9411 received is the NUL byte. Improve the printing of non-ASCII
9412 characters.
9413
9414 2014-12-16 Joel Brobecker <brobecker@adacore.com>
9415
9416 * linux-low.c (linux_low_filter_event): Update call to
9417 linux_enable_event_reporting following the addition of
9418 a new parameter to that function.
9419
9420 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
9421
9422 PR server/17457
9423 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
9424 (AARCH64_FPCR_REGNO): Likewise.
9425 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
9426 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
9427 (aarch64_store_fpregset): Likewise.
9428
9429 2014-12-15 Joel Brobecker <brobecker@adacore.com>
9430
9431 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
9432 Remove FIXME comment about assumption about N.
9433
9434 2014-12-13 Joel Brobecker <brobecker@adacore.com>
9435
9436 * configure.ac: If large-file support is disabled in GDBserver,
9437 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
9438 * configure: Regenerate.
9439
9440 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9441
9442 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
9443 warning upon ENODATA from ptrace.
9444 * linux-s390-low.c (s390_store_tdb): New.
9445 (s390_regsets): Add regset for NT_S390_TDB.
9446
9447 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9448
9449 * linux-low.c (regsets_store_inferior_registers): Skip regsets
9450 without a fill_function.
9451 * linux-s390-low.c (s390_fill_last_break): Remove.
9452 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
9453 (s390_arch_setup): Use regset's size instead of fill_function for
9454 loop end condition.
9455
9456 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9457
9458 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
9459 the regset's store function when ptrace returned an error.
9460 * regcache.c (get_thread_regcache): Invalidate register cache
9461 before fetching inferior's registers.
9462
9463 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9464
9465 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
9466 while-loop as for-loop.
9467 (regsets_store_inferior_registers): Likewise.
9468
9469 2014-11-28 Yao Qi <yao@codesourcery.com>
9470
9471 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
9472 * config.in, configure: Re-generate.
9473 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
9474 is defined.
9475
9476 2014-11-21 Yao Qi <yao@codesourcery.com>
9477
9478 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
9479 (AC_CHECK_HEADERS): Remove malloc.h.
9480 * configure: Re-generated.
9481 * config.in: Re-generated.
9482 * server.h: Don't include alloca.h and malloc.h.
9483 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
9484 Don't include malloc.h.
9485
9486 2014-11-17 Joel Brobecker <brobecker@adacore.com>
9487
9488 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
9489 corresponding ERRNO check in same block.
9490
9491 2014-11-12 Pedro Alves <palves@redhat.com>
9492
9493 * server.c (cont_thread): Update comment.
9494 (start_inferior, attach_inferior): No longer clear cont_thread.
9495 (handle_v_cont): No longer set cont_thread.
9496 (captured_main): Clear cont_thread each time a GDB connects.
9497
9498 2014-11-12 Pedro Alves <palves@redhat.com>
9499
9500 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
9501 thread, and don't resume all threads if the Hc thread has exited.
9502
9503 2014-11-12 Pedro Alves <palves@redhat.com>
9504
9505 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
9506 the process group instead of to a specific LWP.
9507
9508 2014-10-15 Pedro Alves <palves@redhat.com>
9509
9510 PR server/17487
9511 * win32-arm-low.c (arm_set_thread_context): Remove current_event
9512 parameter.
9513 (arm_set_thread_context): Delete.
9514 (the_low_target): Adjust.
9515 * win32-i386-low.c (debug_registers_changed)
9516 (debug_registers_used): Delete.
9517 (update_debug_registers_callback): New function.
9518 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
9519 needing to update their debug registers.
9520 (win32_get_current_dr): New function.
9521 (x86_dr_low_get_addr, x86_dr_low_get_control)
9522 (x86_dr_low_get_status): Fetch the debug register from the thread
9523 record's context.
9524 (i386_initial_stuff): Adjust.
9525 (i386_get_thread_context): Remove current_event parameter. Don't
9526 clear debug_registers_changed nor copy DR values to
9527 debug_reg_state.
9528 (i386_set_thread_context): Delete.
9529 (i386_prepare_to_resume): New function.
9530 (i386_thread_added): Mark the thread as needing to update irs
9531 debug registers.
9532 (the_low_target): Remove i386_set_thread_context and install
9533 i386_prepare_to_resume.
9534 * win32-low.c (win32_get_thread_context): Adjust.
9535 (win32_set_thread_context): Use SetThreadContext
9536 directly.
9537 (win32_prepare_to_resume): New function.
9538 (win32_require_context): New function, factored out from ...
9539 (thread_rec): ... this.
9540 (continue_one_thread): Call win32_prepare_to_resume on each thread
9541 we're about to continue.
9542 (win32_resume): Call win32_prepare_to_resume on the event thread.
9543 * win32-low.h (struct win32_thread_info)
9544 <debug_registers_changed>: New field.
9545 (struct win32_target_ops): Change prototype of set_thread_context,
9546 delete set_thread_context and add prepare_to_resume.
9547 (win32_require_context): New declaration.
9548
9549 2014-10-08 Gary Benson <gbenson@redhat.com>
9550
9551 * server.h: Do not include common-exceptions.h.
9552
9553 2014-10-08 Gary Benson <gbenson@redhat.com>
9554
9555 * server.h: Do not include cleanups.h.
9556
9557 2014-09-30 James Hogan <james.hogan@imgtec.com>
9558
9559 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
9560 mips64-dsp-linux.c.
9561
9562 2014-09-23 Yao Qi <yao@codesourcery.com>
9563
9564 * linux-low.c (lp_status_maybe_breakpoint): New function.
9565 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
9566 (count_events_callback): Likewise.
9567 (select_event_lwp_callback): Likewise.
9568 (cancel_breakpoints_callback): Likewise.
9569
9570 2014-09-19 Don Breazeal <donb@codesourcery.com>
9571
9572 * linux-low.c (handle_extended_wait): Call
9573 linux_ptrace_get_extended_event.
9574 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
9575 linux_is_extended_waitstatus.
9576
9577 2014-09-16 Joel Brobecker <brobecker@adacore.com>
9578
9579 * Makefile.in (CPPFLAGS): Define.
9580 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
9581 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
9582
9583 2014-09-16 Gary Benson <gbenson@redhat.com>
9584
9585 * inferiors.h (current_inferior): Renamed as...
9586 (current_thread): New variable. All uses updated.
9587 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
9588 (maybe_move_out_of_jump_pad): Likewise.
9589 (cancel_breakpoint): Likewise.
9590 (linux_low_filter_event): Likewise.
9591 (wait_for_sigstop): Likewise.
9592 (linux_resume_one_lwp): Likewise.
9593 (need_step_over_p): Likewise.
9594 (start_step_over): Likewise.
9595 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
9596 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
9597 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
9598 and save_inferior as saved_thread.
9599 * regcache.c (get_thread_regcache): Renamed saved_inferior as
9600 saved_thread.
9601 (regcache_invalidate_thread): Likewise.
9602 * remote-utils.c (prepare_resume_reply): Likewise.
9603 * thread-db.c (thread_db_get_tls_address): Likewise.
9604 (disable_thread_event_reporting): Likewise.
9605 (remove_thread_event_breakpoints): Likewise.
9606 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
9607 as saved_thread.
9608 * target.h (set_desired_inferior): Renamed as...
9609 (set_desired_thread): New declaration. All uses updated.
9610 * server.c (myresume): Updated comment to reference thread instead
9611 of inferior.
9612 (handle_serial_event): Likewise.
9613 (handle_target_event): Likewise.
9614
9615 2014-09-12 Tom Tromey <tromey@redhat.com>
9616 Gary Benson <gbenson@redhat.com>
9617
9618 * regcache.h: Include common-regcache.h.
9619 (regcache_read_pc): Don't declare.
9620 * regcache.c (get_thread_regcache_for_ptid): New function.
9621
9622 2014-09-11 Tom Tromey <tromey@redhat.com>
9623 Gary Benson <gbenson@redhat.com>
9624
9625 * symbol.c: New file.
9626 * Makefile.in (SFILES): Add symbol.c.
9627 (OBS): Add symbol.o.
9628
9629 2014-09-11 Gary Benson <gbenson@redhat.com>
9630
9631 * target.c (target_stop_ptid, target_continue_ptid): New
9632 functions.
9633
9634 2014-09-11 Tom Tromey <tromey@redhat.com>
9635 Gary Benson <gbenson@redhat.com>
9636
9637 * target.h: Include target/target.h.
9638 * target.c (target_read_memory, target_read_uint32)
9639 (target_write_memory): New functions.
9640
9641 2014-09-11 Gary Benson <gbenson@redhat.com>
9642
9643 * server.h (debug_hw_points): Don't declare.
9644 * server.c (debug_hw_points): Don't define. Replace all uses
9645 with show_debug_regs.
9646 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
9647 all uses with show_debug_regs.
9648
9649 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
9650
9651 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
9652 endianness into account.
9653 (ppc_supply_ptrace_register): Likewise.
9654
9655 2014-09-03 James Hogan <james.hogan@imgtec.com>
9656
9657 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
9658 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
9659
9660 2014-09-03 Gary Benson <gbenson@redhat.com>
9661
9662 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
9663 ALL_DEBUG_ADDRESS_REGISTERS.
9664
9665 2014-09-02 Gary Benson <gbenson@redhat.com>
9666
9667 * i386-low.h: Renamed as...
9668 * x86-low.h: New file. All type, function and variable name
9669 prefixes changed from "i386_" to "x86_". All references updated.
9670 * i386-low.c: Renamed as...
9671 * x86-low.c: New file. All type, function and variable name
9672 prefixes changed from "i386_" to "x86_". All references updated.
9673
9674 2014-09-02 Gary Benson <gbenson@redhat.com>
9675
9676 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
9677 (x86_linux_new_thread): Likewise.
9678
9679 2014-08-29 Gary Benson <gbenson@redhat.com>
9680
9681 * server.h (setjmp.h): Do not include.
9682 (toplevel): Do not declare.
9683 (common-exceptions.h): Include.
9684 (cleanups.h): Likewise.
9685 * server.c (toplevel): Do not define.
9686 (exit_code): New static global.
9687 (detach_or_kill_for_exit_cleanup): New function.
9688 (main): New function. Original main renamed to...
9689 (captured_main): New function.
9690 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
9691
9692 2014-08-29 Gary Benson <gbenson@redhat.com>
9693
9694 * Makefile.in (SFILES): Add common/common-exceptions.c.
9695 (OBS): Add common-exceptions.o.
9696 (common-exceptions.o): New rule.
9697 * utils.c (prepare_to_throw_exception): New function.
9698
9699 2014-08-29 Gary Benson <gbenson@redhat.com>
9700
9701 * config.in: Regenerate.
9702 * configure: Likewise.
9703
9704 2014-08-29 Gary Benson <gbenson@redhat.com>
9705
9706 * Makefile.in (SFILES): Add common/cleanups.c.
9707 (OBS): cleanups.o.
9708 (cleanups.o): New rule.
9709
9710 2014-08-29 Gary Benson <gbenson@redhat.com>
9711
9712 * utils.c (internal_vwarning): New function.
9713
9714 2014-08-28 Gary Benson <gbenson@redhat.com>
9715
9716 * utils.h (fatal): Remove declaration.
9717 * utils.c (fatal): Remove function.
9718
9719 2014-08-28 Gary Benson <gbenson@redhat.com>
9720
9721 * tracepoint.c (gdb_agent_init): Replace fatal with
9722 perror_with_name.
9723 (initialize_tracepoint): Likewise.
9724
9725 2014-08-28 Gary Benson <gbenson@redhat.com>
9726
9727 * remote-utils.c (remote_prepare): Replace fatal with error.
9728
9729 2014-08-28 Gary Benson <gbenson@redhat.com>
9730
9731 * linux-low.c (linux_async): Replace fatal with warning.
9732 Tidy up and return.
9733 (linux_start_non_stop): Return -1 if linux_async failed.
9734
9735 2014-08-28 Gary Benson <gbenson@redhat.com>
9736
9737 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
9738 gdb_assert.
9739 (i386_dr_low_get_addr): Remove vague comment.
9740 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
9741 gdb_assert.
9742
9743 2014-08-28 Gary Benson <gbenson@redhat.com>
9744
9745 * inferiors.c (get_thread_process): Replace check with gdb_assert.
9746 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
9747 internal_error.
9748 (linux_resume_one_lwp): Likewise.
9749 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
9750 gdb_assert.
9751 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
9752 with internal_error.
9753 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
9754 (init_register_cache): Replace fatal with gdb_assert_not_reached.
9755 (find_register_by_name): Replace fatal with internal_error.
9756 (find_regno): Likewise.
9757 * tdesc.c (init_target_desc): Replace check with gdb_assert.
9758 * thread-db.c (thread_db_create_event): Likewise.
9759 (thread_db_load_search): Likewise.
9760 (try_thread_db_load_1): Likewise.
9761 * tracepoint.c (get_jump_space_head): Replace fatal with
9762 internal_error.
9763 (claim_trampoline_space): Likewise.
9764 (have_fast_tracepoint_trampoline_buffer): Likewise.
9765 (cmd_qtstart): Likewise.
9766 (stop_tracing): Likewise.
9767 (fast_tracepoint_collecting): Likewise.
9768 (target_malloc): Likewise.
9769 (download_tracepoint): Likewise.
9770 (download_trace_state_variables): Replace check with gdb_assert.
9771 (upload_fast_traceframes): Replace fatal with internal_error.
9772
9773 2014-08-19 Tom Tromey <tromey@redhat.com>
9774 Gary Benson <gbenson@redhat.com>
9775
9776 * Makefile.in (SFILES): Add common/common-debug.c.
9777 (OBS): Add common-debug.o.
9778 (common-debug.o): New rule.
9779 * debug.h (debug_printf): Don't declare.
9780 * debug.c (debug_printf): Renamed and rewritten as...
9781 (debug_vprintf): New function.
9782
9783 2014-08-19 Gary Benson <gbenson@redhat.com>
9784
9785 * utils.h: Do not include print-utils.h.
9786
9787 2014-08-19 Tom Tromey <tromey@redhat.com>
9788 Gary Benson <gbenson@redhat.com>
9789
9790 * server.h: Add static assertion.
9791 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
9792
9793 2014-08-19 Tom Tromey <tromey@redhat.com>
9794 Gary Benson <gbenson@redhat.com>
9795
9796 * Makefile.in (SFILES): Add common/errors.c.
9797 (OBS): Add errors.o.
9798 (IPA_OBS): Add errors-ipa.o.
9799 (errors.o): New rule.
9800 (errors-ipa.o): Likewise.
9801 * utils.h (perror_with_name, error, warning): Don't declare.
9802 * utils.c (warning): Renamed and rewritten as...
9803 (vwarning): New function.
9804 (error): Renamed and rewritten as...
9805 (verror): New function.
9806 (internal_error): Renamed and rewritten as...
9807 (internal_verror): New function.
9808
9809 2014-08-07 Gary Benson <gbenson@redhat.com>
9810
9811 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
9812 * configure: Regenerate.
9813 * config.in: Likewise.
9814 * server.h: Do not include errno.h.
9815 * event-loop.c: Likewise.
9816 * hostio-errno.c: Likewise.
9817 * linux-low.c: Likewise.
9818 * remote-utils.c: Likewise.
9819 * spu-low.c: Likewise.
9820 * utils.c: Likewise.
9821 * gdbreplay.c: Unconditionally include errno.h.
9822
9823 2014-08-07 Gary Benson <gbenson@redhat.com>
9824
9825 * server.h: Do not include string.h.
9826 * event-loop.c: Likewise.
9827 * linux-low.c: Likewise.
9828 * regcache.c: Likewise.
9829 * remote-utils.c: Likewise.
9830 * spu-low.c: Likewise.
9831 * utils.c: Likewise.
9832
9833 2014-08-07 Gary Benson <gbenson@redhat.com>
9834
9835 * server.h: Do not include gdb_assert.h.
9836
9837 2014-08-07 Gary Benson <gbenson@redhat.com>
9838
9839 * server.h: Do not include common-utils.h.
9840
9841 2014-08-07 Gary Benson <gbenson@redhat.com>
9842
9843 * server.h: Do not include ptid.h.
9844 * notif.h: Likewise.
9845
9846 2014-08-07 Gary Benson <gbenson@redhat.com>
9847
9848 * server.h: Do not include gdb_locale.h.
9849
9850 2014-08-07 Gary Benson <gbenson@redhat.com>
9851
9852 * server.h: Do not include gdb/signals.h.
9853 * win32-low.c: Likewise.
9854
9855 2014-08-07 Gary Benson <gbenson@redhat.com>
9856
9857 * server.h: Do not include pathmax.h.
9858
9859 2014-08-07 Gary Benson <gbenson@redhat.com>
9860
9861 * server.h: Do not include libiberty.h.
9862 * linux-bfin-low.c: Likewise.
9863
9864 2014-08-07 Gary Benson <gbenson@redhat.com>
9865
9866 * server.h: Do not include ansidecl.h.
9867
9868 2014-08-07 Gary Benson <gbenson@redhat.com>
9869
9870 * linux-x86-low.c: Do not include stddef.h.
9871 * lynx-ppc-low.c: Likewise.
9872 * tracepoint.c: Likewise.
9873
9874 2014-08-07 Gary Benson <gbenson@redhat.com>
9875
9876 * server.h: Do not include stdarg.h.
9877 * nto-low.c: Likewise.
9878
9879 2014-08-07 Gary Benson <gbenson@redhat.com>
9880
9881 * server.h: Do not include stdlib.h.
9882 * inferiors.c: Likewise.
9883 * linux-low.c: Likewise.
9884 * regcache.c: Likewise.
9885 * spu-low.c: Likewise.
9886 * tracepoint.c: Likewise.
9887 * utils.c: Likewise.
9888
9889 2014-08-07 Gary Benson <gbenson@redhat.com>
9890
9891 * server.h: Do not include stdio.h.
9892 * linux-low.c: Likewise.
9893 * remote-utils.c: Likewise.
9894 * spu-low.c: Likewise.
9895 * utils.c: Likewise.
9896 * wincecompat.c: Likewise.
9897
9898 2014-08-06 Gary Benson <gbenson@redhat.com>
9899
9900 * regcache.c (init_register_cache): Move conditionals inside if.
9901
9902 2014-08-06 Gary Benson <gbenson@redhat.com>
9903
9904 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
9905
9906 2014-07-31 Gary Benson <gbenson@redhat.com>
9907
9908 * ax.h: Do not include server.h.
9909 * gdbthread.h: Likewise.
9910 * lynx-low.h: Likewise.
9911 * notif.h: Likewise.
9912
9913 2014-07-30 Gary Benson <gbenson@redhat.com>
9914
9915 * server.h: Include common-defs.h.
9916 Do not include config.h or build-gnulib-gdbserver/config.h.
9917
9918 2014-07-30 Gary Benson <gbenson@redhat.com>
9919
9920 * hostio-errno.c: Move server.h to top of includes list.
9921 * inferiors.c: Likewise.
9922 * linux-x86-low.c: Likewise.
9923 * notif.c: Include server.h.
9924
9925 2014-07-24 Tom Tromey <tromey@redhat.com>
9926 Gary Benson <gbenson@redhat.com>
9927
9928 * server.h (CORE_ADDR): Now unsigned.
9929
9930 2014-07-16 Pedro Alves <palves@redhat.com>
9931
9932 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
9933
9934 2014-07-15 Pedro Alves <palves@redhat.com>
9935
9936 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
9937 copy.
9938
9939 2014-07-11 Pedro Alves <palves@redhat.com>
9940
9941 * linux-low.c (kill_wait_lwp): New function, based on
9942 kill_one_lwp_callback, but use my_waitpid directly.
9943 (kill_one_lwp_callback, linux_kill): Use it.
9944
9945 2014-06-23 Pedro Alves <palves@redhat.com>
9946
9947 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
9948 before setting DR0..DR3.
9949
9950 2014-06-20 Gary Benson <gbenson@redhat.com>
9951
9952 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
9953 * configure: Regenerated.
9954 * config.in: Likewise.
9955
9956 2014-06-20 Gary Benson <gbenson@redhat.com>
9957
9958 * Makefile.in (SFILES): Update locations for files moved
9959 from common to nat.
9960 (object file files): Reordered.
9961
9962 2014-06-20 Gary Benson <gbenson@redhat.com>
9963
9964 * i386-low.h (i386_dr_low_can_set_addr): Removed.
9965 (i386_dr_low_set_addr): Likewise.
9966 (i386_dr_low_get_addr): Likewise.
9967 (i386_dr_low_can_set_control): Likewise.
9968 (i386_dr_low_set_control): Likewise.
9969 (i386_dr_low_get_control): Likewise.
9970 (i386_dr_low_get_status): Likewise.
9971 (i386_get_debug_register_length): Likewise.
9972 * linux-x86-low.c (i386_dr_low_set_addr):
9973 Changed signature. Made static.
9974 (i386_dr_low_get_addr): Likewise.
9975 (i386_dr_low_set_control): Likewise.
9976 (i386_dr_low_get_control): Likewise.
9977 (i386_dr_low_get_status): Likewise.
9978 (i386_dr_low): New global variable.
9979 * win32-i386-low.c (i386_dr_low_set_addr):
9980 Changed signature. Made static.
9981 (i386_dr_low_get_addr): Likewise.
9982 (i386_dr_low_set_control): Likewise.
9983 (i386_dr_low_get_control): Likewise.
9984 (i386_dr_low_get_status): Likewise.
9985 (i386_dr_low): New global variable.
9986
9987 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
9988
9989 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
9990 * Makefile.in (AR, AR_FLAGS): Define.
9991 * configure: Regenerate.
9992
9993 2014-06-19 Gary Benson <gbenson@redhat.com>
9994
9995 * Makefile.in (i386-dregs.o): New rule.
9996 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
9997 * i386-low.c (target.h): Remove include.
9998 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
9999 (DR_CONTROL_SHIFT): Likewise.
10000 (DR_CONTROL_SIZE): Likewise.
10001 (DR_RW_EXECUTE): Likewise.
10002 (DR_RW_WRITE): Likewise.
10003 (DR_RW_READ): Likewise.
10004 (DR_RW_IORW): Likewise.
10005 (DR_LEN_1): Likewise.
10006 (DR_LEN_2): Likewise.
10007 (DR_LEN_4): Likewise.
10008 (DR_LEN_8): Likewise.
10009 (DR_LOCAL_ENABLE_SHIFT): Likewise.
10010 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
10011 (DR_ENABLE_SIZE): Likewise.
10012 (DR_LOCAL_SLOWDOWN): Likewise.
10013 (DR_GLOBAL_SLOWDOWN): Likewise.
10014 (DR_CONTROL_RESERVED): Likewise.
10015 (I386_DR_CONTROL_MASK): Likewise.
10016 (I386_DR_VACANT): Likewise.
10017 (I386_DR_LOCAL_ENABLE): Likewise.
10018 (I386_DR_GLOBAL_ENABLE): Likewise.
10019 (I386_DR_DISABLE): Likewise.
10020 (I386_DR_SET_RW_LEN): Likewise.
10021 (I386_DR_GET_RW_LEN): Likewise.
10022 (I386_DR_WATCH_HIT): Likewise.
10023 (i386_wp_op_t): Likewise.
10024 (i386_show_dr): Likewise.
10025 (i386_length_and_rw_bits): Likewise.
10026 (i386_insert_aligned_watchpoint): Likewise.
10027 (i386_remove_aligned_watchpoint): Likewise.
10028 (i386_handle_nonaligned_watchpoint): Likewise.
10029 i386_update_inferior_debug_regs(): Likewise.
10030 (i386_dr_insert_watchpoint): Likewise.
10031 (i386_dr_remove_watchpoint): Likewise.
10032 (i386_dr_region_ok_for_watchpoint): Likewise.
10033 (i386_dr_stopped_data_address): Likewise.
10034 (i386_dr_stopped_by_watchpoint): Likewise.
10035
10036 2014-06-19 Gary Benson <gbenson@redhat.com>
10037
10038 * i386-low.c (i386_dr_show): Renamed to
10039 i386_show_dr and made static. All uses updated.
10040 (i386_dr_length_and_rw_bits): Renamed to
10041 i386_length_and_rw_bits and made static.
10042 All uses updated.
10043 (i386_dr_insert_aligned_watchpoint): Renamed to
10044 i386_insert_aligned_watchpoint and made static.
10045 All uses updated.
10046 (i386_dr_remove_aligned_watchpoint): Renamed to
10047 i386_remove_aligned_watchpoint and made static.
10048 All uses updated.
10049 (i386_dr_update_inferior_debug_regs): Renamed to
10050 i386_update_inferior_debug_regs and made static.
10051 All uses updated.
10052
10053 2014-06-18 Gary Benson <gbenson@redhat.com>
10054
10055 * i386-low.h (i386_dr_low_can_set_addr): New macro.
10056 (i386_dr_low_can_set_control): Likewise.
10057 (i386_get_debug_register_length): Likewise.
10058 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
10059 (i386_dr_low_can_set_control): Likewise.
10060 (i386_get_debug_register_length): Likewise.
10061
10062 2014-06-17 Gary Benson <gbenson@redhat.com>
10063
10064 * i386-low.h (i386-dregs.h): New include.
10065 (DR_FIRSTADDR): Now in i386-dregs.h.
10066 (DR_LASTADDR): Likewise.
10067 (DR_NADDR): Likewise.
10068 (DR_STATUS): Likewise.
10069 (DR_CONTROL): Likewise.
10070 (i386_debug_reg_state): Likewise.
10071 (i386_dr_insert_watchpoint): Likewise.
10072 (i386_dr_remove_watchpoint): Likewise.
10073 (i386_dr_region_ok_for_watchpoint): Likewise.
10074 (i386_dr_stopped_data_address): Likewise.
10075 (i386_dr_stopped_by_watchpoint): Likewise.
10076 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
10077
10078 2014-06-18 Gary Benson <gbenson@redhat.com>
10079
10080 * i386-low.h (i386_low_insert_watchpoint): Renamed to
10081 i386_dr_insert_watchpoint.
10082 (i386_low_remove_watchpoint): Renamed to
10083 i386_dr_remove_watchpoint.
10084 (i386_low_region_ok_for_watchpoint): Renamed to
10085 i386_dr_region_ok_for_watchpoint.
10086 (i386_low_stopped_data_address): Renamed to
10087 i386_dr_stopped_data_address.
10088 (i386_low_stopped_by_watchpoint): Renamed to
10089 i386_dr_stopped_by_watchpoint.
10090 * i386-low.c (i386_show_dr): Renamed to
10091 i386_dr_show and made nonstatic. All uses updated.
10092 (i386_length_and_rw_bits): Renamed to
10093 i386_dr_length_and_rw_bits and made nonstatic.
10094 All uses updated.
10095 (i386_insert_aligned_watchpoint): Renamed to
10096 i386_dr_insert_aligned_watchpoint and made nonstatic.
10097 All uses updated.
10098 (i386_remove_aligned_watchpoint): Renamed to
10099 i386_dr_remove_aligned_watchpoint and made nonstatic.
10100 All uses updated.
10101 (i386_update_inferior_debug_regs): Renamed to
10102 i386_dr_update_inferior_debug_regs and made nonstatic.
10103 All uses updated.
10104 (i386_low_insert_watchpoint): Renamed to
10105 i386_dr_insert_watchpoint. All uses updated.
10106 (i386_low_remove_watchpoint): Renamed to
10107 i386_dr_remove_watchpoint. All uses updated.
10108 (i386_low_region_ok_for_watchpoint): Renamed to
10109 i386_dr_region_ok_for_watchpoint. All uses updated.
10110 (i386_low_stopped_data_address): Renamed to
10111 i386_dr_stopped_data_address. All uses updated.
10112 (i386_low_stopped_by_watchpoint): Renamed to
10113 i386_dr_stopped_by_watchpoint. All uses updated.
10114
10115 2014-06-18 Gary Benson <gbenson@redhat.com>
10116
10117 * i386-low.c (i386_dr_low_can_set_addr): New macro.
10118 (i386_dr_low_can_set_control): Likewise.
10119 (i386_insert_aligned_watchpoint): New check.
10120
10121 2014-06-18 Gary Benson <gbenson@redhat.com>
10122
10123 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
10124 Renamed to state.
10125
10126 2014-06-18 Gary Benson <gbenson@redhat.com>
10127
10128 * i386-low.c (i386_length_and_rw_bits): Use internal_error
10129 instead of fatal and error.
10130 (i386_handle_nonaligned_watchpoint): Likewise.
10131
10132 2014-06-18 Gary Benson <gbenson@redhat.com>
10133
10134 * i386-low.c (i386_get_debug_register_length): New macro.
10135 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
10136 (i386_show_dr): Use debug_printf instead of fprintf. Use
10137 phex to format values.
10138
10139 2014-06-18 Gary Benson <gbenson@redhat.com>
10140
10141 * i386-low.h: Comment changes.
10142 * i386-low.c: Likewise.
10143
10144 2014-06-18 Gary Benson <gbenson@redhat.com>
10145
10146 * i386-low.c: Whitespace changes.
10147
10148 2014-06-12 Tom Tromey <tromey@redhat.com>
10149
10150 * utils.c (freeargv): Remove.
10151
10152 2014-06-12 Tom Tromey <tromey@redhat.com>
10153
10154 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
10155 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
10156 (parse_debug_format_options): Likewise.
10157 (gdbserver_usage): Likewise.
10158 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
10159 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
10160 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
10161 against libiberty.
10162 ($(LIBGNU)): Depend on libiberty.
10163 (all-lib): Recurse into all subdirs.
10164 (install-only): Invoke "install" target in subdirs.
10165 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
10166 targets.
10167 * configure: Rebuild.
10168 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
10169 for vasprintf, vsnprintf, or gettimeofday.
10170 * configure.srv: Don't add safe-ctype.o or lbasename.o to
10171 srv_tgtobj.
10172
10173 2014-06-05 Joel Brobecker <brobecker@adacore.com>
10174
10175 * development.sh: Delete.
10176 * Makefile.in (config.status): Adjust dependency on development.sh.
10177 * configure.ac: Adjust development.sh source call.
10178 * configure: Regenerate.
10179
10180 2014-06-02 Pedro Alves <palves@redhat.com>
10181
10182 * ax.c (gdb_free_agent_expr): New function.
10183 * ax.h (gdb_free_agent_expr): New declaration.
10184 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
10185 list.
10186 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
10187 static.
10188 (clear_breakpoint_conditions_and_commands): New function.
10189 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
10190 (clear_breakpoint_conditions_and_commands): New declaration.
10191
10192 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
10193
10194 * linux-aarch64-low.c (asm/ptrace.h): Include.
10195
10196 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10197
10198 Fix TLS access for -static -pthread.
10199 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
10200 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
10201 (thread_db_load_search, try_thread_db_load_1): Initialize it.
10202
10203 2014-05-20 Pedro Alves <palves@redhat.com>
10204
10205 * linux-aarch64-low.c (aarch64_insert_point)
10206 (aarch64_remove_point): No longer check whether the type is
10207 supported here. Adjust to new interface.
10208 (the_low_target): Install aarch64_supports_z_point_type as
10209 supports_z_point_type method.
10210 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
10211 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
10212 instead of a Z packet char. Adjust.
10213 (arm_supports_z_point_type): New function.
10214 (arm_insert_point, arm_remove_point): Adjust to new interface.
10215 (the_low_target): Install arm_supports_z_point_type.
10216 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
10217 (cris_insert_point, cris_remove_point): Adjust to new interface.
10218 Don't check whether the type is supported here.
10219 (the_low_target): Install cris_supports_z_point_type.
10220 * linux-low.c (linux_supports_z_point_type): New function.
10221 (linux_insert_point, linux_remove_point): Adjust to new interface.
10222 * linux-low.h (struct linux_target_ops) <insert_point,
10223 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
10224 raw_breakpoint pointer parameter.
10225 <supports_z_point_type>: New method.
10226 * linux-mips-low.c (mips_supports_z_point_type): New function.
10227 (mips_insert_point, mips_remove_point): Adjust to new interface.
10228 Use mips_supports_z_point_type.
10229 (the_low_target): Install mips_supports_z_point_type.
10230 * linux-ppc-low.c (the_low_target): Install NULL as
10231 supports_z_point_type method.
10232 * linux-s390-low.c (the_low_target): Install NULL as
10233 supports_z_point_type method.
10234 * linux-sparc-low.c (the_low_target): Install NULL as
10235 supports_z_point_type method.
10236 * linux-x86-low.c (x86_supports_z_point_type): New function.
10237 (x86_insert_point): Adjust to new insert_point interface. Use
10238 insert_memory_breakpoint. Adjust to new
10239 i386_low_insert_watchpoint interface.
10240 (x86_remove_point): Adjust to remove_point interface. Use
10241 remove_memory_breakpoint. Adjust to new
10242 i386_low_remove_watchpoint interface.
10243 (the_low_target): Install x86_supports_z_point_type.
10244 * lynx-low.c (lynx_target_ops): Install NULL as
10245 supports_z_point_type callback.
10246 * nto-low.c (nto_supports_z_point_type): New.
10247 (nto_insert_point, nto_remove_point): Adjust to new interface.
10248 (nto_target_ops): Install nto_supports_z_point_type.
10249 * mem-break.c: Adjust intro comment.
10250 (struct raw_breakpoint) <raw_type, size>: New fields.
10251 <inserted>: Update comment.
10252 <shlib_disabled>: Delete field.
10253 (enum bkpt_type) <gdb_breakpoint>: Delete value.
10254 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
10255 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
10256 (raw_bkpt_type_to_target_hw_bp_type): New function.
10257 (find_enabled_raw_code_breakpoint_at): New function.
10258 (find_raw_breakpoint_at): New type and size parameters. Use them.
10259 (insert_memory_breakpoint): New function, based off
10260 set_raw_breakpoint_at.
10261 (remove_memory_breakpoint): New function.
10262 (set_raw_breakpoint_at): Reimplement.
10263 (set_breakpoint): New, based on set_breakpoint_at.
10264 (set_breakpoint_at): Reimplement.
10265 (delete_raw_breakpoint): Go through the_target->remove_point
10266 instead of assuming memory breakpoints.
10267 (find_gdb_breakpoint_at): Delete.
10268 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
10269 (find_gdb_breakpoint): New function.
10270 (set_gdb_breakpoint_at): Delete.
10271 (z_type_supported): New function.
10272 (set_gdb_breakpoint_1): New function, loosely based off
10273 set_gdb_breakpoint_at.
10274 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
10275 (delete_gdb_breakpoint_at): Delete.
10276 (delete_gdb_breakpoint_1): New function, loosely based off
10277 delete_gdb_breakpoint_at.
10278 (delete_gdb_breakpoint): New function.
10279 (clear_gdb_breakpoint_conditions): Rename to ...
10280 (clear_breakpoint_conditions): ... this. Don't handle a NULL
10281 breakpoint.
10282 (add_condition_to_breakpoint): Make static.
10283 (add_breakpoint_condition): Take a struct breakpoint pointer
10284 instead of an address. Adjust.
10285 (gdb_condition_true_at_breakpoint): Rename to ...
10286 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
10287 z_type parameter.
10288 (gdb_condition_true_at_breakpoint): Reimplement.
10289 (add_breakpoint_commands): Take a struct breakpoint pointer
10290 instead of an address. Adjust.
10291 (gdb_no_commands_at_breakpoint): Rename to ...
10292 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
10293 parameter. Return true if no breakpoint was found. Change debug
10294 output.
10295 (gdb_no_commands_at_breakpoint): Reimplement.
10296 (run_breakpoint_commands): Rename to ...
10297 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
10298 and change return type to boolean.
10299 (run_breakpoint_commands): New function.
10300 (gdb_breakpoint_here): Also check for Z1 breakpoints.
10301 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
10302 breakpoint. Go through the_target->remove_point instead of
10303 assuming memory breakpoint.
10304 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
10305 software and hardware breakpoints.
10306 (reinsert_raw_breakpoint): Go through the_target->insert_point
10307 instead of assuming memory breakpoint.
10308 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
10309 software and hardware breakpoints.
10310 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
10311 Check both software and hardware breakpoints.
10312 (validate_inserted_breakpoint): Assert the breakpoint is a
10313 software breakpoint. Set the inserted flag to -1 instead of
10314 setting shlib_disabled.
10315 (delete_disabled_breakpoints): Adjust.
10316 (validate_breakpoints): Only validate software breakpoints.
10317 Adjust to inserted flag change.
10318 (check_mem_read, check_mem_write): Skip breakpoint types other
10319 than software breakpoints. Adjust to inserted flag change.
10320 * mem-break.h (enum raw_bkpt_type): New enum.
10321 (raw_breakpoint, struct process_info): Forward declare.
10322 (Z_packet_to_target_hw_bp_type): Delete declaration.
10323 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
10324 (set_gdb_breakpoint, delete_gdb_breakpoint)
10325 (clear_breakpoint_conditions): New declarations.
10326 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
10327 (breakpoint_inserted_here): Update comment.
10328 (add_breakpoint_condition, add_breakpoint_commands): Replace
10329 address parameter with a breakpoint pointer parameter.
10330 (gdb_breakpoint_here): Update comment.
10331 (delete_gdb_breakpoint_at): Delete.
10332 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
10333 * server.c (process_point_options): Take a struct breakpoint
10334 pointer instead of an address. Adjust.
10335 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
10336 delete_gdb_breakpoint.
10337 * spu-low.c (spu_target_ops): Install NULL as
10338 supports_z_point_type method.
10339 * target.h: Include mem-break.h.
10340 (struct target_ops) <prepare_to_access_memory>: Update comment.
10341 <supports_z_point_type>: New field.
10342 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
10343 instead of a char. Also take a raw breakpoint pointer.
10344 * win32-arm-low.c (the_low_target): Install NULL as
10345 supports_z_point_type.
10346 * win32-i386-low.c (i386_supports_z_point_type): New function.
10347 (i386_insert_point, i386_remove_point): Adjust to new interface.
10348 (the_low_target): Install i386_supports_z_point_type.
10349 * win32-low.c (win32_supports_z_point_type): New function.
10350 (win32_insert_point, win32_remove_point): Adjust to new interface.
10351 (win32_target_ops): Install win32_supports_z_point_type.
10352 * win32-low.h (struct win32_target_ops):
10353 <supports_z_point_type>: New method.
10354 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
10355 instead of a char. Also take a raw breakpoint pointer.
10356
10357 2014-05-20 Pedro Alves <palves@redhat.com>
10358
10359 * mem-break.h: Include break-common.h.
10360 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
10361 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
10362 (Z_packet_to_target_hw_bp_type): New declaration.
10363 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
10364 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
10365 (Z_PACKET_ACCESS_WP): Delete macros.
10366 (Z_packet_to_hw_type): Delete function.
10367 * i386-low.h: Don't include break-common.h here.
10368 (Z_packet_to_hw_type): Delete declaration.
10369 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
10370 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
10371 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
10372 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
10373 * linux-aarch64-low.c: Don't include break-common.h here.
10374 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
10375 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
10376 (Z_packet_to_target_hw_bp_type): Delete function.
10377 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
10378 function.
10379 (mips_insert_point, mips_remove_point): Use
10380 Z_packet_to_target_hw_bp_type.
10381
10382 2014-05-20 Pedro Alves <palves@redhat.com>
10383
10384 * linux-aarch64-low.c: Include break-common.h.
10385 (enum target_point_type): Delete.
10386 (Z_packet_to_point_type): Rename to ...
10387 (Z_packet_to_target_hw_bp_type): ... this, and return a
10388 target_hw_bp_type instead.
10389 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
10390 instead of an enum target_point_type.
10391 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
10392 breakpoint type.
10393 (aarch64_dr_state_insert_one_point)
10394 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
10395 (aarch64_handle_aligned_watchpoint)
10396 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
10397 Take an enum target_hw_bp_type instead of an enum
10398 target_point_type.
10399 (aarch64_supports_z_point_type): New function.
10400 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
10401 use Z_packet_to_target_hw_bp_type.
10402
10403 2014-05-20 Joel Brobecker <brobecker@adacore.com>
10404
10405 * configure.ac: Only use -Werror by default when DEVELOPMENT
10406 is true.
10407 * configure: Regenerate.
10408
10409 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
10410
10411 Fix gdbserver qGetTLSAddr for x86_64 -m32.
10412 * linux-x86-low.c (X86_64_USER_REGS): New.
10413 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
10414
10415 2014-04-28 Yao Qi <yao@codesourcery.com>
10416
10417 * Makefile.in (i386-avx512.c): Fix the typo of generated file
10418 name.
10419
10420 2014-04-25 Pedro Alves <palves@redhat.com>
10421
10422 PR server/16255
10423 * linux-low.c (linux_attach_fail_reason_string): New function.
10424 (linux_attach_lwp): Delete.
10425 (linux_attach_lwp_1): Rename to ...
10426 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
10427 argument. Remove "initial" parameter. Return int instead of
10428 void. Don't error or warn here.
10429 (linux_attach): Adjust to call linux_attach_lwp. Call error on
10430 failure to attach to the tgid. Call warning when failing to
10431 attach to an lwp.
10432 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
10433 argument. Remove "initial" parameter. Return int instead of
10434 void. Don't error or warn here.
10435 (linux_attach_fail_reason_string): New declaration.
10436 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
10437 interface change. Use linux_attach_fail_reason_string.
10438
10439 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
10440 Walfred Tedeschi <walfred.tedeschi@intel.com>
10441
10442 * Makefile.in: Added rules to handle new files
10443 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
10444 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
10445 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
10446 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
10447 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
10448 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
10449 x32-avx512-linux.o.
10450 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
10451 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
10452 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
10453 i386/x32-avx512.xml.
10454 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
10455 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
10456 i386/x32-avx512-linux.xml.
10457 * i387-fp.c (num_avx512_k_registers): New constant for number
10458 of K registers.
10459 (num_avx512_zmmh_low_registers): New constant for number of
10460 lower ZMM registers (0-15).
10461 (num_avx512_zmmh_high_registers): New constant for number of
10462 higher ZMM registers (16-31).
10463 (num_avx512_ymmh_registers): New contant for number of higher
10464 YMM registers (ymm16-31 added by avx521 on x86_64).
10465 (num_avx512_xmm_registers): New constant for number of higher
10466 XMM registers (xmm16-31 added by AVX512 on x86_64).
10467 (struct i387_xsave): Add space for AVX512 registers.
10468 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
10469 Add code to handle AVX512 registers.
10470 (i387_xsave_to_cache): Add code to handle AVX512 registers.
10471 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
10472 prototypei from generated file.
10473 (tdesc_amd64_avx512_linux): Likewise.
10474 (init_registers_x32_avx512_linux): Likewise.
10475 (tdesc_x32_avx512_linux): Likewise.
10476 (init_registers_i386_avx512_linux): Likewise.
10477 (tdesc_i386_avx512_linux): Likewise.
10478 (x86_64_regmap): Add AVX512 registers.
10479 (x86_linux_read_description): Add code to handle AVX512 XSTATE
10480 mask.
10481 (initialize_low_arch): Add code to initialize AVX512 registers.
10482
10483 2014-04-23 Pedro Alves <palves@redhat.com>
10484
10485 * mem-break.c (find_gdb_breakpoint_at): Make static.
10486 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
10487
10488 2014-04-23 Pedro Alves <palves@redhat.com>
10489
10490 * i386-low.c: Don't include break-common.h here.
10491 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
10492 prototype to take target_hw_bp_type as argument instead of a Z
10493 packet char.
10494 * i386-low.h: Include break-common.h here.
10495 (Z_packet_to_hw_type): Declare.
10496 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
10497 prototypes.
10498 * linux-x86-low.c (x86_insert_point): Convert the packet number to
10499 a target_hw_bp_type before calling i386_low_insert_watchpoint.
10500 (x86_remove_point): Convert the packet number to a
10501 target_hw_bp_type before calling i386_low_remove_watchpoint.
10502 * win32-i386-low.c (i386_insert_point): Convert the packet number
10503 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
10504 (i386_remove_point): Convert the packet number to a
10505 target_hw_bp_type before calling i386_low_remove_watchpoint.
10506
10507 2014-04-23 Pedro Alves <palves@redhat.com>
10508
10509 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
10510
10511 2014-04-10 Pedro Alves <palves@redhat.com>
10512
10513 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
10514 Check if the condition or command is NULL before checking if the
10515 breakpoint is known. On success, return true.
10516 * mem-break.h (add_breakpoint_condition): Document return.
10517 (add_breakpoint_commands): Add describing comment.
10518 * server.c (skip_to_semicolon): New function.
10519 (process_point_options): Use it.
10520
10521 2014-04-09 Pedro Alves <palves@redhat.com>
10522
10523 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
10524 to lwpid_of.
10525
10526 2014-02-27 Pedro Alves <palves@redhat.com>
10527
10528 PR 12702
10529 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
10530 macros.
10531 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
10532 output.
10533 (last_thread_of_process_p): Take a PID argument instead of a
10534 thread pointer.
10535 (linux_wait_for_lwp): Delete.
10536 (num_lwps, check_zombie_leaders, not_stopped_callback): New
10537 functions.
10538 (linux_low_filter_event): New function, party factored out from
10539 linux_wait_for_event.
10540 (linux_wait_for_event): Rename to ...
10541 (linux_wait_for_event_filtered): ... this. Add new filter ptid
10542 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
10543 sigsuspend. Check for zombie leaders.
10544 (linux_wait_for_event): Reimplement as wrapper around
10545 linux_wait_for_event_filtered.
10546 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
10547 a normal or signal exit is seen, it's the whole process exiting.
10548 (wait_for_sigstop): No longer a for_each_inferior callback.
10549 Rewrite on top of linux_wait_for_event_filtered.
10550 (stop_all_lwps): Call wait_for_sigstop directly.
10551 * server.c (resume, handle_target_event): Handle
10552 TARGET_WAITKIND_NO_RESUMED.
10553
10554 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10555
10556 * win32-low.c (psapi_get_dll_name,
10557 * win32_CreateToolhelp32Snapshot): Delete.
10558 (win32_CreateToolhelp32Snapshot, win32_Module32First)
10559 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
10560 Delete.
10561 (handle_load_dll): Add function description.
10562 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
10563
10564 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10565
10566 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
10567 Add comment.
10568 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
10569 base address when calling win32_add_one_solib.
10570 (handle_load_dll): Delete local variable load_addr.
10571 Remove 0x1000 offset applied to DLL base address when calling
10572 win32_add_one_solib.
10573 (handle_unload_dll): Add comment.
10574
10575 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10576
10577 * win32-low.c (win32_add_all_dlls): Renames
10578 win32_ensure_ntdll_loaded. Rewrite function documentation.
10579 Adjust implementation to always load all DLLs.
10580 Add 0x1000 offset to DLL base address when calling
10581 win32_add_one_solib.
10582 (child_initialization_done): New static global.
10583 (do_initial_child_stuff): Set child_initialization_done to
10584 zero during child initialization, and 1 after. Replace call
10585 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
10586 Add comment.
10587 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
10588 (handle_unload_dll): Add function documentation.
10589 (get_child_debug_event): Ignore load and unload DLL events
10590 during child initialization.
10591
10592 2014-02-20 Doug Evans <dje@google.com>
10593
10594 Remove global all_lwps.
10595 * inferiors.h (ptid_of): Move here from linux-low.h.
10596 (pid_of, lwpid_of): Ditto.
10597 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
10598 parameter is a struct thread_info * now.
10599 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
10600 directly. Pass &all_threads to find_inferior instead of &all_lwps.
10601 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
10602 directly.
10603 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
10604 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
10605 * linux-arm-low.c (update_registers_callback): Update, "entry"
10606 parameter is a struct thread_info * now.
10607 Fetch lwpid from current_inferior directly.
10608 (arm_insert_point): Pass &all_threads to find_inferior instead of
10609 &all_lwps.
10610 (arm_remove_point): Ditto.
10611 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
10612 (arm_prepare_to_resume): Fetch pid from thread.
10613 (arm_read_description): Fetch lwpid from current_inferior directly.
10614 * linux-low.c (all_lwps): Delete.
10615 (delete_lwp): Delete call to remove_inferior.
10616 (handle_extended_wait): Fetch lwpid from thread.
10617 (add_lwp): Don't set lwp->entry.id. Remove call to
10618 add_inferior_to_list.
10619 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
10620 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
10621 (kill_one_lwp_callback): Ditto.
10622 (linux_kill): Don't dereference NULL pointer.
10623 Fetch ptid,lwpid from thread.
10624 (get_detach_signal): Fetch ptid from thread.
10625 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
10626 Simplify call to regcache_invalidate_thread.
10627 (delete_lwp_callback): Update, "entry" parameter is a
10628 struct thread_info * now. Fetch pid from thread.
10629 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
10630 (status_pending_p_callback): Update, "entry" parameter is a
10631 struct thread_info * now. Fetch ptid from thread.
10632 (find_lwp_pid): Update, "entry" parameter is a
10633 struct thread_info * now.
10634 (linux_wait_for_lwp): Fetch pid from thread.
10635 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
10636 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
10637 (enqueue_one_deferred_signal): Fetch lwpid from thread.
10638 (dequeue_one_deferred_signal): Ditto.
10639 (cancel_breakpoint): Fetch ptid from current_inferior.
10640 (linux_wait_for_event): Pass &all_threads to find_inferior,
10641 not &all_lwps. Fetch ptid, lwpid from thread.
10642 (count_events_callback): Update, "entry" parameter is a
10643 struct thread_info * now.
10644 (select_singlestep_lwp_callback): Ditto.
10645 (select_event_lwp_callback): Ditto.
10646 (cancel_breakpoints_callback): Ditto.
10647 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
10648 not &all_lwps.
10649 (select_event_lwp): Ditto. Fetch ptid from event_thread.
10650 (unsuspend_one_lwp): Update, "entry" parameter is a
10651 struct thread_info * now.
10652 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
10653 not &all_lwps.
10654 (linux_stabilize_threads): Ditto. And for for_each_inferior.
10655 Fetch lwpid from thread, not lwp.
10656 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
10657 Pass &all_threads to find_inferior, not &all_lwps.
10658 (send_sigstop): Fetch lwpid from thread, not lwp.
10659 (send_sigstop_callback): Update, "entry" parameter is a
10660 struct thread_info * now.
10661 (suspend_and_send_sigstop_callback): Ditto.
10662 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
10663 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
10664 struct thread_info * now.
10665 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
10666 from thread, lwp.
10667 (lwp_running): Update, "entry" parameter is a
10668 struct thread_info * now.
10669 (stop_all_lwps): Fetch ptid from thread.
10670 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
10671 (linux_resume_one_lwp): Fetch lwpid from thread.
10672 (linux_set_resume_request): Update, "entry" parameter is a
10673 struct thread_info * now. Fetch pid, lwpid from thread.
10674 (resume_status_pending_p): Update, "entry" parameter is a
10675 struct thread_info * now.
10676 (need_step_over_p): Ditto. Fetch lwpid from thread.
10677 (start_step_over): Fetch lwpid from thread.
10678 (linux_resume_one_thread): Update, "entry" parameter is a
10679 struct thread_info * now. Fetch lwpid from thread.
10680 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
10681 (proceed_one_lwp): Update, "entry" parameter is a
10682 struct thread_info * now. Fetch lwpid from thread.
10683 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
10684 struct thread_info * now.
10685 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
10686 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
10687 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
10688 directly.
10689 (regsets_store_inferior_registers): Ditto.
10690 (fetch_register, store_register): Ditto.
10691 (linux_read_memory, linux_write_memory): Ditto.
10692 (linux_request_interrupt): Ditto.
10693 (linux_read_auxv): Ditto.
10694 (linux_xfer_siginfo): Ditto.
10695 (linux_qxfer_spu): Ditto.
10696 (linux_qxfer_libraries_svr4): Ditto.
10697 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
10698 moved to inferiors.h.
10699 (get_lwp): Delete.
10700 (get_thread_lwp): Update.
10701 (struct lwp_info): Delete member "entry". Simplify comment for
10702 member "thread".
10703 (all_lwps): Delete.
10704 * linux-mips-low.c (mips_read_description): Fetch lwpid from
10705 current_inferior directly.
10706 (update_watch_registers_callback): Update, "entry" parameter is a
10707 struct thread_info * now. Fetch pid from thread.
10708 (mips_linux_prepare_to_resume): Fetch ptid from thread.
10709 (mips_insert_point): Fetch lwpid from current_inferior.
10710 Pass &all_threads to find_inferior, not &all_lwps.
10711 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
10712 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
10713 directly.
10714 (mips_stopped_data_address): Ditto.
10715 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
10716 directly.
10717 * linux-tile-low.c (tile_arch_setup): Ditto.
10718 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
10719 (update_debug_registers_callback): Update, "entry" parameter is a
10720 struct thread_info * now. Fetch pid from thread.
10721 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
10722 Pass &all_threads to find_inferior, not &all_lwps.
10723 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
10724 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
10725 Pass &all_threads to find_inferior, not &all_lwps.
10726 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
10727 (i386_dr_low_get_status): Ditto.
10728 (x86_linux_prepare_to_resume): Fetch ptid from thread.
10729 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
10730 (x86_linux_read_description): Ditto.
10731 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
10732
10733 2014-02-20 Doug Evans <dje@google.com>
10734
10735 * inferiors.c (get_first_inferior): Fix buglet.
10736
10737 2014-02-19 Doug Evans <dje@google.com>
10738
10739 * gdbthread.h (add_thread): Change result type to struct thread_info *.
10740 * inferiors.c (add_thread): Change result type to struct thread_info *.
10741 All callers updated.
10742 (add_lwp): Call add_thread here instead of in callers.
10743 All callers updated.
10744 * linux-low.h (get_lwp_thread): Rewrite.
10745 (struct lwp_info): New member "thread".
10746
10747 2014-02-19 Doug Evans <dje@google.com>
10748
10749 * linux-low.c (add_lwp): Change result to struct lwp_info *.
10750 All callers updated.
10751
10752 2014-02-19 Doug Evans <dje@google.com>
10753
10754 * inferiors.c (add_thread): Fix whitespace.
10755
10756 2014-02-19 Doug Evans <dje@google.com>
10757
10758 * dll.c (clear_dlls): Replace accessing list implemention details
10759 with API function.
10760 * gdbthread.h (get_first_thread): Declare.
10761 * inferiors.c (for_each_inferior_with_data): New function.
10762 (get_first_thread): New function.
10763 (find_thread_ptid): Simplify.
10764 (get_first_inferior): New function.
10765 (clear_list): Delete.
10766 (one_inferior_p): New function.
10767 (clear_inferior_list): New function.
10768 (clear_inferiors): Update.
10769 * inferiors.h (for_each_inferior_with_data): Declare.
10770 (clear_inferior_list): Declare.
10771 (one_inferior_p): Declare.
10772 (get_first_inferior): Declare.
10773 * linux-low.c (linux_wait_for_event): Replace accessing list
10774 implemention details with API function.
10775 * server.c (target_running): Ditto.
10776 (accumulate_file_name_length): New function.
10777 (emit_dll_description): New function.
10778 (handle_qxfer_libraries): Replace accessing list implemention
10779 details with API function.
10780 (handle_qxfer_threads_worker): New function.
10781 (handle_qxfer_threads_proper): Replace accessing list implemention
10782 details with API function.
10783 (handle_query): Ditto.
10784 (visit_actioned_threads_callback_ftype): New typedef.
10785 (visit_actioned_threads_data): New struct.
10786 (visit_actioned_threads): Rewrite to be find_inferior callback.
10787 (resume): Call find_inferior.
10788 (handle_status): Replace accessing list implemention
10789 details with API function.
10790 (process_serial_event): Replace accessing list implemention details
10791 with API function.
10792 * target.c (set_desired_inferior): Replace accessing list implemention
10793 details with API function.
10794 * tracepoint.c (same_process_p): New function.
10795 (gdb_agent_about_to_close): Replace accessing list implemention
10796 details with API function.
10797 * win32-low.c (child_delete_thread): Replace accessing list
10798 implemention details with API function.
10799 (match_dll_by_basename): New function.
10800 (dll_is_loaded_by_basename): New function.
10801 (win32_ensure_ntdll_loaded): Replace accessing list implemention
10802 details call to dll_is_loaded_by_basename.
10803
10804 2014-02-19 Doug Evans <dje@google.com>
10805
10806 * dll.h (struct dll_info): Add comment.
10807 * gdbthread.h (struct thread_info): Add comment.
10808 (current_ptid): Simplify.
10809 * inferiors.c (add_process): Update.
10810 (remove_process): Update.
10811 * inferiors.h (struct process_info): Rename member "head" to "entry".
10812 * linux-low.c (delete_lwp): Update.
10813 (add_lwp): Update.
10814 (last_thread_of_process_p): Update.
10815 (kill_one_lwp_callback, linux_kill): Update.
10816 (status_pending_p_callback): Update.
10817 (wait_for_sigstop): Update. Simplify read of ptid.
10818 (start_step_over): Update.
10819 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
10820 (get_lwp_thread): Update.
10821 (struct lwp_info): Rename member "head" to "entry".
10822 * regcache.h (inferior_list_entry): Delete.
10823 * server.c (kill_inferior_callback): Update.
10824 (detach_or_kill_inferior_callback): Update.
10825 (print_started_pid): Update.
10826 (print_attached_pid): Update.
10827 (process_serial_event): Simplify read of ptid.
10828 * thread-db.c (thread_db_create_event): Update.
10829 (thread_db_get_tls_address): Update.
10830 * win32-low.c (current_inferior_ptid): Simplify.
10831
10832 2014-02-19 Tom Tromey <tromey@redhat.com>
10833
10834 * target.h (struct target_ops) <supports_btrace>: Add target_ops
10835 argument.
10836 (target_supports_btrace): Update.
10837
10838 2014-02-14 Yao Qi <yao@codesourcery.com>
10839
10840 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
10841 (rsp-low-ipa.o): New target.
10842
10843 2014-02-12 Tom Tromey <tromey@redhat.com>
10844
10845 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
10846 convert_ascii_to_int.
10847 * regcache.c (registers_to_string): Likewise.
10848 * remote-utils.c (decode_M_packet): Likewise.
10849 * server.c (process_serial_event): Likewise.
10850
10851 2014-02-12 Tom Tromey <tromey@redhat.com>
10852
10853 * server.c (handle_query, handle_v_run): Use hex2bin, not
10854 unhexify.
10855 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
10856
10857 2014-02-12 Tom Tromey <tromey@redhat.com>
10858
10859 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
10860 convert_int_to_ascii.
10861 * regcache.c (registers_to_string, collect_register_as_string):
10862 Likewise.
10863 * remote-utils.c (look_up_one_symbol, relocate_instruction):
10864 Likewise.
10865 * server.c (process_serial_event): Likewise.
10866 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
10867 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
10868
10869 2014-02-12 Tom Tromey <tromey@redhat.com>
10870
10871 * remote-utils.c (look_up_one_symbol, monitor_output): Use
10872 bin2hex, not hexify.
10873 * tracepoint.c (cmd_qtstatus): Likewise.
10874
10875 2014-02-12 Tom Tromey <tromey@redhat.com>
10876
10877 * remote-utils.c (monitor_output): Pass explicit length to
10878 hexify.
10879
10880 2014-02-12 Tom Tromey <tromey@redhat.com>
10881
10882 * tracepoint.c: Include rsp-low.h.
10883 * server.c: Include rsp-low.h.
10884 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
10885 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
10886 declare.
10887 * remote-utils.c: Include rsp-low.h.
10888 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
10889 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
10890 (convert_int_to_ascii, convert_ascii_to_int): Move to
10891 common/rsp-low.c.
10892 * regcache.c: Include rsp-low.h.
10893 * ax.c: Include rsp-low.h.
10894 * Makefile.in (SFILES): Add common/rsp-low.c.
10895 (OBS): Add rsp-low.o.
10896 (rsp-low.o): New target.
10897
10898 2014-02-12 Tom Tromey <tromey@redhat.com>
10899
10900 * utils.h (pulongest, plongest, phex_nz): Don't declare.
10901 Include print-utils.h.
10902 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
10903 (plongest, thirty_two, phex_nz): Remove.
10904 * Makefile.in (SFILES): Add common/print-utils.c.
10905 (OBS): Add print-utils.o.
10906 (print-utils-ipa.o): New target.
10907 (print-utils.o): New target.
10908 (IPA_OBJS): Add print-utils-ipa.o.
10909
10910 2014-02-06 Tom Tromey <tromey@redhat.com>
10911
10912 * Makefile.in (SFILES): Fix indentation.
10913
10914 2014-02-05 Doug Evans <dje@google.com>
10915
10916 * linux-low.c (linux_wait_for_event): Improve comment.
10917 (linux_wait_1): Keep current_inferior in sync with event_child.
10918
10919 2014-01-22 Doug Evans <dje@google.com>
10920
10921 * gdbthread.h (gdb_id_to_thread): Delete, unused.
10922
10923 2014-01-22 Doug Evans <dje@google.com>
10924
10925 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
10926 * configure: Regenerate.
10927 * config.in: Regenerate.
10928 * Makefile.in (SFILES): Add debug.c.
10929 (OBS): Add debug.o.
10930 * debug.c: New file.
10931 * debug.h: New file.
10932 * linux-aarch64-low.c (*): Update all debugging printfs to use
10933 debug_printf instead of fprintf.
10934 * linux-arm-low.c (*): Ditto.
10935 * linux-cris-low.c (*): Ditto.
10936 * linux-crisv32-low.c (*): Ditto.
10937 * linux-m32r-low.c (*): Ditto.
10938 * linux-sparc-low.c (*): Ditto.
10939 * linux-x86.c (*): Ditto.
10940 * linux-low.c (*): Ditto.
10941 (linux_wait_1): Add calls to debug_enter, debug_exit.
10942 (linux_wait): Remove redundant debugging printf.
10943 (stop_all_lwps): Add calls to debug_enter, debug_exit.
10944 (linux_resume, unstop_all_lwps): Ditto.
10945 * mem-break.c (*): Update all debugging printfs to use
10946 debug_printf instead of fprintf.
10947 * remote-utils.c (*): Ditto.
10948 * thread-db.c (*): Ditto.
10949 * server.c #include <ctype.h>, "gdb_vecs.h".
10950 (debug_threads): Moved to debug.c.
10951 (*): Update all debugging printfs to use debug_printf instead of
10952 fprintf.
10953 (start_inferior): Replace call to fflush with call to debug_flush.
10954 (monitor_show_help): Mention set debug-format.
10955 (parse_debug_format_options): New function.
10956 (handle_monitor_command): Handle "monitor set debug-format".
10957 (gdbserver_usage): Mention --debug-format.
10958 (main): Parse --debug-format.
10959 * server.h (debug_threads): Declaration moved to debug.h.
10960 #include "debug.h".
10961 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
10962 trace_debug_1 that uses debug_printf.
10963 (tracepoint_look_up_symbols): Update all debugging printfs to use
10964 debug_printf instead of fprintf.
10965
10966 2014-01-20 Baruch Siach <baruch@tkos.co.il>
10967
10968 * linux-xtensa-low.c: Include asm/ptrace.h instead of
10969 sys/ptrace.h.
10970
10971 2014-01-17 Pedro Alves <palves@redhat.com>
10972
10973 PR build/16445
10974 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
10975 defined after including gdb_proc_service.h.
10976
10977 2014-01-16 Doug Evans <dje@google.com>
10978
10979 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
10980 (match_dll): Use it.
10981
10982 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
10983
10984 * target.h (target_ops) <read_btrace>: Change parameters and
10985 return type to allow error reporting.
10986 * server.c (handle_qxfer_btrace): Support delta reads. Pass
10987 trace reading errors on.
10988 * linux-low.c (linux_low_read_btrace): Pass trace reading
10989 errors on.
10990 (linux_low_disable_btrace): New.
10991
10992 2014-01-15 Doug Evans <dje@google.com>
10993
10994 * inferiors.c (thread_id_to_gdb_id): Delete.
10995 * inferiors.h (thread_id_to_gdb_id): Delete.
10996
10997 2014-01-13 Eli Zaretskii <eliz@gnu.org>
10998
10999 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
11000 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
11001 versions.
11002
11003 2014-01-08 Pedro Alves <palves@redhat.com>
11004
11005 * server.c (handle_status): Don't discard previous queued stop
11006 replies or thread's pending status here.
11007 (main) <disconnection>: Do it here instead.
11008
11009 2014-01-08 Pedro Alves <palves@redhat.com>
11010
11011 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
11012 * server.c (visit_actioned_threads, handle_pending_status): New
11013 function.
11014 (handle_v_cont): Factor out parts to ...
11015 (resume): ... this new function. If in all-stop, and a thread
11016 being resumed has a pending status, report it without actually
11017 resuming.
11018 (myresume): Adjust to use the new 'resume' function.
11019 (clear_pending_status_callback, set_pending_status_callback)
11020 (find_status_pending_thread_callback): New functions.
11021 (handle_status): Handle the case of multiple threads having
11022 interesting statuses to report. Report threads' real last signal
11023 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
11024 with an interesting thread to report the status for, instead of
11025 always reporting the status of the first thread.
11026
11027 2014-01-01 Joel Brobecker <brobecker@adacore.com>
11028
11029 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
11030 * gdbreplay.c (gdbreplay_version): Likewise.
11031
11032 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
11033
11034 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
11035 iov.iov_len with the real length in use.
11036
11037 2013-12-13 Joel Brobecker <brobecker@adacore.com>
11038
11039 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
11040 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
11041 for all targets that use win32-low.c.
11042 * win32-low.c (win32_ensure_ntdll_loaded): New function.
11043 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
11044
11045 2013-12-13 Pedro Alves <palves@redhat.com>
11046
11047 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
11048 if equal to TARGET_WAITKIND_LOADED.
11049 * win32-low.c (cached_status): New static global.
11050 (win32_wait): Add declaration.
11051 (do_initial_child_stuff): Flush all initial pending debug events
11052 up to the initial breakpoint.
11053 (win32_wait): If CACHED_STATUS was set, return that instead
11054 of doing a real wait. Remove the code resuming the execution
11055 of the inferior after receiving a TARGET_WAITKIND_LOADED event
11056 during the initial phase. Also remove the code changing
11057 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
11058 TARGET_WAITKIND_STOPPED.
11059
11060 2013-12-11 Yao Qi <yao@codesourcery.com>
11061
11062 * notif.c (handle_notif_ack): Return 0 if no notification
11063 matches.
11064
11065 2013-11-20 Doug Evans <dje@google.com>
11066
11067 * linux-low.c (linux_set_resume_request): Fix comment.
11068
11069 2013-11-20 Doug Evans <dje@google.com>
11070
11071 * linux-low.c (resume_status_pending_p): Tweak comment.
11072
11073 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
11074
11075 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
11076 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
11077 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
11078 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
11079 (srv_amd64_regobj): Add amd64-mpx.o.
11080 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
11081 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
11082 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
11083 * i387-fp.c (num_pl_bnd_register) Added constant.
11084 (num_pl_bnd_cfg_registers) Added constant.
11085 (struct i387_xsave) Added reserved area and MPX fields.
11086 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
11087 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
11088 function.
11089 (tdesc_i386_mpx_linux): Add MPX amd64 target.
11090 (init_registers_amd64_mpx_linux): Declare new function.
11091 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
11092 (x86_64_regmap): Add MPX registers.
11093 (x86_linux_read_description): Add MPX case.
11094 (initialize_low_arch): Initialize MPX targets.
11095
11096 2013-11-18 Tom Tromey <tromey@redhat.com>
11097
11098 * configure: Rebuild.
11099 * configure.ac: Don't check for stdlib.h.
11100 * gdbreplay.c: Unconditionally include stdlib.h.
11101
11102 2013-11-18 Tom Tromey <tromey@redhat.com>
11103
11104 * config.in: Rebuild.
11105 * configure: Rebuild.
11106 * configure.ac: Don't use AC_HEADER_DIRENT.
11107
11108 2013-11-18 Tom Tromey <tromey@redhat.com>
11109
11110 * server.h: Don't check HAVE_STRING_H.
11111 * gdbreplay.c: Don't check HAVE_STRING_H.
11112 * configure: Rebuild.
11113
11114 2013-11-18 Tom Tromey <tromey@redhat.com>
11115
11116 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
11117 LIBGNU.
11118
11119 2013-11-08 Tom Tromey <tromey@redhat.com>
11120
11121 * configure, config.in: Rebuild.
11122 * configure.ac: Remove unused configury.
11123
11124 2013-11-08 Tom Tromey <tromey@redhat.com>
11125
11126 * acinclude.m4: Include common.m4, codeset.m4.
11127 * configure, config.in: Rebuild.
11128 * configure.ac: Use GDB_AC_COMMON.
11129
11130 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
11131
11132 * linux-s390-low.c (HWCAP_S390_TE): New define.
11133 (s390_arch_setup): Consider the TE field in the HWCAP for
11134 determining 'have_regset_tdb'.
11135
11136 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
11137
11138 PR gdb/16014
11139 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
11140 call to sizeof.
11141
11142 2013-10-02 Pedro Alves <palves@redhat.com>
11143
11144 * server.c (process_serial_event): Don't output "GDBserver
11145 exiting" if GDB is connected through stdio.
11146 * target.c (mywait): Likewise, be silent if GDB is connected
11147 through stdio.
11148
11149 2013-10-01 Joel Brobecker <brobecker@adacore.com>
11150
11151 * lynx-low.c (lynx_add_threads_after_attach): New function.
11152 (lynx_attach): Remove call to add_thread. Add call to
11153 lynx_add_threads_after_attach instead.
11154
11155 2013-09-28 Mike Frysinger <vapier@gentoo.org>
11156
11157 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
11158 * config.in, configure: Regenerated.
11159
11160 2013-09-18 Yao Qi <yao@codesourcery.com>
11161
11162 PR server/15959
11163 * server.c (start_inferior): Clear 'resume_info'.
11164
11165 2013-09-16 Jiong Wang <jiwang@tilera.com>
11166
11167 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
11168 for each register.
11169
11170 2013-09-16 Jiong Wang <jiwang@tilera.com>
11171
11172 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
11173 linux-tile-low.o to srv_tgtobj.
11174
11175 2013-09-16 Will Newton <will.newton@linaro.org>
11176
11177 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
11178 out regs.
11179
11180 2013-09-06 Pedro Alves <palves@redhat.com>
11181
11182 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
11183 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
11184 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
11185 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
11186 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
11187 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
11188
11189 2013-09-06 Pedro Alves <palves@redhat.com>
11190
11191 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
11192 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
11193
11194 2013-09-06 Pedro Alves <palves@redhat.com>
11195
11196 * linux-amd64-ipa.c: Include tracepoint.h.
11197 * linux-i386-ipa.c: Include tracepoint.h.
11198
11199 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
11200
11201 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
11202 (ps_get_thread_area): New function.
11203
11204 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
11205
11206 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
11207 (initialize_low_arch): Call init_registers_crisv32 rather than
11208 init_register_crisv32.
11209
11210 2013-09-05 Pedro Alves <palves@redhat.com>
11211
11212 * server.h (handle_vFile, hostio_last_error_from_errno): Move
11213 to ...
11214 * hostio.h: ... this new file.
11215 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
11216 win32-low.c: Include hostio.h.
11217
11218 2013-09-05 Pedro Alves <palves@redhat.com>
11219
11220 * server.h (gdb_client_data, handler_func, callback_handler_func)
11221 (delete_file_handler, add_file_handler, append_callback_event)
11222 (delete_callback_event, start_event_loop, initialize_event_loop):
11223 Move to event-loop.h and include it.
11224 * event-loop.h: New file.
11225
11226 2013-09-05 Pedro Alves <palves@redhat.com>
11227
11228 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
11229 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
11230 (loaded_dll, unloaded_dll): Move to ...
11231 * dll.h: ... this new file.
11232 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
11233
11234 2013-09-05 Pedro Alves <palves@redhat.com>
11235
11236 * server.h (current_process, get_thread_process, all_processes)
11237 (add_inferior_to_list, for_each_inferior, current_inferior)
11238 (remove_inferior, add_process, remove_process, find_process_pid)
11239 (have_started_inferiors_p, have_attached_inferiors_p)
11240 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
11241 (clear_inferiors, find_inferior, find_inferior_id)
11242 (inferior_target_data, set_inferior_target_data)
11243 (inferior_regcache_data, set_inferior_regcache_data): Move to
11244 inferiors.h, and include it.
11245 * inferiors.h: New file.
11246
11247 2013-09-05 Pedro Alves <palves@redhat.com>
11248
11249 * server.h (struct emit_ops, current_insn_ptr, emit_error):
11250 Move ...
11251 * ax.h: ... here.
11252
11253 2013-09-05 Pedro Alves <palves@redhat.com>
11254
11255 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
11256 tracepoint.h.
11257 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
11258 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
11259 (handle_tracepoint_general_set, handle_tracepoint_query)
11260 (tracepoint_finished_step, tracepoint_was_hit)
11261 (release_while_stepping_state_list, current_traceframe)
11262 (in_readonly_region, traceframe_read_mem)
11263 (fetch_traceframe_registers, traceframe_read_sdata)
11264 (traceframe_read_info, struct fast_tpoint_collect_status)
11265 (fast_tracepoint_collecting, force_unlock_trace_buffer)
11266 (handle_tracepoit_bkpts, initialize_low_tracepoint)
11267 (supply_fast_tracepoint_registers)
11268 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
11269 (ipa_tdesc, claim_trampoline_space)
11270 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
11271 (agent_mem_read, agent_get_trace_state_variable_value)
11272 (agent_set_trace_state_variable_value, agent_tsv_read)
11273 (agent_mem_read_string, get_raw_reg_func_addr)
11274 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
11275 * tracepoint.h: ... this new file.
11276
11277 2013-09-05 Pedro Alves <palves@redhat.com>
11278
11279 * server.h (perror_with_name, error, fatal, warning, paddress)
11280 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
11281 include it.
11282 * utils.h: New file.
11283
11284 2013-09-05 Pedro Alves <palves@redhat.com>
11285
11286 * server.h (remote_debug, noack_mode, transport_is_reliable)
11287 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
11288 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
11289 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
11290 (write_enn, initialize_async_io, enable_async_io)
11291 (disable_async_io, check_remote_input_interrupt_request)
11292 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
11293 (dead_thread_notify, prepare_resume_reply)
11294 (decode_address_to_semicolon, decode_address, decode_m_packet)
11295 (decode_M_packet, decode_X_packet, decode_xfer_write)
11296 (decode_search_memory_packet, unhexify, hexify)
11297 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
11298 (look_up_one_symbol, relocate_instruction)
11299 (monitor_output): Move to remote-utils.h, and include it.
11300 * remote-utils.h: New file.
11301
11302 2013-09-05 Pedro Alves <palves@redhat.com>
11303
11304 * server.h (_): Delete.
11305
11306 2013-09-02 Pedro Alves <palves@redhat.com>
11307
11308 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
11309 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
11310 allocated.
11311 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
11312
11313 2013-09-02 Pierre Muller <muller@sourceware.org>
11314
11315 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
11316 or WriteProcessMemory complete successfully and handle
11317 ERROR_PARTIAL_COPY error.
11318
11319 2013-09-02 Pedro Alves <palves@redhat.com>
11320
11321 * server.c (gdb_read_memory): Return -1 on traceframe memory read
11322 error instead of EIO.
11323
11324 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11325
11326 PR server/15604
11327 * linux-low.c: Include filestuff.h.
11328 (linux_create_inferior) <pid == 0>: Call close_most_fds.
11329 * lynx-low.c: Include filestuff.h.
11330 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
11331 * server.c: Include filestuff.h.
11332 (main): Call notice_open_fds.
11333 * spu-low.c: Include filestuff.h.
11334 (spu_create_inferior) <pid == 0>: Call close_most_fds.
11335
11336 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
11337
11338 * Makefile.in: Explain why ../target and ../nat are not
11339 listed as include file search paths.
11340 (linux-waitpid.o): New object file rule.
11341 * configure.srv (srv_native_linux_obj): New variable.
11342 Replace all occurrences of linux native object files with
11343 $srv_native_linux_obj.
11344 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
11345 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
11346 (linux_enable_event_reporting): Remove declaration.
11347 (my_waitpid): Moved to common/linux-waitpid.c.
11348 (linux_wait_for_event): Pass ptid when calling
11349 linux_enable_event_reporting.
11350 (linux_supports_tracefork_flag): Remove.
11351 (linux_enable_event_reporting): Likewise.
11352 (linux_tracefork_grandchild): Remove.
11353 (STACK_SIZE): Moved to common/linux-ptrace.c.
11354 (linux_tracefork_child): Remove.
11355 (linux_test_for_tracefork): Remove.
11356 (linux_look_up_symbols): Call linux_supports_traceclone.
11357 (initialize_low): Remove call to linux_test_for_tracefork.
11358 * linux-low.h (PTRACE_TYPE_ARG3): Move to
11359 common/linux-ptrace.h.
11360 (PTRACE_TYPE_ARG4): Likewise.
11361 Include linux-ptrace.h.
11362
11363 2013-08-21 Pedro Alves <palves@redhat.com>
11364
11365 * config.in: Renegerate.
11366
11367 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
11368
11369 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
11370 (SFILES): Remove $(srcdir)/common/target-common.c and
11371 add $(srcdir)/target/waitstatus.c.
11372 (OBS): Remove target-common.o and add waitstatus.o.
11373 (server_h): Remove $(srcdir)/../common/target-common.h and
11374 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
11375 and $(srcdir)/../target/waitstatus.h.
11376 (target-common.o): Remove.
11377 (waitstatus.o): New target object file.
11378 * target.h: Do not include target-common.h and
11379 include target/resume.h, target/wait.h and
11380 target/waitstatus.h.
11381
11382 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
11383
11384 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
11385 to PTRACE_TYPE_ARG3.
11386 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
11387 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
11388 PTRACE_TYPE_ARG4.
11389 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
11390 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
11391
11392 2013-07-27 Jie Zhang <jie@codesourcery.com>
11393 Daniel Jacobowitz <dan@codesourcery.com>
11394 Yao Qi <yao@codesourcery.com>
11395
11396 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
11397 (mips-linux-watch.o): New rule.
11398 (mips_linux_watch_h): New variable.
11399 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
11400 srv_tgtobj.
11401 * linux-mips-low.c: Include mips-linux-watch.h.
11402 (struct arch_process_info, struct arch_lwp_info): New.
11403 (update_watch_registers_callback): New function.
11404 (mips_linux_new_process, mips_linux_new_thread) New functions.
11405 (mips_linux_prepare_to_resume, mips_insert_point): New
11406 functions.
11407 (mips_remove_point, mips_stopped_by_watchpoint): New
11408 functions.
11409 (rsp_bp_type_to_target_hw_bp_type): New function.
11410 (mips_stopped_data_address): New function.
11411 (the_low_target): Add watchpoint support functions.
11412
11413 2013-07-27 Yao Qi <yao@codesourcery.com>
11414
11415 * i386-low.c: Include break-common.h.
11416 (enum target_hw_bp_type): Remove.
11417
11418 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
11419
11420 * Makefile.in (SFILES): /common/target-common.c.
11421 (OBS): Add target-common.o.
11422 (server_h): Add $(srcdir)/../common/target-common.h.
11423 (target-common.o): New target.
11424 * server.c (queue_stop_reply_callback): Free
11425 status string after use.
11426 * target.c (target_waitstatus_to_string): Remove.
11427 * target.h: Include target-common.h.
11428 (resume_kind): Likewise.
11429 (target_waitkind): Likewise.
11430 (target_waitstatus): Likewise.
11431 (TARGET_WNOHANG): Likewise.
11432
11433 2013-07-04 Yao Qi <yao@codesourcery.com>
11434
11435 * Makefile.in (host_alias): Use @host_noncanonical@.
11436 (target_alias): Use @target_noncanonical@.
11437 * configure.ac: Use ACX_NONCANONICAL_TARGET and
11438 ACX_NONCANONICAL_HOST.
11439 * configure: Regenerated.
11440
11441 Revert:
11442 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
11443
11444 * configure.ac (version_host, version_target): Set and AC_SUBST them.
11445 * configure: Rebuild.
11446 * Makefile.in (version_host, version_target): Get from configure.
11447 (version.c): Use $(version_host) and $(version_target).
11448
11449 2013-07-03 Pedro Alves <palves@redhat.com>
11450
11451 * Makefile.in (config.status): Depend on development.sh.
11452 * acinclude.m4: Include libmcheck.m4.
11453 * configure: Regenerate.
11454
11455 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
11456
11457 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
11458 attribute inside the parentheses.
11459 (winapi_DebugSetProcessKillOnExit): Ditto.
11460 (winapi_DebugBreakProcess): Ditto.
11461 (winapi_GenerateConsoleCtrlEvent): Ditto.
11462
11463 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
11464
11465 * notif.h (notif_event): Add a dummy member to avoid compiler
11466 errors.
11467
11468 2013-07-01 Pedro Alves <palves@redhat.com>
11469
11470 * hostio.c (HOSTIO_PATH_MAX): Define.
11471 (require_filename, handle_open, handle_unlink, handle_readlink):
11472 Use it.
11473
11474 2013-07-01 Pedro Alves <palves@redhat.com>
11475
11476 * server.h: Include "pathmax.h".
11477 * linux-low.c: Don't include sys/param.h.
11478 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
11479 MAXPATHLEN.
11480 * win32-low.c: Don't include sys/param.h.
11481 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
11482
11483 2013-07-01 Pedro Alves <palves@redhat.com>
11484
11485 * event-loop.c: Don't check HAVE_UNISTD_H before including
11486 <unistd.h>.
11487 * gdbreplay.c: Likewise.
11488 * remote-utils.c: Likewise.
11489 * server.c: Likewise.
11490 * configure.ac: Don't check for unistd.h.
11491 * configure: Regenerate.
11492
11493 2013-06-28 Tom Tromey <tromey@redhat.com>
11494
11495 * Makefile.in (version.c): Use version.in, not
11496 common/version.in.
11497
11498 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
11499
11500 * configure.ac (version_host, version_target): Set and AC_SUBST them.
11501 * configure: Rebuild.
11502 * Makefile.in (version_host, version_target): Get from configure.
11503 (version.c): Use $(version_host) and $(version_target).
11504
11505 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
11506
11507 Fix trace-status to output user name without trailing colon.
11508 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
11509
11510 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
11511
11512 Fix trace-status to output proper start-time and stop-time.
11513 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
11514 output start time and stop time in hex as gdb expects.
11515
11516 2013-06-26 Pedro Alves <pedro@codesourcery.com>
11517
11518 * tracepoint.c (build_traceframe_info_xml): Output trace state
11519 variables present in the trace buffer.
11520
11521 2013-06-24 Tom Tromey <tromey@redhat.com>
11522
11523 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
11524 create-version.sh.
11525 (version.o): Remove.
11526 * gdbreplay.c: Include version.h.
11527 (version, host_name): Don't declare.
11528 * server.h: Include version.h.
11529 (version, host_name): Don't declare.
11530
11531 2013-06-12 Pedro Alves <palves@redhat.com>
11532
11533 * linux-x86-low.c (linux_is_elf64): Delete global.
11534 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
11535 with local linux_pid_exe_is_elf_64_file use.
11536
11537 2013-06-11 Pedro Alves <palves@redhat.com>
11538
11539 * linux-low.c (regset_disabled, disable_regset): New functions.
11540 (regsets_fetch_inferior_registers)
11541 (regsets_store_inferior_registers): Use them.
11542 (initialize_regsets_info); Don't allocate the disabled_regsets
11543 array here.
11544 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
11545 comment.
11546
11547 2013-06-11 Pedro Alves <palves@redhat.com>
11548
11549 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
11550 xmalloc.
11551
11552 2013-06-11 Pedro Alves <palves@redhat.com>
11553
11554 * linux-x86-low.c (initialize_low_arch): Call
11555 init_registers_x32_avx_linux.
11556
11557 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
11558
11559 Fix compatibility with Android Bionic.
11560 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
11561 it is not empty.
11562
11563 2013-06-07 Pedro Alves <palves@redhat.com>
11564
11565 PR server/14823
11566 * Makefile.in (OBS): Add tdesc.o.
11567 (IPA_OBJS): Add tdesc-ipa.o.
11568 (tdesc-ipa.o): New rule.
11569 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
11570 interface.
11571 * linux-low.c (new_inferior): Delete.
11572 (disabled_regsets, num_regsets): Delete.
11573 (linux_add_process): Adjust to set the new per-process
11574 new_inferior flag.
11575 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
11576 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
11577 was a stop. When calling arch_setup, switch the current inferior
11578 to the thread that got an event.
11579 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
11580 (regsets_fetch_inferior_registers)
11581 (regsets_store_inferior_registers): New regsets_info parameter.
11582 Adjust to use it.
11583 (linux_register_in_regsets): New regs_info parameter. Adjust to
11584 use it.
11585 (register_addr, fetch_register, store_register): New usrregs_info
11586 parameter. Adjust to use it.
11587 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
11588 parameter regs_info. Adjust to use it.
11589 (linux_fetch_registers): Get the current inferior's regs_info, and
11590 adjust to use it.
11591 (linux_store_registers): Ditto.
11592 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
11593 (initialize_low): Don't initialize the target_regsets here. Call
11594 initialize_low_arch.
11595 * linux-low.h (target_regsets): Delete declaration.
11596 (struct regsets_info): New.
11597 (struct usrregs_info): New.
11598 (struct regs_info): New.
11599 (struct process_info_private) <new_inferior>: New field.
11600 (struct linux_target_ops): Delete the num_regs, regmap, and
11601 regset_bitmap fields. New field regs_info.
11602 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
11603 * i387-fp.c (num_xmm_registers): Delete.
11604 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
11605 calls to new interface.
11606 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
11607 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
11608 Infer the number of xmm registers from the regcache's target
11609 description.
11610 * i387-fp.h (num_xmm_registers): Delete.
11611 * inferiors.c (add_thread): Don't install the thread's regcache
11612 here.
11613 * proc-service.c (gregset_info): Fetch the current inferior's
11614 regs_info. Adjust to use it.
11615 * regcache.c: Include tdesc.h.
11616 (register_bytes, reg_defs, num_registers)
11617 (gdbserver_expedite_regs): Delete.
11618 (get_thread_regcache): If the thread doesn't have a regcache yet,
11619 create one, instead of aborting gdbserver.
11620 (regcache_invalidate_one): Rename to ...
11621 (regcache_invalidate_thread): ... this.
11622 (regcache_invalidate_one): New.
11623 (regcache_invalidate): Only invalidate registers of the current
11624 process.
11625 (init_register_cache): Add target_desc parameter, and use it.
11626 (new_register_cache): Ditto. Assert the target description has a
11627 non zero registers_size.
11628 (regcache_cpy): Add assertions. Adjust.
11629 (realloc_register_cache, set_register_cache): Delete.
11630 (registers_to_string, registers_from_string): Adjust.
11631 (find_register_by_name, find_regno, find_register_by_number)
11632 (register_cache_size): Add target_desc parameter, and use it.
11633 (free_register_cache_thread, free_register_cache_thread_one)
11634 (regcache_release, register_cache_size): New.
11635 (register_size): Add target_desc parameter, and use it.
11636 (register_data, supply_register, supply_register_zeroed)
11637 (supply_regblock, supply_register_by_name, collect_register)
11638 (collect_register_as_string, collect_register_by_name): Adjust.
11639 * regcache.h (struct target_desc): Forward declare.
11640 (struct regcache) <tdesc>: New field.
11641 (init_register_cache, new_register_cache): Add target_desc
11642 parameter.
11643 (regcache_invalidate_thread): Declare.
11644 (regcache_invalidate_one): Delete declaration.
11645 (regcache_release): Declare.
11646 (find_register_by_number, register_cache_size, register_size)
11647 (find_regno): Add target_desc parameter.
11648 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
11649 declarations.
11650 * remote-utils.c: Include tdesc.h.
11651 (outreg, prepare_resume_reply): Adjust.
11652 * server.c: Include tdesc.h.
11653 (gdbserver_xmltarget): Delete declaration.
11654 (get_features_xml, process_serial_event): Adjust.
11655 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
11656 declare.
11657 (struct process_info) <tdesc>: New field.
11658 (ipa_tdesc): Declare.
11659 * tdesc.c: New file.
11660 * tdesc.h: New file.
11661 * tracepoint.c: Include tdesc.h.
11662 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
11663 (get_context_regcache): Adjust to pass ipa_tdesc down.
11664 (do_action_at_tracepoint): Adjust to get the register cache size
11665 from the context regcache's description.
11666 (traceframe_walk_blocks): Adjust to get the register cache size
11667 from the current trace frame's description.
11668 (traceframe_get_pc): Adjust to get current trace frame's
11669 description and pass it down.
11670 (gdb_collect): Adjust to get the register cache size from the
11671 IPA's description.
11672 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
11673 (gdbserver_xmltarget): Delete.
11674 (initialize_low_tracepoint): Set the ipa's target description.
11675 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
11676 (initialize_low_tracepoint): Set the ipa's target description.
11677 * linux-x86-low.c: Include tdesc.h.
11678 [__x86_64__] (is_64bit_tdesc): New.
11679 (ps_get_thread_area, x86_get_thread_area): Use it.
11680 (i386_cannot_store_register): Rename to ...
11681 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
11682 (i386_cannot_fetch_register): Rename to ...
11683 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
11684 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
11685 to new interface.
11686 (target_regsets): Rename to ...
11687 (x86_regsets): ... this.
11688 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
11689 interface.
11690 (x86_siginfo_fixup): Use is_64bit_tdesc.
11691 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
11692 (tdesc_x32_avx_linux, tdesc_x32_linux)
11693 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
11694 Declare.
11695 (x86_linux_update_xmltarget): Delete.
11696 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
11697 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
11698 (AMD64_LINUX_USER64_CS): New.
11699 (x86_linux_read_description): New, based on
11700 x86_linux_update_xmltarget.
11701 (same_process_callback): New.
11702 (x86_arch_setup_process_callback): New.
11703 (x86_linux_update_xmltarget): New.
11704 (x86_regsets_info): New.
11705 (amd64_linux_regs_info): New.
11706 (i386_linux_usrregs_info): New.
11707 (i386_linux_regs_info): New.
11708 (x86_linux_regs_info): New.
11709 (x86_arch_setup): Reimplement.
11710 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
11711 (x86_emit_ops): Ditto.
11712 (the_low_target): Adjust. Install x86_linux_regs_info,
11713 x86_cannot_fetch_register, and x86_cannot_store_register.
11714 (initialize_low_arch): New.
11715 * linux-ia64-low.c (tdesc_ia64): Declare.
11716 (ia64_fetch_register): Adjust.
11717 (ia64_usrregs_info, regs_info): New globals.
11718 (ia64_regs_info): New function.
11719 (the_low_target): Adjust.
11720 (initialize_low_arch): New function.
11721 * linux-sparc-low.c (tdesc_sparc64): Declare.
11722 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
11723 Adjust.
11724 (sparc_arch_setup): New function.
11725 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
11726 (the_low_target): Adjust.
11727 (initialize_low_arch): New function.
11728 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
11729 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
11730 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
11731 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
11732 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
11733 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
11734 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
11735 (tdesc_powerpc_isa205_vsx64l): Declare.
11736 (ppc_cannot_store_register, ppc_collect_ptrace_register)
11737 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
11738 (ppc_set_pc, ppc_get_hwcap): Adjust.
11739 (ppc_usrregs_info): Forward declare.
11740 (!__powerpc64__) ppc_regmap_adjusted: New global.
11741 (ppc_arch_setup): Adjust to the current process'es target
11742 description.
11743 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
11744 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
11745 (ppc_store_evrregset): Adjust.
11746 (target_regsets): Rename to ...
11747 (ppc_regsets): ... this, and make static.
11748 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
11749 (ppc_regs_info): New function.
11750 (the_low_target): Adjust.
11751 (initialize_low_arch): New function.
11752 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
11753 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
11754 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
11755 (tdesc_s390x_linux64v2): Declare.
11756 (s390_collect_ptrace_register, s390_supply_ptrace_register)
11757 (s390_fill_gregset, s390_store_last_break): Adjust.
11758 (target_regsets): Rename to ...
11759 (s390_regsets): ... this, and make static.
11760 (s390_get_pc, s390_set_pc): Adjust.
11761 (s390_get_hwcap): New target_desc parameter, and use it.
11762 [__s390x__] (have_hwcap_s390_high_gprs): New global.
11763 (s390_arch_setup): Adjust to set the current process'es target
11764 description. Don't adjust the regmap.
11765 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
11766 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
11767 (regs_info_3264): New globals.
11768 (s390_regs_info): New function.
11769 (the_low_target): Adjust.
11770 (initialize_low_arch): New function.
11771 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
11772 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
11773 [__mips64] (init_registers_mips_linux)
11774 (init_registers_mips_dsp_linux): Delete defines.
11775 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
11776 (have_dsp): New global.
11777 (mips_read_description): New, based on mips_arch_setup.
11778 (mips_arch_setup): Reimplement.
11779 (get_usrregs_info): New function.
11780 (mips_cannot_fetch_register, mips_cannot_store_register)
11781 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
11782 (mips_fill_fpregset, mips_store_fpregset): Adjust.
11783 (target_regsets): Rename to ...
11784 (mips_regsets): ... this, and make static.
11785 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
11786 (dsp_regs_info, regs_info): New globals.
11787 (mips_regs_info): New function.
11788 (the_low_target): Adjust.
11789 (initialize_low_arch): New function.
11790 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
11791 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
11792 Declare.
11793 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
11794 (arm_read_description): New, with bits factored from
11795 arm_arch_setup.
11796 (arm_arch_setup): Reimplement.
11797 (target_regsets): Rename to ...
11798 (arm_regsets): ... this, and make static.
11799 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
11800 (arm_regs_info): New function.
11801 (the_low_target): Adjust.
11802 (initialize_low_arch): New function.
11803 * linux-m68k-low.c (tdesc_m68k): Declare.
11804 (target_regsets): Rename to ...
11805 (m68k_regsets): ... this, and make static.
11806 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
11807 (m68k_regs_info): New function.
11808 (m68k_arch_setup): New function.
11809 (the_low_target): Adjust.
11810 (initialize_low_arch): New function.
11811 * linux-sh-low.c (tdesc_sharch): Declare.
11812 (target_regsets): Rename to ...
11813 (sh_regsets): ... this, and make static.
11814 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
11815 (sh_regs_info, sh_arch_setup): New functions.
11816 (the_low_target): Adjust.
11817 (initialize_low_arch): New function.
11818 * linux-bfin-low.c (tdesc_bfin): Declare.
11819 (bfin_arch_setup): New function.
11820 (bfin_usrregs_info, regs_info): New globals.
11821 (bfin_regs_info): New function.
11822 (the_low_target): Adjust.
11823 (initialize_low_arch): New function.
11824 * linux-cris-low.c (tdesc_cris): Declare.
11825 (cris_arch_setup): New function.
11826 (cris_usrregs_info, regs_info): New globals.
11827 (cris_regs_info): New function.
11828 (the_low_target): Adjust.
11829 (initialize_low_arch): New function.
11830 * linux-cris-low.c (tdesc_crisv32): Declare.
11831 (cris_arch_setup): New function.
11832 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
11833 (cris_regs_info): New function.
11834 (the_low_target): Adjust.
11835 (initialize_low_arch): New function.
11836 * linux-m32r-low.c (tdesc_m32r): Declare.
11837 (m32r_arch_setup): New function.
11838 (m32r_usrregs_info, regs_info): New globals.
11839 (m32r_regs_info): Adjust.
11840 (initialize_low_arch): New function.
11841 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
11842 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
11843 (tic6x_usrregs_info): Forward declare.
11844 (tic6x_read_description): New function, based on ...
11845 (tic6x_arch_setup): ... this. Reimplement.
11846 (target_regsets): Rename to ...
11847 (tic6x_regsets): ... this, and make static.
11848 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
11849 (tic6x_regs_info): New function.
11850 (the_low_target): Adjust.
11851 (initialize_low_arch): New function.
11852 * linux-xtensa-low.c (tdesc_xtensa): Declare.
11853 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
11854 (target_regsets): Rename to ...
11855 (xtensa_regsets): ... this, and make static.
11856 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
11857 globals.
11858 (xtensa_arch_setup, xtensa_regs_info): New functions.
11859 (the_low_target): Adjust.
11860 (initialize_low_arch): New function.
11861 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
11862 (nios2_arch_setup): Set the current process'es tdesc.
11863 (target_regsets): Rename to ...
11864 (nios2_regsets): ... this.
11865 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
11866 (nios2_regs_info): New function.
11867 (the_low_target): Adjust.
11868 (initialize_low_arch): New function.
11869 * linux-aarch64-low.c (tdesc_aarch64): Declare.
11870 (aarch64_arch_setup): Set the current process'es tdesc.
11871 (target_regsets): Rename to ...
11872 (aarch64_regsets): ... this.
11873 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
11874 (aarch64_regs_info): New function.
11875 (the_low_target): Adjust.
11876 (initialize_low_arch): New function.
11877 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
11878 globals.
11879 (target_regsets): Rename to ...
11880 (tile_regsets): ... this.
11881 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
11882 (tile_regs_info): New function.
11883 (tile_arch_setup): Set the current process'es tdesc.
11884 (the_low_target): Adjust.
11885 (initialize_low_arch): New function.
11886 * spu-low.c (tdesc_spu): Declare.
11887 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
11888 * win32-arm-low.c (tdesc_arm): Declare.
11889 (arm_arch_setup): New function.
11890 (the_low_target): Install arm_arch_setup instead of
11891 init_registers_arm.
11892 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
11893 (init_windows_x86): Rename to ...
11894 (i386_arch_setup): ... this. Set `win32_tdesc'.
11895 (the_low_target): Adjust.
11896 * win32-low.c (win32_tdesc): New global.
11897 (child_add_thread): Don't create the thread cache here.
11898 (do_initial_child_stuff): Set the new process'es tdesc.
11899 * win32-low.h (struct target_desc): Forward declare.
11900 (win32_tdesc): Declare.
11901 * lynx-i386-low.c (tdesc_i386): Declare global.
11902 (lynx_i386_arch_setup): Set `lynx_tdesc'.
11903 * lynx-low.c (lynx_tdesc): New global.
11904 (lynx_add_process): Set the new process'es tdesc.
11905 * lynx-low.h (struct target_desc): Forward declare.
11906 (lynx_tdesc): Declare global.
11907 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
11908 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
11909 * nto-low.c (nto_tdesc): New global.
11910 (do_attach): Set the new process'es tdesc.
11911 * nto-low.h (struct target_desc): Forward declare.
11912 (nto_tdesc): Declare.
11913 * nto-x86-low.c (tdesc_i386): Declare.
11914 (nto_x86_arch_setup): Set `nto_tdesc'.
11915
11916 2013-06-04 Gary Benson <gbenson@redhat.com>
11917
11918 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
11919 to qSupported response when appropriate.
11920 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
11921 with nonzero-length annex.
11922 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
11923 arguments supplied in annex.
11924
11925 2013-05-31 Doug Evans <dje@google.com>
11926
11927 PR server/15594
11928 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
11929 64 bits in 64-cross-32 environment.
11930
11931 2013-05-28 Pedro Alves <palves@redhat.com>
11932
11933 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
11934 (aarch64-without-fpu.c): Delete rule.
11935 * configure.srv (aarch64*-*-linux*): Remove references to
11936 aarch64-without-fpu.o and aarch64-without-fpu.xml.
11937 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
11938 declaration.
11939
11940 2013-05-24 Pedro Alves <palves@redhat.com>
11941
11942 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
11943 instead of strchr/decode_address. Error if the range isn't split
11944 with a ','. Don't assume there's be a ':' in the action.
11945
11946 2013-05-23 Yao Qi <yao@codesourcery.com>
11947 Pedro Alves <palves@redhat.com>
11948
11949 * linux-low.c (lwp_in_step_range): New function.
11950 (linux_wait_1): If the thread was range stepping and stopped
11951 outside the stepping range, report the stop to GDB. Otherwise,
11952 continue stepping. Add range stepping debug output.
11953 (linux_set_resume_request): Copy the step range from the resume
11954 request to the lwp.
11955 (linux_supports_range_stepping): New.
11956 (linux_target_ops) <supports_range_stepping>: Set to
11957 linux_supports_range_stepping.
11958 * linux-low.h (struct linux_target_ops)
11959 <supports_range_stepping>: New field.
11960 (struct lwp_info) <step_range_start, step_range_end>: New fields.
11961 * linux-x86-low.c (x86_supports_range_stepping): New.
11962 (the_low_target) <supports_range_stepping>: Set to
11963 x86_supports_range_stepping.
11964 * server.c (handle_v_cont): Handle 'r' action.
11965 (handle_v_requests): Append ";r" if the target supports range
11966 stepping.
11967 * target.h (struct thread_resume) <step_range_start,
11968 step_range_end>: New fields.
11969 (struct target_ops) <supports_range_stepping>:
11970 New field.
11971 (target_supports_range_stepping): New macro.
11972
11973 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11974
11975 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
11976 confusion in comment.
11977
11978 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11979
11980 * lynx-low.c (struct process_info_private): New type.
11981 (lynx_add_process): New function.
11982 (lynx_create_inferior, lynx_attach): Replace calls to
11983 add_process by calls to lynx_add_process.
11984 (lynx_resume): If PTID is null, then try using
11985 current_process()->private->last_wait_event_ptid.
11986 Add comments.
11987 (lynx_clear_inferiors): Delete. The contents of that function
11988 has been inlined in lynx_mourn;
11989 (lynx_wait_1): Save the ptid in the process's private data.
11990 (lynx_mourn): Free the process' private data. Replace call
11991 to lynx_clear_inferiors by call to clear_inferiors.
11992
11993 2013-05-17 Yao Qi <yao@codesourcery.com>
11994
11995 * i386-low.c (i386_length_and_rw_bits): Move the comment to
11996 the right place.
11997
11998 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
11999
12000 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
12001 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
12002 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
12003 PT_TEXT_END_ADDR guards. Update comments.
12004 (linux_target_op) <read_offsets>: Conditionally define to
12005 linux_read_offsets if the target is UCLIBC and if it defines
12006 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
12007
12008 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
12009 Andrew Jenner <andrew@codesourcery.com>
12010
12011 * Makefile.in (SFILES): Add linux-nios2-low.c.
12012 (clean): Add action to delete nios2-linux.c.
12013 (nios2-linux.c): New rule.
12014 * configure.srv: Add nios2*-*-linux*.
12015 * linux-nios2-low.c: New.
12016
12017 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
12018
12019 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
12020
12021 2013-04-25 Hui Zhu <hui@codesourcery.com>
12022
12023 PR gdb/15186
12024 * ax.c (ax_printf): Add fflush.
12025
12026 2013-04-22 Tom Tromey <tromey@redhat.com>
12027
12028 * Makefile.in (SFILES): Add filestuff.c.
12029 (OBS): Add filestuff.o.
12030 (filestuff.o): New target.
12031 * config.in, configure: Rebuild.
12032 * configure.ac: Check for fdwalk, pipe2.
12033
12034 2013-04-17 Pedro Alves <palves@redhat.com>
12035
12036 * configure.ac (USE_THREAD_DB): Delete variable.
12037 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
12038 Don't AC_SUBST USE_THREAD_DB.
12039 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
12040 * config.in, configure: Regenerate.
12041
12042 2013-04-16 Pedro Alves <palves@redhat.com>
12043
12044 * linux-low.h (struct lwp_info) <thread_known>: Move under
12045 the USE_THREAD_DB #ifdef.
12046
12047 2013-04-16 Pedro Alves <palves@redhat.com>
12048
12049 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
12050 (linux-low.o): Delete rule.
12051 * linux-low.h: Always include "gdb_thread_db.h" instead of
12052 conditionally including thread_db.h.
12053 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
12054 HAVE_THREAD_DB_H.
12055
12056 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12057
12058 * Makefile.in (install-only): Fix make install regression.
12059
12060 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
12061
12062 Convert man pages to texinfo, new gdbinit.5 texinfo page.
12063 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
12064 installation.
12065 * gdbserver.1: Remove.
12066
12067 2013-03-22 Pedro Alves <palves@redhat.com>
12068
12069 * linux-low.c (handle_extended_wait): Don't call
12070 linux_enable_event_reporting.
12071
12072 2013-03-15 Tony Theodore <tonyt@logyst.com>
12073
12074 PR build/9098:
12075 * Makefile.in (SHELL): Use @SHELL@.
12076
12077 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
12078
12079 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
12080 compiler warning.
12081
12082 2013-03-13 Joel Brobecker <brobecker@adacore.com>
12083
12084 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
12085 Remove extraneous NULL element.
12086
12087 2013-03-13 Yao Qi <yao@codesourcery.com>
12088
12089 * tracepoint.c (traceframe_read_tsv): Look for the last matched
12090 'V' block in trace frame.
12091
12092 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
12093
12094 * target.h (struct target_ops): Add btrace ops.
12095 (target_supports_btrace): New macro.
12096 (target_enable_btrace): New macro.
12097 (target_disable_btrace): New macro.
12098 (target_read_btrace): New macro.
12099 * gdbthread.h (struct thread_info): Add btrace field.
12100 * server.c: Include btrace-common.h.
12101 (handle_btrace_general_set): New function.
12102 (handle_btrace_enable): New function.
12103 (handle_btrace_disable): New function.
12104 (handle_general_set): Call handle_btrace_general_set.
12105 (handle_qxfer_btrace): New function.
12106 (struct qxfer qxfer_packets[]): Add btrace entry.
12107 * inferiors.c (remove_thread): Disable btrace.
12108 * linux-low: Include linux-btrace.h.
12109 (linux_low_enable_btrace): New function.
12110 (linux_low_read_btrace): New function.
12111 (linux_target_ops): Add btrace ops.
12112 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
12113 Add srv_linux_btrace=yes.
12114 (x86_64-*-linux*): Add linux-btrace.o.
12115 Add srv_linux_btrace=yes.
12116 * configure.ac: Define HAVE_LINUX_BTRACE.
12117 * config.in: Regenerated.
12118 * configure: Regenerated.
12119
12120 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
12121
12122 * server.c (handle_qxfer): Preserve error message if -3 is
12123 returned.
12124 (qxfer): Document the -3 return value.
12125
12126 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
12127
12128 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
12129 (linux_btrace_h): New variable.
12130 (linux-btrace.o): New rule.
12131
12132 2013-03-08 Stan Shebs <stan@codesourcery.com>
12133 Hafiz Abid Qadeer <abidh@codesourcery.com>
12134
12135 * tracepoint.c (trace_buffer_size): New global.
12136 (DEFAULT_TRACE_BUFFER_SIZE): New define.
12137 (init_trace_buffer): Change to one-argument function. Allocate
12138 trace buffer memory.
12139 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
12140 handle QTBuffer:size packet.
12141 (cmd_bigqtbuffer_size): New function.
12142 (initialize_tracepoint): Call init_trace_buffer with
12143 DEFAULT_TRACE_BUFFER_SIZE.
12144 * server.c (handle_query): Add QTBuffer:size in the
12145 supported packets.
12146
12147 2013-03-07 Yao Qi <yao@codesourcery.com>
12148
12149 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
12150 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
12151 of -1.
12152 (cmd_qtsp): Adjust condition. Do post increment.
12153 Set cur_action and cur_step_action back to 0.
12154
12155 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
12156
12157 PR server/15236
12158 * linux-low.c (linux_write_memory): Return early success if LEN is
12159 zero.
12160
12161 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
12162
12163 * configure.srv: Add x86_64-*-cygwin* as target.
12164
12165 2013-02-28 Tom Tromey <tromey@redhat.com>
12166
12167 * configure.ac: Invoke AC_SYS_LARGEFILE.
12168 * configure, config.in: Rebuild.
12169
12170 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
12171
12172 * win32-low.c: Throughout, fix format strings and casts of
12173 printf-like functions to avoid type related warnings on all
12174 platforms.
12175 (get_child_debug_event): Print dwDebugEventCode as hex since
12176 that's how it's usually documented.
12177
12178 2013-02-28 Yao Qi <yao@codesourcery.com>
12179
12180 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
12181 pulongest.
12182
12183 2013-02-27 Jiong Wang <jiwang@tilera.com>
12184
12185 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
12186 (reg-tilegx32.c): New rule.
12187 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
12188 * linux-tile-low.c (tile_arch_setup): New function. Invoke
12189 different register info initializer according to elf class.
12190 (init_registers_tilgx32): New function. The tilegx32 register info
12191 initializer.
12192 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
12193 (tile_store_gregset): Likewise.
12194
12195 2013-02-27 Yao Qi <yao@codesourcery.com>
12196
12197 * server.c (process_point_options): Print debug message when
12198 debug_threads is true.
12199
12200 2013-02-26 Yao Qi <yao@codesourcery.com>
12201
12202 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
12203
12204 2013-02-19 Pedro Alves <palves@redhat.com>
12205 Kai Tietz <ktietz@redhat.com>
12206
12207 PR gdb/15161
12208
12209 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
12210 instead of strtoul to extract address from packet.
12211 (process_serial_event) <'z'>: Likewise.
12212
12213 2013-02-18 Yao Qi <yao@codesourcery.com>
12214
12215 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
12216
12217 2013-02-14 Pedro Alves <palves@redhat.com>
12218
12219 Plug memory leak.
12220
12221 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
12222 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
12223
12224 2013-02-14 Pedro Alves <palves@redhat.com>
12225
12226 * tracepoint.c (cmd_qtdpsrc): Use savestring.
12227
12228 2013-02-14 Pedro Alves <palves@redhat.com>
12229
12230 * tracepoint.c (save_string): Delete.
12231 (add_tracepoint_action): Use savestring instead of save_string.
12232
12233 2013-02-12 Pedro Alves <palves@redhat.com>
12234
12235 * linux-xtensa-low.c: Ditto.
12236 * xtensa-xtregs.c: Ditto.
12237
12238 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
12239
12240 * thread-db.c (thread_db_get_tls_address): NULL pointer check
12241 thread_db.
12242
12243 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
12244
12245 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
12246 aarch64_num_wp_regs and aarch64_num_bp_regs to
12247 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
12248
12249 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
12250
12251 * linux-aarch64-low.c (ps_get_thread_area): Replace
12252 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
12253
12254 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
12255 Marcus Shawcroft <marcus.shawcroft@arm.com>
12256 Nigel Stephens <nigel.stephens@arm.com>
12257 Yufeng Zhang <yufeng.zhang@arm.com>
12258
12259 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
12260 (aarch64.c, aarch64-without-fpu.c): New targets.
12261 * configure.srv (aarch64*-*-linux*): New.
12262 * linux-aarch64-low.c: New file.
12263
12264 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
12265
12266 * linux-low.c (handle_extended_wait, linux_create_inferior)
12267 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
12268 (dequeue_one_deferred_signal, linux_resume_one_thread)
12269 (fetch_register, linux_write_memory, linux_enable_event_reporting)
12270 (linux_tracefork_grandchild, linux_test_for_tracefork)
12271 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
12272 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
12273 where the argument is 0.
12274
12275 2013-01-25 Yao Qi <yao@codesourcery.com>
12276
12277 * event-loop.c: Include "queue.h".
12278 (gdb_event_p): New typedef.
12279 (struct gdb_event) <next_event>: Remove.
12280 (event_queue): Change to QUEUE(gdb_event_p).
12281 (async_queue_event): Remove.
12282 (gdb_event_xfree): New.
12283 (initialize_event_loop): New.
12284 (process_event): Use API from QUEUE.
12285 (wait_for_event): Likewise.
12286 * server.c (main): Call initialize_event_loop.
12287 * server.h (initialize_event_loop): Declare.
12288
12289 2013-01-18 Yao Qi <yao@codesourcery.com>
12290
12291 * ax.h (struct eval_agent_expr_context): New.
12292 (gdb_eval_agent_expr): Update declaration.
12293 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
12294 TFRAME. Add new argument CTX.
12295 * server.h (struct eval_agent_expr_context): Declare.
12296 (agent_mem_read, agent_tsv_read): Update declaration.
12297 (agent_mem_read_string): Likewise.
12298 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
12299 (add_traceframe_block): Add new argument TPOINT.
12300 Increase TPOINT->traceframe_usage.
12301 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
12302 eval_tracepoint_agent_expr.
12303 (condition_true_at_tracepoint): Likewise.
12304 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
12305 (agent_mem_read_string, agent_tsv_read): Likewise.
12306
12307 2013-01-16 Yao Qi <yao@codesourcery.com>
12308
12309 * linux-low.c (linux_resume_one_lwp): Don't check
12310 'lwp->bp_reinsert != 0'.
12311
12312 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12313 Pedro Alves <palves@redhat.com>
12314
12315 * lynx-low.c (ptrace_request_to_str): Define a temporary
12316 macro and use it to simplify this function's implementation.
12317
12318 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12319
12320 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
12321 sets errno.
12322
12323 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12324
12325 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
12326
12327 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12328
12329 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
12330
12331 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12332
12333 * lynx-low.c (lynx_resume): Use the resume_info parameter
12334 to determine the ptid for the lynx_ptrace call, unless
12335 it is equal to minus_one_ptid, in which case we use the
12336 ptid of the current_inferior.
12337 (lynx_wait_1): After having received a thread create/exit
12338 event, resume the inferior's execution using the signaling
12339 thread's ptid, rather than the old ptid.
12340
12341 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12342
12343 * lynx-low.c (lynx_resume): Delete variable ret.
12344
12345 2013-01-01 Joel Brobecker <brobecker@adacore.com>
12346
12347 * gdbreplay.c (gdbreplay_version): Update copyright year.
12348 * server.c (gdbserver_version): Likewise.
12349
12350 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12351
12352 * lynx-low.c (lynx_wait_1): Add debug trace before adding
12353 new thread.
12354
12355 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12356
12357 * lynx-low.c (ptrace_request_to_str): Add handling for
12358 PTRACE_GETTRACESIG.
12359
12360 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12361
12362 * lynx-low.c (lynx_attach): Delete variable new_process.
12363
12364 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12365
12366 * lynx-low.c (lynx_create_inferior): Delete variable
12367 new_process.
12368
12369 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12370
12371 * lynx-low.c (ptrace_request_to_str): Do not handle
12372 PTRACE_GETTHREADLIST if this macro does not exist.
12373
12374 2012-12-15 Yao Qi <yao@codesourcery.com>
12375
12376 * Makefile.in (OBS): Add notif.o.
12377 * notif.c, notif.h: New.
12378 * server.c: Include "notif.h".
12379 (struct vstop_notif) <next>: Remove.
12380 <base>: New field.
12381 (queue_stop_reply): Update.
12382 (push_event, send_next_stop_reply): Remove.
12383 (discard_queued_stop_replies): Update.
12384 (notif_stop): New variable.
12385 (handle_v_stopped): Remove.
12386 (handle_v_requests): Don't call handle_v_stopped. Call
12387 handle_ack_notif instead.
12388 (queue_stop_reply_callback): Call notif_event_enque instead
12389 of queue_stop_reply.
12390 (handle_status): Don't call send_next_stop_reply, call
12391 notif_write_event instead.
12392 (kill_inferior_callback): Likewise.
12393 (detach_or_kill_inferior_callback): Likewise.
12394 (main): Call initialize_notif.
12395 (process_serial_event): Call QUEUE_is_empty.
12396 (handle_target_event): Call notif_push instead of push event.
12397 * server.h (push_event): Remove declaration.
12398
12399 2012-12-10 Tom Tromey <tromey@redhat.com>
12400
12401 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
12402 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
12403 macros.
12404 (.c.o): Rewrite.
12405 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
12406 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
12407 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
12408 (amd64-linux-ipa.o, ax.o): Rewrite.
12409 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
12410 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
12411 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
12412 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
12413 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
12414 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
12415 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
12416 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
12417 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
12418 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
12419 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
12420 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
12421 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
12422 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
12423 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
12424 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
12425 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
12426 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
12427 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
12428 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
12429 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
12430 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
12431 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
12432 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
12433 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
12434 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
12435 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
12436 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
12437 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
12438 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
12439 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
12440 (reg-tilegx.o): Remove.
12441 (all_object_files): New macro.
12442 Include .deps files.
12443 * aclocal.m4, configure: Rebuild.
12444 * acinclude.m4: Include depstand.m4, lead-dot.m4.
12445 * configure.ac: Invoke ZW_CREATE_DEPDIR,
12446 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
12447
12448 2012-12-05 Tom Tromey <tromey@redhat.com>
12449
12450 PR gdb/14917:
12451 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
12452
12453 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
12454
12455 * configure.ac: Check for linux/perf_event.h.
12456 * config.in: Regenerated.
12457 * configure: Regenerated.
12458
12459 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
12460
12461 * hostio.c (handle_readlink): Decrease buffer size
12462 parameter passed to readlink by one byte.
12463
12464 2012-11-26 Yao Qi <yao@codesourcery.com>
12465
12466 * configure.ac (build_warnings): Append '-Wempty-body'.
12467 * configure: Regenerated.
12468 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
12469 body.
12470
12471 2012-11-15 Pierre Muller <muller@sourceware.org>
12472
12473 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
12474 * config.in: Regenerate.
12475 * configure: Regenerate.
12476 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
12477 Use "gdb_wait.h" header instead of <sys/wait.h> header.
12478 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
12479 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
12480 header.
12481 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
12482 instead of <sys/wait.h> header.
12483 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
12484
12485 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
12486
12487 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
12488 (various make rules): Remove -DGDBSERVER
12489
12490 2012-11-09 Yao Qi <yao@codesourcery.com>
12491
12492 * spu-low.c (current_ptid): Move it to ..
12493 * gdbthread.h: ... here. New.
12494 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
12495 * server.c (myresume, process_serial_event): Likewise.
12496 * thread-db.c (thread_db_find_new_threads): Likewise.
12497 * tracepoint.c (run_inferior_command): Likewise.
12498
12499 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
12500
12501 * server.c (handle_search_memory_1): Include access length in
12502 warning message.
12503
12504 2012-09-05 Michael Brandt <michael.brandt@axis.com>
12505
12506 * linux-crisv32-low.c: Fix compile errors.
12507
12508 2012-09-04 Yao Qi <yao@codesourcery.com>
12509
12510 * tracepoint.c (cmd_qtsv): Adjust debug message.
12511 Don't check CUR_TPOINT.
12512
12513 2012-08-28 Yao Qi <yao@codesourcery.com>
12514
12515 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
12516 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
12517 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
12518 Remove declarations of xmalloc, xreallloc, xstrdup and
12519 freeargv.
12520 * Makefile.in (libiberty_h): New.
12521 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
12522 (linux-bfin-low.o): Append dependency 'libiberty.h'.
12523
12524 2012-08-23 Yao Qi <yao@codesourcery.com>
12525
12526 * server.h: Remove declaration of 'xsnprintf'.
12527
12528 2012-08-22 Keith Seitz <keiths@redhat.com>
12529
12530 * server.h: Include build-gnulib-gbserver/config.h.
12531 * gdbreplay.c: Likewise.
12532
12533 2012-08-08 Doug Evans <dje@google.com>
12534
12535 * Makefile.in (SFILES): Add gdb_vecs.c.
12536 (OBS): Add gdb_vecs.o.
12537 (gdb_vecs_h, host_defs_h): New variables.
12538 (thread-db.o): Add $(gdb_vecs_h) dependency.
12539 (gdb_vecs.o): New rule.
12540 * thread-db.c: #include "gdb_vecs.h".
12541 (thread_db_load_search): Use a vector to iterate over path elements.
12542 Handle text appearing after "$pdir".
12543
12544 * configure.ac: Add check for strstr.
12545 * config.in: Regenerate.
12546 * configure: Regenerate.
12547
12548 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
12549
12550 * hostio.c (handle_pread): If pread fails, fall back to attempting
12551 lseek/read.
12552 (handle_pwrite): Likewise for pwrite.
12553
12554 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
12555
12556 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
12557 between unsupported TYPE and unimplementable ADDR/LEN combination.
12558 (arm_insert_point): Act on new return value.
12559
12560 2012-07-31 Pedro Alves <palves@redhat.com>
12561
12562 * server.c (process_point_options): Only skip tokens if we find
12563 one that is unrecognized. Don't treat 'X' specially while
12564 skipping unrecognized tokens.
12565
12566 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
12567
12568 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
12569 to 4-byte-align HW breakpoint addresses for Thumb.
12570
12571 2012-07-27 Yao Qi <yao@codesourcery.com>
12572
12573 PR remote/14161.
12574
12575 * server.h: Declare gdb_agent_about_to_close.
12576 * target.c (kill_inferior): Include "agent.h".
12577 New. Send command 'kill'.
12578 * target.h (kill_inferior): Removed macro.
12579 * tracepoint.c (gdb_agent_about_to_close): New.
12580 (gdb_agent_helper_thread): Handle command 'close'.
12581 Wait endlessly until the inferior stops.
12582 Install gdb_agent_remove_socket to atexit hook.
12583 (agent_socket_name): New static variable.
12584 (gdb_agent_socket_init): Replace local variable 'name' with
12585 'agent_socket_name'.
12586 (gdb_agent_remove_socket): New.
12587
12588 2012-07-27 Yao Qi <yao@codesourcery.com>
12589
12590 * server.c (process_point_options): Stop at 'X' when parsing.
12591
12592 2012-07-19 Michael Eager <eager@eagercon.com>
12593
12594 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
12595 to hw_execute.
12596 * linux-x86-low.c (x86_insert_point, x86_remove_point):
12597 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
12598 hardware breakpoint.
12599
12600 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12601
12602 * gdbserver/linux-low.c (initialize_low): Call
12603 linux_ptrace_init_warnings.
12604
12605 2012-07-02 Doug Evans <dje@google.com>
12606
12607 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
12608 pointer to int.
12609
12610 2012-07-02 Stan Shebs <stan@codesourcery.com>
12611
12612 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
12613 (ax.o): Add it to build rule.
12614 (ax-ipa.o): Ditto.
12615 (OBS): Add format.o.
12616 (IPA_OBS): Add format.o.
12617 * server.c (handle_query): Claim support for breakpoint commands.
12618 (process_point_options): Add command case.
12619 (process_serial_event): Leave running if there are printfs in
12620 effect.
12621 * mem-break.h (any_persistent_commands): Declare.
12622 (add_breakpoint_commands): Declare.
12623 (gdb_no_commands_at_breakpoint): Declare.
12624 (run_breakpoint_commands): Declare.
12625 * mem-break.c (struct point_command_list): New struct.
12626 (struct breakpoint): New field command_list.
12627 (any_persistent_commands): New function.
12628 (add_commands_to_breakpoint): New function.
12629 (add_breakpoint_commands): New function.
12630 (gdb_no_commands_at_breakpoint): New function.
12631 (run_breakpoint_commands): New function.
12632 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
12633 locally.
12634 * ax.c: Include format.h.
12635 (ax_printf): New function.
12636 (gdb_eval_agent_expr): Add printf opcode.
12637
12638 2012-06-13 Yao Qi <yao@codesourcery.com>
12639
12640 * server.c (start_inferior): Remove duplicated writes to fields
12641 'last_resume_kind' and 'last_status' of 'current_inferior'.
12642
12643 2012-06-12 Yao Qi <yao@codesourcery.com>
12644 Pedro Alves <palves@redhat.com>
12645
12646 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
12647 comment.
12648 * server.c (handle_v_cont): Extend comment.
12649
12650 2012-06-11 Yao Qi <yao@codesourcery.com>
12651
12652 * linux-low.c (linux_attach): Add 'static'.
12653
12654 2012-06-06 Yao Qi <yao@codesourcery.com>
12655
12656 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
12657
12658 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
12659
12660 Fix gcc -flto compilation warning.
12661 * server.c (main): Make variable multi_mode and attach volatile.
12662
12663 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12664
12665 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
12666 if the platform doesn't know about it.
12667
12668 2012-05-30 Jeff Kenton <jkenton@tilera.com>
12669
12670 * Makefile.in (SFILES): Add linux-tile-low.c.
12671 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
12672 * configure.srv: Handle tilegx-*-linux*.
12673 * linux-tile-low.c: New file.
12674
12675 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12676
12677 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
12678
12679 2012-05-24 Pedro Alves <palves@redhat.com>
12680
12681 PR gdb/7205
12682
12683 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
12684
12685 2012-05-24 Pedro Alves <palves@redhat.com>
12686
12687 PR gdb/7205
12688
12689 Replace target_signal with gdb_signal throughout.
12690
12691 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
12692
12693 * linux-low.c (linux_store_registers): Avoid the copying sequence
12694 when no data has been retrieved by ptrace.
12695
12696 2012-05-22 Will Deacon <will.deacon@arm.com>
12697
12698 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
12699 Include asm/ptrace.h.
12700 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
12701 already defined.
12702
12703 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
12704
12705 * linux-low.c (linux_store_registers): Don't re-retrieve data
12706 with ptrace that has already been obtained from /proc. Always
12707 copy any data retrieved with ptrace to the buffer supplied.
12708
12709 2012-05-11 Yao Qi <yao@codesourcery.com>
12710 Pedro Alves <palves@redhat.com>
12711
12712 * linux-low.c (enum stopping_threads_kind): New.
12713 (stopping_threads): Change type to `enum stopping_threads_kind'.
12714 (handle_extended_wait): If stopping and suspending threads, leave
12715 the new_lwp suspended too.
12716 (linux_wait_for_event): Adjust.
12717 (stop_all_lwps): Set `stopping_threads' to
12718 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
12719 whether we're suspending threads or just stopping them. Assert no
12720 recursion happens.
12721
12722 2012-04-29 Yao Qi <yao@codesourcery.com>
12723
12724 * server.h: Move some code to ...
12725 * gdbthread.h: ... here. New.
12726 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
12727 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
12728 (nto-low.o, win32-low.o): Likewise.
12729 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
12730 * regcache.c, remote-utils.c, server.c: Likewise.
12731 * target.c, tracepoint.c, win32-low.c: Likewise.
12732
12733 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12734
12735 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
12736 (PTRACE_ARG4_TYPE): Likewise.
12737 (PTRACE_XFER_TYPE): Likewise.
12738 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
12739 ptrace to PTRACE_ARG3_TYPE.
12740 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
12741 (PTRACE_ARG4_TYPE): Likewise.
12742 (PTRACE_XFER_TYPE): Likewise.
12743 (linux_detach_one_lwp): Cast fourth argument of
12744 ptrace to long then PTRACE_ARG4_TYPE.
12745 (regsets_fetch_inferior_registers): Cast third argument of
12746 ptrace to long then PTRACE_ARG3_TYPE.
12747 (regsets_store_inferior_registers): Likewise.
12748
12749 2012-04-20 Pedro Alves <palves@redhat.com>
12750
12751 * configure: Regenerate.
12752
12753 2012-04-19 Pedro Alves <palves@redhat.com>
12754
12755 * Makefile.in (GNULIB_BUILDDIR): New.
12756 (LIBGNU, INCGNU, GNULIB_H): Adjust.
12757 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
12758 (all, install-only, uninstall, clean-info, all-lib, clean): No
12759 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
12760 (maintainer-clean realclean distclean): Use subdir_do.
12761 (subdir_do): New.
12762 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
12763 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
12764 * acinclude.m4: Include acx_configure_dir.m4.
12765 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
12766 calls. Call AC_PROG_RANLIB. Configure gnulib using
12767 ACX_CONFIGURE_DIR.
12768 (GNULIB): New.
12769 (GNULIB_STDINT_H): Adjust.
12770 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
12771 * gdbreplay.c: Include build-gnulib/config.h.
12772 * server.h: Likewise.
12773 * aclocal.m4: Regenerate.
12774 * config.in: Regenerate.
12775 * configure: Regenerate.
12776
12777 2012-04-19 Pedro Alves <palves@redhat.com>
12778
12779 * Makefile.in (LIBGNU, INCGNU): Adjust.
12780 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
12781 (all, install-only, uninstall, clean-info, all-lib, clean)
12782 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
12783 * configure.ac: Adjust AC_OUTPUT output.
12784 * aclocal.m4: Regenerate.
12785 * configure: Regenerate.
12786
12787 2012-04-19 Pedro Alves <palves@redhat.com>
12788
12789 * Makefile.in (generated_files): New.
12790 (server_h): Remove the explicit dependency on config.h, and depend
12791 on $generated_files.
12792
12793 2012-04-19 Pedro Alves <palves@redhat.com>
12794
12795 * Makefile.in (INCGNU): Add -Ignulib.
12796
12797 2012-04-19 Pedro Alves <palves@redhat.com>
12798
12799 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
12800 (INCGNU): ... this, and spell out -I here.
12801 (GNULIB_LIB): Rename to ...
12802 (LIBGNU): ... this.
12803 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
12804
12805 2012-04-19 Pedro Alves <palves@redhat.com>
12806
12807 * config.in: Regenerate.
12808
12809 2012-04-19 Pedro Alves <palves@redhat.com>
12810
12811 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
12812 * server.h (memmem): Remove declaration.
12813 * config.in: Regenerate.
12814 * configure: Regenerate.
12815
12816 2012-04-19 Yao Qi <yao@codesourcery.com>
12817
12818 * Makefile.in (SFILES): Add common/vec.c.
12819 (OBS): Add vec.o.
12820 (vec.o): New rule.
12821
12822 2012-04-19 Yao Qi <yao@codesourcery.com>
12823
12824 * remote-utils.c (prepare_resume_reply): Replace with macro
12825 target_core_of_thread.
12826 * server.c (handle_qxfer_threads_proper): Likewise.
12827 * target.h (traget_core_of_thread): New macro.
12828
12829 2012-04-18 Pedro Alves <palves@redhat.com>
12830
12831 * aclocal.m4: Regenerate.
12832 * configure: Regenerate.
12833
12834 2012-04-16 Yao Qi <yao@codesourcery.com>
12835
12836 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
12837 duplicated on address.
12838
12839 2012-04-16 Yao Qi <yao@codesourcery.com>
12840
12841 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
12842 (struct tracepoint_action_ops) <send>: New field.
12843 (m_tracepoint_action_send, r_tracepoint_action_send): New.
12844 (agent_expr_send, x_tracepoint_action_send): New.
12845 (l_tracepoint_action_send): New.
12846 (cmd_qtdp): Download and install tracepoint
12847 according to `use_agent'.
12848 (run_inferior_command): Add one more parameter `len'.
12849 Update callers.
12850 (tracepoint_send_agent): New.
12851 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
12852
12853 2012-04-16 Yao Qi <yao@codesourcery.com>
12854
12855 * tracepoint.c (download_tracepoints): Moved to ...
12856 (cmd_qtstart): ... here.
12857
12858 2012-04-14 Yao Qi <yao@codesourcery.com>
12859
12860 * tracepoint.c: Include inttypes.h.
12861 (struct collect_memory_action): Use sized types.
12862 (struct tracepoint): Likewise.
12863 (cmd_qtdp, stop_tracing): Update print specifiers.
12864 (cmd_qtp, response_tracepoint): Likewise.
12865 (collect_data_at_tracepoint): Likewise.
12866 (collect_data_at_step): Likewise.
12867
12868 2012-04-14 Yao Qi <yao@codesourcery.com>
12869
12870 Import gnulib module inttypes.
12871 * aclocal.m4, config.in, configure: Regenerated.
12872
12873 2012-04-14 Yao Qi <yao@codesourcery.com>
12874
12875 * Makefile.in (maintainer-clean, realclean, distclean): Remove
12876 Makefile and config.status at last.
12877
12878 2012-04-13 Yao Qi <yao@codesourcery.com>
12879
12880 * tracepoint.c: Include stdint.h unconditionally.
12881
12882 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12883
12884 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
12885 on BFD_HAVE_SYS_PROCFS_TYPE.
12886 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
12887 * configure: Regenerate.
12888 * config.in: Likewise.
12889
12890 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
12891
12892 * Makefile.in (clean): Also remove x32.c x32-linux.c
12893 x32-avx.c x32-avx-linux.c.
12894 (x32.o): New target.
12895 (x32.c): Likewise.
12896 (x32-linux.o): Likewise.
12897 (x32-linux.c): Likewise.
12898 (x32-avx.o): Likewise.
12899 (x32-avx.c): Likewise.
12900 (x32-avx-linux.o): Likewise.
12901 (x32-avx-linux.c): Likewise.
12902
12903 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
12904 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
12905 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
12906 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
12907 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
12908 i386/x32-avx-linux.xml.
12909
12910 * linux-x86-low.c (init_registers_x32_linux): New prototype.
12911 (init_registers_x32_avx_linux): Likwise.
12912 (x86_linux_update_xmltarget): Call init_registers_x32_linux
12913 or init_registers_x32_avx_linux if linux_is_elf64 is false.
12914
12915 2012-04-13 Pedro Alves <palves@redhat.com>
12916
12917 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
12918 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
12919 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
12920 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
12921 the sub-make.
12922
12923 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12924
12925 * linux-x86-low.c (compat_x32_clock_t): New.
12926 (compat_x32_siginfo_t): Likewise.
12927 (compat_x32_siginfo_from_siginfo): Likewise.
12928 (siginfo_from_compat_x32_siginfo): Likewise.
12929 (linux_is_elf64): Likewise.
12930 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
12931 and siginfo_from_compat_x32_siginfo for x32.
12932 (x86_arch_setup): Set linux_is_elf64.
12933
12934 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12935
12936 PR gdb/13969
12937 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
12938 e_machine field.
12939 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
12940 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
12941 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
12942 compatible with process.
12943
12944 2012-04-12 Yao Qi <yao@codesourcery.com>
12945
12946 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
12947 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
12948 (install-only, install-info, clean): Handle sub dir gnulib.
12949 (all-lib, am--refresh): New targets.
12950 (memmem.o): Remove target.
12951 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
12952 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
12953 (AC_REPLACE_FUNCS): Remove memmem.
12954 Invoke gl_INIT and AM_INIT_AUTOMAKE.
12955 (AC_OUTPUT): Generate Makefile in gnulib/.
12956 * aclocal.m4, config.in, configure: Regenerated.
12957
12958 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
12959
12960 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
12961
12962 2012-04-05 Pedro Alves <palves@redhat.com>
12963
12964 -Werror=strict-aliasing
12965
12966 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
12967 pointer.
12968
12969 2012-04-04 Pedro Alves <palves@redhat.com>
12970
12971 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12972 (sparc_store_gregset_from_stack, sparc_store_gregset)
12973 (sparc_breakpoint_at): Fix formatting.
12974
12975 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12976
12977 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
12978 are available.
12979 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
12980 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
12981 * config.in: Regenerate.
12982 * configure: Likewise.
12983
12984 2012-03-29 Pedro Alves <palves@redhat.com>
12985
12986 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
12987 Correct ptrace arguments.
12988
12989 2012-03-28 Pedro Alves <palves@redhat.com>
12990
12991 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
12992 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
12993 (IA64_FR1_REGNUM): New defines.
12994 (ia64_fetch_register): New.
12995 (the_low_target): Install it.
12996 * linux-low.h (struct linux_target_ops) <fetch_register>: New
12997 field.
12998 * linux-low.c (linux_fetch_registers): Try the
12999 the_low_target.fetch_register hook first.
13000
13001 * linux-arm-low.c (the_low_target): Adjust.
13002 * linux-bfin-low.c (the_low_target): Adjust.
13003 * linux-cris-low.c (the_low_target): Adjust.
13004 * linux-crisv32-low.c (the_low_target): Adjust.
13005 * linux-m32r-low.c (the_low_target): Adjust.
13006 * linux-m68k-low.c (the_low_target): Adjust.
13007 * linux-mips-low.c (the_low_target): Adjust.
13008 * linux-ppc-low.c (the_low_target): Adjust.
13009 * linux-s390-low.c (the_low_target): Adjust.
13010 * linux-sh-low.c (the_low_target): Adjust.
13011 * linux-sparc-low.c (the_low_target): Adjust.
13012 * linux-tic6x-low.c (the_low_target): Adjust.
13013 * linux-x86-low.c (the_low_target): Adjust.
13014 * linux-xtensa-low.c (the_low_target): Adjust.
13015
13016 2012-03-26 Pedro Alves <palves@redhat.com>
13017
13018 * server.c (handle_qxfer_libraries): Don't bail early if
13019 the_target->qxfer_libraries_svr4 is not NULL.
13020
13021 2012-03-26 Pedro Alves <palves@redhat.com>
13022
13023 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
13024
13025 2012-03-23 Pedro Alves <palves@redhat.com>
13026
13027 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
13028 "library-list-svr4" element's start tag when the the DSO list is
13029 empty.
13030
13031 2012-03-23 Pedro Alves <palves@redhat.com>
13032
13033 * linux-low.c (read_one_ptr): Read the inferior's pointer through
13034 a variable whose type size is the same as the inferior's pointer
13035 size.
13036
13037 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
13038
13039 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
13040 struct siginfo.
13041 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
13042 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
13043 * linux-low.h: Include <signal.h>.
13044 (struct siginfo): Remove forward declaration.
13045 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
13046 struct siginfo.
13047
13048 2012-03-21 Mike Frysinger <vapier@gentoo.org>
13049
13050 * .gitignore: Ignore more files.
13051
13052 2012-03-19 Pedro Alves <palves@redhat.com>
13053 Jan Kratochvil <jan.kratochvil@redhat.com>
13054
13055 * server.c (cont_thread, general_thread): Add describing comments.
13056 (start_inferior): Clear `cont_thread'.
13057 (handle_v_cont): Don't set `cont_thread' if resuming all threads
13058 of a process.
13059
13060 2012-03-15 Yao Qi <yao@codesourcery.com>
13061
13062 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
13063 handling to ...
13064 (cmd_qtdp): ... here.
13065
13066 2012-03-15 Yao Qi <yao@codesourcery.com>
13067
13068 * tracepoint.c (struct tracepoint_action_ops): New.
13069 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
13070 (m_tracepoint_action_download): New.
13071 (r_tracepoint_action_download): New.
13072 (x_tracepoint_action_download): New.
13073 (l_tracepoint_action_download): New.
13074 (add_tracepoint_action): Install `action->ops' according type.
13075 (download_tracepoint_1): Move code `download' function pointer
13076 of various tracepoint_action_ops.
13077
13078 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
13079
13080 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
13081 linux_ptrace_attach_warnings.
13082
13083 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
13084
13085 * Makefile.in (linux-ptrace.o): New.
13086 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
13087 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
13088 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
13089 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
13090 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
13091 of these targets.
13092 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
13093
13094 2012-03-08 Yao Qi <yao@codesourcery.com>
13095 Pedro Alves <palves@redhat.com>
13096
13097 Fix PR server/13392.
13098 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
13099 offset of JMP insn.
13100 * tracepoint.c (remove_tracepoint): New.
13101 (cmd_qtdp): Call remove_tracepoint when failed to install.
13102
13103 2012-03-07 Pedro Alves <palves@redhat.com>
13104
13105 * linux-low.c (get_detach_signal): New.
13106 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
13107 Pass on pending signals to PTRACE_DETACH. Check the result of the
13108 ptrace call.
13109 * server.c (program_signals, program_signals_p): New.
13110 (handle_general_set): Handle QProgramSignals.
13111 * server.h (program_signals, program_signals_p): Declare.
13112
13113 2012-03-05 Pedro Alves <palves@redhat.com>
13114 Jan Kratochvil <jan.kratochvil@redhat.com>
13115
13116 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
13117 New comment why.
13118
13119 2012-03-03 Yao Qi <yao@codesourcery.com>
13120
13121 * tracepoint.c (tracepoint_look_up_symbols): Update call to
13122 agent_look_up_symbols.
13123
13124 2012-03-03 Yao Qi <yao@codesourcery.com>
13125
13126 * Makefile.in (linux-low.o): Keep dependence on agent.h.
13127 (linux-x86-low.o): Likewise.
13128 * server.h: Remove in_process_agent_loaded.
13129 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
13130 common/agent.c.
13131 Update callers.
13132
13133 2012-03-03 Yao Qi <yao@codesourcery.com>
13134
13135 * tracepoint.c (gdb_agent_capability): New global.
13136 (in_process_agent_loaded_ust): Renamed to
13137 `in_process_agent_supports_ust'.
13138 Update callers.
13139 (in_process_agent_supports_ust): Call agent_capability_check.
13140 (clear_installed_tracepoints): Assert that agent supports
13141 agent.
13142
13143 2012-03-03 Yao Qi <yao@codesourcery.com>
13144
13145 * linux-low.c (linux_supports_agent): New.
13146 (linux_target_ops): Initialize field `supports_agent' with
13147 linux_supports_agent.
13148 * target.h (struct target_ops) <supports_agent>: New.
13149 (target_supports_agent): New macro.
13150 * server.c (handle_general_set): Handle packet 'QAgent'.
13151 (handle_query): Send `QAgent+'.
13152 * Makefile.in (server.o): Depends on agent.h.
13153
13154 2012-03-03 Yao Qi <yao@codesourcery.com>
13155
13156 * Makefile.in (OBS): Add agent.o.
13157 Add new rule for agent.o.
13158 Track dependence of tracepoint.c on agent.h.
13159 * tracepoint.c (run_inferior_command_1):
13160 (run_inferior_command): Call agent_run_command.
13161 (gdb_ust_connect_sync_socket): Deleted. Move it to
13162 common/agent.c.
13163 (resume_thread, stop_thread): Likewise.
13164 (gdb_ust_socket_init): Renamed to ...
13165 (gdb_agent_socket_init): ... New.
13166 (gdb_ust_thread): Renamed to ...
13167 (gdb_agent_helper_thread): ... New.
13168 (gdb_ust_init): Move some code to ...
13169 (gdb_agent_init): ... here. New.
13170 [HAVE_UST]: Call gdb_ust_init.
13171 (initialize_tracepoint_ftlib): Call gdb_agent_init.
13172 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
13173 * config.in, configure: Regenerated.
13174
13175 2012-03-02 Pedro Alves <palves@redhat.com>
13176
13177 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
13178 * linux-low.c (struct simple_pid_list): New.
13179 (stopped_pids): New a struct simple_pid_list pointer.
13180 (add_to_pid_list, pull_pid_from_list): New.
13181 (handle_extended_wait): Don't assume the first signal new children
13182 report is SIGSTOP. Adjust call to pull_pid_from_list.
13183 (linux_wait_for_lwp): Adjust.
13184
13185 2012-03-02 Yao Qi <yao@codesourcery.com>
13186
13187 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
13188 debug log.
13189
13190 2012-03-02 Yao Qi <yao@codesourcery.com>
13191
13192 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
13193 `stop_pc' and `tpoint'. Update caller.
13194
13195 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
13196
13197 * linux-low.h (linux_target_ops): Add regset_bitmap member.
13198 * linux-low.c (use_linux_regsets): New macro.
13199 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
13200 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
13201 (linux_register_in_regsets): New function.
13202 (usr_fetch_inferior_registers): Skip registers covered by
13203 regsets.
13204 (usr_store_inferior_registers): Likewise.
13205 (usr_fetch_inferior_registers): New macro.
13206 (usr_store_inferior_registers): Likewise.
13207 (linux_fetch_registers): Handle mixed regset/non-regset targets.
13208 (linux_store_registers): Likewise.
13209 * linux-mips-low.c (init_registers_mips_dsp_linux): New
13210 prototype.
13211 (init_registers_mips64_dsp_linux): Likewise.
13212 (init_registers_mips_linux): New macro.
13213 (init_registers_mips_dsp_linux): Likewise.
13214 (mips_dsp_num_regs): Likewise.
13215 (DSP_BASE, DSP_CONTROL): New fallback macros.
13216 (mips_base_regs): New macro.
13217 (mips_regmap): Use it. Fix the size.
13218 (mips_dsp_regmap): New variable.
13219 (mips_dsp_regset_bitmap): Likewise.
13220 (mips_arch_setup): New function.
13221 (mips_cannot_fetch_register): Use the_low_target.regmap rather
13222 than mips_regmap.
13223 (mips_cannot_store_register): Likewise.
13224 (the_low_target): Update .arch_setup, .num_regs and .regmap
13225 initializers. Add .regset_bitmap initializer.
13226 * linux-arm-low.c (the_low_target): Add .regset_bitmap
13227 initializer.
13228 * linux-bfin-low.c (the_low_target): Likewise.
13229 * linux-cris-low.c (the_low_target): Likewise.
13230 * linux-crisv32-low.c (the_low_target): Likewise.
13231 * linux-ia64-low.c (the_low_target): Likewise.
13232 * linux-m32r-low.c (the_low_target): Likewise.
13233 * linux-m68k-low.c (the_low_target): Likewise.
13234 * linux-ppc-low.c (the_low_target): Likewise.
13235 * linux-s390-low.c (the_low_target): Likewise.
13236 * linux-sh-low.c (the_low_target): Likewise.
13237 * linux-sparc-low.c (the_low_target): Likewise.
13238 * linux-tic6x-low.c (the_low_target): Likewise.
13239 * linux-x86-low.c (the_low_target): Likewise.
13240 * linux-xtensa-low.c (the_low_target): Likewise.
13241 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
13242 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
13243 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
13244 srv_xmlfiles.
13245 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
13246 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
13247
13248 2012-02-29 Yao Qi <yao@codesourcery.com>
13249 Pedro Alves <palves@redhat.com>
13250
13251 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
13252 `step_over_finished' is true.
13253
13254 2012-02-27 Pedro Alves <palves@redhat.com>
13255
13256 * linux-low.c (pid_is_stopped): Delete, moved to common/.
13257 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
13258
13259 2012-02-27 Pedro Alves <palves@redhat.com>
13260
13261 PR server/9684
13262 * linux-low.c (pid_is_stopped): New.
13263 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
13264
13265 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
13266
13267 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
13268 of conditions.
13269
13270 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
13271
13272 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
13273
13274 2012-02-24 Luis Machado <lgustavo@codesourcery>
13275
13276 * server.c (handle_query): Advertise support for target-side
13277 breakpoint condition evaluation.
13278 (process_point_options): New function.
13279 (process_serial_event): When inserting a breakpoint, check for
13280 a target-side condition that should be evaluated.
13281
13282 * mem-break.c: Include regcache.h and ax.h.
13283 (point_cond_list_t): New data structure.
13284 (breakpoint) <cond_list>: New field.
13285 (find_gdb_breakpoint_at): Make non-static.
13286 (delete_gdb_breakpoint_at): Clear any target-side
13287 conditions.
13288 (clear_gdb_breakpoint_conditions): New function.
13289 (add_condition_to_breakpoint): Likewise.
13290 (add_breakpoint_condition): Likewise.
13291 (gdb_condition_true_at_breakpoint): Likewise.
13292 (gdb_breakpoint_here): Return result directly instead
13293 of going through a local variable.
13294
13295 * mem-break.h (find_gdb_breakpoint_at): New prototype.
13296 (clear_gdb_breakpoint_conditions): Likewise.
13297 (add_breakpoint_condition): Likewise.
13298 (gdb_condition_true_at_breakpoint): Likewise.
13299
13300 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
13301 (need_step_over_p): Take target-side breakpoint condition into
13302 consideration.
13303
13304 2012-02-24 Luis Machado <lgustavo@codesourcery>
13305
13306 * server.h: Include tracepoint.h.
13307 (agent_mem_read, agent_get_trace_state_variable_value,
13308 agent_set_trace_state_variable_value,
13309 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
13310 get_set_tsv_func_addr): New prototypes.
13311
13312 * ax.h: New include file.
13313 * ax.c: New source file.
13314
13315 * tracepoint.c: Include ax.h.
13316 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
13317 agent_expr, eval_result_type): Move to ax.h.
13318 (parse_agent_expr): Rename to ...
13319 (gdb_parse_agent_expr): ... this, make it non-static and move
13320 to ax.h.
13321 (unparse_agent_expr) Rename to ...
13322 (gdb_unparse_agent_expr): ... this, make it non-static and move
13323 to ax.h.
13324 (eval_agent_expr): Rename to ...
13325 (eval_tracepoint_agent_expr): ... this.
13326 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
13327 forward declarations.
13328 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
13329 (agent_get_trace_state_variable_value): New function.
13330 (agent_set_trace_state_variable_value): New function.
13331 (cmd_qtdp): Call gdb_parse_agent_expr (...).
13332 (response_tracepoint): Call gdb_unparse_agent_expr (...).
13333 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
13334 (condition_true_at_tracepoint): Likewise.
13335 (parse_agent_expr): Rename to ...
13336 (gdb_parse_agent_expr): ... this and move to ax.c.
13337 (unparse_agent_expr): Rename to ...
13338 (gdb_unparse_agent_expr): ... this and move to ax.c.
13339 (gdb_agent_op_name): Move to ax.c.
13340 (eval_agent_expr): Rename to ...
13341 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
13342 and move to ax.c.
13343 (eval_tracepoint_agent_expr): New function.
13344 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
13345 non-static.
13346 (current_insn_ptr, emit_error, struct bytecode_address): Move to
13347 ax.c.
13348 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
13349 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
13350 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
13351 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
13352 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
13353 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
13354 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
13355 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
13356 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
13357 (compile_bytecodes): Remove forward declaration.
13358 (is_goto_target): Move to ax.c.
13359 (compile_bytecodes): Move to ax.c and call
13360 agent_get_trace_state_variable_value (...) and
13361 agent_set_trace_state_variable_value (...).
13362
13363 * Makefile.in: Update ax.c and IPA dependencies.
13364
13365 2012-02-24 Pedro Alves <palves@redhat.com>
13366
13367 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
13368 (cmd_bigqtbuffer_circular): ... this. Only handle
13369 'QTBuffer:circular:'.
13370 (handle_tracepoint_general_set): Adjust.
13371
13372 2012-02-16 Yao Qi <yao@codesourcery.com>
13373
13374 * inferiors.c: Move code to ...
13375 * dll.c: .... here. New.
13376 * server.h: Declare clear_dlls.
13377 * Makefile.in (SFILES): Add dll.c.
13378 (OBS): Add dll.o
13379 (dll.o): New rule.
13380
13381 2012-02-11 Yao Qi <yao@codesourcery.com>
13382
13383 * server.c: (handle_monitor_command): Add a new parameter
13384 `own_buf'.
13385 (handle_query): Update caller.
13386
13387 2012-02-09 Joel Brobecker <brobecker@adacore.com>
13388
13389 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
13390 * configure, config.in: Regenerate.
13391 * hostio.c: Provide an alternate implementation if HAVE_READLINK
13392 is not defined.
13393
13394 2012-02-02 Pedro Alves <palves@redhat.com>
13395
13396 Try SIGKILL first, then PTRACE_KILL.
13397 * linux-low.c (linux_kill_one_lwp): New.
13398 (linux_kill_one_lwp): Rename to ...
13399 (kill_one_lwp_callback): ... this. Use the new
13400 linux_kill_one_lwp.
13401
13402 2012-02-02 Pedro Alves <palves@redhat.com>
13403
13404 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
13405 inferior.
13406
13407 2012-01-27 Pedro Alves <palves@redhat.com>
13408
13409 * linux-low.c (linux_child_pid_to_exec_file): Delete.
13410 (elf_64_file_p): Make static.
13411 (linux_pid_exe_is_elf_64_file): New.
13412 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
13413 Delete declarations.
13414 (linux_pid_exe_is_elf_64_file): Declare.
13415 * linux-x86-low.c (x86_arch_setup): Use
13416 linux_pid_exe_is_elf_64_file.
13417
13418 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13419
13420 * linux-low.c (linux_wait_for_event_1): Rename to ...
13421 (linux_wait_for_event): ... here and merge it with former
13422 linux_wait_for_event - new variable wait_ptid, use it.
13423 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
13424
13425 2012-01-23 Pedro Alves <palves@redhat.com>
13426
13427 * server.c (main): Avoid yet another case of infinite loop while
13428 detaching/killing after a longjmp.
13429
13430 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13431
13432 Code cleanup.
13433 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
13434
13435 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
13436
13437 * hostio.c (handle_readlink): New function.
13438 (handle_vFile): Call it to handle "vFile:readlink" packets.
13439
13440 2012-01-20 Pedro Alves <palves@redhat.com>
13441 Ulrich Weigand <ulrich.weigand@linaro.org>
13442
13443 * server.c (handle_v_requests): Only support vAttach and vRun to
13444 start multiple processes when in extended protocol mode.
13445
13446 2012-01-17 Pedro Alves <palves@redhat.com>
13447
13448 * tracepoint.c (initialize_tracepoint): Use mmap instead of
13449 memalign plus mprotect to allocate the scratch buffer.
13450
13451 2012-01-13 Pedro Alves <palves@redhat.com>
13452
13453 * server.c (attach_inferior): Clear `cont_thread'.
13454
13455 2012-01-13 Pedro Alves <palves@redhat.com>
13456
13457 * server.c (main): Avoid infinite loop while detaching/killing
13458 after a longjmp.
13459
13460 2012-01-09 Doug Evans <dje@google.com>
13461
13462 * server.c (start_inferior): Set last_ptid in --wrapper case.
13463
13464 2012-01-06 Yao Qi <yao@codesourcery.com>
13465
13466 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
13467 defined.
13468 [IN_PROCESS_AGENT] (debug_agent): New global variable.
13469
13470 2012-01-04 Yao Qi <yao@codesourcery.com>
13471
13472 * tracepoint.c (cmd_qtdp): Print debug message
13473 for static tracepoint.
13474
13475 2012-01-04 Yao Qi <yao@codesourcery.com>
13476
13477 * tracepoint.c (trace_vdebug): Differentiate debug message
13478 between gdbserver and IPA.
13479
13480 2012-01-03 Yao Qi <yao@codesourcery.com>
13481
13482 * tracepoint.c (tracepoint_was_hit): Don't collect for
13483 static tracepoint.
13484
13485 2012-01-02 Joel Brobecker <brobecker@adacore.com>
13486
13487 * terminal.h: Reformat copyright header.
13488
13489 2012-01-02 Joel Brobecker <brobecker@adacore.com>
13490
13491 * server.c (gdbserver_version): Update copyright year.
13492 * gdbreplay.c (gdbreplay_version): Likewise.
13493
13494 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
13495
13496 * linux-low.c (linux_create_inferior): Put empty if clause for write.
13497
13498 Revert:
13499 2011-12-18 Hui Zhu <teawater@gmail.com>
13500 * linux-low.c (linux_create_inferior): Save return value to ret.
13501
13502 2011-12-18 Hui Zhu <teawater@gmail.com>
13503
13504 * linux-low.c (linux_create_inferior): Save return value to ret.
13505
13506 2011-12-16 Doug Evans <dje@google.com>
13507
13508 * linux-low.c (linux_create_inferior): If stdio connection,
13509 redirect stdin from /dev/null, stdout to stderr.
13510 * remote-utils.c (remote_is_stdio): New static global.
13511 (remote_connection_is_stdio): New function.
13512 (remote_prepare): Handle stdio connection.
13513 (remote_open): Ditto.
13514 (remote_close): Don't close stdin for stdio connections.
13515 (read_prim,write_prim): New functions. Replace all calls to
13516 read/write to these.
13517 * server.c (main): Watch for "-" argument. Move call to
13518 remote_prepare before start_inferior.
13519 * server.h (STDIO_CONNECTION_NAME): New macro.
13520 (remote_connection_is_stdio): Declare.
13521
13522 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
13523 in debugging output.
13524
13525 2011-12-15 Yao Qi <yao@codesourcery.com>
13526
13527 * tracepoint.c: Include sys/syscall.h.
13528 (gdb_ust_thread): Remove preprocessor conditional.
13529
13530 2011-12-14 Pedro Alves <pedro@codesourcery.com>
13531
13532 * linux-low.c (linux_detach_one_lwp): Call
13533 the_low_target.prepare_to_resume before detaching.
13534
13535 2011-12-14 Yao Qi <yao@codesourcery.com>
13536
13537 * tracepoint.c (gdb_ust_thread): Don't ignore return value
13538 of write.
13539
13540 2011-12-14 Yao Qi <yao@codesourcery.com>
13541
13542 * i386-low.c (i386_low_stopped_data_address): Initialize local
13543 variable `control'.
13544
13545 2011-12-13 Pedro Alves <pedro@codesourcery.com>
13546
13547 PR remote/13492
13548
13549 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
13550 DR_CONTROL unless necessary. Extend comments.
13551 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
13552 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
13553
13554 2011-12-13 Yao Qi <yao@codesourcery.com>
13555
13556 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
13557 macros.
13558 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
13559
13560 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
13561
13562 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
13563 Print new debug message for such case.
13564
13565 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13566
13567 Fix overlapping memcpy.
13568 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
13569 the read_inferior_memory transfer.
13570 (delete_fast_tracepoint_jump): New variable buf. Use it for the
13571 write_inferior_memory transfer.
13572 (set_fast_tracepoint_jump): New variable buf. Use it for the
13573 read_inferior_memory and write_inferior_memory transfers.
13574 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
13575 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
13576 Use it for the write_inferior_memory transfer.
13577 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
13578 buffers.
13579
13580 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
13581
13582 * linux-low.c (fetch_register, store_register): Make code
13583 consistent, fix formatting.
13584
13585 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
13586
13587 * linux-low.c (usr_store_inferior_registers): Factor out code
13588 to handle individual registers into...
13589 (store_register): ... this new function.
13590
13591 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
13592
13593 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
13594 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
13595 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
13596 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
13597 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
13598 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
13599 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
13600 (srv_xmlfiles): Add new XML files.
13601
13602 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
13603 and <sys/uio.h>.
13604 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
13605 (init_registers_s390_linux32v1): Add prototype.
13606 (init_registers_s390_linux32v2): Likewise.
13607 (init_registers_s390_linux64v1): Likewise.
13608 (init_registers_s390_linux64v2): Likewise.
13609 (init_registers_s390x_linux64v1): Likewise.
13610 (init_registers_s390x_linux64v2): Likewise.
13611 (s390_num_regs): Increment to 52.
13612 (s390_regmap): Add orig_r2 register.
13613 (s390_num_regs_3264): Increment to 68.
13614 (s390_regmap_3264): Add orig_r2 register.
13615 (s390_collect_ptrace_register): Handle orig_r2 register.
13616 (s390_supply_ptrace_register): Likewise.
13617 (s390_fill_last_break): New function.
13618 (s390_store_last_break): Likewise.
13619 (s390_fill_system_call): New function.
13620 (s390_store_system_call): Likewise.
13621 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
13622 register sets.
13623 (s390_check_regset): New function.
13624 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
13625 NT_S390_SYSTEM_CALL regsets and use appropriate description.
13626 Update target_regsets for available register sets.
13627
13628 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
13629 Jan Kratochvil <jan.kratochvil@redhat.com>
13630
13631 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
13632 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
13633 New.
13634 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
13635 * linux-low.h (struct process_info_private): New member r_debug.
13636 * server.c (handle_qxfer_libraries): Call
13637 the_target->qxfer_libraries_svr4.
13638 (handle_qxfer_libraries_svr4): New function.
13639 (qxfer_packets): New entry "libraries-svr4".
13640 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
13641 * target.h (struct target_ops): New member qxfer_libraries_svr4.
13642 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
13643 PACKET_qXfer_libraries_svr4.
13644
13645 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
13646
13647 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
13648 PSW address/mask between 8-byte and 16-byte formats.
13649 (s390_supply_ptrace_register): Likewise.
13650 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
13651 basic addressing mode bit.
13652
13653 2011-11-24 Stan Shebs <stan@codesourcery.com>
13654
13655 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
13656
13657 2011-11-17 Stan Shebs <stan@codesourcery.com>
13658
13659 * tracepoint.c (struct tracepoint): New field traceframe_usage.
13660 (tracing_start_time): New global.
13661 (tracing_stop_time): New global.
13662 (tracing_user_name): New global.
13663 (tracing_notes): New global.
13664 (tracing_stop_note): New global.
13665 (cmd_qtstart): Set traceframe_usage, start_time.
13666 (stop_tracing): Set stop_time.
13667 (cmd_qtstatus): Report additional status.
13668 (cmd_qtp): New function.
13669 (handle_tracepoint_query): Call it.
13670 (cmd_qtnotes): New function.
13671 (handle_tracepoint_general_set): Call it.
13672 (get_timestamp): Rename from tsv_get_timestamp.
13673
13674 2011-11-14 Stan Shebs <stan@codesourcery.com>
13675 Kwok Cheung Yeung <kcy@codesourcery.com>
13676
13677 * linux-x86-low.c (small_jump_insn): New.
13678 (i386_install_fast_tracepoint_jump_pad): Add arguments for
13679 trampoline and error message, build a trampoline and issue a small
13680 jump instruction to it.
13681 (x86_install_fast_tracepoint_jump_pad): Add arguments for
13682 trampoline and error message.
13683 (x86_get_min_fast_tracepoint_insn_len): New.
13684 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
13685 * linux-low.h (struct linux_target_ops): Add arguments to
13686 install_fast_tracepoint_jump_pad operation, add new operation.
13687 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
13688 arguments.
13689 (linux_get_min_fast_tracepoint_insn_len): New function.
13690 (linux_target_op): Add new operation.
13691 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
13692 (gdb_trampoline_buffer_end): Ditto.
13693 (gdb_trampoline_buffer_error): Ditto.
13694 (struct ipa_sym_addresses): Add fields for new IPA variables.
13695 (symbol_list): Add entries for new IPA variables.
13696 (struct tracepoint): Add fields to hold the address range of the
13697 trampoline used by the tracepoint.
13698 (trampoline_buffer_head): New static variable.
13699 (trampoline_buffer_tail): Ditto.
13700 (claim_trampoline_space): New function.
13701 (have_fast_tracepoint_trampoline_buffer): New function.
13702 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
13703 structure.
13704 (install_fast_tracepoint): Ditto, also add error buffer argument.
13705 (cmd_qtminftpilen): New function.
13706 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
13707 (fast_tracepoint_from_trampoline_address): New function.
13708 (fast_tracepoint_collecting): Handle trampoline as part of jump
13709 pad space.
13710 (set_trampoline_buffer_space): New function.
13711 (initialize_tracepoint): Initialize new IPA variables.
13712 * target.h (struct target_ops): Add arguments to
13713 install_fast_tracepoint_jump_pad operation, add new
13714 get_min_fast_tracepoint_insn_len operation.
13715 (target_get_min_fast_tracepoint_insn_len): New.
13716 (install_fast_tracepoint_jump_pad): Add arguments.
13717 * server.h (IPA_BUFSIZ): Define.
13718 * linux-i386-ipa.c: Include extra header files.
13719 (initialize_fast_tracepoint_trampoline_buffer): New function.
13720 (initialize_low_tracepoint): Call it.
13721 * server.h (set_trampoline_buffer_space): Declare.
13722 (claim_trampoline_space): Ditto.
13723 (have_fast_tracepoint_trampoline_buffer): Ditto.
13724
13725 2011-11-14 Yao Qi <yao@codesourcery.com>
13726
13727 * server.c (handle_query): Handle InstallInTrace for qSupported.
13728 * tracepoint.c (add_tracepoint): Sort list.
13729 (install_tracepoint, download_tracepoint): New.
13730 (cmd_qtdp): Call them to install and download tracepoints.
13731 (sort_tracepoints): Removed.
13732 (cmd_qtstart): Update.
13733
13734 2011-11-14 Yao Qi <yao@codesourcery.com>
13735
13736 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
13737 * mem-break.h: Declare.
13738 * tracepoint.c (cmd_qtstart): Move some code to ...
13739 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
13740 New.
13741 (download_tracepoints): Move some code to ...
13742 (download_tracepoint_1): ... here. New.
13743
13744 2011-11-08 Yao Qi <yao@codesourcery.com>
13745
13746 * remote-utils.c (relocate_instruction): A comment fix.
13747
13748 2011-11-07 Joel Brobecker <brobecker@adacore.com>
13749
13750 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
13751 (i386_dr_low_get_control, i386_dr_low_get_status): Use
13752 dr_status_mirror and dr_control_mirror from debug_reg_state.
13753 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
13754 (i386_initial_stuff): Remove use of deleted globals.
13755 (i386_get_thread_context, i386_set_thread_context,
13756 i386_thread_added): Use dr_status_mirror and dr_control_mirror
13757 from debug_reg_state.
13758
13759 2011-11-05 Yao Qi <yao@codesourcery.com>
13760
13761 * tracepoint.c (gdb_collect): Loop over tracepoints of same
13762 address as TPOINT's.
13763
13764 2011-11-02 Stan Shebs <stan@codesourcery.com>
13765
13766 * tracepoint.c (agent_mem_read_string): New function.
13767 (eval_agent_expr): Call it for tracenz.
13768 * server.c (handle_query): Report support for tracenz.
13769
13770 2011-11-02 Yao Qi <yao@codesourcery.com>
13771
13772 * tracepoint.c (cmd_qtstart): Remove unused local variables.
13773
13774 2011-11-02 Yao Qi <yao@codesourcery.com>
13775
13776 * target.h: Fix a typo in comment.
13777
13778 2011-10-31 Pedro Alves <pedro@codesourcery.com>
13779
13780 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
13781 clobber the breakpoints' shadows with fast tracepoint jumps.
13782 * mem-break.h (check_mem_write): Add `myaddr' parameter.
13783 * target.c (write_inferior_memory): Also pass MYADDR down to
13784 check_mem_write.
13785
13786 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
13787
13788 * configure.ac: Check support for personality routine.
13789 * configure: Regenerate.
13790 * config.in: Likewise.
13791 * linux-low.c: Include <sys/personality.h>.
13792 Define ADDR_NO_RANDOMIZE if necessary.
13793 (linux_create_inferior): Disable address space randomization when
13794 forking inferior, if requested.
13795 (linux_supports_disable_randomization): New function.
13796 (linux_target_ops): Install it.
13797 * server.h (disable_randomization): Declare.
13798 * server.c (disable_randomization): New global variable.
13799 (handle_general_set): Handle QDisableRandomization.
13800 (handle_query): Likewise for qSupported.
13801 (main): Support --disable-randomization and --no-disable-randomization
13802 command line arguments.
13803 * target.h (struct target_ops): Add supports_disable_randomization.
13804 (target_supports_disable_randomization): New macro.
13805
13806 2011-09-29 Mike Frysinger <vapier@gentoo.org>
13807
13808 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
13809 ifdef check.
13810 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
13811 [!PT_GETDSBT] (target_loadmap): New definition.
13812 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
13813 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
13814 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
13815 and PT_GETDSBT to LINUX_LOADMAP.
13816 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
13817 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
13818
13819 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13820
13821 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
13822 (arm_linux_hwbp_cap): New static variable.
13823 (arm_linux_get_hwbp_cap): Replace by ...
13824 (arm_linux_init_hwbp_cap): ... this new function.
13825 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
13826 (arm_linux_get_hw_watchpoint_count): Likewise.
13827 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13828 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
13829 (arm_prepare_to_resume): Use perror_with_name instead of error.
13830
13831 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13832
13833 * linux-arm-low.c: Include <signal.h>.
13834 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
13835 (struct arm_linux_hwbp_cap): New data type.
13836 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
13837 (struct arm_linux_hw_breakpoint): New data type.
13838 (MAX_BPTS, MAX_WPTS): Define.
13839 (struct arch_process_info, struct arch_lwp_info): New data types.
13840 (arm_linux_get_hwbp_cap): New function.
13841 (arm_linux_get_hw_breakpoint_count): Likewise.
13842 (arm_linux_get_hw_watchpoint_count): Likewise.
13843 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13844 (arm_hwbp_control_initialize): Likewise.
13845 (arm_hwbp_control_is_enabled): Likewise.
13846 (arm_hwbp_control_is_initialized): Likewise.
13847 (arm_hwbp_control_disable): Likewise.
13848 (arm_linux_hw_breakpoint_equal): Likewise.
13849 (arm_linux_hw_point_initialize): Likewise.
13850 (struct update_registers_data): New data structure.
13851 (update_registers_callback: New function.
13852 (arm_insert_point): Likewise.
13853 (arm_remove_point): Likewise.
13854 (arm_stopped_by_watchpoint): Likewise.
13855 (arm_stopped_data_address): Likewise.
13856 (arm_new_process): Likewise.
13857 (arm_new_thread): Likewise.
13858 (arm_prepare_to_resume): Likewise.
13859 (the_low_target): Register arm_insert_point, arm_remove_point,
13860 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
13861 arm_new_thread, and arm_prepare_to_resume.
13862
13863 2011-09-15 Stan Shebs <stan@codesourcery.com>
13864
13865 * server.h (struct emit_ops): Add compare-goto fields.
13866 * tracepoint.c (gdb_agent_op_sizes): New table.
13867 (emit_eq_goto): New function.
13868 (emit_ne_goto): New function.
13869 (emit_lt_goto): New function.
13870 (emit_le_goto): New function.
13871 (emit_gt_goto): New function.
13872 (emit_ge_goto): New function.
13873 (is_goto_target): New function.
13874 (compile_bytecodes): Recognize special cases of compare-goto
13875 combinations and call specialized emitters for them.
13876 * linux-x86-low.c (amd64_emit_eq_goto): New function.
13877 (amd64_emit_ne_goto): New function.
13878 (amd64_emit_lt_goto): New function.
13879 (amd64_emit_le_goto): New function.
13880 (amd64_emit_gt_goto): New function.
13881 (amd64_emit_ge_goto): New function.
13882 (amd64_emit_ops): Add the new functions.
13883 (i386_emit_eq_goto): New function.
13884 (i386_emit_ne_goto): New function.
13885 (i386_emit_lt_goto): New function.
13886 (i386_emit_le_goto): New function.
13887 (i386_emit_gt_goto): New function.
13888 (i386_emit_ge_goto): New function.
13889 (i386_emit_ops): Add the new functions.
13890
13891 2011-09-08 Stan Shebs <stan@codesourcery.com>
13892
13893 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
13894 (i386_emit_epilogue): Restore %ebx.
13895
13896 2011-08-31 Jie Zhang <jzhang918@gmail.com>
13897
13898 * server.c (step_thread): Remove definition.
13899 (process_serial_event): Don't handle Hs.
13900 * server.h (step_thread): Remove declaration.
13901 * target.c (set_desired_inferior): Remove use of step_thread.
13902
13903 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13904
13905 * linux-low.c: Include linux-procfs.h.
13906 (linux_attach_lwp_1): Update comments.
13907 (linux_attach): Scan for existing threads when attaching to a
13908 process that is the tgid.
13909 * Makefile.in: Update dependencies.
13910
13911 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13912
13913 * configure.srv: Add linux-procfs.o dependencies.
13914
13915 2011-08-14 Yao Qi <yao@codesourcery.com>
13916
13917 * target.h (struct target_ops): Fix indent.
13918 * win32-low.c (win32_target_ops): Fix comment.
13919
13920 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
13921 Yao Qi <yao@codesourcery.com>
13922
13923 * Makefile.in (clean): Remove tic6x-*.c files.
13924 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
13925 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
13926 (tic6x-c64xp-linux.c): Likewise.
13927 * configure.srv: Add support for tic6x-*-uclinux.
13928 * linux-tic6x-low.c: New.
13929 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
13930
13931 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
13932 Yao Qi <yao@codesourcery.com>
13933
13934 * target.h (struct target_ops): Add read_loadmap.
13935 * linux-low.c (struct target_loadseg): New type.
13936 (struct target_loadmap): New type.
13937 (linux_read_loadmap): New function.
13938 (linux_target_ops): Add linux_read_loadmap.
13939 * server.c (handle_query): Support qXfer:fdpic:read packet.
13940 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
13941 to NULL.
13942
13943 2011-08-05 Eli Zaretskii <eliz@gnu.org>
13944
13945 * win32-low.c: Include <stdint.h>.
13946
13947 2011-07-22 Pedro Alves <pedro@codesourcery.com>
13948
13949 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
13950 to the inferior here.
13951 (i386_remove_aligned_watchpoint): Ditto.
13952 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
13953 fit part of the watchpoint in the debug registers.
13954 (i386_update_inferior_debug_regs): New.
13955 (i386_low_insert_watchpoint): Work on a local mirror of the debug
13956 registers, and only update the inferior on success.
13957 (i386_low_remove_watchpoint): Ditto.
13958
13959 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
13960
13961 * linux-low.c (compare_ints, unique, list_threads, show_process,
13962 linux_core_of_thread): Delete.
13963 (linux_target_ops): Change linux_core_of_thread to
13964 linux_common_core_of_thread.
13965 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
13966 * utils.c (malloc_failure): Change type of argument.
13967 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
13968 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
13969 common/linux-osdata.c, common/ptid.c and common/buffer.c.
13970 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
13971 (IPA_OBJS): Add common-utils-ipa.o.
13972 (ptid_h, linux_osdata_h): New macros.
13973 (server_h): Add common/common-utils.h, common/xml-utils.h,
13974 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
13975 common/ptid.h.
13976 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
13977 ptid.o, buffer.o): New rules.
13978 (linux-low.o): Add common/linux-osdata.h as a dependency.
13979 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
13980 * configure.ac: Add AC_HEADER_DIRENT check.
13981 * config.in: Regenerate.
13982 * configure: Regenerate.
13983 * remote-utils.c (xml_escape_text): Delete.
13984 (buffer_grow, buffer_free, buffer_init, buffer_finish,
13985 buffer_xml_printf): Move to common/buffer.c.
13986 * server.c (main): Remove call to initialize_inferiors.
13987 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
13988 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
13989 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
13990 internal_error, gdb_assert, gdb_assert_fail): Delete.
13991 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
13992 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
13993 common/buffer.h.
13994 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
13995 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
13996 initialize_inferiors): Delete.
13997
13998 2011-07-20 Pedro Alves <pedro@codesourcery.com>
13999
14000 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
14001 symbol error.
14002
14003 2011-05-31 Pedro Alves <pedro@codesourcery.com>
14004
14005 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
14006 assertion.
14007 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
14008
14009 2011-05-26 Yao Qi <yao@codesourcery.com>
14010
14011 * Makefile.in (thread-db.o): Track dependence to
14012 common/gdb_thread_db.h.
14013 * thread-db.c: include gdb_thread_db.h from right place.
14014
14015 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
14016
14017 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
14018 __FILE__ and __LINE__ to internal_error.
14019
14020 2011-05-13 Doug Evans <dje@google.com>
14021
14022 * thread-db.c (try_thread_db_load_from_sdir): New function.
14023 (try_thread_db_load_from_dir): New function.
14024 (thread_db_load_search): Handle $sdir, ignore $pdir.
14025 Remove trying of system directories if search of
14026 libthread-db-search-path fails, that is now done via $sdir.
14027
14028 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
14029
14030 * server.c (handle_query): Add EnableDisableTracepoints to the list
14031 of supported features.
14032 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
14033 tracepoints.
14034 (cmd_qtenable_disable): New.
14035 (cmd_qtstart): Install tracepoints even if disabled.
14036 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
14037 receiving a QTEnable or QTDisable packet.
14038 (gdb_collect): Skip data collection if fast tracepoint is disabled.
14039 (ust_marker_to_static_tracepoint): Do not ignore disabled static
14040 tracepoints.
14041 (gdb_probe): Skip data collection if static tracepoint is disabled.
14042
14043 2011-05-10 Doug Evans <dje@google.com>
14044
14045 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
14046
14047 2011-05-04 Doug Evans <dje@google.com>
14048
14049 * linux-low.c (linux_join): Skip process lookup.
14050 * spu-low.c (spu_join): Ditto.
14051 * server.c (join_inferiors_callback): Delete.
14052 (process_serial_event): For 'D' packet (detach) call join_inferior
14053 directly.
14054
14055 2011-05-04 Joseph Myers <joseph@codesourcery.com>
14056
14057 * README: Don't mention xscale*-*-linux*.
14058 * configure.srv (xscale*-*-linux*): Don't handle target.
14059
14060 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
14061
14062 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
14063 casting pointers.
14064 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
14065 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
14066 (i386_emit_void_call_2): Likewise.
14067
14068 2011-04-26 Yao Qi <yao@codesourcery.com>
14069
14070 * linux-low.c: Move common macros to linux-ptrace.h.
14071 Include linux-ptrace.h.
14072 * Makefile.in (linux_ptrace_h): New.
14073 (linux-low.o): Depends on linux-ptrace.h.
14074
14075 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
14076
14077 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
14078 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
14079 (remote_prepare): New function with most of the TCP code from ...
14080 (remote_open): ... here. Detect PORT here unconditionally. Move also
14081 setting transport_is_reliable.
14082 * server.c (run_once): New variable.
14083 (gdbserver_usage): Document it.
14084 (main): Set run_once for `--once'. Call remote_prepare. Exit after
14085 the first run if RUN_ONCE.
14086 * server.h (run_once, remote_prepare): New declarations.
14087
14088 2011-04-19 Tom Tromey <tromey@redhat.com>
14089
14090 * win32-low.c (handle_load_dll): Remove duplicate "the".
14091
14092 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
14093
14094 Remove support for old Cygwin 1.5 versions.
14095 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
14096 function to avoid warning.
14097 (win32_add_one_solib): Use cygwin_conv_path function to avoid
14098 warning.
14099
14100 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
14101
14102 * gdbserver/server.h (Macro _): Define it if not available.
14103
14104 2011-03-14 Michael Snyder <msnyder@vmware.com>
14105
14106 * hostio.c (handle_close): Remove unnecessary null test.
14107
14108 2011-03-10 Joel Brobecker <brobecker@adacore.com>
14109
14110 * Makefile.in (maintainer-clean realclean distclean): Remove
14111 "make ... subdir_do" command.
14112
14113 2011-03-10 Michael Snyder <msnyder@vmware.com>
14114
14115 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
14116
14117 * server.c (handle_v_run): Free alloced buffer on early return.
14118
14119 2011-03-09 Yao Qi <yao@codesourcery.com>
14120
14121 Revert:
14122 2011-03-04 Yao Qi <yao@codesourcery.com>
14123
14124 * Makefile.in: Remove GNU make feature --directory.
14125
14126 2011-03-05 Yao Qi <yao@codesourcery.com>
14127
14128 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
14129 (subdir_do): New make target. Copied from gdb/Makefile.
14130 (maintainer-clean, realclean, distclean, clean): Call corresponding
14131 make targets in common/Makefile.
14132
14133 2011-02-11 Yao Qi <yao@codesourcery.com>
14134
14135 * configure.ac: Call AC_PROG_RANLIB.
14136 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
14137 * configure: Regenerate.
14138
14139 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14140
14141 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
14142
14143 2011-03-06 Yao Qi <yao@codesourcery.com>
14144
14145 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
14146
14147 2011-03-05 Yao Qi <yao@codesourcery.com>
14148
14149 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
14150 (subdir_do): New make target. Copied from gdb/Makefile.
14151 (maintainer-clean, realclean, distclean, clean): Call corresponding
14152 make targets in common/Makefile.
14153
14154 2011-03-04 Yao Qi <yao@codesourcery.com>
14155
14156 * Makefile.in: Remove GNU make feature --directory.
14157
14158 2011-03-04 Michael Snyder <msnyder@vmware.com>
14159
14160 * server.c (queue_stop_reply): Call xmalloc not malloc.
14161
14162 2011-03-02 Michael Snyder <msnyder@vmware.com>
14163
14164 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
14165
14166 2011-02-28 Michael Snyder <msnyder@vmware.com>
14167
14168 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
14169 (cmd_qtframe): Ditto.
14170 (cmd_qtbuffer): Ditto.
14171 (cmd_bigqtbuffer): Ditto.
14172
14173 * utils.c (decimal2str): Initialize 'width' to nine, then
14174 don't mess with it.
14175
14176 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14177
14178 * hostio.c (require_data): Free *data, not data.
14179
14180 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14181
14182 * hostio.c (require_data): Use free, not xfree.
14183
14184 2011-02-27 Michael Snyder <msnyder@vmware.com>
14185
14186 * server.c (handle_query): Discard unused value.
14187
14188 * hostio.c (require_data): Free malloc memory before returning
14189 error.
14190
14191 2011-02-26 Michael Snyder <msnyder@vmware.com>
14192
14193 * linux-low.c (list_threads): Call closedir for dirent.
14194
14195 2011-02-27 Michael Snyder <msnyder@vmware.com>
14196
14197 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
14198 a case statement falls through.
14199
14200 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
14201
14202 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
14203 in comparison.
14204
14205 2011-02-26 Michael Snyder <msnyder@vmware.com>
14206
14207 * utils.c (decimal2str): Eliminate dead code and dead param.
14208 (pulongest): Drop dead param from call to decimal2str.
14209 (plongest): Ditto.
14210
14211 2011-02-24 Joel Brobecker <brobecker@adacore.com>
14212
14213 Revert the following patch (not approved yet):
14214 2011-02-21 Hui Zhu <teawater@gmail.com>
14215 * tracepoint.c (tp_printf): New function.
14216 (eval_agent_expr): Handle gdb_agent_op_printf.
14217
14218 2011-02-21 Hui Zhu <teawater@gmail.com>
14219
14220 * tracepoint.c (tp_printf): New function.
14221 (eval_agent_expr): Handle gdb_agent_op_printf.
14222
14223 2011-02-18 Tom Tromey <tromey@redhat.com>
14224
14225 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
14226 (tracepoint.o): Likewise.
14227 * tracepoint.c (enum gdb_agent_op): Use ax.def.
14228 (gdb_agent_op_names): Likewise.
14229
14230 2011-02-18 Tom Tromey <tromey@redhat.com>
14231
14232 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
14233 gdb_agent_op_rot>: New constants.
14234 (gdb_agent_op_names): Add pick and roll.
14235 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
14236 cases.
14237
14238 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
14239
14240 * aclocal.m4: Regenerated with aclocal-1.11.1.
14241
14242 2011-02-14 Pedro Alves <pedro@codesourcery.com>
14243
14244 * server.c (handle_qxfer_traceframe_info): New.
14245 (qxfer_packets): Register "traceframe-info".
14246 (handle_query): Report support for qXfer:traceframe-info:read+.
14247 * tracepoint.c (match_blocktype): New.
14248 (traceframe_find_block_type): Rename to ...
14249 (traceframe_walk_blocks): ... this. Add callback filter argument,
14250 and use it.
14251 (traceframe_find_block_type): New, reimplemented on top of
14252 traceframe_walk_blocks.
14253 (build_traceframe_info_xml): New.
14254 (traceframe_read_info): New.
14255 * server.h (traceframe_read_info): Declare.
14256
14257 2011-02-11 Yao Qi <yao@codesourcery.com>
14258
14259 * configure.ac: Call AC_PROG_RANLIB.
14260 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
14261 * configure: Regenerate.
14262
14263 2011-02-07 Pedro Alves <pedro@codesourcery.com>
14264
14265 * server.c (gdb_read_memory): Change return semantics to allow
14266 partial transfers.
14267 (handle_search_memory_1): Adjust.
14268 (process_serial_event) <'m' packet>: Handle partial transfers.
14269 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
14270
14271 2011-01-28 Pedro Alves <pedro@codesourcery.com>
14272
14273 * regcache.c (init_register_cache): Initialize
14274 regcache->register_status.
14275 (free_register_cache): Release regcache->register_status.
14276 (regcache_cpy): Copy register_status.
14277 (registers_to_string): Print 'x's for unavailable registers.
14278 (supply_register): Mark the register's status valid or
14279 unavailable, depending on whether a buffer was passed in or not.
14280 (supply_register_zeroed): New.
14281 (supply_regblock): Mark the registers' status valid or
14282 unavailable, depending on whether a buffer was passed in or not.
14283 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
14284 (struct regcache): New `register_status' field.
14285 (supply_register_zeroed): Declare.
14286 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
14287 supply_register_zeroed, rather than passing a NULL buffer to
14288 supply_register.
14289 * tracepoint.c (fetch_traceframe_registers): Update comment.
14290
14291 2011-01-28 Pedro Alves <pedro@codesourcery.com>
14292
14293 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
14294 buffer explicit.
14295
14296 2011-01-25 Pedro Alves <pedro@codesourcery.com>
14297
14298 * server.h (decode_xfer_write): Change prototype.
14299 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
14300 and don't extract the annex here.
14301 * server.c (decode_xfer_read): Remove `annex' parameter,
14302 and don't extract the annex here.
14303 (decode_xfer): New.
14304 (struct qxfer): New.
14305 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
14306 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
14307 (handle_qxfer_statictrace): New functions, abstracted out from
14308 handle_query, and made to use the struct qxfer interface.
14309 (handle_threads_qxfer_proper): Rename to ...
14310 (handle_qxfer_threads_proper): ... this.
14311 (handle_threads_qxfer): Rename to ...
14312 (handle_qxfer_threads): ... this. Adjust.
14313 (qxfer_packets): New array.
14314 (handle_qxfer): New function.
14315 (handle_query): Use handle_qxfer.
14316
14317 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
14318
14319 * gdbreplay.c: Shorten lines of >= 80 columns.
14320 * linux-low.c: Ditto.
14321 * linux-ppc-low.c: Ditto.
14322 * linux-s390-low.c: Ditto.
14323 * linux-sparc-low.c: Ditto.
14324 * linux-x86-low.c: Ditto.
14325 * linux-xtensa-low.c: Ditto.
14326 * mem-break.c: Ditto.
14327 * nto-low.c: Ditto.
14328 * regcache.h: Ditto.
14329 * remote-utils.c: Ditto.
14330 * server.c: Ditto.
14331 * server.h: Ditto.
14332 * thread-db.c: Ditto.
14333 * tracepoint.c: Ditto.
14334 * utils.c: Ditto.
14335 * win32-low.h: Ditto.
14336
14337 2011-01-05 Joel Brobecker <brobecker@adacore.com>
14338
14339 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
14340 update.
14341
14342 2011-01-01 Joel Brobecker <brobecker@adacore.com>
14343
14344 * server.c (gdbserver_version): Update copyright year in version
14345 output.
14346 * gdbreplay.c (gdbreplay_version): Ditto.
14347
14348 2010-12-29 Jie Zhang <jie.zhang@analog.com>
14349
14350 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
14351 * linux-bfin-low.c: New file.
14352 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
14353 PT_DATA_ADDR for BFIN targets.
14354 * Makefile.in (SFILES): Add linux-bfin-low.c.
14355 (clean): Remove reg-bfin.c.
14356 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
14357 * README: Mention supported Blackfin targets.
14358
14359 2010-12-23 Mike Frysinger <vapier@gentoo.org>
14360
14361 * .gitignore: New file.
14362
14363 2010-11-16 Mike Frysinger <vapier@gentoo.org>
14364
14365 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
14366
14367 2010-10-22 Jie Zhang <jie@codesourcery.com>
14368
14369 * Makefile.in: Add FLAGS_TO_PASS variable.
14370 (install): Remove dependency of install-only and recursively
14371 invoke make for install-only.
14372
14373 2010-10-04 Doug Evans <dje@google.com>
14374
14375 * Makefile.in (uninstall): Use $(DESTDIR).
14376
14377 2010-09-24 Pedro Alves <pedro@codesourcery.com>
14378
14379 PR gdb/11842
14380
14381 * linux-x86-low.c (compat_siginfo_from_siginfo)
14382 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
14383 si_code is < 0. Check for si_code == SI_TIMER before checking for
14384 si_code < 0.
14385
14386 2010-09-13 Joel Brobecker <brobecker@adacore.com>
14387
14388 * lynx-i386-low.c: New file.
14389 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
14390
14391 2010-09-13 Joel Brobecker <brobecker@adacore.com>
14392
14393 * lynx-low.c (ptrace_request_to_str): Remove handling for
14394 request values that have been removed in LynxOS 5.x.
14395
14396 2010-09-13 Joel Brobecker <brobecker@adacore.com>
14397
14398 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
14399 <ptrace.h>
14400
14401 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
14402
14403 * configure.ac: Add --enable-inprocess-agent option.
14404 * configure: Rebuilt.
14405
14406 2010-09-06 Yao Qi <yao@codesourcery.com>
14407
14408 * linux-low.c (linux_kill): Remove unused variable.
14409 (linux_stabilize_threads): Likewise.
14410 * server.c (start_inferior): Likewise.
14411 (queue_stop_reply_callback): Likewise.
14412 * tracepoint.c (do_action_at_tracepoint): Likewise.
14413
14414 2010-09-06 Yao Qi <yao@codesourcery.com>
14415
14416 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
14417 on return.
14418
14419 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
14420
14421 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
14422
14423 2010-09-06 Pedro Alves <pedro@codesourcery.com>
14424
14425 * Makefile.in (install-only): Replace $IPA_DEPFILES with
14426 "$(IPA_DEPFILES)".
14427
14428 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14429
14430 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
14431 gdbserver/lynx-ppc-low.c: New files.
14432 * Makefile.in (lynx_low_h): New variable.
14433 (lynx-low.o, lynx-ppc-low.o): New rules.
14434 * configure.ac: On LynxOS, link with -lnetinet.
14435 * configure.srv: Add handling of powerpc-*-lynxos* targets.
14436 * configure: regenerate.
14437
14438 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14439
14440 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
14441 * configure.ac: Add check for vasprintf and vsnprintf.
14442 * configure, config.in: Regenerate.
14443 * server.h (vasprintf, vsnprintf): Add conditional declarations.
14444
14445 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14446
14447 * gdbreplay.c: Move include of alloca.h up, next to include of
14448 malloc.h.
14449 * server.h: Add include of malloc.h.
14450 * mem-break.c: Remove include of malloc.h.
14451 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
14452
14453 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14454
14455 * Makefile.in (memmem.o): Build with -Wno-error.
14456
14457 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14458
14459 * utils.c (xsnprintf): Make non-static.
14460 * server.h: Add xsnprintf declaration.
14461 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
14462 replace calls to snprintf by calls to xsnprintf throughout.
14463
14464 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14465
14466 * configure.ac: Add configure check for alloca.
14467 * configure, config.in: Regenerate.
14468 * server.h: Include alloca.h if it exists.
14469 * gdbreplay.c: Include alloca.h if it exists.
14470
14471 2010-08-28 Pedro Alves <pedro@codesourcery.com>
14472
14473 * linux-low.c (__SIGRTMIN): Define if not already defined.
14474 (linux_create_inferior): Check for __ANDROID__ rather than
14475 __SIGRTMIN.
14476 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
14477 are already deferred.
14478 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
14479 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
14480 stopped and already has a pending signal to report.
14481 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
14482 a pending signal to report or is moving out of a jump pad.
14483 (linux_init_signals): Check for __ANDROID__ rather than
14484 __SIGRTMIN.
14485
14486 2010-08-28 Pedro Alves <pedro@codesourcery.com>
14487
14488 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
14489 debug_threads check. Avoid a linear search when not doing debug
14490 output.
14491
14492 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14493
14494 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
14495 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
14496 (struct file_handler) <fd>: Change type to gdb_fildes_t.
14497 (process_event): Change local fd's type to gdb_fildes_t.
14498 (create_file_handler): Adjust prototype.
14499 (delete_file_handler): Adjust prototype.
14500 (handle_file_event): Adjust prototype. Use pfildes.
14501 (create_file_event): Adjsut prototype.
14502 * remote-utils.c (remote_desc, listen_desc): Change type to
14503 gdb_fildes_t.
14504 * server.h: New gdb_fildes_t typedef.
14505 [USE_WIN32API]: Include winsock2.h.
14506 (delete_file_handler, add_file_handler): Adjust prototypes.
14507 (pfildes): Declare.
14508 * utils.c (pfildes): New.
14509
14510 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14511
14512 * configure.ac (build_warnings): Add -Wno-char-subscripts.
14513 * configure: Regenerate.
14514
14515 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14516
14517 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
14518 (linux_done_accessing_memory): ... this.
14519 (linux_target_ops): Adjust.
14520 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
14521 * nto-low.c (nto_target_ops): Adjust comment.
14522 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
14523 * spu-low.c (spu_target_ops): Adjust comment.
14524 * target.h (target_ops): Rename unprepare_to_access_memory field
14525 to done_accessing_memory.
14526 (unprepare_to_access_memory): Rename to ...
14527 (done_accessing_memory): ... this.
14528
14529 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14530
14531 * linux-low.c (linux_prepare_to_access_memory): New.
14532 (linux_unprepare_to_access_memory): New.
14533 (linux_target_ops): Install them.
14534 * server.c (read_memory): Rename to ...
14535 (gdb_read_memory): ... this. Use
14536 prepare_to_access_memory/prepare_to_access_memory.
14537 (write_memory): Rename to ...
14538 (gdb_write_memory): ... this. Use
14539 prepare_to_access_memory/prepare_to_access_memory.
14540 (handle_search_memory_1): Adjust.
14541 (process_serial_event): Adjust.
14542 * target.h (struct target_ops): New fields
14543 prepare_to_access_memory and unprepare_to_access_memory.
14544 (prepare_to_access_memory, unprepare_to_access_memory): New.
14545 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
14546 prepare_to_access_memory/prepare_to_access_memory.
14547 * nto-low.c (nto_target_ops): Adjust.
14548 * spu-low.c (spu_target_ops): Adjust.
14549 * win32-low.c (win32_target_ops): Adjust.
14550
14551 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14552
14553 * Makefile.in (WARN_CFLAGS): Get it from configure.
14554 (WERROR_CFLAGS): New.
14555 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
14556 * configure.ac: Introduce --enable-werror, which adds -Werror to
14557 the compiler command line. Enabled by default. Disable with
14558 --disable-werror. Add -Wdeclaration-after-statement
14559 Wpointer-arith and -Wformat-nonliteral to warning flags.
14560 * configure: Regenerate.
14561
14562 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14563
14564 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
14565
14566 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14567
14568 * gdbreplay.c (remote_error): New.
14569 (gdbchar): New.
14570 (expect): Use gdbchar. Check for error reading from GDB.
14571 Clarify sync error output.
14572 (play): Check for errors writing to GDB.
14573 * linux-low.c (sigchld_handler): Really ignore `write' errors.
14574 * remote-utils.c (getpkt): Check for errors writing to the remote
14575 descriptor.
14576
14577 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14578
14579 * linux-low.c (linux_wait_1): Move non-debugging code out of
14580 `debug_threads' control.
14581
14582 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14583
14584 * linux-low.c (linux_wait_1): Don't set last_status here.
14585 * server.c (push_event, queue_stop_reply_callback): Assert we're
14586 not pushing a TARGET_WAITKIND_IGNORE event.
14587 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
14588 (myresume, handle_target_event): Set the thread's last_resume_kind
14589 and last_status from the target returned status.
14590
14591 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14592
14593 PR threads/10729
14594
14595 * linux-x86-low.c (update_debug_registers_callback): New.
14596 (i386_dr_low_set_addr): Use it.
14597 (i386_dr_low_get_addr): New.
14598 (i386_dr_low_set_control): Use update_debug_registers_callback.
14599 (i386_dr_low_get_control): New.
14600 (i386_dr_low_get_status): Adjust.
14601 * linux-low.c (linux_stop_lwp): New.
14602 * linux-low.h (linux_stop_lwp): Declare.
14603
14604 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
14605 argument instead of a i386_debug_reg_state.
14606 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
14607 a i386_debug_reg_state.
14608 (i386_insert_aligned_watchpoint): Adjust.
14609 (i386_remove_aligned_watchpoint): Adjust.
14610 (i386_low_stopped_data_address): Read the debug registers from the
14611 inferior instead of from the mirrors.
14612 * i386-low.h (struct i386_debug_reg_state): Extend comment.
14613 (i386_dr_low_get_addr): Declare.
14614 (i386_dr_low_get_control): Declare.
14615 (i386_dr_low_get_status): Change prototype.
14616
14617 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
14618 (i386_dr_low_get_addr): New.
14619 (i386_dr_low_get_control): New.
14620 (i386_dr_low_get_status): Adjust prototype. Return
14621 dr_status_mirror.
14622 (i386_initial_stuff): Clear dr_status_mirror and
14623 dr_control_mirror.
14624 (i386_get_thread_context): Adjust.
14625 (i386_set_thread_context): Adjust.
14626 (i386_thread_added): Adjust.
14627
14628 2010-08-24 Pedro Alves <pedro@codesourcery.com>
14629
14630 * linux-low.h (linux_thread_area): Delete declaration.
14631
14632 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
14633
14634 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
14635 after its termination.
14636
14637 2010-08-09 Pedro Alves <pedro@codesourcery.com>
14638
14639 * linux-low.c (gdb_wants_lwp_stopped): Delete.
14640 (gdb_wants_all_stopped): Delete.
14641 (linux_wait_1): Don't call them.
14642 * server.c (handle_v_cont): Tag all threads as want-stopped.
14643 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
14644 stopped as "client-wants-stopped".
14645
14646 2010-07-31 Pedro Alves <pedro@codesourcery.com>
14647
14648 * Makefile.in (signals_h): New.
14649 (server_h): Depend on it.
14650 (server.o): Don't depend on $(signals_def).
14651 (signals.o): Depend on $(signals_def).
14652
14653 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
14654
14655 * Makefile.in (signals_def): New.
14656 (server_h): Append include/gdb/signals.h and signals_def.
14657 (server.o): Append signals_def.
14658
14659 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
14660
14661 * server.c (handle_target_event): Use target_signal_to_host for
14662 resume_info.sig initialization.
14663 * target.h (struct thread_resume) <sig>: New comment.
14664
14665 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
14666
14667 * server.c (handle_query): strcpy() the returned string from paddress()
14668 instead of sprintf().
14669 * utils.c (paddress): Return phex_nz().
14670
14671 2010-07-07 Joel Brobecker <brobecker@adacore.com>
14672
14673 * server.c (handle_v_cont): Call mourn_inferior if process
14674 just exited.
14675 (myresume): Likewise.
14676
14677 2010-07-01 Pedro Alves <pedro@codesourcery.com>
14678
14679 Static tracepoints, and integration with UST.
14680
14681 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
14682 * mem-break.c (uninsert_all_breakpoints)
14683 (reinsert_all_breakpoints): New.
14684 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
14685 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
14686 (gdb_agent_ust_loaded, helper_thread_id)
14687 (gdb_agent_helper_thread_id): New macros.
14688 (struct ipa_sym_addresses): Add addr_ust_loaded,
14689 addr_helper_thread_id, addr_cmd_buf.
14690 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
14691 (in_process_agent_loaded_ust): New.
14692 (write_e_ust_not_loaded): New.
14693 (maybe_write_ipa_ust_not_loaded): New.
14694 (struct collect_static_trace_data_action): New.
14695 (enum tracepoint_type) <static_tracepoint>: New.
14696 (struct tracepoint) <handle>: Mention static tracepoints.
14697 (struct static_tracepoint_ctx): New.
14698 (CMD_BUF_SIZE): New.
14699 (add_tracepoint_action): Handle static tracepoint actions.
14700 (unprobe_marker_at): New.
14701 (clear_installed_tracepoints): Handle static tracepoints.
14702 (cmd_qtdp): Handle static tracepoints.
14703 (probe_marker_at): New.
14704 (cmd_qtstart): Handle static tracepoints.
14705 (response_tracepoint): Handle static tracepoints.
14706 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
14707 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
14708 (get_context_regcache): Handle static tracepoints.
14709 (do_action_at_tracepoint): Handle static tracepoint actions.
14710 (traceframe_find_block_type): Handle static trace data blocks.
14711 (traceframe_read_sdata): New.
14712 (download_tracepoints): Download static tracepoint actions.
14713 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
14714 (GDB_PROBE_NAME): New.
14715 (ust_ops): New.
14716 (GET_UST_SYM): New.
14717 (USTF): New.
14718 (dlsym_ust): New.
14719 (ust_marker_to_static_tracepoint): New.
14720 (gdb_probe): New.
14721 (collect_ust_data_at_tracepoint): New.
14722 (gdb_ust_probe): New.
14723 (UNIX_PATH_MAX, SOCK_DIR): New.
14724 (gdb_ust_connect_sync_socket): New.
14725 (resume_thread, stop_thread): New.
14726 (run_inferior_command): New.
14727 (init_named_socket): New.
14728 (gdb_ust_socket_init): New.
14729 (cstr_to_hexstr): New.
14730 (next_st): New.
14731 (first_marker, next_marker): New.
14732 (response_ust_marker): New.
14733 (cmd_qtfstm, cmd_qtsstm): New.
14734 (unprobe_marker_at, probe_marker_at): New.
14735 (cmd_qtstmat, gdb_ust_thread): New.
14736 (gdb_ust_init): New.
14737 (initialize_tracepoint_ftlib): Call gdb_ust_init.
14738 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
14739 (ST_REGENTRY): New.
14740 (x86_64_st_collect_regmap): New.
14741 (X86_64_NUM_ST_COLLECT_GREGS): New.
14742 (AMD64_RIP_REGNUM): New.
14743 (supply_static_tracepoint_registers): New.
14744 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
14745 (ST_REGENTRY): New.
14746 (i386_st_collect_regmap): New.
14747 (i386_NUM_ST_COLLECT_GREGS): New.
14748 (supply_static_tracepoint_registers): New.
14749 * server.c (handle_query): Handle qXfer:statictrace:read.
14750 <qSupported>: Report support for StaticTracepoints, and
14751 qXfer:statictrace:read features.
14752 * server.h (traceframe_read_sdata)
14753 (supply_static_tracepoint_registers): Declare.
14754 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
14755 (unpack_varlen_hex): Include in IPA build.
14756 * Makefile.in (ustlibs, ustinc): New.
14757 (IPA_OBJS): Add remote-utils-ipa.o.
14758 ($(IPA_LIB)): Link -ldl and -lpthread.
14759 (UST_CFLAGS): New.
14760 (IPAGENT_CFLAGS): Add UST_CFLAGS.
14761 * config.in, configure: Regenerate.
14762
14763 2010-06-20 Ian Lance Taylor <iant@google.com>
14764 Pedro Alves <pedro@codesourcery.com>
14765
14766 * linux-x86-low.c (always_true): Delete.
14767 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
14768 trying to fool the compiler with always_true.
14769
14770 2010-06-20 Pedro Alves <pedro@codesourcery.com>
14771
14772 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
14773 conditions in gdbserver.
14774
14775 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
14776
14777 * spu-low.c (spu_read_memory): Wrap around local store limit.
14778 (spu_write_memory): Likewise.
14779
14780 2010-06-15 Pedro Alves <pedro@codesourcery.com>
14781
14782 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
14783 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
14784 LONGEST uses.
14785 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
14786 uses.
14787 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
14788 uses with LONGEST uses.
14789
14790 2010-06-14 Stan Shebs <stan@codesourcery.com>
14791 Pedro Alves <pedro@codesourcery.com>
14792
14793 Bytecode compiler.
14794
14795 * linux-x86-low.c: Include limits.h.
14796 (add_insns): New.
14797 (always_true): New.
14798 (EMIT_ASM): New.
14799 (EMIT_ASM32): New.
14800 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
14801 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
14802 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
14803 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
14804 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
14805 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
14806 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
14807 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
14808 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
14809 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
14810 (amd64_emit_void_call_2): New.
14811 (amd64_emit_ops): New.
14812 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
14813 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
14814 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
14815 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
14816 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
14817 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
14818 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
14819 (i386_emit_call, i386_emit_reg, i386_emit_pop)
14820 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
14821 (i386_emit_stack_adjust, i386_emit_int_call_1)
14822 (i386_emit_void_call_2): New.
14823 (i386_emit_ops): New.
14824 (x86_emit_ops): New.
14825 (the_low_target): Install x86_emit_ops.
14826 * server.h (struct emit_ops): New.
14827 (get_raw_reg_func_addr): Declare.
14828 (current_insn_ptr, emit_error): Declare.
14829 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
14830 (set_trace_state_variable_value): New defines.
14831 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
14832 addr_get_trace_state_variable_value and
14833 addr_set_trace_state_variable_value.
14834 (symbol_list): New fields for get_raw_reg,
14835 get_trace_state_variable_value and set_trace_state_variable_value.
14836 (condfn): New typedef.
14837 (struct tracepoint): New field `compiled_cond'.
14838 (do_action_at_tracepoint): Clear compiled_cond.
14839 (get_trace_state_variable_value, set_trace_state_variable_value):
14840 Export in the IPA.
14841 (condition_true_at_tracepoint): If there's a compiled condition,
14842 run that.
14843 (current_insn_ptr, emit_error): New globals.
14844 (struct bytecode_address): New.
14845 (get_raw_reg_func_addr): New.
14846 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
14847 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
14848 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
14849 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
14850 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
14851 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
14852 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
14853 (compile_tracepoint_condition, compile_bytecodes): New.
14854 * target.h (emit_ops): Forward declare.
14855 (struct target_ops): New field emit_ops.
14856 (target_emit_ops): New.
14857 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
14858 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
14859 * linux-low.c (linux_emit_ops): New.
14860 (linux_target_ops): Install it.
14861 * linux-low.h (struct linux_target_ops): New field emit_ops.
14862
14863 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
14864
14865 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
14866 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
14867
14868 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14869 Stan Shebs <stan@codesourcery.com>
14870
14871 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
14872 (all): Depend on $(extra_libraries).
14873 (install-only): Install the IPA.
14874 (IPA_OBJS, IPA_LIB): New.
14875 (clean): Remove the IPA lib.
14876 (IPAGENT_CFLAGS): New.
14877 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
14878 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
14879 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
14880 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
14881 * configure.ac: Check for atomic builtins support in the compiler.
14882 (IPA_DEPFILES, extra_libraries): Define.
14883 * configure.srv (ipa_obj): Add description.
14884 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
14885 (i[34567]86-*-linux*): Set ipa_obj.
14886 (x86_64-*-linux*): Set ipa_obj.
14887 * linux-low.c (stabilizing_threads): New.
14888 (supports_fast_tracepoints): New.
14889 (linux_detach): Stabilize threads before detaching.
14890 (handle_tracepoints): Handle internal tracing breakpoints. Assert
14891 the lwp is either not stabilizing, or is moving out of a jump pad.
14892 (linux_fast_tracepoint_collecting): New.
14893 (maybe_move_out_of_jump_pad): New.
14894 (enqueue_one_deferred_signal): New.
14895 (dequeue_one_deferred_signal): New.
14896 (linux_wait_for_event_1): If moving out of a jump pad, defer
14897 pending signals to later.
14898 (linux_stabilize_threads): New.
14899 (linux_wait_1): Check if threads need moving out of jump pads, and
14900 do it if so.
14901 (stuck_in_jump_pad_callback): New.
14902 (move_out_of_jump_pad_callback): New.
14903 (lwp_running): New.
14904 (linux_resume_one_lwp): Handle moving out of jump pads.
14905 (linux_set_resume_request): Dequeue deferred signals.
14906 (need_step_over_p): Also step over fast tracepoint jumps.
14907 (start_step_over): Also uninsert fast tracepoint jumps.
14908 (finish_step_over): Also reinsert fast tracepoint jumps.
14909 (linux_install_fast_tracepoint_jump): New.
14910 (linux_target_ops): Install linux_stabilize_threads and
14911 linux_install_fast_tracepoint_jump_pad.
14912 * linux-low.h (linux_target_ops) <get_thread_area,
14913 install_fast_tracepoint_jump_pad>: New fields.
14914 (struct lwp_info) <collecting_fast_tracepoint,
14915 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
14916 (linux_get_thread_area): Declare.
14917 * linux-x86-low.c (jump_insn): New.
14918 (x86_get_thread_area): New.
14919 (append_insns): New.
14920 (push_opcode): New.
14921 (amd64_install_fast_tracepoint_jump_pad): New.
14922 (i386_install_fast_tracepoint_jump_pad): New.
14923 (x86_install_fast_tracepoint_jump_pad): New.
14924 (the_low_target): Install x86_get_thread_area and
14925 x86_install_fast_tracepoint_jump_pad.
14926 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
14927 (struct fast_tracepoint_jump): New.
14928 (fast_tracepoint_jump_insn): New.
14929 (fast_tracepoint_jump_shadow): New.
14930 (find_fast_tracepoint_jump_at): New.
14931 (fast_tracepoint_jump_here): New.
14932 (delete_fast_tracepoint_jump): New.
14933 (set_fast_tracepoint_jump): New.
14934 (uninsert_fast_tracepoint_jumps_at): New.
14935 (reinsert_fast_tracepoint_jumps_at): New.
14936 (set_breakpoint_at): Use write_inferior_memory.
14937 (uninsert_raw_breakpoint): Use write_inferior_memory.
14938 (check_mem_read): Mask out fast tracepoint jumps.
14939 (check_mem_write): Mask out fast tracepoint jumps.
14940 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
14941 (set_fast_tracepoint_jump): Declare.
14942 (delete_fast_tracepoint_jump)
14943 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
14944 (reinsert_fast_tracepoint_jumps_at): Declare.
14945 * regcache.c: Don't compile many functions when building the
14946 in-process agent library.
14947 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
14948 the register buffer in the heap.
14949 (free_register_cache): If the register buffer isn't owned by the
14950 regcache, don't free it.
14951 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
14952 pre-existing register caches.
14953 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
14954 type.
14955 (convert_ascii_to_int): : Constify `from' parameter type.
14956 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
14957 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
14958 the needed buffer in-place.
14959 (relocate_instruction): New.
14960 * server.c (handle_query) <qSymbols>: If the target supports
14961 tracepoints, give it a chance of looking up symbols. Report
14962 support for fast tracepoints.
14963 (handle_status): Stabilize threads.
14964 (process_serial_event): Adjust.
14965 * server.h (struct fast_tracepoint_jump): Forward declare.
14966 (struct process_info) <fast_tracepoint_jumps>: New field.
14967 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
14968 (decode_X_packet, decode_M_packet): Adjust.
14969 (relocate_instruction): Declare.
14970 (in_process_agent_loaded): Declare.
14971 (tracepoint_look_up_symbols): Declare.
14972 (struct fast_tpoint_collect_status): Declare.
14973 (fast_tracepoint_collecting): Declare.
14974 (force_unlock_trace_buffer): Declare.
14975 (handle_tracepoint_bkpts): Declare.
14976 (initialize_low_tracepoint)
14977 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
14978 * target.h (struct target_ops) <stabilize_threads,
14979 install_fast_tracepoint_jump_pad>: New fields.
14980 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
14981 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
14982 [HAVE_STDINT_H]: Include stdint.h.
14983 (trace_debug_1): Rename to ...
14984 (trace_vdebug): ... this.
14985 (trace_debug): Rename to ...
14986 (trace_debug_1): ... this. Add `level' parameter.
14987 (trace_debug): New.
14988 (ATTR_USED, ATTR_NOINLINE): New.
14989 (IP_AGENT_EXPORT): New.
14990 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
14991 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
14992 (about_to_request_buffer_space, trace_buffer_is_full)
14993 (stopping_tracepoint, expr_eval_result, error_tracepoint)
14994 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
14995 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
14996 (traceframe_write_count, traceframes_created)
14997 (trace_state_variables)
14998 New renaming defines.
14999 (struct ipa_sym_addresses): New.
15000 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
15001 (symbol_list): New.
15002 (ipa_sym_addrs): New.
15003 (all_tracepoint_symbols_looked_up): New.
15004 (in_process_agent_loaded): New.
15005 (write_e_ipa_not_loaded): New.
15006 (maybe_write_ipa_not_loaded): New.
15007 (tracepoint_look_up_symbols): New.
15008 (debug_threads) [IN_PROCESS_AGENT]: New.
15009 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
15010 (UNKNOWN_SIDE_EFFECTS): New.
15011 (stop_tracing): New.
15012 (flush_trace_buffer): New.
15013 (stop_tracing_bkpt): New.
15014 (flush_trace_buffer_bkpt): New.
15015 (read_inferior_integer): New.
15016 (read_inferior_uinteger): New.
15017 (read_inferior_data_pointer): New.
15018 (write_inferior_data_pointer): New.
15019 (write_inferior_integer): New.
15020 (write_inferior_uinteger): New.
15021 (struct collect_static_trace_data_action): Delete.
15022 (enum tracepoint_type): New.
15023 (struct tracepoint) <type>: New field `type'.
15024 <actions_str, step_actions, step_actions_str>: Only include in
15025 GDBserver.
15026 <orig_size, obj_addr_on_target, adjusted_insn_addr>
15027 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
15028 (tracepoints): Use IP_AGENT_EXPORT.
15029 (last_tracepoint): Don't include in the IPA.
15030 (stopping_tracepoint): Use IP_AGENT_EXPORT.
15031 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
15032 (alloced_trace_state_variables): New.
15033 (trace_state_variables): Use IP_AGENT_EXPORT.
15034 (traceframe_t): Delete unused variable.
15035 (circular_trace_buffer): Don't include in the IPA.
15036 (trace_buffer_start): Delete.
15037 (struct trace_buffer_control): New.
15038 (trace_buffer_free): Delete.
15039 (struct ipa_trace_buffer_control): New.
15040 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
15041 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
15042 New.
15043 (trace_buffer_ctrl): New.
15044 (TRACE_BUFFER_CTRL_CURR): New.
15045 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
15046 Reimplement as macros.
15047 (trace_buffer_wrap): Delete.
15048 (traceframe_write_count, traceframe_read_count)
15049 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
15050 (struct tracepoint_hit_ctx) <type>: New field.
15051 (struct fast_tracepoint_ctx): New.
15052 (memory_barrier): New.
15053 (cmpxchg): New.
15054 (record_tracepoint_error): Update atomically in the IPA.
15055 (clear_inferior_trace_buffer): New.
15056 (about_to_request_buffer_space): New.
15057 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
15058 updating the same buffer.
15059 (add_tracepoint): Default the tracepoint's type to trap
15060 tracepoint, and orig_size to -1.
15061 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
15062 internal variables.
15063 (create_trace_state_variable): New parameter `gdb'. Handle it.
15064 (clear_installed_tracepoints): Clear fast tracepoint jumps.
15065 (cmd_qtdp): Handle fast tracepoints.
15066 (cmd_qtdv): Adjust.
15067 (max_jump_pad_size): New.
15068 (gdb_jump_pad_head): New.
15069 (get_jump_space_head): New.
15070 (claim_jump_space): New.
15071 (sort_tracepoints): New.
15072 (MAX_JUMP_SIZE): New.
15073 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
15074 IPA.
15075 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
15076 support. Upload fast traceframes, and delete internal IPA
15077 breakpoints.
15078 (stop_tracing_handler): New.
15079 (flush_trace_buffer_handler): New.
15080 (cmd_qtstop): Upload fast tracepoints.
15081 (response_tracepoint): Handle fast tracepoints.
15082 (tracepoint_finished_step): Upload fast traceframes. Set the
15083 tracepoint hit context's tracepoint type.
15084 (handle_tracepoint_bkpts): New.
15085 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
15086 type. Add comment about fast tracepoints.
15087 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
15088 non-existing action_str field.
15089 (get_context_regcache): Handle fast tracepoints.
15090 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
15091 to the regcache.
15092 (fast_tracepoint_from_jump_pad_address): New.
15093 (fast_tracepoint_from_ipa_tpoint_address): New.
15094 (collecting_t): New.
15095 (force_unlock_trace_buffer): New.
15096 (fast_tracepoint_collecting): New.
15097 (collecting): New.
15098 (gdb_collect): New.
15099 (write_inferior_data_ptr): New.
15100 (target_tp_heap): New.
15101 (target_malloc): New.
15102 (download_agent_expr): New.
15103 (UALIGN): New.
15104 (download_tracepoints): New.
15105 (download_trace_state_variables): New.
15106 (upload_fast_traceframes): New.
15107 (IPA_FIRST_TRACEFRAME): New.
15108 (IPA_NEXT_TRACEFRAME_1): New.
15109 (IPA_NEXT_TRACEFRAME): New.
15110 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
15111 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
15112 (gdb_jump_pad_buffer_end): New.
15113 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
15114 (initialize_tracepoint): Adjust.
15115 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
15116 buffer. Initialize the low module.
15117 * utils.c (PREFIX, TOOLNAME): New.
15118 (malloc_failure): Use PREFIX.
15119 (error): In the IPA, an error causes an exit.
15120 (fatal, warning): Use PREFIX.
15121 (internal_error): Use TOOLNAME.
15122 (NUMCELLS): Increase to 10.
15123 * configure, config.in: Regenerate.
15124
15125 2010-06-01 Pedro Alves <pedro@codesourcery.com>
15126
15127 * server.c (handle_query) <qSupported>: Do two passes over the
15128 qSupported string to avoid nesting strtok.
15129
15130 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15131
15132 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
15133 (CDEPS): New.
15134 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
15135 -Wl,--dynamic-list.
15136 * configure: Regenerate.
15137 * proc-service.list: New.
15138
15139 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15140
15141 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
15142 New comment.
15143
15144 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
15145
15146 * gdbreplay.c (remote_open): Check error return from socket() call by
15147 its equality to -1 not by it being negative.
15148 * remote-utils.c (remote_open): Likewise.
15149
15150 2010-05-23 Pedro Alves <pedro@codesourcery.com>
15151
15152 * config.h: Regenerate.
15153
15154 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
15155
15156 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
15157 doesn't provide PTRACE_GET_THREAD_AREA.
15158
15159 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
15160
15161 * linux-m68k-low.c: Include <asm/ptrace.h>
15162 (ps_get_thread_area): Implement.
15163
15164 2010-05-03 Doug Evans <dje@google.com>
15165
15166 * event-loop.c (struct callback_event): New struct.
15167 (callback_list): New global.
15168 (append_callback_event, delete_callback_event): New functions.
15169 (process_callback): New function.
15170 (start_event_loop): Call it.
15171 * remote-utils.c (NOT_SCHEDULED): Define.
15172 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
15173 moved out of readchar.
15174 (readchar): Rewrite. Call reschedule before returning.
15175 (reset_readchar): New function.
15176 (remote_close): Call it.
15177 (process_remaining, reschedule): New functions.
15178 * server.h (callback_handler_func): New typedef.
15179 (append_callback_event, delete_callback_event): Declare.
15180
15181 2010-05-03 Pedro Alves <pedro@codesourcery.com>
15182
15183 * proc-service.c (ps_pglobal_lookup): Use
15184 thread_db_look_up_one_symbol.
15185 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
15186 parameter. Use it instead of all_symbols_looked_up.
15187 * server.h (struct process_info) <all_symbols_looked_up>: Delete
15188 field.
15189 (all_symbols_looked_up): Don't declare.
15190 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
15191 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
15192 field.
15193 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
15194 Set all_symbols_looked_up here.
15195 (thread_db_look_up_one_symbol): New.
15196 (thread_db_get_tls_address): Adjust.
15197 (thread_db_load_search, try_thread_db_load_1): Always allocate the
15198 thread_db object on the heap, and tentatively set it in the
15199 process structure.
15200 (thread_db_init): Don't set all_symbols_looked_up here.
15201 * linux-low.h (thread_db_look_up_one_symbol): Declare.
15202
15203 2010-05-03 Pedro Alves <pedro@codesourcery.com>
15204
15205 * linux-low.c (linux_kill, linux_detach): Adjust.
15206 (status_pending_p_callback): Remove redundant statement. Check
15207 for !TARGET_WAITIKIND_IGNORE, instead of
15208 TARGET_WAITKIND_STOPPED.
15209 (handle_tracepoints): Make sure LWP is locked. Adjust.
15210 (linux_wait_for_event_1): Adjust.
15211 (linux_cancel_breakpoints): New.
15212 (unsuspend_one_lwp): New.
15213 (unsuspend_all_lwps): New.
15214 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
15215 (send_sigstop_callback): Change return type to int, add new
15216 `except' parameter and handle it.
15217 (suspend_and_send_sigstop_callback): New.
15218 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
15219 pass them down. If SUSPEND, also increment the lwp's suspend
15220 count.
15221 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
15222 (need_step_over_p): Don't consider suspended LWPs.
15223 (start_step_over): Adjust.
15224 (proceed_one_lwp): Change return type to int, add new `except'
15225 parameter and handle it.
15226 (unsuspend_and_proceed_one_lwp): New.
15227 (proceed_all_lwps): Use find_inferior instead of
15228 for_each_inferior.
15229 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
15230 also decrement the suspend count of LWPs. Pass `except' down,
15231 instead of hacking its suspend count.
15232 (linux_pause_all): Add `freeze' parameter. Adjust.
15233 (linux_unpause_all): New.
15234 (linux_target_ops): Install linux_unpause_all.
15235 * server.c (handle_status): Adjust.
15236 * target.h (struct target_ops): New fields `unpause_all' and
15237 `cancel_breakpoints'. Add new parameter to `pause_all'.
15238 (pause_all): Add new `freeze' parameter.
15239 (unpause_all): New.
15240 (cancel_breakpoints): New.
15241 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
15242 cancel breakpoints.
15243 (cmd_qtstart): Pause threads.
15244 (stop_tracing): Pause threads, and cancel breakpoints.
15245 * win32-low.c (win32_target_ops): Adjust.
15246
15247 2010-05-03 Pedro Alves <pedro@codesourcery.com>
15248
15249 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
15250 the inferior right away from here...
15251 (linux_wait_1): ... to here, and adjust to check the thread's
15252 last_resume_kind instead of the lwp's step or stop_expected flags.
15253
15254 2010-05-02 Pedro Alves <pedro@codesourcery.com>
15255
15256 * README: Use consistent `GDB' and `GDBserver' spellings.
15257
15258 2010-05-02 Pedro Alves <pedro@codesourcery.com>
15259
15260 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
15261 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
15262 (linux_detach_one_lwp): Assume the lwp is stopped.
15263 (any_thread_of): Delete.
15264 (linux_detach): Stop all lwps here. Don't blindly delete all
15265 breakpoints.
15266 (delete_lwp_callback): New.
15267 (linux_mourn): Delete all lwps of the process that is gone.
15268 (linux_wait_1): Don't delete the last lwp of the process here.
15269 * mem-break.h (mark_breakpoints_out): Declare.
15270 * mem-break.c (mark_breakpoints_out): New.
15271 (free_all_breakpoints): Use it.
15272 * server.c (handle_target_event): If the process is gone, mark
15273 breakpoints out.
15274 * thread-db.c (struct thread_db) <create_bp>: New field.
15275 (thread_db_enable_reporting): Fix prototype. Store a thread event
15276 breakpoint reference in the thread_db struct.
15277 (thread_db_load_search): Clear the thread_db object.
15278 (try_thread_db_load_1): Ditto.
15279 (switch_to_process): New.
15280 (disable_thread_event_reporting): Use it.
15281 (remove_thread_event_breakpoints): New.
15282 (thread_db_detach, thread_db_mourn): Use it.
15283
15284 2010-05-01 Pedro Alves <pedro@codesourcery.com>
15285
15286 * linux-low.c (linux_enable_event_reporting): New.
15287 (linux_wait_for_event_1, handle_extended_wait): Use it.
15288
15289 2010-04-30 Pedro Alves <pedro@codesourcery.com>
15290
15291 * linux-low.c (linux_kill_one_lwp, linux_kill)
15292 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
15293 (send_sigstop): Take an lwp_info as parameter instead. Queue a
15294 SIGSTOP even if the LWP is stopped.
15295 (send_sigstop_callback): New.
15296 (stop_all_lwps): Use send_sigstop_callback instead.
15297 (linux_resume_one_thread): Adjust.
15298 (proceed_one_lwp): Still proceed an LWP that the client has
15299 requested to stop, if we haven't reported it as stopped yet. Make
15300 sure that LWPs the client want stopped, have a pending SIGSTOP.
15301
15302 2010-04-26 Doug Evans <dje@google.com>
15303
15304 * server.c (handle_general_set): Make static.
15305
15306 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
15307 Print received char after testing for error/eof instead of before.
15308 (input_interrupt): Tweak comment.
15309
15310 2010-04-23 Doug Evans <dje@google.com>
15311
15312 * server.c (start_inferior): Print inferior argv if --debug.
15313
15314 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
15315
15316 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
15317 * nto-x86-low.c: Include server.h
15318
15319 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
15320
15321 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
15322 be consistent with other sources of this directory.
15323 (init_registers_amd64): Correct name of source file of this function
15324 in the comment.
15325
15326 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
15327
15328 * configure.srv (x86_64-*-mingw*): New configuration for Windows
15329 64-bit executables.
15330
15331 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
15332
15333 * win32-i386-low.c: Add 64-bit support.
15334 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
15335 (init_registers_amd64): Declare.
15336 (mappings): Add 64-bit version of array.
15337 (init_windows_x86): New function.
15338 (the_low_target): Change init_arch field to init_windows_x86.
15339
15340 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
15341
15342 * win32-low.c: Adapt to support also 64-bit architecture.
15343 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
15344 (get_image_name): Use SIZE_T type for local variable `done'.
15345 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
15346 (toolhelp_get_dll_name): Idem.
15347 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
15348 Use uintptr_t typecast to avoid warning.
15349 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
15350 (handle_exception): Use phex_nz to avoid warning.
15351 (win32_wait): Remove unused local variable `process'.
15352
15353 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
15354
15355 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
15356 `amd64-avx.o'.
15357
15358 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
15359
15360 * configure.ac: Use `ws2_32' library for srv_mingw.
15361 * configure: Regenerate.
15362 * gdbreplay.c: Include winsock2.h instead of winsock.h.
15363 * remote-utils.c: Likewise.
15364
15365 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
15366
15367 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
15368 if __x86_64__ is defined.
15369
15370 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
15371
15372 * configure: Regenerate.
15373
15374 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
15375
15376 * server.c (handle_query): Handle 'qGetTIBAddr' query.
15377 * target.h (target_ops): New get_tib_address field.
15378 * win32-low.h (win32_thread_info): Add thread_local_base field.
15379 * win32-low.c (child_add_thread): Add tlb argument.
15380 Set thread_local_base field to TLB.
15381 (get_child_debug_event): Adapt to child_add_thread change.
15382 (win32_get_tib_address): New function.
15383 (win32_target_ops): Set get_tib_address field to
15384 win32_get_tib_address.
15385 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
15386
15387 2010-04-12 Pedro Alves <pedro@codesourcery.com>
15388
15389 * linux-low.c (linux_mourn): Also remove the process.
15390 * server.c (handle_target_event): Don't remove the process here.
15391 * nto-low.c (nto_mourn): New.
15392 (nto_target_ops): Install it.
15393 * spu-low.c (spu_mourn): New.
15394 (spu_target_ops): Install it.
15395 * win32-low.c (win32_mourn): New.
15396 (win32_target_ops): Install it.
15397
15398 2010-04-12 Pedro Alves <pedro@codesourcery.com>
15399
15400 * server.h (buffer_xml_printf): Remove redundant `;'.
15401
15402 2010-04-12 Pedro Alves <pedro@codesourcery.com>
15403
15404 * regcache.c (set_register_cache): Invalidate regcaches before
15405 changing the register cache layout.
15406 (regcache_invalidate_one): Allow a NULL regcache.
15407 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
15408 regcaches before changing the register cache layout or the target
15409 regsets.
15410
15411 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
15412
15413 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
15414 variable warning on Linux/x86-64.
15415
15416 2010-04-11 Pedro Alves <pedro@codesourcery.com>
15417
15418 GDBserver disconnected tracing support.
15419
15420 * linux-low.c (linux_remove_process): Delete.
15421 (add_lwp): Don't set last_resume_kind here.
15422 (linux_kill): Use `mourn'.
15423 (linux_detach): Use `thread_db_detach', and `mourn'.
15424 (linux_mourn): New.
15425 (linux_attach_lwp_1): Adjust comment.
15426 (linux_attach): last_resume_kind moved the thread_info; adjust.
15427 (status_pending_p_callback): Adjust.
15428 (linux_wait_for_event_1): Adjust.
15429 (count_events_callback, select_singlestep_lwp_callback)
15430 (select_event_lwp_callback, cancel_breakpoints_callback)
15431 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
15432 (proceed_one_lwp): Adjust.
15433 (linux_async): Add debug output.
15434 (linux_thread_stopped): New.
15435 (linux_pause_all): New.
15436 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
15437 linux_pause_all.
15438 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
15439 (thread_db_free): Delete declaration.
15440 (thread_db_detach, thread_db_mourn): Declare.
15441 * thread-db.c (thread_db_init): Use thread_db_mourn.
15442 (thread_db_free): Delete, split in two.
15443 (disable_thread_event_reporting): New.
15444 (thread_db_detach): New.
15445 (thread_db_mourn): New.
15446
15447 * server.h (struct thread_info) <last_resume_kind>: New field.
15448 <attached>: Add comment.
15449 <gdb_detached>: New field.
15450 (handler_func): Change return type to int.
15451 (handle_serial_event, handle_target_event): Ditto.
15452 (gdb_connected): Declare.
15453 (tracing): Delete.
15454 (disconnected_tracing): Declare.
15455 (stop_tracing): Declare.
15456
15457 * server.c (handle_query) <qSupported>: Report support for
15458 disconnected tracing.
15459 (queue_stop_reply_callback): Account for running threads.
15460 (gdb_wants_thread_stopped): New.
15461 (gdb_wants_all_threads_stopped): New.
15462 (gdb_reattached_process): New.
15463 (handle_status): Clear the `gdb_detached' flag of all processes.
15464 In all-stop, stop all threads.
15465 (main): Be sure to leave tfind mode. Handle disconnected tracing.
15466 (process_serial_event): If the remote connection breaks, or if an
15467 exit was forced with "monitor exit", force an event loop exit.
15468 Handle disconnected tracing on detach.
15469 (handle_serial_event): Adjust.
15470 (handle_target_event): If GDB isn't connected, forward events back
15471 to the inferior, unless the last process exited, in which case,
15472 exit gdbserver. Adjust interface.
15473
15474 * remote-utils.c (remote_open): Don't block in accept. Instead
15475 register an event loop source on the listen socket file
15476 descriptor. Refactor bits into ...
15477 (listen_desc): ... this new global.
15478 (gdb_connected): ... this new function.
15479 (enable_async_notification): ... this new function.
15480 (handle_accept_event): ... this new function.
15481 (remote_close): Clear remote_desc.
15482
15483 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
15484
15485 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
15486 New fields.
15487 (mourn_inferior): Define.
15488 (target_process_qsupported): Avoid the dangling else problem.
15489 (thread_stopped): Define.
15490 (pause_all): Define.
15491 (target_waitstatus_to_string): Declare.
15492 * target.c (target_waitstatus_to_string): New.
15493
15494 * tracepoint.c (tracing): Make extern.
15495 (disconnected_tracing): New.
15496 (stop_tracing): Make extern. Handle tracing stops due to GDB
15497 disconnecting.
15498 (cmd_qtdisconnected): New.
15499 (cmd_qtstatus): Report disconnected tracing status in trace reply.
15500 (handle_tracepoint_general_set): Handle QTDisconnected.
15501
15502 * event-loop.c (event_handler_func): Change return type to int.
15503 (process_event): Bail out if the event handler wants the event
15504 loop to stop.
15505 (handle_file_event): Ditto.
15506 (start_event_loop): Bail out if the event handler wants the event
15507 loop to stop.
15508
15509 * nto-low.c (nto_target_ops): Adjust.
15510 * spu-low.c (spu_wait): Don't remove the process here.
15511 (spu_target_ops): Adjust.
15512 * win32-low.c (win32_wait): Don't remove the process here.
15513 (win32_target_ops): Adjust.
15514
15515 2010-04-11 Pedro Alves <pedro@codesourcery.com>
15516
15517 * regcache.c (realloc_register_cache): Invalidate inferior's
15518 regcache before recreating it.
15519
15520 2010-04-09 Pedro Alves <pedro@codesourcery.com>
15521
15522 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
15523
15524 2010-04-09 Stan Shebs <stan@codesourcery.com>
15525 Pedro Alves <pedro@codesourcery.com>
15526
15527 * server.h (LONGEST): New.
15528 (struct thread_info) <while_stepping>: New field.
15529 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
15530 Declare.
15531 (initialize_tracepoint, handle_tracepoint_general_set)
15532 (handle_tracepoint_query, tracepoint_finished_step)
15533 (tracepoint_was_hit, release_while_stepping_state_list):
15534 (current_traceframe): Declare.
15535 * server.c (handle_general_set): Handle tracepoint packets.
15536 (read_memory): New.
15537 (write_memory): New.
15538 (handle_search_memory_1): Use read_memory.
15539 (handle_query): Report support for conditional tracepoints, trace
15540 state variables, and tracepoint sources. Handle tracepoint
15541 queries.
15542 (main): Initialize the tracepoints module.
15543 (process_serial_event): Handle traceframe reads/writes.
15544
15545 * linux-low.c (handle_tracepoints): New.
15546 (linux_wait_1): Call it.
15547 (linux_resume_one_lwp): Handle while-stepping.
15548 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
15549 (linux_target_ops): Install them.
15550 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
15551 New field.
15552 * linux-x86-low.c (x86_supports_tracepoints): New.
15553 (the_low_target). Install it.
15554
15555 * mem-break.h (delete_breakpoint): Declare.
15556 * mem-break.c (delete_breakpoint): Make external.
15557
15558 * target.h (struct target_ops): Add `supports_tracepoints',
15559 `read_pc', and `write_pc' fields.
15560 (target_supports_tracepoints): Define.
15561 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
15562 (phex_nz): New.
15563
15564 * regcache.h (struct regcache) <registers_owned>: New field.
15565 (init_register_cache, regcache_cpy): Declare.
15566 (regcache_read_pc, regcache_write_pc): Declare.
15567 (register_cache_size): Declare.
15568 (supply_regblock): Declare.
15569 * regcache.c (init_register_cache): New.
15570 (new_register_cache): Use it.
15571 (regcache_cpy): New.
15572 (register_cache_size): New.
15573 (supply_regblock): New.
15574 (regcache_read_pc, regcache_write_pc): New.
15575
15576 * tracepoint.c: New.
15577
15578 * Makefile.in (OBS): Add tracepoint.o.
15579 (tracepoint.o): New rule.
15580
15581 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
15582
15583 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
15584 (i386-mmx.o): New.
15585 (i386-mmx.c): Likewise.
15586 (i386-mmx-linux.o): Likewise.
15587 (i386-mmx-linux.c): Likewise.
15588
15589 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
15590 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
15591 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
15592 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
15593
15594 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
15595 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
15596 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
15597
15598 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
15599
15600 * Makefile.in (clean): Updated.
15601 (i386-avx.o): New.
15602 (i386-avx.c): Likewise.
15603 (i386-avx-linux.o): Likewise.
15604 (i386-avx-linux.c): Likewise.
15605 (amd64-avx.o): Likewise.
15606 (amd64-avx.c): Likewise.
15607 (amd64-avx-linux.o): Likewise.
15608 (amd64-avx-linux.c): Likewise.
15609
15610 * configure.srv (srv_i386_regobj): Add i386-avx.o.
15611 (srv_i386_linux_regobj): Add i386-avx-linux.o.
15612 (srv_amd64_regobj): Add amd64-avx.o.
15613 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
15614 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
15615 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
15616 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
15617 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
15618 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
15619 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
15620
15621 * i387-fp.c: Include "i386-xstate.h".
15622 (i387_xsave): New.
15623 (i387_cache_to_xsave): Likewise.
15624 (i387_xsave_to_cache): Likewise.
15625 (x86_xcr0): Likewise.
15626
15627 * i387-fp.h (i387_cache_to_xsave): Likewise.
15628 (i387_xsave_to_cache): Likewise.
15629 (x86_xcr0): Likewise.
15630
15631 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
15632 * linux-crisv32-low.c (target_regsets): Likewise.
15633 * linux-m68k-low.c (target_regsets): Likewise.
15634 * linux-mips-low.c (target_regsets): Likewise.
15635 * linux-ppc-low.c (target_regsets): Likewise.
15636 * linux-s390-low.c (target_regsets): Likewise.
15637 * linux-sh-low.c (target_regsets): Likewise.
15638 * linux-sparc-low.c (target_regsets): Likewise.
15639 * linux-xtensa-low.c (target_regsets): Likewise.
15640
15641 * linux-low.c: Include <sys/uio.h>.
15642 (regsets_fetch_inferior_registers): Support nt_type.
15643 (regsets_store_inferior_registers): Likewise.
15644 (linux_process_qsupported): New.
15645 (linux_target_ops): Add linux_process_qsupported.
15646
15647 * linux-low.h (regset_info): Add nt_type.
15648 (linux_target_ops): Add process_qsupported.
15649
15650 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
15651 and <sys/uio.h>.
15652 (init_registers_i386_avx_linux): New.
15653 (init_registers_amd64_avx_linux): Likewise.
15654 (xmltarget_i386_linux_no_xml): Likewise.
15655 (xmltarget_amd64_linux_no_xml): Likewise.
15656 (PTRACE_GETREGSET): Likewise.
15657 (PTRACE_SETREGSET): Likewise.
15658 (x86_fill_xstateregset): Likewise.
15659 (x86_store_xstateregset): Likewise.
15660 (use_xml): Likewise.
15661 (x86_linux_update_xmltarget): Likewise.
15662 (x86_linux_process_qsupported): Likewise.
15663 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
15664 (x86_arch_setup): Don't call init_registers_amd64_linux nor
15665 init_registers_i386_linux here. Call
15666 x86_linux_update_xmltarget.
15667 (the_low_target): Add x86_linux_process_qsupported.
15668
15669 * server.c (handle_query): Call target_process_qsupported.
15670
15671 * target.h (target_ops): Add process_qsupported.
15672 (target_process_qsupported): New.
15673
15674 2010-04-03 Pedro Alves <pedro@codesourcery.com>
15675
15676 * inferiors.c (add_thread): Set last_status kind to
15677 TARGET_WAITKIND_IGNORE.
15678 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
15679 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
15680 (linux_wait_1): Move `thread' local definition to block that uses
15681 it. Don't NULL initialize `event_child'.
15682 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
15683 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
15684 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
15685
15686 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15687
15688 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
15689 an extended waitstatus, or by a watchpoint.
15690 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
15691 thread was stepping or has been stopped by a watchpoint.
15692
15693 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15694
15695 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
15696 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
15697 of another, then delete the previous, and validate all
15698 breakpoints.
15699 (validate_inserted_breakpoint): New.
15700 (delete_disabled_breakpoints): New.
15701 (validate_breakpoints): New.
15702 (check_mem_read): Validate breakpoints before trusting their
15703 shadow. Delete disabled breakpoints.
15704 (check_mem_write): Validate breakpoints before trusting they
15705 should be inserted. Delete disabled breakpoints.
15706 * mem-break.h (validate_breakpoints):
15707 * server.c (handle_query): Validate breakpoints when we see a
15708 qSymbol query.
15709
15710 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15711
15712 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
15713 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
15714 if we could tell there's a GDB breakpoint at stop_pc.
15715 (need_step_over_p): Don't do a step over if we find a GDB
15716 breakpoint at the resume PC.
15717
15718 * mem-break.c (struct raw_breakpoint): New.
15719 (enum bkpt_type): New type `gdb_breakpoint'.
15720 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
15721 fields. New field `raw'.
15722 (find_raw_breakpoint_at): New.
15723 (set_raw_breakpoint_at): Handle refcounting. Create a raw
15724 breakpoint instead.
15725 (set_breakpoint_at): Adjust.
15726 (delete_raw_breakpoint): New.
15727 (release_breakpoint): New.
15728 (delete_breakpoint): Rename to...
15729 (delete_breakpoint_1): ... this. Add proc parameter. Use
15730 release_breakpoint. Return ENOENT.
15731 (delete_breakpoint): Reimplement.
15732 (find_breakpoint_at): Delete.
15733 (find_gdb_breakpoint_at): New.
15734 (delete_breakpoint_at): Delete.
15735 (set_gdb_breakpoint_at): New.
15736 (delete_gdb_breakpoint_at): New.
15737 (gdb_breakpoint_here): New.
15738 (set_reinsert_breakpoint): Use release_breakpoint.
15739 (uninsert_breakpoint): Rename to ...
15740 (uninsert_raw_breakpoint): ... this.
15741 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
15742 (reinsert_raw_breakpoint): Change parameter type to
15743 raw_breakpoint.
15744 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
15745 instead.
15746 (check_breakpoints): Adjust. Use release_breakpoint.
15747 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
15748 (breakpoint_inserted_here): Ditto.
15749 (check_mem_read): Adjust to iterate over raw breakpoints instead.
15750 Don't trust the breakpoint's shadow if it is not inserted.
15751 (check_mem_write): Adjust to iterate over raw breakpoints instead.
15752 (delete_all_breakpoints): Adjust.
15753 (free_all_breakpoints): Mark all breakpoints as uninserted, and
15754 use delete_breakpoint_1.
15755
15756 * mem-break.h (breakpoints_supported): Delete declaration.
15757 (set_gdb_breakpoint_at): Declare.
15758 (gdb_breakpoint_here): Declare.
15759 (delete_breakpoint_at): Delete.
15760 (delete_gdb_breakpoint_at): Declare.
15761
15762 * server.h (struct raw_breakpoint): Forward declare.
15763 (struct process_info): New field `raw_breakpoints'.
15764
15765 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
15766 breakpoints.
15767
15768 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15769
15770 * linux-low.c (status_pending_p_callback): Fix comment.
15771 (linux_wait_for_event_1): Move most of the internal breakpoint
15772 handling from here...
15773 (linux_wait_1): ... to here.
15774 (count_events_callback): New.
15775 (select_singlestep_lwp_callback): New.
15776 (select_event_lwp_callback): New.
15777 (cancel_breakpoints_callback): New.
15778 (select_event_lwp): New.
15779 (linux_wait_1): Simplify internal breakpoint handling. Give equal
15780 priority to all LWPs that have had events that should be reported
15781 to the client. Cancel breakpoints when about to reporting the
15782 event to the client, not while stopping lwps. No longer cancel
15783 finished single-steps here.
15784 (cancel_finished_single_step): Delete.
15785 (cancel_finished_single_steps): Delete.
15786
15787 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15788
15789 * mem-break.c (enum bkpt_type): New.
15790 (struct breakpoint): New field `type'.
15791 (set_breakpoint_at): Change return type to struct breakpoint
15792 pointer. Set type to `other_breakpoint' by default.
15793 (delete_breakpoint): Rewrite, supporting more than one breakpoint
15794 in the breakpoint list.
15795 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
15796 (reinsert_breakpoint): Rename to ...
15797 (reinsert_raw_breakpoint): ... this.
15798 (reinsert_breakpoints_at): Adjust.
15799 * mem-break.h (struct breakpoint): Declare.
15800 (set_breakpoint_at): Change return type to struct breakpoint
15801 pointer.
15802
15803 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15804
15805 * server.c (handle_query): Assign, not compare.
15806
15807 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15808
15809 Teach linux gdbserver to step-over-breakpoints.
15810
15811 * linux-low.c (can_hardware_single_step): New.
15812 (supports_breakpoints): New.
15813 (handle_extended_wait): If stopping threads, read the stop pc of
15814 the new cloned LWP.
15815 (get_pc): New.
15816 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
15817 low target doesn't support retrieving the PC.
15818 (add_lwp): Set last_resume_kind to resume_continue.
15819 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
15820 (linux_attach): Don't clear stop_expected. Set the lwp's
15821 last_resume_kind to resume_stop.
15822 (linux_detach_one_lwp): Don't check for removed breakpoints.
15823 (check_removed_breakpoint): Delete.
15824 (status_pending_p): Rename to ...
15825 (status_pending_p_callback): ... this. Don't check for removed
15826 breakpoints. Don't consider threads that are stopped from GDB's
15827 perspective.
15828 (linux_wait_for_lwp): Always read the stop_pc here.
15829 (cancel_breakpoint): New.
15830 (step_over_bkpt): New global.
15831 (linux_wait_for_event_1): Implement stepping over breakpoints.
15832 (gdb_wants_lwp_stopped): New.
15833 (gdb_wants_all_stopped): New.
15834 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
15835 single-step traps here. Store the thread's last reported target
15836 wait status.
15837 (send_sigstop): Don't clear stop_expected. Always set it,
15838 instead.
15839 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
15840 (cancel_finished_single_step): New.
15841 (cancel_finished_single_steps): New.
15842 (wait_for_sigstop): Don't cancel finished single-step traps here.
15843 (linux_resume_one_lwp): Don't check for removed breakpoints.
15844 Don't set `step' on non-hardware step archs.
15845 (linux_set_resume_request): Ignore resume_stop requests if already
15846 stopping or stopped. Set the lwp's last_resume_kind.
15847 (resume_status_pending_p): Don't check for removed breakpoints.
15848 (need_step_over_p): New.
15849 (start_step_over): New.
15850 (finish_step_over): New.
15851 (linux_resume_one_thread): Always queue a sigstop for resume_stop
15852 requests. Clear the thread's last reported target waitstatus.
15853 Don't use the `suspended' flag. Don't consider pending breakpoints.
15854 (linux_resume): Start a step-over if necessary.
15855 (proceed_one_lwp): New.
15856 (proceed_all_lwps): New.
15857 (unstop_all_lwps): New.
15858 * linux-low.h (struct lwp_info): Rewrite comment for the
15859 `suspended' flag. Add the `stop_pc' field. Delete the
15860 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
15861 Add `'last_resume_kind' and `need_step_over' fields.
15862 * inferiors.c (struct thread_info): Delete, moved elsewhere.
15863 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
15864 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
15865 (set_raw_breakpoint_at): New.
15866 (set_breakpoint_at): Rewrite to use it.
15867 (reinsert_breakpoint_handler): Delete.
15868 (set_reinsert_breakpoint): New.
15869 (reinsert_breakpoint_by_bp): Delete.
15870 (delete_reinsert_breakpoints): New.
15871 (uninsert_breakpoint): Rewrite.
15872 (uninsert_breakpoints_at): New.
15873 (reinsert_breakpoint): Rewrite.
15874 (reinsert_breakpoints_at): New.
15875 (check_breakpoints): Rewrite.
15876 (breakpoint_here): New.
15877 (breakpoint_inserted_here): New.
15878 (check_mem_read): Adjust.
15879 * mem-break.h (breakpoints_supported, breakpoint_here)
15880 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
15881 (reinsert_breakpoint_by_bp): Delete declaration.
15882 (delete_reinsert_breakpoints): Declare.
15883 (reinsert_breakpoint): Delete declaration.
15884 (reinsert_breakpoints_at): Declare.
15885 (uninsert_breakpoint): Delete declaration.
15886 (uninsert_breakpoints_at): Declare.
15887 (check_breakpoints): Adjust prototype.
15888 * server.h: Adjust include order.
15889 (struct thread_info): Declare here. Add a `last_status' field.
15890
15891 2010-03-23 Michael Snyder <msnyder@vmware.com>
15892
15893 * server.c (crc32): New function.
15894 (handle_query): Add handling for 'qCRC:' request.
15895
15896 2010-03-23 Pedro Alves <pedro@codesourcery.com>
15897
15898 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
15899 lwp had been stopped by a watchpoint.
15900
15901 2010-03-16 Pedro Alves <pedro@codesourcery.com>
15902
15903 * server.h (internal_error): Declare.
15904 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
15905 * utils.c (internal_error): New function.
15906
15907 2010-03-15 Andreas Schwab <schwab@redhat.com>
15908
15909 * configure.srv: Fix typo setting srv_regobj.
15910
15911 2010-03-15 Pedro Alves <pedro@codesourcery.com>
15912
15913 * linux-low.c (fetch_register): Avoid passing a non string literal
15914 format to `error'.
15915 (usr_store_inferior_registers): Ditto.
15916
15917 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15918
15919 * linux-low.c (linux_write_memory): Bail out early if peeking
15920 memory failed.
15921
15922 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15923
15924 * linux-low.h (struct lwp_info): New fields
15925 `stopped_by_watchpoint' and `stopped_data_address'.
15926 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
15927 here, and cache them in the lwp object.
15928 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
15929 directly.
15930 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
15931 field.
15932 (linux_stopped_by_watchpoint): Rewrite.
15933 (linux_stopped_data_address): Rewrite.
15934
15935 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
15936
15937 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
15938 switching the current inferior, not before.
15939
15940 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
15941
15942 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
15943 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
15944 i386-linux.c and amd64-linux.c.
15945 (reg-i386.o): Removed.
15946 (reg-i386.c): Likewise.
15947 (reg-i386-linux.o): Likewise.
15948 (reg-i386-linux.c): Likewise.
15949 (reg-x86-64.o): Likewise.
15950 (reg-x86-64.c): Likewise.
15951 (reg-x86-64-linux.o): Likewise.
15952 (reg-x86-64-linux.c): Likewise.
15953 (i386.o): New.
15954 (i386.c): Likewise.
15955 (i386-linux.o): Likewise.
15956 (i386-linux.c): Likewise.
15957 (amd64.o): Likewise.
15958 (amd64.c): Likewise.
15959 (amd64-linux.o): Likewise.
15960 (amd64-linux.c): Likewise.
15961
15962 * configure.srv (srv_i386_regobj): New.
15963 (srv_i386_linux_regobj): Likewise.
15964 (srv_amd64_regobj): Likewise.
15965 (srv_amd64_linux_regobj): Likewise.
15966 (srv_i386_32bit_xmlfiles): Likewise.
15967 (srv_i386_64bit_xmlfiles): Likewise.
15968 (srv_i386_xmlfiles): Likewise.
15969 (srv_amd64_xmlfiles): Likewise.
15970 (srv_i386_linux_xmlfiles): Likewise.
15971 (srv_amd64_linux_xmlfiles): Likewise.
15972 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
15973 srv_xmlfiles to $srv_i386_xmlfiles.
15974 (i[34567]86-*-mingw32ce*): Likewise.
15975 (i[34567]86-*-mingw*): Likewise.
15976 (i[34567]86-*-nto*): Likewise.
15977 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
15978 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
15979 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
15980 (x86_64-*-linux*): Likewise.
15981
15982 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
15983 (init_registers_amd64_linux): New.
15984 (x86_arch_setup): Replace init_registers_x86_64_linux with
15985 init_registers_amd64_linux.
15986
15987 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
15988
15989 * configure.ac: Check for libdl. If it is not available link against
15990 static libthread_db.
15991 * configure: Regenerate.
15992
15993 2010-02-22 Pedro Alves <pedro@codesourcery.com>
15994
15995 PR9605
15996
15997 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
15998 handing a read watchpoint.
15999 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
16000
16001 2010-02-12 Doug Evans <dje@google.com>
16002
16003 * linux-low.c (linux_supports_tracefork_flag): Document.
16004 (linux_look_up_symbols): Add comment.
16005
16006 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
16007
16008 * regcache.c (supply_register): Clear regcache if buf is NULL.
16009
16010 2010-02-02 Nicolas Roche <roche@sourceware.org>
16011 Joel Brobecker <brobecker@adacore.com>
16012
16013 * inferiors.c (find_inferior): Add function documentation.
16014 (unloaded_dll): Handle the case where the unloaded dll has not
16015 been previously registered in the dll list.
16016
16017 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16018
16019 * linux-arm-low.c (thumb_breakpoint_len): Delete.
16020 (thumb2_breakpoint): New.
16021 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
16022
16023 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16024
16025 * linux-low.c (get_stop_pc): Check for SIGTRAP.
16026 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
16027 breakpoints.
16028
16029 2010-01-21 Pedro Alves <pedro@codesourcery.com>
16030
16031 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
16032
16033 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
16034
16035 * linux-s390-low.c (s390_collect_ptrace_register)
16036 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
16037
16038 2010-01-21 Doug Evans <dje@google.com>
16039
16040 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
16041 (PTRACE_ARG4_TYPE): New macro.
16042 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
16043 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
16044 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
16045 (usr_store_inferior_registers): Ditto.
16046 (linux_read_memory, linux_write_memory): Ditto.
16047 (linux_test_for_tracefork): Ditto.
16048
16049 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
16050 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
16051
16052 2010-01-21 Pedro Alves <pedro@codesourcery.com>
16053
16054 * proc-service.c (ps_lgetregs): Don't refetch registers from the
16055 target.
16056
16057 2010-01-21 Pedro Alves <pedro@codesourcery.com>
16058
16059 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
16060 prototype to take a regcache. Adjust.
16061
16062 2010-01-20 Pedro Alves <pedro@codesourcery.com>
16063
16064 * regcache.h (struct thread_info): Forward declare.
16065 (struct regcache): New.
16066 (new_register_cache): Adjust prototype.
16067 (get_thread_regcache): Declare.
16068 (free_register_cache): Adjust prototype.
16069 (registers_to_string, registers_from_string): Ditto.
16070 (supply_register, supply_register_by_name, collect_register)
16071 (collect_register_as_string, collect_register_by_name): Ditto.
16072 * regcache.c (struct inferior_regcache_data): Delete.
16073 (get_regcache): Rename to ...
16074 (get_thread_regcache): ... this. Adjust. Switch inferior before
16075 fetching registers.
16076 (regcache_invalidate_one): Adjust.
16077 (regcache_invalidate): Fix prototype.
16078 (new_register_cache): Return the new register cache.
16079 (free_register_cache): Change prototype.
16080 (realloc_register_cache): Adjust.
16081 (registers_to_string): Change prototype to take a regcache. Adjust.
16082 (registers_from_string): Ditto.
16083 (register_data): Ditto.
16084 (supply_register): Ditto.
16085 (supply_register_by_name): Ditto.
16086 (collect_register): Ditto.
16087 (collect_register_as_string): Ditto.
16088 (collect_register_by_name): Ditto.
16089 * server.c (process_serial_event): Adjust.
16090 * linux-low.h (regset_fill_func, regset_store_func): Change
16091 prototype.
16092 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
16093 Change prototype.
16094 * linux-low.c (get_stop_pc): Adjust.
16095 (check_removed_breakpoint): Adjust.
16096 (linux_wait_for_event): Adjust.
16097 (linux_resume_one_lwp): Adjust.
16098 (fetch_register): Add regcache parameter. Adjust.
16099 (usr_store_inferior_registers): Ditto.
16100 (regsets_fetch_inferior_registers): Ditto.
16101 (regsets_store_inferior_registers): Ditto.
16102 (linux_fetch_registers, linux_store_registers): Ditto.
16103 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
16104 regcache. Adjust.
16105 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
16106 Ditto.
16107 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
16108 prototype to take a regcache.
16109 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
16110 * remote-utils.c (convert_ascii_to_int, outreg)
16111 (prepare_resume_reply): Change prototype to take a regcache.
16112 Adjust.
16113 * target.h (struct target_ops) <fetch_registers, store_registers>:
16114 Change prototype to take a regcache.
16115 (fetch_inferior_registers, store_inferior_registers): Change
16116 prototype to take a regcache. Adjust.
16117 * proc-service.c (ps_lgetregs): Adjust.
16118 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
16119 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
16120 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
16121 take a regcache. Adjust.
16122 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
16123 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
16124 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
16125 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
16126 * linux-cris-low.c (cris_get_pc, cris_set_pc)
16127 (cris_cannot_fetch_register):
16128 (cris_breakpoint_at): Change prototype to take a regcache.
16129 Adjust.
16130 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
16131 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
16132 to take a regcache. Adjust.
16133 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
16134 Adjust.
16135 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
16136 take a regcache. Adjust.
16137 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
16138 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
16139 (m68k_set_pc): Change prototype to take a regcache. Adjust.
16140 * linux-mips-low.c (mips_get_pc):
16141 (mips_set_pc): Change prototype to take a regcache. Adjust.
16142 (mips_reinsert_addr): Adjust.
16143 (mips_collect_register): Change prototype to take a regcache.
16144 Adjust.
16145 (mips_supply_register):
16146 (mips_collect_register_32bit, mips_supply_register_32bit)
16147 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16148 (mips_store_fpregset): Ditto.
16149 * linux-ppc-low.c (ppc_supply_ptrace_register)
16150 (ppc_supply_ptrace_register): Ditto.
16151 (parse_spufs_run): Adjust.
16152 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
16153 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
16154 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
16155 take a regcache. Adjust.
16156 * linux-s390-low.c (s390_collect_ptrace_register)
16157 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
16158 (s390_set_pc): Change prototype to take a regcache. Adjust.
16159 (s390_arch_setup): Adjust.
16160 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
16161 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
16162 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
16163 (sparc_fill_gregset, sparc_store_gregset_from_stack)
16164 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
16165 regcache. Adjust.
16166 (sparc_breakpoint_at): Adjust.
16167 * linux-xtensa-low.c (xtensa_fill_gregset):
16168 (xtensa_store_gregset):
16169 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
16170 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
16171 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
16172 prototype to take a regcache. Adjust.
16173 * win32-arm-low.c (arm_fetch_inferior_register)
16174 (arm_store_inferior_register): Change prototype to take a
16175 regcache. Adjust.
16176 * win32-i386-low.c (i386_fetch_inferior_register)
16177 (i386_store_inferior_register): Change prototype to take a
16178 regcache. Adjust.
16179 * win32-low.c (child_fetch_inferior_registers)
16180 (child_store_inferior_registers): Change prototype to take a
16181 regcache. Adjust.
16182 (win32_wait): Adjust.
16183 (win32_fetch_inferior_registers): Change prototype to take a
16184 regcache. Adjust.
16185 (win32_store_inferior_registers): Adjust.
16186 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
16187 store_inferior_register>: Change prototype to take a regcache.
16188
16189 2010-01-20 Doug Evans <dje@google.com>
16190
16191 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
16192 #ifdef.
16193 (linux_wait_for_event1, linux_init_signals): Ditto.
16194 (W_STOPCODE): Provide definition if missing.
16195
16196 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
16197
16198 * linux-low.c (linux_core_of_thread): New.
16199 (compare_ints, show_process, list_threads): New.
16200 (linux_qxfer_osdata): Report threads and cores.
16201 (linux_target_op): Register linux_core_of_thread.
16202 * remote-utils.c (prepare_resume_reply): Report the core.
16203 (buffer_xml_printf): Support %d specifier.
16204 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
16205 New.
16206 (handle_query): Handle qXfer:threads. Announce availability
16207 thereof.
16208 * target.h (struct target_ops): New field core_of_thread.
16209
16210 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
16211
16212 * Makefile.in (clean): Remove new generated files.
16213 (reg-s390.o, reg-s390.c): Remove rules.
16214 (reg-s390x.o, reg-s390x.c): Likewise.
16215 (s390-linux32.o, s390-linux32.c): Add rules.
16216 (s390-linux64.o, s390-linux64.c): Likewise.
16217 (s390x-linux64.o, s390x-linux64.c): Likewise.
16218 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
16219 * linux-s390-low.c: Include <elf.h>.
16220 (HWCAP_S390_HIGH_GPRS): Define if undefined.
16221 (init_registers_s390): Remove prototype.
16222 (init_registers_s390x): Likewise.
16223 (init_registers_s390_linux32): Add prototype.
16224 (init_registers_s390_linux64): Likewise.
16225 (init_registers_s390x_linux64): Likewise.
16226 (s390_num_regs_3264): New define.
16227 (s390_regmap_3264): New global variable.
16228 (s390_cannot_fetch_register): Remove obsolete check.
16229 (s390_cannot_store_register): Likewise.
16230 (s390_collect_ptrace_register): Handle upper/lower register halves.
16231 (s390_supply_ptrace_register): Likewise.
16232 (s390_fill_gregset): Update to register number changes.
16233 (s390_get_hwcap): New routine.
16234 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
16235 Install appropriate regmap and register set.
16236
16237 2010-01-01 Joel Brobecker <brobecker@adacore.com>
16238
16239 * server.c (gdbserver_version): Update copyright year to 2010.
16240 * gdbreplay.c (gdbreplay_version): Likewise.
16241
16242 2009-12-28 Doug Evans <dje@google.com>
16243
16244 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
16245 elf/external.h. Include <elf.h> instead but only if necessary.
16246
16247 2009-12-28 Pedro Alves <pedro@codesourcery.com>
16248
16249 * linux-low.c (linux_remove_process): Remove `detaching'
16250 parameter. Don't release/detach from thread_db here.
16251 (linux_kill): Release/detach from thread_db here, ...
16252 (linux_detach): ... and here, before actually detaching.
16253 (linux_wait_1): ... and here, when a process exits.
16254 * thread-db.c (any_thread_of): New.
16255 (thread_db_free): Switch the current inferior to a thread of the
16256 passed in process.
16257
16258 2009-12-21 Doug Evans <dje@google.com>
16259
16260 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
16261
16262 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
16263 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
16264 warning ifndef __NR_tkill. Move setting of errno there too.
16265 Delete unnecessary resetting of errno after syscall.
16266 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
16267
16268 * configure.ac: Check for dladdr.
16269 * config.in: Regenerate.
16270 * configure: Regenerate.
16271 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
16272 (try_thread_db_load): Update.
16273
16274 * linux-low.c (my_waitpid): Delete unnecessary prototype.
16275
16276 2009-12-18 Doug Evans <dje@google.com>
16277
16278 * event-loop.c: Include unistd.h if it exists.
16279
16280 * linux-low.c (my_waitpid): Move definition away from being in
16281 between linux_tracefork_child/linux_test_for_tracefork.
16282
16283 * gdb_proc_service.h (psaddr_t): Fix type.
16284 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
16285 signature to match glibc.
16286
16287 2009-12-16 Doug Evans <dje@google.com>
16288
16289 * linux-low.c (linux_read_memory): Fix argument to read.
16290
16291 2009-11-26 Pedro Alves <pedro@codesourcery.com>
16292
16293 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
16294 events, don't leave current_inferior pointing at null.
16295
16296 2009-11-26 Pedro Alves <pedro@codesourcery.com>
16297
16298 * win32-low.c (LOG): Delete.
16299 (OUTMSG): Output to stderr.
16300 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
16301 on compile time LOG macro.
16302 (win32_wait): Fix debug output.
16303
16304 2009-11-26 Pedro Alves <pedro@codesourcery.com>
16305
16306 * win32-low.c (win32_add_one_solib): If the dll name is
16307 "ntdll.dll", prepend the system directory to the dll path.
16308
16309 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
16310
16311 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
16312
16313 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
16314 Vladimir Prus <vladimir@codesourcery.com>
16315
16316 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
16317 * configure.ac: Check for __mcoldfire__ and set
16318 gdb_cv_m68k_is_coldfire.
16319 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
16320 reg-cf.o and reg-m68k.o.
16321 * configure: Regenerated.
16322
16323 2009-11-16 Pedro Alves <pedro@codesourcery.com>
16324
16325 * linux-low.c (linux_remove_process): Add `detaching' parameter.
16326 Pass it to thread_db_free.
16327 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
16328 proper `detaching' argument to linux_remove_process.
16329 * linux-low.h (thread_db_free): Add `detaching' parameter.
16330 * thread-db.c (thread_db_init): Pass false as `detaching' argument
16331 to thread_db_free.
16332 (thread_db_free): Add `detaching' parameter. Only
16333 call td_ta_clear_event if detaching from process.
16334
16335 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
16336
16337 * thread-db.c (thread_db_free): Fix typo.
16338
16339 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
16340
16341 PR gdb/10838
16342 * thread-db.c (thread_db_free): Call td_ta_clear_event.
16343
16344 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
16345
16346 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
16347 with an i686 compiler.
16348 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
16349 needed.
16350 * configure: Rebuilt.
16351
16352 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
16353
16354 PR gdb/10783
16355
16356 * server.c (handle_search_memory_1): Correct read_addr initialization
16357 in loop for searching subsequent chunks.
16358
16359 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
16360
16361 * configure.ac: New --with-libthread-db option.
16362 * thread-db.c: Allow direct dependence on libthread_db.
16363 (thread_db_free): Adjust.
16364 * config.in: Regenerate.
16365 * configure: Likewise.
16366
16367 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
16368
16369 PR gdb/10757
16370 * thread-db.c (attach_thread): New function.
16371 (maybe_attach_thread): Return success/failure.
16372 (find_new_threads_callback): Adjust.
16373 (thread_db_find_new_threads): Loop until no new threads.
16374
16375 2009-10-13 Pedro Alves <pedro@codesourcery.com>
16376
16377 * proc-service.c (ps_lgetregs): Formatting.
16378
16379 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
16380
16381 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
16382 * configure.ac: Adjust.
16383 * linux-low.h (struct process_info_private): Move members to struct
16384 thread_db.
16385 (thread_db_free, thread_db_handle_monitor_command): New prototype.
16386 * linux-low.c (linux_remove_process): Adjust.
16387 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
16388 * server.c (handle_query): Move code ...
16389 (handle_monitor_command): ... here. New function.
16390 * target.h (struct target_ops): New member.
16391 * thread-db.c (struct thread_db): New.
16392 (libthread_db_search_path): New variable.
16393 (thread_db_create_event, thread_db_enable_reporting)
16394 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
16395 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
16396 (try_thread_db_load_1, dladdr_to_soname): New functions.
16397 (try_thread_db_load, thread_db_load_search): New functions.
16398 (thread_db_init): Search for libthread_db.
16399 (thread_db_free): New function.
16400 (thread_db_handle_monitor_command): Likewise.
16401 * config.in: Regenerate.
16402 * configure: Regenerate.
16403
16404 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
16405
16406 * spu-low.c (spu_kill): Wait for inferior to terminate.
16407 Call clear_inferiors.
16408 (spu_detach): Call clear_inferiors.
16409
16410 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16411
16412 * aclocal.m4: Regenerate.
16413 * config.in: Likewise.
16414 * configure: Likewise.
16415
16416 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
16417
16418 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
16419 (parse_spufs_run): New function.
16420 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
16421 (ppc_breakpoint_at): Handle SPU breakpoints.
16422
16423 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
16424
16425 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
16426 (SPUFS_MAGIC): Define.
16427 (spu_enumerate_spu_ids): New function.
16428 (linux_qxfer_spu): New function.
16429 (linux_target_ops): Install linux_qxfer_spu.
16430
16431 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
16432
16433 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
16434 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
16435 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
16436 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
16437 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
16438 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
16439 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
16440 (init_registers_powerpc_cell32l): Add prototype.
16441 (init_registers_powerpc_cell64l): Likewise.
16442 (ppc_arch_setup): Detect Cell/B.E. architecture.
16443
16444 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16445
16446 * Makefile.in (datarootdir): New variable.
16447
16448 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
16449
16450 * linux-low.c (linux_write_memory): Update debugging output.
16451 * Makefile.in (clean): Add new descriptions.
16452 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
16453 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
16454 * configure.srv: Add new files for arm*-*-linux*.
16455 * linux-arm-low.c: Add new declarations.
16456 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
16457 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
16458 (HWCAP_VFPv3D16): New.
16459 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
16460 instead of __IWMMXT__.
16461 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
16462 (arm_arch_setup): New.
16463 (target_regsets): Remove #ifdef. Add VFP regset.
16464 (the_low_target): Use arm_arch_setup.
16465
16466 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
16467
16468 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
16469 the main thread again.
16470
16471 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
16472
16473 Adding Neutrino gdbserver.
16474 * configure: Regenerated.
16475 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
16476 * configure.srv (i[34567]86-*-nto*): New target.
16477 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
16478 * remote-utils.c [__QNX__]: Include sys/iomgr.h
16479 (nto_comctrl) [__QNX__]: New function.
16480 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
16481
16482 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
16483
16484 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
16485 srv_tgtobj.
16486
16487 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
16488 Pedro Alves <pedro@codesourcery.com>
16489
16490 * win32-i386-low.c (i386_get_thread_context): Handle systems that
16491 don't support CONTEXT_EXTENDED_REGISTERS.
16492 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
16493 (the_low_target): Install them.
16494 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
16495 failing with ERROR_PIPE_NOT_CONNECTED.
16496
16497 2009-06-30 Doug Evans <dje@google.com>
16498 Pierre Muller <muller@ics.u-strasbg.fr>
16499
16500 Add h/w watchpoint support to x86-linux, win32-i386.
16501 * Makefile.in (SFILES): Add i386-low.c
16502 (i386_low_h): Define.
16503 (i386-low.o): Add dependencies.
16504 (linux-x86-low.o): Add i386-low.h dependency.
16505 (win32-i386-low.o): Ditto.
16506 * i386-low.c: New file.
16507 * i386-low.h: New file.
16508 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
16509 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
16510 * linux-low.c (linux_add_process): Initialize arch_private.
16511 (linux_remove_process): Free arch_private.
16512 (add_lwp): Initialize arch_private.
16513 (delete_lwp): Free arch_private.
16514 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
16515 provided.
16516 * linux-low.h (process_info_private): New member arch_private.
16517 (lwp_info): New member arch_private.
16518 (linux_target_ops): New members new_process, new_thread,
16519 prepare_to_resume.
16520 (ptid_of): New macro.
16521 * linux-x86-low.c: Include stddef.h, i386-low.h.
16522 (arch_process_info): New struct.
16523 (arch_lwp_info): New struct.
16524 (x86_linux_dr_get, x86_linux_dr_set): New functions.
16525 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
16526 (i386_dr_low_get_status): New function.
16527 (x86_insert_point, x86_remove_point): New functions.
16528 (x86_stopped_by_watchpoint): New function.
16529 (x86_stopped_data_address): New function.
16530 (x86_linux_new_process, x86_linux_new_thread): New functions.
16531 (x86_linux_prepare_to_resume): New function.
16532 (the_low_target): Add entries for insert_point, remove_point,
16533 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
16534 prepare_to_resume.
16535 * server.c (debug_hw_points): New global.
16536 (monitor_show_help): Document set debug-hw-points.
16537 (handle_query): Process "set debug-hw-points".
16538 * server.h (debug_hw_points): Declare.
16539 (paddress): Declare.
16540 * utils.c (NUMCELLS, CELLSIZE): New macros.
16541 (get_sell, xsnprintf, paddress): New functions.
16542 * win32-arm-low.c (the_low_target): Add entries for insert_point,
16543 remove_point, stopped_by_watchpoint, stopped_data_address.
16544 * win32-i386-low.c: Include i386-low.h.
16545 (debug_reg_state): Replaces dr.
16546 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
16547 (i386_dr_low_get_status): New function.
16548 (i386_insert_point, i386_remove_point): New functions.
16549 (i386_stopped_by_watchpoint): New function.
16550 (i386_stopped_data_address): New function.
16551 (i386_initial_stuff): Update.
16552 (get_thread_context,set_thread_context,i386_thread_added): Update.
16553 (the_low_target): Add entries for insert_point,
16554 remove_point, stopped_by_watchpoint, stopped_data_address.
16555 * win32-low.c (win32_insert_watchpoint): New function.
16556 (win32_remove_watchpoint): New function.
16557 (win32_stopped_by_watchpoint): New function.
16558 (win32_stopped_data_address): New function.
16559 (win32_target_ops): Add entries for insert_watchpoint,
16560 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
16561 * win32-low.h (win32_target_ops): New members insert_point,
16562 remove_point, stopped_by_watchpoint, stopped_data_address.
16563
16564 2009-06-25 Pedro Alves <pedro@codesourcery.com>
16565
16566 * server.c (process_serial_event): Re-return unsupported, not
16567 error, if the type isn't recognized. Re-allow supporting only
16568 insert or remove packets. Also call require_running for
16569 breakpoints. Add missing break statement to default case. Tidy.
16570 * target.h (struct target_ops): Rename insert_watchpoint to
16571 insert_point, and remove_watchpoint to remove_point.
16572
16573 * linux-low.h (struct linux_target_ops): Likewise.
16574 * linux-low.c (linux_insert_watchpoint): Rename to ...
16575 (linux_insert_point): ... this. Adjust.
16576 (linux_remove_watchpoint): Rename to ...
16577 (linux_remove_point): ... this. Adjust.
16578 (linux_target_ops): Adjust.
16579 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
16580 (cris_insert_point): ... this.
16581 (cris_remove_watchpoint): Rename to ...
16582 (cris_remove_point): ... this.
16583 (the_low_target): Adjust.
16584
16585 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
16586
16587 * server.c (handle_v_kill): Pass signal_pid to
16588 kill_inferior if multi_process is zero.
16589
16590 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
16591
16592 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
16593 * target.h (target_ops): Comment for *_watchpoint to make it clear
16594 the functions can get types '0' and '1'.
16595
16596 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
16597
16598 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
16599 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
16600 * regcache.c (get_regcache): Likewise.
16601 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
16602 * win32-low.c (child_fetch_inferior_registers): Remove check for
16603 regno 0.
16604
16605 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
16606 Pedro Alves <pedro@codesourcery.com>
16607
16608 * target.h (struct target_ops) <supports_multi_process>: New
16609 callback.
16610 (target_supports_multi_process): New.
16611 * server.c (handle_query): Even if GDB reports support, only
16612 enable multi-process if the target also supports it. Report
16613 multi-process support only if the target backend supports it.
16614 * linux-low.c (linux_supports_multi_process): New function.
16615 (linux_target_ops): Install it as target_supports_multi_process
16616 callback.
16617
16618 2009-05-24 Doug Evans <dje@google.com>
16619
16620 Global renaming of find_thread_pid to find_thread_ptid.
16621 * server.h (find_thread_ptid): Renamed from find_thread_pid.
16622 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
16623 All callers updated.
16624
16625 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
16626 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
16627 directly.
16628
16629 * linux-low.c (get_stop_pc): Print pc if debug_threads.
16630 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
16631 (linux_resume_one_lwp): Ditto.
16632
16633 2009-05-23 Doug Evans <dje@google.com>
16634
16635 * linux-low.c (linux_resume_one_lwp): Change type of first arg
16636 from struct inferior_list_entry * to struct lwp_info *.
16637 All callers updated.
16638
16639 2009-05-13 Doug Evans <dje@google.com>
16640
16641 * linux-x86-low.c: Don't include assert.h.
16642 (x86_siginfo_fixup): Use fatal, not assert.
16643 (x86_arch_setup): Fix comment.
16644
16645 2009-05-12 Doug Evans <dje@google.com>
16646
16647 Biarch support for i386/amd64 gdbserver.
16648 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
16649 Add linux-x86-low.c.
16650 (linux-i386-low.o, linux-x86-64-low.o): Delete.
16651 (linux-x86-low.o): Add.
16652 * linux-x86-64-low.c: Delete.
16653 * linux-i386-low.c: Delete.
16654 * linux-x86-low.c: New file.
16655 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
16656 linux-x86-low.o.
16657 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
16658 linux-x86-low.o.
16659 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
16660 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
16661 (linux_child_pid_to_exec_file): New function.
16662 (elf_64_header_p, elf_64_file_p): New functions.
16663 (siginfo_fixup): New function.
16664 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
16665 give target a chance to convert layout.
16666 * linux-low.h (linux_target_ops): New member siginfo_fixup.
16667 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
16668
16669 2009-05-07 Doug Evans <dje@google.com>
16670
16671 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
16672 (regsets_store_inferior_registers): Ditto.
16673
16674 2009-05-06 Pedro Alves <pedro@codesourcery.com>
16675
16676 PR server/10048
16677
16678 * linux-low.c (must_set_ptrace_flags): Delete.
16679 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
16680 of the global.
16681 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
16682 `lwp->must_set_ptrace_flags' instead.
16683 (linux_wait_for_event_1): Set ptrace options here.
16684 (linux_wait_1): ... not here.
16685
16686 2009-04-30 Doug Evans <dje@google.com>
16687
16688 * inferiors.c (started_inferior_callback): New function.
16689 (attached_inferior_callback): New function.
16690 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
16691 * server.c (print_started_pid, print_attached_pid): New functions.
16692 (detach_or_kill_for_exit): New function.
16693 (main): Call it instead of for_each_inferior (kill_inferior_callback).
16694 * server.h (have_started_inferiors_p): Declare.
16695 (have_attached_inferiors_p): Declare.
16696
16697 * inferiors.c (remove_process): Fix memory leak, free process.
16698 * linux-low.c (linux_remove_process): New function.
16699 (linux_kill): Call it instead of remove_process.
16700 (linux_detach, linux_wait_1): Ditto.
16701
16702 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
16703
16704 * configure.srv: Add x86 Windows CE target.
16705
16706 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16707
16708 * inferiors.c (get_thread_process): Make global.
16709 * server.h (get_thread_process): Add prototype.
16710 * thread-db.c (find_one_thread): Use get_thread_process
16711 instead of current_process.
16712 (thread_db_get_tls_address): Do not crash if called when
16713 thread layer is not yet initialized.
16714
16715 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16716
16717 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
16718 * spu-low.c (current_tid): Rename to ...
16719 (current_ptid): ... this.
16720 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
16721 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
16722 ptid_get_lwp (current_ptid) instead of current_tid.
16723 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
16724 instead of current_tid. Use find_process_pid to verify pid
16725 argument is valid. Pass proper argument to remove_process.
16726 (spu_thread_alive): Compare current_ptid instead of current_tid.
16727 (spu_resume): Likewise.
16728
16729 2009-04-02 Pedro Alves <pedro@codesourcery.com>
16730
16731 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
16732 variable.
16733
16734 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16735
16736 Implement the multiprocess extensions, and add linux multiprocess
16737 support.
16738
16739 * server.h (ULONGEST): Declare.
16740 (struct ptid, ptid_t): New.
16741 (minus_one_ptid, null_ptid): Declare.
16742 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16743 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
16744 (struct inferior_list_entry): Change `id' type from unsigned from
16745 to ptid_t.
16746 (struct sym_cache, struct breakpoint, struct
16747 process_info_private): Forward declare.
16748 (struct process_info): Declare.
16749 (current_process): Declare.
16750 (all_processes): Declare.
16751 (initialize_inferiors): Declare.
16752 (add_thread): Adjust to use ptid_t.
16753 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
16754 (add_process, remove_process, find_thread_pid): Declare.
16755 (find_inferior_id): Adjust to use ptid_t.
16756 (cont_thread, general_thread, step_thread): Change type to ptid_t.
16757 (multi_process): Declare.
16758 (push_event): Adjust to use ptid_t.
16759 (read_ptid, write_ptid): Declare.
16760 (prepare_resume_reply): Adjust to use ptid_t.
16761 (clear_symbol_cache): Declare.
16762 * inferiors.c (all_processes): New.
16763 (null_ptid, minus_one_ptid): New.
16764 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16765 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
16766 (add_thread): Change unsigned long to ptid. Remove gdb_id
16767 parameter. Adjust.
16768 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
16769 (gdb_id_to_thread): Rename to ...
16770 (find_thread_pid): ... this. Change unsigned long to ptid.
16771 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
16772 (loaded_dll, pull_pid_from_list): Adjust.
16773 (add_process, remove_process, find_process_pid)
16774 (get_thread_process, current_process, initialize_inferiors): New.
16775 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
16776 (struct target_waitstatus) <related_pid>: Ditto.
16777 (struct target_ops) <kill, detach>: Add `pid' argument. Change
16778 return type to int.
16779 (struct target_ops) <join>: Add `pid' argument.
16780 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
16781 (struct target_ops) <wait>: Add `ptid' field. Change return type
16782 to ptid.
16783 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
16784 (mywait): Add `ptid' argument. Change return type to ptid_t.
16785 (target_pid_to_str): Declare.
16786 * target.c (set_desired_inferior): Adjust to use ptids.
16787 (mywait): Add new `ptid' argument. Adjust.
16788 (target_pid_to_str): New.
16789 * mem-break.h (free_all_breakpoints): Declare.
16790 * mem-break.c (breakpoints): Delelete.
16791 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
16792 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
16793 to use per-process breakpoint list.
16794 (free_all_breakpoints): New.
16795 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
16796 (symbol_cache, all_symbols_looked_up): Delete.
16797 (hexchars): New.
16798 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
16799 read_ptid): New.
16800 (prepare_resume_reply): Change ptid argument's type from unsigned
16801 long to ptid_t. Adjust. Implement W;process and X;process.
16802 (free_sym_cache, clear_symbol_cache): New.
16803 (look_up_one_symbol): Adjust to per-process symbol cache. *
16804 * server.c (cont_thread, general_thread, step_thread): Change type
16805 to ptid_t.
16806 (attached): Delete.
16807 (multi_process): New.
16808 (last_ptid): Change type to ptid_t.
16809 (struct vstop_notif) <ptid>: Change type to ptid_t.
16810 (queue_stop_reply, push_event): Change `ptid' argument's type to
16811 ptid_t.
16812 (discard_queued_stop_replies): Add `pid' argument.
16813 (start_inferior): Adjust to use ptids. Adjust to mywait interface
16814 changes. Don't reference the `attached' global.
16815 (attach_inferior): Adjust to mywait interface changes.
16816 (handle_query): Adjust to use ptids. Parse GDB's qSupported
16817 features. Handle and report "multiprocess+". Handle
16818 "qAttached:PID".
16819 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
16820 changes.
16821 (handle_v_kill): New.
16822 (handle_v_stopped): Adjust to use target_pid_to_str.
16823 (handle_v_requests): Allow multiple attaches and runs when
16824 multiprocess extensions are in effect. Handle "vKill".
16825 (myresume): Adjust to use ptids.
16826 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
16827 (handle_status): Adjust to discard_queued_stop_replies interface
16828 change.
16829 (first_thread_of, kill_inferior_callback)
16830 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
16831 (main): Call initialize_inferiors. Adjust to use ptids, killing
16832 and detaching from all inferiors. Handle multiprocess packet
16833 variants.
16834 * linux-low.h: Include gdb_proc_service.h.
16835 (struct process_info_private): New.
16836 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
16837 <lwpid_of>: Use ptid_get_lwp.
16838 (get_lwp_thread): Adjust.
16839 (struct lwp_info): Add `dead' member.
16840 (find_lwp_pid): Declare.
16841 * linux-low.c (thread_db_active): Delete.
16842 (new_inferior): Adjust comment.
16843 (inferior_pid): Delete.
16844 (linux_add_process): New.
16845 (handle_extended_wait): Adjust.
16846 (add_lwp): Change unsigned long to ptid.
16847 (linux_create_inferior): Add process to processes table. Adjust
16848 to use ptids. Don't set new_inferior here.
16849 (linux_attach_lwp): Rename to ...
16850 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
16851 it. Adjust to use ptids.
16852 (linux_attach_lwp): New.
16853 (linux_attach): Add process to processes table. Don't set
16854 new_inferior here.
16855 (struct counter): New.
16856 (second_thread_of_pid_p, last_thread_of_process_p): New.
16857 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
16858 multiple processes.
16859 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
16860 processes. Remove process from process table.
16861 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
16862 to multiple processes.
16863 (any_thread_of): New.
16864 (linux_detach): Add `pid' argument, and handle it. Remove process
16865 from processes table.
16866 (linux_join): Add `pid' argument. Handle it.
16867 (linux_thread_alive): Change unsighed long argument to ptid_t.
16868 Consider dead lwps as not being alive.
16869 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
16870 threads we're not interested in.
16871 (same_lwp, find_lwp_pid): New.
16872 (linux_wait_for_lwp): Change `pid' argument's type from int to
16873 ptid_t. Adjust.
16874 (linux_wait_for_event): Rename to ...
16875 (linux_wait_for_event_1): ... this. Change `pid' argument's type
16876 from int to ptid_t. Adjust.
16877 (linux_wait_for_event): New.
16878 (linux_wait_1): Add `ptid' argument. Change return type to
16879 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
16880 that exit from the process table.
16881 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
16882 Adjust.
16883 (mark_lwp_dead): New.
16884 (wait_for_sigstop): Adjust to use ptids. If a process exits while
16885 stopping all threads, mark its main lwp as dead.
16886 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
16887 ptids.
16888 (fetch_register, usr_store_inferior_registers)
16889 (regsets_fetch_inferior_registers)
16890 (regsets_store_inferior_registers, linux_read_memory)
16891 (linux_write_memory): Inline `inferior_pid'.
16892 (linux_look_up_symbols): Adjust to use per-process
16893 `thread_db_active'.
16894 (linux_request_interrupt): Adjust to use ptids.
16895 (linux_read_auxv): Inline `inferior_pid'.
16896 (initialize_low): Don't reference thread_db_active.
16897 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
16898 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
16899 (ps_getpid): Return the pid of the current inferior.
16900 * thread-db.c (proc_handle, thread_agent): Delete.
16901 (thread_db_create_event, thread_db_enable_reporting): Adjust to
16902 per-process data.
16903 (find_one_thread): Change argument type to ptid_t. Adjust to
16904 per-process data.
16905 (maybe_attach_thread): Adjust to per-process data and ptids.
16906 (thread_db_find_new_threads): Ditto.
16907 (thread_db_init): Ditto.
16908 * spu-low.c (spu_create_inferior, spu_attach): Add process to
16909 processes table. Adjust to use ptids.
16910 (spu_kill, spu_detach): Adjust interface. Remove process from
16911 processes table.
16912 (spu_join, spu_thread_alive): Adjust interface.
16913 (spu_wait): Adjust interface. Remove process from processes
16914 table. Adjust to use ptids.
16915 * win32-low.c (current_inferior_tid): Delete.
16916 (current_inferior_ptid): New.
16917 (debug_event_ptid): New.
16918 (thread_rec): Take a ptid. Adjust.
16919 (child_add_thread): Add `pid' argument. Adjust to use ptids.
16920 (child_delete_thread): Ditto.
16921 (do_initial_child_stuff): Add `attached' argument. Add process to
16922 processes table.
16923 (child_fetch_inferior_registers, child_store_inferior_registers):
16924 Adjust.
16925 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
16926 (win32_attach): Pass 1 to do_initial_child_stuff.
16927 (win32_kill): Adjust interface. Remove process from processes
16928 table.
16929 (win32_detach): Ditto.
16930 (win32_join): Adjust interface.
16931 (win32_thread_alive): Take a ptid.
16932 (win32_resume): Adjust to use ptids.
16933 (get_child_debug_event): Ditto.
16934 (win32_wait): Adjust interface. Remove exiting process from
16935 processes table.
16936
16937 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16938
16939 Non-stop mode support.
16940
16941 * server.h (non_stop): Declare.
16942 (gdb_client_data, handler_func): Declare.
16943 (delete_file_handler, add_file_handler, start_event_loop):
16944 Declare.
16945 (handle_serial_event, handle_target_event, push_event)
16946 (putpkt_notif): Declare.
16947 * target.h (enum resume_kind): New.
16948 (struct thread_resume): Replace `step' field by `kind' field.
16949 (TARGET_WNOHANG): Define.
16950 (struct target_ops) <wait>: Add `options' argument.
16951 <supports_non_stop, async, start_non_stop>: New fields.
16952 (target_supports_non_stop, target_async): New.
16953 (start_non_stop): Declare.
16954 (mywait): Add `options' argument.
16955 * target.c (mywait): Add `options' argument. Print child exit
16956 notifications here.
16957 (start_non_stop): New.
16958 * server.c (non_stop, own_buf, mem_buf): New globals.
16959 (struct vstop_notif): New.
16960 (notif_queue): New global.
16961 (queue_stop_reply, push_event, discard_queued_stop_replies)
16962 (send_next_stop_reply): New.
16963 (start_inferior): Adjust to use resume_kind. Adjust to mywait
16964 interface changes.
16965 (attach_inferior): In non-stop mode, don't wait for the target
16966 here.
16967 (handle_general_set): Handle QNonStop.
16968 (handle_query): When handling qC, return the current general
16969 thread, instead of the first thread of the list.
16970 (handle_query): If the backend supports non-stop mode, include
16971 QNonStop+ in the qSupported query response.
16972 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
16973 and non-stop mode.
16974 (handle_v_attach, handle_v_run): Handle non-stop mode.
16975 (handle_v_stopped): New.
16976 (handle_v_requests): Report support for vCont;t. Handle vStopped.
16977 (myresume): Adjust to use resume_kind. Handle non-stop.
16978 (queue_stop_reply_callback): New.
16979 (handle_status): Handle non-stop mode.
16980 (main): Clear non_stop flag on reconnection. Use the event-loop.
16981 Refactor serial protocol handling from here ...
16982 (process_serial_event): ... to this new function. When GDB
16983 selects any thread, select one here. In non-stop mode, wait until
16984 GDB acks all pending events before exiting.
16985 (handle_serial_event, handle_target_event): New.
16986 * remote-utils.c (remote_open): Install remote_desc in the event
16987 loop.
16988 (remote_close): Remove remote_desc from the event loop.
16989 (putpkt_binary): Rename to...
16990 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
16991 (putpkt_binary): New as wrapper around putpkt_binary_1.
16992 (putpkt_notif): New.
16993 (prepare_resume_reply): In non-stop mode, don't change the
16994 general_thread.
16995 * event-loop.c: New.
16996 * Makefile.in (OBJ): Add event-loop.o.
16997 (event-loop.o): New rule.
16998
16999 * linux-low.h (pid_of): Moved here.
17000 (lwpid_of): New.
17001 (get_lwp_thread): Use lwpid_of.
17002 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
17003 * linux-low.c (pid_of): Delete.
17004 (inferior_pid): Use lwpid_of.
17005 (linux_event_pipe): New.
17006 (target_is_async_p): New.
17007 (delete_lwp): New.
17008 (handle_extended_wait): Use lwpid_of.
17009 (add_lwp): Don't set lwpid field.
17010 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
17011 (linux_kill_one_lwp): If killing a running lwp, stop it first.
17012 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
17013 (linux_detach_one_lwp): If detaching from a running lwp, stop it
17014 first. Adjust to linux_wait_for_event interface changes. Use
17015 lwpid_of.
17016 (linux_detach): Don't delete the main lwp here.
17017 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
17018 (status_pending_p): Don't consider explicitly suspended lwps.
17019 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
17020 pointer. Add OPTIONS argument. Change return type to int. Use
17021 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
17022 (linux_wait_for_event): Take an integer pid instead of a lwp_info
17023 pointer. Add status pointer argument. Return a pid instead of a
17024 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
17025 changes. In non-stop mode, don't switch to a random thread.
17026 (linux_wait): Rename to...
17027 (linux_wait_1): ... this. Add target_options argument, and handle
17028 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
17029 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
17030 clean exit and signal exit code. Don't stop all threads in
17031 non-stop mode. In all-stop mode, only stop all threads when
17032 reporting a stop to GDB. Handle explicit thread stop requests.
17033 (async_file_flush, async_file_mark): New.
17034 (linux_wait): New.
17035 (send_sigstop): Use lwpid_of.
17036 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
17037 interface changes. In non-stop mode, don't switch to a random
17038 thread.
17039 (linux_resume_one_lwp): Use lwpid_of.
17040 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
17041 (linux_resume_one_thread): ... this. Handle resume_stop. In
17042 non-stop mode, don't look for pending flag in all threads.
17043 (resume_status_pending_p): Don't consider explicitly suspended
17044 threads.
17045 (my_waitpid): Reimplement. Emulate __WALL.
17046 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
17047 Use lwpid_of.
17048 (sigchld_handler, linux_supports_non_stop, linux_async)
17049 (linux_start_non_stop): New.
17050 (linux_target_ops): Register linux_supports_non_stop, linux_async
17051 and linux_start_non_stop.
17052 (initialize_low): Install SIGCHLD handler.
17053 * thread-db.c (thread_db_create_event, find_one_thread)
17054 (thread_db_get_tls_address): Use lwpid_of.
17055 * win32-low.c (win32_detach): Adjust to use resume_kind.
17056 (win32_wait): Add `options' argument.
17057 * spu-low.c (spu_resume): Adjust to use resume_kind.
17058 (spu_wait): Add `options' argument.
17059
17060 2009-04-01 Pedro Alves <pedro@codesourcery.com>
17061
17062 Decouple target code from remote protocol.
17063
17064 * target.h (enum target_waitkind): New.
17065 (struct target_waitstatus): New.
17066 (struct target_ops) <wait>: Return an unsigned long. Take a
17067 target_waitstatus pointer instead of a char pointer.
17068 (mywait): Likewise.
17069 * target.c (mywait): Change prototype to return an unsigned long.
17070 Take a target_waitstatus pointer instead of a char pointer. Adjust.
17071 * server.h (thread_from_wait, old_thread_from_wait): Delete
17072 declarations.
17073 (prepare_resume_reply): Change prototype to take a
17074 target_waitstatus.
17075 * server.c (thread_from_wait, old_thread_from_wait): Delete.
17076 (last_status, last_ptid): New.
17077 (start_inferior): Remove "statusptr" argument. Adjust. Return a
17078 pid instead of a signal.
17079 (attach_inferior): Remove "status" and "signal" parameters.
17080 Adjust.
17081 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
17082 not as an address.
17083 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
17084 (handle_v_requests, myresume): Remove "status" and "signal"
17085 parameters. Adjust.
17086 (handle_status): New.
17087 (main): Delete local `status'. Adjust.
17088 * remote-utils.c: Include target.h.
17089 (prepare_resume_reply): Change prototype to take a
17090 target_waitstatus. Adjust.
17091
17092 * linux-low.c (linux_wait): Adjust to new target_ops->wait
17093 interface.
17094 * spu-low.c (spu_wait): Adjust.
17095 * win32-low.c (enum target_waitkind, struct target_waitstatus):
17096 Delete.
17097 (win32_wait): Adjust.
17098
17099 2009-04-01 Pedro Alves <pedro@codesourcery.com>
17100
17101 * target.h (struct thread_resume): Delete leave_stopped member.
17102 (struct target_ops): Add a `n' argument to the `resume' callback.
17103 * server.c (start_inferior): Adjust.
17104 (handle_v_cont, myresume): Adjust.
17105 * linux-low.c (check_removed_breakpoint): Adjust to resume
17106 interface change, and to removed leave_stopped field.
17107 (resume_ptr): Delete.
17108 (struct thread_resume_array): New.
17109 (linux_set_resume_request): Add new `arg' parameter. Adjust to
17110 resume interface change.
17111 (linux_continue_one_thread, linux_queue_one_thread)
17112 (resume_status_pending_p): Check if the resume field is NULL
17113 instead of checking the leave_stopped member.
17114 (linux_resume): Adjust to the target resume interface change.
17115 * spu-low.c (spu_resume): Adjust to the target resume interface
17116 change.
17117 * win32-low.c (win32_detach, win32_resume): Ditto.
17118
17119 2009-04-01 Pedro Alves <pedro@codesourcery.com>
17120
17121 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
17122 flag.
17123 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
17124 pending.
17125 (linux_continue_one_thread): Only preserve the stepping flag if
17126 there's a pending breakpoint.
17127
17128 2009-03-31 Pedro Alves <pedro@codesourcery.com>
17129
17130 * server.c (main): After the inferior having exited, call
17131 remote_close before exiting gdbserver.
17132
17133 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
17134
17135 Fix size of FPSCR in Power 7 processors.
17136 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
17137 (PPC_FEATURE_HAS_DFP): New #define.
17138 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
17139 size of the FPSCR.
17140
17141 2009-03-23 Pedro Alves <pedro@codesourcery.com>
17142
17143 * server.c (handle_query) Whitespace and formatting.
17144
17145 2009-03-22 Pedro Alves <pedro@codesourcery.com>
17146
17147 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
17148 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
17149 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
17150 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
17151 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
17152 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
17153 Makefile.in, configure.ac: Fix whitespace throughout.
17154 * configure: Regenerate.
17155
17156 2009-03-22 Pedro Alves <pedro@codesourcery.com>
17157
17158 * inferiors.c (find_inferior): Make it safe for the callback
17159 function to delete the currently iterated inferior.
17160
17161 2009-03-22 Pedro Alves <pedro@codesourcery.com>
17162
17163 * Makefile.in (linuw_low_h): Move higher.
17164 (thread-db.o): Depend on $(linux_low_h).
17165
17166 2009-03-17 Pedro Alves <pedro@codesourcery.com>
17167
17168 Rename "process" to "lwp" throughout.
17169
17170 * linux-low.c (all_processes): Rename to...
17171 (all_lwps): ... this.
17172 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
17173 (add_process): Rename to ...
17174 (add_lwp): ... this. Adjust.
17175 (linux_create_inferior): Adjust.
17176 (linux_attach_lwp): Adjust.
17177 (linux_attach): Adjust.
17178 (linux_kill_one_process): Rename to ...
17179 (linux_kill_one_lwp): ... this. Adjust.
17180 (linux_kill): Adjust.
17181 (linux_detach_one_process): Rename to ...
17182 (linux_detach_one_lwp): ... this. Adjust.
17183 (linux_detach): Adjust.
17184 (check_removed_breakpoint): Adjust.
17185 (status_pending_p): Adjust.
17186 (linux_wait_for_process): Rename to ...
17187 (linux_wait_for_lwp): ... this. Adjust.
17188 (linux_wait_for_event): Adjust.
17189 (send_sigstop): Adjust.
17190 (wait_for_sigstop): Adjust.
17191 (stop_all_processes): Rename to ...
17192 (stop_all_lwps): ... this.
17193 (linux_resume_one_process): Rename to ...
17194 (linux_resume_one_lwp): ... this. Adjust.
17195 (linux_set_resume_request, linux_continue_one_thread)
17196 (linux_queue_one_thread, resume_status_pending_p)
17197 (usr_store_inferior_registers, regsets_store_inferior_registers)
17198 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
17199 Adjust.
17200 * linux-low.h (get_process): Rename to ...
17201 (get_lwp): ... this. Adjust.
17202 (get_thread_process): Rename to ...
17203 (get_thread_lwp): ... this. Adjust.
17204 (get_process_thread): Rename to ...
17205 (get_lwp_thread): ... this. Adjust.
17206 (struct process_info): Rename to ...
17207 (struct lwp_info): ... this.
17208 (all_processes): Rename to ...
17209 (all_lwps): ... this.
17210 * proc-service.c (ps_lgetregs): Adjust.
17211 * thread-db.c (thread_db_create_event, find_one_thread)
17212 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
17213
17214 2009-03-14 Pedro Alves <pedro@codesourcery.com>
17215
17216 * server.c (handle_query): Handle "qAttached".
17217
17218 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
17219
17220 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
17221 GPLv3, update license URL.
17222
17223 2009-03-01 Doug Evans <dje@google.com>
17224
17225 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
17226 (server_h): Add gdb_signals.h.
17227 (signals.o): Update.
17228 * server.h (target_signal_from_host,target_signal_to_host_p)
17229 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
17230
17231 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
17232
17233 * remote-utils.c (getpkt): Also generate remote-debug
17234 information if noack_mode is set.
17235
17236 2009-02-06 Pedro Alves <pedro@codesourcery.com>
17237
17238 * server.c (handle_query): Report qXfer:siginfo:read and
17239 qXfer:siginfo:write as supported and handle them.
17240 * target.h (struct target_ops) <qxfer_siginfo>: New field.
17241 * linux-low.c (linux_xfer_siginfo): New.
17242 (linux_target_ops): Set it.
17243
17244 2009-01-26 Pedro Alves <pedro@codesourcery.com>
17245
17246 * server.c (gdbserver_usage): Mention --remote-debug.
17247 (main): Accept '--remote-debug' switch.
17248
17249 2009-01-18 Doug Evans <dje@google.com>
17250
17251 * regcache.c (new_register_cache): No need to check result of xcalloc.
17252 * server.c (handle_search_memory): Back out calls to xmalloc,
17253 result is checked and error is returned to user upon failure.
17254 (handle_query): Ditto. Add more checks for result of malloc.
17255 (handle_v_cont): Check result of malloc, report error back to
17256 user upon failure.
17257 (handle_v_run): Ditto. Call freeargv.
17258 * server.h (freeargv): Declare.
17259 * utils.c (freeargv): New fn.
17260
17261 2009-01-15 Doug Evans <dje@google.com>
17262
17263 * gdbreplay.c (perror_with_name): Make arg const char *.
17264 * server.h (target_signal_to_name): Make return type const char *.
17265 * thread-db.c (thread_db_err_str): Make return type const char *.
17266 * utils.c (perror_with_name): Make arg const char *.
17267
17268 2009-01-14 Pedro Alves <pedro@codesourcery.com>
17269
17270 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
17271 when handling a EXIT_PROCESS_DEBUG_EVENT.
17272
17273 2009-01-06 Joel Brobecker <brobecker@adacore.com>
17274
17275 * gdbreplay.c (gdbreplay_version): Update copyright year.
17276 * server.c (gdbserver_version): Likewise.
17277
17278 2009-01-05 Doug Evans <dje@google.com>
17279
17280 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
17281 (handle_extended_wait): Improve comment.
17282
17283 2008-12-13 Doug Evans <dje@google.com>
17284
17285 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
17286 * server.h (ATTR_MALLOC): New macro.
17287 (xmalloc,xcalloc,xstrdup): Declare.
17288 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
17289 * inferiors.c: Ditto.
17290 * linux-low.c: Ditto.
17291 * mem-break.c: Ditto.
17292 * regcache.c: Ditto.
17293 * remote-utils.c: Ditto.
17294 * server.c: Ditto.
17295 * target.c: Ditto.
17296 * win32-low.c: Ditto.
17297
17298 2008-12-12 Doug Evans <dje@google.com>
17299
17300 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
17301 in debugging printf.
17302
17303 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
17304
17305 2008-12-09 Doug Evans <dje@google.com>
17306
17307 * linux-low.h (struct process_info): Delete member tid, unused.
17308 * thread-db.c (find_one_thread): Update.
17309 (maybe_attach_thread): Update.
17310
17311 2008-12-02 Pedro Alves <pedro@codesourcery.com>
17312
17313 * target.h (struct target_ops): Add qxfer_osdata member.
17314 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
17315 and dirent.h.
17316 (linux_qxfer_osdata): New functions.
17317 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
17318 callback.
17319 * server.c (handle_query): Handle "qXfer:osdata:read:".
17320 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
17321 (buffer_xml_printf): New functions.
17322 * server.h (struct buffer): New.
17323 (buffer_grow_str, buffer_grow_str0): New macros.
17324 (buffer_grow, buffer_free, buffer_init, buffer_finish)
17325 (buffer_xml_printf): Declare.
17326
17327 2008-11-24 Doug Evans <dje@google.com>
17328
17329 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
17330
17331 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
17332
17333 * server.c (handle_v_run): Always use the supplied argument list.
17334
17335 2008-11-19 Bob Wilson <bob.wilson@acm.org>
17336
17337 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
17338 (xtensa_regmap_table): Add entry for scompare1.
17339
17340 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
17341
17342 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
17343 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
17344 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
17345 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
17346 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
17347 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
17348 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
17349 XML target descriptions.
17350 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
17351 when inferior is running on an ISA 2.05 or later processor. Add
17352 special case to return offset for full 64-bit slot of FPSCR when
17353 in 32-bits.
17354
17355 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
17356
17357 * Makefile.in (SFILES, clean): Added sparc64 files.
17358 (reg-sparc64.o, reg-sparc64.c): New.
17359 * configure.srv (sparc*-*-linux*): New configuration.
17360 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
17361 syscall arguments for SPARC.
17362 (regsets_store_inferior_registers): Likewise.
17363 * linux-sparc-low.c: New file.
17364
17365 2008-10-21 Doug Evans <dje@google.com>
17366
17367 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
17368 (READLINE_DIR,READLINE_DEP): Delete.
17369 (INTERNAL_CFLAGS): Update.
17370 (LINTFLAGS): Update.
17371
17372 2008-10-10 Pedro Alves <pedro@codesourcery.com>
17373
17374 * server.c (handle_v_run): If GDB didn't specify an argv, use the
17375 whole argv from the last run, not just argv[0].
17376
17377 2008-09-08 Pedro Alves <pedro@codesourcery.com>
17378
17379 * regcache.c (new_register_cache): Return NULL if the register
17380 cache size isn't known yet.
17381 (free_register_cache): Avoid dereferencing a NULL regcache.
17382
17383 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
17384
17385 * configure.srv: Merge MIPS and MIPS64.
17386
17387 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
17388
17389 * Makefile.in (uninstall): Apply $(EXEEXT) too.
17390
17391 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
17392
17393 * Makefile.in: Add required vsx dependencies.
17394
17395 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
17396 Declare init_registers_powerpc_vsx32l.
17397 Declare init_registers_powerpc_vsx64l.
17398 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
17399 (ppc_arch_setup): Check for VSX in hwcap.
17400 (ppc_fill_vsxregset): New function.
17401 (ppc_store_vsxregset): New function.
17402 Add new VSX entry in regset_info target_regsets.
17403
17404 * configure.srv: Add new VSX dependencies.
17405
17406 2008-08-12 Pedro Alves <pedro@codesourcery.com>
17407
17408 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
17409 (remote_open): Set or clear transport_is_reliable.
17410 (putpkt_binary): Don't expect acks in noack mode.
17411 (getpkt): Don't send ack/nac in noack mode.
17412 * server.c (handle_general_set): Handle QStartNoAckMode.
17413 (handle_query): If connected by tcp pass QStartNoAckMode+ in
17414 qSupported.
17415 (main): Reset noack_mode on every connection.
17416 * server.h (noack_mode): Declare.
17417
17418 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
17419
17420 * Makefile.in (GDBREPLAY_OBS): New variable.
17421 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
17422
17423 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
17424 Daniel Jacobowitz <dan@codesourcery.com>
17425
17426 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
17427 (usr_store_inferior_registers): Likewise.
17428 (regsets_store_inferior_registers): Likewise.
17429
17430 2008-07-31 Rolf Jansen <rj@surtec.com>
17431 Pedro Alves <pedro@codesourcery.com>
17432
17433 * configure.ac: Check for memmem declaration.
17434 * server.c [HAVE_MALLOC_H]: Include malloc.h.
17435 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
17436 (disable_packet_qfThreadInfo): Unconditionally compile.
17437 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
17438 * configure, config.in: Regenerate.
17439
17440 2008-07-28 Doug Kwan <dougkwan@google.com>
17441
17442 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
17443 (linux_write_memory): Remove declaration of errno.
17444
17445 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
17446
17447 * linux-low.c (handle_extended_wait): Do not use "status"
17448 variable uninitialized.
17449
17450 2008-07-07 Pedro Alves <pedro@codesourcery.com>
17451
17452 * server.c (handle_v_attach): Inhibit reporting dll changes.
17453
17454 2008-06-27 Pedro Alves <pedro@codesourcery.com>
17455
17456 * remote-utils.c (prepare_resume_reply): If requested, don't
17457 output "thread:TID" in the T stop reply.
17458
17459 * server.c (disable_packet_vCont, disable_packet_Tthread)
17460 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
17461 (handle_query): If requested, disable support for qC, qfThreadInfo
17462 and qsThreadInfo.
17463 (handle_v_requests): If requested, disable support for vCont.
17464 (gdbserver_show_disableable): New.
17465 (main): Handle --disable-packet and --disable-packet=LIST.
17466
17467 * server.h (disable_packet_vCont, disable_packet_Tthread)
17468 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
17469
17470 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
17471
17472 * server.c (gdbserver_usage): Mention --version.
17473
17474 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
17475
17476 * Makefile.in (gdbreplay.o): New rule.
17477
17478 2008-06-06 Joseph Myers <joseph@codesourcery.com>
17479
17480 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
17481 message, not gdbserver.
17482
17483 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
17484 Nathan Sidwell <nathan@codesourcery.com>
17485 Joseph Myers <joseph@codesourcery.com>
17486
17487 * acinclude.m4: Include ../../config/acx.m4.
17488 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
17489 * configure, config.in: Regenerate.
17490 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
17491 * server.c (gdbserver_version): Print PKGVERSION.
17492 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
17493 (main): Adjust gdbserver_usage calls.
17494 * gdbreplay.c (version, host_name): Add declarations.
17495 (gdbreplay_version, gdbreplay_usage): New.
17496 (main): Accept --version and --help options.
17497
17498 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
17499
17500 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
17501 (arm_breakpoint_at): Handle Thumb.
17502 (the_low_target): Add comment.
17503
17504 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
17505
17506 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
17507
17508 2008-05-09 Doug Evans <dje@google.com>
17509
17510 * server.h (decode_search_memory_packet): Declare.
17511 * remote-utils.c (decode_search_memory_packet): New fn.
17512 * server.c (handle_search_memory_1): New fn.
17513 (handle_search_memory): New fn.
17514 (handle_query): Process qSearch:memory packets.
17515
17516 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
17517
17518 * regcache.c (registers_length): Remove.
17519 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
17520 full register packet.
17521 * regcache.h (registers_length): Remove prototype.
17522 * server.h (PBUFSIZ): Define to 16384.
17523
17524 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
17525
17526 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
17527 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
17528 powerpc-64l.o, and powerpc-altivec64l.o.
17529 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
17530 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
17531 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
17532 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
17533 rs6000/power-linux.xml, and rs6000/power64-linux.xml
17534 to srv_xmlfiles.
17535
17536 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
17537 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
17538 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
17539 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
17540 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
17541 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
17542 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
17543 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
17544 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
17545 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
17546 (clean): Update.
17547
17548 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
17549 (init_registers_powerpc_32l): ... this new prototype.
17550 (init_registers_powerpc_32): Remove, replace by ...
17551 (init_registers_powerpc_altivec32l): ... this new prototype.
17552 (init_registers_powerpc_e500): Remove, replace by ...
17553 (init_registers_powerpc_e500l): ... this new prototype.
17554 (init_registers_ppc64): Remove, replace by ...
17555 (init_registers_powerpc_64l): ... this new prototype.
17556 (init_registers_powerpc_64): Remove, replace by ...
17557 (init_registers_powerpc_altivec64l): ... this new prototype.
17558 (ppc_num_regs): Set to 73.
17559 (PT_ORIG_R3, PT_TRAP): Define if necessary.
17560 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
17561 (ppc_cannot_store_register): Handle orig_r3 and trap.
17562 (ppc_arch_setup): Update init_registers_... calls.
17563 (ppc_fill_gregset): Handle orig_r3 and trap.
17564
17565 * inferiors.c (clear_inferiors): Reset current_inferior.
17566
17567 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
17568
17569 * acinclude.m4: Add override.m4.
17570 * configure: Regenerate.
17571
17572 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
17573
17574 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
17575 initial call to init_register_ppc64.
17576
17577 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
17578
17579 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
17580 single powerpc*-*-linux* case.
17581 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
17582
17583 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
17584
17585 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
17586 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
17587 from reg_xmlfiles.
17588 * linux-ppc-low.c: Include <elf.h>.
17589 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
17590 (ppc_hwcap): New global variable.
17591 (ppc_regmap): Remove __SPE__ #ifdef sections.
17592 (ppc_regmap_e500): New global variable.
17593 (ppc_cannot_store_register): Update __SPE__ special case.
17594 (ppc_get_hwcap): New function.
17595 (ppc_arch_setup): Use it to determine whether inferior supports
17596 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
17597 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
17598 Do not access registers if target does not support AltiVec.
17599 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
17600 Do not access registers if target does not support SPE.
17601 (target_regsets): Unconditionally include AltiVec and SPE regsets.
17602
17603 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
17604
17605 * linux-low.c (disabled_regsets, num_regsets): New.
17606 (use_regsets_p): Delete.
17607 (linux_wait_for_process): Clear disabled_regsets.
17608 (regsets_fetch_inferior_registers): Check and set it.
17609 (regsets_store_inferior_registers): Likewise.
17610 (linux_fetch_registers, linux_store_registers): Do not use
17611 use_regsets_p.
17612 (initialize_low): Allocate disabled_regsets.
17613
17614 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
17615
17616 * Makefile.in (LIBOBJS): New.
17617 (OBS): Use LIBOBJS.
17618 (memmem.o): New rule.
17619 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
17620 * configure: Regenerated.
17621
17622 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
17623
17624 * server.c (handle_query): Never return "unsupported" for
17625 qXfer:features:read queries.
17626
17627 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
17628
17629 * server.c (get_features_xml): Fix inverted condition.
17630 (handle_query): Always support qXfer:feature:read.
17631
17632 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
17633
17634 * server.c (wrapper_argv): New.
17635 (start_inferior): Handle wrapper_argv. If set, expect an extra
17636 trap.
17637 (gdbserver_usage): Document --wrapper.
17638 (main): Parse --wrapper.
17639
17640 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17641
17642 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
17643 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
17644 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
17645 (ppc_set_pc): Likewise.
17646 (ppc_arch_setup): New function.
17647 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
17648 of collect_register.
17649 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
17650
17651 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17652
17653 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
17654 instead of linux-ppc64-low.o.
17655 * linux-ppc64-low.c: Remove file.
17656 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
17657 (linux-ppc64-low.o): Remove rule.
17658
17659 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
17660 (init_registers_powerpc_64): Likewise.
17661 (ppc_regmap): Conditionally define depending on __powerpc64__.
17662 (ppc_cannot_store_register): Do not special-case "fpscr" when
17663 compiled on __powerpc64__.
17664 (ppc_collect_ptrace_register): New function.
17665 (ppc_supply_ptrace_register): New function.
17666 (ppc_breakpoint): Change type to "unsigned int".
17667 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
17668 (the_low_target): Conditionally provide initializers for the
17669 arch_setup member depending on __powerpc64__. Install
17670 collect_ptrace_register and supply_ptrace_register members.
17671
17672 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17673
17674 * regcache.h (gdbserver_xmltarget): Add extern declaration.
17675 * server.c (gdbserver_xmltarget): Define.
17676 (get_features_xml): Use it to replace "target.xml" and arch_string.
17677
17678 * configure.srv: Remove srv_xmltarget. Add XML files that were
17679 mentioned there to srv_xmlfiles instead. Remove conditional tests
17680 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
17681 srv_xmlfiles and srv_regobj to include all possible choices.
17682 * configure.ac (srv_xmltarget): Remove.
17683 (srv_xmlfiles): Do not add "target.xml".
17684 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
17685 checks for supplementary target information.
17686 * configure: Regenerate.
17687 * Makefile.in (XML_TARGET): Remove.
17688 (target.xml): Remove rule.
17689 (clean): Do not clean up target.xml.
17690 (.PRECIOUS): Do not mention target.xml.
17691
17692 * target.h (struct target_ops): Remove arch_string member.
17693 * linux-low.c (linux_arch_string): Remove.
17694 (linux_target_ops): Remove arch_string initializer.
17695 * linux-low.h (struct linux_target_ops): Remove arch_string member.
17696 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
17697 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
17698 * spu-low.c (spu_arch_string): Remove.
17699 (spu_target_ops): Remove arch_string initializer.
17700 * win32-low.c (win32_arch_string): Remove.
17701 (win32_target_ops): Remove arch_string initializer.
17702 * win32-low.h (struct win32_target_ops): Remove arch_string member.
17703 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
17704 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
17705
17706 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17707
17708 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
17709 by collect_ptrace_register and supply_ptrace_register hooks.
17710 * linux-low.c (fetch_register): Use supply_ptrace_register callback
17711 instead of checking for the_low_target.left_pad_xfer.
17712 (usr_store_inferior_registers): Use collect_ptrace_register callback
17713 instead of checking for the_low_target.left_pad_xfer.
17714
17715 * linux-s390-low.c (s390_collect_ptrace_register): New function.
17716 (s390_supply_ptrace_register): Likewise.
17717 (s390_fill_gregset): Call s390_collect_ptrace_register.
17718 (the_low_target): Update.
17719
17720 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
17721 (ppc_supply_ptrace_register): Likewise.
17722 (the_low_target): Update.
17723
17724 * linux-i386-low.c (the_low_target): Update.
17725 * linux-x86-64-low.c (the_low_target): Update.
17726
17727 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17728
17729 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
17730 reg-s390.o and reg-s390x.o.
17731
17732 * linux-low.c (new_inferior): New global variable.
17733 (linux_create_inferior, linux_attach): Set it.
17734 (linux_wait_for_process): Call the_low_target.arch_setup after the
17735 target has stopped for the first time.
17736 (initialize_low): Do not call the_low_target.arch_setup.
17737
17738 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
17739 (s390_set_pc): Likewise.
17740 (s390_arch_setup): New function.
17741 (the_low_target): Use s390_arch_setup as arch_setup routine.
17742
17743 * regcache.c (realloc_register_cache): New function.
17744 (set_register_cache): Call it for each existing regcache.
17745
17746 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17747
17748 * server.h (init_registers): Remove prototype.
17749
17750 * linux-low.h (struct linux_target_ops): Add arch_setup field.
17751 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
17752 instead of init_registers ().
17753 * linux-arm-low.c (init_registers_arm): Add prototype.
17754 (init_registers_arm_with_iwmmxt): Likewise.
17755 (the_low_target): Add initializer for arch_setup field.
17756 * linux-cris-low.c (init_registers_cris): Add prototype.
17757 (the_low_target): Add initializer for arch_setup field.
17758 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
17759 (the_low_target): Add initializer for arch_setup field.
17760 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
17761 (the_low_target): Add initializer for arch_setup field.
17762 * linux-ia64-low.c (init_registers_ia64): Add prototype.
17763 (the_low_target): Add initializer for arch_setup field.
17764 * linux-m32r-low.c (init_registers_m32r): Add prototype.
17765 (the_low_target): Add initializer for arch_setup field.
17766 * linux-m68k-low.c (init_registers_m68k): Add prototype.
17767 (the_low_target): Add initializer for arch_setup field.
17768 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
17769 (init_registers_mips64_linux): Likewise.
17770 (the_low_target): Add initializer for arch_setup field.
17771 * linux-ppc-low.c (init_registers_ppc): Add prototype.
17772 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
17773 (the_low_target): Add initializer for arch_setup field.
17774 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
17775 (init_registers_powerpc_64): Likewise.
17776 (the_low_target): Add initializer for arch_setup field.
17777 * linux-s390-low.c (init_registers_s390): Add prototype.
17778 (init_registers_s390x): Likewise.
17779 (the_low_target): Add initializer for arch_setup field.
17780 * linux-sh-low.c (init_registers_sh): Add prototype.
17781 (the_low_target): Add initializer for arch_setup field.
17782 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
17783 (the_low_target): Add initializer for arch_setup field.
17784 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
17785 (the_low_target): Add initializer for arch_setup field.
17786
17787 * win32-low.h (struct win32_target_ops): Add arch_setup field.
17788 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
17789 instead of init_registers ().
17790 * win32-arm-low.c (init_registers_arm): Add prototype.
17791 (the_low_target): Add initializer for arch_setup field.
17792 * win32-i386-low.c (init_registers_i386): Add prototype.
17793 (the_low_target): Add initializer for arch_setup field.
17794
17795 * spu-low.c (init_registers_spu): Add prototype.
17796 (initialize_low): Call initialie_registers_spu () instead of
17797 initialize_registers ().
17798
17799 2008-02-19 Pedro Alves <pedro@codesourcery.com>
17800
17801 * server.c (handle_v_requests): When handling the vRun and vAttach
17802 packets, if already debugging a process, don't kill it. Return an
17803 error instead.
17804
17805 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
17806
17807 * server.c (handle_query): Correct length check.
17808
17809 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
17810
17811 * win32-low.c (do_initial_child_stuff): Add process handle
17812 parameter. Set current_process_handle and current_process_id from the
17813 parameters. Clear globals.
17814 (win32_create_inferior): Don't set current_process_handle and
17815 current_process_id here. Instead pass them on the call to
17816 do_initial_child_stuff.
17817 (win32_attach): Likewise.
17818 (win32_clear_inferiors): New.
17819 (win32_kill): Don't close the current process handle or the
17820 current thread handle here. Instead call win32_clear_inferiors.
17821 (win32_detach): Don't open a new handle to the process. Call
17822 win32_clear_inferiors.
17823 (win32_join): Don't rely on current_process_handle; open a new
17824 handle using the process id.
17825 (win32_wait): Call win32_clear_inferiors when the inferior process
17826 has exited.
17827
17828 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
17829
17830 * server.c (monitor_show_help): Add "exit".
17831
17832 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
17833
17834 * Makefile.in (SFILES): Add linux-xtensa-low.c.
17835 (clean): Add reg-xtensa.c.
17836 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
17837 * configure.srv (xtensa*-*-linux*) New target.
17838 * linux-xtensa-low.c: New.
17839 * xtensa-xtregs.c: New.
17840
17841 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
17842
17843 * hostio.c: Don't include errno.h.
17844 (errno_to_fileio_errno): Move to hostio-errno.
17845 * hostio.c: (hostio_error): Remove the error parameter. Defer the
17846 error number outputting to the target->hostio_last_error callback.
17847 (hostio_packet_error): Use FILEIO_EINVAL directly.
17848 (handle_open, handle_pread, hostio_error, handle_unlink): Update
17849 calls to hostio_error.
17850 * hostio-errno.c: New.
17851 * server.h (hostio_last_error_from_errno): Declare.
17852 * target.h (target_ops): Add hostio_last_error member.
17853 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
17854 as hostio_last_error handler.
17855 * spu-low.c (spu_target_ops): Likewise.
17856 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
17857 (wince_hostio_last_error): New functions.
17858 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
17859 as hostio_last_error handler.
17860 (win32_target_ops) [!_WIN32_WCE]: Register
17861 hostio_last_error_from_errno as hostio_last_error handler.
17862 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
17863 (hostio-errno.o): New rule.
17864 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
17865 * configure.srv (srv_hostio_err_objs): New variable. Default to
17866 hostio-errno.o.
17867 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
17868 * configure: Regenerate.
17869
17870 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17871
17872 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
17873 (linux_kill, linux_detach): Clean up the process list.
17874 * remote-utils.c (remote_open): Improve port number parsing.
17875 (putpkt_binary, input_interrupt): Only send interrupts if the target
17876 is running.
17877 * server.c (extended_protocol): Make static.
17878 (attached): Define earlier.
17879 (exit_requested, response_needed, program_argv): New variables.
17880 (target_running): New.
17881 (start_inferior): Clear attached here.
17882 (attach_inferior): Set attached here.
17883 (require_running): Define.
17884 (handle_query): Use require_running and target_running. Implement
17885 "monitor exit".
17886 (handle_v_attach, handle_v_run): New.
17887 (handle_v_requests): Use require_running. Handle vAttach and vRun.
17888 (gdbserver_usage): Update.
17889 (main): Redo argument parsing. Handle --debug and --multi. Handle
17890 --attach along with other options or after the port. Save
17891 program_argv. Support no initial program. Resynchronize
17892 communication with GDB after an error. Handle "monitor exit".
17893 Use require_running and target_running. Always allow the extended
17894 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
17895 restart in extended mode.
17896 * README: Refer to the GDB manual. Update --attach usage.
17897
17898 2007-12-20 Andreas Schwab <schwab@suse.de>
17899
17900 * linux-low.c (STACK_SIZE): Define.
17901 (linux_tracefork_child): Use it. Use __clone2 on ia64.
17902 (linux_test_for_tracefork): Likewise.
17903
17904 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
17905
17906 * linux-low.c (linux_wait_for_event): Update messages. Do not
17907 reinsert auto-delete breakpoints.
17908 * mem-break.c (struct breakpoint): Change return type of handler to
17909 int.
17910 (set_breakpoint_at): Update handler type.
17911 (reinsert_breakpoint_handler): Return 1 instead of calling
17912 delete_breakpoint.
17913 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
17914 setting a new one.
17915 (check_breakpoints): Delete auto-delete breakpoints and return 2.
17916 * mem-break.h (set_breakpoint_at): Update handler type.
17917 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
17918 * win32-low.c (auto_delete_breakpoint): New.
17919 (get_child_debug_event): Use it.
17920
17921 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
17922
17923 * configure.ac: Check for pread and pwrite.
17924 * hostio.c (handle_pread): Fall back to lseek and read.
17925 (handle_pwrite): Fall back to lseek and write.
17926 * config.in, configure: Regenerated.
17927
17928 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
17929
17930 * server.c (myresume): Add own_buf argument.
17931 (main): Update calls.
17932
17933 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
17934
17935 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
17936 * remote-utils.c (remote_open): Do not call disable_async_io.
17937 (block_async_io): Delete.
17938 (unblock_async_io): Make static.
17939 (initialize_async_io): New.
17940 * server.c (handle_v_cont): Handle async I/O here.
17941 (myresume): Likewise. Move other common resume tasks here...
17942 (main): ... from here. Call initialize_async_io. Disable async
17943 I/O before the main loop.
17944 * server.h (initialize_async_io): Declare.
17945 (block_async_io, unblock_async_io): Delete prototypes.
17946 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
17947
17948 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
17949
17950 * remote-utils.c (readchar): Allow binary data in received messages.
17951
17952 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17953
17954 * win32-low.c (attaching): New global.
17955 (win32_create_inferior): Clear the `attaching' global.
17956 (win32_attach): Set the `attaching' global.
17957 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
17958 attaching. Only set a breakpoint at the entry point if not
17959 attaching.
17960
17961 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17962
17963 * server.c (main): Don't report dll events on the initial
17964 connection on attaches.
17965
17966 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17967
17968 * server.c (main): Relax numerical bases supported for the pid of
17969 the --attach command line argument.
17970
17971 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17972
17973 * win32-low.c (win32_attach): Call OpenProcess before
17974 DebugActiveProcess, not after. Add last error output to error
17975 call.
17976
17977 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17978
17979 * win32-low.c (win32_get_thread_context)
17980 (win32_set_thread_context): New functions.
17981 (thread_rec): Use win32_get_thread_context.
17982 (continue_one_thread, win32_resume): Use win32_set_thread_context.
17983 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
17984 field.
17985
17986 2007-12-03 Leo Zayas
17987 Pedro Alves <pedro_alves@portugalmail.pt>
17988
17989 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
17990 global variables.
17991 (child_add_thread): Minor cleanup.
17992 (child_continue): Resume artificially suspended threads before
17993 calling ContinueDebugEvent.
17994 (suspend_one_thread): New.
17995 (fake_breakpoint_event): New.
17996 (get_child_debug_event): Change return type to int. Check here if
17997 gdb sent an interrupt request. If a soft interrupt was requested,
17998 fake a breakpoint event. Return 0 if there is no event to handle,
17999 and 1 otherwise.
18000 (win32_wait): Don't check here if gdb sent an interrupt request.
18001 Ensure there is a valid event to handle.
18002 (win32_request_interrupt): Add soft interruption method as last
18003 resort.
18004
18005 2007-12-03 Leo Zayas
18006 Pedro Alves <pedro_alves@portugalmail.pt>
18007
18008 * win32-low.h (win32_thread_info): Add descriptions to the
18009 structure members. Replace `suspend_count' counter by a
18010 `suspended' flag.
18011 * win32-low.c (thread_rec): Update condition of when to get the
18012 context from the inferior. Rely on ContextFlags being set if it
18013 has already been retrieved. Only suspend the inferior thread if
18014 we haven't already. Warn if that fails.
18015 (continue_one_thread): s/suspend_count/suspended/. Only call
18016 ResumeThread once. Warn if that fails.
18017
18018 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
18019
18020 * win32-low.c (win32_wait): Don't read from the inferior when it
18021 has already exited.
18022
18023 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
18024
18025 * Makefile.in (win32_low_h): New variable.
18026 (win32-low.o): Add dependency on $(win32_low_h).
18027 (win32-arm-low.o, win32-i386-low.o): New rules.
18028
18029 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
18030
18031 * hostio.c: Correct copyright year.
18032
18033 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
18034
18035 * Makefile.in (OBS): Add hostio.o.
18036 (hostio.o): New rule.
18037 * server.h (handle_vFile): Declare.
18038 * hostio.c: New file.
18039 * server.c (handle_v_requests): Take packet_len and new_packet_len
18040 for binary packets. Call handle_vFile.
18041 (main): Update call to handle_v_requests.
18042
18043 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
18044
18045 * linux-low.c: Include <sched.h>.
18046
18047 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
18048
18049 * linux-low.c (linux_tracefork_grandchild): New.
18050 (linux_tracefork_child): Use clone.
18051 (linux_test_for_tracefork): Use clone; allocate and free a stack.
18052
18053 2007-10-31 Joel Brobecker <brobecker@adacore.com>
18054
18055 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
18056
18057 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
18058
18059 * linux-low.c (handle_extended_wait): Handle unexpected signals.
18060
18061 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
18062
18063 * inferiors.c (change_inferior_id): Delete.
18064 (add_pid_to_list, pull_pid_from_list): New.
18065 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
18066 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
18067 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
18068 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
18069 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
18070 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
18071 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
18072 (using_threads): Always set to 1.
18073 (handle_extended_wait): New.
18074 (add_process): Do not set TID.
18075 (linux_create_inferior): Set must_set_ptrace_flags.
18076 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
18077 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
18078 (linux_thread_alive): Rename TID argument to LWPID.
18079 (linux_wait_for_process): Handle unknown processes. Do not use TID.
18080 (linux_wait_for_event): Do not use TID or check using_threads. Update
18081 call to dead_thread_notify. Call handle_extended_wait.
18082 (linux_create_inferior): Use PTRACE_SETOPTIONS.
18083 (send_sigstop): Delete sigstop_sent.
18084 (wait_for_sigstop): Avoid TID.
18085 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
18086 (linux_test_for_tracefork): New.
18087 (linux_lookup_signals): Use thread_db_active and
18088 linux_supports_tracefork_flag.
18089 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
18090 * linux-low.h (get_process_thread): Avoid TID.
18091 (struct process_ifo): Move thread_known and tid to the end. Remove
18092 sigstop_sent.
18093 (linux_attach_lwp, thread_db_init): Update prototypes.
18094 * server.h (change_inferior_id): Delete prototype.
18095 (add_pid_to_list, pull_pid_from_list): New prototypes.
18096 * thread-db.c (thread_db_use_events): New.
18097 (find_first_thread): Rename to...
18098 (find_one_thread): ...this. Update callers and messages. Do not
18099 call fatal. Check thread_db_use_events. Do not call
18100 change_inferior_id or new_thread_notify.
18101 (maybe_attach_thread): Update. Do not call new_thread_notify.
18102 (thread_db_init): Set thread_db_use_events. Check use_events.
18103 * utils.c (fatal, warning): Correct message prefix.
18104
18105 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
18106
18107 * Makefile.in (clean): Remove new files.
18108 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
18109 (powerpc-64.o, powerpc-64.c): New rules.
18110 * configure.srv: Use alternate register sets for powerpc64-*-linux*
18111 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
18112 with SPE.
18113 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
18114 SPE targets.
18115 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
18116 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
18117 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
18118 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
18119 (target_regsets): Add AltiVec and SPE register sets.
18120 * configure.ac: Check for AltiVec and SPE.
18121 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
18122 (ppc_fill_vrregset, ppc_store_vrregset): New.
18123 (target_regsets): Add AltiVec register set.
18124 * configure: Regenerated.
18125
18126 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
18127
18128 * linux-low.c (O_LARGEFILE): Define.
18129 (linux_read_memory): Use /proc/PID/mem.
18130 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
18131 * configure, config.in: Regenerated.
18132
18133 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
18134
18135 * linux-low.c (linux_wait_for_event): Do not pass signals while
18136 single-stepping.
18137
18138 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
18139
18140 * win32-low.c (create_process): New.
18141 (win32_create_inferior): Use create_process instead of
18142 CreateProcess. If create_process failed retry appending an ".exe"
18143 suffix. Store the GetLastError result immediatelly after
18144 create_process calls and use it on the call to error.
18145
18146 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
18147
18148 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
18149
18150 2007-08-23 Joel Brobecker <brobecker@adacore.com>
18151
18152 * configure.ac: Switch license to GPLv3.
18153
18154 2007-08-01 Michael Snyder <msnyder@access-company.com>
18155
18156 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
18157
18158 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
18159
18160 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
18161 typedef.
18162 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
18163 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
18164 CloseToolhelp32Snapshot.
18165 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
18166 CloseToolhelp32Snapshot.
18167
18168 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
18169
18170 * server.c (main): Check for inferior exit before main loop.
18171
18172 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
18173
18174 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
18175 instead of on tmp_desc.
18176
18177 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
18178 Daniel Jacobowitz <dan@codesourcery.com>
18179
18180 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
18181 (add_thread): Minor cleanups.
18182 (clear_inferiors): Move lower in the file. Clear the DLL
18183 list.
18184 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
18185 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
18186 (xml_escape_text): New.
18187 * server.c (handle_query): Handle qXfer:libraries:read. Report it
18188 for qSupported.
18189 (handle_v_cont): Report errors.
18190 (gdbserver_version): Update.
18191 (main): Correct size of own_buf. Do not report initial DLL events.
18192 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
18193 (unloaded_dll, xml_escape_text): New.
18194 * win32-low.c (enum target_waitkind): Update comments.
18195 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
18196 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
18197 (win32_EnumProcessModules, win32_GetModuleInformation)
18198 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
18199 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
18200 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
18201 (win32_Module32First, win32_Module32Next, load_toolhelp)
18202 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
18203 (get_child_debug_event): Handle DLL events.
18204 (win32_wait): Likewise.
18205
18206 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
18207
18208 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
18209 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
18210
18211 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
18212
18213 * win32-low.c (handle_output_debug_string): Ignore event if not
18214 waiting.
18215
18216 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
18217
18218 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
18219
18220 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
18221
18222 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
18223
18224 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
18225
18226 * inferiors.c (change_inferior_id): Add comment.
18227 * linux-low.c (check_removed_breakpoint): Add an early
18228 prototype. Improve debug output.
18229 (linux_attach): Doc update.
18230 (linux_detach_one_process, linux_detach): Clean up before releasing
18231 each process.
18232 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
18233 * linux-low.h (struct process_info): Doc improvement.
18234 * mem-break.c (delete_all_breakpoints): New.
18235 * mem-break.h (delete_all_breakpoints): New prototype.
18236 * thread-db.c (find_first_thread): New.
18237 (thread_db_create_event): Call it instead of
18238 thread_db_find_new_threads. Clean up unused variables.
18239 (maybe_attach_thread): Remove first thread handling.
18240 (thread_db_find_new_threads): Use find_first_thread.
18241 (thread_db_get_tls_address): Likewise.
18242
18243 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
18244
18245 * thread-db.c (thread_db_find_new_threads): Add prototype.
18246 (thread_db_create_event): Check for the main thread before adding
18247 a new thread.
18248 (maybe_attach_thread): Only enable event reporting if TID == 0.
18249 (thread_db_get_tls_address): Check for new threads.
18250
18251 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
18252
18253 * linux-low.c (linux_create_inferior): Try execv before execvp.
18254 * spu-low.c (spu_create_inferior): Likewise.
18255
18256 2007-06-13 Mike Frysinger <vapier@gentoo.org>
18257
18258 * linux-low.c (linux_create_inferior): Change execv to execvp.
18259 * spu-low.c (spu_create_inferior): Likewies.
18260
18261 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
18262
18263 * Makefile.in (clean): Clean new files instead of deleted ones.
18264 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
18265 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
18266 rules.
18267 * configure.srv: Specify XML files and new regformats for MIPS and
18268 MIPS64 GNU/Linux.
18269 * linux-mips-low.c (mips_num_regs): Set to only used registers.
18270 (mips_regmap): Do not fetch $0. Remove unused registers. Add
18271 an entry for the restart register.
18272 (mips_cannot_fetch_register, mips_cannot_store_register)
18273 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
18274 register names to match the XML descriptions.
18275 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
18276 restart register instead of $0.
18277
18278 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
18279 Markus Deuling <deuling@de.ibm.com>
18280
18281 * remote-utils.c (decode_xfer_write): New function.
18282 * server.h (decode_xfer_write): Add prototype.
18283 * server.c (handle_query): Add PACKET_LEN argument. Support
18284 qXfer:spu:read and qXfer:spu:write packets.
18285 (main): Pass packet_len to handle_query.
18286 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
18287 * target.h (target_ops): Add qxfer_spu.
18288
18289 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
18290
18291 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
18292 accessing non-seekable spufs files.
18293
18294 2007-05-16 Markus Deuling <deuling@de.ibm.com>
18295
18296 * server.c (handle_query): Add reply for qC packet.
18297
18298 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18299 Leo Zayas <lerele@champenstudios@com>
18300
18301 * server.h (check_remote_input_interrupt_request): New function.
18302 * remote_utils.c (INVALID_DESCRIPTOR): New define.
18303 (remote_desc): Initialize with INVALID_DESCRIPTOR.
18304 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
18305 (check_remote_input_interrupt_request): New function.
18306 * server.h (check_remote_input_interrupt_request): Declare.
18307 * win32-low.c (winapi_DebugBreakProcess,
18308 winapi_GenerateConsoleCtrlEvent): New typedefs.
18309 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
18310 to 250 ms.
18311 (win32_wait): Check for remote interrupt request
18312 with check_remote_input_interrupt_request.
18313 (win32_request_interrupt): New function.
18314 (win32_target_op): Set request_interrupt to win32_request_interrupt.
18315
18316 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18317
18318 * win32-low.c (debug_registers_changed,
18319 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
18320 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
18321 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
18322 (thread_rec): Get context using the low target.
18323 (child_add_thread): Call thread_added on the low target,
18324 which does the same thing.
18325 (regptr): Delete.
18326 (do_initial_child_stuff): Remove debug registers references.
18327 Set context using the low target. Resume threads after
18328 setting the contexts.
18329 (child_continue): Remove dead variable. Remove debug
18330 registers references.
18331 (child_fetch_inferior_registers): Go through the low target.
18332 (do_child_store_inferior_registers): Remove.
18333 (child_store_inferior_registers): Go through the low target.
18334 (win32_resume): Remove debug registers references.
18335 Set context using the low target.
18336 (handle_exception): Change return type to void. Don't record
18337 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
18338 first chance exception.
18339 (get_child_debug_event): Change return type to void. Remove
18340 goto loop. Always return after waiting for debug event.
18341 (win32_wait): Convert to switch statement. Handle spurious
18342 events.
18343
18344 * win32-i386-low.c (debug_registers_changed,
18345 debug_registers_used): New.
18346 (initial_stuff): Rename to ...
18347 (i386_initial_stuff): ... this. Clear debug registers
18348 state variables.
18349 (store_debug_registers): Delete.
18350 (i386_get_thread_context): New.
18351 (load_debug_registers): Delete.
18352 (i386_set_thread_context): New.
18353 (i386_thread_added): New.
18354 (single_step): Rename to ...
18355 (i386_single_step): ... this.
18356 (do_fetch_inferior_registers): Rename to ...
18357 (i386_fetch_inferior_register): ... this.
18358 (i386_store_inferior_register): New.
18359 (the_low_target): Adapt to new interface.
18360
18361 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
18362 (arm_get_thread_context): New.
18363 (arm_set_thread_context): New.
18364 (regptr): New.
18365 (do_fetch_inferior_registers): Rename to ...
18366 (arm_fetch_inferior_register): ... this.
18367 (arm_store_inferior_register): New.
18368 (arm_wince_breakpoint): Reimplement as unsigned long.
18369 (arm_wince_breakpoint_len): Define.
18370 (the_low_target): Adapt to new interface.
18371
18372 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
18373 load_debug_registers. Add get_thread_context, set_thread_context,
18374 thread_added and store_inferior_register. Rename
18375 fetch_inferior_registers to fetch_inferior_register.
18376 (regptr): Remove declaration.
18377
18378 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18379
18380 * linux-low.c (linux_detach): Change return type to int. Return 0.
18381 * spu-low.c (spu_detach): Likewise.
18382
18383 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18384
18385 * target.h (target_ops): Change return type of detach to int.
18386 Add join.
18387 (join_inferior): New.
18388 * server.c (main): Don't skip detach support on mingw32.
18389 If the inferior doesn't support detaching return error.
18390 Call join_inferior instead of using waitpid.
18391 * linux-low.c (linux_join): New.
18392 (linux_target_op): Add linux_join.
18393 * spu-low.c (spu_join): New.
18394 (spu_target_ops): Add spu_join.
18395 * win32-low.c (win32_detach): Adapt to new interface.
18396 Reopen current_process_handle before detaching. Issue a child
18397 resume before detaching.
18398 (win32_join): New.
18399 (win32_target_op): Add win32_join.
18400
18401 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18402
18403 * win32-low.c (win32-attach): Fix return value.
18404 * target.h (target_ops): Describe ATTACH return values.
18405
18406 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18407
18408 * win32-low.c (GETPROCADDRESS): Define.
18409 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
18410 (winapi_DebugSetProcessKillOnExit): Likewise.
18411 (win32_create_inferior): Force usage of ansi CreateProcessA.
18412 (win32_attach): Use GETPROCADDRESS.
18413 (win32_detach): Likewise.
18414
18415 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18416
18417 * win32-low.c (win32_wait): Don't use WSTOPSIG.
18418
18419 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
18420
18421 * win32-low.c: Commit leftover changes from 2007-03-29.
18422
18423 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
18424
18425 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
18426 fields short instead of int. Add explicit padding.
18427 (i387_cache_to_fsave): Remove unnecessary casts.
18428 (i387_fsave_to_cache): Doc fix.
18429 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
18430
18431 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
18432
18433 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
18434 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
18435
18436 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
18437
18438 * configure.srv (arm*-*-mingw32ce*): Move near the other
18439 arm targets.
18440
18441 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
18442
18443 * configure.ac: Add errno checking.
18444 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
18445 sys/file.h and malloc.h.
18446 (AC_CHECK_DECLS): Add perror.
18447 (srv_mingwce): Handle.
18448 * configure.srv (i[34567]86-*-cygwin*): Add
18449 win32-i386-low.o to srv_tgtobj.
18450 (i[34567]86-*-mingw*): Likewise.
18451 (arm*-*-mingw32ce*): Add case.
18452 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
18453 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
18454 [__MINGW32CE__] (strerror): New function.
18455 [__MINGW32CE__] (errno): Define to GetLastError.
18456 [__MINGW32CE__] (COUNTOF): New macro.
18457 (remote_open): Remove extra close call.
18458 * mem-break.c (delete_breakpoint_at): New function.
18459 * mem-break.h (delete_breakpoint_at): Declare.
18460 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
18461 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
18462 [USE_WIN32API] (read, write): Add char* casts.
18463 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
18464 * server.h: Include wincecompat.h on Windows CE.
18465 [HAVE_ERRNO_H]: Check.
18466 (perror): Declare if not declared.
18467 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
18468 (perror_with_name): Remove errno declaration.
18469 * wincecompat.h: New.
18470 * wincecompat.c: New.
18471 * win32-low.h: New.
18472 * win32-arm-low.c: New.
18473 * win32-i386-low.c: New.
18474 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
18475 (OUTMSG2): Make it safe.
18476 (_T): New macro.
18477 (COUNTOF): New macro.
18478 (NUM_REGS): Get it from the low target.
18479 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
18480 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
18481 (thread_rec): Let low target handle debug registers.
18482 (child_add_thread): Likewise.
18483 (child_init_thread_list): Likewise.
18484 (continue_one_thread): Likewise.
18485 (regptr): New.
18486 (do_child_fetch_inferior_registers): Move to ...
18487 * win32-i386-low.c: ... here, and rename to ...
18488 (do_fetch_inferior_registers): ... this.
18489 * win32-low.c (child_fetch_inferior_registers):
18490 Go through the low target.
18491 (do_child_store_inferior_registers): Use regptr.
18492 (strwinerror): New function.
18493 (win32_create_inferior): Handle Windows CE.
18494 Use strwinerror instead of strerror on Windows error
18495 codes. Add program to the error output.
18496 Don't close the main thread handle on Windows CE.
18497 (win32_attach): Use coredll.dll on Windows CE.
18498 (win32_kill): Close current process and current
18499 thread handles.
18500 (win32_detach): Use coredll.dll on Windows CE.
18501 (win32_resume): Let low target handle debug registers, and
18502 step request.
18503 (handle_exception): Add/Remove initial breakpoint. Avoid
18504 non-existant WSTOPSIG on Windows CE.
18505 (win32_read_inferior_memory): Cast to remove warning.
18506 (win32_arch_string): Go through the low target.
18507 (initialize_low): Call set_breakpoint_data with the low
18508 target's breakpoint.
18509 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
18510 FOP_REGNUM, mappings): Move to ...
18511 * win32-i386-low.c: ... here.
18512 * win32-low.c (win32_thread_info): Move to ...
18513 * win32-low.h: ... here.
18514 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
18515 win32-arm-low.c and wincecompat.c.
18516 (all:): Add $EXEEXT.
18517 (install-only:): Likewise.
18518 (gdbserver:): Likewise.
18519 (gdbreplay:): Likewise.
18520 * config.in: Regenerate.
18521 * configure: Regenerate.
18522
18523 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
18524
18525 * win32-low.c: Rename typedef thread_info to
18526 win32_thread_info throughout.
18527
18528 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
18529
18530 * win32-i386-low.c: Rename to ...
18531 * win32-low.c: ... this.
18532 * configure.srv: Replace win32-i386-low.o with win32-low.o.
18533 * Makefile.in: Likewise.
18534
18535 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
18536
18537 * remote-utils.c (monitor_output): Constify msg parameter.
18538 * server.h (monitor_output): Likewise.
18539 * win32-i386-low.c (handle_output_debug_string): New.
18540 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
18541 handle_output_debug_string.
18542 (get_child_debug_event): Likewise.
18543
18544 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
18545
18546 * server.c (main): Correct strtoul check.
18547
18548 2007-03-27 Jon Ringle <jon@ringle.org>
18549
18550 * linux-low.c: Check __ARCH_HAS_MMU__ also.
18551
18552 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
18553
18554 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
18555
18556 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
18557
18558 * terminal.h: Check HAVE_SGTTY_H.
18559
18560 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
18561
18562 * remote-utils.c (remote_open): Print out the assigned port number.
18563
18564 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
18565
18566 * remote-utils.c (monitor_output): New function.
18567 * server.c (debug_threads): Define here.
18568 (monitor_show_help): New function.
18569 (handle_query): Handle qRcmd.
18570 (main): Do not handle 'd' packet.
18571 * server.h (debug_threads, remote_debug, monitor_output): Declare.
18572 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
18573 of debug_threads.
18574
18575 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18576
18577 * Makefile.in (EXEEXT): New.
18578 (clean): Use $(EXEEXT).
18579
18580 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18581
18582 * target.h (target_ops): Rename send_signal to request_interrupt,
18583 and remove enum target_signal parameter.
18584 * linux-low.c (linux_request_interrupt): Rename from
18585 linux_send_signal, and always send SIGINT.
18586 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
18587 and always send SIGINT.
18588 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
18589 of send_signal.
18590 (input_interrupt): Likewise.
18591
18592 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18593
18594 * server.c (get_features_xml): Check if target implemented
18595 arch_string.
18596 * win32-i386-low.c (win32_arch_string): New.
18597 (win32_target_ops): Add win32_arch_string as arch_string member.
18598
18599 2007-02-22 Markus Deuling <deuling@de.ibm.com>
18600
18601 * spu-low.c (spu_arch_string): New.
18602 (spu_target_ops): Add spu_arch_string.
18603
18604 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
18605
18606 * remote-utils.c: Remove HAVE_TERMINAL_H check.
18607 * configure.ac: Do not check for terminal.h.
18608 * configure, config.in: Regenerated.
18609
18610 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18611
18612 * Makefile.in (OBS): Add $(XML_BUILTIN).
18613 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
18614 (clean): Update.
18615 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
18616 (arm-with-iwmmxt.c): New.
18617 * config.in, configure: Regenerate.
18618 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
18619 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
18620 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
18621 (arm*-*-linux*): Add iWMMXt and regset support.
18622 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
18623 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
18624 (arm_store_wmmxregset, target_regsets): New.
18625 * server.c (get_features_xml): Take annex argument. Check builtin
18626 XML documents.
18627 (handle_query): Handle multiple annexes.
18628
18629 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18630
18631 * remote-utils.c [USE_WIN32API] (read, write): Define.
18632 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
18633 write.
18634
18635 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
18636
18637 * linux-i386-low.c (the_low_target): Set arch_string.
18638 * linux-x86-64-low.c (the_low_target): Likewise.
18639 * linux-low.c (linux_arch_string): New.
18640 (linux_target_ops): Add it.
18641 * linux-low.h (struct linux_target_ops): Add arch_string.
18642 * server.c (write_qxfer_response): Use const void * for DATA.
18643 (get_features_xml): New.
18644 (handle_query): Handle qXfer:features:read. Report it for qSupported.
18645 * target.h (struct target_ops): Add arch_string method.
18646
18647 2007-01-03 Denis Pilat <denis.pilat@st.com>
18648 Daniel Jacobowitz <dan@codesourcery.com>
18649
18650 * linux-low.c (linux_kill): Handle being called with no threads.
18651 * win32-i386-low.c (win32_kill): Likewise.
18652 (get_child_debug_event): Clear current_process_handle.
18653
18654 2006-12-30 Denis PILAT <denis.pilat@st.com>
18655 Daniel Jacobowitz <dan@codesourcery.com>
18656
18657 * remote-utils.c (remote_open): Check the type of specified
18658 serial port devices before opening them.
18659 * server.c (main): Kill the inferior if an error occurs during
18660 the first remote_open.
18661
18662 2006-12-05 Markus Deuling <deuling@de.ibm.com>
18663
18664 * README: Update supported targets.
18665
18666 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
18667
18668 * Makefile.in (clean): Remove reg-mips64.c.
18669 (reg-mips64.c, reg-mips64.o): New rules.
18670 * configure.srv: Handle mips64. Include regset support for mips.
18671 * linux-mips-low.c (union mips_register): New.
18672 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
18673 (mips_breakpoint, mips_breakpoint_at): Use int.
18674 (mips_collect_register, mips_supply_register)
18675 (mips_collect_register_32bit, mips_supply_register_32bit)
18676 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18677 (mips_store_fpregset, target_regsets): New.
18678 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
18679
18680 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
18681
18682 * configure.srv: Add target "spu*-*-*".
18683 * Makefile.in (clean): Remove reg-spu.c.
18684 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
18685 * spu-low.c: New file.
18686
18687 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18688
18689 * configure.ac: Correct td_thr_tls_get_addr test.
18690 * configure: Regenerated.
18691
18692 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18693
18694 * linux-low.c (linux_wait_for_event): Reformat. Use the
18695 pass_signals array.
18696 * remote-utils.c (decode_address_to_semicolon): New.
18697 * server.c (pass_signals, handle_general_set): New.
18698 (handle_query): Mention QPassSignals for qSupported.
18699 (main): Call handle_general_set.
18700 * server.h (pass_signals, decode_address_to_semicolon): New.
18701
18702 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
18703
18704 * server.c (handle_query): Correct error handling for read_auxv.
18705
18706 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
18707
18708 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
18709 and srv_linux_thread_db to yes.
18710 * linux-s390-low.c (s390_fill_gregset): New function.
18711 (target_regsets): Define data structure.
18712
18713 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
18714
18715 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
18716 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
18717 * config.in, configure: Regenerated.
18718 * inferiors.c (gdb_id_to_thread): New function.
18719 (gdb_id_to_thread_id): Use it.
18720 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
18721 * linux-low.h (struct process_info): Add th member.
18722 (thread_db_get_tls_address): New prototype.
18723 * remote-utils.c (decode_address): Make non-static.
18724 * server.c (handle_query): Handle qGetTLSAddr.
18725 * server.h (gdb_id_to_thread, decode_address): New prototypes.
18726 * target.h (struct target_ops): Add get_tls_address.
18727 * thread-db.c (maybe_attach_thread): Save the thread handle.
18728 (thread_db_get_tls_address): New.
18729
18730 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
18731
18732 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
18733 (linux_resume_one_process): Take a siginfo_t *. Update all
18734 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
18735 (struct pending_signals): Add a siginfo_t.
18736 (linux_wait_for_process): Always set last_status.
18737 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
18738 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
18739 * linux-low.h (struct process_info): Add last_status.
18740
18741 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
18742
18743 * remote-utils.c (try_rle): New function.
18744 (putpkt_binary): Use it.
18745
18746 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
18747
18748 * Makefile.in (clean): Clean reg-x86-64-linux.c.
18749 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
18750 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
18751 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
18752 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
18753 point registers.
18754
18755 2006-08-08 Richard Sandiford <richard@codesourcery.com>
18756
18757 * server.c (terminal_fd): New variable.
18758 (old_foreground_pgrp): Likewise.
18759 (restore_old_foreground_pgrp): New function.
18760 (start_inferior): Record the terminal file descriptor in terminal_fd
18761 and its original foreground group in old_foreground_pgrp. Register
18762 restore_old_foreground_pgrp with atexit().
18763
18764 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
18765
18766 * server.c (handle_query): Correct qPart to qXfer.
18767
18768 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
18769
18770 * configure.ac: Check for more headers which are missing on
18771 Windows. Automatically supply -lwsock32 and USE_WIN32API.
18772 * configure.srv: Add Cygwin and mingw32.
18773 * remote-utils.c: Don't include headers unconditionally which
18774 are missing on mingw32. Include <winsock.h> for mingw32.
18775 (remote_open): Adjust for mingw32 support. Flush
18776 standard error after writing to it.
18777 (remote_close, putpkt_binary, input_interrupt, block_async_io)
18778 (unblock_async_io, enable_async_io, disable_async_io)
18779 (readchar, getpkt): Update for Winsock support.
18780 (prepare_resume_reply): Expect a protocol signal number.
18781 * server.c: Disable <sys/wait.h> on mingw32.
18782 (start_inferior): Adjust for mingw32 support. Flush
18783 standard error after writing to it.
18784 (attach_inferior): Likewise. Use protocol signal
18785 numbers.
18786 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
18787 and names.
18788 * win32-i386-low.c: New file.
18789 * Makefile.in (XM_CLIBS): Set.
18790 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
18791 (win32-i386-low.o): New dependency rule.
18792 * linux-low.c (linux_wait): Use target signal numbers.
18793 * target.h (struct target_ops): Doc fix.
18794 * server.h (target_signal_to_name): New prototype.
18795 * gdbreplay.c: Don't include headers unconditionally which
18796 are missing on mingw32. Include <winsock.h> for mingw32.
18797 (remote_close, remote_open): Adjust for Winsock support.
18798 * configure, config.in: Regenerated.
18799
18800 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
18801
18802 * server.c (decode_xfer_read, write_qxfer_response): New.
18803 (handle_query): Take a packet length argument. Handle
18804 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
18805 the qSupported response.
18806 (main): Update call to handle_query.
18807
18808 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
18809
18810 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
18811 (putpkt_binary): Renamed from putpkt and adjusted for binary
18812 data.
18813 (putpkt): New wrapper for putpkt_binary.
18814 (readchar): Don't mask off the high bit.
18815 (decode_X_packet): New function.
18816 * server.c (main): Call putpkt_binary if a handler sets the packet
18817 length. Save the length of the incoming packet. Handle 'X'.
18818 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
18819
18820 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
18821
18822 * server.c (handle_query): Handle qSupported.
18823
18824 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18825
18826 * remote-utils.c (all_symbols_looked_up): New variable.
18827 (look_up_one_symbol): Check it.
18828 * server.h (look_up_one_symbol): New declaration.
18829 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
18830
18831 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18832
18833 * Makefile.in (linux-arm-low.o): Update dependencies.
18834 * linux-arm-low.c: Include "gdb_proc_service.h".
18835 (PTRACE_GET_THREAD_AREA): Define.
18836 (ps_get_thread_area): New function.
18837
18838 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
18839
18840 * configure.srv (m68k*-*-uclinux*): New target.
18841 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
18842 (linux_resume_one_process): Remove extraneous cast.
18843 (linux_read_offsets): New.
18844 (linux_target_op): Add linux_read_offsets on mmuless systems.
18845 * server.c (handle_query): Add qOffsets logic.
18846 * target.h (struct target_ops): Add read_offsets.
18847
18848 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18849
18850 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
18851 (PTRACE_GET_THREAD_AREA): Define.
18852 (ps_get_thread_area): New function.
18853 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
18854 (linux-x86-64-low.o): Update.
18855
18856 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18857
18858 * configure.ac: Remove checks for prfpregset_t.
18859 * gdb_proc_service.h: New file.
18860 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
18861 new "gdb_proc_service.h".
18862 * proc-service.c: Likewise.
18863 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
18864 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
18865 * Makefile.in (gdb_proc_service_h): Updated.
18866 * configure, config.in: Regenerated.
18867
18868 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18869
18870 * remote-utils.c (prepare_resume_reply): Move declaration
18871 of gdb_id_from_wait to the top of the block.
18872
18873 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
18874
18875 * linux-low.c (regsets_store_inferior_registers): Read the regset
18876 from the target before filling it.
18877
18878 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18879
18880 * server.c (attach_inferior): Return SIGTRAP for a successful
18881 attach.
18882
18883 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18884
18885 * Makefile.in (OBS): Add version.o.
18886 (STAGESTUFF): Delete.
18887 (version.o): Add dependencies.
18888 (version.c): Replace rule.
18889 (clean): Remove version.c.
18890 * server.c (gdbserver_version): New.
18891 (gdbserver_usage): Use printf.
18892 (main): Handle --version and --help.
18893 * server.h (version, host_name): Add declarations.
18894
18895 2005-12-23 Eli Zaretskii <eliz@gnu.org>
18896
18897 * linux-arm-low.c:
18898 * linux-arm-low.c:
18899 * inferiors.c:
18900 * i387-fp.h:
18901 * i387-fp.c:
18902 * gdbreplay.c:
18903 * regcache.c:
18904 * proc-service.c:
18905 * mem-break.h:
18906 * mem-break.c:
18907 * linux-x86-64-low.c:
18908 * linux-sh-low.c:
18909 * linux-s390-low.c:
18910 * linux-ppc64-low.c:
18911 * linux-ppc-low.c:
18912 * linux-mips-low.c:
18913 * linux-m68k-low.c:
18914 * linux-m32r-low.c:
18915 * linux-low.h:
18916 * linux-low.c:
18917 * linux-ia64-low.c:
18918 * linux-i386-low.c:
18919 * linux-crisv32-low.c:
18920 * thread-db.c:
18921 * terminal.h:
18922 * target.h:
18923 * target.c:
18924 * server.h:
18925 * server.c:
18926 * remote-utils.c:
18927 * regcache.h:
18928 * utils.c:
18929 * Makefile.in:
18930 * configure.ac:
18931 * gdbserver.1: Add (C) after Copyright. Update the FSF
18932 address.
18933
18934 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
18935
18936 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
18937 (arm_breakpoint_at): Recognize both breakpoints.
18938 (the_low_target): Use the correct breakpoint instruction.
18939
18940 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
18941
18942 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
18943 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
18944 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
18945 (the_low_target): Update.
18946
18947 2005-10-25 Andreas Schwab <schwab@suse.de>
18948
18949 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
18950
18951 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
18952 (ia64_num_regs): Reduce to 462.
18953
18954 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
18955
18956 * acinclude.m4: Correct quoting.
18957 * aclocal.m4: Regenerated.
18958
18959 Suggested by SZOKOVACS Robert <szo@ies.hu>:
18960 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
18961 (thread_db_init): Call thread_db_err_str.
18962 * configure.ac: Check for TD_VERSION.
18963 * config.in, configure: Regenerated.
18964
18965 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18966
18967 * server.h (error, fatal, warning): Add ATTR_FORMAT.
18968
18969 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18970
18971 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
18972 is not available. Define HAVE_PTRACE_GETREGS if it is.
18973 * config.in, configure: Regenerated.
18974 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
18975 * linux-i386-low.c, linux-m68k-low.c: Update to use
18976 HAVE_PTRACE_GETREGS.
18977 * linux-low.c (regsets_fetch_inferior_registers)
18978 (regsets_store_inferior_registers): Only return 0 if we processed
18979 GENERAL_REGS.
18980 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
18981 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
18982
18983 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18984
18985 * inferiors.c (struct thread_info): Add gdb_id.
18986 (add_thread): Add gdb_id argument.
18987 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
18988 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
18989 calls to add_thread.
18990 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
18991 * server.c (handle_query): Use thread_to_gdb_id.
18992 (handle_v_cont, main): Use gdb_id_to_thread_id.
18993 * server.h (add_thread): Update prototype.
18994 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
18995 prototypes.
18996
18997 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18998
18999 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
19000 left-padded registers.
19001 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
19002 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
19003
19004 2005-07-01 Steve Ellcey <sje@cup.hp.com>
19005
19006 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
19007 * configure: Regenerate.
19008 * config.in: Regenerate.
19009 * server.h (NEED_DECLARATION_STRERROR):
19010 Replace with !HAVE_DECL_STRERROR.
19011
19012 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
19013
19014 * linux-low.c (linux_wait, linux_send_signal): Don't test
19015 an unsigned long variable for > 0 if it could be MAX_ULONG.
19016 * server.c (myresume): Likewise.
19017 * target.c (set_desired_inferior): Likewise.
19018
19019 2005-06-13 Mark Kettenis <kettenis@gnu.org>
19020
19021 * configure.ac: Simplify and improve check for socklen_t.
19022 * configure, config.in: Regenerate.
19023
19024 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
19025
19026 * acconfig.h: Remove.
19027 * configure.ac: Add a test for socklen_t. Use three-argument
19028 AC_DEFINE throughout.
19029 * config.in: Regenerated using autoheader 2.59.
19030 * configure: Regenerated.
19031
19032 * gdbreplay.c (socklen_t): Provide a default.
19033 (remote_open): Use socklen_t.
19034 * remote-utils.c (socklen_t): Provide a default.
19035 (remote_open): Use socklen_t.
19036 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
19037 unsigned char.
19038
19039 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
19040 char for buffers.
19041 * linux-low.c (linux_read_memory, linux_write_memory)
19042 (linux_read_auxv): Likewise.
19043 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
19044 (check_mem_write): Likewise.
19045 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
19046 Likewise.
19047 * regcache.c (struct inferior_rgcache_data, registers_to_string)
19048 (registers_from_string, register_data): Likewise.
19049 * server.c (handle_query, main): Likewise.
19050 * server.h (convert_ascii_to_int, convert_int_to_ascii)
19051 (decode_M_packet): Likewise.
19052 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
19053 * target.h (struct target_ops): Update read_memory, write_memory,
19054 and read_auxv.
19055 (read_inferior_memory, write_inferior_memory): Update.
19056 * linux-low.h (struct linux_target_ops): Change type of breakpoint
19057 to unsigned char *.
19058 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
19059 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
19060 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
19061 linux-s390-low.c, linux-sh-low.c: Update for changes in
19062 read_inferior_memory and the_low_target->breakpoint.
19063
19064 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
19065
19066 * Makefile.in (SFILES): Add linux-ppc64-low.c.
19067 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
19068 * configure.srv: Add powerpc64-*-linux*.
19069 * linux-ppc64-low.c: New file.
19070
19071 2005-05-23 Orjan Friberg <orjanf@axis.com>
19072
19073 * linux-cris-low.c: New file with support for CRIS.
19074 * linux-crisv32-low.c: Ditto for CRISv32.
19075 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
19076 (clean): Add reg-cris.c and reg-crisv32.c.
19077 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
19078 reg-crisv32.o, and reg-crisv32.c to make rules.
19079 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
19080 recognized targets.
19081
19082 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
19083
19084 * linux-low.c (fetch_register): Ensure buffer size is a multiple
19085 of sizeof (PTRACE_XFER_TYPE).
19086 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
19087
19088 2005-05-12 Orjan Friberg <orjanf@axis.com>
19089
19090 * target.h (struct target_ops): Add insert_watchpoint,
19091 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
19092 pointers for hardware watchpoint support.
19093 * linux-low.h (struct linux_target_ops): Ditto.
19094 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
19095 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
19096 to linux_target_ops.
19097 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
19098 reply packet.
19099 * server.c (main): Recognize 'Z' and 'z' packets.
19100
19101 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
19102
19103 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
19104 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
19105 (the_low_target): Add new members.
19106
19107 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
19108
19109 * proc-service.c (ps_lgetregs): Search all_processes instead of
19110 all_threads.
19111
19112 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
19113
19114 * server.c (start_inferior): Change return type to int.
19115 (attach_inferior): Change sigptr to int *.
19116 (handle_v_cont, handle_v_requests): Change signal to int *.
19117 (main): Change signal to int.
19118
19119 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
19120
19121 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
19122 * configure.srv: Add m32r*-*-linux*.
19123 * linux-m32r-low.c: New file.
19124
19125 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
19126
19127 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
19128
19129 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
19130
19131 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
19132 Take unsigned long arguments for PIDs.
19133 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
19134 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
19135 (wait_for_sigstop, linux_resume_one_process)
19136 (regsets_fetch_inferior_registers, linux_send_signal)
19137 (linux_read_auxv): Likewise. Update the types of variables holding
19138 PIDs. Update format string specifiers.
19139 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
19140 * remote-utils.c (prepare_resume_reply): Likewise.
19141 * server.c (cont_thread, general_thread, step_thread)
19142 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
19143 unsigned long.
19144 (handle_query): Update format specifiers.
19145 (handle_v_cont, main): Use strtoul for thread IDs.
19146 * server.h (struct inferior_list_entry): Use unsigned long for ID.
19147 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
19148 (general_thread, step_thread, thread_from_wait)
19149 (old_thread_from_wait): Update.
19150 * target.h (struct thread_resume): Use unsigned long for THREAD.
19151 (struct target_ops): Use unsigned long for arguments to attach and
19152 thread_alive.
19153
19154 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
19155
19156 * acinclude.m4: Include bfd/bfd.m4 directly.
19157 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
19158 <agriffis@toolchain.org>.
19159 * aclocal.m4, configure: Regenerated.
19160
19161 2005-01-07 Andrew Cagney <cagney@gnu.org>
19162
19163 * configure.ac: Rename configure.in, require autoconf 2.59.
19164 * configure: Re-generate.
19165
19166 2004-12-08 Daniel Jacobowitz <dan@debian.org>
19167
19168 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
19169 LIBS when finished.
19170 * aclocal.m4: Regenerated.
19171 * configure: Regenerated.
19172
19173 2004-11-21 Andreas Schwab <schwab@suse.de>
19174
19175 * linux-m68k-low.c (m68k_num_gregs): Define.
19176 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
19177 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
19178 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
19179 (m68k_breakpoint_at): New. Add to the_low_target.
19180
19181 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
19182 srv_linux_thread_db to yes.
19183
19184 2004-10-20 Joel Brobecker <brobecker@gnat.com>
19185
19186 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
19187 (ARCH_SET_FS): Likewise.
19188 (ARCH_GET_FS): Likewise.
19189 (ARCH_GET_GS): Likewise.
19190
19191 2004-10-16 Daniel Jacobowitz <dan@debian.org>
19192
19193 * linux-i386-low.c (ps_get_thread_area): New.
19194 * linux-x86-64-low.c (ps_get_thread_area): New.
19195 * linux-low.c: Include <sys/syscall.h>.
19196 (linux_kill_one_process): Don't kill the first thread here.
19197 (linux_kill): Kill the first thread here.
19198 (kill_lwp): New function.
19199 (send_sigstop, linux_send_signal): Use it.
19200 * proc-service.c: Clean up #ifdefs.
19201 (fpregset_info): Delete.
19202 (ps_lgetregs): Update and enable implementation.
19203 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
19204 implementations.
19205 * remote-utils.c (struct sym_cache, symbol_cache): New.
19206 (input_interrupt): Print a clearer message.
19207 (async_io_enabled): New variable.
19208 (enable_async_io, disable_async_io): Use it. Update comments.
19209 (look_up_one_symbol): Use the symbol cache.
19210 * thread-db.c (thread_db_look_up_symbols): New function.
19211 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
19212
19213 2004-10-16 Daniel Jacobowitz <dan@debian.org>
19214
19215 * configure.in: Test for -rdynamic.
19216 * configure: Regenerated.
19217 * Makefile (INTERNAL_LDFLAGS): New.
19218 (gdbserver, gdbreplay): Use it.
19219
19220 2004-09-02 Andrew Cagney <cagney@gnu.org>
19221
19222 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
19223
19224 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
19225
19226 * linux-low.c (linux_wait): Clear all_processes list also.
19227
19228 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
19229
19230 * linux-low.c: Include <errno.h>. Remove extern declaration of
19231 errno.
19232
19233 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
19234
19235 * gdbreplay.c, server.h, utils.c: Update copyright years.
19236
19237 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
19238
19239 * server.c (main): Print child status or termination signal from
19240 variable 'signal', not 'sig'.
19241
19242 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
19243
19244 * linux-low.c (linux_read_memory): Change return type to
19245 int. Check for and return error from ptrace().
19246 * target.c (read_inferior_memory): Change return type to int. Pass
19247 back return status from the_target->read_memory().
19248 * target.h (struct target_ops): Adapt *read_memory() prototype.
19249 Update comment.
19250 (read_inferior_memory): Adapt prototype.
19251 * server.c (main): Return an error packet if
19252 read_inferior_memory() returns an error.
19253
19254 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
19255
19256 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
19257 Unify with other clean targets.
19258
19259 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
19260
19261 * server.c (handle_v_cont): Call set_desired_inferior.
19262
19263 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
19264
19265 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
19266
19267 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
19268
19269 * linux-low.c (linux_wait): Unblock async I/O.
19270 (linux_resume): Block and enable async I/O.
19271 * remote-utils.c (block_async_io, unblock_async_io): New functions.
19272 * server.h (block_async_io, unblock_async_io): Add prototypes.
19273
19274 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
19275
19276 * remote-utils.c (remote_open): Print a status notice after
19277 opening a TCP port.
19278 * server.c (attach_inferior): Print a status notice after
19279 attaching.
19280
19281 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
19282
19283 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
19284
19285 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
19286
19287 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
19288 error packet.
19289 * server.c, target.h: Update copyright years.
19290
19291 2004-02-25 Roland McGrath <roland@redhat.com>
19292
19293 * target.h (struct target_ops): New member `read_auxv'.
19294 * server.c (handle_query): Handle qPart:auxv:read: query using that.
19295 * linux-low.c (linux_read_auxv): New function.
19296 (linux_target_ops): Initialize `read_auxv' member to that.
19297
19298 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
19299
19300 Committed by Jim Blandy <jimb@redhat.com>.
19301
19302 * linux-s390-low.c (s390_num_regs): Update.
19303 (s390_regmap): Remove control registers. Use __s390x__ predefine
19304 instead of GPR_SIZE to distiguish s390 and s390x targets.
19305
19306 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
19307
19308 * linux-low.c: Update copyright year.
19309 (check_removed_breakpoint): Clear pending_is_breakpoint.
19310 (linux_set_resume_request, linux_queue_one_thread)
19311 (resume_status_pending_p): New functions.
19312 (linux_continue_one_thread): Use process->resume.
19313 (linux_resume): Only resume threads if there are no pending events.
19314 * linux-low.h (struct process_info): Add resume request
19315 pointer.
19316
19317 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
19318
19319 * regcache.c (new_register_cache): Clear the allocated register
19320 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
19321
19322 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
19323
19324 * linux-low.c (linux_resume): Take a struct thread_resume *
19325 argument.
19326 (linux_wait): Update call.
19327 (resume_ptr): New static variable.
19328 (linux_continue_one_thread): Renamed from
19329 linux_continue_one_process. Use resume_ptr.
19330 (linux_resume): Use linux_continue_one_thread.
19331 * server.c (handle_v_cont, handle_v_requests): New functions.
19332 (myresume): New function.
19333 (main): Handle 'v' case.
19334 * target.h (struct thread_resume): New type.
19335 (struct target_ops): Change argument of "resume" to struct
19336 thread_resume *.
19337 (myresume): Delete macro.
19338
19339 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
19340
19341 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
19342 (uninstall): Support DESTDIR.
19343
19344 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
19345
19346 * configure.srv: Add xscale*linux copy of arm*linux entry.
19347
19348 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
19349
19350 * linux-arm-low.c (arm_reinsert_addr): New function.
19351 (the_low_target): Add arm_reinsert_addr.
19352
19353 2003-07-08 Mark Kettenis <kettenis@gnu.org>
19354
19355 * mem-break.c: Remove whitespace at end of file.
19356
19357 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
19358
19359 * configure.in: Check whether we need to prototype strerror.
19360 * server.h: Optionally prototype strerror.
19361 * gdbreplay.c (perror_with_name): Use strerror.
19362 * linux-low.c (linux_attach_lwp): Use strerror.
19363 * utils.c (perror_with_name): Use strerror.
19364 * config.in, configure: Regenerated.
19365
19366 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
19367
19368 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
19369 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
19370
19371 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
19372
19373 * Makefile.in (SFILES): Update.
19374 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
19375 low-sun3.c: Remove files.
19376
19377 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
19378
19379 * linux-low.c: Move comment to linux_thread_alive where it belonged.
19380 (linux_detach_one_process, linux_detach): New functions.
19381 (linux_target_ops): Add linux_detach.
19382 * server.c (main): Handle 'D' packet.
19383 * target.h (struct target_ops): Add "detach" member.
19384 (detach_inferior): Define.
19385
19386 2003-06-13 Mark Kettenis <kettenis@gnu.org>
19387
19388 From Kelley Cook <kelleycook@wideopenwest.com>:
19389 * configure.srv: Accept i[34567]86 variants.
19390
19391 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
19392
19393 * linux-low.c (linux_wait_for_event): Correct comment typos.
19394 (linux_resume_one_process): Call check_removed_breakpoint.
19395 (linux_send_signal): New function.
19396 (linux_target_ops): Add linux_send_signal.
19397 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
19398 of kill.
19399 * target.h (struct target_ops): Add send_signal.
19400
19401 2003-05-29 Jim Blandy <jimb@redhat.com>
19402
19403 * linux-low.c (usr_store_inferior_registers): Transfer buf in
19404 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
19405 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
19406 away part of the register's value.
19407
19408 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
19409
19410 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
19411 (linux_wait_for_event, linux_init_signals): Likewise.
19412
19413 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
19414
19415 * configure.in: Check for stdlib.h.
19416 * configure: Regenerated.
19417 * config.in: Regenerated.
19418
19419 2003-01-04 Andreas Schwab <schwab@suse.de>
19420
19421 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
19422
19423 2003-01-02 Andrew Cagney <ac131313@redhat.com>
19424
19425 * Makefile.in: Remove obsolete code.
19426
19427 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
19428
19429 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
19430 defined(PT_FPR0_HI).
19431
19432 2002-11-17 Stuart Hughes <seh@zee2.com>
19433
19434 * linux-arm-low.c (arm_num_regs): Increase.
19435 (arm_regmap): Include status register.
19436
19437 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
19438
19439 * linux-low.c (register_addr): Remove incorrect -1 check.
19440
19441 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
19442
19443 * linux-low.c (linux_create_inferior): Call setpgid. Return
19444 the new PID.
19445 (unstopped_p, linux_signal_pid): Remove.
19446 (linux_target_ops): Remove linux_signal_pid.
19447 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
19448 global instead of target method.
19449 * target.h (struct target_ops): Remove signal_pid. Update comment
19450 for create_inferior.
19451 * server.c (signal_pid): New variable.
19452 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
19453 gdbserver. Set the child to be the foreground process group.
19454 (attach_inferior): Set signal_pid.
19455
19456 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
19457
19458 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
19459
19460 2002-08-20 Jim Blandy <jimb@redhat.com>
19461
19462 * Makefile.in (LDFLAGS): Allow the configure script to establish a
19463 default for this.
19464
19465 2002-08-01 Andrew Cagney <cagney@redhat.com>
19466
19467 * Makefile.in: Make chill references obsolete.
19468
19469 2002-07-24 Kevin Buettner <kevinb@redhat.com>
19470
19471 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
19472 * configure: Regenerate.
19473 * config.in: Regenerate.
19474
19475 2002-07-09 David O'Brien <obrien@FreeBSD.org>
19476
19477 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
19478 (perror_with_name, remote_close, remote_open, expect, play): Static.
19479
19480 2002-07-04 Michal Ludvig <mludvig@suse.cz>
19481
19482 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
19483 byte offsets instead of an array of indexes.
19484 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
19485
19486 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
19487
19488 * regcache.c: Add comment.
19489
19490 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
19491
19492 * thread-db.c: New file.
19493 * proc-service.c: New file.
19494 * acinclude.m4: New file.
19495 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
19496 proc-service.o, and thread-db.o.
19497 (linux-low.o): Add USE_THREAD_DB.
19498 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
19499 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
19500 * aclocal.m4: Regenerated.
19501 * config.in: Regenerated.
19502 * configure: Regenerated.
19503 * configure.in: Check for proc_service.h, sys/procfs.h,
19504 thread_db.h, and linux/elf.h headrs.
19505 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
19506 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
19507 Check for -lthread_db and thread support.
19508 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
19509 PowerPC, and SuperH.
19510 * i387-fp.c: Constify arguments.
19511 * i387-fp.h: Likewise.
19512 * inferiors.c: (struct thread_info): Renamed from
19513 `struct inferior_info'. Remove PID member. Use generic inferior
19514 list header. All uses updated.
19515 (inferiors, signal_pid): Removed.
19516 (all_threads): New variable.
19517 (get_thread): Define.
19518 (add_inferior_to_list): New function.
19519 (for_each_inferior): New function.
19520 (change_inferior_id): New function.
19521 (add_inferior): Removed.
19522 (remove_inferior): New function.
19523 (add_thread): New function.
19524 (free_one_thread): New function.
19525 (remove_thread): New function.
19526 (clear_inferiors): Use for_each_inferior and free_one_thread.
19527 (find_inferior): New function.
19528 (find_inferior_id): New function.
19529 (inferior_target_data): Update argument type.
19530 (set_inferior_target_data): Likewise.
19531 (inferior_regcache_data): Likewise.
19532 (set_inferior_regcache_data): Likewise.
19533 * linux-low.c (linux_bp_reinsert): Remove.
19534 (all_processes, stopping_threads, using_thrads)
19535 (struct pending_signals, debug_threads, pid_of): New.
19536 (inferior_pid): Replace with macro.
19537 (struct inferior_linux_data): Remove.
19538 (get_stop_pc, add_process): New functions.
19539 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
19540 Use add_process and add_thread.
19541 (linux_attach_lwp): New function, based on old linux_attach. Use
19542 add_process and add_thread. Set stop_expected for new threads.
19543 (linux_attach): New function.
19544 (linux_kill_one_process): New function.
19545 (linux_kill): Kill all LWPs.
19546 (linux_thread_alive): Use find_inferior_id.
19547 (check_removed_breakpoints, status_pending_p): New functions.
19548 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
19549 Update. Use WNOHANG. Wait for cloned processes also. Update process
19550 struct for the found process.
19551 (linux_wait_for_event): New function.
19552 (linux_wait): Use it. Support LWPs.
19553 (send_sigstop, wait_for_sigstop, stop_all_processes)
19554 (linux_resume_one_process, linux_continue_one_process): New functions.
19555 (linux_resume): Support LWPs.
19556 (REGISTER_RAW_SIZE): Remove.
19557 (fetch_register): Use register_size instead. Call supply_register.
19558 (usr_store_inferior_registers): Likewise. Call collect_register.
19559 Fix recursive case.
19560 (regsets_fetch_inferior_registers): Improve error message.
19561 (regsets_store_inferior_registers): Add debugging.
19562 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
19563 (unstopped_p, linux_signal_pid): New functions.
19564 (linux_target_ops): Add linux_signal_pid.
19565 (linux_init_signals): New function.
19566 (initialize_low): Call it. Initialize using_threads.
19567 * regcache.c (inferior_regcache_data): Add valid
19568 flag.
19569 (get_regcache): Fetch registers lazily. Add fetch argument
19570 and update all callers.
19571 (regcache_invalidate_one, regcache_invalidate): New
19572 functions.
19573 (new_register_cache): Renamed from create_register_cache.
19574 Return the new regcache.
19575 (free_register_cache): Change argument to a void *.
19576 (registers_to_string, registers_from_string): Call get_regcache
19577 with fetch flag set.
19578 (register_data): Make static. Pass fetch flag to get_regcache.
19579 (supply_register): Call get_regcache with fetch flag clear.
19580 (collect_register): Call get_regcache with fetch flag set.
19581 (collect_register_as_string): New function.
19582 * regcache.h: Update.
19583 * remote-utils.c (putpkt): Flush after debug output and use
19584 stderr.
19585 Handle input interrupts while waiting for an ACK.
19586 (input_interrupt): Use signal_pid method.
19587 (getpkt): Flush after debug output and use stderr.
19588 (outreg): Use collect_register_as_string.
19589 (new_thread_notify, dead_thread_notify): New functions.
19590 (prepare_resume_reply): Check using_threads. Set thread_from_wait
19591 and general_thread.
19592 (look_up_one_symbol): Flush after debug output.
19593 * server.c (step_thread, server_waiting): New variables.
19594 (start_inferior): Don't use signal_pid. Update call to mywait.
19595 (attach_inferior): Update call to mywait.
19596 (handle_query): Handle qfThreadInfo and qsThreadInfo.
19597 (main): Don't fetch/store registers explicitly. Use
19598 set_desired_inferior. Support proposed ``Hs'' packet. Update
19599 calls to mywait.
19600 * server.h: Update.
19601 (struct inferior_list, struct_inferior_list_entry): New.
19602 * target.c (set_desired_inferior): New.
19603 (write_inferior_memory): Constify.
19604 (mywait): New function.
19605 * target.h: Update.
19606 (struct target_ops): New signal_pid method.
19607 (mywait): Removed macro, added prototype.
19608
19609 * linux-low.h (regset_func): Removed.
19610 (regset_fill_func, regset_store_func): New.
19611 (enum regset_type): New.
19612 (struct regset_info): Add type field. Use new operation types.
19613 (struct linux_target_ops): stop_pc renamed to get_pc.
19614 Add decr_pc_after_break and breakpoint_at.
19615 (get_process, get_thread_proess, get_process_thread)
19616 (strut process_info, all_processes, linux_attach_lwp)
19617 (thread_db_init): New.
19618
19619 * linux-arm-low.c (arm_get_pc, arm_set_pc,
19620 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
19621 (the_low_target): Add new members.
19622 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
19623 (i386_store_fpxregset): Constify.
19624 (target_regsets): Add new kind identifier.
19625 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
19626 (i386_set_pc): Add debugging.
19627 (i386_breakpoint_at): New function.
19628 (the_low_target): Add new members.
19629 * linux-mips-low.c (mips_get_pc, mips_set_pc)
19630 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
19631 (mips_breakpoint_at): New.
19632 (the_low_target): Add new members.
19633 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
19634 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
19635 (the_low_target): Add new members.
19636 * linux-sh-low.c (sh_get_pc, sh_set_pc)
19637 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
19638 (the_low_target): Add new members.
19639 * linux-x86-64-low.c (target_regsets): Add new kind
19640 identifier.
19641
19642 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
19643
19644 From Martin Pool <mbp@samba.org>:
19645 * server.c (gdbserver_usage): New function.
19646 (main): Call it.
19647
19648 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
19649
19650 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
19651 stop_at -> stop_pc.
19652
19653 2002-05-04 Andrew Cagney <ac131313@redhat.com>
19654
19655 * Makefile.in: Remove obsolete code.
19656
19657 2002-04-24 Michal Ludvig <mludvig@suse.cz>
19658
19659 * linux-low.c (regsets_fetch_inferior_registers),
19660 (regsets_store_inferior_registers): Removed cast to int from
19661 ptrace() calls.
19662 * regcache.h: Added declaration of struct inferior_info.
19663
19664 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
19665
19666 * inferiors.c (struct inferior_info): Add regcache_data.
19667 (add_inferior): Call create_register_cache.
19668 (clear_inferiors): Call free_register_cache.
19669 (inferior_regcache_data, set_inferior_regcache_data): New functions.
19670 * regcache.c (struct inferior_regcache_data): New.
19671 (registers): Remove.
19672 (get_regcache): New function.
19673 (create_register_cache, free_register_cache): New functions.
19674 (set_register_cache): Don't initialize the register cache here.
19675 (registers_to_string, registers_from_string, register_data): Call
19676 get_regcache.
19677 * regcache.h: Add prototypes.
19678 * server.h: Likewise.
19679
19680 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
19681
19682 * mem-break.c: New file.
19683 * mem-break.h: New file.
19684 * Makefile.in: Add mem-break.o rule; update server.h
19685 dependencies.
19686 * inferiors.c (struct inferior_info): Add target_data
19687 member.
19688 (clear_inferiors): Free target_data member if set.
19689 (inferior_target_data, set_inferior_target_data): New functions.
19690 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
19691 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
19692 * linux-low.c (linux_bp_reinsert): New variable.
19693 (struct inferior_linux_data): New.
19694 (linux_create_inferior): Use set_inferior_target_data.
19695 (linux_attach): Likewise. Call add_inferior.
19696 (linux_wait_for_one_inferior): New function.
19697 (linux_wait): Call it.
19698 (linux_write_memory): Add const.
19699 (initialize_low): Call set_breakpoint_data.
19700 * linux-low.h (struct linux_target_ops): Add breakpoint
19701 handling members.
19702 * server.c (attach_inferior): Remove extra add_inferior
19703 call.
19704 * server.h: Include mem-break.h. Update inferior.c
19705 prototypes.
19706 * target.c (read_inferior_memory)
19707 (write_inferior_memory): New functions.
19708 * target.h (read_inferior_memory)
19709 (write_inferior_memory): Change macros to prototypes.
19710 (struct target_ops): Update comments. Add const to write_memory
19711 definition.
19712
19713 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
19714
19715 * linux-low.c (usr_store_inferior_registers): Support
19716 registers which are allowed to fail to store.
19717 * linux-low.h (linux_target_ops): Likewise.
19718 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
19719 (ppc_cannot_store_register): FPSCR may not be storable.
19720
19721 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19722
19723 * server.h: Include <string.h> if HAVE_STRING_H.
19724 * ChangeLog: Correct paths in last ChangeLog entry.
19725
19726 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19727
19728 * linux-low.h: Remove obsolete prototypes.
19729 (struct linux_target_ops): New.
19730 (extern the_low_target): New.
19731 * linux-low.c (num_regs, regmap): Remove declarations.
19732 (register_addr): Use the_low_target explicitly.
19733 (fetch_register): Likewise.
19734 (usr_fetch_inferior_registers): Likewise.
19735 (usr_store_inferior_registers): Likewise.
19736 * linux-arm-low.c (num_regs): Remove.
19737 (arm_num_regs): Define.
19738 (arm_regmap): Renamed from regmap, made static.
19739 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
19740 made static.
19741 (arm_cannot_store_register): Renamed from cannot_store_register,
19742 made static.
19743 (the_low_target): New.
19744 * linux-i386-low.c (num_regs): Remove.
19745 (i386_num_regs): Define.
19746 (i386_regmap): Renamed from regmap, made static.
19747 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
19748 made static.
19749 (i386_cannot_store_register): Renamed from cannot_store_register,
19750 made static.
19751 (the_low_target): New.
19752 * linux-ia64-low.c (num_regs): Remove.
19753 (ia64_num_regs): Define.
19754 (ia64_regmap): Renamed from regmap, made static.
19755 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
19756 made static.
19757 (ia64_cannot_store_register): Renamed from cannot_store_register,
19758 made static.
19759 (the_low_target): New.
19760 * linux-m68k-low.c (num_regs): Remove.
19761 (m68k_num_regs): Define.
19762 (m68k_regmap): Renamed from regmap, made static.
19763 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
19764 made static.
19765 (m68k_cannot_store_register): Renamed from cannot_store_register,
19766 made static.
19767 (the_low_target): New.
19768 * linux-mips-low.c (num_regs): Remove.
19769 (mips_num_regs): Define.
19770 (mips_regmap): Renamed from regmap, made static.
19771 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
19772 made static.
19773 (mips_cannot_store_register): Renamed from cannot_store_register,
19774 made static.
19775 (the_low_target): New.
19776 * linux-ppc-low.c (num_regs): Remove.
19777 (ppc_num_regs): Define.
19778 (ppc_regmap): Renamed from regmap, made static.
19779 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
19780 made static.
19781 (ppc_cannot_store_register): Renamed from cannot_store_register,
19782 made static.
19783 (the_low_target): New.
19784 * linux-s390-low.c (num_regs): Remove.
19785 (s390_num_regs): Define.
19786 (s390_regmap): Renamed from regmap, made static.
19787 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
19788 made static.
19789 (s390_cannot_store_register): Renamed from cannot_store_register,
19790 made static.
19791 (the_low_target): New.
19792 * linux-sh-low.c (num_regs): Remove.
19793 (sh_num_regs): Define.
19794 (sh_regmap): Renamed from regmap, made static.
19795 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
19796 made static.
19797 (sh_cannot_store_register): Renamed from cannot_store_register,
19798 made static.
19799 (the_low_target): New.
19800 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
19801 (the_low_target): New.
19802
19803 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19804
19805 * Makefile.in: Add stamp-h target.
19806 * configure.in: Create stamp-h.
19807 * configure: Regenerated.
19808
19809 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19810
19811 * inferiors.c: New file.
19812 * target.c: New file.
19813 * target.h: New file.
19814 * Makefile.in: Add target.o and inferiors.o. Update
19815 dependencies.
19816 * linux-low.c (inferior_pid): New static variable,
19817 moved from server.c.
19818 (linux_create_inferior): Renamed from create_inferior.
19819 Call add_inferior. Return 0 on success instead of a PID.
19820 (linux_attach): Renamed from myattach.
19821 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
19822 (linux_thread_alive): Renamed from mythread_alive.
19823 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
19824 child dies.
19825 (linux_resume): Renamed from myresume. Add missing ``return 0''.
19826 (regsets_store_inferior_registers): Correct error message.
19827 Add missing ``return 0''.
19828 (linux_fetch_registers): Renamed from fetch_inferior_registers.
19829 (linux_store_registers): Renamed from store_inferior_registers.
19830 (linux_read_memory): Renamed from read_inferior_memory.
19831 (linux_write_memory): Renamed from write_inferior_memory.
19832 (linux_target_ops): New structure.
19833 (initialize_low): Call set_target_ops ().
19834 * remote-utils.c (unhexify): New function.
19835 (hexify): New function.
19836 (input_interrupt): Send signals to ``signal_pid''.
19837 * server.c (inferior_pid): Remove.
19838 (start_inferior): Update create_inferior call.
19839 (attach_inferior): Call add_inferior.
19840 (handle_query): New function.
19841 (main): Call handle_query for `q' packets.
19842 * server.h: Include "target.h". Remove obsolete prototypes.
19843 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
19844
19845 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19846
19847 * Makefile.in: Add WARN_CFLAGS. Update configury
19848 dependencies.
19849 * configure.in: Check for <string.h>
19850 * configure: Regenerate.
19851 * config.in: Regenerate.
19852 * gdbreplay.c: Include needed system headers.
19853 (remote_open): Remove strchr prototype.
19854 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
19855 * regcache.c (supply_register): Change buf argument to const void *.
19856 (supply_register_by_name): Likewise.
19857 (collect_register): Change buf argument to void *.
19858 (collect_register_by_name): Likewise.
19859 * regcache.h: Add missing prototypes.
19860 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
19861 * server.c (handle_query): New function.
19862 (attached): New static variable, moved out of main.
19863 (main): Quiet longjmp clobber warnings.
19864 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
19865 * utils.c (error): Remove NORETURN.
19866 (fatal): Likewise.
This page took 0.432843 seconds and 5 git commands to generate.