7a5a3b7a0371937a4ba84c04b02f4b28aba97740
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
2
3 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
4 reply into an S reply.
5 * server.cc (disable_packet_T): New global.
6 (captured_main): Set new global when appropriate.
7 * server.h (disable_packet_T): Declare.
8
9 2020-02-21 Tom Tromey <tom@tromey.com>
10
11 * Makefile.in (mostlyclean): New target.
12
13 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
14
15 * target.h (struct process_stratum_target): Remove.
16 (class process_target): Rename to ...
17 (class process_stratum_target): ... this.
18 * linux-low.h (class linux_process_target): Derive from
19 'process_stratum_target'.
20 * linux-low.cc (linux_target_ops): Remove.
21 (initialize_low): Set the_target to the singleton instance of
22 linux_process_target.
23 * lynx-low.h (class lynx_process_target): Derive from
24 'process_stratum_target'.
25 * lynx-low.cc (lynx_target_ops): Remove.
26 (initialize_low): Set the_target to the singleton instance of
27 lynx_process_target.
28 * nto-low.h (class nto_process_target): Derive from
29 'process_stratum_target'.
30 * nto-low.cc (nto_target_ops): Remove.
31 (initialize_low): Set the_target to the singleton instance of
32 nto_process_target.
33 * win32-low.h (class win32_process_target): Derive from
34 'process_stratum_target'.
35 * win32-low.cc (win32_target_ops): Remove.
36 (initialize_low): Set the_target to the singleton instance of
37 win32_process_target.
38
39 Replace 'the_target->pt' with 'the_target' in the uses below.
40
41 * hostio.cc (hostio_error)
42 (handle_setfs)
43 (handle_open)
44 (handle_unlink)
45 (handle_readlink)
46 * linux-aarch32-low.cc (arm_breakpoint_at)
47 * linux-aarch64-low.cc (aarch64_breakpoint_at)
48 * linux-arm-low.cc (arm_sigreturn_next_pc)
49 (arm_get_hwcap)
50 (arm_get_syscall_trapinfo)
51 * linux-cris-low.cc (cris_breakpoint_at)
52 * linux-crisv32-low.cc (cris_breakpoint_at)
53 * linux-low.cc (handle_extended_wait)
54 (linux_wait_1)
55 (linux_read_memory)
56 (linux_process_target::breakpoint_kind_from_pc)
57 (linux_get_auxv)
58 * linux-m32r-low.cc (m32r_breakpoint_at)
59 * linux-mips-low.cc (mips_breakpoint_at)
60 * linux-nios2-low.cc (nios2_breakpoint_at)
61 * linux-ppc-low.cc (ppc_breakpoint_at)
62 * linux-s390-low.cc (s390_get_hwcap)
63 * linux-sh-low.cc (sh_breakpoint_at)
64 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
65 (sparc_store_gregset_from_stack)
66 (sparc_breakpoint_at)
67 * linux-tic6x-low.cc (tic6x_breakpoint_at)
68 * linux-tile-low.cc (tile_breakpoint_at)
69 * linux-x86-low.cc (x86_breakpoint_at)
70 * linux-xtensa-low.cc (xtensa_breakpoint_at)
71 * mem-break.cc (bp_size)
72 (bp_opcode)
73 (insert_memory_breakpoint)
74 (set_raw_breakpoint_at)
75 (delete_raw_breakpoint)
76 (z_type_supported)
77 (uninsert_raw_breakpoint)
78 (reinsert_raw_breakpoint)
79 (validate_inserted_breakpoint)
80 * regcache.cc (regcache_read_pc)
81 (regcache_write_pc)
82 * remote-utils.cc (putpkt_binary_1)
83 (input_interrupt)
84 (getpkt)
85 (prepare_resume_reply)
86 * server.cc (handle_general_set)
87 (handle_detach)
88 (handle_qxfer_auxv)
89 (handle_qxfer_exec_file)
90 (handle_qxfer_libraries_svr4)
91 (handle_qxfer_osdata)
92 (handle_qxfer_siginfo)
93 (handle_qxfer_fdpic)
94 (handle_query)
95 (resume)
96 (handle_v_requests)
97 (queue_stop_reply_callback)
98 (captured_main)
99 * target.cc (prepare_to_access_memory)
100 (done_accessing_memory)
101 (read_inferior_memory)
102 (target_write_memory)
103 (target_stop_and_wait)
104 (target_wait)
105 (target_mourn_inferior)
106 (target_continue_no_signal)
107 (target_continue)
108 (target_supports_multi_process)
109 (kill_inferior)
110 * target.h
111 (target_create_inferior)
112 (target_post_create_inferior)
113 (myattach)
114 (target_supports_fork_events)
115 (target_supports_vfork_events)
116 (target_supports_exec_events)
117 (target_handle_new_gdb_connection)
118 (detach_inferior)
119 (mythread_alive)
120 (fetch_inferior_registers)
121 (store_inferior_registers)
122 (join_inferior)
123 (target_supports_non_stop)
124 (target_async)
125 (target_process_qsupported)
126 (target_supports_catch_syscall)
127 (target_get_ipa_tdesc_idx)
128 (target_supports_tracepoints)
129 (target_supports_fast_tracepoints)
130 (target_get_min_fast_tracepoint_insn_len)
131 (target_thread_stopped)
132 (target_pause_all)
133 (target_unpause_all)
134 (target_stabilize_threads)
135 (target_install_fast_tracepoint_jump_pad)
136 (target_emit_ops)
137 (target_supports_disable_randomization)
138 (target_supports_agent)
139 (target_enable_btrace)
140 (target_disable_btrace)
141 (target_read_btrace)
142 (target_read_btrace_conf)
143 (target_supports_range_stepping)
144 (target_supports_stopped_by_sw_breakpoint)
145 (target_stopped_by_sw_breakpoint)
146 (target_supports_stopped_by_hw_breakpoint)
147 (target_supports_hardware_single_step)
148 (target_stopped_by_hw_breakpoint)
149 (target_breakpoint_kind_from_pc)
150 (target_breakpoint_kind_from_current_state)
151 (target_supports_software_single_step)
152 (target_core_of_thread)
153 (target_thread_name)
154 (target_thread_handle)
155 * win32-low.cc (do_initial_child_stuff)
156
157 Rename target op default definitions listed below.
158
159 * target.cc (process_target::post_create_inferior): Rename as ...
160 (process_stratum_target::post_create_inferior): ... this.
161 (process_target::prepare_to_access_memory): Rename as ...
162 (process_stratum_target::prepare_to_access_memory): ... this.
163 (process_target::done_accessing_memory): Rename as ...
164 (process_stratum_target::done_accessing_memory): ... this.
165 (process_target::look_up_symbols): Rename as ...
166 (process_stratum_target::look_up_symbols): ... this.
167 (process_target::supports_read_auxv): Rename as ...
168 (process_stratum_target::supports_read_auxv): ... this.
169 (process_target::read_auxv): Rename as ...
170 (process_stratum_target::read_auxv): ... this.
171 (process_target::supports_z_point_type): Rename as ...
172 (process_stratum_target::supports_z_point_type): ... this.
173 (process_target::insert_point): Rename as ...
174 (process_stratum_target::insert_point): ... this.
175 (process_target::remove_point): Rename as ...
176 (process_stratum_target::remove_point): ... this.
177 (process_target::stopped_by_sw_breakpoint): Rename as ...
178 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
179 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
180 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
181 (process_target::stopped_by_hw_breakpoint): Rename as ...
182 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
183 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
184 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
185 (process_target::supports_hardware_single_step): Rename as ...
186 (process_stratum_target::supports_hardware_single_step): ... this.
187 (process_target::stopped_by_watchpoint): Rename as ...
188 (process_stratum_target::stopped_by_watchpoint): ... this.
189 (process_target::stopped_data_address): Rename as ...
190 (process_stratum_target::stopped_data_address): ... this.
191 (process_target::supports_read_offsets): Rename as ...
192 (process_stratum_target::supports_read_offsets): ... this.
193 (process_target::read_offsets): Rename as ...
194 (process_stratum_target::read_offsets): ... this.
195 (process_target::supports_get_tls_address): Rename as ...
196 (process_stratum_target::supports_get_tls_address): ... this.
197 (process_target::get_tls_address): Rename as ...
198 (process_stratum_target::get_tls_address): ... this.
199 (process_target::hostio_last_error): Rename as ...
200 (process_stratum_target::hostio_last_error): ... this.
201 (process_target::supports_qxfer_osdata): Rename as ...
202 (process_stratum_target::supports_qxfer_osdata): ... this.
203 (process_target::qxfer_osdata): Rename as ...
204 (process_stratum_target::qxfer_osdata): ... this.
205 (process_target::supports_qxfer_siginfo): Rename as ...
206 (process_stratum_target::supports_qxfer_siginfo): ... this.
207 (process_target::qxfer_siginfo): Rename as ...
208 (process_stratum_target::qxfer_siginfo): ... this.
209 (process_target::supports_non_stop): Rename as ...
210 (process_stratum_target::supports_non_stop): ... this.
211 (process_target::async): Rename as ...
212 (process_stratum_target::async): ... this.
213 (process_target::start_non_stop): Rename as ...
214 (process_stratum_target::start_non_stop): ... this.
215 (process_target::supports_multi_process): Rename as ...
216 (process_stratum_target::supports_multi_process): ... this.
217 (process_target::supports_fork_events): Rename as ...
218 (process_stratum_target::supports_fork_events): ... this.
219 (process_target::supports_vfork_events): Rename as ...
220 (process_stratum_target::supports_vfork_events): ... this.
221 (process_target::supports_exec_events): Rename as ...
222 (process_stratum_target::supports_exec_events): ... this.
223 (process_target::handle_new_gdb_connection): Rename as ...
224 (process_stratum_target::handle_new_gdb_connection): ... this.
225 (process_target::handle_monitor_command): Rename as ...
226 (process_stratum_target::handle_monitor_command): ... this.
227 (process_target::core_of_thread): Rename as ...
228 (process_stratum_target::core_of_thread): ... this.
229 (process_target::supports_read_loadmap): Rename as ...
230 (process_stratum_target::supports_read_loadmap): ... this.
231 (process_target::read_loadmap): Rename as ...
232 (process_stratum_target::read_loadmap): ... this.
233 (process_target::process_qsupported): Rename as ...
234 (process_stratum_target::process_qsupported): ... this.
235 (process_target::supports_tracepoints): Rename as ...
236 (process_stratum_target::supports_tracepoints): ... this.
237 (process_target::read_pc): Rename as ...
238 (process_stratum_target::read_pc): ... this.
239 (process_target::write_pc): Rename as ...
240 (process_stratum_target::write_pc): ... this.
241 (process_target::supports_thread_stopped): Rename as ...
242 (process_stratum_target::supports_thread_stopped): ... this.
243 (process_target::thread_stopped): Rename as ...
244 (process_stratum_target::thread_stopped): ... this.
245 (process_target::supports_get_tib_address): Rename as ...
246 (process_stratum_target::supports_get_tib_address): ... this.
247 (process_target::get_tib_address): Rename as ...
248 (process_stratum_target::get_tib_address): ... this.
249 (process_target::pause_all): Rename as ...
250 (process_stratum_target::pause_all): ... this.
251 (process_target::unpause_all): Rename as ...
252 (process_stratum_target::unpause_all): ... this.
253 (process_target::stabilize_threads): Rename as ...
254 (process_stratum_target::stabilize_threads): ... this.
255 (process_target::supports_fast_tracepoints): Rename as ...
256 (process_stratum_target::supports_fast_tracepoints): ... this.
257 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
258 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
259 (process_target::emit_ops): Rename as ...
260 (process_stratum_target::emit_ops): ... this.
261 (process_target::supports_disable_randomization): Rename as ...
262 (process_stratum_target::supports_disable_randomization): ... this.
263 (process_target::supports_qxfer_libraries_svr4): Rename as ...
264 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
265 (process_target::qxfer_libraries_svr4): Rename as ...
266 (process_stratum_target::qxfer_libraries_svr4): ... this.
267 (process_target::supports_agent): Rename as ...
268 (process_stratum_target::supports_agent): ... this.
269 (process_target::enable_btrace): Rename as ...
270 (process_stratum_target::enable_btrace): ... this.
271 (process_target::disable_btrace): Rename as ...
272 (process_stratum_target::disable_btrace): ... this.
273 (process_target::read_btrace): Rename as ...
274 (process_stratum_target::read_btrace): ... this.
275 (process_target::read_btrace_conf): Rename as ...
276 (process_stratum_target::read_btrace_conf): ... this.
277 (process_target::supports_range_stepping): Rename as ...
278 (process_stratum_target::supports_range_stepping): ... this.
279 (process_target::supports_pid_to_exec_file): Rename as ...
280 (process_stratum_target::supports_pid_to_exec_file): ... this.
281 (process_target::pid_to_exec_file): Rename as ...
282 (process_stratum_target::pid_to_exec_file): ... this.
283 (process_target::supports_multifs): Rename as ...
284 (process_stratum_target::supports_multifs): ... this.
285 (process_target::multifs_open): Rename as ...
286 (process_stratum_target::multifs_open): ... this.
287 (process_target::multifs_unlink): Rename as ...
288 (process_stratum_target::multifs_unlink): ... this.
289 (process_target::multifs_readlink): Rename as ...
290 (process_stratum_target::multifs_readlink): ... this.
291 (process_target::breakpoint_kind_from_pc): Rename as ...
292 (process_stratum_target::breakpoint_kind_from_pc): ... this.
293 (process_target::breakpoint_kind_from_current_state): Rename as ...
294 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
295 (process_target::thread_name): Rename as ...
296 (process_stratum_target::thread_name): ... this.
297 (process_target::thread_handle): Rename as ...
298 (process_stratum_target::thread_handle): ... this.
299 (process_target::supports_software_single_step): Rename as ...
300 (process_stratum_target::supports_software_single_step): ... this.
301 (process_target::supports_catch_syscall): Rename as ...
302 (process_stratum_target::supports_catch_syscall): ... this.
303 (process_target::get_ipa_tdesc_idx): Rename as ...
304 (process_stratum_target::get_ipa_tdesc_idx): ... this.
305
306 2020-02-20 Pedro Alves <palves@redhat.com>
307
308 * target.cc (set_target_ops): Simply copy the given target pointer
309 instead of creating a copy of the pointed object.
310
311 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
312
313 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
314 of process_target.
315
316 * target.h (struct process_stratum_target): Remove the target op.
317 (class process_target): Add the target op.
318 (target_get_ipa_tdesc_idx): Update the macro.
319 * target.cc (process_target::get_ipa_tdesc_idx): Define.
320
321 Update the derived classes and callers below.
322
323 * linux-low.cc (linux_target_ops): Update.
324 (linux_get_ipa_tdesc_idx): Turn into ...
325 (linux_process_target::get_ipa_tdesc_idx): ... this.
326 * linux-low.h (class linux_process_target): Update.
327 * lynx-low.cc (lynx_target_ops): Update.
328 * nto-low.cc (nto_target_ops): Update.
329 * win32-low.cc (win32_target_ops): Update.
330
331 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
332
333 Turn process_stratum_target's supports_catch_syscall op into a
334 method of process_target.
335
336 * target.h (struct process_stratum_target): Remove the target op.
337 (class process_target): Add the target op.
338 (target_supports_catch_syscall): Update the macro.
339 * target.cc (process_target::supports_catch_syscall): Define.
340
341 Update the derived classes and callers below.
342
343 * linux-low.cc (linux_target_ops): Update.
344 (linux_supports_catch_syscall): Turn into ...
345 (linux_process_target::supports_catch_syscall): ... this.
346 * linux-low.h (class linux_process_target): Update.
347 * lynx-low.cc (lynx_target_ops): Update.
348 * nto-low.cc (nto_target_ops): Update.
349 * win32-low.cc (win32_target_ops): Update.
350
351 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
352
353 Turn process_stratum_target's supports_software_single_step op
354 into a method of process_target.
355
356 * target.h (struct process_stratum_target): Remove the target op.
357 (class process_target): Add the target op.
358 (target_supports_software_single_step): Update the macro.
359 * target.cc (process_target::supports_software_single_step): Define.
360
361 Update the derived classes and callers below.
362
363 * linux-low.cc (linux_target_ops): Update.
364 (linux_supports_software_single_step): Turn into ...
365 (linux_process_target::supports_software_single_step): ... this.
366 * linux-low.h (class linux_process_target): Update.
367 * lynx-low.cc (lynx_target_ops): Update.
368 * nto-low.cc (nto_target_ops): Update.
369 * win32-low.cc (win32_target_ops): Update.
370
371 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
372
373 Turn process_stratum_target's thread_name and thread_handle ops
374 into methods of process_target.
375
376 * target.h (struct process_stratum_target): Remove the target ops.
377 (class process_target): Add the target ops.
378 (target_thread_name): Update the macro.
379 (target_thread_handle): Update the macro.
380 * target.cc (process_target::thread_name): Define.
381 (process_target::thread_handle): Define.
382
383 Update the derived classes and callers below.
384
385 * linux-low.cc (linux_target_ops): Update.
386 (linux_process_target::thread_name): Define.
387 (linux_process_target::thread_handle): Define.
388 * linux-low.h (class linux_process_target): Update.
389 * lynx-low.cc (lynx_target_ops): Update.
390 * nto-low.cc (nto_target_ops): Update.
391 * win32-low.cc (win32_target_ops): Update.
392
393 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
394
395 Turn process_stratum_target's breakpoint_kind_from_pc,
396 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
397 ops into methods of process_target.
398
399 * target.h (struct process_stratum_target): Remove the target op.
400 (class process_target): Add the target op.
401 (target_breakpoint_kind_from_pc): Update the macro.
402 (target_breakpoint_kind_from_current_state): Update the macro.
403 (default_breakpoint_kind_from_pc): Remove declaration.
404 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
405 (process_target::breakpoint_kind_from_pc): ... this.
406 (process_target::breakpoint_kind_from_current_state): Define.
407
408 Update the derived classes and callers below.
409
410 * mem-break.cc (bp_size): Update.
411 (bp_opcode): Update.
412 * linux-low.cc (linux_target_ops): Update.
413 (linux_wait_1): Update.
414 (linux_breakpoint_kind_from_pc): Turn into ...
415 (linux_process_target::breakpoint_kind_from_pc): ... this.
416 (linux_sw_breakpoint_from_kind): Turn into ...
417 (linux_process_target::sw_breakpoint_from_kind): ... this.
418 (linux_breakpoint_kind_from_current_state): Turn into ...
419 (linux_process_target::breakpoint_kind_from_current_state): ... this.
420 * linux-low.h (class linux_process_target): Update.
421 * lynx-low.cc (lynx_target_ops): Update.
422 (lynx_process_target::sw_breakpoint_from_kind): Define.
423 * lynx-low.h (class lynx_process_target): Update.
424 * nto-low.cc (nto_target_ops): Update.
425 (nto_sw_breakpoint_from_kind): Turn into ...
426 (nto_process_target::sw_breakpoint_from_kind): ... this.
427 * nto-low.h (class nto_process_target): Update.
428 * win32-low.cc (win32_target_ops): Update.
429 (win32_sw_breakpoint_from_kind): Turn into ...
430 (win32_process_target::sw_breakpoint_from_kind): ... this.
431 * win32-low.h (class win32_process_target): Update.
432
433 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
434
435 Turn process_stratum_target's multifs_open, multifs_readlink,
436 multifs_unlink ops into methods of process_target.
437
438 * target.h (struct process_stratum_target): Remove the target ops.
439 (class process_target): Add the target ops. Also add
440 'supports_multifs'.
441 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
442 "sys/stat.h".
443 (process_target::supports_multifs): Define.
444 (process_target::multifs_open): Define.
445 (process_target::multifs_readlink): Define.
446 (process_target::multifs_unlink): Define.
447
448 Update the derived classes and callers below.
449
450 * hostio.cc (handle_setfs): Update.
451 (handle_open): Update.
452 (handle_unlink): Update.
453 (handle_readlink): Update.
454 * linux-low.cc (linux_target_ops): Update.
455 (linux_process_target::supports_multifs): Define.
456 (linux_process_target::multifs_open): Define.
457 (linux_process_target::multifs_readlink): Define.
458 (linux_process_target::multifs_unlink): Define.
459 * linux-low.h (class linux_process_target): Update.
460 * lynx-low.cc (lynx_target_ops): Update.
461 * nto-low.cc (nto_target_ops): Update.
462 * win32-low.cc (win32_target_ops): Update.
463
464 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
465
466 Turn process_stratum_target's pid_to_exec_file op into a method
467 of process_target.
468
469 * target.h (struct process_stratum_target): Remove the target op.
470 (class process_target): Add the target op. Also add
471 'supports_pid_to_exec_file'.
472 * target.cc (process_target::pid_to_exec_file): Define.
473 (process_target::supports_pid_to_exec_file): Define.
474
475 Update the derived classes and callers below.
476
477 * server.cc (handle_qxfer_exec_file): Update.
478 (handle_query): Update.
479 * linux-low.cc (linux_target_ops): Update.
480 (linux_process_target::supports_pid_to_exec_file): Define.
481 (linux_process_target::pid_to_exec_file): Define.
482 * linux-low.h (class linux_process_target): Update.
483 * lynx-low.cc (lynx_target_ops): Update.
484 * nto-low.cc (nto_target_ops): Update.
485 * win32-low.cc (win32_target_ops): Update.
486
487 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
488
489 Turn process_stratum_target's supports_range_stepping op into a
490 method of process_target.
491
492 * target.h (struct process_stratum_target): Remove the target op.
493 (class process_target): Add the target op.
494 (target_supports_range_stepping): Update the macro.
495 * target.cc (process_target::supports_range_stepping): Define.
496
497 Update the derived classes and callers below.
498
499 * linux-low.cc (linux_target_ops): Update.
500 (linux_supports_range_stepping): Turn into ...
501 (linux_process_target::supports_range_stepping): ... this.
502 * linux-low.h (class linux_process_target): Update.
503 * lynx-low.cc (lynx_target_ops): Update.
504 * nto-low.cc (nto_target_ops): Update.
505 * win32-low.cc (win32_target_ops): Update.
506
507 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
508
509 Turn process_stratum_target's btrace-related ops (enable_btrace,
510 disable_btrace, read_btrace, read_btrace_conf) into methods of
511 process_target.
512
513 * target.h (struct process_stratum_target): Remove the target ops.
514 (class process_target): Add the target ops.
515 (target_enable_btrace): Update.
516 (target_disable_btrace): Update.
517 (target_read_btrace): Update.
518 (target_read_btrace_conf): Update.
519 * target.cc (process_target::enable_btrace): Define.
520 (process_target::disable_btrace): Define.
521 (process_target::read_btrace): Define.
522 (process_target::read_btrace_conf): Define.
523
524 Update the derived classes and callers below.
525
526 * linux-low.cc (linux_target_ops): Update.
527 (linux_process_target:enable_btrace): Define as a wrapper around
528 linux_enable_btrace.
529 (linux_low_disable_btrace): Turn into ...
530 (linux_process_target::disable_btrace): ... this.
531 (linux_low_read_btrace): Turn into ...
532 (linux_process_target::read_btrace): ... this.
533 (linux_low_btrace_conf): Turn into ...
534 (linux_process_target::read_btrace_conf): ... this.
535 * linux-low.h (class linux_process_target): Update.
536 * lynx-low.cc (lynx_target_ops): Update.
537 * nto-low.cc (nto_target_ops): Update.
538 * win32-low.cc (win32_target_ops): Update.
539
540 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
541
542 Turn process_stratum_target's supports_agent op into a method of
543 process_target.
544
545 * target.h (struct process_stratum_target): Remove the target op.
546 (class process_target): Add the target op.
547 (target_supports_agent): Update the macro.
548 * target.cc (process_target::supports_agent): Define.
549
550 Update the derived classes and callers below.
551
552 * linux-low.cc (linux_target_ops): Update.
553 (linux_supports_agent): Turn into ...
554 (linux_process_target::supports_agent): ... this.
555 * linux-low.h (class linux_process_target): Update.
556 * lynx-low.cc (lynx_target_ops): Update.
557 * nto-low.cc (nto_target_ops): Update.
558 * win32-low.cc (win32_target_ops): Update.
559
560 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
561
562 Turn process_stratum_target's qxfer_libraries_svr4 op into a
563 method of process_target.
564
565 * target.h (struct process_stratum_target): Remove the target op.
566 (class process_target): Add the target op. Also add
567 'supports_qxfer_libraries_svr4'.
568 * target.cc (process_target::qxfer_libraries_svr4): Define.
569 (process_target::supports_qxfer_libraries_svr4): Define.
570
571 Update the derived classes and callers below.
572
573 * server.cc (handle_qxfer_libraries_svr4): Update.
574 (handle_query): Update.
575 * linux-low.cc (linux_target_ops): Update.
576 (linux_process_target::supports_qxfer_libraries_svr4): Define.
577 (linux_qxfer_libraries_svr4): Turn into ...
578 (linux_process_target::qxfer_libraries_svr4): ... this.
579 * linux-low.h (class linux_process_target): Update.
580 * lynx-low.cc (lynx_target_ops): Update.
581 * nto-low.cc (nto_target_ops): Update.
582 * win32-low.cc (win32_target_ops): Update.
583
584 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
585
586 Turn process_stratum_target's supports_disable_randomization op
587 into a method of process_target.
588
589 * target.h (struct process_stratum_target): Remove the target op.
590 (class process_target): Add the target op.
591 (target_supports_disable_randomization): Update the macro.
592 * target.cc (process_target::supports_disable_randomization): Define.
593
594 Update the derived classes and callers below.
595
596 * linux-low.cc (linux_target_ops): Update.
597 (linux_supports_disable_randomization): Turn into ...
598 (linux_process_target::supports_disable_randomization): ... this.
599 * linux-low.h (class linux_process_target): Update.
600 * lynx-low.cc (lynx_target_ops): Update.
601 * nto-low.cc (nto_target_ops): Update.
602 * win32-low.cc (win32_target_ops): Update.
603
604 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
605
606 Turn process_stratum_target's emit_ops op into a method of
607 process_target.
608
609 * target.h (struct process_stratum_target): Remove the target op.
610 (class process_target): Add the target op.
611 (target_emit_ops): Update the macro.
612 * target.cc (process_target::emit_ops): Define.
613
614 Update the derived classes and callers below.
615
616 * linux-low.cc (linux_target_ops): Update.
617 (linux_emit_ops): Turn into ...
618 (linux_process_target::emit_ops): ... this.
619 * linux-low.h (class linux_process_target): Update.
620 * lynx-low.cc (lynx_target_ops): Update.
621 * nto-low.cc (nto_target_ops): Update.
622 * win32-low.cc (win32_target_ops): Update.
623
624 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
625
626 Turn process_stratum_target's install_fast_tracepoint_jump_pad
627 and get_min_fast_tracepoint_insn_len ops into methods of
628 process_target.
629
630 * target.h (struct process_stratum_target): Remove the target ops.
631 (class process_target): Add the target ops. Also add
632 'supports_fast_tracepoints'.
633 (target_supports_fast_tracepoints): Update the macro.
634 (target_get_min_fast_tracepoint_insn_len): Update the macro.
635 (install_fast_tracepoint_jump_pad): Update and rename the macro
636 to ...
637 (target_install_fast_tracepoint_jump_pad): ... this.
638 * target.cc (process_target::supports_fast_tracepoints): Define.
639 (process_target::install_fast_tracepoint_jump_pad): Define.
640 (process_target::get_min_fast_tracepoint_insn_len): Define.
641
642 Update the derived classes and callers below.
643
644 * tracepoint.cc (install_fast_tracepoint): Update.
645 * linux-low.cc (linux_target_ops): Update.
646 (linux_process_target::supports_fast_tracepoints): Define.
647 (linux_install_fast_tracepoint_jump_pad): Turn into ...
648 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
649 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
650 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
651 * linux-low.h (class linux_process_target): Update.
652 * lynx-low.cc (lynx_target_ops): Update.
653 * nto-low.cc (nto_target_ops): Update.
654 * win32-low.cc (win32_target_ops): Update.
655
656 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
657
658 Turn process_stratum_target's stabilize_threads op into a
659 method of process_target.
660
661 * target.h (struct process_stratum_target): Remove the target op.
662 (class process_target): Add the target op.
663 (target_stabilize_threads): Update the macro.
664 * target.cc (process_target::stabilize_threads): Define.
665
666 Update the derived classes and callers below.
667
668 * server.cc (handle_status): Update.
669 * tracepoint.cc (cmd_qtdp): Update.
670 (cmd_qtstart): Update.
671 * linux-low.cc (linux_target_ops): Update.
672 (linux_stabilize_threads): Turn into ...
673 (linux_process_target::stabilize_threads): ... this.
674 (linux_wait_1): Update.
675 * linux-low.h (class linux_process_target): Update.
676 * lynx-low.cc (lynx_target_ops): Update.
677 * nto-low.cc (nto_target_ops): Update.
678 * win32-low.cc (win32_target_ops): Update.
679
680 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
681
682 Turn process_stratum_target's pause_all and unpause_all ops
683 into methods of process_target.
684
685 * target.h (struct process_stratum_target): Remove the target ops.
686 (class process_target): Add the target ops.
687 (pause_all): Update the macro and rename to...
688 (target_pause_all): ... this.
689 (unpause_all): Update the macro and rename to...
690 (target_unpause_all): ... this.
691 * target.cc (process_target::pause_all): Define.
692 (process_target::unpause_all): Define.
693
694 Update the derived classes and callers below.
695
696 * server.cc (handle_status): Update.
697 * tracepoint.cc (clear_installed_tracepoints): Update.
698 (cmd_qtdp): Update.
699 (cmd_qtstart): Update.
700 (stop_tracing): Update.
701 (cmd_qtstatus): Update.
702 (upload_fast_traceframes): Update.
703 (run_inferior_command): Update.
704 * linux-low.cc (linux_target_ops): Update.
705 (linux_pause_all): Turn into ...
706 (linux_process_target::pause_all): ... this.
707 (linux_unpause_all): Turn into ...
708 (linux_process_target::unpause_all): ... this.
709 (linux_process_target::prepare_to_access_memory): Update.
710 (linux_process_target::done_accessing_memory): Update.
711 * linux-low.h (class linux_process_target): Update.
712 * lynx-low.cc (lynx_target_ops): Update.
713 * nto-low.cc (nto_target_ops): Update.
714 * win32-low.cc (win32_target_ops): Update.
715
716 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
717
718 Turn process_stratum_target's get_tib_address op into a method of
719 process_target.
720
721 * target.h (struct process_stratum_target): Remove the target op.
722 (class process_target): Add the target op. Also add
723 'supports_get_tib_address'.
724 * target.cc (process_target::get_tib_address): Define.
725 (process_target::supports_get_tib_address): Define.
726
727 Update the derived classes and callers below.
728
729 * server.cc (handle_query): Update.
730 * linux-low.cc (win32_target_ops): Update.
731 * lynx-low.cc (lynx_target_ops): Update.
732 * nto-low.cc (nto_target_ops): Update.
733 * win32-low.cc (win32_target_ops): Update.
734 (win32_process_target::supports_get_tib_address): Define.
735 (win32_get_tib_address): Turn into ...
736 (win32_process_target::get_tib_address): ... this.
737 * win32-low.h (class win32_process_target): Update.
738
739 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
740
741 Turn process_stratum_target's thread_stopped op into a method of
742 process_target.
743
744 * target.h (struct process_stratum_target): Remove the target op.
745 (class process_target): Add the target op. Also add
746 'supports_thread_stopped'.
747 (target_thread_stopped): Update the macro.
748 * target.cc (process_target::thread_stopped): Define.
749 (process_target::supports_thread_stopped): Define.
750 (prepare_to_access_memory): Update.
751
752 Update the derived classes and callers below.
753
754 * server.cc (queue_stop_reply_callback): Update.
755 * linux-low.cc (linux_target_ops): Update.
756 (linux_process_target::supports_thread_stopped): Define.
757 (linux_thread_stopped): Turn into ...
758 (linux_process_target::thread_stopped): ... this.
759 * linux-low.h (class linux_process_target): Update.
760 * lynx-low.cc (lynx_target_ops): Update.
761 * nto-low.cc (nto_target_ops): Update.
762 * win32-low.cc (win32_target_ops): Update.
763
764 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
765
766 Turn process_stratum_target's read_pc and write_pc ops into
767 methods of process_target.
768
769 * target.h (struct process_stratum_target): Remove the target ops.
770 (class process_target): Add the target ops.
771 * target.cc (process_target::read_pc): Define.
772 (process_target::write_pc): Define.
773
774 Update the derived classes and callers below.
775
776 * regcache.cc (regcache_read_pc): Update.
777 (regcache_write_pc): Update.
778 * linux-low.cc (linux_target_ops): Update.
779 (linux_read_pc): Turn into ...
780 (linux_process_target::read_pc): ... this.
781 (linux_write_pc): Turn into ...
782 (linux_process_target::write_pc): ... this.
783 * linux-low.h (class linux_process_target): Update.
784 * lynx-low.cc (lynx_target_ops): Update.
785 * nto-low.cc (nto_target_ops): Update.
786 * win32-low.cc (win32_target_ops): Update.
787
788 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
789
790 Turn process_stratum_target's supports_tracepoints op into a
791 method of process_target.
792
793 * target.h (struct process_stratum_target): Remove the target op.
794 (class process_target): Add the target op.
795 (target_supports_tracepoints): Update the macro.
796 * target.cc (process_target::supports_tracepoints): Define.
797
798 Update the derived classes and callers below.
799
800 * linux-low.cc (linux_target_ops): Update.
801 (linux_supports_tracepoints): Turn into ...
802 (linux_process_target::supports_tracepoints): ... this.
803 * linux-low.h (class linux_process_target): Update.
804 * lynx-low.cc (lynx_target_ops): Update.
805 * nto-low.cc (nto_target_ops): Update.
806 * win32-low.cc (win32_target_ops): Update.
807
808 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
809
810 Turn process_stratum_target's process_qsupported op into a method
811 of process_target.
812
813 * target.h (struct process_stratum_target): Remove the target op.
814 (class process_target): Add the target op.
815 (target_process_qsupported): Update the macro.
816 * target.cc (process_target::process_qsupported): Define.
817
818 Update the derived classes and callers below.
819
820 * linux-low.cc (linux_target_ops): Update.
821 (linux_process_qsupported): Turn into ...
822 (linux_process_target::process_qsupported): ... this.
823 * linux-low.h (class linux_process_target): Update.
824 * lynx-low.cc (lynx_target_ops): Update.
825 * nto-low.cc (nto_target_ops): Update.
826 * win32-low.cc (win32_target_ops): Update.
827
828 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
829
830 Turn process_stratum_target's read_loadmap op into a method of
831 process_target.
832
833 * target.h (struct process_stratum_target): Remove the target op.
834 (class process_target): Add the target op. Also add
835 'supports_read_loadmap'.
836 * target.cc (process_target::read_loadmap): Define.
837 (process_target::supports_read_loadmap): Define.
838
839 Update the derived classes and callers below.
840
841 * server.cc (handle_qxfer_fdpic): Update.
842 (handle_query): Update.
843 * linux-low.cc (linux_target_ops): Update.
844 (linux_process_target::supports_read_loadmap): Define.
845 (linux_read_loadmap): Turn into ...
846 (linux_process_target::read_loadmap): ... this.
847 * linux-low.h (class linux_process_target): Update.
848 * lynx-low.cc (lynx_target_ops): Update.
849 * nto-low.cc (nto_target_ops): Update.
850 * win32-low.cc (win32_target_ops): Update.
851
852 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
853
854 Turn process_stratum_target's core_of_thread op into a method of
855 process_target.
856
857 * target.h (struct process_stratum_target): Remove the target op.
858 (class process_target): Add the target op.
859 (target_core_of_thread): Update the macro.
860 * target.cc (process_target::core_of_thread): Define.
861
862 Update the derived classes and callers below.
863
864 * linux-low.cc (linux_target_ops): Update.
865 (linux_process_target::core_of_thread): Define.
866 * linux-low.h (class linux_process_target): Update.
867 * lynx-low.cc (lynx_target_ops): Update.
868 * nto-low.cc (nto_target_ops): Update.
869 * win32-low.cc (win32_target_ops): Update.
870
871 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
872
873 Turn process_stratum_target's handle_monitor_command op into a
874 method of process_target.
875
876 * target.h (struct process_stratum_target): Remove the target op.
877 (class process_target): Add the target op.
878 (target_handle_monitor_command): Update the macro.
879 * target.cc (process_target::handle_monitor_command): Define.
880
881 Update the derived classes and callers below.
882
883 * server.cc (handle_query): Update.
884 * linux-low.cc (linux_target_ops): Update.
885 (linux_process_target::handle_monitor_command): Define.
886 * linux-low.h (class linux_process_target): Update.
887 * lynx-low.cc (lynx_target_ops): Update.
888 * nto-low.cc (nto_target_ops): Update.
889 * win32-low.cc (win32_target_ops): Update.
890
891 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
892
893 Turn process_stratum_target's handle_new_gdb_connection op into a
894 method of process_target.
895
896 * target.h (struct process_stratum_target): Remove the target op.
897 (class process_target): Add the target op.
898 (target_handle_new_gdb_connection): Update the macro.
899 * target.cc (process_target::handle_new_gdb_connection): Define.
900
901 Update the derived classes and callers below.
902
903 * linux-low.cc (linux_target_ops): Update.
904 (linux_handle_new_gdb_connection): Turn into ...
905 (linux_process_target::handle_new_gdb_connection): ... this.
906 * linux-low.h (class linux_process_target): Update.
907 * lynx-low.cc (lynx_target_ops): Update.
908 * nto-low.cc (nto_target_ops): Update.
909 * win32-low.cc (win32_target_ops): Update.
910
911 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
912
913 Turn process_stratum_target's supports_fork_events,
914 supports_vfork_events, and supports_exec_events ops into methods
915 of process_target.
916
917 * target.h (struct process_stratum_target): Remove the target ops.
918 (class process_target): Add the target ops.
919 (target_supports_fork_events): Update the macro.
920 (target_supports_vfork_events): Update the macro.
921 (target_supports_exec_events): Update the macro.
922 * target.cc (process_target::supports_fork_events): Define.
923 (process_target::supports_vfork_events): Define.
924 (process_target::supports_exec_events): Define.
925
926 Update the derived classes and callers below.
927
928 * linux-low.cc (linux_target_ops): Update.
929 (linux_supports_fork_events): Turn into ...
930 (linux_process_target::supports_fork_events): ... this.
931 (linux_supports_vfork_events): Turn into ...
932 (linux_process_target::supports_vfork_events): ... this.
933 (linux_supports_exec_events): Turn into ...
934 (linux_process_target::supports_exec_events): ... this.
935 * linux-low.h (class linux_process_target): Update.
936 * lynx-low.cc (lynx_target_ops): Update.
937 * nto-low.cc (nto_target_ops): Update.
938 * win32-low.cc (win32_target_ops): Update.
939
940 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
941
942 Turn process_stratum_target's supports_multi_process op into a
943 method of process_target.
944
945 * target.h (struct process_stratum_target): Remove the target op.
946 (class process_target): Add the target op.
947 * target.cc (process_target::supports_multi_process): Define.
948 (target_supports_multi_process): Update.
949
950 Update the derived classes and callers below.
951
952 * linux-low.cc (linux_target_ops): Update.
953 (linux_supports_multi_process): Turn into ...
954 (linux_process_target::supports_multi_process): ... this.
955 * linux-low.h (class linux_process_target): Update.
956 * lynx-low.cc (lynx_target_ops): Update.
957 * nto-low.cc (nto_target_ops): Update.
958 * win32-low.cc (win32_target_ops): Update.
959
960 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
961
962 Turn process_stratum_target's supports_non_stop, async, and
963 start_non_stop ops into methods of process_target.
964
965 * target.h (struct process_stratum_target): Remove the target ops.
966 (class process_target): Add the target ops.
967 (target_supports_non_stop): Update the macro.
968 (target_async): Update the macro.
969 (start_non_stop): Remove declaration.
970 * target.cc (process_target::supports_non_stop): Define.
971 (process_target::async): Define.
972 (process_target::start_non_stop): Define.
973 (start_non_stop): Remove.
974
975 Update the derived classes and callers below.
976
977 * server.cc (handle_qxfer_siginfo): Update.
978 (handle_query): Update.
979 * linux-low.cc (linux_target_ops): Update.
980 (linux_supports_non_stop): Turn into ...
981 (linux_process_target::supports_non_stop): ... this.
982 (linux_async): Turn into ...
983 (linux_process_target::async): ... this.
984 (linux_start_non_stop): Turn into ...
985 (linux_process_target::start_non_stop): ... this.
986 * linux-low.h (class linux_process_target): Update.
987 * lynx-low.cc (lynx_target_ops): Update.
988 * nto-low.cc (nto_target_ops): Update.
989 (nto_supports_non_stop): Remove; rely on the default behavior
990 instead.
991 * win32-low.cc (win32_target_ops): Update.
992
993 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
994
995 Turn process_stratum_target's qxfer_siginfo op into a method of
996 process_target.
997
998 * target.h (struct process_stratum_target): Remove the target op.
999 (class process_target): Add the target op. Also add
1000 'supports_qxfer_siginfo'.
1001 * target.cc (process_target::qxfer_siginfo): Define.
1002 (process_target::supports_qxfer_siginfo): Define.
1003
1004 Update the derived classes and callers below.
1005
1006 * server.cc (handle_qxfer_siginfo): Update.
1007 (handle_query): Update.
1008 * linux-low.cc (linux_target_ops): Update.
1009 (linux_process_target::supports_qxfer_siginfo): Define.
1010 (linux_xfer_siginfo): Turn into ...
1011 (linux_process_target::qxfer_siginfo): ... this.
1012 * linux-low.h (class linux_process_target): Update.
1013 * lynx-low.cc (lynx_target_ops): Update.
1014 * nto-low.cc (nto_target_ops): Update.
1015 * win32-low.cc (win32_target_ops): Update.
1016
1017 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1018
1019 Turn process_stratum_target's qxfer_osdata op into a method of
1020 process_target.
1021
1022 * target.h (struct process_stratum_target): Remove the target op.
1023 (class process_target): Add the target op. Also add
1024 'supports_qxfer_osdata'.
1025 * target.cc (process_target::qxfer_osdata): Define.
1026 (process_target::supports_qxfer_osdata): Define.
1027
1028 Update the derived classes and callers below.
1029
1030 * server.cc (handle_qxfer_osdata): Update.
1031 (handle_query): Update.
1032 * linux-low.cc (linux_target_ops): Update.
1033 (linux_process_target::supports_qxfer_osdata): Define.
1034 (linux_qxfer_osdata): Turn into ...
1035 (linux_process_target::qxfer_osdata): ... this.
1036 * linux-low.h (class linux_process_target): Update.
1037 * lynx-low.cc (lynx_target_ops): Update.
1038 * nto-low.cc (nto_target_ops): Update.
1039 * win32-low.cc (win32_target_ops): Update.
1040
1041 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1042
1043 Turn process_stratum_target's hostio_last_error op into a
1044 method of process_target.
1045
1046 * target.h (struct process_stratum_target): Remove the target op.
1047 (class process_target): Add the target op.
1048 * target.cc: Add "hostio.h" to includes.
1049 (process_target::hostio_last_error): Define.
1050
1051 Update the derived classes and callers below.
1052
1053 * hostio.cc (hostio_error): Update.
1054 * linux-low.cc: Remove "hostio.h" from includes.
1055 (linux_target_ops): Update.
1056 * lynx-low.cc (lynx_target_ops): Update.
1057 * nto-low.cc (nto_target_ops): Update.
1058 * win32-low.h (class win32_process_target): Update.
1059 * win32-low.cc (win32_target_ops): Update.
1060 (wince_hostio_last_error): Turn into ...
1061 (win32_process_target::hostio_last_error): ... this.
1062
1063 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1064
1065 Turn process_stratum_target's get_tls_address op into a method of
1066 process_target.
1067
1068 * target.h (struct process_stratum_target): Remove the target op.
1069 (class process_target): Add the target op. Also add
1070 'supports_get_tls_address'.
1071 * target.cc (process_target::get_tls_address): Define.
1072 (process_target::supports_get_tls_address): Define.
1073
1074 Update the derived classes and callers below.
1075
1076 * server.cc (handle_query): Update.
1077 * linux-low.cc (linux_target_ops): Update.
1078 (linux_process_target::supports_get_tls_address): Define.
1079 (linux_process_target::get_tls_address): Define.
1080 * linux-low.h (class linux_process_target): Update.
1081 * lynx-low.cc (lynx_target_ops): Update.
1082 * nto-low.cc (nto_target_ops): Update.
1083 * win32-low.cc (win32_target_ops): Update.
1084
1085 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1086
1087 Turn process_stratum_target's read_offsets op into a method of
1088 process_target.
1089
1090 * target.h (struct process_stratum_target): Remove the target op.
1091 (class process_target): Add the target op. Also add
1092 'supports_read_offsets'.
1093 * target.cc (process_target::read_offsets): Define.
1094 (process_target::supports_read_offsets): Define.
1095
1096 Update the derived classes and callers below.
1097
1098 * server.cc (handle_query): Update.
1099 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
1100 (linux_target_ops): Update.
1101 (linux_process_target::supports_read_offsets): Define.
1102 (linux_read_offsets): Turn into ...
1103 (linux_process_target::read_offsets): ... this.
1104 * linux-low.h (class linux_process_target): Update.
1105 * lynx-low.cc (lynx_target_ops): Update.
1106 * nto-low.cc (nto_target_ops): Update.
1107 * win32-low.cc (win32_target_ops): Update.
1108
1109 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1110
1111 Turn process_stratum_target's stopped_by_watchpoint and
1112 stopped_data_address ops into methods of process_target.
1113
1114 * target.h (struct process_stratum_target): Remove the target ops.
1115 (class process_target): Add the target ops.
1116 * target.cc (process_target::stopped_by_watchpoint): Define.
1117 (process_target::stopped_data_address): Define.
1118
1119 Update the derived classes and callers below.
1120
1121 * remote-utils.cc (prepare_resume_reply): Update.
1122 * linux-low.cc (linux_target_ops): Update.
1123 (linux_stopped_by_watchpoint): Turn into ...
1124 (linux_process_target::stopped_by_watchpoint): ... this.
1125 (linux_stopped_data_address): Turn into ...
1126 (linux_process_target::stopped_data_address): ... this.
1127 * linux-low.h (class linux_process_target): Update.
1128 * lynx-low.cc (lynx_target_ops): Update.
1129 * nto-low.cc (nto_target_ops): Update.
1130 (nto_stopped_by_watchpoint): Turn into ...
1131 (nto_process_target::stopped_by_watchpoint): ... this.
1132 (nto_stopped_data_address): Turn into ...
1133 (nto_process_target::stopped_data_address): ... this.
1134 * nto-low.h (class nto_process_target): Update.
1135 * win32-low.cc (win32_target_ops): Update.
1136 (win32_stopped_by_watchpoint): Turn into ...
1137 (win32_process_target::stopped_by_watchpoint): ... this.
1138 (win32_stopped_data_address): Turn into ...
1139 (win32_process_target::stopped_data_address): ... this.
1140 * win32-low.h (class win32_process_target): Update.
1141
1142 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1143
1144 Turn process_stratum_target's supports_hardware_single_step op into
1145 a method of process_target.
1146
1147 * target.h (struct process_stratum_target): Remove the target op.
1148 (class process_target): Add the target op.
1149 (target_supports_hardware_single_step): Update the macro.
1150 (target_can_do_hardware_single_step): Remove declaration.
1151 * target.cc (process_target::supports_hardware_single_step): Define.
1152 (target_can_do_hardware_single_step): Remove.
1153
1154 Update the derived classes and callers below.
1155
1156 * linux-low.h (class linux_process_target): Update.
1157 * linux-low.cc (linux_target_ops): Update.
1158 (linux_supports_hardware_single_step): Turn into ...
1159 (linux_process_target::supports_hardware_single_step): ... this.
1160 * lynx-low.h (class lynx_process_target): Update.
1161 * lynx-low.cc (lynx_target_ops): Update.
1162 (lynx_process_target::supports_hardware_single_step): Define.
1163 * nto-low.h (class nto_process_target): Update.
1164 * nto-low.cc (nto_target_ops): Update.
1165 (nto_process_target::supports_hardware_single_step): Define.
1166 * win32-low.h (class win32_process_target): Update.
1167 * win32-low.cc (win32_target_ops): Update.
1168 (win32_process_target::supports_hardware_single_step): Define.
1169
1170 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1171
1172 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
1173 ops into methods of process_target.
1174
1175 * target.h (struct process_stratum_target): Remove the target ops.
1176 (class process_target): Add the target ops.
1177 (target_stopped_by_hw_breakpoint): Update the macro.
1178 (target_supports_stopped_by_hw_breakpoint): Update the macro.
1179 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
1180 (process_target::supports_stopped_by_hw_breakpoint): Define.
1181
1182 Update the derived classes and callers below.
1183
1184 * linux-low.cc (linux_target_ops): Update.
1185 (linux_stopped_by_hw_breakpoint): Turn into ...
1186 (linux_process_target::stopped_by_hw_breakpoint): ... this.
1187 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
1188 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
1189 * linux-low.h (class linux_process_target): Update.
1190 * lynx-low.cc (lynx_target_ops): Update.
1191 * nto-low.cc (nto_target_ops): Update.
1192 * win32-low.cc (win32_target_ops): Update.
1193
1194 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1195
1196 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
1197 ops into methods of process_target.
1198
1199 * target.h (struct process_stratum_target): Remove the target ops.
1200 (class process_target): Add the target ops.
1201 (target_stopped_by_sw_breakpoint): Update the macro.
1202 (target_supports_stopped_by_sw_breakpoint): Update the macro.
1203 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
1204 (process_target::supports_stopped_by_sw_breakpoint): Define.
1205
1206 Update the derived classes and callers below.
1207
1208 * linux-low.cc (linux_target_ops): Update.
1209 (linux_stopped_by_sw_breakpoint): Turn into ...
1210 (linux_process_target::stopped_by_sw_breakpoint): ... this.
1211 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
1212 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
1213 * linux-low.h (class linux_process_target): Update.
1214 * lynx-low.cc (lynx_target_ops): Update.
1215 * nto-low.cc (nto_target_ops): Update.
1216 * win32-low.cc (win32_target_ops): Update.
1217
1218 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1219
1220 Turn process_stratum_target's insert_point and remove_point ops
1221 into methods of process_target.
1222
1223 * target.h (struct process_stratum_target): Remove the target ops.
1224 (class process_target): Add the target ops.
1225 * target.cc (process_target::insert_point): Define.
1226 (process_target::remove_point): Define.
1227
1228 Update the derived classes and callers below.
1229
1230 * mem-break.cc (set_raw_breakpoint_at): Update.
1231 (delete_raw_breakpoint): Update.
1232 (uninsert_raw_breakpoint): Update.
1233 (reinsert_raw_breakpoint): Update.
1234 * linux-low.cc (linux_target_ops): Update.
1235 (linux_insert_point): Turn into ...
1236 (linux_process_target::insert_point): ... this.
1237 (linux_remove_point): Turn into ...
1238 (linux_process_target::remove_point): ... this.
1239 * linux-low.h (class linux_process_target): Update.
1240 * lynx-low.cc (lynx_target_ops): Update.
1241 * nto-low.cc (nto_target_ops): Update.
1242 (nto_insert_point): Turn into ...
1243 (nto_process_target::insert_point): ... this.
1244 (nto_remove_point): Turn into ...
1245 (nto_process_target::remove_point): ... this.
1246 * nto-low.h (class nto_process_target): Update.
1247 * win32-low.cc (win32_target_ops): Update.
1248 (win32_insert_point): Turn into ...
1249 (win32_process_target::insert_point): ... this.
1250 (win32_remove_point): Turn into ...
1251 (win32_process_target::remove_point): ... this.
1252 * win32-low.h (class win32_process_target): Update.
1253
1254 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1255
1256 Turn process_stratum_target's supports_z_point_type op into a
1257 method of process_target.
1258
1259 * target.h (struct process_stratum_target): Remove the target op.
1260 (class process_target): Add the target op.
1261 * target.cc (process_target::supports_z_point_type): Define.
1262
1263 Update the derived classes and callers below.
1264
1265 * mem-break.cc (z_type_supported): Update.
1266 * linux-low.cc (linux_target_ops): Update.
1267 (linux_supports_z_point_type): Turn into ...
1268 (linux_process_target::supports_z_point_type): ... this.
1269 * linux-low.h (class linux_process_target): Update.
1270 * lynx-low.cc (lynx_target_ops): Update.
1271 * nto-low.cc (nto_target_ops): Update.
1272 (nto_supports_z_point_type): Turn into ...
1273 (nto_process_target::supports_z_point_type): ... this.
1274 * nto-low.h (class nto_process_target): Update.
1275 * win32-low.cc (win32_target_ops): Update.
1276 (win32_supports_z_point_type): Turn into ...
1277 (win32_process_target::supports_z_point_type): ... this.
1278 * win32-low.h (class win32_process_target): Update.
1279
1280 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1281
1282 Turn process_stratum_target's read_auxv op into a method of
1283 process_target.
1284
1285 * target.h (class process_stratum_target): Remove the target op.
1286 (struct process_target): Add the target op. Also add
1287 'supports_read_auxv'.
1288 * target.cc (process_target::read_auxv): Define.
1289 (process_target::supports_read_auxv): Define.
1290
1291 Update the derived classes and callers below.
1292
1293 * server.cc (handle_qxfer_auxv): Update.
1294 (handle_query): Update.
1295 * linux-low.cc (linux_target_ops): Update.
1296 (linux_process_target::supports_read_auxv): Define.
1297 (linux_read_auxv): Turn into ...
1298 (linux_process_target::read_auxv): ... this.
1299 * linux-low.h (class linux_process_target): Update.
1300 * lynx-low.cc (lynx_target_ops): Update.
1301 * nto-low.cc (nto_target_ops): Update.
1302 (nto_process_target::supports_read_auxv): Define.
1303 (nto_read_auxv): Turn into ...
1304 (nto_process_target::read_auxv): ... this.
1305 * nto-low.h (class nto_process_target): Update.
1306 * win32-low.cc (win32_target_ops): Update.
1307
1308 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1309
1310 Turn process_stratum_target's request_interrupt op into a method of
1311 process_target.
1312
1313 * target.h (struct process_stratum_target): Remove the target op.
1314 (class process_target): Add the target op.
1315
1316 Update the derived classes and callers below.
1317
1318 * remote-utils.cc (putpkt_binary_1): Update.
1319 (input_interrupt): Update.
1320 (getpkt): Update.
1321 * server.cc (handle_v_requests): Update.
1322 * linux-low.cc (linux_target_ops): Update.
1323 (linux_request_interrupt): Turn into ...
1324 (linux_process_target::request_interrupt): ... this.
1325 * linux-low.h (class linux_process_target): Update.
1326 * lynx-low.cc (lynx_target_ops): Update.
1327 (lynx_request_interrupt): Turn into ...
1328 (lynx_process_target::request_interrupt): ... this.
1329 * lynx-low.h (class lynx_process_target): Update.
1330 * nto-low.cc (nto_target_ops): Update.
1331 (nto_request_interrupt): Turn into ...
1332 (nto_process_target::request_interrupt): ... this.
1333 * nto-low.h (class nto_process_target): Update.
1334 * win32-low.cc (win32_target_ops): Update.
1335 (win32_request_interrupt): Turn into ...
1336 (win32_process_target::request_interrupt): ... this.
1337 * win32-low.h (class win32_process_target): Update.
1338
1339 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1340
1341 Turn process_stratum_target's look_up_symbols op into a method of
1342 process_target.
1343
1344 * target.h (struct process_stratum_target): Remove the target op.
1345 (class process_target): Add the target op.
1346 * target.cc (process_target::look_up_symbols): Define.
1347
1348 Update the derived classes and callers below.
1349
1350 * server.cc (handle_query): Update.
1351 * linux-low.cc (linux_target_ops): Update.
1352 (linux_look_up_symbols): Turn into ...
1353 (linux_process_target::look_up_symbols): ... this.
1354 * linux-low.h (class linux_process_target): Update.
1355 * lynx-low.cc (lynx_target_ops): Update.
1356 * nto-low.cc (nto_target_ops): Update.
1357 * win32-low.cc (win32_target_ops): Update.
1358
1359 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1360
1361 Turn process_stratum_target's read_memory and write_memory
1362 ops into methods of process_target.
1363
1364 * target.h (struct process_stratum_target): Remove the target ops.
1365 (class process_target): Add the target ops.
1366
1367 Update the derived classes and callers below.
1368
1369 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
1370 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
1371 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
1372 (arm_get_syscall_trapinfo): Update.
1373 * linux-cris-low.cc (cris_breakpoint_at): Update.
1374 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
1375 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
1376 * linux-mips-low.cc (mips_breakpoint_at): Update.
1377 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
1378 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
1379 * linux-sh-low.cc (sh_breakpoint_at): Update.
1380 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
1381 (sparc_store_gregset_from_stack): Update.
1382 (sparc_breakpoint_at): Update.
1383 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
1384 * linux-tile-low.cc (tile_breakpoint_at): Update.
1385 * linux-x86-low.cc (x86_breakpoint_at): Update.
1386 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
1387 * mem-brea.cc (insert_memory_breakpoint): Update.
1388 (validate_inserted_breakpoint): Update.
1389 * target.cc (read_inferior_memory): Update.
1390 (target_write_memory): Update.
1391 * linux-low.cc (linux_target_ops): Update.
1392 (linux_read_memory): Make a wrapper around the read_memory target
1393 op call.
1394 (linux_process_target::read_memory): Rename from linux_read_memory.
1395 (linux_write_memory): Turn into ...
1396 (linux_process_target::write_memory): ... this.
1397 * linux-low.h (class linux_process_target): Update.
1398 * lynx-low.cc (lynx_target_ops): Update.
1399 (lynx_read_memory): Turn into ...
1400 (lynx_process_target::read_memory): ... this.
1401 (lynx_write_memory): Turn into ...
1402 (lynx_process_target::write_memory): ... this.
1403 * lynx-low.h (class lynx_process_target): Update.
1404 * nto-low.cc (nto_target_ops): Update.
1405 (nto_read_memory): Turn into ...
1406 (nto_process_target::read_memory): ... this.
1407 (nto_write_memory): Turn into ...
1408 (nto_process_target::write_memory): ... this.
1409 * nto-low.h (class nto_process_target): Update.
1410 * win32-low.cc (win32_target_ops): Update.
1411 (win32_read_inferior_memory): Turn into ...
1412 (win32_process_target::read_memory): ... this.
1413 (win32_write_inferior_memory): Turn into ...
1414 (win32_process_target::write_memory): ... this.
1415 * win32-low.h (class win32_process_target): Update.
1416
1417 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1418
1419 Turn process_stratum_target's prepare_to_access_memory and
1420 done_accessing_memory ops into methods of process_target.
1421
1422 * target.h (struct process_stratum_target): Remove the target ops.
1423 (class process_target): Add the target ops.
1424 * target.cc (process_target::prepare_to_access_memory): Define.
1425 (process_target::done_accessing_memory): Define.
1426 (prepare_to_access_memory): Update.
1427 (done_accessing_memory): Update.
1428
1429 Update the derived classes and callers below.
1430
1431 * linux-low.cc (linux_target_ops): Update.
1432 (linux_prepare_to_access_memory): Turn into ...
1433 (linux_process_target::prepare_to_access_memory): ... this.
1434 (linux_done_accessing_memory): Turn into ...
1435 (linux_process_target::done_accessing_memory): ... this.
1436 * linux-low.h (class linux_process_target): Update.
1437 * lynx-low.cc (lynx_target_ops): Update.
1438 * nto-low.cc (nto_target_ops): Update.
1439 * win32-low.cc (win32_target_ops): Update.
1440
1441 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1442
1443 Turn process_stratum_target's fetch_registers and store_registers
1444 ops into methods of process_target.
1445
1446 * target.h (struct process_stratum_target): Remove the target ops.
1447 (class process_target): Add the target ops.
1448 (fetch_inferior_registers): Update the macro.
1449 (store_inferior_registers): Update the macro.
1450
1451 Update the derived classes and callers below.
1452
1453 * linux-low.cc (linux_target_ops): Update.
1454 (linux_fetch_registers): Turn into ...
1455 (linux_process_target::fetch_registers): ... this.
1456 (linux_store_registers): Turn into ...
1457 (linux_process_target::store_registers): ... this.
1458 * linux-low.h (class linux_process_target): Update.
1459 * lynx-low.cc (lynx_target_ops): Update.
1460 (lynx_fetch_registers): Turn into ...
1461 (lynx_process_target::fetch_registers): ... this.
1462 (lynx_store_registers): Turn into ...
1463 (lynx_process_target::store_registers): ... this.
1464 * lynx-low.h (class lynx_process_target): Update.
1465 * nto-low.cc (nto_target_ops): Update.
1466 (nto_fetch_registers): Turn into ...
1467 (nto_process_target::fetch_registers): ... this.
1468 (nto_store_registers): Turn into ...
1469 (nto_process_target::store_registers): ... this.
1470 * nto-low.h (class nto_process_target): Update.
1471 * win32-low.cc (win32_target_ops): Update.
1472 (win32_fetch_inferior_registers): Turn into ...
1473 (win32_process_target::fetch_registers): ... this.
1474 (win32_store_inferior_registers): Turn into ...
1475 (win32_process_target::store_registers): ... this.
1476 * win32-low.h (class win32_process_target): Update.
1477
1478 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1479
1480 Turn process_stratum_target's wait op into a method of
1481 process_target.
1482
1483 * target.h (struct process_stratum_target): Remove the target op.
1484 (class process_target): Add the target op.
1485
1486 Update the derived classes and callers below.
1487
1488 * target.cc (target_wait): Update.
1489 * linux-low.cc (linux_target_ops): Update.
1490 (linux_wait): Turn into ...
1491 (linux_process_target::wait): ... this.
1492 * linux-low.h (class linux_process_target): Update.
1493 * lynx-low.cc (lynx_target_ops): Update.
1494 (lynx_wait): Turn into ...
1495 (lynx_process_target::wait): ... this.
1496 * lynx-low.h (class lynx_process_target): Update.
1497 * nto-low.cc (nto_target_ops): Update.
1498 (nto_wait): Turn into ...
1499 (nto_process_target::wait): ... this.
1500 * nto-low.h (class nto_process_target): Update.
1501 * win32-low.cc (win32_target_ops): Update.
1502 (win32_wait): Turn into ...
1503 (win32_process_target::wait): ... this.
1504 (do_initial_child_stuff): Update.
1505 * win32-low.h (class win32_process_target): Update.
1506
1507 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1508
1509 Turn process_stratum_target's resume op into a method of
1510 process_target.
1511
1512 * target.h (struct process_stratum_target): Remove the target op.
1513 (class process_target): Add the target op.
1514
1515 Update the derived classes and callers below.
1516
1517 * server.cc (resume): Update.
1518 * target.cc (target_stop_and_wait): Update.
1519 (target_continue_no_signal): Update.
1520 (target_continue): Update.
1521 * linux-low.cc (linux_target_ops): Update.
1522 (linux_resume): Turn into ...
1523 (linux_process_target::resume): ... this.
1524 * linux-low.h (class linux_process_target): Update.
1525 * lynx-low.cc (lynx_target_ops): Update.
1526 (lynx_resume): Turn into ...
1527 (lynx_process_target::resume): ... this.
1528 * lynx-low.h (class lynx_process_target): Update.
1529 * nto-low.cc (nto_target_ops): Update.
1530 (nto_resume): Turn into ...
1531 (nto_process_target::resume): ... this.
1532 * nto-low.h (class nto_process_target): Update.
1533 * win32-low.cc (win32_target_ops): Update.
1534 (win32_resume): Turn into ...
1535 (win32_process_target::resume): ... this.
1536 (win32_process_target::detach): Update.
1537 (do_initial_child_stuff): Update.
1538 * win32-low.h (class win32_process_target): Update.
1539
1540 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1541
1542 Turn process_stratum_target's thread_alive op into a method of
1543 process_target.
1544
1545 * target.h (struct process_stratum_target): Remove the target op.
1546 (class process_target): Add the target op.
1547 (mythread_alive): Update the macro.
1548
1549 Update the derived classes and callers below.
1550
1551 * linux-low.cc (linux_target_ops): Update.
1552 (linux_thread_alive): Turn into ...
1553 (linux_process_target::thread_alive): ... this.
1554 (wait_for_sigstop): Update.
1555 * linux-low.h (class linux_process_target): Update.
1556 * lynx-low.cc (lynx_target_ops): Update.
1557 (lynx_thread_alive): Turn into ...
1558 (lynx_process_target::thread_alive): ... this.
1559 * lynx-low.h (class lynx_process_target): Update.
1560 * nto-low.cc (nto_target_ops): Update.
1561 (nto_thread_alive): Turn into ...
1562 (nto_process_target::thread_alive): ... this.
1563 * nto-low.h (class nto_process_target): Update.
1564 * win32-low.cc (win32_target_ops): Update.
1565 (win32_thread_alive): Turn into ...
1566 (win32_process_target::thread_alive): ... this.
1567 * win32-low.h (class win32_process_target): Update.
1568
1569 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1570
1571 Turn process_stratum_target's join op into a method of
1572 process_target.
1573
1574 * target.h (struct process_stratum_target): Remove the target op.
1575 (class process_target): Add the target op.
1576 (join_inferior): Update the macro.
1577
1578 Update the derived classes and callers below.
1579
1580 * linux-low.cc (linux_target_ops): Update.
1581 (linux_join): Turn into ...
1582 (linux_process_target::join): ... this.
1583 * linux-low.h (class linux_process_target): Update.
1584 * lynx-low.cc (lynx_target_ops): Update.
1585 (lynx_join): Turn into ...
1586 (lynx_process_target::join): ... this.
1587 * lynx-low.h (class lynx_process_target): Update.
1588 * nto-low.cc (nto_target_ops): Update.
1589 (nto_process_target::join): Define.
1590 * nto-low.h (class nto_process_target): Update.
1591 * win32-low.cc (win32_target_ops): Update.
1592 (win32_join): Turn into ...
1593 (win32_process_target::join): ... this.
1594 * win32-low.h (class win32_process_target): Update.
1595
1596 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1597
1598 Turn process_stratum_target's mourn op into a method of
1599 process_target.
1600
1601 * target.h (struct process_stratum_target): Remove the target op.
1602 (class process_target): Add the target op.
1603
1604 Update the derived classes and callers below.
1605
1606 * target.cc (target_mourn_inferior): Update.
1607 * linux-low.cc (linux_target_ops): Update.
1608 (linux_mourn): Turn into ...
1609 (linux_process_target::mourn): ... this.
1610 (handle_extended_wait): Update.
1611 (linux_process_target::kill): Update.
1612 (linux_process_target::detach): Update.
1613 * linux-low.h (class linux_process_target): Update.
1614 * lynx-low.cc (lynx_target_ops): Update.
1615 (lynx_mourn): Turn into ...
1616 (lynx_process_target::mourn): ... this.
1617 * lynx-low.h (class lynx_process_target): Update.
1618 * nto-low.cc (nto_target_ops): Update.
1619 (nto_mourn): Turn into ...
1620 (nto_process_target::mourn): ... this.
1621 * nto-low.h (class nto_process_target): Update.
1622 * win32-low.cc (win32_target_ops): Update.
1623 (win32_mourn): Turn into ...
1624 (win32_process_target::mourn): ... this.
1625 * win32-low.h (class win32_process_target): Update.
1626
1627 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1628
1629 Turn process_stratum_target's detach op into a method of
1630 process_target.
1631
1632 * target.h (struct process_stratum_target): Remove the target op.
1633 (class process_target): Add the target op.
1634 (detach_inferior): Update the macro.
1635
1636 Update the derived classes and callers below.
1637
1638 * linux-low.cc (linux_target_ops): Update.
1639 (linux_detach): Turn into ...
1640 (linux_process_target::detach): ... this.
1641 * linux-low.h (class linux_process_target): Update.
1642 * lynx-low.cc (lynx_target_ops): Update.
1643 (lynx_detach): Turn into ...
1644 (lynx_process_target::detach): ... this.
1645 * lynx-low.h (class lynx_process_target): Update.
1646 * nto-low.cc (nto_target_ops): Update.
1647 (nto_detach): Turn into ...
1648 (nto_process_target::detach): ... this.
1649 * nto-low.h (class nto_process_target): Update.
1650 * win32-low.cc (win32_target_ops): Update.
1651 (win32_detach): Turn into ...
1652 (win32_process_target::detach): ... this.
1653 * win32-low.h (class win32_process_target): Update.
1654
1655 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1656
1657 Turn process_stratum_target's kill op into a method of
1658 process_target.
1659
1660 * target.h (struct process_stratum_target): Remove the target op.
1661 (class process_target): Add the target op.
1662
1663 Update the derived classes and callers below.
1664
1665 * target.cc (kill_inferior): Update.
1666 * linux-low.cc (linux_target_ops): Update.
1667 (linux_kill): Turn into ...
1668 (linux_process_target::kill): ... this.
1669 * linux-low.h (class linux_process_target): Update.
1670 * lynx-low.cc (lynx_target_ops): Update.
1671 (lynx_kill): Turn into ...
1672 (lynx_process_target::kill): ... this.
1673 * lynx-low.h (class lynx_process_target): Update.
1674 * nto-low.cc (nto_target_ops): Update.
1675 (nto_kill): Turn into ...
1676 (nto_process_target::kill): ... this.
1677 * nto-low.h (class nto_process_target): Update.
1678 * win32-low.cc (win32_target_ops): Update.
1679 (win32_kill): Turn into ...
1680 (win32_process_target::kill): ... this.
1681 * win32-low.h (class win32_process_target): Update.
1682
1683 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1684
1685 Turn process_stratum_target's attach op into a method of
1686 process_target.
1687
1688 * target.h (struct process_stratum_target): Remove the target op.
1689 (class process_target): Add the target op.
1690 (myattach): Update the macro.
1691
1692 Update the derived classes and callers below.
1693
1694 * linux-low.cc (linux_target_ops): Update.
1695 (linux_attach): Turn into ...
1696 (linux_process_target::attach): ... this.
1697 * linux-low.h (class linux_process_target): Update.
1698 * lynx-low.cc (lynx_target_ops): Update.
1699 (lynx_attach): Turn into ...
1700 (lynx_process_target::attach): ... this.
1701 * lynx-low.h (class lynx_process_target): Update.
1702 * nto-low.cc (nto_target_ops): Update.
1703 (nto_attach): Turn into ...
1704 (nto_process_target::attach): ... this.
1705 * nto-low.h (class nto_process_target): Update.
1706 * win32-low.cc (win32_target_ops): Update.
1707 (win32_attach): Turn into ...
1708 (win32_process_target::attach): ... this.
1709 * win32-low.h (class win32_process_target): Update.
1710
1711 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1712
1713 Turn process_stratum_target's post_create_inferior op into a method
1714 of process_target.
1715
1716 * target.h (struct process_stratum_target): Remove the target op.
1717 (class process_target): Add the target op.
1718 (target_post_create_inferior): Update the macro.
1719 * target.cc (process_target::post_create_inferior): Define.
1720
1721 Update the derived classes and callers below.
1722
1723 * linux-low.cc (linux_target_ops): Update.
1724 (linux_post_create_inferior): Turn into ...
1725 (linux_process_target::post_create_inferior): ... this.
1726 * linux-low.h (class linux_process_target): Update.
1727 * lynx-low.cc (lynx_target_ops): Update.
1728 * nto-low.cc (nto_target_ops): Update.
1729 * win32-low.cc (win32_target_ops): Update.
1730
1731 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1732
1733 Turn process_stratum_target's create_inferior op into a method of
1734 process_target.
1735
1736 * target.h (struct process_stratum_target): Remove the target op.
1737 (class process_target): Add the target op.
1738 (create_inferior): Rename the macro to ...
1739 (target_create_inferior): ... this.
1740
1741 Update the derived classes and callers below.
1742
1743 * server.cc (handle_v_run): Update.
1744 (captured_main): Update.
1745 (process_serial_event): Update.
1746 * linux-low.cc (linux_target_ops): Update.
1747 (linux_create_inferior): Turn into ...
1748 (linux_process_target::create_inferior): ... this.
1749 * linux-low.h (class linux_process_target): Update.
1750 * lynx-low.cc (lynx_target_ops): Update.
1751 (lynx_create_inferior): Turn into ...
1752 (lynx_process_target::create_inferior): ... this.
1753 * lynx-low.h (class lynx_process_target): Update.
1754 * nto-low.cc (nto_target_ops): Update.
1755 (nto_create_inferior): Turn into ...
1756 (nto_process_target::create_inferior): ... this.
1757 * nto-low.h (class nto_process_target): Update.
1758 * win32-low.cc (win32_target_ops): Update.
1759 (win32_create_inferior): Turn into ...
1760 (win32_process_target::create_inferior): ... this.
1761 * win32-low.h (class win32_process_target): Update.
1762
1763 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1764
1765 * target.h (class process_target): New class definition.
1766 (struct process_stratum_target) <pt>: New field with type
1767 'process_target*'.
1768 * linux-low.h (class linux_process_target): Define as a derived
1769 class of 'process_target'.
1770 * linux-low.cc (linux_target_ops): Add a linux_process_target*
1771 as the 'pt' field.
1772 * lynx-low.h (class lynx_process_target): Define as a derived
1773 class of 'process_target'.
1774 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
1775 as the 'pt' field.
1776 * nto-low.h (class nto_process_target): Define as a derived
1777 class of 'process_target'.
1778 * nto-low.cc (nto_target_ops): Add an nto_process_target*
1779 as the 'pt' field.
1780 * win32-low.h (class win32_process_target): Define as a derived
1781 class of 'process_target'.
1782 * win32-low.cc (win32_target_ops): Add a win32_process_target*
1783 as the 'pt' field.
1784
1785 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
1786
1787 * configure: Regenerate.
1788
1789 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
1790 Andrew Burgess <andrew.burgess@embecosm.com>
1791
1792 * linux-riscv-low.cc: New file.
1793 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
1794 and nat/riscv-linux-tdesc.c.
1795 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
1796 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
1797 Define.
1798
1799 2020-02-14 Tom Tromey <tom@tromey.com>
1800
1801 * acinclude.m4: Don't include acx_configure_dir.m4.
1802 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
1803 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
1804 (all, install-only, uninstall, clean-info, clean)
1805 (maintainer-clean): Don't recurse.
1806 (subdir_do, all-lib): Remove.
1807 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
1808 (GNULIB_H): Remove.
1809 (generated_files): Update.
1810 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
1811 * configure: Rebuild.
1812 * configure.ac: Don't configure gnulib or libiberty.
1813 (GNULIB): Update.
1814
1815 2020-02-14 Eli Zaretskii <eliz@gnu.org>
1816
1817 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
1818 preparing the command line for CreateProcess.
1819 (win32_create_inferior): Reflect the program name in debugging
1820 output that shows the process and its command line.
1821
1822 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1823
1824 * Makefile.in: Rename source files from .c to .cc.
1825 * %.c: Rename to %.cc.
1826 * configure.ac: Rename server.c to server.cc.
1827 * configure: Re-generate.
1828
1829 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1830
1831 * Makefile.in: Rename gdbsupport source files from .c to .cc.
1832
1833 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
1834
1835 * win32-low.c (win32_create_inferior): Set signal_pid.
1836
1837 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
1838 Pedro Alves <palves@redhat.com>
1839
1840 Skip building gdbserver in a cross-configuration.
1841 * configure.srv: Set $gdbserver_host depending on whether $target
1842 is $host. Use $gdbserver_host instead of $host.
1843
1844 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1845
1846 * configure: Re-generate.
1847
1848 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1849
1850 * configure: Re-generate.
1851
1852 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1853
1854 * acinclude.m4: Update warning.m4 path.
1855
1856 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
1857
1858 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
1859 (handle_exception): Set siginfo_er.
1860 (win32_xfer_siginfo): New function.
1861
1862 2020-02-07 Tom Tromey <tom@tromey.com>
1863 Pedro Alves <palves@redhat.com>
1864
1865 * README: Update build documentation.
1866 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
1867 host, not target.
1868 * configure.ac: Update paths.
1869 * configure: Rebuild.
1870 * acinclude.m4: Update paths.
1871 * Makefile.in: Update include paths.
1872 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
1873 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
1874 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
1875 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
1876 (%-generated.c): Update paths.
1877 * Move entire directory from ../gdb/gdbserver.
1878
1879 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
1880
1881 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
1882
1883 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1884
1885 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
1886 assignment instead of srv_linux_obj.
1887
1888 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
1889
1890 * server.c (handle_qxfer_libraries): Write segment-address with
1891 paddress.
1892
1893 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
1894
1895 * Makefile.in (install-strip): New target.
1896 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
1897 * aclocal.m4: Regenerate.
1898 * configure: Regenerate.
1899 * configure.ac: Add AM_PROG_INSTALL_STRIP.
1900
1901 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1902
1903 * Makefile.in (SFILES): Adjust paths to point to real files.
1904 (OBS): Move waitstatus.o to target/waitstatus.o.
1905 (TAGS): Transform paths appropriately.
1906 (%.o): Rename to...
1907 (nat/%.o): ... this pattern rule.
1908 (%.o): Rename to...
1909 (target/%.o): ... this pattern rule.
1910 * configure.srv: Adjust paths throughout to include nat/ prefix
1911 with the revant files.
1912 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
1913 * configure: Regenerate.
1914
1915 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1916
1917 * Makefile.in (TAGS): Remove config files from the recipe.
1918
1919 2020-01-14 Tom Tromey <tom@tromey.com>
1920
1921 * configure: Rebuild.
1922 * configure.ac: Remove any checks that were added to common.m4.
1923 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
1924 lib-link.m4.
1925
1926 2020-01-14 Tom Tromey <tom@tromey.com>
1927
1928 * server.h: Include config.h.
1929 * gdbreplay.c: Include config.h.
1930 * configure: Rebuild.
1931 * configure.ac: Don't source common.host.
1932 * acinclude.m4: Update path.
1933 * Makefile.in (INCSUPPORT): New variable.
1934 (INCLUDE_CFLAGS): Add INCSUPPORT.
1935 (SFILES): Update paths.
1936 (version-generated.c): Update path to create-version.sh.
1937 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
1938
1939 2020-01-14 Tom Tromey <tom@tromey.com>
1940
1941 * configure.ac (LIBS): Use WIN32APILIBS.
1942 (USE_WIN32API): Don't define.
1943 * configure: Rebuild.
1944
1945 2020-01-14 Tom Tromey <tom@tromey.com>
1946
1947 * configure: Rebuild.
1948
1949 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1950
1951 * Makefile.in (%-generated.c): Remove rule for files from
1952 regformats/i386.
1953
1954 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1955
1956 * configure: Re-generate.
1957
1958 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1959
1960 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
1961 Define to static.
1962 * tracepoint.c (stop_tracing, flush_trace_buffer,
1963 about_to_request_buffer_space, get_trace_state_variable_value,
1964 set_trace_state_variable_value, gdb_collect): Add declaration.
1965
1966 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1967
1968 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
1969 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
1970 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
1971 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
1972 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
1973 static.
1974
1975 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1976
1977 * inferiors.c: Include gdbsupport/common-inferior.h.
1978
1979 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1980
1981 * hostio-errno.c: Include hostio.h.
1982
1983 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
1984
1985 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
1986 prerequisite.
1987
1988 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1989
1990 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
1991 * linux-arm-tdesc.h: Include arch/arm.h.
1992
1993 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1994
1995 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
1996
1997 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
1998
1999 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
2000 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
2001
2002 2020-01-10 Pedro Alves <palves@redhat.com>
2003
2004 * fork-child.c (post_fork_inferior): Pass target down to
2005 startup_inferior.
2006 * inferiors.c (switch_to_thread): Add process_stratum_target
2007 parameter.
2008 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
2009 * nto-low.c (nto_target_ops): Now a process_stratum_target.
2010 * linux-low.c (linux_target_ops): Now a process_stratum_target.
2011 * remote-utils.c (prepare_resume_reply): Pass the target to
2012 switch_to_thread.
2013 * target.c (the_target): Now a process_stratum_target.
2014 (done_accessing_memory): Pass the target to switch_to_thread.
2015 (set_target_ops): Ajust to use process_stratum_target.
2016 * target.h (struct target_ops): Rename to ...
2017 (struct process_stratum_target): ... this.
2018 (the_target, set_target_ops): Adjust.
2019 (prepare_to_access_memory): Adjust comment.
2020 * win32-low.c (child_xfer_memory): Adjust to use
2021 process_stratum_target.
2022 (win32_target_ops): Now a process_stratum_target.
2023
2024 2020-01-06 Eli Zaretskii <eliz@gnu.org>
2025 Pedro Alves <palves@redhat.com>
2026
2027 * win32-low.c (get_child_debug_event): Extract the fatal exception
2028 from the exit status and convert to the equivalent Posix signal
2029 number.
2030 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
2031 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
2032
2033 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
2034
2035 * Makefile.in: Use INSTALL_PROGRAM_ENV.
2036
2037 2020-01-01 Joel Brobecker <brobecker@adacore.com>
2038
2039 * server.c (gdbserver_version): Change copyright year to 2020.
2040 * gdbreplay.c (gdbreplay_version): Likewise.
2041
2042 2019-12-19 Christian Biesinger <cbiesinger@google.com>
2043
2044 * configure: Regenerate.
2045 * configure.ac: Quote variable arguments of test.
2046
2047 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
2048
2049 * Makefile.in: Fix build with GNU Make 3.81
2050
2051 2019-12-16 Tom Tromey <tromey@adacore.com>
2052
2053 * server.c (get_exec_file): Constify result.
2054
2055 2019-12-10 Christian Biesinger <cbiesinger@google.com>
2056
2057 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
2058 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
2059 * config.in: Regenerate.
2060 * configure: Regenerate.
2061 * configure.ac: Don't check for strerror.
2062 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
2063 Call safe_strerror instead of strerror.
2064 * server.h (strerror): Remove this now-unnecessary declaration.
2065 * tracepoint.c (init_named_socket): Call safe_strerror instead of
2066 strerror.
2067 (gdb_agent_helper_thread): Likewise.
2068 * utils.c (perror_with_name): Likewise.
2069
2070 2019-11-26 Tom Tromey <tom@tromey.com>
2071
2072 * configure, config.in: Rebuild.
2073
2074 2019-11-26 Tom Tromey <tom@tromey.com>
2075
2076 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
2077 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
2078 gdb_sigmask.
2079 * configure, config.in: Rebuild.
2080
2081 2019-11-26 Tom Tromey <tom@tromey.com>
2082
2083 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
2084 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
2085 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
2086 * acinclude.m4: Include ax_pthread.m4.
2087 * config.in, configure: Rebuild.
2088
2089 2019-11-26 Christian Biesinger <cbiesinger@google.com>
2090
2091 * debug.c (debug_set_output): Call safe_strerror instead of
2092 strerror.
2093 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
2094 (linux_kill_one_lwp): Likewise.
2095 (linux_detach_one_lwp): Likewise.
2096 (linux_wait_for_event_filtered): Likewise.
2097 (store_register): Likewise.
2098 * lynx-low.c (lynx_attach): Likewise.
2099 * mem-break.c (insert_memory_breakpoint): Likewise.
2100 (remove_memory_breakpoint): Likewise.
2101 (delete_fast_tracepoint_jump): Likewise.
2102 (set_fast_tracepoint_jump): Likewise.
2103 (uninsert_fast_tracepoint_jumps_at): Likewise.
2104 (reinsert_fast_tracepoint_jumps_at): Likewise.
2105 * nto-low.c (nto_xfer_memory): Likewise.
2106 (nto_resume): Likewise.
2107
2108 2019-11-20 Luis Machado <luis.machado@linaro.org>
2109
2110 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
2111 instead of register count.
2112 * tdesc.c (tdesc_contains_feature): New function.
2113 * tdesc.h (tdesc_contains_feature): New prototype.
2114
2115 2019-11-15 Christian Biesinger <cbiesinger@google.com>
2116
2117 * Makefile.in: Add safe-strerror.c.
2118 * configure: Regenerate.
2119 * configure.ac: Don't source common.host.
2120
2121 2019-11-15 Christian Biesinger <cbiesinger@google.com>
2122
2123 * config.in: Regenerate.
2124 * configure: Regenerate.
2125
2126 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
2127
2128 * ax.c (ax_printf): Handle size_t_arg.
2129
2130 2019-11-06 Christian Biesinger <cbiesinger@google.com>
2131
2132 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
2133 * mi/mi-main.c (output_cores): Likewise.
2134 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
2135 (linux_xfer_osdata_modules): Likewise.
2136 * remote.c (register_remote_support_xml): Likewise.
2137 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
2138 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
2139
2140 2019-11-01 Christian Biesinger <cbiesinger@google.com>
2141
2142 * configure: Regenerate.
2143 * configure.ac: Remove check for strerror_r.
2144
2145 2019-10-31 Christian Biesinger <cbiesinger@google.com>
2146
2147 * config.in: Regenerate.
2148 * configure: Regenerate.
2149 * configure.ac: Also check for strerror_r.
2150
2151 2019-10-31 Christian Biesinger <cbiesinger@google.com>
2152
2153 * ax.h (debug_agent): Remove duplicate declaration.
2154
2155 2019-10-26 Tom de Vries <tdevries@suse.de>
2156
2157 * linux-aarch64-low.c: Fix typos in comments.
2158 * linux-arm-low.c: Same.
2159 * linux-low.c: Same.
2160 * linux-ppc-low.c: Same.
2161 * proc-service.c: Same.
2162 * regcache.h: Same.
2163 * server.c: Same.
2164 * tracepoint.c: Same.
2165 * win32-low.c: Same.
2166
2167 2019-10-25 Tom Tromey <tromey@adacore.com>
2168
2169 * utils.c (xstrdup): Remove.
2170
2171 2019-10-23 Tom Tromey <tom@tromey.com>
2172
2173 * configure, config.in: Rebuild.
2174
2175 2019-10-23 Tom Tromey <tom@tromey.com>
2176
2177 * configure: Rebuild.
2178 * acinclude.m4: Use m4_include, not sinclude.
2179
2180 2019-10-17 Tom Tromey <tromey@adacore.com>
2181
2182 * configure: Rebuild.
2183 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
2184 in AC_CONFIG_FILES invocation.
2185 * Makefile.in (stamp-h, Makefile): Use new-style config.status
2186 invocation.
2187
2188 2019-10-16 Christian Biesinger <cbiesinger@google.com>
2189
2190 * server.c: Include xml-builtin.h.
2191 (get_xml_features): Don't declare xml_builtins here.
2192
2193 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
2194
2195 * Makefile.in: Remove references to vec-ipa.o.
2196
2197 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
2198
2199 * Makefile.in: Remove references to vec.c.
2200
2201 2019-10-02 Christian Biesinger <cbiesinger@google.com>
2202
2203 * server.c (server_waiting): Change to bool.
2204 (extended_protocol): Likewise.
2205 (response_needed): Likewise.
2206 (exit_requested): Likewise.
2207 (run_once): Likewise.
2208 (report_no_resumed): Likewise.
2209 (non_stop): Likewise.
2210 (disable_packet_vCont): Likewise.
2211 (disable_packet_Tthread): Likewise.
2212 (disable_packet_qC): Likewise.
2213 (disable_packet_qfThreadInfo): Likewise.
2214 (handle_general_set): Update.
2215 (handle_detach): Update.
2216 (handle_monitor_command): Update.
2217 (handle_query): Update.
2218 (captured_main): Update.
2219 (process_serial_event): Update.
2220 * server.h (server_waiting): Change to bool.
2221 (disable_packet_vCont): Likewise.
2222 (disable_packet_Tthread): Likewise.
2223 (disable_packet_qC): Likewise.
2224 (disable_packet_qfThreadInfo): Likewise.
2225 (run_once): Likewise.
2226 (non_stop): Likewise.
2227 * target.c (target_stop_and_wait): Update.
2228
2229 2019-10-02 Tom Tromey <tromey@adacore.com>
2230
2231 * Makefile.in (SFILES): Add common-inferior.c.
2232 (OBS): Add common-inferior.o.
2233 * server.c (startup_with_shell): Don't define.
2234
2235 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
2236
2237 * linux-low.c (linux_low_read_btrace): Update for change to
2238 std::vector.
2239
2240 2019-09-20 Christian Biesinger <cbiesinger@google.com>
2241
2242 * debug.c (debug_threads): Remove comment in favor of the header.
2243 * debug.h (using_threads): Add declaration.
2244 (debug_threads): Add comment.
2245 * linux-aarch64-low.c: Include debug.h and remove declaration of
2246 debug_threads.
2247 * nto-low.c: Likewise.
2248 * remote-utils.c: Likewise.
2249 * thread-db.c: Likewise.
2250
2251 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
2252
2253 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
2254 and powerpc-cell64l-ipa.o.
2255 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
2256 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
2257 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
2258 (spu*-*-*): Remove.
2259
2260 * spu-low.c: Remove file.
2261
2262 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
2263 (parse_spufs_run): Remove.
2264 (ppc_get_pc): Remove Cell/B.E. support.
2265 (ppc_set_pc): Likewise.
2266 (ppc_breakpoint_at): Likewise.
2267 (ppc_arch_setup): Likewise.
2268 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
2269 tdesc_powerpc_cell32l.
2270 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
2271 or init_registers_powerpc_cell32l.
2272 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
2273 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
2274 or init_registers_powerpc_cell32l.
2275 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
2276 (init_registers_powerpc_cell32l): Remove prototype.
2277 (init_registers_powerpc_cell64l): Likewise.
2278
2279 * target.h (struct target_ops): Remove qxfer_spu member.
2280 * server.c (handle_qxfer_spu): Remove.
2281 (qxfer_packets): Remove entry for "spu".
2282 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
2283 * linux-low.c (SPUFS_MAGIC): Remove.
2284 (spu_enumerate_spu_ids): Remove.
2285 (linux_qxfer_spu): Remove.
2286 (linux_target_ops): Remove qxfer_spu member.
2287 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
2288 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
2289 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
2290
2291 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
2292
2293 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
2294 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
2295 * config.in: Regenerate.
2296 * configure: Regenerate.
2297
2298 2019-08-15 Tom Tromey <tromey@adacore.com>
2299
2300 * target.c (target_write_memory): Use gdb::byte_vector.
2301
2302 2019-08-15 Tom Tromey <tromey@adacore.com>
2303
2304 * tracepoint.c (write_inferior_data_pointer)
2305 (write_inferior_integer, write_inferior_int8)
2306 (write_inferior_uinteger, m_tracepoint_action_download)
2307 (r_tracepoint_action_download, x_tracepoint_action_download)
2308 (l_tracepoint_action_download, clear_inferior_trace_buffer)
2309 (download_agent_expr, download_tracepoint_1)
2310 (download_trace_state_variables, upload_fast_traceframes): Update.
2311 * server.c (gdb_write_memory): Update.
2312 * remote-utils.c (relocate_instruction): Update.
2313 * proc-service.c (ps_pdwrite): Update.
2314 * mem-break.c (remove_memory_breakpoint)
2315 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
2316 (uninsert_fast_tracepoint_jumps_at)
2317 (reinsert_fast_tracepoint_jumps_at): Update.
2318 * linux-x86-low.c (append_insns)
2319 (i386_install_fast_tracepoint_jump_pad)
2320 (amd64_write_goto_address, i386_write_goto_address): Update.
2321 * linux-s390-low.c (append_insns, s390_write_goto_address):
2322 Update.
2323 * linux-ppc-low.c (ppc_relocate_instruction)
2324 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
2325 (ppc_write_goto_address): Update.
2326 * linux-aarch64-low.c (append_insns): Update.
2327 * target.h (struct target_ops): Update.
2328 (write_inferior_memory): Don't declare.
2329 * target.c (target_write_memory): Rename from
2330 write_inferior_memory. Remove old target_write_memory.
2331
2332 2019-08-15 Tom Tromey <tromey@adacore.com>
2333
2334 * target.c (write_inferior_memory): Use std::vector.
2335
2336 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
2337
2338 PR build/24886
2339 * configure.ac: Drop enable-libmcheck support.
2340 * configure, config.in: Rebuild.
2341 * acinclude.m4: Don't include it.
2342
2343 2019-07-19 Alan Hayward <alan.hayward@arm.com>
2344
2345 * configure.srv: Remove Arm xml files.
2346
2347 2019-07-19 Alan Hayward <alan.hayward@arm.com>
2348
2349 * configure.srv: Add new files. Remove xml generated files.
2350 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
2351 registers.
2352 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
2353 * linux-aarch32-tdesc.c: New file.
2354 * linux-aarch32-tdesc.h: New file.
2355 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
2356 * linux-arm-low.c (init_registers_arm, tdesc_arm)
2357 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
2358 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
2359 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
2360 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
2361 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
2362 (arm_read_description): Call arm_linux_read_description.
2363 (initialize_low_arch): Don't init registers.
2364 * linux-arm-tdesc.c: New file.
2365 * linux-arm-tdesc.h: New file.
2366
2367 2019-07-10 Alan Hayward <alan.hayward@arm.com>
2368
2369 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
2370 Move counter inside for.
2371 (arm_read_description): Check ptrace earlier.
2372 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
2373
2374 2019-07-09 Tom Tromey <tom@tromey.com>
2375
2376 * configure: Rebuild.
2377 * configure.ac: Change common to gdbsupport.
2378 * acinclude.m4: Change common to gdbsupport.
2379 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
2380 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
2381 common to gdbsupport.
2382 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
2383 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
2384 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
2385 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
2386 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
2387 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
2388 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
2389 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
2390 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
2391 common to gdbsupport.
2392
2393 2019-07-04 Alan Hayward <alan.hayward@arm.com>
2394
2395 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
2396 defines.
2397 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
2398
2399 2019-07-04 Alan Hayward <alan.hayward@arm.com>
2400
2401 * configure.srv: Remove legacy xml.
2402 * linux-aarch64-low.c (initialize_low_arch): Remove
2403 initialize_low_tdesc call.
2404 * linux-aarch64-tdesc-selftest.c: Remove file.
2405 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
2406 * linux-x86-low.c (initialize_low_arch): Remove
2407 initialize_low_tdesc call.
2408 * linux-x86-tdesc-selftest.c: Remove file.
2409 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
2410
2411 2019-06-20 Tom de Vries <tdevries@suse.de>
2412
2413 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
2414 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
2415
2416 2019-06-19 Tom de Vries <tdevries@suse.de>
2417
2418 * debug.h (debug_write): Change return type to ssize_t.
2419 * debug.c (debug_write): Same.
2420
2421 2019-06-14 Tom Tromey <tom@tromey.com>
2422
2423 * configure.ac: Use new path to gnulib.
2424 * configure: Rebuild.
2425 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
2426 to gnulib.
2427
2428 2019-06-11 Tom Tromey <tom@tromey.com>
2429
2430 * Makefile.in (SFILES): Add alloc.c.
2431 (OBS): Add alloc.o.
2432 (IPA_OBJS): Add alloc-ipa.o.
2433 (alloc-ipa.o): New target.
2434 (%.o: ../%.c): New pattern rule.
2435
2436 2019-06-10 Tom Tromey <tromey@adacore.com>
2437
2438 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
2439 end warning with a newline.
2440 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
2441 newline.
2442 * thread-db.c (attach_thread): Don't end warning with a newline.
2443 (thread_db_notice_clone): Likewise.
2444 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
2445 newline.
2446 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
2447 end warning with a newline.
2448
2449 2019-06-04 Pedro Alves <palves@redhat.com>
2450
2451 * server.c (captured_main): Use make_unique_xstrdup.
2452
2453 2019-06-02 Tom Tromey <tom@tromey.com>
2454
2455 * gdbreplay.c (fromhex): Remove.
2456 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
2457
2458 2019-05-29 Tom Tromey <tromey@adacore.com>
2459
2460 * configure: Rebuild.
2461
2462 2019-05-06 Kevin Buettner <kevinb@redhat.com>
2463
2464 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
2465 sign extension code on 32-bit builds.
2466
2467 2019-05-03 Eli Zaretskii <eliz@gnu.org>
2468
2469 * remote-utils.c:
2470 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
2471
2472 2019-04-19 Tom Tromey <tom@tromey.com>
2473
2474 * server.c (struct vstop_notif): Derive from notif_event.
2475 <base>: Remove.
2476 (queue_stop_reply): Update.
2477 (remove_all_on_match_ptid): Change type. Rewrite.
2478 (discard_queued_stop_replies): Rewrite.
2479 (in_queued_stop_replies_ptid): Change type.
2480 (in_queued_stop_replies): Rewrite.
2481 (notif_stop): Update.
2482 (queue_stop_reply_callback): Update.
2483 (captured_main): Don't call initialize_notif.
2484 (push_stop_notification): Update.
2485 * notif.c (notif_write_event, handle_notif_ack)
2486 (notif_event_enque, notif_push): Update.
2487 (notif_event_xfree, initialize_notif): Remove.
2488 * notif.h (struct notif_event): Include <list>, not
2489 "common/queue.h".
2490 (struct notif_server) <queue>: Now a std::list.
2491 (notif_event_p): Remove typedef.
2492 (initialize_notif): Don't declare.
2493 (struct notif_event): Add virtual destructor.
2494
2495 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2496
2497 * ax.c (ax_vdebug): Call debug_printf.
2498 * debug.c (debug_write): New function.
2499 * debug.h (debug_write): New declaration.
2500 * linux-low.c (sigchld_handler): Call debug_write.
2501
2502 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2503
2504 * debug.c (debug_set_output): New function.
2505 (debug_vprintf): Send output to debug_file.
2506 (debug_flush): Likewise.
2507 * debug.h (debug_set_output): New declaration.
2508 * server.c (handle_monitor_command): Add debug-file option.
2509 (captured_main): Likewise.
2510
2511 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2512
2513 * debug.c (remote_debug): Add definition.
2514 * debug.h (remote_debug): Add declaration.
2515 * hostio.c (remote_debug): Remove declaration.
2516 * remote-utils.c (struct ui_file): Likewise.
2517 (remote_debug): Likewise.
2518 * remote-utils.h (remote_debug): Likewise,
2519 * server.c (remote_debug): Remove definition.
2520
2521 2019-04-10 Kevin Buettner <kevinb@redhat.com>
2522
2523 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
2524 when using a 64-bit gdbserver.
2525
2526 2019-04-09 Tom Tromey <tromey@adacore.com>
2527
2528 * linux-low.c (select_event_lwp): Use find_thread_in_random.
2529
2530 2019-04-08 Tom Tromey <tom@tromey.com>
2531
2532 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
2533 throw.
2534 (linux_resume_one_lwp): Likewise.
2535
2536 2019-04-08 Tom Tromey <tom@tromey.com>
2537
2538 * gdbreplay.c: Update.
2539 * linux-low.c: Update.
2540 * server.c: Update.
2541
2542 2019-04-08 Tom Tromey <tom@tromey.com>
2543
2544 * server.c: Use C++ exception handling.
2545 * linux-low.c: Use C++ exception handling.
2546 * gdbreplay.c: Use C++ exception handling.
2547
2548 2019-04-08 Tom Tromey <tom@tromey.com>
2549
2550 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
2551 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
2552 (captured_main, main): Update.
2553 * gdbreplay.c (main): Update.
2554
2555 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2556
2557 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
2558 value in argument pointer, return 1 if the entry is found and 0
2559 otherwise. Move comment.
2560 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
2561 * linux-low.h (linux_get_auxv): Declare.
2562 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
2563
2564 2019-04-05 Tom Tromey <tromey@adacore.com>
2565
2566 * server.c (gdbserver_usage): Use upper-case for metasyntactic
2567 variables.
2568
2569 2019-03-28 Alan Hayward <alan.hayward@arm.com>
2570
2571 * linux-low.c (AT_HWCAP2): Add define if not already included.
2572
2573 2019-03-26 Alan Hayward <alan.hayward@arm.com>
2574
2575 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
2576 (aarch64_arch_setup): Call linux_get_hwcap.
2577 * linux-arm-low.c (arm_get_hwcap): Remove function.
2578 (arm_read_description): Call linux_get_hwcap.
2579 * linux-low.c (linux_get_auxv): New function.
2580 (linux_get_hwcap): Likewise.
2581 (linux_get_hwcap2): Likewise.
2582 * linux-low.h (linux_get_hwcap): New declaration.
2583 (linux_get_hwcap2): Likewise.
2584 * linux-ppc-low.c (ppc_get_auxv): Remove function.
2585 (ppc_arch_setup): Call linux_get_hwcap.
2586 * linux-s390-low.c (s390_get_hwcap): Remove function.
2587 (s390_arch_setup): Call linux_get_hwcap.
2588
2589 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2590 Jiong Wang <jiong.wang@arm.com>
2591
2592 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
2593 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
2594 to fail.
2595 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
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_HWCAP_PACA): New define.
2601 (aarch64_get_hwcap): New function.
2602 (aarch64_arch_setup): Read APIA hwcap.
2603
2604 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2605 Jiong Wang <jiong.wang@arm.com>
2606
2607 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
2608 (initialize_low_tracepoint): Likewise.
2609 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
2610 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
2611 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
2612 (aarch64_linux_read_description): Likewise.
2613 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
2614
2615 2019-03-12 John Baldwin <jhb@FreeBSD.org>
2616
2617 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
2618 i386_create_target_description for 'segments' parameter.
2619 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
2620 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2621 * win32-i386-low.c (i386_arch_setup): Likewise.
2622
2623 2019-03-12 Tom Tromey <tromey@adacore.com>
2624
2625 * linux-low.c (iterate_over_lwps): Update.
2626
2627 2019-03-06 Tom Tromey <tom@tromey.com>
2628
2629 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
2630 (captured_main): Use SCOPE_EXIT.
2631
2632 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
2633
2634 * configure.srv: Use '$enable_unittest' instead of '$development'
2635 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
2636 case.
2637
2638 2019-02-27 Tom Tromey <tromey@adacore.com>
2639
2640 * gdbreplay.c (logchar): Handle \r\n.
2641
2642 2019-02-07 Alan Hayward <alan.hayward@arm.com>
2643
2644 * linux-low.c (linux_attach): Add process before lwp.
2645 * server.c (attach_inferior): Check if already attached.
2646
2647 2019-02-07 Tom Tromey <tom@tromey.com>
2648
2649 * x86-tdesc.h: Rename include guard.
2650 * x86-low.h: Add include guard.
2651 * wincecompat.h: Rename include guard.
2652 * win32-low.h: Add include guard.
2653 * utils.h: Rename include guard.
2654 * tracepoint.h: Rename include guard.
2655 * tdesc.h: Rename include guard.
2656 * target.h: Rename include guard.
2657 * server.h: Rename include guard.
2658 * remote-utils.h: Rename include guard.
2659 * regcache.h: Rename include guard.
2660 * nto-low.h: Rename include guard.
2661 * notif.h: Add include guard.
2662 * mem-break.h: Rename include guard.
2663 * lynx-low.h: Add include guard.
2664 * linux-x86-tdesc.h: Add include guard.
2665 * linux-s390-tdesc.h: Add include guard.
2666 * linux-ppc-tdesc-init.h: Add include guard.
2667 * linux-low.h: Add include guard.
2668 * linux-aarch64-tdesc.h: Add include guard.
2669 * linux-aarch32-low.h: Add include guard.
2670 * inferiors.h: Rename include guard.
2671 * i387-fp.h: Rename include guard.
2672 * hostio.h: Rename include guard.
2673 * gdbthread.h: Rename include guard.
2674 * gdb_proc_service.h: Rename include guard.
2675 * event-loop.h: Rename include guard.
2676 * dll.h: Rename include guard.
2677 * debug.h: Rename include guard.
2678 * ax.h: Rename include guard.
2679
2680 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
2681
2682 PR gdb/23985
2683 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
2684 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
2685
2686 2019-01-25 Tom Tromey <tom@tromey.com>
2687
2688 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
2689
2690 2019-01-25 Tom Tromey <tom@tromey.com>
2691
2692 * win32-low.c: Fix common/ includes.
2693 * win32-i386-low.c: Fix common/ includes.
2694 * tracepoint.c: Fix common/ includes.
2695 * thread-db.c: Fix common/ includes.
2696 * target.h: Fix common/ includes.
2697 * symbol.c: Fix common/ includes.
2698 * spu-low.c: Fix common/ includes.
2699 * server.h: Fix common/ includes.
2700 * server.c: Fix common/ includes.
2701 * remote-utils.c: Fix common/ includes.
2702 * regcache.h: Fix common/ includes.
2703 * regcache.c: Fix common/ includes.
2704 * nto-x86-low.c: Fix common/ includes.
2705 * notif.h: Fix common/ includes.
2706 * mem-break.h: Fix common/ includes.
2707 * lynx-low.c: Fix common/ includes.
2708 * lynx-i386-low.c: Fix common/ includes.
2709 * linux-x86-tdesc-selftest.c: Fix common/ includes.
2710 * linux-x86-low.c: Fix common/ includes.
2711 * linux-low.c: Fix common/ includes.
2712 * inferiors.h: Fix common/ includes.
2713 * i387-fp.c: Fix common/ includes.
2714 * hostio.c: Fix common/ includes.
2715 * hostio-errno.c: Fix common/ includes.
2716 * gdbthread.h: Fix common/ includes.
2717 * gdbreplay.c: Fix common/ includes.
2718 * fork-child.c: Fix common/ includes.
2719 * event-loop.c: Fix common/ includes.
2720 * ax.c:
2721 (enum gdb_agent_op): Fix common/ includes.
2722
2723 2019-01-21 Tom Tromey <tom@tromey.com>
2724
2725 * tracepoint.c: Fix includes.
2726 * remote-utils.c: Fix includes.
2727 * linux-x86-low.c: Fix includes.
2728
2729 2019-01-01 Joel Brobecker <brobecker@adacore.com>
2730
2731 * gdbreplay.c (gdbreplay_version): Update copyright year in
2732 version message.
2733 * server.c (gdbserver_version): Likewise.
2734
2735 2018-12-05 Alan Hayward <alan.hayward@arm.com>
2736
2737 * linux-low.c (add_lwp): Switch ordering.
2738
2739 2018-11-29 Tom Tromey <tom@tromey.com>
2740
2741 * win32-low.c (win32_join): Take pid, not process.
2742 * target.h (struct target_ops) <join>: Change argument type.
2743 (join_inferior): Change argument name.
2744 * spu-low.c (spu_join): Take pid, not process.
2745 * server.c (handle_detach): Preserve pid before destroying
2746 process.
2747 * lynx-low.c (lynx_join): Take pid, not process.
2748 * linux-low.c (linux_join): Take pid, not process.
2749
2750 2018-11-23 Alan Hayward <alan.hayward@arm.com>
2751
2752 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
2753 (aarch64_cannot_fetch_register): Likewise.
2754 (struct linux_target_ops): Update references.
2755
2756 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2757
2758 * linux-ppc-low.c: Include nat/linux-ptrace.h.
2759
2760 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2761
2762 * configure.srv (ipa_ppc_linux_regobj): Add
2763 powerpc-isa207-htm-vsx32l-ipa.o and
2764 powerpc-isa207-htm-vsx64l-ipa.o.
2765 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
2766 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
2767 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
2768 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
2769 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
2770 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
2771 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
2772 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
2773 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2774 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
2775 (init_registers_powerpc_isa207_htm_vsx32l)
2776 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
2777 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
2778 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
2779 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
2780 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
2781 (ppc_store_tm_ctarregset): New functions.
2782 (ppc_regsets): Add entries for HTM regsets.
2783 (ppc_arch_setup): Set htm in features struct when needed. Set
2784 sizes for the HTM regsets.
2785 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
2786 (initialize_low_arch): Call
2787 init_registers_powerpc_isa207_htm_vsx32l and
2788 init_registers_powerpc_isa207_htm_vsx64l.
2789 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2790 PPC_TDESC_ISA207_HTM_VSX.
2791 (initialize_low_tracepoint): Call
2792 init_registers_powerpc_isa207_htm_vsx32l and
2793 init_registers_powerpc_isa207_htm_vsx64l.
2794
2795 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2796
2797 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
2798 rs6000/power-linux-pmu.xml to srv_xmlfiles.
2799 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
2800 (ppc_store_pmuregset): New functions.
2801 (ppc_regsets): Add entries for ebb and pmu regsets.
2802 (ppc_arch_setup): Set isa207 in features struct if the ebb and
2803 pmu regsets are available. Set sizes for these regsets.
2804
2805 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2806
2807 * configure.srv (ipa_ppc_linux_regobj): Add
2808 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
2809 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
2810 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
2811 rs6000/powerpc-isa207-vsx32l.xml, and
2812 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
2813 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2814 <PPC_TDESC_ISA207_VSX>: New enum value.
2815 (init_registers_powerpc_isa207_vsx32l): Declare.
2816 (init_registers_powerpc_isa207_vsx64l): Declare.
2817 * linux-ppc-low.c (ppc_fill_tarregset): New function.
2818 (ppc_store_tarregset): New function.
2819 (ppc_regsets): Add entry for the TAR regset.
2820 (ppc_arch_setup): Set isa207 in features struct when needed. Set
2821 size for the TAR regsets.
2822 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
2823 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
2824 and init_registers_powerpc_isa207_vsx64l.
2825 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
2826 (initialize_low_tracepoint): Call
2827 init_registers_powerpc_isa207_vsx32l and
2828 init_registers_powerpc_isa207_vsx64l.
2829
2830 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2831 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2832
2833 * configure.srv (ipa_ppc_linux_regobj): Add
2834 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
2835 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
2836 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
2837 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
2838 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
2839 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
2840 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
2841 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2842 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
2843 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
2844 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
2845 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
2846 (ppc_hwcap): Add comment.
2847 (ppc_hwcap2): New global.
2848 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
2849 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
2850 (ppc_regsets): Add entries for the DSCR and PPR regsets.
2851 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
2852 when needed. Set sizes for the the DSCR and PPR regsets.
2853 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
2854 (initialize_low_arch): Call
2855 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2856 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2857 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2858 PPC_TDESC_ISA205_PPR_DSCR_VSX.
2859 (initialize_low_tracepoint): Call
2860 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2861 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2862
2863 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2864
2865 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
2866
2867 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
2868 Simon Marchi <simark@simark.ca>
2869
2870 * acinclude.m4: Include "../selftest.m4".
2871 * configure: Regenerate.
2872 * configure.ac: Use "GDB_AC_SELFTEST".
2873 * configure.srv: Use "$enable_unittests" instead of
2874 "$development" when checking whether unit tests have been
2875 enabled.
2876 * server.c (captured_main): Update message informing that
2877 selftests have been disabled.
2878
2879 2018-10-04 Tom Tromey <tom@tromey.com>
2880
2881 * configure: Rebuild.
2882
2883 2018-10-04 Tom Tromey <tom@tromey.com>
2884
2885 * server.c (handle_status): Rename inner "thread".
2886 (process_serial_event): Declare "res" in 'm' case.
2887 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
2888 (iterate_over_lwps): Rename inner "thread".
2889 (linux_qxfer_libraries_svr4): Rename inner "len".
2890 * gdbthread.h (find_thread_in_random): Rename inner "thread".
2891
2892 2018-10-01 Gary Benson <gbenson@redhat.com>
2893
2894 * gdb_proc_service.h: Moved common code to
2895 common/gdb_proc_service.h.
2896
2897 2018-10-01 Gary Benson <gbenson@redhat.com>
2898
2899 * gdb_proc_service.h: Synchronize comments and whitespace with
2900 GDB's version of this file.
2901
2902 2018-09-25 Tom Tromey <tom@tromey.com>
2903
2904 * configure: Rebuild.
2905 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
2906
2907 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2908
2909 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
2910 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
2911 ($(IPA_LIB)): Sort IPA_OBJS.
2912
2913 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2914
2915 * Makefile.in: Remove references to $(ADD_DEPS).
2916
2917 2018-09-16 Tom Tromey <tom@tromey.com>
2918
2919 * remote-utils.c (remote_open): Use GNU style for metasyntactic
2920 variables.
2921 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
2922 variables.
2923
2924 2018-09-05 Tom Tromey <tom@tromey.com>
2925
2926 * configure: Rebuild.
2927
2928 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2929
2930 PR build/23399
2931 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
2932
2933 2018-08-27 Tom Tromey <tom@tromey.com>
2934
2935 PR build/23087:
2936 * configure: Rebuild.
2937
2938 2018-08-27 Tom Tromey <tom@tromey.com>
2939
2940 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
2941 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
2942 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
2943 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
2944 (s390x_emit_stack_adjust): Add casts to unsigned char.
2945
2946 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
2947
2948 PR gdb/23374
2949 PR gdb/23375
2950 * server.h (struct client_state) <disable_randomization>:
2951 Initialize to 1.
2952
2953 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
2954
2955 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
2956 variable.
2957 (mips_supply_ptrace_register): Likewise.
2958
2959 2018-07-22 Tom Tromey <tom@tromey.com>
2960
2961 * configure: Rebuild.
2962
2963 2018-07-22 Tom Tromey <tom@tromey.com>
2964
2965 * win32-low.c (win32_create_inferior): Remove unused variables.
2966 * gdbreplay.c (remote_open): Remove unused variable.
2967 * remote-utils.c (remote_prepare): Remove unused variable.
2968 * x86-tdesc.h (X86_TDESC_H): Define.
2969 (amd64_expedite_regs): Define conditionally.
2970 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
2971 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
2972 * remote-utils.c (readchar): Remove unused variable.
2973
2974 2018-07-13 Pedro Alves <palves@redhat.com>
2975
2976 * linux-low.c (linux_kill): Change parameter to process_info
2977 pointer instead of pid. Adjust.
2978 * lynx-low.c (lynx_kill): Likewise.
2979 * nto-low.c (nto_kill): Likewise.
2980 * spu-low.c (spu_kill): Likewise.
2981 * win32-low.c (win32_kill): Likewise.
2982 * server.c (handle_v_kill, kill_inferior_callback)
2983 (detach_or_kill_for_exit): Adjust.
2984 * target.c (kill_inferior): Change parameter to process_info
2985 pointer instead of pid. Adjust.
2986 * target.h (struct target_ops) <kill>: Change parameter to
2987 process_info pointer instead of pid. Adjust all implementations
2988 and callers.
2989 (kill_inferior): Likewise.
2990
2991 2018-07-13 Pedro Alves <palves@redhat.com>
2992
2993 * linux-low.c (linux_detach, linux_join): Change parameter to
2994 process_info pointer instead of pid. Adjust.
2995 * lynx-low.c (lynx_detach, lynx_join): Likewise.
2996 * nto-low.c (nto_detach): Likewise.
2997 * spu-low.c (spu_detach, spu_join): Likewise.
2998 * win32-low.c (win32_detach, win32_join): Likewise.
2999 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
3000 * target.h (struct target_ops) <detach, join>: Change parameter to
3001 process_info pointer instead of pid. Adjust all implementations
3002 and callers.
3003 (detach_inferior, join_inferior): Rename 'pid' parameter to
3004 'proc'.
3005
3006 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
3007 Jan Kratochvil <jan.kratochvil@redhat.com>
3008 Paul Fertser <fercerpav@gmail.com>
3009 Tsutomu Seki <sekiriki@gmail.com>
3010
3011 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
3012 (OBS): Add 'common/netstuff.o'.
3013 (GDBREPLAY_OBS): Likewise.
3014 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
3015 (remote_open): Implement support for IPv6
3016 connections.
3017 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
3018 and 'wspiapi.h'.
3019 (handle_accept_event): Accept connections from IPv6 sources.
3020 (remote_prepare): Handle IPv6-style hostnames; implement
3021 support for IPv6 connections.
3022 (remote_open): Implement support for printing connections from
3023 IPv6 sources.
3024
3025 2018-07-11 Pedro Alves <palves@redhat.com>
3026
3027 PR gdb/23377
3028 * mem-break.c (any_persistent_commands): Add process_info
3029 parameter and use it instead of relying on the current process.
3030 Change return type to bool.
3031 * mem-break.h (any_persistent_commands): Add process_info
3032 parameter and change return type to bool.
3033 * server.c (handle_detach): Remove require_running_or_return call.
3034 Look up the process_info for the process we're about to detach.
3035 If not found, return back error to GDB. Adjust
3036 any_persistent_commands call to pass down a process pointer.
3037
3038 2018-07-11 Pedro Alves <palves@redhat.com>
3039
3040 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
3041 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
3042 instead of collect_register_by_name.
3043 * regcache.c (regcache_raw_get_unsigned_by_name): New.
3044 * regcache.h (regcache_raw_get_unsigned_by_name): New.
3045
3046 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
3047 Pedro Alves <palves@redhat.com>
3048
3049 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
3050
3051 2018-07-03 Tom Tromey <tom@tromey.com>
3052
3053 * linux-low.c: Update.
3054 * lynx-low.c: Update.
3055 * mem-break.c: Update.
3056 * nto-low.c: Update.
3057 * remote-utils.c: Update.
3058 * server.c: Update.
3059 * spu-low.c: Update.
3060 * target.c: Update.
3061 * win32-low.c: Update.
3062
3063 2018-07-03 Tom Tromey <tom@tromey.com>
3064
3065 * server.c: Update.
3066
3067 2018-07-03 Tom Tromey <tom@tromey.com>
3068
3069 * linux-low.c: Update.
3070
3071 2018-07-03 Tom Tromey <tom@tromey.com>
3072
3073 * target.c: Update.
3074
3075 2018-07-03 Tom Tromey <tom@tromey.com>
3076
3077 * linux-low.c: Update.
3078 * linux-mips-low.c: Update.
3079 * lynx-low.c: Update.
3080 * nto-low.c: Update.
3081 * remote-utils.c: Update.
3082 * server.c: Update.
3083 * spu-low.c: Update.
3084 * target.c: Update.
3085 * thread-db.c: Update.
3086
3087 2018-07-03 Tom Tromey <tom@tromey.com>
3088
3089 * linux-low.c: Update.
3090 * linux-mips-low.c: Update.
3091 * lynx-low.c: Update.
3092 * mem-break.c: Update.
3093 * nto-low.c: Update.
3094 * remote-utils.c: Update.
3095 * server.c: Update.
3096 * spu-low.c: Update.
3097 * target.c: Update.
3098 * tracepoint.c: Update.
3099
3100 2018-07-03 Tom Tromey <tom@tromey.com>
3101
3102 * linux-low.c: Update.
3103 * linux-ppc-low.c: Update.
3104 * linux-x86-low.c: Update.
3105 * proc-service.c: Update.
3106 * server.c: Update.
3107 * spu-low.c: Update.
3108 * thread-db.c: Update.
3109 * win32-low.c: Update.
3110
3111 2018-07-03 Tom Tromey <tom@tromey.com>
3112
3113 * linux-low.c: Update.
3114 * lynx-low.c: Update.
3115 * nto-low.c: Update.
3116 * remote-utils.c: Update.
3117 * spu-low.c: Update.
3118 * thread-db.c: Update.
3119 * win32-low.c: Update.
3120
3121 2018-06-29 Joel Brobecker <brobecker@adacore.com>
3122
3123 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
3124 parameter in call to 'amd64_create_target_description'.
3125
3126 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3127
3128 * x86-tdesc.h: Remove executable permission flag.
3129
3130 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
3131
3132 * configure.ac: Remove AC_PREREQ, add missing quoting.
3133 * configure: Re-generate.
3134 * config.in: Re-generate.
3135 * aclocal.m4: Re-generate.
3136
3137 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
3138
3139 * tracepoint.h (current_traceframe): Remove declaration.
3140
3141 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3142
3143 * linux-aarch64-low.c (is_sve_tdesc): New function.
3144 (aarch64_sve_regs_copy_to_regcache): Likewise.
3145 (aarch64_sve_regs_copy_from_regcache): Likewise.
3146 (aarch64_regs_info): Add SVE checks.
3147 (initialize_low_arch): Initialize SVE.
3148
3149 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3150
3151 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
3152
3153 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3154
3155 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
3156 (initialize_low_tracepoint): Likewise
3157 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
3158 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
3159 param.
3160 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
3161 checks.
3162 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
3163
3164 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3165
3166 * server.h (PBUFSIZ): Increase size
3167
3168 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3169
3170 * regcache.c (regcache::raw_compare): New function.
3171 * regcache.h (regcache::raw_compare): New declaration.
3172
3173 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3174
3175 * regcache.c (new_register_cache): Use new.
3176 (free_register_cache): Use delete.
3177 (register_data): Use const.
3178 (supply_register): Move body inside regcache.
3179 (regcache::raw_supply): New override function.
3180 (collect_register): Move body inside regcache.
3181 (regcache::raw_collect): New override function.
3182 (regcache::get_register_status): New override function.
3183 * regcache.h (struct regcache): Inherit from reg_buffer_common.
3184
3185 2018-06-09 Tom Tromey <tom@tromey.com>
3186
3187 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
3188 declare queue.
3189 (event_queue): Use std::queue.
3190 (gdb_event_xfree): Remove.
3191 (initialize_event_loop, process_event, wait_for_event): Update.
3192
3193 2018-06-08 Stan Cox <scox@redhat.com>
3194
3195 * win32-low.c (win32_create_inferior): last_ptid and last_status
3196 moved to client_state.
3197
3198 2018-06-08 Pedro Alves <palves@redhat.com>
3199
3200 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
3201 common/common-exceptions.o, common/common-utils.o,
3202 common/errors.o, common/print-utils.o and utils.o.
3203 * gdbreplay.c: Include "common-defs.h" instead of the two
3204 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
3205 string.h or alloca.h.
3206 (perror_with_name): Delete.
3207 (remote_open): Use xstrdup instead of strdup.
3208 (main): Rename to ...
3209 (captured_main): ... this.
3210 (main): New.
3211
3212 2018-06-08 Tom Tromey <tom@tromey.com>
3213
3214 * linux-low.c (linux_low_read_btrace): Update.
3215
3216 2018-06-04 Stan Cox <scox@redhat.com>
3217
3218 * server.h (struct client_state): New.
3219 * server.c (cont_thread, general_thread, multi_process)
3220 (report_fork_events, report_vfork_events, report_exec_events)
3221 (report_thread_events, swbreak_feature, hwbreak_feature)
3222 (vCont_supported, disable_randomization, pass_signals)
3223 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
3224 Moved to client_state.
3225 * remote-utils.c (remote_debug, noack_mode)
3226 (transport_is_reliable): Moved to client_state.
3227 * tracepoint.c (current_traceframe): Moved to client_state.
3228
3229 Update all callers.
3230 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
3231 linux-low.c, remote-utils.h, target.c: Use client_state.
3232
3233 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3234
3235 * configure.srv: Add new c/h file.
3236
3237 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3238
3239 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
3240 null VQ.
3241
3242 2018-05-25 Maciej W. Rozycki <macro@mips.com>
3243
3244 * gdb.arch/mips-fpregset-core.exp: New test.
3245 * gdb.arch/mips-fpregset-core.c: New test source.
3246
3247 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
3248
3249 PR server/23198
3250 * hostio.c (require_int): Do not report overflow for integers
3251 between 0xfffffff and 0x7fffffff.
3252
3253 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3254
3255 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
3256 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
3257 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
3258 functions.
3259 (the_low_target): Wire them.
3260
3261 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3262
3263 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
3264 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
3265 mode. Call collect_register_by_name with vscr using
3266 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
3267 (ppc_store_vrregset): Add and set vscr_offset variable as in
3268 ppc_fill_vrregset. Call supply_register_by_name with vscr using
3269 vscr_offset.
3270
3271 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3272
3273 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
3274 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
3275 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
3276
3277 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3278
3279 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
3280 (ppc_store_vsxregset): Likewise.
3281 (ppc_fill_vrregset): Likewise.
3282 (ppc_store_vrregset): Likewise.
3283 (ppc_fill_evrregset): Likewise.
3284 (ppc_store_evrregset): Likewise.
3285 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
3286 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
3287 needed.
3288
3289 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3290
3291 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
3292 wordsize of the inferior. Call ppc_linux_target_wordsize.
3293
3294 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3295
3296 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
3297 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
3298 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
3299 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
3300 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
3301 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
3302 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
3303 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
3304 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
3305 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
3306 (tdesc_powerpc_e500l): Remove.
3307 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
3308 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
3309 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
3310 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
3311 linux-ppc-tdesc.h.
3312 (ppc_arch_setup): Remove target description matching code. Fill a
3313 ppc_linux_features struct and call ppc_linux_match_description
3314 with it.
3315
3316 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3317
3318 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
3319 width of the requested register exceeds the width of the
3320 `ptrace' data type.
3321 (mips_cannot_store_register): Likewise.
3322
3323 2018-05-21 Maciej W. Rozycki <macro@mips.com>
3324
3325 * linux-mips-low.c (mips_fetch_register): New function. Update
3326 preceding comment.
3327 (mips_store_gregset): Supply 0 rather than $restart for $zero.
3328 (the_low_target): Wire `mips_fetch_register'.
3329
3330 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3331
3332 * lynx-i386-low.c (LYNXOS_178): New macro.
3333 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
3334 the layout on LynxOS-178.
3335 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
3336 handle floating point registers that are not supported by
3337 LynxOS-178.
3338
3339 2018-05-10 Tom Tromey <tom@tromey.com>
3340
3341 * configure: Rebuild.
3342
3343 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3344
3345 PR server/23158:
3346 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
3347 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
3348 Use it to set the expedite_regs field in the given tdesc.
3349 * x86-tdesc.h: New file.
3350 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
3351 Adjust following the addition of the new expedite_regs parameter
3352 to init_target_desc.
3353 * linux-tic6x-low.c (tic6x_read_description): Likewise.
3354 * linux-x86-tdesc.c: #include "x86-tdesc.h".
3355 (i386_linux_read_description, amd64_linux_read_description):
3356 Adjust following the addition of the new expedite_regs parameter
3357 to init_target_desc.
3358 * lynx-i386-low.c: #include "x86-tdesc.h".
3359 (lynx_i386_arch_setup): Adjust following the addition of the new
3360 expedite_regs parameter to init_target_desc.
3361 * nto-x86-low.c: #include "x86-tdesc.h".
3362 (nto_x86_arch_setup): Adjust following the addition of the new
3363 expedite_regs parameter to init_target_desc.
3364 * win32-i386-low.c: #include "x86-tdesc.h".
3365 (i386_arch_setup): Adjust following the addition of the new
3366 expedite_regs parameter to init_target_desc.
3367
3368 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3369
3370 PR server/23158:
3371 * win32-low.c (win32_create_inferior): Add call to my_wait
3372 setting last_status global.
3373
3374 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3375
3376 PR server/23158:
3377 * win32-low.c (create_process): Only call gdb_tilde_expand if
3378 inferior_cwd is not NULL.
3379
3380 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
3381
3382 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
3383 registers to the cache if their values have changed.
3384 (i387_xsave_to_cache): Provide default values for x87 control
3385 registers when these features are available, but disabled.
3386 * regcache.c (supply_register_by_name_zeroed): New function.
3387 * regcache.h (supply_register_by_name_zeroed): Declare new
3388 function.
3389
3390 2018-05-07 Tom Tromey <tom@tromey.com>
3391
3392 * configure: Rebuild.
3393
3394 2018-05-04 Tom Tromey <tom@tromey.com>
3395
3396 * configure: Rebuild.
3397
3398 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
3399 Pedro Alves <palves@redhat.com>
3400
3401 * linux-aarch64-low.c (aarch64_stopped_data_address):
3402 Likewise.
3403
3404 2018-04-27 Tom Tromey <tom@tromey.com>
3405
3406 * configure: Rebuild.
3407
3408 2018-04-23 Tom Tromey <tom@tromey.com>
3409
3410 * configure: Rebuild.
3411
3412 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
3413
3414 * Makefile.in (depcomp): Add "..".
3415 (all_deps_files): New and use it.
3416
3417 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3418
3419 * configure.srv (aarch64*-*-linux*): Don't include xml.
3420 (i[34567]86-*-cygwin*): Likewise.
3421 (i[34567]86-*-linux*): Likewise.
3422 (i[34567]86-*-lynxos*): Likewise.
3423 (i[34567]86-*-mingw32ce*): Likewise.
3424 (i[34567]86-*-mingw*): Likewise.
3425 (i[34567]86-*-nto*): Likewise.
3426 (tic6x-*-uclinux): Likewise.
3427 (x86_64-*-linux*): Likewise.
3428 (x86_64-*-mingw*): Likewise.
3429 (x86_64-*-cygwin*): Likewise.
3430
3431 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3432
3433 * tdesc.c: Remove xml parameter.
3434
3435 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3436
3437 * server.c (get_features_xml): Remove cast.
3438 * tdesc.c (void target_desc::accept): Fill in function.
3439 (tdesc_get_features_xml): Remove old xml creation.
3440 (print_xml_feature::visit_pre): Add xml vistor.
3441 * tdesc.h (struct target_desc): Make xmltarget mutable.
3442 (tdesc_get_features_xml): Remove declaration.
3443
3444 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3445
3446 * tdesc.c (tdesc_architecture_name): Add new function.
3447 (tdesc_osabi_name): Likewise.
3448 (tdesc_get_features_xml): Use new functions.
3449
3450 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3451
3452 * tdesc.c (tdesc_create_flags): Remove.
3453 (tdesc_add_flag): Likewise.
3454 (tdesc_named_type): Likewise.
3455 (tdesc_create_union): Likewise.
3456 (tdesc_create_struct): Likewise.
3457 (tdesc_create_vector): Likewise.
3458 (tdesc_add_bitfield): Likewise.
3459 (tdesc_add_field): Likewise.
3460 (tdesc_set_struct_size): Likewise.
3461
3462 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3463
3464 * tdesc.c (~target_desc): Remove implictly deleted items.
3465 (init_target_desc): Iterate all features.
3466 (tdesc_get_features_xml): Use vector.
3467 (tdesc_create_feature): Create feature.
3468 * tdesc.h (tdesc_feature) Remove
3469 (target_desc): Add features.
3470
3471 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3472
3473 * Makefile.in: Add common/tdesc.c
3474 * tdesc.c (init_target_desc): init all reg_defs from register
3475 vector.
3476 (tdesc_create_reg): Create tdesc_reg.
3477 * tdesc.h (tdesc_feature): Add register vector.
3478
3479 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
3480
3481 * tdesc.h (struct target_desc) <features>: Change type to
3482 std::vector<std::string>.
3483 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
3484 changes.
3485 (tdesc_get_features_xml): Likewise.
3486 (tdesc_create_feature): Likewise.
3487
3488 2018-03-26 Alan Hayward <alan.hayward@arm.com>
3489
3490 * regcache.c (find_register_by_number): Return a ref.
3491 (find_regno): Use references.
3492 (register_size): Likewise.
3493 (register_data): Likewise.
3494 * tdesc.c (target_desc::~target_desc): Remove free calls.
3495 (target_desc::operator==): Use std::vector compare.
3496 (init_target_desc): Use reference.
3497 (tdesc_create_reg): Use reg constructors.
3498 * tdesc.h (struct target_desc): Replace pointer with object.
3499
3500 2018-03-23 Alan Hayward <alan.hayward@arm.com>
3501
3502 * regcache.c (find_register_by_number): Make static.
3503 (find_regno): Use find_register_by_number
3504 * regcache.h (struct reg): Remove declaration.
3505
3506 2018-03-23 Alan Hayward <alan.hayward@arm.com>
3507
3508 * tdesc.c (target_desc::~target_desc): Move to here.
3509 (target_desc::operator==): Likewise.
3510 * tdesc.h (target_desc::~target_desc): Move from here.
3511 (target_desc::operator==): Likewise.
3512
3513 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
3514
3515 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
3516
3517 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3518
3519 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
3520 S390_TDESC_GS.
3521 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
3522 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
3523 and init_registers_s390_gs_linux64.
3524
3525 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3526
3527 * linux-s390-low.c (s390_fill_gs): Remove function.
3528 (s390_fill_gsbc): Remove function.
3529 (s390_regsets): Set fill functions for the guarded storage regsets
3530 to NULL.
3531
3532 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3533
3534 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
3535 the word size. Add comment.
3536 (s390_get_wordsize): New function.
3537 (s390_arch_setup): No longer select a temporary tdesc to fetch the
3538 pswm with it. Instead, use s390_get_wordsize to determine the
3539 word size first and derive the correct tdesc from that directly.
3540
3541 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
3542
3543 * Makefile.in: Include silent-rules.mk.
3544 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
3545 (COMPILE): Add ECHO_CXX.
3546 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3547 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3548 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
3549 (version-generated.c): Add ECHO_GEN.
3550 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
3551 (IPAGENT_COMPILE): Add ECHO_CXX.
3552 (%-generated.c): Add ECHO_REGDAT.
3553
3554 2018-03-14 Tom Tromey <tom@tromey.com>
3555
3556 PR cli/14977:
3557 * ax.c (ax_printf): Special case for NULL.
3558
3559 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3560
3561 * linux-low.c (linux_qxfer_libraries_svr4): Use
3562 xml_escape_text_append.
3563
3564 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3565
3566 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
3567
3568 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3569
3570 * server.c (handle_general_set): Remove unnecessary xstrdup.
3571
3572 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3573
3574 * server.c (parse_debug_format_options): Adjust to
3575 delim_string_to_char_ptr_vec changes.
3576 * thread-db.c (thread_db_load_search): Adjust to
3577 dirnames_to_char_ptr_vec changes.
3578
3579 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
3580
3581 * target.h (target_enable_btrace, target_disable_btrace)
3582 (target_read_btrace, target_read_btrace_conf): Turn macro into
3583 inline function. Throw error if target method is not defined.
3584 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
3585 check for btrace target method. Be prepared to handle exceptions
3586 from btrace target methods.
3587
3588 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3589
3590 * server.c (captured_main): Change order of error message printed
3591 when the current working directory cannot be found.
3592
3593 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3594
3595 * server.c: Include "filenames.h" and "pathstuff.h".
3596 (program_name): Delete variable.
3597 (program_path): New anonymous class.
3598 (get_exec_wrapper): Use "program_path" instead of
3599 "program_name".
3600 (handle_v_run): Likewise.
3601 (captured_main): Likewise.
3602 (process_serial_event): Likewise.
3603
3604 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3605
3606 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
3607 (OBJS): Add "pathstuff.o".
3608 * server.c (current_directory): New global variable.
3609 (captured_main): Initialize "current_directory".
3610
3611 2018-02-26 Alan Hayward <alan.hayward@arm.com>
3612
3613 * tdesc.c: Use common/tdesc.h.
3614 * tdesc.h: Likewise.
3615
3616 2018-02-20 Alan Hayward <alan.hayward@arm.com>
3617 Simon Marchi <simon.marchi@ericsson.com>
3618
3619 * Makefile.in: Switch order of make rules.
3620
3621 2018-02-19 Alan Hayward <alan.hayward@arm.com>
3622
3623 * Makefile.in: Add common directory in build.
3624 * configure.ac: Add common reference.
3625 * configure: Regenerate.
3626
3627 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3628
3629 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
3630 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
3631 * spu-low.c (spu_target_ops): Likewise.
3632 * win32-low.c (win32_target_ops): Likewise.
3633 * server.c (supported_btrace_packets): Report packets unconditionally.
3634 * target.h (target_ops) <supports_btrace>: Remove.
3635 (target_supports_btrace): Remove.
3636
3637 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3638
3639 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
3640 (handle_btrace_disable): Change return type to void. Use exceptions
3641 to report errors.
3642 (handle_btrace_general_set): Catch exception and copy message to
3643 return message.
3644
3645 2018-02-08 Tom Tromey <tom@tromey.com>
3646
3647 * linux-low.c (install_software_single_step_breakpoints): Use
3648 make_scoped_restore.
3649 * inferiors.c (make_cleanup_restore_current_thread): Remove.
3650 (do_restore_current_thread_cleanup): Remove.
3651 * gdbthread.h (make_cleanup_restore_current_thread): Don't
3652 declare.
3653
3654 2018-02-08 Tom Tromey <tom@tromey.com>
3655
3656 * mem-break.c (set_raw_breakpoint_at): Use
3657 gdb::unique_xmalloc_ptr.
3658
3659 2018-01-30 Pedro Alves <palves@redhat.com>
3660
3661 PR gdb/13211
3662 * target.c (target_terminal::terminal_state): Rename to ...
3663 (target_terminal::m_terminal_state): ... this.
3664
3665 2018-01-19 James Clarke <jrtc27@jrtc27.com>
3666
3667 * linux-low.c (handle_extended_wait): Surround call to
3668 thread_db_notice_clone with #ifdef USE_THREAD_DB.
3669
3670 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
3671
3672 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
3673 linux_ptrace_attach_fail_reason_string now returning an
3674 std::string.
3675 (linux_attach): Likewise.
3676 * thread-db.c (attach_thread): Likewise.
3677
3678 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
3679
3680 PR gdb/21559
3681 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
3682 checking for fs_base/gs_base fields in struct user_regs_struct.
3683 * configure: Regenerate.
3684
3685 2018-01-16 Yao Qi <yao.qi@linaro.org>
3686
3687 PR gdb/18749
3688 * linux-low.c (fetch_register): Call supply_register instead of
3689 error.
3690
3691 2018-01-08 Yao Qi <yao.qi@linaro.org>
3692 Simon Marchi <simon.marchi@ericsson.com>
3693
3694 * Makefile.in (OBS): Remove selftest.o.
3695 * configure.ac: Set srv_selftest_objs if $development is true.
3696 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
3697 * configure: Re-generated.
3698 * server.c (captured_main): Wrap variable selftest_filter with
3699 GDB_SELF_TEST.
3700
3701 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
3702
3703 * server.c (parse_debug_format_options): Return std::string.
3704 (handle_monitor_command, captured_main): Adjust.
3705
3706 2018-01-05 Pedro Alves <palves@redhat.com>
3707
3708 PR gdb/18653
3709 * server.c (captured_main): Pass quiet=false to
3710 save_original_signals_state.
3711
3712 2018-01-01 Joel Brobecker <brobecker@adacore.com>
3713
3714 * gdbreplay.c (gdbreplay_version): Update copyright year in
3715 version message.
3716 * server.c (gdbserver_version): Likewise.
3717
3718 2017-12-08 Tom Tromey <tom@tromey.com>
3719
3720 * ax.c (ax_printf): Update.
3721
3722 2017-12-07 Yao Qi <yao.qi@linaro.org>
3723
3724 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
3725 aarch64_linux_read_description.
3726 * linux-amd64-ipa.c (idx2mask): New array.
3727 (get_ipa_tdesc): Move idx2mask out.
3728 (initialize_low_tracepoint): Initialize target descriptions.
3729 * linux-i386-ipa.c (idx2mask): New array.
3730 (get_ipa_tdesc): Move idx2mask out.
3731 (initialize_low_tracepoint): Initialize target descriptions.
3732
3733 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
3734
3735 * tdesc.c (struct tdesc_type): Change return type.
3736 (tdesc_add_flag): Change parameter type.
3737 (tdesc_add_bitfield): Likewise.
3738 (tdesc_add_field): Likewise.
3739 (tdesc_set_struct_size): Likewise.
3740
3741 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
3742
3743 * regcache.c (registers_to_string): Remove unused variable.
3744
3745 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3746
3747 * inferiors.c (for_each_inferior_with_data): Remove.
3748 * inferiors.h (for_each_inferior_with_data): Remove.
3749 * server.c (handle_qxfer_threads_worker): Change parameter type.
3750 (handle_qxfer_threads_proper): Use for_each_thread.
3751
3752 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3753
3754 * inferiors.c (for_each_inferior): Remove.
3755 (clear_inferiors): Use for_each_thread.
3756 * inferiors.h (for_each_inferior): Remove.
3757 * linux-low.c (linux_wait_for_event_filtered): Use
3758 for_each_thread.
3759 (linux_stabilize_threads): Likewise.
3760 * regcache.c (regcache_release): Likewise.
3761 * server.c (gdb_wants_all_threads_stopped): Likewise.
3762 (clear_pending_status_callback): Remove.
3763 (handle_status): Use for_each_thread.
3764 (captured_main): Likewise.
3765 * win32-low.c (child_init_thread_list): Likewise.
3766 (win32_clear_inferiors): Likewise.
3767 (fake_breakpoint_event): Likewise.
3768
3769 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3770
3771 * inferiors.h (find_inferior): Remove.
3772 * inferiors.c (find_inferior): Remove.
3773
3774 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3775
3776 * linux-low.c (resume_status_pending_p): Update comment.
3777 (need_step_over_p): Update comment.
3778
3779 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3780
3781 * linux-low.c (proceed_one_lwp): Return void, change parameter
3782 type.
3783 (unsuspend_and_proceed_one_lwp): Likewise.
3784 (proceed_all_lwps): Use for_each_thread.
3785 (unstop_all_lwps): Likewise.
3786
3787 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3788
3789 * linux-low.c (linux_resume_one_thread): Return void, take
3790 parameter directly.
3791 (linux_resume): Use for_each_thread.
3792
3793 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3794
3795 * linux-low.c (send_sigstop_callback): Return void, change
3796 parameter type. Rename to...
3797 (send_sigstop): ... this.
3798 (suspend_and_send_sigstop_callback): Return void, change parameter
3799 type. Rename to...
3800 (suspend_and_send_sigstop): ... this.
3801 (stop_all_lwps): Use for_each_thread.
3802
3803 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3804
3805 * linux-low.c (lwp_running): Return bool, remove unused
3806 argument.
3807 (linux_stabilize_threads): Use find_thread.
3808
3809 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3810
3811 * linux-low.c (select_singlestep_lwp_callback): Remove.
3812 (count_events_callback): Remove.
3813 (select_event_lwp_callback): Remove.
3814 (select_event_lwp): Use find_thread/for_each_thread.
3815
3816 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3817
3818 * linux-low.c (not_stopped_callback): Return bool, take filter
3819 argument directly.
3820 (linux_wait_for_event_filtered): Use find_thread.
3821 (linux_wait_1): Likewise.
3822
3823 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3824
3825 * linux-low.c (same_lwp): Remove.
3826 (find_lwp_pid): Use find_thread.
3827
3828 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3829
3830 * linux-low.c (delete_lwp_callback): Remove.
3831 (linux_mourn): Use for_each_thread.
3832
3833 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3834
3835 * linux-low.c (linux_detach_lwp_callback): Return void, remove
3836 args parameter, don't check for pid.
3837 (linux_detach): Use for_each_thread.
3838
3839 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3840
3841 * linux-low.c (struct counter): Remove.
3842 (second_thread_of_pid_p): Remove.
3843 (last_thread_of_process_p): Use find_thread.
3844
3845 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3846
3847 * inferiors.c (find_inferior_in_random): Remove.
3848 * inferiors.h (find_inferior_in_random): Remove.
3849 * linux-low.c (status_pending_p_callback): Return bool, accept
3850 parameter ptid directly.
3851 (linux_wait_for_event_filtered): Use find_thread_in_random.
3852 (linux_wait_1): Likewise.
3853
3854 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3855
3856 * inferiors.c (find_inferior_id): Remove.
3857 (find_thread_ptid): Move implemention from find_inferior_id to
3858 here.
3859 * inferiors.h (find_inferior_id): Remove.
3860 * server.c (handle_status): Use find_thread_ptid.
3861 (process_serial_event): Likewise.
3862 * thread-db.c (find_one_thread): Likewise.
3863 (thread_db_thread_handle): Likewise.
3864 * win32-low.c (thread_rec): Likewise.
3865 (child_delete_thread): Likewise.
3866 (win32_thread_alive): Likewise.
3867 (get_child_debug_event): Likewise.
3868
3869 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3870
3871 * linux-mips-low.c (update_watch_registers_callback): Return
3872 void, remove pid_p parameter, don't check for pid.
3873 (mips_insert_point, mips_remove_point): Use for_each_thread.
3874
3875 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3876
3877 * lynx.low (lynx_delete_thread_callback): Remove.
3878 (lynx_mourn): Use for_each_thread.
3879
3880 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3881
3882 * regcache.c (regcache_invalidate_one): Remove.
3883 (regcache_invalidate_pid): use for_each_thread.
3884
3885 2017-11-26 Tom Tromey <tom@tromey.com>
3886
3887 * linux-low.c (linux_create_inferior): Update.
3888
3889 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
3890
3891 * spu-low.c (spu_create_inferior): Fix typo in argument name.
3892
3893 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3894
3895 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
3896 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3897 * linux-aarch64-tdesc-selftest.c: New file.
3898 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3899
3900 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3901
3902 * configure.srv: Add new file.
3903 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3904 * linux-aarch64-tdesc-selftest.c: New file.
3905 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3906
3907 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3908
3909 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
3910 * linux-aarch64-low.c (initialize_low_arch): Remove init.
3911 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
3912
3913 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3914
3915 * configure.srv: Add new files.
3916 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
3917 aarch64_linux_read_description.
3918 * linux-aarch64-low.c (aarch64_linux_read_description):
3919 Merge with aarch64_arch_setup.
3920 (aarch64_arch_setup): Call aarch64_linux_read_description.
3921 * linux-aarch64-tdesc.c: New file.
3922 * linux-aarch64-tdesc.h: New file.
3923
3924 2017-11-24 Yao Qi <yao.qi@linaro.org>
3925
3926 * configure.srv: Set $srv_regobj for tic6x-linux.
3927 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
3928 (tic6x_read_description): Move some code to tic6x_arch_setup.
3929 (tic6x_tdesc_test): New function.
3930 (initialize_low_arch): Call selftests::register_test.
3931
3932 2017-11-22 Yao Qi <yao.qi@linaro.org>
3933
3934 * remote-utils.c (prepare_resume_reply): Use memcpy.
3935
3936 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3937
3938 * linux-low.c (kill_one_lwp_callback): Return void, take
3939 argument directly, don't filter on pid.
3940 (linux_kill): Use for_each_thread.
3941
3942 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3943
3944 * linux-low.c (need_step_over_p): Return bool, remove dummy
3945 argument.
3946 (linux_resume, proceed_all_lwps): Use find_thread.
3947
3948 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3949
3950 * linux-low.c (resume_status_pending_p): Return bool, remove
3951 flag_p argument.
3952 (linux_resume): Use find_thread.
3953
3954 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3955
3956 * linux-low.c (struct thread_resume_array): Remove.
3957 (linux_set_resume_request): Return void, take arguments
3958 directly.
3959 (linux_resume): Use for_each_thread.
3960
3961 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3962
3963 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
3964 return bool, remove data argument.
3965 (linux_stabilize_threads): Use find_thread.
3966
3967 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3968
3969 * linux-low.c (unsuspend_one_lwp): Remove.
3970 (unsuspend_all_lwps): Use for_each_thread, inline code from
3971 unsuspend_one_lwp.
3972
3973 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3974
3975 * gdbthread.h (find_thread): Add overload with ptid_t filter.
3976 * linux-low.c (struct iterate_over_lwps_args): Remove.
3977 (iterate_over_lwps_filter): Remove.
3978 (iterate_over_lwps): Use find_thread.
3979
3980 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3981
3982 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
3983 (linux_handle_new_gdb_connection): Use for_each_thread, inline
3984 code from reset_lwp_ptrace_options_callback.
3985
3986 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3987
3988 * linux-arm-low.c (struct update_registers_data): Remove.
3989 (update_registers_callback): Return void, take arguments
3990 directly, don't check thread's pid.
3991 (arm_insert_point, arm_remove_point): Use for_each_thread.
3992
3993 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3994
3995 * win32-low.c (continue_one_thread): Return void, take argument
3996 directly.
3997 (child_continue): Use for_each_thread.
3998
3999 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4000
4001 * win32-i386-low.c (update_debug_registers_callback): Rename
4002 to ...
4003 (update_debug_registers): ... this, return void, remove pid_p arg.
4004 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
4005
4006 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4007
4008 * inferiors.h (struct process_info): Add constructor, initialize
4009 fields..
4010 <syscalls_to_catch>: Change type to std::vector<int>.
4011 * inferiors.c (add_process): Allocate process_info with new.
4012 (remove_process): Free process_info with delete.
4013 * linux-low.c (handle_extended_wait): Adjust.
4014 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
4015 * server.c (handle_general_set): Adjust.
4016
4017 2017-11-16 Pedro Alves <palves@redhat.com>
4018
4019 * remote-utils.c (remote_close): Block SIGIO signals instead of
4020 uninstalling the SIGIO handler.
4021
4022 2017-11-16 Alan Hayward <alan.hayward@arm.com>
4023
4024 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
4025
4026 2017-11-16 Yao Qi <yao.qi@linaro.org>
4027
4028 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
4029 (tic6x_store_gregset): Likewise.
4030 (tic6x_usrregs_info): Move it up.
4031
4032 2017-11-15 Alan Hayward <alan.hayward@arm.com>
4033
4034 * Makefile.in: Update arch rules.
4035 * configure.srv: Explicitly mark arch/ files.
4036
4037 2017-11-13 Andreas Schwab <schwab@suse.de>
4038
4039 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
4040 function.
4041 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4042
4043 2017-11-06 Pedro Alves <palves@redhat.com>
4044
4045 * config.in, configure: Regenerate.
4046
4047 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4048
4049 * target.c (struct thread_search): Remove.
4050 (thread_search_callback): Remove.
4051 (prepare_to_access_memory): Use for_each_thread instead of
4052 find_inferior. Inline code from thread_search_callback.
4053
4054 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4055
4056 * server.c (struct visit_actioned_threads_data): Remove.
4057 (visit_actioned_threads): Change prototype to take arguments
4058 directly.
4059 (resume): Use find_thread instead of find_inferior.
4060
4061 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4062
4063 * server.c (queue_stop_reply_callback): Change prototype, return
4064 void.
4065 (find_status_pending_thread_callback): Remove.
4066 (handle_status): Replace find_inferior with find_thread and
4067 for_each_thread.
4068
4069 2017-10-25 Alan Hayward <alan.hayward@arm.com>
4070
4071 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
4072 with REGNO.
4073 (aarch64_store_gregset): Likewise.
4074 (aarch64_fill_fpregset): Likewise.
4075 (aarch64_store_fpregset): Likewise.
4076
4077 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
4078
4079 * gdbthread.h (find_thread, for_each_thread): New functions.
4080 * inferiors.c (thread_of_pid): Remove.
4081 (find_any_thread_of_pid): Use find_thread.
4082 * linux-low.c (num_lwps): Use for_each_thread.
4083
4084 2017-10-17 Yao Qi <yao.qi@linaro.org>
4085
4086 * Makefile.in: Remove one rule.
4087 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
4088
4089 2017-10-17 Yao Qi <yao.qi@linaro.org>
4090
4091 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
4092 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
4093
4094 2017-10-17 Yao Qi <yao.qi@linaro.org>
4095
4096 * configure.srv: Rename arm.o with arch/arm.o.
4097
4098 2017-10-17 Yao Qi <yao.qi@linaro.org>
4099
4100 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
4101 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
4102 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
4103 (arch-i386.o, arch-amd64.o): Remove rules.
4104 (arch/%.o): New rule.
4105 Update POSTCOMPILE and COMPILE.pre.
4106 * configure.ac: Invoke AC_CONFIG_COMMANDS.
4107 * configure: Re-generated.
4108 * configure.srv: Replace arch-i386.o with arch/i386.o.
4109 Replace arch-amd64.o with arch/amd64.o.
4110
4111 2017-10-16 Yao Qi <yao.qi@linaro.org>
4112
4113 * configure: Regenerated.
4114
4115 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4116
4117 * inferiors.h: (struct inferior_list): Remove.
4118 (struct inferior_list_entry); Remove.
4119 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
4120 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
4121 get_first_inferior): Remove.
4122 (for_each_inferior, for_each_inferior_with_data, find_inferior,
4123 find_inferior_id, find_inferior_in_random): Change signature.
4124 * inferiors.c (all_threads): Change type to
4125 std::list<thread_info *>.
4126 (get_thread): Remove macro.
4127 (find_inferior, find_inferior_id): Change signature, implement
4128 using find_thread.
4129 (find_inferior_in_random): Change signature, implement using
4130 find_thread_in_random.
4131 (for_each_inferior, for_each_inferior_with_data): Change
4132 signature, implement using for_each_thread.
4133 (add_inferior_to_list, remove_inferior): Remove.
4134 (add_thread, get_first_thread, thread_of_pid,
4135 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
4136 (get_first_inferior, one_inferior_p, clear_inferior_list):
4137 Remove.
4138 (clear_inferiors, get_thread_process): Update.
4139 * gdbthread.h: Include <list>.
4140 (struct thread_info) <entry>: Remove field.
4141 <id>: New field.
4142 (all_threads): Change type to std::list<thread_info *>.
4143 (get_first_inferior): Add doc.
4144 (find_thread, for_each_thread, find_thread_in_random): New
4145 functions.
4146 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
4147 * linux-arm-low.c (update_registers_callback): Update.
4148 * linux-low.c (second_thread_of_pid_p): Update.
4149 (kill_one_lwp_callback, linux_detach_lwp_callback,
4150 delete_lwp_callback, status_pending_p_callback, same_lwp,
4151 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
4152 iterate_over_lwps, not_stopped_callback,
4153 resume_stopped_resumed_lwps, count_events_callback,
4154 select_singlestep_lwp_callback, select_event_lwp_callback,
4155 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
4156 suspend_and_send_sigstop_callback, wait_for_sigstop,
4157 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
4158 lwp_running, linux_set_resume_request, resume_status_pending_p,
4159 need_step_over_p, start_step_over, linux_resume_one_thread,
4160 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
4161 reset_lwp_ptrace_options_callback): Update.
4162 * linux-mips-low.c (update_watch_registers_callback): Update.
4163 * regcache.c (regcache_invalidate_one, regcache_invalidate):
4164 Update.
4165 (free_register_cache_thread_one): Remove.
4166 (regcache_release): Update.
4167 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
4168 handle_qxfer_threads_worker): Update.
4169 (handle_query): Update, use list iterator.
4170 (visit_actioned_threads, handle_pending_status,
4171 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
4172 clear_pending_status_callback, set_pending_status_callback,
4173 find_status_pending_thread_callback, handle_status,
4174 process_serial_event): Update.
4175 * target.c (thread_search_callback): Update.
4176 * thread-db.c (thread_db_get_tls_address): Update.
4177 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
4178 Update.
4179 * win32-i386-low.c (update_debug_registers_callback): Update.
4180 * win32-low.c (delete_thread_info, child_delete_thread,
4181 continue_one_thread, suspend_one_thread,
4182 get_child_debug_event): Adjust.
4183
4184 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4185
4186 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
4187 * inferiors.h: Include <list>.
4188 (struct process_info) <entry>: Remove field.
4189 <pid>: New field.
4190 (pid_of): Change macro to function.
4191 (ptid_of, lwpid_of): Remove macro.
4192 (all_processes): Change type to std::list<process_info *>.
4193 (ALL_PROCESSES): Remove macro.
4194 (for_each_process, find_process): New function.
4195 * inferiors.c (all_processes): Change type to
4196 std::list<process_info *>.
4197 (find_thread_process): Adjust.
4198 (add_process): Likewise.
4199 (remove_process): Likewise.
4200 (find_process_pid): Likewise.
4201 (get_first_process): Likewise.
4202 (started_inferior_callback): Remove.
4203 (have_started_inferiors_p): Adjust.
4204 (attached_inferior_callback): Remove.
4205 (have_attached_inferiors_p): Adjust.
4206 * linux-low.c (check_zombie_leaders): Likewise.
4207 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
4208 (x86_linux_update_xmltarget): Adjust.
4209 * server.c (handle_query): Likewise.
4210 (gdb_reattached_process): Remove.
4211 (handle_status): Adjust.
4212 (kill_inferior_callback): Likewise.
4213 (detach_or_kill_inferior): Remove.
4214 (print_started_pid): Likewise.
4215 (print_attached_pid): Likewise.
4216 (detach_or_kill_for_exit): Update.
4217 (process_serial_event): Likewise.
4218 * linux-arm-low.c (arm_new_fork): Likewise.
4219
4220 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4221
4222 * dll.h: Include <list>.
4223 (struct dll_info): Add constructor.
4224 <entry>: Remove field.
4225 (all_dlls): Change type to std::list<dll_info>.
4226 * dll.c: Include <algorithm>.
4227 (get_dll): Remove macro.
4228 (all_dlls): Change type to std::list<dll_info *>.
4229 (free_one_dll): Remove.
4230 (match_dll): Likewise.
4231 (loaded_dll): Adjust.
4232 (unloaded_dll): Adjust to all_dlls type change, use
4233 std::find_if. Inline code from match_dll.
4234 (clear_dlls): Adjust to all_dlls type change.
4235 * server.c (emit_dll_description): Remove.
4236 (handle_qxfer_libraries): Adjust to all_dlls type change,
4237 integrate emit_dll_description's functionality.
4238
4239 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4240
4241 * linux-low.h (struct linux_target_ops) <delete_process>: New
4242 field.
4243 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
4244 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
4245 (struct linux_target_ops): Add delete_process callback.
4246 * linux-arm-low.c (arm_delete_process): New.
4247 (struct linux_target_ops): Add delete_process callback.
4248 * linux-bfin-low.c (struct linux_target_ops): Likewise.
4249 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
4250 * linux-m32r-low.c (struct linux_target_ops): Likewise.
4251 * linux-mips-low.c (mips_linux_delete_process): New.
4252 (struct linux_target_ops): Add delete_process callback.
4253 * linux-ppc-low.c (struct linux_target_ops): Likewise.
4254 * linux-s390-low.c (struct linux_target_ops): Likewise.
4255 * linux-sh-low.c (struct linux_target_ops): Likewise.
4256 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
4257 * linux-tile-low.c (struct linux_target_ops): Likewise.
4258 * linux-x86-low.c (x86_linux_delete_process): New.
4259 (struct linux_target_ops): Add delete_process callback.
4260 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
4261
4262 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4263
4264 * linux-aarch64-low.c (the_low_target): Add thread delete
4265 callback.
4266 * linux-arm-low.c (arm_delete_thread): New function.
4267 (the_low_target): Add thread delete callback.
4268 * linux-bfin-low.c (the_low_target): Likewise.
4269 * linux-crisv32-low.c (the_low_target): Likewise.
4270 * linux-low.c (delete_lwp): Invoke delete_thread callback if
4271 set.
4272 * linux-low.h (struct linux_target_ops) <delete_thread>: New
4273 field.
4274 * linux-m32r-low.c (the_low_target): Add thread delete callback.
4275 * linux-mips-low.c (mips_linux_delete_thread): New function.
4276 (the_low_target): Add thread delete callback.
4277 * linux-ppc-low.c (the_low_target): Likewise.
4278 * linux-s390-low.c (the_low_target): Likewise.
4279 * linux-sh-low.c (the_low_target): Likewise.
4280 * linux-tic6x-low.c (the_low_target): Likewise.
4281 * linux-tile-low.c (the_low_target): Likewise.
4282 * linux-x86-low.c (the_low_target): Likewise.
4283 * linux-xtensa-low.c (the_low_target): Likewise.
4284
4285 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
4286
4287 * win32-low.c: Include "common-inferior.h".
4288
4289 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4290
4291 * inferiors.c (set_inferior_cwd): New function.
4292 * server.c (handle_general_set): Handle QSetWorkingDir packet.
4293 (handle_query): Inform that QSetWorkingDir is supported.
4294 * win32-low.c (create_process): Pass the inferior's cwd to
4295 CreateProcess.
4296
4297 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4298
4299 * inferiors.c (current_inferior_cwd): New global variable.
4300 (get_inferior_cwd): New function.
4301 * inferiors.h (struct process_info) <cwd>: New field.
4302
4303 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4304
4305 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
4306 (OBS): Add gdb_tilde_expand.o.
4307
4308 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
4309
4310 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
4311 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
4312
4313 2017-09-29 Pedro Alves <palves@redhat.com>
4314
4315 * ax.c (gdb_parse_agent_expr): Constify.
4316 * ax.h (gdb_parse_agent_expr): Constify.
4317 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4318 Constify.
4319 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
4320 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
4321 * remote-utils.h (read_ptid): Constify.
4322 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
4323 (process_point_options, process_serial_event): Constify.
4324 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
4325 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
4326 (cmd_qtbuffer): Constify.
4327
4328 2017-09-29 Pedro Alves <palves@redhat.com>
4329
4330 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
4331 fails.
4332
4333 2017-09-29 Pedro Alves <palves@redhat.com>
4334
4335 * linux-low.c (handle_extended_wait): Pass parent thread instead
4336 of process to thread_db_notice_clone.
4337 * linux-low.h (thread_db_notice_clone): Replace parent process
4338 parameter with parent thread parameter.
4339 * thread-db.c (find_one_thread): Add comment.
4340 (thread_db_notice_clone): Replace parent process parameter with
4341 parent thread parameter. Temporarily switch to the parent thread.
4342
4343 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
4344
4345 * gdbthread.h: Include "common-gdbthread.h".
4346 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
4347 "if" when validating the ptid.
4348 * remote-utils.c: Include "gdbthread.h".
4349 (prepare_resume_reply): Use "switch_to_thread".
4350 * target.c (done_accessing_memory): Likewise.
4351
4352 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4353
4354 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
4355 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
4356 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
4357 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
4358 s390x-gs-linux64-ipa.o to ipa_obj.
4359 * linux-s390-low.c (HWCAP_S390_GS): New define.
4360 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
4361 New functions.
4362 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
4363 (s390_arch_setup): Check for guarded-storage support and choose
4364 appropriate tdesc.
4365 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
4366 init_registers_s390x_gs_linux64.
4367 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
4368 enum value.
4369 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
4370 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
4371
4372 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
4373
4374 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
4375
4376 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4377
4378 * linux-low.h (struct lwp_info): Add new field, thread_handle.
4379 (thread_db_thread_handle): Declare.
4380 * linux-low.c (linux_target_ops): Initialize thread_handle.
4381 * server.c (handle_qxfer_threads_worker): Add support for
4382 "handle" attribute.
4383 * target.h (struct target_ops): Add new function pointer,
4384 thread_handle.
4385 (target_thread_handle): Define.
4386 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
4387 field in lwp.
4388 (thread_db_thread_handle): New function.
4389
4390 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4391
4392 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
4393 * linux-low.h (thread_db_notice_clone): Declare.
4394 * thread-db.c (thread_db_notice_clone): New function.
4395
4396 2017-09-21 Pedro Alves <palves@redhat.com>
4397
4398 * server.c (gdb_read_memory, handle_status, process_serial_event)
4399 (handle_serial_event, handle_target_event): Adjust to
4400 set_desired_thread prototype change.
4401 * target.c (set_desired_thread): Remove 'use_general' parameter
4402 and adjust.
4403 * target.h (set_desired_thread): Remove 'use_general' parameter.
4404
4405 2017-09-20 Tom Tromey <tom@tromey.com>
4406
4407 * target.c (target_terminal::terminal_state): Define.
4408 (target_terminal::init): Rename from target_terminal_init.
4409 (target_terminal::inferior): Rename from
4410 target_terminal_inferior.
4411 (target_terminal::ours): Rename from target_terminal_ours.
4412 (target_terminal::ours_for_output, target_terminal::info): New.
4413
4414 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4415
4416 * server.c (accumulate_file_name_length): Remove.
4417 (emit_dll_description): Adjust to std::string change.
4418 (handle_qxfer_libraries): Use std::string to hold document.
4419
4420 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4421
4422 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
4423 return type of xml_escape_text.
4424 * server.c (emit_dll_description): Likewise.
4425
4426 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4427
4428 * server.c (captured_main): Accept argument for --selftest.
4429 Update run_tests call.
4430 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
4431 when registering selftests.
4432
4433 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
4434
4435 * regcache.c (get_thread_regcache): Update code to use "std::vector"
4436 instead of "VEC" for "target_desc.reg_defs".
4437 (regcache_cpy): Likewise.
4438 (registers_to_string): Likewise.
4439 (registers_from_string): Likewise.
4440 (find_regno): Likewise.
4441 (supply_regblock): Likewise.
4442 (regcache_raw_read_unsigned): Likewise.
4443 * tdesc.c (init_target_desc): Likewise.
4444 (tdesc_create_reg): Likewise.
4445 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
4446 (struct target_desc) <reg_defs>: Convert to "std::vector".
4447 (target_desc): Do not initialize "reg_defs".
4448 (~target_desc): Update code to use "std::vector" instead of "VEC"
4449 for "target_desc.reg_defs".
4450 (operator==): Likewise.
4451
4452 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4453
4454 * inferiors.h (thread_to_gdb_id): Remove.
4455 * inferiors.c (thread_to_gdb_id): Remove.
4456 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
4457 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
4458 lynx_store_registers, lynx_read_memory, lynx_write_memory):
4459 Likewise.
4460 * nto-low.c (nto_fetch_registers, nto_store_registers,
4461 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
4462
4463 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4464
4465 * inferiors.h (gdb_id_to_thread_id): Remove.
4466 * inferiors.c (gdb_id_to_thread_id): Remove.
4467 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
4468 removal. Move pid declaration closer to where it's used.
4469
4470 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4471
4472 * server.c (handle_detach): New function.
4473 (process_serial_event): Move code out, call handle_detach.
4474
4475 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4476
4477 * server.c (require_running): Rename to ...
4478 (require_running_or_return): ... this ...
4479 (require_running_or_break): ... and this.
4480 (handle_query, process_serial_event): Adjust.
4481
4482 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4483
4484 * linux-low.c (linux_set_resume_request): Remove unused
4485 variables.
4486
4487 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4488
4489 * server.c (first_thread_of): Remove.
4490 (process_serial_event): Replace usage of first_thread_of with
4491 find_any_thread_of_pid.
4492 * tracepoint.c (same_process_p): Remove.
4493 (gdb_agent_about_to_close): Replace usage of same_process_p with
4494 find_any_thread_of_pid.
4495 * linux-x86-low.c (same_process_callback): Remove.
4496 (x86_arch_setup_process_callback): Replace usage of
4497 same_process_callback with find_any_thread_of_pid.
4498 * thread-db.c (any_thread_of): Remove.
4499 (switch_to_process): Replace usage of any_thread_of with
4500 find_any_thread_of_pid.
4501 * inferiors.c (thread_pid_matches_callback): Remove.
4502 (find_thread_process): Adjust to use find_any_thread_of_pid.
4503
4504 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
4505
4506 * regcache.c (get_thread_regcache): Guard calls to "memset"
4507 with "!VEC_empty".
4508
4509 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
4510
4511 * linux-low.c (handle_extended_wait): Use
4512 "allocate_target_description" instead of "XNEW".
4513 * linux-x86-low.c (initialize_low_arch): Likewise.
4514
4515 2017-09-05 Yao Qi <yao.qi@linaro.org>
4516
4517 * configure.srv (srv_i386_regobj): Remove.
4518 (srv_amd64_regobj): Remove.
4519 (srv_regobj): Set it to "" for x86 non-linux targets.
4520 * linux-x86-tdesc.c (i386_linux_read_description):
4521 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
4522 (init_registers_i386): Remove the declaration.
4523 (tdesc_i386): Remove the declaration.
4524 (lynx_i386_arch_setup): Call i386_create_target_description.
4525 * nto-x86-low.c: Likewise.
4526 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
4527 [!__x86_64__]: include arch/i386.h.
4528 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
4529
4530 2017-09-05 Yao Qi <yao.qi@linaro.org>
4531
4532 * configure.srv (srv_amd64_linux_xmlfiles): Remove
4533 i386/amd64-XXX-linux from it.
4534
4535 2017-09-05 Yao Qi <yao.qi@linaro.org>
4536
4537 * configure.srv: Empty srv_amd64_linux_regobj if $development is
4538 false.
4539 (ipa_amd64_linux_regobj): Remove.
4540 (ipa_x32_linux_regobj): Remove.
4541
4542 2017-09-05 Yao Qi <yao.qi@linaro.org>
4543
4544 * Makefile.in (arch-amd64.o): New rule.
4545 * configure.srv: Append arch-amd64.o.
4546 * linux-amd64-ipa.c: Include common/x86-xstate.h.
4547 (get_ipa_tdesc): Call amd64_linux_read_description.
4548 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
4549 and init_registers_amd64_XXX.
4550 * linux-x86-low.c (x86_linux_read_description): Call
4551 amd64_linux_read_description.
4552 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
4553 (initialize_low_arch): Don't call init_registers_x32_XXX and
4554 init_registers_amd64_XXX.
4555 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
4556 and tdesc_amd64_XXX.
4557 [__x86_64__] (amd64_tdesc_test): New function.
4558 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
4559 and init_registers_amd64_XXX.
4560 * linux-x86-tdesc.c: Include arch/amd64.h.
4561 (xcr0_to_tdesc_idx): New function.
4562 (i386_linux_read_description): New function.
4563 (amd64_get_ipa_tdesc_idx): New function.
4564 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
4565 (amd64_get_ipa_tdesc): Declare.
4566
4567 2017-09-05 Yao Qi <yao.qi@linaro.org>
4568
4569 * configure.srv (srv_i386_linux_xmlfiles): Remove
4570 i386/i386-XXX-linux.xml from it.
4571
4572 2017-09-05 Yao Qi <yao.qi@linaro.org>
4573
4574 * configure.srv: Set srv_i386_linux_regobj empty if $development
4575 is false.
4576 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
4577 initialize_low_tdesc.
4578 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
4579 with #if initialize_low_tdesc.
4580 * linux-x86-tdesc-selftest.c: New file.
4581 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
4582
4583 2017-09-05 Yao Qi <yao.qi@linaro.org>
4584
4585 * Makefile.in (arch-i386.o): New rule.
4586 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
4587 (x86_64-*-linux*): Likewise.
4588 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
4589 include arch/i386.h.
4590 (i386_linux_read_description): Remove code and call
4591 i386_create_target_description.
4592 * tdesc.c (allocate_target_description): New function.
4593 * tdesc.h (set_tdesc_architecture): Remove declaration.
4594 (set_tdesc_osabi): Likewise.
4595
4596 2017-09-05 Yao Qi <yao.qi@linaro.org>
4597
4598 * linux-x86-tdesc.c: Don't include <inttypes.h>.
4599 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
4600 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
4601 .xmltarget.
4602 * server.c (get_features_xml): Call tdesc_get_features_xml.
4603 * tdesc.c (set_tdesc_architecture): New function.
4604 (set_tdesc_osabi): New function.
4605 (tdesc_get_features_xml): New function.
4606 (tdesc_create_feature): Add an argument.
4607 * tdesc.h (struct target_desc) <features>: New field.
4608 <arch, osabi>: New field.
4609 (~target_desc): xfree features, arch, and osabi.
4610 (target_desc::oerator==): Don't compare .xmltarget.
4611 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
4612 (set_tdesc_osabi): Likewise.
4613 (tdesc_get_features_xml): Likewise.
4614
4615 2017-09-05 Yao Qi <yao.qi@linaro.org>
4616
4617 * linux-x86-tdesc.c: Include selftest.h.
4618 (i386_tdesc_test): New function.
4619 (initialize_low_tdesc): Call selftests::register_test.
4620 * tdesc.h: Include regdef.h.
4621 (target_desc): Override operator == and !=.
4622
4623 2017-09-05 Yao Qi <yao.qi@linaro.org>
4624
4625 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
4626 (ipa_obj): Likewise.
4627 * linux-i386-ipa.c: Include common/x86-xstate.h
4628 (get_ipa_tdesc): Call i386_linux_read_description.
4629 (initialize_low_tracepoint): Don't call init_registers_XXX
4630 functions, call initialize_low_tdesc instead.
4631 * linux-x86-low.c (x86_linux_read_description): Call
4632 i386_linux_read_description.
4633 (initialize_low_arch): Don't call init_registers_i386_XXX
4634 functions, call initialize_low_tdesc.
4635 * linux-x86-tdesc.c: New file.
4636 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
4637 (i386_get_ipa_tdesc_idx): Declare.
4638 (i386_get_ipa_tdesc): Declare.
4639 (initialize_low_tdesc): Declare.
4640
4641 2017-09-05 Yao Qi <yao.qi@linaro.org>
4642
4643 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
4644 instead of 0.
4645
4646 2017-09-05 Yao Qi <yao.qi@linaro.org>
4647
4648 * Makefile.in (IPA_OBJS): Add vec-ipa.o
4649 * regcache.c (get_thread_regcache): Use VEC_length.
4650 (init_register_cache): Likewise.
4651 (regcache_cpy): Likewise.
4652 (registers_to_string): Iterate reg_defs via VEC_iterate.
4653 (find_regno): Likewise.
4654 (find_register_by_number): Use VEC_index.
4655 (register_size): Call find_register_by_number.
4656 (register_data): Call find_register_by_number.
4657 (supply_regblock): Use VEC_length.
4658 (regcache_raw_read_unsigned): Likewise.
4659 * tdesc.c (init_target_desc): Iterate reg_defs via
4660 VEC_iterate.
4661 (default_description): Update initializer.
4662 (copy_target_description): Don't update field num_registers.
4663 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
4664 <num_registers>: Remove.
4665
4666 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4667
4668 * Makefile.in (.SECONDARY): Define target.
4669
4670 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
4671
4672 * linux-low.c (linux_wait_1): Adjust.
4673 * server.c (queue_stop_reply_callback): Adjust.
4674
4675 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
4676
4677 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
4678 QEnvironmentUnset and QEnvironmentReset packets.
4679 (handle_query): Inform remote that QEnvironmentHexEncoded,
4680 QEnvironmentUnset and QEnvironmentReset are supported.
4681
4682 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
4683
4684 * inferiors.h (inferior_target_data): Rename to ...
4685 (thread_target_data): ... this.
4686 (inferior_regcache_data): Rename to ...
4687 (thread_regcache_data): ... this.
4688 (set_inferior_regcache_data): Rename to ...
4689 (set_thread_regcache_data): ... this.
4690 * inferiors.c (inferior_target_data): Rename to ...
4691 (thread_target_data): ... this.
4692 (inferior_regcache_data): Rename to ...
4693 (thread_regcache_data): ... this.
4694 (set_inferior_regcache_data): Rename to ...
4695 (set_thread_regcache_data): ... this.
4696 (free_one_thread): Update.
4697 * linux-low.h (get_thread_lwp): Update.
4698 * regcache.c (get_thread_regcache): Update.
4699 (regcache_invalidate_thread): Update.
4700 (free_register_cache_thread): Update.
4701 * win32-i386-low.c (update_debug_registers_callback): Update.
4702 (win32_get_current_dr): Update.
4703 * win32-low.c (thread_rec): Update.
4704 (delete_thread_info): Update.
4705 (continue_one_thread): Update.
4706 (suspend_one_thread): Update.
4707
4708 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
4709
4710 * inferiors.c (set_inferior_target_data): Remove.
4711 * inferiors.h (set_inferior_target_data): Remove.
4712
4713 2017-08-18 Yao Qi <yao.qi@linaro.org>
4714
4715 * Makefile.in (OBS): Add selftest.o.
4716 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
4717 * configure, config.in: Re-generated.
4718 * server.c: Include common/sefltest.h.
4719 (captured_main): Handle option --selftest.
4720
4721 2017-08-09 Yao Qi <yao.qi@linaro.org>
4722
4723 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
4724 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
4725 i386-avx-mpx.o and i386-mmx.o.
4726 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
4727 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
4728 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
4729 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
4730 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
4731 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
4732 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
4733 i386/amd64-avx-mpx.xml.
4734
4735 2017-08-09 Yao Qi <yao.qi@linaro.org>
4736
4737 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
4738 and x32-avx-avx512.o.
4739 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
4740 i386/x32-avx-avx512.xml.
4741
4742 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
4743
4744 * tracepoint.h (enum class fast_tpoint_collect_result): New
4745 enumeration.
4746 (fast_tracepoint_collecting): Change return type to
4747 fast_tpoint_collect_result.
4748 * tracepoint.c (fast_tracepoint_collecting): Likewise.
4749 * linux-low.h: Include tracepoint.h.
4750 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
4751 fast_tpoint_collect_result.
4752 * linux-low.c (handle_tracepoints): Adjust.
4753 (linux_fast_tracepoint_collecting): Change return type to
4754 fast_tpoint_collect_result.
4755 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
4756 linux_wait_1, stuck_in_jump_pad_callback,
4757 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
4758 proceed_one_lwp): Adjust to type change.
4759
4760 2017-07-10 Yao Qi <yao.qi@linaro.org>
4761
4762 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
4763
4764 2017-06-29 Yao Qi <yao.qi@linaro.org>
4765
4766 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
4767 Remove.
4768 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
4769
4770 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
4771
4772 * Makefile.in (IPA_OBJS): Sort and format one item per line.
4773
4774 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4775
4776 * linux-low.c (linux_create_inferior): Adjust code to access the
4777 environment information via 'gdb_environ' class.
4778 * lynx-low.c (lynx_create_inferior): Likewise.
4779 * server.c (our_environ): Make it an instance of 'gdb_environ'.
4780 (get_environ): Return a pointer to 'our_environ'.
4781 (captured_main): Initialize 'our_environ'.
4782 * server.h (get_environ): Adjust prototype.
4783 * spu-low.c (spu_create_inferior): Adjust code to access the
4784 environment information via 'gdb_environ' class.
4785
4786 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4787
4788 * linux-low.c (linux_read_memory, linux_write_memory): Remove
4789 usage of "register" keyword.
4790
4791 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4792
4793 * configure: Re-generate.
4794
4795 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4796
4797 * configure: Re-generate.
4798
4799 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4800
4801 * Makefile.in (COMPILE.pre): Add "-x c++".
4802
4803 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
4804
4805 * fork-child.c: Conditionally include <signal.h>.
4806
4807 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4808
4809 * server.c (handle_general_set): Handle new packet
4810 "QStartupWithShell".
4811 (handle_query): Add "QStartupWithShell" to the list of supported
4812 packets.
4813 (gdbserver_usage): Add help text explaining the
4814 new "--startup-with-shell" and "--no-startup-with-shell" CLI
4815 options.
4816 (captured_main): Recognize and act upon the presence of the new
4817 CLI options.
4818
4819 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4820 Pedro Alves <palves@redhat.com>
4821
4822 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
4823 * configure: Regenerate.
4824 * configure.srv (srv_linux_obj): Add "fork-child.o" and
4825 "fork-inferior.o".
4826 (i[34567]86-*-lynxos*): Likewise.
4827 (spu*-*-*): Likewise.
4828 * fork-child.c: New file.
4829 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
4830 and "environ.h".
4831 (linux_ptrace_fun): New function.
4832 (linux_create_inferior): Adjust function prototype to reflect
4833 change on "target.h". Adjust function code to use
4834 "fork_inferior".
4835 (linux_request_interrupt): Delete "signal_pid".
4836 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4837 (lynx_ptrace_fun): New function.
4838 (lynx_create_inferior): Adjust function prototype to reflect
4839 change on "target.h". Adjust function code to use
4840 "fork_inferior".
4841 * nto-low.c (nto_create_inferior): Adjust function prototype and
4842 code to reflect change on "target.h". Update comments.
4843 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
4844 "common-terminal.h" and "environ.h".
4845 (terminal_fd): Moved to fork-child.c.
4846 (old_foreground_pgrp): Likewise.
4847 (restore_old_foreground_pgrp): Likewise.
4848 (last_status): Make it global.
4849 (last_ptid): Likewise.
4850 (our_environ): New variable.
4851 (startup_with_shell): Likewise.
4852 (program_name): Likewise.
4853 (program_argv): Rename to...
4854 (program_args): ...this.
4855 (wrapper_argv): New variable.
4856 (start_inferior): Delete function.
4857 (get_exec_wrapper): New function.
4858 (get_exec_file): Likewise.
4859 (get_environ): Likewise.
4860 (prefork_hook): Likewise.
4861 (post_fork_inferior): Likewise.
4862 (postfork_hook): Likewise.
4863 (postfork_child_hook): Likewise.
4864 (handle_v_run): Update code to deal with arguments coming from the
4865 remote host. Update calls from "start_inferior" to
4866 "create_inferior".
4867 (captured_main): Likewise. Initialize environment variable. Call
4868 "have_job_control".
4869 * server.h (post_fork_inferior): New prototype.
4870 (get_environ): Likewise.
4871 (last_status): Declare.
4872 (last_ptid): Likewise.
4873 (signal_pid): Likewise.
4874 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4875 (spu_ptrace_fun): New function.
4876 (spu_create_inferior): Adjust function prototype to reflect change
4877 on "target.h". Adjust function code to use "fork_inferior".
4878 * target.c (target_terminal_init): New function.
4879 (target_terminal_inferior): Likewise.
4880 (target_terminal_ours): Likewise.
4881 * target.h: Include <vector>.
4882 (struct target_ops) <create_inferior>: Update prototype.
4883 (create_inferior): Update macro.
4884 * utils.c (gdb_flush_out_err): New function.
4885 * win32-low.c (win32_create_inferior): Adjust function prototype
4886 and code to reflect change on "target.h".
4887
4888 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4889
4890 * inferiors.c (switch_to_thread): New function.
4891
4892 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4893
4894 * Makefile.in (SFILE): Add "common/job-control.c".
4895 (OBS): Add "job-control.o".
4896
4897 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
4898
4899 * Makefile: Remove "@host_makefile_frag@".
4900
4901 2017-05-05 Pedro Alves <palves@redhat.com>
4902
4903 * configure: Regenerate.
4904
4905 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
4906
4907 * configure: Regenerate.
4908
4909 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4910
4911 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
4912 software_single_step change of return type to
4913 std::vector<CORE_ADDR>.
4914 * linux-low.c (install_software_single_step_breakpoints):
4915 Likewise.
4916 * linux-low.h (install_software_single_step_breakpoints):
4917 Likewise.
4918
4919 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4920
4921 * remote-utils.c: Include "gdb_termios.h" instead of
4922 "terminal.h".
4923 * terminal.h: Delete file.
4924
4925 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4926
4927 * server.c: Include <vector>.
4928 <program_argv, wrapper_argv>: Convert to std::vector.
4929 (start_inferior): Rewrite function to use C++.
4930 (handle_v_run): Likewise. Update code that calculates the argv
4931 based on the vRun packet; use C++.
4932 (captured_main): Likewise.
4933
4934 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
4935
4936 * server.c (handle_v_cont): Initialize thread_resume::thread
4937 with null_ptid.
4938
4939 2017-04-05 Pedro Alves <palves@redhat.com>
4940
4941 * configure: Regenerate.
4942
4943 2017-04-05 Pedro Alves <palves@redhat.com>
4944
4945 * gdbreplay.c (sync_error): Constify.
4946 * linux-x86-low.c (push_opcode): Constify.
4947
4948 2017-04-05 Pedro Alves <palves@redhat.com>
4949
4950 * win32-low.c (get_child_debug_event)
4951 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
4952 Report TARGET_WAITKIND_SPURIOUS instead.
4953
4954 2017-04-05 Pedro Alves <palves@redhat.com>
4955
4956 * remote-utils.c (remote_prepare, remote_open): Constify.
4957 * remote-utils.h (remote_prepare, remote_open): Constify.
4958 * server.c (captured_main): Constify 'port' handling.
4959
4960 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
4961
4962 * Makefile.in (clean): Clear .deps.
4963
4964 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
4965
4966 * .gitignore: Remove generated files, replace with wildcard.
4967 * (clean): Replace removal of generated files with wildcard.
4968 (version.c): Replace with...
4969 (version-generated.c): ...this.
4970 (xml-builtin.c): Replace with...
4971 (xml-builtin-generated.c): ...this.
4972 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
4973 (%.c: *regformats*): Replace with...
4974 (%-generated.c: *regformats*): ...this.
4975
4976 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4977
4978 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
4979 (xtensa_fill_gregset): Call collect_register_by_name for
4980 threadptr register.
4981 (xtensa_store_gregset): Call supply_register_by_name for
4982 threadptr register.
4983
4984 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
4985
4986 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
4987 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
4988 (xtensa_store_gregset): Call supply_register for all registers in
4989 a0_regnum..a0_regnum + C0_NREGS range.
4990
4991 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
4992
4993 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
4994 (ax-ipa.o: ax.c): Remove.
4995 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
4996 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
4997 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
4998 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
4999 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
5000
5001 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5002
5003 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
5004 (print-utils-ipa.o: ../common/print-utils.c): Remove.
5005 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
5006 (errors-ipa.o: ../common/errors.c): Remove.
5007 (format-ipa.o: ../common/format.c): Remove.
5008 (common-utils-ipa.o: ../common/common-utils.c): Remove.
5009
5010 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5011
5012 * Makefile.in (%-ipa.o: %.c): New rule.
5013 (tracepoint-ipa.o: tracepoint.c): Remove.
5014 (utils-ipa.o: utils.c): Remove.
5015 (remote-utils-ipa.o: remote-utils.c): Remove.
5016 (regcache-ipa.o: regcache.c): Remove.
5017 (i386-linux-ipa.o: i386-linux.c): Remove.
5018 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
5019 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
5020 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
5021 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
5022 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
5023 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
5024 (amd64-linux-ipa.o: amd64-linux.c): Remove.
5025 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
5026 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
5027 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
5028 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
5029 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
5030 (aarch64-ipa.o: aarch64.c): Remove.
5031 (s390-linux32-ipa.o: s390-linux32.c): Remove.
5032 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
5033 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
5034 (s390-linux64-ipa.o: s390-linux64.c): Remove.
5035 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
5036 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
5037 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
5038 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
5039 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
5040 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
5041 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
5042 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
5043 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
5044 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
5045 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
5046 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
5047 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
5048 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
5049 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
5050 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
5051 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
5052 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
5053 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
5054 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
5055 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
5056 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
5057 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
5058 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
5059 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
5060 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
5061 (tdesc-ipa.o: tdesc.c): Remove.
5062 (x32-linux-ipa.o: x32-linux.c): Remove.
5063 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
5064 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
5065
5066 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5067
5068 * Makefile.in (%.o: ../arch/%.c): New rule.
5069 (arm.o: ../arch/arm.c): Remove.
5070 (arm-linux.o: ../arch/arm-linux.c): Remove.
5071 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
5072 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
5073
5074 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5075
5076 * Makefile.in (%.o: ../nat/%.c): New rule.
5077 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
5078 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
5079 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
5080 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
5081 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
5082 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
5083 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
5084 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
5085 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
5086 (linux-personality.o: ../nat/linux-personality.c): Remove.
5087 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
5088 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
5089 (x86-linux.o: ../nat/x86-linux.c): Remove.
5090 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
5091 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
5092
5093 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5094
5095 * Makefile.in (%.o: ../common/%.c): New rule.
5096 (signals.o: ../common/signals.c): Remove.
5097 (print-utils.o: ../common/print-utils.c): Remove.
5098 (rsp-low.o: ../common/rsp-low.c): Remove.
5099 (common-utils.o: ../common/common-utils.c): Remove.
5100 (posix-strerror.o: ../common/posix-strerror.c): Remove.
5101 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
5102 (vec.o: ../common/vec.c): Remove.
5103 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
5104 (xml-utils.o: ../common/xml-utils.c): Remove.
5105 (ptid.o: ../common/ptid.c): Remove.
5106 (buffer.o: ../common/buffer.c): Remove.
5107 (format.o: ../common/format.c): Remove.
5108 (filestuff.o: ../common/filestuff.c): Remove.
5109 (agent.o: ../common/agent.c): Remove.
5110 (errors.o: ../common/errors.c): Remove.
5111 (environ.o: ../common/environ.c): Remove.
5112 (common-debug.o: ../common/common-debug.c): Remove.
5113 (cleanups.o: ../common/cleanups.c): Remove.
5114 (common-exceptions.o: ../common/common-exceptions.c): Remove.
5115 (fileio.o: ../common/fileio.c): Remove.
5116 (common-regcache.o: ../common/common-regcache.c): Remove.
5117 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
5118 (new-op.o: ../common/new-op.c): Remove.
5119 (btrace-common.o: ../common/btrace-common.c): Remove.
5120
5121 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5122
5123 * Makefile.in (%.o: ../target/%.c): New rule.
5124 (waitstatus.o: ../target/waitstatus.c): Remove.
5125
5126 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5127
5128 * Makefile.in
5129 (%.c: ../regformats/%.dat,
5130 (%.c: ../regformats/arm/%.dat,
5131 (%.c: ../regformats/i386/%.dat,
5132 (%.c: ../regformats/rs6000/%.dat): New rules.
5133 (aarch64.c): Remove.
5134 (reg-arm.c): Remove.
5135 (arm-with-iwmmxt.c): Remove.
5136 (arm-with-vfpv2.c): Remove.
5137 (arm-with-vfpv3.c): Remove.
5138 (arm-with-neon.c): Remove.
5139 (reg-bfin.c): Remove.
5140 (reg-cris.c): Remove.
5141 (reg-crisv32.c): Remove.
5142 (i386.c): Remove.
5143 (i386-linux.c): Remove.
5144 (i386-avx.c): Remove.
5145 (i386-avx-linux.c): Remove.
5146 (i386-avx-avx512.c): Remove.
5147 (i386-avx-avx512-linux.c): Remove.
5148 (i386-mpx.c): Remove.
5149 (i386-mpx-linux.c): Remove.
5150 (i386-avx-mpx-avx512-pku.c): Remove.
5151 (i386-avx-mpx-avx512-pku-linux.c): Remove.
5152 (i386-avx-mpx.c): Remove.
5153 (i386-avx-mpx-linux.c): Remove.
5154 (i386-mmx.c): Remove.
5155 (i386-mmx-linux.c): Remove.
5156 (reg-ia64.c): Remove.
5157 (reg-m32r.c): Remove.
5158 (reg-m68k.c): Remove.
5159 (reg-cf.c): Remove.
5160 (mips-linux.c): Remove.
5161 (mips-dsp-linux.c): Remove.
5162 (mips64-linux.c): Remove.
5163 (mips64-dsp-linux.c): Remove.
5164 (nios2-linux.c): Remove.
5165 (powerpc-32.c): Remove.
5166 (powerpc-32l.c): Remove.
5167 (powerpc-altivec32l.c): Remove.
5168 (powerpc-cell32l.c): Remove.
5169 (powerpc-vsx32l.c): Remove.
5170 (powerpc-isa205-32l.c): Remove.
5171 (powerpc-isa205-altivec32l.c): Remove.
5172 (powerpc-isa205-vsx32l.c): Remove.
5173 (powerpc-e500l.c): Remove.
5174 (powerpc-64l.c): Remove.
5175 (powerpc-altivec64l.c): Remove.
5176 (powerpc-cell64l.c): Remove.
5177 (powerpc-vsx64l.c): Remove.
5178 (powerpc-isa205-64l.c): Remove.
5179 (powerpc-isa205-altivec64l.c): Remove.
5180 (powerpc-isa205-vsx64l.c): Remove.
5181 (s390-linux32.c): Remove.
5182 (s390-linux32v1.c): Remove.
5183 (s390-linux32v2.c): Remove.
5184 (s390-linux64.c): Remove.
5185 (s390-linux64v1.c): Remove.
5186 (s390-linux64v2.c): Remove.
5187 (s390-te-linux64.c): Remove.
5188 (s390-vx-linux64.c): Remove.
5189 (s390-tevx-linux64.c): Remove.
5190 (s390x-linux64.c): Remove.
5191 (s390x-linux64v1.c): Remove.
5192 (s390x-linux64v2.c): Remove.
5193 (s390x-te-linux64.c): Remove.
5194 (s390x-vx-linux64.c): Remove.
5195 (s390x-tevx-linux64.c): Remove.
5196 (tic6x-c64xp-linux.c): Remove.
5197 (tic6x-c64x-linux.c): Remove.
5198 (tic6x-c62x-linux.c): Remove.
5199 (reg-sh.c): Remove.
5200 (reg-sparc64.c): Remove.
5201 (reg-spu.c): Remove.
5202 (amd64.c): Remove.
5203 (amd64-linux.c): Remove.
5204 (amd64-avx.c): Remove.
5205 (amd64-avx-linux.c): Remove.
5206 (amd64-avx-avx512.c): Remove.
5207 (amd64-avx-avx512-linux.c): Remove.
5208 (amd64-mpx.c): Remove.
5209 (amd64-mpx-linux.c): Remove.
5210 (amd64-avx-mpx-avx512-pku.c): Remove.
5211 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
5212 (amd64-avx-mpx.c): Remove.
5213 (amd64-avx-mpx-linux.c): Remove.
5214 (x32.c): Remove.
5215 (x32-linux.c): Remove.
5216 (x32-avx.c): Remove.
5217 (x32-avx-linux.c): Remove.
5218 (x32-avx-avx512.c): Remove.
5219 (x32-avx-avx512-linux.c): Remove.
5220 (reg-xtensa.c): Remove.
5221 (reg-tilegx.c): Remove.
5222 (reg-tilegx32.c): Remove.
5223
5224 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
5225
5226 * Makefile.in (SFILES): Add "common/environ.c".
5227 (OBJS): Add "common/environ.h".
5228
5229 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
5230
5231 * configure.ac: Check if the fs_base and gs_base members of
5232 `struct user_regs_struct' exist.
5233 * config.in: Regenerated.
5234 * configure: Likewise.
5235
5236 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
5237
5238 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
5239 target_read_memory.
5240 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
5241 (get_next_pcs_syscall_next_pc): Likewise.
5242
5243 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
5244
5245 * win32-i386-low.c: Fix incorrect reference to a couple source files.
5246 * nto-x86-low.c: Likewise.
5247
5248 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
5249
5250 * Makefile.in: Include disable-implicit-rules.mk.
5251
5252 2016-11-23 Pedro Alves <palves@redhat.com>
5253
5254 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
5255 (debug_vprintf): Use std::chrono::steady_clock instead of
5256 gettimeofday. Use '.' instead of ':'.
5257 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
5258 (get_timestamp): Use std::chrono::steady_clock instead of
5259 gettimeofday.
5260
5261 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
5262
5263 * Makefile.in: Fix whitespace formatting.
5264
5265 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
5266
5267 * Makefile.in (SFILES, OBS): Flatten list and order
5268 alphabetically.
5269
5270 2016-11-23 Pedro Alves <palves@redhat.com>
5271
5272 * event-loop.c (handle_file_event): Use warning.
5273 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
5274 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5275 Use warning.
5276
5277 2016-11-23 Pedro Alves <palves@redhat.com>
5278
5279 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
5280 output.
5281 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
5282 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
5283 debug_printf and debug_flush for debug output.
5284 * server.c (handle_general_set): Likewise.
5285 * thread-db.c (try_thread_db_load): Use debug_printf for debug
5286 output.
5287
5288 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
5289
5290 * Makefile.in (.c.o): Replace rule with ...
5291 (%.o: %.c): ... this one.
5292
5293 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
5294
5295 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
5296 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
5297 make.
5298 * configure.ac: Remove checks for the make program.
5299 * configure: Re-generate.
5300
5301 2016-10-28 Pedro Alves <palves@redhat.com>
5302
5303 * Makefile.in (CXX_DIALECT): Get from configure.
5304 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
5305 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
5306 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
5307 * config.in: Regenerate.
5308 * configure: Regenerate.
5309
5310 2016-10-27 Yao Qi <yao.qi@linaro.org>
5311
5312 * linux-low.c (linux_supports_range_stepping): Return true if
5313 can_software_single_step return true.
5314
5315 2016-10-27 Yao Qi <yao.qi@linaro.org>
5316
5317 * inferiors.c (find_inferior_in_random): New function.
5318 * inferiors.h (find_inferior_in_random): Declare.
5319 * linux-low.c (linux_wait_for_event_filtered): Call
5320 find_inferior_in_random instead of find_inferior.
5321
5322 2016-10-27 Yao Qi <yao.qi@linaro.org>
5323
5324 * linux-low.c (linux_wait_1): If single-step breakpoints are
5325 inserted, remove them.
5326
5327 2016-10-26 Pedro Alves <palves@redhat.com>
5328
5329 * linux-low.c (handle_extended_wait): Link parent/child fork
5330 threads.
5331 (linux_wait_1): Unlink them.
5332 (linux_set_resume_request): Ignore resume requests for
5333 already-resumed and unhandled fork child threads.
5334 * linux-low.h (struct lwp_info) <fork_relative>: New field.
5335 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
5336 New functions.
5337 (handle_v_requests) <vCont>: Don't call require_running.
5338 * server.h (in_queued_stop_replies): New declaration.
5339
5340 2016-10-24 Yao Qi <yao.qi@linaro.org>
5341
5342 PR server/20733
5343 * linux-aarch64-low.c (append_insns): Cast the return value to
5344 'uint32_t *'.
5345
5346 2016-10-10 Yao Qi <yao.qi@linaro.org>
5347
5348 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
5349
5350 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
5351
5352 * target.c (target_supports_multi_process): New function, moved
5353 from...
5354 * target.h (target_supports_multi_process): ... here. Remove
5355 macro.
5356
5357 2016-10-05 Tom Tromey <tom@tromey.com>
5358
5359 PR remote/20655:
5360 * tracepoint.c (handle_tracepoint_bkpts): Check
5361 ipa_error_tracepoint, not ipa_stopping_tracepoint.
5362
5363 2016-10-05 Yao Qi <yao.qi@linaro.org>
5364
5365 * configure.srv: Update the path of arm-*.xml files.
5366
5367 2016-10-05 Terry Guo <terry.guo@arm.com>
5368 Yao Qi <yao.qi@linaro.org>
5369
5370 * Makefile.in: Adjust the path of rules.
5371 * configure.srv: Update the path of xml files.
5372 * regformats/arm-with-iwmmxt.dat: Regenerated.
5373 * regformats/arm-with-neon.dat: Likewise.
5374 * regformats/arm-with-vfpv2.dat: Likewise.
5375 * regformats/arm-with-vfpv3.dat Likewise.
5376
5377 2016-09-30 Yao Qi <yao.qi@linaro.org>
5378
5379 PR gdbserver/20627
5380 * target.c (target_stop_and_wait): Don't call
5381 target_continue_no_signal, use resume_stop instead.
5382
5383 2016-09-26 Yao Qi <yao.qi@linaro.org>
5384
5385 * linux-low.c (linux_wait_1): Call debug_exit.
5386
5387 2016-09-23 Pedro Alves <palves@redhat.com>
5388
5389 * Makefile.in (SFILES): Add common/new-op.c.
5390 (OBS): Add common/new-op.o.
5391 (new-op.o): New rule.
5392
5393 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
5394
5395 * .gitinore: Ignore more files.
5396
5397 2016-09-21 Yao Qi <yao.qi@linaro.org>
5398
5399 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
5400 23.
5401
5402 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
5403
5404 * server.c (start_inferior): Call target_mourn_inferior instead of
5405 mourn_inferior; pass ptid_t argument to it.
5406 (resume): Likewise.
5407 (handle_target_event): Likewise.
5408 * target.c (target_mourn_inferior): New function.
5409 * target.h (mourn_inferior): Delete macro.
5410
5411 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
5412
5413 * linux-low.c (lwp_is_stepping): New function.
5414
5415 2016-09-06 Carl Love <cel@us.ibm.com>
5416
5417 * server.c (start_inferior): Fixed comment, requested comment change
5418 didn't get updated correctly. Removed reference to ptrace () call as
5419 it is only true on Linux systems.
5420
5421 2016-09-06 Carl Love <cel@us.ibm.com>
5422
5423 * server.c (start_inferior): Do not call
5424 function target_post_create_inferior () if the
5425 inferior process has already exited.
5426
5427 2016-09-05 Pedro Alves <palves@redhat.com>
5428
5429 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
5430 (COMPILE.pre, CC_LD): Use CXX directly.
5431 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
5432 * acinclude.m4: Don't include build-with-cxx.m4.
5433 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
5434 * configure: Regenerate.
5435
5436 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
5437
5438 PR gdb/19495
5439 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
5440 call writing data to own_buf.
5441
5442 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
5443
5444 * target.c (mywait): Call target_wait instead of
5445 the_target->wait.
5446 (target_wait): New function.
5447
5448 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
5449
5450 * server.c (start_inferior): New variable 'ptid'. Replace calls
5451 to the_target->resume by target_continue{,_no_signal}, depending
5452 on the case.
5453 * target.c (target_stop_and_wait): Call target_continue_no_signal
5454 instead of the_target->resume.
5455 (target_continue): New function.
5456
5457 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
5458
5459 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
5460
5461 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
5462
5463 PR server/20491
5464 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
5465 ps_prochandle.
5466 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
5467 * linux-arm-low.c (ps_get_thread_area): Likewise.
5468 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
5469 * linux-m68k-low.c (ps_get_thread_area): Likewise.
5470 * linux-mips-low.c (ps_get_thread_area): Likewise.
5471 * linux-nios2-low.c (ps_get_thread_area): Likewise.
5472 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
5473 * linux-x86-low.c (ps_get_thread_area): Likewise.
5474 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
5475
5476 2016-08-19 Pedro Alves <palves@redhat.com>
5477
5478 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
5479
5480 2016-08-19 Pedro Alves <palves@redhat.com>
5481
5482 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
5483 comment. Use memcpy instead of casting through unsigned long.
5484
5485 2016-08-19 Pedro Alves <palves@redhat.com>
5486
5487 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
5488 allocating around 0x80000000.
5489
5490 2016-08-19 Pedro Alves <palves@redhat.com>
5491
5492 PR gdb/20415
5493 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
5494 (x32-avx512-linux-ipa.o): New rules.
5495 * configure.ac (x86_64-*-linux*): New x32 check.
5496 * configure.srv (ipa_x32_linux_regobj): New.
5497 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
5498 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
5499 descriptions.
5500 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
5501 descriptions.
5502 * configure: Regenerate.
5503
5504 2016-08-09 Pedro Alves <palves@redhat.com>
5505
5506 PR gdb/18653
5507 * Makefile.in (OBS): Add signals-state-save-restore.o.
5508 (signals-state-save-restore.o): New rule.
5509 * config.in: Regenerate.
5510 * configure: Regenerate.
5511 * linux-low.c: Include "signals-state-save-restore.h".
5512 (linux_create_inferior): Call
5513 restore_original_signals_state.
5514 * server.c: Include "dispositions-save-restore.h".
5515 (captured_main): Call save_original_signals_state.
5516
5517 2016-08-05 Pedro Alves <palves@redhat.com>
5518
5519 * configure: Regenerate.
5520
5521 2016-08-04 Yao Qi <yao.qi@linaro.org>
5522
5523 * linux-low.c (regsets_fetch_inferior_registers): Check
5524 errno is ESRCH or not.
5525
5526 2016-08-02 Yao Qi <yao.qi@linaro.org>
5527
5528 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
5529 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
5530 (thread_db_load_search): Update.
5531 (try_thread_db_load_1): Don't look for td_ta_event_addr,
5532 td_ta_set_event and td_ta_event_getmsg.
5533
5534 2016-07-26 Pedro Alves <palves@redhat.com>
5535
5536 PR server/20414
5537 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
5538 of unsigned long for 64-bit registers and use uint32_t instead of
5539 unsigned int for 32-bit registers.
5540
5541 2016-07-26 Pedro Alves <palves@redhat.com>
5542
5543 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
5544 to 'ptrace'.
5545
5546 2016-07-21 Tom Tromey <tom@tromey.com>
5547
5548 * configure: Rebuild.
5549
5550 2016-07-21 Yao Qi <yao.qi@linaro.org>
5551
5552 * mem-break.c (find_gdb_breakpoint): Cast bp to
5553 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
5554
5555 2016-07-21 Yao Qi <yao.qi@linaro.org>
5556
5557 * server.c (handle_v_requests): Support s and S actions
5558 if target_supports_software_single_step return true.
5559
5560 2016-07-21 Yao Qi <yao.qi@linaro.org>
5561
5562 * linux-low.c (resume_stopped_resumed_lwps): If resume request
5563 is resume_step, call maybe_hw_step.
5564 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
5565 and unstop them.
5566 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
5567 breakpoints or not.
5568 (proceed_one_lwp): If resume request is resume_step, install
5569 reinsert breakpoints and call maybe_hw_step.
5570
5571 2016-07-21 Yao Qi <yao.qi@linaro.org>
5572
5573 * linux-low.c (proceed_one_lwp): Declare.
5574 (linux_resume_one_thread): Remove local variable 'step'.
5575 Lift code enqueue signal. Call proceed_one_lwp instead of
5576 linux_resume_one_lwp.
5577
5578 2016-07-21 Yao Qi <yao.qi@linaro.org>
5579
5580 * linux-low.c (linux_resume_one_thread): Call
5581 enqueue_pending_signal.
5582
5583 2016-07-21 Yao Qi <yao.qi@linaro.org>
5584
5585 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
5586 * inferiors.c (do_restore_current_thread_cleanup): New function.
5587 (make_cleanup_restore_current_thread): Likewise.
5588 * linux-low.c (install_software_single_step_breakpoints): Call
5589 make_cleanup_restore_current_thread. Switch current_thread to
5590 thread.
5591
5592 2016-07-21 Yao Qi <yao.qi@linaro.org>
5593
5594 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
5595 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
5596 (clone_one_breakpoint): Likewise.
5597 (delete_reinsert_breakpoints): Change parameter to thread.
5598 Callers updated.
5599 (has_reinsert_breakpoints): Likewise.
5600 (uninsert_reinsert_breakpoints): Likewise.
5601 (reinsert_reinsert_breakpoints): Likewise.
5602 * mem-break.h (set_reinsert_breakpoint): Update declaration.
5603 (delete_reinsert_breakpoints): Likewise.
5604 (reinsert_reinsert_breakpoints): Likewise.
5605 (uninsert_reinsert_breakpoints): Likewise.
5606 (has_reinsert_breakpoints): Likewise.
5607
5608 2016-07-21 Yao Qi <yao.qi@linaro.org>
5609
5610 * inferiors.c (get_thread_process): Make parameter const.
5611 * inferiors.h (get_thread_process): Update declaration.
5612 * mem-break.c (clone_all_breakpoints): Remove all parameters.
5613 Add new parameters child_thread and parent_thread. Callers
5614 updated.
5615 * mem-break.h (clone_all_breakpoints): Update declaration.
5616
5617 2016-07-21 Yao Qi <yao.qi@linaro.org>
5618
5619 * mem-break.c (struct breakpoint) <cond_list>: Remove.
5620 <command_list, handler>: Remove.
5621 (struct gdb_breakpoint): New.
5622 (struct other_breakpoint): New.
5623 (struct reinsert_breakpoint): New.
5624 (is_gdb_breakpoint): New function.
5625 (any_persistent_commands): Update command_list if
5626 is_gdb_breakpoint returns true.
5627 (set_breakpoint): Create breakpoints according to their types.
5628 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
5629 (set_gdb_breakpoint_1): Likewise.
5630 (set_gdb_breakpoint): Likewise.
5631 (clear_breakpoint_conditions): Change parameter type to
5632 'struct gdb_breakpoint *'.
5633 (clear_breakpoint_commands): Likewise.
5634 (clear_breakpoint_conditions_and_commands): Likewise.
5635 (add_condition_to_breakpoint): Likewise.
5636 (add_breakpoint_condition): Likewise.
5637 (add_commands_to_breakpoint): Likewise.
5638 (check_breakpoints): Check other_breakpoint.
5639 (clone_one_breakpoint): Clone breakpopint according to its type.
5640 * mem-break.h (struct gdb_breakpoint): Declare.
5641 (set_gdb_breakpoint): Update declaration.
5642 (clear_breakpoint_conditions_and_commands): Likewise.
5643 (add_breakpoint_condition): Likewise.
5644 (add_breakpoint_commands): Likewise.
5645 * server.c (process_point_options): Change parameter type to
5646 'struct gdb_breakpoint *'.
5647
5648 2016-07-21 Yao Qi <yao.qi@linaro.org>
5649
5650 * mem-break.c (set_breakpoint_at): Rename it to ...
5651 (set_breakpoint_type_at): ... it.
5652 (set_breakpoint_at): Call set_breakpoint_type_at.
5653 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
5654 * mem-break.h (set_breakpoint_at): Update comments.
5655
5656 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
5657
5658 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
5659 to buf parameter.
5660 (nios2_store_gregset): Likewise.
5661
5662 2016-07-01 Pedro Alves <palves@redhat.com>
5663 Antoine Tremblay <antoine.tremblay@ericsson.com>
5664
5665 * linux-low.c: Change interface to take the target lwp_info
5666 pointer directly and return void. Handle detaching from a zombie
5667 thread.
5668 (linux_detach_lwp_callback): New function.
5669 (linux_detach): Detach from the leader thread after detaching from
5670 the clone threads.
5671
5672 2016-06-28 Yao Qi <yao.qi@linaro.org>
5673
5674 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
5675 for variable new_offset.
5676 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5677 (aarch64_ftrace_insn_reloc_cb): Likewise.
5678 (aarch64_ftrace_insn_reloc_tb): Likewise.
5679 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
5680 PRIx64 instead of PRIx32.
5681
5682 2016-06-28 Yao Qi <yao.qi@linaro.org>
5683
5684 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
5685 (the_low_target): Install arm_get_syscall_trapinfo.
5686
5687 2016-06-28 Yao Qi <yao.qi@linaro.org>
5688
5689 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
5690 function.
5691 (the_low_target): Install aarch64_get_syscall_trapinfo.
5692
5693 2016-06-28 Yao Qi <yao.qi@linaro.org>
5694
5695 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
5696 Callers updated.
5697 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
5698 Remove parameter sysno.
5699 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
5700 sysret.
5701
5702 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5703
5704 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
5705 (s390_emit_ne_goto): Likewise.
5706 (s390_emit_lt_goto): Likewise.
5707 (s390_emit_le_goto): Likewise.
5708 (s390_emit_gt_goto): Likewise.
5709 (s390_emit_ge_goto): Likewise.
5710 (s390x_emit_eq_goto): Likewise.
5711 (s390x_emit_ne_goto): Likewise.
5712 (s390x_emit_lt_goto): Likewise.
5713 (s390x_emit_le_goto): Likewise.
5714 (s390x_emit_gt_goto): Likewise.
5715 (s390x_emit_ge_goto): Likewise.
5716 (s390_emit_ops_impl): Mark variable static.
5717 (s390x_emit_ops): Likewise.
5718
5719 2016-06-17 Yao Qi <yao.qi@linaro.org>
5720
5721 * linux-low.c (handle_extended_wait): Call
5722 uninsert_reinsert_breakpoints for the parent process. Remove
5723 reinsert breakpoints from the child process. Reinsert them to
5724 the parent process when vfork is done.
5725 * mem-break.c (uninsert_reinsert_breakpoints): New function.
5726 (reinsert_reinsert_breakpoints): New function.
5727 * mem-break.h (uninsert_reinsert_breakpoints): Declare
5728 (reinsert_reinsert_breakpoints): Declare.
5729
5730 2016-06-17 Yao Qi <yao.qi@linaro.org>
5731
5732 * linux-low.c (handle_extended_wait): If the parent is doing
5733 step-over, remove the reinsert breakpoints from the forked child.
5734
5735 2016-06-17 Yao Qi <yao.qi@linaro.org>
5736
5737 * linux-low.c (unsuspend_all_lwps): Declare.
5738 (linux_low_filter_event): If thread exited, call finish_step_over.
5739 If step-over is finished, unsuspend other threads.
5740
5741 2016-06-17 Yao Qi <yao.qi@linaro.org>
5742
5743 * linux-low.c (linux_resume_one_lwp_throw): Assert
5744 has_reinsert_breakpoints returns false.
5745 * mem-break.c (delete_disabled_breakpoints): Assert
5746 bp type isn't reinsert_breakpoint.
5747
5748 2016-06-17 Yao Qi <yao.qi@linaro.org>
5749
5750 * linux-low.c (maybe_hw_step): New function.
5751 (linux_resume_one_lwp_throw): Call maybe_hw_step.
5752 (finish_step_over): Switch current_thread to lwp temporarily,
5753 and assert has_reinsert_breakpoints returns true.
5754 (proceed_one_lwp): Call maybe_hw_step.
5755 * mem-break.c (has_reinsert_breakpoints): New function.
5756 * mem-break.h (has_reinsert_breakpoints): Declare.
5757
5758 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
5759
5760 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
5761
5762 2016-05-17 Yao Qi <yao.qi@linaro.org>
5763
5764 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
5765 instead of find_inferior.
5766
5767 2016-05-05 Yao Qi <yao.qi@linaro.org>
5768
5769 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
5770 Initialize res to zero.
5771
5772 2016-05-05 Yao Qi <yao.qi@linaro.org>
5773
5774 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
5775 to uint32_t.
5776
5777 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5778
5779 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
5780 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
5781 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
5782
5783 2016-04-28 Par Olsson <par.olsson@windriver.com>
5784 Simon Marchi <simon.marchi@ericsson.com>
5785
5786 * tracepoint.c (write_inferior_int8): New function.
5787 (cmd_qtenable_disable): Write enable flag using
5788 write_inferior_int8.
5789
5790 2016-04-25 Yao Qi <yao.qi@linaro.org>
5791
5792 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
5793 (need_step_over_p): Return zero if the LWP has pending signals
5794 can be delivered on software single step target.
5795
5796 2016-04-25 Yao Qi <yao.qi@linaro.org>
5797
5798 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
5799 return instead of error.
5800
5801 2016-04-22 Yao Qi <yao.qi@linaro.org>
5802
5803 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
5804 to 23.
5805
5806 2016-04-22 Yao Qi <yao.qi@linaro.org>
5807
5808 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
5809 signal when stepping over breakpoint with software single
5810 step.
5811
5812 2016-04-21 Pedro Alves <palves@redhat.com>
5813
5814 * linux-s390-low.c (s390_collect_ptrace_register)
5815 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
5816 add casts.
5817 (s390_check_regset): Use void * instead of gdb_byte *.
5818
5819 2016-04-20 Pedro Alves <palves@redhat.com>
5820
5821 * configure: Renegerate.
5822
5823 2016-04-20 Yao Qi <yao.qi@linaro.org>
5824
5825 * linux-aarch32-low.c: Include "arch/arm-linux.h".
5826 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
5827 number 16.
5828 (arm_store_gregset): Likewise.
5829
5830 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
5831
5832 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
5833 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
5834 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
5835 (amd64-avx-mpx-linux.c): New rules.
5836 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
5837 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
5838 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
5839 (srv_amd64_regobj): Add amd64-avx-mpx.o.
5840 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
5841 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
5842 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
5843 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
5844 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
5845 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
5846 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
5847 * linux-x86-low.c (x86_linux_read_description): Add case for
5848 X86_XSTATE_AVX_MPX_MASK.
5849 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
5850 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
5851 init_registers_i386_avx_mpx_linux.
5852 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5853 (initialize_low_tracepoint): Call
5854 init_registers_i386_avx_mpx_linux.
5855 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5856 (initialize_low_tracepoint): Call
5857 init_registers_amd64_avx_mpx_linux.
5858 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
5859 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
5860 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
5861 declarations.
5862
5863 2016-04-18 Pedro Alves <palves@redhat.com>
5864
5865 * configure: Regenerate.
5866
5867 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
5868
5869 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
5870 (aarch64_emit_sub): Likewise.
5871
5872 2016-04-12 Pedro Alves <palves@redhat.com>
5873
5874 * utils.c (prepare_to_throw_exception): Delete.
5875
5876 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
5877
5878 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
5879
5880 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
5881
5882 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
5883
5884 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
5885
5886 * linux-aarch64-ipa.c: Add <elf.h> include.
5887 * linux-ppc-ipa.c: Add <elf.h> include.
5888 * linux-s390-ipa.c: Add <elf.h> include.
5889
5890 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5891
5892 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
5893 (get_raw_reg_ptr): Likewise.
5894 (get_trace_state_variable_value_ptr): Likewise.
5895 (set_trace_state_variable_value_ptr): Likewise.
5896 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
5897 char *.
5898
5899 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5900 Marcin Kościelnicki <koriakin@0x04.net>
5901
5902 PR/17221
5903 * linux-ppc-low.c (emit_insns): New function.
5904 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
5905 (ppc_emit_prologue): New function.
5906 (ppc_emit_epilogue): New function.
5907 (ppc_emit_add): New function.
5908 (ppc_emit_sub): New function.
5909 (ppc_emit_mul): New function.
5910 (ppc_emit_lsh): New function.
5911 (ppc_emit_rsh_signed): New function.
5912 (ppc_emit_rsh_unsigned): New function.
5913 (ppc_emit_ext): New function.
5914 (ppc_emit_zero_ext): New function.
5915 (ppc_emit_log_not): New function.
5916 (ppc_emit_bit_and): New function.
5917 (ppc_emit_bit_or): New function.
5918 (ppc_emit_bit_xor): New function.
5919 (ppc_emit_bit_not): New function.
5920 (ppc_emit_equal): New function.
5921 (ppc_emit_less_signed): New function.
5922 (ppc_emit_less_unsigned): New function.
5923 (ppc_emit_ref): New function.
5924 (ppc_emit_const): New function.
5925 (ppc_emit_reg): New function.
5926 (ppc_emit_pop): New function.
5927 (ppc_emit_stack_flush): New function.
5928 (ppc_emit_swap): New function.
5929 (ppc_emit_stack_adjust): New function.
5930 (ppc_emit_call): New function.
5931 (ppc_emit_int_call_1): New function.
5932 (ppc_emit_void_call_2): New function.
5933 (ppc_emit_if_goto): New function.
5934 (ppc_emit_goto): New function.
5935 (ppc_emit_eq_goto): New function.
5936 (ppc_emit_ne_goto): New function.
5937 (ppc_emit_lt_goto): New function.
5938 (ppc_emit_le_goto): New function.
5939 (ppc_emit_gt_goto): New function.
5940 (ppc_emit_ge_goto): New function.
5941 (ppc_write_goto_address): New function.
5942 (ppc_emit_ops_impl): New static variable.
5943 (ppc64v1_emit_prologue): New function.
5944 (ppc64v2_emit_prologue): New function.
5945 (ppc64_emit_epilogue): New function.
5946 (ppc64_emit_add): New function.
5947 (ppc64_emit_sub): New function.
5948 (ppc64_emit_mul): New function.
5949 (ppc64_emit_lsh): New function.
5950 (ppc64_emit_rsh_signed): New function.
5951 (ppc64_emit_rsh_unsigned): New function.
5952 (ppc64_emit_ext): New function.
5953 (ppc64_emit_zero_ext): New function.
5954 (ppc64_emit_log_not): New function.
5955 (ppc64_emit_bit_and): New function.
5956 (ppc64_emit_bit_or): New function.
5957 (ppc64_emit_bit_xor): New function.
5958 (ppc64_emit_bit_not): New function.
5959 (ppc64_emit_equal): New function.
5960 (ppc64_emit_less_signed): New function.
5961 (ppc64_emit_less_unsigned): New function.
5962 (ppc64_emit_ref): New function.
5963 (ppc64_emit_const): New function.
5964 (ppc64v1_emit_reg): New function.
5965 (ppc64v2_emit_reg): New function.
5966 (ppc64_emit_pop): New function.
5967 (ppc64_emit_stack_flush): New function.
5968 (ppc64_emit_swap): New function.
5969 (ppc64v1_emit_call): New function.
5970 (ppc64v2_emit_call): New function.
5971 (ppc64v1_emit_int_call_1): New function.
5972 (ppc64v2_emit_int_call_1): New function.
5973 (ppc64v1_emit_void_call_2): New function.
5974 (ppc64v2_emit_void_call_2): New function.
5975 (ppc64_emit_if_goto): New function.
5976 (ppc64_emit_eq_goto): New function.
5977 (ppc64_emit_ne_goto): New function.
5978 (ppc64_emit_lt_goto): New function.
5979 (ppc64_emit_le_goto): New function.
5980 (ppc64_emit_gt_goto): New function.
5981 (ppc64_emit_ge_goto): New function.
5982 (ppc64v1_emit_ops_impl): New static variable.
5983 (ppc64v2_emit_ops_impl): New static variable.
5984 (ppc_emit_ops): New function.
5985 (linux_low_target): Wire in ppc_emit_ops.
5986
5987 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5988 Marcin Kościelnicki <koriakin@0x04.net>
5989
5990 PR/17221
5991 * Makefile.in: Add powerpc-*-ipa.o
5992 * configure.srv: Add ipa_obj for powerpc*-linux.
5993 * linux-ppc-ipa.c: New file.
5994 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
5995 includes.
5996 (PPC_FIELD): New macro.
5997 (PPC_SEXT): New macro.
5998 (PPC_OP6): New macro.
5999 (PPC_BO): New macro.
6000 (PPC_LI): New macro.
6001 (PPC_BD): New macro.
6002 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
6003 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
6004 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
6005 (ppc_get_thread_area): New function.
6006 (is_elfv2_inferior): New function.
6007 (gen_ds_form): New function.
6008 (GEN_STD): New macro.
6009 (GEN_STDU): New macro.
6010 (GEN_LD): New macro.
6011 (GEN_LDU): New macro.
6012 (gen_d_form): New function.
6013 (GEN_ADDI): New macro.
6014 (GEN_ADDIS): New macro.
6015 (GEN_LI): New macro.
6016 (GEN_LIS): New macro.
6017 (GEN_ORI): New macro.
6018 (GEN_ORIS): New macro.
6019 (GEN_LWZ): New macro.
6020 (GEN_STW): New macro.
6021 (GEN_STWU): New macro.
6022 (gen_xfx_form): New function.
6023 (GEN_MFSPR): New macro.
6024 (GEN_MTSPR): New macro.
6025 (GEN_MFCR): New macro.
6026 (GEN_MTCR): New macro.
6027 (GEN_SYNC): New macro.
6028 (GEN_LWSYNC): New macro.
6029 (gen_x_form): New function.
6030 (GEN_OR): New macro.
6031 (GEN_MR): New macro.
6032 (GEN_LWARX): New macro.
6033 (GEN_STWCX): New macro.
6034 (GEN_CMPW): New macro.
6035 (gen_md_form): New function.
6036 (GEN_RLDICL): New macro.
6037 (GEN_RLDICR): New macro.
6038 (gen_i_form): New function.
6039 (GEN_B): New macro.
6040 (GEN_BL): New macro.
6041 (gen_b_form): New function.
6042 (GEN_BNE): New macro.
6043 (GEN_LOAD): New macro.
6044 (GEN_STORE): New macro.
6045 (gen_limm): New function.
6046 (gen_atomic_xchg): New function.
6047 (gen_call): New function.
6048 (ppc_relocate_instruction): New function.
6049 (ppc_install_fast_tracepoint_jump_pad): New function.
6050 (ppc_get_min_fast_tracepoint_insn_len): New function.
6051 (ppc_get_ipa_tdesc_idx): New function.
6052 (the_low_target): Wire in the new functions.
6053 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
6054 tdescs.
6055 * linux-ppc-tdesc.h: New file.
6056
6057 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
6058
6059 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
6060 (alloc_jump_pad_buffer): New function.
6061 * linux-amd64-ipa.c: Add <sys/mman.h> include.
6062 (alloc_jump_pad_buffer): New function.
6063 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
6064 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
6065 (alloc_jump_pad_buffer): New function.
6066 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
6067 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
6068 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
6069 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
6070
6071 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
6072
6073 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
6074 * linux-amd64-ipa.c: Likewise.
6075 * linux-i386-ipa.c: Likewise.
6076 * linux-s390-ipa.c: Likewise.
6077 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
6078 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
6079 set_trace_state_variable_value_ptr.
6080 (struct ipa_sym_addresses): Likewise.
6081 (symbol_list): Likewise.
6082 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
6083 accessing gdb_collect directly.
6084 (gdb_collect_ptr_type): New typedef.
6085 (get_raw_reg_ptr_type): New typedef.
6086 (get_trace_state_variable_value_ptr_type): New typedef.
6087 (set_trace_state_variable_value_ptr_type): New typedef.
6088 (gdb_collect_ptr): New global.
6089 (get_raw_reg_ptr): New global.
6090 (get_trace_state_variable_value_ptr): New global.
6091 (set_trace_state_variable_value_ptr): New global.
6092 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
6093 accessing get_raw_reg directly.
6094 (get_get_tsv_func_addr): Likewise for
6095 get_trace_state_variable_value_ptr.
6096 (get_set_tsv_func_addr): Likewise for
6097 set_trace_state_variable_value_ptr.
6098 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
6099
6100 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
6101
6102 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
6103
6104 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
6105
6106 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
6107 packets.
6108 (relocate_instruction): Remove own_buf.
6109 * server.c (own_buf): Make global.
6110 (handle_v_requests): Make global.
6111 * server.h (own_buf): New declaration.
6112 (handle_v_requests): New prototype.
6113
6114 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
6115
6116 PR 18377
6117 * linux-s390-low.c (add_insns): New function.
6118 (s390_emit_prologue): New function.
6119 (s390_emit_epilogue): New function.
6120 (s390_emit_add): New function.
6121 (s390_emit_sub): New function.
6122 (s390_emit_mul): New function.
6123 (s390_emit_lsh): New function.
6124 (s390_emit_rsh_signed): New function.
6125 (s390_emit_rsh_unsigned): New function.
6126 (s390_emit_ext): New function.
6127 (s390_emit_log_not): New function.
6128 (s390_emit_bit_and): New function.
6129 (s390_emit_bit_or): New function.
6130 (s390_emit_bit_xor): New function.
6131 (s390_emit_bit_not): New function.
6132 (s390_emit_equal): New function.
6133 (s390_emit_less_signed): New function.
6134 (s390_emit_less_unsigned): New function.
6135 (s390_emit_ref): New function.
6136 (s390_emit_if_goto): New function.
6137 (s390_emit_goto): New function.
6138 (s390_write_goto_address): New function.
6139 (s390_emit_litpool): New function.
6140 (s390_emit_const): New function.
6141 (s390_emit_call): New function.
6142 (s390_emit_reg): New function.
6143 (s390_emit_pop): New function.
6144 (s390_emit_stack_flush): New function.
6145 (s390_emit_zero_ext): New function.
6146 (s390_emit_swap): New function.
6147 (s390_emit_stack_adjust): New function.
6148 (s390_emit_set_r2): New function.
6149 (s390_emit_int_call_1): New function.
6150 (s390_emit_void_call_2): New function.
6151 (s390_emit_eq_goto): New function.
6152 (s390_emit_ne_goto): New function.
6153 (s390_emit_lt_goto): New function.
6154 (s390_emit_le_goto): New function.
6155 (s390_emit_gt_goto): New function.
6156 (s390_emit_ge_goto): New function.
6157 (s390x_emit_prologue): New function.
6158 (s390x_emit_epilogue): New function.
6159 (s390x_emit_add): New function.
6160 (s390x_emit_sub): New function.
6161 (s390x_emit_mul): New function.
6162 (s390x_emit_lsh): New function.
6163 (s390x_emit_rsh_signed): New function.
6164 (s390x_emit_rsh_unsigned): New function.
6165 (s390x_emit_ext): New function.
6166 (s390x_emit_log_not): New function.
6167 (s390x_emit_bit_and): New function.
6168 (s390x_emit_bit_or): New function.
6169 (s390x_emit_bit_xor): New function.
6170 (s390x_emit_bit_not): New function.
6171 (s390x_emit_equal): New function.
6172 (s390x_emit_less_signed): New function.
6173 (s390x_emit_less_unsigned): New function.
6174 (s390x_emit_ref): New function.
6175 (s390x_emit_if_goto): New function.
6176 (s390x_emit_const): New function.
6177 (s390x_emit_call): New function.
6178 (s390x_emit_reg): New function.
6179 (s390x_emit_pop): New function.
6180 (s390x_emit_stack_flush): New function.
6181 (s390x_emit_zero_ext): New function.
6182 (s390x_emit_swap): New function.
6183 (s390x_emit_stack_adjust): New function.
6184 (s390x_emit_int_call_1): New function.
6185 (s390x_emit_void_call_2): New function.
6186 (s390x_emit_eq_goto): New function.
6187 (s390x_emit_ne_goto): New function.
6188 (s390x_emit_lt_goto): New function.
6189 (s390x_emit_le_goto): New function.
6190 (s390x_emit_gt_goto): New function.
6191 (s390x_emit_ge_goto): New function.
6192 (s390_emit_ops): New function.
6193 (struct linux_target_ops): Fill in emit_ops hook.
6194
6195 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
6196
6197 PR 18377
6198 * Makefile.in: Add s390 IPA files.
6199 * configure.srv: Build IPA for s390.
6200 * linux-s390-ipa.c: New file.
6201 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
6202 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
6203 (tdesc_s390_linux32): Likewise.
6204 (init_registers_s390_linux32v1): Likewise.
6205 (tdesc_s390_linux32v1): Likewise.
6206 (init_registers_s390_linux32v2): Likewise.
6207 (tdesc_s390_linux32v2): Likewise.
6208 (init_registers_s390_linux64): Likewise.
6209 (tdesc_s390_linux64): Likewise.
6210 (init_registers_s390_linux64v1): Likewise.
6211 (tdesc_s390_linux64v1): Likewise.
6212 (init_registers_s390_linux64v2): Likewise.
6213 (tdesc_s390_linux64v2): Likewise.
6214 (init_registers_s390_te_linux64): Likewise.
6215 (tdesc_s390_te_linux64): Likewise.
6216 (init_registers_s390_vx_linux64): Likewise.
6217 (tdesc_s390_vx_linux64): Likewise.
6218 (init_registers_s390_tevx_linux64): Likewise.
6219 (tdesc_s390_tevx_linux64): Likewise.
6220 (init_registers_s390x_linux64): Likewise.
6221 (tdesc_s390x_linux64): Likewise.
6222 (init_registers_s390x_linux64v1): Likewise.
6223 (tdesc_s390x_linux64v1): Likewise.
6224 (init_registers_s390x_linux64v2): Likewise.
6225 (tdesc_s390x_linux64v2): Likewise.
6226 (init_registers_s390x_te_linux64): Likewise.
6227 (tdesc_s390x_te_linux64): Likewise.
6228 (init_registers_s390x_vx_linux64): Likewise.
6229 (tdesc_s390x_vx_linux64): Likewise.
6230 (init_registers_s390x_tevx_linux64): Likewise.
6231 (tdesc_s390x_tevx_linux64): Likewise.
6232 (have_hwcap_s390_vx): New static variable.
6233 (s390_arch_setup): Fill have_hwcap_s390_vx.
6234 (s390_get_thread_area): New function.
6235 (s390_ft_entry_gpr_esa): New const.
6236 (s390_ft_entry_gpr_zarch): New const.
6237 (s390_ft_entry_misc): New const.
6238 (s390_ft_entry_fr): New const.
6239 (s390_ft_entry_vr): New const.
6240 (s390_ft_main_31): New const.
6241 (s390_ft_main_64): New const.
6242 (s390_ft_exit_fr): New const.
6243 (s390_ft_exit_vr): New const.
6244 (s390_ft_exit_misc): New const.
6245 (s390_ft_exit_gpr_esa): New const.
6246 (s390_ft_exit_gpr_zarch): New const.
6247 (append_insns): New function.
6248 (s390_relocate_instruction): New function.
6249 (s390_install_fast_tracepoint_jump_pad): New function.
6250 (s390_get_min_fast_tracepoint_insn_len): New function.
6251 (s390_get_ipa_tdesc_idx): New function.
6252 (struct linux_target_ops): Wire in the above functions.
6253 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
6254 * linux-s390-tdesc.h: New file.
6255
6256 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
6257
6258 * linux-s390-low.c (s390_supports_tracepoints): New function.
6259 (struct linux_target_ops): Fill supports_tracepoints hook.
6260
6261 2016-03-18 Yao Qi <yao.qi@linaro.org>
6262
6263 * linux-low.c (lwp_signal_can_be_delivered): New function.
6264 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
6265
6266 2016-03-18 Yao Qi <yao.qi@linaro.org>
6267
6268 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
6269 0 if signal is enqueued. Remove 'signal' from one debugging
6270 message. Move one debugging message to some lines below.
6271 Remove code setting 'signal' to 0.
6272
6273 2016-03-18 Yao Qi <yao.qi@linaro.org>
6274
6275 * linux-low.c (linux_low_filter_event): Remove redundant
6276 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
6277
6278 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
6279
6280 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
6281 (struct linux_target_ops): Wire in the above.
6282
6283 2016-03-03 Yao Qi <yao.qi@linaro.org>
6284
6285 * linux-low.c: Update comments to start_step_over.
6286
6287 2016-03-03 Yao Qi <yao.qi@linaro.org>
6288
6289 PR server/19736
6290 * linux-low.c (handle_extended_wait): Set child suspended
6291 if event_lwp->bp_reinsert isn't zero.
6292
6293 2016-03-02 Yao Qi <yao.qi@linaro.org>
6294
6295 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
6296 enqueue_pending_signal.
6297
6298 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
6299
6300 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
6301 is actually loaded.
6302
6303 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
6304
6305 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
6306 (s390_regmap_3264) [!__s390x__]: New global.
6307 (s390_collect_ptrace_register): Skip map entries containing -1.
6308 (s390_supply_ptrace_register): Ditto.
6309 (s390_fill_gprs_high): New function.
6310 (s390_store_gprs_high): New function.
6311 (s390_regsets): Add NT_S390_HIGH_GPRS.
6312 (s390_get_hwcap): Enable on 31-bit.
6313 (have_hwcap_s390_high_gprs): Enable on 31-bit.
6314 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
6315 Detect NT_S390_HIGH_GPRS.
6316 (s390_usrregs_info_3264): Enable on 31-bit.
6317 (s390_regs_info): Enable regs_info_3264 on 31-bit.
6318 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
6319
6320 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
6321
6322 PR gdb/13808
6323 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
6324 * configure.srv: Ditto.
6325 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
6326 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
6327 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
6328 (init_registers_amd64_linux): Remove prototype.
6329 (tdesc_amd64_linux): Remove declaration.
6330 (get_ipa_tdesc): New function.
6331 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
6332 initialize remaining tdescs.
6333 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
6334 (init_registers_i386_linux): Remove prototype.
6335 (tdesc_i386_linux): Remove declaration.
6336 (get_ipa_tdesc): New function.
6337 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
6338 initialize remaining tdescs.
6339 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
6340 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
6341 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
6342 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
6343 (x86_get_ipa_tdesc_idx): New function.
6344 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
6345 * linux-x86-tdesc.h: New file.
6346 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
6347 (target_get_ipa_tdesc_idx): New macro.
6348 * tracepoint.c (ipa_tdesc_idx): New macro.
6349 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
6350 (symbol_list): Add ipa_tdesc_idx.
6351 (cmd_qtstart): Write ipa_tdesc_idx in the target.
6352 (ipa_tdesc): Remove.
6353 (ipa_tdesc_idx): New variable.
6354 (get_context_regcache): Use get_ipa_tdesc.
6355 (gdb_collect): Ditto.
6356 (gdb_probe): Ditto.
6357 * tracepoint.h (get_ipa_tdesc): New prototype.
6358 (ipa_tdesc): Remove.
6359
6360 2016-02-24 Pedro Alves <palves@redhat.com>
6361
6362 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
6363 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
6364 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
6365 Factor out common code between the USE_SIGTRAP_SIGINFO and
6366 !USE_SIGTRAP_SIGINFO blocks.
6367 (linux_low_filter_event): Call save_stop_reason instead of
6368 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
6369 Update comments.
6370 (linux_wait_1): Update comments.
6371
6372 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
6373
6374 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
6375 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
6376 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
6377 ppc_insert_point, ppc_remove_point.
6378
6379 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
6380
6381 * linux-s390-low.c (s390_supports_z_point_type): New function.
6382 (struct linux_target_ops): Wire s390_supports_z_point_type in.
6383
6384 2016-02-16 Yao Qi <yao.qi@linaro.org>
6385
6386 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
6387 PC. Get pc from regcache_read_pc.
6388
6389 2016-02-12 Yao Qi <yao.qi@linaro.org>
6390
6391 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
6392 or linux_get_pc_32bit.
6393 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
6394
6395 2016-02-12 Yao Qi <yao.qi@linaro.org>
6396
6397 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
6398 arm_linux_get_next_pcs_fixup.
6399
6400 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
6401
6402 * tracepoint.c (x_tracepoint_action_download): Change
6403 write_inferior_data_ptr to write_inferior_data_pointer.
6404 (cmd_qtstart): Likewise.
6405 (write_inferior_data_ptr): Remove.
6406 (download_agent_expr): Change write_inferior_data_ptr to
6407 write_inferior_data_pointer.
6408 (download_tracepoint_1): Likewise.
6409 (download_tracepoint): Likewise.
6410 (download_trace_state_variables): Likewise.
6411
6412 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
6413 Marcin Kościelnicki <koriakin@0x04.net>
6414
6415 * tracepoint.c (struct tracepoint_action_ops): Remove.
6416 (struct tracepoint_action): Remove ops.
6417 (m_tracepoint_action_download, r_tracepoint_action_download)
6418 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
6419 size and offset accordingly.
6420 (m_tracepoint_action_ops, r_tracepoint_action_ops)
6421 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
6422 (tracepoint_action_send, tracepoint_action_download): New functions.
6423 Helpers for trace action handlers.
6424 (add_tracepoint_action): Remove setup actions ops.
6425 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
6426
6427 2016-02-10 Yao Qi <yao.qi@linaro.org>
6428
6429 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
6430
6431 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
6432
6433 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
6434 to AC_OUTPUT.
6435 * configure: Regenerate.
6436
6437 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
6438
6439 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
6440 void * to gdb_byte *.
6441 * linux-low.c (siginfo_fixup): Likewise.
6442 (linux_xfer_siginfo): Likewise.
6443 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
6444 Likewise.
6445 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6446
6447 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
6448
6449 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
6450 to srv_tgtobj.
6451 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
6452 to srv_tgtobj.
6453 * linux-x86-low.c [__x86_64__]: Include
6454 "nat/amd64-linux-siginfo.h".
6455 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
6456 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
6457 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
6458 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
6459 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
6460 (cpt_si_fd, si_timerid, si_overrun): Move from
6461 nat/amd64-linux-siginfo.c.
6462 * Makefile.in (amd64-linux-siginfo.o:): New rule.
6463
6464 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
6465
6466 * server.c (skip_to_semicolon): Remove.
6467 (process_point_options): Use strchrnul instead of
6468 skip_to_semicolon.
6469
6470 2016-01-26 Yao Qi <yao.qi@linaro.org>
6471
6472 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
6473 * linux-low.c (install_software_single_step_breakpoints): Don't
6474 call regcache_read_pc.
6475 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
6476 argument pc.
6477
6478 2016-01-26 Yao Qi <yao.qi@linaro.org>
6479
6480 * linux-low.c (install_software_single_step_breakpoints): Call
6481 regcache_read_pc instead of get_pc.
6482
6483 2016-01-26 Yao Qi <yao.qi@linaro.org>
6484
6485 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
6486 (unblock_async_io): Rename to ...
6487 (block_unblock_async_io): ... it. New function.
6488 (enable_async_io): Don't install SIGIO handler. Unblock it
6489 instead.
6490 (disable_async_io): Don't ignore SIGIO. Block it instead.
6491 (initialize_async_io): Install SIGIO handler. Don't call
6492 unblock_async_io.
6493
6494 2016-01-26 Yao Qi <yao.qi@linaro.org>
6495
6496 * remote-utils.c (getpkt): If the buffer isn't empty, and the
6497 first character is '\003', call *the_target->request_interrupt.
6498
6499 2016-01-25 Yao Qi <yao.qi@linaro.org>
6500
6501 * remote-utils.c (new_thread_notify): Remove.
6502 (dead_thread_notify): Likewise.
6503 * remote-utils.h (new_thread_notify): Remove declaration.
6504 (dead_thread_notify): Likewise.
6505
6506 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
6507
6508 * gdb.trace/pending.exp: Fix expected message on continue.
6509
6510 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
6511
6512 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
6513 it works properly on big-endian machines where sizeof (CORE_ADDR)
6514 != sizeof (void *).
6515
6516 2016-01-21 Pedro Alves <palves@redhat.com>
6517
6518 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
6519 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
6520 * configure: Regenerate.
6521
6522 2016-01-21 Yao Qi <yao.qi@linaro.org>
6523
6524 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
6525 is_thumb and set it according to CPSR saved on the stack.
6526 (get_next_pcs_syscall_next_pc): Pass is_thumb to
6527 arm_sigreturn_next_pc.
6528
6529 2016-01-18 Yao Qi <yao.qi@linaro.org>
6530
6531 * linux-low.c (linux_set_pc_64bit): New function.
6532 (linux_get_pc_64bit): New function.
6533 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
6534 Declare.
6535 * linux-sparc-low.c (debug_threads): Remove declaration.
6536 (sparc_get_pc): Remove.
6537 (the_low_target): Use linux_get_pc_64bit instead of
6538 sparc_get_pc.
6539 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
6540 (the_low_target): Use linux_get_pc_64bit and
6541 linux_set_pc_64bit.
6542
6543 2016-01-18 Yao Qi <yao.qi@linaro.org>
6544
6545 * linux-arm-low.c (debug_threads): Remove declaration.
6546 (arm_get_pc, arm_set_pc): Remove.
6547 (the_low_target): Use linux_get_pc_32bit and
6548 linux_set_pc_32bit.
6549 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
6550 (the_low_target): Use linux_get_pc_32bit and
6551 linux_set_pc_32bit.
6552 * linux-cris-low.c (debug_threads): Remove declaration.
6553 (cris_get_pc, cris_set_pc,): Remove.
6554 (the_low_target): Use linux_get_pc_32bit and
6555 linux_set_pc_32bit.
6556 * linux-crisv32-low.c (debug_threads): Remove declaration.
6557 (cris_get_pc, cris_set_pc): Remove.
6558 (the_low_target): Use linux_get_pc_32bit and
6559 linux_set_pc_32bit.
6560 * linux-low.c: Include inttypes.h.
6561 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
6562 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
6563 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
6564 (the_low_target): Use linux_get_pc_32bit and
6565 linux_set_pc_32bit.
6566 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
6567 (the_low_target): Use linux_get_pc_32bit and
6568 linux_set_pc_32bit.
6569 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
6570 (the_low_target): Use linux_get_pc_32bit and
6571 linux_set_pc_32bit.
6572 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
6573 (the_low_target): Use linux_get_pc_32bit and
6574 linux_set_pc_32bit.
6575 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
6576 (the_low_target): Use linux_get_pc_32bit and
6577 linux_set_pc_32bit.
6578
6579 2016-01-18 Gary Benson <gbenson@redhat.com>
6580
6581 * configure.ac (AC_FUNC_FORK): New check.
6582 * config.in: Regenerate.
6583 * configure: Likewise.
6584
6585 2016-01-14 Yao Qi <yao.qi@linaro.org>
6586
6587 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
6588 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
6589 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
6590 arm_get_next_pcs_ctor.
6591
6592 2016-01-12 Josh Stone <jistone@redhat.com>
6593 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6594
6595 * inferiors.h: Include "gdb_vecs.h".
6596 (struct process_info): Add syscalls_to_catch.
6597 * inferiors.c (remove_process): Free syscalls_to_catch.
6598 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
6599 syscall_return stops.
6600 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
6601 * server.c (handle_general_set): Handle QCatchSyscalls.
6602 (handle_query): Report support for QCatchSyscalls.
6603 * target.h (struct target_ops): Add supports_catch_syscall.
6604 (target_supports_catch_syscall): New macro.
6605 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
6606 (struct lwp_info): Add syscall_state.
6607 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
6608 Maintain syscall_state and syscalls_to_catch across exec.
6609 (get_syscall_trapinfo): New function, proxy to the_low_target.
6610 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
6611 (linux_low_filter_event): Toggle syscall_state entry/return for
6612 syscall traps, and set it ignored for all others.
6613 (gdb_catching_syscalls_p): New function.
6614 (gdb_catch_this_syscall_p): New function.
6615 (linux_wait_1): Handle SYSCALL_SIGTRAP.
6616 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
6617 (linux_supports_catch_syscall): New function.
6618 (linux_target_ops): Install it.
6619 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
6620 (the_low_target): Install it.
6621
6622 2016-01-12 Mike Frysinger <vapier@gentoo.org>
6623
6624 * acinclude.m4: Include new ../warning.m4 file.
6625 * configure: Regenerated.
6626 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
6627
6628 2016-01-12 Mike Frysinger <vapier@gentoo.org>
6629
6630 * ax.c (is_goto_target): Mark static.
6631 * linux-low.c (register_addr): Likewise.
6632 (linux_fetch_registers, linux_store_registers): Likewise.
6633 * mem-break.c (any_persistent_commands): Fix old prototype.
6634 (add_commands_to_breakpoint): Mark static.
6635 * regcache.c (find_register_by_name): Delete unused func.
6636 * remote-utils.c (hex_or_minus_one): Mark static.
6637 * server.c (monitor_show_help): Mark static.
6638 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
6639 handle_v_requests): Likewise.
6640
6641 2016-01-12 Pedro Alves <palves@redhat.com>
6642
6643 Remove use of the registered trademark symbol throughout.
6644
6645 2016-01-08 Yao Qi <yao.qi@linaro.org>
6646
6647 * remote-utils.c (getpkt): If c is '\003', call target hook
6648 request_interrupt.
6649
6650 2016-01-06 Yao Qi <yao.qi@linaro.org>
6651
6652 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
6653 linux-aarch32-low.c.
6654 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6655 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6656 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6657 (thumb2_breakpoint): Declare.
6658 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
6659 linux-aarch32-low.h.
6660 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6661 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6662 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6663
6664 2016-01-01 Joel Brobecker <brobecker@adacore.com>
6665
6666 * gdbreplay.c (gdbreplay_version): Change copyright year in
6667 version message.
6668 * server.c (gdbserver_version): Likewise.
6669
6670 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
6671
6672 * server.c (crc32_table): Delete.
6673 (crc32): Use libiberty's xcrc32 function.
6674
6675 2015-12-22 Joel Brobecker <brobecker@adacore.com>
6676
6677 * lynx-low.c (lynx_delete_thread_callback): New function.
6678 (lynx_mourn): Properly delete our process and all of its
6679 threads. Remove call to clear_inferiors.
6680
6681 2015-12-22 Joel Brobecker <brobecker@adacore.com>
6682
6683 * target.c (thread_search_callback): Add check that
6684 the thread_stopped target callback is not NULL before
6685 calling it.
6686
6687 2015-12-21 Yao Qi <yao.qi@linaro.org>
6688
6689 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
6690 arm breakpoint.
6691
6692 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6693
6694 * server.c (handle_query): Call target_supports_software_single_step.
6695
6696 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6697
6698 * linux-low.c (single_step): New function.
6699 (linux_resume_one_lwp_throw): Call single_step.
6700 (start_step_over): Likewise.
6701
6702 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6703
6704 * Makefile.in (SFILES): Append arch/arm-linux.c,
6705 arch/arm-get-next-pcs.c.
6706 (arm-linux.o): New rule.
6707 (arm-get-next-pcs.o): New rule.
6708 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
6709 arm-linux.o.
6710 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
6711 to linux-aarch32-low.c.
6712 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6713 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6714 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6715 (thumb2_breakpoint_len): Likewise.
6716 (arm_is_thumb_mode): Make non-static.
6717 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
6718 from linux-aarch32-low.c.
6719 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6720 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6721 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6722 (thumb2_breakpoint_len): Likewise.
6723 (arm_is_thumb_mode): New declaration.
6724 * linux-arm-low.c: Include arch/arm-linux.h
6725 aarch/arm-get-next-pcs.h, sys/syscall.h.
6726 (get_next_pcs_ops): New struct.
6727 (get_next_pcs_addr_bits_remove): New function.
6728 (get_next_pcs_is_thumb): New function.
6729 (get_next_pcs_read_memory_unsigned_integer): Likewise.
6730 (arm_sigreturn_next_pc): Likewise.
6731 (get_next_pcs_syscall_next_pc): Likewise.
6732 (arm_gdbserver_get_next_pcs): Likewise.
6733 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
6734 Initialize.
6735 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
6736 * server.h: Include gdb_vecs.h.
6737
6738 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6739
6740 * Makefile.in (SFILES): Append common/common-regcache.c.
6741 (OBS): Append common-regcache.o.
6742 (common-regcache.o): New rule.
6743 * regcache.c (init_register_cache): Initialize cache to
6744 REG_UNAVAILABLE.
6745 (regcache_raw_read_unsigned): New function.
6746 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
6747 register_status enum.
6748
6749 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6750
6751 * linux-aarch64-low.c (the_low_targets): Rename
6752 breakpoint_reinsert_addr to get_next_pcs.
6753 * linux-arm-low.c (the_low_targets): Likewise.
6754 * linux-bfin-low.c (the_low_targets): Likewise.
6755 * linux-cris-low.c (the_low_targets): Likewise.
6756 * linux-crisv32-low.c (the_low_targets): Likewise.
6757 * linux-low.c (can_software_single_step): Likewise.
6758 (install_software_single_step_breakpoints): New function.
6759 (start_step_over): Use install_software_single_step_breakpoints.
6760 * linux-low.h: New CORE_ADDR vector.
6761 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
6762 get_next_pcs.
6763 * linux-mips-low.c (the_low_targets): Likewise.
6764 * linux-nios2-low.c (the_low_targets): Likewise.
6765 * linux-sparc-low.c (the_low_targets): Likewise.
6766
6767 2015-12-17 Pedro Alves <palves@redhat.com>
6768
6769 * linux-low.c (linux_kill_one_lwp): Remove references to
6770 LinuxThreads.
6771 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
6772 to 'kill'.
6773 (linux_init_signals): Delete.
6774 (initialize_low): Adjust.
6775 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
6776
6777 2015-12-16 Pedro Alves <palves@redhat.com>
6778
6779 * configure.ac (compiler warning flags): When testing a
6780 -Wno-foo option, check whether -Wfoo works instead.
6781 * configure: Regenerate.
6782
6783 2015-12-11 Don Breazeal <donb@codesourcery.com>
6784
6785 * server.c (process_serial_event): Don't exit from gdbserver
6786 in remote mode if there are still active inferiors.
6787
6788 2015-12-11 Yao Qi <yao.qi@linaro.org>
6789
6790 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
6791 arm_breakpoint_at if the process is 32-bit.
6792
6793 2015-12-11 Yao Qi <yao.qi@linaro.org>
6794
6795 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
6796 arm breakpoint.
6797
6798 2015-12-07 Yao Qi <yao.qi@linaro.org>
6799
6800 * configure.srv: Append arm.o to srv_tgtobj for
6801 aarch64*-*-linux* target.
6802 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
6803 from linux-arm-low.c.
6804 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6805 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6806 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6807 (thumb2_breakpoint_len): Likewise.
6808 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
6809 (arm_breakpoint_kinds): Likewise.
6810 (arm_breakpoint_kind_from_pc): Likewise.
6811 (arm_sw_breakpoint_from_kind): Likewise.
6812 (arm_breakpoint_kind_from_current_state): Likewise.
6813 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
6814 (arm_sw_breakpoint_from_kind): Declare.
6815 (arm_breakpoint_kind_from_current_state): Declare.
6816 (arm_breakpoint_at): Declare.
6817 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
6818 arm_sw_breakpoint_from_kind if process is 32-bit.
6819 (aarch64_breakpoint_kind_from_pc): New function.
6820 (aarch64_breakpoint_kind_from_current_state): New function.
6821 (the_low_target): Initialize fields breakpoint_kind_from_pc
6822 and breakpoint_kind_from_current_state.
6823 * linux-arm-low.c (arm_breakpoint_kinds): Move to
6824 linux-aarch32-low.c.
6825 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
6826 (arm_breakpoint, arm_breakpoint_len): Likewise.
6827 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
6828 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6829 (arm_is_thumb_mode): Likewise.
6830 (arm_breakpoint_at): Likewise.
6831 (arm_breakpoint_kind_from_pc): Likewise.
6832 (arm_sw_breakpoint_from_kind): Likewise.
6833 (arm_breakpoint_kind_from_current_state): Likewise.
6834
6835 Revert:
6836 2015-08-04 Yao Qi <yao.qi@linaro.org>
6837
6838 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6839 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6840 * server.c (extended_protocol): Remove "static".
6841 * server.h (extended_protocol): Declare it.
6842
6843 2015-12-04 Josh Stone <jistone@redhat.com>
6844
6845 * target.h (struct target_ops) <arch_setup>: Rename to ...
6846 (struct target_ops) <post_create_inferior>: ... this.
6847 (target_arch_setup): Rename to ...
6848 (target_post_create_inferior): ... this, calling post_create_inferior.
6849 * server.c (start_inferior): Update target_arch_setup calls to
6850 target_post_create_inferior.
6851 * linux-low.c (linux_low_ptrace_options): Forward declare.
6852 (linux_arch_setup): Update its comment for general use.
6853 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
6854 (struct linux_target_ops): Use linux_post_create_inferior.
6855 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
6856 to post_create_inferior.
6857 * nto-low.c (struct nto_target_ops): Likewise.
6858 * spu-low.c (struct spu_target_ops): Likewise.
6859 * win32-low.c (struct win32_target_ops): Likewise.
6860
6861 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
6862
6863 * linux-arm-low.c: Remove duplicate arch/arm.h include.
6864
6865 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6866
6867 * linux-arm-low.c (arm_reinsert_addr): Remove function.
6868 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
6869 * linux-cris-low.c (cris_reinsert_addr> Remove function.
6870 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6871 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
6872 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6873 * linux-mips-low.c (mips_reinsert_addr): Remove function.
6874 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6875 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
6876 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6877 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
6878 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6879
6880 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6881
6882 * linux-low.c (linux_look_up_symbols): Don't call
6883 linux_supports_traceclone.
6884 * linux-low.h (thread_db_init): Remove use_events argument.
6885 * thread-db.c (thread_db_use_event): Remove global variable.
6886 (struct thread_db) <td_thr_event_enable_p>: Remove field.
6887 (struct thread_db) <td_create_bp>: Remove field.
6888 (thread_db_create_event): Remove function.
6889 (thread_db_enable_reporting): Likewise.
6890 (find_one_thread): Don't check for thread_db_use_events.
6891 (attach_thread): Likewise.
6892 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
6893 (try_thread_db_load_1): Don't check for thread_db_use_events.
6894 (thread_db_init): Remove use_events argument and thread events
6895 handling.
6896 (remove_thread_event_breakpoints): Remove function.
6897 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
6898
6899 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6900
6901 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
6902 New function.
6903 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6904 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
6905 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6906 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
6907 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
6908 Initialize.
6909 * linux-crisv32-low.c (cris_supports_hardware_single_step):
6910 New function.
6911 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6912 * linux-low.c (can_hardware_single_step): Use
6913 supports_hardware_single_step.
6914 (can_software_single_step): New function.
6915 (start_step_over): Call can_software_single_step.
6916 (linux_supports_hardware_single_step): New function.
6917 (struct target_ops) <supports_software_single_step>: Initialize.
6918 * linux-low.h (struct linux_target_ops)
6919 <supports_hardware_single_step>: Initialize.
6920 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
6921 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6922 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
6923 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
6924 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
6925 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6926 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
6927 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6928 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
6929 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
6930 Initialize.
6931 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
6932 (struct linux_target_ops) <tile_supports_hardware_single_step>:
6933 Initialize.
6934 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
6935 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6936 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
6937 New function.
6938 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6939 * target.h (struct target_ops): <supports_software_single_step>:
6940 New field.
6941 (target_supports_software_single_step): New macro.
6942
6943 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6944
6945 * linux-low.c (linux_wait_1): Fix pc advance condition.
6946 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
6947 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
6948
6949 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6950
6951 * linux-arm-low.c (arm_is_thumb_mode): New function.
6952 (arm_breakpoint_at): Use arm_is_thumb_mode.
6953 (arm_breakpoint_kind_from_current_state): New function.
6954 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
6955 Initialize.
6956 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
6957 (linux_breakpoint_kind_from_current_state): New function.
6958 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
6959 * linux-low.h (struct linux_target_ops)
6960 <breakpoint_kind_from_current_state>: New field.
6961 * target.h (struct target_ops): Likewise.
6962 (target_breakpoint_kind_from_current_state): New macro.
6963
6964 2015-11-30 Pedro Alves <palves@redhat.com>
6965
6966 * linux-low.c (linux_resume): Wake up the event loop before
6967 returning.
6968
6969 2015-11-30 Pedro Alves <palves@redhat.com>
6970
6971 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
6972 check.
6973 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
6974 to -1.
6975 * target.c (struct thread_search): New structure.
6976 (thread_search_callback): New function.
6977 (prev_general_thread): New global.
6978 (prepare_to_access_memory, done_accessing_memory): New functions.
6979 * target.h (prepare_to_access_memory, done_accessing_memory):
6980 Replace macros with function declarations.
6981
6982 2015-11-30 Pedro Alves <palves@redhat.com>
6983
6984 PR 14618
6985 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
6986 report TARGET_WAITKIND_NO_RESUMED.
6987 * remote-utils.c (prepare_resume_reply): Handle
6988 TARGET_WAITKIND_NO_RESUMED.
6989 * server.c (report_no_resumed): New global.
6990 (handle_query) <qSupported>: Handle "no-resumed+". Report
6991 "no-resumed+" support.
6992 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
6993 return error if the client doesn't support no-resumed events.
6994 (push_stop_notification): New function.
6995 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
6996 events if the client supports them.
6997
6998 2015-11-30 Pedro Alves <palves@redhat.com>
6999
7000 * linux-low.c (thread_still_has_status_pending_p): Don't check
7001 vCont;t here.
7002 (lwp_resumed): New function.
7003 (status_pending_p_callback): Return early if the LWP is not
7004 supposed to be resumed.
7005
7006 2015-11-30 Pedro Alves <palves@redhat.com>
7007
7008 * linux-low.c (handle_extended_wait): Assert that the LWP's
7009 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
7010 thread create events, leave the new child's status pending.
7011 (linux_low_filter_event): If GDB wants to hear about thread exit
7012 events, leave the LWP marked dead and don't delete it.
7013 (linux_wait_for_event_filtered): Don't check for thread exit.
7014 (filter_exit_event): New function.
7015 (linux_wait_1): Use it, when returning an exit event.
7016 (linux_resume_one_lwp_throw): Assert that the LWP's
7017 waitstatus is TARGET_WAITKIND_IGNORE.
7018 * remote-utils.c (prepare_resume_reply): Handle
7019 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
7020 * server.c (report_thread_events): New global.
7021 (handle_general_set): Handle QThreadEvents.
7022 (handle_query) <qSupported>: Handle and report QThreadEvents+;
7023 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
7024 TARGET_WAITKIND_THREAD_EXITED.
7025 * server.h (report_thread_events): Declare.
7026
7027 2015-11-30 Pedro Alves <palves@redhat.com>
7028
7029 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
7030 the thread's last_resume_kind was resume_stop.
7031
7032 2015-11-30 Pedro Alves <palves@redhat.com>
7033
7034 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
7035 before returning.
7036
7037 2015-11-30 Pedro Alves <palves@redhat.com>
7038
7039 * server.c (handle_v_requests): Handle vCtrlC.
7040
7041 2015-11-30 Pedro Alves <palves@redhat.com>
7042
7043 * gdbthread.h (find_any_thread_of_pid): Declare.
7044 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
7045 functions.
7046 * server.c (handle_query): If current_thread is NULL, look for
7047 another thread of the selected process.
7048
7049 2015-11-26 Daniel Colascione <dancol@dancol.org>
7050 Simon Marchi <simon.marchi@ericsson.com>
7051
7052 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
7053 * server.c (handle_qxfer_threads_worker): Refactor to include thread
7054 name in reply.
7055 * target.h (struct target_ops) <thread_name>: New field.
7056 (target_thread_name): New macro.
7057
7058 2015-11-23 Joel Brobecker <brobecker@adacore.com>
7059
7060 * regcache.h (regcache_invalidate_pid): Add declaration.
7061 * regcache.c (regcache_invalidate_pid): New function, extracted
7062 from regcache_invalidate.
7063 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
7064 Add trivial documentation comment.
7065 * lynx-low.c: Use regcache_invalidate_pid instead of
7066 regcache_invalidate.
7067
7068 2015-11-23 Joel Brobecker <brobecker@adacore.com>
7069
7070 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
7071 and Elf64_auxv_t if the target is Android.
7072
7073 2015-11-22 Doug Evans <xdje42@gmail.com>
7074
7075 * target.h: #include <sys/types.h>.
7076
7077 2015-11-19 Pedro Alves <palves@redhat.com>
7078
7079 * linux-low.c (linux_process_qsupported): Change prototype.
7080 Adjust.
7081 * linux-low.h (struct linux_target_ops) <process_qsupported>:
7082 Change prototype.
7083 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
7084 and adjust to loop over all features.
7085 * server.c (handle_query) <qSupported>: Adjust to call
7086 target_process_qsupported once, passing it a vector of unprocessed
7087 features.
7088 * target.h (struct target_ops) <process_qsupported>: Change
7089 prototype.
7090 (target_process_qsupported): Adjust.
7091
7092 2015-11-19 Pedro Alves <palves@redhat.com>
7093
7094 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
7095 mode.
7096 * configure: Regenerate.
7097
7098 2015-11-19 Pedro Alves <palves@redhat.com>
7099
7100 * configure: Regenerate.
7101
7102 2015-11-19 Yao Qi <yao.qi@linaro.org>
7103
7104 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
7105 type to uint32_t.
7106
7107 2015-11-19 Yao Qi <yao.qi@linaro.org>
7108
7109 * linux-aarch64-low.c (enum aarch64_operand_type): New.
7110 (struct aarch64_operand): Move enum out.
7111
7112 2015-11-19 Yao Qi <yao.qi@linaro.org>
7113
7114 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
7115 struct user_fpsimd_state *.
7116 (aarch64_store_fpregset): Likewise.
7117
7118 2015-11-19 Yao Qi <yao.qi@linaro.org>
7119
7120 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
7121 struct user_pt_regs *.
7122 (aarch64_store_gregset): Likewise.
7123
7124 2015-11-18 Pedro Alves <palves@redhat.com>
7125
7126 * Makefile.in (all_object_files): Add $IPA_OBJS.
7127
7128 2015-11-17 Pedro Alves <palves@redhat.com>
7129
7130 * win32-low.c (win32_resume): Use gdb_signal_from_host,
7131 GDB_SIGNAL_0 and gdb_signal_to_string.
7132
7133 2015-11-17 Pedro Alves <palves@redhat.com>
7134
7135 * win32-low.c (handle_output_debug_string): Remove parameter.
7136 (win32_kill): Remove our_status local and adjust call to
7137 handle_output_debug_string.
7138 (get_child_debug_event): Adjust call to
7139 handle_output_debug_string.
7140
7141 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7142
7143 * linux-mips-low.c (mips_fill_gregset): Add cast.
7144 (mips_store_gregset): Likewise.
7145 (mips_fill_fpregset): Likewise.
7146 (mips_store_fpregset): Likewise.
7147
7148 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7149
7150 * linux-mips-low.c (mips_add_watchpoint): Rename private to
7151 priv.
7152
7153 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7154
7155 * linux-mips-low.c (mips_linux_new_thread): Change type of
7156 watch_type to enum target_hw_bp_type.
7157
7158 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7159
7160 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
7161 Change return type to arm_hwbp_type.
7162
7163 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7164
7165 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
7166 (arm_store_gregset): Likewise.
7167 * linux-arm-low.c (arm_get_hwcap): Likewise.
7168 (arm_read_description): Likewise.
7169
7170 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7171
7172 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
7173
7174 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7175
7176 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
7177 (ppc_fill_vsxregset): Likewise.
7178 (ppc_store_vsxregset): Likewise.
7179 (ppc_fill_vrregset): Likewise.
7180 (ppc_store_vrregset): Likewise.
7181 (ppc_fill_evrregset): Likewise.
7182 (ppc_store_evrregset): Likewise.
7183
7184 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7185
7186 * linux-ppc-low.c (ppc_usrregs_info): Remove
7187 forward-declaration.
7188 (ppc_arch_setup): Move lower in file.
7189
7190 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
7191
7192 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
7193 (ps_pdwrite): Likewise.
7194
7195 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
7196
7197 * linux-arm-low.c (arm_new_thread): Move pointer dereference
7198 to after assert checks.
7199
7200 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
7201
7202 * proc-service.c (ps_pdread): Add/adjust casts.
7203 (ps_pdwrite): Add/adjust casts.
7204
7205 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
7206
7207 * server.c (handle_search_memory_1): Cast return value of
7208 memmem.
7209
7210 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
7211
7212 * server.c (write_qxfer_response): Change type of data to
7213 gdb_byte *.
7214
7215 2015-10-29 Pedro Alves <palves@redhat.com>
7216
7217 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
7218
7219 2015-10-29 Pedro Alves <palves@redhat.com>
7220
7221 * tracepoint.c (clear_installed_tracepoints): Add casts.
7222
7223 2015-10-29 Pedro Alves <palves@redhat.com>
7224
7225 * server.c (handle_v_cont, process_serial_event): Add enum
7226 gdb_signal casts to signal parsing code.
7227
7228 2015-10-29 Pedro Alves <palves@redhat.com>
7229
7230 * linux-low.h (NULL_REGSET): Define.
7231 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
7232 * linux-arm-low.c (arm_regsets): Likewise.
7233 * linux-crisv32-low.c (cris_regsets): Likewise.
7234 * linux-m68k-low.c (m68k_regsets): Likewise.
7235 * linux-mips-low.c (mips_regsets): Likewise.
7236 * linux-nios2-low.c (nios2_regsets): Likewise.
7237 * linux-ppc-low.c (ppc_regsets): Likewise.
7238 * linux-s390-low.c (s390_regsets): Likewise.
7239 * linux-sh-low.c (sh_regsets): Likewise.
7240 * linux-sparc-low.c (sparc_regsets): Likewise.
7241 * linux-tic6x-low.c (tic6x_regsets): Likewise.
7242 * linux-tile-low.c (tile_regsets): Likewise.
7243 * linux-x86-low.c (x86_regsets): Likewise.
7244 * linux-xtensa-low.c (xtensa_regsets): Likewise.
7245
7246 2015-10-29 Pedro Alves <palves@redhat.com>
7247
7248 * linux-low.h (NULL_REGSET): Define.
7249 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
7250 * linux-arm-low.c (arm_regsets): Likewise.
7251 * linux-crisv32-low.c (cris_regsets): Likewise.
7252 * linux-m68k-low.c (m68k_regsets): Likewise.
7253 * linux-mips-low.c (mips_regsets): Likewise.
7254 * linux-nios2-low.c (nios2_regsets): Likewise.
7255 * linux-ppc-low.c (ppc_regsets): Likewise.
7256 * linux-s390-low.c (s390_regsets): Likewise.
7257 * linux-sh-low.c (sh_regsets): Likewise.
7258 * linux-sparc-low.c (sparc_regsets): Likewise.
7259 * linux-tic6x-low.c (tic6x_regsets): Likewise.
7260 * linux-tile-low.c (tile_regsets): Likewise.
7261 * linux-x86-low.c (x86_regsets): Likewise.
7262 * linux-xtensa-low.c (xtensa_regsets): Likewise.
7263
7264 2015-10-26 Doug Evans <dje@google.com>
7265
7266 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
7267
7268 2015-10-26 Doug Evans <dje@google.com>
7269
7270 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
7271
7272 2015-10-26 Doug Evans <dje@google.com>
7273
7274 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
7275 for debug_printf.
7276 (attach_thread, find_new_threads_callback): Ditto.
7277
7278 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
7279
7280 * mem-break.h (set_breakpoint_data): Remove.
7281
7282 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
7283
7284 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
7285 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
7286 (initialize_low): Remove set_breakpoint_data call.
7287 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
7288 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
7289 (initialize_low): Remove set_breakpoint_data call.
7290 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
7291 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
7292 (initialize_low): Remove set_breakpoint_data call.
7293
7294 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
7295
7296 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
7297 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
7298 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
7299 * target.h (target_breakpoint_kind_from_pc): New macro.
7300
7301 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
7302
7303 * linux-low.c (default_breakpoint_kind_from_pc): New function.
7304 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
7305 the default breakpoint kind.
7306
7307 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7308
7309 * linux-arm-low.c (arm_supports_z_point_type): Add software
7310 breakpoint support.
7311
7312 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7313
7314 * linux-arm-low.c: Refactor breakpoint definitions.
7315 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
7316 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
7317
7318 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7319
7320 * Makefile.in: Add arm.c/o.
7321 * configure.srv: Likewise.
7322 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
7323 (arm_breakpoint_kind_from_pc): New function.
7324 (arm_sw_breakpoint_from_kind): Return proper kind.
7325 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
7326
7327 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7328
7329 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
7330 removal.
7331 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
7332 (struct raw_breakpoint) <size>: Remove.
7333 (struct raw_breakpoint) <kind>: Add.
7334 (bp_size): New function.
7335 (bp_opcode): Likewise.
7336 (find_raw_breakpoint_at): Adjust for kind.
7337 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
7338 (remove_memory_breakpoint): Adjust for kind call bp_size.
7339 (set_raw_breakpoint_at): Adjust for kind.
7340 (set_breakpoint): Likewise.
7341 (set_breakpoint_at): Call breakpoint_kind_from_pc.
7342 (delete_raw_breakpoint): Adjust for kind.
7343 (delete_breakpoint): Likewise.
7344 (find_gdb_breakpoint): Likewise.
7345 (set_gdb_breakpoint_1): Likewise.
7346 (set_gdb_breakpoint): Likewise.
7347 (delete_gdb_breakpoint_1): Likewise.
7348 (delete_gdb_breakpoint): Likewise.
7349 (uninsert_raw_breakpoint): Likewise.
7350 (reinsert_raw_breakpoint): Likewise.
7351 (set_breakpoint_data): Remove.
7352 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
7353 (check_mem_read): Adjust for kind call bp_size.
7354 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
7355 (clone_one_breakpoint): Adjust for kind.
7356 * mem-break.h (set_gdb_breakpoint): Likewise.
7357 (delete_gdb_breakpoint): Likewise.
7358 * server.c (process_serial_event): Likewise.
7359
7360 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7361
7362 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
7363 (struct linux_target_ops) <breakpoint>: Remove.
7364 (struct linux_target_ops) <breakpoint_len>: Remove.
7365 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7366 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7367 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
7368 (arm_sw_breakpoint_from_kind): New function.
7369 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
7370 (struct linux_target_ops) <breakpoint>: Remove.
7371 (struct linux_target_ops) <breakpoint_len>: Remove.
7372 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7373 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7374 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
7375 (struct linux_target_ops) <breakpoint>: Remove.
7376 (struct linux_target_ops) <breakpoint_len>: Remove.
7377 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7378 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7379 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
7380 (struct linux_target_ops) <breakpoint>: Remove.
7381 (struct linux_target_ops) <breakpoint_len>: Remove.
7382 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7383 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7384 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
7385 and sw_breakpoint_from_kind to increment the pc.
7386 (linux_breakpoint_kind_from_pc): New function.
7387 (linux_sw_breakpoint_from_kind): New function.
7388 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
7389 (initialize_low): Call breakpoint_kind_from_pc and
7390 sw_breakpoint_from_kind to replace breakpoint_data/len.
7391 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
7392 New field.
7393 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
7394 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
7395 (struct linux_target_ops) <breakpoint>: Remove.
7396 (struct linux_target_ops) <breakpoint_len>: Remove.
7397 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7398 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7399 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
7400 (struct linux_target_ops) <breakpoint>: Remove.
7401 (struct linux_target_ops) <breakpoint_len>: Remove.
7402 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7403 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7404 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
7405 (struct linux_target_ops) <breakpoint>: Remove.
7406 (struct linux_target_ops) <breakpoint_len>: Remove.
7407 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7408 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7409 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
7410 (struct linux_target_ops) <breakpoint>: Remove.
7411 (struct linux_target_ops) <breakpoint_len>: Remove.
7412 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7413 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7414 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
7415 (struct linux_target_ops) <breakpoint>: Remove.
7416 (struct linux_target_ops) <breakpoint_len>: Remove.
7417 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7418 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7419 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
7420 (struct linux_target_ops) <breakpoint>: Remove.
7421 (struct linux_target_ops) <breakpoint_len>: Remove.
7422 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7423 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7424 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
7425 (struct linux_target_ops) <breakpoint>: Remove.
7426 (struct linux_target_ops) <breakpoint_len>: Remove.
7427 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7428 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7429 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
7430 (struct linux_target_ops) <breakpoint>: Remove.
7431 (struct linux_target_ops) <breakpoint_len>: Remove.
7432 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7433 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7434 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
7435 (struct linux_target_ops) <breakpoint>: Remove.
7436 (struct linux_target_ops) <breakpoint_len>: Remove.
7437 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7438 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7439 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
7440 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
7441 (struct linux_target_ops) <breakpoint>: Remove.
7442 (struct linux_target_ops) <breakpoint_len>: Remove.
7443 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7444 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7445 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
7446 (struct linux_target_ops) <breakpoint>: Remove.
7447 (struct linux_target_ops) <breakpoint_len>: Remove.
7448 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7449 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7450
7451 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7452
7453 * linux-cris-low.c (cris_get_pc): Remove void arg.
7454
7455 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
7456
7457 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
7458 variable name.
7459
7460 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
7461
7462 * inferiors.c (thread_pid_matches_callback): New function.
7463 (find_thread_process): New function.
7464 (remove_thread): Reset current_thread.
7465 (remove_process): Assert threads have been removed first.
7466
7467 2015-10-15 Yao Qi <yao.qi@linaro.org>
7468
7469 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
7470 if it is 3.
7471 (aarch64_remove_point): Likewise.
7472 * regcache.c (regcache_register_size): New function.
7473
7474 2015-10-12 Yao Qi <yao.qi@linaro.org>
7475
7476 * linux-aarch64-low.c: Update all callers as emit_load_store
7477 is renamed to aarch64_emit_load_store.
7478
7479 2015-10-12 Yao Qi <yao.qi@linaro.org>
7480
7481 * linux-aarch64-low.c: Update all callers of function renaming
7482 from emit_insn to aarch64_emit_insn.
7483
7484 2015-10-12 Yao Qi <yao.qi@linaro.org>
7485
7486 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
7487 arch/aarch64-insn.h.
7488 (struct aarch64_memory_operand): Likewise.
7489 (ENCODE): Likewise.
7490 (emit_insn): Move to arch/aarch64-insn.c.
7491 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
7492 (emit_load_store): Move to arch/aarch64-insn.c.
7493 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
7494 (can_encode_int32): Remove.
7495
7496 2015-10-12 Yao Qi <yao.qi@linaro.org>
7497
7498 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
7499 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
7500 (aarch64_relocate_instruction): Likewise.
7501 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
7502 (struct aarch64_insn_visitor): Likewise.
7503
7504 2015-10-12 Yao Qi <yao.qi@linaro.org>
7505
7506 * linux-aarch64-low.c (struct aarch64_insn_data): New.
7507 (struct aarch64_insn_visitor): New.
7508 (struct aarch64_insn_relocation_data): New.
7509 (aarch64_ftrace_insn_reloc_b): New function.
7510 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
7511 (aarch64_ftrace_insn_reloc_cb): Likewise.
7512 (aarch64_ftrace_insn_reloc_tb): Likewise.
7513 (aarch64_ftrace_insn_reloc_adr): Likewise.
7514 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
7515 (aarch64_ftrace_insn_reloc_others): Likewise.
7516 (visitor): New.
7517 (aarch64_relocate_instruction): Use visitor.
7518
7519 2015-10-12 Yao Qi <yao.qi@linaro.org>
7520
7521 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
7522 int. Add argument buf.
7523 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
7524 aarch64_relocate_instruction.
7525
7526 2015-10-12 Yao Qi <yao.qi@linaro.org>
7527
7528 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
7529 argument insn. Remove local variable insn. Don't call
7530 target_read_uint32.
7531 (aarch64_install_fast_tracepoint_jump_pad): Call
7532 target_read_uint32.
7533
7534 2015-09-30 Yao Qi <yao.qi@linaro.org>
7535
7536 * linux-aarch64-low.c (emit_movk): Shorten a long line.
7537 (emit_load_store_pair): Likewise.
7538
7539 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
7540
7541 * dll.c (match_dll): Add cast(s).
7542 (unloaded_dll): Likewise.
7543 * linux-low.c (second_thread_of_pid_p): Likewise.
7544 (delete_lwp_callback): Likewise.
7545 (count_events_callback): Likewise.
7546 (select_event_lwp_callback): Likewise.
7547 (linux_set_resume_request): Likewise.
7548 * server.c (accumulate_file_name_length): Likewise.
7549 (emit_dll_description): Likewise.
7550 (handle_qxfer_threads_worker): Likewise.
7551 (visit_actioned_threads): Likewise.
7552 * thread-db.c (any_thread_of): Likewise.
7553 * tracepoint.c (same_process_p): Likewise.
7554 (match_blocktype): Likewise.
7555 (build_traceframe_info_xml): Likewise.
7556
7557 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
7558
7559 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
7560 assignment.
7561 (gdb_unparse_agent_expr): Likewise.
7562 * hostio.c (require_data): Likewise.
7563 (handle_pread): Likewise.
7564 * linux-low.c (disable_regset): Likewise.
7565 (fetch_register): Likewise.
7566 (store_register): Likewise.
7567 (get_dynamic): Likewise.
7568 (linux_qxfer_libraries_svr4): Likewise.
7569 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
7570 (set_fast_tracepoint_jump): Likewise.
7571 (uninsert_fast_tracepoint_jumps_at): Likewise.
7572 (reinsert_fast_tracepoint_jumps_at): Likewise.
7573 (validate_inserted_breakpoint): Likewise.
7574 (clone_agent_expr): Likewise.
7575 * regcache.c (init_register_cache): Likewise.
7576 * remote-utils.c (putpkt_binary_1): Likewise.
7577 (decode_M_packet): Likewise.
7578 (decode_X_packet): Likewise.
7579 (look_up_one_symbol): Likewise.
7580 (relocate_instruction): Likewise.
7581 (monitor_output): Likewise.
7582 * server.c (handle_search_memory): Likewise.
7583 (handle_qxfer_exec_file): Likewise.
7584 (handle_qxfer_libraries): Likewise.
7585 (handle_qxfer): Likewise.
7586 (handle_query): Likewise.
7587 (handle_v_cont): Likewise.
7588 (handle_v_run): Likewise.
7589 (captured_main): Likewise.
7590 * target.c (write_inferior_memory): Likewise.
7591 * thread-db.c (try_thread_db_load_from_dir): Likewise.
7592 * tracepoint.c (init_trace_buffer): Likewise.
7593 (add_tracepoint_action): Likewise.
7594 (add_traceframe): Likewise.
7595 (add_traceframe_block): Likewise.
7596 (cmd_qtdpsrc): Likewise.
7597 (cmd_qtdv): Likewise.
7598 (cmd_qtstatus): Likewise.
7599 (response_source): Likewise.
7600 (response_tsv): Likewise.
7601 (cmd_qtnotes): Likewise.
7602 (gdb_collect): Likewise.
7603 (initialize_tracepoint): Likewise.
7604
7605 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7606
7607 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
7608 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
7609 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
7610 <NOP>: New.
7611 (enum aarch64_condition_codes): New enum.
7612 (w0): New static global.
7613 (fp): Likewise.
7614 (lr): Likewise.
7615 (struct aarch64_memory_operand) <type>: New
7616 MEMORY_OPERAND_POSTINDEX type.
7617 (postindex_memory_operand): New helper function.
7618 (emit_ret): New function.
7619 (emit_load_store_pair): New function, factored out of emit_stp
7620 with support for MEMORY_OPERAND_POSTINDEX.
7621 (emit_stp): Rewrite using emit_load_store_pair.
7622 (emit_ldp): New function.
7623 (emit_load_store): Likewise.
7624 (emit_ldr): Mention post-index instruction in comment.
7625 (emit_ldrh): New function.
7626 (emit_ldrb): New function.
7627 (emit_ldrsw): Mention post-index instruction in comment.
7628 (emit_str): Likewise.
7629 (emit_subs): New function.
7630 (emit_cmp): Likewise.
7631 (emit_and): Likewise.
7632 (emit_orr): Likewise.
7633 (emit_orn): Likewise.
7634 (emit_eor): Likewise.
7635 (emit_mvn): Likewise.
7636 (emit_lslv): Likewise.
7637 (emit_lsrv): Likewise.
7638 (emit_asrv): Likewise.
7639 (emit_mul): Likewise.
7640 (emit_sbfm): Likewise.
7641 (emit_sbfx): Likewise.
7642 (emit_ubfm): Likewise.
7643 (emit_ubfx): Likewise.
7644 (emit_csinc): Likewise.
7645 (emit_cset): Likewise.
7646 (emit_nop): Likewise.
7647 (emit_ops_insns): New helper function.
7648 (emit_pop): Likewise.
7649 (emit_push): Likewise.
7650 (aarch64_emit_prologue): New function.
7651 (aarch64_emit_epilogue): Likewise.
7652 (aarch64_emit_add): Likewise.
7653 (aarch64_emit_sub): Likewise.
7654 (aarch64_emit_mul): Likewise.
7655 (aarch64_emit_lsh): Likewise.
7656 (aarch64_emit_rsh_signed): Likewise.
7657 (aarch64_emit_rsh_unsigned): Likewise.
7658 (aarch64_emit_ext): Likewise.
7659 (aarch64_emit_log_not): Likewise.
7660 (aarch64_emit_bit_and): Likewise.
7661 (aarch64_emit_bit_or): Likewise.
7662 (aarch64_emit_bit_xor): Likewise.
7663 (aarch64_emit_bit_not): Likewise.
7664 (aarch64_emit_equal): Likewise.
7665 (aarch64_emit_less_signed): Likewise.
7666 (aarch64_emit_less_unsigned): Likewise.
7667 (aarch64_emit_ref): Likewise.
7668 (aarch64_emit_if_goto): Likewise.
7669 (aarch64_emit_goto): Likewise.
7670 (aarch64_write_goto_address): Likewise.
7671 (aarch64_emit_const): Likewise.
7672 (aarch64_emit_call): Likewise.
7673 (aarch64_emit_reg): Likewise.
7674 (aarch64_emit_pop): Likewise.
7675 (aarch64_emit_stack_flush): Likewise.
7676 (aarch64_emit_zero_ext): Likewise.
7677 (aarch64_emit_swap): Likewise.
7678 (aarch64_emit_stack_adjust): Likewise.
7679 (aarch64_emit_int_call_1): Likewise.
7680 (aarch64_emit_void_call_2): Likewise.
7681 (aarch64_emit_eq_goto): Likewise.
7682 (aarch64_emit_ne_goto): Likewise.
7683 (aarch64_emit_lt_goto): Likewise.
7684 (aarch64_emit_le_goto): Likewise.
7685 (aarch64_emit_gt_goto): Likewise.
7686 (aarch64_emit_ge_got): Likewise.
7687 (aarch64_emit_ops_impl): New static global variable.
7688 (aarch64_emit_ops): New target function, return
7689 &aarch64_emit_ops_impl.
7690 (struct linux_target_ops): Install it.
7691
7692 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7693
7694 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
7695 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
7696 aarch64-ipa.o.
7697 * linux-aarch64-ipa.c: New file.
7698 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
7699 and endian.h.
7700 (aarch64_get_thread_area): New target method.
7701 (extract_signed_bitfield): New helper function.
7702 (aarch64_decode_ldr_literal): New function.
7703 (enum aarch64_opcodes): New enum.
7704 (struct aarch64_register): New struct.
7705 (struct aarch64_operand): New struct.
7706 (x0): New static global.
7707 (x1): Likewise.
7708 (x2): Likewise.
7709 (x3): Likewise.
7710 (x4): Likewise.
7711 (w2): Likewise.
7712 (ip0): Likewise.
7713 (sp): Likewise.
7714 (xzr): Likewise.
7715 (aarch64_register): New helper function.
7716 (register_operand): Likewise.
7717 (immediate_operand): Likewise.
7718 (struct aarch64_memory_operand): New struct.
7719 (offset_memory_operand): New helper function.
7720 (preindex_memory_operand): Likewise.
7721 (enum aarch64_system_control_registers): New enum.
7722 (ENCODE): New macro.
7723 (emit_insn): New helper function.
7724 (emit_b): New function.
7725 (emit_bcond): Likewise.
7726 (emit_cb): Likewise.
7727 (emit_tb): Likewise.
7728 (emit_blr): Likewise.
7729 (emit_stp): Likewise.
7730 (emit_ldp_q_offset): Likewise.
7731 (emit_stp_q_offset): Likewise.
7732 (emit_load_store): Likewise.
7733 (emit_ldr): Likewise.
7734 (emit_ldrsw): Likewise.
7735 (emit_str): Likewise.
7736 (emit_ldaxr): Likewise.
7737 (emit_stxr): Likewise.
7738 (emit_stlr): Likewise.
7739 (emit_data_processing_reg): Likewise.
7740 (emit_data_processing): Likewise.
7741 (emit_add): Likewise.
7742 (emit_sub): Likewise.
7743 (emit_mov): Likewise.
7744 (emit_movk): Likewise.
7745 (emit_mov_addr): Likewise.
7746 (emit_mrs): Likewise.
7747 (emit_msr): Likewise.
7748 (emit_sevl): Likewise.
7749 (emit_wfe): Likewise.
7750 (append_insns): Likewise.
7751 (can_encode_int32_in): New helper function.
7752 (aarch64_relocate_instruction): New function.
7753 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
7754 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
7755 (struct linux_target_ops): Install aarch64_get_thread_area,
7756 aarch64_install_fast_tracepoint_jump_pad and
7757 aarch64_get_min_fast_tracepoint_insn_len.
7758
7759 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7760
7761 * Makefile.in (aarch64-insn.o): New rule.
7762 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
7763
7764 2015-09-21 Yao Qi <yao.qi@linaro.org>
7765
7766 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
7767
7768 2015-09-21 Yao Qi <yao.qi@linaro.org>
7769
7770 * tracepoint.c (max_jump_pad_size): Remove.
7771
7772 2015-09-18 Yao Qi <yao.qi@linaro.org>
7773
7774 * linux-aarch64-low.c: Don't include sys/uio.h.
7775 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
7776
7777 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
7778
7779 * tracepoint.c (eval_result_type): Change prototype.
7780 (condition_true_at_tracepoint): Fix argument to compiled_cond.
7781
7782 2015-09-15 Pedro Alves <palves@redhat.com>
7783
7784 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
7785 Check whether to report exec events instead of checking whether
7786 multiprocess is enabled.
7787
7788 2015-09-15 Pedro Alves <palves@redhat.com>
7789
7790 PR remote/18965
7791 * remote-utils.c (prepare_resume_reply): Merge
7792 TARGET_WAITKIND_VFORK_DONE switch case with the
7793 TARGET_WAITKIND_FORKED case.
7794
7795 2015-09-15 Yao Qi <yao.qi@linaro.org>
7796
7797 * server.c (handle_query): Check string comparison using
7798 "else if" instead of "if".
7799
7800 2015-09-15 Yao Qi <yao.qi@linaro.org>
7801
7802 * server.c (vCont_supported): New global variable.
7803 (handle_query): Set vCont_supported to 1 if "vContSupported+"
7804 matches. Append ";vContSupported+" to own_buf.
7805 (handle_v_requests): Append ";s;S" to own_buf if target supports
7806 hardware single step or vCont_supported is false.
7807 (capture_main): Set vCont_supported to zero.
7808
7809 2015-09-15 Yao Qi <yao.qi@linaro.org>
7810
7811 * linux-low.c (linux_supports_conditional_breakpoints): Rename
7812 it to ...
7813 (linux_supports_hardware_single_step): ... New function.
7814 (linux_target_ops): Update.
7815 * lynx-low.c (lynx_target_ops): Set field
7816 supports_hardware_single_step to target_can_do_hardware_single_step.
7817 * nto-low.c (nto_target_ops): Likewise.
7818 * spu-low.c (spu_target_ops): Likewise.
7819 * win32-low.c (win32_target_ops): Likewise.
7820 * target.c (target_can_do_hardware_single_step): New function.
7821 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7822 Remove. <supports_hardware_single_step>: New field.
7823 (target_supports_conditional_breakpoints): Remove.
7824 (target_supports_hardware_single_step): New macro.
7825 (target_can_do_hardware_single_step): Declare.
7826 * server.c (handle_query): Use target_supports_hardware_single_step
7827 instead of target_supports_conditional_breakpoints.
7828
7829 2015-09-15 Yao Qi <yao.qi@linaro.org>
7830
7831 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
7832 function.
7833 (struct linux_target_ops the_low_target): Install
7834 aarch64_linux_siginfo_fixup.
7835
7836 2015-09-11 Don Breazeal <donb@codesourcery.com>
7837 Luis Machado <lgustavo@codesourcery.com>
7838
7839 * linux-low.c (linux_mourn): Static declaration.
7840 (linux_arch_setup): Move in front of
7841 handle_extended_wait.
7842 (linux_arch_setup_thread): New function.
7843 (handle_extended_wait): Handle exec events. Call
7844 linux_arch_setup_thread. Make event_lwp argument a
7845 pointer-to-a-pointer.
7846 (check_zombie_leaders): Do not check stopped threads.
7847 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
7848 (linux_low_filter_event): Add lwp and thread for exec'ing
7849 non-leader thread if leader thread has been deleted.
7850 Refactor code into linux_arch_setup_thread and call it.
7851 Pass child lwp pointer by reference to handle_extended_wait.
7852 (linux_wait_for_event_filtered): Update comment.
7853 (linux_wait_1): Prevent clobbering exec event status.
7854 (linux_supports_exec_events): New function.
7855 (linux_target_ops) <supports_exec_events>: Initialize new member.
7856 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
7857 new member.
7858 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
7859 * server.c (report_exec_events): New global variable.
7860 (handle_query): Handle qSupported query for exec-events feature.
7861 (captured_main): Initialize report_exec_events.
7862 * server.h (report_exec_events): Declare new global variable.
7863 * target.h (struct target_ops) <supports_exec_events>: New
7864 member.
7865 (target_supports_exec_events): New macro.
7866 * win32-low.c (win32_target_ops) <supports_exec_events>:
7867 Initialize new member.
7868
7869 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
7870
7871 * linux-low.c (linux_low_enable_btrace): Remove.
7872 (linux_target_ops): Replace linux_low_enable_btrace with
7873 linux_enable_btrace.
7874
7875 2015-09-03 Yao Qi <yao.qi@linaro.org>
7876
7877 * linux-aarch64-low.c (aarch64_insert_point): Call
7878 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
7879 returns true.
7880
7881 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7882
7883 * linux-low.c (check_stopped_by_breakpoint): Use
7884 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
7885
7886 2015-08-27 Pedro Alves <palves@redhat.com>
7887
7888 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
7889
7890 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
7891
7892 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
7893 the XNEW-family equivalent.
7894 (compile_bytecodes): Likewise.
7895 * dll.c (loaded_dll): Likewise.
7896 * event-loop.c (append_callback_event): Likewise.
7897 (create_file_handler): Likewise.
7898 (create_file_event): Likewise.
7899 * hostio.c (handle_open): Likewise.
7900 * inferiors.c (add_thread): Likewise.
7901 (add_process): Likewise.
7902 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
7903 * linux-arm-low.c (arm_new_process): Likewise.
7904 (arm_new_thread): Likewise.
7905 * linux-low.c (add_to_pid_list): Likewise.
7906 (linux_add_process): Likewise.
7907 (handle_extended_wait): Likewise.
7908 (add_lwp): Likewise.
7909 (enqueue_one_deferred_signal): Likewise.
7910 (enqueue_pending_signal): Likewise.
7911 (linux_resume_one_lwp_throw): Likewise.
7912 (linux_resume_one_thread): Likewise.
7913 (linux_read_memory): Likewise.
7914 (linux_write_memory): Likewise.
7915 * linux-mips-low.c (mips_linux_new_process): Likewise.
7916 (mips_linux_new_thread): Likewise.
7917 (mips_add_watchpoint): Likewise.
7918 * linux-x86-low.c (initialize_low_arch): Likewise.
7919 * lynx-low.c (lynx_add_process): Likewise.
7920 * mem-break.c (set_raw_breakpoint_at): Likewise.
7921 (set_breakpoint): Likewise.
7922 (add_condition_to_breakpoint): Likewise.
7923 (add_commands_to_breakpoint): Likewise.
7924 (clone_agent_expr): Likewise.
7925 (clone_one_breakpoint): Likewise.
7926 * regcache.c (new_register_cache): Likewise.
7927 * remote-utils.c (look_up_one_symbol): Likewise.
7928 * server.c (queue_stop_reply): Likewise.
7929 (start_inferior): Likewise.
7930 (queue_stop_reply_callback): Likewise.
7931 (handle_target_event): Likewise.
7932 * spu-low.c (fetch_ppc_memory): Likewise.
7933 (store_ppc_memory): Likewise.
7934 * target.c (set_target_ops): Likewise.
7935 * thread-db.c (thread_db_load_search): Likewise.
7936 (try_thread_db_load_1): Likewise.
7937 * tracepoint.c (add_tracepoint): Likewise.
7938 (add_tracepoint_action): Likewise.
7939 (create_trace_state_variable): Likewise.
7940 (cmd_qtdpsrc): Likewise.
7941 (cmd_qtro): Likewise.
7942 (add_while_stepping_state): Likewise.
7943 * win32-low.c (child_add_thread): Likewise.
7944 (get_image_name): Likewise.
7945
7946 2015-08-25 Yao Qi <yao.qi@linaro.org>
7947
7948 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
7949
7950 2015-08-25 Yao Qi <yao.qi@linaro.org>
7951
7952 * Makefile.in (aarch64-linux.o): New rule.
7953 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
7954 srv_tgtobj.
7955 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
7956 (aarch64_init_debug_reg_state): Make it extern.
7957 (aarch64_linux_prepare_to_resume): Remove.
7958
7959 2015-08-25 Yao Qi <yao.qi@linaro.org>
7960
7961 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
7962 lwp_arch_private_info and ptid_of_lwp.
7963
7964 2015-08-25 Yao Qi <yao.qi@linaro.org>
7965
7966 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
7967 Find proc_info by find_process_pid. All callers updated.
7968
7969 2015-08-25 Yao Qi <yao.qi@linaro.org>
7970
7971 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
7972 Remove.
7973 (debug_reg_change_callback): Remove.
7974 (aarch64_notify_debug_reg_change): Remove.
7975
7976 2015-08-25 Yao Qi <yao.qi@linaro.org>
7977
7978 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
7979 Call current_lwp_ptid.
7980
7981 2015-08-25 Yao Qi <yao.qi@linaro.org>
7982
7983 * linux-aarch64-low.c (debug_reg_change_callback): Use
7984 debug_printf.
7985
7986 2015-08-25 Yao Qi <yao.qi@linaro.org>
7987
7988 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
7989
7990 2015-08-25 Yao Qi <yao.qi@linaro.org>
7991
7992 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
7993
7994 2015-08-25 Yao Qi <yao.qi@linaro.org>
7995
7996 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
7997 the code.
7998
7999 2015-08-25 Yao Qi <yao.qi@linaro.org>
8000
8001 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
8002 Remove.
8003 (debug_reg_change_callback): Remove argument entry and add argument
8004 lwp. Remove local variable thread. Don't print thread id in the
8005 debugging output. Don't check whether pid of thread equals to pid.
8006 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
8007 iterate_over_lwps instead find_inferior.
8008
8009 2015-08-24 Pedro Alves <palves@redhat.com>
8010
8011 * inferiors.c (get_first_process): New function.
8012 * inferiors.h (get_first_process): New declaration.
8013 * remote-utils.c (read_ptid): Default to the first process in the
8014 list, instead of to the current thread's process.
8015
8016 2015-08-24 Pedro Alves <palves@redhat.com>
8017
8018 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
8019 * event-loop.c: Likewise.
8020 * remote-utils.c: Likewise.
8021 * tracepoint.c: Likewise.
8022
8023 2015-08-24 Pedro Alves <palves@redhat.com>
8024
8025 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
8026 ptid_get_lwp.
8027
8028 2015-08-21 Pedro Alves <palves@redhat.com>
8029
8030 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
8031 instead of literal 1.
8032
8033 2015-08-21 Pedro Alves <palves@redhat.com>
8034
8035 * tdesc.c (default_description): Explicitly zero-initialize.
8036
8037 2015-08-21 Pedro Alves <palves@redhat.com>
8038
8039 PR gdb/18749
8040 * inferiors.c (remove_thread): Discard any pending stop reply for
8041 this thread.
8042 * server.c (remove_all_on_match_pid): Rename to ...
8043 (remove_all_on_match_ptid): ... this. Work with a filter ptid
8044 instead of a pid.
8045 (discard_queued_stop_replies): Change parameter to a ptid. Now
8046 extern.
8047 (handle_v_kill, kill_inferior_callback, captured_main)
8048 (process_serial_event): Adjust.
8049 * server.h (discard_queued_stop_replies): Declare.
8050
8051 2015-08-21 Pedro Alves <palves@redhat.com>
8052
8053 * linux-low.c (wait_for_sigstop): Always switch to no thread
8054 selected if the previously current thread dies.
8055 * lynx-low.c (lynx_request_interrupt): Use the first thread's
8056 process instead of the current thread's.
8057 * remote-utils.c (input_interrupt): Don't check if there's no
8058 current thread.
8059 * server.c (gdb_read_memory, gdb_write_memory): If setting the
8060 current thread to the general thread fails, error out.
8061 (handle_qxfer_auxv, handle_qxfer_libraries)
8062 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
8063 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
8064 (handle_query): Check if there's a thread selected instead of
8065 checking whether there's any thread in the thread list.
8066 (handle_qxfer_threads, handle_qxfer_btrace)
8067 (handle_qxfer_btrace_conf): Don't error out early if there's no
8068 thread in the thread list.
8069 (handle_v_cont, myresume): Don't set the current thread to the
8070 continue thread.
8071 (process_serial_event) <Hg handling>: Also set thread_id if the
8072 previous general thread is still alive.
8073 (process_serial_event) <g/G handling>: If setting the current
8074 thread to the general thread fails, error out.
8075 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
8076 thread's lwp instead of the current thread's.
8077 * target.c (set_desired_thread): If the desired thread was not
8078 found, leave the current thread pointing to NULL. Return an int
8079 (boolean) indicating success.
8080 * target.h (set_desired_thread): Change return type to int.
8081
8082 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
8083
8084 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
8085 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
8086 #includes.
8087 (ps_get_thread_area): New function.
8088
8089 2015-08-19 Gary Benson <gbenson@redhat.com>
8090
8091 * hostio.c (handle_pread): Do not attempt to read more data
8092 than hostio_reply_with_data can fit in a packet.
8093
8094 2015-08-18 Joel Brobecker <brobecker@adacore.com>
8095
8096 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
8097
8098 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
8099
8100 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
8101
8102 2015-08-06 Pedro Alves <palves@redhat.com>
8103
8104 * tracepoint.c (expr_eval_result): Now an int.
8105
8106 2015-08-06 Pedro Alves <palves@redhat.com>
8107
8108 * gdbthread.h (struct regcache): Forward declare.
8109 (struct thread_info) <regcache_data>: Now a struct regcache
8110 pointer.
8111 * inferiors.c (inferior_regcache_data)
8112 (set_inferior_regcache_data): Now work with struct regcache
8113 pointers.
8114 * inferiors.h (struct regcache): Forward declare.
8115 (inferior_regcache_data, set_inferior_regcache_data): Now work
8116 with struct regcache pointers.
8117 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
8118 (free_register_cache_thread): Remove struct regcache pointer
8119 casts.
8120
8121 2015-08-06 Pedro Alves <palves@redhat.com>
8122
8123 * server.c (captured_main): On error, print the exception message
8124 to stderr, and if run_once is set, throw a quit.
8125
8126 2015-08-06 Pedro Alves <palves@redhat.com>
8127
8128 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
8129 the current thread.
8130
8131 2015-08-06 Pedro Alves <palves@redhat.com>
8132
8133 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
8134 reading beyond the passed in buffer length.
8135
8136 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
8137
8138 * tracepoint.c (symbol_list) <required>: Remove.
8139
8140 2015-08-06 Pedro Alves <palves@redhat.com>
8141
8142 * linux-low.c (handle_extended_wait): Set the fork child's suspend
8143 count if stopping and suspending threads.
8144 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
8145 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
8146 (linux_detach): Complete an ongoing step-over.
8147 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
8148 throughout.
8149 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
8150 (linux_wait_1): If passing a signal to the inferior after
8151 finishing a step-over, unsuspend and re-resume all lwps. If we
8152 see a single-step event but the thread should be continuing, don't
8153 pass the trap to gdb.
8154 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
8155 internal_error instead of gdb_assert.
8156 (enqueue_pending_signal): New function.
8157 (check_ptrace_stopped_lwp_gone): Add debug output.
8158 (start_step_over): Use internal_error instead of gdb_assert.
8159 (complete_ongoing_step_over): New function.
8160 (linux_resume_one_thread): Don't resume a suspended thread.
8161 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
8162 it stepping.
8163
8164 2015-08-06 Pedro Alves <palves@redhat.com>
8165
8166 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
8167 (linux_thread_alive): Use lwp_is_marked_dead.
8168 (extended_event_reported): Delete.
8169 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
8170 instead of extended_event_reported.
8171 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
8172 as well.
8173 (lwp_is_marked_dead): New function.
8174 (lwp_running): Use lwp_is_marked_dead.
8175 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
8176 comment.
8177
8178 2015-08-06 Pedro Alves <palves@redhat.com>
8179
8180 * linux-low.c (linux_wait_1): Move fork event output out of the
8181 !report_to_gdb check. Pass event_child->waitstatus to
8182 target_waitstatus_to_string instead of ourstatus.
8183
8184 2015-08-04 Yao Qi <yao.qi@linaro.org>
8185
8186 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
8187 if current_thread is 32 bit.
8188
8189 2015-08-04 Yao Qi <yao.qi@linaro.org>
8190
8191 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
8192 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
8193 * server.c (extended_protocol): Remove "static".
8194 * server.h (extended_protocol): Declare it.
8195
8196 2015-08-04 Yao Qi <yao.qi@linaro.org>
8197
8198 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
8199 both aarch64 and aarch32.
8200 (aarch64_set_pc): Likewise.
8201
8202 2015-08-04 Yao Qi <yao.qi@linaro.org>
8203
8204 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
8205 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
8206 arm-with-neon.xml to srv_xmlfiles.
8207 * linux-aarch64-low.c: Include linux-aarch32-low.h.
8208 (is_64bit_tdesc): New function.
8209 (aarch64_linux_read_description): New function.
8210 (aarch64_arch_setup): Call aarch64_linux_read_description.
8211 (regs_info): Rename to regs_info_aarch64.
8212 (aarch64_regs_info): Return right regs_info.
8213 (initialize_low_arch): Call initialize_low_arch_aarch32.
8214
8215 2015-08-04 Yao Qi <yao.qi@linaro.org>
8216
8217 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
8218 * linux-aarch32-low.c: New file.
8219 * linux-aarch32-low.h: New file.
8220 * linux-arm-low.c (arm_fill_gregset): Move it to
8221 linux-aarch32-low.c.
8222 (arm_store_gregset): Likewise.
8223 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
8224 (arm_store_vfpregset): Call arm_store_vfpregset_num.
8225 (arm_arch_setup): Check if PTRACE_GETREGSET works.
8226 (regs_info): Rename to regs_info_arm.
8227 (arm_regs_info): Return regs_info_aarch32 if
8228 have_ptrace_getregset is 1 and target description is
8229 arm_with_neon or arm_with_vfpv3.
8230 (initialize_low_arch): Don't call init_registers_arm_with_neon.
8231 Call initialize_low_arch_aarch32 instead.
8232
8233 2015-08-04 Yao Qi <yao.qi@linaro.org>
8234
8235 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
8236 * linux-low.c: ... here.
8237 * linux-low.h (have_ptrace_getregset): Declare it.
8238
8239 2015-08-04 Pedro Alves <palves@redhat.com>
8240
8241 * thread-db.c (struct thread_db): Use new typedefs.
8242 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
8243 CHK calls.
8244 (disable_thread_event_reporting): Cast result of dlsym to
8245 destination function pointer type.
8246 (thread_db_mourn): Use td_ta_delete_ftype.
8247
8248 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
8249
8250 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
8251 arch variant.
8252 (CDX_BREAKPOINT): Define for R2.
8253 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
8254 (the_low_target): Add comments.
8255
8256 2015-07-30 Yao Qi <yao.qi@linaro.org>
8257
8258 * linux-arm-low.c (arm_hwcap): Remove it.
8259 (arm_read_description): New local variable arm_hwcap. Don't
8260 set arm_hwcap to zero.
8261
8262 2015-07-30 Yao Qi <yao.qi@linaro.org>
8263
8264 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
8265 Use regcache->tdesc instead.
8266 (arm_store_wmmxregset): Likewise.
8267 (arm_fill_vfpregset): Likewise.
8268 (arm_store_vfpregset): Likewise.
8269
8270 2015-07-30 Yao Qi <yao.qi@linaro.org>
8271
8272 * linux-arm-low.c: Include arch/arm.h.
8273 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
8274 (arm_store_gregset): Likewise.
8275
8276 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
8277
8278 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
8279 ptrace's 4th parameter.
8280
8281 2015-07-27 Yao Qi <yao.qi@linaro.org>
8282
8283 * configure.srv (case aarch64*-*-linux*): Don't set
8284 srv_linux_usrregs.
8285
8286 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
8287
8288 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
8289 sys/ptrace.h.
8290 * linux-arm-low.c: Likewise.
8291 * linux-cris-low.c: Likewise.
8292 * linux-crisv32-low.c: Likewise.
8293 * linux-low.c: Likewise.
8294 * linux-m68k-low.c: Likewise.
8295 * linux-mips-low.c: Likewise.
8296 * linux-nios2-low.c: Likewise.
8297 * linux-s390-low.c: Likewise.
8298 * linux-sparc-low.c: Likewise.
8299 * linux-tic6x-low.c: Likewise.
8300 * linux-tile-low.c: Likewise.
8301 * linux-x86-low.c: Likewise.
8302
8303 2015-07-24 Pedro Alves <palves@redhat.com>
8304
8305 * config.in: Regenerate.
8306 * configure: Regenerate.
8307
8308 2015-07-24 Pedro Alves <palves@redhat.com>
8309
8310 * acinclude.m4: Include ../ptrace.m4.
8311 * configure.ac: Call GDB_AC_PTRACE.
8312 * config.in, configure: Regenerate.
8313
8314 2015-07-24 Yao Qi <yao.qi@linaro.org>
8315
8316 * linux-low.c (linux_create_inferior): Remove setting to
8317 proc->priv->new_inferior.
8318 (linux_attach): Likewise.
8319 (linux_low_filter_event): Likewise.
8320 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
8321
8322 2015-07-24 Yao Qi <yao.qi@linaro.org>
8323
8324 * linux-low.c (linux_arch_setup): New function.
8325 (linux_low_filter_event): If proc->tdesc is NULL and
8326 proc->attached is true, call the_low_target.arch_setup.
8327 Otherwise, keep status pending, and return.
8328 (linux_resume_one_lwp_throw): Don't call get_pc if
8329 thread->while_stepping isn't NULL. Don't call
8330 get_thread_regcache if proc->tdesc is NULL.
8331 (need_step_over_p): Return 0 if proc->tdesc is NULL.
8332 (linux_target_ops): Install arch_setup.
8333 * server.c (start_inferior): Call the_target->arch_setup.
8334 * target.h (struct target_ops) <arch_setup>: New field.
8335 (target_arch_setup): New marco.
8336 * lynx-low.c (lynx_target_ops): Update.
8337 * nto-low.c (nto_target_ops): Update.
8338 * spu-low.c (spu_target_ops): Update.
8339 * win32-low.c (win32_target_ops): Update.
8340
8341 2015-07-24 Yao Qi <yao.qi@linaro.org>
8342
8343 * linux-low.c (linux_add_process): Don't set
8344 proc->priv->new_inferior.
8345 (linux_create_inferior): Set proc->priv->new_inferior to 1.
8346 (linux_attach): Likewise.
8347
8348 2015-07-24 Yao Qi <yao.qi@linaro.org>
8349
8350 * server.c (start_inferior): Code refactor.
8351
8352 2015-07-24 Yao Qi <yao.qi@linaro.org>
8353
8354 * server.c (process_serial_event): Set general_thread.
8355
8356 2015-07-21 Yao Qi <yao.qi@linaro.org>
8357
8358 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
8359 aarch64_linux_get_debug_reg_capacity.
8360
8361 2015-07-17 Yao Qi <yao.qi@linaro.org>
8362
8363 * Makefile.in (aarch64-linux-hw-point.o): New rule.
8364 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
8365 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
8366 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
8367 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
8368 (AARCH64_HWP_ALIGNMENT): Likewise.
8369 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
8370 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
8371 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
8372 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
8373 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
8374 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
8375 (struct aarch64_debug_reg_state): Likewise.
8376 (struct arch_lwp_info): Likewise.
8377 (aarch64_align_watchpoint): Likewise.
8378 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
8379 (aarch64_watchpoint_length): Likewise.
8380 (aarch64_point_encode_ctrl_reg): Likewise
8381 (aarch64_point_is_aligned): Likewise.
8382 (aarch64_align_watchpoint): Likewise.
8383 (aarch64_linux_set_debug_regs):
8384 (aarch64_dr_state_insert_one_point): Likewise.
8385 (aarch64_dr_state_remove_one_point): Likewise.
8386 (aarch64_handle_breakpoint): Likewise.
8387 (aarch64_handle_aligned_watchpoint): Likewise.
8388 (aarch64_handle_unaligned_watchpoint): Likewise.
8389 (aarch64_handle_watchpoint): Likewise.
8390
8391 2015-07-17 Yao Qi <yao.qi@linaro.org>
8392
8393 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
8394 and don't aarch64_get_debug_reg_state. All callers update.
8395 (aarch64_handle_aligned_watchpoint): Likewise.
8396 (aarch64_handle_unaligned_watchpoint): Likewise.
8397 (aarch64_handle_watchpoint): Likewise.
8398 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
8399 (aarch64_remove_point): Likewise.
8400
8401 2015-07-17 Yao Qi <yao.qi@linaro.org>
8402
8403 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
8404 debug_printf.
8405 (aarch64_handle_unaligned_watchpoint): Likewise.
8406
8407 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8408
8409 Revert the previous 3 commits:
8410 Move gdb_regex* to common/
8411 Move linux_find_memory_regions_full & co.
8412 gdbserver build-id attribute generator
8413
8414 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
8415 Jan Kratochvil <jan.kratochvil@redhat.com>
8416
8417 gdbserver build-id attribute generator.
8418 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
8419 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
8420 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
8421 (find_phdr): New.
8422 (get_dynamic): Use find_pdhr to traverse program headers.
8423 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
8424 (compare_mapping_entry_range, struct find_memory_region_callback_data)
8425 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
8426 (get_hex_build_id): New.
8427 (linux_qxfer_libraries_svr4): Add optional build-id attribute
8428 to reply XML document.
8429
8430 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
8431 Jan Kratochvil <jan.kratochvil@redhat.com>
8432
8433 * target.c: Include target/target-utils.h and fcntl.h.
8434 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
8435 (target_fileio_read_stralloc): New functions.
8436
8437 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8438
8439 * Makefile.in (OBS): Add gdb_regex.o.
8440 (gdb_regex.o): New.
8441 * config.in: Rebuilt.
8442 * configure: Rebuilt.
8443
8444 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
8445 Jan Kratochvil <jan.kratochvil@redhat.com>
8446
8447 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
8448 * Makefile.in (OBS): Add target-utils.o.
8449 (linux-maps.o, target-utils.o): New.
8450 * configure.srv (srv_linux_obj): Add linux-maps.o.
8451
8452 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
8453
8454 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
8455 function, return 1.
8456 (the_low_target): Install it.
8457
8458 2015-07-14 Pedro Alves <palves@redhat.com>
8459
8460 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
8461 Instead, ignore ECHILD, and throw an error for other errnos.
8462
8463 2015-07-10 Pedro Alves <palves@redhat.com>
8464
8465 * event-loop.c (struct callback_event) <data>: Change type to
8466 gdb_client_data instance instead of gdb_client_data pointer.
8467 (append_callback_event): Adjust.
8468
8469 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
8470
8471 * linux-aarch64-low.c: Add comments for each linux_target_ops
8472 method. Remove comments already covered in target_ops and
8473 linux_target_ops definitions.
8474 (the_low_target): Add comments for each unimplemented method.
8475
8476 2015-07-09 Yao Qi <yao.qi@linaro.org>
8477
8478 * linux-aarch64-low.c (aarch64_regmap): Remove.
8479 (aarch64_usrregs_info): Remove.
8480 (regs_info): Set field usrregs to NULL.
8481
8482 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
8483
8484 * linux-low.c: Include "rsp-low.h"
8485 (linux_low_encode_pt_config, linux_low_encode_raw): New.
8486 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
8487 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
8488 (handle_btrace_enable_pt): New.
8489 (handle_btrace_general_set): Support "pt".
8490 (handle_btrace_conf_general_set): Support "pt:size".
8491
8492 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
8493
8494 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
8495 Z_PACKET_SW_BP.
8496
8497 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
8498
8499 * linux-aarch64-low.c: Remove comment about endianness.
8500 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
8501 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
8502 memcmp.
8503
8504 2015-06-24 Gary Benson <gbenson@redhat.com>
8505
8506 * linux-i386-ipa.c (stdint.h): Do not include.
8507 * lynx-i386-low.c (stdint.h): Likewise.
8508 * lynx-ppc-low.c (stdint.h): Likewise.
8509 * mem-break.c (stdint.h): Likewise.
8510 * thread-db.c (stdint.h): Likewise.
8511 * tracepoint.c (stdint.h): Likewise.
8512 * win32-low.c (stdint.h): Likewise.
8513
8514 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
8515
8516 * server.c (write_qxfer_response): Update call to
8517 remote_escape_output.
8518
8519 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
8520 Jan Kratochvil <jan.kratochvil@redhat.com>
8521
8522 Merge multiple hex conversions.
8523 * gdbreplay.c (tohex): Rename to 'fromhex'.
8524 (logchar): Use fromhex.
8525
8526 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
8527
8528 * server.c (handle_qxfer_libraries): Set `version' attribute for
8529 <library-list>.
8530
8531 2015-06-10 Gary Benson <gbenson@redhat.com>
8532
8533 * target.h (struct target_ops) <multifs_open>: New field.
8534 <multifs_unlink>: Likewise.
8535 <multifs_readlink>: Likewise.
8536 * linux-low.c (nat/linux-namespaces.h): New include.
8537 (linux_target_ops): Initialize the_target->multifs_open,
8538 the_target->multifs_unlink and the_target->multifs_readlink.
8539 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
8540 * hostio.c (hostio_fs_pid): New static variable.
8541 (hostio_handle_new_gdb_connection): New function.
8542 (handle_setfs): Likewise.
8543 (handle_open): Use the_target->multifs_open as appropriate.
8544 (handle_unlink): Use the_target->multifs_unlink as appropriate.
8545 (handle_readlink): Use the_target->multifs_readlink as
8546 appropriate.
8547 (handle_vFile): Handle vFile:setfs packets.
8548 * server.c (handle_query): Call hostio_handle_new_gdb_connection
8549 after target_handle_new_gdb_connection.
8550
8551 2015-06-10 Gary Benson <gbenson@redhat.com>
8552
8553 * configure.ac (AC_CHECK_FUNCS): Add setns.
8554 * config.in: Regenerate.
8555 * configure: Likewise.
8556 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
8557 (linux-namespaces.o): New rule.
8558 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
8559
8560 2015-06-09 Gary Benson <gbenson@redhat.com>
8561
8562 * hostio.c (handle_open): Process mode argument with
8563 fileio_to_host_mode.
8564
8565 2015-06-01 Yao Qi <yao.qi@linaro.org>
8566
8567 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
8568 * linux-x86-low.c: Likewise.
8569
8570 2015-05-28 Don Breazeal <donb@codesourcery.com>
8571
8572 * linux-low.c (handle_extended_wait): Initialize
8573 thread_info.last_resume_kind for new fork children.
8574
8575 2015-05-15 Pedro Alves <palves@redhat.com>
8576
8577 * target.h (target_handle_new_gdb_connection): Rewrite using if
8578 wrapped in do/while.
8579
8580 2015-05-14 Joel Brobecker <brobecker@adacore.com>
8581
8582 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
8583 * configure, config.in: Regenerate.
8584 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
8585 Declare typedef.
8586
8587 2015-05-12 Don Breazeal <donb@codesourcery.com>
8588
8589 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
8590 PTRACE_EVENT_VFORK_DONE.
8591 (linux_low_ptrace_options, extended_event_reported): Add vfork
8592 events.
8593 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
8594 and "vforkdone" for RSP 'T' Stop Reply Packet.
8595 * server.h (report_vfork_events): Declare
8596 global variable.
8597
8598 2015-05-12 Don Breazeal <donb@codesourcery.com>
8599
8600 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
8601 (the_low_target) <new_fork>: Initialize new member.
8602 * linux-arm-low.c (arm_new_fork): New function.
8603 (the_low_target) <new_fork>: Initialize new member.
8604 * linux-low.c (handle_extended_wait): Call new target function
8605 new_fork.
8606 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
8607 * linux-mips-low.c (mips_add_watchpoint): New function
8608 extracted from mips_insert_point.
8609 (the_low_target) <new_fork>: Initialize new member.
8610 (mips_linux_new_fork): New function.
8611 (mips_insert_point): Call mips_add_watchpoint.
8612 * linux-x86-low.c (x86_linux_new_fork): New function.
8613 (the_low_target) <new_fork>: Initialize new member.
8614
8615 2015-05-12 Don Breazeal <donb@codesourcery.com>
8616
8617 * linux-low.c (handle_extended_wait): Implement return value,
8618 rename argument 'event_child' to 'event_lwp', handle
8619 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
8620 (linux_low_ptrace_options): New function.
8621 (linux_low_filter_event): Call linux_low_ptrace_options,
8622 use different argument fo linux_enable_event_reporting,
8623 use return value from handle_extended_wait.
8624 (extended_event_reported): New function.
8625 (linux_wait_1): Call extended_event_reported and set
8626 status to report fork events.
8627 (linux_write_memory): Add pid to debug message.
8628 (reset_lwp_ptrace_options_callback): New function.
8629 (linux_handle_new_gdb_connection): New function.
8630 (linux_target_ops): Initialize new structure member.
8631 * linux-low.h (struct lwp_info) <waitstatus>: New member.
8632 * lynx-low.c: Initialize new structure member.
8633 * remote-utils.c (prepare_resume_reply): Implement stop reason
8634 "fork" for "T" stop message.
8635 * server.c (handle_query): Call handle_new_gdb_connection.
8636 * server.h (report_fork_events): Declare global flag.
8637 * target.h (struct target_ops) <handle_new_gdb_connection>:
8638 New member.
8639 (target_handle_new_gdb_connection): New macro.
8640 * win32-low.c: Initialize new structure member.
8641
8642 2015-05-12 Don Breazeal <donb@codesourcery.com>
8643
8644 * mem-break.c (APPEND_TO_LIST): Define macro.
8645 (clone_agent_expr): New function.
8646 (clone_one_breakpoint): New function.
8647 (clone_all_breakpoints): New function.
8648 * mem-break.h: Declare new functions.
8649
8650 2015-05-12 Don Breazeal <donb@codesourcery.com>
8651
8652 * linux-low.c (linux_supports_fork_events): New function.
8653 (linux_supports_vfork_events): New function.
8654 (linux_target_ops): Initialize new structure members.
8655 (initialize_low): Call linux_check_ptrace_features.
8656 * lynx-low.c (lynx_target_ops): Initialize new structure
8657 members.
8658 * server.c (report_fork_events, report_vfork_events):
8659 New global flags.
8660 (handle_query): Add new features to qSupported packet and
8661 response.
8662 (captured_main): Initialize new global variables.
8663 * target.h (struct target_ops) <supports_fork_events>:
8664 New member.
8665 <supports_vfork_events>: New member.
8666 (target_supports_fork_events): New macro.
8667 (target_supports_vfork_events): New macro.
8668 * win32-low.c (win32_target_ops): Initialize new structure
8669 members.
8670
8671 2015-05-12 Gary Benson <gbenson@redhat.com>
8672
8673 * server.c (handle_qxfer_exec_file): Use current process
8674 if annex is empty.
8675
8676 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
8677
8678 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
8679 Remove HAVE_PTRACE_GETREGS conditionals.
8680 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
8681 instead of PTRACE_GETREGS and PTRACE_SETREGS.
8682
8683 2015-05-08 Yao Qi <yao.qi@linaro.org>
8684
8685 * linux-low.c (linux_supports_conditional_breakpoints): New
8686 function.
8687 (linux_target_ops): Install new target method.
8688 * lynx-low.c (lynx_target_ops): Install NULL hook for
8689 supports_conditional_breakpoints.
8690 * nto-low.c (nto_target_ops): Likewise.
8691 * spu-low.c (spu_target_ops): Likewise.
8692 * win32-low.c (win32_target_ops): Likewise.
8693 * server.c (handle_query): Check
8694 target_supports_conditional_breakpoints.
8695 * target.h (struct target_ops) <supports_conditional_breakpoints>:
8696 New field.
8697 (target_supports_conditional_breakpoints): New macro.
8698
8699 2015-05-06 Pedro Alves <palves@redhat.com>
8700
8701 PR server/18081
8702 * server.c (start_inferior): If the process exits, mourn it.
8703
8704 2015-04-21 Gary Benson <gbenson@redhat.com>
8705
8706 * hostio.c (fileio_open_flags_to_host): Factored out to
8707 fileio_to_host_openflags in common/fileio.c. Single use
8708 updated.
8709
8710 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8711
8712 * linux-xtensa-low.c (xtensa_fill_gregset)
8713 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
8714 XCHAL_HAVE_LOOP.
8715
8716 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8717
8718 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
8719 (regs_info): Replace usrregs pointer with NULL.
8720
8721 2015-04-17 Gary Benson <gbenson@redhat.com>
8722
8723 * target.h (struct target_ops) <pid_to_exec_file>: New field.
8724 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
8725 * server.c (handle_qxfer_exec_file): New function.
8726 (qxfer_packets): Add exec-file entry.
8727 (handle_query): Report qXfer:exec-file:read as supported packet.
8728
8729 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
8730
8731 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
8732
8733 2015-04-09 Gary Benson <gbenson@redhat.com>
8734
8735 * hostio-errno.c (errno_to_fileio_error): Remove function.
8736 Update caller to use remote_fileio_to_fio_error.
8737
8738 2015-04-09 Yao Qi <yao.qi@linaro.org>
8739
8740 * linux-low.c (linux_insert_point): Call
8741 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
8742 (linux_remove_point): Call remove_memory_breakpoint if type is
8743 raw_bkpt_type_sw.
8744 * linux-x86-low.c (x86_insert_point): Don't call
8745 insert_memory_breakpoint.
8746 (x86_remove_point): Don't call remove_memory_breakpoint.
8747
8748 2015-04-01 Pedro Alves <palves@redhat.com>
8749 Cleber Rosa <crosa@redhat.com>
8750
8751 * server.c (gdbserver_usage): Reorganize and extend the usage
8752 message.
8753
8754 2015-03-24 Pedro Alves <palves@redhat.com>
8755
8756 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
8757 output. Also dump TRAP_TRACE.
8758 (linux_low_filter_event): In debug output, distinguish a
8759 resume_stop SIGSTOP from a delayed SIGSTOP.
8760
8761 2015-03-24 Gary Benson <gbenson@redhat.com>
8762
8763 * linux-x86-low.c (x86_linux_new_thread): Moved to
8764 nat/x86-linux.c.
8765 (x86_linux_prepare_to_resume): Likewise.
8766
8767 2015-03-24 Gary Benson <gbenson@redhat.com>
8768
8769 * Makefile.in (x86-linux-dregs.o): New rule.
8770 * configure.srv: Add x86-linux-dregs.o to relevant targets.
8771 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
8772 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
8773 (x86_linux_dr_get): Likewise.
8774 (x86_linux_dr_set): Likewise.
8775 (update_debug_registers_callback): Likewise.
8776 (x86_linux_dr_set_addr): Likewise.
8777 (x86_linux_dr_get_addr): Likewise.
8778 (x86_linux_dr_set_control): Likewise.
8779 (x86_linux_dr_get_control): Likewise.
8780 (x86_linux_dr_get_status): Likewise.
8781 (x86_linux_update_debug_registers): Likewise.
8782
8783 2015-03-24 Gary Benson <gbenson@redhat.com>
8784
8785 * linux-x86-low.c (x86_linux_update_debug_registers):
8786 New function, factored out from...
8787 (x86_linux_prepare_to_resume): ...this.
8788
8789 2015-03-24 Gary Benson <gbenson@redhat.com>
8790
8791 * linux-x86-low.c (x86_linux_dr_get): Update comments.
8792 (x86_linux_dr_set): Likewise.
8793 (update_debug_registers_callback): Likewise.
8794 (x86_linux_dr_set_addr): Likewise.
8795 (x86_linux_dr_get_addr): Likewise.
8796 (x86_linux_dr_set_control): Likewise.
8797 (x86_linux_dr_get_control): Likewise.
8798 (x86_linux_dr_get_status): Likewise.
8799 (x86_linux_prepare_to_resume): Likewise.
8800
8801 2015-03-24 Gary Benson <gbenson@redhat.com>
8802
8803 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
8804 Use perror_with_name. Pass string through gettext.
8805 (x86_linux_dr_set): Likewise.
8806
8807 2015-03-24 Gary Benson <gbenson@redhat.com>
8808
8809 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
8810 (x86_linux_dr_set_addr): ...this.
8811 (x86_dr_low_get_addr): Rename to...
8812 (x86_linux_dr_get_addr): ...this.
8813 (x86_dr_low_set_control): Rename to...
8814 (x86_linux_dr_set_control): ...this.
8815 (x86_dr_low_get_control): Rename to...
8816 (x86_linux_dr_get_control): ...this.
8817 (x86_dr_low_get_status): Rename to...
8818 (x86_linux_dr_get_status): ...this.
8819 (x86_dr_low): Update with new function names.
8820
8821 2015-03-24 Gary Benson <gbenson@redhat.com>
8822
8823 * Makefile.in (x86-linux.o): New rule.
8824 * configure.srv: Add x86-linux.o to relevant targets.
8825 * linux-low.c (lwp_set_arch_private_info): New function.
8826 (lwp_arch_private_info): Likewise.
8827 * linux-x86-low.c: Include nat/x86-linux.h.
8828 (arch_lwp_info): Removed structure.
8829 (update_debug_registers_callback):
8830 Use lwp_set_debug_registers_changed.
8831 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
8832 and lwp_set_debug_registers_changed.
8833 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
8834
8835 2015-03-24 Gary Benson <gbenson@redhat.com>
8836
8837 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
8838 * linux-arm-low.c (arm_new_thread): Likewise.
8839 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
8840 * linux-mips-low.c (mips_linux_new_thread): Likewise.
8841 * linux-x86-low.c (x86_linux_new_thread): Likewise.
8842 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
8843
8844 2015-03-24 Gary Benson <gbenson@redhat.com>
8845
8846 * linux-low.c (ptid_of_lwp): New function.
8847 (lwp_is_stopped): Likewise.
8848 (lwp_stop_reason): Likewise.
8849 * linux-x86-low.c (update_debug_registers_callback):
8850 Use lwp_is_stopped.
8851 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
8852 lwp_stop_reason.
8853
8854 2015-03-24 Gary Benson <gbenson@redhat.com>
8855
8856 * linux-low.h (linux_stop_lwp): Remove declaration.
8857
8858 2015-03-24 Gary Benson <gbenson@redhat.com>
8859
8860 * linux-low.h: Include nat/linux-nat.h.
8861 * linux-low.c (iterate_over_lwps_args): New structure.
8862 (iterate_over_lwps_filter): New function.
8863 (iterate_over_lwps): Likewise.
8864 * linux-x86-low.c (update_debug_registers_callback):
8865 Update signature to what iterate_over_lwps expects.
8866 Remove PID check that iterate_over_lwps now performs.
8867 (x86_dr_low_set_addr): Use iterate_over_lwps.
8868 (x86_dr_low_set_control): Likewise.
8869
8870 2015-03-24 Gary Benson <gbenson@redhat.com>
8871
8872 * linux-x86-low.c (x86_debug_reg_state): New function.
8873 (x86_linux_prepare_to_resume): Use the above.
8874
8875 2015-03-24 Gary Benson <gbenson@redhat.com>
8876
8877 * linux-low.c (current_lwp_ptid): New function.
8878 * linux-x86-low.c: Include nat/linux-nat.h.
8879 (x86_dr_low_get_addr): Use current_lwp_ptid.
8880 (x86_dr_low_get_control): Likewise.
8881 (x86_dr_low_get_status): Likewise.
8882
8883 2015-03-20 Pedro Alves <palves@redhat.com>
8884
8885 * tracepoint.c (cmd_qtstatus): Make "str" const.
8886
8887 2015-03-20 Pedro Alves <palves@redhat.com>
8888
8889 * server.c (handle_general_set): Make "req_str" const.
8890
8891 2015-03-19 Pedro Alves <palves@redhat.com>
8892
8893 * linux-low.c (linux_resume_one_lwp): Rename to ...
8894 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
8895 instead call perror_with_name.
8896 (check_ptrace_stopped_lwp_gone): New function.
8897 (linux_resume_one_lwp): Reimplement as wrapper around
8898 linux_resume_one_lwp_throw that swallows errors if the LWP is
8899 gone.
8900
8901 2015-03-19 Pedro Alves <palves@redhat.com>
8902
8903 * linux-low.c (count_events_callback, select_event_lwp_callback):
8904 No longer check whether the thread has resume_stop as last resume
8905 kind.
8906
8907 2015-03-19 Pedro Alves <palves@redhat.com>
8908
8909 * linux-low.c (count_events_callback, select_event_lwp_callback):
8910 Use the lwp's status_pending_p field, not the thread's.
8911
8912 2015-03-19 Pedro Alves <palves@redhat.com>
8913
8914 * linux-low.c (select_event_lwp_callback): Update comments to
8915 no longer mention SIGTRAP.
8916
8917 2015-03-18 Gary Benson <gbenson@redhat.com>
8918
8919 * server.c (handle_query): Do not report vFile:fstat as supported.
8920
8921 2015-03-11 Gary Benson <gbenson@redhat.com>
8922
8923 * hostio.c (sys/types.h): New include.
8924 (sys/stat.h): Likewise.
8925 (common-remote-fileio.h): Likewise.
8926 (handle_fstat): New function.
8927 (handle_vFile): Handle vFile:fstat packets.
8928
8929 2015-03-11 Gary Benson <gbenson@redhat.com>
8930
8931 * configure.ac (AC_CHECK_MEMBERS): Add checks for
8932 struct stat.st_blocks and struct stat.st_blksize.
8933 * configure: Regenerate.
8934 * config.in: Likewise.
8935 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
8936 (OBS): Add common-remote-fileio.o.
8937 (common-remote-fileio.o): New rule.
8938
8939 2015-03-09 Pedro Alves <palves@redhat.com>
8940
8941 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
8942 'struct sockaddr' pointer in 'accept' call.
8943
8944 2015-03-09 Pedro Alves <palves@redhat.com>
8945
8946 Revert:
8947 2015-03-07 Pedro Alves <palves@redhat.com>
8948 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8949 or <winsock2.h> here. Instead include "gdb_socket.h".
8950 (remote_open): Use union gdb_sockaddr_u.
8951 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8952 or <winsock2.h> here. Instead include "gdb_socket.h".
8953 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8954 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8955 or <sys/un.h>.
8956 (init_named_socket, gdb_agent_helper_thread): Use union
8957 gdb_sockaddr_u.
8958
8959 2015-03-07 Pedro Alves <palves@redhat.com>
8960
8961 * configure.ac (build_warnings): Move
8962 -Wdeclaration-after-statement to the C-specific set.
8963 * configure: Regenerate.
8964
8965 2015-03-07 Pedro Alves <palves@redhat.com>
8966
8967 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
8968 or <winsock2.h> here. Instead include "gdb_socket.h".
8969 (remote_open): Use union gdb_sockaddr_u.
8970 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
8971 or <winsock2.h> here. Instead include "gdb_socket.h".
8972 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
8973 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
8974 or <sys/un.h>.
8975 (init_named_socket, gdb_agent_helper_thread): Use union
8976 gdb_sockaddr_u.
8977
8978 2015-03-07 Pedro Alves <palves@redhat.com>
8979
8980 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
8981 instead.
8982
8983 2015-03-06 Yao Qi <yao.qi@linaro.org>
8984
8985 * linux-aarch64-low.c (aarch64_insert_point): Use
8986 show_debug_regs as a boolean.
8987 (aarch64_remove_point): Likewise.
8988
8989 2015-03-05 Pedro Alves <palves@redhat.com>
8990
8991 * lynx-low.c (lynx_target_ops): Install NULL hooks for
8992 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8993 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
8994 * nto-low.c (nto_target_ops): Likewise.
8995 * spu-low.c (spu_target_ops): Likewise.
8996 * win32-low.c (win32_target_ops): Likewise.
8997
8998 2015-03-04 Pedro Alves <palves@redhat.com>
8999
9000 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
9001 Decide whether a breakpoint triggered based on the SIGTRAP's
9002 siginfo.si_code.
9003 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
9004 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
9005 (linux_low_filter_event): Check for breakpoints before checking
9006 watchpoints.
9007 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
9008 siginfo.si_code.
9009 (linux_stopped_by_sw_breakpoint)
9010 (linux_supports_stopped_by_sw_breakpoint)
9011 (linux_stopped_by_hw_breakpoint)
9012 (linux_supports_stopped_by_hw_breakpoint): New functions.
9013 (linux_target_ops): Install new target methods.
9014
9015 2015-03-04 Pedro Alves <palves@redhat.com>
9016
9017 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
9018 * server.c (swbreak_feature, hwbreak_feature): New globals.
9019 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
9020 (captured_main): Clear swbreak_feature and hwbreak_feature.
9021 * server.h (swbreak_feature, hwbreak_feature): Declare.
9022 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
9023 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
9024 supports_stopped_by_hw_breakpoint>: New fields.
9025 (target_supports_stopped_by_sw_breakpoint)
9026 (target_stopped_by_sw_breakpoint)
9027 (target_supports_stopped_by_hw_breakpoint)
9028 (target_stopped_by_hw_breakpoint): Declare.
9029
9030 2015-03-04 Pedro Alves <palves@redhat.com>
9031
9032 enum lwp_stop_reason -> enum target_stop_reason
9033 * linux-low.c (check_stopped_by_breakpoint): Adjust.
9034 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
9035 (linux_wait_1, stuck_in_jump_pad_callback)
9036 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
9037 (linux_stopped_by_watchpoint):
9038 * linux-low.h (enum lwp_stop_reason): Delete.
9039 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
9040 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
9041
9042 2015-03-04 Yao Qi <yao.qi@linaro.org>
9043
9044 * Makefile.in (SFILES): Add linux-aarch64-low.c.
9045
9046 2015-03-03 Gary Benson <gbenson@redhat.com>
9047
9048 * hostio.c (handle_vFile): Fix prefix lengths.
9049
9050 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
9051
9052 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
9053 ptr_bits.
9054
9055 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
9056
9057 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
9058 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
9059 (clean): Add "rm -f" for above C files.
9060 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
9061 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
9062 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
9063 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
9064 * linux-s390-low.c (HWCAP_S390_VX): New macro.
9065 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
9066 (init_registers_s390x_vx_linux64)
9067 (init_registers_s390x_tevx_linux64)
9068 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
9069 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
9070 declarations.
9071 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
9072 (s390_store_vxrs_high): New functions.
9073 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
9074 NT_S390_VXRS_HIGH.
9075 (s390_arch_setup): Add logic for selecting one of the new target
9076 descriptions. Activate the new vector regsets if applicable.
9077 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
9078 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
9079 and init_registers_s390x_tevx_linux64.
9080
9081 2015-03-01 Pedro Alves <palves@redhat.com>
9082
9083 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
9084 parameter.
9085
9086 2015-02-27 Pedro Alves <palves@redhat.com>
9087
9088 * linux-x86-low.c (u_debugreg_offset): New function.
9089 (x86_linux_dr_get, x86_linux_dr_set): Use it.
9090
9091 2015-02-27 Pedro Alves <palves@redhat.com>
9092
9093 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
9094 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
9095 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
9096 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
9097 (ps_lsetfpregs, ps_getpid)
9098 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
9099 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
9100 (ps_lsetxregs, ps_plog): Declare.
9101
9102 2015-02-27 Pedro Alves <palves@redhat.com>
9103
9104 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
9105 IP_AGENT_EXPORT_FUNC.
9106 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
9107 IP_AGENT_EXPORT_FUNC.
9108 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
9109 (IP_AGENT_EXPORT): Delete.
9110 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9111 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
9112 (gdb_trampoline_buffer_error, collecting, gdb_collect)
9113 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
9114 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
9115 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
9116 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
9117 (traceframe_read_count, traceframe_write_count)
9118 (traceframes_created, trace_state_variables, get_raw_reg)
9119 (get_trace_state_variable_value, set_trace_state_variable_value)
9120 (ust_loaded, helper_thread_id, cmd_buf): Use
9121 IPA_SYM_EXPORTED_NAME.
9122 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
9123 (tracepoints) Use IP_AGENT_EXPORT_VAR.
9124 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
9125 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
9126 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
9127 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
9128 EXTERN_C_PUSH/EXTERN_C_POP.
9129 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
9130 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
9131 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
9132 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
9133 (traceframe_write_count, traceframe_read_count)
9134 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
9135 (about_to_request_buffer_space, get_trace_state_variable_value)
9136 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
9137 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
9138 EXTERN_C_PUSH/EXTERN_C_POP.
9139 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
9140 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
9141 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
9142 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
9143 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9144 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
9145 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
9146 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
9147 Define.
9148 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
9149 (IP_AGENT_EXPORT_VAR_DECL): Define.
9150 (tracing): Declare.
9151 (gdb_agent_get_raw_reg): Declare.
9152
9153 2015-02-27 Tom Tromey <tromey@redhat.com>
9154 Pedro Alves <palves@redhat.com>
9155
9156 Rename symbols whose names are reserved C++ keywords throughout.
9157
9158 2015-02-27 Pedro Alves <palves@redhat.com>
9159
9160 * Makefile.in (COMPILER): New, get it from autoconf.
9161 (CXX): Get from autoconf instead.
9162 (COMPILE.pre): Use COMPILER.
9163 (CC-LD): Rename to ...
9164 (CC_LD): ... this. Use COMPILER.
9165 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
9166 (CXX_FOR_TARGET): Default to g++ instead of gcc.
9167 * acinclude.m4: Include build-with-cxx.m4.
9168 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
9169 Disable -Werror by default if building in C++ mode.
9170 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
9171 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
9172 the C++ compiler. Save/restore CXXFLAGS too.
9173 * configure: Regenerate.
9174
9175 2015-02-27 Pedro Alves <palves@redhat.com>
9176
9177 * acinclude.m4: Include libiberty.m4.
9178 * configure.ac: Call libiberty_INIT.
9179 * config.in, configure: Regenerate.
9180
9181 2015-02-26 Pedro Alves <palves@redhat.com>
9182
9183 * linux-low.c (linux_wait_1): When incrementing the PC past a
9184 program breakpoint always use the_low_target.breakpoint_len as
9185 increment, rather than the maximum between that and
9186 the_low_target.decr_pc_after_break.
9187
9188 2015-02-23 Pedro Alves <palves@redhat.com>
9189
9190 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
9191 thread was doing a step-over; always adjust the PC if
9192 we stepped over a permanent breakpoint.
9193 (linux_wait_1): If we stepped over breakpoint that was on top of a
9194 permanent breakpoint, manually advance the PC past it.
9195
9196 2015-02-23 Pedro Alves <palves@redhat.com>
9197
9198 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
9199 modes.
9200 (x86_fill_gregset, x86_store_gregset): Use it when handling
9201 $orig_eax.
9202
9203 2015-02-20 Pedro Alves <palves@redhat.com>
9204
9205 * thread-db.c: Include "nat/linux-procfs.h".
9206 (thread_db_init): Skip listing new threads if the kernel supports
9207 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
9208
9209 2015-02-20 Pedro Alves <palves@redhat.com>
9210
9211 * linux-low.c (status_pending_p_callback): Use ptid_match.
9212
9213 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
9214
9215 PR breakpoints/16812
9216 * linux-low.c (wstatus_maybe_breakpoint): Remove.
9217 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
9218 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
9219
9220 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
9221
9222 PR breakpoints/15956
9223 * tracepoint.c (cmd_qtinit): Add check for current_thread.
9224
9225 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
9226
9227 * linux-low.c (linux_low_btrace_conf): Print size.
9228 * server.c (handle_btrace_conf_general_set): New.
9229 (hanle_general_set): Call handle_btrace_conf_general_set.
9230 (handle_query): Report Qbtrace-conf:bts:size as supported.
9231
9232 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
9233
9234 * linux-low.c (linux_low_enable_btrace): Update parameters.
9235 (linux_low_btrace_conf): New.
9236 (linux_target_ops)<to_btrace_conf>: Initialize.
9237 * server.c (current_btrace_conf): New.
9238 (handle_btrace_enable): Rename to ...
9239 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
9240 to target_enable_btrace. Update comment. Update users.
9241 (handle_qxfer_btrace_conf): New.
9242 (qxfer_packets): Add btrace-conf entry.
9243 (handle_query): Report qXfer:btrace-conf:read as supported packet.
9244 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
9245 (target_ops)<read_btrace_conf>: New.
9246 (target_enable_btrace): Update parameters.
9247 (target_read_btrace_conf): New.
9248
9249 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
9250
9251 * server.c (handle_btrace_general_set): Remove call to
9252 target_supports_btrace.
9253 (supported_btrace_packets): New.
9254 (handle_query): Call supported_btrace_packets.
9255 * target.h: include btrace-common.h.
9256 (btrace_target_info): Removed.
9257 (supports_btrace, target_supports_btrace): Update parameters.
9258
9259 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
9260
9261 * Makefile.in (SFILES): Add common/btrace-common.c.
9262 (OBS): Add common/btrace-common.o.
9263 (btrace-common.o): Add build rules.
9264 * linux-low: Include btrace-common.h.
9265 (linux_low_read_btrace): Use struct btrace_data. Call
9266 btrace_data_init and btrace_data_fini.
9267
9268 2015-02-06 Pedro Alves <palves@redhat.com>
9269
9270 * thread-db.c (find_new_threads_callback): Add debug output.
9271
9272 2015-02-04 Pedro Alves <palves@redhat.com>
9273
9274 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
9275 (resume_stopped_resumed_lwps): New function.
9276 (linux_wait_for_event_filtered): Use it.
9277
9278 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
9279
9280 * Makefile.in (SFILES): Add linux-personality.c.
9281 (linux-personality.o): New rule.
9282 * configure.srv (srv_linux_obj): Add linux-personality.o to the
9283 list of objects to be built.
9284 * linux-low.c: Include nat/linux-personality.h.
9285 (linux_create_inferior): Remove code to disable address space
9286 randomization (moved to ../nat/linux-personality.c). Create
9287 cleanup to disable address space randomization.
9288
9289 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
9290
9291 * Makefile.in (posix-strerror.o): New rule.
9292 (mingw-strerror.o): Likewise.
9293 * configure: Regenerated.
9294 * configure.ac: Source file ../common/common.host. Initialize new
9295 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
9296
9297 2015-01-14 Yao Qi <yao@codesourcery.com>
9298
9299 * Makefile.in (SFILES): Add nat/ppc-linux.c.
9300 (ppc-linux.o): New rule.
9301 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
9302 * configure.ac: AC_CHECK_FUNCS(getauxval).
9303 * config.in: Re-generated.
9304 * configure: Re-generated.
9305 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
9306 ppc64_64bit_inferior_p
9307
9308 2015-01-14 Yao Qi <yao@codesourcery.com>
9309
9310 * linux-ppc-low.c: Include "nat/ppc-linux.h".
9311 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
9312 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
9313 (PT_ORIG_R3, PT_TRAP): Likewise.
9314 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
9315 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
9316 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
9317
9318 2015-01-10 Joel Brobecker <brobecker@adacore.com>
9319
9320 * i387-fp.c (i387_cache_to_xsave): In look over
9321 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
9322 zmmh_low_space field by use of zmmh_high_space.
9323
9324 2015-01-09 Pedro Alves <palves@redhat.com>
9325
9326 * linux-low.c (step_over_bkpt): Move higher up in the file.
9327 (handle_extended_wait): Don't store the stop_pc here.
9328 (get_stop_pc): Adjust comments and rename to ...
9329 (check_stopped_by_breakpoint): ... this. Record whether the LWP
9330 stopped for a software breakpoint or hardware breakpoint.
9331 (thread_still_has_status_pending_p): New function.
9332 (status_pending_p_callback): Use
9333 thread_still_has_status_pending_p. If the event is no longer
9334 interesting, resume the LWP.
9335 (handle_tracepoints): Add assert.
9336 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
9337 (wstatus_maybe_breakpoint): New function.
9338 (cancel_breakpoint): Delete function.
9339 (check_stopped_by_watchpoint): New function, factored out from
9340 linux_low_filter_event.
9341 (lp_status_maybe_breakpoint): Delete function.
9342 (linux_low_filter_event): Remove filter_ptid argument.
9343 Leave thread group exits pending here. Store the LWP's stop PC.
9344 Always leave events pending.
9345 (linux_wait_for_event_filtered): Pull all events out of the
9346 kernel, and leave them all pending.
9347 (count_events_callback, select_event_lwp_callback): Consider all
9348 events.
9349 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
9350 (select_event_lwp): Only give preference to the stepping LWP in
9351 all-stop mode. Adjust comments.
9352 (ignore_event): New function.
9353 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
9354 references to cancel_breakpoints. Adjust to renames. Also give
9355 equal priority to all LWPs that have had events in non-stop mode.
9356 If reporting a software breakpoint event, unadjust the LWP's PC.
9357 (linux_wait): If linux_wait_1 returned an ignored event, retry.
9358 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
9359 Adjust.
9360 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
9361 (resume_status_pending_p): Use thread_still_has_status_pending_p.
9362 (linux_stopped_by_watchpoint): Adjust.
9363 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
9364 * linux-low.h (enum lwp_stop_reason): New.
9365 (struct lwp_info) <stop_pc>: Adjust comment.
9366 <stopped_by_watchpoint>: Delete field.
9367 <stop_reason>: New field.
9368 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
9369 * mem-break.c (software_breakpoint_inserted_here)
9370 (hardware_breakpoint_inserted_here): New function.
9371 * mem-break.h (software_breakpoint_inserted_here)
9372 (hardware_breakpoint_inserted_here): Declare.
9373 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
9374 (cancel_breakpoints): Delete.
9375 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
9376 (upload_fast_traceframes): Remove references to
9377 cancel_breakpoints.
9378
9379 2015-01-09 Pedro Alves <palves@redhat.com>
9380
9381 * thread-db.c (find_new_threads_callback): Ignore thread if the
9382 kernel thread ID is -1.
9383
9384 2015-01-09 Pedro Alves <palves@redhat.com>
9385
9386 * linux-low.c (linux_attach_fail_reason_string): Move to
9387 nat/linux-ptrace.c, and rename.
9388 (linux_attach_lwp): Update comment.
9389 (attach_proc_task_lwp_callback): New function.
9390 (linux_attach): Adjust to rename and use
9391 linux_proc_attach_tgid_threads.
9392 (linux_attach_fail_reason_string): Delete declaration.
9393
9394 2015-01-01 Joel Brobecker <brobecker@adacore.com>
9395
9396 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
9397 * server.c (gdbserver_version): Likewise.
9398
9399 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
9400
9401 * remote-utils.c: Include ctype.h.
9402 (input_interrupt): Explicitly handle the case when the char
9403 received is the NUL byte. Improve the printing of non-ASCII
9404 characters.
9405
9406 2014-12-16 Joel Brobecker <brobecker@adacore.com>
9407
9408 * linux-low.c (linux_low_filter_event): Update call to
9409 linux_enable_event_reporting following the addition of
9410 a new parameter to that function.
9411
9412 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
9413
9414 PR server/17457
9415 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
9416 (AARCH64_FPCR_REGNO): Likewise.
9417 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
9418 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
9419 (aarch64_store_fpregset): Likewise.
9420
9421 2014-12-15 Joel Brobecker <brobecker@adacore.com>
9422
9423 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
9424 Remove FIXME comment about assumption about N.
9425
9426 2014-12-13 Joel Brobecker <brobecker@adacore.com>
9427
9428 * configure.ac: If large-file support is disabled in GDBserver,
9429 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
9430 * configure: Regenerate.
9431
9432 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9433
9434 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
9435 warning upon ENODATA from ptrace.
9436 * linux-s390-low.c (s390_store_tdb): New.
9437 (s390_regsets): Add regset for NT_S390_TDB.
9438
9439 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9440
9441 * linux-low.c (regsets_store_inferior_registers): Skip regsets
9442 without a fill_function.
9443 * linux-s390-low.c (s390_fill_last_break): Remove.
9444 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
9445 (s390_arch_setup): Use regset's size instead of fill_function for
9446 loop end condition.
9447
9448 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9449
9450 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
9451 the regset's store function when ptrace returned an error.
9452 * regcache.c (get_thread_regcache): Invalidate register cache
9453 before fetching inferior's registers.
9454
9455 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9456
9457 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
9458 while-loop as for-loop.
9459 (regsets_store_inferior_registers): Likewise.
9460
9461 2014-11-28 Yao Qi <yao@codesourcery.com>
9462
9463 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
9464 * config.in, configure: Re-generate.
9465 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
9466 is defined.
9467
9468 2014-11-21 Yao Qi <yao@codesourcery.com>
9469
9470 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
9471 (AC_CHECK_HEADERS): Remove malloc.h.
9472 * configure: Re-generated.
9473 * config.in: Re-generated.
9474 * server.h: Don't include alloca.h and malloc.h.
9475 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
9476 Don't include malloc.h.
9477
9478 2014-11-17 Joel Brobecker <brobecker@adacore.com>
9479
9480 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
9481 corresponding ERRNO check in same block.
9482
9483 2014-11-12 Pedro Alves <palves@redhat.com>
9484
9485 * server.c (cont_thread): Update comment.
9486 (start_inferior, attach_inferior): No longer clear cont_thread.
9487 (handle_v_cont): No longer set cont_thread.
9488 (captured_main): Clear cont_thread each time a GDB connects.
9489
9490 2014-11-12 Pedro Alves <palves@redhat.com>
9491
9492 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
9493 thread, and don't resume all threads if the Hc thread has exited.
9494
9495 2014-11-12 Pedro Alves <palves@redhat.com>
9496
9497 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
9498 the process group instead of to a specific LWP.
9499
9500 2014-10-15 Pedro Alves <palves@redhat.com>
9501
9502 PR server/17487
9503 * win32-arm-low.c (arm_set_thread_context): Remove current_event
9504 parameter.
9505 (arm_set_thread_context): Delete.
9506 (the_low_target): Adjust.
9507 * win32-i386-low.c (debug_registers_changed)
9508 (debug_registers_used): Delete.
9509 (update_debug_registers_callback): New function.
9510 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
9511 needing to update their debug registers.
9512 (win32_get_current_dr): New function.
9513 (x86_dr_low_get_addr, x86_dr_low_get_control)
9514 (x86_dr_low_get_status): Fetch the debug register from the thread
9515 record's context.
9516 (i386_initial_stuff): Adjust.
9517 (i386_get_thread_context): Remove current_event parameter. Don't
9518 clear debug_registers_changed nor copy DR values to
9519 debug_reg_state.
9520 (i386_set_thread_context): Delete.
9521 (i386_prepare_to_resume): New function.
9522 (i386_thread_added): Mark the thread as needing to update irs
9523 debug registers.
9524 (the_low_target): Remove i386_set_thread_context and install
9525 i386_prepare_to_resume.
9526 * win32-low.c (win32_get_thread_context): Adjust.
9527 (win32_set_thread_context): Use SetThreadContext
9528 directly.
9529 (win32_prepare_to_resume): New function.
9530 (win32_require_context): New function, factored out from ...
9531 (thread_rec): ... this.
9532 (continue_one_thread): Call win32_prepare_to_resume on each thread
9533 we're about to continue.
9534 (win32_resume): Call win32_prepare_to_resume on the event thread.
9535 * win32-low.h (struct win32_thread_info)
9536 <debug_registers_changed>: New field.
9537 (struct win32_target_ops): Change prototype of set_thread_context,
9538 delete set_thread_context and add prepare_to_resume.
9539 (win32_require_context): New declaration.
9540
9541 2014-10-08 Gary Benson <gbenson@redhat.com>
9542
9543 * server.h: Do not include common-exceptions.h.
9544
9545 2014-10-08 Gary Benson <gbenson@redhat.com>
9546
9547 * server.h: Do not include cleanups.h.
9548
9549 2014-09-30 James Hogan <james.hogan@imgtec.com>
9550
9551 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
9552 mips64-dsp-linux.c.
9553
9554 2014-09-23 Yao Qi <yao@codesourcery.com>
9555
9556 * linux-low.c (lp_status_maybe_breakpoint): New function.
9557 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
9558 (count_events_callback): Likewise.
9559 (select_event_lwp_callback): Likewise.
9560 (cancel_breakpoints_callback): Likewise.
9561
9562 2014-09-19 Don Breazeal <donb@codesourcery.com>
9563
9564 * linux-low.c (handle_extended_wait): Call
9565 linux_ptrace_get_extended_event.
9566 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
9567 linux_is_extended_waitstatus.
9568
9569 2014-09-16 Joel Brobecker <brobecker@adacore.com>
9570
9571 * Makefile.in (CPPFLAGS): Define.
9572 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
9573 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
9574
9575 2014-09-16 Gary Benson <gbenson@redhat.com>
9576
9577 * inferiors.h (current_inferior): Renamed as...
9578 (current_thread): New variable. All uses updated.
9579 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
9580 (maybe_move_out_of_jump_pad): Likewise.
9581 (cancel_breakpoint): Likewise.
9582 (linux_low_filter_event): Likewise.
9583 (wait_for_sigstop): Likewise.
9584 (linux_resume_one_lwp): Likewise.
9585 (need_step_over_p): Likewise.
9586 (start_step_over): Likewise.
9587 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
9588 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
9589 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
9590 and save_inferior as saved_thread.
9591 * regcache.c (get_thread_regcache): Renamed saved_inferior as
9592 saved_thread.
9593 (regcache_invalidate_thread): Likewise.
9594 * remote-utils.c (prepare_resume_reply): Likewise.
9595 * thread-db.c (thread_db_get_tls_address): Likewise.
9596 (disable_thread_event_reporting): Likewise.
9597 (remove_thread_event_breakpoints): Likewise.
9598 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
9599 as saved_thread.
9600 * target.h (set_desired_inferior): Renamed as...
9601 (set_desired_thread): New declaration. All uses updated.
9602 * server.c (myresume): Updated comment to reference thread instead
9603 of inferior.
9604 (handle_serial_event): Likewise.
9605 (handle_target_event): Likewise.
9606
9607 2014-09-12 Tom Tromey <tromey@redhat.com>
9608 Gary Benson <gbenson@redhat.com>
9609
9610 * regcache.h: Include common-regcache.h.
9611 (regcache_read_pc): Don't declare.
9612 * regcache.c (get_thread_regcache_for_ptid): New function.
9613
9614 2014-09-11 Tom Tromey <tromey@redhat.com>
9615 Gary Benson <gbenson@redhat.com>
9616
9617 * symbol.c: New file.
9618 * Makefile.in (SFILES): Add symbol.c.
9619 (OBS): Add symbol.o.
9620
9621 2014-09-11 Gary Benson <gbenson@redhat.com>
9622
9623 * target.c (target_stop_ptid, target_continue_ptid): New
9624 functions.
9625
9626 2014-09-11 Tom Tromey <tromey@redhat.com>
9627 Gary Benson <gbenson@redhat.com>
9628
9629 * target.h: Include target/target.h.
9630 * target.c (target_read_memory, target_read_uint32)
9631 (target_write_memory): New functions.
9632
9633 2014-09-11 Gary Benson <gbenson@redhat.com>
9634
9635 * server.h (debug_hw_points): Don't declare.
9636 * server.c (debug_hw_points): Don't define. Replace all uses
9637 with show_debug_regs.
9638 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
9639 all uses with show_debug_regs.
9640
9641 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
9642
9643 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
9644 endianness into account.
9645 (ppc_supply_ptrace_register): Likewise.
9646
9647 2014-09-03 James Hogan <james.hogan@imgtec.com>
9648
9649 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
9650 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
9651
9652 2014-09-03 Gary Benson <gbenson@redhat.com>
9653
9654 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
9655 ALL_DEBUG_ADDRESS_REGISTERS.
9656
9657 2014-09-02 Gary Benson <gbenson@redhat.com>
9658
9659 * i386-low.h: Renamed as...
9660 * x86-low.h: New file. All type, function and variable name
9661 prefixes changed from "i386_" to "x86_". All references updated.
9662 * i386-low.c: Renamed as...
9663 * x86-low.c: New file. All type, function and variable name
9664 prefixes changed from "i386_" to "x86_". All references updated.
9665
9666 2014-09-02 Gary Benson <gbenson@redhat.com>
9667
9668 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
9669 (x86_linux_new_thread): Likewise.
9670
9671 2014-08-29 Gary Benson <gbenson@redhat.com>
9672
9673 * server.h (setjmp.h): Do not include.
9674 (toplevel): Do not declare.
9675 (common-exceptions.h): Include.
9676 (cleanups.h): Likewise.
9677 * server.c (toplevel): Do not define.
9678 (exit_code): New static global.
9679 (detach_or_kill_for_exit_cleanup): New function.
9680 (main): New function. Original main renamed to...
9681 (captured_main): New function.
9682 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
9683
9684 2014-08-29 Gary Benson <gbenson@redhat.com>
9685
9686 * Makefile.in (SFILES): Add common/common-exceptions.c.
9687 (OBS): Add common-exceptions.o.
9688 (common-exceptions.o): New rule.
9689 * utils.c (prepare_to_throw_exception): New function.
9690
9691 2014-08-29 Gary Benson <gbenson@redhat.com>
9692
9693 * config.in: Regenerate.
9694 * configure: Likewise.
9695
9696 2014-08-29 Gary Benson <gbenson@redhat.com>
9697
9698 * Makefile.in (SFILES): Add common/cleanups.c.
9699 (OBS): cleanups.o.
9700 (cleanups.o): New rule.
9701
9702 2014-08-29 Gary Benson <gbenson@redhat.com>
9703
9704 * utils.c (internal_vwarning): New function.
9705
9706 2014-08-28 Gary Benson <gbenson@redhat.com>
9707
9708 * utils.h (fatal): Remove declaration.
9709 * utils.c (fatal): Remove function.
9710
9711 2014-08-28 Gary Benson <gbenson@redhat.com>
9712
9713 * tracepoint.c (gdb_agent_init): Replace fatal with
9714 perror_with_name.
9715 (initialize_tracepoint): Likewise.
9716
9717 2014-08-28 Gary Benson <gbenson@redhat.com>
9718
9719 * remote-utils.c (remote_prepare): Replace fatal with error.
9720
9721 2014-08-28 Gary Benson <gbenson@redhat.com>
9722
9723 * linux-low.c (linux_async): Replace fatal with warning.
9724 Tidy up and return.
9725 (linux_start_non_stop): Return -1 if linux_async failed.
9726
9727 2014-08-28 Gary Benson <gbenson@redhat.com>
9728
9729 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
9730 gdb_assert.
9731 (i386_dr_low_get_addr): Remove vague comment.
9732 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
9733 gdb_assert.
9734
9735 2014-08-28 Gary Benson <gbenson@redhat.com>
9736
9737 * inferiors.c (get_thread_process): Replace check with gdb_assert.
9738 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
9739 internal_error.
9740 (linux_resume_one_lwp): Likewise.
9741 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
9742 gdb_assert.
9743 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
9744 with internal_error.
9745 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
9746 (init_register_cache): Replace fatal with gdb_assert_not_reached.
9747 (find_register_by_name): Replace fatal with internal_error.
9748 (find_regno): Likewise.
9749 * tdesc.c (init_target_desc): Replace check with gdb_assert.
9750 * thread-db.c (thread_db_create_event): Likewise.
9751 (thread_db_load_search): Likewise.
9752 (try_thread_db_load_1): Likewise.
9753 * tracepoint.c (get_jump_space_head): Replace fatal with
9754 internal_error.
9755 (claim_trampoline_space): Likewise.
9756 (have_fast_tracepoint_trampoline_buffer): Likewise.
9757 (cmd_qtstart): Likewise.
9758 (stop_tracing): Likewise.
9759 (fast_tracepoint_collecting): Likewise.
9760 (target_malloc): Likewise.
9761 (download_tracepoint): Likewise.
9762 (download_trace_state_variables): Replace check with gdb_assert.
9763 (upload_fast_traceframes): Replace fatal with internal_error.
9764
9765 2014-08-19 Tom Tromey <tromey@redhat.com>
9766 Gary Benson <gbenson@redhat.com>
9767
9768 * Makefile.in (SFILES): Add common/common-debug.c.
9769 (OBS): Add common-debug.o.
9770 (common-debug.o): New rule.
9771 * debug.h (debug_printf): Don't declare.
9772 * debug.c (debug_printf): Renamed and rewritten as...
9773 (debug_vprintf): New function.
9774
9775 2014-08-19 Gary Benson <gbenson@redhat.com>
9776
9777 * utils.h: Do not include print-utils.h.
9778
9779 2014-08-19 Tom Tromey <tromey@redhat.com>
9780 Gary Benson <gbenson@redhat.com>
9781
9782 * server.h: Add static assertion.
9783 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
9784
9785 2014-08-19 Tom Tromey <tromey@redhat.com>
9786 Gary Benson <gbenson@redhat.com>
9787
9788 * Makefile.in (SFILES): Add common/errors.c.
9789 (OBS): Add errors.o.
9790 (IPA_OBS): Add errors-ipa.o.
9791 (errors.o): New rule.
9792 (errors-ipa.o): Likewise.
9793 * utils.h (perror_with_name, error, warning): Don't declare.
9794 * utils.c (warning): Renamed and rewritten as...
9795 (vwarning): New function.
9796 (error): Renamed and rewritten as...
9797 (verror): New function.
9798 (internal_error): Renamed and rewritten as...
9799 (internal_verror): New function.
9800
9801 2014-08-07 Gary Benson <gbenson@redhat.com>
9802
9803 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
9804 * configure: Regenerate.
9805 * config.in: Likewise.
9806 * server.h: Do not include errno.h.
9807 * event-loop.c: Likewise.
9808 * hostio-errno.c: Likewise.
9809 * linux-low.c: Likewise.
9810 * remote-utils.c: Likewise.
9811 * spu-low.c: Likewise.
9812 * utils.c: Likewise.
9813 * gdbreplay.c: Unconditionally include errno.h.
9814
9815 2014-08-07 Gary Benson <gbenson@redhat.com>
9816
9817 * server.h: Do not include string.h.
9818 * event-loop.c: Likewise.
9819 * linux-low.c: Likewise.
9820 * regcache.c: Likewise.
9821 * remote-utils.c: Likewise.
9822 * spu-low.c: Likewise.
9823 * utils.c: Likewise.
9824
9825 2014-08-07 Gary Benson <gbenson@redhat.com>
9826
9827 * server.h: Do not include gdb_assert.h.
9828
9829 2014-08-07 Gary Benson <gbenson@redhat.com>
9830
9831 * server.h: Do not include common-utils.h.
9832
9833 2014-08-07 Gary Benson <gbenson@redhat.com>
9834
9835 * server.h: Do not include ptid.h.
9836 * notif.h: Likewise.
9837
9838 2014-08-07 Gary Benson <gbenson@redhat.com>
9839
9840 * server.h: Do not include gdb_locale.h.
9841
9842 2014-08-07 Gary Benson <gbenson@redhat.com>
9843
9844 * server.h: Do not include gdb/signals.h.
9845 * win32-low.c: Likewise.
9846
9847 2014-08-07 Gary Benson <gbenson@redhat.com>
9848
9849 * server.h: Do not include pathmax.h.
9850
9851 2014-08-07 Gary Benson <gbenson@redhat.com>
9852
9853 * server.h: Do not include libiberty.h.
9854 * linux-bfin-low.c: Likewise.
9855
9856 2014-08-07 Gary Benson <gbenson@redhat.com>
9857
9858 * server.h: Do not include ansidecl.h.
9859
9860 2014-08-07 Gary Benson <gbenson@redhat.com>
9861
9862 * linux-x86-low.c: Do not include stddef.h.
9863 * lynx-ppc-low.c: Likewise.
9864 * tracepoint.c: Likewise.
9865
9866 2014-08-07 Gary Benson <gbenson@redhat.com>
9867
9868 * server.h: Do not include stdarg.h.
9869 * nto-low.c: Likewise.
9870
9871 2014-08-07 Gary Benson <gbenson@redhat.com>
9872
9873 * server.h: Do not include stdlib.h.
9874 * inferiors.c: Likewise.
9875 * linux-low.c: Likewise.
9876 * regcache.c: Likewise.
9877 * spu-low.c: Likewise.
9878 * tracepoint.c: Likewise.
9879 * utils.c: Likewise.
9880
9881 2014-08-07 Gary Benson <gbenson@redhat.com>
9882
9883 * server.h: Do not include stdio.h.
9884 * linux-low.c: Likewise.
9885 * remote-utils.c: Likewise.
9886 * spu-low.c: Likewise.
9887 * utils.c: Likewise.
9888 * wincecompat.c: Likewise.
9889
9890 2014-08-06 Gary Benson <gbenson@redhat.com>
9891
9892 * regcache.c (init_register_cache): Move conditionals inside if.
9893
9894 2014-08-06 Gary Benson <gbenson@redhat.com>
9895
9896 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
9897
9898 2014-07-31 Gary Benson <gbenson@redhat.com>
9899
9900 * ax.h: Do not include server.h.
9901 * gdbthread.h: Likewise.
9902 * lynx-low.h: Likewise.
9903 * notif.h: Likewise.
9904
9905 2014-07-30 Gary Benson <gbenson@redhat.com>
9906
9907 * server.h: Include common-defs.h.
9908 Do not include config.h or build-gnulib-gdbserver/config.h.
9909
9910 2014-07-30 Gary Benson <gbenson@redhat.com>
9911
9912 * hostio-errno.c: Move server.h to top of includes list.
9913 * inferiors.c: Likewise.
9914 * linux-x86-low.c: Likewise.
9915 * notif.c: Include server.h.
9916
9917 2014-07-24 Tom Tromey <tromey@redhat.com>
9918 Gary Benson <gbenson@redhat.com>
9919
9920 * server.h (CORE_ADDR): Now unsigned.
9921
9922 2014-07-16 Pedro Alves <palves@redhat.com>
9923
9924 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
9925
9926 2014-07-15 Pedro Alves <palves@redhat.com>
9927
9928 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
9929 copy.
9930
9931 2014-07-11 Pedro Alves <palves@redhat.com>
9932
9933 * linux-low.c (kill_wait_lwp): New function, based on
9934 kill_one_lwp_callback, but use my_waitpid directly.
9935 (kill_one_lwp_callback, linux_kill): Use it.
9936
9937 2014-06-23 Pedro Alves <palves@redhat.com>
9938
9939 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
9940 before setting DR0..DR3.
9941
9942 2014-06-20 Gary Benson <gbenson@redhat.com>
9943
9944 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
9945 * configure: Regenerated.
9946 * config.in: Likewise.
9947
9948 2014-06-20 Gary Benson <gbenson@redhat.com>
9949
9950 * Makefile.in (SFILES): Update locations for files moved
9951 from common to nat.
9952 (object file files): Reordered.
9953
9954 2014-06-20 Gary Benson <gbenson@redhat.com>
9955
9956 * i386-low.h (i386_dr_low_can_set_addr): Removed.
9957 (i386_dr_low_set_addr): Likewise.
9958 (i386_dr_low_get_addr): Likewise.
9959 (i386_dr_low_can_set_control): Likewise.
9960 (i386_dr_low_set_control): Likewise.
9961 (i386_dr_low_get_control): Likewise.
9962 (i386_dr_low_get_status): Likewise.
9963 (i386_get_debug_register_length): Likewise.
9964 * linux-x86-low.c (i386_dr_low_set_addr):
9965 Changed signature. Made static.
9966 (i386_dr_low_get_addr): Likewise.
9967 (i386_dr_low_set_control): Likewise.
9968 (i386_dr_low_get_control): Likewise.
9969 (i386_dr_low_get_status): Likewise.
9970 (i386_dr_low): New global variable.
9971 * win32-i386-low.c (i386_dr_low_set_addr):
9972 Changed signature. Made static.
9973 (i386_dr_low_get_addr): Likewise.
9974 (i386_dr_low_set_control): Likewise.
9975 (i386_dr_low_get_control): Likewise.
9976 (i386_dr_low_get_status): Likewise.
9977 (i386_dr_low): New global variable.
9978
9979 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
9980
9981 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
9982 * Makefile.in (AR, AR_FLAGS): Define.
9983 * configure: Regenerate.
9984
9985 2014-06-19 Gary Benson <gbenson@redhat.com>
9986
9987 * Makefile.in (i386-dregs.o): New rule.
9988 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
9989 * i386-low.c (target.h): Remove include.
9990 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
9991 (DR_CONTROL_SHIFT): Likewise.
9992 (DR_CONTROL_SIZE): Likewise.
9993 (DR_RW_EXECUTE): Likewise.
9994 (DR_RW_WRITE): Likewise.
9995 (DR_RW_READ): Likewise.
9996 (DR_RW_IORW): Likewise.
9997 (DR_LEN_1): Likewise.
9998 (DR_LEN_2): Likewise.
9999 (DR_LEN_4): Likewise.
10000 (DR_LEN_8): Likewise.
10001 (DR_LOCAL_ENABLE_SHIFT): Likewise.
10002 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
10003 (DR_ENABLE_SIZE): Likewise.
10004 (DR_LOCAL_SLOWDOWN): Likewise.
10005 (DR_GLOBAL_SLOWDOWN): Likewise.
10006 (DR_CONTROL_RESERVED): Likewise.
10007 (I386_DR_CONTROL_MASK): Likewise.
10008 (I386_DR_VACANT): Likewise.
10009 (I386_DR_LOCAL_ENABLE): Likewise.
10010 (I386_DR_GLOBAL_ENABLE): Likewise.
10011 (I386_DR_DISABLE): Likewise.
10012 (I386_DR_SET_RW_LEN): Likewise.
10013 (I386_DR_GET_RW_LEN): Likewise.
10014 (I386_DR_WATCH_HIT): Likewise.
10015 (i386_wp_op_t): Likewise.
10016 (i386_show_dr): Likewise.
10017 (i386_length_and_rw_bits): Likewise.
10018 (i386_insert_aligned_watchpoint): Likewise.
10019 (i386_remove_aligned_watchpoint): Likewise.
10020 (i386_handle_nonaligned_watchpoint): Likewise.
10021 i386_update_inferior_debug_regs(): Likewise.
10022 (i386_dr_insert_watchpoint): Likewise.
10023 (i386_dr_remove_watchpoint): Likewise.
10024 (i386_dr_region_ok_for_watchpoint): Likewise.
10025 (i386_dr_stopped_data_address): Likewise.
10026 (i386_dr_stopped_by_watchpoint): Likewise.
10027
10028 2014-06-19 Gary Benson <gbenson@redhat.com>
10029
10030 * i386-low.c (i386_dr_show): Renamed to
10031 i386_show_dr and made static. All uses updated.
10032 (i386_dr_length_and_rw_bits): Renamed to
10033 i386_length_and_rw_bits and made static.
10034 All uses updated.
10035 (i386_dr_insert_aligned_watchpoint): Renamed to
10036 i386_insert_aligned_watchpoint and made static.
10037 All uses updated.
10038 (i386_dr_remove_aligned_watchpoint): Renamed to
10039 i386_remove_aligned_watchpoint and made static.
10040 All uses updated.
10041 (i386_dr_update_inferior_debug_regs): Renamed to
10042 i386_update_inferior_debug_regs and made static.
10043 All uses updated.
10044
10045 2014-06-18 Gary Benson <gbenson@redhat.com>
10046
10047 * i386-low.h (i386_dr_low_can_set_addr): New macro.
10048 (i386_dr_low_can_set_control): Likewise.
10049 (i386_get_debug_register_length): Likewise.
10050 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
10051 (i386_dr_low_can_set_control): Likewise.
10052 (i386_get_debug_register_length): Likewise.
10053
10054 2014-06-17 Gary Benson <gbenson@redhat.com>
10055
10056 * i386-low.h (i386-dregs.h): New include.
10057 (DR_FIRSTADDR): Now in i386-dregs.h.
10058 (DR_LASTADDR): Likewise.
10059 (DR_NADDR): Likewise.
10060 (DR_STATUS): Likewise.
10061 (DR_CONTROL): Likewise.
10062 (i386_debug_reg_state): Likewise.
10063 (i386_dr_insert_watchpoint): Likewise.
10064 (i386_dr_remove_watchpoint): Likewise.
10065 (i386_dr_region_ok_for_watchpoint): Likewise.
10066 (i386_dr_stopped_data_address): Likewise.
10067 (i386_dr_stopped_by_watchpoint): Likewise.
10068 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
10069
10070 2014-06-18 Gary Benson <gbenson@redhat.com>
10071
10072 * i386-low.h (i386_low_insert_watchpoint): Renamed to
10073 i386_dr_insert_watchpoint.
10074 (i386_low_remove_watchpoint): Renamed to
10075 i386_dr_remove_watchpoint.
10076 (i386_low_region_ok_for_watchpoint): Renamed to
10077 i386_dr_region_ok_for_watchpoint.
10078 (i386_low_stopped_data_address): Renamed to
10079 i386_dr_stopped_data_address.
10080 (i386_low_stopped_by_watchpoint): Renamed to
10081 i386_dr_stopped_by_watchpoint.
10082 * i386-low.c (i386_show_dr): Renamed to
10083 i386_dr_show and made nonstatic. All uses updated.
10084 (i386_length_and_rw_bits): Renamed to
10085 i386_dr_length_and_rw_bits and made nonstatic.
10086 All uses updated.
10087 (i386_insert_aligned_watchpoint): Renamed to
10088 i386_dr_insert_aligned_watchpoint and made nonstatic.
10089 All uses updated.
10090 (i386_remove_aligned_watchpoint): Renamed to
10091 i386_dr_remove_aligned_watchpoint and made nonstatic.
10092 All uses updated.
10093 (i386_update_inferior_debug_regs): Renamed to
10094 i386_dr_update_inferior_debug_regs and made nonstatic.
10095 All uses updated.
10096 (i386_low_insert_watchpoint): Renamed to
10097 i386_dr_insert_watchpoint. All uses updated.
10098 (i386_low_remove_watchpoint): Renamed to
10099 i386_dr_remove_watchpoint. All uses updated.
10100 (i386_low_region_ok_for_watchpoint): Renamed to
10101 i386_dr_region_ok_for_watchpoint. All uses updated.
10102 (i386_low_stopped_data_address): Renamed to
10103 i386_dr_stopped_data_address. All uses updated.
10104 (i386_low_stopped_by_watchpoint): Renamed to
10105 i386_dr_stopped_by_watchpoint. All uses updated.
10106
10107 2014-06-18 Gary Benson <gbenson@redhat.com>
10108
10109 * i386-low.c (i386_dr_low_can_set_addr): New macro.
10110 (i386_dr_low_can_set_control): Likewise.
10111 (i386_insert_aligned_watchpoint): New check.
10112
10113 2014-06-18 Gary Benson <gbenson@redhat.com>
10114
10115 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
10116 Renamed to state.
10117
10118 2014-06-18 Gary Benson <gbenson@redhat.com>
10119
10120 * i386-low.c (i386_length_and_rw_bits): Use internal_error
10121 instead of fatal and error.
10122 (i386_handle_nonaligned_watchpoint): Likewise.
10123
10124 2014-06-18 Gary Benson <gbenson@redhat.com>
10125
10126 * i386-low.c (i386_get_debug_register_length): New macro.
10127 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
10128 (i386_show_dr): Use debug_printf instead of fprintf. Use
10129 phex to format values.
10130
10131 2014-06-18 Gary Benson <gbenson@redhat.com>
10132
10133 * i386-low.h: Comment changes.
10134 * i386-low.c: Likewise.
10135
10136 2014-06-18 Gary Benson <gbenson@redhat.com>
10137
10138 * i386-low.c: Whitespace changes.
10139
10140 2014-06-12 Tom Tromey <tromey@redhat.com>
10141
10142 * utils.c (freeargv): Remove.
10143
10144 2014-06-12 Tom Tromey <tromey@redhat.com>
10145
10146 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
10147 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
10148 (parse_debug_format_options): Likewise.
10149 (gdbserver_usage): Likewise.
10150 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
10151 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
10152 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
10153 against libiberty.
10154 ($(LIBGNU)): Depend on libiberty.
10155 (all-lib): Recurse into all subdirs.
10156 (install-only): Invoke "install" target in subdirs.
10157 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
10158 targets.
10159 * configure: Rebuild.
10160 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
10161 for vasprintf, vsnprintf, or gettimeofday.
10162 * configure.srv: Don't add safe-ctype.o or lbasename.o to
10163 srv_tgtobj.
10164
10165 2014-06-05 Joel Brobecker <brobecker@adacore.com>
10166
10167 * development.sh: Delete.
10168 * Makefile.in (config.status): Adjust dependency on development.sh.
10169 * configure.ac: Adjust development.sh source call.
10170 * configure: Regenerate.
10171
10172 2014-06-02 Pedro Alves <palves@redhat.com>
10173
10174 * ax.c (gdb_free_agent_expr): New function.
10175 * ax.h (gdb_free_agent_expr): New declaration.
10176 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
10177 list.
10178 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
10179 static.
10180 (clear_breakpoint_conditions_and_commands): New function.
10181 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
10182 (clear_breakpoint_conditions_and_commands): New declaration.
10183
10184 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
10185
10186 * linux-aarch64-low.c (asm/ptrace.h): Include.
10187
10188 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10189
10190 Fix TLS access for -static -pthread.
10191 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
10192 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
10193 (thread_db_load_search, try_thread_db_load_1): Initialize it.
10194
10195 2014-05-20 Pedro Alves <palves@redhat.com>
10196
10197 * linux-aarch64-low.c (aarch64_insert_point)
10198 (aarch64_remove_point): No longer check whether the type is
10199 supported here. Adjust to new interface.
10200 (the_low_target): Install aarch64_supports_z_point_type as
10201 supports_z_point_type method.
10202 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
10203 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
10204 instead of a Z packet char. Adjust.
10205 (arm_supports_z_point_type): New function.
10206 (arm_insert_point, arm_remove_point): Adjust to new interface.
10207 (the_low_target): Install arm_supports_z_point_type.
10208 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
10209 (cris_insert_point, cris_remove_point): Adjust to new interface.
10210 Don't check whether the type is supported here.
10211 (the_low_target): Install cris_supports_z_point_type.
10212 * linux-low.c (linux_supports_z_point_type): New function.
10213 (linux_insert_point, linux_remove_point): Adjust to new interface.
10214 * linux-low.h (struct linux_target_ops) <insert_point,
10215 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
10216 raw_breakpoint pointer parameter.
10217 <supports_z_point_type>: New method.
10218 * linux-mips-low.c (mips_supports_z_point_type): New function.
10219 (mips_insert_point, mips_remove_point): Adjust to new interface.
10220 Use mips_supports_z_point_type.
10221 (the_low_target): Install mips_supports_z_point_type.
10222 * linux-ppc-low.c (the_low_target): Install NULL as
10223 supports_z_point_type method.
10224 * linux-s390-low.c (the_low_target): Install NULL as
10225 supports_z_point_type method.
10226 * linux-sparc-low.c (the_low_target): Install NULL as
10227 supports_z_point_type method.
10228 * linux-x86-low.c (x86_supports_z_point_type): New function.
10229 (x86_insert_point): Adjust to new insert_point interface. Use
10230 insert_memory_breakpoint. Adjust to new
10231 i386_low_insert_watchpoint interface.
10232 (x86_remove_point): Adjust to remove_point interface. Use
10233 remove_memory_breakpoint. Adjust to new
10234 i386_low_remove_watchpoint interface.
10235 (the_low_target): Install x86_supports_z_point_type.
10236 * lynx-low.c (lynx_target_ops): Install NULL as
10237 supports_z_point_type callback.
10238 * nto-low.c (nto_supports_z_point_type): New.
10239 (nto_insert_point, nto_remove_point): Adjust to new interface.
10240 (nto_target_ops): Install nto_supports_z_point_type.
10241 * mem-break.c: Adjust intro comment.
10242 (struct raw_breakpoint) <raw_type, size>: New fields.
10243 <inserted>: Update comment.
10244 <shlib_disabled>: Delete field.
10245 (enum bkpt_type) <gdb_breakpoint>: Delete value.
10246 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
10247 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
10248 (raw_bkpt_type_to_target_hw_bp_type): New function.
10249 (find_enabled_raw_code_breakpoint_at): New function.
10250 (find_raw_breakpoint_at): New type and size parameters. Use them.
10251 (insert_memory_breakpoint): New function, based off
10252 set_raw_breakpoint_at.
10253 (remove_memory_breakpoint): New function.
10254 (set_raw_breakpoint_at): Reimplement.
10255 (set_breakpoint): New, based on set_breakpoint_at.
10256 (set_breakpoint_at): Reimplement.
10257 (delete_raw_breakpoint): Go through the_target->remove_point
10258 instead of assuming memory breakpoints.
10259 (find_gdb_breakpoint_at): Delete.
10260 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
10261 (find_gdb_breakpoint): New function.
10262 (set_gdb_breakpoint_at): Delete.
10263 (z_type_supported): New function.
10264 (set_gdb_breakpoint_1): New function, loosely based off
10265 set_gdb_breakpoint_at.
10266 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
10267 (delete_gdb_breakpoint_at): Delete.
10268 (delete_gdb_breakpoint_1): New function, loosely based off
10269 delete_gdb_breakpoint_at.
10270 (delete_gdb_breakpoint): New function.
10271 (clear_gdb_breakpoint_conditions): Rename to ...
10272 (clear_breakpoint_conditions): ... this. Don't handle a NULL
10273 breakpoint.
10274 (add_condition_to_breakpoint): Make static.
10275 (add_breakpoint_condition): Take a struct breakpoint pointer
10276 instead of an address. Adjust.
10277 (gdb_condition_true_at_breakpoint): Rename to ...
10278 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
10279 z_type parameter.
10280 (gdb_condition_true_at_breakpoint): Reimplement.
10281 (add_breakpoint_commands): Take a struct breakpoint pointer
10282 instead of an address. Adjust.
10283 (gdb_no_commands_at_breakpoint): Rename to ...
10284 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
10285 parameter. Return true if no breakpoint was found. Change debug
10286 output.
10287 (gdb_no_commands_at_breakpoint): Reimplement.
10288 (run_breakpoint_commands): Rename to ...
10289 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
10290 and change return type to boolean.
10291 (run_breakpoint_commands): New function.
10292 (gdb_breakpoint_here): Also check for Z1 breakpoints.
10293 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
10294 breakpoint. Go through the_target->remove_point instead of
10295 assuming memory breakpoint.
10296 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
10297 software and hardware breakpoints.
10298 (reinsert_raw_breakpoint): Go through the_target->insert_point
10299 instead of assuming memory breakpoint.
10300 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
10301 software and hardware breakpoints.
10302 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
10303 Check both software and hardware breakpoints.
10304 (validate_inserted_breakpoint): Assert the breakpoint is a
10305 software breakpoint. Set the inserted flag to -1 instead of
10306 setting shlib_disabled.
10307 (delete_disabled_breakpoints): Adjust.
10308 (validate_breakpoints): Only validate software breakpoints.
10309 Adjust to inserted flag change.
10310 (check_mem_read, check_mem_write): Skip breakpoint types other
10311 than software breakpoints. Adjust to inserted flag change.
10312 * mem-break.h (enum raw_bkpt_type): New enum.
10313 (raw_breakpoint, struct process_info): Forward declare.
10314 (Z_packet_to_target_hw_bp_type): Delete declaration.
10315 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
10316 (set_gdb_breakpoint, delete_gdb_breakpoint)
10317 (clear_breakpoint_conditions): New declarations.
10318 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
10319 (breakpoint_inserted_here): Update comment.
10320 (add_breakpoint_condition, add_breakpoint_commands): Replace
10321 address parameter with a breakpoint pointer parameter.
10322 (gdb_breakpoint_here): Update comment.
10323 (delete_gdb_breakpoint_at): Delete.
10324 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
10325 * server.c (process_point_options): Take a struct breakpoint
10326 pointer instead of an address. Adjust.
10327 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
10328 delete_gdb_breakpoint.
10329 * spu-low.c (spu_target_ops): Install NULL as
10330 supports_z_point_type method.
10331 * target.h: Include mem-break.h.
10332 (struct target_ops) <prepare_to_access_memory>: Update comment.
10333 <supports_z_point_type>: New field.
10334 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
10335 instead of a char. Also take a raw breakpoint pointer.
10336 * win32-arm-low.c (the_low_target): Install NULL as
10337 supports_z_point_type.
10338 * win32-i386-low.c (i386_supports_z_point_type): New function.
10339 (i386_insert_point, i386_remove_point): Adjust to new interface.
10340 (the_low_target): Install i386_supports_z_point_type.
10341 * win32-low.c (win32_supports_z_point_type): New function.
10342 (win32_insert_point, win32_remove_point): Adjust to new interface.
10343 (win32_target_ops): Install win32_supports_z_point_type.
10344 * win32-low.h (struct win32_target_ops):
10345 <supports_z_point_type>: New method.
10346 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
10347 instead of a char. Also take a raw breakpoint pointer.
10348
10349 2014-05-20 Pedro Alves <palves@redhat.com>
10350
10351 * mem-break.h: Include break-common.h.
10352 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
10353 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
10354 (Z_packet_to_target_hw_bp_type): New declaration.
10355 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
10356 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
10357 (Z_PACKET_ACCESS_WP): Delete macros.
10358 (Z_packet_to_hw_type): Delete function.
10359 * i386-low.h: Don't include break-common.h here.
10360 (Z_packet_to_hw_type): Delete declaration.
10361 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
10362 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
10363 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
10364 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
10365 * linux-aarch64-low.c: Don't include break-common.h here.
10366 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
10367 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
10368 (Z_packet_to_target_hw_bp_type): Delete function.
10369 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
10370 function.
10371 (mips_insert_point, mips_remove_point): Use
10372 Z_packet_to_target_hw_bp_type.
10373
10374 2014-05-20 Pedro Alves <palves@redhat.com>
10375
10376 * linux-aarch64-low.c: Include break-common.h.
10377 (enum target_point_type): Delete.
10378 (Z_packet_to_point_type): Rename to ...
10379 (Z_packet_to_target_hw_bp_type): ... this, and return a
10380 target_hw_bp_type instead.
10381 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
10382 instead of an enum target_point_type.
10383 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
10384 breakpoint type.
10385 (aarch64_dr_state_insert_one_point)
10386 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
10387 (aarch64_handle_aligned_watchpoint)
10388 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
10389 Take an enum target_hw_bp_type instead of an enum
10390 target_point_type.
10391 (aarch64_supports_z_point_type): New function.
10392 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
10393 use Z_packet_to_target_hw_bp_type.
10394
10395 2014-05-20 Joel Brobecker <brobecker@adacore.com>
10396
10397 * configure.ac: Only use -Werror by default when DEVELOPMENT
10398 is true.
10399 * configure: Regenerate.
10400
10401 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
10402
10403 Fix gdbserver qGetTLSAddr for x86_64 -m32.
10404 * linux-x86-low.c (X86_64_USER_REGS): New.
10405 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
10406
10407 2014-04-28 Yao Qi <yao@codesourcery.com>
10408
10409 * Makefile.in (i386-avx512.c): Fix the typo of generated file
10410 name.
10411
10412 2014-04-25 Pedro Alves <palves@redhat.com>
10413
10414 PR server/16255
10415 * linux-low.c (linux_attach_fail_reason_string): New function.
10416 (linux_attach_lwp): Delete.
10417 (linux_attach_lwp_1): Rename to ...
10418 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
10419 argument. Remove "initial" parameter. Return int instead of
10420 void. Don't error or warn here.
10421 (linux_attach): Adjust to call linux_attach_lwp. Call error on
10422 failure to attach to the tgid. Call warning when failing to
10423 attach to an lwp.
10424 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
10425 argument. Remove "initial" parameter. Return int instead of
10426 void. Don't error or warn here.
10427 (linux_attach_fail_reason_string): New declaration.
10428 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
10429 interface change. Use linux_attach_fail_reason_string.
10430
10431 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
10432 Walfred Tedeschi <walfred.tedeschi@intel.com>
10433
10434 * Makefile.in: Added rules to handle new files
10435 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
10436 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
10437 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
10438 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
10439 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
10440 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
10441 x32-avx512-linux.o.
10442 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
10443 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
10444 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
10445 i386/x32-avx512.xml.
10446 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
10447 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
10448 i386/x32-avx512-linux.xml.
10449 * i387-fp.c (num_avx512_k_registers): New constant for number
10450 of K registers.
10451 (num_avx512_zmmh_low_registers): New constant for number of
10452 lower ZMM registers (0-15).
10453 (num_avx512_zmmh_high_registers): New constant for number of
10454 higher ZMM registers (16-31).
10455 (num_avx512_ymmh_registers): New contant for number of higher
10456 YMM registers (ymm16-31 added by avx521 on x86_64).
10457 (num_avx512_xmm_registers): New constant for number of higher
10458 XMM registers (xmm16-31 added by AVX512 on x86_64).
10459 (struct i387_xsave): Add space for AVX512 registers.
10460 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
10461 Add code to handle AVX512 registers.
10462 (i387_xsave_to_cache): Add code to handle AVX512 registers.
10463 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
10464 prototypei from generated file.
10465 (tdesc_amd64_avx512_linux): Likewise.
10466 (init_registers_x32_avx512_linux): Likewise.
10467 (tdesc_x32_avx512_linux): Likewise.
10468 (init_registers_i386_avx512_linux): Likewise.
10469 (tdesc_i386_avx512_linux): Likewise.
10470 (x86_64_regmap): Add AVX512 registers.
10471 (x86_linux_read_description): Add code to handle AVX512 XSTATE
10472 mask.
10473 (initialize_low_arch): Add code to initialize AVX512 registers.
10474
10475 2014-04-23 Pedro Alves <palves@redhat.com>
10476
10477 * mem-break.c (find_gdb_breakpoint_at): Make static.
10478 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
10479
10480 2014-04-23 Pedro Alves <palves@redhat.com>
10481
10482 * i386-low.c: Don't include break-common.h here.
10483 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
10484 prototype to take target_hw_bp_type as argument instead of a Z
10485 packet char.
10486 * i386-low.h: Include break-common.h here.
10487 (Z_packet_to_hw_type): Declare.
10488 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
10489 prototypes.
10490 * linux-x86-low.c (x86_insert_point): Convert the packet number to
10491 a target_hw_bp_type before calling i386_low_insert_watchpoint.
10492 (x86_remove_point): Convert the packet number to a
10493 target_hw_bp_type before calling i386_low_remove_watchpoint.
10494 * win32-i386-low.c (i386_insert_point): Convert the packet number
10495 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
10496 (i386_remove_point): Convert the packet number to a
10497 target_hw_bp_type before calling i386_low_remove_watchpoint.
10498
10499 2014-04-23 Pedro Alves <palves@redhat.com>
10500
10501 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
10502
10503 2014-04-10 Pedro Alves <palves@redhat.com>
10504
10505 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
10506 Check if the condition or command is NULL before checking if the
10507 breakpoint is known. On success, return true.
10508 * mem-break.h (add_breakpoint_condition): Document return.
10509 (add_breakpoint_commands): Add describing comment.
10510 * server.c (skip_to_semicolon): New function.
10511 (process_point_options): Use it.
10512
10513 2014-04-09 Pedro Alves <palves@redhat.com>
10514
10515 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
10516 to lwpid_of.
10517
10518 2014-02-27 Pedro Alves <palves@redhat.com>
10519
10520 PR 12702
10521 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
10522 macros.
10523 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
10524 output.
10525 (last_thread_of_process_p): Take a PID argument instead of a
10526 thread pointer.
10527 (linux_wait_for_lwp): Delete.
10528 (num_lwps, check_zombie_leaders, not_stopped_callback): New
10529 functions.
10530 (linux_low_filter_event): New function, party factored out from
10531 linux_wait_for_event.
10532 (linux_wait_for_event): Rename to ...
10533 (linux_wait_for_event_filtered): ... this. Add new filter ptid
10534 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
10535 sigsuspend. Check for zombie leaders.
10536 (linux_wait_for_event): Reimplement as wrapper around
10537 linux_wait_for_event_filtered.
10538 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
10539 a normal or signal exit is seen, it's the whole process exiting.
10540 (wait_for_sigstop): No longer a for_each_inferior callback.
10541 Rewrite on top of linux_wait_for_event_filtered.
10542 (stop_all_lwps): Call wait_for_sigstop directly.
10543 * server.c (resume, handle_target_event): Handle
10544 TARGET_WAITKIND_NO_RESUMED.
10545
10546 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10547
10548 * win32-low.c (psapi_get_dll_name,
10549 * win32_CreateToolhelp32Snapshot): Delete.
10550 (win32_CreateToolhelp32Snapshot, win32_Module32First)
10551 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
10552 Delete.
10553 (handle_load_dll): Add function description.
10554 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
10555
10556 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10557
10558 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
10559 Add comment.
10560 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
10561 base address when calling win32_add_one_solib.
10562 (handle_load_dll): Delete local variable load_addr.
10563 Remove 0x1000 offset applied to DLL base address when calling
10564 win32_add_one_solib.
10565 (handle_unload_dll): Add comment.
10566
10567 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10568
10569 * win32-low.c (win32_add_all_dlls): Renames
10570 win32_ensure_ntdll_loaded. Rewrite function documentation.
10571 Adjust implementation to always load all DLLs.
10572 Add 0x1000 offset to DLL base address when calling
10573 win32_add_one_solib.
10574 (child_initialization_done): New static global.
10575 (do_initial_child_stuff): Set child_initialization_done to
10576 zero during child initialization, and 1 after. Replace call
10577 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
10578 Add comment.
10579 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
10580 (handle_unload_dll): Add function documentation.
10581 (get_child_debug_event): Ignore load and unload DLL events
10582 during child initialization.
10583
10584 2014-02-20 Doug Evans <dje@google.com>
10585
10586 Remove global all_lwps.
10587 * inferiors.h (ptid_of): Move here from linux-low.h.
10588 (pid_of, lwpid_of): Ditto.
10589 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
10590 parameter is a struct thread_info * now.
10591 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
10592 directly. Pass &all_threads to find_inferior instead of &all_lwps.
10593 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
10594 directly.
10595 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
10596 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
10597 * linux-arm-low.c (update_registers_callback): Update, "entry"
10598 parameter is a struct thread_info * now.
10599 Fetch lwpid from current_inferior directly.
10600 (arm_insert_point): Pass &all_threads to find_inferior instead of
10601 &all_lwps.
10602 (arm_remove_point): Ditto.
10603 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
10604 (arm_prepare_to_resume): Fetch pid from thread.
10605 (arm_read_description): Fetch lwpid from current_inferior directly.
10606 * linux-low.c (all_lwps): Delete.
10607 (delete_lwp): Delete call to remove_inferior.
10608 (handle_extended_wait): Fetch lwpid from thread.
10609 (add_lwp): Don't set lwp->entry.id. Remove call to
10610 add_inferior_to_list.
10611 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
10612 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
10613 (kill_one_lwp_callback): Ditto.
10614 (linux_kill): Don't dereference NULL pointer.
10615 Fetch ptid,lwpid from thread.
10616 (get_detach_signal): Fetch ptid from thread.
10617 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
10618 Simplify call to regcache_invalidate_thread.
10619 (delete_lwp_callback): Update, "entry" parameter is a
10620 struct thread_info * now. Fetch pid from thread.
10621 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
10622 (status_pending_p_callback): Update, "entry" parameter is a
10623 struct thread_info * now. Fetch ptid from thread.
10624 (find_lwp_pid): Update, "entry" parameter is a
10625 struct thread_info * now.
10626 (linux_wait_for_lwp): Fetch pid from thread.
10627 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
10628 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
10629 (enqueue_one_deferred_signal): Fetch lwpid from thread.
10630 (dequeue_one_deferred_signal): Ditto.
10631 (cancel_breakpoint): Fetch ptid from current_inferior.
10632 (linux_wait_for_event): Pass &all_threads to find_inferior,
10633 not &all_lwps. Fetch ptid, lwpid from thread.
10634 (count_events_callback): Update, "entry" parameter is a
10635 struct thread_info * now.
10636 (select_singlestep_lwp_callback): Ditto.
10637 (select_event_lwp_callback): Ditto.
10638 (cancel_breakpoints_callback): Ditto.
10639 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
10640 not &all_lwps.
10641 (select_event_lwp): Ditto. Fetch ptid from event_thread.
10642 (unsuspend_one_lwp): Update, "entry" parameter is a
10643 struct thread_info * now.
10644 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
10645 not &all_lwps.
10646 (linux_stabilize_threads): Ditto. And for for_each_inferior.
10647 Fetch lwpid from thread, not lwp.
10648 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
10649 Pass &all_threads to find_inferior, not &all_lwps.
10650 (send_sigstop): Fetch lwpid from thread, not lwp.
10651 (send_sigstop_callback): Update, "entry" parameter is a
10652 struct thread_info * now.
10653 (suspend_and_send_sigstop_callback): Ditto.
10654 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
10655 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
10656 struct thread_info * now.
10657 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
10658 from thread, lwp.
10659 (lwp_running): Update, "entry" parameter is a
10660 struct thread_info * now.
10661 (stop_all_lwps): Fetch ptid from thread.
10662 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
10663 (linux_resume_one_lwp): Fetch lwpid from thread.
10664 (linux_set_resume_request): Update, "entry" parameter is a
10665 struct thread_info * now. Fetch pid, lwpid from thread.
10666 (resume_status_pending_p): Update, "entry" parameter is a
10667 struct thread_info * now.
10668 (need_step_over_p): Ditto. Fetch lwpid from thread.
10669 (start_step_over): Fetch lwpid from thread.
10670 (linux_resume_one_thread): Update, "entry" parameter is a
10671 struct thread_info * now. Fetch lwpid from thread.
10672 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
10673 (proceed_one_lwp): Update, "entry" parameter is a
10674 struct thread_info * now. Fetch lwpid from thread.
10675 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
10676 struct thread_info * now.
10677 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
10678 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
10679 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
10680 directly.
10681 (regsets_store_inferior_registers): Ditto.
10682 (fetch_register, store_register): Ditto.
10683 (linux_read_memory, linux_write_memory): Ditto.
10684 (linux_request_interrupt): Ditto.
10685 (linux_read_auxv): Ditto.
10686 (linux_xfer_siginfo): Ditto.
10687 (linux_qxfer_spu): Ditto.
10688 (linux_qxfer_libraries_svr4): Ditto.
10689 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
10690 moved to inferiors.h.
10691 (get_lwp): Delete.
10692 (get_thread_lwp): Update.
10693 (struct lwp_info): Delete member "entry". Simplify comment for
10694 member "thread".
10695 (all_lwps): Delete.
10696 * linux-mips-low.c (mips_read_description): Fetch lwpid from
10697 current_inferior directly.
10698 (update_watch_registers_callback): Update, "entry" parameter is a
10699 struct thread_info * now. Fetch pid from thread.
10700 (mips_linux_prepare_to_resume): Fetch ptid from thread.
10701 (mips_insert_point): Fetch lwpid from current_inferior.
10702 Pass &all_threads to find_inferior, not &all_lwps.
10703 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
10704 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
10705 directly.
10706 (mips_stopped_data_address): Ditto.
10707 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
10708 directly.
10709 * linux-tile-low.c (tile_arch_setup): Ditto.
10710 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
10711 (update_debug_registers_callback): Update, "entry" parameter is a
10712 struct thread_info * now. Fetch pid from thread.
10713 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
10714 Pass &all_threads to find_inferior, not &all_lwps.
10715 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
10716 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
10717 Pass &all_threads to find_inferior, not &all_lwps.
10718 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
10719 (i386_dr_low_get_status): Ditto.
10720 (x86_linux_prepare_to_resume): Fetch ptid from thread.
10721 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
10722 (x86_linux_read_description): Ditto.
10723 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
10724
10725 2014-02-20 Doug Evans <dje@google.com>
10726
10727 * inferiors.c (get_first_inferior): Fix buglet.
10728
10729 2014-02-19 Doug Evans <dje@google.com>
10730
10731 * gdbthread.h (add_thread): Change result type to struct thread_info *.
10732 * inferiors.c (add_thread): Change result type to struct thread_info *.
10733 All callers updated.
10734 (add_lwp): Call add_thread here instead of in callers.
10735 All callers updated.
10736 * linux-low.h (get_lwp_thread): Rewrite.
10737 (struct lwp_info): New member "thread".
10738
10739 2014-02-19 Doug Evans <dje@google.com>
10740
10741 * linux-low.c (add_lwp): Change result to struct lwp_info *.
10742 All callers updated.
10743
10744 2014-02-19 Doug Evans <dje@google.com>
10745
10746 * inferiors.c (add_thread): Fix whitespace.
10747
10748 2014-02-19 Doug Evans <dje@google.com>
10749
10750 * dll.c (clear_dlls): Replace accessing list implemention details
10751 with API function.
10752 * gdbthread.h (get_first_thread): Declare.
10753 * inferiors.c (for_each_inferior_with_data): New function.
10754 (get_first_thread): New function.
10755 (find_thread_ptid): Simplify.
10756 (get_first_inferior): New function.
10757 (clear_list): Delete.
10758 (one_inferior_p): New function.
10759 (clear_inferior_list): New function.
10760 (clear_inferiors): Update.
10761 * inferiors.h (for_each_inferior_with_data): Declare.
10762 (clear_inferior_list): Declare.
10763 (one_inferior_p): Declare.
10764 (get_first_inferior): Declare.
10765 * linux-low.c (linux_wait_for_event): Replace accessing list
10766 implemention details with API function.
10767 * server.c (target_running): Ditto.
10768 (accumulate_file_name_length): New function.
10769 (emit_dll_description): New function.
10770 (handle_qxfer_libraries): Replace accessing list implemention
10771 details with API function.
10772 (handle_qxfer_threads_worker): New function.
10773 (handle_qxfer_threads_proper): Replace accessing list implemention
10774 details with API function.
10775 (handle_query): Ditto.
10776 (visit_actioned_threads_callback_ftype): New typedef.
10777 (visit_actioned_threads_data): New struct.
10778 (visit_actioned_threads): Rewrite to be find_inferior callback.
10779 (resume): Call find_inferior.
10780 (handle_status): Replace accessing list implemention
10781 details with API function.
10782 (process_serial_event): Replace accessing list implemention details
10783 with API function.
10784 * target.c (set_desired_inferior): Replace accessing list implemention
10785 details with API function.
10786 * tracepoint.c (same_process_p): New function.
10787 (gdb_agent_about_to_close): Replace accessing list implemention
10788 details with API function.
10789 * win32-low.c (child_delete_thread): Replace accessing list
10790 implemention details with API function.
10791 (match_dll_by_basename): New function.
10792 (dll_is_loaded_by_basename): New function.
10793 (win32_ensure_ntdll_loaded): Replace accessing list implemention
10794 details call to dll_is_loaded_by_basename.
10795
10796 2014-02-19 Doug Evans <dje@google.com>
10797
10798 * dll.h (struct dll_info): Add comment.
10799 * gdbthread.h (struct thread_info): Add comment.
10800 (current_ptid): Simplify.
10801 * inferiors.c (add_process): Update.
10802 (remove_process): Update.
10803 * inferiors.h (struct process_info): Rename member "head" to "entry".
10804 * linux-low.c (delete_lwp): Update.
10805 (add_lwp): Update.
10806 (last_thread_of_process_p): Update.
10807 (kill_one_lwp_callback, linux_kill): Update.
10808 (status_pending_p_callback): Update.
10809 (wait_for_sigstop): Update. Simplify read of ptid.
10810 (start_step_over): Update.
10811 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
10812 (get_lwp_thread): Update.
10813 (struct lwp_info): Rename member "head" to "entry".
10814 * regcache.h (inferior_list_entry): Delete.
10815 * server.c (kill_inferior_callback): Update.
10816 (detach_or_kill_inferior_callback): Update.
10817 (print_started_pid): Update.
10818 (print_attached_pid): Update.
10819 (process_serial_event): Simplify read of ptid.
10820 * thread-db.c (thread_db_create_event): Update.
10821 (thread_db_get_tls_address): Update.
10822 * win32-low.c (current_inferior_ptid): Simplify.
10823
10824 2014-02-19 Tom Tromey <tromey@redhat.com>
10825
10826 * target.h (struct target_ops) <supports_btrace>: Add target_ops
10827 argument.
10828 (target_supports_btrace): Update.
10829
10830 2014-02-14 Yao Qi <yao@codesourcery.com>
10831
10832 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
10833 (rsp-low-ipa.o): New target.
10834
10835 2014-02-12 Tom Tromey <tromey@redhat.com>
10836
10837 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
10838 convert_ascii_to_int.
10839 * regcache.c (registers_to_string): Likewise.
10840 * remote-utils.c (decode_M_packet): Likewise.
10841 * server.c (process_serial_event): Likewise.
10842
10843 2014-02-12 Tom Tromey <tromey@redhat.com>
10844
10845 * server.c (handle_query, handle_v_run): Use hex2bin, not
10846 unhexify.
10847 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
10848
10849 2014-02-12 Tom Tromey <tromey@redhat.com>
10850
10851 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
10852 convert_int_to_ascii.
10853 * regcache.c (registers_to_string, collect_register_as_string):
10854 Likewise.
10855 * remote-utils.c (look_up_one_symbol, relocate_instruction):
10856 Likewise.
10857 * server.c (process_serial_event): Likewise.
10858 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
10859 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
10860
10861 2014-02-12 Tom Tromey <tromey@redhat.com>
10862
10863 * remote-utils.c (look_up_one_symbol, monitor_output): Use
10864 bin2hex, not hexify.
10865 * tracepoint.c (cmd_qtstatus): Likewise.
10866
10867 2014-02-12 Tom Tromey <tromey@redhat.com>
10868
10869 * remote-utils.c (monitor_output): Pass explicit length to
10870 hexify.
10871
10872 2014-02-12 Tom Tromey <tromey@redhat.com>
10873
10874 * tracepoint.c: Include rsp-low.h.
10875 * server.c: Include rsp-low.h.
10876 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
10877 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
10878 declare.
10879 * remote-utils.c: Include rsp-low.h.
10880 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
10881 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
10882 (convert_int_to_ascii, convert_ascii_to_int): Move to
10883 common/rsp-low.c.
10884 * regcache.c: Include rsp-low.h.
10885 * ax.c: Include rsp-low.h.
10886 * Makefile.in (SFILES): Add common/rsp-low.c.
10887 (OBS): Add rsp-low.o.
10888 (rsp-low.o): New target.
10889
10890 2014-02-12 Tom Tromey <tromey@redhat.com>
10891
10892 * utils.h (pulongest, plongest, phex_nz): Don't declare.
10893 Include print-utils.h.
10894 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
10895 (plongest, thirty_two, phex_nz): Remove.
10896 * Makefile.in (SFILES): Add common/print-utils.c.
10897 (OBS): Add print-utils.o.
10898 (print-utils-ipa.o): New target.
10899 (print-utils.o): New target.
10900 (IPA_OBJS): Add print-utils-ipa.o.
10901
10902 2014-02-06 Tom Tromey <tromey@redhat.com>
10903
10904 * Makefile.in (SFILES): Fix indentation.
10905
10906 2014-02-05 Doug Evans <dje@google.com>
10907
10908 * linux-low.c (linux_wait_for_event): Improve comment.
10909 (linux_wait_1): Keep current_inferior in sync with event_child.
10910
10911 2014-01-22 Doug Evans <dje@google.com>
10912
10913 * gdbthread.h (gdb_id_to_thread): Delete, unused.
10914
10915 2014-01-22 Doug Evans <dje@google.com>
10916
10917 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
10918 * configure: Regenerate.
10919 * config.in: Regenerate.
10920 * Makefile.in (SFILES): Add debug.c.
10921 (OBS): Add debug.o.
10922 * debug.c: New file.
10923 * debug.h: New file.
10924 * linux-aarch64-low.c (*): Update all debugging printfs to use
10925 debug_printf instead of fprintf.
10926 * linux-arm-low.c (*): Ditto.
10927 * linux-cris-low.c (*): Ditto.
10928 * linux-crisv32-low.c (*): Ditto.
10929 * linux-m32r-low.c (*): Ditto.
10930 * linux-sparc-low.c (*): Ditto.
10931 * linux-x86.c (*): Ditto.
10932 * linux-low.c (*): Ditto.
10933 (linux_wait_1): Add calls to debug_enter, debug_exit.
10934 (linux_wait): Remove redundant debugging printf.
10935 (stop_all_lwps): Add calls to debug_enter, debug_exit.
10936 (linux_resume, unstop_all_lwps): Ditto.
10937 * mem-break.c (*): Update all debugging printfs to use
10938 debug_printf instead of fprintf.
10939 * remote-utils.c (*): Ditto.
10940 * thread-db.c (*): Ditto.
10941 * server.c #include <ctype.h>, "gdb_vecs.h".
10942 (debug_threads): Moved to debug.c.
10943 (*): Update all debugging printfs to use debug_printf instead of
10944 fprintf.
10945 (start_inferior): Replace call to fflush with call to debug_flush.
10946 (monitor_show_help): Mention set debug-format.
10947 (parse_debug_format_options): New function.
10948 (handle_monitor_command): Handle "monitor set debug-format".
10949 (gdbserver_usage): Mention --debug-format.
10950 (main): Parse --debug-format.
10951 * server.h (debug_threads): Declaration moved to debug.h.
10952 #include "debug.h".
10953 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
10954 trace_debug_1 that uses debug_printf.
10955 (tracepoint_look_up_symbols): Update all debugging printfs to use
10956 debug_printf instead of fprintf.
10957
10958 2014-01-20 Baruch Siach <baruch@tkos.co.il>
10959
10960 * linux-xtensa-low.c: Include asm/ptrace.h instead of
10961 sys/ptrace.h.
10962
10963 2014-01-17 Pedro Alves <palves@redhat.com>
10964
10965 PR build/16445
10966 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
10967 defined after including gdb_proc_service.h.
10968
10969 2014-01-16 Doug Evans <dje@google.com>
10970
10971 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
10972 (match_dll): Use it.
10973
10974 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
10975
10976 * target.h (target_ops) <read_btrace>: Change parameters and
10977 return type to allow error reporting.
10978 * server.c (handle_qxfer_btrace): Support delta reads. Pass
10979 trace reading errors on.
10980 * linux-low.c (linux_low_read_btrace): Pass trace reading
10981 errors on.
10982 (linux_low_disable_btrace): New.
10983
10984 2014-01-15 Doug Evans <dje@google.com>
10985
10986 * inferiors.c (thread_id_to_gdb_id): Delete.
10987 * inferiors.h (thread_id_to_gdb_id): Delete.
10988
10989 2014-01-13 Eli Zaretskii <eliz@gnu.org>
10990
10991 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
10992 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
10993 versions.
10994
10995 2014-01-08 Pedro Alves <palves@redhat.com>
10996
10997 * server.c (handle_status): Don't discard previous queued stop
10998 replies or thread's pending status here.
10999 (main) <disconnection>: Do it here instead.
11000
11001 2014-01-08 Pedro Alves <palves@redhat.com>
11002
11003 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
11004 * server.c (visit_actioned_threads, handle_pending_status): New
11005 function.
11006 (handle_v_cont): Factor out parts to ...
11007 (resume): ... this new function. If in all-stop, and a thread
11008 being resumed has a pending status, report it without actually
11009 resuming.
11010 (myresume): Adjust to use the new 'resume' function.
11011 (clear_pending_status_callback, set_pending_status_callback)
11012 (find_status_pending_thread_callback): New functions.
11013 (handle_status): Handle the case of multiple threads having
11014 interesting statuses to report. Report threads' real last signal
11015 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
11016 with an interesting thread to report the status for, instead of
11017 always reporting the status of the first thread.
11018
11019 2014-01-01 Joel Brobecker <brobecker@adacore.com>
11020
11021 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
11022 * gdbreplay.c (gdbreplay_version): Likewise.
11023
11024 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
11025
11026 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
11027 iov.iov_len with the real length in use.
11028
11029 2013-12-13 Joel Brobecker <brobecker@adacore.com>
11030
11031 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
11032 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
11033 for all targets that use win32-low.c.
11034 * win32-low.c (win32_ensure_ntdll_loaded): New function.
11035 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
11036
11037 2013-12-13 Pedro Alves <palves@redhat.com>
11038
11039 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
11040 if equal to TARGET_WAITKIND_LOADED.
11041 * win32-low.c (cached_status): New static global.
11042 (win32_wait): Add declaration.
11043 (do_initial_child_stuff): Flush all initial pending debug events
11044 up to the initial breakpoint.
11045 (win32_wait): If CACHED_STATUS was set, return that instead
11046 of doing a real wait. Remove the code resuming the execution
11047 of the inferior after receiving a TARGET_WAITKIND_LOADED event
11048 during the initial phase. Also remove the code changing
11049 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
11050 TARGET_WAITKIND_STOPPED.
11051
11052 2013-12-11 Yao Qi <yao@codesourcery.com>
11053
11054 * notif.c (handle_notif_ack): Return 0 if no notification
11055 matches.
11056
11057 2013-11-20 Doug Evans <dje@google.com>
11058
11059 * linux-low.c (linux_set_resume_request): Fix comment.
11060
11061 2013-11-20 Doug Evans <dje@google.com>
11062
11063 * linux-low.c (resume_status_pending_p): Tweak comment.
11064
11065 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
11066
11067 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
11068 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
11069 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
11070 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
11071 (srv_amd64_regobj): Add amd64-mpx.o.
11072 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
11073 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
11074 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
11075 * i387-fp.c (num_pl_bnd_register) Added constant.
11076 (num_pl_bnd_cfg_registers) Added constant.
11077 (struct i387_xsave) Added reserved area and MPX fields.
11078 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
11079 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
11080 function.
11081 (tdesc_i386_mpx_linux): Add MPX amd64 target.
11082 (init_registers_amd64_mpx_linux): Declare new function.
11083 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
11084 (x86_64_regmap): Add MPX registers.
11085 (x86_linux_read_description): Add MPX case.
11086 (initialize_low_arch): Initialize MPX targets.
11087
11088 2013-11-18 Tom Tromey <tromey@redhat.com>
11089
11090 * configure: Rebuild.
11091 * configure.ac: Don't check for stdlib.h.
11092 * gdbreplay.c: Unconditionally include stdlib.h.
11093
11094 2013-11-18 Tom Tromey <tromey@redhat.com>
11095
11096 * config.in: Rebuild.
11097 * configure: Rebuild.
11098 * configure.ac: Don't use AC_HEADER_DIRENT.
11099
11100 2013-11-18 Tom Tromey <tromey@redhat.com>
11101
11102 * server.h: Don't check HAVE_STRING_H.
11103 * gdbreplay.c: Don't check HAVE_STRING_H.
11104 * configure: Rebuild.
11105
11106 2013-11-18 Tom Tromey <tromey@redhat.com>
11107
11108 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
11109 LIBGNU.
11110
11111 2013-11-08 Tom Tromey <tromey@redhat.com>
11112
11113 * configure, config.in: Rebuild.
11114 * configure.ac: Remove unused configury.
11115
11116 2013-11-08 Tom Tromey <tromey@redhat.com>
11117
11118 * acinclude.m4: Include common.m4, codeset.m4.
11119 * configure, config.in: Rebuild.
11120 * configure.ac: Use GDB_AC_COMMON.
11121
11122 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
11123
11124 * linux-s390-low.c (HWCAP_S390_TE): New define.
11125 (s390_arch_setup): Consider the TE field in the HWCAP for
11126 determining 'have_regset_tdb'.
11127
11128 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
11129
11130 PR gdb/16014
11131 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
11132 call to sizeof.
11133
11134 2013-10-02 Pedro Alves <palves@redhat.com>
11135
11136 * server.c (process_serial_event): Don't output "GDBserver
11137 exiting" if GDB is connected through stdio.
11138 * target.c (mywait): Likewise, be silent if GDB is connected
11139 through stdio.
11140
11141 2013-10-01 Joel Brobecker <brobecker@adacore.com>
11142
11143 * lynx-low.c (lynx_add_threads_after_attach): New function.
11144 (lynx_attach): Remove call to add_thread. Add call to
11145 lynx_add_threads_after_attach instead.
11146
11147 2013-09-28 Mike Frysinger <vapier@gentoo.org>
11148
11149 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
11150 * config.in, configure: Regenerated.
11151
11152 2013-09-18 Yao Qi <yao@codesourcery.com>
11153
11154 PR server/15959
11155 * server.c (start_inferior): Clear 'resume_info'.
11156
11157 2013-09-16 Jiong Wang <jiwang@tilera.com>
11158
11159 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
11160 for each register.
11161
11162 2013-09-16 Jiong Wang <jiwang@tilera.com>
11163
11164 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
11165 linux-tile-low.o to srv_tgtobj.
11166
11167 2013-09-16 Will Newton <will.newton@linaro.org>
11168
11169 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
11170 out regs.
11171
11172 2013-09-06 Pedro Alves <palves@redhat.com>
11173
11174 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
11175 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
11176 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
11177 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
11178 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
11179 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
11180
11181 2013-09-06 Pedro Alves <palves@redhat.com>
11182
11183 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
11184 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
11185
11186 2013-09-06 Pedro Alves <palves@redhat.com>
11187
11188 * linux-amd64-ipa.c: Include tracepoint.h.
11189 * linux-i386-ipa.c: Include tracepoint.h.
11190
11191 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
11192
11193 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
11194 (ps_get_thread_area): New function.
11195
11196 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
11197
11198 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
11199 (initialize_low_arch): Call init_registers_crisv32 rather than
11200 init_register_crisv32.
11201
11202 2013-09-05 Pedro Alves <palves@redhat.com>
11203
11204 * server.h (handle_vFile, hostio_last_error_from_errno): Move
11205 to ...
11206 * hostio.h: ... this new file.
11207 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
11208 win32-low.c: Include hostio.h.
11209
11210 2013-09-05 Pedro Alves <palves@redhat.com>
11211
11212 * server.h (gdb_client_data, handler_func, callback_handler_func)
11213 (delete_file_handler, add_file_handler, append_callback_event)
11214 (delete_callback_event, start_event_loop, initialize_event_loop):
11215 Move to event-loop.h and include it.
11216 * event-loop.h: New file.
11217
11218 2013-09-05 Pedro Alves <palves@redhat.com>
11219
11220 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
11221 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
11222 (loaded_dll, unloaded_dll): Move to ...
11223 * dll.h: ... this new file.
11224 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
11225
11226 2013-09-05 Pedro Alves <palves@redhat.com>
11227
11228 * server.h (current_process, get_thread_process, all_processes)
11229 (add_inferior_to_list, for_each_inferior, current_inferior)
11230 (remove_inferior, add_process, remove_process, find_process_pid)
11231 (have_started_inferiors_p, have_attached_inferiors_p)
11232 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
11233 (clear_inferiors, find_inferior, find_inferior_id)
11234 (inferior_target_data, set_inferior_target_data)
11235 (inferior_regcache_data, set_inferior_regcache_data): Move to
11236 inferiors.h, and include it.
11237 * inferiors.h: New file.
11238
11239 2013-09-05 Pedro Alves <palves@redhat.com>
11240
11241 * server.h (struct emit_ops, current_insn_ptr, emit_error):
11242 Move ...
11243 * ax.h: ... here.
11244
11245 2013-09-05 Pedro Alves <palves@redhat.com>
11246
11247 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
11248 tracepoint.h.
11249 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
11250 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
11251 (handle_tracepoint_general_set, handle_tracepoint_query)
11252 (tracepoint_finished_step, tracepoint_was_hit)
11253 (release_while_stepping_state_list, current_traceframe)
11254 (in_readonly_region, traceframe_read_mem)
11255 (fetch_traceframe_registers, traceframe_read_sdata)
11256 (traceframe_read_info, struct fast_tpoint_collect_status)
11257 (fast_tracepoint_collecting, force_unlock_trace_buffer)
11258 (handle_tracepoit_bkpts, initialize_low_tracepoint)
11259 (supply_fast_tracepoint_registers)
11260 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
11261 (ipa_tdesc, claim_trampoline_space)
11262 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
11263 (agent_mem_read, agent_get_trace_state_variable_value)
11264 (agent_set_trace_state_variable_value, agent_tsv_read)
11265 (agent_mem_read_string, get_raw_reg_func_addr)
11266 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
11267 * tracepoint.h: ... this new file.
11268
11269 2013-09-05 Pedro Alves <palves@redhat.com>
11270
11271 * server.h (perror_with_name, error, fatal, warning, paddress)
11272 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
11273 include it.
11274 * utils.h: New file.
11275
11276 2013-09-05 Pedro Alves <palves@redhat.com>
11277
11278 * server.h (remote_debug, noack_mode, transport_is_reliable)
11279 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
11280 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
11281 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
11282 (write_enn, initialize_async_io, enable_async_io)
11283 (disable_async_io, check_remote_input_interrupt_request)
11284 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
11285 (dead_thread_notify, prepare_resume_reply)
11286 (decode_address_to_semicolon, decode_address, decode_m_packet)
11287 (decode_M_packet, decode_X_packet, decode_xfer_write)
11288 (decode_search_memory_packet, unhexify, hexify)
11289 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
11290 (look_up_one_symbol, relocate_instruction)
11291 (monitor_output): Move to remote-utils.h, and include it.
11292 * remote-utils.h: New file.
11293
11294 2013-09-05 Pedro Alves <palves@redhat.com>
11295
11296 * server.h (_): Delete.
11297
11298 2013-09-02 Pedro Alves <palves@redhat.com>
11299
11300 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
11301 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
11302 allocated.
11303 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
11304
11305 2013-09-02 Pierre Muller <muller@sourceware.org>
11306
11307 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
11308 or WriteProcessMemory complete successfully and handle
11309 ERROR_PARTIAL_COPY error.
11310
11311 2013-09-02 Pedro Alves <palves@redhat.com>
11312
11313 * server.c (gdb_read_memory): Return -1 on traceframe memory read
11314 error instead of EIO.
11315
11316 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11317
11318 PR server/15604
11319 * linux-low.c: Include filestuff.h.
11320 (linux_create_inferior) <pid == 0>: Call close_most_fds.
11321 * lynx-low.c: Include filestuff.h.
11322 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
11323 * server.c: Include filestuff.h.
11324 (main): Call notice_open_fds.
11325 * spu-low.c: Include filestuff.h.
11326 (spu_create_inferior) <pid == 0>: Call close_most_fds.
11327
11328 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
11329
11330 * Makefile.in: Explain why ../target and ../nat are not
11331 listed as include file search paths.
11332 (linux-waitpid.o): New object file rule.
11333 * configure.srv (srv_native_linux_obj): New variable.
11334 Replace all occurrences of linux native object files with
11335 $srv_native_linux_obj.
11336 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
11337 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
11338 (linux_enable_event_reporting): Remove declaration.
11339 (my_waitpid): Moved to common/linux-waitpid.c.
11340 (linux_wait_for_event): Pass ptid when calling
11341 linux_enable_event_reporting.
11342 (linux_supports_tracefork_flag): Remove.
11343 (linux_enable_event_reporting): Likewise.
11344 (linux_tracefork_grandchild): Remove.
11345 (STACK_SIZE): Moved to common/linux-ptrace.c.
11346 (linux_tracefork_child): Remove.
11347 (linux_test_for_tracefork): Remove.
11348 (linux_look_up_symbols): Call linux_supports_traceclone.
11349 (initialize_low): Remove call to linux_test_for_tracefork.
11350 * linux-low.h (PTRACE_TYPE_ARG3): Move to
11351 common/linux-ptrace.h.
11352 (PTRACE_TYPE_ARG4): Likewise.
11353 Include linux-ptrace.h.
11354
11355 2013-08-21 Pedro Alves <palves@redhat.com>
11356
11357 * config.in: Renegerate.
11358
11359 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
11360
11361 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
11362 (SFILES): Remove $(srcdir)/common/target-common.c and
11363 add $(srcdir)/target/waitstatus.c.
11364 (OBS): Remove target-common.o and add waitstatus.o.
11365 (server_h): Remove $(srcdir)/../common/target-common.h and
11366 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
11367 and $(srcdir)/../target/waitstatus.h.
11368 (target-common.o): Remove.
11369 (waitstatus.o): New target object file.
11370 * target.h: Do not include target-common.h and
11371 include target/resume.h, target/wait.h and
11372 target/waitstatus.h.
11373
11374 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
11375
11376 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
11377 to PTRACE_TYPE_ARG3.
11378 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
11379 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
11380 PTRACE_TYPE_ARG4.
11381 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
11382 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
11383
11384 2013-07-27 Jie Zhang <jie@codesourcery.com>
11385 Daniel Jacobowitz <dan@codesourcery.com>
11386 Yao Qi <yao@codesourcery.com>
11387
11388 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
11389 (mips-linux-watch.o): New rule.
11390 (mips_linux_watch_h): New variable.
11391 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
11392 srv_tgtobj.
11393 * linux-mips-low.c: Include mips-linux-watch.h.
11394 (struct arch_process_info, struct arch_lwp_info): New.
11395 (update_watch_registers_callback): New function.
11396 (mips_linux_new_process, mips_linux_new_thread) New functions.
11397 (mips_linux_prepare_to_resume, mips_insert_point): New
11398 functions.
11399 (mips_remove_point, mips_stopped_by_watchpoint): New
11400 functions.
11401 (rsp_bp_type_to_target_hw_bp_type): New function.
11402 (mips_stopped_data_address): New function.
11403 (the_low_target): Add watchpoint support functions.
11404
11405 2013-07-27 Yao Qi <yao@codesourcery.com>
11406
11407 * i386-low.c: Include break-common.h.
11408 (enum target_hw_bp_type): Remove.
11409
11410 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
11411
11412 * Makefile.in (SFILES): /common/target-common.c.
11413 (OBS): Add target-common.o.
11414 (server_h): Add $(srcdir)/../common/target-common.h.
11415 (target-common.o): New target.
11416 * server.c (queue_stop_reply_callback): Free
11417 status string after use.
11418 * target.c (target_waitstatus_to_string): Remove.
11419 * target.h: Include target-common.h.
11420 (resume_kind): Likewise.
11421 (target_waitkind): Likewise.
11422 (target_waitstatus): Likewise.
11423 (TARGET_WNOHANG): Likewise.
11424
11425 2013-07-04 Yao Qi <yao@codesourcery.com>
11426
11427 * Makefile.in (host_alias): Use @host_noncanonical@.
11428 (target_alias): Use @target_noncanonical@.
11429 * configure.ac: Use ACX_NONCANONICAL_TARGET and
11430 ACX_NONCANONICAL_HOST.
11431 * configure: Regenerated.
11432
11433 Revert:
11434 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
11435
11436 * configure.ac (version_host, version_target): Set and AC_SUBST them.
11437 * configure: Rebuild.
11438 * Makefile.in (version_host, version_target): Get from configure.
11439 (version.c): Use $(version_host) and $(version_target).
11440
11441 2013-07-03 Pedro Alves <palves@redhat.com>
11442
11443 * Makefile.in (config.status): Depend on development.sh.
11444 * acinclude.m4: Include libmcheck.m4.
11445 * configure: Regenerate.
11446
11447 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
11448
11449 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
11450 attribute inside the parentheses.
11451 (winapi_DebugSetProcessKillOnExit): Ditto.
11452 (winapi_DebugBreakProcess): Ditto.
11453 (winapi_GenerateConsoleCtrlEvent): Ditto.
11454
11455 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
11456
11457 * notif.h (notif_event): Add a dummy member to avoid compiler
11458 errors.
11459
11460 2013-07-01 Pedro Alves <palves@redhat.com>
11461
11462 * hostio.c (HOSTIO_PATH_MAX): Define.
11463 (require_filename, handle_open, handle_unlink, handle_readlink):
11464 Use it.
11465
11466 2013-07-01 Pedro Alves <palves@redhat.com>
11467
11468 * server.h: Include "pathmax.h".
11469 * linux-low.c: Don't include sys/param.h.
11470 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
11471 MAXPATHLEN.
11472 * win32-low.c: Don't include sys/param.h.
11473 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
11474
11475 2013-07-01 Pedro Alves <palves@redhat.com>
11476
11477 * event-loop.c: Don't check HAVE_UNISTD_H before including
11478 <unistd.h>.
11479 * gdbreplay.c: Likewise.
11480 * remote-utils.c: Likewise.
11481 * server.c: Likewise.
11482 * configure.ac: Don't check for unistd.h.
11483 * configure: Regenerate.
11484
11485 2013-06-28 Tom Tromey <tromey@redhat.com>
11486
11487 * Makefile.in (version.c): Use version.in, not
11488 common/version.in.
11489
11490 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
11491
11492 * configure.ac (version_host, version_target): Set and AC_SUBST them.
11493 * configure: Rebuild.
11494 * Makefile.in (version_host, version_target): Get from configure.
11495 (version.c): Use $(version_host) and $(version_target).
11496
11497 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
11498
11499 Fix trace-status to output user name without trailing colon.
11500 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
11501
11502 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
11503
11504 Fix trace-status to output proper start-time and stop-time.
11505 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
11506 output start time and stop time in hex as gdb expects.
11507
11508 2013-06-26 Pedro Alves <pedro@codesourcery.com>
11509
11510 * tracepoint.c (build_traceframe_info_xml): Output trace state
11511 variables present in the trace buffer.
11512
11513 2013-06-24 Tom Tromey <tromey@redhat.com>
11514
11515 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
11516 create-version.sh.
11517 (version.o): Remove.
11518 * gdbreplay.c: Include version.h.
11519 (version, host_name): Don't declare.
11520 * server.h: Include version.h.
11521 (version, host_name): Don't declare.
11522
11523 2013-06-12 Pedro Alves <palves@redhat.com>
11524
11525 * linux-x86-low.c (linux_is_elf64): Delete global.
11526 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
11527 with local linux_pid_exe_is_elf_64_file use.
11528
11529 2013-06-11 Pedro Alves <palves@redhat.com>
11530
11531 * linux-low.c (regset_disabled, disable_regset): New functions.
11532 (regsets_fetch_inferior_registers)
11533 (regsets_store_inferior_registers): Use them.
11534 (initialize_regsets_info); Don't allocate the disabled_regsets
11535 array here.
11536 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
11537 comment.
11538
11539 2013-06-11 Pedro Alves <palves@redhat.com>
11540
11541 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
11542 xmalloc.
11543
11544 2013-06-11 Pedro Alves <palves@redhat.com>
11545
11546 * linux-x86-low.c (initialize_low_arch): Call
11547 init_registers_x32_avx_linux.
11548
11549 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
11550
11551 Fix compatibility with Android Bionic.
11552 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
11553 it is not empty.
11554
11555 2013-06-07 Pedro Alves <palves@redhat.com>
11556
11557 PR server/14823
11558 * Makefile.in (OBS): Add tdesc.o.
11559 (IPA_OBJS): Add tdesc-ipa.o.
11560 (tdesc-ipa.o): New rule.
11561 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
11562 interface.
11563 * linux-low.c (new_inferior): Delete.
11564 (disabled_regsets, num_regsets): Delete.
11565 (linux_add_process): Adjust to set the new per-process
11566 new_inferior flag.
11567 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
11568 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
11569 was a stop. When calling arch_setup, switch the current inferior
11570 to the thread that got an event.
11571 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
11572 (regsets_fetch_inferior_registers)
11573 (regsets_store_inferior_registers): New regsets_info parameter.
11574 Adjust to use it.
11575 (linux_register_in_regsets): New regs_info parameter. Adjust to
11576 use it.
11577 (register_addr, fetch_register, store_register): New usrregs_info
11578 parameter. Adjust to use it.
11579 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
11580 parameter regs_info. Adjust to use it.
11581 (linux_fetch_registers): Get the current inferior's regs_info, and
11582 adjust to use it.
11583 (linux_store_registers): Ditto.
11584 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
11585 (initialize_low): Don't initialize the target_regsets here. Call
11586 initialize_low_arch.
11587 * linux-low.h (target_regsets): Delete declaration.
11588 (struct regsets_info): New.
11589 (struct usrregs_info): New.
11590 (struct regs_info): New.
11591 (struct process_info_private) <new_inferior>: New field.
11592 (struct linux_target_ops): Delete the num_regs, regmap, and
11593 regset_bitmap fields. New field regs_info.
11594 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
11595 * i387-fp.c (num_xmm_registers): Delete.
11596 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
11597 calls to new interface.
11598 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
11599 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
11600 Infer the number of xmm registers from the regcache's target
11601 description.
11602 * i387-fp.h (num_xmm_registers): Delete.
11603 * inferiors.c (add_thread): Don't install the thread's regcache
11604 here.
11605 * proc-service.c (gregset_info): Fetch the current inferior's
11606 regs_info. Adjust to use it.
11607 * regcache.c: Include tdesc.h.
11608 (register_bytes, reg_defs, num_registers)
11609 (gdbserver_expedite_regs): Delete.
11610 (get_thread_regcache): If the thread doesn't have a regcache yet,
11611 create one, instead of aborting gdbserver.
11612 (regcache_invalidate_one): Rename to ...
11613 (regcache_invalidate_thread): ... this.
11614 (regcache_invalidate_one): New.
11615 (regcache_invalidate): Only invalidate registers of the current
11616 process.
11617 (init_register_cache): Add target_desc parameter, and use it.
11618 (new_register_cache): Ditto. Assert the target description has a
11619 non zero registers_size.
11620 (regcache_cpy): Add assertions. Adjust.
11621 (realloc_register_cache, set_register_cache): Delete.
11622 (registers_to_string, registers_from_string): Adjust.
11623 (find_register_by_name, find_regno, find_register_by_number)
11624 (register_cache_size): Add target_desc parameter, and use it.
11625 (free_register_cache_thread, free_register_cache_thread_one)
11626 (regcache_release, register_cache_size): New.
11627 (register_size): Add target_desc parameter, and use it.
11628 (register_data, supply_register, supply_register_zeroed)
11629 (supply_regblock, supply_register_by_name, collect_register)
11630 (collect_register_as_string, collect_register_by_name): Adjust.
11631 * regcache.h (struct target_desc): Forward declare.
11632 (struct regcache) <tdesc>: New field.
11633 (init_register_cache, new_register_cache): Add target_desc
11634 parameter.
11635 (regcache_invalidate_thread): Declare.
11636 (regcache_invalidate_one): Delete declaration.
11637 (regcache_release): Declare.
11638 (find_register_by_number, register_cache_size, register_size)
11639 (find_regno): Add target_desc parameter.
11640 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
11641 declarations.
11642 * remote-utils.c: Include tdesc.h.
11643 (outreg, prepare_resume_reply): Adjust.
11644 * server.c: Include tdesc.h.
11645 (gdbserver_xmltarget): Delete declaration.
11646 (get_features_xml, process_serial_event): Adjust.
11647 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
11648 declare.
11649 (struct process_info) <tdesc>: New field.
11650 (ipa_tdesc): Declare.
11651 * tdesc.c: New file.
11652 * tdesc.h: New file.
11653 * tracepoint.c: Include tdesc.h.
11654 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
11655 (get_context_regcache): Adjust to pass ipa_tdesc down.
11656 (do_action_at_tracepoint): Adjust to get the register cache size
11657 from the context regcache's description.
11658 (traceframe_walk_blocks): Adjust to get the register cache size
11659 from the current trace frame's description.
11660 (traceframe_get_pc): Adjust to get current trace frame's
11661 description and pass it down.
11662 (gdb_collect): Adjust to get the register cache size from the
11663 IPA's description.
11664 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
11665 (gdbserver_xmltarget): Delete.
11666 (initialize_low_tracepoint): Set the ipa's target description.
11667 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
11668 (initialize_low_tracepoint): Set the ipa's target description.
11669 * linux-x86-low.c: Include tdesc.h.
11670 [__x86_64__] (is_64bit_tdesc): New.
11671 (ps_get_thread_area, x86_get_thread_area): Use it.
11672 (i386_cannot_store_register): Rename to ...
11673 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
11674 (i386_cannot_fetch_register): Rename to ...
11675 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
11676 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
11677 to new interface.
11678 (target_regsets): Rename to ...
11679 (x86_regsets): ... this.
11680 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
11681 interface.
11682 (x86_siginfo_fixup): Use is_64bit_tdesc.
11683 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
11684 (tdesc_x32_avx_linux, tdesc_x32_linux)
11685 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
11686 Declare.
11687 (x86_linux_update_xmltarget): Delete.
11688 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
11689 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
11690 (AMD64_LINUX_USER64_CS): New.
11691 (x86_linux_read_description): New, based on
11692 x86_linux_update_xmltarget.
11693 (same_process_callback): New.
11694 (x86_arch_setup_process_callback): New.
11695 (x86_linux_update_xmltarget): New.
11696 (x86_regsets_info): New.
11697 (amd64_linux_regs_info): New.
11698 (i386_linux_usrregs_info): New.
11699 (i386_linux_regs_info): New.
11700 (x86_linux_regs_info): New.
11701 (x86_arch_setup): Reimplement.
11702 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
11703 (x86_emit_ops): Ditto.
11704 (the_low_target): Adjust. Install x86_linux_regs_info,
11705 x86_cannot_fetch_register, and x86_cannot_store_register.
11706 (initialize_low_arch): New.
11707 * linux-ia64-low.c (tdesc_ia64): Declare.
11708 (ia64_fetch_register): Adjust.
11709 (ia64_usrregs_info, regs_info): New globals.
11710 (ia64_regs_info): New function.
11711 (the_low_target): Adjust.
11712 (initialize_low_arch): New function.
11713 * linux-sparc-low.c (tdesc_sparc64): Declare.
11714 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
11715 Adjust.
11716 (sparc_arch_setup): New function.
11717 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
11718 (the_low_target): Adjust.
11719 (initialize_low_arch): New function.
11720 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
11721 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
11722 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
11723 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
11724 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
11725 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
11726 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
11727 (tdesc_powerpc_isa205_vsx64l): Declare.
11728 (ppc_cannot_store_register, ppc_collect_ptrace_register)
11729 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
11730 (ppc_set_pc, ppc_get_hwcap): Adjust.
11731 (ppc_usrregs_info): Forward declare.
11732 (!__powerpc64__) ppc_regmap_adjusted: New global.
11733 (ppc_arch_setup): Adjust to the current process'es target
11734 description.
11735 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
11736 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
11737 (ppc_store_evrregset): Adjust.
11738 (target_regsets): Rename to ...
11739 (ppc_regsets): ... this, and make static.
11740 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
11741 (ppc_regs_info): New function.
11742 (the_low_target): Adjust.
11743 (initialize_low_arch): New function.
11744 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
11745 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
11746 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
11747 (tdesc_s390x_linux64v2): Declare.
11748 (s390_collect_ptrace_register, s390_supply_ptrace_register)
11749 (s390_fill_gregset, s390_store_last_break): Adjust.
11750 (target_regsets): Rename to ...
11751 (s390_regsets): ... this, and make static.
11752 (s390_get_pc, s390_set_pc): Adjust.
11753 (s390_get_hwcap): New target_desc parameter, and use it.
11754 [__s390x__] (have_hwcap_s390_high_gprs): New global.
11755 (s390_arch_setup): Adjust to set the current process'es target
11756 description. Don't adjust the regmap.
11757 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
11758 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
11759 (regs_info_3264): New globals.
11760 (s390_regs_info): New function.
11761 (the_low_target): Adjust.
11762 (initialize_low_arch): New function.
11763 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
11764 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
11765 [__mips64] (init_registers_mips_linux)
11766 (init_registers_mips_dsp_linux): Delete defines.
11767 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
11768 (have_dsp): New global.
11769 (mips_read_description): New, based on mips_arch_setup.
11770 (mips_arch_setup): Reimplement.
11771 (get_usrregs_info): New function.
11772 (mips_cannot_fetch_register, mips_cannot_store_register)
11773 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
11774 (mips_fill_fpregset, mips_store_fpregset): Adjust.
11775 (target_regsets): Rename to ...
11776 (mips_regsets): ... this, and make static.
11777 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
11778 (dsp_regs_info, regs_info): New globals.
11779 (mips_regs_info): New function.
11780 (the_low_target): Adjust.
11781 (initialize_low_arch): New function.
11782 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
11783 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
11784 Declare.
11785 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
11786 (arm_read_description): New, with bits factored from
11787 arm_arch_setup.
11788 (arm_arch_setup): Reimplement.
11789 (target_regsets): Rename to ...
11790 (arm_regsets): ... this, and make static.
11791 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
11792 (arm_regs_info): New function.
11793 (the_low_target): Adjust.
11794 (initialize_low_arch): New function.
11795 * linux-m68k-low.c (tdesc_m68k): Declare.
11796 (target_regsets): Rename to ...
11797 (m68k_regsets): ... this, and make static.
11798 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
11799 (m68k_regs_info): New function.
11800 (m68k_arch_setup): New function.
11801 (the_low_target): Adjust.
11802 (initialize_low_arch): New function.
11803 * linux-sh-low.c (tdesc_sharch): Declare.
11804 (target_regsets): Rename to ...
11805 (sh_regsets): ... this, and make static.
11806 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
11807 (sh_regs_info, sh_arch_setup): New functions.
11808 (the_low_target): Adjust.
11809 (initialize_low_arch): New function.
11810 * linux-bfin-low.c (tdesc_bfin): Declare.
11811 (bfin_arch_setup): New function.
11812 (bfin_usrregs_info, regs_info): New globals.
11813 (bfin_regs_info): New function.
11814 (the_low_target): Adjust.
11815 (initialize_low_arch): New function.
11816 * linux-cris-low.c (tdesc_cris): Declare.
11817 (cris_arch_setup): New function.
11818 (cris_usrregs_info, regs_info): New globals.
11819 (cris_regs_info): New function.
11820 (the_low_target): Adjust.
11821 (initialize_low_arch): New function.
11822 * linux-cris-low.c (tdesc_crisv32): Declare.
11823 (cris_arch_setup): New function.
11824 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
11825 (cris_regs_info): New function.
11826 (the_low_target): Adjust.
11827 (initialize_low_arch): New function.
11828 * linux-m32r-low.c (tdesc_m32r): Declare.
11829 (m32r_arch_setup): New function.
11830 (m32r_usrregs_info, regs_info): New globals.
11831 (m32r_regs_info): Adjust.
11832 (initialize_low_arch): New function.
11833 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
11834 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
11835 (tic6x_usrregs_info): Forward declare.
11836 (tic6x_read_description): New function, based on ...
11837 (tic6x_arch_setup): ... this. Reimplement.
11838 (target_regsets): Rename to ...
11839 (tic6x_regsets): ... this, and make static.
11840 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
11841 (tic6x_regs_info): New function.
11842 (the_low_target): Adjust.
11843 (initialize_low_arch): New function.
11844 * linux-xtensa-low.c (tdesc_xtensa): Declare.
11845 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
11846 (target_regsets): Rename to ...
11847 (xtensa_regsets): ... this, and make static.
11848 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
11849 globals.
11850 (xtensa_arch_setup, xtensa_regs_info): New functions.
11851 (the_low_target): Adjust.
11852 (initialize_low_arch): New function.
11853 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
11854 (nios2_arch_setup): Set the current process'es tdesc.
11855 (target_regsets): Rename to ...
11856 (nios2_regsets): ... this.
11857 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
11858 (nios2_regs_info): New function.
11859 (the_low_target): Adjust.
11860 (initialize_low_arch): New function.
11861 * linux-aarch64-low.c (tdesc_aarch64): Declare.
11862 (aarch64_arch_setup): Set the current process'es tdesc.
11863 (target_regsets): Rename to ...
11864 (aarch64_regsets): ... this.
11865 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
11866 (aarch64_regs_info): New function.
11867 (the_low_target): Adjust.
11868 (initialize_low_arch): New function.
11869 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
11870 globals.
11871 (target_regsets): Rename to ...
11872 (tile_regsets): ... this.
11873 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
11874 (tile_regs_info): New function.
11875 (tile_arch_setup): Set the current process'es tdesc.
11876 (the_low_target): Adjust.
11877 (initialize_low_arch): New function.
11878 * spu-low.c (tdesc_spu): Declare.
11879 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
11880 * win32-arm-low.c (tdesc_arm): Declare.
11881 (arm_arch_setup): New function.
11882 (the_low_target): Install arm_arch_setup instead of
11883 init_registers_arm.
11884 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
11885 (init_windows_x86): Rename to ...
11886 (i386_arch_setup): ... this. Set `win32_tdesc'.
11887 (the_low_target): Adjust.
11888 * win32-low.c (win32_tdesc): New global.
11889 (child_add_thread): Don't create the thread cache here.
11890 (do_initial_child_stuff): Set the new process'es tdesc.
11891 * win32-low.h (struct target_desc): Forward declare.
11892 (win32_tdesc): Declare.
11893 * lynx-i386-low.c (tdesc_i386): Declare global.
11894 (lynx_i386_arch_setup): Set `lynx_tdesc'.
11895 * lynx-low.c (lynx_tdesc): New global.
11896 (lynx_add_process): Set the new process'es tdesc.
11897 * lynx-low.h (struct target_desc): Forward declare.
11898 (lynx_tdesc): Declare global.
11899 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
11900 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
11901 * nto-low.c (nto_tdesc): New global.
11902 (do_attach): Set the new process'es tdesc.
11903 * nto-low.h (struct target_desc): Forward declare.
11904 (nto_tdesc): Declare.
11905 * nto-x86-low.c (tdesc_i386): Declare.
11906 (nto_x86_arch_setup): Set `nto_tdesc'.
11907
11908 2013-06-04 Gary Benson <gbenson@redhat.com>
11909
11910 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
11911 to qSupported response when appropriate.
11912 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
11913 with nonzero-length annex.
11914 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
11915 arguments supplied in annex.
11916
11917 2013-05-31 Doug Evans <dje@google.com>
11918
11919 PR server/15594
11920 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
11921 64 bits in 64-cross-32 environment.
11922
11923 2013-05-28 Pedro Alves <palves@redhat.com>
11924
11925 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
11926 (aarch64-without-fpu.c): Delete rule.
11927 * configure.srv (aarch64*-*-linux*): Remove references to
11928 aarch64-without-fpu.o and aarch64-without-fpu.xml.
11929 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
11930 declaration.
11931
11932 2013-05-24 Pedro Alves <palves@redhat.com>
11933
11934 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
11935 instead of strchr/decode_address. Error if the range isn't split
11936 with a ','. Don't assume there's be a ':' in the action.
11937
11938 2013-05-23 Yao Qi <yao@codesourcery.com>
11939 Pedro Alves <palves@redhat.com>
11940
11941 * linux-low.c (lwp_in_step_range): New function.
11942 (linux_wait_1): If the thread was range stepping and stopped
11943 outside the stepping range, report the stop to GDB. Otherwise,
11944 continue stepping. Add range stepping debug output.
11945 (linux_set_resume_request): Copy the step range from the resume
11946 request to the lwp.
11947 (linux_supports_range_stepping): New.
11948 (linux_target_ops) <supports_range_stepping>: Set to
11949 linux_supports_range_stepping.
11950 * linux-low.h (struct linux_target_ops)
11951 <supports_range_stepping>: New field.
11952 (struct lwp_info) <step_range_start, step_range_end>: New fields.
11953 * linux-x86-low.c (x86_supports_range_stepping): New.
11954 (the_low_target) <supports_range_stepping>: Set to
11955 x86_supports_range_stepping.
11956 * server.c (handle_v_cont): Handle 'r' action.
11957 (handle_v_requests): Append ";r" if the target supports range
11958 stepping.
11959 * target.h (struct thread_resume) <step_range_start,
11960 step_range_end>: New fields.
11961 (struct target_ops) <supports_range_stepping>:
11962 New field.
11963 (target_supports_range_stepping): New macro.
11964
11965 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11966
11967 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
11968 confusion in comment.
11969
11970 2013-05-17 Joel Brobecker <brobecker@adacore.com>
11971
11972 * lynx-low.c (struct process_info_private): New type.
11973 (lynx_add_process): New function.
11974 (lynx_create_inferior, lynx_attach): Replace calls to
11975 add_process by calls to lynx_add_process.
11976 (lynx_resume): If PTID is null, then try using
11977 current_process()->private->last_wait_event_ptid.
11978 Add comments.
11979 (lynx_clear_inferiors): Delete. The contents of that function
11980 has been inlined in lynx_mourn;
11981 (lynx_wait_1): Save the ptid in the process's private data.
11982 (lynx_mourn): Free the process' private data. Replace call
11983 to lynx_clear_inferiors by call to clear_inferiors.
11984
11985 2013-05-17 Yao Qi <yao@codesourcery.com>
11986
11987 * i386-low.c (i386_length_and_rw_bits): Move the comment to
11988 the right place.
11989
11990 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
11991
11992 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
11993 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
11994 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
11995 PT_TEXT_END_ADDR guards. Update comments.
11996 (linux_target_op) <read_offsets>: Conditionally define to
11997 linux_read_offsets if the target is UCLIBC and if it defines
11998 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
11999
12000 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
12001 Andrew Jenner <andrew@codesourcery.com>
12002
12003 * Makefile.in (SFILES): Add linux-nios2-low.c.
12004 (clean): Add action to delete nios2-linux.c.
12005 (nios2-linux.c): New rule.
12006 * configure.srv: Add nios2*-*-linux*.
12007 * linux-nios2-low.c: New.
12008
12009 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
12010
12011 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
12012
12013 2013-04-25 Hui Zhu <hui@codesourcery.com>
12014
12015 PR gdb/15186
12016 * ax.c (ax_printf): Add fflush.
12017
12018 2013-04-22 Tom Tromey <tromey@redhat.com>
12019
12020 * Makefile.in (SFILES): Add filestuff.c.
12021 (OBS): Add filestuff.o.
12022 (filestuff.o): New target.
12023 * config.in, configure: Rebuild.
12024 * configure.ac: Check for fdwalk, pipe2.
12025
12026 2013-04-17 Pedro Alves <palves@redhat.com>
12027
12028 * configure.ac (USE_THREAD_DB): Delete variable.
12029 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
12030 Don't AC_SUBST USE_THREAD_DB.
12031 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
12032 * config.in, configure: Regenerate.
12033
12034 2013-04-16 Pedro Alves <palves@redhat.com>
12035
12036 * linux-low.h (struct lwp_info) <thread_known>: Move under
12037 the USE_THREAD_DB #ifdef.
12038
12039 2013-04-16 Pedro Alves <palves@redhat.com>
12040
12041 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
12042 (linux-low.o): Delete rule.
12043 * linux-low.h: Always include "gdb_thread_db.h" instead of
12044 conditionally including thread_db.h.
12045 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
12046 HAVE_THREAD_DB_H.
12047
12048 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12049
12050 * Makefile.in (install-only): Fix make install regression.
12051
12052 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
12053
12054 Convert man pages to texinfo, new gdbinit.5 texinfo page.
12055 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
12056 installation.
12057 * gdbserver.1: Remove.
12058
12059 2013-03-22 Pedro Alves <palves@redhat.com>
12060
12061 * linux-low.c (handle_extended_wait): Don't call
12062 linux_enable_event_reporting.
12063
12064 2013-03-15 Tony Theodore <tonyt@logyst.com>
12065
12066 PR build/9098:
12067 * Makefile.in (SHELL): Use @SHELL@.
12068
12069 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
12070
12071 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
12072 compiler warning.
12073
12074 2013-03-13 Joel Brobecker <brobecker@adacore.com>
12075
12076 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
12077 Remove extraneous NULL element.
12078
12079 2013-03-13 Yao Qi <yao@codesourcery.com>
12080
12081 * tracepoint.c (traceframe_read_tsv): Look for the last matched
12082 'V' block in trace frame.
12083
12084 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
12085
12086 * target.h (struct target_ops): Add btrace ops.
12087 (target_supports_btrace): New macro.
12088 (target_enable_btrace): New macro.
12089 (target_disable_btrace): New macro.
12090 (target_read_btrace): New macro.
12091 * gdbthread.h (struct thread_info): Add btrace field.
12092 * server.c: Include btrace-common.h.
12093 (handle_btrace_general_set): New function.
12094 (handle_btrace_enable): New function.
12095 (handle_btrace_disable): New function.
12096 (handle_general_set): Call handle_btrace_general_set.
12097 (handle_qxfer_btrace): New function.
12098 (struct qxfer qxfer_packets[]): Add btrace entry.
12099 * inferiors.c (remove_thread): Disable btrace.
12100 * linux-low: Include linux-btrace.h.
12101 (linux_low_enable_btrace): New function.
12102 (linux_low_read_btrace): New function.
12103 (linux_target_ops): Add btrace ops.
12104 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
12105 Add srv_linux_btrace=yes.
12106 (x86_64-*-linux*): Add linux-btrace.o.
12107 Add srv_linux_btrace=yes.
12108 * configure.ac: Define HAVE_LINUX_BTRACE.
12109 * config.in: Regenerated.
12110 * configure: Regenerated.
12111
12112 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
12113
12114 * server.c (handle_qxfer): Preserve error message if -3 is
12115 returned.
12116 (qxfer): Document the -3 return value.
12117
12118 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
12119
12120 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
12121 (linux_btrace_h): New variable.
12122 (linux-btrace.o): New rule.
12123
12124 2013-03-08 Stan Shebs <stan@codesourcery.com>
12125 Hafiz Abid Qadeer <abidh@codesourcery.com>
12126
12127 * tracepoint.c (trace_buffer_size): New global.
12128 (DEFAULT_TRACE_BUFFER_SIZE): New define.
12129 (init_trace_buffer): Change to one-argument function. Allocate
12130 trace buffer memory.
12131 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
12132 handle QTBuffer:size packet.
12133 (cmd_bigqtbuffer_size): New function.
12134 (initialize_tracepoint): Call init_trace_buffer with
12135 DEFAULT_TRACE_BUFFER_SIZE.
12136 * server.c (handle_query): Add QTBuffer:size in the
12137 supported packets.
12138
12139 2013-03-07 Yao Qi <yao@codesourcery.com>
12140
12141 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
12142 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
12143 of -1.
12144 (cmd_qtsp): Adjust condition. Do post increment.
12145 Set cur_action and cur_step_action back to 0.
12146
12147 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
12148
12149 PR server/15236
12150 * linux-low.c (linux_write_memory): Return early success if LEN is
12151 zero.
12152
12153 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
12154
12155 * configure.srv: Add x86_64-*-cygwin* as target.
12156
12157 2013-02-28 Tom Tromey <tromey@redhat.com>
12158
12159 * configure.ac: Invoke AC_SYS_LARGEFILE.
12160 * configure, config.in: Rebuild.
12161
12162 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
12163
12164 * win32-low.c: Throughout, fix format strings and casts of
12165 printf-like functions to avoid type related warnings on all
12166 platforms.
12167 (get_child_debug_event): Print dwDebugEventCode as hex since
12168 that's how it's usually documented.
12169
12170 2013-02-28 Yao Qi <yao@codesourcery.com>
12171
12172 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
12173 pulongest.
12174
12175 2013-02-27 Jiong Wang <jiwang@tilera.com>
12176
12177 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
12178 (reg-tilegx32.c): New rule.
12179 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
12180 * linux-tile-low.c (tile_arch_setup): New function. Invoke
12181 different register info initializer according to elf class.
12182 (init_registers_tilgx32): New function. The tilegx32 register info
12183 initializer.
12184 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
12185 (tile_store_gregset): Likewise.
12186
12187 2013-02-27 Yao Qi <yao@codesourcery.com>
12188
12189 * server.c (process_point_options): Print debug message when
12190 debug_threads is true.
12191
12192 2013-02-26 Yao Qi <yao@codesourcery.com>
12193
12194 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
12195
12196 2013-02-19 Pedro Alves <palves@redhat.com>
12197 Kai Tietz <ktietz@redhat.com>
12198
12199 PR gdb/15161
12200
12201 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
12202 instead of strtoul to extract address from packet.
12203 (process_serial_event) <'z'>: Likewise.
12204
12205 2013-02-18 Yao Qi <yao@codesourcery.com>
12206
12207 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
12208
12209 2013-02-14 Pedro Alves <palves@redhat.com>
12210
12211 Plug memory leak.
12212
12213 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
12214 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
12215
12216 2013-02-14 Pedro Alves <palves@redhat.com>
12217
12218 * tracepoint.c (cmd_qtdpsrc): Use savestring.
12219
12220 2013-02-14 Pedro Alves <palves@redhat.com>
12221
12222 * tracepoint.c (save_string): Delete.
12223 (add_tracepoint_action): Use savestring instead of save_string.
12224
12225 2013-02-12 Pedro Alves <palves@redhat.com>
12226
12227 * linux-xtensa-low.c: Ditto.
12228 * xtensa-xtregs.c: Ditto.
12229
12230 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
12231
12232 * thread-db.c (thread_db_get_tls_address): NULL pointer check
12233 thread_db.
12234
12235 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
12236
12237 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
12238 aarch64_num_wp_regs and aarch64_num_bp_regs to
12239 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
12240
12241 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
12242
12243 * linux-aarch64-low.c (ps_get_thread_area): Replace
12244 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
12245
12246 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
12247 Marcus Shawcroft <marcus.shawcroft@arm.com>
12248 Nigel Stephens <nigel.stephens@arm.com>
12249 Yufeng Zhang <yufeng.zhang@arm.com>
12250
12251 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
12252 (aarch64.c, aarch64-without-fpu.c): New targets.
12253 * configure.srv (aarch64*-*-linux*): New.
12254 * linux-aarch64-low.c: New file.
12255
12256 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
12257
12258 * linux-low.c (handle_extended_wait, linux_create_inferior)
12259 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
12260 (dequeue_one_deferred_signal, linux_resume_one_thread)
12261 (fetch_register, linux_write_memory, linux_enable_event_reporting)
12262 (linux_tracefork_grandchild, linux_test_for_tracefork)
12263 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
12264 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
12265 where the argument is 0.
12266
12267 2013-01-25 Yao Qi <yao@codesourcery.com>
12268
12269 * event-loop.c: Include "queue.h".
12270 (gdb_event_p): New typedef.
12271 (struct gdb_event) <next_event>: Remove.
12272 (event_queue): Change to QUEUE(gdb_event_p).
12273 (async_queue_event): Remove.
12274 (gdb_event_xfree): New.
12275 (initialize_event_loop): New.
12276 (process_event): Use API from QUEUE.
12277 (wait_for_event): Likewise.
12278 * server.c (main): Call initialize_event_loop.
12279 * server.h (initialize_event_loop): Declare.
12280
12281 2013-01-18 Yao Qi <yao@codesourcery.com>
12282
12283 * ax.h (struct eval_agent_expr_context): New.
12284 (gdb_eval_agent_expr): Update declaration.
12285 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
12286 TFRAME. Add new argument CTX.
12287 * server.h (struct eval_agent_expr_context): Declare.
12288 (agent_mem_read, agent_tsv_read): Update declaration.
12289 (agent_mem_read_string): Likewise.
12290 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
12291 (add_traceframe_block): Add new argument TPOINT.
12292 Increase TPOINT->traceframe_usage.
12293 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
12294 eval_tracepoint_agent_expr.
12295 (condition_true_at_tracepoint): Likewise.
12296 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
12297 (agent_mem_read_string, agent_tsv_read): Likewise.
12298
12299 2013-01-16 Yao Qi <yao@codesourcery.com>
12300
12301 * linux-low.c (linux_resume_one_lwp): Don't check
12302 'lwp->bp_reinsert != 0'.
12303
12304 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12305 Pedro Alves <palves@redhat.com>
12306
12307 * lynx-low.c (ptrace_request_to_str): Define a temporary
12308 macro and use it to simplify this function's implementation.
12309
12310 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12311
12312 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
12313 sets errno.
12314
12315 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12316
12317 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
12318
12319 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12320
12321 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
12322
12323 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12324
12325 * lynx-low.c (lynx_resume): Use the resume_info parameter
12326 to determine the ptid for the lynx_ptrace call, unless
12327 it is equal to minus_one_ptid, in which case we use the
12328 ptid of the current_inferior.
12329 (lynx_wait_1): After having received a thread create/exit
12330 event, resume the inferior's execution using the signaling
12331 thread's ptid, rather than the old ptid.
12332
12333 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12334
12335 * lynx-low.c (lynx_resume): Delete variable ret.
12336
12337 2013-01-01 Joel Brobecker <brobecker@adacore.com>
12338
12339 * gdbreplay.c (gdbreplay_version): Update copyright year.
12340 * server.c (gdbserver_version): Likewise.
12341
12342 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12343
12344 * lynx-low.c (lynx_wait_1): Add debug trace before adding
12345 new thread.
12346
12347 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12348
12349 * lynx-low.c (ptrace_request_to_str): Add handling for
12350 PTRACE_GETTRACESIG.
12351
12352 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12353
12354 * lynx-low.c (lynx_attach): Delete variable new_process.
12355
12356 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12357
12358 * lynx-low.c (lynx_create_inferior): Delete variable
12359 new_process.
12360
12361 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12362
12363 * lynx-low.c (ptrace_request_to_str): Do not handle
12364 PTRACE_GETTHREADLIST if this macro does not exist.
12365
12366 2012-12-15 Yao Qi <yao@codesourcery.com>
12367
12368 * Makefile.in (OBS): Add notif.o.
12369 * notif.c, notif.h: New.
12370 * server.c: Include "notif.h".
12371 (struct vstop_notif) <next>: Remove.
12372 <base>: New field.
12373 (queue_stop_reply): Update.
12374 (push_event, send_next_stop_reply): Remove.
12375 (discard_queued_stop_replies): Update.
12376 (notif_stop): New variable.
12377 (handle_v_stopped): Remove.
12378 (handle_v_requests): Don't call handle_v_stopped. Call
12379 handle_ack_notif instead.
12380 (queue_stop_reply_callback): Call notif_event_enque instead
12381 of queue_stop_reply.
12382 (handle_status): Don't call send_next_stop_reply, call
12383 notif_write_event instead.
12384 (kill_inferior_callback): Likewise.
12385 (detach_or_kill_inferior_callback): Likewise.
12386 (main): Call initialize_notif.
12387 (process_serial_event): Call QUEUE_is_empty.
12388 (handle_target_event): Call notif_push instead of push event.
12389 * server.h (push_event): Remove declaration.
12390
12391 2012-12-10 Tom Tromey <tromey@redhat.com>
12392
12393 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
12394 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
12395 macros.
12396 (.c.o): Rewrite.
12397 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
12398 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
12399 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
12400 (amd64-linux-ipa.o, ax.o): Rewrite.
12401 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
12402 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
12403 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
12404 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
12405 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
12406 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
12407 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
12408 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
12409 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
12410 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
12411 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
12412 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
12413 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
12414 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
12415 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
12416 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
12417 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
12418 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
12419 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
12420 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
12421 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
12422 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
12423 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
12424 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
12425 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
12426 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
12427 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
12428 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
12429 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
12430 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
12431 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
12432 (reg-tilegx.o): Remove.
12433 (all_object_files): New macro.
12434 Include .deps files.
12435 * aclocal.m4, configure: Rebuild.
12436 * acinclude.m4: Include depstand.m4, lead-dot.m4.
12437 * configure.ac: Invoke ZW_CREATE_DEPDIR,
12438 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
12439
12440 2012-12-05 Tom Tromey <tromey@redhat.com>
12441
12442 PR gdb/14917:
12443 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
12444
12445 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
12446
12447 * configure.ac: Check for linux/perf_event.h.
12448 * config.in: Regenerated.
12449 * configure: Regenerated.
12450
12451 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
12452
12453 * hostio.c (handle_readlink): Decrease buffer size
12454 parameter passed to readlink by one byte.
12455
12456 2012-11-26 Yao Qi <yao@codesourcery.com>
12457
12458 * configure.ac (build_warnings): Append '-Wempty-body'.
12459 * configure: Regenerated.
12460 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
12461 body.
12462
12463 2012-11-15 Pierre Muller <muller@sourceware.org>
12464
12465 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
12466 * config.in: Regenerate.
12467 * configure: Regenerate.
12468 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
12469 Use "gdb_wait.h" header instead of <sys/wait.h> header.
12470 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
12471 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
12472 header.
12473 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
12474 instead of <sys/wait.h> header.
12475 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
12476
12477 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
12478
12479 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
12480 (various make rules): Remove -DGDBSERVER
12481
12482 2012-11-09 Yao Qi <yao@codesourcery.com>
12483
12484 * spu-low.c (current_ptid): Move it to ..
12485 * gdbthread.h: ... here. New.
12486 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
12487 * server.c (myresume, process_serial_event): Likewise.
12488 * thread-db.c (thread_db_find_new_threads): Likewise.
12489 * tracepoint.c (run_inferior_command): Likewise.
12490
12491 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
12492
12493 * server.c (handle_search_memory_1): Include access length in
12494 warning message.
12495
12496 2012-09-05 Michael Brandt <michael.brandt@axis.com>
12497
12498 * linux-crisv32-low.c: Fix compile errors.
12499
12500 2012-09-04 Yao Qi <yao@codesourcery.com>
12501
12502 * tracepoint.c (cmd_qtsv): Adjust debug message.
12503 Don't check CUR_TPOINT.
12504
12505 2012-08-28 Yao Qi <yao@codesourcery.com>
12506
12507 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
12508 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
12509 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
12510 Remove declarations of xmalloc, xreallloc, xstrdup and
12511 freeargv.
12512 * Makefile.in (libiberty_h): New.
12513 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
12514 (linux-bfin-low.o): Append dependency 'libiberty.h'.
12515
12516 2012-08-23 Yao Qi <yao@codesourcery.com>
12517
12518 * server.h: Remove declaration of 'xsnprintf'.
12519
12520 2012-08-22 Keith Seitz <keiths@redhat.com>
12521
12522 * server.h: Include build-gnulib-gbserver/config.h.
12523 * gdbreplay.c: Likewise.
12524
12525 2012-08-08 Doug Evans <dje@google.com>
12526
12527 * Makefile.in (SFILES): Add gdb_vecs.c.
12528 (OBS): Add gdb_vecs.o.
12529 (gdb_vecs_h, host_defs_h): New variables.
12530 (thread-db.o): Add $(gdb_vecs_h) dependency.
12531 (gdb_vecs.o): New rule.
12532 * thread-db.c: #include "gdb_vecs.h".
12533 (thread_db_load_search): Use a vector to iterate over path elements.
12534 Handle text appearing after "$pdir".
12535
12536 * configure.ac: Add check for strstr.
12537 * config.in: Regenerate.
12538 * configure: Regenerate.
12539
12540 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
12541
12542 * hostio.c (handle_pread): If pread fails, fall back to attempting
12543 lseek/read.
12544 (handle_pwrite): Likewise for pwrite.
12545
12546 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
12547
12548 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
12549 between unsupported TYPE and unimplementable ADDR/LEN combination.
12550 (arm_insert_point): Act on new return value.
12551
12552 2012-07-31 Pedro Alves <palves@redhat.com>
12553
12554 * server.c (process_point_options): Only skip tokens if we find
12555 one that is unrecognized. Don't treat 'X' specially while
12556 skipping unrecognized tokens.
12557
12558 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
12559
12560 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
12561 to 4-byte-align HW breakpoint addresses for Thumb.
12562
12563 2012-07-27 Yao Qi <yao@codesourcery.com>
12564
12565 PR remote/14161.
12566
12567 * server.h: Declare gdb_agent_about_to_close.
12568 * target.c (kill_inferior): Include "agent.h".
12569 New. Send command 'kill'.
12570 * target.h (kill_inferior): Removed macro.
12571 * tracepoint.c (gdb_agent_about_to_close): New.
12572 (gdb_agent_helper_thread): Handle command 'close'.
12573 Wait endlessly until the inferior stops.
12574 Install gdb_agent_remove_socket to atexit hook.
12575 (agent_socket_name): New static variable.
12576 (gdb_agent_socket_init): Replace local variable 'name' with
12577 'agent_socket_name'.
12578 (gdb_agent_remove_socket): New.
12579
12580 2012-07-27 Yao Qi <yao@codesourcery.com>
12581
12582 * server.c (process_point_options): Stop at 'X' when parsing.
12583
12584 2012-07-19 Michael Eager <eager@eagercon.com>
12585
12586 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
12587 to hw_execute.
12588 * linux-x86-low.c (x86_insert_point, x86_remove_point):
12589 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
12590 hardware breakpoint.
12591
12592 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12593
12594 * gdbserver/linux-low.c (initialize_low): Call
12595 linux_ptrace_init_warnings.
12596
12597 2012-07-02 Doug Evans <dje@google.com>
12598
12599 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
12600 pointer to int.
12601
12602 2012-07-02 Stan Shebs <stan@codesourcery.com>
12603
12604 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
12605 (ax.o): Add it to build rule.
12606 (ax-ipa.o): Ditto.
12607 (OBS): Add format.o.
12608 (IPA_OBS): Add format.o.
12609 * server.c (handle_query): Claim support for breakpoint commands.
12610 (process_point_options): Add command case.
12611 (process_serial_event): Leave running if there are printfs in
12612 effect.
12613 * mem-break.h (any_persistent_commands): Declare.
12614 (add_breakpoint_commands): Declare.
12615 (gdb_no_commands_at_breakpoint): Declare.
12616 (run_breakpoint_commands): Declare.
12617 * mem-break.c (struct point_command_list): New struct.
12618 (struct breakpoint): New field command_list.
12619 (any_persistent_commands): New function.
12620 (add_commands_to_breakpoint): New function.
12621 (add_breakpoint_commands): New function.
12622 (gdb_no_commands_at_breakpoint): New function.
12623 (run_breakpoint_commands): New function.
12624 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
12625 locally.
12626 * ax.c: Include format.h.
12627 (ax_printf): New function.
12628 (gdb_eval_agent_expr): Add printf opcode.
12629
12630 2012-06-13 Yao Qi <yao@codesourcery.com>
12631
12632 * server.c (start_inferior): Remove duplicated writes to fields
12633 'last_resume_kind' and 'last_status' of 'current_inferior'.
12634
12635 2012-06-12 Yao Qi <yao@codesourcery.com>
12636 Pedro Alves <palves@redhat.com>
12637
12638 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
12639 comment.
12640 * server.c (handle_v_cont): Extend comment.
12641
12642 2012-06-11 Yao Qi <yao@codesourcery.com>
12643
12644 * linux-low.c (linux_attach): Add 'static'.
12645
12646 2012-06-06 Yao Qi <yao@codesourcery.com>
12647
12648 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
12649
12650 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
12651
12652 Fix gcc -flto compilation warning.
12653 * server.c (main): Make variable multi_mode and attach volatile.
12654
12655 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12656
12657 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
12658 if the platform doesn't know about it.
12659
12660 2012-05-30 Jeff Kenton <jkenton@tilera.com>
12661
12662 * Makefile.in (SFILES): Add linux-tile-low.c.
12663 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
12664 * configure.srv: Handle tilegx-*-linux*.
12665 * linux-tile-low.c: New file.
12666
12667 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12668
12669 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
12670
12671 2012-05-24 Pedro Alves <palves@redhat.com>
12672
12673 PR gdb/7205
12674
12675 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
12676
12677 2012-05-24 Pedro Alves <palves@redhat.com>
12678
12679 PR gdb/7205
12680
12681 Replace target_signal with gdb_signal throughout.
12682
12683 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
12684
12685 * linux-low.c (linux_store_registers): Avoid the copying sequence
12686 when no data has been retrieved by ptrace.
12687
12688 2012-05-22 Will Deacon <will.deacon@arm.com>
12689
12690 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
12691 Include asm/ptrace.h.
12692 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
12693 already defined.
12694
12695 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
12696
12697 * linux-low.c (linux_store_registers): Don't re-retrieve data
12698 with ptrace that has already been obtained from /proc. Always
12699 copy any data retrieved with ptrace to the buffer supplied.
12700
12701 2012-05-11 Yao Qi <yao@codesourcery.com>
12702 Pedro Alves <palves@redhat.com>
12703
12704 * linux-low.c (enum stopping_threads_kind): New.
12705 (stopping_threads): Change type to `enum stopping_threads_kind'.
12706 (handle_extended_wait): If stopping and suspending threads, leave
12707 the new_lwp suspended too.
12708 (linux_wait_for_event): Adjust.
12709 (stop_all_lwps): Set `stopping_threads' to
12710 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
12711 whether we're suspending threads or just stopping them. Assert no
12712 recursion happens.
12713
12714 2012-04-29 Yao Qi <yao@codesourcery.com>
12715
12716 * server.h: Move some code to ...
12717 * gdbthread.h: ... here. New.
12718 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
12719 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
12720 (nto-low.o, win32-low.o): Likewise.
12721 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
12722 * regcache.c, remote-utils.c, server.c: Likewise.
12723 * target.c, tracepoint.c, win32-low.c: Likewise.
12724
12725 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12726
12727 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
12728 (PTRACE_ARG4_TYPE): Likewise.
12729 (PTRACE_XFER_TYPE): Likewise.
12730 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
12731 ptrace to PTRACE_ARG3_TYPE.
12732 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
12733 (PTRACE_ARG4_TYPE): Likewise.
12734 (PTRACE_XFER_TYPE): Likewise.
12735 (linux_detach_one_lwp): Cast fourth argument of
12736 ptrace to long then PTRACE_ARG4_TYPE.
12737 (regsets_fetch_inferior_registers): Cast third argument of
12738 ptrace to long then PTRACE_ARG3_TYPE.
12739 (regsets_store_inferior_registers): Likewise.
12740
12741 2012-04-20 Pedro Alves <palves@redhat.com>
12742
12743 * configure: Regenerate.
12744
12745 2012-04-19 Pedro Alves <palves@redhat.com>
12746
12747 * Makefile.in (GNULIB_BUILDDIR): New.
12748 (LIBGNU, INCGNU, GNULIB_H): Adjust.
12749 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
12750 (all, install-only, uninstall, clean-info, all-lib, clean): No
12751 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
12752 (maintainer-clean realclean distclean): Use subdir_do.
12753 (subdir_do): New.
12754 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
12755 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
12756 * acinclude.m4: Include acx_configure_dir.m4.
12757 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
12758 calls. Call AC_PROG_RANLIB. Configure gnulib using
12759 ACX_CONFIGURE_DIR.
12760 (GNULIB): New.
12761 (GNULIB_STDINT_H): Adjust.
12762 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
12763 * gdbreplay.c: Include build-gnulib/config.h.
12764 * server.h: Likewise.
12765 * aclocal.m4: Regenerate.
12766 * config.in: Regenerate.
12767 * configure: Regenerate.
12768
12769 2012-04-19 Pedro Alves <palves@redhat.com>
12770
12771 * Makefile.in (LIBGNU, INCGNU): Adjust.
12772 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
12773 (all, install-only, uninstall, clean-info, all-lib, clean)
12774 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
12775 * configure.ac: Adjust AC_OUTPUT output.
12776 * aclocal.m4: Regenerate.
12777 * configure: Regenerate.
12778
12779 2012-04-19 Pedro Alves <palves@redhat.com>
12780
12781 * Makefile.in (generated_files): New.
12782 (server_h): Remove the explicit dependency on config.h, and depend
12783 on $generated_files.
12784
12785 2012-04-19 Pedro Alves <palves@redhat.com>
12786
12787 * Makefile.in (INCGNU): Add -Ignulib.
12788
12789 2012-04-19 Pedro Alves <palves@redhat.com>
12790
12791 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
12792 (INCGNU): ... this, and spell out -I here.
12793 (GNULIB_LIB): Rename to ...
12794 (LIBGNU): ... this.
12795 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
12796
12797 2012-04-19 Pedro Alves <palves@redhat.com>
12798
12799 * config.in: Regenerate.
12800
12801 2012-04-19 Pedro Alves <palves@redhat.com>
12802
12803 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
12804 * server.h (memmem): Remove declaration.
12805 * config.in: Regenerate.
12806 * configure: Regenerate.
12807
12808 2012-04-19 Yao Qi <yao@codesourcery.com>
12809
12810 * Makefile.in (SFILES): Add common/vec.c.
12811 (OBS): Add vec.o.
12812 (vec.o): New rule.
12813
12814 2012-04-19 Yao Qi <yao@codesourcery.com>
12815
12816 * remote-utils.c (prepare_resume_reply): Replace with macro
12817 target_core_of_thread.
12818 * server.c (handle_qxfer_threads_proper): Likewise.
12819 * target.h (traget_core_of_thread): New macro.
12820
12821 2012-04-18 Pedro Alves <palves@redhat.com>
12822
12823 * aclocal.m4: Regenerate.
12824 * configure: Regenerate.
12825
12826 2012-04-16 Yao Qi <yao@codesourcery.com>
12827
12828 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
12829 duplicated on address.
12830
12831 2012-04-16 Yao Qi <yao@codesourcery.com>
12832
12833 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
12834 (struct tracepoint_action_ops) <send>: New field.
12835 (m_tracepoint_action_send, r_tracepoint_action_send): New.
12836 (agent_expr_send, x_tracepoint_action_send): New.
12837 (l_tracepoint_action_send): New.
12838 (cmd_qtdp): Download and install tracepoint
12839 according to `use_agent'.
12840 (run_inferior_command): Add one more parameter `len'.
12841 Update callers.
12842 (tracepoint_send_agent): New.
12843 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
12844
12845 2012-04-16 Yao Qi <yao@codesourcery.com>
12846
12847 * tracepoint.c (download_tracepoints): Moved to ...
12848 (cmd_qtstart): ... here.
12849
12850 2012-04-14 Yao Qi <yao@codesourcery.com>
12851
12852 * tracepoint.c: Include inttypes.h.
12853 (struct collect_memory_action): Use sized types.
12854 (struct tracepoint): Likewise.
12855 (cmd_qtdp, stop_tracing): Update print specifiers.
12856 (cmd_qtp, response_tracepoint): Likewise.
12857 (collect_data_at_tracepoint): Likewise.
12858 (collect_data_at_step): Likewise.
12859
12860 2012-04-14 Yao Qi <yao@codesourcery.com>
12861
12862 Import gnulib module inttypes.
12863 * aclocal.m4, config.in, configure: Regenerated.
12864
12865 2012-04-14 Yao Qi <yao@codesourcery.com>
12866
12867 * Makefile.in (maintainer-clean, realclean, distclean): Remove
12868 Makefile and config.status at last.
12869
12870 2012-04-13 Yao Qi <yao@codesourcery.com>
12871
12872 * tracepoint.c: Include stdint.h unconditionally.
12873
12874 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12875
12876 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
12877 on BFD_HAVE_SYS_PROCFS_TYPE.
12878 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
12879 * configure: Regenerate.
12880 * config.in: Likewise.
12881
12882 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
12883
12884 * Makefile.in (clean): Also remove x32.c x32-linux.c
12885 x32-avx.c x32-avx-linux.c.
12886 (x32.o): New target.
12887 (x32.c): Likewise.
12888 (x32-linux.o): Likewise.
12889 (x32-linux.c): Likewise.
12890 (x32-avx.o): Likewise.
12891 (x32-avx.c): Likewise.
12892 (x32-avx-linux.o): Likewise.
12893 (x32-avx-linux.c): Likewise.
12894
12895 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
12896 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
12897 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
12898 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
12899 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
12900 i386/x32-avx-linux.xml.
12901
12902 * linux-x86-low.c (init_registers_x32_linux): New prototype.
12903 (init_registers_x32_avx_linux): Likwise.
12904 (x86_linux_update_xmltarget): Call init_registers_x32_linux
12905 or init_registers_x32_avx_linux if linux_is_elf64 is false.
12906
12907 2012-04-13 Pedro Alves <palves@redhat.com>
12908
12909 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
12910 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
12911 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
12912 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
12913 the sub-make.
12914
12915 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12916
12917 * linux-x86-low.c (compat_x32_clock_t): New.
12918 (compat_x32_siginfo_t): Likewise.
12919 (compat_x32_siginfo_from_siginfo): Likewise.
12920 (siginfo_from_compat_x32_siginfo): Likewise.
12921 (linux_is_elf64): Likewise.
12922 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
12923 and siginfo_from_compat_x32_siginfo for x32.
12924 (x86_arch_setup): Set linux_is_elf64.
12925
12926 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12927
12928 PR gdb/13969
12929 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
12930 e_machine field.
12931 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
12932 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
12933 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
12934 compatible with process.
12935
12936 2012-04-12 Yao Qi <yao@codesourcery.com>
12937
12938 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
12939 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
12940 (install-only, install-info, clean): Handle sub dir gnulib.
12941 (all-lib, am--refresh): New targets.
12942 (memmem.o): Remove target.
12943 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
12944 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
12945 (AC_REPLACE_FUNCS): Remove memmem.
12946 Invoke gl_INIT and AM_INIT_AUTOMAKE.
12947 (AC_OUTPUT): Generate Makefile in gnulib/.
12948 * aclocal.m4, config.in, configure: Regenerated.
12949
12950 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
12951
12952 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
12953
12954 2012-04-05 Pedro Alves <palves@redhat.com>
12955
12956 -Werror=strict-aliasing
12957
12958 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
12959 pointer.
12960
12961 2012-04-04 Pedro Alves <palves@redhat.com>
12962
12963 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12964 (sparc_store_gregset_from_stack, sparc_store_gregset)
12965 (sparc_breakpoint_at): Fix formatting.
12966
12967 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12968
12969 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
12970 are available.
12971 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
12972 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
12973 * config.in: Regenerate.
12974 * configure: Likewise.
12975
12976 2012-03-29 Pedro Alves <palves@redhat.com>
12977
12978 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
12979 Correct ptrace arguments.
12980
12981 2012-03-28 Pedro Alves <palves@redhat.com>
12982
12983 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
12984 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
12985 (IA64_FR1_REGNUM): New defines.
12986 (ia64_fetch_register): New.
12987 (the_low_target): Install it.
12988 * linux-low.h (struct linux_target_ops) <fetch_register>: New
12989 field.
12990 * linux-low.c (linux_fetch_registers): Try the
12991 the_low_target.fetch_register hook first.
12992
12993 * linux-arm-low.c (the_low_target): Adjust.
12994 * linux-bfin-low.c (the_low_target): Adjust.
12995 * linux-cris-low.c (the_low_target): Adjust.
12996 * linux-crisv32-low.c (the_low_target): Adjust.
12997 * linux-m32r-low.c (the_low_target): Adjust.
12998 * linux-m68k-low.c (the_low_target): Adjust.
12999 * linux-mips-low.c (the_low_target): Adjust.
13000 * linux-ppc-low.c (the_low_target): Adjust.
13001 * linux-s390-low.c (the_low_target): Adjust.
13002 * linux-sh-low.c (the_low_target): Adjust.
13003 * linux-sparc-low.c (the_low_target): Adjust.
13004 * linux-tic6x-low.c (the_low_target): Adjust.
13005 * linux-x86-low.c (the_low_target): Adjust.
13006 * linux-xtensa-low.c (the_low_target): Adjust.
13007
13008 2012-03-26 Pedro Alves <palves@redhat.com>
13009
13010 * server.c (handle_qxfer_libraries): Don't bail early if
13011 the_target->qxfer_libraries_svr4 is not NULL.
13012
13013 2012-03-26 Pedro Alves <palves@redhat.com>
13014
13015 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
13016
13017 2012-03-23 Pedro Alves <palves@redhat.com>
13018
13019 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
13020 "library-list-svr4" element's start tag when the the DSO list is
13021 empty.
13022
13023 2012-03-23 Pedro Alves <palves@redhat.com>
13024
13025 * linux-low.c (read_one_ptr): Read the inferior's pointer through
13026 a variable whose type size is the same as the inferior's pointer
13027 size.
13028
13029 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
13030
13031 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
13032 struct siginfo.
13033 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
13034 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
13035 * linux-low.h: Include <signal.h>.
13036 (struct siginfo): Remove forward declaration.
13037 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
13038 struct siginfo.
13039
13040 2012-03-21 Mike Frysinger <vapier@gentoo.org>
13041
13042 * .gitignore: Ignore more files.
13043
13044 2012-03-19 Pedro Alves <palves@redhat.com>
13045 Jan Kratochvil <jan.kratochvil@redhat.com>
13046
13047 * server.c (cont_thread, general_thread): Add describing comments.
13048 (start_inferior): Clear `cont_thread'.
13049 (handle_v_cont): Don't set `cont_thread' if resuming all threads
13050 of a process.
13051
13052 2012-03-15 Yao Qi <yao@codesourcery.com>
13053
13054 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
13055 handling to ...
13056 (cmd_qtdp): ... here.
13057
13058 2012-03-15 Yao Qi <yao@codesourcery.com>
13059
13060 * tracepoint.c (struct tracepoint_action_ops): New.
13061 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
13062 (m_tracepoint_action_download): New.
13063 (r_tracepoint_action_download): New.
13064 (x_tracepoint_action_download): New.
13065 (l_tracepoint_action_download): New.
13066 (add_tracepoint_action): Install `action->ops' according type.
13067 (download_tracepoint_1): Move code `download' function pointer
13068 of various tracepoint_action_ops.
13069
13070 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
13071
13072 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
13073 linux_ptrace_attach_warnings.
13074
13075 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
13076
13077 * Makefile.in (linux-ptrace.o): New.
13078 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
13079 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
13080 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
13081 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
13082 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
13083 of these targets.
13084 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
13085
13086 2012-03-08 Yao Qi <yao@codesourcery.com>
13087 Pedro Alves <palves@redhat.com>
13088
13089 Fix PR server/13392.
13090 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
13091 offset of JMP insn.
13092 * tracepoint.c (remove_tracepoint): New.
13093 (cmd_qtdp): Call remove_tracepoint when failed to install.
13094
13095 2012-03-07 Pedro Alves <palves@redhat.com>
13096
13097 * linux-low.c (get_detach_signal): New.
13098 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
13099 Pass on pending signals to PTRACE_DETACH. Check the result of the
13100 ptrace call.
13101 * server.c (program_signals, program_signals_p): New.
13102 (handle_general_set): Handle QProgramSignals.
13103 * server.h (program_signals, program_signals_p): Declare.
13104
13105 2012-03-05 Pedro Alves <palves@redhat.com>
13106 Jan Kratochvil <jan.kratochvil@redhat.com>
13107
13108 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
13109 New comment why.
13110
13111 2012-03-03 Yao Qi <yao@codesourcery.com>
13112
13113 * tracepoint.c (tracepoint_look_up_symbols): Update call to
13114 agent_look_up_symbols.
13115
13116 2012-03-03 Yao Qi <yao@codesourcery.com>
13117
13118 * Makefile.in (linux-low.o): Keep dependence on agent.h.
13119 (linux-x86-low.o): Likewise.
13120 * server.h: Remove in_process_agent_loaded.
13121 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
13122 common/agent.c.
13123 Update callers.
13124
13125 2012-03-03 Yao Qi <yao@codesourcery.com>
13126
13127 * tracepoint.c (gdb_agent_capability): New global.
13128 (in_process_agent_loaded_ust): Renamed to
13129 `in_process_agent_supports_ust'.
13130 Update callers.
13131 (in_process_agent_supports_ust): Call agent_capability_check.
13132 (clear_installed_tracepoints): Assert that agent supports
13133 agent.
13134
13135 2012-03-03 Yao Qi <yao@codesourcery.com>
13136
13137 * linux-low.c (linux_supports_agent): New.
13138 (linux_target_ops): Initialize field `supports_agent' with
13139 linux_supports_agent.
13140 * target.h (struct target_ops) <supports_agent>: New.
13141 (target_supports_agent): New macro.
13142 * server.c (handle_general_set): Handle packet 'QAgent'.
13143 (handle_query): Send `QAgent+'.
13144 * Makefile.in (server.o): Depends on agent.h.
13145
13146 2012-03-03 Yao Qi <yao@codesourcery.com>
13147
13148 * Makefile.in (OBS): Add agent.o.
13149 Add new rule for agent.o.
13150 Track dependence of tracepoint.c on agent.h.
13151 * tracepoint.c (run_inferior_command_1):
13152 (run_inferior_command): Call agent_run_command.
13153 (gdb_ust_connect_sync_socket): Deleted. Move it to
13154 common/agent.c.
13155 (resume_thread, stop_thread): Likewise.
13156 (gdb_ust_socket_init): Renamed to ...
13157 (gdb_agent_socket_init): ... New.
13158 (gdb_ust_thread): Renamed to ...
13159 (gdb_agent_helper_thread): ... New.
13160 (gdb_ust_init): Move some code to ...
13161 (gdb_agent_init): ... here. New.
13162 [HAVE_UST]: Call gdb_ust_init.
13163 (initialize_tracepoint_ftlib): Call gdb_agent_init.
13164 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
13165 * config.in, configure: Regenerated.
13166
13167 2012-03-02 Pedro Alves <palves@redhat.com>
13168
13169 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
13170 * linux-low.c (struct simple_pid_list): New.
13171 (stopped_pids): New a struct simple_pid_list pointer.
13172 (add_to_pid_list, pull_pid_from_list): New.
13173 (handle_extended_wait): Don't assume the first signal new children
13174 report is SIGSTOP. Adjust call to pull_pid_from_list.
13175 (linux_wait_for_lwp): Adjust.
13176
13177 2012-03-02 Yao Qi <yao@codesourcery.com>
13178
13179 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
13180 debug log.
13181
13182 2012-03-02 Yao Qi <yao@codesourcery.com>
13183
13184 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
13185 `stop_pc' and `tpoint'. Update caller.
13186
13187 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
13188
13189 * linux-low.h (linux_target_ops): Add regset_bitmap member.
13190 * linux-low.c (use_linux_regsets): New macro.
13191 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
13192 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
13193 (linux_register_in_regsets): New function.
13194 (usr_fetch_inferior_registers): Skip registers covered by
13195 regsets.
13196 (usr_store_inferior_registers): Likewise.
13197 (usr_fetch_inferior_registers): New macro.
13198 (usr_store_inferior_registers): Likewise.
13199 (linux_fetch_registers): Handle mixed regset/non-regset targets.
13200 (linux_store_registers): Likewise.
13201 * linux-mips-low.c (init_registers_mips_dsp_linux): New
13202 prototype.
13203 (init_registers_mips64_dsp_linux): Likewise.
13204 (init_registers_mips_linux): New macro.
13205 (init_registers_mips_dsp_linux): Likewise.
13206 (mips_dsp_num_regs): Likewise.
13207 (DSP_BASE, DSP_CONTROL): New fallback macros.
13208 (mips_base_regs): New macro.
13209 (mips_regmap): Use it. Fix the size.
13210 (mips_dsp_regmap): New variable.
13211 (mips_dsp_regset_bitmap): Likewise.
13212 (mips_arch_setup): New function.
13213 (mips_cannot_fetch_register): Use the_low_target.regmap rather
13214 than mips_regmap.
13215 (mips_cannot_store_register): Likewise.
13216 (the_low_target): Update .arch_setup, .num_regs and .regmap
13217 initializers. Add .regset_bitmap initializer.
13218 * linux-arm-low.c (the_low_target): Add .regset_bitmap
13219 initializer.
13220 * linux-bfin-low.c (the_low_target): Likewise.
13221 * linux-cris-low.c (the_low_target): Likewise.
13222 * linux-crisv32-low.c (the_low_target): Likewise.
13223 * linux-ia64-low.c (the_low_target): Likewise.
13224 * linux-m32r-low.c (the_low_target): Likewise.
13225 * linux-m68k-low.c (the_low_target): Likewise.
13226 * linux-ppc-low.c (the_low_target): Likewise.
13227 * linux-s390-low.c (the_low_target): Likewise.
13228 * linux-sh-low.c (the_low_target): Likewise.
13229 * linux-sparc-low.c (the_low_target): Likewise.
13230 * linux-tic6x-low.c (the_low_target): Likewise.
13231 * linux-x86-low.c (the_low_target): Likewise.
13232 * linux-xtensa-low.c (the_low_target): Likewise.
13233 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
13234 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
13235 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
13236 srv_xmlfiles.
13237 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
13238 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
13239
13240 2012-02-29 Yao Qi <yao@codesourcery.com>
13241 Pedro Alves <palves@redhat.com>
13242
13243 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
13244 `step_over_finished' is true.
13245
13246 2012-02-27 Pedro Alves <palves@redhat.com>
13247
13248 * linux-low.c (pid_is_stopped): Delete, moved to common/.
13249 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
13250
13251 2012-02-27 Pedro Alves <palves@redhat.com>
13252
13253 PR server/9684
13254 * linux-low.c (pid_is_stopped): New.
13255 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
13256
13257 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
13258
13259 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
13260 of conditions.
13261
13262 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
13263
13264 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
13265
13266 2012-02-24 Luis Machado <lgustavo@codesourcery>
13267
13268 * server.c (handle_query): Advertise support for target-side
13269 breakpoint condition evaluation.
13270 (process_point_options): New function.
13271 (process_serial_event): When inserting a breakpoint, check for
13272 a target-side condition that should be evaluated.
13273
13274 * mem-break.c: Include regcache.h and ax.h.
13275 (point_cond_list_t): New data structure.
13276 (breakpoint) <cond_list>: New field.
13277 (find_gdb_breakpoint_at): Make non-static.
13278 (delete_gdb_breakpoint_at): Clear any target-side
13279 conditions.
13280 (clear_gdb_breakpoint_conditions): New function.
13281 (add_condition_to_breakpoint): Likewise.
13282 (add_breakpoint_condition): Likewise.
13283 (gdb_condition_true_at_breakpoint): Likewise.
13284 (gdb_breakpoint_here): Return result directly instead
13285 of going through a local variable.
13286
13287 * mem-break.h (find_gdb_breakpoint_at): New prototype.
13288 (clear_gdb_breakpoint_conditions): Likewise.
13289 (add_breakpoint_condition): Likewise.
13290 (gdb_condition_true_at_breakpoint): Likewise.
13291
13292 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
13293 (need_step_over_p): Take target-side breakpoint condition into
13294 consideration.
13295
13296 2012-02-24 Luis Machado <lgustavo@codesourcery>
13297
13298 * server.h: Include tracepoint.h.
13299 (agent_mem_read, agent_get_trace_state_variable_value,
13300 agent_set_trace_state_variable_value,
13301 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
13302 get_set_tsv_func_addr): New prototypes.
13303
13304 * ax.h: New include file.
13305 * ax.c: New source file.
13306
13307 * tracepoint.c: Include ax.h.
13308 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
13309 agent_expr, eval_result_type): Move to ax.h.
13310 (parse_agent_expr): Rename to ...
13311 (gdb_parse_agent_expr): ... this, make it non-static and move
13312 to ax.h.
13313 (unparse_agent_expr) Rename to ...
13314 (gdb_unparse_agent_expr): ... this, make it non-static and move
13315 to ax.h.
13316 (eval_agent_expr): Rename to ...
13317 (eval_tracepoint_agent_expr): ... this.
13318 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
13319 forward declarations.
13320 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
13321 (agent_get_trace_state_variable_value): New function.
13322 (agent_set_trace_state_variable_value): New function.
13323 (cmd_qtdp): Call gdb_parse_agent_expr (...).
13324 (response_tracepoint): Call gdb_unparse_agent_expr (...).
13325 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
13326 (condition_true_at_tracepoint): Likewise.
13327 (parse_agent_expr): Rename to ...
13328 (gdb_parse_agent_expr): ... this and move to ax.c.
13329 (unparse_agent_expr): Rename to ...
13330 (gdb_unparse_agent_expr): ... this and move to ax.c.
13331 (gdb_agent_op_name): Move to ax.c.
13332 (eval_agent_expr): Rename to ...
13333 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
13334 and move to ax.c.
13335 (eval_tracepoint_agent_expr): New function.
13336 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
13337 non-static.
13338 (current_insn_ptr, emit_error, struct bytecode_address): Move to
13339 ax.c.
13340 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
13341 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
13342 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
13343 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
13344 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
13345 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
13346 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
13347 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
13348 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
13349 (compile_bytecodes): Remove forward declaration.
13350 (is_goto_target): Move to ax.c.
13351 (compile_bytecodes): Move to ax.c and call
13352 agent_get_trace_state_variable_value (...) and
13353 agent_set_trace_state_variable_value (...).
13354
13355 * Makefile.in: Update ax.c and IPA dependencies.
13356
13357 2012-02-24 Pedro Alves <palves@redhat.com>
13358
13359 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
13360 (cmd_bigqtbuffer_circular): ... this. Only handle
13361 'QTBuffer:circular:'.
13362 (handle_tracepoint_general_set): Adjust.
13363
13364 2012-02-16 Yao Qi <yao@codesourcery.com>
13365
13366 * inferiors.c: Move code to ...
13367 * dll.c: .... here. New.
13368 * server.h: Declare clear_dlls.
13369 * Makefile.in (SFILES): Add dll.c.
13370 (OBS): Add dll.o
13371 (dll.o): New rule.
13372
13373 2012-02-11 Yao Qi <yao@codesourcery.com>
13374
13375 * server.c: (handle_monitor_command): Add a new parameter
13376 `own_buf'.
13377 (handle_query): Update caller.
13378
13379 2012-02-09 Joel Brobecker <brobecker@adacore.com>
13380
13381 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
13382 * configure, config.in: Regenerate.
13383 * hostio.c: Provide an alternate implementation if HAVE_READLINK
13384 is not defined.
13385
13386 2012-02-02 Pedro Alves <palves@redhat.com>
13387
13388 Try SIGKILL first, then PTRACE_KILL.
13389 * linux-low.c (linux_kill_one_lwp): New.
13390 (linux_kill_one_lwp): Rename to ...
13391 (kill_one_lwp_callback): ... this. Use the new
13392 linux_kill_one_lwp.
13393
13394 2012-02-02 Pedro Alves <palves@redhat.com>
13395
13396 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
13397 inferior.
13398
13399 2012-01-27 Pedro Alves <palves@redhat.com>
13400
13401 * linux-low.c (linux_child_pid_to_exec_file): Delete.
13402 (elf_64_file_p): Make static.
13403 (linux_pid_exe_is_elf_64_file): New.
13404 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
13405 Delete declarations.
13406 (linux_pid_exe_is_elf_64_file): Declare.
13407 * linux-x86-low.c (x86_arch_setup): Use
13408 linux_pid_exe_is_elf_64_file.
13409
13410 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13411
13412 * linux-low.c (linux_wait_for_event_1): Rename to ...
13413 (linux_wait_for_event): ... here and merge it with former
13414 linux_wait_for_event - new variable wait_ptid, use it.
13415 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
13416
13417 2012-01-23 Pedro Alves <palves@redhat.com>
13418
13419 * server.c (main): Avoid yet another case of infinite loop while
13420 detaching/killing after a longjmp.
13421
13422 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13423
13424 Code cleanup.
13425 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
13426
13427 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
13428
13429 * hostio.c (handle_readlink): New function.
13430 (handle_vFile): Call it to handle "vFile:readlink" packets.
13431
13432 2012-01-20 Pedro Alves <palves@redhat.com>
13433 Ulrich Weigand <ulrich.weigand@linaro.org>
13434
13435 * server.c (handle_v_requests): Only support vAttach and vRun to
13436 start multiple processes when in extended protocol mode.
13437
13438 2012-01-17 Pedro Alves <palves@redhat.com>
13439
13440 * tracepoint.c (initialize_tracepoint): Use mmap instead of
13441 memalign plus mprotect to allocate the scratch buffer.
13442
13443 2012-01-13 Pedro Alves <palves@redhat.com>
13444
13445 * server.c (attach_inferior): Clear `cont_thread'.
13446
13447 2012-01-13 Pedro Alves <palves@redhat.com>
13448
13449 * server.c (main): Avoid infinite loop while detaching/killing
13450 after a longjmp.
13451
13452 2012-01-09 Doug Evans <dje@google.com>
13453
13454 * server.c (start_inferior): Set last_ptid in --wrapper case.
13455
13456 2012-01-06 Yao Qi <yao@codesourcery.com>
13457
13458 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
13459 defined.
13460 [IN_PROCESS_AGENT] (debug_agent): New global variable.
13461
13462 2012-01-04 Yao Qi <yao@codesourcery.com>
13463
13464 * tracepoint.c (cmd_qtdp): Print debug message
13465 for static tracepoint.
13466
13467 2012-01-04 Yao Qi <yao@codesourcery.com>
13468
13469 * tracepoint.c (trace_vdebug): Differentiate debug message
13470 between gdbserver and IPA.
13471
13472 2012-01-03 Yao Qi <yao@codesourcery.com>
13473
13474 * tracepoint.c (tracepoint_was_hit): Don't collect for
13475 static tracepoint.
13476
13477 2012-01-02 Joel Brobecker <brobecker@adacore.com>
13478
13479 * terminal.h: Reformat copyright header.
13480
13481 2012-01-02 Joel Brobecker <brobecker@adacore.com>
13482
13483 * server.c (gdbserver_version): Update copyright year.
13484 * gdbreplay.c (gdbreplay_version): Likewise.
13485
13486 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
13487
13488 * linux-low.c (linux_create_inferior): Put empty if clause for write.
13489
13490 Revert:
13491 2011-12-18 Hui Zhu <teawater@gmail.com>
13492 * linux-low.c (linux_create_inferior): Save return value to ret.
13493
13494 2011-12-18 Hui Zhu <teawater@gmail.com>
13495
13496 * linux-low.c (linux_create_inferior): Save return value to ret.
13497
13498 2011-12-16 Doug Evans <dje@google.com>
13499
13500 * linux-low.c (linux_create_inferior): If stdio connection,
13501 redirect stdin from /dev/null, stdout to stderr.
13502 * remote-utils.c (remote_is_stdio): New static global.
13503 (remote_connection_is_stdio): New function.
13504 (remote_prepare): Handle stdio connection.
13505 (remote_open): Ditto.
13506 (remote_close): Don't close stdin for stdio connections.
13507 (read_prim,write_prim): New functions. Replace all calls to
13508 read/write to these.
13509 * server.c (main): Watch for "-" argument. Move call to
13510 remote_prepare before start_inferior.
13511 * server.h (STDIO_CONNECTION_NAME): New macro.
13512 (remote_connection_is_stdio): Declare.
13513
13514 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
13515 in debugging output.
13516
13517 2011-12-15 Yao Qi <yao@codesourcery.com>
13518
13519 * tracepoint.c: Include sys/syscall.h.
13520 (gdb_ust_thread): Remove preprocessor conditional.
13521
13522 2011-12-14 Pedro Alves <pedro@codesourcery.com>
13523
13524 * linux-low.c (linux_detach_one_lwp): Call
13525 the_low_target.prepare_to_resume before detaching.
13526
13527 2011-12-14 Yao Qi <yao@codesourcery.com>
13528
13529 * tracepoint.c (gdb_ust_thread): Don't ignore return value
13530 of write.
13531
13532 2011-12-14 Yao Qi <yao@codesourcery.com>
13533
13534 * i386-low.c (i386_low_stopped_data_address): Initialize local
13535 variable `control'.
13536
13537 2011-12-13 Pedro Alves <pedro@codesourcery.com>
13538
13539 PR remote/13492
13540
13541 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
13542 DR_CONTROL unless necessary. Extend comments.
13543 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
13544 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
13545
13546 2011-12-13 Yao Qi <yao@codesourcery.com>
13547
13548 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
13549 macros.
13550 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
13551
13552 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
13553
13554 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
13555 Print new debug message for such case.
13556
13557 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13558
13559 Fix overlapping memcpy.
13560 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
13561 the read_inferior_memory transfer.
13562 (delete_fast_tracepoint_jump): New variable buf. Use it for the
13563 write_inferior_memory transfer.
13564 (set_fast_tracepoint_jump): New variable buf. Use it for the
13565 read_inferior_memory and write_inferior_memory transfers.
13566 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
13567 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
13568 Use it for the write_inferior_memory transfer.
13569 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
13570 buffers.
13571
13572 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
13573
13574 * linux-low.c (fetch_register, store_register): Make code
13575 consistent, fix formatting.
13576
13577 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
13578
13579 * linux-low.c (usr_store_inferior_registers): Factor out code
13580 to handle individual registers into...
13581 (store_register): ... this new function.
13582
13583 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
13584
13585 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
13586 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
13587 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
13588 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
13589 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
13590 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
13591 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
13592 (srv_xmlfiles): Add new XML files.
13593
13594 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
13595 and <sys/uio.h>.
13596 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
13597 (init_registers_s390_linux32v1): Add prototype.
13598 (init_registers_s390_linux32v2): Likewise.
13599 (init_registers_s390_linux64v1): Likewise.
13600 (init_registers_s390_linux64v2): Likewise.
13601 (init_registers_s390x_linux64v1): Likewise.
13602 (init_registers_s390x_linux64v2): Likewise.
13603 (s390_num_regs): Increment to 52.
13604 (s390_regmap): Add orig_r2 register.
13605 (s390_num_regs_3264): Increment to 68.
13606 (s390_regmap_3264): Add orig_r2 register.
13607 (s390_collect_ptrace_register): Handle orig_r2 register.
13608 (s390_supply_ptrace_register): Likewise.
13609 (s390_fill_last_break): New function.
13610 (s390_store_last_break): Likewise.
13611 (s390_fill_system_call): New function.
13612 (s390_store_system_call): Likewise.
13613 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
13614 register sets.
13615 (s390_check_regset): New function.
13616 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
13617 NT_S390_SYSTEM_CALL regsets and use appropriate description.
13618 Update target_regsets for available register sets.
13619
13620 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
13621 Jan Kratochvil <jan.kratochvil@redhat.com>
13622
13623 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
13624 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
13625 New.
13626 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
13627 * linux-low.h (struct process_info_private): New member r_debug.
13628 * server.c (handle_qxfer_libraries): Call
13629 the_target->qxfer_libraries_svr4.
13630 (handle_qxfer_libraries_svr4): New function.
13631 (qxfer_packets): New entry "libraries-svr4".
13632 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
13633 * target.h (struct target_ops): New member qxfer_libraries_svr4.
13634 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
13635 PACKET_qXfer_libraries_svr4.
13636
13637 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
13638
13639 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
13640 PSW address/mask between 8-byte and 16-byte formats.
13641 (s390_supply_ptrace_register): Likewise.
13642 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
13643 basic addressing mode bit.
13644
13645 2011-11-24 Stan Shebs <stan@codesourcery.com>
13646
13647 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
13648
13649 2011-11-17 Stan Shebs <stan@codesourcery.com>
13650
13651 * tracepoint.c (struct tracepoint): New field traceframe_usage.
13652 (tracing_start_time): New global.
13653 (tracing_stop_time): New global.
13654 (tracing_user_name): New global.
13655 (tracing_notes): New global.
13656 (tracing_stop_note): New global.
13657 (cmd_qtstart): Set traceframe_usage, start_time.
13658 (stop_tracing): Set stop_time.
13659 (cmd_qtstatus): Report additional status.
13660 (cmd_qtp): New function.
13661 (handle_tracepoint_query): Call it.
13662 (cmd_qtnotes): New function.
13663 (handle_tracepoint_general_set): Call it.
13664 (get_timestamp): Rename from tsv_get_timestamp.
13665
13666 2011-11-14 Stan Shebs <stan@codesourcery.com>
13667 Kwok Cheung Yeung <kcy@codesourcery.com>
13668
13669 * linux-x86-low.c (small_jump_insn): New.
13670 (i386_install_fast_tracepoint_jump_pad): Add arguments for
13671 trampoline and error message, build a trampoline and issue a small
13672 jump instruction to it.
13673 (x86_install_fast_tracepoint_jump_pad): Add arguments for
13674 trampoline and error message.
13675 (x86_get_min_fast_tracepoint_insn_len): New.
13676 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
13677 * linux-low.h (struct linux_target_ops): Add arguments to
13678 install_fast_tracepoint_jump_pad operation, add new operation.
13679 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
13680 arguments.
13681 (linux_get_min_fast_tracepoint_insn_len): New function.
13682 (linux_target_op): Add new operation.
13683 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
13684 (gdb_trampoline_buffer_end): Ditto.
13685 (gdb_trampoline_buffer_error): Ditto.
13686 (struct ipa_sym_addresses): Add fields for new IPA variables.
13687 (symbol_list): Add entries for new IPA variables.
13688 (struct tracepoint): Add fields to hold the address range of the
13689 trampoline used by the tracepoint.
13690 (trampoline_buffer_head): New static variable.
13691 (trampoline_buffer_tail): Ditto.
13692 (claim_trampoline_space): New function.
13693 (have_fast_tracepoint_trampoline_buffer): New function.
13694 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
13695 structure.
13696 (install_fast_tracepoint): Ditto, also add error buffer argument.
13697 (cmd_qtminftpilen): New function.
13698 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
13699 (fast_tracepoint_from_trampoline_address): New function.
13700 (fast_tracepoint_collecting): Handle trampoline as part of jump
13701 pad space.
13702 (set_trampoline_buffer_space): New function.
13703 (initialize_tracepoint): Initialize new IPA variables.
13704 * target.h (struct target_ops): Add arguments to
13705 install_fast_tracepoint_jump_pad operation, add new
13706 get_min_fast_tracepoint_insn_len operation.
13707 (target_get_min_fast_tracepoint_insn_len): New.
13708 (install_fast_tracepoint_jump_pad): Add arguments.
13709 * server.h (IPA_BUFSIZ): Define.
13710 * linux-i386-ipa.c: Include extra header files.
13711 (initialize_fast_tracepoint_trampoline_buffer): New function.
13712 (initialize_low_tracepoint): Call it.
13713 * server.h (set_trampoline_buffer_space): Declare.
13714 (claim_trampoline_space): Ditto.
13715 (have_fast_tracepoint_trampoline_buffer): Ditto.
13716
13717 2011-11-14 Yao Qi <yao@codesourcery.com>
13718
13719 * server.c (handle_query): Handle InstallInTrace for qSupported.
13720 * tracepoint.c (add_tracepoint): Sort list.
13721 (install_tracepoint, download_tracepoint): New.
13722 (cmd_qtdp): Call them to install and download tracepoints.
13723 (sort_tracepoints): Removed.
13724 (cmd_qtstart): Update.
13725
13726 2011-11-14 Yao Qi <yao@codesourcery.com>
13727
13728 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
13729 * mem-break.h: Declare.
13730 * tracepoint.c (cmd_qtstart): Move some code to ...
13731 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
13732 New.
13733 (download_tracepoints): Move some code to ...
13734 (download_tracepoint_1): ... here. New.
13735
13736 2011-11-08 Yao Qi <yao@codesourcery.com>
13737
13738 * remote-utils.c (relocate_instruction): A comment fix.
13739
13740 2011-11-07 Joel Brobecker <brobecker@adacore.com>
13741
13742 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
13743 (i386_dr_low_get_control, i386_dr_low_get_status): Use
13744 dr_status_mirror and dr_control_mirror from debug_reg_state.
13745 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
13746 (i386_initial_stuff): Remove use of deleted globals.
13747 (i386_get_thread_context, i386_set_thread_context,
13748 i386_thread_added): Use dr_status_mirror and dr_control_mirror
13749 from debug_reg_state.
13750
13751 2011-11-05 Yao Qi <yao@codesourcery.com>
13752
13753 * tracepoint.c (gdb_collect): Loop over tracepoints of same
13754 address as TPOINT's.
13755
13756 2011-11-02 Stan Shebs <stan@codesourcery.com>
13757
13758 * tracepoint.c (agent_mem_read_string): New function.
13759 (eval_agent_expr): Call it for tracenz.
13760 * server.c (handle_query): Report support for tracenz.
13761
13762 2011-11-02 Yao Qi <yao@codesourcery.com>
13763
13764 * tracepoint.c (cmd_qtstart): Remove unused local variables.
13765
13766 2011-11-02 Yao Qi <yao@codesourcery.com>
13767
13768 * target.h: Fix a typo in comment.
13769
13770 2011-10-31 Pedro Alves <pedro@codesourcery.com>
13771
13772 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
13773 clobber the breakpoints' shadows with fast tracepoint jumps.
13774 * mem-break.h (check_mem_write): Add `myaddr' parameter.
13775 * target.c (write_inferior_memory): Also pass MYADDR down to
13776 check_mem_write.
13777
13778 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
13779
13780 * configure.ac: Check support for personality routine.
13781 * configure: Regenerate.
13782 * config.in: Likewise.
13783 * linux-low.c: Include <sys/personality.h>.
13784 Define ADDR_NO_RANDOMIZE if necessary.
13785 (linux_create_inferior): Disable address space randomization when
13786 forking inferior, if requested.
13787 (linux_supports_disable_randomization): New function.
13788 (linux_target_ops): Install it.
13789 * server.h (disable_randomization): Declare.
13790 * server.c (disable_randomization): New global variable.
13791 (handle_general_set): Handle QDisableRandomization.
13792 (handle_query): Likewise for qSupported.
13793 (main): Support --disable-randomization and --no-disable-randomization
13794 command line arguments.
13795 * target.h (struct target_ops): Add supports_disable_randomization.
13796 (target_supports_disable_randomization): New macro.
13797
13798 2011-09-29 Mike Frysinger <vapier@gentoo.org>
13799
13800 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
13801 ifdef check.
13802 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
13803 [!PT_GETDSBT] (target_loadmap): New definition.
13804 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
13805 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
13806 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
13807 and PT_GETDSBT to LINUX_LOADMAP.
13808 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
13809 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
13810
13811 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13812
13813 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
13814 (arm_linux_hwbp_cap): New static variable.
13815 (arm_linux_get_hwbp_cap): Replace by ...
13816 (arm_linux_init_hwbp_cap): ... this new function.
13817 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
13818 (arm_linux_get_hw_watchpoint_count): Likewise.
13819 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13820 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
13821 (arm_prepare_to_resume): Use perror_with_name instead of error.
13822
13823 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13824
13825 * linux-arm-low.c: Include <signal.h>.
13826 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
13827 (struct arm_linux_hwbp_cap): New data type.
13828 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
13829 (struct arm_linux_hw_breakpoint): New data type.
13830 (MAX_BPTS, MAX_WPTS): Define.
13831 (struct arch_process_info, struct arch_lwp_info): New data types.
13832 (arm_linux_get_hwbp_cap): New function.
13833 (arm_linux_get_hw_breakpoint_count): Likewise.
13834 (arm_linux_get_hw_watchpoint_count): Likewise.
13835 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13836 (arm_hwbp_control_initialize): Likewise.
13837 (arm_hwbp_control_is_enabled): Likewise.
13838 (arm_hwbp_control_is_initialized): Likewise.
13839 (arm_hwbp_control_disable): Likewise.
13840 (arm_linux_hw_breakpoint_equal): Likewise.
13841 (arm_linux_hw_point_initialize): Likewise.
13842 (struct update_registers_data): New data structure.
13843 (update_registers_callback: New function.
13844 (arm_insert_point): Likewise.
13845 (arm_remove_point): Likewise.
13846 (arm_stopped_by_watchpoint): Likewise.
13847 (arm_stopped_data_address): Likewise.
13848 (arm_new_process): Likewise.
13849 (arm_new_thread): Likewise.
13850 (arm_prepare_to_resume): Likewise.
13851 (the_low_target): Register arm_insert_point, arm_remove_point,
13852 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
13853 arm_new_thread, and arm_prepare_to_resume.
13854
13855 2011-09-15 Stan Shebs <stan@codesourcery.com>
13856
13857 * server.h (struct emit_ops): Add compare-goto fields.
13858 * tracepoint.c (gdb_agent_op_sizes): New table.
13859 (emit_eq_goto): New function.
13860 (emit_ne_goto): New function.
13861 (emit_lt_goto): New function.
13862 (emit_le_goto): New function.
13863 (emit_gt_goto): New function.
13864 (emit_ge_goto): New function.
13865 (is_goto_target): New function.
13866 (compile_bytecodes): Recognize special cases of compare-goto
13867 combinations and call specialized emitters for them.
13868 * linux-x86-low.c (amd64_emit_eq_goto): New function.
13869 (amd64_emit_ne_goto): New function.
13870 (amd64_emit_lt_goto): New function.
13871 (amd64_emit_le_goto): New function.
13872 (amd64_emit_gt_goto): New function.
13873 (amd64_emit_ge_goto): New function.
13874 (amd64_emit_ops): Add the new functions.
13875 (i386_emit_eq_goto): New function.
13876 (i386_emit_ne_goto): New function.
13877 (i386_emit_lt_goto): New function.
13878 (i386_emit_le_goto): New function.
13879 (i386_emit_gt_goto): New function.
13880 (i386_emit_ge_goto): New function.
13881 (i386_emit_ops): Add the new functions.
13882
13883 2011-09-08 Stan Shebs <stan@codesourcery.com>
13884
13885 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
13886 (i386_emit_epilogue): Restore %ebx.
13887
13888 2011-08-31 Jie Zhang <jzhang918@gmail.com>
13889
13890 * server.c (step_thread): Remove definition.
13891 (process_serial_event): Don't handle Hs.
13892 * server.h (step_thread): Remove declaration.
13893 * target.c (set_desired_inferior): Remove use of step_thread.
13894
13895 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13896
13897 * linux-low.c: Include linux-procfs.h.
13898 (linux_attach_lwp_1): Update comments.
13899 (linux_attach): Scan for existing threads when attaching to a
13900 process that is the tgid.
13901 * Makefile.in: Update dependencies.
13902
13903 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13904
13905 * configure.srv: Add linux-procfs.o dependencies.
13906
13907 2011-08-14 Yao Qi <yao@codesourcery.com>
13908
13909 * target.h (struct target_ops): Fix indent.
13910 * win32-low.c (win32_target_ops): Fix comment.
13911
13912 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
13913 Yao Qi <yao@codesourcery.com>
13914
13915 * Makefile.in (clean): Remove tic6x-*.c files.
13916 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
13917 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
13918 (tic6x-c64xp-linux.c): Likewise.
13919 * configure.srv: Add support for tic6x-*-uclinux.
13920 * linux-tic6x-low.c: New.
13921 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
13922
13923 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
13924 Yao Qi <yao@codesourcery.com>
13925
13926 * target.h (struct target_ops): Add read_loadmap.
13927 * linux-low.c (struct target_loadseg): New type.
13928 (struct target_loadmap): New type.
13929 (linux_read_loadmap): New function.
13930 (linux_target_ops): Add linux_read_loadmap.
13931 * server.c (handle_query): Support qXfer:fdpic:read packet.
13932 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
13933 to NULL.
13934
13935 2011-08-05 Eli Zaretskii <eliz@gnu.org>
13936
13937 * win32-low.c: Include <stdint.h>.
13938
13939 2011-07-22 Pedro Alves <pedro@codesourcery.com>
13940
13941 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
13942 to the inferior here.
13943 (i386_remove_aligned_watchpoint): Ditto.
13944 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
13945 fit part of the watchpoint in the debug registers.
13946 (i386_update_inferior_debug_regs): New.
13947 (i386_low_insert_watchpoint): Work on a local mirror of the debug
13948 registers, and only update the inferior on success.
13949 (i386_low_remove_watchpoint): Ditto.
13950
13951 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
13952
13953 * linux-low.c (compare_ints, unique, list_threads, show_process,
13954 linux_core_of_thread): Delete.
13955 (linux_target_ops): Change linux_core_of_thread to
13956 linux_common_core_of_thread.
13957 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
13958 * utils.c (malloc_failure): Change type of argument.
13959 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
13960 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
13961 common/linux-osdata.c, common/ptid.c and common/buffer.c.
13962 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
13963 (IPA_OBJS): Add common-utils-ipa.o.
13964 (ptid_h, linux_osdata_h): New macros.
13965 (server_h): Add common/common-utils.h, common/xml-utils.h,
13966 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
13967 common/ptid.h.
13968 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
13969 ptid.o, buffer.o): New rules.
13970 (linux-low.o): Add common/linux-osdata.h as a dependency.
13971 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
13972 * configure.ac: Add AC_HEADER_DIRENT check.
13973 * config.in: Regenerate.
13974 * configure: Regenerate.
13975 * remote-utils.c (xml_escape_text): Delete.
13976 (buffer_grow, buffer_free, buffer_init, buffer_finish,
13977 buffer_xml_printf): Move to common/buffer.c.
13978 * server.c (main): Remove call to initialize_inferiors.
13979 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
13980 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
13981 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
13982 internal_error, gdb_assert, gdb_assert_fail): Delete.
13983 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
13984 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
13985 common/buffer.h.
13986 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
13987 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
13988 initialize_inferiors): Delete.
13989
13990 2011-07-20 Pedro Alves <pedro@codesourcery.com>
13991
13992 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
13993 symbol error.
13994
13995 2011-05-31 Pedro Alves <pedro@codesourcery.com>
13996
13997 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
13998 assertion.
13999 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
14000
14001 2011-05-26 Yao Qi <yao@codesourcery.com>
14002
14003 * Makefile.in (thread-db.o): Track dependence to
14004 common/gdb_thread_db.h.
14005 * thread-db.c: include gdb_thread_db.h from right place.
14006
14007 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
14008
14009 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
14010 __FILE__ and __LINE__ to internal_error.
14011
14012 2011-05-13 Doug Evans <dje@google.com>
14013
14014 * thread-db.c (try_thread_db_load_from_sdir): New function.
14015 (try_thread_db_load_from_dir): New function.
14016 (thread_db_load_search): Handle $sdir, ignore $pdir.
14017 Remove trying of system directories if search of
14018 libthread-db-search-path fails, that is now done via $sdir.
14019
14020 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
14021
14022 * server.c (handle_query): Add EnableDisableTracepoints to the list
14023 of supported features.
14024 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
14025 tracepoints.
14026 (cmd_qtenable_disable): New.
14027 (cmd_qtstart): Install tracepoints even if disabled.
14028 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
14029 receiving a QTEnable or QTDisable packet.
14030 (gdb_collect): Skip data collection if fast tracepoint is disabled.
14031 (ust_marker_to_static_tracepoint): Do not ignore disabled static
14032 tracepoints.
14033 (gdb_probe): Skip data collection if static tracepoint is disabled.
14034
14035 2011-05-10 Doug Evans <dje@google.com>
14036
14037 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
14038
14039 2011-05-04 Doug Evans <dje@google.com>
14040
14041 * linux-low.c (linux_join): Skip process lookup.
14042 * spu-low.c (spu_join): Ditto.
14043 * server.c (join_inferiors_callback): Delete.
14044 (process_serial_event): For 'D' packet (detach) call join_inferior
14045 directly.
14046
14047 2011-05-04 Joseph Myers <joseph@codesourcery.com>
14048
14049 * README: Don't mention xscale*-*-linux*.
14050 * configure.srv (xscale*-*-linux*): Don't handle target.
14051
14052 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
14053
14054 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
14055 casting pointers.
14056 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
14057 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
14058 (i386_emit_void_call_2): Likewise.
14059
14060 2011-04-26 Yao Qi <yao@codesourcery.com>
14061
14062 * linux-low.c: Move common macros to linux-ptrace.h.
14063 Include linux-ptrace.h.
14064 * Makefile.in (linux_ptrace_h): New.
14065 (linux-low.o): Depends on linux-ptrace.h.
14066
14067 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
14068
14069 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
14070 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
14071 (remote_prepare): New function with most of the TCP code from ...
14072 (remote_open): ... here. Detect PORT here unconditionally. Move also
14073 setting transport_is_reliable.
14074 * server.c (run_once): New variable.
14075 (gdbserver_usage): Document it.
14076 (main): Set run_once for `--once'. Call remote_prepare. Exit after
14077 the first run if RUN_ONCE.
14078 * server.h (run_once, remote_prepare): New declarations.
14079
14080 2011-04-19 Tom Tromey <tromey@redhat.com>
14081
14082 * win32-low.c (handle_load_dll): Remove duplicate "the".
14083
14084 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
14085
14086 Remove support for old Cygwin 1.5 versions.
14087 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
14088 function to avoid warning.
14089 (win32_add_one_solib): Use cygwin_conv_path function to avoid
14090 warning.
14091
14092 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
14093
14094 * gdbserver/server.h (Macro _): Define it if not available.
14095
14096 2011-03-14 Michael Snyder <msnyder@vmware.com>
14097
14098 * hostio.c (handle_close): Remove unnecessary null test.
14099
14100 2011-03-10 Joel Brobecker <brobecker@adacore.com>
14101
14102 * Makefile.in (maintainer-clean realclean distclean): Remove
14103 "make ... subdir_do" command.
14104
14105 2011-03-10 Michael Snyder <msnyder@vmware.com>
14106
14107 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
14108
14109 * server.c (handle_v_run): Free alloced buffer on early return.
14110
14111 2011-03-09 Yao Qi <yao@codesourcery.com>
14112
14113 Revert:
14114 2011-03-04 Yao Qi <yao@codesourcery.com>
14115
14116 * Makefile.in: Remove GNU make feature --directory.
14117
14118 2011-03-05 Yao Qi <yao@codesourcery.com>
14119
14120 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
14121 (subdir_do): New make target. Copied from gdb/Makefile.
14122 (maintainer-clean, realclean, distclean, clean): Call corresponding
14123 make targets in common/Makefile.
14124
14125 2011-02-11 Yao Qi <yao@codesourcery.com>
14126
14127 * configure.ac: Call AC_PROG_RANLIB.
14128 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
14129 * configure: Regenerate.
14130
14131 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14132
14133 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
14134
14135 2011-03-06 Yao Qi <yao@codesourcery.com>
14136
14137 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
14138
14139 2011-03-05 Yao Qi <yao@codesourcery.com>
14140
14141 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
14142 (subdir_do): New make target. Copied from gdb/Makefile.
14143 (maintainer-clean, realclean, distclean, clean): Call corresponding
14144 make targets in common/Makefile.
14145
14146 2011-03-04 Yao Qi <yao@codesourcery.com>
14147
14148 * Makefile.in: Remove GNU make feature --directory.
14149
14150 2011-03-04 Michael Snyder <msnyder@vmware.com>
14151
14152 * server.c (queue_stop_reply): Call xmalloc not malloc.
14153
14154 2011-03-02 Michael Snyder <msnyder@vmware.com>
14155
14156 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
14157
14158 2011-02-28 Michael Snyder <msnyder@vmware.com>
14159
14160 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
14161 (cmd_qtframe): Ditto.
14162 (cmd_qtbuffer): Ditto.
14163 (cmd_bigqtbuffer): Ditto.
14164
14165 * utils.c (decimal2str): Initialize 'width' to nine, then
14166 don't mess with it.
14167
14168 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14169
14170 * hostio.c (require_data): Free *data, not data.
14171
14172 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14173
14174 * hostio.c (require_data): Use free, not xfree.
14175
14176 2011-02-27 Michael Snyder <msnyder@vmware.com>
14177
14178 * server.c (handle_query): Discard unused value.
14179
14180 * hostio.c (require_data): Free malloc memory before returning
14181 error.
14182
14183 2011-02-26 Michael Snyder <msnyder@vmware.com>
14184
14185 * linux-low.c (list_threads): Call closedir for dirent.
14186
14187 2011-02-27 Michael Snyder <msnyder@vmware.com>
14188
14189 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
14190 a case statement falls through.
14191
14192 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
14193
14194 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
14195 in comparison.
14196
14197 2011-02-26 Michael Snyder <msnyder@vmware.com>
14198
14199 * utils.c (decimal2str): Eliminate dead code and dead param.
14200 (pulongest): Drop dead param from call to decimal2str.
14201 (plongest): Ditto.
14202
14203 2011-02-24 Joel Brobecker <brobecker@adacore.com>
14204
14205 Revert the following patch (not approved yet):
14206 2011-02-21 Hui Zhu <teawater@gmail.com>
14207 * tracepoint.c (tp_printf): New function.
14208 (eval_agent_expr): Handle gdb_agent_op_printf.
14209
14210 2011-02-21 Hui Zhu <teawater@gmail.com>
14211
14212 * tracepoint.c (tp_printf): New function.
14213 (eval_agent_expr): Handle gdb_agent_op_printf.
14214
14215 2011-02-18 Tom Tromey <tromey@redhat.com>
14216
14217 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
14218 (tracepoint.o): Likewise.
14219 * tracepoint.c (enum gdb_agent_op): Use ax.def.
14220 (gdb_agent_op_names): Likewise.
14221
14222 2011-02-18 Tom Tromey <tromey@redhat.com>
14223
14224 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
14225 gdb_agent_op_rot>: New constants.
14226 (gdb_agent_op_names): Add pick and roll.
14227 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
14228 cases.
14229
14230 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
14231
14232 * aclocal.m4: Regenerated with aclocal-1.11.1.
14233
14234 2011-02-14 Pedro Alves <pedro@codesourcery.com>
14235
14236 * server.c (handle_qxfer_traceframe_info): New.
14237 (qxfer_packets): Register "traceframe-info".
14238 (handle_query): Report support for qXfer:traceframe-info:read+.
14239 * tracepoint.c (match_blocktype): New.
14240 (traceframe_find_block_type): Rename to ...
14241 (traceframe_walk_blocks): ... this. Add callback filter argument,
14242 and use it.
14243 (traceframe_find_block_type): New, reimplemented on top of
14244 traceframe_walk_blocks.
14245 (build_traceframe_info_xml): New.
14246 (traceframe_read_info): New.
14247 * server.h (traceframe_read_info): Declare.
14248
14249 2011-02-11 Yao Qi <yao@codesourcery.com>
14250
14251 * configure.ac: Call AC_PROG_RANLIB.
14252 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
14253 * configure: Regenerate.
14254
14255 2011-02-07 Pedro Alves <pedro@codesourcery.com>
14256
14257 * server.c (gdb_read_memory): Change return semantics to allow
14258 partial transfers.
14259 (handle_search_memory_1): Adjust.
14260 (process_serial_event) <'m' packet>: Handle partial transfers.
14261 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
14262
14263 2011-01-28 Pedro Alves <pedro@codesourcery.com>
14264
14265 * regcache.c (init_register_cache): Initialize
14266 regcache->register_status.
14267 (free_register_cache): Release regcache->register_status.
14268 (regcache_cpy): Copy register_status.
14269 (registers_to_string): Print 'x's for unavailable registers.
14270 (supply_register): Mark the register's status valid or
14271 unavailable, depending on whether a buffer was passed in or not.
14272 (supply_register_zeroed): New.
14273 (supply_regblock): Mark the registers' status valid or
14274 unavailable, depending on whether a buffer was passed in or not.
14275 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
14276 (struct regcache): New `register_status' field.
14277 (supply_register_zeroed): Declare.
14278 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
14279 supply_register_zeroed, rather than passing a NULL buffer to
14280 supply_register.
14281 * tracepoint.c (fetch_traceframe_registers): Update comment.
14282
14283 2011-01-28 Pedro Alves <pedro@codesourcery.com>
14284
14285 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
14286 buffer explicit.
14287
14288 2011-01-25 Pedro Alves <pedro@codesourcery.com>
14289
14290 * server.h (decode_xfer_write): Change prototype.
14291 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
14292 and don't extract the annex here.
14293 * server.c (decode_xfer_read): Remove `annex' parameter,
14294 and don't extract the annex here.
14295 (decode_xfer): New.
14296 (struct qxfer): New.
14297 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
14298 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
14299 (handle_qxfer_statictrace): New functions, abstracted out from
14300 handle_query, and made to use the struct qxfer interface.
14301 (handle_threads_qxfer_proper): Rename to ...
14302 (handle_qxfer_threads_proper): ... this.
14303 (handle_threads_qxfer): Rename to ...
14304 (handle_qxfer_threads): ... this. Adjust.
14305 (qxfer_packets): New array.
14306 (handle_qxfer): New function.
14307 (handle_query): Use handle_qxfer.
14308
14309 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
14310
14311 * gdbreplay.c: Shorten lines of >= 80 columns.
14312 * linux-low.c: Ditto.
14313 * linux-ppc-low.c: Ditto.
14314 * linux-s390-low.c: Ditto.
14315 * linux-sparc-low.c: Ditto.
14316 * linux-x86-low.c: Ditto.
14317 * linux-xtensa-low.c: Ditto.
14318 * mem-break.c: Ditto.
14319 * nto-low.c: Ditto.
14320 * regcache.h: Ditto.
14321 * remote-utils.c: Ditto.
14322 * server.c: Ditto.
14323 * server.h: Ditto.
14324 * thread-db.c: Ditto.
14325 * tracepoint.c: Ditto.
14326 * utils.c: Ditto.
14327 * win32-low.h: Ditto.
14328
14329 2011-01-05 Joel Brobecker <brobecker@adacore.com>
14330
14331 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
14332 update.
14333
14334 2011-01-01 Joel Brobecker <brobecker@adacore.com>
14335
14336 * server.c (gdbserver_version): Update copyright year in version
14337 output.
14338 * gdbreplay.c (gdbreplay_version): Ditto.
14339
14340 2010-12-29 Jie Zhang <jie.zhang@analog.com>
14341
14342 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
14343 * linux-bfin-low.c: New file.
14344 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
14345 PT_DATA_ADDR for BFIN targets.
14346 * Makefile.in (SFILES): Add linux-bfin-low.c.
14347 (clean): Remove reg-bfin.c.
14348 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
14349 * README: Mention supported Blackfin targets.
14350
14351 2010-12-23 Mike Frysinger <vapier@gentoo.org>
14352
14353 * .gitignore: New file.
14354
14355 2010-11-16 Mike Frysinger <vapier@gentoo.org>
14356
14357 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
14358
14359 2010-10-22 Jie Zhang <jie@codesourcery.com>
14360
14361 * Makefile.in: Add FLAGS_TO_PASS variable.
14362 (install): Remove dependency of install-only and recursively
14363 invoke make for install-only.
14364
14365 2010-10-04 Doug Evans <dje@google.com>
14366
14367 * Makefile.in (uninstall): Use $(DESTDIR).
14368
14369 2010-09-24 Pedro Alves <pedro@codesourcery.com>
14370
14371 PR gdb/11842
14372
14373 * linux-x86-low.c (compat_siginfo_from_siginfo)
14374 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
14375 si_code is < 0. Check for si_code == SI_TIMER before checking for
14376 si_code < 0.
14377
14378 2010-09-13 Joel Brobecker <brobecker@adacore.com>
14379
14380 * lynx-i386-low.c: New file.
14381 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
14382
14383 2010-09-13 Joel Brobecker <brobecker@adacore.com>
14384
14385 * lynx-low.c (ptrace_request_to_str): Remove handling for
14386 request values that have been removed in LynxOS 5.x.
14387
14388 2010-09-13 Joel Brobecker <brobecker@adacore.com>
14389
14390 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
14391 <ptrace.h>
14392
14393 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
14394
14395 * configure.ac: Add --enable-inprocess-agent option.
14396 * configure: Rebuilt.
14397
14398 2010-09-06 Yao Qi <yao@codesourcery.com>
14399
14400 * linux-low.c (linux_kill): Remove unused variable.
14401 (linux_stabilize_threads): Likewise.
14402 * server.c (start_inferior): Likewise.
14403 (queue_stop_reply_callback): Likewise.
14404 * tracepoint.c (do_action_at_tracepoint): Likewise.
14405
14406 2010-09-06 Yao Qi <yao@codesourcery.com>
14407
14408 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
14409 on return.
14410
14411 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
14412
14413 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
14414
14415 2010-09-06 Pedro Alves <pedro@codesourcery.com>
14416
14417 * Makefile.in (install-only): Replace $IPA_DEPFILES with
14418 "$(IPA_DEPFILES)".
14419
14420 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14421
14422 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
14423 gdbserver/lynx-ppc-low.c: New files.
14424 * Makefile.in (lynx_low_h): New variable.
14425 (lynx-low.o, lynx-ppc-low.o): New rules.
14426 * configure.ac: On LynxOS, link with -lnetinet.
14427 * configure.srv: Add handling of powerpc-*-lynxos* targets.
14428 * configure: regenerate.
14429
14430 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14431
14432 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
14433 * configure.ac: Add check for vasprintf and vsnprintf.
14434 * configure, config.in: Regenerate.
14435 * server.h (vasprintf, vsnprintf): Add conditional declarations.
14436
14437 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14438
14439 * gdbreplay.c: Move include of alloca.h up, next to include of
14440 malloc.h.
14441 * server.h: Add include of malloc.h.
14442 * mem-break.c: Remove include of malloc.h.
14443 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
14444
14445 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14446
14447 * Makefile.in (memmem.o): Build with -Wno-error.
14448
14449 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14450
14451 * utils.c (xsnprintf): Make non-static.
14452 * server.h: Add xsnprintf declaration.
14453 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
14454 replace calls to snprintf by calls to xsnprintf throughout.
14455
14456 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14457
14458 * configure.ac: Add configure check for alloca.
14459 * configure, config.in: Regenerate.
14460 * server.h: Include alloca.h if it exists.
14461 * gdbreplay.c: Include alloca.h if it exists.
14462
14463 2010-08-28 Pedro Alves <pedro@codesourcery.com>
14464
14465 * linux-low.c (__SIGRTMIN): Define if not already defined.
14466 (linux_create_inferior): Check for __ANDROID__ rather than
14467 __SIGRTMIN.
14468 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
14469 are already deferred.
14470 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
14471 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
14472 stopped and already has a pending signal to report.
14473 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
14474 a pending signal to report or is moving out of a jump pad.
14475 (linux_init_signals): Check for __ANDROID__ rather than
14476 __SIGRTMIN.
14477
14478 2010-08-28 Pedro Alves <pedro@codesourcery.com>
14479
14480 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
14481 debug_threads check. Avoid a linear search when not doing debug
14482 output.
14483
14484 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14485
14486 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
14487 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
14488 (struct file_handler) <fd>: Change type to gdb_fildes_t.
14489 (process_event): Change local fd's type to gdb_fildes_t.
14490 (create_file_handler): Adjust prototype.
14491 (delete_file_handler): Adjust prototype.
14492 (handle_file_event): Adjust prototype. Use pfildes.
14493 (create_file_event): Adjsut prototype.
14494 * remote-utils.c (remote_desc, listen_desc): Change type to
14495 gdb_fildes_t.
14496 * server.h: New gdb_fildes_t typedef.
14497 [USE_WIN32API]: Include winsock2.h.
14498 (delete_file_handler, add_file_handler): Adjust prototypes.
14499 (pfildes): Declare.
14500 * utils.c (pfildes): New.
14501
14502 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14503
14504 * configure.ac (build_warnings): Add -Wno-char-subscripts.
14505 * configure: Regenerate.
14506
14507 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14508
14509 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
14510 (linux_done_accessing_memory): ... this.
14511 (linux_target_ops): Adjust.
14512 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
14513 * nto-low.c (nto_target_ops): Adjust comment.
14514 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
14515 * spu-low.c (spu_target_ops): Adjust comment.
14516 * target.h (target_ops): Rename unprepare_to_access_memory field
14517 to done_accessing_memory.
14518 (unprepare_to_access_memory): Rename to ...
14519 (done_accessing_memory): ... this.
14520
14521 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14522
14523 * linux-low.c (linux_prepare_to_access_memory): New.
14524 (linux_unprepare_to_access_memory): New.
14525 (linux_target_ops): Install them.
14526 * server.c (read_memory): Rename to ...
14527 (gdb_read_memory): ... this. Use
14528 prepare_to_access_memory/prepare_to_access_memory.
14529 (write_memory): Rename to ...
14530 (gdb_write_memory): ... this. Use
14531 prepare_to_access_memory/prepare_to_access_memory.
14532 (handle_search_memory_1): Adjust.
14533 (process_serial_event): Adjust.
14534 * target.h (struct target_ops): New fields
14535 prepare_to_access_memory and unprepare_to_access_memory.
14536 (prepare_to_access_memory, unprepare_to_access_memory): New.
14537 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
14538 prepare_to_access_memory/prepare_to_access_memory.
14539 * nto-low.c (nto_target_ops): Adjust.
14540 * spu-low.c (spu_target_ops): Adjust.
14541 * win32-low.c (win32_target_ops): Adjust.
14542
14543 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14544
14545 * Makefile.in (WARN_CFLAGS): Get it from configure.
14546 (WERROR_CFLAGS): New.
14547 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
14548 * configure.ac: Introduce --enable-werror, which adds -Werror to
14549 the compiler command line. Enabled by default. Disable with
14550 --disable-werror. Add -Wdeclaration-after-statement
14551 Wpointer-arith and -Wformat-nonliteral to warning flags.
14552 * configure: Regenerate.
14553
14554 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14555
14556 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
14557
14558 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14559
14560 * gdbreplay.c (remote_error): New.
14561 (gdbchar): New.
14562 (expect): Use gdbchar. Check for error reading from GDB.
14563 Clarify sync error output.
14564 (play): Check for errors writing to GDB.
14565 * linux-low.c (sigchld_handler): Really ignore `write' errors.
14566 * remote-utils.c (getpkt): Check for errors writing to the remote
14567 descriptor.
14568
14569 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14570
14571 * linux-low.c (linux_wait_1): Move non-debugging code out of
14572 `debug_threads' control.
14573
14574 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14575
14576 * linux-low.c (linux_wait_1): Don't set last_status here.
14577 * server.c (push_event, queue_stop_reply_callback): Assert we're
14578 not pushing a TARGET_WAITKIND_IGNORE event.
14579 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
14580 (myresume, handle_target_event): Set the thread's last_resume_kind
14581 and last_status from the target returned status.
14582
14583 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14584
14585 PR threads/10729
14586
14587 * linux-x86-low.c (update_debug_registers_callback): New.
14588 (i386_dr_low_set_addr): Use it.
14589 (i386_dr_low_get_addr): New.
14590 (i386_dr_low_set_control): Use update_debug_registers_callback.
14591 (i386_dr_low_get_control): New.
14592 (i386_dr_low_get_status): Adjust.
14593 * linux-low.c (linux_stop_lwp): New.
14594 * linux-low.h (linux_stop_lwp): Declare.
14595
14596 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
14597 argument instead of a i386_debug_reg_state.
14598 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
14599 a i386_debug_reg_state.
14600 (i386_insert_aligned_watchpoint): Adjust.
14601 (i386_remove_aligned_watchpoint): Adjust.
14602 (i386_low_stopped_data_address): Read the debug registers from the
14603 inferior instead of from the mirrors.
14604 * i386-low.h (struct i386_debug_reg_state): Extend comment.
14605 (i386_dr_low_get_addr): Declare.
14606 (i386_dr_low_get_control): Declare.
14607 (i386_dr_low_get_status): Change prototype.
14608
14609 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
14610 (i386_dr_low_get_addr): New.
14611 (i386_dr_low_get_control): New.
14612 (i386_dr_low_get_status): Adjust prototype. Return
14613 dr_status_mirror.
14614 (i386_initial_stuff): Clear dr_status_mirror and
14615 dr_control_mirror.
14616 (i386_get_thread_context): Adjust.
14617 (i386_set_thread_context): Adjust.
14618 (i386_thread_added): Adjust.
14619
14620 2010-08-24 Pedro Alves <pedro@codesourcery.com>
14621
14622 * linux-low.h (linux_thread_area): Delete declaration.
14623
14624 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
14625
14626 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
14627 after its termination.
14628
14629 2010-08-09 Pedro Alves <pedro@codesourcery.com>
14630
14631 * linux-low.c (gdb_wants_lwp_stopped): Delete.
14632 (gdb_wants_all_stopped): Delete.
14633 (linux_wait_1): Don't call them.
14634 * server.c (handle_v_cont): Tag all threads as want-stopped.
14635 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
14636 stopped as "client-wants-stopped".
14637
14638 2010-07-31 Pedro Alves <pedro@codesourcery.com>
14639
14640 * Makefile.in (signals_h): New.
14641 (server_h): Depend on it.
14642 (server.o): Don't depend on $(signals_def).
14643 (signals.o): Depend on $(signals_def).
14644
14645 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
14646
14647 * Makefile.in (signals_def): New.
14648 (server_h): Append include/gdb/signals.h and signals_def.
14649 (server.o): Append signals_def.
14650
14651 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
14652
14653 * server.c (handle_target_event): Use target_signal_to_host for
14654 resume_info.sig initialization.
14655 * target.h (struct thread_resume) <sig>: New comment.
14656
14657 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
14658
14659 * server.c (handle_query): strcpy() the returned string from paddress()
14660 instead of sprintf().
14661 * utils.c (paddress): Return phex_nz().
14662
14663 2010-07-07 Joel Brobecker <brobecker@adacore.com>
14664
14665 * server.c (handle_v_cont): Call mourn_inferior if process
14666 just exited.
14667 (myresume): Likewise.
14668
14669 2010-07-01 Pedro Alves <pedro@codesourcery.com>
14670
14671 Static tracepoints, and integration with UST.
14672
14673 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
14674 * mem-break.c (uninsert_all_breakpoints)
14675 (reinsert_all_breakpoints): New.
14676 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
14677 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
14678 (gdb_agent_ust_loaded, helper_thread_id)
14679 (gdb_agent_helper_thread_id): New macros.
14680 (struct ipa_sym_addresses): Add addr_ust_loaded,
14681 addr_helper_thread_id, addr_cmd_buf.
14682 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
14683 (in_process_agent_loaded_ust): New.
14684 (write_e_ust_not_loaded): New.
14685 (maybe_write_ipa_ust_not_loaded): New.
14686 (struct collect_static_trace_data_action): New.
14687 (enum tracepoint_type) <static_tracepoint>: New.
14688 (struct tracepoint) <handle>: Mention static tracepoints.
14689 (struct static_tracepoint_ctx): New.
14690 (CMD_BUF_SIZE): New.
14691 (add_tracepoint_action): Handle static tracepoint actions.
14692 (unprobe_marker_at): New.
14693 (clear_installed_tracepoints): Handle static tracepoints.
14694 (cmd_qtdp): Handle static tracepoints.
14695 (probe_marker_at): New.
14696 (cmd_qtstart): Handle static tracepoints.
14697 (response_tracepoint): Handle static tracepoints.
14698 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
14699 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
14700 (get_context_regcache): Handle static tracepoints.
14701 (do_action_at_tracepoint): Handle static tracepoint actions.
14702 (traceframe_find_block_type): Handle static trace data blocks.
14703 (traceframe_read_sdata): New.
14704 (download_tracepoints): Download static tracepoint actions.
14705 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
14706 (GDB_PROBE_NAME): New.
14707 (ust_ops): New.
14708 (GET_UST_SYM): New.
14709 (USTF): New.
14710 (dlsym_ust): New.
14711 (ust_marker_to_static_tracepoint): New.
14712 (gdb_probe): New.
14713 (collect_ust_data_at_tracepoint): New.
14714 (gdb_ust_probe): New.
14715 (UNIX_PATH_MAX, SOCK_DIR): New.
14716 (gdb_ust_connect_sync_socket): New.
14717 (resume_thread, stop_thread): New.
14718 (run_inferior_command): New.
14719 (init_named_socket): New.
14720 (gdb_ust_socket_init): New.
14721 (cstr_to_hexstr): New.
14722 (next_st): New.
14723 (first_marker, next_marker): New.
14724 (response_ust_marker): New.
14725 (cmd_qtfstm, cmd_qtsstm): New.
14726 (unprobe_marker_at, probe_marker_at): New.
14727 (cmd_qtstmat, gdb_ust_thread): New.
14728 (gdb_ust_init): New.
14729 (initialize_tracepoint_ftlib): Call gdb_ust_init.
14730 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
14731 (ST_REGENTRY): New.
14732 (x86_64_st_collect_regmap): New.
14733 (X86_64_NUM_ST_COLLECT_GREGS): New.
14734 (AMD64_RIP_REGNUM): New.
14735 (supply_static_tracepoint_registers): New.
14736 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
14737 (ST_REGENTRY): New.
14738 (i386_st_collect_regmap): New.
14739 (i386_NUM_ST_COLLECT_GREGS): New.
14740 (supply_static_tracepoint_registers): New.
14741 * server.c (handle_query): Handle qXfer:statictrace:read.
14742 <qSupported>: Report support for StaticTracepoints, and
14743 qXfer:statictrace:read features.
14744 * server.h (traceframe_read_sdata)
14745 (supply_static_tracepoint_registers): Declare.
14746 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
14747 (unpack_varlen_hex): Include in IPA build.
14748 * Makefile.in (ustlibs, ustinc): New.
14749 (IPA_OBJS): Add remote-utils-ipa.o.
14750 ($(IPA_LIB)): Link -ldl and -lpthread.
14751 (UST_CFLAGS): New.
14752 (IPAGENT_CFLAGS): Add UST_CFLAGS.
14753 * config.in, configure: Regenerate.
14754
14755 2010-06-20 Ian Lance Taylor <iant@google.com>
14756 Pedro Alves <pedro@codesourcery.com>
14757
14758 * linux-x86-low.c (always_true): Delete.
14759 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
14760 trying to fool the compiler with always_true.
14761
14762 2010-06-20 Pedro Alves <pedro@codesourcery.com>
14763
14764 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
14765 conditions in gdbserver.
14766
14767 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
14768
14769 * spu-low.c (spu_read_memory): Wrap around local store limit.
14770 (spu_write_memory): Likewise.
14771
14772 2010-06-15 Pedro Alves <pedro@codesourcery.com>
14773
14774 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
14775 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
14776 LONGEST uses.
14777 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
14778 uses.
14779 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
14780 uses with LONGEST uses.
14781
14782 2010-06-14 Stan Shebs <stan@codesourcery.com>
14783 Pedro Alves <pedro@codesourcery.com>
14784
14785 Bytecode compiler.
14786
14787 * linux-x86-low.c: Include limits.h.
14788 (add_insns): New.
14789 (always_true): New.
14790 (EMIT_ASM): New.
14791 (EMIT_ASM32): New.
14792 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
14793 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
14794 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
14795 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
14796 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
14797 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
14798 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
14799 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
14800 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
14801 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
14802 (amd64_emit_void_call_2): New.
14803 (amd64_emit_ops): New.
14804 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
14805 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
14806 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
14807 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
14808 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
14809 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
14810 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
14811 (i386_emit_call, i386_emit_reg, i386_emit_pop)
14812 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
14813 (i386_emit_stack_adjust, i386_emit_int_call_1)
14814 (i386_emit_void_call_2): New.
14815 (i386_emit_ops): New.
14816 (x86_emit_ops): New.
14817 (the_low_target): Install x86_emit_ops.
14818 * server.h (struct emit_ops): New.
14819 (get_raw_reg_func_addr): Declare.
14820 (current_insn_ptr, emit_error): Declare.
14821 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
14822 (set_trace_state_variable_value): New defines.
14823 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
14824 addr_get_trace_state_variable_value and
14825 addr_set_trace_state_variable_value.
14826 (symbol_list): New fields for get_raw_reg,
14827 get_trace_state_variable_value and set_trace_state_variable_value.
14828 (condfn): New typedef.
14829 (struct tracepoint): New field `compiled_cond'.
14830 (do_action_at_tracepoint): Clear compiled_cond.
14831 (get_trace_state_variable_value, set_trace_state_variable_value):
14832 Export in the IPA.
14833 (condition_true_at_tracepoint): If there's a compiled condition,
14834 run that.
14835 (current_insn_ptr, emit_error): New globals.
14836 (struct bytecode_address): New.
14837 (get_raw_reg_func_addr): New.
14838 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
14839 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
14840 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
14841 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
14842 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
14843 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
14844 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
14845 (compile_tracepoint_condition, compile_bytecodes): New.
14846 * target.h (emit_ops): Forward declare.
14847 (struct target_ops): New field emit_ops.
14848 (target_emit_ops): New.
14849 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
14850 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
14851 * linux-low.c (linux_emit_ops): New.
14852 (linux_target_ops): Install it.
14853 * linux-low.h (struct linux_target_ops): New field emit_ops.
14854
14855 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
14856
14857 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
14858 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
14859
14860 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14861 Stan Shebs <stan@codesourcery.com>
14862
14863 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
14864 (all): Depend on $(extra_libraries).
14865 (install-only): Install the IPA.
14866 (IPA_OBJS, IPA_LIB): New.
14867 (clean): Remove the IPA lib.
14868 (IPAGENT_CFLAGS): New.
14869 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
14870 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
14871 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
14872 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
14873 * configure.ac: Check for atomic builtins support in the compiler.
14874 (IPA_DEPFILES, extra_libraries): Define.
14875 * configure.srv (ipa_obj): Add description.
14876 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
14877 (i[34567]86-*-linux*): Set ipa_obj.
14878 (x86_64-*-linux*): Set ipa_obj.
14879 * linux-low.c (stabilizing_threads): New.
14880 (supports_fast_tracepoints): New.
14881 (linux_detach): Stabilize threads before detaching.
14882 (handle_tracepoints): Handle internal tracing breakpoints. Assert
14883 the lwp is either not stabilizing, or is moving out of a jump pad.
14884 (linux_fast_tracepoint_collecting): New.
14885 (maybe_move_out_of_jump_pad): New.
14886 (enqueue_one_deferred_signal): New.
14887 (dequeue_one_deferred_signal): New.
14888 (linux_wait_for_event_1): If moving out of a jump pad, defer
14889 pending signals to later.
14890 (linux_stabilize_threads): New.
14891 (linux_wait_1): Check if threads need moving out of jump pads, and
14892 do it if so.
14893 (stuck_in_jump_pad_callback): New.
14894 (move_out_of_jump_pad_callback): New.
14895 (lwp_running): New.
14896 (linux_resume_one_lwp): Handle moving out of jump pads.
14897 (linux_set_resume_request): Dequeue deferred signals.
14898 (need_step_over_p): Also step over fast tracepoint jumps.
14899 (start_step_over): Also uninsert fast tracepoint jumps.
14900 (finish_step_over): Also reinsert fast tracepoint jumps.
14901 (linux_install_fast_tracepoint_jump): New.
14902 (linux_target_ops): Install linux_stabilize_threads and
14903 linux_install_fast_tracepoint_jump_pad.
14904 * linux-low.h (linux_target_ops) <get_thread_area,
14905 install_fast_tracepoint_jump_pad>: New fields.
14906 (struct lwp_info) <collecting_fast_tracepoint,
14907 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
14908 (linux_get_thread_area): Declare.
14909 * linux-x86-low.c (jump_insn): New.
14910 (x86_get_thread_area): New.
14911 (append_insns): New.
14912 (push_opcode): New.
14913 (amd64_install_fast_tracepoint_jump_pad): New.
14914 (i386_install_fast_tracepoint_jump_pad): New.
14915 (x86_install_fast_tracepoint_jump_pad): New.
14916 (the_low_target): Install x86_get_thread_area and
14917 x86_install_fast_tracepoint_jump_pad.
14918 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
14919 (struct fast_tracepoint_jump): New.
14920 (fast_tracepoint_jump_insn): New.
14921 (fast_tracepoint_jump_shadow): New.
14922 (find_fast_tracepoint_jump_at): New.
14923 (fast_tracepoint_jump_here): New.
14924 (delete_fast_tracepoint_jump): New.
14925 (set_fast_tracepoint_jump): New.
14926 (uninsert_fast_tracepoint_jumps_at): New.
14927 (reinsert_fast_tracepoint_jumps_at): New.
14928 (set_breakpoint_at): Use write_inferior_memory.
14929 (uninsert_raw_breakpoint): Use write_inferior_memory.
14930 (check_mem_read): Mask out fast tracepoint jumps.
14931 (check_mem_write): Mask out fast tracepoint jumps.
14932 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
14933 (set_fast_tracepoint_jump): Declare.
14934 (delete_fast_tracepoint_jump)
14935 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
14936 (reinsert_fast_tracepoint_jumps_at): Declare.
14937 * regcache.c: Don't compile many functions when building the
14938 in-process agent library.
14939 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
14940 the register buffer in the heap.
14941 (free_register_cache): If the register buffer isn't owned by the
14942 regcache, don't free it.
14943 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
14944 pre-existing register caches.
14945 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
14946 type.
14947 (convert_ascii_to_int): : Constify `from' parameter type.
14948 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
14949 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
14950 the needed buffer in-place.
14951 (relocate_instruction): New.
14952 * server.c (handle_query) <qSymbols>: If the target supports
14953 tracepoints, give it a chance of looking up symbols. Report
14954 support for fast tracepoints.
14955 (handle_status): Stabilize threads.
14956 (process_serial_event): Adjust.
14957 * server.h (struct fast_tracepoint_jump): Forward declare.
14958 (struct process_info) <fast_tracepoint_jumps>: New field.
14959 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
14960 (decode_X_packet, decode_M_packet): Adjust.
14961 (relocate_instruction): Declare.
14962 (in_process_agent_loaded): Declare.
14963 (tracepoint_look_up_symbols): Declare.
14964 (struct fast_tpoint_collect_status): Declare.
14965 (fast_tracepoint_collecting): Declare.
14966 (force_unlock_trace_buffer): Declare.
14967 (handle_tracepoint_bkpts): Declare.
14968 (initialize_low_tracepoint)
14969 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
14970 * target.h (struct target_ops) <stabilize_threads,
14971 install_fast_tracepoint_jump_pad>: New fields.
14972 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
14973 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
14974 [HAVE_STDINT_H]: Include stdint.h.
14975 (trace_debug_1): Rename to ...
14976 (trace_vdebug): ... this.
14977 (trace_debug): Rename to ...
14978 (trace_debug_1): ... this. Add `level' parameter.
14979 (trace_debug): New.
14980 (ATTR_USED, ATTR_NOINLINE): New.
14981 (IP_AGENT_EXPORT): New.
14982 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
14983 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
14984 (about_to_request_buffer_space, trace_buffer_is_full)
14985 (stopping_tracepoint, expr_eval_result, error_tracepoint)
14986 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
14987 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
14988 (traceframe_write_count, traceframes_created)
14989 (trace_state_variables)
14990 New renaming defines.
14991 (struct ipa_sym_addresses): New.
14992 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
14993 (symbol_list): New.
14994 (ipa_sym_addrs): New.
14995 (all_tracepoint_symbols_looked_up): New.
14996 (in_process_agent_loaded): New.
14997 (write_e_ipa_not_loaded): New.
14998 (maybe_write_ipa_not_loaded): New.
14999 (tracepoint_look_up_symbols): New.
15000 (debug_threads) [IN_PROCESS_AGENT]: New.
15001 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
15002 (UNKNOWN_SIDE_EFFECTS): New.
15003 (stop_tracing): New.
15004 (flush_trace_buffer): New.
15005 (stop_tracing_bkpt): New.
15006 (flush_trace_buffer_bkpt): New.
15007 (read_inferior_integer): New.
15008 (read_inferior_uinteger): New.
15009 (read_inferior_data_pointer): New.
15010 (write_inferior_data_pointer): New.
15011 (write_inferior_integer): New.
15012 (write_inferior_uinteger): New.
15013 (struct collect_static_trace_data_action): Delete.
15014 (enum tracepoint_type): New.
15015 (struct tracepoint) <type>: New field `type'.
15016 <actions_str, step_actions, step_actions_str>: Only include in
15017 GDBserver.
15018 <orig_size, obj_addr_on_target, adjusted_insn_addr>
15019 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
15020 (tracepoints): Use IP_AGENT_EXPORT.
15021 (last_tracepoint): Don't include in the IPA.
15022 (stopping_tracepoint): Use IP_AGENT_EXPORT.
15023 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
15024 (alloced_trace_state_variables): New.
15025 (trace_state_variables): Use IP_AGENT_EXPORT.
15026 (traceframe_t): Delete unused variable.
15027 (circular_trace_buffer): Don't include in the IPA.
15028 (trace_buffer_start): Delete.
15029 (struct trace_buffer_control): New.
15030 (trace_buffer_free): Delete.
15031 (struct ipa_trace_buffer_control): New.
15032 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
15033 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
15034 New.
15035 (trace_buffer_ctrl): New.
15036 (TRACE_BUFFER_CTRL_CURR): New.
15037 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
15038 Reimplement as macros.
15039 (trace_buffer_wrap): Delete.
15040 (traceframe_write_count, traceframe_read_count)
15041 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
15042 (struct tracepoint_hit_ctx) <type>: New field.
15043 (struct fast_tracepoint_ctx): New.
15044 (memory_barrier): New.
15045 (cmpxchg): New.
15046 (record_tracepoint_error): Update atomically in the IPA.
15047 (clear_inferior_trace_buffer): New.
15048 (about_to_request_buffer_space): New.
15049 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
15050 updating the same buffer.
15051 (add_tracepoint): Default the tracepoint's type to trap
15052 tracepoint, and orig_size to -1.
15053 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
15054 internal variables.
15055 (create_trace_state_variable): New parameter `gdb'. Handle it.
15056 (clear_installed_tracepoints): Clear fast tracepoint jumps.
15057 (cmd_qtdp): Handle fast tracepoints.
15058 (cmd_qtdv): Adjust.
15059 (max_jump_pad_size): New.
15060 (gdb_jump_pad_head): New.
15061 (get_jump_space_head): New.
15062 (claim_jump_space): New.
15063 (sort_tracepoints): New.
15064 (MAX_JUMP_SIZE): New.
15065 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
15066 IPA.
15067 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
15068 support. Upload fast traceframes, and delete internal IPA
15069 breakpoints.
15070 (stop_tracing_handler): New.
15071 (flush_trace_buffer_handler): New.
15072 (cmd_qtstop): Upload fast tracepoints.
15073 (response_tracepoint): Handle fast tracepoints.
15074 (tracepoint_finished_step): Upload fast traceframes. Set the
15075 tracepoint hit context's tracepoint type.
15076 (handle_tracepoint_bkpts): New.
15077 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
15078 type. Add comment about fast tracepoints.
15079 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
15080 non-existing action_str field.
15081 (get_context_regcache): Handle fast tracepoints.
15082 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
15083 to the regcache.
15084 (fast_tracepoint_from_jump_pad_address): New.
15085 (fast_tracepoint_from_ipa_tpoint_address): New.
15086 (collecting_t): New.
15087 (force_unlock_trace_buffer): New.
15088 (fast_tracepoint_collecting): New.
15089 (collecting): New.
15090 (gdb_collect): New.
15091 (write_inferior_data_ptr): New.
15092 (target_tp_heap): New.
15093 (target_malloc): New.
15094 (download_agent_expr): New.
15095 (UALIGN): New.
15096 (download_tracepoints): New.
15097 (download_trace_state_variables): New.
15098 (upload_fast_traceframes): New.
15099 (IPA_FIRST_TRACEFRAME): New.
15100 (IPA_NEXT_TRACEFRAME_1): New.
15101 (IPA_NEXT_TRACEFRAME): New.
15102 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
15103 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
15104 (gdb_jump_pad_buffer_end): New.
15105 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
15106 (initialize_tracepoint): Adjust.
15107 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
15108 buffer. Initialize the low module.
15109 * utils.c (PREFIX, TOOLNAME): New.
15110 (malloc_failure): Use PREFIX.
15111 (error): In the IPA, an error causes an exit.
15112 (fatal, warning): Use PREFIX.
15113 (internal_error): Use TOOLNAME.
15114 (NUMCELLS): Increase to 10.
15115 * configure, config.in: Regenerate.
15116
15117 2010-06-01 Pedro Alves <pedro@codesourcery.com>
15118
15119 * server.c (handle_query) <qSupported>: Do two passes over the
15120 qSupported string to avoid nesting strtok.
15121
15122 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15123
15124 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
15125 (CDEPS): New.
15126 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
15127 -Wl,--dynamic-list.
15128 * configure: Regenerate.
15129 * proc-service.list: New.
15130
15131 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15132
15133 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
15134 New comment.
15135
15136 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
15137
15138 * gdbreplay.c (remote_open): Check error return from socket() call by
15139 its equality to -1 not by it being negative.
15140 * remote-utils.c (remote_open): Likewise.
15141
15142 2010-05-23 Pedro Alves <pedro@codesourcery.com>
15143
15144 * config.h: Regenerate.
15145
15146 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
15147
15148 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
15149 doesn't provide PTRACE_GET_THREAD_AREA.
15150
15151 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
15152
15153 * linux-m68k-low.c: Include <asm/ptrace.h>
15154 (ps_get_thread_area): Implement.
15155
15156 2010-05-03 Doug Evans <dje@google.com>
15157
15158 * event-loop.c (struct callback_event): New struct.
15159 (callback_list): New global.
15160 (append_callback_event, delete_callback_event): New functions.
15161 (process_callback): New function.
15162 (start_event_loop): Call it.
15163 * remote-utils.c (NOT_SCHEDULED): Define.
15164 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
15165 moved out of readchar.
15166 (readchar): Rewrite. Call reschedule before returning.
15167 (reset_readchar): New function.
15168 (remote_close): Call it.
15169 (process_remaining, reschedule): New functions.
15170 * server.h (callback_handler_func): New typedef.
15171 (append_callback_event, delete_callback_event): Declare.
15172
15173 2010-05-03 Pedro Alves <pedro@codesourcery.com>
15174
15175 * proc-service.c (ps_pglobal_lookup): Use
15176 thread_db_look_up_one_symbol.
15177 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
15178 parameter. Use it instead of all_symbols_looked_up.
15179 * server.h (struct process_info) <all_symbols_looked_up>: Delete
15180 field.
15181 (all_symbols_looked_up): Don't declare.
15182 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
15183 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
15184 field.
15185 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
15186 Set all_symbols_looked_up here.
15187 (thread_db_look_up_one_symbol): New.
15188 (thread_db_get_tls_address): Adjust.
15189 (thread_db_load_search, try_thread_db_load_1): Always allocate the
15190 thread_db object on the heap, and tentatively set it in the
15191 process structure.
15192 (thread_db_init): Don't set all_symbols_looked_up here.
15193 * linux-low.h (thread_db_look_up_one_symbol): Declare.
15194
15195 2010-05-03 Pedro Alves <pedro@codesourcery.com>
15196
15197 * linux-low.c (linux_kill, linux_detach): Adjust.
15198 (status_pending_p_callback): Remove redundant statement. Check
15199 for !TARGET_WAITIKIND_IGNORE, instead of
15200 TARGET_WAITKIND_STOPPED.
15201 (handle_tracepoints): Make sure LWP is locked. Adjust.
15202 (linux_wait_for_event_1): Adjust.
15203 (linux_cancel_breakpoints): New.
15204 (unsuspend_one_lwp): New.
15205 (unsuspend_all_lwps): New.
15206 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
15207 (send_sigstop_callback): Change return type to int, add new
15208 `except' parameter and handle it.
15209 (suspend_and_send_sigstop_callback): New.
15210 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
15211 pass them down. If SUSPEND, also increment the lwp's suspend
15212 count.
15213 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
15214 (need_step_over_p): Don't consider suspended LWPs.
15215 (start_step_over): Adjust.
15216 (proceed_one_lwp): Change return type to int, add new `except'
15217 parameter and handle it.
15218 (unsuspend_and_proceed_one_lwp): New.
15219 (proceed_all_lwps): Use find_inferior instead of
15220 for_each_inferior.
15221 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
15222 also decrement the suspend count of LWPs. Pass `except' down,
15223 instead of hacking its suspend count.
15224 (linux_pause_all): Add `freeze' parameter. Adjust.
15225 (linux_unpause_all): New.
15226 (linux_target_ops): Install linux_unpause_all.
15227 * server.c (handle_status): Adjust.
15228 * target.h (struct target_ops): New fields `unpause_all' and
15229 `cancel_breakpoints'. Add new parameter to `pause_all'.
15230 (pause_all): Add new `freeze' parameter.
15231 (unpause_all): New.
15232 (cancel_breakpoints): New.
15233 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
15234 cancel breakpoints.
15235 (cmd_qtstart): Pause threads.
15236 (stop_tracing): Pause threads, and cancel breakpoints.
15237 * win32-low.c (win32_target_ops): Adjust.
15238
15239 2010-05-03 Pedro Alves <pedro@codesourcery.com>
15240
15241 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
15242 the inferior right away from here...
15243 (linux_wait_1): ... to here, and adjust to check the thread's
15244 last_resume_kind instead of the lwp's step or stop_expected flags.
15245
15246 2010-05-02 Pedro Alves <pedro@codesourcery.com>
15247
15248 * README: Use consistent `GDB' and `GDBserver' spellings.
15249
15250 2010-05-02 Pedro Alves <pedro@codesourcery.com>
15251
15252 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
15253 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
15254 (linux_detach_one_lwp): Assume the lwp is stopped.
15255 (any_thread_of): Delete.
15256 (linux_detach): Stop all lwps here. Don't blindly delete all
15257 breakpoints.
15258 (delete_lwp_callback): New.
15259 (linux_mourn): Delete all lwps of the process that is gone.
15260 (linux_wait_1): Don't delete the last lwp of the process here.
15261 * mem-break.h (mark_breakpoints_out): Declare.
15262 * mem-break.c (mark_breakpoints_out): New.
15263 (free_all_breakpoints): Use it.
15264 * server.c (handle_target_event): If the process is gone, mark
15265 breakpoints out.
15266 * thread-db.c (struct thread_db) <create_bp>: New field.
15267 (thread_db_enable_reporting): Fix prototype. Store a thread event
15268 breakpoint reference in the thread_db struct.
15269 (thread_db_load_search): Clear the thread_db object.
15270 (try_thread_db_load_1): Ditto.
15271 (switch_to_process): New.
15272 (disable_thread_event_reporting): Use it.
15273 (remove_thread_event_breakpoints): New.
15274 (thread_db_detach, thread_db_mourn): Use it.
15275
15276 2010-05-01 Pedro Alves <pedro@codesourcery.com>
15277
15278 * linux-low.c (linux_enable_event_reporting): New.
15279 (linux_wait_for_event_1, handle_extended_wait): Use it.
15280
15281 2010-04-30 Pedro Alves <pedro@codesourcery.com>
15282
15283 * linux-low.c (linux_kill_one_lwp, linux_kill)
15284 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
15285 (send_sigstop): Take an lwp_info as parameter instead. Queue a
15286 SIGSTOP even if the LWP is stopped.
15287 (send_sigstop_callback): New.
15288 (stop_all_lwps): Use send_sigstop_callback instead.
15289 (linux_resume_one_thread): Adjust.
15290 (proceed_one_lwp): Still proceed an LWP that the client has
15291 requested to stop, if we haven't reported it as stopped yet. Make
15292 sure that LWPs the client want stopped, have a pending SIGSTOP.
15293
15294 2010-04-26 Doug Evans <dje@google.com>
15295
15296 * server.c (handle_general_set): Make static.
15297
15298 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
15299 Print received char after testing for error/eof instead of before.
15300 (input_interrupt): Tweak comment.
15301
15302 2010-04-23 Doug Evans <dje@google.com>
15303
15304 * server.c (start_inferior): Print inferior argv if --debug.
15305
15306 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
15307
15308 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
15309 * nto-x86-low.c: Include server.h
15310
15311 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
15312
15313 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
15314 be consistent with other sources of this directory.
15315 (init_registers_amd64): Correct name of source file of this function
15316 in the comment.
15317
15318 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
15319
15320 * configure.srv (x86_64-*-mingw*): New configuration for Windows
15321 64-bit executables.
15322
15323 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
15324
15325 * win32-i386-low.c: Add 64-bit support.
15326 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
15327 (init_registers_amd64): Declare.
15328 (mappings): Add 64-bit version of array.
15329 (init_windows_x86): New function.
15330 (the_low_target): Change init_arch field to init_windows_x86.
15331
15332 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
15333
15334 * win32-low.c: Adapt to support also 64-bit architecture.
15335 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
15336 (get_image_name): Use SIZE_T type for local variable `done'.
15337 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
15338 (toolhelp_get_dll_name): Idem.
15339 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
15340 Use uintptr_t typecast to avoid warning.
15341 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
15342 (handle_exception): Use phex_nz to avoid warning.
15343 (win32_wait): Remove unused local variable `process'.
15344
15345 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
15346
15347 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
15348 `amd64-avx.o'.
15349
15350 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
15351
15352 * configure.ac: Use `ws2_32' library for srv_mingw.
15353 * configure: Regenerate.
15354 * gdbreplay.c: Include winsock2.h instead of winsock.h.
15355 * remote-utils.c: Likewise.
15356
15357 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
15358
15359 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
15360 if __x86_64__ is defined.
15361
15362 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
15363
15364 * configure: Regenerate.
15365
15366 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
15367
15368 * server.c (handle_query): Handle 'qGetTIBAddr' query.
15369 * target.h (target_ops): New get_tib_address field.
15370 * win32-low.h (win32_thread_info): Add thread_local_base field.
15371 * win32-low.c (child_add_thread): Add tlb argument.
15372 Set thread_local_base field to TLB.
15373 (get_child_debug_event): Adapt to child_add_thread change.
15374 (win32_get_tib_address): New function.
15375 (win32_target_ops): Set get_tib_address field to
15376 win32_get_tib_address.
15377 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
15378
15379 2010-04-12 Pedro Alves <pedro@codesourcery.com>
15380
15381 * linux-low.c (linux_mourn): Also remove the process.
15382 * server.c (handle_target_event): Don't remove the process here.
15383 * nto-low.c (nto_mourn): New.
15384 (nto_target_ops): Install it.
15385 * spu-low.c (spu_mourn): New.
15386 (spu_target_ops): Install it.
15387 * win32-low.c (win32_mourn): New.
15388 (win32_target_ops): Install it.
15389
15390 2010-04-12 Pedro Alves <pedro@codesourcery.com>
15391
15392 * server.h (buffer_xml_printf): Remove redundant `;'.
15393
15394 2010-04-12 Pedro Alves <pedro@codesourcery.com>
15395
15396 * regcache.c (set_register_cache): Invalidate regcaches before
15397 changing the register cache layout.
15398 (regcache_invalidate_one): Allow a NULL regcache.
15399 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
15400 regcaches before changing the register cache layout or the target
15401 regsets.
15402
15403 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
15404
15405 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
15406 variable warning on Linux/x86-64.
15407
15408 2010-04-11 Pedro Alves <pedro@codesourcery.com>
15409
15410 GDBserver disconnected tracing support.
15411
15412 * linux-low.c (linux_remove_process): Delete.
15413 (add_lwp): Don't set last_resume_kind here.
15414 (linux_kill): Use `mourn'.
15415 (linux_detach): Use `thread_db_detach', and `mourn'.
15416 (linux_mourn): New.
15417 (linux_attach_lwp_1): Adjust comment.
15418 (linux_attach): last_resume_kind moved the thread_info; adjust.
15419 (status_pending_p_callback): Adjust.
15420 (linux_wait_for_event_1): Adjust.
15421 (count_events_callback, select_singlestep_lwp_callback)
15422 (select_event_lwp_callback, cancel_breakpoints_callback)
15423 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
15424 (proceed_one_lwp): Adjust.
15425 (linux_async): Add debug output.
15426 (linux_thread_stopped): New.
15427 (linux_pause_all): New.
15428 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
15429 linux_pause_all.
15430 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
15431 (thread_db_free): Delete declaration.
15432 (thread_db_detach, thread_db_mourn): Declare.
15433 * thread-db.c (thread_db_init): Use thread_db_mourn.
15434 (thread_db_free): Delete, split in two.
15435 (disable_thread_event_reporting): New.
15436 (thread_db_detach): New.
15437 (thread_db_mourn): New.
15438
15439 * server.h (struct thread_info) <last_resume_kind>: New field.
15440 <attached>: Add comment.
15441 <gdb_detached>: New field.
15442 (handler_func): Change return type to int.
15443 (handle_serial_event, handle_target_event): Ditto.
15444 (gdb_connected): Declare.
15445 (tracing): Delete.
15446 (disconnected_tracing): Declare.
15447 (stop_tracing): Declare.
15448
15449 * server.c (handle_query) <qSupported>: Report support for
15450 disconnected tracing.
15451 (queue_stop_reply_callback): Account for running threads.
15452 (gdb_wants_thread_stopped): New.
15453 (gdb_wants_all_threads_stopped): New.
15454 (gdb_reattached_process): New.
15455 (handle_status): Clear the `gdb_detached' flag of all processes.
15456 In all-stop, stop all threads.
15457 (main): Be sure to leave tfind mode. Handle disconnected tracing.
15458 (process_serial_event): If the remote connection breaks, or if an
15459 exit was forced with "monitor exit", force an event loop exit.
15460 Handle disconnected tracing on detach.
15461 (handle_serial_event): Adjust.
15462 (handle_target_event): If GDB isn't connected, forward events back
15463 to the inferior, unless the last process exited, in which case,
15464 exit gdbserver. Adjust interface.
15465
15466 * remote-utils.c (remote_open): Don't block in accept. Instead
15467 register an event loop source on the listen socket file
15468 descriptor. Refactor bits into ...
15469 (listen_desc): ... this new global.
15470 (gdb_connected): ... this new function.
15471 (enable_async_notification): ... this new function.
15472 (handle_accept_event): ... this new function.
15473 (remote_close): Clear remote_desc.
15474
15475 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
15476
15477 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
15478 New fields.
15479 (mourn_inferior): Define.
15480 (target_process_qsupported): Avoid the dangling else problem.
15481 (thread_stopped): Define.
15482 (pause_all): Define.
15483 (target_waitstatus_to_string): Declare.
15484 * target.c (target_waitstatus_to_string): New.
15485
15486 * tracepoint.c (tracing): Make extern.
15487 (disconnected_tracing): New.
15488 (stop_tracing): Make extern. Handle tracing stops due to GDB
15489 disconnecting.
15490 (cmd_qtdisconnected): New.
15491 (cmd_qtstatus): Report disconnected tracing status in trace reply.
15492 (handle_tracepoint_general_set): Handle QTDisconnected.
15493
15494 * event-loop.c (event_handler_func): Change return type to int.
15495 (process_event): Bail out if the event handler wants the event
15496 loop to stop.
15497 (handle_file_event): Ditto.
15498 (start_event_loop): Bail out if the event handler wants the event
15499 loop to stop.
15500
15501 * nto-low.c (nto_target_ops): Adjust.
15502 * spu-low.c (spu_wait): Don't remove the process here.
15503 (spu_target_ops): Adjust.
15504 * win32-low.c (win32_wait): Don't remove the process here.
15505 (win32_target_ops): Adjust.
15506
15507 2010-04-11 Pedro Alves <pedro@codesourcery.com>
15508
15509 * regcache.c (realloc_register_cache): Invalidate inferior's
15510 regcache before recreating it.
15511
15512 2010-04-09 Pedro Alves <pedro@codesourcery.com>
15513
15514 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
15515
15516 2010-04-09 Stan Shebs <stan@codesourcery.com>
15517 Pedro Alves <pedro@codesourcery.com>
15518
15519 * server.h (LONGEST): New.
15520 (struct thread_info) <while_stepping>: New field.
15521 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
15522 Declare.
15523 (initialize_tracepoint, handle_tracepoint_general_set)
15524 (handle_tracepoint_query, tracepoint_finished_step)
15525 (tracepoint_was_hit, release_while_stepping_state_list):
15526 (current_traceframe): Declare.
15527 * server.c (handle_general_set): Handle tracepoint packets.
15528 (read_memory): New.
15529 (write_memory): New.
15530 (handle_search_memory_1): Use read_memory.
15531 (handle_query): Report support for conditional tracepoints, trace
15532 state variables, and tracepoint sources. Handle tracepoint
15533 queries.
15534 (main): Initialize the tracepoints module.
15535 (process_serial_event): Handle traceframe reads/writes.
15536
15537 * linux-low.c (handle_tracepoints): New.
15538 (linux_wait_1): Call it.
15539 (linux_resume_one_lwp): Handle while-stepping.
15540 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
15541 (linux_target_ops): Install them.
15542 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
15543 New field.
15544 * linux-x86-low.c (x86_supports_tracepoints): New.
15545 (the_low_target). Install it.
15546
15547 * mem-break.h (delete_breakpoint): Declare.
15548 * mem-break.c (delete_breakpoint): Make external.
15549
15550 * target.h (struct target_ops): Add `supports_tracepoints',
15551 `read_pc', and `write_pc' fields.
15552 (target_supports_tracepoints): Define.
15553 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
15554 (phex_nz): New.
15555
15556 * regcache.h (struct regcache) <registers_owned>: New field.
15557 (init_register_cache, regcache_cpy): Declare.
15558 (regcache_read_pc, regcache_write_pc): Declare.
15559 (register_cache_size): Declare.
15560 (supply_regblock): Declare.
15561 * regcache.c (init_register_cache): New.
15562 (new_register_cache): Use it.
15563 (regcache_cpy): New.
15564 (register_cache_size): New.
15565 (supply_regblock): New.
15566 (regcache_read_pc, regcache_write_pc): New.
15567
15568 * tracepoint.c: New.
15569
15570 * Makefile.in (OBS): Add tracepoint.o.
15571 (tracepoint.o): New rule.
15572
15573 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
15574
15575 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
15576 (i386-mmx.o): New.
15577 (i386-mmx.c): Likewise.
15578 (i386-mmx-linux.o): Likewise.
15579 (i386-mmx-linux.c): Likewise.
15580
15581 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
15582 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
15583 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
15584 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
15585
15586 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
15587 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
15588 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
15589
15590 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
15591
15592 * Makefile.in (clean): Updated.
15593 (i386-avx.o): New.
15594 (i386-avx.c): Likewise.
15595 (i386-avx-linux.o): Likewise.
15596 (i386-avx-linux.c): Likewise.
15597 (amd64-avx.o): Likewise.
15598 (amd64-avx.c): Likewise.
15599 (amd64-avx-linux.o): Likewise.
15600 (amd64-avx-linux.c): Likewise.
15601
15602 * configure.srv (srv_i386_regobj): Add i386-avx.o.
15603 (srv_i386_linux_regobj): Add i386-avx-linux.o.
15604 (srv_amd64_regobj): Add amd64-avx.o.
15605 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
15606 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
15607 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
15608 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
15609 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
15610 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
15611 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
15612
15613 * i387-fp.c: Include "i386-xstate.h".
15614 (i387_xsave): New.
15615 (i387_cache_to_xsave): Likewise.
15616 (i387_xsave_to_cache): Likewise.
15617 (x86_xcr0): Likewise.
15618
15619 * i387-fp.h (i387_cache_to_xsave): Likewise.
15620 (i387_xsave_to_cache): Likewise.
15621 (x86_xcr0): Likewise.
15622
15623 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
15624 * linux-crisv32-low.c (target_regsets): Likewise.
15625 * linux-m68k-low.c (target_regsets): Likewise.
15626 * linux-mips-low.c (target_regsets): Likewise.
15627 * linux-ppc-low.c (target_regsets): Likewise.
15628 * linux-s390-low.c (target_regsets): Likewise.
15629 * linux-sh-low.c (target_regsets): Likewise.
15630 * linux-sparc-low.c (target_regsets): Likewise.
15631 * linux-xtensa-low.c (target_regsets): Likewise.
15632
15633 * linux-low.c: Include <sys/uio.h>.
15634 (regsets_fetch_inferior_registers): Support nt_type.
15635 (regsets_store_inferior_registers): Likewise.
15636 (linux_process_qsupported): New.
15637 (linux_target_ops): Add linux_process_qsupported.
15638
15639 * linux-low.h (regset_info): Add nt_type.
15640 (linux_target_ops): Add process_qsupported.
15641
15642 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
15643 and <sys/uio.h>.
15644 (init_registers_i386_avx_linux): New.
15645 (init_registers_amd64_avx_linux): Likewise.
15646 (xmltarget_i386_linux_no_xml): Likewise.
15647 (xmltarget_amd64_linux_no_xml): Likewise.
15648 (PTRACE_GETREGSET): Likewise.
15649 (PTRACE_SETREGSET): Likewise.
15650 (x86_fill_xstateregset): Likewise.
15651 (x86_store_xstateregset): Likewise.
15652 (use_xml): Likewise.
15653 (x86_linux_update_xmltarget): Likewise.
15654 (x86_linux_process_qsupported): Likewise.
15655 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
15656 (x86_arch_setup): Don't call init_registers_amd64_linux nor
15657 init_registers_i386_linux here. Call
15658 x86_linux_update_xmltarget.
15659 (the_low_target): Add x86_linux_process_qsupported.
15660
15661 * server.c (handle_query): Call target_process_qsupported.
15662
15663 * target.h (target_ops): Add process_qsupported.
15664 (target_process_qsupported): New.
15665
15666 2010-04-03 Pedro Alves <pedro@codesourcery.com>
15667
15668 * inferiors.c (add_thread): Set last_status kind to
15669 TARGET_WAITKIND_IGNORE.
15670 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
15671 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
15672 (linux_wait_1): Move `thread' local definition to block that uses
15673 it. Don't NULL initialize `event_child'.
15674 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
15675 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
15676 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
15677
15678 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15679
15680 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
15681 an extended waitstatus, or by a watchpoint.
15682 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
15683 thread was stepping or has been stopped by a watchpoint.
15684
15685 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15686
15687 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
15688 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
15689 of another, then delete the previous, and validate all
15690 breakpoints.
15691 (validate_inserted_breakpoint): New.
15692 (delete_disabled_breakpoints): New.
15693 (validate_breakpoints): New.
15694 (check_mem_read): Validate breakpoints before trusting their
15695 shadow. Delete disabled breakpoints.
15696 (check_mem_write): Validate breakpoints before trusting they
15697 should be inserted. Delete disabled breakpoints.
15698 * mem-break.h (validate_breakpoints):
15699 * server.c (handle_query): Validate breakpoints when we see a
15700 qSymbol query.
15701
15702 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15703
15704 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
15705 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
15706 if we could tell there's a GDB breakpoint at stop_pc.
15707 (need_step_over_p): Don't do a step over if we find a GDB
15708 breakpoint at the resume PC.
15709
15710 * mem-break.c (struct raw_breakpoint): New.
15711 (enum bkpt_type): New type `gdb_breakpoint'.
15712 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
15713 fields. New field `raw'.
15714 (find_raw_breakpoint_at): New.
15715 (set_raw_breakpoint_at): Handle refcounting. Create a raw
15716 breakpoint instead.
15717 (set_breakpoint_at): Adjust.
15718 (delete_raw_breakpoint): New.
15719 (release_breakpoint): New.
15720 (delete_breakpoint): Rename to...
15721 (delete_breakpoint_1): ... this. Add proc parameter. Use
15722 release_breakpoint. Return ENOENT.
15723 (delete_breakpoint): Reimplement.
15724 (find_breakpoint_at): Delete.
15725 (find_gdb_breakpoint_at): New.
15726 (delete_breakpoint_at): Delete.
15727 (set_gdb_breakpoint_at): New.
15728 (delete_gdb_breakpoint_at): New.
15729 (gdb_breakpoint_here): New.
15730 (set_reinsert_breakpoint): Use release_breakpoint.
15731 (uninsert_breakpoint): Rename to ...
15732 (uninsert_raw_breakpoint): ... this.
15733 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
15734 (reinsert_raw_breakpoint): Change parameter type to
15735 raw_breakpoint.
15736 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
15737 instead.
15738 (check_breakpoints): Adjust. Use release_breakpoint.
15739 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
15740 (breakpoint_inserted_here): Ditto.
15741 (check_mem_read): Adjust to iterate over raw breakpoints instead.
15742 Don't trust the breakpoint's shadow if it is not inserted.
15743 (check_mem_write): Adjust to iterate over raw breakpoints instead.
15744 (delete_all_breakpoints): Adjust.
15745 (free_all_breakpoints): Mark all breakpoints as uninserted, and
15746 use delete_breakpoint_1.
15747
15748 * mem-break.h (breakpoints_supported): Delete declaration.
15749 (set_gdb_breakpoint_at): Declare.
15750 (gdb_breakpoint_here): Declare.
15751 (delete_breakpoint_at): Delete.
15752 (delete_gdb_breakpoint_at): Declare.
15753
15754 * server.h (struct raw_breakpoint): Forward declare.
15755 (struct process_info): New field `raw_breakpoints'.
15756
15757 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
15758 breakpoints.
15759
15760 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15761
15762 * linux-low.c (status_pending_p_callback): Fix comment.
15763 (linux_wait_for_event_1): Move most of the internal breakpoint
15764 handling from here...
15765 (linux_wait_1): ... to here.
15766 (count_events_callback): New.
15767 (select_singlestep_lwp_callback): New.
15768 (select_event_lwp_callback): New.
15769 (cancel_breakpoints_callback): New.
15770 (select_event_lwp): New.
15771 (linux_wait_1): Simplify internal breakpoint handling. Give equal
15772 priority to all LWPs that have had events that should be reported
15773 to the client. Cancel breakpoints when about to reporting the
15774 event to the client, not while stopping lwps. No longer cancel
15775 finished single-steps here.
15776 (cancel_finished_single_step): Delete.
15777 (cancel_finished_single_steps): Delete.
15778
15779 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15780
15781 * mem-break.c (enum bkpt_type): New.
15782 (struct breakpoint): New field `type'.
15783 (set_breakpoint_at): Change return type to struct breakpoint
15784 pointer. Set type to `other_breakpoint' by default.
15785 (delete_breakpoint): Rewrite, supporting more than one breakpoint
15786 in the breakpoint list.
15787 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
15788 (reinsert_breakpoint): Rename to ...
15789 (reinsert_raw_breakpoint): ... this.
15790 (reinsert_breakpoints_at): Adjust.
15791 * mem-break.h (struct breakpoint): Declare.
15792 (set_breakpoint_at): Change return type to struct breakpoint
15793 pointer.
15794
15795 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15796
15797 * server.c (handle_query): Assign, not compare.
15798
15799 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15800
15801 Teach linux gdbserver to step-over-breakpoints.
15802
15803 * linux-low.c (can_hardware_single_step): New.
15804 (supports_breakpoints): New.
15805 (handle_extended_wait): If stopping threads, read the stop pc of
15806 the new cloned LWP.
15807 (get_pc): New.
15808 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
15809 low target doesn't support retrieving the PC.
15810 (add_lwp): Set last_resume_kind to resume_continue.
15811 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
15812 (linux_attach): Don't clear stop_expected. Set the lwp's
15813 last_resume_kind to resume_stop.
15814 (linux_detach_one_lwp): Don't check for removed breakpoints.
15815 (check_removed_breakpoint): Delete.
15816 (status_pending_p): Rename to ...
15817 (status_pending_p_callback): ... this. Don't check for removed
15818 breakpoints. Don't consider threads that are stopped from GDB's
15819 perspective.
15820 (linux_wait_for_lwp): Always read the stop_pc here.
15821 (cancel_breakpoint): New.
15822 (step_over_bkpt): New global.
15823 (linux_wait_for_event_1): Implement stepping over breakpoints.
15824 (gdb_wants_lwp_stopped): New.
15825 (gdb_wants_all_stopped): New.
15826 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
15827 single-step traps here. Store the thread's last reported target
15828 wait status.
15829 (send_sigstop): Don't clear stop_expected. Always set it,
15830 instead.
15831 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
15832 (cancel_finished_single_step): New.
15833 (cancel_finished_single_steps): New.
15834 (wait_for_sigstop): Don't cancel finished single-step traps here.
15835 (linux_resume_one_lwp): Don't check for removed breakpoints.
15836 Don't set `step' on non-hardware step archs.
15837 (linux_set_resume_request): Ignore resume_stop requests if already
15838 stopping or stopped. Set the lwp's last_resume_kind.
15839 (resume_status_pending_p): Don't check for removed breakpoints.
15840 (need_step_over_p): New.
15841 (start_step_over): New.
15842 (finish_step_over): New.
15843 (linux_resume_one_thread): Always queue a sigstop for resume_stop
15844 requests. Clear the thread's last reported target waitstatus.
15845 Don't use the `suspended' flag. Don't consider pending breakpoints.
15846 (linux_resume): Start a step-over if necessary.
15847 (proceed_one_lwp): New.
15848 (proceed_all_lwps): New.
15849 (unstop_all_lwps): New.
15850 * linux-low.h (struct lwp_info): Rewrite comment for the
15851 `suspended' flag. Add the `stop_pc' field. Delete the
15852 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
15853 Add `'last_resume_kind' and `need_step_over' fields.
15854 * inferiors.c (struct thread_info): Delete, moved elsewhere.
15855 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
15856 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
15857 (set_raw_breakpoint_at): New.
15858 (set_breakpoint_at): Rewrite to use it.
15859 (reinsert_breakpoint_handler): Delete.
15860 (set_reinsert_breakpoint): New.
15861 (reinsert_breakpoint_by_bp): Delete.
15862 (delete_reinsert_breakpoints): New.
15863 (uninsert_breakpoint): Rewrite.
15864 (uninsert_breakpoints_at): New.
15865 (reinsert_breakpoint): Rewrite.
15866 (reinsert_breakpoints_at): New.
15867 (check_breakpoints): Rewrite.
15868 (breakpoint_here): New.
15869 (breakpoint_inserted_here): New.
15870 (check_mem_read): Adjust.
15871 * mem-break.h (breakpoints_supported, breakpoint_here)
15872 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
15873 (reinsert_breakpoint_by_bp): Delete declaration.
15874 (delete_reinsert_breakpoints): Declare.
15875 (reinsert_breakpoint): Delete declaration.
15876 (reinsert_breakpoints_at): Declare.
15877 (uninsert_breakpoint): Delete declaration.
15878 (uninsert_breakpoints_at): Declare.
15879 (check_breakpoints): Adjust prototype.
15880 * server.h: Adjust include order.
15881 (struct thread_info): Declare here. Add a `last_status' field.
15882
15883 2010-03-23 Michael Snyder <msnyder@vmware.com>
15884
15885 * server.c (crc32): New function.
15886 (handle_query): Add handling for 'qCRC:' request.
15887
15888 2010-03-23 Pedro Alves <pedro@codesourcery.com>
15889
15890 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
15891 lwp had been stopped by a watchpoint.
15892
15893 2010-03-16 Pedro Alves <pedro@codesourcery.com>
15894
15895 * server.h (internal_error): Declare.
15896 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
15897 * utils.c (internal_error): New function.
15898
15899 2010-03-15 Andreas Schwab <schwab@redhat.com>
15900
15901 * configure.srv: Fix typo setting srv_regobj.
15902
15903 2010-03-15 Pedro Alves <pedro@codesourcery.com>
15904
15905 * linux-low.c (fetch_register): Avoid passing a non string literal
15906 format to `error'.
15907 (usr_store_inferior_registers): Ditto.
15908
15909 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15910
15911 * linux-low.c (linux_write_memory): Bail out early if peeking
15912 memory failed.
15913
15914 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15915
15916 * linux-low.h (struct lwp_info): New fields
15917 `stopped_by_watchpoint' and `stopped_data_address'.
15918 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
15919 here, and cache them in the lwp object.
15920 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
15921 directly.
15922 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
15923 field.
15924 (linux_stopped_by_watchpoint): Rewrite.
15925 (linux_stopped_data_address): Rewrite.
15926
15927 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
15928
15929 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
15930 switching the current inferior, not before.
15931
15932 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
15933
15934 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
15935 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
15936 i386-linux.c and amd64-linux.c.
15937 (reg-i386.o): Removed.
15938 (reg-i386.c): Likewise.
15939 (reg-i386-linux.o): Likewise.
15940 (reg-i386-linux.c): Likewise.
15941 (reg-x86-64.o): Likewise.
15942 (reg-x86-64.c): Likewise.
15943 (reg-x86-64-linux.o): Likewise.
15944 (reg-x86-64-linux.c): Likewise.
15945 (i386.o): New.
15946 (i386.c): Likewise.
15947 (i386-linux.o): Likewise.
15948 (i386-linux.c): Likewise.
15949 (amd64.o): Likewise.
15950 (amd64.c): Likewise.
15951 (amd64-linux.o): Likewise.
15952 (amd64-linux.c): Likewise.
15953
15954 * configure.srv (srv_i386_regobj): New.
15955 (srv_i386_linux_regobj): Likewise.
15956 (srv_amd64_regobj): Likewise.
15957 (srv_amd64_linux_regobj): Likewise.
15958 (srv_i386_32bit_xmlfiles): Likewise.
15959 (srv_i386_64bit_xmlfiles): Likewise.
15960 (srv_i386_xmlfiles): Likewise.
15961 (srv_amd64_xmlfiles): Likewise.
15962 (srv_i386_linux_xmlfiles): Likewise.
15963 (srv_amd64_linux_xmlfiles): Likewise.
15964 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
15965 srv_xmlfiles to $srv_i386_xmlfiles.
15966 (i[34567]86-*-mingw32ce*): Likewise.
15967 (i[34567]86-*-mingw*): Likewise.
15968 (i[34567]86-*-nto*): Likewise.
15969 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
15970 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
15971 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
15972 (x86_64-*-linux*): Likewise.
15973
15974 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
15975 (init_registers_amd64_linux): New.
15976 (x86_arch_setup): Replace init_registers_x86_64_linux with
15977 init_registers_amd64_linux.
15978
15979 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
15980
15981 * configure.ac: Check for libdl. If it is not available link against
15982 static libthread_db.
15983 * configure: Regenerate.
15984
15985 2010-02-22 Pedro Alves <pedro@codesourcery.com>
15986
15987 PR9605
15988
15989 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
15990 handing a read watchpoint.
15991 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
15992
15993 2010-02-12 Doug Evans <dje@google.com>
15994
15995 * linux-low.c (linux_supports_tracefork_flag): Document.
15996 (linux_look_up_symbols): Add comment.
15997
15998 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
15999
16000 * regcache.c (supply_register): Clear regcache if buf is NULL.
16001
16002 2010-02-02 Nicolas Roche <roche@sourceware.org>
16003 Joel Brobecker <brobecker@adacore.com>
16004
16005 * inferiors.c (find_inferior): Add function documentation.
16006 (unloaded_dll): Handle the case where the unloaded dll has not
16007 been previously registered in the dll list.
16008
16009 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16010
16011 * linux-arm-low.c (thumb_breakpoint_len): Delete.
16012 (thumb2_breakpoint): New.
16013 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
16014
16015 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16016
16017 * linux-low.c (get_stop_pc): Check for SIGTRAP.
16018 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
16019 breakpoints.
16020
16021 2010-01-21 Pedro Alves <pedro@codesourcery.com>
16022
16023 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
16024
16025 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
16026
16027 * linux-s390-low.c (s390_collect_ptrace_register)
16028 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
16029
16030 2010-01-21 Doug Evans <dje@google.com>
16031
16032 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
16033 (PTRACE_ARG4_TYPE): New macro.
16034 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
16035 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
16036 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
16037 (usr_store_inferior_registers): Ditto.
16038 (linux_read_memory, linux_write_memory): Ditto.
16039 (linux_test_for_tracefork): Ditto.
16040
16041 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
16042 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
16043
16044 2010-01-21 Pedro Alves <pedro@codesourcery.com>
16045
16046 * proc-service.c (ps_lgetregs): Don't refetch registers from the
16047 target.
16048
16049 2010-01-21 Pedro Alves <pedro@codesourcery.com>
16050
16051 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
16052 prototype to take a regcache. Adjust.
16053
16054 2010-01-20 Pedro Alves <pedro@codesourcery.com>
16055
16056 * regcache.h (struct thread_info): Forward declare.
16057 (struct regcache): New.
16058 (new_register_cache): Adjust prototype.
16059 (get_thread_regcache): Declare.
16060 (free_register_cache): Adjust prototype.
16061 (registers_to_string, registers_from_string): Ditto.
16062 (supply_register, supply_register_by_name, collect_register)
16063 (collect_register_as_string, collect_register_by_name): Ditto.
16064 * regcache.c (struct inferior_regcache_data): Delete.
16065 (get_regcache): Rename to ...
16066 (get_thread_regcache): ... this. Adjust. Switch inferior before
16067 fetching registers.
16068 (regcache_invalidate_one): Adjust.
16069 (regcache_invalidate): Fix prototype.
16070 (new_register_cache): Return the new register cache.
16071 (free_register_cache): Change prototype.
16072 (realloc_register_cache): Adjust.
16073 (registers_to_string): Change prototype to take a regcache. Adjust.
16074 (registers_from_string): Ditto.
16075 (register_data): Ditto.
16076 (supply_register): Ditto.
16077 (supply_register_by_name): Ditto.
16078 (collect_register): Ditto.
16079 (collect_register_as_string): Ditto.
16080 (collect_register_by_name): Ditto.
16081 * server.c (process_serial_event): Adjust.
16082 * linux-low.h (regset_fill_func, regset_store_func): Change
16083 prototype.
16084 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
16085 Change prototype.
16086 * linux-low.c (get_stop_pc): Adjust.
16087 (check_removed_breakpoint): Adjust.
16088 (linux_wait_for_event): Adjust.
16089 (linux_resume_one_lwp): Adjust.
16090 (fetch_register): Add regcache parameter. Adjust.
16091 (usr_store_inferior_registers): Ditto.
16092 (regsets_fetch_inferior_registers): Ditto.
16093 (regsets_store_inferior_registers): Ditto.
16094 (linux_fetch_registers, linux_store_registers): Ditto.
16095 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
16096 regcache. Adjust.
16097 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
16098 Ditto.
16099 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
16100 prototype to take a regcache.
16101 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
16102 * remote-utils.c (convert_ascii_to_int, outreg)
16103 (prepare_resume_reply): Change prototype to take a regcache.
16104 Adjust.
16105 * target.h (struct target_ops) <fetch_registers, store_registers>:
16106 Change prototype to take a regcache.
16107 (fetch_inferior_registers, store_inferior_registers): Change
16108 prototype to take a regcache. Adjust.
16109 * proc-service.c (ps_lgetregs): Adjust.
16110 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
16111 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
16112 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
16113 take a regcache. Adjust.
16114 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
16115 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
16116 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
16117 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
16118 * linux-cris-low.c (cris_get_pc, cris_set_pc)
16119 (cris_cannot_fetch_register):
16120 (cris_breakpoint_at): Change prototype to take a regcache.
16121 Adjust.
16122 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
16123 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
16124 to take a regcache. Adjust.
16125 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
16126 Adjust.
16127 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
16128 take a regcache. Adjust.
16129 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
16130 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
16131 (m68k_set_pc): Change prototype to take a regcache. Adjust.
16132 * linux-mips-low.c (mips_get_pc):
16133 (mips_set_pc): Change prototype to take a regcache. Adjust.
16134 (mips_reinsert_addr): Adjust.
16135 (mips_collect_register): Change prototype to take a regcache.
16136 Adjust.
16137 (mips_supply_register):
16138 (mips_collect_register_32bit, mips_supply_register_32bit)
16139 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16140 (mips_store_fpregset): Ditto.
16141 * linux-ppc-low.c (ppc_supply_ptrace_register)
16142 (ppc_supply_ptrace_register): Ditto.
16143 (parse_spufs_run): Adjust.
16144 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
16145 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
16146 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
16147 take a regcache. Adjust.
16148 * linux-s390-low.c (s390_collect_ptrace_register)
16149 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
16150 (s390_set_pc): Change prototype to take a regcache. Adjust.
16151 (s390_arch_setup): Adjust.
16152 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
16153 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
16154 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
16155 (sparc_fill_gregset, sparc_store_gregset_from_stack)
16156 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
16157 regcache. Adjust.
16158 (sparc_breakpoint_at): Adjust.
16159 * linux-xtensa-low.c (xtensa_fill_gregset):
16160 (xtensa_store_gregset):
16161 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
16162 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
16163 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
16164 prototype to take a regcache. Adjust.
16165 * win32-arm-low.c (arm_fetch_inferior_register)
16166 (arm_store_inferior_register): Change prototype to take a
16167 regcache. Adjust.
16168 * win32-i386-low.c (i386_fetch_inferior_register)
16169 (i386_store_inferior_register): Change prototype to take a
16170 regcache. Adjust.
16171 * win32-low.c (child_fetch_inferior_registers)
16172 (child_store_inferior_registers): Change prototype to take a
16173 regcache. Adjust.
16174 (win32_wait): Adjust.
16175 (win32_fetch_inferior_registers): Change prototype to take a
16176 regcache. Adjust.
16177 (win32_store_inferior_registers): Adjust.
16178 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
16179 store_inferior_register>: Change prototype to take a regcache.
16180
16181 2010-01-20 Doug Evans <dje@google.com>
16182
16183 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
16184 #ifdef.
16185 (linux_wait_for_event1, linux_init_signals): Ditto.
16186 (W_STOPCODE): Provide definition if missing.
16187
16188 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
16189
16190 * linux-low.c (linux_core_of_thread): New.
16191 (compare_ints, show_process, list_threads): New.
16192 (linux_qxfer_osdata): Report threads and cores.
16193 (linux_target_op): Register linux_core_of_thread.
16194 * remote-utils.c (prepare_resume_reply): Report the core.
16195 (buffer_xml_printf): Support %d specifier.
16196 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
16197 New.
16198 (handle_query): Handle qXfer:threads. Announce availability
16199 thereof.
16200 * target.h (struct target_ops): New field core_of_thread.
16201
16202 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
16203
16204 * Makefile.in (clean): Remove new generated files.
16205 (reg-s390.o, reg-s390.c): Remove rules.
16206 (reg-s390x.o, reg-s390x.c): Likewise.
16207 (s390-linux32.o, s390-linux32.c): Add rules.
16208 (s390-linux64.o, s390-linux64.c): Likewise.
16209 (s390x-linux64.o, s390x-linux64.c): Likewise.
16210 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
16211 * linux-s390-low.c: Include <elf.h>.
16212 (HWCAP_S390_HIGH_GPRS): Define if undefined.
16213 (init_registers_s390): Remove prototype.
16214 (init_registers_s390x): Likewise.
16215 (init_registers_s390_linux32): Add prototype.
16216 (init_registers_s390_linux64): Likewise.
16217 (init_registers_s390x_linux64): Likewise.
16218 (s390_num_regs_3264): New define.
16219 (s390_regmap_3264): New global variable.
16220 (s390_cannot_fetch_register): Remove obsolete check.
16221 (s390_cannot_store_register): Likewise.
16222 (s390_collect_ptrace_register): Handle upper/lower register halves.
16223 (s390_supply_ptrace_register): Likewise.
16224 (s390_fill_gregset): Update to register number changes.
16225 (s390_get_hwcap): New routine.
16226 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
16227 Install appropriate regmap and register set.
16228
16229 2010-01-01 Joel Brobecker <brobecker@adacore.com>
16230
16231 * server.c (gdbserver_version): Update copyright year to 2010.
16232 * gdbreplay.c (gdbreplay_version): Likewise.
16233
16234 2009-12-28 Doug Evans <dje@google.com>
16235
16236 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
16237 elf/external.h. Include <elf.h> instead but only if necessary.
16238
16239 2009-12-28 Pedro Alves <pedro@codesourcery.com>
16240
16241 * linux-low.c (linux_remove_process): Remove `detaching'
16242 parameter. Don't release/detach from thread_db here.
16243 (linux_kill): Release/detach from thread_db here, ...
16244 (linux_detach): ... and here, before actually detaching.
16245 (linux_wait_1): ... and here, when a process exits.
16246 * thread-db.c (any_thread_of): New.
16247 (thread_db_free): Switch the current inferior to a thread of the
16248 passed in process.
16249
16250 2009-12-21 Doug Evans <dje@google.com>
16251
16252 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
16253
16254 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
16255 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
16256 warning ifndef __NR_tkill. Move setting of errno there too.
16257 Delete unnecessary resetting of errno after syscall.
16258 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
16259
16260 * configure.ac: Check for dladdr.
16261 * config.in: Regenerate.
16262 * configure: Regenerate.
16263 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
16264 (try_thread_db_load): Update.
16265
16266 * linux-low.c (my_waitpid): Delete unnecessary prototype.
16267
16268 2009-12-18 Doug Evans <dje@google.com>
16269
16270 * event-loop.c: Include unistd.h if it exists.
16271
16272 * linux-low.c (my_waitpid): Move definition away from being in
16273 between linux_tracefork_child/linux_test_for_tracefork.
16274
16275 * gdb_proc_service.h (psaddr_t): Fix type.
16276 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
16277 signature to match glibc.
16278
16279 2009-12-16 Doug Evans <dje@google.com>
16280
16281 * linux-low.c (linux_read_memory): Fix argument to read.
16282
16283 2009-11-26 Pedro Alves <pedro@codesourcery.com>
16284
16285 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
16286 events, don't leave current_inferior pointing at null.
16287
16288 2009-11-26 Pedro Alves <pedro@codesourcery.com>
16289
16290 * win32-low.c (LOG): Delete.
16291 (OUTMSG): Output to stderr.
16292 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
16293 on compile time LOG macro.
16294 (win32_wait): Fix debug output.
16295
16296 2009-11-26 Pedro Alves <pedro@codesourcery.com>
16297
16298 * win32-low.c (win32_add_one_solib): If the dll name is
16299 "ntdll.dll", prepend the system directory to the dll path.
16300
16301 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
16302
16303 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
16304
16305 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
16306 Vladimir Prus <vladimir@codesourcery.com>
16307
16308 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
16309 * configure.ac: Check for __mcoldfire__ and set
16310 gdb_cv_m68k_is_coldfire.
16311 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
16312 reg-cf.o and reg-m68k.o.
16313 * configure: Regenerated.
16314
16315 2009-11-16 Pedro Alves <pedro@codesourcery.com>
16316
16317 * linux-low.c (linux_remove_process): Add `detaching' parameter.
16318 Pass it to thread_db_free.
16319 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
16320 proper `detaching' argument to linux_remove_process.
16321 * linux-low.h (thread_db_free): Add `detaching' parameter.
16322 * thread-db.c (thread_db_init): Pass false as `detaching' argument
16323 to thread_db_free.
16324 (thread_db_free): Add `detaching' parameter. Only
16325 call td_ta_clear_event if detaching from process.
16326
16327 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
16328
16329 * thread-db.c (thread_db_free): Fix typo.
16330
16331 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
16332
16333 PR gdb/10838
16334 * thread-db.c (thread_db_free): Call td_ta_clear_event.
16335
16336 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
16337
16338 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
16339 with an i686 compiler.
16340 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
16341 needed.
16342 * configure: Rebuilt.
16343
16344 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
16345
16346 PR gdb/10783
16347
16348 * server.c (handle_search_memory_1): Correct read_addr initialization
16349 in loop for searching subsequent chunks.
16350
16351 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
16352
16353 * configure.ac: New --with-libthread-db option.
16354 * thread-db.c: Allow direct dependence on libthread_db.
16355 (thread_db_free): Adjust.
16356 * config.in: Regenerate.
16357 * configure: Likewise.
16358
16359 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
16360
16361 PR gdb/10757
16362 * thread-db.c (attach_thread): New function.
16363 (maybe_attach_thread): Return success/failure.
16364 (find_new_threads_callback): Adjust.
16365 (thread_db_find_new_threads): Loop until no new threads.
16366
16367 2009-10-13 Pedro Alves <pedro@codesourcery.com>
16368
16369 * proc-service.c (ps_lgetregs): Formatting.
16370
16371 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
16372
16373 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
16374 * configure.ac: Adjust.
16375 * linux-low.h (struct process_info_private): Move members to struct
16376 thread_db.
16377 (thread_db_free, thread_db_handle_monitor_command): New prototype.
16378 * linux-low.c (linux_remove_process): Adjust.
16379 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
16380 * server.c (handle_query): Move code ...
16381 (handle_monitor_command): ... here. New function.
16382 * target.h (struct target_ops): New member.
16383 * thread-db.c (struct thread_db): New.
16384 (libthread_db_search_path): New variable.
16385 (thread_db_create_event, thread_db_enable_reporting)
16386 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
16387 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
16388 (try_thread_db_load_1, dladdr_to_soname): New functions.
16389 (try_thread_db_load, thread_db_load_search): New functions.
16390 (thread_db_init): Search for libthread_db.
16391 (thread_db_free): New function.
16392 (thread_db_handle_monitor_command): Likewise.
16393 * config.in: Regenerate.
16394 * configure: Regenerate.
16395
16396 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
16397
16398 * spu-low.c (spu_kill): Wait for inferior to terminate.
16399 Call clear_inferiors.
16400 (spu_detach): Call clear_inferiors.
16401
16402 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16403
16404 * aclocal.m4: Regenerate.
16405 * config.in: Likewise.
16406 * configure: Likewise.
16407
16408 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
16409
16410 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
16411 (parse_spufs_run): New function.
16412 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
16413 (ppc_breakpoint_at): Handle SPU breakpoints.
16414
16415 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
16416
16417 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
16418 (SPUFS_MAGIC): Define.
16419 (spu_enumerate_spu_ids): New function.
16420 (linux_qxfer_spu): New function.
16421 (linux_target_ops): Install linux_qxfer_spu.
16422
16423 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
16424
16425 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
16426 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
16427 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
16428 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
16429 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
16430 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
16431 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
16432 (init_registers_powerpc_cell32l): Add prototype.
16433 (init_registers_powerpc_cell64l): Likewise.
16434 (ppc_arch_setup): Detect Cell/B.E. architecture.
16435
16436 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16437
16438 * Makefile.in (datarootdir): New variable.
16439
16440 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
16441
16442 * linux-low.c (linux_write_memory): Update debugging output.
16443 * Makefile.in (clean): Add new descriptions.
16444 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
16445 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
16446 * configure.srv: Add new files for arm*-*-linux*.
16447 * linux-arm-low.c: Add new declarations.
16448 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
16449 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
16450 (HWCAP_VFPv3D16): New.
16451 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
16452 instead of __IWMMXT__.
16453 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
16454 (arm_arch_setup): New.
16455 (target_regsets): Remove #ifdef. Add VFP regset.
16456 (the_low_target): Use arm_arch_setup.
16457
16458 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
16459
16460 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
16461 the main thread again.
16462
16463 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
16464
16465 Adding Neutrino gdbserver.
16466 * configure: Regenerated.
16467 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
16468 * configure.srv (i[34567]86-*-nto*): New target.
16469 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
16470 * remote-utils.c [__QNX__]: Include sys/iomgr.h
16471 (nto_comctrl) [__QNX__]: New function.
16472 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
16473
16474 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
16475
16476 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
16477 srv_tgtobj.
16478
16479 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
16480 Pedro Alves <pedro@codesourcery.com>
16481
16482 * win32-i386-low.c (i386_get_thread_context): Handle systems that
16483 don't support CONTEXT_EXTENDED_REGISTERS.
16484 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
16485 (the_low_target): Install them.
16486 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
16487 failing with ERROR_PIPE_NOT_CONNECTED.
16488
16489 2009-06-30 Doug Evans <dje@google.com>
16490 Pierre Muller <muller@ics.u-strasbg.fr>
16491
16492 Add h/w watchpoint support to x86-linux, win32-i386.
16493 * Makefile.in (SFILES): Add i386-low.c
16494 (i386_low_h): Define.
16495 (i386-low.o): Add dependencies.
16496 (linux-x86-low.o): Add i386-low.h dependency.
16497 (win32-i386-low.o): Ditto.
16498 * i386-low.c: New file.
16499 * i386-low.h: New file.
16500 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
16501 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
16502 * linux-low.c (linux_add_process): Initialize arch_private.
16503 (linux_remove_process): Free arch_private.
16504 (add_lwp): Initialize arch_private.
16505 (delete_lwp): Free arch_private.
16506 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
16507 provided.
16508 * linux-low.h (process_info_private): New member arch_private.
16509 (lwp_info): New member arch_private.
16510 (linux_target_ops): New members new_process, new_thread,
16511 prepare_to_resume.
16512 (ptid_of): New macro.
16513 * linux-x86-low.c: Include stddef.h, i386-low.h.
16514 (arch_process_info): New struct.
16515 (arch_lwp_info): New struct.
16516 (x86_linux_dr_get, x86_linux_dr_set): New functions.
16517 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
16518 (i386_dr_low_get_status): New function.
16519 (x86_insert_point, x86_remove_point): New functions.
16520 (x86_stopped_by_watchpoint): New function.
16521 (x86_stopped_data_address): New function.
16522 (x86_linux_new_process, x86_linux_new_thread): New functions.
16523 (x86_linux_prepare_to_resume): New function.
16524 (the_low_target): Add entries for insert_point, remove_point,
16525 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
16526 prepare_to_resume.
16527 * server.c (debug_hw_points): New global.
16528 (monitor_show_help): Document set debug-hw-points.
16529 (handle_query): Process "set debug-hw-points".
16530 * server.h (debug_hw_points): Declare.
16531 (paddress): Declare.
16532 * utils.c (NUMCELLS, CELLSIZE): New macros.
16533 (get_sell, xsnprintf, paddress): New functions.
16534 * win32-arm-low.c (the_low_target): Add entries for insert_point,
16535 remove_point, stopped_by_watchpoint, stopped_data_address.
16536 * win32-i386-low.c: Include i386-low.h.
16537 (debug_reg_state): Replaces dr.
16538 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
16539 (i386_dr_low_get_status): New function.
16540 (i386_insert_point, i386_remove_point): New functions.
16541 (i386_stopped_by_watchpoint): New function.
16542 (i386_stopped_data_address): New function.
16543 (i386_initial_stuff): Update.
16544 (get_thread_context,set_thread_context,i386_thread_added): Update.
16545 (the_low_target): Add entries for insert_point,
16546 remove_point, stopped_by_watchpoint, stopped_data_address.
16547 * win32-low.c (win32_insert_watchpoint): New function.
16548 (win32_remove_watchpoint): New function.
16549 (win32_stopped_by_watchpoint): New function.
16550 (win32_stopped_data_address): New function.
16551 (win32_target_ops): Add entries for insert_watchpoint,
16552 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
16553 * win32-low.h (win32_target_ops): New members insert_point,
16554 remove_point, stopped_by_watchpoint, stopped_data_address.
16555
16556 2009-06-25 Pedro Alves <pedro@codesourcery.com>
16557
16558 * server.c (process_serial_event): Re-return unsupported, not
16559 error, if the type isn't recognized. Re-allow supporting only
16560 insert or remove packets. Also call require_running for
16561 breakpoints. Add missing break statement to default case. Tidy.
16562 * target.h (struct target_ops): Rename insert_watchpoint to
16563 insert_point, and remove_watchpoint to remove_point.
16564
16565 * linux-low.h (struct linux_target_ops): Likewise.
16566 * linux-low.c (linux_insert_watchpoint): Rename to ...
16567 (linux_insert_point): ... this. Adjust.
16568 (linux_remove_watchpoint): Rename to ...
16569 (linux_remove_point): ... this. Adjust.
16570 (linux_target_ops): Adjust.
16571 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
16572 (cris_insert_point): ... this.
16573 (cris_remove_watchpoint): Rename to ...
16574 (cris_remove_point): ... this.
16575 (the_low_target): Adjust.
16576
16577 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
16578
16579 * server.c (handle_v_kill): Pass signal_pid to
16580 kill_inferior if multi_process is zero.
16581
16582 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
16583
16584 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
16585 * target.h (target_ops): Comment for *_watchpoint to make it clear
16586 the functions can get types '0' and '1'.
16587
16588 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
16589
16590 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
16591 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
16592 * regcache.c (get_regcache): Likewise.
16593 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
16594 * win32-low.c (child_fetch_inferior_registers): Remove check for
16595 regno 0.
16596
16597 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
16598 Pedro Alves <pedro@codesourcery.com>
16599
16600 * target.h (struct target_ops) <supports_multi_process>: New
16601 callback.
16602 (target_supports_multi_process): New.
16603 * server.c (handle_query): Even if GDB reports support, only
16604 enable multi-process if the target also supports it. Report
16605 multi-process support only if the target backend supports it.
16606 * linux-low.c (linux_supports_multi_process): New function.
16607 (linux_target_ops): Install it as target_supports_multi_process
16608 callback.
16609
16610 2009-05-24 Doug Evans <dje@google.com>
16611
16612 Global renaming of find_thread_pid to find_thread_ptid.
16613 * server.h (find_thread_ptid): Renamed from find_thread_pid.
16614 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
16615 All callers updated.
16616
16617 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
16618 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
16619 directly.
16620
16621 * linux-low.c (get_stop_pc): Print pc if debug_threads.
16622 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
16623 (linux_resume_one_lwp): Ditto.
16624
16625 2009-05-23 Doug Evans <dje@google.com>
16626
16627 * linux-low.c (linux_resume_one_lwp): Change type of first arg
16628 from struct inferior_list_entry * to struct lwp_info *.
16629 All callers updated.
16630
16631 2009-05-13 Doug Evans <dje@google.com>
16632
16633 * linux-x86-low.c: Don't include assert.h.
16634 (x86_siginfo_fixup): Use fatal, not assert.
16635 (x86_arch_setup): Fix comment.
16636
16637 2009-05-12 Doug Evans <dje@google.com>
16638
16639 Biarch support for i386/amd64 gdbserver.
16640 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
16641 Add linux-x86-low.c.
16642 (linux-i386-low.o, linux-x86-64-low.o): Delete.
16643 (linux-x86-low.o): Add.
16644 * linux-x86-64-low.c: Delete.
16645 * linux-i386-low.c: Delete.
16646 * linux-x86-low.c: New file.
16647 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
16648 linux-x86-low.o.
16649 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
16650 linux-x86-low.o.
16651 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
16652 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
16653 (linux_child_pid_to_exec_file): New function.
16654 (elf_64_header_p, elf_64_file_p): New functions.
16655 (siginfo_fixup): New function.
16656 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
16657 give target a chance to convert layout.
16658 * linux-low.h (linux_target_ops): New member siginfo_fixup.
16659 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
16660
16661 2009-05-07 Doug Evans <dje@google.com>
16662
16663 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
16664 (regsets_store_inferior_registers): Ditto.
16665
16666 2009-05-06 Pedro Alves <pedro@codesourcery.com>
16667
16668 PR server/10048
16669
16670 * linux-low.c (must_set_ptrace_flags): Delete.
16671 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
16672 of the global.
16673 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
16674 `lwp->must_set_ptrace_flags' instead.
16675 (linux_wait_for_event_1): Set ptrace options here.
16676 (linux_wait_1): ... not here.
16677
16678 2009-04-30 Doug Evans <dje@google.com>
16679
16680 * inferiors.c (started_inferior_callback): New function.
16681 (attached_inferior_callback): New function.
16682 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
16683 * server.c (print_started_pid, print_attached_pid): New functions.
16684 (detach_or_kill_for_exit): New function.
16685 (main): Call it instead of for_each_inferior (kill_inferior_callback).
16686 * server.h (have_started_inferiors_p): Declare.
16687 (have_attached_inferiors_p): Declare.
16688
16689 * inferiors.c (remove_process): Fix memory leak, free process.
16690 * linux-low.c (linux_remove_process): New function.
16691 (linux_kill): Call it instead of remove_process.
16692 (linux_detach, linux_wait_1): Ditto.
16693
16694 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
16695
16696 * configure.srv: Add x86 Windows CE target.
16697
16698 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16699
16700 * inferiors.c (get_thread_process): Make global.
16701 * server.h (get_thread_process): Add prototype.
16702 * thread-db.c (find_one_thread): Use get_thread_process
16703 instead of current_process.
16704 (thread_db_get_tls_address): Do not crash if called when
16705 thread layer is not yet initialized.
16706
16707 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16708
16709 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
16710 * spu-low.c (current_tid): Rename to ...
16711 (current_ptid): ... this.
16712 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
16713 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
16714 ptid_get_lwp (current_ptid) instead of current_tid.
16715 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
16716 instead of current_tid. Use find_process_pid to verify pid
16717 argument is valid. Pass proper argument to remove_process.
16718 (spu_thread_alive): Compare current_ptid instead of current_tid.
16719 (spu_resume): Likewise.
16720
16721 2009-04-02 Pedro Alves <pedro@codesourcery.com>
16722
16723 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
16724 variable.
16725
16726 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16727
16728 Implement the multiprocess extensions, and add linux multiprocess
16729 support.
16730
16731 * server.h (ULONGEST): Declare.
16732 (struct ptid, ptid_t): New.
16733 (minus_one_ptid, null_ptid): Declare.
16734 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16735 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
16736 (struct inferior_list_entry): Change `id' type from unsigned from
16737 to ptid_t.
16738 (struct sym_cache, struct breakpoint, struct
16739 process_info_private): Forward declare.
16740 (struct process_info): Declare.
16741 (current_process): Declare.
16742 (all_processes): Declare.
16743 (initialize_inferiors): Declare.
16744 (add_thread): Adjust to use ptid_t.
16745 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
16746 (add_process, remove_process, find_thread_pid): Declare.
16747 (find_inferior_id): Adjust to use ptid_t.
16748 (cont_thread, general_thread, step_thread): Change type to ptid_t.
16749 (multi_process): Declare.
16750 (push_event): Adjust to use ptid_t.
16751 (read_ptid, write_ptid): Declare.
16752 (prepare_resume_reply): Adjust to use ptid_t.
16753 (clear_symbol_cache): Declare.
16754 * inferiors.c (all_processes): New.
16755 (null_ptid, minus_one_ptid): New.
16756 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16757 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
16758 (add_thread): Change unsigned long to ptid. Remove gdb_id
16759 parameter. Adjust.
16760 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
16761 (gdb_id_to_thread): Rename to ...
16762 (find_thread_pid): ... this. Change unsigned long to ptid.
16763 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
16764 (loaded_dll, pull_pid_from_list): Adjust.
16765 (add_process, remove_process, find_process_pid)
16766 (get_thread_process, current_process, initialize_inferiors): New.
16767 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
16768 (struct target_waitstatus) <related_pid>: Ditto.
16769 (struct target_ops) <kill, detach>: Add `pid' argument. Change
16770 return type to int.
16771 (struct target_ops) <join>: Add `pid' argument.
16772 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
16773 (struct target_ops) <wait>: Add `ptid' field. Change return type
16774 to ptid.
16775 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
16776 (mywait): Add `ptid' argument. Change return type to ptid_t.
16777 (target_pid_to_str): Declare.
16778 * target.c (set_desired_inferior): Adjust to use ptids.
16779 (mywait): Add new `ptid' argument. Adjust.
16780 (target_pid_to_str): New.
16781 * mem-break.h (free_all_breakpoints): Declare.
16782 * mem-break.c (breakpoints): Delelete.
16783 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
16784 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
16785 to use per-process breakpoint list.
16786 (free_all_breakpoints): New.
16787 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
16788 (symbol_cache, all_symbols_looked_up): Delete.
16789 (hexchars): New.
16790 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
16791 read_ptid): New.
16792 (prepare_resume_reply): Change ptid argument's type from unsigned
16793 long to ptid_t. Adjust. Implement W;process and X;process.
16794 (free_sym_cache, clear_symbol_cache): New.
16795 (look_up_one_symbol): Adjust to per-process symbol cache. *
16796 * server.c (cont_thread, general_thread, step_thread): Change type
16797 to ptid_t.
16798 (attached): Delete.
16799 (multi_process): New.
16800 (last_ptid): Change type to ptid_t.
16801 (struct vstop_notif) <ptid>: Change type to ptid_t.
16802 (queue_stop_reply, push_event): Change `ptid' argument's type to
16803 ptid_t.
16804 (discard_queued_stop_replies): Add `pid' argument.
16805 (start_inferior): Adjust to use ptids. Adjust to mywait interface
16806 changes. Don't reference the `attached' global.
16807 (attach_inferior): Adjust to mywait interface changes.
16808 (handle_query): Adjust to use ptids. Parse GDB's qSupported
16809 features. Handle and report "multiprocess+". Handle
16810 "qAttached:PID".
16811 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
16812 changes.
16813 (handle_v_kill): New.
16814 (handle_v_stopped): Adjust to use target_pid_to_str.
16815 (handle_v_requests): Allow multiple attaches and runs when
16816 multiprocess extensions are in effect. Handle "vKill".
16817 (myresume): Adjust to use ptids.
16818 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
16819 (handle_status): Adjust to discard_queued_stop_replies interface
16820 change.
16821 (first_thread_of, kill_inferior_callback)
16822 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
16823 (main): Call initialize_inferiors. Adjust to use ptids, killing
16824 and detaching from all inferiors. Handle multiprocess packet
16825 variants.
16826 * linux-low.h: Include gdb_proc_service.h.
16827 (struct process_info_private): New.
16828 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
16829 <lwpid_of>: Use ptid_get_lwp.
16830 (get_lwp_thread): Adjust.
16831 (struct lwp_info): Add `dead' member.
16832 (find_lwp_pid): Declare.
16833 * linux-low.c (thread_db_active): Delete.
16834 (new_inferior): Adjust comment.
16835 (inferior_pid): Delete.
16836 (linux_add_process): New.
16837 (handle_extended_wait): Adjust.
16838 (add_lwp): Change unsigned long to ptid.
16839 (linux_create_inferior): Add process to processes table. Adjust
16840 to use ptids. Don't set new_inferior here.
16841 (linux_attach_lwp): Rename to ...
16842 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
16843 it. Adjust to use ptids.
16844 (linux_attach_lwp): New.
16845 (linux_attach): Add process to processes table. Don't set
16846 new_inferior here.
16847 (struct counter): New.
16848 (second_thread_of_pid_p, last_thread_of_process_p): New.
16849 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
16850 multiple processes.
16851 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
16852 processes. Remove process from process table.
16853 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
16854 to multiple processes.
16855 (any_thread_of): New.
16856 (linux_detach): Add `pid' argument, and handle it. Remove process
16857 from processes table.
16858 (linux_join): Add `pid' argument. Handle it.
16859 (linux_thread_alive): Change unsighed long argument to ptid_t.
16860 Consider dead lwps as not being alive.
16861 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
16862 threads we're not interested in.
16863 (same_lwp, find_lwp_pid): New.
16864 (linux_wait_for_lwp): Change `pid' argument's type from int to
16865 ptid_t. Adjust.
16866 (linux_wait_for_event): Rename to ...
16867 (linux_wait_for_event_1): ... this. Change `pid' argument's type
16868 from int to ptid_t. Adjust.
16869 (linux_wait_for_event): New.
16870 (linux_wait_1): Add `ptid' argument. Change return type to
16871 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
16872 that exit from the process table.
16873 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
16874 Adjust.
16875 (mark_lwp_dead): New.
16876 (wait_for_sigstop): Adjust to use ptids. If a process exits while
16877 stopping all threads, mark its main lwp as dead.
16878 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
16879 ptids.
16880 (fetch_register, usr_store_inferior_registers)
16881 (regsets_fetch_inferior_registers)
16882 (regsets_store_inferior_registers, linux_read_memory)
16883 (linux_write_memory): Inline `inferior_pid'.
16884 (linux_look_up_symbols): Adjust to use per-process
16885 `thread_db_active'.
16886 (linux_request_interrupt): Adjust to use ptids.
16887 (linux_read_auxv): Inline `inferior_pid'.
16888 (initialize_low): Don't reference thread_db_active.
16889 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
16890 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
16891 (ps_getpid): Return the pid of the current inferior.
16892 * thread-db.c (proc_handle, thread_agent): Delete.
16893 (thread_db_create_event, thread_db_enable_reporting): Adjust to
16894 per-process data.
16895 (find_one_thread): Change argument type to ptid_t. Adjust to
16896 per-process data.
16897 (maybe_attach_thread): Adjust to per-process data and ptids.
16898 (thread_db_find_new_threads): Ditto.
16899 (thread_db_init): Ditto.
16900 * spu-low.c (spu_create_inferior, spu_attach): Add process to
16901 processes table. Adjust to use ptids.
16902 (spu_kill, spu_detach): Adjust interface. Remove process from
16903 processes table.
16904 (spu_join, spu_thread_alive): Adjust interface.
16905 (spu_wait): Adjust interface. Remove process from processes
16906 table. Adjust to use ptids.
16907 * win32-low.c (current_inferior_tid): Delete.
16908 (current_inferior_ptid): New.
16909 (debug_event_ptid): New.
16910 (thread_rec): Take a ptid. Adjust.
16911 (child_add_thread): Add `pid' argument. Adjust to use ptids.
16912 (child_delete_thread): Ditto.
16913 (do_initial_child_stuff): Add `attached' argument. Add process to
16914 processes table.
16915 (child_fetch_inferior_registers, child_store_inferior_registers):
16916 Adjust.
16917 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
16918 (win32_attach): Pass 1 to do_initial_child_stuff.
16919 (win32_kill): Adjust interface. Remove process from processes
16920 table.
16921 (win32_detach): Ditto.
16922 (win32_join): Adjust interface.
16923 (win32_thread_alive): Take a ptid.
16924 (win32_resume): Adjust to use ptids.
16925 (get_child_debug_event): Ditto.
16926 (win32_wait): Adjust interface. Remove exiting process from
16927 processes table.
16928
16929 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16930
16931 Non-stop mode support.
16932
16933 * server.h (non_stop): Declare.
16934 (gdb_client_data, handler_func): Declare.
16935 (delete_file_handler, add_file_handler, start_event_loop):
16936 Declare.
16937 (handle_serial_event, handle_target_event, push_event)
16938 (putpkt_notif): Declare.
16939 * target.h (enum resume_kind): New.
16940 (struct thread_resume): Replace `step' field by `kind' field.
16941 (TARGET_WNOHANG): Define.
16942 (struct target_ops) <wait>: Add `options' argument.
16943 <supports_non_stop, async, start_non_stop>: New fields.
16944 (target_supports_non_stop, target_async): New.
16945 (start_non_stop): Declare.
16946 (mywait): Add `options' argument.
16947 * target.c (mywait): Add `options' argument. Print child exit
16948 notifications here.
16949 (start_non_stop): New.
16950 * server.c (non_stop, own_buf, mem_buf): New globals.
16951 (struct vstop_notif): New.
16952 (notif_queue): New global.
16953 (queue_stop_reply, push_event, discard_queued_stop_replies)
16954 (send_next_stop_reply): New.
16955 (start_inferior): Adjust to use resume_kind. Adjust to mywait
16956 interface changes.
16957 (attach_inferior): In non-stop mode, don't wait for the target
16958 here.
16959 (handle_general_set): Handle QNonStop.
16960 (handle_query): When handling qC, return the current general
16961 thread, instead of the first thread of the list.
16962 (handle_query): If the backend supports non-stop mode, include
16963 QNonStop+ in the qSupported query response.
16964 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
16965 and non-stop mode.
16966 (handle_v_attach, handle_v_run): Handle non-stop mode.
16967 (handle_v_stopped): New.
16968 (handle_v_requests): Report support for vCont;t. Handle vStopped.
16969 (myresume): Adjust to use resume_kind. Handle non-stop.
16970 (queue_stop_reply_callback): New.
16971 (handle_status): Handle non-stop mode.
16972 (main): Clear non_stop flag on reconnection. Use the event-loop.
16973 Refactor serial protocol handling from here ...
16974 (process_serial_event): ... to this new function. When GDB
16975 selects any thread, select one here. In non-stop mode, wait until
16976 GDB acks all pending events before exiting.
16977 (handle_serial_event, handle_target_event): New.
16978 * remote-utils.c (remote_open): Install remote_desc in the event
16979 loop.
16980 (remote_close): Remove remote_desc from the event loop.
16981 (putpkt_binary): Rename to...
16982 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
16983 (putpkt_binary): New as wrapper around putpkt_binary_1.
16984 (putpkt_notif): New.
16985 (prepare_resume_reply): In non-stop mode, don't change the
16986 general_thread.
16987 * event-loop.c: New.
16988 * Makefile.in (OBJ): Add event-loop.o.
16989 (event-loop.o): New rule.
16990
16991 * linux-low.h (pid_of): Moved here.
16992 (lwpid_of): New.
16993 (get_lwp_thread): Use lwpid_of.
16994 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
16995 * linux-low.c (pid_of): Delete.
16996 (inferior_pid): Use lwpid_of.
16997 (linux_event_pipe): New.
16998 (target_is_async_p): New.
16999 (delete_lwp): New.
17000 (handle_extended_wait): Use lwpid_of.
17001 (add_lwp): Don't set lwpid field.
17002 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
17003 (linux_kill_one_lwp): If killing a running lwp, stop it first.
17004 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
17005 (linux_detach_one_lwp): If detaching from a running lwp, stop it
17006 first. Adjust to linux_wait_for_event interface changes. Use
17007 lwpid_of.
17008 (linux_detach): Don't delete the main lwp here.
17009 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
17010 (status_pending_p): Don't consider explicitly suspended lwps.
17011 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
17012 pointer. Add OPTIONS argument. Change return type to int. Use
17013 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
17014 (linux_wait_for_event): Take an integer pid instead of a lwp_info
17015 pointer. Add status pointer argument. Return a pid instead of a
17016 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
17017 changes. In non-stop mode, don't switch to a random thread.
17018 (linux_wait): Rename to...
17019 (linux_wait_1): ... this. Add target_options argument, and handle
17020 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
17021 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
17022 clean exit and signal exit code. Don't stop all threads in
17023 non-stop mode. In all-stop mode, only stop all threads when
17024 reporting a stop to GDB. Handle explicit thread stop requests.
17025 (async_file_flush, async_file_mark): New.
17026 (linux_wait): New.
17027 (send_sigstop): Use lwpid_of.
17028 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
17029 interface changes. In non-stop mode, don't switch to a random
17030 thread.
17031 (linux_resume_one_lwp): Use lwpid_of.
17032 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
17033 (linux_resume_one_thread): ... this. Handle resume_stop. In
17034 non-stop mode, don't look for pending flag in all threads.
17035 (resume_status_pending_p): Don't consider explicitly suspended
17036 threads.
17037 (my_waitpid): Reimplement. Emulate __WALL.
17038 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
17039 Use lwpid_of.
17040 (sigchld_handler, linux_supports_non_stop, linux_async)
17041 (linux_start_non_stop): New.
17042 (linux_target_ops): Register linux_supports_non_stop, linux_async
17043 and linux_start_non_stop.
17044 (initialize_low): Install SIGCHLD handler.
17045 * thread-db.c (thread_db_create_event, find_one_thread)
17046 (thread_db_get_tls_address): Use lwpid_of.
17047 * win32-low.c (win32_detach): Adjust to use resume_kind.
17048 (win32_wait): Add `options' argument.
17049 * spu-low.c (spu_resume): Adjust to use resume_kind.
17050 (spu_wait): Add `options' argument.
17051
17052 2009-04-01 Pedro Alves <pedro@codesourcery.com>
17053
17054 Decouple target code from remote protocol.
17055
17056 * target.h (enum target_waitkind): New.
17057 (struct target_waitstatus): New.
17058 (struct target_ops) <wait>: Return an unsigned long. Take a
17059 target_waitstatus pointer instead of a char pointer.
17060 (mywait): Likewise.
17061 * target.c (mywait): Change prototype to return an unsigned long.
17062 Take a target_waitstatus pointer instead of a char pointer. Adjust.
17063 * server.h (thread_from_wait, old_thread_from_wait): Delete
17064 declarations.
17065 (prepare_resume_reply): Change prototype to take a
17066 target_waitstatus.
17067 * server.c (thread_from_wait, old_thread_from_wait): Delete.
17068 (last_status, last_ptid): New.
17069 (start_inferior): Remove "statusptr" argument. Adjust. Return a
17070 pid instead of a signal.
17071 (attach_inferior): Remove "status" and "signal" parameters.
17072 Adjust.
17073 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
17074 not as an address.
17075 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
17076 (handle_v_requests, myresume): Remove "status" and "signal"
17077 parameters. Adjust.
17078 (handle_status): New.
17079 (main): Delete local `status'. Adjust.
17080 * remote-utils.c: Include target.h.
17081 (prepare_resume_reply): Change prototype to take a
17082 target_waitstatus. Adjust.
17083
17084 * linux-low.c (linux_wait): Adjust to new target_ops->wait
17085 interface.
17086 * spu-low.c (spu_wait): Adjust.
17087 * win32-low.c (enum target_waitkind, struct target_waitstatus):
17088 Delete.
17089 (win32_wait): Adjust.
17090
17091 2009-04-01 Pedro Alves <pedro@codesourcery.com>
17092
17093 * target.h (struct thread_resume): Delete leave_stopped member.
17094 (struct target_ops): Add a `n' argument to the `resume' callback.
17095 * server.c (start_inferior): Adjust.
17096 (handle_v_cont, myresume): Adjust.
17097 * linux-low.c (check_removed_breakpoint): Adjust to resume
17098 interface change, and to removed leave_stopped field.
17099 (resume_ptr): Delete.
17100 (struct thread_resume_array): New.
17101 (linux_set_resume_request): Add new `arg' parameter. Adjust to
17102 resume interface change.
17103 (linux_continue_one_thread, linux_queue_one_thread)
17104 (resume_status_pending_p): Check if the resume field is NULL
17105 instead of checking the leave_stopped member.
17106 (linux_resume): Adjust to the target resume interface change.
17107 * spu-low.c (spu_resume): Adjust to the target resume interface
17108 change.
17109 * win32-low.c (win32_detach, win32_resume): Ditto.
17110
17111 2009-04-01 Pedro Alves <pedro@codesourcery.com>
17112
17113 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
17114 flag.
17115 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
17116 pending.
17117 (linux_continue_one_thread): Only preserve the stepping flag if
17118 there's a pending breakpoint.
17119
17120 2009-03-31 Pedro Alves <pedro@codesourcery.com>
17121
17122 * server.c (main): After the inferior having exited, call
17123 remote_close before exiting gdbserver.
17124
17125 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
17126
17127 Fix size of FPSCR in Power 7 processors.
17128 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
17129 (PPC_FEATURE_HAS_DFP): New #define.
17130 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
17131 size of the FPSCR.
17132
17133 2009-03-23 Pedro Alves <pedro@codesourcery.com>
17134
17135 * server.c (handle_query) Whitespace and formatting.
17136
17137 2009-03-22 Pedro Alves <pedro@codesourcery.com>
17138
17139 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
17140 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
17141 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
17142 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
17143 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
17144 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
17145 Makefile.in, configure.ac: Fix whitespace throughout.
17146 * configure: Regenerate.
17147
17148 2009-03-22 Pedro Alves <pedro@codesourcery.com>
17149
17150 * inferiors.c (find_inferior): Make it safe for the callback
17151 function to delete the currently iterated inferior.
17152
17153 2009-03-22 Pedro Alves <pedro@codesourcery.com>
17154
17155 * Makefile.in (linuw_low_h): Move higher.
17156 (thread-db.o): Depend on $(linux_low_h).
17157
17158 2009-03-17 Pedro Alves <pedro@codesourcery.com>
17159
17160 Rename "process" to "lwp" throughout.
17161
17162 * linux-low.c (all_processes): Rename to...
17163 (all_lwps): ... this.
17164 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
17165 (add_process): Rename to ...
17166 (add_lwp): ... this. Adjust.
17167 (linux_create_inferior): Adjust.
17168 (linux_attach_lwp): Adjust.
17169 (linux_attach): Adjust.
17170 (linux_kill_one_process): Rename to ...
17171 (linux_kill_one_lwp): ... this. Adjust.
17172 (linux_kill): Adjust.
17173 (linux_detach_one_process): Rename to ...
17174 (linux_detach_one_lwp): ... this. Adjust.
17175 (linux_detach): Adjust.
17176 (check_removed_breakpoint): Adjust.
17177 (status_pending_p): Adjust.
17178 (linux_wait_for_process): Rename to ...
17179 (linux_wait_for_lwp): ... this. Adjust.
17180 (linux_wait_for_event): Adjust.
17181 (send_sigstop): Adjust.
17182 (wait_for_sigstop): Adjust.
17183 (stop_all_processes): Rename to ...
17184 (stop_all_lwps): ... this.
17185 (linux_resume_one_process): Rename to ...
17186 (linux_resume_one_lwp): ... this. Adjust.
17187 (linux_set_resume_request, linux_continue_one_thread)
17188 (linux_queue_one_thread, resume_status_pending_p)
17189 (usr_store_inferior_registers, regsets_store_inferior_registers)
17190 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
17191 Adjust.
17192 * linux-low.h (get_process): Rename to ...
17193 (get_lwp): ... this. Adjust.
17194 (get_thread_process): Rename to ...
17195 (get_thread_lwp): ... this. Adjust.
17196 (get_process_thread): Rename to ...
17197 (get_lwp_thread): ... this. Adjust.
17198 (struct process_info): Rename to ...
17199 (struct lwp_info): ... this.
17200 (all_processes): Rename to ...
17201 (all_lwps): ... this.
17202 * proc-service.c (ps_lgetregs): Adjust.
17203 * thread-db.c (thread_db_create_event, find_one_thread)
17204 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
17205
17206 2009-03-14 Pedro Alves <pedro@codesourcery.com>
17207
17208 * server.c (handle_query): Handle "qAttached".
17209
17210 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
17211
17212 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
17213 GPLv3, update license URL.
17214
17215 2009-03-01 Doug Evans <dje@google.com>
17216
17217 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
17218 (server_h): Add gdb_signals.h.
17219 (signals.o): Update.
17220 * server.h (target_signal_from_host,target_signal_to_host_p)
17221 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
17222
17223 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
17224
17225 * remote-utils.c (getpkt): Also generate remote-debug
17226 information if noack_mode is set.
17227
17228 2009-02-06 Pedro Alves <pedro@codesourcery.com>
17229
17230 * server.c (handle_query): Report qXfer:siginfo:read and
17231 qXfer:siginfo:write as supported and handle them.
17232 * target.h (struct target_ops) <qxfer_siginfo>: New field.
17233 * linux-low.c (linux_xfer_siginfo): New.
17234 (linux_target_ops): Set it.
17235
17236 2009-01-26 Pedro Alves <pedro@codesourcery.com>
17237
17238 * server.c (gdbserver_usage): Mention --remote-debug.
17239 (main): Accept '--remote-debug' switch.
17240
17241 2009-01-18 Doug Evans <dje@google.com>
17242
17243 * regcache.c (new_register_cache): No need to check result of xcalloc.
17244 * server.c (handle_search_memory): Back out calls to xmalloc,
17245 result is checked and error is returned to user upon failure.
17246 (handle_query): Ditto. Add more checks for result of malloc.
17247 (handle_v_cont): Check result of malloc, report error back to
17248 user upon failure.
17249 (handle_v_run): Ditto. Call freeargv.
17250 * server.h (freeargv): Declare.
17251 * utils.c (freeargv): New fn.
17252
17253 2009-01-15 Doug Evans <dje@google.com>
17254
17255 * gdbreplay.c (perror_with_name): Make arg const char *.
17256 * server.h (target_signal_to_name): Make return type const char *.
17257 * thread-db.c (thread_db_err_str): Make return type const char *.
17258 * utils.c (perror_with_name): Make arg const char *.
17259
17260 2009-01-14 Pedro Alves <pedro@codesourcery.com>
17261
17262 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
17263 when handling a EXIT_PROCESS_DEBUG_EVENT.
17264
17265 2009-01-06 Joel Brobecker <brobecker@adacore.com>
17266
17267 * gdbreplay.c (gdbreplay_version): Update copyright year.
17268 * server.c (gdbserver_version): Likewise.
17269
17270 2009-01-05 Doug Evans <dje@google.com>
17271
17272 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
17273 (handle_extended_wait): Improve comment.
17274
17275 2008-12-13 Doug Evans <dje@google.com>
17276
17277 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
17278 * server.h (ATTR_MALLOC): New macro.
17279 (xmalloc,xcalloc,xstrdup): Declare.
17280 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
17281 * inferiors.c: Ditto.
17282 * linux-low.c: Ditto.
17283 * mem-break.c: Ditto.
17284 * regcache.c: Ditto.
17285 * remote-utils.c: Ditto.
17286 * server.c: Ditto.
17287 * target.c: Ditto.
17288 * win32-low.c: Ditto.
17289
17290 2008-12-12 Doug Evans <dje@google.com>
17291
17292 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
17293 in debugging printf.
17294
17295 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
17296
17297 2008-12-09 Doug Evans <dje@google.com>
17298
17299 * linux-low.h (struct process_info): Delete member tid, unused.
17300 * thread-db.c (find_one_thread): Update.
17301 (maybe_attach_thread): Update.
17302
17303 2008-12-02 Pedro Alves <pedro@codesourcery.com>
17304
17305 * target.h (struct target_ops): Add qxfer_osdata member.
17306 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
17307 and dirent.h.
17308 (linux_qxfer_osdata): New functions.
17309 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
17310 callback.
17311 * server.c (handle_query): Handle "qXfer:osdata:read:".
17312 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
17313 (buffer_xml_printf): New functions.
17314 * server.h (struct buffer): New.
17315 (buffer_grow_str, buffer_grow_str0): New macros.
17316 (buffer_grow, buffer_free, buffer_init, buffer_finish)
17317 (buffer_xml_printf): Declare.
17318
17319 2008-11-24 Doug Evans <dje@google.com>
17320
17321 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
17322
17323 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
17324
17325 * server.c (handle_v_run): Always use the supplied argument list.
17326
17327 2008-11-19 Bob Wilson <bob.wilson@acm.org>
17328
17329 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
17330 (xtensa_regmap_table): Add entry for scompare1.
17331
17332 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
17333
17334 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
17335 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
17336 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
17337 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
17338 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
17339 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
17340 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
17341 XML target descriptions.
17342 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
17343 when inferior is running on an ISA 2.05 or later processor. Add
17344 special case to return offset for full 64-bit slot of FPSCR when
17345 in 32-bits.
17346
17347 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
17348
17349 * Makefile.in (SFILES, clean): Added sparc64 files.
17350 (reg-sparc64.o, reg-sparc64.c): New.
17351 * configure.srv (sparc*-*-linux*): New configuration.
17352 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
17353 syscall arguments for SPARC.
17354 (regsets_store_inferior_registers): Likewise.
17355 * linux-sparc-low.c: New file.
17356
17357 2008-10-21 Doug Evans <dje@google.com>
17358
17359 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
17360 (READLINE_DIR,READLINE_DEP): Delete.
17361 (INTERNAL_CFLAGS): Update.
17362 (LINTFLAGS): Update.
17363
17364 2008-10-10 Pedro Alves <pedro@codesourcery.com>
17365
17366 * server.c (handle_v_run): If GDB didn't specify an argv, use the
17367 whole argv from the last run, not just argv[0].
17368
17369 2008-09-08 Pedro Alves <pedro@codesourcery.com>
17370
17371 * regcache.c (new_register_cache): Return NULL if the register
17372 cache size isn't known yet.
17373 (free_register_cache): Avoid dereferencing a NULL regcache.
17374
17375 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
17376
17377 * configure.srv: Merge MIPS and MIPS64.
17378
17379 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
17380
17381 * Makefile.in (uninstall): Apply $(EXEEXT) too.
17382
17383 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
17384
17385 * Makefile.in: Add required vsx dependencies.
17386
17387 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
17388 Declare init_registers_powerpc_vsx32l.
17389 Declare init_registers_powerpc_vsx64l.
17390 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
17391 (ppc_arch_setup): Check for VSX in hwcap.
17392 (ppc_fill_vsxregset): New function.
17393 (ppc_store_vsxregset): New function.
17394 Add new VSX entry in regset_info target_regsets.
17395
17396 * configure.srv: Add new VSX dependencies.
17397
17398 2008-08-12 Pedro Alves <pedro@codesourcery.com>
17399
17400 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
17401 (remote_open): Set or clear transport_is_reliable.
17402 (putpkt_binary): Don't expect acks in noack mode.
17403 (getpkt): Don't send ack/nac in noack mode.
17404 * server.c (handle_general_set): Handle QStartNoAckMode.
17405 (handle_query): If connected by tcp pass QStartNoAckMode+ in
17406 qSupported.
17407 (main): Reset noack_mode on every connection.
17408 * server.h (noack_mode): Declare.
17409
17410 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
17411
17412 * Makefile.in (GDBREPLAY_OBS): New variable.
17413 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
17414
17415 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
17416 Daniel Jacobowitz <dan@codesourcery.com>
17417
17418 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
17419 (usr_store_inferior_registers): Likewise.
17420 (regsets_store_inferior_registers): Likewise.
17421
17422 2008-07-31 Rolf Jansen <rj@surtec.com>
17423 Pedro Alves <pedro@codesourcery.com>
17424
17425 * configure.ac: Check for memmem declaration.
17426 * server.c [HAVE_MALLOC_H]: Include malloc.h.
17427 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
17428 (disable_packet_qfThreadInfo): Unconditionally compile.
17429 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
17430 * configure, config.in: Regenerate.
17431
17432 2008-07-28 Doug Kwan <dougkwan@google.com>
17433
17434 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
17435 (linux_write_memory): Remove declaration of errno.
17436
17437 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
17438
17439 * linux-low.c (handle_extended_wait): Do not use "status"
17440 variable uninitialized.
17441
17442 2008-07-07 Pedro Alves <pedro@codesourcery.com>
17443
17444 * server.c (handle_v_attach): Inhibit reporting dll changes.
17445
17446 2008-06-27 Pedro Alves <pedro@codesourcery.com>
17447
17448 * remote-utils.c (prepare_resume_reply): If requested, don't
17449 output "thread:TID" in the T stop reply.
17450
17451 * server.c (disable_packet_vCont, disable_packet_Tthread)
17452 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
17453 (handle_query): If requested, disable support for qC, qfThreadInfo
17454 and qsThreadInfo.
17455 (handle_v_requests): If requested, disable support for vCont.
17456 (gdbserver_show_disableable): New.
17457 (main): Handle --disable-packet and --disable-packet=LIST.
17458
17459 * server.h (disable_packet_vCont, disable_packet_Tthread)
17460 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
17461
17462 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
17463
17464 * server.c (gdbserver_usage): Mention --version.
17465
17466 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
17467
17468 * Makefile.in (gdbreplay.o): New rule.
17469
17470 2008-06-06 Joseph Myers <joseph@codesourcery.com>
17471
17472 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
17473 message, not gdbserver.
17474
17475 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
17476 Nathan Sidwell <nathan@codesourcery.com>
17477 Joseph Myers <joseph@codesourcery.com>
17478
17479 * acinclude.m4: Include ../../config/acx.m4.
17480 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
17481 * configure, config.in: Regenerate.
17482 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
17483 * server.c (gdbserver_version): Print PKGVERSION.
17484 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
17485 (main): Adjust gdbserver_usage calls.
17486 * gdbreplay.c (version, host_name): Add declarations.
17487 (gdbreplay_version, gdbreplay_usage): New.
17488 (main): Accept --version and --help options.
17489
17490 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
17491
17492 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
17493 (arm_breakpoint_at): Handle Thumb.
17494 (the_low_target): Add comment.
17495
17496 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
17497
17498 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
17499
17500 2008-05-09 Doug Evans <dje@google.com>
17501
17502 * server.h (decode_search_memory_packet): Declare.
17503 * remote-utils.c (decode_search_memory_packet): New fn.
17504 * server.c (handle_search_memory_1): New fn.
17505 (handle_search_memory): New fn.
17506 (handle_query): Process qSearch:memory packets.
17507
17508 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
17509
17510 * regcache.c (registers_length): Remove.
17511 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
17512 full register packet.
17513 * regcache.h (registers_length): Remove prototype.
17514 * server.h (PBUFSIZ): Define to 16384.
17515
17516 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
17517
17518 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
17519 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
17520 powerpc-64l.o, and powerpc-altivec64l.o.
17521 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
17522 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
17523 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
17524 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
17525 rs6000/power-linux.xml, and rs6000/power64-linux.xml
17526 to srv_xmlfiles.
17527
17528 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
17529 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
17530 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
17531 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
17532 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
17533 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
17534 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
17535 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
17536 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
17537 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
17538 (clean): Update.
17539
17540 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
17541 (init_registers_powerpc_32l): ... this new prototype.
17542 (init_registers_powerpc_32): Remove, replace by ...
17543 (init_registers_powerpc_altivec32l): ... this new prototype.
17544 (init_registers_powerpc_e500): Remove, replace by ...
17545 (init_registers_powerpc_e500l): ... this new prototype.
17546 (init_registers_ppc64): Remove, replace by ...
17547 (init_registers_powerpc_64l): ... this new prototype.
17548 (init_registers_powerpc_64): Remove, replace by ...
17549 (init_registers_powerpc_altivec64l): ... this new prototype.
17550 (ppc_num_regs): Set to 73.
17551 (PT_ORIG_R3, PT_TRAP): Define if necessary.
17552 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
17553 (ppc_cannot_store_register): Handle orig_r3 and trap.
17554 (ppc_arch_setup): Update init_registers_... calls.
17555 (ppc_fill_gregset): Handle orig_r3 and trap.
17556
17557 * inferiors.c (clear_inferiors): Reset current_inferior.
17558
17559 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
17560
17561 * acinclude.m4: Add override.m4.
17562 * configure: Regenerate.
17563
17564 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
17565
17566 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
17567 initial call to init_register_ppc64.
17568
17569 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
17570
17571 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
17572 single powerpc*-*-linux* case.
17573 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
17574
17575 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
17576
17577 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
17578 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
17579 from reg_xmlfiles.
17580 * linux-ppc-low.c: Include <elf.h>.
17581 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
17582 (ppc_hwcap): New global variable.
17583 (ppc_regmap): Remove __SPE__ #ifdef sections.
17584 (ppc_regmap_e500): New global variable.
17585 (ppc_cannot_store_register): Update __SPE__ special case.
17586 (ppc_get_hwcap): New function.
17587 (ppc_arch_setup): Use it to determine whether inferior supports
17588 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
17589 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
17590 Do not access registers if target does not support AltiVec.
17591 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
17592 Do not access registers if target does not support SPE.
17593 (target_regsets): Unconditionally include AltiVec and SPE regsets.
17594
17595 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
17596
17597 * linux-low.c (disabled_regsets, num_regsets): New.
17598 (use_regsets_p): Delete.
17599 (linux_wait_for_process): Clear disabled_regsets.
17600 (regsets_fetch_inferior_registers): Check and set it.
17601 (regsets_store_inferior_registers): Likewise.
17602 (linux_fetch_registers, linux_store_registers): Do not use
17603 use_regsets_p.
17604 (initialize_low): Allocate disabled_regsets.
17605
17606 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
17607
17608 * Makefile.in (LIBOBJS): New.
17609 (OBS): Use LIBOBJS.
17610 (memmem.o): New rule.
17611 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
17612 * configure: Regenerated.
17613
17614 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
17615
17616 * server.c (handle_query): Never return "unsupported" for
17617 qXfer:features:read queries.
17618
17619 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
17620
17621 * server.c (get_features_xml): Fix inverted condition.
17622 (handle_query): Always support qXfer:feature:read.
17623
17624 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
17625
17626 * server.c (wrapper_argv): New.
17627 (start_inferior): Handle wrapper_argv. If set, expect an extra
17628 trap.
17629 (gdbserver_usage): Document --wrapper.
17630 (main): Parse --wrapper.
17631
17632 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17633
17634 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
17635 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
17636 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
17637 (ppc_set_pc): Likewise.
17638 (ppc_arch_setup): New function.
17639 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
17640 of collect_register.
17641 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
17642
17643 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17644
17645 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
17646 instead of linux-ppc64-low.o.
17647 * linux-ppc64-low.c: Remove file.
17648 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
17649 (linux-ppc64-low.o): Remove rule.
17650
17651 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
17652 (init_registers_powerpc_64): Likewise.
17653 (ppc_regmap): Conditionally define depending on __powerpc64__.
17654 (ppc_cannot_store_register): Do not special-case "fpscr" when
17655 compiled on __powerpc64__.
17656 (ppc_collect_ptrace_register): New function.
17657 (ppc_supply_ptrace_register): New function.
17658 (ppc_breakpoint): Change type to "unsigned int".
17659 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
17660 (the_low_target): Conditionally provide initializers for the
17661 arch_setup member depending on __powerpc64__. Install
17662 collect_ptrace_register and supply_ptrace_register members.
17663
17664 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17665
17666 * regcache.h (gdbserver_xmltarget): Add extern declaration.
17667 * server.c (gdbserver_xmltarget): Define.
17668 (get_features_xml): Use it to replace "target.xml" and arch_string.
17669
17670 * configure.srv: Remove srv_xmltarget. Add XML files that were
17671 mentioned there to srv_xmlfiles instead. Remove conditional tests
17672 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
17673 srv_xmlfiles and srv_regobj to include all possible choices.
17674 * configure.ac (srv_xmltarget): Remove.
17675 (srv_xmlfiles): Do not add "target.xml".
17676 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
17677 checks for supplementary target information.
17678 * configure: Regenerate.
17679 * Makefile.in (XML_TARGET): Remove.
17680 (target.xml): Remove rule.
17681 (clean): Do not clean up target.xml.
17682 (.PRECIOUS): Do not mention target.xml.
17683
17684 * target.h (struct target_ops): Remove arch_string member.
17685 * linux-low.c (linux_arch_string): Remove.
17686 (linux_target_ops): Remove arch_string initializer.
17687 * linux-low.h (struct linux_target_ops): Remove arch_string member.
17688 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
17689 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
17690 * spu-low.c (spu_arch_string): Remove.
17691 (spu_target_ops): Remove arch_string initializer.
17692 * win32-low.c (win32_arch_string): Remove.
17693 (win32_target_ops): Remove arch_string initializer.
17694 * win32-low.h (struct win32_target_ops): Remove arch_string member.
17695 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
17696 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
17697
17698 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17699
17700 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
17701 by collect_ptrace_register and supply_ptrace_register hooks.
17702 * linux-low.c (fetch_register): Use supply_ptrace_register callback
17703 instead of checking for the_low_target.left_pad_xfer.
17704 (usr_store_inferior_registers): Use collect_ptrace_register callback
17705 instead of checking for the_low_target.left_pad_xfer.
17706
17707 * linux-s390-low.c (s390_collect_ptrace_register): New function.
17708 (s390_supply_ptrace_register): Likewise.
17709 (s390_fill_gregset): Call s390_collect_ptrace_register.
17710 (the_low_target): Update.
17711
17712 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
17713 (ppc_supply_ptrace_register): Likewise.
17714 (the_low_target): Update.
17715
17716 * linux-i386-low.c (the_low_target): Update.
17717 * linux-x86-64-low.c (the_low_target): Update.
17718
17719 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17720
17721 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
17722 reg-s390.o and reg-s390x.o.
17723
17724 * linux-low.c (new_inferior): New global variable.
17725 (linux_create_inferior, linux_attach): Set it.
17726 (linux_wait_for_process): Call the_low_target.arch_setup after the
17727 target has stopped for the first time.
17728 (initialize_low): Do not call the_low_target.arch_setup.
17729
17730 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
17731 (s390_set_pc): Likewise.
17732 (s390_arch_setup): New function.
17733 (the_low_target): Use s390_arch_setup as arch_setup routine.
17734
17735 * regcache.c (realloc_register_cache): New function.
17736 (set_register_cache): Call it for each existing regcache.
17737
17738 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17739
17740 * server.h (init_registers): Remove prototype.
17741
17742 * linux-low.h (struct linux_target_ops): Add arch_setup field.
17743 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
17744 instead of init_registers ().
17745 * linux-arm-low.c (init_registers_arm): Add prototype.
17746 (init_registers_arm_with_iwmmxt): Likewise.
17747 (the_low_target): Add initializer for arch_setup field.
17748 * linux-cris-low.c (init_registers_cris): Add prototype.
17749 (the_low_target): Add initializer for arch_setup field.
17750 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
17751 (the_low_target): Add initializer for arch_setup field.
17752 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
17753 (the_low_target): Add initializer for arch_setup field.
17754 * linux-ia64-low.c (init_registers_ia64): Add prototype.
17755 (the_low_target): Add initializer for arch_setup field.
17756 * linux-m32r-low.c (init_registers_m32r): Add prototype.
17757 (the_low_target): Add initializer for arch_setup field.
17758 * linux-m68k-low.c (init_registers_m68k): Add prototype.
17759 (the_low_target): Add initializer for arch_setup field.
17760 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
17761 (init_registers_mips64_linux): Likewise.
17762 (the_low_target): Add initializer for arch_setup field.
17763 * linux-ppc-low.c (init_registers_ppc): Add prototype.
17764 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
17765 (the_low_target): Add initializer for arch_setup field.
17766 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
17767 (init_registers_powerpc_64): Likewise.
17768 (the_low_target): Add initializer for arch_setup field.
17769 * linux-s390-low.c (init_registers_s390): Add prototype.
17770 (init_registers_s390x): Likewise.
17771 (the_low_target): Add initializer for arch_setup field.
17772 * linux-sh-low.c (init_registers_sh): Add prototype.
17773 (the_low_target): Add initializer for arch_setup field.
17774 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
17775 (the_low_target): Add initializer for arch_setup field.
17776 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
17777 (the_low_target): Add initializer for arch_setup field.
17778
17779 * win32-low.h (struct win32_target_ops): Add arch_setup field.
17780 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
17781 instead of init_registers ().
17782 * win32-arm-low.c (init_registers_arm): Add prototype.
17783 (the_low_target): Add initializer for arch_setup field.
17784 * win32-i386-low.c (init_registers_i386): Add prototype.
17785 (the_low_target): Add initializer for arch_setup field.
17786
17787 * spu-low.c (init_registers_spu): Add prototype.
17788 (initialize_low): Call initialie_registers_spu () instead of
17789 initialize_registers ().
17790
17791 2008-02-19 Pedro Alves <pedro@codesourcery.com>
17792
17793 * server.c (handle_v_requests): When handling the vRun and vAttach
17794 packets, if already debugging a process, don't kill it. Return an
17795 error instead.
17796
17797 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
17798
17799 * server.c (handle_query): Correct length check.
17800
17801 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
17802
17803 * win32-low.c (do_initial_child_stuff): Add process handle
17804 parameter. Set current_process_handle and current_process_id from the
17805 parameters. Clear globals.
17806 (win32_create_inferior): Don't set current_process_handle and
17807 current_process_id here. Instead pass them on the call to
17808 do_initial_child_stuff.
17809 (win32_attach): Likewise.
17810 (win32_clear_inferiors): New.
17811 (win32_kill): Don't close the current process handle or the
17812 current thread handle here. Instead call win32_clear_inferiors.
17813 (win32_detach): Don't open a new handle to the process. Call
17814 win32_clear_inferiors.
17815 (win32_join): Don't rely on current_process_handle; open a new
17816 handle using the process id.
17817 (win32_wait): Call win32_clear_inferiors when the inferior process
17818 has exited.
17819
17820 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
17821
17822 * server.c (monitor_show_help): Add "exit".
17823
17824 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
17825
17826 * Makefile.in (SFILES): Add linux-xtensa-low.c.
17827 (clean): Add reg-xtensa.c.
17828 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
17829 * configure.srv (xtensa*-*-linux*) New target.
17830 * linux-xtensa-low.c: New.
17831 * xtensa-xtregs.c: New.
17832
17833 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
17834
17835 * hostio.c: Don't include errno.h.
17836 (errno_to_fileio_errno): Move to hostio-errno.
17837 * hostio.c: (hostio_error): Remove the error parameter. Defer the
17838 error number outputting to the target->hostio_last_error callback.
17839 (hostio_packet_error): Use FILEIO_EINVAL directly.
17840 (handle_open, handle_pread, hostio_error, handle_unlink): Update
17841 calls to hostio_error.
17842 * hostio-errno.c: New.
17843 * server.h (hostio_last_error_from_errno): Declare.
17844 * target.h (target_ops): Add hostio_last_error member.
17845 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
17846 as hostio_last_error handler.
17847 * spu-low.c (spu_target_ops): Likewise.
17848 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
17849 (wince_hostio_last_error): New functions.
17850 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
17851 as hostio_last_error handler.
17852 (win32_target_ops) [!_WIN32_WCE]: Register
17853 hostio_last_error_from_errno as hostio_last_error handler.
17854 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
17855 (hostio-errno.o): New rule.
17856 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
17857 * configure.srv (srv_hostio_err_objs): New variable. Default to
17858 hostio-errno.o.
17859 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
17860 * configure: Regenerate.
17861
17862 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17863
17864 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
17865 (linux_kill, linux_detach): Clean up the process list.
17866 * remote-utils.c (remote_open): Improve port number parsing.
17867 (putpkt_binary, input_interrupt): Only send interrupts if the target
17868 is running.
17869 * server.c (extended_protocol): Make static.
17870 (attached): Define earlier.
17871 (exit_requested, response_needed, program_argv): New variables.
17872 (target_running): New.
17873 (start_inferior): Clear attached here.
17874 (attach_inferior): Set attached here.
17875 (require_running): Define.
17876 (handle_query): Use require_running and target_running. Implement
17877 "monitor exit".
17878 (handle_v_attach, handle_v_run): New.
17879 (handle_v_requests): Use require_running. Handle vAttach and vRun.
17880 (gdbserver_usage): Update.
17881 (main): Redo argument parsing. Handle --debug and --multi. Handle
17882 --attach along with other options or after the port. Save
17883 program_argv. Support no initial program. Resynchronize
17884 communication with GDB after an error. Handle "monitor exit".
17885 Use require_running and target_running. Always allow the extended
17886 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
17887 restart in extended mode.
17888 * README: Refer to the GDB manual. Update --attach usage.
17889
17890 2007-12-20 Andreas Schwab <schwab@suse.de>
17891
17892 * linux-low.c (STACK_SIZE): Define.
17893 (linux_tracefork_child): Use it. Use __clone2 on ia64.
17894 (linux_test_for_tracefork): Likewise.
17895
17896 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
17897
17898 * linux-low.c (linux_wait_for_event): Update messages. Do not
17899 reinsert auto-delete breakpoints.
17900 * mem-break.c (struct breakpoint): Change return type of handler to
17901 int.
17902 (set_breakpoint_at): Update handler type.
17903 (reinsert_breakpoint_handler): Return 1 instead of calling
17904 delete_breakpoint.
17905 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
17906 setting a new one.
17907 (check_breakpoints): Delete auto-delete breakpoints and return 2.
17908 * mem-break.h (set_breakpoint_at): Update handler type.
17909 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
17910 * win32-low.c (auto_delete_breakpoint): New.
17911 (get_child_debug_event): Use it.
17912
17913 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
17914
17915 * configure.ac: Check for pread and pwrite.
17916 * hostio.c (handle_pread): Fall back to lseek and read.
17917 (handle_pwrite): Fall back to lseek and write.
17918 * config.in, configure: Regenerated.
17919
17920 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
17921
17922 * server.c (myresume): Add own_buf argument.
17923 (main): Update calls.
17924
17925 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
17926
17927 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
17928 * remote-utils.c (remote_open): Do not call disable_async_io.
17929 (block_async_io): Delete.
17930 (unblock_async_io): Make static.
17931 (initialize_async_io): New.
17932 * server.c (handle_v_cont): Handle async I/O here.
17933 (myresume): Likewise. Move other common resume tasks here...
17934 (main): ... from here. Call initialize_async_io. Disable async
17935 I/O before the main loop.
17936 * server.h (initialize_async_io): Declare.
17937 (block_async_io, unblock_async_io): Delete prototypes.
17938 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
17939
17940 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
17941
17942 * remote-utils.c (readchar): Allow binary data in received messages.
17943
17944 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17945
17946 * win32-low.c (attaching): New global.
17947 (win32_create_inferior): Clear the `attaching' global.
17948 (win32_attach): Set the `attaching' global.
17949 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
17950 attaching. Only set a breakpoint at the entry point if not
17951 attaching.
17952
17953 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17954
17955 * server.c (main): Don't report dll events on the initial
17956 connection on attaches.
17957
17958 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17959
17960 * server.c (main): Relax numerical bases supported for the pid of
17961 the --attach command line argument.
17962
17963 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17964
17965 * win32-low.c (win32_attach): Call OpenProcess before
17966 DebugActiveProcess, not after. Add last error output to error
17967 call.
17968
17969 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
17970
17971 * win32-low.c (win32_get_thread_context)
17972 (win32_set_thread_context): New functions.
17973 (thread_rec): Use win32_get_thread_context.
17974 (continue_one_thread, win32_resume): Use win32_set_thread_context.
17975 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
17976 field.
17977
17978 2007-12-03 Leo Zayas
17979 Pedro Alves <pedro_alves@portugalmail.pt>
17980
17981 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
17982 global variables.
17983 (child_add_thread): Minor cleanup.
17984 (child_continue): Resume artificially suspended threads before
17985 calling ContinueDebugEvent.
17986 (suspend_one_thread): New.
17987 (fake_breakpoint_event): New.
17988 (get_child_debug_event): Change return type to int. Check here if
17989 gdb sent an interrupt request. If a soft interrupt was requested,
17990 fake a breakpoint event. Return 0 if there is no event to handle,
17991 and 1 otherwise.
17992 (win32_wait): Don't check here if gdb sent an interrupt request.
17993 Ensure there is a valid event to handle.
17994 (win32_request_interrupt): Add soft interruption method as last
17995 resort.
17996
17997 2007-12-03 Leo Zayas
17998 Pedro Alves <pedro_alves@portugalmail.pt>
17999
18000 * win32-low.h (win32_thread_info): Add descriptions to the
18001 structure members. Replace `suspend_count' counter by a
18002 `suspended' flag.
18003 * win32-low.c (thread_rec): Update condition of when to get the
18004 context from the inferior. Rely on ContextFlags being set if it
18005 has already been retrieved. Only suspend the inferior thread if
18006 we haven't already. Warn if that fails.
18007 (continue_one_thread): s/suspend_count/suspended/. Only call
18008 ResumeThread once. Warn if that fails.
18009
18010 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
18011
18012 * win32-low.c (win32_wait): Don't read from the inferior when it
18013 has already exited.
18014
18015 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
18016
18017 * Makefile.in (win32_low_h): New variable.
18018 (win32-low.o): Add dependency on $(win32_low_h).
18019 (win32-arm-low.o, win32-i386-low.o): New rules.
18020
18021 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
18022
18023 * hostio.c: Correct copyright year.
18024
18025 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
18026
18027 * Makefile.in (OBS): Add hostio.o.
18028 (hostio.o): New rule.
18029 * server.h (handle_vFile): Declare.
18030 * hostio.c: New file.
18031 * server.c (handle_v_requests): Take packet_len and new_packet_len
18032 for binary packets. Call handle_vFile.
18033 (main): Update call to handle_v_requests.
18034
18035 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
18036
18037 * linux-low.c: Include <sched.h>.
18038
18039 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
18040
18041 * linux-low.c (linux_tracefork_grandchild): New.
18042 (linux_tracefork_child): Use clone.
18043 (linux_test_for_tracefork): Use clone; allocate and free a stack.
18044
18045 2007-10-31 Joel Brobecker <brobecker@adacore.com>
18046
18047 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
18048
18049 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
18050
18051 * linux-low.c (handle_extended_wait): Handle unexpected signals.
18052
18053 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
18054
18055 * inferiors.c (change_inferior_id): Delete.
18056 (add_pid_to_list, pull_pid_from_list): New.
18057 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
18058 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
18059 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
18060 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
18061 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
18062 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
18063 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
18064 (using_threads): Always set to 1.
18065 (handle_extended_wait): New.
18066 (add_process): Do not set TID.
18067 (linux_create_inferior): Set must_set_ptrace_flags.
18068 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
18069 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
18070 (linux_thread_alive): Rename TID argument to LWPID.
18071 (linux_wait_for_process): Handle unknown processes. Do not use TID.
18072 (linux_wait_for_event): Do not use TID or check using_threads. Update
18073 call to dead_thread_notify. Call handle_extended_wait.
18074 (linux_create_inferior): Use PTRACE_SETOPTIONS.
18075 (send_sigstop): Delete sigstop_sent.
18076 (wait_for_sigstop): Avoid TID.
18077 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
18078 (linux_test_for_tracefork): New.
18079 (linux_lookup_signals): Use thread_db_active and
18080 linux_supports_tracefork_flag.
18081 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
18082 * linux-low.h (get_process_thread): Avoid TID.
18083 (struct process_ifo): Move thread_known and tid to the end. Remove
18084 sigstop_sent.
18085 (linux_attach_lwp, thread_db_init): Update prototypes.
18086 * server.h (change_inferior_id): Delete prototype.
18087 (add_pid_to_list, pull_pid_from_list): New prototypes.
18088 * thread-db.c (thread_db_use_events): New.
18089 (find_first_thread): Rename to...
18090 (find_one_thread): ...this. Update callers and messages. Do not
18091 call fatal. Check thread_db_use_events. Do not call
18092 change_inferior_id or new_thread_notify.
18093 (maybe_attach_thread): Update. Do not call new_thread_notify.
18094 (thread_db_init): Set thread_db_use_events. Check use_events.
18095 * utils.c (fatal, warning): Correct message prefix.
18096
18097 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
18098
18099 * Makefile.in (clean): Remove new files.
18100 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
18101 (powerpc-64.o, powerpc-64.c): New rules.
18102 * configure.srv: Use alternate register sets for powerpc64-*-linux*
18103 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
18104 with SPE.
18105 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
18106 SPE targets.
18107 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
18108 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
18109 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
18110 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
18111 (target_regsets): Add AltiVec and SPE register sets.
18112 * configure.ac: Check for AltiVec and SPE.
18113 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
18114 (ppc_fill_vrregset, ppc_store_vrregset): New.
18115 (target_regsets): Add AltiVec register set.
18116 * configure: Regenerated.
18117
18118 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
18119
18120 * linux-low.c (O_LARGEFILE): Define.
18121 (linux_read_memory): Use /proc/PID/mem.
18122 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
18123 * configure, config.in: Regenerated.
18124
18125 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
18126
18127 * linux-low.c (linux_wait_for_event): Do not pass signals while
18128 single-stepping.
18129
18130 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
18131
18132 * win32-low.c (create_process): New.
18133 (win32_create_inferior): Use create_process instead of
18134 CreateProcess. If create_process failed retry appending an ".exe"
18135 suffix. Store the GetLastError result immediatelly after
18136 create_process calls and use it on the call to error.
18137
18138 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
18139
18140 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
18141
18142 2007-08-23 Joel Brobecker <brobecker@adacore.com>
18143
18144 * configure.ac: Switch license to GPLv3.
18145
18146 2007-08-01 Michael Snyder <msnyder@access-company.com>
18147
18148 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
18149
18150 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
18151
18152 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
18153 typedef.
18154 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
18155 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
18156 CloseToolhelp32Snapshot.
18157 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
18158 CloseToolhelp32Snapshot.
18159
18160 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
18161
18162 * server.c (main): Check for inferior exit before main loop.
18163
18164 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
18165
18166 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
18167 instead of on tmp_desc.
18168
18169 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
18170 Daniel Jacobowitz <dan@codesourcery.com>
18171
18172 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
18173 (add_thread): Minor cleanups.
18174 (clear_inferiors): Move lower in the file. Clear the DLL
18175 list.
18176 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
18177 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
18178 (xml_escape_text): New.
18179 * server.c (handle_query): Handle qXfer:libraries:read. Report it
18180 for qSupported.
18181 (handle_v_cont): Report errors.
18182 (gdbserver_version): Update.
18183 (main): Correct size of own_buf. Do not report initial DLL events.
18184 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
18185 (unloaded_dll, xml_escape_text): New.
18186 * win32-low.c (enum target_waitkind): Update comments.
18187 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
18188 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
18189 (win32_EnumProcessModules, win32_GetModuleInformation)
18190 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
18191 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
18192 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
18193 (win32_Module32First, win32_Module32Next, load_toolhelp)
18194 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
18195 (get_child_debug_event): Handle DLL events.
18196 (win32_wait): Likewise.
18197
18198 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
18199
18200 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
18201 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
18202
18203 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
18204
18205 * win32-low.c (handle_output_debug_string): Ignore event if not
18206 waiting.
18207
18208 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
18209
18210 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
18211
18212 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
18213
18214 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
18215
18216 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
18217
18218 * inferiors.c (change_inferior_id): Add comment.
18219 * linux-low.c (check_removed_breakpoint): Add an early
18220 prototype. Improve debug output.
18221 (linux_attach): Doc update.
18222 (linux_detach_one_process, linux_detach): Clean up before releasing
18223 each process.
18224 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
18225 * linux-low.h (struct process_info): Doc improvement.
18226 * mem-break.c (delete_all_breakpoints): New.
18227 * mem-break.h (delete_all_breakpoints): New prototype.
18228 * thread-db.c (find_first_thread): New.
18229 (thread_db_create_event): Call it instead of
18230 thread_db_find_new_threads. Clean up unused variables.
18231 (maybe_attach_thread): Remove first thread handling.
18232 (thread_db_find_new_threads): Use find_first_thread.
18233 (thread_db_get_tls_address): Likewise.
18234
18235 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
18236
18237 * thread-db.c (thread_db_find_new_threads): Add prototype.
18238 (thread_db_create_event): Check for the main thread before adding
18239 a new thread.
18240 (maybe_attach_thread): Only enable event reporting if TID == 0.
18241 (thread_db_get_tls_address): Check for new threads.
18242
18243 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
18244
18245 * linux-low.c (linux_create_inferior): Try execv before execvp.
18246 * spu-low.c (spu_create_inferior): Likewise.
18247
18248 2007-06-13 Mike Frysinger <vapier@gentoo.org>
18249
18250 * linux-low.c (linux_create_inferior): Change execv to execvp.
18251 * spu-low.c (spu_create_inferior): Likewies.
18252
18253 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
18254
18255 * Makefile.in (clean): Clean new files instead of deleted ones.
18256 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
18257 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
18258 rules.
18259 * configure.srv: Specify XML files and new regformats for MIPS and
18260 MIPS64 GNU/Linux.
18261 * linux-mips-low.c (mips_num_regs): Set to only used registers.
18262 (mips_regmap): Do not fetch $0. Remove unused registers. Add
18263 an entry for the restart register.
18264 (mips_cannot_fetch_register, mips_cannot_store_register)
18265 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
18266 register names to match the XML descriptions.
18267 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
18268 restart register instead of $0.
18269
18270 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
18271 Markus Deuling <deuling@de.ibm.com>
18272
18273 * remote-utils.c (decode_xfer_write): New function.
18274 * server.h (decode_xfer_write): Add prototype.
18275 * server.c (handle_query): Add PACKET_LEN argument. Support
18276 qXfer:spu:read and qXfer:spu:write packets.
18277 (main): Pass packet_len to handle_query.
18278 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
18279 * target.h (target_ops): Add qxfer_spu.
18280
18281 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
18282
18283 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
18284 accessing non-seekable spufs files.
18285
18286 2007-05-16 Markus Deuling <deuling@de.ibm.com>
18287
18288 * server.c (handle_query): Add reply for qC packet.
18289
18290 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18291 Leo Zayas <lerele@champenstudios@com>
18292
18293 * server.h (check_remote_input_interrupt_request): New function.
18294 * remote_utils.c (INVALID_DESCRIPTOR): New define.
18295 (remote_desc): Initialize with INVALID_DESCRIPTOR.
18296 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
18297 (check_remote_input_interrupt_request): New function.
18298 * server.h (check_remote_input_interrupt_request): Declare.
18299 * win32-low.c (winapi_DebugBreakProcess,
18300 winapi_GenerateConsoleCtrlEvent): New typedefs.
18301 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
18302 to 250 ms.
18303 (win32_wait): Check for remote interrupt request
18304 with check_remote_input_interrupt_request.
18305 (win32_request_interrupt): New function.
18306 (win32_target_op): Set request_interrupt to win32_request_interrupt.
18307
18308 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18309
18310 * win32-low.c (debug_registers_changed,
18311 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
18312 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
18313 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
18314 (thread_rec): Get context using the low target.
18315 (child_add_thread): Call thread_added on the low target,
18316 which does the same thing.
18317 (regptr): Delete.
18318 (do_initial_child_stuff): Remove debug registers references.
18319 Set context using the low target. Resume threads after
18320 setting the contexts.
18321 (child_continue): Remove dead variable. Remove debug
18322 registers references.
18323 (child_fetch_inferior_registers): Go through the low target.
18324 (do_child_store_inferior_registers): Remove.
18325 (child_store_inferior_registers): Go through the low target.
18326 (win32_resume): Remove debug registers references.
18327 Set context using the low target.
18328 (handle_exception): Change return type to void. Don't record
18329 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
18330 first chance exception.
18331 (get_child_debug_event): Change return type to void. Remove
18332 goto loop. Always return after waiting for debug event.
18333 (win32_wait): Convert to switch statement. Handle spurious
18334 events.
18335
18336 * win32-i386-low.c (debug_registers_changed,
18337 debug_registers_used): New.
18338 (initial_stuff): Rename to ...
18339 (i386_initial_stuff): ... this. Clear debug registers
18340 state variables.
18341 (store_debug_registers): Delete.
18342 (i386_get_thread_context): New.
18343 (load_debug_registers): Delete.
18344 (i386_set_thread_context): New.
18345 (i386_thread_added): New.
18346 (single_step): Rename to ...
18347 (i386_single_step): ... this.
18348 (do_fetch_inferior_registers): Rename to ...
18349 (i386_fetch_inferior_register): ... this.
18350 (i386_store_inferior_register): New.
18351 (the_low_target): Adapt to new interface.
18352
18353 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
18354 (arm_get_thread_context): New.
18355 (arm_set_thread_context): New.
18356 (regptr): New.
18357 (do_fetch_inferior_registers): Rename to ...
18358 (arm_fetch_inferior_register): ... this.
18359 (arm_store_inferior_register): New.
18360 (arm_wince_breakpoint): Reimplement as unsigned long.
18361 (arm_wince_breakpoint_len): Define.
18362 (the_low_target): Adapt to new interface.
18363
18364 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
18365 load_debug_registers. Add get_thread_context, set_thread_context,
18366 thread_added and store_inferior_register. Rename
18367 fetch_inferior_registers to fetch_inferior_register.
18368 (regptr): Remove declaration.
18369
18370 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18371
18372 * linux-low.c (linux_detach): Change return type to int. Return 0.
18373 * spu-low.c (spu_detach): Likewise.
18374
18375 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18376
18377 * target.h (target_ops): Change return type of detach to int.
18378 Add join.
18379 (join_inferior): New.
18380 * server.c (main): Don't skip detach support on mingw32.
18381 If the inferior doesn't support detaching return error.
18382 Call join_inferior instead of using waitpid.
18383 * linux-low.c (linux_join): New.
18384 (linux_target_op): Add linux_join.
18385 * spu-low.c (spu_join): New.
18386 (spu_target_ops): Add spu_join.
18387 * win32-low.c (win32_detach): Adapt to new interface.
18388 Reopen current_process_handle before detaching. Issue a child
18389 resume before detaching.
18390 (win32_join): New.
18391 (win32_target_op): Add win32_join.
18392
18393 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18394
18395 * win32-low.c (win32-attach): Fix return value.
18396 * target.h (target_ops): Describe ATTACH return values.
18397
18398 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18399
18400 * win32-low.c (GETPROCADDRESS): Define.
18401 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
18402 (winapi_DebugSetProcessKillOnExit): Likewise.
18403 (win32_create_inferior): Force usage of ansi CreateProcessA.
18404 (win32_attach): Use GETPROCADDRESS.
18405 (win32_detach): Likewise.
18406
18407 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18408
18409 * win32-low.c (win32_wait): Don't use WSTOPSIG.
18410
18411 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
18412
18413 * win32-low.c: Commit leftover changes from 2007-03-29.
18414
18415 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
18416
18417 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
18418 fields short instead of int. Add explicit padding.
18419 (i387_cache_to_fsave): Remove unnecessary casts.
18420 (i387_fsave_to_cache): Doc fix.
18421 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
18422
18423 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
18424
18425 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
18426 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
18427
18428 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
18429
18430 * configure.srv (arm*-*-mingw32ce*): Move near the other
18431 arm targets.
18432
18433 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
18434
18435 * configure.ac: Add errno checking.
18436 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
18437 sys/file.h and malloc.h.
18438 (AC_CHECK_DECLS): Add perror.
18439 (srv_mingwce): Handle.
18440 * configure.srv (i[34567]86-*-cygwin*): Add
18441 win32-i386-low.o to srv_tgtobj.
18442 (i[34567]86-*-mingw*): Likewise.
18443 (arm*-*-mingw32ce*): Add case.
18444 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
18445 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
18446 [__MINGW32CE__] (strerror): New function.
18447 [__MINGW32CE__] (errno): Define to GetLastError.
18448 [__MINGW32CE__] (COUNTOF): New macro.
18449 (remote_open): Remove extra close call.
18450 * mem-break.c (delete_breakpoint_at): New function.
18451 * mem-break.h (delete_breakpoint_at): Declare.
18452 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
18453 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
18454 [USE_WIN32API] (read, write): Add char* casts.
18455 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
18456 * server.h: Include wincecompat.h on Windows CE.
18457 [HAVE_ERRNO_H]: Check.
18458 (perror): Declare if not declared.
18459 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
18460 (perror_with_name): Remove errno declaration.
18461 * wincecompat.h: New.
18462 * wincecompat.c: New.
18463 * win32-low.h: New.
18464 * win32-arm-low.c: New.
18465 * win32-i386-low.c: New.
18466 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
18467 (OUTMSG2): Make it safe.
18468 (_T): New macro.
18469 (COUNTOF): New macro.
18470 (NUM_REGS): Get it from the low target.
18471 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
18472 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
18473 (thread_rec): Let low target handle debug registers.
18474 (child_add_thread): Likewise.
18475 (child_init_thread_list): Likewise.
18476 (continue_one_thread): Likewise.
18477 (regptr): New.
18478 (do_child_fetch_inferior_registers): Move to ...
18479 * win32-i386-low.c: ... here, and rename to ...
18480 (do_fetch_inferior_registers): ... this.
18481 * win32-low.c (child_fetch_inferior_registers):
18482 Go through the low target.
18483 (do_child_store_inferior_registers): Use regptr.
18484 (strwinerror): New function.
18485 (win32_create_inferior): Handle Windows CE.
18486 Use strwinerror instead of strerror on Windows error
18487 codes. Add program to the error output.
18488 Don't close the main thread handle on Windows CE.
18489 (win32_attach): Use coredll.dll on Windows CE.
18490 (win32_kill): Close current process and current
18491 thread handles.
18492 (win32_detach): Use coredll.dll on Windows CE.
18493 (win32_resume): Let low target handle debug registers, and
18494 step request.
18495 (handle_exception): Add/Remove initial breakpoint. Avoid
18496 non-existant WSTOPSIG on Windows CE.
18497 (win32_read_inferior_memory): Cast to remove warning.
18498 (win32_arch_string): Go through the low target.
18499 (initialize_low): Call set_breakpoint_data with the low
18500 target's breakpoint.
18501 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
18502 FOP_REGNUM, mappings): Move to ...
18503 * win32-i386-low.c: ... here.
18504 * win32-low.c (win32_thread_info): Move to ...
18505 * win32-low.h: ... here.
18506 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
18507 win32-arm-low.c and wincecompat.c.
18508 (all:): Add $EXEEXT.
18509 (install-only:): Likewise.
18510 (gdbserver:): Likewise.
18511 (gdbreplay:): Likewise.
18512 * config.in: Regenerate.
18513 * configure: Regenerate.
18514
18515 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
18516
18517 * win32-low.c: Rename typedef thread_info to
18518 win32_thread_info throughout.
18519
18520 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
18521
18522 * win32-i386-low.c: Rename to ...
18523 * win32-low.c: ... this.
18524 * configure.srv: Replace win32-i386-low.o with win32-low.o.
18525 * Makefile.in: Likewise.
18526
18527 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
18528
18529 * remote-utils.c (monitor_output): Constify msg parameter.
18530 * server.h (monitor_output): Likewise.
18531 * win32-i386-low.c (handle_output_debug_string): New.
18532 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
18533 handle_output_debug_string.
18534 (get_child_debug_event): Likewise.
18535
18536 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
18537
18538 * server.c (main): Correct strtoul check.
18539
18540 2007-03-27 Jon Ringle <jon@ringle.org>
18541
18542 * linux-low.c: Check __ARCH_HAS_MMU__ also.
18543
18544 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
18545
18546 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
18547
18548 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
18549
18550 * terminal.h: Check HAVE_SGTTY_H.
18551
18552 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
18553
18554 * remote-utils.c (remote_open): Print out the assigned port number.
18555
18556 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
18557
18558 * remote-utils.c (monitor_output): New function.
18559 * server.c (debug_threads): Define here.
18560 (monitor_show_help): New function.
18561 (handle_query): Handle qRcmd.
18562 (main): Do not handle 'd' packet.
18563 * server.h (debug_threads, remote_debug, monitor_output): Declare.
18564 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
18565 of debug_threads.
18566
18567 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18568
18569 * Makefile.in (EXEEXT): New.
18570 (clean): Use $(EXEEXT).
18571
18572 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18573
18574 * target.h (target_ops): Rename send_signal to request_interrupt,
18575 and remove enum target_signal parameter.
18576 * linux-low.c (linux_request_interrupt): Rename from
18577 linux_send_signal, and always send SIGINT.
18578 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
18579 and always send SIGINT.
18580 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
18581 of send_signal.
18582 (input_interrupt): Likewise.
18583
18584 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18585
18586 * server.c (get_features_xml): Check if target implemented
18587 arch_string.
18588 * win32-i386-low.c (win32_arch_string): New.
18589 (win32_target_ops): Add win32_arch_string as arch_string member.
18590
18591 2007-02-22 Markus Deuling <deuling@de.ibm.com>
18592
18593 * spu-low.c (spu_arch_string): New.
18594 (spu_target_ops): Add spu_arch_string.
18595
18596 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
18597
18598 * remote-utils.c: Remove HAVE_TERMINAL_H check.
18599 * configure.ac: Do not check for terminal.h.
18600 * configure, config.in: Regenerated.
18601
18602 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18603
18604 * Makefile.in (OBS): Add $(XML_BUILTIN).
18605 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
18606 (clean): Update.
18607 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
18608 (arm-with-iwmmxt.c): New.
18609 * config.in, configure: Regenerate.
18610 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
18611 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
18612 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
18613 (arm*-*-linux*): Add iWMMXt and regset support.
18614 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
18615 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
18616 (arm_store_wmmxregset, target_regsets): New.
18617 * server.c (get_features_xml): Take annex argument. Check builtin
18618 XML documents.
18619 (handle_query): Handle multiple annexes.
18620
18621 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18622
18623 * remote-utils.c [USE_WIN32API] (read, write): Define.
18624 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
18625 write.
18626
18627 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
18628
18629 * linux-i386-low.c (the_low_target): Set arch_string.
18630 * linux-x86-64-low.c (the_low_target): Likewise.
18631 * linux-low.c (linux_arch_string): New.
18632 (linux_target_ops): Add it.
18633 * linux-low.h (struct linux_target_ops): Add arch_string.
18634 * server.c (write_qxfer_response): Use const void * for DATA.
18635 (get_features_xml): New.
18636 (handle_query): Handle qXfer:features:read. Report it for qSupported.
18637 * target.h (struct target_ops): Add arch_string method.
18638
18639 2007-01-03 Denis Pilat <denis.pilat@st.com>
18640 Daniel Jacobowitz <dan@codesourcery.com>
18641
18642 * linux-low.c (linux_kill): Handle being called with no threads.
18643 * win32-i386-low.c (win32_kill): Likewise.
18644 (get_child_debug_event): Clear current_process_handle.
18645
18646 2006-12-30 Denis PILAT <denis.pilat@st.com>
18647 Daniel Jacobowitz <dan@codesourcery.com>
18648
18649 * remote-utils.c (remote_open): Check the type of specified
18650 serial port devices before opening them.
18651 * server.c (main): Kill the inferior if an error occurs during
18652 the first remote_open.
18653
18654 2006-12-05 Markus Deuling <deuling@de.ibm.com>
18655
18656 * README: Update supported targets.
18657
18658 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
18659
18660 * Makefile.in (clean): Remove reg-mips64.c.
18661 (reg-mips64.c, reg-mips64.o): New rules.
18662 * configure.srv: Handle mips64. Include regset support for mips.
18663 * linux-mips-low.c (union mips_register): New.
18664 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
18665 (mips_breakpoint, mips_breakpoint_at): Use int.
18666 (mips_collect_register, mips_supply_register)
18667 (mips_collect_register_32bit, mips_supply_register_32bit)
18668 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18669 (mips_store_fpregset, target_regsets): New.
18670 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
18671
18672 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
18673
18674 * configure.srv: Add target "spu*-*-*".
18675 * Makefile.in (clean): Remove reg-spu.c.
18676 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
18677 * spu-low.c: New file.
18678
18679 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18680
18681 * configure.ac: Correct td_thr_tls_get_addr test.
18682 * configure: Regenerated.
18683
18684 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18685
18686 * linux-low.c (linux_wait_for_event): Reformat. Use the
18687 pass_signals array.
18688 * remote-utils.c (decode_address_to_semicolon): New.
18689 * server.c (pass_signals, handle_general_set): New.
18690 (handle_query): Mention QPassSignals for qSupported.
18691 (main): Call handle_general_set.
18692 * server.h (pass_signals, decode_address_to_semicolon): New.
18693
18694 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
18695
18696 * server.c (handle_query): Correct error handling for read_auxv.
18697
18698 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
18699
18700 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
18701 and srv_linux_thread_db to yes.
18702 * linux-s390-low.c (s390_fill_gregset): New function.
18703 (target_regsets): Define data structure.
18704
18705 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
18706
18707 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
18708 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
18709 * config.in, configure: Regenerated.
18710 * inferiors.c (gdb_id_to_thread): New function.
18711 (gdb_id_to_thread_id): Use it.
18712 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
18713 * linux-low.h (struct process_info): Add th member.
18714 (thread_db_get_tls_address): New prototype.
18715 * remote-utils.c (decode_address): Make non-static.
18716 * server.c (handle_query): Handle qGetTLSAddr.
18717 * server.h (gdb_id_to_thread, decode_address): New prototypes.
18718 * target.h (struct target_ops): Add get_tls_address.
18719 * thread-db.c (maybe_attach_thread): Save the thread handle.
18720 (thread_db_get_tls_address): New.
18721
18722 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
18723
18724 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
18725 (linux_resume_one_process): Take a siginfo_t *. Update all
18726 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
18727 (struct pending_signals): Add a siginfo_t.
18728 (linux_wait_for_process): Always set last_status.
18729 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
18730 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
18731 * linux-low.h (struct process_info): Add last_status.
18732
18733 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
18734
18735 * remote-utils.c (try_rle): New function.
18736 (putpkt_binary): Use it.
18737
18738 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
18739
18740 * Makefile.in (clean): Clean reg-x86-64-linux.c.
18741 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
18742 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
18743 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
18744 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
18745 point registers.
18746
18747 2006-08-08 Richard Sandiford <richard@codesourcery.com>
18748
18749 * server.c (terminal_fd): New variable.
18750 (old_foreground_pgrp): Likewise.
18751 (restore_old_foreground_pgrp): New function.
18752 (start_inferior): Record the terminal file descriptor in terminal_fd
18753 and its original foreground group in old_foreground_pgrp. Register
18754 restore_old_foreground_pgrp with atexit().
18755
18756 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
18757
18758 * server.c (handle_query): Correct qPart to qXfer.
18759
18760 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
18761
18762 * configure.ac: Check for more headers which are missing on
18763 Windows. Automatically supply -lwsock32 and USE_WIN32API.
18764 * configure.srv: Add Cygwin and mingw32.
18765 * remote-utils.c: Don't include headers unconditionally which
18766 are missing on mingw32. Include <winsock.h> for mingw32.
18767 (remote_open): Adjust for mingw32 support. Flush
18768 standard error after writing to it.
18769 (remote_close, putpkt_binary, input_interrupt, block_async_io)
18770 (unblock_async_io, enable_async_io, disable_async_io)
18771 (readchar, getpkt): Update for Winsock support.
18772 (prepare_resume_reply): Expect a protocol signal number.
18773 * server.c: Disable <sys/wait.h> on mingw32.
18774 (start_inferior): Adjust for mingw32 support. Flush
18775 standard error after writing to it.
18776 (attach_inferior): Likewise. Use protocol signal
18777 numbers.
18778 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
18779 and names.
18780 * win32-i386-low.c: New file.
18781 * Makefile.in (XM_CLIBS): Set.
18782 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
18783 (win32-i386-low.o): New dependency rule.
18784 * linux-low.c (linux_wait): Use target signal numbers.
18785 * target.h (struct target_ops): Doc fix.
18786 * server.h (target_signal_to_name): New prototype.
18787 * gdbreplay.c: Don't include headers unconditionally which
18788 are missing on mingw32. Include <winsock.h> for mingw32.
18789 (remote_close, remote_open): Adjust for Winsock support.
18790 * configure, config.in: Regenerated.
18791
18792 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
18793
18794 * server.c (decode_xfer_read, write_qxfer_response): New.
18795 (handle_query): Take a packet length argument. Handle
18796 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
18797 the qSupported response.
18798 (main): Update call to handle_query.
18799
18800 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
18801
18802 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
18803 (putpkt_binary): Renamed from putpkt and adjusted for binary
18804 data.
18805 (putpkt): New wrapper for putpkt_binary.
18806 (readchar): Don't mask off the high bit.
18807 (decode_X_packet): New function.
18808 * server.c (main): Call putpkt_binary if a handler sets the packet
18809 length. Save the length of the incoming packet. Handle 'X'.
18810 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
18811
18812 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
18813
18814 * server.c (handle_query): Handle qSupported.
18815
18816 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18817
18818 * remote-utils.c (all_symbols_looked_up): New variable.
18819 (look_up_one_symbol): Check it.
18820 * server.h (look_up_one_symbol): New declaration.
18821 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
18822
18823 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18824
18825 * Makefile.in (linux-arm-low.o): Update dependencies.
18826 * linux-arm-low.c: Include "gdb_proc_service.h".
18827 (PTRACE_GET_THREAD_AREA): Define.
18828 (ps_get_thread_area): New function.
18829
18830 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
18831
18832 * configure.srv (m68k*-*-uclinux*): New target.
18833 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
18834 (linux_resume_one_process): Remove extraneous cast.
18835 (linux_read_offsets): New.
18836 (linux_target_op): Add linux_read_offsets on mmuless systems.
18837 * server.c (handle_query): Add qOffsets logic.
18838 * target.h (struct target_ops): Add read_offsets.
18839
18840 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18841
18842 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
18843 (PTRACE_GET_THREAD_AREA): Define.
18844 (ps_get_thread_area): New function.
18845 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
18846 (linux-x86-64-low.o): Update.
18847
18848 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18849
18850 * configure.ac: Remove checks for prfpregset_t.
18851 * gdb_proc_service.h: New file.
18852 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
18853 new "gdb_proc_service.h".
18854 * proc-service.c: Likewise.
18855 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
18856 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
18857 * Makefile.in (gdb_proc_service_h): Updated.
18858 * configure, config.in: Regenerated.
18859
18860 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18861
18862 * remote-utils.c (prepare_resume_reply): Move declaration
18863 of gdb_id_from_wait to the top of the block.
18864
18865 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
18866
18867 * linux-low.c (regsets_store_inferior_registers): Read the regset
18868 from the target before filling it.
18869
18870 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18871
18872 * server.c (attach_inferior): Return SIGTRAP for a successful
18873 attach.
18874
18875 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18876
18877 * Makefile.in (OBS): Add version.o.
18878 (STAGESTUFF): Delete.
18879 (version.o): Add dependencies.
18880 (version.c): Replace rule.
18881 (clean): Remove version.c.
18882 * server.c (gdbserver_version): New.
18883 (gdbserver_usage): Use printf.
18884 (main): Handle --version and --help.
18885 * server.h (version, host_name): Add declarations.
18886
18887 2005-12-23 Eli Zaretskii <eliz@gnu.org>
18888
18889 * linux-arm-low.c:
18890 * linux-arm-low.c:
18891 * inferiors.c:
18892 * i387-fp.h:
18893 * i387-fp.c:
18894 * gdbreplay.c:
18895 * regcache.c:
18896 * proc-service.c:
18897 * mem-break.h:
18898 * mem-break.c:
18899 * linux-x86-64-low.c:
18900 * linux-sh-low.c:
18901 * linux-s390-low.c:
18902 * linux-ppc64-low.c:
18903 * linux-ppc-low.c:
18904 * linux-mips-low.c:
18905 * linux-m68k-low.c:
18906 * linux-m32r-low.c:
18907 * linux-low.h:
18908 * linux-low.c:
18909 * linux-ia64-low.c:
18910 * linux-i386-low.c:
18911 * linux-crisv32-low.c:
18912 * thread-db.c:
18913 * terminal.h:
18914 * target.h:
18915 * target.c:
18916 * server.h:
18917 * server.c:
18918 * remote-utils.c:
18919 * regcache.h:
18920 * utils.c:
18921 * Makefile.in:
18922 * configure.ac:
18923 * gdbserver.1: Add (C) after Copyright. Update the FSF
18924 address.
18925
18926 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
18927
18928 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
18929 (arm_breakpoint_at): Recognize both breakpoints.
18930 (the_low_target): Use the correct breakpoint instruction.
18931
18932 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
18933
18934 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
18935 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
18936 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
18937 (the_low_target): Update.
18938
18939 2005-10-25 Andreas Schwab <schwab@suse.de>
18940
18941 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
18942
18943 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
18944 (ia64_num_regs): Reduce to 462.
18945
18946 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
18947
18948 * acinclude.m4: Correct quoting.
18949 * aclocal.m4: Regenerated.
18950
18951 Suggested by SZOKOVACS Robert <szo@ies.hu>:
18952 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
18953 (thread_db_init): Call thread_db_err_str.
18954 * configure.ac: Check for TD_VERSION.
18955 * config.in, configure: Regenerated.
18956
18957 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
18958
18959 * server.h (error, fatal, warning): Add ATTR_FORMAT.
18960
18961 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18962
18963 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
18964 is not available. Define HAVE_PTRACE_GETREGS if it is.
18965 * config.in, configure: Regenerated.
18966 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
18967 * linux-i386-low.c, linux-m68k-low.c: Update to use
18968 HAVE_PTRACE_GETREGS.
18969 * linux-low.c (regsets_fetch_inferior_registers)
18970 (regsets_store_inferior_registers): Only return 0 if we processed
18971 GENERAL_REGS.
18972 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
18973 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
18974
18975 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18976
18977 * inferiors.c (struct thread_info): Add gdb_id.
18978 (add_thread): Add gdb_id argument.
18979 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
18980 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
18981 calls to add_thread.
18982 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
18983 * server.c (handle_query): Use thread_to_gdb_id.
18984 (handle_v_cont, main): Use gdb_id_to_thread_id.
18985 * server.h (add_thread): Update prototype.
18986 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
18987 prototypes.
18988
18989 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
18990
18991 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
18992 left-padded registers.
18993 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
18994 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
18995
18996 2005-07-01 Steve Ellcey <sje@cup.hp.com>
18997
18998 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
18999 * configure: Regenerate.
19000 * config.in: Regenerate.
19001 * server.h (NEED_DECLARATION_STRERROR):
19002 Replace with !HAVE_DECL_STRERROR.
19003
19004 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
19005
19006 * linux-low.c (linux_wait, linux_send_signal): Don't test
19007 an unsigned long variable for > 0 if it could be MAX_ULONG.
19008 * server.c (myresume): Likewise.
19009 * target.c (set_desired_inferior): Likewise.
19010
19011 2005-06-13 Mark Kettenis <kettenis@gnu.org>
19012
19013 * configure.ac: Simplify and improve check for socklen_t.
19014 * configure, config.in: Regenerate.
19015
19016 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
19017
19018 * acconfig.h: Remove.
19019 * configure.ac: Add a test for socklen_t. Use three-argument
19020 AC_DEFINE throughout.
19021 * config.in: Regenerated using autoheader 2.59.
19022 * configure: Regenerated.
19023
19024 * gdbreplay.c (socklen_t): Provide a default.
19025 (remote_open): Use socklen_t.
19026 * remote-utils.c (socklen_t): Provide a default.
19027 (remote_open): Use socklen_t.
19028 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
19029 unsigned char.
19030
19031 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
19032 char for buffers.
19033 * linux-low.c (linux_read_memory, linux_write_memory)
19034 (linux_read_auxv): Likewise.
19035 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
19036 (check_mem_write): Likewise.
19037 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
19038 Likewise.
19039 * regcache.c (struct inferior_rgcache_data, registers_to_string)
19040 (registers_from_string, register_data): Likewise.
19041 * server.c (handle_query, main): Likewise.
19042 * server.h (convert_ascii_to_int, convert_int_to_ascii)
19043 (decode_M_packet): Likewise.
19044 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
19045 * target.h (struct target_ops): Update read_memory, write_memory,
19046 and read_auxv.
19047 (read_inferior_memory, write_inferior_memory): Update.
19048 * linux-low.h (struct linux_target_ops): Change type of breakpoint
19049 to unsigned char *.
19050 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
19051 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
19052 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
19053 linux-s390-low.c, linux-sh-low.c: Update for changes in
19054 read_inferior_memory and the_low_target->breakpoint.
19055
19056 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
19057
19058 * Makefile.in (SFILES): Add linux-ppc64-low.c.
19059 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
19060 * configure.srv: Add powerpc64-*-linux*.
19061 * linux-ppc64-low.c: New file.
19062
19063 2005-05-23 Orjan Friberg <orjanf@axis.com>
19064
19065 * linux-cris-low.c: New file with support for CRIS.
19066 * linux-crisv32-low.c: Ditto for CRISv32.
19067 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
19068 (clean): Add reg-cris.c and reg-crisv32.c.
19069 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
19070 reg-crisv32.o, and reg-crisv32.c to make rules.
19071 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
19072 recognized targets.
19073
19074 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
19075
19076 * linux-low.c (fetch_register): Ensure buffer size is a multiple
19077 of sizeof (PTRACE_XFER_TYPE).
19078 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
19079
19080 2005-05-12 Orjan Friberg <orjanf@axis.com>
19081
19082 * target.h (struct target_ops): Add insert_watchpoint,
19083 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
19084 pointers for hardware watchpoint support.
19085 * linux-low.h (struct linux_target_ops): Ditto.
19086 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
19087 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
19088 to linux_target_ops.
19089 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
19090 reply packet.
19091 * server.c (main): Recognize 'Z' and 'z' packets.
19092
19093 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
19094
19095 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
19096 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
19097 (the_low_target): Add new members.
19098
19099 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
19100
19101 * proc-service.c (ps_lgetregs): Search all_processes instead of
19102 all_threads.
19103
19104 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
19105
19106 * server.c (start_inferior): Change return type to int.
19107 (attach_inferior): Change sigptr to int *.
19108 (handle_v_cont, handle_v_requests): Change signal to int *.
19109 (main): Change signal to int.
19110
19111 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
19112
19113 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
19114 * configure.srv: Add m32r*-*-linux*.
19115 * linux-m32r-low.c: New file.
19116
19117 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
19118
19119 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
19120
19121 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
19122
19123 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
19124 Take unsigned long arguments for PIDs.
19125 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
19126 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
19127 (wait_for_sigstop, linux_resume_one_process)
19128 (regsets_fetch_inferior_registers, linux_send_signal)
19129 (linux_read_auxv): Likewise. Update the types of variables holding
19130 PIDs. Update format string specifiers.
19131 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
19132 * remote-utils.c (prepare_resume_reply): Likewise.
19133 * server.c (cont_thread, general_thread, step_thread)
19134 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
19135 unsigned long.
19136 (handle_query): Update format specifiers.
19137 (handle_v_cont, main): Use strtoul for thread IDs.
19138 * server.h (struct inferior_list_entry): Use unsigned long for ID.
19139 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
19140 (general_thread, step_thread, thread_from_wait)
19141 (old_thread_from_wait): Update.
19142 * target.h (struct thread_resume): Use unsigned long for THREAD.
19143 (struct target_ops): Use unsigned long for arguments to attach and
19144 thread_alive.
19145
19146 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
19147
19148 * acinclude.m4: Include bfd/bfd.m4 directly.
19149 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
19150 <agriffis@toolchain.org>.
19151 * aclocal.m4, configure: Regenerated.
19152
19153 2005-01-07 Andrew Cagney <cagney@gnu.org>
19154
19155 * configure.ac: Rename configure.in, require autoconf 2.59.
19156 * configure: Re-generate.
19157
19158 2004-12-08 Daniel Jacobowitz <dan@debian.org>
19159
19160 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
19161 LIBS when finished.
19162 * aclocal.m4: Regenerated.
19163 * configure: Regenerated.
19164
19165 2004-11-21 Andreas Schwab <schwab@suse.de>
19166
19167 * linux-m68k-low.c (m68k_num_gregs): Define.
19168 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
19169 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
19170 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
19171 (m68k_breakpoint_at): New. Add to the_low_target.
19172
19173 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
19174 srv_linux_thread_db to yes.
19175
19176 2004-10-20 Joel Brobecker <brobecker@gnat.com>
19177
19178 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
19179 (ARCH_SET_FS): Likewise.
19180 (ARCH_GET_FS): Likewise.
19181 (ARCH_GET_GS): Likewise.
19182
19183 2004-10-16 Daniel Jacobowitz <dan@debian.org>
19184
19185 * linux-i386-low.c (ps_get_thread_area): New.
19186 * linux-x86-64-low.c (ps_get_thread_area): New.
19187 * linux-low.c: Include <sys/syscall.h>.
19188 (linux_kill_one_process): Don't kill the first thread here.
19189 (linux_kill): Kill the first thread here.
19190 (kill_lwp): New function.
19191 (send_sigstop, linux_send_signal): Use it.
19192 * proc-service.c: Clean up #ifdefs.
19193 (fpregset_info): Delete.
19194 (ps_lgetregs): Update and enable implementation.
19195 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
19196 implementations.
19197 * remote-utils.c (struct sym_cache, symbol_cache): New.
19198 (input_interrupt): Print a clearer message.
19199 (async_io_enabled): New variable.
19200 (enable_async_io, disable_async_io): Use it. Update comments.
19201 (look_up_one_symbol): Use the symbol cache.
19202 * thread-db.c (thread_db_look_up_symbols): New function.
19203 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
19204
19205 2004-10-16 Daniel Jacobowitz <dan@debian.org>
19206
19207 * configure.in: Test for -rdynamic.
19208 * configure: Regenerated.
19209 * Makefile (INTERNAL_LDFLAGS): New.
19210 (gdbserver, gdbreplay): Use it.
19211
19212 2004-09-02 Andrew Cagney <cagney@gnu.org>
19213
19214 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
19215
19216 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
19217
19218 * linux-low.c (linux_wait): Clear all_processes list also.
19219
19220 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
19221
19222 * linux-low.c: Include <errno.h>. Remove extern declaration of
19223 errno.
19224
19225 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
19226
19227 * gdbreplay.c, server.h, utils.c: Update copyright years.
19228
19229 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
19230
19231 * server.c (main): Print child status or termination signal from
19232 variable 'signal', not 'sig'.
19233
19234 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
19235
19236 * linux-low.c (linux_read_memory): Change return type to
19237 int. Check for and return error from ptrace().
19238 * target.c (read_inferior_memory): Change return type to int. Pass
19239 back return status from the_target->read_memory().
19240 * target.h (struct target_ops): Adapt *read_memory() prototype.
19241 Update comment.
19242 (read_inferior_memory): Adapt prototype.
19243 * server.c (main): Return an error packet if
19244 read_inferior_memory() returns an error.
19245
19246 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
19247
19248 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
19249 Unify with other clean targets.
19250
19251 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
19252
19253 * server.c (handle_v_cont): Call set_desired_inferior.
19254
19255 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
19256
19257 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
19258
19259 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
19260
19261 * linux-low.c (linux_wait): Unblock async I/O.
19262 (linux_resume): Block and enable async I/O.
19263 * remote-utils.c (block_async_io, unblock_async_io): New functions.
19264 * server.h (block_async_io, unblock_async_io): Add prototypes.
19265
19266 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
19267
19268 * remote-utils.c (remote_open): Print a status notice after
19269 opening a TCP port.
19270 * server.c (attach_inferior): Print a status notice after
19271 attaching.
19272
19273 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
19274
19275 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
19276
19277 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
19278
19279 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
19280 error packet.
19281 * server.c, target.h: Update copyright years.
19282
19283 2004-02-25 Roland McGrath <roland@redhat.com>
19284
19285 * target.h (struct target_ops): New member `read_auxv'.
19286 * server.c (handle_query): Handle qPart:auxv:read: query using that.
19287 * linux-low.c (linux_read_auxv): New function.
19288 (linux_target_ops): Initialize `read_auxv' member to that.
19289
19290 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
19291
19292 Committed by Jim Blandy <jimb@redhat.com>.
19293
19294 * linux-s390-low.c (s390_num_regs): Update.
19295 (s390_regmap): Remove control registers. Use __s390x__ predefine
19296 instead of GPR_SIZE to distiguish s390 and s390x targets.
19297
19298 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
19299
19300 * linux-low.c: Update copyright year.
19301 (check_removed_breakpoint): Clear pending_is_breakpoint.
19302 (linux_set_resume_request, linux_queue_one_thread)
19303 (resume_status_pending_p): New functions.
19304 (linux_continue_one_thread): Use process->resume.
19305 (linux_resume): Only resume threads if there are no pending events.
19306 * linux-low.h (struct process_info): Add resume request
19307 pointer.
19308
19309 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
19310
19311 * regcache.c (new_register_cache): Clear the allocated register
19312 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
19313
19314 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
19315
19316 * linux-low.c (linux_resume): Take a struct thread_resume *
19317 argument.
19318 (linux_wait): Update call.
19319 (resume_ptr): New static variable.
19320 (linux_continue_one_thread): Renamed from
19321 linux_continue_one_process. Use resume_ptr.
19322 (linux_resume): Use linux_continue_one_thread.
19323 * server.c (handle_v_cont, handle_v_requests): New functions.
19324 (myresume): New function.
19325 (main): Handle 'v' case.
19326 * target.h (struct thread_resume): New type.
19327 (struct target_ops): Change argument of "resume" to struct
19328 thread_resume *.
19329 (myresume): Delete macro.
19330
19331 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
19332
19333 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
19334 (uninstall): Support DESTDIR.
19335
19336 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
19337
19338 * configure.srv: Add xscale*linux copy of arm*linux entry.
19339
19340 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
19341
19342 * linux-arm-low.c (arm_reinsert_addr): New function.
19343 (the_low_target): Add arm_reinsert_addr.
19344
19345 2003-07-08 Mark Kettenis <kettenis@gnu.org>
19346
19347 * mem-break.c: Remove whitespace at end of file.
19348
19349 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
19350
19351 * configure.in: Check whether we need to prototype strerror.
19352 * server.h: Optionally prototype strerror.
19353 * gdbreplay.c (perror_with_name): Use strerror.
19354 * linux-low.c (linux_attach_lwp): Use strerror.
19355 * utils.c (perror_with_name): Use strerror.
19356 * config.in, configure: Regenerated.
19357
19358 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
19359
19360 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
19361 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
19362
19363 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
19364
19365 * Makefile.in (SFILES): Update.
19366 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
19367 low-sun3.c: Remove files.
19368
19369 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
19370
19371 * linux-low.c: Move comment to linux_thread_alive where it belonged.
19372 (linux_detach_one_process, linux_detach): New functions.
19373 (linux_target_ops): Add linux_detach.
19374 * server.c (main): Handle 'D' packet.
19375 * target.h (struct target_ops): Add "detach" member.
19376 (detach_inferior): Define.
19377
19378 2003-06-13 Mark Kettenis <kettenis@gnu.org>
19379
19380 From Kelley Cook <kelleycook@wideopenwest.com>:
19381 * configure.srv: Accept i[34567]86 variants.
19382
19383 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
19384
19385 * linux-low.c (linux_wait_for_event): Correct comment typos.
19386 (linux_resume_one_process): Call check_removed_breakpoint.
19387 (linux_send_signal): New function.
19388 (linux_target_ops): Add linux_send_signal.
19389 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
19390 of kill.
19391 * target.h (struct target_ops): Add send_signal.
19392
19393 2003-05-29 Jim Blandy <jimb@redhat.com>
19394
19395 * linux-low.c (usr_store_inferior_registers): Transfer buf in
19396 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
19397 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
19398 away part of the register's value.
19399
19400 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
19401
19402 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
19403 (linux_wait_for_event, linux_init_signals): Likewise.
19404
19405 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
19406
19407 * configure.in: Check for stdlib.h.
19408 * configure: Regenerated.
19409 * config.in: Regenerated.
19410
19411 2003-01-04 Andreas Schwab <schwab@suse.de>
19412
19413 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
19414
19415 2003-01-02 Andrew Cagney <ac131313@redhat.com>
19416
19417 * Makefile.in: Remove obsolete code.
19418
19419 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
19420
19421 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
19422 defined(PT_FPR0_HI).
19423
19424 2002-11-17 Stuart Hughes <seh@zee2.com>
19425
19426 * linux-arm-low.c (arm_num_regs): Increase.
19427 (arm_regmap): Include status register.
19428
19429 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
19430
19431 * linux-low.c (register_addr): Remove incorrect -1 check.
19432
19433 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
19434
19435 * linux-low.c (linux_create_inferior): Call setpgid. Return
19436 the new PID.
19437 (unstopped_p, linux_signal_pid): Remove.
19438 (linux_target_ops): Remove linux_signal_pid.
19439 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
19440 global instead of target method.
19441 * target.h (struct target_ops): Remove signal_pid. Update comment
19442 for create_inferior.
19443 * server.c (signal_pid): New variable.
19444 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
19445 gdbserver. Set the child to be the foreground process group.
19446 (attach_inferior): Set signal_pid.
19447
19448 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
19449
19450 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
19451
19452 2002-08-20 Jim Blandy <jimb@redhat.com>
19453
19454 * Makefile.in (LDFLAGS): Allow the configure script to establish a
19455 default for this.
19456
19457 2002-08-01 Andrew Cagney <cagney@redhat.com>
19458
19459 * Makefile.in: Make chill references obsolete.
19460
19461 2002-07-24 Kevin Buettner <kevinb@redhat.com>
19462
19463 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
19464 * configure: Regenerate.
19465 * config.in: Regenerate.
19466
19467 2002-07-09 David O'Brien <obrien@FreeBSD.org>
19468
19469 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
19470 (perror_with_name, remote_close, remote_open, expect, play): Static.
19471
19472 2002-07-04 Michal Ludvig <mludvig@suse.cz>
19473
19474 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
19475 byte offsets instead of an array of indexes.
19476 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
19477
19478 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
19479
19480 * regcache.c: Add comment.
19481
19482 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
19483
19484 * thread-db.c: New file.
19485 * proc-service.c: New file.
19486 * acinclude.m4: New file.
19487 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
19488 proc-service.o, and thread-db.o.
19489 (linux-low.o): Add USE_THREAD_DB.
19490 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
19491 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
19492 * aclocal.m4: Regenerated.
19493 * config.in: Regenerated.
19494 * configure: Regenerated.
19495 * configure.in: Check for proc_service.h, sys/procfs.h,
19496 thread_db.h, and linux/elf.h headrs.
19497 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
19498 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
19499 Check for -lthread_db and thread support.
19500 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
19501 PowerPC, and SuperH.
19502 * i387-fp.c: Constify arguments.
19503 * i387-fp.h: Likewise.
19504 * inferiors.c: (struct thread_info): Renamed from
19505 `struct inferior_info'. Remove PID member. Use generic inferior
19506 list header. All uses updated.
19507 (inferiors, signal_pid): Removed.
19508 (all_threads): New variable.
19509 (get_thread): Define.
19510 (add_inferior_to_list): New function.
19511 (for_each_inferior): New function.
19512 (change_inferior_id): New function.
19513 (add_inferior): Removed.
19514 (remove_inferior): New function.
19515 (add_thread): New function.
19516 (free_one_thread): New function.
19517 (remove_thread): New function.
19518 (clear_inferiors): Use for_each_inferior and free_one_thread.
19519 (find_inferior): New function.
19520 (find_inferior_id): New function.
19521 (inferior_target_data): Update argument type.
19522 (set_inferior_target_data): Likewise.
19523 (inferior_regcache_data): Likewise.
19524 (set_inferior_regcache_data): Likewise.
19525 * linux-low.c (linux_bp_reinsert): Remove.
19526 (all_processes, stopping_threads, using_thrads)
19527 (struct pending_signals, debug_threads, pid_of): New.
19528 (inferior_pid): Replace with macro.
19529 (struct inferior_linux_data): Remove.
19530 (get_stop_pc, add_process): New functions.
19531 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
19532 Use add_process and add_thread.
19533 (linux_attach_lwp): New function, based on old linux_attach. Use
19534 add_process and add_thread. Set stop_expected for new threads.
19535 (linux_attach): New function.
19536 (linux_kill_one_process): New function.
19537 (linux_kill): Kill all LWPs.
19538 (linux_thread_alive): Use find_inferior_id.
19539 (check_removed_breakpoints, status_pending_p): New functions.
19540 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
19541 Update. Use WNOHANG. Wait for cloned processes also. Update process
19542 struct for the found process.
19543 (linux_wait_for_event): New function.
19544 (linux_wait): Use it. Support LWPs.
19545 (send_sigstop, wait_for_sigstop, stop_all_processes)
19546 (linux_resume_one_process, linux_continue_one_process): New functions.
19547 (linux_resume): Support LWPs.
19548 (REGISTER_RAW_SIZE): Remove.
19549 (fetch_register): Use register_size instead. Call supply_register.
19550 (usr_store_inferior_registers): Likewise. Call collect_register.
19551 Fix recursive case.
19552 (regsets_fetch_inferior_registers): Improve error message.
19553 (regsets_store_inferior_registers): Add debugging.
19554 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
19555 (unstopped_p, linux_signal_pid): New functions.
19556 (linux_target_ops): Add linux_signal_pid.
19557 (linux_init_signals): New function.
19558 (initialize_low): Call it. Initialize using_threads.
19559 * regcache.c (inferior_regcache_data): Add valid
19560 flag.
19561 (get_regcache): Fetch registers lazily. Add fetch argument
19562 and update all callers.
19563 (regcache_invalidate_one, regcache_invalidate): New
19564 functions.
19565 (new_register_cache): Renamed from create_register_cache.
19566 Return the new regcache.
19567 (free_register_cache): Change argument to a void *.
19568 (registers_to_string, registers_from_string): Call get_regcache
19569 with fetch flag set.
19570 (register_data): Make static. Pass fetch flag to get_regcache.
19571 (supply_register): Call get_regcache with fetch flag clear.
19572 (collect_register): Call get_regcache with fetch flag set.
19573 (collect_register_as_string): New function.
19574 * regcache.h: Update.
19575 * remote-utils.c (putpkt): Flush after debug output and use
19576 stderr.
19577 Handle input interrupts while waiting for an ACK.
19578 (input_interrupt): Use signal_pid method.
19579 (getpkt): Flush after debug output and use stderr.
19580 (outreg): Use collect_register_as_string.
19581 (new_thread_notify, dead_thread_notify): New functions.
19582 (prepare_resume_reply): Check using_threads. Set thread_from_wait
19583 and general_thread.
19584 (look_up_one_symbol): Flush after debug output.
19585 * server.c (step_thread, server_waiting): New variables.
19586 (start_inferior): Don't use signal_pid. Update call to mywait.
19587 (attach_inferior): Update call to mywait.
19588 (handle_query): Handle qfThreadInfo and qsThreadInfo.
19589 (main): Don't fetch/store registers explicitly. Use
19590 set_desired_inferior. Support proposed ``Hs'' packet. Update
19591 calls to mywait.
19592 * server.h: Update.
19593 (struct inferior_list, struct_inferior_list_entry): New.
19594 * target.c (set_desired_inferior): New.
19595 (write_inferior_memory): Constify.
19596 (mywait): New function.
19597 * target.h: Update.
19598 (struct target_ops): New signal_pid method.
19599 (mywait): Removed macro, added prototype.
19600
19601 * linux-low.h (regset_func): Removed.
19602 (regset_fill_func, regset_store_func): New.
19603 (enum regset_type): New.
19604 (struct regset_info): Add type field. Use new operation types.
19605 (struct linux_target_ops): stop_pc renamed to get_pc.
19606 Add decr_pc_after_break and breakpoint_at.
19607 (get_process, get_thread_proess, get_process_thread)
19608 (strut process_info, all_processes, linux_attach_lwp)
19609 (thread_db_init): New.
19610
19611 * linux-arm-low.c (arm_get_pc, arm_set_pc,
19612 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
19613 (the_low_target): Add new members.
19614 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
19615 (i386_store_fpxregset): Constify.
19616 (target_regsets): Add new kind identifier.
19617 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
19618 (i386_set_pc): Add debugging.
19619 (i386_breakpoint_at): New function.
19620 (the_low_target): Add new members.
19621 * linux-mips-low.c (mips_get_pc, mips_set_pc)
19622 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
19623 (mips_breakpoint_at): New.
19624 (the_low_target): Add new members.
19625 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
19626 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
19627 (the_low_target): Add new members.
19628 * linux-sh-low.c (sh_get_pc, sh_set_pc)
19629 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
19630 (the_low_target): Add new members.
19631 * linux-x86-64-low.c (target_regsets): Add new kind
19632 identifier.
19633
19634 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
19635
19636 From Martin Pool <mbp@samba.org>:
19637 * server.c (gdbserver_usage): New function.
19638 (main): Call it.
19639
19640 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
19641
19642 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
19643 stop_at -> stop_pc.
19644
19645 2002-05-04 Andrew Cagney <ac131313@redhat.com>
19646
19647 * Makefile.in: Remove obsolete code.
19648
19649 2002-04-24 Michal Ludvig <mludvig@suse.cz>
19650
19651 * linux-low.c (regsets_fetch_inferior_registers),
19652 (regsets_store_inferior_registers): Removed cast to int from
19653 ptrace() calls.
19654 * regcache.h: Added declaration of struct inferior_info.
19655
19656 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
19657
19658 * inferiors.c (struct inferior_info): Add regcache_data.
19659 (add_inferior): Call create_register_cache.
19660 (clear_inferiors): Call free_register_cache.
19661 (inferior_regcache_data, set_inferior_regcache_data): New functions.
19662 * regcache.c (struct inferior_regcache_data): New.
19663 (registers): Remove.
19664 (get_regcache): New function.
19665 (create_register_cache, free_register_cache): New functions.
19666 (set_register_cache): Don't initialize the register cache here.
19667 (registers_to_string, registers_from_string, register_data): Call
19668 get_regcache.
19669 * regcache.h: Add prototypes.
19670 * server.h: Likewise.
19671
19672 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
19673
19674 * mem-break.c: New file.
19675 * mem-break.h: New file.
19676 * Makefile.in: Add mem-break.o rule; update server.h
19677 dependencies.
19678 * inferiors.c (struct inferior_info): Add target_data
19679 member.
19680 (clear_inferiors): Free target_data member if set.
19681 (inferior_target_data, set_inferior_target_data): New functions.
19682 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
19683 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
19684 * linux-low.c (linux_bp_reinsert): New variable.
19685 (struct inferior_linux_data): New.
19686 (linux_create_inferior): Use set_inferior_target_data.
19687 (linux_attach): Likewise. Call add_inferior.
19688 (linux_wait_for_one_inferior): New function.
19689 (linux_wait): Call it.
19690 (linux_write_memory): Add const.
19691 (initialize_low): Call set_breakpoint_data.
19692 * linux-low.h (struct linux_target_ops): Add breakpoint
19693 handling members.
19694 * server.c (attach_inferior): Remove extra add_inferior
19695 call.
19696 * server.h: Include mem-break.h. Update inferior.c
19697 prototypes.
19698 * target.c (read_inferior_memory)
19699 (write_inferior_memory): New functions.
19700 * target.h (read_inferior_memory)
19701 (write_inferior_memory): Change macros to prototypes.
19702 (struct target_ops): Update comments. Add const to write_memory
19703 definition.
19704
19705 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
19706
19707 * linux-low.c (usr_store_inferior_registers): Support
19708 registers which are allowed to fail to store.
19709 * linux-low.h (linux_target_ops): Likewise.
19710 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
19711 (ppc_cannot_store_register): FPSCR may not be storable.
19712
19713 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19714
19715 * server.h: Include <string.h> if HAVE_STRING_H.
19716 * ChangeLog: Correct paths in last ChangeLog entry.
19717
19718 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19719
19720 * linux-low.h: Remove obsolete prototypes.
19721 (struct linux_target_ops): New.
19722 (extern the_low_target): New.
19723 * linux-low.c (num_regs, regmap): Remove declarations.
19724 (register_addr): Use the_low_target explicitly.
19725 (fetch_register): Likewise.
19726 (usr_fetch_inferior_registers): Likewise.
19727 (usr_store_inferior_registers): Likewise.
19728 * linux-arm-low.c (num_regs): Remove.
19729 (arm_num_regs): Define.
19730 (arm_regmap): Renamed from regmap, made static.
19731 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
19732 made static.
19733 (arm_cannot_store_register): Renamed from cannot_store_register,
19734 made static.
19735 (the_low_target): New.
19736 * linux-i386-low.c (num_regs): Remove.
19737 (i386_num_regs): Define.
19738 (i386_regmap): Renamed from regmap, made static.
19739 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
19740 made static.
19741 (i386_cannot_store_register): Renamed from cannot_store_register,
19742 made static.
19743 (the_low_target): New.
19744 * linux-ia64-low.c (num_regs): Remove.
19745 (ia64_num_regs): Define.
19746 (ia64_regmap): Renamed from regmap, made static.
19747 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
19748 made static.
19749 (ia64_cannot_store_register): Renamed from cannot_store_register,
19750 made static.
19751 (the_low_target): New.
19752 * linux-m68k-low.c (num_regs): Remove.
19753 (m68k_num_regs): Define.
19754 (m68k_regmap): Renamed from regmap, made static.
19755 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
19756 made static.
19757 (m68k_cannot_store_register): Renamed from cannot_store_register,
19758 made static.
19759 (the_low_target): New.
19760 * linux-mips-low.c (num_regs): Remove.
19761 (mips_num_regs): Define.
19762 (mips_regmap): Renamed from regmap, made static.
19763 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
19764 made static.
19765 (mips_cannot_store_register): Renamed from cannot_store_register,
19766 made static.
19767 (the_low_target): New.
19768 * linux-ppc-low.c (num_regs): Remove.
19769 (ppc_num_regs): Define.
19770 (ppc_regmap): Renamed from regmap, made static.
19771 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
19772 made static.
19773 (ppc_cannot_store_register): Renamed from cannot_store_register,
19774 made static.
19775 (the_low_target): New.
19776 * linux-s390-low.c (num_regs): Remove.
19777 (s390_num_regs): Define.
19778 (s390_regmap): Renamed from regmap, made static.
19779 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
19780 made static.
19781 (s390_cannot_store_register): Renamed from cannot_store_register,
19782 made static.
19783 (the_low_target): New.
19784 * linux-sh-low.c (num_regs): Remove.
19785 (sh_num_regs): Define.
19786 (sh_regmap): Renamed from regmap, made static.
19787 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
19788 made static.
19789 (sh_cannot_store_register): Renamed from cannot_store_register,
19790 made static.
19791 (the_low_target): New.
19792 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
19793 (the_low_target): New.
19794
19795 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19796
19797 * Makefile.in: Add stamp-h target.
19798 * configure.in: Create stamp-h.
19799 * configure: Regenerated.
19800
19801 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19802
19803 * inferiors.c: New file.
19804 * target.c: New file.
19805 * target.h: New file.
19806 * Makefile.in: Add target.o and inferiors.o. Update
19807 dependencies.
19808 * linux-low.c (inferior_pid): New static variable,
19809 moved from server.c.
19810 (linux_create_inferior): Renamed from create_inferior.
19811 Call add_inferior. Return 0 on success instead of a PID.
19812 (linux_attach): Renamed from myattach.
19813 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
19814 (linux_thread_alive): Renamed from mythread_alive.
19815 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
19816 child dies.
19817 (linux_resume): Renamed from myresume. Add missing ``return 0''.
19818 (regsets_store_inferior_registers): Correct error message.
19819 Add missing ``return 0''.
19820 (linux_fetch_registers): Renamed from fetch_inferior_registers.
19821 (linux_store_registers): Renamed from store_inferior_registers.
19822 (linux_read_memory): Renamed from read_inferior_memory.
19823 (linux_write_memory): Renamed from write_inferior_memory.
19824 (linux_target_ops): New structure.
19825 (initialize_low): Call set_target_ops ().
19826 * remote-utils.c (unhexify): New function.
19827 (hexify): New function.
19828 (input_interrupt): Send signals to ``signal_pid''.
19829 * server.c (inferior_pid): Remove.
19830 (start_inferior): Update create_inferior call.
19831 (attach_inferior): Call add_inferior.
19832 (handle_query): New function.
19833 (main): Call handle_query for `q' packets.
19834 * server.h: Include "target.h". Remove obsolete prototypes.
19835 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
19836
19837 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19838
19839 * Makefile.in: Add WARN_CFLAGS. Update configury
19840 dependencies.
19841 * configure.in: Check for <string.h>
19842 * configure: Regenerate.
19843 * config.in: Regenerate.
19844 * gdbreplay.c: Include needed system headers.
19845 (remote_open): Remove strchr prototype.
19846 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
19847 * regcache.c (supply_register): Change buf argument to const void *.
19848 (supply_register_by_name): Likewise.
19849 (collect_register): Change buf argument to void *.
19850 (collect_register_by_name): Likewise.
19851 * regcache.h: Add missing prototypes.
19852 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
19853 * server.c (handle_query): New function.
19854 (attached): New static variable, moved out of main.
19855 (main): Quiet longjmp clobber warnings.
19856 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
19857 * utils.c (error): Remove NORETURN.
19858 (fatal): Likewise.
This page took 0.470384 seconds and 4 git commands to generate.