Namespace the reg class to avoid clashes with OS headers
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-03-17 Kamil Rytarowski <n54@gmx.com>
2
3 * regcache.cc (find_register_by_number): Update.
4 * tdesc.cc (init_target_desc): Likewise.
5 * tdesc.h (target_desc::reg_defs): Likewise.
6
7 2020-03-12 Tom Tromey <tom@tromey.com>
8
9 * configure: Rebuild.
10 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
11 (WIN32APILIBS): New subst.
12 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
13 gdbsupport files.
14 (gdbsupport/%.o): Remove target.
15 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
16 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
17 (WIN32APILIBS): New variable.
18 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
19 (gdbreplay$(EXEEXT)): Likewise.
20
21 2020-03-12 Tom Tromey <tom@tromey.com>
22
23 * config.in, configure: Rebuild.
24 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
25 * acinclude.m4: Include gettext-sister.m4.
26 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
27 variables.
28 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
29 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
30
31 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
32
33 * acinclude.m4: Update path to selftest.m4.
34
35 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
36
37 * configure.ac: Don't source bfd/development.sh, move
38 GDB_AC_COMMON higher.
39 * configure: Re-generate.
40
41 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
42
43 * configure: Re-generate.
44
45 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
46
47 * configure: Re-generate.
48
49 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
50
51 * .dir-locals.el: New file.
52
53 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
54
55 * .gitattributes: New file.
56
57 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
58
59 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
60 reply into an S reply.
61 * server.cc (disable_packet_T): New global.
62 (captured_main): Set new global when appropriate.
63 * server.h (disable_packet_T): Declare.
64
65 2020-02-21 Tom Tromey <tom@tromey.com>
66
67 * Makefile.in (mostlyclean): New target.
68
69 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
70
71 * target.h (struct process_stratum_target): Remove.
72 (class process_target): Rename to ...
73 (class process_stratum_target): ... this.
74 * linux-low.h (class linux_process_target): Derive from
75 'process_stratum_target'.
76 * linux-low.cc (linux_target_ops): Remove.
77 (initialize_low): Set the_target to the singleton instance of
78 linux_process_target.
79 * lynx-low.h (class lynx_process_target): Derive from
80 'process_stratum_target'.
81 * lynx-low.cc (lynx_target_ops): Remove.
82 (initialize_low): Set the_target to the singleton instance of
83 lynx_process_target.
84 * nto-low.h (class nto_process_target): Derive from
85 'process_stratum_target'.
86 * nto-low.cc (nto_target_ops): Remove.
87 (initialize_low): Set the_target to the singleton instance of
88 nto_process_target.
89 * win32-low.h (class win32_process_target): Derive from
90 'process_stratum_target'.
91 * win32-low.cc (win32_target_ops): Remove.
92 (initialize_low): Set the_target to the singleton instance of
93 win32_process_target.
94
95 Replace 'the_target->pt' with 'the_target' in the uses below.
96
97 * hostio.cc (hostio_error)
98 (handle_setfs)
99 (handle_open)
100 (handle_unlink)
101 (handle_readlink)
102 * linux-aarch32-low.cc (arm_breakpoint_at)
103 * linux-aarch64-low.cc (aarch64_breakpoint_at)
104 * linux-arm-low.cc (arm_sigreturn_next_pc)
105 (arm_get_hwcap)
106 (arm_get_syscall_trapinfo)
107 * linux-cris-low.cc (cris_breakpoint_at)
108 * linux-crisv32-low.cc (cris_breakpoint_at)
109 * linux-low.cc (handle_extended_wait)
110 (linux_wait_1)
111 (linux_read_memory)
112 (linux_process_target::breakpoint_kind_from_pc)
113 (linux_get_auxv)
114 * linux-m32r-low.cc (m32r_breakpoint_at)
115 * linux-mips-low.cc (mips_breakpoint_at)
116 * linux-nios2-low.cc (nios2_breakpoint_at)
117 * linux-ppc-low.cc (ppc_breakpoint_at)
118 * linux-s390-low.cc (s390_get_hwcap)
119 * linux-sh-low.cc (sh_breakpoint_at)
120 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
121 (sparc_store_gregset_from_stack)
122 (sparc_breakpoint_at)
123 * linux-tic6x-low.cc (tic6x_breakpoint_at)
124 * linux-tile-low.cc (tile_breakpoint_at)
125 * linux-x86-low.cc (x86_breakpoint_at)
126 * linux-xtensa-low.cc (xtensa_breakpoint_at)
127 * mem-break.cc (bp_size)
128 (bp_opcode)
129 (insert_memory_breakpoint)
130 (set_raw_breakpoint_at)
131 (delete_raw_breakpoint)
132 (z_type_supported)
133 (uninsert_raw_breakpoint)
134 (reinsert_raw_breakpoint)
135 (validate_inserted_breakpoint)
136 * regcache.cc (regcache_read_pc)
137 (regcache_write_pc)
138 * remote-utils.cc (putpkt_binary_1)
139 (input_interrupt)
140 (getpkt)
141 (prepare_resume_reply)
142 * server.cc (handle_general_set)
143 (handle_detach)
144 (handle_qxfer_auxv)
145 (handle_qxfer_exec_file)
146 (handle_qxfer_libraries_svr4)
147 (handle_qxfer_osdata)
148 (handle_qxfer_siginfo)
149 (handle_qxfer_fdpic)
150 (handle_query)
151 (resume)
152 (handle_v_requests)
153 (queue_stop_reply_callback)
154 (captured_main)
155 * target.cc (prepare_to_access_memory)
156 (done_accessing_memory)
157 (read_inferior_memory)
158 (target_write_memory)
159 (target_stop_and_wait)
160 (target_wait)
161 (target_mourn_inferior)
162 (target_continue_no_signal)
163 (target_continue)
164 (target_supports_multi_process)
165 (kill_inferior)
166 * target.h
167 (target_create_inferior)
168 (target_post_create_inferior)
169 (myattach)
170 (target_supports_fork_events)
171 (target_supports_vfork_events)
172 (target_supports_exec_events)
173 (target_handle_new_gdb_connection)
174 (detach_inferior)
175 (mythread_alive)
176 (fetch_inferior_registers)
177 (store_inferior_registers)
178 (join_inferior)
179 (target_supports_non_stop)
180 (target_async)
181 (target_process_qsupported)
182 (target_supports_catch_syscall)
183 (target_get_ipa_tdesc_idx)
184 (target_supports_tracepoints)
185 (target_supports_fast_tracepoints)
186 (target_get_min_fast_tracepoint_insn_len)
187 (target_thread_stopped)
188 (target_pause_all)
189 (target_unpause_all)
190 (target_stabilize_threads)
191 (target_install_fast_tracepoint_jump_pad)
192 (target_emit_ops)
193 (target_supports_disable_randomization)
194 (target_supports_agent)
195 (target_enable_btrace)
196 (target_disable_btrace)
197 (target_read_btrace)
198 (target_read_btrace_conf)
199 (target_supports_range_stepping)
200 (target_supports_stopped_by_sw_breakpoint)
201 (target_stopped_by_sw_breakpoint)
202 (target_supports_stopped_by_hw_breakpoint)
203 (target_supports_hardware_single_step)
204 (target_stopped_by_hw_breakpoint)
205 (target_breakpoint_kind_from_pc)
206 (target_breakpoint_kind_from_current_state)
207 (target_supports_software_single_step)
208 (target_core_of_thread)
209 (target_thread_name)
210 (target_thread_handle)
211 * win32-low.cc (do_initial_child_stuff)
212
213 Rename target op default definitions listed below.
214
215 * target.cc (process_target::post_create_inferior): Rename as ...
216 (process_stratum_target::post_create_inferior): ... this.
217 (process_target::prepare_to_access_memory): Rename as ...
218 (process_stratum_target::prepare_to_access_memory): ... this.
219 (process_target::done_accessing_memory): Rename as ...
220 (process_stratum_target::done_accessing_memory): ... this.
221 (process_target::look_up_symbols): Rename as ...
222 (process_stratum_target::look_up_symbols): ... this.
223 (process_target::supports_read_auxv): Rename as ...
224 (process_stratum_target::supports_read_auxv): ... this.
225 (process_target::read_auxv): Rename as ...
226 (process_stratum_target::read_auxv): ... this.
227 (process_target::supports_z_point_type): Rename as ...
228 (process_stratum_target::supports_z_point_type): ... this.
229 (process_target::insert_point): Rename as ...
230 (process_stratum_target::insert_point): ... this.
231 (process_target::remove_point): Rename as ...
232 (process_stratum_target::remove_point): ... this.
233 (process_target::stopped_by_sw_breakpoint): Rename as ...
234 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
235 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
236 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
237 (process_target::stopped_by_hw_breakpoint): Rename as ...
238 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
239 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
240 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
241 (process_target::supports_hardware_single_step): Rename as ...
242 (process_stratum_target::supports_hardware_single_step): ... this.
243 (process_target::stopped_by_watchpoint): Rename as ...
244 (process_stratum_target::stopped_by_watchpoint): ... this.
245 (process_target::stopped_data_address): Rename as ...
246 (process_stratum_target::stopped_data_address): ... this.
247 (process_target::supports_read_offsets): Rename as ...
248 (process_stratum_target::supports_read_offsets): ... this.
249 (process_target::read_offsets): Rename as ...
250 (process_stratum_target::read_offsets): ... this.
251 (process_target::supports_get_tls_address): Rename as ...
252 (process_stratum_target::supports_get_tls_address): ... this.
253 (process_target::get_tls_address): Rename as ...
254 (process_stratum_target::get_tls_address): ... this.
255 (process_target::hostio_last_error): Rename as ...
256 (process_stratum_target::hostio_last_error): ... this.
257 (process_target::supports_qxfer_osdata): Rename as ...
258 (process_stratum_target::supports_qxfer_osdata): ... this.
259 (process_target::qxfer_osdata): Rename as ...
260 (process_stratum_target::qxfer_osdata): ... this.
261 (process_target::supports_qxfer_siginfo): Rename as ...
262 (process_stratum_target::supports_qxfer_siginfo): ... this.
263 (process_target::qxfer_siginfo): Rename as ...
264 (process_stratum_target::qxfer_siginfo): ... this.
265 (process_target::supports_non_stop): Rename as ...
266 (process_stratum_target::supports_non_stop): ... this.
267 (process_target::async): Rename as ...
268 (process_stratum_target::async): ... this.
269 (process_target::start_non_stop): Rename as ...
270 (process_stratum_target::start_non_stop): ... this.
271 (process_target::supports_multi_process): Rename as ...
272 (process_stratum_target::supports_multi_process): ... this.
273 (process_target::supports_fork_events): Rename as ...
274 (process_stratum_target::supports_fork_events): ... this.
275 (process_target::supports_vfork_events): Rename as ...
276 (process_stratum_target::supports_vfork_events): ... this.
277 (process_target::supports_exec_events): Rename as ...
278 (process_stratum_target::supports_exec_events): ... this.
279 (process_target::handle_new_gdb_connection): Rename as ...
280 (process_stratum_target::handle_new_gdb_connection): ... this.
281 (process_target::handle_monitor_command): Rename as ...
282 (process_stratum_target::handle_monitor_command): ... this.
283 (process_target::core_of_thread): Rename as ...
284 (process_stratum_target::core_of_thread): ... this.
285 (process_target::supports_read_loadmap): Rename as ...
286 (process_stratum_target::supports_read_loadmap): ... this.
287 (process_target::read_loadmap): Rename as ...
288 (process_stratum_target::read_loadmap): ... this.
289 (process_target::process_qsupported): Rename as ...
290 (process_stratum_target::process_qsupported): ... this.
291 (process_target::supports_tracepoints): Rename as ...
292 (process_stratum_target::supports_tracepoints): ... this.
293 (process_target::read_pc): Rename as ...
294 (process_stratum_target::read_pc): ... this.
295 (process_target::write_pc): Rename as ...
296 (process_stratum_target::write_pc): ... this.
297 (process_target::supports_thread_stopped): Rename as ...
298 (process_stratum_target::supports_thread_stopped): ... this.
299 (process_target::thread_stopped): Rename as ...
300 (process_stratum_target::thread_stopped): ... this.
301 (process_target::supports_get_tib_address): Rename as ...
302 (process_stratum_target::supports_get_tib_address): ... this.
303 (process_target::get_tib_address): Rename as ...
304 (process_stratum_target::get_tib_address): ... this.
305 (process_target::pause_all): Rename as ...
306 (process_stratum_target::pause_all): ... this.
307 (process_target::unpause_all): Rename as ...
308 (process_stratum_target::unpause_all): ... this.
309 (process_target::stabilize_threads): Rename as ...
310 (process_stratum_target::stabilize_threads): ... this.
311 (process_target::supports_fast_tracepoints): Rename as ...
312 (process_stratum_target::supports_fast_tracepoints): ... this.
313 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
314 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
315 (process_target::emit_ops): Rename as ...
316 (process_stratum_target::emit_ops): ... this.
317 (process_target::supports_disable_randomization): Rename as ...
318 (process_stratum_target::supports_disable_randomization): ... this.
319 (process_target::supports_qxfer_libraries_svr4): Rename as ...
320 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
321 (process_target::qxfer_libraries_svr4): Rename as ...
322 (process_stratum_target::qxfer_libraries_svr4): ... this.
323 (process_target::supports_agent): Rename as ...
324 (process_stratum_target::supports_agent): ... this.
325 (process_target::enable_btrace): Rename as ...
326 (process_stratum_target::enable_btrace): ... this.
327 (process_target::disable_btrace): Rename as ...
328 (process_stratum_target::disable_btrace): ... this.
329 (process_target::read_btrace): Rename as ...
330 (process_stratum_target::read_btrace): ... this.
331 (process_target::read_btrace_conf): Rename as ...
332 (process_stratum_target::read_btrace_conf): ... this.
333 (process_target::supports_range_stepping): Rename as ...
334 (process_stratum_target::supports_range_stepping): ... this.
335 (process_target::supports_pid_to_exec_file): Rename as ...
336 (process_stratum_target::supports_pid_to_exec_file): ... this.
337 (process_target::pid_to_exec_file): Rename as ...
338 (process_stratum_target::pid_to_exec_file): ... this.
339 (process_target::supports_multifs): Rename as ...
340 (process_stratum_target::supports_multifs): ... this.
341 (process_target::multifs_open): Rename as ...
342 (process_stratum_target::multifs_open): ... this.
343 (process_target::multifs_unlink): Rename as ...
344 (process_stratum_target::multifs_unlink): ... this.
345 (process_target::multifs_readlink): Rename as ...
346 (process_stratum_target::multifs_readlink): ... this.
347 (process_target::breakpoint_kind_from_pc): Rename as ...
348 (process_stratum_target::breakpoint_kind_from_pc): ... this.
349 (process_target::breakpoint_kind_from_current_state): Rename as ...
350 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
351 (process_target::thread_name): Rename as ...
352 (process_stratum_target::thread_name): ... this.
353 (process_target::thread_handle): Rename as ...
354 (process_stratum_target::thread_handle): ... this.
355 (process_target::supports_software_single_step): Rename as ...
356 (process_stratum_target::supports_software_single_step): ... this.
357 (process_target::supports_catch_syscall): Rename as ...
358 (process_stratum_target::supports_catch_syscall): ... this.
359 (process_target::get_ipa_tdesc_idx): Rename as ...
360 (process_stratum_target::get_ipa_tdesc_idx): ... this.
361
362 2020-02-20 Pedro Alves <palves@redhat.com>
363
364 * target.cc (set_target_ops): Simply copy the given target pointer
365 instead of creating a copy of the pointed object.
366
367 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
368
369 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
370 of process_target.
371
372 * target.h (struct process_stratum_target): Remove the target op.
373 (class process_target): Add the target op.
374 (target_get_ipa_tdesc_idx): Update the macro.
375 * target.cc (process_target::get_ipa_tdesc_idx): Define.
376
377 Update the derived classes and callers below.
378
379 * linux-low.cc (linux_target_ops): Update.
380 (linux_get_ipa_tdesc_idx): Turn into ...
381 (linux_process_target::get_ipa_tdesc_idx): ... this.
382 * linux-low.h (class linux_process_target): Update.
383 * lynx-low.cc (lynx_target_ops): Update.
384 * nto-low.cc (nto_target_ops): Update.
385 * win32-low.cc (win32_target_ops): Update.
386
387 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
388
389 Turn process_stratum_target's supports_catch_syscall op into a
390 method of process_target.
391
392 * target.h (struct process_stratum_target): Remove the target op.
393 (class process_target): Add the target op.
394 (target_supports_catch_syscall): Update the macro.
395 * target.cc (process_target::supports_catch_syscall): Define.
396
397 Update the derived classes and callers below.
398
399 * linux-low.cc (linux_target_ops): Update.
400 (linux_supports_catch_syscall): Turn into ...
401 (linux_process_target::supports_catch_syscall): ... this.
402 * linux-low.h (class linux_process_target): Update.
403 * lynx-low.cc (lynx_target_ops): Update.
404 * nto-low.cc (nto_target_ops): Update.
405 * win32-low.cc (win32_target_ops): Update.
406
407 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
408
409 Turn process_stratum_target's supports_software_single_step op
410 into a method of process_target.
411
412 * target.h (struct process_stratum_target): Remove the target op.
413 (class process_target): Add the target op.
414 (target_supports_software_single_step): Update the macro.
415 * target.cc (process_target::supports_software_single_step): Define.
416
417 Update the derived classes and callers below.
418
419 * linux-low.cc (linux_target_ops): Update.
420 (linux_supports_software_single_step): Turn into ...
421 (linux_process_target::supports_software_single_step): ... this.
422 * linux-low.h (class linux_process_target): Update.
423 * lynx-low.cc (lynx_target_ops): Update.
424 * nto-low.cc (nto_target_ops): Update.
425 * win32-low.cc (win32_target_ops): Update.
426
427 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
428
429 Turn process_stratum_target's thread_name and thread_handle ops
430 into methods of process_target.
431
432 * target.h (struct process_stratum_target): Remove the target ops.
433 (class process_target): Add the target ops.
434 (target_thread_name): Update the macro.
435 (target_thread_handle): Update the macro.
436 * target.cc (process_target::thread_name): Define.
437 (process_target::thread_handle): Define.
438
439 Update the derived classes and callers below.
440
441 * linux-low.cc (linux_target_ops): Update.
442 (linux_process_target::thread_name): Define.
443 (linux_process_target::thread_handle): Define.
444 * linux-low.h (class linux_process_target): Update.
445 * lynx-low.cc (lynx_target_ops): Update.
446 * nto-low.cc (nto_target_ops): Update.
447 * win32-low.cc (win32_target_ops): Update.
448
449 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
450
451 Turn process_stratum_target's breakpoint_kind_from_pc,
452 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
453 ops into methods of process_target.
454
455 * target.h (struct process_stratum_target): Remove the target op.
456 (class process_target): Add the target op.
457 (target_breakpoint_kind_from_pc): Update the macro.
458 (target_breakpoint_kind_from_current_state): Update the macro.
459 (default_breakpoint_kind_from_pc): Remove declaration.
460 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
461 (process_target::breakpoint_kind_from_pc): ... this.
462 (process_target::breakpoint_kind_from_current_state): Define.
463
464 Update the derived classes and callers below.
465
466 * mem-break.cc (bp_size): Update.
467 (bp_opcode): Update.
468 * linux-low.cc (linux_target_ops): Update.
469 (linux_wait_1): Update.
470 (linux_breakpoint_kind_from_pc): Turn into ...
471 (linux_process_target::breakpoint_kind_from_pc): ... this.
472 (linux_sw_breakpoint_from_kind): Turn into ...
473 (linux_process_target::sw_breakpoint_from_kind): ... this.
474 (linux_breakpoint_kind_from_current_state): Turn into ...
475 (linux_process_target::breakpoint_kind_from_current_state): ... this.
476 * linux-low.h (class linux_process_target): Update.
477 * lynx-low.cc (lynx_target_ops): Update.
478 (lynx_process_target::sw_breakpoint_from_kind): Define.
479 * lynx-low.h (class lynx_process_target): Update.
480 * nto-low.cc (nto_target_ops): Update.
481 (nto_sw_breakpoint_from_kind): Turn into ...
482 (nto_process_target::sw_breakpoint_from_kind): ... this.
483 * nto-low.h (class nto_process_target): Update.
484 * win32-low.cc (win32_target_ops): Update.
485 (win32_sw_breakpoint_from_kind): Turn into ...
486 (win32_process_target::sw_breakpoint_from_kind): ... this.
487 * win32-low.h (class win32_process_target): Update.
488
489 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
490
491 Turn process_stratum_target's multifs_open, multifs_readlink,
492 multifs_unlink ops into methods of process_target.
493
494 * target.h (struct process_stratum_target): Remove the target ops.
495 (class process_target): Add the target ops. Also add
496 'supports_multifs'.
497 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
498 "sys/stat.h".
499 (process_target::supports_multifs): Define.
500 (process_target::multifs_open): Define.
501 (process_target::multifs_readlink): Define.
502 (process_target::multifs_unlink): Define.
503
504 Update the derived classes and callers below.
505
506 * hostio.cc (handle_setfs): Update.
507 (handle_open): Update.
508 (handle_unlink): Update.
509 (handle_readlink): Update.
510 * linux-low.cc (linux_target_ops): Update.
511 (linux_process_target::supports_multifs): Define.
512 (linux_process_target::multifs_open): Define.
513 (linux_process_target::multifs_readlink): Define.
514 (linux_process_target::multifs_unlink): Define.
515 * linux-low.h (class linux_process_target): Update.
516 * lynx-low.cc (lynx_target_ops): Update.
517 * nto-low.cc (nto_target_ops): Update.
518 * win32-low.cc (win32_target_ops): Update.
519
520 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
521
522 Turn process_stratum_target's pid_to_exec_file op into a method
523 of process_target.
524
525 * target.h (struct process_stratum_target): Remove the target op.
526 (class process_target): Add the target op. Also add
527 'supports_pid_to_exec_file'.
528 * target.cc (process_target::pid_to_exec_file): Define.
529 (process_target::supports_pid_to_exec_file): Define.
530
531 Update the derived classes and callers below.
532
533 * server.cc (handle_qxfer_exec_file): Update.
534 (handle_query): Update.
535 * linux-low.cc (linux_target_ops): Update.
536 (linux_process_target::supports_pid_to_exec_file): Define.
537 (linux_process_target::pid_to_exec_file): Define.
538 * linux-low.h (class linux_process_target): Update.
539 * lynx-low.cc (lynx_target_ops): Update.
540 * nto-low.cc (nto_target_ops): Update.
541 * win32-low.cc (win32_target_ops): Update.
542
543 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
544
545 Turn process_stratum_target's supports_range_stepping op into a
546 method of process_target.
547
548 * target.h (struct process_stratum_target): Remove the target op.
549 (class process_target): Add the target op.
550 (target_supports_range_stepping): Update the macro.
551 * target.cc (process_target::supports_range_stepping): Define.
552
553 Update the derived classes and callers below.
554
555 * linux-low.cc (linux_target_ops): Update.
556 (linux_supports_range_stepping): Turn into ...
557 (linux_process_target::supports_range_stepping): ... this.
558 * linux-low.h (class linux_process_target): Update.
559 * lynx-low.cc (lynx_target_ops): Update.
560 * nto-low.cc (nto_target_ops): Update.
561 * win32-low.cc (win32_target_ops): Update.
562
563 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
564
565 Turn process_stratum_target's btrace-related ops (enable_btrace,
566 disable_btrace, read_btrace, read_btrace_conf) into methods of
567 process_target.
568
569 * target.h (struct process_stratum_target): Remove the target ops.
570 (class process_target): Add the target ops.
571 (target_enable_btrace): Update.
572 (target_disable_btrace): Update.
573 (target_read_btrace): Update.
574 (target_read_btrace_conf): Update.
575 * target.cc (process_target::enable_btrace): Define.
576 (process_target::disable_btrace): Define.
577 (process_target::read_btrace): Define.
578 (process_target::read_btrace_conf): Define.
579
580 Update the derived classes and callers below.
581
582 * linux-low.cc (linux_target_ops): Update.
583 (linux_process_target:enable_btrace): Define as a wrapper around
584 linux_enable_btrace.
585 (linux_low_disable_btrace): Turn into ...
586 (linux_process_target::disable_btrace): ... this.
587 (linux_low_read_btrace): Turn into ...
588 (linux_process_target::read_btrace): ... this.
589 (linux_low_btrace_conf): Turn into ...
590 (linux_process_target::read_btrace_conf): ... this.
591 * linux-low.h (class linux_process_target): Update.
592 * lynx-low.cc (lynx_target_ops): Update.
593 * nto-low.cc (nto_target_ops): Update.
594 * win32-low.cc (win32_target_ops): Update.
595
596 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
597
598 Turn process_stratum_target's supports_agent op into a method of
599 process_target.
600
601 * target.h (struct process_stratum_target): Remove the target op.
602 (class process_target): Add the target op.
603 (target_supports_agent): Update the macro.
604 * target.cc (process_target::supports_agent): Define.
605
606 Update the derived classes and callers below.
607
608 * linux-low.cc (linux_target_ops): Update.
609 (linux_supports_agent): Turn into ...
610 (linux_process_target::supports_agent): ... this.
611 * linux-low.h (class linux_process_target): Update.
612 * lynx-low.cc (lynx_target_ops): Update.
613 * nto-low.cc (nto_target_ops): Update.
614 * win32-low.cc (win32_target_ops): Update.
615
616 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
617
618 Turn process_stratum_target's qxfer_libraries_svr4 op into a
619 method of process_target.
620
621 * target.h (struct process_stratum_target): Remove the target op.
622 (class process_target): Add the target op. Also add
623 'supports_qxfer_libraries_svr4'.
624 * target.cc (process_target::qxfer_libraries_svr4): Define.
625 (process_target::supports_qxfer_libraries_svr4): Define.
626
627 Update the derived classes and callers below.
628
629 * server.cc (handle_qxfer_libraries_svr4): Update.
630 (handle_query): Update.
631 * linux-low.cc (linux_target_ops): Update.
632 (linux_process_target::supports_qxfer_libraries_svr4): Define.
633 (linux_qxfer_libraries_svr4): Turn into ...
634 (linux_process_target::qxfer_libraries_svr4): ... this.
635 * linux-low.h (class linux_process_target): Update.
636 * lynx-low.cc (lynx_target_ops): Update.
637 * nto-low.cc (nto_target_ops): Update.
638 * win32-low.cc (win32_target_ops): Update.
639
640 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
641
642 Turn process_stratum_target's supports_disable_randomization op
643 into a method of process_target.
644
645 * target.h (struct process_stratum_target): Remove the target op.
646 (class process_target): Add the target op.
647 (target_supports_disable_randomization): Update the macro.
648 * target.cc (process_target::supports_disable_randomization): Define.
649
650 Update the derived classes and callers below.
651
652 * linux-low.cc (linux_target_ops): Update.
653 (linux_supports_disable_randomization): Turn into ...
654 (linux_process_target::supports_disable_randomization): ... this.
655 * linux-low.h (class linux_process_target): Update.
656 * lynx-low.cc (lynx_target_ops): Update.
657 * nto-low.cc (nto_target_ops): Update.
658 * win32-low.cc (win32_target_ops): Update.
659
660 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
661
662 Turn process_stratum_target's emit_ops op into a method of
663 process_target.
664
665 * target.h (struct process_stratum_target): Remove the target op.
666 (class process_target): Add the target op.
667 (target_emit_ops): Update the macro.
668 * target.cc (process_target::emit_ops): Define.
669
670 Update the derived classes and callers below.
671
672 * linux-low.cc (linux_target_ops): Update.
673 (linux_emit_ops): Turn into ...
674 (linux_process_target::emit_ops): ... this.
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 install_fast_tracepoint_jump_pad
683 and get_min_fast_tracepoint_insn_len ops into methods of
684 process_target.
685
686 * target.h (struct process_stratum_target): Remove the target ops.
687 (class process_target): Add the target ops. Also add
688 'supports_fast_tracepoints'.
689 (target_supports_fast_tracepoints): Update the macro.
690 (target_get_min_fast_tracepoint_insn_len): Update the macro.
691 (install_fast_tracepoint_jump_pad): Update and rename the macro
692 to ...
693 (target_install_fast_tracepoint_jump_pad): ... this.
694 * target.cc (process_target::supports_fast_tracepoints): Define.
695 (process_target::install_fast_tracepoint_jump_pad): Define.
696 (process_target::get_min_fast_tracepoint_insn_len): Define.
697
698 Update the derived classes and callers below.
699
700 * tracepoint.cc (install_fast_tracepoint): Update.
701 * linux-low.cc (linux_target_ops): Update.
702 (linux_process_target::supports_fast_tracepoints): Define.
703 (linux_install_fast_tracepoint_jump_pad): Turn into ...
704 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
705 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
706 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
707 * linux-low.h (class linux_process_target): Update.
708 * lynx-low.cc (lynx_target_ops): Update.
709 * nto-low.cc (nto_target_ops): Update.
710 * win32-low.cc (win32_target_ops): Update.
711
712 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
713
714 Turn process_stratum_target's stabilize_threads op into a
715 method of process_target.
716
717 * target.h (struct process_stratum_target): Remove the target op.
718 (class process_target): Add the target op.
719 (target_stabilize_threads): Update the macro.
720 * target.cc (process_target::stabilize_threads): Define.
721
722 Update the derived classes and callers below.
723
724 * server.cc (handle_status): Update.
725 * tracepoint.cc (cmd_qtdp): Update.
726 (cmd_qtstart): Update.
727 * linux-low.cc (linux_target_ops): Update.
728 (linux_stabilize_threads): Turn into ...
729 (linux_process_target::stabilize_threads): ... this.
730 (linux_wait_1): Update.
731 * linux-low.h (class linux_process_target): Update.
732 * lynx-low.cc (lynx_target_ops): Update.
733 * nto-low.cc (nto_target_ops): Update.
734 * win32-low.cc (win32_target_ops): Update.
735
736 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
737
738 Turn process_stratum_target's pause_all and unpause_all ops
739 into methods of process_target.
740
741 * target.h (struct process_stratum_target): Remove the target ops.
742 (class process_target): Add the target ops.
743 (pause_all): Update the macro and rename to...
744 (target_pause_all): ... this.
745 (unpause_all): Update the macro and rename to...
746 (target_unpause_all): ... this.
747 * target.cc (process_target::pause_all): Define.
748 (process_target::unpause_all): Define.
749
750 Update the derived classes and callers below.
751
752 * server.cc (handle_status): Update.
753 * tracepoint.cc (clear_installed_tracepoints): Update.
754 (cmd_qtdp): Update.
755 (cmd_qtstart): Update.
756 (stop_tracing): Update.
757 (cmd_qtstatus): Update.
758 (upload_fast_traceframes): Update.
759 (run_inferior_command): Update.
760 * linux-low.cc (linux_target_ops): Update.
761 (linux_pause_all): Turn into ...
762 (linux_process_target::pause_all): ... this.
763 (linux_unpause_all): Turn into ...
764 (linux_process_target::unpause_all): ... this.
765 (linux_process_target::prepare_to_access_memory): Update.
766 (linux_process_target::done_accessing_memory): Update.
767 * linux-low.h (class linux_process_target): Update.
768 * lynx-low.cc (lynx_target_ops): Update.
769 * nto-low.cc (nto_target_ops): Update.
770 * win32-low.cc (win32_target_ops): Update.
771
772 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
773
774 Turn process_stratum_target's get_tib_address op into a method of
775 process_target.
776
777 * target.h (struct process_stratum_target): Remove the target op.
778 (class process_target): Add the target op. Also add
779 'supports_get_tib_address'.
780 * target.cc (process_target::get_tib_address): Define.
781 (process_target::supports_get_tib_address): Define.
782
783 Update the derived classes and callers below.
784
785 * server.cc (handle_query): Update.
786 * linux-low.cc (win32_target_ops): Update.
787 * lynx-low.cc (lynx_target_ops): Update.
788 * nto-low.cc (nto_target_ops): Update.
789 * win32-low.cc (win32_target_ops): Update.
790 (win32_process_target::supports_get_tib_address): Define.
791 (win32_get_tib_address): Turn into ...
792 (win32_process_target::get_tib_address): ... this.
793 * win32-low.h (class win32_process_target): Update.
794
795 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
796
797 Turn process_stratum_target's thread_stopped op into a method of
798 process_target.
799
800 * target.h (struct process_stratum_target): Remove the target op.
801 (class process_target): Add the target op. Also add
802 'supports_thread_stopped'.
803 (target_thread_stopped): Update the macro.
804 * target.cc (process_target::thread_stopped): Define.
805 (process_target::supports_thread_stopped): Define.
806 (prepare_to_access_memory): Update.
807
808 Update the derived classes and callers below.
809
810 * server.cc (queue_stop_reply_callback): Update.
811 * linux-low.cc (linux_target_ops): Update.
812 (linux_process_target::supports_thread_stopped): Define.
813 (linux_thread_stopped): Turn into ...
814 (linux_process_target::thread_stopped): ... this.
815 * linux-low.h (class linux_process_target): Update.
816 * lynx-low.cc (lynx_target_ops): Update.
817 * nto-low.cc (nto_target_ops): Update.
818 * win32-low.cc (win32_target_ops): Update.
819
820 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
821
822 Turn process_stratum_target's read_pc and write_pc ops into
823 methods of process_target.
824
825 * target.h (struct process_stratum_target): Remove the target ops.
826 (class process_target): Add the target ops.
827 * target.cc (process_target::read_pc): Define.
828 (process_target::write_pc): Define.
829
830 Update the derived classes and callers below.
831
832 * regcache.cc (regcache_read_pc): Update.
833 (regcache_write_pc): Update.
834 * linux-low.cc (linux_target_ops): Update.
835 (linux_read_pc): Turn into ...
836 (linux_process_target::read_pc): ... this.
837 (linux_write_pc): Turn into ...
838 (linux_process_target::write_pc): ... this.
839 * linux-low.h (class linux_process_target): Update.
840 * lynx-low.cc (lynx_target_ops): Update.
841 * nto-low.cc (nto_target_ops): Update.
842 * win32-low.cc (win32_target_ops): Update.
843
844 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
845
846 Turn process_stratum_target's supports_tracepoints op into a
847 method of process_target.
848
849 * target.h (struct process_stratum_target): Remove the target op.
850 (class process_target): Add the target op.
851 (target_supports_tracepoints): Update the macro.
852 * target.cc (process_target::supports_tracepoints): Define.
853
854 Update the derived classes and callers below.
855
856 * linux-low.cc (linux_target_ops): Update.
857 (linux_supports_tracepoints): Turn into ...
858 (linux_process_target::supports_tracepoints): ... this.
859 * linux-low.h (class linux_process_target): Update.
860 * lynx-low.cc (lynx_target_ops): Update.
861 * nto-low.cc (nto_target_ops): Update.
862 * win32-low.cc (win32_target_ops): Update.
863
864 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
865
866 Turn process_stratum_target's process_qsupported op into a method
867 of process_target.
868
869 * target.h (struct process_stratum_target): Remove the target op.
870 (class process_target): Add the target op.
871 (target_process_qsupported): Update the macro.
872 * target.cc (process_target::process_qsupported): Define.
873
874 Update the derived classes and callers below.
875
876 * linux-low.cc (linux_target_ops): Update.
877 (linux_process_qsupported): Turn into ...
878 (linux_process_target::process_qsupported): ... this.
879 * linux-low.h (class linux_process_target): Update.
880 * lynx-low.cc (lynx_target_ops): Update.
881 * nto-low.cc (nto_target_ops): Update.
882 * win32-low.cc (win32_target_ops): Update.
883
884 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
885
886 Turn process_stratum_target's read_loadmap op into a method of
887 process_target.
888
889 * target.h (struct process_stratum_target): Remove the target op.
890 (class process_target): Add the target op. Also add
891 'supports_read_loadmap'.
892 * target.cc (process_target::read_loadmap): Define.
893 (process_target::supports_read_loadmap): Define.
894
895 Update the derived classes and callers below.
896
897 * server.cc (handle_qxfer_fdpic): Update.
898 (handle_query): Update.
899 * linux-low.cc (linux_target_ops): Update.
900 (linux_process_target::supports_read_loadmap): Define.
901 (linux_read_loadmap): Turn into ...
902 (linux_process_target::read_loadmap): ... this.
903 * linux-low.h (class linux_process_target): Update.
904 * lynx-low.cc (lynx_target_ops): Update.
905 * nto-low.cc (nto_target_ops): Update.
906 * win32-low.cc (win32_target_ops): Update.
907
908 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
909
910 Turn process_stratum_target's core_of_thread op into a method of
911 process_target.
912
913 * target.h (struct process_stratum_target): Remove the target op.
914 (class process_target): Add the target op.
915 (target_core_of_thread): Update the macro.
916 * target.cc (process_target::core_of_thread): Define.
917
918 Update the derived classes and callers below.
919
920 * linux-low.cc (linux_target_ops): Update.
921 (linux_process_target::core_of_thread): Define.
922 * linux-low.h (class linux_process_target): Update.
923 * lynx-low.cc (lynx_target_ops): Update.
924 * nto-low.cc (nto_target_ops): Update.
925 * win32-low.cc (win32_target_ops): Update.
926
927 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
928
929 Turn process_stratum_target's handle_monitor_command op into a
930 method of process_target.
931
932 * target.h (struct process_stratum_target): Remove the target op.
933 (class process_target): Add the target op.
934 (target_handle_monitor_command): Update the macro.
935 * target.cc (process_target::handle_monitor_command): Define.
936
937 Update the derived classes and callers below.
938
939 * server.cc (handle_query): Update.
940 * linux-low.cc (linux_target_ops): Update.
941 (linux_process_target::handle_monitor_command): Define.
942 * linux-low.h (class linux_process_target): Update.
943 * lynx-low.cc (lynx_target_ops): Update.
944 * nto-low.cc (nto_target_ops): Update.
945 * win32-low.cc (win32_target_ops): Update.
946
947 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
948
949 Turn process_stratum_target's handle_new_gdb_connection op into a
950 method of process_target.
951
952 * target.h (struct process_stratum_target): Remove the target op.
953 (class process_target): Add the target op.
954 (target_handle_new_gdb_connection): Update the macro.
955 * target.cc (process_target::handle_new_gdb_connection): Define.
956
957 Update the derived classes and callers below.
958
959 * linux-low.cc (linux_target_ops): Update.
960 (linux_handle_new_gdb_connection): Turn into ...
961 (linux_process_target::handle_new_gdb_connection): ... this.
962 * linux-low.h (class linux_process_target): Update.
963 * lynx-low.cc (lynx_target_ops): Update.
964 * nto-low.cc (nto_target_ops): Update.
965 * win32-low.cc (win32_target_ops): Update.
966
967 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
968
969 Turn process_stratum_target's supports_fork_events,
970 supports_vfork_events, and supports_exec_events ops into methods
971 of process_target.
972
973 * target.h (struct process_stratum_target): Remove the target ops.
974 (class process_target): Add the target ops.
975 (target_supports_fork_events): Update the macro.
976 (target_supports_vfork_events): Update the macro.
977 (target_supports_exec_events): Update the macro.
978 * target.cc (process_target::supports_fork_events): Define.
979 (process_target::supports_vfork_events): Define.
980 (process_target::supports_exec_events): Define.
981
982 Update the derived classes and callers below.
983
984 * linux-low.cc (linux_target_ops): Update.
985 (linux_supports_fork_events): Turn into ...
986 (linux_process_target::supports_fork_events): ... this.
987 (linux_supports_vfork_events): Turn into ...
988 (linux_process_target::supports_vfork_events): ... this.
989 (linux_supports_exec_events): Turn into ...
990 (linux_process_target::supports_exec_events): ... this.
991 * linux-low.h (class linux_process_target): Update.
992 * lynx-low.cc (lynx_target_ops): Update.
993 * nto-low.cc (nto_target_ops): Update.
994 * win32-low.cc (win32_target_ops): Update.
995
996 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
997
998 Turn process_stratum_target's supports_multi_process op into a
999 method of process_target.
1000
1001 * target.h (struct process_stratum_target): Remove the target op.
1002 (class process_target): Add the target op.
1003 * target.cc (process_target::supports_multi_process): Define.
1004 (target_supports_multi_process): Update.
1005
1006 Update the derived classes and callers below.
1007
1008 * linux-low.cc (linux_target_ops): Update.
1009 (linux_supports_multi_process): Turn into ...
1010 (linux_process_target::supports_multi_process): ... this.
1011 * linux-low.h (class linux_process_target): Update.
1012 * lynx-low.cc (lynx_target_ops): Update.
1013 * nto-low.cc (nto_target_ops): Update.
1014 * win32-low.cc (win32_target_ops): Update.
1015
1016 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1017
1018 Turn process_stratum_target's supports_non_stop, async, and
1019 start_non_stop ops into methods of process_target.
1020
1021 * target.h (struct process_stratum_target): Remove the target ops.
1022 (class process_target): Add the target ops.
1023 (target_supports_non_stop): Update the macro.
1024 (target_async): Update the macro.
1025 (start_non_stop): Remove declaration.
1026 * target.cc (process_target::supports_non_stop): Define.
1027 (process_target::async): Define.
1028 (process_target::start_non_stop): Define.
1029 (start_non_stop): Remove.
1030
1031 Update the derived classes and callers below.
1032
1033 * server.cc (handle_qxfer_siginfo): Update.
1034 (handle_query): Update.
1035 * linux-low.cc (linux_target_ops): Update.
1036 (linux_supports_non_stop): Turn into ...
1037 (linux_process_target::supports_non_stop): ... this.
1038 (linux_async): Turn into ...
1039 (linux_process_target::async): ... this.
1040 (linux_start_non_stop): Turn into ...
1041 (linux_process_target::start_non_stop): ... this.
1042 * linux-low.h (class linux_process_target): Update.
1043 * lynx-low.cc (lynx_target_ops): Update.
1044 * nto-low.cc (nto_target_ops): Update.
1045 (nto_supports_non_stop): Remove; rely on the default behavior
1046 instead.
1047 * win32-low.cc (win32_target_ops): Update.
1048
1049 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1050
1051 Turn process_stratum_target's qxfer_siginfo op into a method of
1052 process_target.
1053
1054 * target.h (struct process_stratum_target): Remove the target op.
1055 (class process_target): Add the target op. Also add
1056 'supports_qxfer_siginfo'.
1057 * target.cc (process_target::qxfer_siginfo): Define.
1058 (process_target::supports_qxfer_siginfo): Define.
1059
1060 Update the derived classes and callers below.
1061
1062 * server.cc (handle_qxfer_siginfo): Update.
1063 (handle_query): Update.
1064 * linux-low.cc (linux_target_ops): Update.
1065 (linux_process_target::supports_qxfer_siginfo): Define.
1066 (linux_xfer_siginfo): Turn into ...
1067 (linux_process_target::qxfer_siginfo): ... this.
1068 * linux-low.h (class linux_process_target): Update.
1069 * lynx-low.cc (lynx_target_ops): Update.
1070 * nto-low.cc (nto_target_ops): Update.
1071 * win32-low.cc (win32_target_ops): Update.
1072
1073 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1074
1075 Turn process_stratum_target's qxfer_osdata op into a method of
1076 process_target.
1077
1078 * target.h (struct process_stratum_target): Remove the target op.
1079 (class process_target): Add the target op. Also add
1080 'supports_qxfer_osdata'.
1081 * target.cc (process_target::qxfer_osdata): Define.
1082 (process_target::supports_qxfer_osdata): Define.
1083
1084 Update the derived classes and callers below.
1085
1086 * server.cc (handle_qxfer_osdata): Update.
1087 (handle_query): Update.
1088 * linux-low.cc (linux_target_ops): Update.
1089 (linux_process_target::supports_qxfer_osdata): Define.
1090 (linux_qxfer_osdata): Turn into ...
1091 (linux_process_target::qxfer_osdata): ... this.
1092 * linux-low.h (class linux_process_target): Update.
1093 * lynx-low.cc (lynx_target_ops): Update.
1094 * nto-low.cc (nto_target_ops): Update.
1095 * win32-low.cc (win32_target_ops): Update.
1096
1097 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1098
1099 Turn process_stratum_target's hostio_last_error op into a
1100 method of process_target.
1101
1102 * target.h (struct process_stratum_target): Remove the target op.
1103 (class process_target): Add the target op.
1104 * target.cc: Add "hostio.h" to includes.
1105 (process_target::hostio_last_error): Define.
1106
1107 Update the derived classes and callers below.
1108
1109 * hostio.cc (hostio_error): Update.
1110 * linux-low.cc: Remove "hostio.h" from includes.
1111 (linux_target_ops): Update.
1112 * lynx-low.cc (lynx_target_ops): Update.
1113 * nto-low.cc (nto_target_ops): Update.
1114 * win32-low.h (class win32_process_target): Update.
1115 * win32-low.cc (win32_target_ops): Update.
1116 (wince_hostio_last_error): Turn into ...
1117 (win32_process_target::hostio_last_error): ... this.
1118
1119 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1120
1121 Turn process_stratum_target's get_tls_address op into a method of
1122 process_target.
1123
1124 * target.h (struct process_stratum_target): Remove the target op.
1125 (class process_target): Add the target op. Also add
1126 'supports_get_tls_address'.
1127 * target.cc (process_target::get_tls_address): Define.
1128 (process_target::supports_get_tls_address): Define.
1129
1130 Update the derived classes and callers below.
1131
1132 * server.cc (handle_query): Update.
1133 * linux-low.cc (linux_target_ops): Update.
1134 (linux_process_target::supports_get_tls_address): Define.
1135 (linux_process_target::get_tls_address): Define.
1136 * linux-low.h (class linux_process_target): Update.
1137 * lynx-low.cc (lynx_target_ops): Update.
1138 * nto-low.cc (nto_target_ops): Update.
1139 * win32-low.cc (win32_target_ops): Update.
1140
1141 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1142
1143 Turn process_stratum_target's read_offsets op into a method of
1144 process_target.
1145
1146 * target.h (struct process_stratum_target): Remove the target op.
1147 (class process_target): Add the target op. Also add
1148 'supports_read_offsets'.
1149 * target.cc (process_target::read_offsets): Define.
1150 (process_target::supports_read_offsets): Define.
1151
1152 Update the derived classes and callers below.
1153
1154 * server.cc (handle_query): Update.
1155 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
1156 (linux_target_ops): Update.
1157 (linux_process_target::supports_read_offsets): Define.
1158 (linux_read_offsets): Turn into ...
1159 (linux_process_target::read_offsets): ... this.
1160 * linux-low.h (class linux_process_target): Update.
1161 * lynx-low.cc (lynx_target_ops): Update.
1162 * nto-low.cc (nto_target_ops): Update.
1163 * win32-low.cc (win32_target_ops): Update.
1164
1165 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1166
1167 Turn process_stratum_target's stopped_by_watchpoint and
1168 stopped_data_address ops into methods of process_target.
1169
1170 * target.h (struct process_stratum_target): Remove the target ops.
1171 (class process_target): Add the target ops.
1172 * target.cc (process_target::stopped_by_watchpoint): Define.
1173 (process_target::stopped_data_address): Define.
1174
1175 Update the derived classes and callers below.
1176
1177 * remote-utils.cc (prepare_resume_reply): Update.
1178 * linux-low.cc (linux_target_ops): Update.
1179 (linux_stopped_by_watchpoint): Turn into ...
1180 (linux_process_target::stopped_by_watchpoint): ... this.
1181 (linux_stopped_data_address): Turn into ...
1182 (linux_process_target::stopped_data_address): ... this.
1183 * linux-low.h (class linux_process_target): Update.
1184 * lynx-low.cc (lynx_target_ops): Update.
1185 * nto-low.cc (nto_target_ops): Update.
1186 (nto_stopped_by_watchpoint): Turn into ...
1187 (nto_process_target::stopped_by_watchpoint): ... this.
1188 (nto_stopped_data_address): Turn into ...
1189 (nto_process_target::stopped_data_address): ... this.
1190 * nto-low.h (class nto_process_target): Update.
1191 * win32-low.cc (win32_target_ops): Update.
1192 (win32_stopped_by_watchpoint): Turn into ...
1193 (win32_process_target::stopped_by_watchpoint): ... this.
1194 (win32_stopped_data_address): Turn into ...
1195 (win32_process_target::stopped_data_address): ... this.
1196 * win32-low.h (class win32_process_target): Update.
1197
1198 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1199
1200 Turn process_stratum_target's supports_hardware_single_step op into
1201 a method of process_target.
1202
1203 * target.h (struct process_stratum_target): Remove the target op.
1204 (class process_target): Add the target op.
1205 (target_supports_hardware_single_step): Update the macro.
1206 (target_can_do_hardware_single_step): Remove declaration.
1207 * target.cc (process_target::supports_hardware_single_step): Define.
1208 (target_can_do_hardware_single_step): Remove.
1209
1210 Update the derived classes and callers below.
1211
1212 * linux-low.h (class linux_process_target): Update.
1213 * linux-low.cc (linux_target_ops): Update.
1214 (linux_supports_hardware_single_step): Turn into ...
1215 (linux_process_target::supports_hardware_single_step): ... this.
1216 * lynx-low.h (class lynx_process_target): Update.
1217 * lynx-low.cc (lynx_target_ops): Update.
1218 (lynx_process_target::supports_hardware_single_step): Define.
1219 * nto-low.h (class nto_process_target): Update.
1220 * nto-low.cc (nto_target_ops): Update.
1221 (nto_process_target::supports_hardware_single_step): Define.
1222 * win32-low.h (class win32_process_target): Update.
1223 * win32-low.cc (win32_target_ops): Update.
1224 (win32_process_target::supports_hardware_single_step): Define.
1225
1226 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1227
1228 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
1229 ops into methods of process_target.
1230
1231 * target.h (struct process_stratum_target): Remove the target ops.
1232 (class process_target): Add the target ops.
1233 (target_stopped_by_hw_breakpoint): Update the macro.
1234 (target_supports_stopped_by_hw_breakpoint): Update the macro.
1235 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
1236 (process_target::supports_stopped_by_hw_breakpoint): Define.
1237
1238 Update the derived classes and callers below.
1239
1240 * linux-low.cc (linux_target_ops): Update.
1241 (linux_stopped_by_hw_breakpoint): Turn into ...
1242 (linux_process_target::stopped_by_hw_breakpoint): ... this.
1243 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
1244 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
1245 * linux-low.h (class linux_process_target): Update.
1246 * lynx-low.cc (lynx_target_ops): Update.
1247 * nto-low.cc (nto_target_ops): Update.
1248 * win32-low.cc (win32_target_ops): Update.
1249
1250 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1251
1252 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
1253 ops into methods of process_target.
1254
1255 * target.h (struct process_stratum_target): Remove the target ops.
1256 (class process_target): Add the target ops.
1257 (target_stopped_by_sw_breakpoint): Update the macro.
1258 (target_supports_stopped_by_sw_breakpoint): Update the macro.
1259 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
1260 (process_target::supports_stopped_by_sw_breakpoint): Define.
1261
1262 Update the derived classes and callers below.
1263
1264 * linux-low.cc (linux_target_ops): Update.
1265 (linux_stopped_by_sw_breakpoint): Turn into ...
1266 (linux_process_target::stopped_by_sw_breakpoint): ... this.
1267 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
1268 (linux_process_target::supports_stopped_by_sw_breakpoint): ... 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 * win32-low.cc (win32_target_ops): Update.
1273
1274 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1275
1276 Turn process_stratum_target's insert_point and remove_point ops
1277 into methods of process_target.
1278
1279 * target.h (struct process_stratum_target): Remove the target ops.
1280 (class process_target): Add the target ops.
1281 * target.cc (process_target::insert_point): Define.
1282 (process_target::remove_point): Define.
1283
1284 Update the derived classes and callers below.
1285
1286 * mem-break.cc (set_raw_breakpoint_at): Update.
1287 (delete_raw_breakpoint): Update.
1288 (uninsert_raw_breakpoint): Update.
1289 (reinsert_raw_breakpoint): Update.
1290 * linux-low.cc (linux_target_ops): Update.
1291 (linux_insert_point): Turn into ...
1292 (linux_process_target::insert_point): ... this.
1293 (linux_remove_point): Turn into ...
1294 (linux_process_target::remove_point): ... this.
1295 * linux-low.h (class linux_process_target): Update.
1296 * lynx-low.cc (lynx_target_ops): Update.
1297 * nto-low.cc (nto_target_ops): Update.
1298 (nto_insert_point): Turn into ...
1299 (nto_process_target::insert_point): ... this.
1300 (nto_remove_point): Turn into ...
1301 (nto_process_target::remove_point): ... this.
1302 * nto-low.h (class nto_process_target): Update.
1303 * win32-low.cc (win32_target_ops): Update.
1304 (win32_insert_point): Turn into ...
1305 (win32_process_target::insert_point): ... this.
1306 (win32_remove_point): Turn into ...
1307 (win32_process_target::remove_point): ... this.
1308 * win32-low.h (class win32_process_target): Update.
1309
1310 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1311
1312 Turn process_stratum_target's supports_z_point_type op into a
1313 method of process_target.
1314
1315 * target.h (struct process_stratum_target): Remove the target op.
1316 (class process_target): Add the target op.
1317 * target.cc (process_target::supports_z_point_type): Define.
1318
1319 Update the derived classes and callers below.
1320
1321 * mem-break.cc (z_type_supported): Update.
1322 * linux-low.cc (linux_target_ops): Update.
1323 (linux_supports_z_point_type): Turn into ...
1324 (linux_process_target::supports_z_point_type): ... this.
1325 * linux-low.h (class linux_process_target): Update.
1326 * lynx-low.cc (lynx_target_ops): Update.
1327 * nto-low.cc (nto_target_ops): Update.
1328 (nto_supports_z_point_type): Turn into ...
1329 (nto_process_target::supports_z_point_type): ... this.
1330 * nto-low.h (class nto_process_target): Update.
1331 * win32-low.cc (win32_target_ops): Update.
1332 (win32_supports_z_point_type): Turn into ...
1333 (win32_process_target::supports_z_point_type): ... this.
1334 * win32-low.h (class win32_process_target): Update.
1335
1336 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1337
1338 Turn process_stratum_target's read_auxv op into a method of
1339 process_target.
1340
1341 * target.h (class process_stratum_target): Remove the target op.
1342 (struct process_target): Add the target op. Also add
1343 'supports_read_auxv'.
1344 * target.cc (process_target::read_auxv): Define.
1345 (process_target::supports_read_auxv): Define.
1346
1347 Update the derived classes and callers below.
1348
1349 * server.cc (handle_qxfer_auxv): Update.
1350 (handle_query): Update.
1351 * linux-low.cc (linux_target_ops): Update.
1352 (linux_process_target::supports_read_auxv): Define.
1353 (linux_read_auxv): Turn into ...
1354 (linux_process_target::read_auxv): ... this.
1355 * linux-low.h (class linux_process_target): Update.
1356 * lynx-low.cc (lynx_target_ops): Update.
1357 * nto-low.cc (nto_target_ops): Update.
1358 (nto_process_target::supports_read_auxv): Define.
1359 (nto_read_auxv): Turn into ...
1360 (nto_process_target::read_auxv): ... this.
1361 * nto-low.h (class nto_process_target): Update.
1362 * win32-low.cc (win32_target_ops): Update.
1363
1364 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1365
1366 Turn process_stratum_target's request_interrupt op into a method of
1367 process_target.
1368
1369 * target.h (struct process_stratum_target): Remove the target op.
1370 (class process_target): Add the target op.
1371
1372 Update the derived classes and callers below.
1373
1374 * remote-utils.cc (putpkt_binary_1): Update.
1375 (input_interrupt): Update.
1376 (getpkt): Update.
1377 * server.cc (handle_v_requests): Update.
1378 * linux-low.cc (linux_target_ops): Update.
1379 (linux_request_interrupt): Turn into ...
1380 (linux_process_target::request_interrupt): ... this.
1381 * linux-low.h (class linux_process_target): Update.
1382 * lynx-low.cc (lynx_target_ops): Update.
1383 (lynx_request_interrupt): Turn into ...
1384 (lynx_process_target::request_interrupt): ... this.
1385 * lynx-low.h (class lynx_process_target): Update.
1386 * nto-low.cc (nto_target_ops): Update.
1387 (nto_request_interrupt): Turn into ...
1388 (nto_process_target::request_interrupt): ... this.
1389 * nto-low.h (class nto_process_target): Update.
1390 * win32-low.cc (win32_target_ops): Update.
1391 (win32_request_interrupt): Turn into ...
1392 (win32_process_target::request_interrupt): ... this.
1393 * win32-low.h (class win32_process_target): Update.
1394
1395 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1396
1397 Turn process_stratum_target's look_up_symbols op into a method of
1398 process_target.
1399
1400 * target.h (struct process_stratum_target): Remove the target op.
1401 (class process_target): Add the target op.
1402 * target.cc (process_target::look_up_symbols): Define.
1403
1404 Update the derived classes and callers below.
1405
1406 * server.cc (handle_query): Update.
1407 * linux-low.cc (linux_target_ops): Update.
1408 (linux_look_up_symbols): Turn into ...
1409 (linux_process_target::look_up_symbols): ... this.
1410 * linux-low.h (class linux_process_target): Update.
1411 * lynx-low.cc (lynx_target_ops): Update.
1412 * nto-low.cc (nto_target_ops): Update.
1413 * win32-low.cc (win32_target_ops): Update.
1414
1415 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1416
1417 Turn process_stratum_target's read_memory and write_memory
1418 ops into methods of process_target.
1419
1420 * target.h (struct process_stratum_target): Remove the target ops.
1421 (class process_target): Add the target ops.
1422
1423 Update the derived classes and callers below.
1424
1425 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
1426 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
1427 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
1428 (arm_get_syscall_trapinfo): Update.
1429 * linux-cris-low.cc (cris_breakpoint_at): Update.
1430 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
1431 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
1432 * linux-mips-low.cc (mips_breakpoint_at): Update.
1433 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
1434 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
1435 * linux-sh-low.cc (sh_breakpoint_at): Update.
1436 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
1437 (sparc_store_gregset_from_stack): Update.
1438 (sparc_breakpoint_at): Update.
1439 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
1440 * linux-tile-low.cc (tile_breakpoint_at): Update.
1441 * linux-x86-low.cc (x86_breakpoint_at): Update.
1442 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
1443 * mem-brea.cc (insert_memory_breakpoint): Update.
1444 (validate_inserted_breakpoint): Update.
1445 * target.cc (read_inferior_memory): Update.
1446 (target_write_memory): Update.
1447 * linux-low.cc (linux_target_ops): Update.
1448 (linux_read_memory): Make a wrapper around the read_memory target
1449 op call.
1450 (linux_process_target::read_memory): Rename from linux_read_memory.
1451 (linux_write_memory): Turn into ...
1452 (linux_process_target::write_memory): ... this.
1453 * linux-low.h (class linux_process_target): Update.
1454 * lynx-low.cc (lynx_target_ops): Update.
1455 (lynx_read_memory): Turn into ...
1456 (lynx_process_target::read_memory): ... this.
1457 (lynx_write_memory): Turn into ...
1458 (lynx_process_target::write_memory): ... this.
1459 * lynx-low.h (class lynx_process_target): Update.
1460 * nto-low.cc (nto_target_ops): Update.
1461 (nto_read_memory): Turn into ...
1462 (nto_process_target::read_memory): ... this.
1463 (nto_write_memory): Turn into ...
1464 (nto_process_target::write_memory): ... this.
1465 * nto-low.h (class nto_process_target): Update.
1466 * win32-low.cc (win32_target_ops): Update.
1467 (win32_read_inferior_memory): Turn into ...
1468 (win32_process_target::read_memory): ... this.
1469 (win32_write_inferior_memory): Turn into ...
1470 (win32_process_target::write_memory): ... this.
1471 * win32-low.h (class win32_process_target): Update.
1472
1473 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1474
1475 Turn process_stratum_target's prepare_to_access_memory and
1476 done_accessing_memory ops into methods of process_target.
1477
1478 * target.h (struct process_stratum_target): Remove the target ops.
1479 (class process_target): Add the target ops.
1480 * target.cc (process_target::prepare_to_access_memory): Define.
1481 (process_target::done_accessing_memory): Define.
1482 (prepare_to_access_memory): Update.
1483 (done_accessing_memory): Update.
1484
1485 Update the derived classes and callers below.
1486
1487 * linux-low.cc (linux_target_ops): Update.
1488 (linux_prepare_to_access_memory): Turn into ...
1489 (linux_process_target::prepare_to_access_memory): ... this.
1490 (linux_done_accessing_memory): Turn into ...
1491 (linux_process_target::done_accessing_memory): ... this.
1492 * linux-low.h (class linux_process_target): Update.
1493 * lynx-low.cc (lynx_target_ops): Update.
1494 * nto-low.cc (nto_target_ops): Update.
1495 * win32-low.cc (win32_target_ops): Update.
1496
1497 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1498
1499 Turn process_stratum_target's fetch_registers and store_registers
1500 ops into methods of process_target.
1501
1502 * target.h (struct process_stratum_target): Remove the target ops.
1503 (class process_target): Add the target ops.
1504 (fetch_inferior_registers): Update the macro.
1505 (store_inferior_registers): Update the macro.
1506
1507 Update the derived classes and callers below.
1508
1509 * linux-low.cc (linux_target_ops): Update.
1510 (linux_fetch_registers): Turn into ...
1511 (linux_process_target::fetch_registers): ... this.
1512 (linux_store_registers): Turn into ...
1513 (linux_process_target::store_registers): ... this.
1514 * linux-low.h (class linux_process_target): Update.
1515 * lynx-low.cc (lynx_target_ops): Update.
1516 (lynx_fetch_registers): Turn into ...
1517 (lynx_process_target::fetch_registers): ... this.
1518 (lynx_store_registers): Turn into ...
1519 (lynx_process_target::store_registers): ... this.
1520 * lynx-low.h (class lynx_process_target): Update.
1521 * nto-low.cc (nto_target_ops): Update.
1522 (nto_fetch_registers): Turn into ...
1523 (nto_process_target::fetch_registers): ... this.
1524 (nto_store_registers): Turn into ...
1525 (nto_process_target::store_registers): ... this.
1526 * nto-low.h (class nto_process_target): Update.
1527 * win32-low.cc (win32_target_ops): Update.
1528 (win32_fetch_inferior_registers): Turn into ...
1529 (win32_process_target::fetch_registers): ... this.
1530 (win32_store_inferior_registers): Turn into ...
1531 (win32_process_target::store_registers): ... this.
1532 * win32-low.h (class win32_process_target): Update.
1533
1534 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1535
1536 Turn process_stratum_target's wait op into a method of
1537 process_target.
1538
1539 * target.h (struct process_stratum_target): Remove the target op.
1540 (class process_target): Add the target op.
1541
1542 Update the derived classes and callers below.
1543
1544 * target.cc (target_wait): Update.
1545 * linux-low.cc (linux_target_ops): Update.
1546 (linux_wait): Turn into ...
1547 (linux_process_target::wait): ... this.
1548 * linux-low.h (class linux_process_target): Update.
1549 * lynx-low.cc (lynx_target_ops): Update.
1550 (lynx_wait): Turn into ...
1551 (lynx_process_target::wait): ... this.
1552 * lynx-low.h (class lynx_process_target): Update.
1553 * nto-low.cc (nto_target_ops): Update.
1554 (nto_wait): Turn into ...
1555 (nto_process_target::wait): ... this.
1556 * nto-low.h (class nto_process_target): Update.
1557 * win32-low.cc (win32_target_ops): Update.
1558 (win32_wait): Turn into ...
1559 (win32_process_target::wait): ... this.
1560 (do_initial_child_stuff): Update.
1561 * win32-low.h (class win32_process_target): Update.
1562
1563 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1564
1565 Turn process_stratum_target's resume op into a method of
1566 process_target.
1567
1568 * target.h (struct process_stratum_target): Remove the target op.
1569 (class process_target): Add the target op.
1570
1571 Update the derived classes and callers below.
1572
1573 * server.cc (resume): Update.
1574 * target.cc (target_stop_and_wait): Update.
1575 (target_continue_no_signal): Update.
1576 (target_continue): Update.
1577 * linux-low.cc (linux_target_ops): Update.
1578 (linux_resume): Turn into ...
1579 (linux_process_target::resume): ... this.
1580 * linux-low.h (class linux_process_target): Update.
1581 * lynx-low.cc (lynx_target_ops): Update.
1582 (lynx_resume): Turn into ...
1583 (lynx_process_target::resume): ... this.
1584 * lynx-low.h (class lynx_process_target): Update.
1585 * nto-low.cc (nto_target_ops): Update.
1586 (nto_resume): Turn into ...
1587 (nto_process_target::resume): ... this.
1588 * nto-low.h (class nto_process_target): Update.
1589 * win32-low.cc (win32_target_ops): Update.
1590 (win32_resume): Turn into ...
1591 (win32_process_target::resume): ... this.
1592 (win32_process_target::detach): Update.
1593 (do_initial_child_stuff): Update.
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 thread_alive 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 (mythread_alive): Update the macro.
1604
1605 Update the derived classes and callers below.
1606
1607 * linux-low.cc (linux_target_ops): Update.
1608 (linux_thread_alive): Turn into ...
1609 (linux_process_target::thread_alive): ... this.
1610 (wait_for_sigstop): Update.
1611 * linux-low.h (class linux_process_target): Update.
1612 * lynx-low.cc (lynx_target_ops): Update.
1613 (lynx_thread_alive): Turn into ...
1614 (lynx_process_target::thread_alive): ... this.
1615 * lynx-low.h (class lynx_process_target): Update.
1616 * nto-low.cc (nto_target_ops): Update.
1617 (nto_thread_alive): Turn into ...
1618 (nto_process_target::thread_alive): ... this.
1619 * nto-low.h (class nto_process_target): Update.
1620 * win32-low.cc (win32_target_ops): Update.
1621 (win32_thread_alive): Turn into ...
1622 (win32_process_target::thread_alive): ... this.
1623 * win32-low.h (class win32_process_target): Update.
1624
1625 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1626
1627 Turn process_stratum_target's join op into a method of
1628 process_target.
1629
1630 * target.h (struct process_stratum_target): Remove the target op.
1631 (class process_target): Add the target op.
1632 (join_inferior): Update the macro.
1633
1634 Update the derived classes and callers below.
1635
1636 * linux-low.cc (linux_target_ops): Update.
1637 (linux_join): Turn into ...
1638 (linux_process_target::join): ... this.
1639 * linux-low.h (class linux_process_target): Update.
1640 * lynx-low.cc (lynx_target_ops): Update.
1641 (lynx_join): Turn into ...
1642 (lynx_process_target::join): ... this.
1643 * lynx-low.h (class lynx_process_target): Update.
1644 * nto-low.cc (nto_target_ops): Update.
1645 (nto_process_target::join): Define.
1646 * nto-low.h (class nto_process_target): Update.
1647 * win32-low.cc (win32_target_ops): Update.
1648 (win32_join): Turn into ...
1649 (win32_process_target::join): ... this.
1650 * win32-low.h (class win32_process_target): Update.
1651
1652 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1653
1654 Turn process_stratum_target's mourn op into a method of
1655 process_target.
1656
1657 * target.h (struct process_stratum_target): Remove the target op.
1658 (class process_target): Add the target op.
1659
1660 Update the derived classes and callers below.
1661
1662 * target.cc (target_mourn_inferior): Update.
1663 * linux-low.cc (linux_target_ops): Update.
1664 (linux_mourn): Turn into ...
1665 (linux_process_target::mourn): ... this.
1666 (handle_extended_wait): Update.
1667 (linux_process_target::kill): Update.
1668 (linux_process_target::detach): Update.
1669 * linux-low.h (class linux_process_target): Update.
1670 * lynx-low.cc (lynx_target_ops): Update.
1671 (lynx_mourn): Turn into ...
1672 (lynx_process_target::mourn): ... this.
1673 * lynx-low.h (class lynx_process_target): Update.
1674 * nto-low.cc (nto_target_ops): Update.
1675 (nto_mourn): Turn into ...
1676 (nto_process_target::mourn): ... this.
1677 * nto-low.h (class nto_process_target): Update.
1678 * win32-low.cc (win32_target_ops): Update.
1679 (win32_mourn): Turn into ...
1680 (win32_process_target::mourn): ... 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 detach 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 (detach_inferior): Update the macro.
1691
1692 Update the derived classes and callers below.
1693
1694 * linux-low.cc (linux_target_ops): Update.
1695 (linux_detach): Turn into ...
1696 (linux_process_target::detach): ... this.
1697 * linux-low.h (class linux_process_target): Update.
1698 * lynx-low.cc (lynx_target_ops): Update.
1699 (lynx_detach): Turn into ...
1700 (lynx_process_target::detach): ... this.
1701 * lynx-low.h (class lynx_process_target): Update.
1702 * nto-low.cc (nto_target_ops): Update.
1703 (nto_detach): Turn into ...
1704 (nto_process_target::detach): ... this.
1705 * nto-low.h (class nto_process_target): Update.
1706 * win32-low.cc (win32_target_ops): Update.
1707 (win32_detach): Turn into ...
1708 (win32_process_target::detach): ... 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 kill op into a method of
1714 process_target.
1715
1716 * target.h (struct process_stratum_target): Remove the target op.
1717 (class process_target): Add the target op.
1718
1719 Update the derived classes and callers below.
1720
1721 * target.cc (kill_inferior): Update.
1722 * linux-low.cc (linux_target_ops): Update.
1723 (linux_kill): Turn into ...
1724 (linux_process_target::kill): ... this.
1725 * linux-low.h (class linux_process_target): Update.
1726 * lynx-low.cc (lynx_target_ops): Update.
1727 (lynx_kill): Turn into ...
1728 (lynx_process_target::kill): ... this.
1729 * lynx-low.h (class lynx_process_target): Update.
1730 * nto-low.cc (nto_target_ops): Update.
1731 (nto_kill): Turn into ...
1732 (nto_process_target::kill): ... this.
1733 * nto-low.h (class nto_process_target): Update.
1734 * win32-low.cc (win32_target_ops): Update.
1735 (win32_kill): Turn into ...
1736 (win32_process_target::kill): ... this.
1737 * win32-low.h (class win32_process_target): Update.
1738
1739 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1740
1741 Turn process_stratum_target's attach op into a method of
1742 process_target.
1743
1744 * target.h (struct process_stratum_target): Remove the target op.
1745 (class process_target): Add the target op.
1746 (myattach): Update the macro.
1747
1748 Update the derived classes and callers below.
1749
1750 * linux-low.cc (linux_target_ops): Update.
1751 (linux_attach): Turn into ...
1752 (linux_process_target::attach): ... this.
1753 * linux-low.h (class linux_process_target): Update.
1754 * lynx-low.cc (lynx_target_ops): Update.
1755 (lynx_attach): Turn into ...
1756 (lynx_process_target::attach): ... this.
1757 * lynx-low.h (class lynx_process_target): Update.
1758 * nto-low.cc (nto_target_ops): Update.
1759 (nto_attach): Turn into ...
1760 (nto_process_target::attach): ... this.
1761 * nto-low.h (class nto_process_target): Update.
1762 * win32-low.cc (win32_target_ops): Update.
1763 (win32_attach): Turn into ...
1764 (win32_process_target::attach): ... this.
1765 * win32-low.h (class win32_process_target): Update.
1766
1767 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1768
1769 Turn process_stratum_target's post_create_inferior op into a method
1770 of process_target.
1771
1772 * target.h (struct process_stratum_target): Remove the target op.
1773 (class process_target): Add the target op.
1774 (target_post_create_inferior): Update the macro.
1775 * target.cc (process_target::post_create_inferior): Define.
1776
1777 Update the derived classes and callers below.
1778
1779 * linux-low.cc (linux_target_ops): Update.
1780 (linux_post_create_inferior): Turn into ...
1781 (linux_process_target::post_create_inferior): ... this.
1782 * linux-low.h (class linux_process_target): Update.
1783 * lynx-low.cc (lynx_target_ops): Update.
1784 * nto-low.cc (nto_target_ops): Update.
1785 * win32-low.cc (win32_target_ops): Update.
1786
1787 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1788
1789 Turn process_stratum_target's create_inferior op into a method of
1790 process_target.
1791
1792 * target.h (struct process_stratum_target): Remove the target op.
1793 (class process_target): Add the target op.
1794 (create_inferior): Rename the macro to ...
1795 (target_create_inferior): ... this.
1796
1797 Update the derived classes and callers below.
1798
1799 * server.cc (handle_v_run): Update.
1800 (captured_main): Update.
1801 (process_serial_event): Update.
1802 * linux-low.cc (linux_target_ops): Update.
1803 (linux_create_inferior): Turn into ...
1804 (linux_process_target::create_inferior): ... this.
1805 * linux-low.h (class linux_process_target): Update.
1806 * lynx-low.cc (lynx_target_ops): Update.
1807 (lynx_create_inferior): Turn into ...
1808 (lynx_process_target::create_inferior): ... this.
1809 * lynx-low.h (class lynx_process_target): Update.
1810 * nto-low.cc (nto_target_ops): Update.
1811 (nto_create_inferior): Turn into ...
1812 (nto_process_target::create_inferior): ... this.
1813 * nto-low.h (class nto_process_target): Update.
1814 * win32-low.cc (win32_target_ops): Update.
1815 (win32_create_inferior): Turn into ...
1816 (win32_process_target::create_inferior): ... this.
1817 * win32-low.h (class win32_process_target): Update.
1818
1819 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1820
1821 * target.h (class process_target): New class definition.
1822 (struct process_stratum_target) <pt>: New field with type
1823 'process_target*'.
1824 * linux-low.h (class linux_process_target): Define as a derived
1825 class of 'process_target'.
1826 * linux-low.cc (linux_target_ops): Add a linux_process_target*
1827 as the 'pt' field.
1828 * lynx-low.h (class lynx_process_target): Define as a derived
1829 class of 'process_target'.
1830 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
1831 as the 'pt' field.
1832 * nto-low.h (class nto_process_target): Define as a derived
1833 class of 'process_target'.
1834 * nto-low.cc (nto_target_ops): Add an nto_process_target*
1835 as the 'pt' field.
1836 * win32-low.h (class win32_process_target): Define as a derived
1837 class of 'process_target'.
1838 * win32-low.cc (win32_target_ops): Add a win32_process_target*
1839 as the 'pt' field.
1840
1841 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
1842
1843 * configure: Regenerate.
1844
1845 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
1846 Andrew Burgess <andrew.burgess@embecosm.com>
1847
1848 * linux-riscv-low.cc: New file.
1849 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
1850 and nat/riscv-linux-tdesc.c.
1851 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
1852 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
1853 Define.
1854
1855 2020-02-14 Tom Tromey <tom@tromey.com>
1856
1857 * acinclude.m4: Don't include acx_configure_dir.m4.
1858 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
1859 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
1860 (all, install-only, uninstall, clean-info, clean)
1861 (maintainer-clean): Don't recurse.
1862 (subdir_do, all-lib): Remove.
1863 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
1864 (GNULIB_H): Remove.
1865 (generated_files): Update.
1866 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
1867 * configure: Rebuild.
1868 * configure.ac: Don't configure gnulib or libiberty.
1869 (GNULIB): Update.
1870
1871 2020-02-14 Eli Zaretskii <eliz@gnu.org>
1872
1873 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
1874 preparing the command line for CreateProcess.
1875 (win32_create_inferior): Reflect the program name in debugging
1876 output that shows the process and its command line.
1877
1878 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1879
1880 * Makefile.in: Rename source files from .c to .cc.
1881 * %.c: Rename to %.cc.
1882 * configure.ac: Rename server.c to server.cc.
1883 * configure: Re-generate.
1884
1885 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
1886
1887 * Makefile.in: Rename gdbsupport source files from .c to .cc.
1888
1889 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
1890
1891 * win32-low.c (win32_create_inferior): Set signal_pid.
1892
1893 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
1894 Pedro Alves <palves@redhat.com>
1895
1896 Skip building gdbserver in a cross-configuration.
1897 * configure.srv: Set $gdbserver_host depending on whether $target
1898 is $host. Use $gdbserver_host instead of $host.
1899
1900 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1901
1902 * configure: Re-generate.
1903
1904 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1905
1906 * configure: Re-generate.
1907
1908 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
1909
1910 * acinclude.m4: Update warning.m4 path.
1911
1912 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
1913
1914 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
1915 (handle_exception): Set siginfo_er.
1916 (win32_xfer_siginfo): New function.
1917
1918 2020-02-07 Tom Tromey <tom@tromey.com>
1919 Pedro Alves <palves@redhat.com>
1920
1921 * README: Update build documentation.
1922 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
1923 host, not target.
1924 * configure.ac: Update paths.
1925 * configure: Rebuild.
1926 * acinclude.m4: Update paths.
1927 * Makefile.in: Update include paths.
1928 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
1929 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
1930 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
1931 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
1932 (%-generated.c): Update paths.
1933 * Move entire directory from ../gdb/gdbserver.
1934
1935 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
1936
1937 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
1938
1939 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1940
1941 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
1942 assignment instead of srv_linux_obj.
1943
1944 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
1945
1946 * server.c (handle_qxfer_libraries): Write segment-address with
1947 paddress.
1948
1949 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
1950
1951 * Makefile.in (install-strip): New target.
1952 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
1953 * aclocal.m4: Regenerate.
1954 * configure: Regenerate.
1955 * configure.ac: Add AM_PROG_INSTALL_STRIP.
1956
1957 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1958
1959 * Makefile.in (SFILES): Adjust paths to point to real files.
1960 (OBS): Move waitstatus.o to target/waitstatus.o.
1961 (TAGS): Transform paths appropriately.
1962 (%.o): Rename to...
1963 (nat/%.o): ... this pattern rule.
1964 (%.o): Rename to...
1965 (target/%.o): ... this pattern rule.
1966 * configure.srv: Adjust paths throughout to include nat/ prefix
1967 with the revant files.
1968 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
1969 * configure: Regenerate.
1970
1971 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1972
1973 * Makefile.in (TAGS): Remove config files from the recipe.
1974
1975 2020-01-14 Tom Tromey <tom@tromey.com>
1976
1977 * configure: Rebuild.
1978 * configure.ac: Remove any checks that were added to common.m4.
1979 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
1980 lib-link.m4.
1981
1982 2020-01-14 Tom Tromey <tom@tromey.com>
1983
1984 * server.h: Include config.h.
1985 * gdbreplay.c: Include config.h.
1986 * configure: Rebuild.
1987 * configure.ac: Don't source common.host.
1988 * acinclude.m4: Update path.
1989 * Makefile.in (INCSUPPORT): New variable.
1990 (INCLUDE_CFLAGS): Add INCSUPPORT.
1991 (SFILES): Update paths.
1992 (version-generated.c): Update path to create-version.sh.
1993 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
1994
1995 2020-01-14 Tom Tromey <tom@tromey.com>
1996
1997 * configure.ac (LIBS): Use WIN32APILIBS.
1998 (USE_WIN32API): Don't define.
1999 * configure: Rebuild.
2000
2001 2020-01-14 Tom Tromey <tom@tromey.com>
2002
2003 * configure: Rebuild.
2004
2005 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
2006
2007 * Makefile.in (%-generated.c): Remove rule for files from
2008 regformats/i386.
2009
2010 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
2011
2012 * configure: Re-generate.
2013
2014 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
2015
2016 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
2017 Define to static.
2018 * tracepoint.c (stop_tracing, flush_trace_buffer,
2019 about_to_request_buffer_space, get_trace_state_variable_value,
2020 set_trace_state_variable_value, gdb_collect): Add declaration.
2021
2022 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
2023
2024 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
2025 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
2026 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
2027 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
2028 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
2029 static.
2030
2031 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
2032
2033 * inferiors.c: Include gdbsupport/common-inferior.h.
2034
2035 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
2036
2037 * hostio-errno.c: Include hostio.h.
2038
2039 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
2040
2041 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
2042 prerequisite.
2043
2044 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
2045
2046 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
2047 * linux-arm-tdesc.h: Include arch/arm.h.
2048
2049 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
2050
2051 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
2052
2053 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
2054
2055 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
2056 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
2057
2058 2020-01-10 Pedro Alves <palves@redhat.com>
2059
2060 * fork-child.c (post_fork_inferior): Pass target down to
2061 startup_inferior.
2062 * inferiors.c (switch_to_thread): Add process_stratum_target
2063 parameter.
2064 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
2065 * nto-low.c (nto_target_ops): Now a process_stratum_target.
2066 * linux-low.c (linux_target_ops): Now a process_stratum_target.
2067 * remote-utils.c (prepare_resume_reply): Pass the target to
2068 switch_to_thread.
2069 * target.c (the_target): Now a process_stratum_target.
2070 (done_accessing_memory): Pass the target to switch_to_thread.
2071 (set_target_ops): Ajust to use process_stratum_target.
2072 * target.h (struct target_ops): Rename to ...
2073 (struct process_stratum_target): ... this.
2074 (the_target, set_target_ops): Adjust.
2075 (prepare_to_access_memory): Adjust comment.
2076 * win32-low.c (child_xfer_memory): Adjust to use
2077 process_stratum_target.
2078 (win32_target_ops): Now a process_stratum_target.
2079
2080 2020-01-06 Eli Zaretskii <eliz@gnu.org>
2081 Pedro Alves <palves@redhat.com>
2082
2083 * win32-low.c (get_child_debug_event): Extract the fatal exception
2084 from the exit status and convert to the equivalent Posix signal
2085 number.
2086 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
2087 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
2088
2089 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
2090
2091 * Makefile.in: Use INSTALL_PROGRAM_ENV.
2092
2093 2020-01-01 Joel Brobecker <brobecker@adacore.com>
2094
2095 * server.c (gdbserver_version): Change copyright year to 2020.
2096 * gdbreplay.c (gdbreplay_version): Likewise.
2097
2098 2019-12-19 Christian Biesinger <cbiesinger@google.com>
2099
2100 * configure: Regenerate.
2101 * configure.ac: Quote variable arguments of test.
2102
2103 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
2104
2105 * Makefile.in: Fix build with GNU Make 3.81
2106
2107 2019-12-16 Tom Tromey <tromey@adacore.com>
2108
2109 * server.c (get_exec_file): Constify result.
2110
2111 2019-12-10 Christian Biesinger <cbiesinger@google.com>
2112
2113 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
2114 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
2115 * config.in: Regenerate.
2116 * configure: Regenerate.
2117 * configure.ac: Don't check for strerror.
2118 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
2119 Call safe_strerror instead of strerror.
2120 * server.h (strerror): Remove this now-unnecessary declaration.
2121 * tracepoint.c (init_named_socket): Call safe_strerror instead of
2122 strerror.
2123 (gdb_agent_helper_thread): Likewise.
2124 * utils.c (perror_with_name): Likewise.
2125
2126 2019-11-26 Tom Tromey <tom@tromey.com>
2127
2128 * configure, config.in: Rebuild.
2129
2130 2019-11-26 Tom Tromey <tom@tromey.com>
2131
2132 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
2133 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
2134 gdb_sigmask.
2135 * configure, config.in: Rebuild.
2136
2137 2019-11-26 Tom Tromey <tom@tromey.com>
2138
2139 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
2140 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
2141 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
2142 * acinclude.m4: Include ax_pthread.m4.
2143 * config.in, configure: Rebuild.
2144
2145 2019-11-26 Christian Biesinger <cbiesinger@google.com>
2146
2147 * debug.c (debug_set_output): Call safe_strerror instead of
2148 strerror.
2149 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
2150 (linux_kill_one_lwp): Likewise.
2151 (linux_detach_one_lwp): Likewise.
2152 (linux_wait_for_event_filtered): Likewise.
2153 (store_register): Likewise.
2154 * lynx-low.c (lynx_attach): Likewise.
2155 * mem-break.c (insert_memory_breakpoint): Likewise.
2156 (remove_memory_breakpoint): Likewise.
2157 (delete_fast_tracepoint_jump): Likewise.
2158 (set_fast_tracepoint_jump): Likewise.
2159 (uninsert_fast_tracepoint_jumps_at): Likewise.
2160 (reinsert_fast_tracepoint_jumps_at): Likewise.
2161 * nto-low.c (nto_xfer_memory): Likewise.
2162 (nto_resume): Likewise.
2163
2164 2019-11-20 Luis Machado <luis.machado@linaro.org>
2165
2166 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
2167 instead of register count.
2168 * tdesc.c (tdesc_contains_feature): New function.
2169 * tdesc.h (tdesc_contains_feature): New prototype.
2170
2171 2019-11-15 Christian Biesinger <cbiesinger@google.com>
2172
2173 * Makefile.in: Add safe-strerror.c.
2174 * configure: Regenerate.
2175 * configure.ac: Don't source common.host.
2176
2177 2019-11-15 Christian Biesinger <cbiesinger@google.com>
2178
2179 * config.in: Regenerate.
2180 * configure: Regenerate.
2181
2182 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
2183
2184 * ax.c (ax_printf): Handle size_t_arg.
2185
2186 2019-11-06 Christian Biesinger <cbiesinger@google.com>
2187
2188 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
2189 * mi/mi-main.c (output_cores): Likewise.
2190 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
2191 (linux_xfer_osdata_modules): Likewise.
2192 * remote.c (register_remote_support_xml): Likewise.
2193 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
2194 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
2195
2196 2019-11-01 Christian Biesinger <cbiesinger@google.com>
2197
2198 * configure: Regenerate.
2199 * configure.ac: Remove check for strerror_r.
2200
2201 2019-10-31 Christian Biesinger <cbiesinger@google.com>
2202
2203 * config.in: Regenerate.
2204 * configure: Regenerate.
2205 * configure.ac: Also check for strerror_r.
2206
2207 2019-10-31 Christian Biesinger <cbiesinger@google.com>
2208
2209 * ax.h (debug_agent): Remove duplicate declaration.
2210
2211 2019-10-26 Tom de Vries <tdevries@suse.de>
2212
2213 * linux-aarch64-low.c: Fix typos in comments.
2214 * linux-arm-low.c: Same.
2215 * linux-low.c: Same.
2216 * linux-ppc-low.c: Same.
2217 * proc-service.c: Same.
2218 * regcache.h: Same.
2219 * server.c: Same.
2220 * tracepoint.c: Same.
2221 * win32-low.c: Same.
2222
2223 2019-10-25 Tom Tromey <tromey@adacore.com>
2224
2225 * utils.c (xstrdup): Remove.
2226
2227 2019-10-23 Tom Tromey <tom@tromey.com>
2228
2229 * configure, config.in: Rebuild.
2230
2231 2019-10-23 Tom Tromey <tom@tromey.com>
2232
2233 * configure: Rebuild.
2234 * acinclude.m4: Use m4_include, not sinclude.
2235
2236 2019-10-17 Tom Tromey <tromey@adacore.com>
2237
2238 * configure: Rebuild.
2239 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
2240 in AC_CONFIG_FILES invocation.
2241 * Makefile.in (stamp-h, Makefile): Use new-style config.status
2242 invocation.
2243
2244 2019-10-16 Christian Biesinger <cbiesinger@google.com>
2245
2246 * server.c: Include xml-builtin.h.
2247 (get_xml_features): Don't declare xml_builtins here.
2248
2249 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
2250
2251 * Makefile.in: Remove references to vec-ipa.o.
2252
2253 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
2254
2255 * Makefile.in: Remove references to vec.c.
2256
2257 2019-10-02 Christian Biesinger <cbiesinger@google.com>
2258
2259 * server.c (server_waiting): Change to bool.
2260 (extended_protocol): Likewise.
2261 (response_needed): Likewise.
2262 (exit_requested): Likewise.
2263 (run_once): Likewise.
2264 (report_no_resumed): Likewise.
2265 (non_stop): Likewise.
2266 (disable_packet_vCont): Likewise.
2267 (disable_packet_Tthread): Likewise.
2268 (disable_packet_qC): Likewise.
2269 (disable_packet_qfThreadInfo): Likewise.
2270 (handle_general_set): Update.
2271 (handle_detach): Update.
2272 (handle_monitor_command): Update.
2273 (handle_query): Update.
2274 (captured_main): Update.
2275 (process_serial_event): Update.
2276 * server.h (server_waiting): Change to bool.
2277 (disable_packet_vCont): Likewise.
2278 (disable_packet_Tthread): Likewise.
2279 (disable_packet_qC): Likewise.
2280 (disable_packet_qfThreadInfo): Likewise.
2281 (run_once): Likewise.
2282 (non_stop): Likewise.
2283 * target.c (target_stop_and_wait): Update.
2284
2285 2019-10-02 Tom Tromey <tromey@adacore.com>
2286
2287 * Makefile.in (SFILES): Add common-inferior.c.
2288 (OBS): Add common-inferior.o.
2289 * server.c (startup_with_shell): Don't define.
2290
2291 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
2292
2293 * linux-low.c (linux_low_read_btrace): Update for change to
2294 std::vector.
2295
2296 2019-09-20 Christian Biesinger <cbiesinger@google.com>
2297
2298 * debug.c (debug_threads): Remove comment in favor of the header.
2299 * debug.h (using_threads): Add declaration.
2300 (debug_threads): Add comment.
2301 * linux-aarch64-low.c: Include debug.h and remove declaration of
2302 debug_threads.
2303 * nto-low.c: Likewise.
2304 * remote-utils.c: Likewise.
2305 * thread-db.c: Likewise.
2306
2307 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
2308
2309 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
2310 and powerpc-cell64l-ipa.o.
2311 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
2312 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
2313 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
2314 (spu*-*-*): Remove.
2315
2316 * spu-low.c: Remove file.
2317
2318 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
2319 (parse_spufs_run): Remove.
2320 (ppc_get_pc): Remove Cell/B.E. support.
2321 (ppc_set_pc): Likewise.
2322 (ppc_breakpoint_at): Likewise.
2323 (ppc_arch_setup): Likewise.
2324 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
2325 tdesc_powerpc_cell32l.
2326 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
2327 or init_registers_powerpc_cell32l.
2328 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
2329 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
2330 or init_registers_powerpc_cell32l.
2331 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
2332 (init_registers_powerpc_cell32l): Remove prototype.
2333 (init_registers_powerpc_cell64l): Likewise.
2334
2335 * target.h (struct target_ops): Remove qxfer_spu member.
2336 * server.c (handle_qxfer_spu): Remove.
2337 (qxfer_packets): Remove entry for "spu".
2338 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
2339 * linux-low.c (SPUFS_MAGIC): Remove.
2340 (spu_enumerate_spu_ids): Remove.
2341 (linux_qxfer_spu): Remove.
2342 (linux_target_ops): Remove qxfer_spu member.
2343 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
2344 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
2345 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
2346
2347 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
2348
2349 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
2350 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
2351 * config.in: Regenerate.
2352 * configure: Regenerate.
2353
2354 2019-08-15 Tom Tromey <tromey@adacore.com>
2355
2356 * target.c (target_write_memory): Use gdb::byte_vector.
2357
2358 2019-08-15 Tom Tromey <tromey@adacore.com>
2359
2360 * tracepoint.c (write_inferior_data_pointer)
2361 (write_inferior_integer, write_inferior_int8)
2362 (write_inferior_uinteger, m_tracepoint_action_download)
2363 (r_tracepoint_action_download, x_tracepoint_action_download)
2364 (l_tracepoint_action_download, clear_inferior_trace_buffer)
2365 (download_agent_expr, download_tracepoint_1)
2366 (download_trace_state_variables, upload_fast_traceframes): Update.
2367 * server.c (gdb_write_memory): Update.
2368 * remote-utils.c (relocate_instruction): Update.
2369 * proc-service.c (ps_pdwrite): Update.
2370 * mem-break.c (remove_memory_breakpoint)
2371 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
2372 (uninsert_fast_tracepoint_jumps_at)
2373 (reinsert_fast_tracepoint_jumps_at): Update.
2374 * linux-x86-low.c (append_insns)
2375 (i386_install_fast_tracepoint_jump_pad)
2376 (amd64_write_goto_address, i386_write_goto_address): Update.
2377 * linux-s390-low.c (append_insns, s390_write_goto_address):
2378 Update.
2379 * linux-ppc-low.c (ppc_relocate_instruction)
2380 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
2381 (ppc_write_goto_address): Update.
2382 * linux-aarch64-low.c (append_insns): Update.
2383 * target.h (struct target_ops): Update.
2384 (write_inferior_memory): Don't declare.
2385 * target.c (target_write_memory): Rename from
2386 write_inferior_memory. Remove old target_write_memory.
2387
2388 2019-08-15 Tom Tromey <tromey@adacore.com>
2389
2390 * target.c (write_inferior_memory): Use std::vector.
2391
2392 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
2393
2394 PR build/24886
2395 * configure.ac: Drop enable-libmcheck support.
2396 * configure, config.in: Rebuild.
2397 * acinclude.m4: Don't include it.
2398
2399 2019-07-19 Alan Hayward <alan.hayward@arm.com>
2400
2401 * configure.srv: Remove Arm xml files.
2402
2403 2019-07-19 Alan Hayward <alan.hayward@arm.com>
2404
2405 * configure.srv: Add new files. Remove xml generated files.
2406 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
2407 registers.
2408 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
2409 * linux-aarch32-tdesc.c: New file.
2410 * linux-aarch32-tdesc.h: New file.
2411 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
2412 * linux-arm-low.c (init_registers_arm, tdesc_arm)
2413 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
2414 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
2415 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
2416 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
2417 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
2418 (arm_read_description): Call arm_linux_read_description.
2419 (initialize_low_arch): Don't init registers.
2420 * linux-arm-tdesc.c: New file.
2421 * linux-arm-tdesc.h: New file.
2422
2423 2019-07-10 Alan Hayward <alan.hayward@arm.com>
2424
2425 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
2426 Move counter inside for.
2427 (arm_read_description): Check ptrace earlier.
2428 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
2429
2430 2019-07-09 Tom Tromey <tom@tromey.com>
2431
2432 * configure: Rebuild.
2433 * configure.ac: Change common to gdbsupport.
2434 * acinclude.m4: Change common to gdbsupport.
2435 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
2436 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
2437 common to gdbsupport.
2438 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
2439 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
2440 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
2441 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
2442 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
2443 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
2444 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
2445 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
2446 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
2447 common to gdbsupport.
2448
2449 2019-07-04 Alan Hayward <alan.hayward@arm.com>
2450
2451 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
2452 defines.
2453 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
2454
2455 2019-07-04 Alan Hayward <alan.hayward@arm.com>
2456
2457 * configure.srv: Remove legacy xml.
2458 * linux-aarch64-low.c (initialize_low_arch): Remove
2459 initialize_low_tdesc call.
2460 * linux-aarch64-tdesc-selftest.c: Remove file.
2461 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
2462 * linux-x86-low.c (initialize_low_arch): Remove
2463 initialize_low_tdesc call.
2464 * linux-x86-tdesc-selftest.c: Remove file.
2465 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
2466
2467 2019-06-20 Tom de Vries <tdevries@suse.de>
2468
2469 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
2470 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
2471
2472 2019-06-19 Tom de Vries <tdevries@suse.de>
2473
2474 * debug.h (debug_write): Change return type to ssize_t.
2475 * debug.c (debug_write): Same.
2476
2477 2019-06-14 Tom Tromey <tom@tromey.com>
2478
2479 * configure.ac: Use new path to gnulib.
2480 * configure: Rebuild.
2481 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
2482 to gnulib.
2483
2484 2019-06-11 Tom Tromey <tom@tromey.com>
2485
2486 * Makefile.in (SFILES): Add alloc.c.
2487 (OBS): Add alloc.o.
2488 (IPA_OBJS): Add alloc-ipa.o.
2489 (alloc-ipa.o): New target.
2490 (%.o: ../%.c): New pattern rule.
2491
2492 2019-06-10 Tom Tromey <tromey@adacore.com>
2493
2494 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
2495 end warning with a newline.
2496 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
2497 newline.
2498 * thread-db.c (attach_thread): Don't end warning with a newline.
2499 (thread_db_notice_clone): Likewise.
2500 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
2501 newline.
2502 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
2503 end warning with a newline.
2504
2505 2019-06-04 Pedro Alves <palves@redhat.com>
2506
2507 * server.c (captured_main): Use make_unique_xstrdup.
2508
2509 2019-06-02 Tom Tromey <tom@tromey.com>
2510
2511 * gdbreplay.c (fromhex): Remove.
2512 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
2513
2514 2019-05-29 Tom Tromey <tromey@adacore.com>
2515
2516 * configure: Rebuild.
2517
2518 2019-05-06 Kevin Buettner <kevinb@redhat.com>
2519
2520 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
2521 sign extension code on 32-bit builds.
2522
2523 2019-05-03 Eli Zaretskii <eliz@gnu.org>
2524
2525 * remote-utils.c:
2526 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
2527
2528 2019-04-19 Tom Tromey <tom@tromey.com>
2529
2530 * server.c (struct vstop_notif): Derive from notif_event.
2531 <base>: Remove.
2532 (queue_stop_reply): Update.
2533 (remove_all_on_match_ptid): Change type. Rewrite.
2534 (discard_queued_stop_replies): Rewrite.
2535 (in_queued_stop_replies_ptid): Change type.
2536 (in_queued_stop_replies): Rewrite.
2537 (notif_stop): Update.
2538 (queue_stop_reply_callback): Update.
2539 (captured_main): Don't call initialize_notif.
2540 (push_stop_notification): Update.
2541 * notif.c (notif_write_event, handle_notif_ack)
2542 (notif_event_enque, notif_push): Update.
2543 (notif_event_xfree, initialize_notif): Remove.
2544 * notif.h (struct notif_event): Include <list>, not
2545 "common/queue.h".
2546 (struct notif_server) <queue>: Now a std::list.
2547 (notif_event_p): Remove typedef.
2548 (initialize_notif): Don't declare.
2549 (struct notif_event): Add virtual destructor.
2550
2551 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2552
2553 * ax.c (ax_vdebug): Call debug_printf.
2554 * debug.c (debug_write): New function.
2555 * debug.h (debug_write): New declaration.
2556 * linux-low.c (sigchld_handler): Call debug_write.
2557
2558 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2559
2560 * debug.c (debug_set_output): New function.
2561 (debug_vprintf): Send output to debug_file.
2562 (debug_flush): Likewise.
2563 * debug.h (debug_set_output): New declaration.
2564 * server.c (handle_monitor_command): Add debug-file option.
2565 (captured_main): Likewise.
2566
2567 2019-04-17 Alan Hayward <alan.hayward@arm.com>
2568
2569 * debug.c (remote_debug): Add definition.
2570 * debug.h (remote_debug): Add declaration.
2571 * hostio.c (remote_debug): Remove declaration.
2572 * remote-utils.c (struct ui_file): Likewise.
2573 (remote_debug): Likewise.
2574 * remote-utils.h (remote_debug): Likewise,
2575 * server.c (remote_debug): Remove definition.
2576
2577 2019-04-10 Kevin Buettner <kevinb@redhat.com>
2578
2579 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
2580 when using a 64-bit gdbserver.
2581
2582 2019-04-09 Tom Tromey <tromey@adacore.com>
2583
2584 * linux-low.c (select_event_lwp): Use find_thread_in_random.
2585
2586 2019-04-08 Tom Tromey <tom@tromey.com>
2587
2588 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
2589 throw.
2590 (linux_resume_one_lwp): Likewise.
2591
2592 2019-04-08 Tom Tromey <tom@tromey.com>
2593
2594 * gdbreplay.c: Update.
2595 * linux-low.c: Update.
2596 * server.c: Update.
2597
2598 2019-04-08 Tom Tromey <tom@tromey.com>
2599
2600 * server.c: Use C++ exception handling.
2601 * linux-low.c: Use C++ exception handling.
2602 * gdbreplay.c: Use C++ exception handling.
2603
2604 2019-04-08 Tom Tromey <tom@tromey.com>
2605
2606 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
2607 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
2608 (captured_main, main): Update.
2609 * gdbreplay.c (main): Update.
2610
2611 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2612
2613 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
2614 value in argument pointer, return 1 if the entry is found and 0
2615 otherwise. Move comment.
2616 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
2617 * linux-low.h (linux_get_auxv): Declare.
2618 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
2619
2620 2019-04-05 Tom Tromey <tromey@adacore.com>
2621
2622 * server.c (gdbserver_usage): Use upper-case for metasyntactic
2623 variables.
2624
2625 2019-03-28 Alan Hayward <alan.hayward@arm.com>
2626
2627 * linux-low.c (AT_HWCAP2): Add define if not already included.
2628
2629 2019-03-26 Alan Hayward <alan.hayward@arm.com>
2630
2631 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
2632 (aarch64_arch_setup): Call linux_get_hwcap.
2633 * linux-arm-low.c (arm_get_hwcap): Remove function.
2634 (arm_read_description): Call linux_get_hwcap.
2635 * linux-low.c (linux_get_auxv): New function.
2636 (linux_get_hwcap): Likewise.
2637 (linux_get_hwcap2): Likewise.
2638 * linux-low.h (linux_get_hwcap): New declaration.
2639 (linux_get_hwcap2): Likewise.
2640 * linux-ppc-low.c (ppc_get_auxv): Remove function.
2641 (ppc_arch_setup): Call linux_get_hwcap.
2642 * linux-s390-low.c (s390_get_hwcap): Remove function.
2643 (s390_arch_setup): Call linux_get_hwcap.
2644
2645 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2646 Jiong Wang <jiong.wang@arm.com>
2647
2648 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
2649 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
2650 to fail.
2651 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
2652
2653 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2654 Jiong Wang <jiong.wang@arm.com>
2655
2656 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
2657 (aarch64_get_hwcap): New function.
2658 (aarch64_arch_setup): Read APIA hwcap.
2659
2660 2019-03-22 Alan Hayward <alan.hayward@arm.com>
2661 Jiong Wang <jiong.wang@arm.com>
2662
2663 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
2664 (initialize_low_tracepoint): Likewise.
2665 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
2666 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
2667 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
2668 (aarch64_linux_read_description): Likewise.
2669 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
2670
2671 2019-03-12 John Baldwin <jhb@FreeBSD.org>
2672
2673 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
2674 i386_create_target_description for 'segments' parameter.
2675 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
2676 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
2677 * win32-i386-low.c (i386_arch_setup): Likewise.
2678
2679 2019-03-12 Tom Tromey <tromey@adacore.com>
2680
2681 * linux-low.c (iterate_over_lwps): Update.
2682
2683 2019-03-06 Tom Tromey <tom@tromey.com>
2684
2685 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
2686 (captured_main): Use SCOPE_EXIT.
2687
2688 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
2689
2690 * configure.srv: Use '$enable_unittest' instead of '$development'
2691 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
2692 case.
2693
2694 2019-02-27 Tom Tromey <tromey@adacore.com>
2695
2696 * gdbreplay.c (logchar): Handle \r\n.
2697
2698 2019-02-07 Alan Hayward <alan.hayward@arm.com>
2699
2700 * linux-low.c (linux_attach): Add process before lwp.
2701 * server.c (attach_inferior): Check if already attached.
2702
2703 2019-02-07 Tom Tromey <tom@tromey.com>
2704
2705 * x86-tdesc.h: Rename include guard.
2706 * x86-low.h: Add include guard.
2707 * wincecompat.h: Rename include guard.
2708 * win32-low.h: Add include guard.
2709 * utils.h: Rename include guard.
2710 * tracepoint.h: Rename include guard.
2711 * tdesc.h: Rename include guard.
2712 * target.h: Rename include guard.
2713 * server.h: Rename include guard.
2714 * remote-utils.h: Rename include guard.
2715 * regcache.h: Rename include guard.
2716 * nto-low.h: Rename include guard.
2717 * notif.h: Add include guard.
2718 * mem-break.h: Rename include guard.
2719 * lynx-low.h: Add include guard.
2720 * linux-x86-tdesc.h: Add include guard.
2721 * linux-s390-tdesc.h: Add include guard.
2722 * linux-ppc-tdesc-init.h: Add include guard.
2723 * linux-low.h: Add include guard.
2724 * linux-aarch64-tdesc.h: Add include guard.
2725 * linux-aarch32-low.h: Add include guard.
2726 * inferiors.h: Rename include guard.
2727 * i387-fp.h: Rename include guard.
2728 * hostio.h: Rename include guard.
2729 * gdbthread.h: Rename include guard.
2730 * gdb_proc_service.h: Rename include guard.
2731 * event-loop.h: Rename include guard.
2732 * dll.h: Rename include guard.
2733 * debug.h: Rename include guard.
2734 * ax.h: Rename include guard.
2735
2736 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
2737
2738 PR gdb/23985
2739 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
2740 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
2741
2742 2019-01-25 Tom Tromey <tom@tromey.com>
2743
2744 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
2745
2746 2019-01-25 Tom Tromey <tom@tromey.com>
2747
2748 * win32-low.c: Fix common/ includes.
2749 * win32-i386-low.c: Fix common/ includes.
2750 * tracepoint.c: Fix common/ includes.
2751 * thread-db.c: Fix common/ includes.
2752 * target.h: Fix common/ includes.
2753 * symbol.c: Fix common/ includes.
2754 * spu-low.c: Fix common/ includes.
2755 * server.h: Fix common/ includes.
2756 * server.c: Fix common/ includes.
2757 * remote-utils.c: Fix common/ includes.
2758 * regcache.h: Fix common/ includes.
2759 * regcache.c: Fix common/ includes.
2760 * nto-x86-low.c: Fix common/ includes.
2761 * notif.h: Fix common/ includes.
2762 * mem-break.h: Fix common/ includes.
2763 * lynx-low.c: Fix common/ includes.
2764 * lynx-i386-low.c: Fix common/ includes.
2765 * linux-x86-tdesc-selftest.c: Fix common/ includes.
2766 * linux-x86-low.c: Fix common/ includes.
2767 * linux-low.c: Fix common/ includes.
2768 * inferiors.h: Fix common/ includes.
2769 * i387-fp.c: Fix common/ includes.
2770 * hostio.c: Fix common/ includes.
2771 * hostio-errno.c: Fix common/ includes.
2772 * gdbthread.h: Fix common/ includes.
2773 * gdbreplay.c: Fix common/ includes.
2774 * fork-child.c: Fix common/ includes.
2775 * event-loop.c: Fix common/ includes.
2776 * ax.c:
2777 (enum gdb_agent_op): Fix common/ includes.
2778
2779 2019-01-21 Tom Tromey <tom@tromey.com>
2780
2781 * tracepoint.c: Fix includes.
2782 * remote-utils.c: Fix includes.
2783 * linux-x86-low.c: Fix includes.
2784
2785 2019-01-01 Joel Brobecker <brobecker@adacore.com>
2786
2787 * gdbreplay.c (gdbreplay_version): Update copyright year in
2788 version message.
2789 * server.c (gdbserver_version): Likewise.
2790
2791 2018-12-05 Alan Hayward <alan.hayward@arm.com>
2792
2793 * linux-low.c (add_lwp): Switch ordering.
2794
2795 2018-11-29 Tom Tromey <tom@tromey.com>
2796
2797 * win32-low.c (win32_join): Take pid, not process.
2798 * target.h (struct target_ops) <join>: Change argument type.
2799 (join_inferior): Change argument name.
2800 * spu-low.c (spu_join): Take pid, not process.
2801 * server.c (handle_detach): Preserve pid before destroying
2802 process.
2803 * lynx-low.c (lynx_join): Take pid, not process.
2804 * linux-low.c (linux_join): Take pid, not process.
2805
2806 2018-11-23 Alan Hayward <alan.hayward@arm.com>
2807
2808 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
2809 (aarch64_cannot_fetch_register): Likewise.
2810 (struct linux_target_ops): Update references.
2811
2812 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2813
2814 * linux-ppc-low.c: Include nat/linux-ptrace.h.
2815
2816 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2817
2818 * configure.srv (ipa_ppc_linux_regobj): Add
2819 powerpc-isa207-htm-vsx32l-ipa.o and
2820 powerpc-isa207-htm-vsx64l-ipa.o.
2821 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
2822 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
2823 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
2824 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
2825 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
2826 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
2827 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
2828 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
2829 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2830 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
2831 (init_registers_powerpc_isa207_htm_vsx32l)
2832 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
2833 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
2834 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
2835 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
2836 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
2837 (ppc_store_tm_ctarregset): New functions.
2838 (ppc_regsets): Add entries for HTM regsets.
2839 (ppc_arch_setup): Set htm in features struct when needed. Set
2840 sizes for the HTM regsets.
2841 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
2842 (initialize_low_arch): Call
2843 init_registers_powerpc_isa207_htm_vsx32l and
2844 init_registers_powerpc_isa207_htm_vsx64l.
2845 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2846 PPC_TDESC_ISA207_HTM_VSX.
2847 (initialize_low_tracepoint): Call
2848 init_registers_powerpc_isa207_htm_vsx32l and
2849 init_registers_powerpc_isa207_htm_vsx64l.
2850
2851 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2852
2853 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
2854 rs6000/power-linux-pmu.xml to srv_xmlfiles.
2855 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
2856 (ppc_store_pmuregset): New functions.
2857 (ppc_regsets): Add entries for ebb and pmu regsets.
2858 (ppc_arch_setup): Set isa207 in features struct if the ebb and
2859 pmu regsets are available. Set sizes for these regsets.
2860
2861 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2862
2863 * configure.srv (ipa_ppc_linux_regobj): Add
2864 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
2865 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
2866 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
2867 rs6000/powerpc-isa207-vsx32l.xml, and
2868 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
2869 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2870 <PPC_TDESC_ISA207_VSX>: New enum value.
2871 (init_registers_powerpc_isa207_vsx32l): Declare.
2872 (init_registers_powerpc_isa207_vsx64l): Declare.
2873 * linux-ppc-low.c (ppc_fill_tarregset): New function.
2874 (ppc_store_tarregset): New function.
2875 (ppc_regsets): Add entry for the TAR regset.
2876 (ppc_arch_setup): Set isa207 in features struct when needed. Set
2877 size for the TAR regsets.
2878 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
2879 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
2880 and init_registers_powerpc_isa207_vsx64l.
2881 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
2882 (initialize_low_tracepoint): Call
2883 init_registers_powerpc_isa207_vsx32l and
2884 init_registers_powerpc_isa207_vsx64l.
2885
2886 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2887 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2888
2889 * configure.srv (ipa_ppc_linux_regobj): Add
2890 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
2891 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
2892 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
2893 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
2894 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
2895 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
2896 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
2897 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
2898 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
2899 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
2900 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
2901 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
2902 (ppc_hwcap): Add comment.
2903 (ppc_hwcap2): New global.
2904 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
2905 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
2906 (ppc_regsets): Add entries for the DSCR and PPR regsets.
2907 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
2908 when needed. Set sizes for the the DSCR and PPR regsets.
2909 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
2910 (initialize_low_arch): Call
2911 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2912 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2913 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
2914 PPC_TDESC_ISA205_PPR_DSCR_VSX.
2915 (initialize_low_tracepoint): Call
2916 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
2917 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
2918
2919 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2920
2921 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
2922
2923 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
2924 Simon Marchi <simark@simark.ca>
2925
2926 * acinclude.m4: Include "../selftest.m4".
2927 * configure: Regenerate.
2928 * configure.ac: Use "GDB_AC_SELFTEST".
2929 * configure.srv: Use "$enable_unittests" instead of
2930 "$development" when checking whether unit tests have been
2931 enabled.
2932 * server.c (captured_main): Update message informing that
2933 selftests have been disabled.
2934
2935 2018-10-04 Tom Tromey <tom@tromey.com>
2936
2937 * configure: Rebuild.
2938
2939 2018-10-04 Tom Tromey <tom@tromey.com>
2940
2941 * server.c (handle_status): Rename inner "thread".
2942 (process_serial_event): Declare "res" in 'm' case.
2943 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
2944 (iterate_over_lwps): Rename inner "thread".
2945 (linux_qxfer_libraries_svr4): Rename inner "len".
2946 * gdbthread.h (find_thread_in_random): Rename inner "thread".
2947
2948 2018-10-01 Gary Benson <gbenson@redhat.com>
2949
2950 * gdb_proc_service.h: Moved common code to
2951 common/gdb_proc_service.h.
2952
2953 2018-10-01 Gary Benson <gbenson@redhat.com>
2954
2955 * gdb_proc_service.h: Synchronize comments and whitespace with
2956 GDB's version of this file.
2957
2958 2018-09-25 Tom Tromey <tom@tromey.com>
2959
2960 * configure: Rebuild.
2961 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
2962
2963 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2964
2965 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
2966 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
2967 ($(IPA_LIB)): Sort IPA_OBJS.
2968
2969 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
2970
2971 * Makefile.in: Remove references to $(ADD_DEPS).
2972
2973 2018-09-16 Tom Tromey <tom@tromey.com>
2974
2975 * remote-utils.c (remote_open): Use GNU style for metasyntactic
2976 variables.
2977 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
2978 variables.
2979
2980 2018-09-05 Tom Tromey <tom@tromey.com>
2981
2982 * configure: Rebuild.
2983
2984 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
2985
2986 PR build/23399
2987 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
2988
2989 2018-08-27 Tom Tromey <tom@tromey.com>
2990
2991 PR build/23087:
2992 * configure: Rebuild.
2993
2994 2018-08-27 Tom Tromey <tom@tromey.com>
2995
2996 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
2997 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
2998 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
2999 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
3000 (s390x_emit_stack_adjust): Add casts to unsigned char.
3001
3002 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
3003
3004 PR gdb/23374
3005 PR gdb/23375
3006 * server.h (struct client_state) <disable_randomization>:
3007 Initialize to 1.
3008
3009 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
3010
3011 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
3012 variable.
3013 (mips_supply_ptrace_register): Likewise.
3014
3015 2018-07-22 Tom Tromey <tom@tromey.com>
3016
3017 * configure: Rebuild.
3018
3019 2018-07-22 Tom Tromey <tom@tromey.com>
3020
3021 * win32-low.c (win32_create_inferior): Remove unused variables.
3022 * gdbreplay.c (remote_open): Remove unused variable.
3023 * remote-utils.c (remote_prepare): Remove unused variable.
3024 * x86-tdesc.h (X86_TDESC_H): Define.
3025 (amd64_expedite_regs): Define conditionally.
3026 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
3027 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
3028 * remote-utils.c (readchar): Remove unused variable.
3029
3030 2018-07-13 Pedro Alves <palves@redhat.com>
3031
3032 * linux-low.c (linux_kill): Change parameter to process_info
3033 pointer instead of pid. Adjust.
3034 * lynx-low.c (lynx_kill): Likewise.
3035 * nto-low.c (nto_kill): Likewise.
3036 * spu-low.c (spu_kill): Likewise.
3037 * win32-low.c (win32_kill): Likewise.
3038 * server.c (handle_v_kill, kill_inferior_callback)
3039 (detach_or_kill_for_exit): Adjust.
3040 * target.c (kill_inferior): Change parameter to process_info
3041 pointer instead of pid. Adjust.
3042 * target.h (struct target_ops) <kill>: Change parameter to
3043 process_info pointer instead of pid. Adjust all implementations
3044 and callers.
3045 (kill_inferior): Likewise.
3046
3047 2018-07-13 Pedro Alves <palves@redhat.com>
3048
3049 * linux-low.c (linux_detach, linux_join): Change parameter to
3050 process_info pointer instead of pid. Adjust.
3051 * lynx-low.c (lynx_detach, lynx_join): Likewise.
3052 * nto-low.c (nto_detach): Likewise.
3053 * spu-low.c (spu_detach, spu_join): Likewise.
3054 * win32-low.c (win32_detach, win32_join): Likewise.
3055 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
3056 * target.h (struct target_ops) <detach, join>: Change parameter to
3057 process_info pointer instead of pid. Adjust all implementations
3058 and callers.
3059 (detach_inferior, join_inferior): Rename 'pid' parameter to
3060 'proc'.
3061
3062 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
3063 Jan Kratochvil <jan.kratochvil@redhat.com>
3064 Paul Fertser <fercerpav@gmail.com>
3065 Tsutomu Seki <sekiriki@gmail.com>
3066
3067 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
3068 (OBS): Add 'common/netstuff.o'.
3069 (GDBREPLAY_OBS): Likewise.
3070 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
3071 (remote_open): Implement support for IPv6
3072 connections.
3073 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
3074 and 'wspiapi.h'.
3075 (handle_accept_event): Accept connections from IPv6 sources.
3076 (remote_prepare): Handle IPv6-style hostnames; implement
3077 support for IPv6 connections.
3078 (remote_open): Implement support for printing connections from
3079 IPv6 sources.
3080
3081 2018-07-11 Pedro Alves <palves@redhat.com>
3082
3083 PR gdb/23377
3084 * mem-break.c (any_persistent_commands): Add process_info
3085 parameter and use it instead of relying on the current process.
3086 Change return type to bool.
3087 * mem-break.h (any_persistent_commands): Add process_info
3088 parameter and change return type to bool.
3089 * server.c (handle_detach): Remove require_running_or_return call.
3090 Look up the process_info for the process we're about to detach.
3091 If not found, return back error to GDB. Adjust
3092 any_persistent_commands call to pass down a process pointer.
3093
3094 2018-07-11 Pedro Alves <palves@redhat.com>
3095
3096 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
3097 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
3098 instead of collect_register_by_name.
3099 * regcache.c (regcache_raw_get_unsigned_by_name): New.
3100 * regcache.h (regcache_raw_get_unsigned_by_name): New.
3101
3102 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
3103 Pedro Alves <palves@redhat.com>
3104
3105 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
3106
3107 2018-07-03 Tom Tromey <tom@tromey.com>
3108
3109 * linux-low.c: Update.
3110 * lynx-low.c: Update.
3111 * mem-break.c: Update.
3112 * nto-low.c: Update.
3113 * remote-utils.c: Update.
3114 * server.c: Update.
3115 * spu-low.c: Update.
3116 * target.c: Update.
3117 * win32-low.c: Update.
3118
3119 2018-07-03 Tom Tromey <tom@tromey.com>
3120
3121 * server.c: Update.
3122
3123 2018-07-03 Tom Tromey <tom@tromey.com>
3124
3125 * linux-low.c: Update.
3126
3127 2018-07-03 Tom Tromey <tom@tromey.com>
3128
3129 * target.c: Update.
3130
3131 2018-07-03 Tom Tromey <tom@tromey.com>
3132
3133 * linux-low.c: Update.
3134 * linux-mips-low.c: Update.
3135 * lynx-low.c: Update.
3136 * nto-low.c: Update.
3137 * remote-utils.c: Update.
3138 * server.c: Update.
3139 * spu-low.c: Update.
3140 * target.c: Update.
3141 * thread-db.c: Update.
3142
3143 2018-07-03 Tom Tromey <tom@tromey.com>
3144
3145 * linux-low.c: Update.
3146 * linux-mips-low.c: Update.
3147 * lynx-low.c: Update.
3148 * mem-break.c: Update.
3149 * nto-low.c: Update.
3150 * remote-utils.c: Update.
3151 * server.c: Update.
3152 * spu-low.c: Update.
3153 * target.c: Update.
3154 * tracepoint.c: Update.
3155
3156 2018-07-03 Tom Tromey <tom@tromey.com>
3157
3158 * linux-low.c: Update.
3159 * linux-ppc-low.c: Update.
3160 * linux-x86-low.c: Update.
3161 * proc-service.c: Update.
3162 * server.c: Update.
3163 * spu-low.c: Update.
3164 * thread-db.c: Update.
3165 * win32-low.c: Update.
3166
3167 2018-07-03 Tom Tromey <tom@tromey.com>
3168
3169 * linux-low.c: Update.
3170 * lynx-low.c: Update.
3171 * nto-low.c: Update.
3172 * remote-utils.c: Update.
3173 * spu-low.c: Update.
3174 * thread-db.c: Update.
3175 * win32-low.c: Update.
3176
3177 2018-06-29 Joel Brobecker <brobecker@adacore.com>
3178
3179 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
3180 parameter in call to 'amd64_create_target_description'.
3181
3182 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3183
3184 * x86-tdesc.h: Remove executable permission flag.
3185
3186 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
3187
3188 * configure.ac: Remove AC_PREREQ, add missing quoting.
3189 * configure: Re-generate.
3190 * config.in: Re-generate.
3191 * aclocal.m4: Re-generate.
3192
3193 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
3194
3195 * tracepoint.h (current_traceframe): Remove declaration.
3196
3197 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3198
3199 * linux-aarch64-low.c (is_sve_tdesc): New function.
3200 (aarch64_sve_regs_copy_to_regcache): Likewise.
3201 (aarch64_sve_regs_copy_from_regcache): Likewise.
3202 (aarch64_regs_info): Add SVE checks.
3203 (initialize_low_arch): Initialize SVE.
3204
3205 2018-06-18 Alan Hayward <alan.hayward@arm.com>
3206
3207 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
3208
3209 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3210
3211 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
3212 (initialize_low_tracepoint): Likewise
3213 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
3214 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
3215 param.
3216 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
3217 checks.
3218 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
3219
3220 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3221
3222 * server.h (PBUFSIZ): Increase size
3223
3224 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3225
3226 * regcache.c (regcache::raw_compare): New function.
3227 * regcache.h (regcache::raw_compare): New declaration.
3228
3229 2018-06-11 Alan Hayward <alan.hayward@arm.com>
3230
3231 * regcache.c (new_register_cache): Use new.
3232 (free_register_cache): Use delete.
3233 (register_data): Use const.
3234 (supply_register): Move body inside regcache.
3235 (regcache::raw_supply): New override function.
3236 (collect_register): Move body inside regcache.
3237 (regcache::raw_collect): New override function.
3238 (regcache::get_register_status): New override function.
3239 * regcache.h (struct regcache): Inherit from reg_buffer_common.
3240
3241 2018-06-09 Tom Tromey <tom@tromey.com>
3242
3243 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
3244 declare queue.
3245 (event_queue): Use std::queue.
3246 (gdb_event_xfree): Remove.
3247 (initialize_event_loop, process_event, wait_for_event): Update.
3248
3249 2018-06-08 Stan Cox <scox@redhat.com>
3250
3251 * win32-low.c (win32_create_inferior): last_ptid and last_status
3252 moved to client_state.
3253
3254 2018-06-08 Pedro Alves <palves@redhat.com>
3255
3256 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
3257 common/common-exceptions.o, common/common-utils.o,
3258 common/errors.o, common/print-utils.o and utils.o.
3259 * gdbreplay.c: Include "common-defs.h" instead of the two
3260 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
3261 string.h or alloca.h.
3262 (perror_with_name): Delete.
3263 (remote_open): Use xstrdup instead of strdup.
3264 (main): Rename to ...
3265 (captured_main): ... this.
3266 (main): New.
3267
3268 2018-06-08 Tom Tromey <tom@tromey.com>
3269
3270 * linux-low.c (linux_low_read_btrace): Update.
3271
3272 2018-06-04 Stan Cox <scox@redhat.com>
3273
3274 * server.h (struct client_state): New.
3275 * server.c (cont_thread, general_thread, multi_process)
3276 (report_fork_events, report_vfork_events, report_exec_events)
3277 (report_thread_events, swbreak_feature, hwbreak_feature)
3278 (vCont_supported, disable_randomization, pass_signals)
3279 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
3280 Moved to client_state.
3281 * remote-utils.c (remote_debug, noack_mode)
3282 (transport_is_reliable): Moved to client_state.
3283 * tracepoint.c (current_traceframe): Moved to client_state.
3284
3285 Update all callers.
3286 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
3287 linux-low.c, remote-utils.h, target.c: Use client_state.
3288
3289 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3290
3291 * configure.srv: Add new c/h file.
3292
3293 2018-05-31 Alan Hayward <alan.hayward@arm.com>
3294
3295 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
3296 null VQ.
3297
3298 2018-05-25 Maciej W. Rozycki <macro@mips.com>
3299
3300 * gdb.arch/mips-fpregset-core.exp: New test.
3301 * gdb.arch/mips-fpregset-core.c: New test source.
3302
3303 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
3304
3305 PR server/23198
3306 * hostio.c (require_int): Do not report overflow for integers
3307 between 0xfffffff and 0x7fffffff.
3308
3309 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3310
3311 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
3312 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
3313 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
3314 functions.
3315 (the_low_target): Wire them.
3316
3317 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3318
3319 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
3320 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
3321 mode. Call collect_register_by_name with vscr using
3322 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
3323 (ppc_store_vrregset): Add and set vscr_offset variable as in
3324 ppc_fill_vrregset. Call supply_register_by_name with vscr using
3325 vscr_offset.
3326
3327 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3328
3329 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
3330 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
3331 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
3332
3333 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3334
3335 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
3336 (ppc_store_vsxregset): Likewise.
3337 (ppc_fill_vrregset): Likewise.
3338 (ppc_store_vrregset): Likewise.
3339 (ppc_fill_evrregset): Likewise.
3340 (ppc_store_evrregset): Likewise.
3341 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
3342 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
3343 needed.
3344
3345 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3346
3347 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
3348 wordsize of the inferior. Call ppc_linux_target_wordsize.
3349
3350 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3351
3352 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
3353 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
3354 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
3355 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
3356 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
3357 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
3358 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
3359 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
3360 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
3361 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
3362 (tdesc_powerpc_e500l): Remove.
3363 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
3364 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
3365 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
3366 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
3367 linux-ppc-tdesc.h.
3368 (ppc_arch_setup): Remove target description matching code. Fill a
3369 ppc_linux_features struct and call ppc_linux_match_description
3370 with it.
3371
3372 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3373
3374 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
3375 width of the requested register exceeds the width of the
3376 `ptrace' data type.
3377 (mips_cannot_store_register): Likewise.
3378
3379 2018-05-21 Maciej W. Rozycki <macro@mips.com>
3380
3381 * linux-mips-low.c (mips_fetch_register): New function. Update
3382 preceding comment.
3383 (mips_store_gregset): Supply 0 rather than $restart for $zero.
3384 (the_low_target): Wire `mips_fetch_register'.
3385
3386 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3387
3388 * lynx-i386-low.c (LYNXOS_178): New macro.
3389 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
3390 the layout on LynxOS-178.
3391 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
3392 handle floating point registers that are not supported by
3393 LynxOS-178.
3394
3395 2018-05-10 Tom Tromey <tom@tromey.com>
3396
3397 * configure: Rebuild.
3398
3399 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3400
3401 PR server/23158:
3402 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
3403 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
3404 Use it to set the expedite_regs field in the given tdesc.
3405 * x86-tdesc.h: New file.
3406 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
3407 Adjust following the addition of the new expedite_regs parameter
3408 to init_target_desc.
3409 * linux-tic6x-low.c (tic6x_read_description): Likewise.
3410 * linux-x86-tdesc.c: #include "x86-tdesc.h".
3411 (i386_linux_read_description, amd64_linux_read_description):
3412 Adjust following the addition of the new expedite_regs parameter
3413 to init_target_desc.
3414 * lynx-i386-low.c: #include "x86-tdesc.h".
3415 (lynx_i386_arch_setup): Adjust following the addition of the new
3416 expedite_regs parameter to init_target_desc.
3417 * nto-x86-low.c: #include "x86-tdesc.h".
3418 (nto_x86_arch_setup): Adjust following the addition of the new
3419 expedite_regs parameter to init_target_desc.
3420 * win32-i386-low.c: #include "x86-tdesc.h".
3421 (i386_arch_setup): Adjust following the addition of the new
3422 expedite_regs parameter to init_target_desc.
3423
3424 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3425
3426 PR server/23158:
3427 * win32-low.c (win32_create_inferior): Add call to my_wait
3428 setting last_status global.
3429
3430 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3431
3432 PR server/23158:
3433 * win32-low.c (create_process): Only call gdb_tilde_expand if
3434 inferior_cwd is not NULL.
3435
3436 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
3437
3438 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
3439 registers to the cache if their values have changed.
3440 (i387_xsave_to_cache): Provide default values for x87 control
3441 registers when these features are available, but disabled.
3442 * regcache.c (supply_register_by_name_zeroed): New function.
3443 * regcache.h (supply_register_by_name_zeroed): Declare new
3444 function.
3445
3446 2018-05-07 Tom Tromey <tom@tromey.com>
3447
3448 * configure: Rebuild.
3449
3450 2018-05-04 Tom Tromey <tom@tromey.com>
3451
3452 * configure: Rebuild.
3453
3454 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
3455 Pedro Alves <palves@redhat.com>
3456
3457 * linux-aarch64-low.c (aarch64_stopped_data_address):
3458 Likewise.
3459
3460 2018-04-27 Tom Tromey <tom@tromey.com>
3461
3462 * configure: Rebuild.
3463
3464 2018-04-23 Tom Tromey <tom@tromey.com>
3465
3466 * configure: Rebuild.
3467
3468 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
3469
3470 * Makefile.in (depcomp): Add "..".
3471 (all_deps_files): New and use it.
3472
3473 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3474
3475 * configure.srv (aarch64*-*-linux*): Don't include xml.
3476 (i[34567]86-*-cygwin*): Likewise.
3477 (i[34567]86-*-linux*): Likewise.
3478 (i[34567]86-*-lynxos*): Likewise.
3479 (i[34567]86-*-mingw32ce*): Likewise.
3480 (i[34567]86-*-mingw*): Likewise.
3481 (i[34567]86-*-nto*): Likewise.
3482 (tic6x-*-uclinux): Likewise.
3483 (x86_64-*-linux*): Likewise.
3484 (x86_64-*-mingw*): Likewise.
3485 (x86_64-*-cygwin*): Likewise.
3486
3487 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3488
3489 * tdesc.c: Remove xml parameter.
3490
3491 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3492
3493 * server.c (get_features_xml): Remove cast.
3494 * tdesc.c (void target_desc::accept): Fill in function.
3495 (tdesc_get_features_xml): Remove old xml creation.
3496 (print_xml_feature::visit_pre): Add xml vistor.
3497 * tdesc.h (struct target_desc): Make xmltarget mutable.
3498 (tdesc_get_features_xml): Remove declaration.
3499
3500 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3501
3502 * tdesc.c (tdesc_architecture_name): Add new function.
3503 (tdesc_osabi_name): Likewise.
3504 (tdesc_get_features_xml): Use new functions.
3505
3506 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3507
3508 * tdesc.c (tdesc_create_flags): Remove.
3509 (tdesc_add_flag): Likewise.
3510 (tdesc_named_type): Likewise.
3511 (tdesc_create_union): Likewise.
3512 (tdesc_create_struct): Likewise.
3513 (tdesc_create_vector): Likewise.
3514 (tdesc_add_bitfield): Likewise.
3515 (tdesc_add_field): Likewise.
3516 (tdesc_set_struct_size): Likewise.
3517
3518 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3519
3520 * tdesc.c (~target_desc): Remove implictly deleted items.
3521 (init_target_desc): Iterate all features.
3522 (tdesc_get_features_xml): Use vector.
3523 (tdesc_create_feature): Create feature.
3524 * tdesc.h (tdesc_feature) Remove
3525 (target_desc): Add features.
3526
3527 2018-04-18 Alan Hayward <alan.hayward@arm.com>
3528
3529 * Makefile.in: Add common/tdesc.c
3530 * tdesc.c (init_target_desc): init all reg_defs from register
3531 vector.
3532 (tdesc_create_reg): Create tdesc_reg.
3533 * tdesc.h (tdesc_feature): Add register vector.
3534
3535 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
3536
3537 * tdesc.h (struct target_desc) <features>: Change type to
3538 std::vector<std::string>.
3539 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
3540 changes.
3541 (tdesc_get_features_xml): Likewise.
3542 (tdesc_create_feature): Likewise.
3543
3544 2018-03-26 Alan Hayward <alan.hayward@arm.com>
3545
3546 * regcache.c (find_register_by_number): Return a ref.
3547 (find_regno): Use references.
3548 (register_size): Likewise.
3549 (register_data): Likewise.
3550 * tdesc.c (target_desc::~target_desc): Remove free calls.
3551 (target_desc::operator==): Use std::vector compare.
3552 (init_target_desc): Use reference.
3553 (tdesc_create_reg): Use reg constructors.
3554 * tdesc.h (struct target_desc): Replace pointer with object.
3555
3556 2018-03-23 Alan Hayward <alan.hayward@arm.com>
3557
3558 * regcache.c (find_register_by_number): Make static.
3559 (find_regno): Use find_register_by_number
3560 * regcache.h (struct reg): Remove declaration.
3561
3562 2018-03-23 Alan Hayward <alan.hayward@arm.com>
3563
3564 * tdesc.c (target_desc::~target_desc): Move to here.
3565 (target_desc::operator==): Likewise.
3566 * tdesc.h (target_desc::~target_desc): Move from here.
3567 (target_desc::operator==): Likewise.
3568
3569 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
3570
3571 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
3572
3573 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3574
3575 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
3576 S390_TDESC_GS.
3577 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
3578 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
3579 and init_registers_s390_gs_linux64.
3580
3581 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3582
3583 * linux-s390-low.c (s390_fill_gs): Remove function.
3584 (s390_fill_gsbc): Remove function.
3585 (s390_regsets): Set fill functions for the guarded storage regsets
3586 to NULL.
3587
3588 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3589
3590 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
3591 the word size. Add comment.
3592 (s390_get_wordsize): New function.
3593 (s390_arch_setup): No longer select a temporary tdesc to fetch the
3594 pswm with it. Instead, use s390_get_wordsize to determine the
3595 word size first and derive the correct tdesc from that directly.
3596
3597 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
3598
3599 * Makefile.in: Include silent-rules.mk.
3600 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
3601 (COMPILE): Add ECHO_CXX.
3602 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3603 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
3604 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
3605 (version-generated.c): Add ECHO_GEN.
3606 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
3607 (IPAGENT_COMPILE): Add ECHO_CXX.
3608 (%-generated.c): Add ECHO_REGDAT.
3609
3610 2018-03-14 Tom Tromey <tom@tromey.com>
3611
3612 PR cli/14977:
3613 * ax.c (ax_printf): Special case for NULL.
3614
3615 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3616
3617 * linux-low.c (linux_qxfer_libraries_svr4): Use
3618 xml_escape_text_append.
3619
3620 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
3621
3622 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
3623
3624 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3625
3626 * server.c (handle_general_set): Remove unnecessary xstrdup.
3627
3628 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
3629
3630 * server.c (parse_debug_format_options): Adjust to
3631 delim_string_to_char_ptr_vec changes.
3632 * thread-db.c (thread_db_load_search): Adjust to
3633 dirnames_to_char_ptr_vec changes.
3634
3635 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
3636
3637 * target.h (target_enable_btrace, target_disable_btrace)
3638 (target_read_btrace, target_read_btrace_conf): Turn macro into
3639 inline function. Throw error if target method is not defined.
3640 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
3641 check for btrace target method. Be prepared to handle exceptions
3642 from btrace target methods.
3643
3644 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3645
3646 * server.c (captured_main): Change order of error message printed
3647 when the current working directory cannot be found.
3648
3649 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3650
3651 * server.c: Include "filenames.h" and "pathstuff.h".
3652 (program_name): Delete variable.
3653 (program_path): New anonymous class.
3654 (get_exec_wrapper): Use "program_path" instead of
3655 "program_name".
3656 (handle_v_run): Likewise.
3657 (captured_main): Likewise.
3658 (process_serial_event): Likewise.
3659
3660 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
3661
3662 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
3663 (OBJS): Add "pathstuff.o".
3664 * server.c (current_directory): New global variable.
3665 (captured_main): Initialize "current_directory".
3666
3667 2018-02-26 Alan Hayward <alan.hayward@arm.com>
3668
3669 * tdesc.c: Use common/tdesc.h.
3670 * tdesc.h: Likewise.
3671
3672 2018-02-20 Alan Hayward <alan.hayward@arm.com>
3673 Simon Marchi <simon.marchi@ericsson.com>
3674
3675 * Makefile.in: Switch order of make rules.
3676
3677 2018-02-19 Alan Hayward <alan.hayward@arm.com>
3678
3679 * Makefile.in: Add common directory in build.
3680 * configure.ac: Add common reference.
3681 * configure: Regenerate.
3682
3683 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3684
3685 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
3686 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
3687 * spu-low.c (spu_target_ops): Likewise.
3688 * win32-low.c (win32_target_ops): Likewise.
3689 * server.c (supported_btrace_packets): Report packets unconditionally.
3690 * target.h (target_ops) <supports_btrace>: Remove.
3691 (target_supports_btrace): Remove.
3692
3693 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
3694
3695 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
3696 (handle_btrace_disable): Change return type to void. Use exceptions
3697 to report errors.
3698 (handle_btrace_general_set): Catch exception and copy message to
3699 return message.
3700
3701 2018-02-08 Tom Tromey <tom@tromey.com>
3702
3703 * linux-low.c (install_software_single_step_breakpoints): Use
3704 make_scoped_restore.
3705 * inferiors.c (make_cleanup_restore_current_thread): Remove.
3706 (do_restore_current_thread_cleanup): Remove.
3707 * gdbthread.h (make_cleanup_restore_current_thread): Don't
3708 declare.
3709
3710 2018-02-08 Tom Tromey <tom@tromey.com>
3711
3712 * mem-break.c (set_raw_breakpoint_at): Use
3713 gdb::unique_xmalloc_ptr.
3714
3715 2018-01-30 Pedro Alves <palves@redhat.com>
3716
3717 PR gdb/13211
3718 * target.c (target_terminal::terminal_state): Rename to ...
3719 (target_terminal::m_terminal_state): ... this.
3720
3721 2018-01-19 James Clarke <jrtc27@jrtc27.com>
3722
3723 * linux-low.c (handle_extended_wait): Surround call to
3724 thread_db_notice_clone with #ifdef USE_THREAD_DB.
3725
3726 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
3727
3728 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
3729 linux_ptrace_attach_fail_reason_string now returning an
3730 std::string.
3731 (linux_attach): Likewise.
3732 * thread-db.c (attach_thread): Likewise.
3733
3734 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
3735
3736 PR gdb/21559
3737 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
3738 checking for fs_base/gs_base fields in struct user_regs_struct.
3739 * configure: Regenerate.
3740
3741 2018-01-16 Yao Qi <yao.qi@linaro.org>
3742
3743 PR gdb/18749
3744 * linux-low.c (fetch_register): Call supply_register instead of
3745 error.
3746
3747 2018-01-08 Yao Qi <yao.qi@linaro.org>
3748 Simon Marchi <simon.marchi@ericsson.com>
3749
3750 * Makefile.in (OBS): Remove selftest.o.
3751 * configure.ac: Set srv_selftest_objs if $development is true.
3752 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
3753 * configure: Re-generated.
3754 * server.c (captured_main): Wrap variable selftest_filter with
3755 GDB_SELF_TEST.
3756
3757 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
3758
3759 * server.c (parse_debug_format_options): Return std::string.
3760 (handle_monitor_command, captured_main): Adjust.
3761
3762 2018-01-05 Pedro Alves <palves@redhat.com>
3763
3764 PR gdb/18653
3765 * server.c (captured_main): Pass quiet=false to
3766 save_original_signals_state.
3767
3768 2018-01-01 Joel Brobecker <brobecker@adacore.com>
3769
3770 * gdbreplay.c (gdbreplay_version): Update copyright year in
3771 version message.
3772 * server.c (gdbserver_version): Likewise.
3773
3774 2017-12-08 Tom Tromey <tom@tromey.com>
3775
3776 * ax.c (ax_printf): Update.
3777
3778 2017-12-07 Yao Qi <yao.qi@linaro.org>
3779
3780 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
3781 aarch64_linux_read_description.
3782 * linux-amd64-ipa.c (idx2mask): New array.
3783 (get_ipa_tdesc): Move idx2mask out.
3784 (initialize_low_tracepoint): Initialize target descriptions.
3785 * linux-i386-ipa.c (idx2mask): New array.
3786 (get_ipa_tdesc): Move idx2mask out.
3787 (initialize_low_tracepoint): Initialize target descriptions.
3788
3789 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
3790
3791 * tdesc.c (struct tdesc_type): Change return type.
3792 (tdesc_add_flag): Change parameter type.
3793 (tdesc_add_bitfield): Likewise.
3794 (tdesc_add_field): Likewise.
3795 (tdesc_set_struct_size): Likewise.
3796
3797 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
3798
3799 * regcache.c (registers_to_string): Remove unused variable.
3800
3801 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3802
3803 * inferiors.c (for_each_inferior_with_data): Remove.
3804 * inferiors.h (for_each_inferior_with_data): Remove.
3805 * server.c (handle_qxfer_threads_worker): Change parameter type.
3806 (handle_qxfer_threads_proper): Use for_each_thread.
3807
3808 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3809
3810 * inferiors.c (for_each_inferior): Remove.
3811 (clear_inferiors): Use for_each_thread.
3812 * inferiors.h (for_each_inferior): Remove.
3813 * linux-low.c (linux_wait_for_event_filtered): Use
3814 for_each_thread.
3815 (linux_stabilize_threads): Likewise.
3816 * regcache.c (regcache_release): Likewise.
3817 * server.c (gdb_wants_all_threads_stopped): Likewise.
3818 (clear_pending_status_callback): Remove.
3819 (handle_status): Use for_each_thread.
3820 (captured_main): Likewise.
3821 * win32-low.c (child_init_thread_list): Likewise.
3822 (win32_clear_inferiors): Likewise.
3823 (fake_breakpoint_event): Likewise.
3824
3825 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3826
3827 * inferiors.h (find_inferior): Remove.
3828 * inferiors.c (find_inferior): Remove.
3829
3830 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3831
3832 * linux-low.c (resume_status_pending_p): Update comment.
3833 (need_step_over_p): Update comment.
3834
3835 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3836
3837 * linux-low.c (proceed_one_lwp): Return void, change parameter
3838 type.
3839 (unsuspend_and_proceed_one_lwp): Likewise.
3840 (proceed_all_lwps): Use for_each_thread.
3841 (unstop_all_lwps): Likewise.
3842
3843 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3844
3845 * linux-low.c (linux_resume_one_thread): Return void, take
3846 parameter directly.
3847 (linux_resume): Use for_each_thread.
3848
3849 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3850
3851 * linux-low.c (send_sigstop_callback): Return void, change
3852 parameter type. Rename to...
3853 (send_sigstop): ... this.
3854 (suspend_and_send_sigstop_callback): Return void, change parameter
3855 type. Rename to...
3856 (suspend_and_send_sigstop): ... this.
3857 (stop_all_lwps): Use for_each_thread.
3858
3859 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3860
3861 * linux-low.c (lwp_running): Return bool, remove unused
3862 argument.
3863 (linux_stabilize_threads): Use find_thread.
3864
3865 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3866
3867 * linux-low.c (select_singlestep_lwp_callback): Remove.
3868 (count_events_callback): Remove.
3869 (select_event_lwp_callback): Remove.
3870 (select_event_lwp): Use find_thread/for_each_thread.
3871
3872 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3873
3874 * linux-low.c (not_stopped_callback): Return bool, take filter
3875 argument directly.
3876 (linux_wait_for_event_filtered): Use find_thread.
3877 (linux_wait_1): Likewise.
3878
3879 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3880
3881 * linux-low.c (same_lwp): Remove.
3882 (find_lwp_pid): Use find_thread.
3883
3884 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3885
3886 * linux-low.c (delete_lwp_callback): Remove.
3887 (linux_mourn): Use for_each_thread.
3888
3889 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3890
3891 * linux-low.c (linux_detach_lwp_callback): Return void, remove
3892 args parameter, don't check for pid.
3893 (linux_detach): Use for_each_thread.
3894
3895 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3896
3897 * linux-low.c (struct counter): Remove.
3898 (second_thread_of_pid_p): Remove.
3899 (last_thread_of_process_p): Use find_thread.
3900
3901 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3902
3903 * inferiors.c (find_inferior_in_random): Remove.
3904 * inferiors.h (find_inferior_in_random): Remove.
3905 * linux-low.c (status_pending_p_callback): Return bool, accept
3906 parameter ptid directly.
3907 (linux_wait_for_event_filtered): Use find_thread_in_random.
3908 (linux_wait_1): Likewise.
3909
3910 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3911
3912 * inferiors.c (find_inferior_id): Remove.
3913 (find_thread_ptid): Move implemention from find_inferior_id to
3914 here.
3915 * inferiors.h (find_inferior_id): Remove.
3916 * server.c (handle_status): Use find_thread_ptid.
3917 (process_serial_event): Likewise.
3918 * thread-db.c (find_one_thread): Likewise.
3919 (thread_db_thread_handle): Likewise.
3920 * win32-low.c (thread_rec): Likewise.
3921 (child_delete_thread): Likewise.
3922 (win32_thread_alive): Likewise.
3923 (get_child_debug_event): Likewise.
3924
3925 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3926
3927 * linux-mips-low.c (update_watch_registers_callback): Return
3928 void, remove pid_p parameter, don't check for pid.
3929 (mips_insert_point, mips_remove_point): Use for_each_thread.
3930
3931 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3932
3933 * lynx.low (lynx_delete_thread_callback): Remove.
3934 (lynx_mourn): Use for_each_thread.
3935
3936 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
3937
3938 * regcache.c (regcache_invalidate_one): Remove.
3939 (regcache_invalidate_pid): use for_each_thread.
3940
3941 2017-11-26 Tom Tromey <tom@tromey.com>
3942
3943 * linux-low.c (linux_create_inferior): Update.
3944
3945 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
3946
3947 * spu-low.c (spu_create_inferior): Fix typo in argument name.
3948
3949 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3950
3951 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
3952 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3953 * linux-aarch64-tdesc-selftest.c: New file.
3954 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3955
3956 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3957
3958 * configure.srv: Add new file.
3959 * linux-aarch64-low.c (initialize_low_arch): Call init func.
3960 * linux-aarch64-tdesc-selftest.c: New file.
3961 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
3962
3963 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3964
3965 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
3966 * linux-aarch64-low.c (initialize_low_arch): Remove init.
3967 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
3968
3969 2017-11-24 Alan Hayward <alan.hayward@arm.com>
3970
3971 * configure.srv: Add new files.
3972 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
3973 aarch64_linux_read_description.
3974 * linux-aarch64-low.c (aarch64_linux_read_description):
3975 Merge with aarch64_arch_setup.
3976 (aarch64_arch_setup): Call aarch64_linux_read_description.
3977 * linux-aarch64-tdesc.c: New file.
3978 * linux-aarch64-tdesc.h: New file.
3979
3980 2017-11-24 Yao Qi <yao.qi@linaro.org>
3981
3982 * configure.srv: Set $srv_regobj for tic6x-linux.
3983 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
3984 (tic6x_read_description): Move some code to tic6x_arch_setup.
3985 (tic6x_tdesc_test): New function.
3986 (initialize_low_arch): Call selftests::register_test.
3987
3988 2017-11-22 Yao Qi <yao.qi@linaro.org>
3989
3990 * remote-utils.c (prepare_resume_reply): Use memcpy.
3991
3992 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3993
3994 * linux-low.c (kill_one_lwp_callback): Return void, take
3995 argument directly, don't filter on pid.
3996 (linux_kill): Use for_each_thread.
3997
3998 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
3999
4000 * linux-low.c (need_step_over_p): Return bool, remove dummy
4001 argument.
4002 (linux_resume, proceed_all_lwps): Use find_thread.
4003
4004 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4005
4006 * linux-low.c (resume_status_pending_p): Return bool, remove
4007 flag_p argument.
4008 (linux_resume): Use find_thread.
4009
4010 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4011
4012 * linux-low.c (struct thread_resume_array): Remove.
4013 (linux_set_resume_request): Return void, take arguments
4014 directly.
4015 (linux_resume): Use for_each_thread.
4016
4017 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4018
4019 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
4020 return bool, remove data argument.
4021 (linux_stabilize_threads): Use find_thread.
4022
4023 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4024
4025 * linux-low.c (unsuspend_one_lwp): Remove.
4026 (unsuspend_all_lwps): Use for_each_thread, inline code from
4027 unsuspend_one_lwp.
4028
4029 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4030
4031 * gdbthread.h (find_thread): Add overload with ptid_t filter.
4032 * linux-low.c (struct iterate_over_lwps_args): Remove.
4033 (iterate_over_lwps_filter): Remove.
4034 (iterate_over_lwps): Use find_thread.
4035
4036 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4037
4038 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
4039 (linux_handle_new_gdb_connection): Use for_each_thread, inline
4040 code from reset_lwp_ptrace_options_callback.
4041
4042 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4043
4044 * linux-arm-low.c (struct update_registers_data): Remove.
4045 (update_registers_callback): Return void, take arguments
4046 directly, don't check thread's pid.
4047 (arm_insert_point, arm_remove_point): Use for_each_thread.
4048
4049 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4050
4051 * win32-low.c (continue_one_thread): Return void, take argument
4052 directly.
4053 (child_continue): Use for_each_thread.
4054
4055 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
4056
4057 * win32-i386-low.c (update_debug_registers_callback): Rename
4058 to ...
4059 (update_debug_registers): ... this, return void, remove pid_p arg.
4060 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
4061
4062 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
4063
4064 * inferiors.h (struct process_info): Add constructor, initialize
4065 fields..
4066 <syscalls_to_catch>: Change type to std::vector<int>.
4067 * inferiors.c (add_process): Allocate process_info with new.
4068 (remove_process): Free process_info with delete.
4069 * linux-low.c (handle_extended_wait): Adjust.
4070 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
4071 * server.c (handle_general_set): Adjust.
4072
4073 2017-11-16 Pedro Alves <palves@redhat.com>
4074
4075 * remote-utils.c (remote_close): Block SIGIO signals instead of
4076 uninstalling the SIGIO handler.
4077
4078 2017-11-16 Alan Hayward <alan.hayward@arm.com>
4079
4080 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
4081
4082 2017-11-16 Yao Qi <yao.qi@linaro.org>
4083
4084 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
4085 (tic6x_store_gregset): Likewise.
4086 (tic6x_usrregs_info): Move it up.
4087
4088 2017-11-15 Alan Hayward <alan.hayward@arm.com>
4089
4090 * Makefile.in: Update arch rules.
4091 * configure.srv: Explicitly mark arch/ files.
4092
4093 2017-11-13 Andreas Schwab <schwab@suse.de>
4094
4095 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
4096 function.
4097 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4098
4099 2017-11-06 Pedro Alves <palves@redhat.com>
4100
4101 * config.in, configure: Regenerate.
4102
4103 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4104
4105 * target.c (struct thread_search): Remove.
4106 (thread_search_callback): Remove.
4107 (prepare_to_access_memory): Use for_each_thread instead of
4108 find_inferior. Inline code from thread_search_callback.
4109
4110 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4111
4112 * server.c (struct visit_actioned_threads_data): Remove.
4113 (visit_actioned_threads): Change prototype to take arguments
4114 directly.
4115 (resume): Use find_thread instead of find_inferior.
4116
4117 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4118
4119 * server.c (queue_stop_reply_callback): Change prototype, return
4120 void.
4121 (find_status_pending_thread_callback): Remove.
4122 (handle_status): Replace find_inferior with find_thread and
4123 for_each_thread.
4124
4125 2017-10-25 Alan Hayward <alan.hayward@arm.com>
4126
4127 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
4128 with REGNO.
4129 (aarch64_store_gregset): Likewise.
4130 (aarch64_fill_fpregset): Likewise.
4131 (aarch64_store_fpregset): Likewise.
4132
4133 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
4134
4135 * gdbthread.h (find_thread, for_each_thread): New functions.
4136 * inferiors.c (thread_of_pid): Remove.
4137 (find_any_thread_of_pid): Use find_thread.
4138 * linux-low.c (num_lwps): Use for_each_thread.
4139
4140 2017-10-17 Yao Qi <yao.qi@linaro.org>
4141
4142 * Makefile.in: Remove one rule.
4143 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
4144
4145 2017-10-17 Yao Qi <yao.qi@linaro.org>
4146
4147 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
4148 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
4149
4150 2017-10-17 Yao Qi <yao.qi@linaro.org>
4151
4152 * configure.srv: Rename arm.o with arch/arm.o.
4153
4154 2017-10-17 Yao Qi <yao.qi@linaro.org>
4155
4156 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
4157 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
4158 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
4159 (arch-i386.o, arch-amd64.o): Remove rules.
4160 (arch/%.o): New rule.
4161 Update POSTCOMPILE and COMPILE.pre.
4162 * configure.ac: Invoke AC_CONFIG_COMMANDS.
4163 * configure: Re-generated.
4164 * configure.srv: Replace arch-i386.o with arch/i386.o.
4165 Replace arch-amd64.o with arch/amd64.o.
4166
4167 2017-10-16 Yao Qi <yao.qi@linaro.org>
4168
4169 * configure: Regenerated.
4170
4171 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4172
4173 * inferiors.h: (struct inferior_list): Remove.
4174 (struct inferior_list_entry); Remove.
4175 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
4176 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
4177 get_first_inferior): Remove.
4178 (for_each_inferior, for_each_inferior_with_data, find_inferior,
4179 find_inferior_id, find_inferior_in_random): Change signature.
4180 * inferiors.c (all_threads): Change type to
4181 std::list<thread_info *>.
4182 (get_thread): Remove macro.
4183 (find_inferior, find_inferior_id): Change signature, implement
4184 using find_thread.
4185 (find_inferior_in_random): Change signature, implement using
4186 find_thread_in_random.
4187 (for_each_inferior, for_each_inferior_with_data): Change
4188 signature, implement using for_each_thread.
4189 (add_inferior_to_list, remove_inferior): Remove.
4190 (add_thread, get_first_thread, thread_of_pid,
4191 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
4192 (get_first_inferior, one_inferior_p, clear_inferior_list):
4193 Remove.
4194 (clear_inferiors, get_thread_process): Update.
4195 * gdbthread.h: Include <list>.
4196 (struct thread_info) <entry>: Remove field.
4197 <id>: New field.
4198 (all_threads): Change type to std::list<thread_info *>.
4199 (get_first_inferior): Add doc.
4200 (find_thread, for_each_thread, find_thread_in_random): New
4201 functions.
4202 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
4203 * linux-arm-low.c (update_registers_callback): Update.
4204 * linux-low.c (second_thread_of_pid_p): Update.
4205 (kill_one_lwp_callback, linux_detach_lwp_callback,
4206 delete_lwp_callback, status_pending_p_callback, same_lwp,
4207 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
4208 iterate_over_lwps, not_stopped_callback,
4209 resume_stopped_resumed_lwps, count_events_callback,
4210 select_singlestep_lwp_callback, select_event_lwp_callback,
4211 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
4212 suspend_and_send_sigstop_callback, wait_for_sigstop,
4213 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
4214 lwp_running, linux_set_resume_request, resume_status_pending_p,
4215 need_step_over_p, start_step_over, linux_resume_one_thread,
4216 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
4217 reset_lwp_ptrace_options_callback): Update.
4218 * linux-mips-low.c (update_watch_registers_callback): Update.
4219 * regcache.c (regcache_invalidate_one, regcache_invalidate):
4220 Update.
4221 (free_register_cache_thread_one): Remove.
4222 (regcache_release): Update.
4223 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
4224 handle_qxfer_threads_worker): Update.
4225 (handle_query): Update, use list iterator.
4226 (visit_actioned_threads, handle_pending_status,
4227 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
4228 clear_pending_status_callback, set_pending_status_callback,
4229 find_status_pending_thread_callback, handle_status,
4230 process_serial_event): Update.
4231 * target.c (thread_search_callback): Update.
4232 * thread-db.c (thread_db_get_tls_address): Update.
4233 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
4234 Update.
4235 * win32-i386-low.c (update_debug_registers_callback): Update.
4236 * win32-low.c (delete_thread_info, child_delete_thread,
4237 continue_one_thread, suspend_one_thread,
4238 get_child_debug_event): Adjust.
4239
4240 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4241
4242 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
4243 * inferiors.h: Include <list>.
4244 (struct process_info) <entry>: Remove field.
4245 <pid>: New field.
4246 (pid_of): Change macro to function.
4247 (ptid_of, lwpid_of): Remove macro.
4248 (all_processes): Change type to std::list<process_info *>.
4249 (ALL_PROCESSES): Remove macro.
4250 (for_each_process, find_process): New function.
4251 * inferiors.c (all_processes): Change type to
4252 std::list<process_info *>.
4253 (find_thread_process): Adjust.
4254 (add_process): Likewise.
4255 (remove_process): Likewise.
4256 (find_process_pid): Likewise.
4257 (get_first_process): Likewise.
4258 (started_inferior_callback): Remove.
4259 (have_started_inferiors_p): Adjust.
4260 (attached_inferior_callback): Remove.
4261 (have_attached_inferiors_p): Adjust.
4262 * linux-low.c (check_zombie_leaders): Likewise.
4263 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
4264 (x86_linux_update_xmltarget): Adjust.
4265 * server.c (handle_query): Likewise.
4266 (gdb_reattached_process): Remove.
4267 (handle_status): Adjust.
4268 (kill_inferior_callback): Likewise.
4269 (detach_or_kill_inferior): Remove.
4270 (print_started_pid): Likewise.
4271 (print_attached_pid): Likewise.
4272 (detach_or_kill_for_exit): Update.
4273 (process_serial_event): Likewise.
4274 * linux-arm-low.c (arm_new_fork): Likewise.
4275
4276 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
4277
4278 * dll.h: Include <list>.
4279 (struct dll_info): Add constructor.
4280 <entry>: Remove field.
4281 (all_dlls): Change type to std::list<dll_info>.
4282 * dll.c: Include <algorithm>.
4283 (get_dll): Remove macro.
4284 (all_dlls): Change type to std::list<dll_info *>.
4285 (free_one_dll): Remove.
4286 (match_dll): Likewise.
4287 (loaded_dll): Adjust.
4288 (unloaded_dll): Adjust to all_dlls type change, use
4289 std::find_if. Inline code from match_dll.
4290 (clear_dlls): Adjust to all_dlls type change.
4291 * server.c (emit_dll_description): Remove.
4292 (handle_qxfer_libraries): Adjust to all_dlls type change,
4293 integrate emit_dll_description's functionality.
4294
4295 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4296
4297 * linux-low.h (struct linux_target_ops) <delete_process>: New
4298 field.
4299 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
4300 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
4301 (struct linux_target_ops): Add delete_process callback.
4302 * linux-arm-low.c (arm_delete_process): New.
4303 (struct linux_target_ops): Add delete_process callback.
4304 * linux-bfin-low.c (struct linux_target_ops): Likewise.
4305 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
4306 * linux-m32r-low.c (struct linux_target_ops): Likewise.
4307 * linux-mips-low.c (mips_linux_delete_process): New.
4308 (struct linux_target_ops): Add delete_process callback.
4309 * linux-ppc-low.c (struct linux_target_ops): Likewise.
4310 * linux-s390-low.c (struct linux_target_ops): Likewise.
4311 * linux-sh-low.c (struct linux_target_ops): Likewise.
4312 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
4313 * linux-tile-low.c (struct linux_target_ops): Likewise.
4314 * linux-x86-low.c (x86_linux_delete_process): New.
4315 (struct linux_target_ops): Add delete_process callback.
4316 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
4317
4318 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
4319
4320 * linux-aarch64-low.c (the_low_target): Add thread delete
4321 callback.
4322 * linux-arm-low.c (arm_delete_thread): New function.
4323 (the_low_target): Add thread delete callback.
4324 * linux-bfin-low.c (the_low_target): Likewise.
4325 * linux-crisv32-low.c (the_low_target): Likewise.
4326 * linux-low.c (delete_lwp): Invoke delete_thread callback if
4327 set.
4328 * linux-low.h (struct linux_target_ops) <delete_thread>: New
4329 field.
4330 * linux-m32r-low.c (the_low_target): Add thread delete callback.
4331 * linux-mips-low.c (mips_linux_delete_thread): New function.
4332 (the_low_target): Add thread delete callback.
4333 * linux-ppc-low.c (the_low_target): Likewise.
4334 * linux-s390-low.c (the_low_target): Likewise.
4335 * linux-sh-low.c (the_low_target): Likewise.
4336 * linux-tic6x-low.c (the_low_target): Likewise.
4337 * linux-tile-low.c (the_low_target): Likewise.
4338 * linux-x86-low.c (the_low_target): Likewise.
4339 * linux-xtensa-low.c (the_low_target): Likewise.
4340
4341 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
4342
4343 * win32-low.c: Include "common-inferior.h".
4344
4345 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4346
4347 * inferiors.c (set_inferior_cwd): New function.
4348 * server.c (handle_general_set): Handle QSetWorkingDir packet.
4349 (handle_query): Inform that QSetWorkingDir is supported.
4350 * win32-low.c (create_process): Pass the inferior's cwd to
4351 CreateProcess.
4352
4353 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4354
4355 * inferiors.c (current_inferior_cwd): New global variable.
4356 (get_inferior_cwd): New function.
4357 * inferiors.h (struct process_info) <cwd>: New field.
4358
4359 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
4360
4361 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
4362 (OBS): Add gdb_tilde_expand.o.
4363
4364 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
4365
4366 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
4367 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
4368
4369 2017-09-29 Pedro Alves <palves@redhat.com>
4370
4371 * ax.c (gdb_parse_agent_expr): Constify.
4372 * ax.h (gdb_parse_agent_expr): Constify.
4373 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4374 Constify.
4375 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
4376 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
4377 * remote-utils.h (read_ptid): Constify.
4378 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
4379 (process_point_options, process_serial_event): Constify.
4380 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
4381 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
4382 (cmd_qtbuffer): Constify.
4383
4384 2017-09-29 Pedro Alves <palves@redhat.com>
4385
4386 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
4387 fails.
4388
4389 2017-09-29 Pedro Alves <palves@redhat.com>
4390
4391 * linux-low.c (handle_extended_wait): Pass parent thread instead
4392 of process to thread_db_notice_clone.
4393 * linux-low.h (thread_db_notice_clone): Replace parent process
4394 parameter with parent thread parameter.
4395 * thread-db.c (find_one_thread): Add comment.
4396 (thread_db_notice_clone): Replace parent process parameter with
4397 parent thread parameter. Temporarily switch to the parent thread.
4398
4399 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
4400
4401 * gdbthread.h: Include "common-gdbthread.h".
4402 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
4403 "if" when validating the ptid.
4404 * remote-utils.c: Include "gdbthread.h".
4405 (prepare_resume_reply): Use "switch_to_thread".
4406 * target.c (done_accessing_memory): Likewise.
4407
4408 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
4409
4410 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
4411 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
4412 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
4413 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
4414 s390x-gs-linux64-ipa.o to ipa_obj.
4415 * linux-s390-low.c (HWCAP_S390_GS): New define.
4416 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
4417 New functions.
4418 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
4419 (s390_arch_setup): Check for guarded-storage support and choose
4420 appropriate tdesc.
4421 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
4422 init_registers_s390x_gs_linux64.
4423 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
4424 enum value.
4425 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
4426 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
4427
4428 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
4429
4430 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
4431
4432 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4433
4434 * linux-low.h (struct lwp_info): Add new field, thread_handle.
4435 (thread_db_thread_handle): Declare.
4436 * linux-low.c (linux_target_ops): Initialize thread_handle.
4437 * server.c (handle_qxfer_threads_worker): Add support for
4438 "handle" attribute.
4439 * target.h (struct target_ops): Add new function pointer,
4440 thread_handle.
4441 (target_thread_handle): Define.
4442 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
4443 field in lwp.
4444 (thread_db_thread_handle): New function.
4445
4446 2017-09-21 Kevin Buettner <kevinb@redhat.com>
4447
4448 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
4449 * linux-low.h (thread_db_notice_clone): Declare.
4450 * thread-db.c (thread_db_notice_clone): New function.
4451
4452 2017-09-21 Pedro Alves <palves@redhat.com>
4453
4454 * server.c (gdb_read_memory, handle_status, process_serial_event)
4455 (handle_serial_event, handle_target_event): Adjust to
4456 set_desired_thread prototype change.
4457 * target.c (set_desired_thread): Remove 'use_general' parameter
4458 and adjust.
4459 * target.h (set_desired_thread): Remove 'use_general' parameter.
4460
4461 2017-09-20 Tom Tromey <tom@tromey.com>
4462
4463 * target.c (target_terminal::terminal_state): Define.
4464 (target_terminal::init): Rename from target_terminal_init.
4465 (target_terminal::inferior): Rename from
4466 target_terminal_inferior.
4467 (target_terminal::ours): Rename from target_terminal_ours.
4468 (target_terminal::ours_for_output, target_terminal::info): New.
4469
4470 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4471
4472 * server.c (accumulate_file_name_length): Remove.
4473 (emit_dll_description): Adjust to std::string change.
4474 (handle_qxfer_libraries): Use std::string to hold document.
4475
4476 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4477
4478 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
4479 return type of xml_escape_text.
4480 * server.c (emit_dll_description): Likewise.
4481
4482 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
4483
4484 * server.c (captured_main): Accept argument for --selftest.
4485 Update run_tests call.
4486 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
4487 when registering selftests.
4488
4489 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
4490
4491 * regcache.c (get_thread_regcache): Update code to use "std::vector"
4492 instead of "VEC" for "target_desc.reg_defs".
4493 (regcache_cpy): Likewise.
4494 (registers_to_string): Likewise.
4495 (registers_from_string): Likewise.
4496 (find_regno): Likewise.
4497 (supply_regblock): Likewise.
4498 (regcache_raw_read_unsigned): Likewise.
4499 * tdesc.c (init_target_desc): Likewise.
4500 (tdesc_create_reg): Likewise.
4501 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
4502 (struct target_desc) <reg_defs>: Convert to "std::vector".
4503 (target_desc): Do not initialize "reg_defs".
4504 (~target_desc): Update code to use "std::vector" instead of "VEC"
4505 for "target_desc.reg_defs".
4506 (operator==): Likewise.
4507
4508 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4509
4510 * inferiors.h (thread_to_gdb_id): Remove.
4511 * inferiors.c (thread_to_gdb_id): Remove.
4512 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
4513 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
4514 lynx_store_registers, lynx_read_memory, lynx_write_memory):
4515 Likewise.
4516 * nto-low.c (nto_fetch_registers, nto_store_registers,
4517 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
4518
4519 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4520
4521 * inferiors.h (gdb_id_to_thread_id): Remove.
4522 * inferiors.c (gdb_id_to_thread_id): Remove.
4523 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
4524 removal. Move pid declaration closer to where it's used.
4525
4526 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4527
4528 * server.c (handle_detach): New function.
4529 (process_serial_event): Move code out, call handle_detach.
4530
4531 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4532
4533 * server.c (require_running): Rename to ...
4534 (require_running_or_return): ... this ...
4535 (require_running_or_break): ... and this.
4536 (handle_query, process_serial_event): Adjust.
4537
4538 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4539
4540 * linux-low.c (linux_set_resume_request): Remove unused
4541 variables.
4542
4543 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
4544
4545 * server.c (first_thread_of): Remove.
4546 (process_serial_event): Replace usage of first_thread_of with
4547 find_any_thread_of_pid.
4548 * tracepoint.c (same_process_p): Remove.
4549 (gdb_agent_about_to_close): Replace usage of same_process_p with
4550 find_any_thread_of_pid.
4551 * linux-x86-low.c (same_process_callback): Remove.
4552 (x86_arch_setup_process_callback): Replace usage of
4553 same_process_callback with find_any_thread_of_pid.
4554 * thread-db.c (any_thread_of): Remove.
4555 (switch_to_process): Replace usage of any_thread_of with
4556 find_any_thread_of_pid.
4557 * inferiors.c (thread_pid_matches_callback): Remove.
4558 (find_thread_process): Adjust to use find_any_thread_of_pid.
4559
4560 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
4561
4562 * regcache.c (get_thread_regcache): Guard calls to "memset"
4563 with "!VEC_empty".
4564
4565 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
4566
4567 * linux-low.c (handle_extended_wait): Use
4568 "allocate_target_description" instead of "XNEW".
4569 * linux-x86-low.c (initialize_low_arch): Likewise.
4570
4571 2017-09-05 Yao Qi <yao.qi@linaro.org>
4572
4573 * configure.srv (srv_i386_regobj): Remove.
4574 (srv_amd64_regobj): Remove.
4575 (srv_regobj): Set it to "" for x86 non-linux targets.
4576 * linux-x86-tdesc.c (i386_linux_read_description):
4577 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
4578 (init_registers_i386): Remove the declaration.
4579 (tdesc_i386): Remove the declaration.
4580 (lynx_i386_arch_setup): Call i386_create_target_description.
4581 * nto-x86-low.c: Likewise.
4582 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
4583 [!__x86_64__]: include arch/i386.h.
4584 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
4585
4586 2017-09-05 Yao Qi <yao.qi@linaro.org>
4587
4588 * configure.srv (srv_amd64_linux_xmlfiles): Remove
4589 i386/amd64-XXX-linux from it.
4590
4591 2017-09-05 Yao Qi <yao.qi@linaro.org>
4592
4593 * configure.srv: Empty srv_amd64_linux_regobj if $development is
4594 false.
4595 (ipa_amd64_linux_regobj): Remove.
4596 (ipa_x32_linux_regobj): Remove.
4597
4598 2017-09-05 Yao Qi <yao.qi@linaro.org>
4599
4600 * Makefile.in (arch-amd64.o): New rule.
4601 * configure.srv: Append arch-amd64.o.
4602 * linux-amd64-ipa.c: Include common/x86-xstate.h.
4603 (get_ipa_tdesc): Call amd64_linux_read_description.
4604 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
4605 and init_registers_amd64_XXX.
4606 * linux-x86-low.c (x86_linux_read_description): Call
4607 amd64_linux_read_description.
4608 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
4609 (initialize_low_arch): Don't call init_registers_x32_XXX and
4610 init_registers_amd64_XXX.
4611 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
4612 and tdesc_amd64_XXX.
4613 [__x86_64__] (amd64_tdesc_test): New function.
4614 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
4615 and init_registers_amd64_XXX.
4616 * linux-x86-tdesc.c: Include arch/amd64.h.
4617 (xcr0_to_tdesc_idx): New function.
4618 (i386_linux_read_description): New function.
4619 (amd64_get_ipa_tdesc_idx): New function.
4620 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
4621 (amd64_get_ipa_tdesc): Declare.
4622
4623 2017-09-05 Yao Qi <yao.qi@linaro.org>
4624
4625 * configure.srv (srv_i386_linux_xmlfiles): Remove
4626 i386/i386-XXX-linux.xml from it.
4627
4628 2017-09-05 Yao Qi <yao.qi@linaro.org>
4629
4630 * configure.srv: Set srv_i386_linux_regobj empty if $development
4631 is false.
4632 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
4633 initialize_low_tdesc.
4634 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
4635 with #if initialize_low_tdesc.
4636 * linux-x86-tdesc-selftest.c: New file.
4637 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
4638
4639 2017-09-05 Yao Qi <yao.qi@linaro.org>
4640
4641 * Makefile.in (arch-i386.o): New rule.
4642 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
4643 (x86_64-*-linux*): Likewise.
4644 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
4645 include arch/i386.h.
4646 (i386_linux_read_description): Remove code and call
4647 i386_create_target_description.
4648 * tdesc.c (allocate_target_description): New function.
4649 * tdesc.h (set_tdesc_architecture): Remove declaration.
4650 (set_tdesc_osabi): Likewise.
4651
4652 2017-09-05 Yao Qi <yao.qi@linaro.org>
4653
4654 * linux-x86-tdesc.c: Don't include <inttypes.h>.
4655 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
4656 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
4657 .xmltarget.
4658 * server.c (get_features_xml): Call tdesc_get_features_xml.
4659 * tdesc.c (set_tdesc_architecture): New function.
4660 (set_tdesc_osabi): New function.
4661 (tdesc_get_features_xml): New function.
4662 (tdesc_create_feature): Add an argument.
4663 * tdesc.h (struct target_desc) <features>: New field.
4664 <arch, osabi>: New field.
4665 (~target_desc): xfree features, arch, and osabi.
4666 (target_desc::oerator==): Don't compare .xmltarget.
4667 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
4668 (set_tdesc_osabi): Likewise.
4669 (tdesc_get_features_xml): Likewise.
4670
4671 2017-09-05 Yao Qi <yao.qi@linaro.org>
4672
4673 * linux-x86-tdesc.c: Include selftest.h.
4674 (i386_tdesc_test): New function.
4675 (initialize_low_tdesc): Call selftests::register_test.
4676 * tdesc.h: Include regdef.h.
4677 (target_desc): Override operator == and !=.
4678
4679 2017-09-05 Yao Qi <yao.qi@linaro.org>
4680
4681 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
4682 (ipa_obj): Likewise.
4683 * linux-i386-ipa.c: Include common/x86-xstate.h
4684 (get_ipa_tdesc): Call i386_linux_read_description.
4685 (initialize_low_tracepoint): Don't call init_registers_XXX
4686 functions, call initialize_low_tdesc instead.
4687 * linux-x86-low.c (x86_linux_read_description): Call
4688 i386_linux_read_description.
4689 (initialize_low_arch): Don't call init_registers_i386_XXX
4690 functions, call initialize_low_tdesc.
4691 * linux-x86-tdesc.c: New file.
4692 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
4693 (i386_get_ipa_tdesc_idx): Declare.
4694 (i386_get_ipa_tdesc): Declare.
4695 (initialize_low_tdesc): Declare.
4696
4697 2017-09-05 Yao Qi <yao.qi@linaro.org>
4698
4699 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
4700 instead of 0.
4701
4702 2017-09-05 Yao Qi <yao.qi@linaro.org>
4703
4704 * Makefile.in (IPA_OBJS): Add vec-ipa.o
4705 * regcache.c (get_thread_regcache): Use VEC_length.
4706 (init_register_cache): Likewise.
4707 (regcache_cpy): Likewise.
4708 (registers_to_string): Iterate reg_defs via VEC_iterate.
4709 (find_regno): Likewise.
4710 (find_register_by_number): Use VEC_index.
4711 (register_size): Call find_register_by_number.
4712 (register_data): Call find_register_by_number.
4713 (supply_regblock): Use VEC_length.
4714 (regcache_raw_read_unsigned): Likewise.
4715 * tdesc.c (init_target_desc): Iterate reg_defs via
4716 VEC_iterate.
4717 (default_description): Update initializer.
4718 (copy_target_description): Don't update field num_registers.
4719 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
4720 <num_registers>: Remove.
4721
4722 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
4723
4724 * Makefile.in (.SECONDARY): Define target.
4725
4726 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
4727
4728 * linux-low.c (linux_wait_1): Adjust.
4729 * server.c (queue_stop_reply_callback): Adjust.
4730
4731 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
4732
4733 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
4734 QEnvironmentUnset and QEnvironmentReset packets.
4735 (handle_query): Inform remote that QEnvironmentHexEncoded,
4736 QEnvironmentUnset and QEnvironmentReset are supported.
4737
4738 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
4739
4740 * inferiors.h (inferior_target_data): Rename to ...
4741 (thread_target_data): ... this.
4742 (inferior_regcache_data): Rename to ...
4743 (thread_regcache_data): ... this.
4744 (set_inferior_regcache_data): Rename to ...
4745 (set_thread_regcache_data): ... this.
4746 * inferiors.c (inferior_target_data): Rename to ...
4747 (thread_target_data): ... this.
4748 (inferior_regcache_data): Rename to ...
4749 (thread_regcache_data): ... this.
4750 (set_inferior_regcache_data): Rename to ...
4751 (set_thread_regcache_data): ... this.
4752 (free_one_thread): Update.
4753 * linux-low.h (get_thread_lwp): Update.
4754 * regcache.c (get_thread_regcache): Update.
4755 (regcache_invalidate_thread): Update.
4756 (free_register_cache_thread): Update.
4757 * win32-i386-low.c (update_debug_registers_callback): Update.
4758 (win32_get_current_dr): Update.
4759 * win32-low.c (thread_rec): Update.
4760 (delete_thread_info): Update.
4761 (continue_one_thread): Update.
4762 (suspend_one_thread): Update.
4763
4764 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
4765
4766 * inferiors.c (set_inferior_target_data): Remove.
4767 * inferiors.h (set_inferior_target_data): Remove.
4768
4769 2017-08-18 Yao Qi <yao.qi@linaro.org>
4770
4771 * Makefile.in (OBS): Add selftest.o.
4772 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
4773 * configure, config.in: Re-generated.
4774 * server.c: Include common/sefltest.h.
4775 (captured_main): Handle option --selftest.
4776
4777 2017-08-09 Yao Qi <yao.qi@linaro.org>
4778
4779 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
4780 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
4781 i386-avx-mpx.o and i386-mmx.o.
4782 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
4783 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
4784 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
4785 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
4786 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
4787 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
4788 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
4789 i386/amd64-avx-mpx.xml.
4790
4791 2017-08-09 Yao Qi <yao.qi@linaro.org>
4792
4793 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
4794 and x32-avx-avx512.o.
4795 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
4796 i386/x32-avx-avx512.xml.
4797
4798 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
4799
4800 * tracepoint.h (enum class fast_tpoint_collect_result): New
4801 enumeration.
4802 (fast_tracepoint_collecting): Change return type to
4803 fast_tpoint_collect_result.
4804 * tracepoint.c (fast_tracepoint_collecting): Likewise.
4805 * linux-low.h: Include tracepoint.h.
4806 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
4807 fast_tpoint_collect_result.
4808 * linux-low.c (handle_tracepoints): Adjust.
4809 (linux_fast_tracepoint_collecting): Change return type to
4810 fast_tpoint_collect_result.
4811 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
4812 linux_wait_1, stuck_in_jump_pad_callback,
4813 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
4814 proceed_one_lwp): Adjust to type change.
4815
4816 2017-07-10 Yao Qi <yao.qi@linaro.org>
4817
4818 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
4819
4820 2017-06-29 Yao Qi <yao.qi@linaro.org>
4821
4822 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
4823 Remove.
4824 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
4825
4826 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
4827
4828 * Makefile.in (IPA_OBJS): Sort and format one item per line.
4829
4830 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
4831
4832 * linux-low.c (linux_create_inferior): Adjust code to access the
4833 environment information via 'gdb_environ' class.
4834 * lynx-low.c (lynx_create_inferior): Likewise.
4835 * server.c (our_environ): Make it an instance of 'gdb_environ'.
4836 (get_environ): Return a pointer to 'our_environ'.
4837 (captured_main): Initialize 'our_environ'.
4838 * server.h (get_environ): Adjust prototype.
4839 * spu-low.c (spu_create_inferior): Adjust code to access the
4840 environment information via 'gdb_environ' class.
4841
4842 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4843
4844 * linux-low.c (linux_read_memory, linux_write_memory): Remove
4845 usage of "register" keyword.
4846
4847 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4848
4849 * configure: Re-generate.
4850
4851 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4852
4853 * configure: Re-generate.
4854
4855 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
4856
4857 * Makefile.in (COMPILE.pre): Add "-x c++".
4858
4859 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
4860
4861 * fork-child.c: Conditionally include <signal.h>.
4862
4863 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4864
4865 * server.c (handle_general_set): Handle new packet
4866 "QStartupWithShell".
4867 (handle_query): Add "QStartupWithShell" to the list of supported
4868 packets.
4869 (gdbserver_usage): Add help text explaining the
4870 new "--startup-with-shell" and "--no-startup-with-shell" CLI
4871 options.
4872 (captured_main): Recognize and act upon the presence of the new
4873 CLI options.
4874
4875 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4876 Pedro Alves <palves@redhat.com>
4877
4878 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
4879 * configure: Regenerate.
4880 * configure.srv (srv_linux_obj): Add "fork-child.o" and
4881 "fork-inferior.o".
4882 (i[34567]86-*-lynxos*): Likewise.
4883 (spu*-*-*): Likewise.
4884 * fork-child.c: New file.
4885 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
4886 and "environ.h".
4887 (linux_ptrace_fun): New function.
4888 (linux_create_inferior): Adjust function prototype to reflect
4889 change on "target.h". Adjust function code to use
4890 "fork_inferior".
4891 (linux_request_interrupt): Delete "signal_pid".
4892 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4893 (lynx_ptrace_fun): New function.
4894 (lynx_create_inferior): Adjust function prototype to reflect
4895 change on "target.h". Adjust function code to use
4896 "fork_inferior".
4897 * nto-low.c (nto_create_inferior): Adjust function prototype and
4898 code to reflect change on "target.h". Update comments.
4899 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
4900 "common-terminal.h" and "environ.h".
4901 (terminal_fd): Moved to fork-child.c.
4902 (old_foreground_pgrp): Likewise.
4903 (restore_old_foreground_pgrp): Likewise.
4904 (last_status): Make it global.
4905 (last_ptid): Likewise.
4906 (our_environ): New variable.
4907 (startup_with_shell): Likewise.
4908 (program_name): Likewise.
4909 (program_argv): Rename to...
4910 (program_args): ...this.
4911 (wrapper_argv): New variable.
4912 (start_inferior): Delete function.
4913 (get_exec_wrapper): New function.
4914 (get_exec_file): Likewise.
4915 (get_environ): Likewise.
4916 (prefork_hook): Likewise.
4917 (post_fork_inferior): Likewise.
4918 (postfork_hook): Likewise.
4919 (postfork_child_hook): Likewise.
4920 (handle_v_run): Update code to deal with arguments coming from the
4921 remote host. Update calls from "start_inferior" to
4922 "create_inferior".
4923 (captured_main): Likewise. Initialize environment variable. Call
4924 "have_job_control".
4925 * server.h (post_fork_inferior): New prototype.
4926 (get_environ): Likewise.
4927 (last_status): Declare.
4928 (last_ptid): Likewise.
4929 (signal_pid): Likewise.
4930 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
4931 (spu_ptrace_fun): New function.
4932 (spu_create_inferior): Adjust function prototype to reflect change
4933 on "target.h". Adjust function code to use "fork_inferior".
4934 * target.c (target_terminal_init): New function.
4935 (target_terminal_inferior): Likewise.
4936 (target_terminal_ours): Likewise.
4937 * target.h: Include <vector>.
4938 (struct target_ops) <create_inferior>: Update prototype.
4939 (create_inferior): Update macro.
4940 * utils.c (gdb_flush_out_err): New function.
4941 * win32-low.c (win32_create_inferior): Adjust function prototype
4942 and code to reflect change on "target.h".
4943
4944 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4945
4946 * inferiors.c (switch_to_thread): New function.
4947
4948 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
4949
4950 * Makefile.in (SFILE): Add "common/job-control.c".
4951 (OBS): Add "job-control.o".
4952
4953 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
4954
4955 * Makefile: Remove "@host_makefile_frag@".
4956
4957 2017-05-05 Pedro Alves <palves@redhat.com>
4958
4959 * configure: Regenerate.
4960
4961 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
4962
4963 * configure: Regenerate.
4964
4965 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
4966
4967 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
4968 software_single_step change of return type to
4969 std::vector<CORE_ADDR>.
4970 * linux-low.c (install_software_single_step_breakpoints):
4971 Likewise.
4972 * linux-low.h (install_software_single_step_breakpoints):
4973 Likewise.
4974
4975 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4976
4977 * remote-utils.c: Include "gdb_termios.h" instead of
4978 "terminal.h".
4979 * terminal.h: Delete file.
4980
4981 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4982
4983 * server.c: Include <vector>.
4984 <program_argv, wrapper_argv>: Convert to std::vector.
4985 (start_inferior): Rewrite function to use C++.
4986 (handle_v_run): Likewise. Update code that calculates the argv
4987 based on the vRun packet; use C++.
4988 (captured_main): Likewise.
4989
4990 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
4991
4992 * server.c (handle_v_cont): Initialize thread_resume::thread
4993 with null_ptid.
4994
4995 2017-04-05 Pedro Alves <palves@redhat.com>
4996
4997 * configure: Regenerate.
4998
4999 2017-04-05 Pedro Alves <palves@redhat.com>
5000
5001 * gdbreplay.c (sync_error): Constify.
5002 * linux-x86-low.c (push_opcode): Constify.
5003
5004 2017-04-05 Pedro Alves <palves@redhat.com>
5005
5006 * win32-low.c (get_child_debug_event)
5007 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
5008 Report TARGET_WAITKIND_SPURIOUS instead.
5009
5010 2017-04-05 Pedro Alves <palves@redhat.com>
5011
5012 * remote-utils.c (remote_prepare, remote_open): Constify.
5013 * remote-utils.h (remote_prepare, remote_open): Constify.
5014 * server.c (captured_main): Constify 'port' handling.
5015
5016 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
5017
5018 * Makefile.in (clean): Clear .deps.
5019
5020 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
5021
5022 * .gitignore: Remove generated files, replace with wildcard.
5023 * (clean): Replace removal of generated files with wildcard.
5024 (version.c): Replace with...
5025 (version-generated.c): ...this.
5026 (xml-builtin.c): Replace with...
5027 (xml-builtin-generated.c): ...this.
5028 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
5029 (%.c: *regformats*): Replace with...
5030 (%-generated.c: *regformats*): ...this.
5031
5032 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
5033
5034 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
5035 (xtensa_fill_gregset): Call collect_register_by_name for
5036 threadptr register.
5037 (xtensa_store_gregset): Call supply_register_by_name for
5038 threadptr register.
5039
5040 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
5041
5042 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
5043 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
5044 (xtensa_store_gregset): Call supply_register for all registers in
5045 a0_regnum..a0_regnum + C0_NREGS range.
5046
5047 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5048
5049 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
5050 (ax-ipa.o: ax.c): Remove.
5051 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
5052 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
5053 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
5054 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
5055 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
5056
5057 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5058
5059 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
5060 (print-utils-ipa.o: ../common/print-utils.c): Remove.
5061 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
5062 (errors-ipa.o: ../common/errors.c): Remove.
5063 (format-ipa.o: ../common/format.c): Remove.
5064 (common-utils-ipa.o: ../common/common-utils.c): Remove.
5065
5066 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5067
5068 * Makefile.in (%-ipa.o: %.c): New rule.
5069 (tracepoint-ipa.o: tracepoint.c): Remove.
5070 (utils-ipa.o: utils.c): Remove.
5071 (remote-utils-ipa.o: remote-utils.c): Remove.
5072 (regcache-ipa.o: regcache.c): Remove.
5073 (i386-linux-ipa.o: i386-linux.c): Remove.
5074 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
5075 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
5076 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
5077 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
5078 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
5079 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
5080 (amd64-linux-ipa.o: amd64-linux.c): Remove.
5081 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
5082 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
5083 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
5084 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
5085 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
5086 (aarch64-ipa.o: aarch64.c): Remove.
5087 (s390-linux32-ipa.o: s390-linux32.c): Remove.
5088 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
5089 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
5090 (s390-linux64-ipa.o: s390-linux64.c): Remove.
5091 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
5092 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
5093 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
5094 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
5095 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
5096 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
5097 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
5098 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
5099 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
5100 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
5101 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
5102 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
5103 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
5104 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
5105 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
5106 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
5107 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
5108 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
5109 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
5110 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
5111 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
5112 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
5113 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
5114 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
5115 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
5116 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
5117 (tdesc-ipa.o: tdesc.c): Remove.
5118 (x32-linux-ipa.o: x32-linux.c): Remove.
5119 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
5120 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
5121
5122 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5123
5124 * Makefile.in (%.o: ../arch/%.c): New rule.
5125 (arm.o: ../arch/arm.c): Remove.
5126 (arm-linux.o: ../arch/arm-linux.c): Remove.
5127 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
5128 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
5129
5130 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5131
5132 * Makefile.in (%.o: ../nat/%.c): New rule.
5133 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
5134 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
5135 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
5136 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
5137 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
5138 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
5139 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
5140 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
5141 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
5142 (linux-personality.o: ../nat/linux-personality.c): Remove.
5143 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
5144 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
5145 (x86-linux.o: ../nat/x86-linux.c): Remove.
5146 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
5147 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
5148
5149 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5150
5151 * Makefile.in (%.o: ../common/%.c): New rule.
5152 (signals.o: ../common/signals.c): Remove.
5153 (print-utils.o: ../common/print-utils.c): Remove.
5154 (rsp-low.o: ../common/rsp-low.c): Remove.
5155 (common-utils.o: ../common/common-utils.c): Remove.
5156 (posix-strerror.o: ../common/posix-strerror.c): Remove.
5157 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
5158 (vec.o: ../common/vec.c): Remove.
5159 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
5160 (xml-utils.o: ../common/xml-utils.c): Remove.
5161 (ptid.o: ../common/ptid.c): Remove.
5162 (buffer.o: ../common/buffer.c): Remove.
5163 (format.o: ../common/format.c): Remove.
5164 (filestuff.o: ../common/filestuff.c): Remove.
5165 (agent.o: ../common/agent.c): Remove.
5166 (errors.o: ../common/errors.c): Remove.
5167 (environ.o: ../common/environ.c): Remove.
5168 (common-debug.o: ../common/common-debug.c): Remove.
5169 (cleanups.o: ../common/cleanups.c): Remove.
5170 (common-exceptions.o: ../common/common-exceptions.c): Remove.
5171 (fileio.o: ../common/fileio.c): Remove.
5172 (common-regcache.o: ../common/common-regcache.c): Remove.
5173 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
5174 (new-op.o: ../common/new-op.c): Remove.
5175 (btrace-common.o: ../common/btrace-common.c): Remove.
5176
5177 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5178
5179 * Makefile.in (%.o: ../target/%.c): New rule.
5180 (waitstatus.o: ../target/waitstatus.c): Remove.
5181
5182 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
5183
5184 * Makefile.in
5185 (%.c: ../regformats/%.dat,
5186 (%.c: ../regformats/arm/%.dat,
5187 (%.c: ../regformats/i386/%.dat,
5188 (%.c: ../regformats/rs6000/%.dat): New rules.
5189 (aarch64.c): Remove.
5190 (reg-arm.c): Remove.
5191 (arm-with-iwmmxt.c): Remove.
5192 (arm-with-vfpv2.c): Remove.
5193 (arm-with-vfpv3.c): Remove.
5194 (arm-with-neon.c): Remove.
5195 (reg-bfin.c): Remove.
5196 (reg-cris.c): Remove.
5197 (reg-crisv32.c): Remove.
5198 (i386.c): Remove.
5199 (i386-linux.c): Remove.
5200 (i386-avx.c): Remove.
5201 (i386-avx-linux.c): Remove.
5202 (i386-avx-avx512.c): Remove.
5203 (i386-avx-avx512-linux.c): Remove.
5204 (i386-mpx.c): Remove.
5205 (i386-mpx-linux.c): Remove.
5206 (i386-avx-mpx-avx512-pku.c): Remove.
5207 (i386-avx-mpx-avx512-pku-linux.c): Remove.
5208 (i386-avx-mpx.c): Remove.
5209 (i386-avx-mpx-linux.c): Remove.
5210 (i386-mmx.c): Remove.
5211 (i386-mmx-linux.c): Remove.
5212 (reg-ia64.c): Remove.
5213 (reg-m32r.c): Remove.
5214 (reg-m68k.c): Remove.
5215 (reg-cf.c): Remove.
5216 (mips-linux.c): Remove.
5217 (mips-dsp-linux.c): Remove.
5218 (mips64-linux.c): Remove.
5219 (mips64-dsp-linux.c): Remove.
5220 (nios2-linux.c): Remove.
5221 (powerpc-32.c): Remove.
5222 (powerpc-32l.c): Remove.
5223 (powerpc-altivec32l.c): Remove.
5224 (powerpc-cell32l.c): Remove.
5225 (powerpc-vsx32l.c): Remove.
5226 (powerpc-isa205-32l.c): Remove.
5227 (powerpc-isa205-altivec32l.c): Remove.
5228 (powerpc-isa205-vsx32l.c): Remove.
5229 (powerpc-e500l.c): Remove.
5230 (powerpc-64l.c): Remove.
5231 (powerpc-altivec64l.c): Remove.
5232 (powerpc-cell64l.c): Remove.
5233 (powerpc-vsx64l.c): Remove.
5234 (powerpc-isa205-64l.c): Remove.
5235 (powerpc-isa205-altivec64l.c): Remove.
5236 (powerpc-isa205-vsx64l.c): Remove.
5237 (s390-linux32.c): Remove.
5238 (s390-linux32v1.c): Remove.
5239 (s390-linux32v2.c): Remove.
5240 (s390-linux64.c): Remove.
5241 (s390-linux64v1.c): Remove.
5242 (s390-linux64v2.c): Remove.
5243 (s390-te-linux64.c): Remove.
5244 (s390-vx-linux64.c): Remove.
5245 (s390-tevx-linux64.c): Remove.
5246 (s390x-linux64.c): Remove.
5247 (s390x-linux64v1.c): Remove.
5248 (s390x-linux64v2.c): Remove.
5249 (s390x-te-linux64.c): Remove.
5250 (s390x-vx-linux64.c): Remove.
5251 (s390x-tevx-linux64.c): Remove.
5252 (tic6x-c64xp-linux.c): Remove.
5253 (tic6x-c64x-linux.c): Remove.
5254 (tic6x-c62x-linux.c): Remove.
5255 (reg-sh.c): Remove.
5256 (reg-sparc64.c): Remove.
5257 (reg-spu.c): Remove.
5258 (amd64.c): Remove.
5259 (amd64-linux.c): Remove.
5260 (amd64-avx.c): Remove.
5261 (amd64-avx-linux.c): Remove.
5262 (amd64-avx-avx512.c): Remove.
5263 (amd64-avx-avx512-linux.c): Remove.
5264 (amd64-mpx.c): Remove.
5265 (amd64-mpx-linux.c): Remove.
5266 (amd64-avx-mpx-avx512-pku.c): Remove.
5267 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
5268 (amd64-avx-mpx.c): Remove.
5269 (amd64-avx-mpx-linux.c): Remove.
5270 (x32.c): Remove.
5271 (x32-linux.c): Remove.
5272 (x32-avx.c): Remove.
5273 (x32-avx-linux.c): Remove.
5274 (x32-avx-avx512.c): Remove.
5275 (x32-avx-avx512-linux.c): Remove.
5276 (reg-xtensa.c): Remove.
5277 (reg-tilegx.c): Remove.
5278 (reg-tilegx32.c): Remove.
5279
5280 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
5281
5282 * Makefile.in (SFILES): Add "common/environ.c".
5283 (OBJS): Add "common/environ.h".
5284
5285 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
5286
5287 * configure.ac: Check if the fs_base and gs_base members of
5288 `struct user_regs_struct' exist.
5289 * config.in: Regenerated.
5290 * configure: Likewise.
5291
5292 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
5293
5294 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
5295 target_read_memory.
5296 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
5297 (get_next_pcs_syscall_next_pc): Likewise.
5298
5299 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
5300
5301 * win32-i386-low.c: Fix incorrect reference to a couple source files.
5302 * nto-x86-low.c: Likewise.
5303
5304 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
5305
5306 * Makefile.in: Include disable-implicit-rules.mk.
5307
5308 2016-11-23 Pedro Alves <palves@redhat.com>
5309
5310 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
5311 (debug_vprintf): Use std::chrono::steady_clock instead of
5312 gettimeofday. Use '.' instead of ':'.
5313 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
5314 (get_timestamp): Use std::chrono::steady_clock instead of
5315 gettimeofday.
5316
5317 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
5318
5319 * Makefile.in: Fix whitespace formatting.
5320
5321 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
5322
5323 * Makefile.in (SFILES, OBS): Flatten list and order
5324 alphabetically.
5325
5326 2016-11-23 Pedro Alves <palves@redhat.com>
5327
5328 * event-loop.c (handle_file_event): Use warning.
5329 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
5330 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5331 Use warning.
5332
5333 2016-11-23 Pedro Alves <palves@redhat.com>
5334
5335 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
5336 output.
5337 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
5338 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
5339 debug_printf and debug_flush for debug output.
5340 * server.c (handle_general_set): Likewise.
5341 * thread-db.c (try_thread_db_load): Use debug_printf for debug
5342 output.
5343
5344 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
5345
5346 * Makefile.in (.c.o): Replace rule with ...
5347 (%.o: %.c): ... this one.
5348
5349 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
5350
5351 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
5352 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
5353 make.
5354 * configure.ac: Remove checks for the make program.
5355 * configure: Re-generate.
5356
5357 2016-10-28 Pedro Alves <palves@redhat.com>
5358
5359 * Makefile.in (CXX_DIALECT): Get from configure.
5360 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
5361 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
5362 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
5363 * config.in: Regenerate.
5364 * configure: Regenerate.
5365
5366 2016-10-27 Yao Qi <yao.qi@linaro.org>
5367
5368 * linux-low.c (linux_supports_range_stepping): Return true if
5369 can_software_single_step return true.
5370
5371 2016-10-27 Yao Qi <yao.qi@linaro.org>
5372
5373 * inferiors.c (find_inferior_in_random): New function.
5374 * inferiors.h (find_inferior_in_random): Declare.
5375 * linux-low.c (linux_wait_for_event_filtered): Call
5376 find_inferior_in_random instead of find_inferior.
5377
5378 2016-10-27 Yao Qi <yao.qi@linaro.org>
5379
5380 * linux-low.c (linux_wait_1): If single-step breakpoints are
5381 inserted, remove them.
5382
5383 2016-10-26 Pedro Alves <palves@redhat.com>
5384
5385 * linux-low.c (handle_extended_wait): Link parent/child fork
5386 threads.
5387 (linux_wait_1): Unlink them.
5388 (linux_set_resume_request): Ignore resume requests for
5389 already-resumed and unhandled fork child threads.
5390 * linux-low.h (struct lwp_info) <fork_relative>: New field.
5391 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
5392 New functions.
5393 (handle_v_requests) <vCont>: Don't call require_running.
5394 * server.h (in_queued_stop_replies): New declaration.
5395
5396 2016-10-24 Yao Qi <yao.qi@linaro.org>
5397
5398 PR server/20733
5399 * linux-aarch64-low.c (append_insns): Cast the return value to
5400 'uint32_t *'.
5401
5402 2016-10-10 Yao Qi <yao.qi@linaro.org>
5403
5404 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
5405
5406 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
5407
5408 * target.c (target_supports_multi_process): New function, moved
5409 from...
5410 * target.h (target_supports_multi_process): ... here. Remove
5411 macro.
5412
5413 2016-10-05 Tom Tromey <tom@tromey.com>
5414
5415 PR remote/20655:
5416 * tracepoint.c (handle_tracepoint_bkpts): Check
5417 ipa_error_tracepoint, not ipa_stopping_tracepoint.
5418
5419 2016-10-05 Yao Qi <yao.qi@linaro.org>
5420
5421 * configure.srv: Update the path of arm-*.xml files.
5422
5423 2016-10-05 Terry Guo <terry.guo@arm.com>
5424 Yao Qi <yao.qi@linaro.org>
5425
5426 * Makefile.in: Adjust the path of rules.
5427 * configure.srv: Update the path of xml files.
5428 * regformats/arm-with-iwmmxt.dat: Regenerated.
5429 * regformats/arm-with-neon.dat: Likewise.
5430 * regformats/arm-with-vfpv2.dat: Likewise.
5431 * regformats/arm-with-vfpv3.dat Likewise.
5432
5433 2016-09-30 Yao Qi <yao.qi@linaro.org>
5434
5435 PR gdbserver/20627
5436 * target.c (target_stop_and_wait): Don't call
5437 target_continue_no_signal, use resume_stop instead.
5438
5439 2016-09-26 Yao Qi <yao.qi@linaro.org>
5440
5441 * linux-low.c (linux_wait_1): Call debug_exit.
5442
5443 2016-09-23 Pedro Alves <palves@redhat.com>
5444
5445 * Makefile.in (SFILES): Add common/new-op.c.
5446 (OBS): Add common/new-op.o.
5447 (new-op.o): New rule.
5448
5449 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
5450
5451 * .gitinore: Ignore more files.
5452
5453 2016-09-21 Yao Qi <yao.qi@linaro.org>
5454
5455 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
5456 23.
5457
5458 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
5459
5460 * server.c (start_inferior): Call target_mourn_inferior instead of
5461 mourn_inferior; pass ptid_t argument to it.
5462 (resume): Likewise.
5463 (handle_target_event): Likewise.
5464 * target.c (target_mourn_inferior): New function.
5465 * target.h (mourn_inferior): Delete macro.
5466
5467 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
5468
5469 * linux-low.c (lwp_is_stepping): New function.
5470
5471 2016-09-06 Carl Love <cel@us.ibm.com>
5472
5473 * server.c (start_inferior): Fixed comment, requested comment change
5474 didn't get updated correctly. Removed reference to ptrace () call as
5475 it is only true on Linux systems.
5476
5477 2016-09-06 Carl Love <cel@us.ibm.com>
5478
5479 * server.c (start_inferior): Do not call
5480 function target_post_create_inferior () if the
5481 inferior process has already exited.
5482
5483 2016-09-05 Pedro Alves <palves@redhat.com>
5484
5485 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
5486 (COMPILE.pre, CC_LD): Use CXX directly.
5487 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
5488 * acinclude.m4: Don't include build-with-cxx.m4.
5489 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
5490 * configure: Regenerate.
5491
5492 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
5493
5494 PR gdb/19495
5495 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
5496 call writing data to own_buf.
5497
5498 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
5499
5500 * target.c (mywait): Call target_wait instead of
5501 the_target->wait.
5502 (target_wait): New function.
5503
5504 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
5505
5506 * server.c (start_inferior): New variable 'ptid'. Replace calls
5507 to the_target->resume by target_continue{,_no_signal}, depending
5508 on the case.
5509 * target.c (target_stop_and_wait): Call target_continue_no_signal
5510 instead of the_target->resume.
5511 (target_continue): New function.
5512
5513 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
5514
5515 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
5516
5517 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
5518
5519 PR server/20491
5520 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
5521 ps_prochandle.
5522 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
5523 * linux-arm-low.c (ps_get_thread_area): Likewise.
5524 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
5525 * linux-m68k-low.c (ps_get_thread_area): Likewise.
5526 * linux-mips-low.c (ps_get_thread_area): Likewise.
5527 * linux-nios2-low.c (ps_get_thread_area): Likewise.
5528 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
5529 * linux-x86-low.c (ps_get_thread_area): Likewise.
5530 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
5531
5532 2016-08-19 Pedro Alves <palves@redhat.com>
5533
5534 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
5535
5536 2016-08-19 Pedro Alves <palves@redhat.com>
5537
5538 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
5539 comment. Use memcpy instead of casting through unsigned long.
5540
5541 2016-08-19 Pedro Alves <palves@redhat.com>
5542
5543 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
5544 allocating around 0x80000000.
5545
5546 2016-08-19 Pedro Alves <palves@redhat.com>
5547
5548 PR gdb/20415
5549 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
5550 (x32-avx512-linux-ipa.o): New rules.
5551 * configure.ac (x86_64-*-linux*): New x32 check.
5552 * configure.srv (ipa_x32_linux_regobj): New.
5553 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
5554 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
5555 descriptions.
5556 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
5557 descriptions.
5558 * configure: Regenerate.
5559
5560 2016-08-09 Pedro Alves <palves@redhat.com>
5561
5562 PR gdb/18653
5563 * Makefile.in (OBS): Add signals-state-save-restore.o.
5564 (signals-state-save-restore.o): New rule.
5565 * config.in: Regenerate.
5566 * configure: Regenerate.
5567 * linux-low.c: Include "signals-state-save-restore.h".
5568 (linux_create_inferior): Call
5569 restore_original_signals_state.
5570 * server.c: Include "dispositions-save-restore.h".
5571 (captured_main): Call save_original_signals_state.
5572
5573 2016-08-05 Pedro Alves <palves@redhat.com>
5574
5575 * configure: Regenerate.
5576
5577 2016-08-04 Yao Qi <yao.qi@linaro.org>
5578
5579 * linux-low.c (regsets_fetch_inferior_registers): Check
5580 errno is ESRCH or not.
5581
5582 2016-08-02 Yao Qi <yao.qi@linaro.org>
5583
5584 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
5585 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
5586 (thread_db_load_search): Update.
5587 (try_thread_db_load_1): Don't look for td_ta_event_addr,
5588 td_ta_set_event and td_ta_event_getmsg.
5589
5590 2016-07-26 Pedro Alves <palves@redhat.com>
5591
5592 PR server/20414
5593 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
5594 of unsigned long for 64-bit registers and use uint32_t instead of
5595 unsigned int for 32-bit registers.
5596
5597 2016-07-26 Pedro Alves <palves@redhat.com>
5598
5599 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
5600 to 'ptrace'.
5601
5602 2016-07-21 Tom Tromey <tom@tromey.com>
5603
5604 * configure: Rebuild.
5605
5606 2016-07-21 Yao Qi <yao.qi@linaro.org>
5607
5608 * mem-break.c (find_gdb_breakpoint): Cast bp to
5609 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
5610
5611 2016-07-21 Yao Qi <yao.qi@linaro.org>
5612
5613 * server.c (handle_v_requests): Support s and S actions
5614 if target_supports_software_single_step return true.
5615
5616 2016-07-21 Yao Qi <yao.qi@linaro.org>
5617
5618 * linux-low.c (resume_stopped_resumed_lwps): If resume request
5619 is resume_step, call maybe_hw_step.
5620 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
5621 and unstop them.
5622 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
5623 breakpoints or not.
5624 (proceed_one_lwp): If resume request is resume_step, install
5625 reinsert breakpoints and call maybe_hw_step.
5626
5627 2016-07-21 Yao Qi <yao.qi@linaro.org>
5628
5629 * linux-low.c (proceed_one_lwp): Declare.
5630 (linux_resume_one_thread): Remove local variable 'step'.
5631 Lift code enqueue signal. Call proceed_one_lwp instead of
5632 linux_resume_one_lwp.
5633
5634 2016-07-21 Yao Qi <yao.qi@linaro.org>
5635
5636 * linux-low.c (linux_resume_one_thread): Call
5637 enqueue_pending_signal.
5638
5639 2016-07-21 Yao Qi <yao.qi@linaro.org>
5640
5641 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
5642 * inferiors.c (do_restore_current_thread_cleanup): New function.
5643 (make_cleanup_restore_current_thread): Likewise.
5644 * linux-low.c (install_software_single_step_breakpoints): Call
5645 make_cleanup_restore_current_thread. Switch current_thread to
5646 thread.
5647
5648 2016-07-21 Yao Qi <yao.qi@linaro.org>
5649
5650 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
5651 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
5652 (clone_one_breakpoint): Likewise.
5653 (delete_reinsert_breakpoints): Change parameter to thread.
5654 Callers updated.
5655 (has_reinsert_breakpoints): Likewise.
5656 (uninsert_reinsert_breakpoints): Likewise.
5657 (reinsert_reinsert_breakpoints): Likewise.
5658 * mem-break.h (set_reinsert_breakpoint): Update declaration.
5659 (delete_reinsert_breakpoints): Likewise.
5660 (reinsert_reinsert_breakpoints): Likewise.
5661 (uninsert_reinsert_breakpoints): Likewise.
5662 (has_reinsert_breakpoints): Likewise.
5663
5664 2016-07-21 Yao Qi <yao.qi@linaro.org>
5665
5666 * inferiors.c (get_thread_process): Make parameter const.
5667 * inferiors.h (get_thread_process): Update declaration.
5668 * mem-break.c (clone_all_breakpoints): Remove all parameters.
5669 Add new parameters child_thread and parent_thread. Callers
5670 updated.
5671 * mem-break.h (clone_all_breakpoints): Update declaration.
5672
5673 2016-07-21 Yao Qi <yao.qi@linaro.org>
5674
5675 * mem-break.c (struct breakpoint) <cond_list>: Remove.
5676 <command_list, handler>: Remove.
5677 (struct gdb_breakpoint): New.
5678 (struct other_breakpoint): New.
5679 (struct reinsert_breakpoint): New.
5680 (is_gdb_breakpoint): New function.
5681 (any_persistent_commands): Update command_list if
5682 is_gdb_breakpoint returns true.
5683 (set_breakpoint): Create breakpoints according to their types.
5684 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
5685 (set_gdb_breakpoint_1): Likewise.
5686 (set_gdb_breakpoint): Likewise.
5687 (clear_breakpoint_conditions): Change parameter type to
5688 'struct gdb_breakpoint *'.
5689 (clear_breakpoint_commands): Likewise.
5690 (clear_breakpoint_conditions_and_commands): Likewise.
5691 (add_condition_to_breakpoint): Likewise.
5692 (add_breakpoint_condition): Likewise.
5693 (add_commands_to_breakpoint): Likewise.
5694 (check_breakpoints): Check other_breakpoint.
5695 (clone_one_breakpoint): Clone breakpopint according to its type.
5696 * mem-break.h (struct gdb_breakpoint): Declare.
5697 (set_gdb_breakpoint): Update declaration.
5698 (clear_breakpoint_conditions_and_commands): Likewise.
5699 (add_breakpoint_condition): Likewise.
5700 (add_breakpoint_commands): Likewise.
5701 * server.c (process_point_options): Change parameter type to
5702 'struct gdb_breakpoint *'.
5703
5704 2016-07-21 Yao Qi <yao.qi@linaro.org>
5705
5706 * mem-break.c (set_breakpoint_at): Rename it to ...
5707 (set_breakpoint_type_at): ... it.
5708 (set_breakpoint_at): Call set_breakpoint_type_at.
5709 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
5710 * mem-break.h (set_breakpoint_at): Update comments.
5711
5712 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
5713
5714 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
5715 to buf parameter.
5716 (nios2_store_gregset): Likewise.
5717
5718 2016-07-01 Pedro Alves <palves@redhat.com>
5719 Antoine Tremblay <antoine.tremblay@ericsson.com>
5720
5721 * linux-low.c: Change interface to take the target lwp_info
5722 pointer directly and return void. Handle detaching from a zombie
5723 thread.
5724 (linux_detach_lwp_callback): New function.
5725 (linux_detach): Detach from the leader thread after detaching from
5726 the clone threads.
5727
5728 2016-06-28 Yao Qi <yao.qi@linaro.org>
5729
5730 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
5731 for variable new_offset.
5732 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5733 (aarch64_ftrace_insn_reloc_cb): Likewise.
5734 (aarch64_ftrace_insn_reloc_tb): Likewise.
5735 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
5736 PRIx64 instead of PRIx32.
5737
5738 2016-06-28 Yao Qi <yao.qi@linaro.org>
5739
5740 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
5741 (the_low_target): Install arm_get_syscall_trapinfo.
5742
5743 2016-06-28 Yao Qi <yao.qi@linaro.org>
5744
5745 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
5746 function.
5747 (the_low_target): Install aarch64_get_syscall_trapinfo.
5748
5749 2016-06-28 Yao Qi <yao.qi@linaro.org>
5750
5751 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
5752 Callers updated.
5753 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
5754 Remove parameter sysno.
5755 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
5756 sysret.
5757
5758 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5759
5760 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
5761 (s390_emit_ne_goto): Likewise.
5762 (s390_emit_lt_goto): Likewise.
5763 (s390_emit_le_goto): Likewise.
5764 (s390_emit_gt_goto): Likewise.
5765 (s390_emit_ge_goto): Likewise.
5766 (s390x_emit_eq_goto): Likewise.
5767 (s390x_emit_ne_goto): Likewise.
5768 (s390x_emit_lt_goto): Likewise.
5769 (s390x_emit_le_goto): Likewise.
5770 (s390x_emit_gt_goto): Likewise.
5771 (s390x_emit_ge_goto): Likewise.
5772 (s390_emit_ops_impl): Mark variable static.
5773 (s390x_emit_ops): Likewise.
5774
5775 2016-06-17 Yao Qi <yao.qi@linaro.org>
5776
5777 * linux-low.c (handle_extended_wait): Call
5778 uninsert_reinsert_breakpoints for the parent process. Remove
5779 reinsert breakpoints from the child process. Reinsert them to
5780 the parent process when vfork is done.
5781 * mem-break.c (uninsert_reinsert_breakpoints): New function.
5782 (reinsert_reinsert_breakpoints): New function.
5783 * mem-break.h (uninsert_reinsert_breakpoints): Declare
5784 (reinsert_reinsert_breakpoints): Declare.
5785
5786 2016-06-17 Yao Qi <yao.qi@linaro.org>
5787
5788 * linux-low.c (handle_extended_wait): If the parent is doing
5789 step-over, remove the reinsert breakpoints from the forked child.
5790
5791 2016-06-17 Yao Qi <yao.qi@linaro.org>
5792
5793 * linux-low.c (unsuspend_all_lwps): Declare.
5794 (linux_low_filter_event): If thread exited, call finish_step_over.
5795 If step-over is finished, unsuspend other threads.
5796
5797 2016-06-17 Yao Qi <yao.qi@linaro.org>
5798
5799 * linux-low.c (linux_resume_one_lwp_throw): Assert
5800 has_reinsert_breakpoints returns false.
5801 * mem-break.c (delete_disabled_breakpoints): Assert
5802 bp type isn't reinsert_breakpoint.
5803
5804 2016-06-17 Yao Qi <yao.qi@linaro.org>
5805
5806 * linux-low.c (maybe_hw_step): New function.
5807 (linux_resume_one_lwp_throw): Call maybe_hw_step.
5808 (finish_step_over): Switch current_thread to lwp temporarily,
5809 and assert has_reinsert_breakpoints returns true.
5810 (proceed_one_lwp): Call maybe_hw_step.
5811 * mem-break.c (has_reinsert_breakpoints): New function.
5812 * mem-break.h (has_reinsert_breakpoints): Declare.
5813
5814 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
5815
5816 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
5817
5818 2016-05-17 Yao Qi <yao.qi@linaro.org>
5819
5820 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
5821 instead of find_inferior.
5822
5823 2016-05-05 Yao Qi <yao.qi@linaro.org>
5824
5825 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
5826 Initialize res to zero.
5827
5828 2016-05-05 Yao Qi <yao.qi@linaro.org>
5829
5830 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
5831 to uint32_t.
5832
5833 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5834
5835 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
5836 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
5837 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
5838
5839 2016-04-28 Par Olsson <par.olsson@windriver.com>
5840 Simon Marchi <simon.marchi@ericsson.com>
5841
5842 * tracepoint.c (write_inferior_int8): New function.
5843 (cmd_qtenable_disable): Write enable flag using
5844 write_inferior_int8.
5845
5846 2016-04-25 Yao Qi <yao.qi@linaro.org>
5847
5848 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
5849 (need_step_over_p): Return zero if the LWP has pending signals
5850 can be delivered on software single step target.
5851
5852 2016-04-25 Yao Qi <yao.qi@linaro.org>
5853
5854 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
5855 return instead of error.
5856
5857 2016-04-22 Yao Qi <yao.qi@linaro.org>
5858
5859 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
5860 to 23.
5861
5862 2016-04-22 Yao Qi <yao.qi@linaro.org>
5863
5864 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
5865 signal when stepping over breakpoint with software single
5866 step.
5867
5868 2016-04-21 Pedro Alves <palves@redhat.com>
5869
5870 * linux-s390-low.c (s390_collect_ptrace_register)
5871 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
5872 add casts.
5873 (s390_check_regset): Use void * instead of gdb_byte *.
5874
5875 2016-04-20 Pedro Alves <palves@redhat.com>
5876
5877 * configure: Renegerate.
5878
5879 2016-04-20 Yao Qi <yao.qi@linaro.org>
5880
5881 * linux-aarch32-low.c: Include "arch/arm-linux.h".
5882 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
5883 number 16.
5884 (arm_store_gregset): Likewise.
5885
5886 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
5887
5888 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
5889 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
5890 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
5891 (amd64-avx-mpx-linux.c): New rules.
5892 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
5893 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
5894 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
5895 (srv_amd64_regobj): Add amd64-avx-mpx.o.
5896 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
5897 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
5898 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
5899 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
5900 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
5901 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
5902 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
5903 * linux-x86-low.c (x86_linux_read_description): Add case for
5904 X86_XSTATE_AVX_MPX_MASK.
5905 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
5906 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
5907 init_registers_i386_avx_mpx_linux.
5908 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5909 (initialize_low_tracepoint): Call
5910 init_registers_i386_avx_mpx_linux.
5911 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
5912 (initialize_low_tracepoint): Call
5913 init_registers_amd64_avx_mpx_linux.
5914 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
5915 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
5916 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
5917 declarations.
5918
5919 2016-04-18 Pedro Alves <palves@redhat.com>
5920
5921 * configure: Regenerate.
5922
5923 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
5924
5925 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
5926 (aarch64_emit_sub): Likewise.
5927
5928 2016-04-12 Pedro Alves <palves@redhat.com>
5929
5930 * utils.c (prepare_to_throw_exception): Delete.
5931
5932 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
5933
5934 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
5935
5936 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
5937
5938 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
5939
5940 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
5941
5942 * linux-aarch64-ipa.c: Add <elf.h> include.
5943 * linux-ppc-ipa.c: Add <elf.h> include.
5944 * linux-s390-ipa.c: Add <elf.h> include.
5945
5946 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
5947
5948 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
5949 (get_raw_reg_ptr): Likewise.
5950 (get_trace_state_variable_value_ptr): Likewise.
5951 (set_trace_state_variable_value_ptr): Likewise.
5952 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
5953 char *.
5954
5955 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
5956 Marcin Kościelnicki <koriakin@0x04.net>
5957
5958 PR/17221
5959 * linux-ppc-low.c (emit_insns): New function.
5960 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
5961 (ppc_emit_prologue): New function.
5962 (ppc_emit_epilogue): New function.
5963 (ppc_emit_add): New function.
5964 (ppc_emit_sub): New function.
5965 (ppc_emit_mul): New function.
5966 (ppc_emit_lsh): New function.
5967 (ppc_emit_rsh_signed): New function.
5968 (ppc_emit_rsh_unsigned): New function.
5969 (ppc_emit_ext): New function.
5970 (ppc_emit_zero_ext): New function.
5971 (ppc_emit_log_not): New function.
5972 (ppc_emit_bit_and): New function.
5973 (ppc_emit_bit_or): New function.
5974 (ppc_emit_bit_xor): New function.
5975 (ppc_emit_bit_not): New function.
5976 (ppc_emit_equal): New function.
5977 (ppc_emit_less_signed): New function.
5978 (ppc_emit_less_unsigned): New function.
5979 (ppc_emit_ref): New function.
5980 (ppc_emit_const): New function.
5981 (ppc_emit_reg): New function.
5982 (ppc_emit_pop): New function.
5983 (ppc_emit_stack_flush): New function.
5984 (ppc_emit_swap): New function.
5985 (ppc_emit_stack_adjust): New function.
5986 (ppc_emit_call): New function.
5987 (ppc_emit_int_call_1): New function.
5988 (ppc_emit_void_call_2): New function.
5989 (ppc_emit_if_goto): New function.
5990 (ppc_emit_goto): New function.
5991 (ppc_emit_eq_goto): New function.
5992 (ppc_emit_ne_goto): New function.
5993 (ppc_emit_lt_goto): New function.
5994 (ppc_emit_le_goto): New function.
5995 (ppc_emit_gt_goto): New function.
5996 (ppc_emit_ge_goto): New function.
5997 (ppc_write_goto_address): New function.
5998 (ppc_emit_ops_impl): New static variable.
5999 (ppc64v1_emit_prologue): New function.
6000 (ppc64v2_emit_prologue): New function.
6001 (ppc64_emit_epilogue): New function.
6002 (ppc64_emit_add): New function.
6003 (ppc64_emit_sub): New function.
6004 (ppc64_emit_mul): New function.
6005 (ppc64_emit_lsh): New function.
6006 (ppc64_emit_rsh_signed): New function.
6007 (ppc64_emit_rsh_unsigned): New function.
6008 (ppc64_emit_ext): New function.
6009 (ppc64_emit_zero_ext): New function.
6010 (ppc64_emit_log_not): New function.
6011 (ppc64_emit_bit_and): New function.
6012 (ppc64_emit_bit_or): New function.
6013 (ppc64_emit_bit_xor): New function.
6014 (ppc64_emit_bit_not): New function.
6015 (ppc64_emit_equal): New function.
6016 (ppc64_emit_less_signed): New function.
6017 (ppc64_emit_less_unsigned): New function.
6018 (ppc64_emit_ref): New function.
6019 (ppc64_emit_const): New function.
6020 (ppc64v1_emit_reg): New function.
6021 (ppc64v2_emit_reg): New function.
6022 (ppc64_emit_pop): New function.
6023 (ppc64_emit_stack_flush): New function.
6024 (ppc64_emit_swap): New function.
6025 (ppc64v1_emit_call): New function.
6026 (ppc64v2_emit_call): New function.
6027 (ppc64v1_emit_int_call_1): New function.
6028 (ppc64v2_emit_int_call_1): New function.
6029 (ppc64v1_emit_void_call_2): New function.
6030 (ppc64v2_emit_void_call_2): New function.
6031 (ppc64_emit_if_goto): New function.
6032 (ppc64_emit_eq_goto): New function.
6033 (ppc64_emit_ne_goto): New function.
6034 (ppc64_emit_lt_goto): New function.
6035 (ppc64_emit_le_goto): New function.
6036 (ppc64_emit_gt_goto): New function.
6037 (ppc64_emit_ge_goto): New function.
6038 (ppc64v1_emit_ops_impl): New static variable.
6039 (ppc64v2_emit_ops_impl): New static variable.
6040 (ppc_emit_ops): New function.
6041 (linux_low_target): Wire in ppc_emit_ops.
6042
6043 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
6044 Marcin Kościelnicki <koriakin@0x04.net>
6045
6046 PR/17221
6047 * Makefile.in: Add powerpc-*-ipa.o
6048 * configure.srv: Add ipa_obj for powerpc*-linux.
6049 * linux-ppc-ipa.c: New file.
6050 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
6051 includes.
6052 (PPC_FIELD): New macro.
6053 (PPC_SEXT): New macro.
6054 (PPC_OP6): New macro.
6055 (PPC_BO): New macro.
6056 (PPC_LI): New macro.
6057 (PPC_BD): New macro.
6058 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
6059 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
6060 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
6061 (ppc_get_thread_area): New function.
6062 (is_elfv2_inferior): New function.
6063 (gen_ds_form): New function.
6064 (GEN_STD): New macro.
6065 (GEN_STDU): New macro.
6066 (GEN_LD): New macro.
6067 (GEN_LDU): New macro.
6068 (gen_d_form): New function.
6069 (GEN_ADDI): New macro.
6070 (GEN_ADDIS): New macro.
6071 (GEN_LI): New macro.
6072 (GEN_LIS): New macro.
6073 (GEN_ORI): New macro.
6074 (GEN_ORIS): New macro.
6075 (GEN_LWZ): New macro.
6076 (GEN_STW): New macro.
6077 (GEN_STWU): New macro.
6078 (gen_xfx_form): New function.
6079 (GEN_MFSPR): New macro.
6080 (GEN_MTSPR): New macro.
6081 (GEN_MFCR): New macro.
6082 (GEN_MTCR): New macro.
6083 (GEN_SYNC): New macro.
6084 (GEN_LWSYNC): New macro.
6085 (gen_x_form): New function.
6086 (GEN_OR): New macro.
6087 (GEN_MR): New macro.
6088 (GEN_LWARX): New macro.
6089 (GEN_STWCX): New macro.
6090 (GEN_CMPW): New macro.
6091 (gen_md_form): New function.
6092 (GEN_RLDICL): New macro.
6093 (GEN_RLDICR): New macro.
6094 (gen_i_form): New function.
6095 (GEN_B): New macro.
6096 (GEN_BL): New macro.
6097 (gen_b_form): New function.
6098 (GEN_BNE): New macro.
6099 (GEN_LOAD): New macro.
6100 (GEN_STORE): New macro.
6101 (gen_limm): New function.
6102 (gen_atomic_xchg): New function.
6103 (gen_call): New function.
6104 (ppc_relocate_instruction): New function.
6105 (ppc_install_fast_tracepoint_jump_pad): New function.
6106 (ppc_get_min_fast_tracepoint_insn_len): New function.
6107 (ppc_get_ipa_tdesc_idx): New function.
6108 (the_low_target): Wire in the new functions.
6109 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
6110 tdescs.
6111 * linux-ppc-tdesc.h: New file.
6112
6113 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
6114
6115 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
6116 (alloc_jump_pad_buffer): New function.
6117 * linux-amd64-ipa.c: Add <sys/mman.h> include.
6118 (alloc_jump_pad_buffer): New function.
6119 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
6120 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
6121 (alloc_jump_pad_buffer): New function.
6122 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
6123 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
6124 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
6125 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
6126
6127 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
6128
6129 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
6130 * linux-amd64-ipa.c: Likewise.
6131 * linux-i386-ipa.c: Likewise.
6132 * linux-s390-ipa.c: Likewise.
6133 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
6134 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
6135 set_trace_state_variable_value_ptr.
6136 (struct ipa_sym_addresses): Likewise.
6137 (symbol_list): Likewise.
6138 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
6139 accessing gdb_collect directly.
6140 (gdb_collect_ptr_type): New typedef.
6141 (get_raw_reg_ptr_type): New typedef.
6142 (get_trace_state_variable_value_ptr_type): New typedef.
6143 (set_trace_state_variable_value_ptr_type): New typedef.
6144 (gdb_collect_ptr): New global.
6145 (get_raw_reg_ptr): New global.
6146 (get_trace_state_variable_value_ptr): New global.
6147 (set_trace_state_variable_value_ptr): New global.
6148 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
6149 accessing get_raw_reg directly.
6150 (get_get_tsv_func_addr): Likewise for
6151 get_trace_state_variable_value_ptr.
6152 (get_set_tsv_func_addr): Likewise for
6153 set_trace_state_variable_value_ptr.
6154 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
6155
6156 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
6157
6158 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
6159
6160 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
6161
6162 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
6163 packets.
6164 (relocate_instruction): Remove own_buf.
6165 * server.c (own_buf): Make global.
6166 (handle_v_requests): Make global.
6167 * server.h (own_buf): New declaration.
6168 (handle_v_requests): New prototype.
6169
6170 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
6171
6172 PR 18377
6173 * linux-s390-low.c (add_insns): New function.
6174 (s390_emit_prologue): New function.
6175 (s390_emit_epilogue): New function.
6176 (s390_emit_add): New function.
6177 (s390_emit_sub): New function.
6178 (s390_emit_mul): New function.
6179 (s390_emit_lsh): New function.
6180 (s390_emit_rsh_signed): New function.
6181 (s390_emit_rsh_unsigned): New function.
6182 (s390_emit_ext): New function.
6183 (s390_emit_log_not): New function.
6184 (s390_emit_bit_and): New function.
6185 (s390_emit_bit_or): New function.
6186 (s390_emit_bit_xor): New function.
6187 (s390_emit_bit_not): New function.
6188 (s390_emit_equal): New function.
6189 (s390_emit_less_signed): New function.
6190 (s390_emit_less_unsigned): New function.
6191 (s390_emit_ref): New function.
6192 (s390_emit_if_goto): New function.
6193 (s390_emit_goto): New function.
6194 (s390_write_goto_address): New function.
6195 (s390_emit_litpool): New function.
6196 (s390_emit_const): New function.
6197 (s390_emit_call): New function.
6198 (s390_emit_reg): New function.
6199 (s390_emit_pop): New function.
6200 (s390_emit_stack_flush): New function.
6201 (s390_emit_zero_ext): New function.
6202 (s390_emit_swap): New function.
6203 (s390_emit_stack_adjust): New function.
6204 (s390_emit_set_r2): New function.
6205 (s390_emit_int_call_1): New function.
6206 (s390_emit_void_call_2): New function.
6207 (s390_emit_eq_goto): New function.
6208 (s390_emit_ne_goto): New function.
6209 (s390_emit_lt_goto): New function.
6210 (s390_emit_le_goto): New function.
6211 (s390_emit_gt_goto): New function.
6212 (s390_emit_ge_goto): New function.
6213 (s390x_emit_prologue): New function.
6214 (s390x_emit_epilogue): New function.
6215 (s390x_emit_add): New function.
6216 (s390x_emit_sub): New function.
6217 (s390x_emit_mul): New function.
6218 (s390x_emit_lsh): New function.
6219 (s390x_emit_rsh_signed): New function.
6220 (s390x_emit_rsh_unsigned): New function.
6221 (s390x_emit_ext): New function.
6222 (s390x_emit_log_not): New function.
6223 (s390x_emit_bit_and): New function.
6224 (s390x_emit_bit_or): New function.
6225 (s390x_emit_bit_xor): New function.
6226 (s390x_emit_bit_not): New function.
6227 (s390x_emit_equal): New function.
6228 (s390x_emit_less_signed): New function.
6229 (s390x_emit_less_unsigned): New function.
6230 (s390x_emit_ref): New function.
6231 (s390x_emit_if_goto): New function.
6232 (s390x_emit_const): New function.
6233 (s390x_emit_call): New function.
6234 (s390x_emit_reg): New function.
6235 (s390x_emit_pop): New function.
6236 (s390x_emit_stack_flush): New function.
6237 (s390x_emit_zero_ext): New function.
6238 (s390x_emit_swap): New function.
6239 (s390x_emit_stack_adjust): New function.
6240 (s390x_emit_int_call_1): New function.
6241 (s390x_emit_void_call_2): New function.
6242 (s390x_emit_eq_goto): New function.
6243 (s390x_emit_ne_goto): New function.
6244 (s390x_emit_lt_goto): New function.
6245 (s390x_emit_le_goto): New function.
6246 (s390x_emit_gt_goto): New function.
6247 (s390x_emit_ge_goto): New function.
6248 (s390_emit_ops): New function.
6249 (struct linux_target_ops): Fill in emit_ops hook.
6250
6251 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
6252
6253 PR 18377
6254 * Makefile.in: Add s390 IPA files.
6255 * configure.srv: Build IPA for s390.
6256 * linux-s390-ipa.c: New file.
6257 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
6258 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
6259 (tdesc_s390_linux32): Likewise.
6260 (init_registers_s390_linux32v1): Likewise.
6261 (tdesc_s390_linux32v1): Likewise.
6262 (init_registers_s390_linux32v2): Likewise.
6263 (tdesc_s390_linux32v2): Likewise.
6264 (init_registers_s390_linux64): Likewise.
6265 (tdesc_s390_linux64): Likewise.
6266 (init_registers_s390_linux64v1): Likewise.
6267 (tdesc_s390_linux64v1): Likewise.
6268 (init_registers_s390_linux64v2): Likewise.
6269 (tdesc_s390_linux64v2): Likewise.
6270 (init_registers_s390_te_linux64): Likewise.
6271 (tdesc_s390_te_linux64): Likewise.
6272 (init_registers_s390_vx_linux64): Likewise.
6273 (tdesc_s390_vx_linux64): Likewise.
6274 (init_registers_s390_tevx_linux64): Likewise.
6275 (tdesc_s390_tevx_linux64): Likewise.
6276 (init_registers_s390x_linux64): Likewise.
6277 (tdesc_s390x_linux64): Likewise.
6278 (init_registers_s390x_linux64v1): Likewise.
6279 (tdesc_s390x_linux64v1): Likewise.
6280 (init_registers_s390x_linux64v2): Likewise.
6281 (tdesc_s390x_linux64v2): Likewise.
6282 (init_registers_s390x_te_linux64): Likewise.
6283 (tdesc_s390x_te_linux64): Likewise.
6284 (init_registers_s390x_vx_linux64): Likewise.
6285 (tdesc_s390x_vx_linux64): Likewise.
6286 (init_registers_s390x_tevx_linux64): Likewise.
6287 (tdesc_s390x_tevx_linux64): Likewise.
6288 (have_hwcap_s390_vx): New static variable.
6289 (s390_arch_setup): Fill have_hwcap_s390_vx.
6290 (s390_get_thread_area): New function.
6291 (s390_ft_entry_gpr_esa): New const.
6292 (s390_ft_entry_gpr_zarch): New const.
6293 (s390_ft_entry_misc): New const.
6294 (s390_ft_entry_fr): New const.
6295 (s390_ft_entry_vr): New const.
6296 (s390_ft_main_31): New const.
6297 (s390_ft_main_64): New const.
6298 (s390_ft_exit_fr): New const.
6299 (s390_ft_exit_vr): New const.
6300 (s390_ft_exit_misc): New const.
6301 (s390_ft_exit_gpr_esa): New const.
6302 (s390_ft_exit_gpr_zarch): New const.
6303 (append_insns): New function.
6304 (s390_relocate_instruction): New function.
6305 (s390_install_fast_tracepoint_jump_pad): New function.
6306 (s390_get_min_fast_tracepoint_insn_len): New function.
6307 (s390_get_ipa_tdesc_idx): New function.
6308 (struct linux_target_ops): Wire in the above functions.
6309 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
6310 * linux-s390-tdesc.h: New file.
6311
6312 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
6313
6314 * linux-s390-low.c (s390_supports_tracepoints): New function.
6315 (struct linux_target_ops): Fill supports_tracepoints hook.
6316
6317 2016-03-18 Yao Qi <yao.qi@linaro.org>
6318
6319 * linux-low.c (lwp_signal_can_be_delivered): New function.
6320 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
6321
6322 2016-03-18 Yao Qi <yao.qi@linaro.org>
6323
6324 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
6325 0 if signal is enqueued. Remove 'signal' from one debugging
6326 message. Move one debugging message to some lines below.
6327 Remove code setting 'signal' to 0.
6328
6329 2016-03-18 Yao Qi <yao.qi@linaro.org>
6330
6331 * linux-low.c (linux_low_filter_event): Remove redundant
6332 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
6333
6334 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
6335
6336 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
6337 (struct linux_target_ops): Wire in the above.
6338
6339 2016-03-03 Yao Qi <yao.qi@linaro.org>
6340
6341 * linux-low.c: Update comments to start_step_over.
6342
6343 2016-03-03 Yao Qi <yao.qi@linaro.org>
6344
6345 PR server/19736
6346 * linux-low.c (handle_extended_wait): Set child suspended
6347 if event_lwp->bp_reinsert isn't zero.
6348
6349 2016-03-02 Yao Qi <yao.qi@linaro.org>
6350
6351 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
6352 enqueue_pending_signal.
6353
6354 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
6355
6356 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
6357 is actually loaded.
6358
6359 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
6360
6361 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
6362 (s390_regmap_3264) [!__s390x__]: New global.
6363 (s390_collect_ptrace_register): Skip map entries containing -1.
6364 (s390_supply_ptrace_register): Ditto.
6365 (s390_fill_gprs_high): New function.
6366 (s390_store_gprs_high): New function.
6367 (s390_regsets): Add NT_S390_HIGH_GPRS.
6368 (s390_get_hwcap): Enable on 31-bit.
6369 (have_hwcap_s390_high_gprs): Enable on 31-bit.
6370 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
6371 Detect NT_S390_HIGH_GPRS.
6372 (s390_usrregs_info_3264): Enable on 31-bit.
6373 (s390_regs_info): Enable regs_info_3264 on 31-bit.
6374 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
6375
6376 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
6377
6378 PR gdb/13808
6379 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
6380 * configure.srv: Ditto.
6381 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
6382 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
6383 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
6384 (init_registers_amd64_linux): Remove prototype.
6385 (tdesc_amd64_linux): Remove declaration.
6386 (get_ipa_tdesc): New function.
6387 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
6388 initialize remaining tdescs.
6389 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
6390 (init_registers_i386_linux): Remove prototype.
6391 (tdesc_i386_linux): Remove declaration.
6392 (get_ipa_tdesc): New function.
6393 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
6394 initialize remaining tdescs.
6395 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
6396 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
6397 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
6398 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
6399 (x86_get_ipa_tdesc_idx): New function.
6400 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
6401 * linux-x86-tdesc.h: New file.
6402 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
6403 (target_get_ipa_tdesc_idx): New macro.
6404 * tracepoint.c (ipa_tdesc_idx): New macro.
6405 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
6406 (symbol_list): Add ipa_tdesc_idx.
6407 (cmd_qtstart): Write ipa_tdesc_idx in the target.
6408 (ipa_tdesc): Remove.
6409 (ipa_tdesc_idx): New variable.
6410 (get_context_regcache): Use get_ipa_tdesc.
6411 (gdb_collect): Ditto.
6412 (gdb_probe): Ditto.
6413 * tracepoint.h (get_ipa_tdesc): New prototype.
6414 (ipa_tdesc): Remove.
6415
6416 2016-02-24 Pedro Alves <palves@redhat.com>
6417
6418 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
6419 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
6420 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
6421 Factor out common code between the USE_SIGTRAP_SIGINFO and
6422 !USE_SIGTRAP_SIGINFO blocks.
6423 (linux_low_filter_event): Call save_stop_reason instead of
6424 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
6425 Update comments.
6426 (linux_wait_1): Update comments.
6427
6428 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
6429
6430 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
6431 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
6432 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
6433 ppc_insert_point, ppc_remove_point.
6434
6435 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
6436
6437 * linux-s390-low.c (s390_supports_z_point_type): New function.
6438 (struct linux_target_ops): Wire s390_supports_z_point_type in.
6439
6440 2016-02-16 Yao Qi <yao.qi@linaro.org>
6441
6442 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
6443 PC. Get pc from regcache_read_pc.
6444
6445 2016-02-12 Yao Qi <yao.qi@linaro.org>
6446
6447 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
6448 or linux_get_pc_32bit.
6449 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
6450
6451 2016-02-12 Yao Qi <yao.qi@linaro.org>
6452
6453 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
6454 arm_linux_get_next_pcs_fixup.
6455
6456 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
6457
6458 * tracepoint.c (x_tracepoint_action_download): Change
6459 write_inferior_data_ptr to write_inferior_data_pointer.
6460 (cmd_qtstart): Likewise.
6461 (write_inferior_data_ptr): Remove.
6462 (download_agent_expr): Change write_inferior_data_ptr to
6463 write_inferior_data_pointer.
6464 (download_tracepoint_1): Likewise.
6465 (download_tracepoint): Likewise.
6466 (download_trace_state_variables): Likewise.
6467
6468 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
6469 Marcin Kościelnicki <koriakin@0x04.net>
6470
6471 * tracepoint.c (struct tracepoint_action_ops): Remove.
6472 (struct tracepoint_action): Remove ops.
6473 (m_tracepoint_action_download, r_tracepoint_action_download)
6474 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
6475 size and offset accordingly.
6476 (m_tracepoint_action_ops, r_tracepoint_action_ops)
6477 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
6478 (tracepoint_action_send, tracepoint_action_download): New functions.
6479 Helpers for trace action handlers.
6480 (add_tracepoint_action): Remove setup actions ops.
6481 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
6482
6483 2016-02-10 Yao Qi <yao.qi@linaro.org>
6484
6485 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
6486
6487 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
6488
6489 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
6490 to AC_OUTPUT.
6491 * configure: Regenerate.
6492
6493 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
6494
6495 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
6496 void * to gdb_byte *.
6497 * linux-low.c (siginfo_fixup): Likewise.
6498 (linux_xfer_siginfo): Likewise.
6499 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
6500 Likewise.
6501 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6502
6503 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
6504
6505 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
6506 to srv_tgtobj.
6507 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
6508 to srv_tgtobj.
6509 * linux-x86-low.c [__x86_64__]: Include
6510 "nat/amd64-linux-siginfo.h".
6511 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
6512 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
6513 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
6514 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
6515 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
6516 (cpt_si_fd, si_timerid, si_overrun): Move from
6517 nat/amd64-linux-siginfo.c.
6518 * Makefile.in (amd64-linux-siginfo.o:): New rule.
6519
6520 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
6521
6522 * server.c (skip_to_semicolon): Remove.
6523 (process_point_options): Use strchrnul instead of
6524 skip_to_semicolon.
6525
6526 2016-01-26 Yao Qi <yao.qi@linaro.org>
6527
6528 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
6529 * linux-low.c (install_software_single_step_breakpoints): Don't
6530 call regcache_read_pc.
6531 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
6532 argument pc.
6533
6534 2016-01-26 Yao Qi <yao.qi@linaro.org>
6535
6536 * linux-low.c (install_software_single_step_breakpoints): Call
6537 regcache_read_pc instead of get_pc.
6538
6539 2016-01-26 Yao Qi <yao.qi@linaro.org>
6540
6541 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
6542 (unblock_async_io): Rename to ...
6543 (block_unblock_async_io): ... it. New function.
6544 (enable_async_io): Don't install SIGIO handler. Unblock it
6545 instead.
6546 (disable_async_io): Don't ignore SIGIO. Block it instead.
6547 (initialize_async_io): Install SIGIO handler. Don't call
6548 unblock_async_io.
6549
6550 2016-01-26 Yao Qi <yao.qi@linaro.org>
6551
6552 * remote-utils.c (getpkt): If the buffer isn't empty, and the
6553 first character is '\003', call *the_target->request_interrupt.
6554
6555 2016-01-25 Yao Qi <yao.qi@linaro.org>
6556
6557 * remote-utils.c (new_thread_notify): Remove.
6558 (dead_thread_notify): Likewise.
6559 * remote-utils.h (new_thread_notify): Remove declaration.
6560 (dead_thread_notify): Likewise.
6561
6562 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
6563
6564 * gdb.trace/pending.exp: Fix expected message on continue.
6565
6566 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
6567
6568 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
6569 it works properly on big-endian machines where sizeof (CORE_ADDR)
6570 != sizeof (void *).
6571
6572 2016-01-21 Pedro Alves <palves@redhat.com>
6573
6574 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
6575 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
6576 * configure: Regenerate.
6577
6578 2016-01-21 Yao Qi <yao.qi@linaro.org>
6579
6580 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
6581 is_thumb and set it according to CPSR saved on the stack.
6582 (get_next_pcs_syscall_next_pc): Pass is_thumb to
6583 arm_sigreturn_next_pc.
6584
6585 2016-01-18 Yao Qi <yao.qi@linaro.org>
6586
6587 * linux-low.c (linux_set_pc_64bit): New function.
6588 (linux_get_pc_64bit): New function.
6589 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
6590 Declare.
6591 * linux-sparc-low.c (debug_threads): Remove declaration.
6592 (sparc_get_pc): Remove.
6593 (the_low_target): Use linux_get_pc_64bit instead of
6594 sparc_get_pc.
6595 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
6596 (the_low_target): Use linux_get_pc_64bit and
6597 linux_set_pc_64bit.
6598
6599 2016-01-18 Yao Qi <yao.qi@linaro.org>
6600
6601 * linux-arm-low.c (debug_threads): Remove declaration.
6602 (arm_get_pc, arm_set_pc): Remove.
6603 (the_low_target): Use linux_get_pc_32bit and
6604 linux_set_pc_32bit.
6605 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
6606 (the_low_target): Use linux_get_pc_32bit and
6607 linux_set_pc_32bit.
6608 * linux-cris-low.c (debug_threads): Remove declaration.
6609 (cris_get_pc, cris_set_pc,): Remove.
6610 (the_low_target): Use linux_get_pc_32bit and
6611 linux_set_pc_32bit.
6612 * linux-crisv32-low.c (debug_threads): Remove declaration.
6613 (cris_get_pc, cris_set_pc): Remove.
6614 (the_low_target): Use linux_get_pc_32bit and
6615 linux_set_pc_32bit.
6616 * linux-low.c: Include inttypes.h.
6617 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
6618 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
6619 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
6620 (the_low_target): Use linux_get_pc_32bit and
6621 linux_set_pc_32bit.
6622 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
6623 (the_low_target): Use linux_get_pc_32bit and
6624 linux_set_pc_32bit.
6625 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
6626 (the_low_target): Use linux_get_pc_32bit and
6627 linux_set_pc_32bit.
6628 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
6629 (the_low_target): Use linux_get_pc_32bit and
6630 linux_set_pc_32bit.
6631 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
6632 (the_low_target): Use linux_get_pc_32bit and
6633 linux_set_pc_32bit.
6634
6635 2016-01-18 Gary Benson <gbenson@redhat.com>
6636
6637 * configure.ac (AC_FUNC_FORK): New check.
6638 * config.in: Regenerate.
6639 * configure: Likewise.
6640
6641 2016-01-14 Yao Qi <yao.qi@linaro.org>
6642
6643 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
6644 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
6645 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
6646 arm_get_next_pcs_ctor.
6647
6648 2016-01-12 Josh Stone <jistone@redhat.com>
6649 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6650
6651 * inferiors.h: Include "gdb_vecs.h".
6652 (struct process_info): Add syscalls_to_catch.
6653 * inferiors.c (remove_process): Free syscalls_to_catch.
6654 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
6655 syscall_return stops.
6656 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
6657 * server.c (handle_general_set): Handle QCatchSyscalls.
6658 (handle_query): Report support for QCatchSyscalls.
6659 * target.h (struct target_ops): Add supports_catch_syscall.
6660 (target_supports_catch_syscall): New macro.
6661 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
6662 (struct lwp_info): Add syscall_state.
6663 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
6664 Maintain syscall_state and syscalls_to_catch across exec.
6665 (get_syscall_trapinfo): New function, proxy to the_low_target.
6666 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
6667 (linux_low_filter_event): Toggle syscall_state entry/return for
6668 syscall traps, and set it ignored for all others.
6669 (gdb_catching_syscalls_p): New function.
6670 (gdb_catch_this_syscall_p): New function.
6671 (linux_wait_1): Handle SYSCALL_SIGTRAP.
6672 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
6673 (linux_supports_catch_syscall): New function.
6674 (linux_target_ops): Install it.
6675 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
6676 (the_low_target): Install it.
6677
6678 2016-01-12 Mike Frysinger <vapier@gentoo.org>
6679
6680 * acinclude.m4: Include new ../warning.m4 file.
6681 * configure: Regenerated.
6682 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
6683
6684 2016-01-12 Mike Frysinger <vapier@gentoo.org>
6685
6686 * ax.c (is_goto_target): Mark static.
6687 * linux-low.c (register_addr): Likewise.
6688 (linux_fetch_registers, linux_store_registers): Likewise.
6689 * mem-break.c (any_persistent_commands): Fix old prototype.
6690 (add_commands_to_breakpoint): Mark static.
6691 * regcache.c (find_register_by_name): Delete unused func.
6692 * remote-utils.c (hex_or_minus_one): Mark static.
6693 * server.c (monitor_show_help): Mark static.
6694 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
6695 handle_v_requests): Likewise.
6696
6697 2016-01-12 Pedro Alves <palves@redhat.com>
6698
6699 Remove use of the registered trademark symbol throughout.
6700
6701 2016-01-08 Yao Qi <yao.qi@linaro.org>
6702
6703 * remote-utils.c (getpkt): If c is '\003', call target hook
6704 request_interrupt.
6705
6706 2016-01-06 Yao Qi <yao.qi@linaro.org>
6707
6708 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
6709 linux-aarch32-low.c.
6710 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6711 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6712 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6713 (thumb2_breakpoint): Declare.
6714 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
6715 linux-aarch32-low.h.
6716 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6717 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
6718 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6719
6720 2016-01-01 Joel Brobecker <brobecker@adacore.com>
6721
6722 * gdbreplay.c (gdbreplay_version): Change copyright year in
6723 version message.
6724 * server.c (gdbserver_version): Likewise.
6725
6726 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
6727
6728 * server.c (crc32_table): Delete.
6729 (crc32): Use libiberty's xcrc32 function.
6730
6731 2015-12-22 Joel Brobecker <brobecker@adacore.com>
6732
6733 * lynx-low.c (lynx_delete_thread_callback): New function.
6734 (lynx_mourn): Properly delete our process and all of its
6735 threads. Remove call to clear_inferiors.
6736
6737 2015-12-22 Joel Brobecker <brobecker@adacore.com>
6738
6739 * target.c (thread_search_callback): Add check that
6740 the thread_stopped target callback is not NULL before
6741 calling it.
6742
6743 2015-12-21 Yao Qi <yao.qi@linaro.org>
6744
6745 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
6746 arm breakpoint.
6747
6748 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6749
6750 * server.c (handle_query): Call target_supports_software_single_step.
6751
6752 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6753
6754 * linux-low.c (single_step): New function.
6755 (linux_resume_one_lwp_throw): Call single_step.
6756 (start_step_over): Likewise.
6757
6758 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6759
6760 * Makefile.in (SFILES): Append arch/arm-linux.c,
6761 arch/arm-get-next-pcs.c.
6762 (arm-linux.o): New rule.
6763 (arm-get-next-pcs.o): New rule.
6764 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
6765 arm-linux.o.
6766 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
6767 to linux-aarch32-low.c.
6768 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6769 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6770 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6771 (thumb2_breakpoint_len): Likewise.
6772 (arm_is_thumb_mode): Make non-static.
6773 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
6774 from linux-aarch32-low.c.
6775 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6776 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6777 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6778 (thumb2_breakpoint_len): Likewise.
6779 (arm_is_thumb_mode): New declaration.
6780 * linux-arm-low.c: Include arch/arm-linux.h
6781 aarch/arm-get-next-pcs.h, sys/syscall.h.
6782 (get_next_pcs_ops): New struct.
6783 (get_next_pcs_addr_bits_remove): New function.
6784 (get_next_pcs_is_thumb): New function.
6785 (get_next_pcs_read_memory_unsigned_integer): Likewise.
6786 (arm_sigreturn_next_pc): Likewise.
6787 (get_next_pcs_syscall_next_pc): Likewise.
6788 (arm_gdbserver_get_next_pcs): Likewise.
6789 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
6790 Initialize.
6791 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
6792 * server.h: Include gdb_vecs.h.
6793
6794 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6795
6796 * Makefile.in (SFILES): Append common/common-regcache.c.
6797 (OBS): Append common-regcache.o.
6798 (common-regcache.o): New rule.
6799 * regcache.c (init_register_cache): Initialize cache to
6800 REG_UNAVAILABLE.
6801 (regcache_raw_read_unsigned): New function.
6802 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
6803 register_status enum.
6804
6805 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
6806
6807 * linux-aarch64-low.c (the_low_targets): Rename
6808 breakpoint_reinsert_addr to get_next_pcs.
6809 * linux-arm-low.c (the_low_targets): Likewise.
6810 * linux-bfin-low.c (the_low_targets): Likewise.
6811 * linux-cris-low.c (the_low_targets): Likewise.
6812 * linux-crisv32-low.c (the_low_targets): Likewise.
6813 * linux-low.c (can_software_single_step): Likewise.
6814 (install_software_single_step_breakpoints): New function.
6815 (start_step_over): Use install_software_single_step_breakpoints.
6816 * linux-low.h: New CORE_ADDR vector.
6817 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
6818 get_next_pcs.
6819 * linux-mips-low.c (the_low_targets): Likewise.
6820 * linux-nios2-low.c (the_low_targets): Likewise.
6821 * linux-sparc-low.c (the_low_targets): Likewise.
6822
6823 2015-12-17 Pedro Alves <palves@redhat.com>
6824
6825 * linux-low.c (linux_kill_one_lwp): Remove references to
6826 LinuxThreads.
6827 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
6828 to 'kill'.
6829 (linux_init_signals): Delete.
6830 (initialize_low): Adjust.
6831 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
6832
6833 2015-12-16 Pedro Alves <palves@redhat.com>
6834
6835 * configure.ac (compiler warning flags): When testing a
6836 -Wno-foo option, check whether -Wfoo works instead.
6837 * configure: Regenerate.
6838
6839 2015-12-11 Don Breazeal <donb@codesourcery.com>
6840
6841 * server.c (process_serial_event): Don't exit from gdbserver
6842 in remote mode if there are still active inferiors.
6843
6844 2015-12-11 Yao Qi <yao.qi@linaro.org>
6845
6846 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
6847 arm_breakpoint_at if the process is 32-bit.
6848
6849 2015-12-11 Yao Qi <yao.qi@linaro.org>
6850
6851 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
6852 arm breakpoint.
6853
6854 2015-12-07 Yao Qi <yao.qi@linaro.org>
6855
6856 * configure.srv: Append arm.o to srv_tgtobj for
6857 aarch64*-*-linux* target.
6858 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
6859 from linux-arm-low.c.
6860 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
6861 (arm_breakpoint_len, thumb_breakpoint): Likewise.
6862 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
6863 (thumb2_breakpoint_len): Likewise.
6864 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
6865 (arm_breakpoint_kinds): Likewise.
6866 (arm_breakpoint_kind_from_pc): Likewise.
6867 (arm_sw_breakpoint_from_kind): Likewise.
6868 (arm_breakpoint_kind_from_current_state): Likewise.
6869 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
6870 (arm_sw_breakpoint_from_kind): Declare.
6871 (arm_breakpoint_kind_from_current_state): Declare.
6872 (arm_breakpoint_at): Declare.
6873 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
6874 arm_sw_breakpoint_from_kind if process is 32-bit.
6875 (aarch64_breakpoint_kind_from_pc): New function.
6876 (aarch64_breakpoint_kind_from_current_state): New function.
6877 (the_low_target): Initialize fields breakpoint_kind_from_pc
6878 and breakpoint_kind_from_current_state.
6879 * linux-arm-low.c (arm_breakpoint_kinds): Move to
6880 linux-aarch32-low.c.
6881 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
6882 (arm_breakpoint, arm_breakpoint_len): Likewise.
6883 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
6884 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
6885 (arm_is_thumb_mode): Likewise.
6886 (arm_breakpoint_at): Likewise.
6887 (arm_breakpoint_kind_from_pc): Likewise.
6888 (arm_sw_breakpoint_from_kind): Likewise.
6889 (arm_breakpoint_kind_from_current_state): Likewise.
6890
6891 Revert:
6892 2015-08-04 Yao Qi <yao.qi@linaro.org>
6893
6894 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
6895 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
6896 * server.c (extended_protocol): Remove "static".
6897 * server.h (extended_protocol): Declare it.
6898
6899 2015-12-04 Josh Stone <jistone@redhat.com>
6900
6901 * target.h (struct target_ops) <arch_setup>: Rename to ...
6902 (struct target_ops) <post_create_inferior>: ... this.
6903 (target_arch_setup): Rename to ...
6904 (target_post_create_inferior): ... this, calling post_create_inferior.
6905 * server.c (start_inferior): Update target_arch_setup calls to
6906 target_post_create_inferior.
6907 * linux-low.c (linux_low_ptrace_options): Forward declare.
6908 (linux_arch_setup): Update its comment for general use.
6909 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
6910 (struct linux_target_ops): Use linux_post_create_inferior.
6911 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
6912 to post_create_inferior.
6913 * nto-low.c (struct nto_target_ops): Likewise.
6914 * spu-low.c (struct spu_target_ops): Likewise.
6915 * win32-low.c (struct win32_target_ops): Likewise.
6916
6917 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
6918
6919 * linux-arm-low.c: Remove duplicate arch/arm.h include.
6920
6921 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6922
6923 * linux-arm-low.c (arm_reinsert_addr): Remove function.
6924 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
6925 * linux-cris-low.c (cris_reinsert_addr> Remove function.
6926 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6927 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
6928 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6929 * linux-mips-low.c (mips_reinsert_addr): Remove function.
6930 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6931 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
6932 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6933 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
6934 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
6935
6936 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6937
6938 * linux-low.c (linux_look_up_symbols): Don't call
6939 linux_supports_traceclone.
6940 * linux-low.h (thread_db_init): Remove use_events argument.
6941 * thread-db.c (thread_db_use_event): Remove global variable.
6942 (struct thread_db) <td_thr_event_enable_p>: Remove field.
6943 (struct thread_db) <td_create_bp>: Remove field.
6944 (thread_db_create_event): Remove function.
6945 (thread_db_enable_reporting): Likewise.
6946 (find_one_thread): Don't check for thread_db_use_events.
6947 (attach_thread): Likewise.
6948 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
6949 (try_thread_db_load_1): Don't check for thread_db_use_events.
6950 (thread_db_init): Remove use_events argument and thread events
6951 handling.
6952 (remove_thread_event_breakpoints): Remove function.
6953 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
6954
6955 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
6956
6957 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
6958 New function.
6959 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6960 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
6961 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6962 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
6963 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
6964 Initialize.
6965 * linux-crisv32-low.c (cris_supports_hardware_single_step):
6966 New function.
6967 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6968 * linux-low.c (can_hardware_single_step): Use
6969 supports_hardware_single_step.
6970 (can_software_single_step): New function.
6971 (start_step_over): Call can_software_single_step.
6972 (linux_supports_hardware_single_step): New function.
6973 (struct target_ops) <supports_software_single_step>: Initialize.
6974 * linux-low.h (struct linux_target_ops)
6975 <supports_hardware_single_step>: Initialize.
6976 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
6977 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6978 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
6979 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
6980 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
6981 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6982 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
6983 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6984 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
6985 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
6986 Initialize.
6987 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
6988 (struct linux_target_ops) <tile_supports_hardware_single_step>:
6989 Initialize.
6990 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
6991 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6992 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
6993 New function.
6994 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6995 * target.h (struct target_ops): <supports_software_single_step>:
6996 New field.
6997 (target_supports_software_single_step): New macro.
6998
6999 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
7000
7001 * linux-low.c (linux_wait_1): Fix pc advance condition.
7002 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
7003 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
7004
7005 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
7006
7007 * linux-arm-low.c (arm_is_thumb_mode): New function.
7008 (arm_breakpoint_at): Use arm_is_thumb_mode.
7009 (arm_breakpoint_kind_from_current_state): New function.
7010 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
7011 Initialize.
7012 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
7013 (linux_breakpoint_kind_from_current_state): New function.
7014 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
7015 * linux-low.h (struct linux_target_ops)
7016 <breakpoint_kind_from_current_state>: New field.
7017 * target.h (struct target_ops): Likewise.
7018 (target_breakpoint_kind_from_current_state): New macro.
7019
7020 2015-11-30 Pedro Alves <palves@redhat.com>
7021
7022 * linux-low.c (linux_resume): Wake up the event loop before
7023 returning.
7024
7025 2015-11-30 Pedro Alves <palves@redhat.com>
7026
7027 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
7028 check.
7029 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
7030 to -1.
7031 * target.c (struct thread_search): New structure.
7032 (thread_search_callback): New function.
7033 (prev_general_thread): New global.
7034 (prepare_to_access_memory, done_accessing_memory): New functions.
7035 * target.h (prepare_to_access_memory, done_accessing_memory):
7036 Replace macros with function declarations.
7037
7038 2015-11-30 Pedro Alves <palves@redhat.com>
7039
7040 PR 14618
7041 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
7042 report TARGET_WAITKIND_NO_RESUMED.
7043 * remote-utils.c (prepare_resume_reply): Handle
7044 TARGET_WAITKIND_NO_RESUMED.
7045 * server.c (report_no_resumed): New global.
7046 (handle_query) <qSupported>: Handle "no-resumed+". Report
7047 "no-resumed+" support.
7048 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
7049 return error if the client doesn't support no-resumed events.
7050 (push_stop_notification): New function.
7051 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
7052 events if the client supports them.
7053
7054 2015-11-30 Pedro Alves <palves@redhat.com>
7055
7056 * linux-low.c (thread_still_has_status_pending_p): Don't check
7057 vCont;t here.
7058 (lwp_resumed): New function.
7059 (status_pending_p_callback): Return early if the LWP is not
7060 supposed to be resumed.
7061
7062 2015-11-30 Pedro Alves <palves@redhat.com>
7063
7064 * linux-low.c (handle_extended_wait): Assert that the LWP's
7065 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
7066 thread create events, leave the new child's status pending.
7067 (linux_low_filter_event): If GDB wants to hear about thread exit
7068 events, leave the LWP marked dead and don't delete it.
7069 (linux_wait_for_event_filtered): Don't check for thread exit.
7070 (filter_exit_event): New function.
7071 (linux_wait_1): Use it, when returning an exit event.
7072 (linux_resume_one_lwp_throw): Assert that the LWP's
7073 waitstatus is TARGET_WAITKIND_IGNORE.
7074 * remote-utils.c (prepare_resume_reply): Handle
7075 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
7076 * server.c (report_thread_events): New global.
7077 (handle_general_set): Handle QThreadEvents.
7078 (handle_query) <qSupported>: Handle and report QThreadEvents+;
7079 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
7080 TARGET_WAITKIND_THREAD_EXITED.
7081 * server.h (report_thread_events): Declare.
7082
7083 2015-11-30 Pedro Alves <palves@redhat.com>
7084
7085 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
7086 the thread's last_resume_kind was resume_stop.
7087
7088 2015-11-30 Pedro Alves <palves@redhat.com>
7089
7090 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
7091 before returning.
7092
7093 2015-11-30 Pedro Alves <palves@redhat.com>
7094
7095 * server.c (handle_v_requests): Handle vCtrlC.
7096
7097 2015-11-30 Pedro Alves <palves@redhat.com>
7098
7099 * gdbthread.h (find_any_thread_of_pid): Declare.
7100 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
7101 functions.
7102 * server.c (handle_query): If current_thread is NULL, look for
7103 another thread of the selected process.
7104
7105 2015-11-26 Daniel Colascione <dancol@dancol.org>
7106 Simon Marchi <simon.marchi@ericsson.com>
7107
7108 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
7109 * server.c (handle_qxfer_threads_worker): Refactor to include thread
7110 name in reply.
7111 * target.h (struct target_ops) <thread_name>: New field.
7112 (target_thread_name): New macro.
7113
7114 2015-11-23 Joel Brobecker <brobecker@adacore.com>
7115
7116 * regcache.h (regcache_invalidate_pid): Add declaration.
7117 * regcache.c (regcache_invalidate_pid): New function, extracted
7118 from regcache_invalidate.
7119 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
7120 Add trivial documentation comment.
7121 * lynx-low.c: Use regcache_invalidate_pid instead of
7122 regcache_invalidate.
7123
7124 2015-11-23 Joel Brobecker <brobecker@adacore.com>
7125
7126 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
7127 and Elf64_auxv_t if the target is Android.
7128
7129 2015-11-22 Doug Evans <xdje42@gmail.com>
7130
7131 * target.h: #include <sys/types.h>.
7132
7133 2015-11-19 Pedro Alves <palves@redhat.com>
7134
7135 * linux-low.c (linux_process_qsupported): Change prototype.
7136 Adjust.
7137 * linux-low.h (struct linux_target_ops) <process_qsupported>:
7138 Change prototype.
7139 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
7140 and adjust to loop over all features.
7141 * server.c (handle_query) <qSupported>: Adjust to call
7142 target_process_qsupported once, passing it a vector of unprocessed
7143 features.
7144 * target.h (struct target_ops) <process_qsupported>: Change
7145 prototype.
7146 (target_process_qsupported): Adjust.
7147
7148 2015-11-19 Pedro Alves <palves@redhat.com>
7149
7150 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
7151 mode.
7152 * configure: Regenerate.
7153
7154 2015-11-19 Pedro Alves <palves@redhat.com>
7155
7156 * configure: Regenerate.
7157
7158 2015-11-19 Yao Qi <yao.qi@linaro.org>
7159
7160 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
7161 type to uint32_t.
7162
7163 2015-11-19 Yao Qi <yao.qi@linaro.org>
7164
7165 * linux-aarch64-low.c (enum aarch64_operand_type): New.
7166 (struct aarch64_operand): Move enum out.
7167
7168 2015-11-19 Yao Qi <yao.qi@linaro.org>
7169
7170 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
7171 struct user_fpsimd_state *.
7172 (aarch64_store_fpregset): Likewise.
7173
7174 2015-11-19 Yao Qi <yao.qi@linaro.org>
7175
7176 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
7177 struct user_pt_regs *.
7178 (aarch64_store_gregset): Likewise.
7179
7180 2015-11-18 Pedro Alves <palves@redhat.com>
7181
7182 * Makefile.in (all_object_files): Add $IPA_OBJS.
7183
7184 2015-11-17 Pedro Alves <palves@redhat.com>
7185
7186 * win32-low.c (win32_resume): Use gdb_signal_from_host,
7187 GDB_SIGNAL_0 and gdb_signal_to_string.
7188
7189 2015-11-17 Pedro Alves <palves@redhat.com>
7190
7191 * win32-low.c (handle_output_debug_string): Remove parameter.
7192 (win32_kill): Remove our_status local and adjust call to
7193 handle_output_debug_string.
7194 (get_child_debug_event): Adjust call to
7195 handle_output_debug_string.
7196
7197 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7198
7199 * linux-mips-low.c (mips_fill_gregset): Add cast.
7200 (mips_store_gregset): Likewise.
7201 (mips_fill_fpregset): Likewise.
7202 (mips_store_fpregset): Likewise.
7203
7204 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7205
7206 * linux-mips-low.c (mips_add_watchpoint): Rename private to
7207 priv.
7208
7209 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7210
7211 * linux-mips-low.c (mips_linux_new_thread): Change type of
7212 watch_type to enum target_hw_bp_type.
7213
7214 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7215
7216 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
7217 Change return type to arm_hwbp_type.
7218
7219 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7220
7221 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
7222 (arm_store_gregset): Likewise.
7223 * linux-arm-low.c (arm_get_hwcap): Likewise.
7224 (arm_read_description): Likewise.
7225
7226 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7227
7228 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
7229
7230 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7231
7232 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
7233 (ppc_fill_vsxregset): Likewise.
7234 (ppc_store_vsxregset): Likewise.
7235 (ppc_fill_vrregset): Likewise.
7236 (ppc_store_vrregset): Likewise.
7237 (ppc_fill_evrregset): Likewise.
7238 (ppc_store_evrregset): Likewise.
7239
7240 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
7241
7242 * linux-ppc-low.c (ppc_usrregs_info): Remove
7243 forward-declaration.
7244 (ppc_arch_setup): Move lower in file.
7245
7246 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
7247
7248 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
7249 (ps_pdwrite): Likewise.
7250
7251 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
7252
7253 * linux-arm-low.c (arm_new_thread): Move pointer dereference
7254 to after assert checks.
7255
7256 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
7257
7258 * proc-service.c (ps_pdread): Add/adjust casts.
7259 (ps_pdwrite): Add/adjust casts.
7260
7261 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
7262
7263 * server.c (handle_search_memory_1): Cast return value of
7264 memmem.
7265
7266 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
7267
7268 * server.c (write_qxfer_response): Change type of data to
7269 gdb_byte *.
7270
7271 2015-10-29 Pedro Alves <palves@redhat.com>
7272
7273 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
7274
7275 2015-10-29 Pedro Alves <palves@redhat.com>
7276
7277 * tracepoint.c (clear_installed_tracepoints): Add casts.
7278
7279 2015-10-29 Pedro Alves <palves@redhat.com>
7280
7281 * server.c (handle_v_cont, process_serial_event): Add enum
7282 gdb_signal casts to signal parsing code.
7283
7284 2015-10-29 Pedro Alves <palves@redhat.com>
7285
7286 * linux-low.h (NULL_REGSET): Define.
7287 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
7288 * linux-arm-low.c (arm_regsets): Likewise.
7289 * linux-crisv32-low.c (cris_regsets): Likewise.
7290 * linux-m68k-low.c (m68k_regsets): Likewise.
7291 * linux-mips-low.c (mips_regsets): Likewise.
7292 * linux-nios2-low.c (nios2_regsets): Likewise.
7293 * linux-ppc-low.c (ppc_regsets): Likewise.
7294 * linux-s390-low.c (s390_regsets): Likewise.
7295 * linux-sh-low.c (sh_regsets): Likewise.
7296 * linux-sparc-low.c (sparc_regsets): Likewise.
7297 * linux-tic6x-low.c (tic6x_regsets): Likewise.
7298 * linux-tile-low.c (tile_regsets): Likewise.
7299 * linux-x86-low.c (x86_regsets): Likewise.
7300 * linux-xtensa-low.c (xtensa_regsets): Likewise.
7301
7302 2015-10-29 Pedro Alves <palves@redhat.com>
7303
7304 * linux-low.h (NULL_REGSET): Define.
7305 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
7306 * linux-arm-low.c (arm_regsets): Likewise.
7307 * linux-crisv32-low.c (cris_regsets): Likewise.
7308 * linux-m68k-low.c (m68k_regsets): Likewise.
7309 * linux-mips-low.c (mips_regsets): Likewise.
7310 * linux-nios2-low.c (nios2_regsets): Likewise.
7311 * linux-ppc-low.c (ppc_regsets): Likewise.
7312 * linux-s390-low.c (s390_regsets): Likewise.
7313 * linux-sh-low.c (sh_regsets): Likewise.
7314 * linux-sparc-low.c (sparc_regsets): Likewise.
7315 * linux-tic6x-low.c (tic6x_regsets): Likewise.
7316 * linux-tile-low.c (tile_regsets): Likewise.
7317 * linux-x86-low.c (x86_regsets): Likewise.
7318 * linux-xtensa-low.c (xtensa_regsets): Likewise.
7319
7320 2015-10-26 Doug Evans <dje@google.com>
7321
7322 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
7323
7324 2015-10-26 Doug Evans <dje@google.com>
7325
7326 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
7327
7328 2015-10-26 Doug Evans <dje@google.com>
7329
7330 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
7331 for debug_printf.
7332 (attach_thread, find_new_threads_callback): Ditto.
7333
7334 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
7335
7336 * mem-break.h (set_breakpoint_data): Remove.
7337
7338 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
7339
7340 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
7341 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
7342 (initialize_low): Remove set_breakpoint_data call.
7343 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
7344 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
7345 (initialize_low): Remove set_breakpoint_data call.
7346 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
7347 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
7348 (initialize_low): Remove set_breakpoint_data call.
7349
7350 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
7351
7352 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
7353 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
7354 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
7355 * target.h (target_breakpoint_kind_from_pc): New macro.
7356
7357 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
7358
7359 * linux-low.c (default_breakpoint_kind_from_pc): New function.
7360 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
7361 the default breakpoint kind.
7362
7363 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7364
7365 * linux-arm-low.c (arm_supports_z_point_type): Add software
7366 breakpoint support.
7367
7368 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7369
7370 * linux-arm-low.c: Refactor breakpoint definitions.
7371 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
7372 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
7373
7374 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7375
7376 * Makefile.in: Add arm.c/o.
7377 * configure.srv: Likewise.
7378 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
7379 (arm_breakpoint_kind_from_pc): New function.
7380 (arm_sw_breakpoint_from_kind): Return proper kind.
7381 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
7382
7383 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7384
7385 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
7386 removal.
7387 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
7388 (struct raw_breakpoint) <size>: Remove.
7389 (struct raw_breakpoint) <kind>: Add.
7390 (bp_size): New function.
7391 (bp_opcode): Likewise.
7392 (find_raw_breakpoint_at): Adjust for kind.
7393 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
7394 (remove_memory_breakpoint): Adjust for kind call bp_size.
7395 (set_raw_breakpoint_at): Adjust for kind.
7396 (set_breakpoint): Likewise.
7397 (set_breakpoint_at): Call breakpoint_kind_from_pc.
7398 (delete_raw_breakpoint): Adjust for kind.
7399 (delete_breakpoint): Likewise.
7400 (find_gdb_breakpoint): Likewise.
7401 (set_gdb_breakpoint_1): Likewise.
7402 (set_gdb_breakpoint): Likewise.
7403 (delete_gdb_breakpoint_1): Likewise.
7404 (delete_gdb_breakpoint): Likewise.
7405 (uninsert_raw_breakpoint): Likewise.
7406 (reinsert_raw_breakpoint): Likewise.
7407 (set_breakpoint_data): Remove.
7408 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
7409 (check_mem_read): Adjust for kind call bp_size.
7410 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
7411 (clone_one_breakpoint): Adjust for kind.
7412 * mem-break.h (set_gdb_breakpoint): Likewise.
7413 (delete_gdb_breakpoint): Likewise.
7414 * server.c (process_serial_event): Likewise.
7415
7416 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7417
7418 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
7419 (struct linux_target_ops) <breakpoint>: Remove.
7420 (struct linux_target_ops) <breakpoint_len>: Remove.
7421 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7422 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7423 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
7424 (arm_sw_breakpoint_from_kind): New function.
7425 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
7426 (struct linux_target_ops) <breakpoint>: Remove.
7427 (struct linux_target_ops) <breakpoint_len>: Remove.
7428 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7429 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7430 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
7431 (struct linux_target_ops) <breakpoint>: Remove.
7432 (struct linux_target_ops) <breakpoint_len>: Remove.
7433 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7434 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7435 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
7436 (struct linux_target_ops) <breakpoint>: Remove.
7437 (struct linux_target_ops) <breakpoint_len>: Remove.
7438 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7439 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7440 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
7441 and sw_breakpoint_from_kind to increment the pc.
7442 (linux_breakpoint_kind_from_pc): New function.
7443 (linux_sw_breakpoint_from_kind): New function.
7444 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
7445 (initialize_low): Call breakpoint_kind_from_pc and
7446 sw_breakpoint_from_kind to replace breakpoint_data/len.
7447 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
7448 New field.
7449 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
7450 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
7451 (struct linux_target_ops) <breakpoint>: Remove.
7452 (struct linux_target_ops) <breakpoint_len>: Remove.
7453 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7454 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7455 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
7456 (struct linux_target_ops) <breakpoint>: Remove.
7457 (struct linux_target_ops) <breakpoint_len>: Remove.
7458 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7459 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7460 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
7461 (struct linux_target_ops) <breakpoint>: Remove.
7462 (struct linux_target_ops) <breakpoint_len>: Remove.
7463 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7464 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7465 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
7466 (struct linux_target_ops) <breakpoint>: Remove.
7467 (struct linux_target_ops) <breakpoint_len>: Remove.
7468 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7469 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7470 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
7471 (struct linux_target_ops) <breakpoint>: Remove.
7472 (struct linux_target_ops) <breakpoint_len>: Remove.
7473 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7474 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7475 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
7476 (struct linux_target_ops) <breakpoint>: Remove.
7477 (struct linux_target_ops) <breakpoint_len>: Remove.
7478 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7479 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7480 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
7481 (struct linux_target_ops) <breakpoint>: Remove.
7482 (struct linux_target_ops) <breakpoint_len>: Remove.
7483 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7484 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7485 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
7486 (struct linux_target_ops) <breakpoint>: Remove.
7487 (struct linux_target_ops) <breakpoint_len>: Remove.
7488 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7489 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7490 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
7491 (struct linux_target_ops) <breakpoint>: Remove.
7492 (struct linux_target_ops) <breakpoint_len>: Remove.
7493 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7494 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7495 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
7496 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
7497 (struct linux_target_ops) <breakpoint>: Remove.
7498 (struct linux_target_ops) <breakpoint_len>: Remove.
7499 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7500 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7501 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
7502 (struct linux_target_ops) <breakpoint>: Remove.
7503 (struct linux_target_ops) <breakpoint_len>: Remove.
7504 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
7505 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
7506
7507 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
7508
7509 * linux-cris-low.c (cris_get_pc): Remove void arg.
7510
7511 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
7512
7513 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
7514 variable name.
7515
7516 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
7517
7518 * inferiors.c (thread_pid_matches_callback): New function.
7519 (find_thread_process): New function.
7520 (remove_thread): Reset current_thread.
7521 (remove_process): Assert threads have been removed first.
7522
7523 2015-10-15 Yao Qi <yao.qi@linaro.org>
7524
7525 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
7526 if it is 3.
7527 (aarch64_remove_point): Likewise.
7528 * regcache.c (regcache_register_size): New function.
7529
7530 2015-10-12 Yao Qi <yao.qi@linaro.org>
7531
7532 * linux-aarch64-low.c: Update all callers as emit_load_store
7533 is renamed to aarch64_emit_load_store.
7534
7535 2015-10-12 Yao Qi <yao.qi@linaro.org>
7536
7537 * linux-aarch64-low.c: Update all callers of function renaming
7538 from emit_insn to aarch64_emit_insn.
7539
7540 2015-10-12 Yao Qi <yao.qi@linaro.org>
7541
7542 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
7543 arch/aarch64-insn.h.
7544 (struct aarch64_memory_operand): Likewise.
7545 (ENCODE): Likewise.
7546 (emit_insn): Move to arch/aarch64-insn.c.
7547 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
7548 (emit_load_store): Move to arch/aarch64-insn.c.
7549 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
7550 (can_encode_int32): Remove.
7551
7552 2015-10-12 Yao Qi <yao.qi@linaro.org>
7553
7554 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
7555 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
7556 (aarch64_relocate_instruction): Likewise.
7557 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
7558 (struct aarch64_insn_visitor): Likewise.
7559
7560 2015-10-12 Yao Qi <yao.qi@linaro.org>
7561
7562 * linux-aarch64-low.c (struct aarch64_insn_data): New.
7563 (struct aarch64_insn_visitor): New.
7564 (struct aarch64_insn_relocation_data): New.
7565 (aarch64_ftrace_insn_reloc_b): New function.
7566 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
7567 (aarch64_ftrace_insn_reloc_cb): Likewise.
7568 (aarch64_ftrace_insn_reloc_tb): Likewise.
7569 (aarch64_ftrace_insn_reloc_adr): Likewise.
7570 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
7571 (aarch64_ftrace_insn_reloc_others): Likewise.
7572 (visitor): New.
7573 (aarch64_relocate_instruction): Use visitor.
7574
7575 2015-10-12 Yao Qi <yao.qi@linaro.org>
7576
7577 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
7578 int. Add argument buf.
7579 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
7580 aarch64_relocate_instruction.
7581
7582 2015-10-12 Yao Qi <yao.qi@linaro.org>
7583
7584 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
7585 argument insn. Remove local variable insn. Don't call
7586 target_read_uint32.
7587 (aarch64_install_fast_tracepoint_jump_pad): Call
7588 target_read_uint32.
7589
7590 2015-09-30 Yao Qi <yao.qi@linaro.org>
7591
7592 * linux-aarch64-low.c (emit_movk): Shorten a long line.
7593 (emit_load_store_pair): Likewise.
7594
7595 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
7596
7597 * dll.c (match_dll): Add cast(s).
7598 (unloaded_dll): Likewise.
7599 * linux-low.c (second_thread_of_pid_p): Likewise.
7600 (delete_lwp_callback): Likewise.
7601 (count_events_callback): Likewise.
7602 (select_event_lwp_callback): Likewise.
7603 (linux_set_resume_request): Likewise.
7604 * server.c (accumulate_file_name_length): Likewise.
7605 (emit_dll_description): Likewise.
7606 (handle_qxfer_threads_worker): Likewise.
7607 (visit_actioned_threads): Likewise.
7608 * thread-db.c (any_thread_of): Likewise.
7609 * tracepoint.c (same_process_p): Likewise.
7610 (match_blocktype): Likewise.
7611 (build_traceframe_info_xml): Likewise.
7612
7613 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
7614
7615 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
7616 assignment.
7617 (gdb_unparse_agent_expr): Likewise.
7618 * hostio.c (require_data): Likewise.
7619 (handle_pread): Likewise.
7620 * linux-low.c (disable_regset): Likewise.
7621 (fetch_register): Likewise.
7622 (store_register): Likewise.
7623 (get_dynamic): Likewise.
7624 (linux_qxfer_libraries_svr4): Likewise.
7625 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
7626 (set_fast_tracepoint_jump): Likewise.
7627 (uninsert_fast_tracepoint_jumps_at): Likewise.
7628 (reinsert_fast_tracepoint_jumps_at): Likewise.
7629 (validate_inserted_breakpoint): Likewise.
7630 (clone_agent_expr): Likewise.
7631 * regcache.c (init_register_cache): Likewise.
7632 * remote-utils.c (putpkt_binary_1): Likewise.
7633 (decode_M_packet): Likewise.
7634 (decode_X_packet): Likewise.
7635 (look_up_one_symbol): Likewise.
7636 (relocate_instruction): Likewise.
7637 (monitor_output): Likewise.
7638 * server.c (handle_search_memory): Likewise.
7639 (handle_qxfer_exec_file): Likewise.
7640 (handle_qxfer_libraries): Likewise.
7641 (handle_qxfer): Likewise.
7642 (handle_query): Likewise.
7643 (handle_v_cont): Likewise.
7644 (handle_v_run): Likewise.
7645 (captured_main): Likewise.
7646 * target.c (write_inferior_memory): Likewise.
7647 * thread-db.c (try_thread_db_load_from_dir): Likewise.
7648 * tracepoint.c (init_trace_buffer): Likewise.
7649 (add_tracepoint_action): Likewise.
7650 (add_traceframe): Likewise.
7651 (add_traceframe_block): Likewise.
7652 (cmd_qtdpsrc): Likewise.
7653 (cmd_qtdv): Likewise.
7654 (cmd_qtstatus): Likewise.
7655 (response_source): Likewise.
7656 (response_tsv): Likewise.
7657 (cmd_qtnotes): Likewise.
7658 (gdb_collect): Likewise.
7659 (initialize_tracepoint): Likewise.
7660
7661 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7662
7663 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
7664 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
7665 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
7666 <NOP>: New.
7667 (enum aarch64_condition_codes): New enum.
7668 (w0): New static global.
7669 (fp): Likewise.
7670 (lr): Likewise.
7671 (struct aarch64_memory_operand) <type>: New
7672 MEMORY_OPERAND_POSTINDEX type.
7673 (postindex_memory_operand): New helper function.
7674 (emit_ret): New function.
7675 (emit_load_store_pair): New function, factored out of emit_stp
7676 with support for MEMORY_OPERAND_POSTINDEX.
7677 (emit_stp): Rewrite using emit_load_store_pair.
7678 (emit_ldp): New function.
7679 (emit_load_store): Likewise.
7680 (emit_ldr): Mention post-index instruction in comment.
7681 (emit_ldrh): New function.
7682 (emit_ldrb): New function.
7683 (emit_ldrsw): Mention post-index instruction in comment.
7684 (emit_str): Likewise.
7685 (emit_subs): New function.
7686 (emit_cmp): Likewise.
7687 (emit_and): Likewise.
7688 (emit_orr): Likewise.
7689 (emit_orn): Likewise.
7690 (emit_eor): Likewise.
7691 (emit_mvn): Likewise.
7692 (emit_lslv): Likewise.
7693 (emit_lsrv): Likewise.
7694 (emit_asrv): Likewise.
7695 (emit_mul): Likewise.
7696 (emit_sbfm): Likewise.
7697 (emit_sbfx): Likewise.
7698 (emit_ubfm): Likewise.
7699 (emit_ubfx): Likewise.
7700 (emit_csinc): Likewise.
7701 (emit_cset): Likewise.
7702 (emit_nop): Likewise.
7703 (emit_ops_insns): New helper function.
7704 (emit_pop): Likewise.
7705 (emit_push): Likewise.
7706 (aarch64_emit_prologue): New function.
7707 (aarch64_emit_epilogue): Likewise.
7708 (aarch64_emit_add): Likewise.
7709 (aarch64_emit_sub): Likewise.
7710 (aarch64_emit_mul): Likewise.
7711 (aarch64_emit_lsh): Likewise.
7712 (aarch64_emit_rsh_signed): Likewise.
7713 (aarch64_emit_rsh_unsigned): Likewise.
7714 (aarch64_emit_ext): Likewise.
7715 (aarch64_emit_log_not): Likewise.
7716 (aarch64_emit_bit_and): Likewise.
7717 (aarch64_emit_bit_or): Likewise.
7718 (aarch64_emit_bit_xor): Likewise.
7719 (aarch64_emit_bit_not): Likewise.
7720 (aarch64_emit_equal): Likewise.
7721 (aarch64_emit_less_signed): Likewise.
7722 (aarch64_emit_less_unsigned): Likewise.
7723 (aarch64_emit_ref): Likewise.
7724 (aarch64_emit_if_goto): Likewise.
7725 (aarch64_emit_goto): Likewise.
7726 (aarch64_write_goto_address): Likewise.
7727 (aarch64_emit_const): Likewise.
7728 (aarch64_emit_call): Likewise.
7729 (aarch64_emit_reg): Likewise.
7730 (aarch64_emit_pop): Likewise.
7731 (aarch64_emit_stack_flush): Likewise.
7732 (aarch64_emit_zero_ext): Likewise.
7733 (aarch64_emit_swap): Likewise.
7734 (aarch64_emit_stack_adjust): Likewise.
7735 (aarch64_emit_int_call_1): Likewise.
7736 (aarch64_emit_void_call_2): Likewise.
7737 (aarch64_emit_eq_goto): Likewise.
7738 (aarch64_emit_ne_goto): Likewise.
7739 (aarch64_emit_lt_goto): Likewise.
7740 (aarch64_emit_le_goto): Likewise.
7741 (aarch64_emit_gt_goto): Likewise.
7742 (aarch64_emit_ge_got): Likewise.
7743 (aarch64_emit_ops_impl): New static global variable.
7744 (aarch64_emit_ops): New target function, return
7745 &aarch64_emit_ops_impl.
7746 (struct linux_target_ops): Install it.
7747
7748 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7749
7750 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
7751 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
7752 aarch64-ipa.o.
7753 * linux-aarch64-ipa.c: New file.
7754 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
7755 and endian.h.
7756 (aarch64_get_thread_area): New target method.
7757 (extract_signed_bitfield): New helper function.
7758 (aarch64_decode_ldr_literal): New function.
7759 (enum aarch64_opcodes): New enum.
7760 (struct aarch64_register): New struct.
7761 (struct aarch64_operand): New struct.
7762 (x0): New static global.
7763 (x1): Likewise.
7764 (x2): Likewise.
7765 (x3): Likewise.
7766 (x4): Likewise.
7767 (w2): Likewise.
7768 (ip0): Likewise.
7769 (sp): Likewise.
7770 (xzr): Likewise.
7771 (aarch64_register): New helper function.
7772 (register_operand): Likewise.
7773 (immediate_operand): Likewise.
7774 (struct aarch64_memory_operand): New struct.
7775 (offset_memory_operand): New helper function.
7776 (preindex_memory_operand): Likewise.
7777 (enum aarch64_system_control_registers): New enum.
7778 (ENCODE): New macro.
7779 (emit_insn): New helper function.
7780 (emit_b): New function.
7781 (emit_bcond): Likewise.
7782 (emit_cb): Likewise.
7783 (emit_tb): Likewise.
7784 (emit_blr): Likewise.
7785 (emit_stp): Likewise.
7786 (emit_ldp_q_offset): Likewise.
7787 (emit_stp_q_offset): Likewise.
7788 (emit_load_store): Likewise.
7789 (emit_ldr): Likewise.
7790 (emit_ldrsw): Likewise.
7791 (emit_str): Likewise.
7792 (emit_ldaxr): Likewise.
7793 (emit_stxr): Likewise.
7794 (emit_stlr): Likewise.
7795 (emit_data_processing_reg): Likewise.
7796 (emit_data_processing): Likewise.
7797 (emit_add): Likewise.
7798 (emit_sub): Likewise.
7799 (emit_mov): Likewise.
7800 (emit_movk): Likewise.
7801 (emit_mov_addr): Likewise.
7802 (emit_mrs): Likewise.
7803 (emit_msr): Likewise.
7804 (emit_sevl): Likewise.
7805 (emit_wfe): Likewise.
7806 (append_insns): Likewise.
7807 (can_encode_int32_in): New helper function.
7808 (aarch64_relocate_instruction): New function.
7809 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
7810 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
7811 (struct linux_target_ops): Install aarch64_get_thread_area,
7812 aarch64_install_fast_tracepoint_jump_pad and
7813 aarch64_get_min_fast_tracepoint_insn_len.
7814
7815 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
7816
7817 * Makefile.in (aarch64-insn.o): New rule.
7818 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
7819
7820 2015-09-21 Yao Qi <yao.qi@linaro.org>
7821
7822 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
7823
7824 2015-09-21 Yao Qi <yao.qi@linaro.org>
7825
7826 * tracepoint.c (max_jump_pad_size): Remove.
7827
7828 2015-09-18 Yao Qi <yao.qi@linaro.org>
7829
7830 * linux-aarch64-low.c: Don't include sys/uio.h.
7831 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
7832
7833 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
7834
7835 * tracepoint.c (eval_result_type): Change prototype.
7836 (condition_true_at_tracepoint): Fix argument to compiled_cond.
7837
7838 2015-09-15 Pedro Alves <palves@redhat.com>
7839
7840 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
7841 Check whether to report exec events instead of checking whether
7842 multiprocess is enabled.
7843
7844 2015-09-15 Pedro Alves <palves@redhat.com>
7845
7846 PR remote/18965
7847 * remote-utils.c (prepare_resume_reply): Merge
7848 TARGET_WAITKIND_VFORK_DONE switch case with the
7849 TARGET_WAITKIND_FORKED case.
7850
7851 2015-09-15 Yao Qi <yao.qi@linaro.org>
7852
7853 * server.c (handle_query): Check string comparison using
7854 "else if" instead of "if".
7855
7856 2015-09-15 Yao Qi <yao.qi@linaro.org>
7857
7858 * server.c (vCont_supported): New global variable.
7859 (handle_query): Set vCont_supported to 1 if "vContSupported+"
7860 matches. Append ";vContSupported+" to own_buf.
7861 (handle_v_requests): Append ";s;S" to own_buf if target supports
7862 hardware single step or vCont_supported is false.
7863 (capture_main): Set vCont_supported to zero.
7864
7865 2015-09-15 Yao Qi <yao.qi@linaro.org>
7866
7867 * linux-low.c (linux_supports_conditional_breakpoints): Rename
7868 it to ...
7869 (linux_supports_hardware_single_step): ... New function.
7870 (linux_target_ops): Update.
7871 * lynx-low.c (lynx_target_ops): Set field
7872 supports_hardware_single_step to target_can_do_hardware_single_step.
7873 * nto-low.c (nto_target_ops): Likewise.
7874 * spu-low.c (spu_target_ops): Likewise.
7875 * win32-low.c (win32_target_ops): Likewise.
7876 * target.c (target_can_do_hardware_single_step): New function.
7877 * target.h (struct target_ops) <supports_conditional_breakpoints>:
7878 Remove. <supports_hardware_single_step>: New field.
7879 (target_supports_conditional_breakpoints): Remove.
7880 (target_supports_hardware_single_step): New macro.
7881 (target_can_do_hardware_single_step): Declare.
7882 * server.c (handle_query): Use target_supports_hardware_single_step
7883 instead of target_supports_conditional_breakpoints.
7884
7885 2015-09-15 Yao Qi <yao.qi@linaro.org>
7886
7887 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
7888 function.
7889 (struct linux_target_ops the_low_target): Install
7890 aarch64_linux_siginfo_fixup.
7891
7892 2015-09-11 Don Breazeal <donb@codesourcery.com>
7893 Luis Machado <lgustavo@codesourcery.com>
7894
7895 * linux-low.c (linux_mourn): Static declaration.
7896 (linux_arch_setup): Move in front of
7897 handle_extended_wait.
7898 (linux_arch_setup_thread): New function.
7899 (handle_extended_wait): Handle exec events. Call
7900 linux_arch_setup_thread. Make event_lwp argument a
7901 pointer-to-a-pointer.
7902 (check_zombie_leaders): Do not check stopped threads.
7903 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
7904 (linux_low_filter_event): Add lwp and thread for exec'ing
7905 non-leader thread if leader thread has been deleted.
7906 Refactor code into linux_arch_setup_thread and call it.
7907 Pass child lwp pointer by reference to handle_extended_wait.
7908 (linux_wait_for_event_filtered): Update comment.
7909 (linux_wait_1): Prevent clobbering exec event status.
7910 (linux_supports_exec_events): New function.
7911 (linux_target_ops) <supports_exec_events>: Initialize new member.
7912 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
7913 new member.
7914 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
7915 * server.c (report_exec_events): New global variable.
7916 (handle_query): Handle qSupported query for exec-events feature.
7917 (captured_main): Initialize report_exec_events.
7918 * server.h (report_exec_events): Declare new global variable.
7919 * target.h (struct target_ops) <supports_exec_events>: New
7920 member.
7921 (target_supports_exec_events): New macro.
7922 * win32-low.c (win32_target_ops) <supports_exec_events>:
7923 Initialize new member.
7924
7925 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
7926
7927 * linux-low.c (linux_low_enable_btrace): Remove.
7928 (linux_target_ops): Replace linux_low_enable_btrace with
7929 linux_enable_btrace.
7930
7931 2015-09-03 Yao Qi <yao.qi@linaro.org>
7932
7933 * linux-aarch64-low.c (aarch64_insert_point): Call
7934 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
7935 returns true.
7936
7937 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
7938
7939 * linux-low.c (check_stopped_by_breakpoint): Use
7940 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
7941
7942 2015-08-27 Pedro Alves <palves@redhat.com>
7943
7944 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
7945
7946 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
7947
7948 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
7949 the XNEW-family equivalent.
7950 (compile_bytecodes): Likewise.
7951 * dll.c (loaded_dll): Likewise.
7952 * event-loop.c (append_callback_event): Likewise.
7953 (create_file_handler): Likewise.
7954 (create_file_event): Likewise.
7955 * hostio.c (handle_open): Likewise.
7956 * inferiors.c (add_thread): Likewise.
7957 (add_process): Likewise.
7958 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
7959 * linux-arm-low.c (arm_new_process): Likewise.
7960 (arm_new_thread): Likewise.
7961 * linux-low.c (add_to_pid_list): Likewise.
7962 (linux_add_process): Likewise.
7963 (handle_extended_wait): Likewise.
7964 (add_lwp): Likewise.
7965 (enqueue_one_deferred_signal): Likewise.
7966 (enqueue_pending_signal): Likewise.
7967 (linux_resume_one_lwp_throw): Likewise.
7968 (linux_resume_one_thread): Likewise.
7969 (linux_read_memory): Likewise.
7970 (linux_write_memory): Likewise.
7971 * linux-mips-low.c (mips_linux_new_process): Likewise.
7972 (mips_linux_new_thread): Likewise.
7973 (mips_add_watchpoint): Likewise.
7974 * linux-x86-low.c (initialize_low_arch): Likewise.
7975 * lynx-low.c (lynx_add_process): Likewise.
7976 * mem-break.c (set_raw_breakpoint_at): Likewise.
7977 (set_breakpoint): Likewise.
7978 (add_condition_to_breakpoint): Likewise.
7979 (add_commands_to_breakpoint): Likewise.
7980 (clone_agent_expr): Likewise.
7981 (clone_one_breakpoint): Likewise.
7982 * regcache.c (new_register_cache): Likewise.
7983 * remote-utils.c (look_up_one_symbol): Likewise.
7984 * server.c (queue_stop_reply): Likewise.
7985 (start_inferior): Likewise.
7986 (queue_stop_reply_callback): Likewise.
7987 (handle_target_event): Likewise.
7988 * spu-low.c (fetch_ppc_memory): Likewise.
7989 (store_ppc_memory): Likewise.
7990 * target.c (set_target_ops): Likewise.
7991 * thread-db.c (thread_db_load_search): Likewise.
7992 (try_thread_db_load_1): Likewise.
7993 * tracepoint.c (add_tracepoint): Likewise.
7994 (add_tracepoint_action): Likewise.
7995 (create_trace_state_variable): Likewise.
7996 (cmd_qtdpsrc): Likewise.
7997 (cmd_qtro): Likewise.
7998 (add_while_stepping_state): Likewise.
7999 * win32-low.c (child_add_thread): Likewise.
8000 (get_image_name): Likewise.
8001
8002 2015-08-25 Yao Qi <yao.qi@linaro.org>
8003
8004 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
8005
8006 2015-08-25 Yao Qi <yao.qi@linaro.org>
8007
8008 * Makefile.in (aarch64-linux.o): New rule.
8009 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
8010 srv_tgtobj.
8011 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
8012 (aarch64_init_debug_reg_state): Make it extern.
8013 (aarch64_linux_prepare_to_resume): Remove.
8014
8015 2015-08-25 Yao Qi <yao.qi@linaro.org>
8016
8017 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
8018 lwp_arch_private_info and ptid_of_lwp.
8019
8020 2015-08-25 Yao Qi <yao.qi@linaro.org>
8021
8022 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
8023 Find proc_info by find_process_pid. All callers updated.
8024
8025 2015-08-25 Yao Qi <yao.qi@linaro.org>
8026
8027 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
8028 Remove.
8029 (debug_reg_change_callback): Remove.
8030 (aarch64_notify_debug_reg_change): Remove.
8031
8032 2015-08-25 Yao Qi <yao.qi@linaro.org>
8033
8034 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
8035 Call current_lwp_ptid.
8036
8037 2015-08-25 Yao Qi <yao.qi@linaro.org>
8038
8039 * linux-aarch64-low.c (debug_reg_change_callback): Use
8040 debug_printf.
8041
8042 2015-08-25 Yao Qi <yao.qi@linaro.org>
8043
8044 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
8045
8046 2015-08-25 Yao Qi <yao.qi@linaro.org>
8047
8048 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
8049
8050 2015-08-25 Yao Qi <yao.qi@linaro.org>
8051
8052 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
8053 the code.
8054
8055 2015-08-25 Yao Qi <yao.qi@linaro.org>
8056
8057 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
8058 Remove.
8059 (debug_reg_change_callback): Remove argument entry and add argument
8060 lwp. Remove local variable thread. Don't print thread id in the
8061 debugging output. Don't check whether pid of thread equals to pid.
8062 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
8063 iterate_over_lwps instead find_inferior.
8064
8065 2015-08-24 Pedro Alves <palves@redhat.com>
8066
8067 * inferiors.c (get_first_process): New function.
8068 * inferiors.h (get_first_process): New declaration.
8069 * remote-utils.c (read_ptid): Default to the first process in the
8070 list, instead of to the current thread's process.
8071
8072 2015-08-24 Pedro Alves <palves@redhat.com>
8073
8074 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
8075 * event-loop.c: Likewise.
8076 * remote-utils.c: Likewise.
8077 * tracepoint.c: Likewise.
8078
8079 2015-08-24 Pedro Alves <palves@redhat.com>
8080
8081 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
8082 ptid_get_lwp.
8083
8084 2015-08-21 Pedro Alves <palves@redhat.com>
8085
8086 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
8087 instead of literal 1.
8088
8089 2015-08-21 Pedro Alves <palves@redhat.com>
8090
8091 * tdesc.c (default_description): Explicitly zero-initialize.
8092
8093 2015-08-21 Pedro Alves <palves@redhat.com>
8094
8095 PR gdb/18749
8096 * inferiors.c (remove_thread): Discard any pending stop reply for
8097 this thread.
8098 * server.c (remove_all_on_match_pid): Rename to ...
8099 (remove_all_on_match_ptid): ... this. Work with a filter ptid
8100 instead of a pid.
8101 (discard_queued_stop_replies): Change parameter to a ptid. Now
8102 extern.
8103 (handle_v_kill, kill_inferior_callback, captured_main)
8104 (process_serial_event): Adjust.
8105 * server.h (discard_queued_stop_replies): Declare.
8106
8107 2015-08-21 Pedro Alves <palves@redhat.com>
8108
8109 * linux-low.c (wait_for_sigstop): Always switch to no thread
8110 selected if the previously current thread dies.
8111 * lynx-low.c (lynx_request_interrupt): Use the first thread's
8112 process instead of the current thread's.
8113 * remote-utils.c (input_interrupt): Don't check if there's no
8114 current thread.
8115 * server.c (gdb_read_memory, gdb_write_memory): If setting the
8116 current thread to the general thread fails, error out.
8117 (handle_qxfer_auxv, handle_qxfer_libraries)
8118 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
8119 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
8120 (handle_query): Check if there's a thread selected instead of
8121 checking whether there's any thread in the thread list.
8122 (handle_qxfer_threads, handle_qxfer_btrace)
8123 (handle_qxfer_btrace_conf): Don't error out early if there's no
8124 thread in the thread list.
8125 (handle_v_cont, myresume): Don't set the current thread to the
8126 continue thread.
8127 (process_serial_event) <Hg handling>: Also set thread_id if the
8128 previous general thread is still alive.
8129 (process_serial_event) <g/G handling>: If setting the current
8130 thread to the general thread fails, error out.
8131 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
8132 thread's lwp instead of the current thread's.
8133 * target.c (set_desired_thread): If the desired thread was not
8134 found, leave the current thread pointing to NULL. Return an int
8135 (boolean) indicating success.
8136 * target.h (set_desired_thread): Change return type to int.
8137
8138 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
8139
8140 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
8141 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
8142 #includes.
8143 (ps_get_thread_area): New function.
8144
8145 2015-08-19 Gary Benson <gbenson@redhat.com>
8146
8147 * hostio.c (handle_pread): Do not attempt to read more data
8148 than hostio_reply_with_data can fit in a packet.
8149
8150 2015-08-18 Joel Brobecker <brobecker@adacore.com>
8151
8152 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
8153
8154 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
8155
8156 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
8157
8158 2015-08-06 Pedro Alves <palves@redhat.com>
8159
8160 * tracepoint.c (expr_eval_result): Now an int.
8161
8162 2015-08-06 Pedro Alves <palves@redhat.com>
8163
8164 * gdbthread.h (struct regcache): Forward declare.
8165 (struct thread_info) <regcache_data>: Now a struct regcache
8166 pointer.
8167 * inferiors.c (inferior_regcache_data)
8168 (set_inferior_regcache_data): Now work with struct regcache
8169 pointers.
8170 * inferiors.h (struct regcache): Forward declare.
8171 (inferior_regcache_data, set_inferior_regcache_data): Now work
8172 with struct regcache pointers.
8173 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
8174 (free_register_cache_thread): Remove struct regcache pointer
8175 casts.
8176
8177 2015-08-06 Pedro Alves <palves@redhat.com>
8178
8179 * server.c (captured_main): On error, print the exception message
8180 to stderr, and if run_once is set, throw a quit.
8181
8182 2015-08-06 Pedro Alves <palves@redhat.com>
8183
8184 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
8185 the current thread.
8186
8187 2015-08-06 Pedro Alves <palves@redhat.com>
8188
8189 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
8190 reading beyond the passed in buffer length.
8191
8192 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
8193
8194 * tracepoint.c (symbol_list) <required>: Remove.
8195
8196 2015-08-06 Pedro Alves <palves@redhat.com>
8197
8198 * linux-low.c (handle_extended_wait): Set the fork child's suspend
8199 count if stopping and suspending threads.
8200 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
8201 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
8202 (linux_detach): Complete an ongoing step-over.
8203 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
8204 throughout.
8205 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
8206 (linux_wait_1): If passing a signal to the inferior after
8207 finishing a step-over, unsuspend and re-resume all lwps. If we
8208 see a single-step event but the thread should be continuing, don't
8209 pass the trap to gdb.
8210 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
8211 internal_error instead of gdb_assert.
8212 (enqueue_pending_signal): New function.
8213 (check_ptrace_stopped_lwp_gone): Add debug output.
8214 (start_step_over): Use internal_error instead of gdb_assert.
8215 (complete_ongoing_step_over): New function.
8216 (linux_resume_one_thread): Don't resume a suspended thread.
8217 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
8218 it stepping.
8219
8220 2015-08-06 Pedro Alves <palves@redhat.com>
8221
8222 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
8223 (linux_thread_alive): Use lwp_is_marked_dead.
8224 (extended_event_reported): Delete.
8225 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
8226 instead of extended_event_reported.
8227 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
8228 as well.
8229 (lwp_is_marked_dead): New function.
8230 (lwp_running): Use lwp_is_marked_dead.
8231 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
8232 comment.
8233
8234 2015-08-06 Pedro Alves <palves@redhat.com>
8235
8236 * linux-low.c (linux_wait_1): Move fork event output out of the
8237 !report_to_gdb check. Pass event_child->waitstatus to
8238 target_waitstatus_to_string instead of ourstatus.
8239
8240 2015-08-04 Yao Qi <yao.qi@linaro.org>
8241
8242 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
8243 if current_thread is 32 bit.
8244
8245 2015-08-04 Yao Qi <yao.qi@linaro.org>
8246
8247 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
8248 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
8249 * server.c (extended_protocol): Remove "static".
8250 * server.h (extended_protocol): Declare it.
8251
8252 2015-08-04 Yao Qi <yao.qi@linaro.org>
8253
8254 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
8255 both aarch64 and aarch32.
8256 (aarch64_set_pc): Likewise.
8257
8258 2015-08-04 Yao Qi <yao.qi@linaro.org>
8259
8260 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
8261 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
8262 arm-with-neon.xml to srv_xmlfiles.
8263 * linux-aarch64-low.c: Include linux-aarch32-low.h.
8264 (is_64bit_tdesc): New function.
8265 (aarch64_linux_read_description): New function.
8266 (aarch64_arch_setup): Call aarch64_linux_read_description.
8267 (regs_info): Rename to regs_info_aarch64.
8268 (aarch64_regs_info): Return right regs_info.
8269 (initialize_low_arch): Call initialize_low_arch_aarch32.
8270
8271 2015-08-04 Yao Qi <yao.qi@linaro.org>
8272
8273 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
8274 * linux-aarch32-low.c: New file.
8275 * linux-aarch32-low.h: New file.
8276 * linux-arm-low.c (arm_fill_gregset): Move it to
8277 linux-aarch32-low.c.
8278 (arm_store_gregset): Likewise.
8279 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
8280 (arm_store_vfpregset): Call arm_store_vfpregset_num.
8281 (arm_arch_setup): Check if PTRACE_GETREGSET works.
8282 (regs_info): Rename to regs_info_arm.
8283 (arm_regs_info): Return regs_info_aarch32 if
8284 have_ptrace_getregset is 1 and target description is
8285 arm_with_neon or arm_with_vfpv3.
8286 (initialize_low_arch): Don't call init_registers_arm_with_neon.
8287 Call initialize_low_arch_aarch32 instead.
8288
8289 2015-08-04 Yao Qi <yao.qi@linaro.org>
8290
8291 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
8292 * linux-low.c: ... here.
8293 * linux-low.h (have_ptrace_getregset): Declare it.
8294
8295 2015-08-04 Pedro Alves <palves@redhat.com>
8296
8297 * thread-db.c (struct thread_db): Use new typedefs.
8298 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
8299 CHK calls.
8300 (disable_thread_event_reporting): Cast result of dlsym to
8301 destination function pointer type.
8302 (thread_db_mourn): Use td_ta_delete_ftype.
8303
8304 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
8305
8306 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
8307 arch variant.
8308 (CDX_BREAKPOINT): Define for R2.
8309 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
8310 (the_low_target): Add comments.
8311
8312 2015-07-30 Yao Qi <yao.qi@linaro.org>
8313
8314 * linux-arm-low.c (arm_hwcap): Remove it.
8315 (arm_read_description): New local variable arm_hwcap. Don't
8316 set arm_hwcap to zero.
8317
8318 2015-07-30 Yao Qi <yao.qi@linaro.org>
8319
8320 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
8321 Use regcache->tdesc instead.
8322 (arm_store_wmmxregset): Likewise.
8323 (arm_fill_vfpregset): Likewise.
8324 (arm_store_vfpregset): Likewise.
8325
8326 2015-07-30 Yao Qi <yao.qi@linaro.org>
8327
8328 * linux-arm-low.c: Include arch/arm.h.
8329 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
8330 (arm_store_gregset): Likewise.
8331
8332 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
8333
8334 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
8335 ptrace's 4th parameter.
8336
8337 2015-07-27 Yao Qi <yao.qi@linaro.org>
8338
8339 * configure.srv (case aarch64*-*-linux*): Don't set
8340 srv_linux_usrregs.
8341
8342 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
8343
8344 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
8345 sys/ptrace.h.
8346 * linux-arm-low.c: Likewise.
8347 * linux-cris-low.c: Likewise.
8348 * linux-crisv32-low.c: Likewise.
8349 * linux-low.c: Likewise.
8350 * linux-m68k-low.c: Likewise.
8351 * linux-mips-low.c: Likewise.
8352 * linux-nios2-low.c: Likewise.
8353 * linux-s390-low.c: Likewise.
8354 * linux-sparc-low.c: Likewise.
8355 * linux-tic6x-low.c: Likewise.
8356 * linux-tile-low.c: Likewise.
8357 * linux-x86-low.c: Likewise.
8358
8359 2015-07-24 Pedro Alves <palves@redhat.com>
8360
8361 * config.in: Regenerate.
8362 * configure: Regenerate.
8363
8364 2015-07-24 Pedro Alves <palves@redhat.com>
8365
8366 * acinclude.m4: Include ../ptrace.m4.
8367 * configure.ac: Call GDB_AC_PTRACE.
8368 * config.in, configure: Regenerate.
8369
8370 2015-07-24 Yao Qi <yao.qi@linaro.org>
8371
8372 * linux-low.c (linux_create_inferior): Remove setting to
8373 proc->priv->new_inferior.
8374 (linux_attach): Likewise.
8375 (linux_low_filter_event): Likewise.
8376 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
8377
8378 2015-07-24 Yao Qi <yao.qi@linaro.org>
8379
8380 * linux-low.c (linux_arch_setup): New function.
8381 (linux_low_filter_event): If proc->tdesc is NULL and
8382 proc->attached is true, call the_low_target.arch_setup.
8383 Otherwise, keep status pending, and return.
8384 (linux_resume_one_lwp_throw): Don't call get_pc if
8385 thread->while_stepping isn't NULL. Don't call
8386 get_thread_regcache if proc->tdesc is NULL.
8387 (need_step_over_p): Return 0 if proc->tdesc is NULL.
8388 (linux_target_ops): Install arch_setup.
8389 * server.c (start_inferior): Call the_target->arch_setup.
8390 * target.h (struct target_ops) <arch_setup>: New field.
8391 (target_arch_setup): New marco.
8392 * lynx-low.c (lynx_target_ops): Update.
8393 * nto-low.c (nto_target_ops): Update.
8394 * spu-low.c (spu_target_ops): Update.
8395 * win32-low.c (win32_target_ops): Update.
8396
8397 2015-07-24 Yao Qi <yao.qi@linaro.org>
8398
8399 * linux-low.c (linux_add_process): Don't set
8400 proc->priv->new_inferior.
8401 (linux_create_inferior): Set proc->priv->new_inferior to 1.
8402 (linux_attach): Likewise.
8403
8404 2015-07-24 Yao Qi <yao.qi@linaro.org>
8405
8406 * server.c (start_inferior): Code refactor.
8407
8408 2015-07-24 Yao Qi <yao.qi@linaro.org>
8409
8410 * server.c (process_serial_event): Set general_thread.
8411
8412 2015-07-21 Yao Qi <yao.qi@linaro.org>
8413
8414 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
8415 aarch64_linux_get_debug_reg_capacity.
8416
8417 2015-07-17 Yao Qi <yao.qi@linaro.org>
8418
8419 * Makefile.in (aarch64-linux-hw-point.o): New rule.
8420 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
8421 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
8422 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
8423 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
8424 (AARCH64_HWP_ALIGNMENT): Likewise.
8425 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
8426 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
8427 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
8428 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
8429 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
8430 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
8431 (struct aarch64_debug_reg_state): Likewise.
8432 (struct arch_lwp_info): Likewise.
8433 (aarch64_align_watchpoint): Likewise.
8434 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
8435 (aarch64_watchpoint_length): Likewise.
8436 (aarch64_point_encode_ctrl_reg): Likewise
8437 (aarch64_point_is_aligned): Likewise.
8438 (aarch64_align_watchpoint): Likewise.
8439 (aarch64_linux_set_debug_regs):
8440 (aarch64_dr_state_insert_one_point): Likewise.
8441 (aarch64_dr_state_remove_one_point): Likewise.
8442 (aarch64_handle_breakpoint): Likewise.
8443 (aarch64_handle_aligned_watchpoint): Likewise.
8444 (aarch64_handle_unaligned_watchpoint): Likewise.
8445 (aarch64_handle_watchpoint): Likewise.
8446
8447 2015-07-17 Yao Qi <yao.qi@linaro.org>
8448
8449 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
8450 and don't aarch64_get_debug_reg_state. All callers update.
8451 (aarch64_handle_aligned_watchpoint): Likewise.
8452 (aarch64_handle_unaligned_watchpoint): Likewise.
8453 (aarch64_handle_watchpoint): Likewise.
8454 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
8455 (aarch64_remove_point): Likewise.
8456
8457 2015-07-17 Yao Qi <yao.qi@linaro.org>
8458
8459 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
8460 debug_printf.
8461 (aarch64_handle_unaligned_watchpoint): Likewise.
8462
8463 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8464
8465 Revert the previous 3 commits:
8466 Move gdb_regex* to common/
8467 Move linux_find_memory_regions_full & co.
8468 gdbserver build-id attribute generator
8469
8470 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
8471 Jan Kratochvil <jan.kratochvil@redhat.com>
8472
8473 gdbserver build-id attribute generator.
8474 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
8475 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
8476 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
8477 (find_phdr): New.
8478 (get_dynamic): Use find_pdhr to traverse program headers.
8479 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
8480 (compare_mapping_entry_range, struct find_memory_region_callback_data)
8481 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
8482 (get_hex_build_id): New.
8483 (linux_qxfer_libraries_svr4): Add optional build-id attribute
8484 to reply XML document.
8485
8486 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
8487 Jan Kratochvil <jan.kratochvil@redhat.com>
8488
8489 * target.c: Include target/target-utils.h and fcntl.h.
8490 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
8491 (target_fileio_read_stralloc): New functions.
8492
8493 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8494
8495 * Makefile.in (OBS): Add gdb_regex.o.
8496 (gdb_regex.o): New.
8497 * config.in: Rebuilt.
8498 * configure: Rebuilt.
8499
8500 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
8501 Jan Kratochvil <jan.kratochvil@redhat.com>
8502
8503 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
8504 * Makefile.in (OBS): Add target-utils.o.
8505 (linux-maps.o, target-utils.o): New.
8506 * configure.srv (srv_linux_obj): Add linux-maps.o.
8507
8508 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
8509
8510 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
8511 function, return 1.
8512 (the_low_target): Install it.
8513
8514 2015-07-14 Pedro Alves <palves@redhat.com>
8515
8516 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
8517 Instead, ignore ECHILD, and throw an error for other errnos.
8518
8519 2015-07-10 Pedro Alves <palves@redhat.com>
8520
8521 * event-loop.c (struct callback_event) <data>: Change type to
8522 gdb_client_data instance instead of gdb_client_data pointer.
8523 (append_callback_event): Adjust.
8524
8525 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
8526
8527 * linux-aarch64-low.c: Add comments for each linux_target_ops
8528 method. Remove comments already covered in target_ops and
8529 linux_target_ops definitions.
8530 (the_low_target): Add comments for each unimplemented method.
8531
8532 2015-07-09 Yao Qi <yao.qi@linaro.org>
8533
8534 * linux-aarch64-low.c (aarch64_regmap): Remove.
8535 (aarch64_usrregs_info): Remove.
8536 (regs_info): Set field usrregs to NULL.
8537
8538 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
8539
8540 * linux-low.c: Include "rsp-low.h"
8541 (linux_low_encode_pt_config, linux_low_encode_raw): New.
8542 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
8543 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
8544 (handle_btrace_enable_pt): New.
8545 (handle_btrace_general_set): Support "pt".
8546 (handle_btrace_conf_general_set): Support "pt:size".
8547
8548 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
8549
8550 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
8551 Z_PACKET_SW_BP.
8552
8553 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
8554
8555 * linux-aarch64-low.c: Remove comment about endianness.
8556 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
8557 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
8558 memcmp.
8559
8560 2015-06-24 Gary Benson <gbenson@redhat.com>
8561
8562 * linux-i386-ipa.c (stdint.h): Do not include.
8563 * lynx-i386-low.c (stdint.h): Likewise.
8564 * lynx-ppc-low.c (stdint.h): Likewise.
8565 * mem-break.c (stdint.h): Likewise.
8566 * thread-db.c (stdint.h): Likewise.
8567 * tracepoint.c (stdint.h): Likewise.
8568 * win32-low.c (stdint.h): Likewise.
8569
8570 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
8571
8572 * server.c (write_qxfer_response): Update call to
8573 remote_escape_output.
8574
8575 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
8576 Jan Kratochvil <jan.kratochvil@redhat.com>
8577
8578 Merge multiple hex conversions.
8579 * gdbreplay.c (tohex): Rename to 'fromhex'.
8580 (logchar): Use fromhex.
8581
8582 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
8583
8584 * server.c (handle_qxfer_libraries): Set `version' attribute for
8585 <library-list>.
8586
8587 2015-06-10 Gary Benson <gbenson@redhat.com>
8588
8589 * target.h (struct target_ops) <multifs_open>: New field.
8590 <multifs_unlink>: Likewise.
8591 <multifs_readlink>: Likewise.
8592 * linux-low.c (nat/linux-namespaces.h): New include.
8593 (linux_target_ops): Initialize the_target->multifs_open,
8594 the_target->multifs_unlink and the_target->multifs_readlink.
8595 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
8596 * hostio.c (hostio_fs_pid): New static variable.
8597 (hostio_handle_new_gdb_connection): New function.
8598 (handle_setfs): Likewise.
8599 (handle_open): Use the_target->multifs_open as appropriate.
8600 (handle_unlink): Use the_target->multifs_unlink as appropriate.
8601 (handle_readlink): Use the_target->multifs_readlink as
8602 appropriate.
8603 (handle_vFile): Handle vFile:setfs packets.
8604 * server.c (handle_query): Call hostio_handle_new_gdb_connection
8605 after target_handle_new_gdb_connection.
8606
8607 2015-06-10 Gary Benson <gbenson@redhat.com>
8608
8609 * configure.ac (AC_CHECK_FUNCS): Add setns.
8610 * config.in: Regenerate.
8611 * configure: Likewise.
8612 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
8613 (linux-namespaces.o): New rule.
8614 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
8615
8616 2015-06-09 Gary Benson <gbenson@redhat.com>
8617
8618 * hostio.c (handle_open): Process mode argument with
8619 fileio_to_host_mode.
8620
8621 2015-06-01 Yao Qi <yao.qi@linaro.org>
8622
8623 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
8624 * linux-x86-low.c: Likewise.
8625
8626 2015-05-28 Don Breazeal <donb@codesourcery.com>
8627
8628 * linux-low.c (handle_extended_wait): Initialize
8629 thread_info.last_resume_kind for new fork children.
8630
8631 2015-05-15 Pedro Alves <palves@redhat.com>
8632
8633 * target.h (target_handle_new_gdb_connection): Rewrite using if
8634 wrapped in do/while.
8635
8636 2015-05-14 Joel Brobecker <brobecker@adacore.com>
8637
8638 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
8639 * configure, config.in: Regenerate.
8640 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
8641 Declare typedef.
8642
8643 2015-05-12 Don Breazeal <donb@codesourcery.com>
8644
8645 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
8646 PTRACE_EVENT_VFORK_DONE.
8647 (linux_low_ptrace_options, extended_event_reported): Add vfork
8648 events.
8649 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
8650 and "vforkdone" for RSP 'T' Stop Reply Packet.
8651 * server.h (report_vfork_events): Declare
8652 global variable.
8653
8654 2015-05-12 Don Breazeal <donb@codesourcery.com>
8655
8656 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
8657 (the_low_target) <new_fork>: Initialize new member.
8658 * linux-arm-low.c (arm_new_fork): New function.
8659 (the_low_target) <new_fork>: Initialize new member.
8660 * linux-low.c (handle_extended_wait): Call new target function
8661 new_fork.
8662 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
8663 * linux-mips-low.c (mips_add_watchpoint): New function
8664 extracted from mips_insert_point.
8665 (the_low_target) <new_fork>: Initialize new member.
8666 (mips_linux_new_fork): New function.
8667 (mips_insert_point): Call mips_add_watchpoint.
8668 * linux-x86-low.c (x86_linux_new_fork): New function.
8669 (the_low_target) <new_fork>: Initialize new member.
8670
8671 2015-05-12 Don Breazeal <donb@codesourcery.com>
8672
8673 * linux-low.c (handle_extended_wait): Implement return value,
8674 rename argument 'event_child' to 'event_lwp', handle
8675 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
8676 (linux_low_ptrace_options): New function.
8677 (linux_low_filter_event): Call linux_low_ptrace_options,
8678 use different argument fo linux_enable_event_reporting,
8679 use return value from handle_extended_wait.
8680 (extended_event_reported): New function.
8681 (linux_wait_1): Call extended_event_reported and set
8682 status to report fork events.
8683 (linux_write_memory): Add pid to debug message.
8684 (reset_lwp_ptrace_options_callback): New function.
8685 (linux_handle_new_gdb_connection): New function.
8686 (linux_target_ops): Initialize new structure member.
8687 * linux-low.h (struct lwp_info) <waitstatus>: New member.
8688 * lynx-low.c: Initialize new structure member.
8689 * remote-utils.c (prepare_resume_reply): Implement stop reason
8690 "fork" for "T" stop message.
8691 * server.c (handle_query): Call handle_new_gdb_connection.
8692 * server.h (report_fork_events): Declare global flag.
8693 * target.h (struct target_ops) <handle_new_gdb_connection>:
8694 New member.
8695 (target_handle_new_gdb_connection): New macro.
8696 * win32-low.c: Initialize new structure member.
8697
8698 2015-05-12 Don Breazeal <donb@codesourcery.com>
8699
8700 * mem-break.c (APPEND_TO_LIST): Define macro.
8701 (clone_agent_expr): New function.
8702 (clone_one_breakpoint): New function.
8703 (clone_all_breakpoints): New function.
8704 * mem-break.h: Declare new functions.
8705
8706 2015-05-12 Don Breazeal <donb@codesourcery.com>
8707
8708 * linux-low.c (linux_supports_fork_events): New function.
8709 (linux_supports_vfork_events): New function.
8710 (linux_target_ops): Initialize new structure members.
8711 (initialize_low): Call linux_check_ptrace_features.
8712 * lynx-low.c (lynx_target_ops): Initialize new structure
8713 members.
8714 * server.c (report_fork_events, report_vfork_events):
8715 New global flags.
8716 (handle_query): Add new features to qSupported packet and
8717 response.
8718 (captured_main): Initialize new global variables.
8719 * target.h (struct target_ops) <supports_fork_events>:
8720 New member.
8721 <supports_vfork_events>: New member.
8722 (target_supports_fork_events): New macro.
8723 (target_supports_vfork_events): New macro.
8724 * win32-low.c (win32_target_ops): Initialize new structure
8725 members.
8726
8727 2015-05-12 Gary Benson <gbenson@redhat.com>
8728
8729 * server.c (handle_qxfer_exec_file): Use current process
8730 if annex is empty.
8731
8732 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
8733
8734 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
8735 Remove HAVE_PTRACE_GETREGS conditionals.
8736 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
8737 instead of PTRACE_GETREGS and PTRACE_SETREGS.
8738
8739 2015-05-08 Yao Qi <yao.qi@linaro.org>
8740
8741 * linux-low.c (linux_supports_conditional_breakpoints): New
8742 function.
8743 (linux_target_ops): Install new target method.
8744 * lynx-low.c (lynx_target_ops): Install NULL hook for
8745 supports_conditional_breakpoints.
8746 * nto-low.c (nto_target_ops): Likewise.
8747 * spu-low.c (spu_target_ops): Likewise.
8748 * win32-low.c (win32_target_ops): Likewise.
8749 * server.c (handle_query): Check
8750 target_supports_conditional_breakpoints.
8751 * target.h (struct target_ops) <supports_conditional_breakpoints>:
8752 New field.
8753 (target_supports_conditional_breakpoints): New macro.
8754
8755 2015-05-06 Pedro Alves <palves@redhat.com>
8756
8757 PR server/18081
8758 * server.c (start_inferior): If the process exits, mourn it.
8759
8760 2015-04-21 Gary Benson <gbenson@redhat.com>
8761
8762 * hostio.c (fileio_open_flags_to_host): Factored out to
8763 fileio_to_host_openflags in common/fileio.c. Single use
8764 updated.
8765
8766 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8767
8768 * linux-xtensa-low.c (xtensa_fill_gregset)
8769 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
8770 XCHAL_HAVE_LOOP.
8771
8772 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
8773
8774 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
8775 (regs_info): Replace usrregs pointer with NULL.
8776
8777 2015-04-17 Gary Benson <gbenson@redhat.com>
8778
8779 * target.h (struct target_ops) <pid_to_exec_file>: New field.
8780 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
8781 * server.c (handle_qxfer_exec_file): New function.
8782 (qxfer_packets): Add exec-file entry.
8783 (handle_query): Report qXfer:exec-file:read as supported packet.
8784
8785 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
8786
8787 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
8788
8789 2015-04-09 Gary Benson <gbenson@redhat.com>
8790
8791 * hostio-errno.c (errno_to_fileio_error): Remove function.
8792 Update caller to use remote_fileio_to_fio_error.
8793
8794 2015-04-09 Yao Qi <yao.qi@linaro.org>
8795
8796 * linux-low.c (linux_insert_point): Call
8797 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
8798 (linux_remove_point): Call remove_memory_breakpoint if type is
8799 raw_bkpt_type_sw.
8800 * linux-x86-low.c (x86_insert_point): Don't call
8801 insert_memory_breakpoint.
8802 (x86_remove_point): Don't call remove_memory_breakpoint.
8803
8804 2015-04-01 Pedro Alves <palves@redhat.com>
8805 Cleber Rosa <crosa@redhat.com>
8806
8807 * server.c (gdbserver_usage): Reorganize and extend the usage
8808 message.
8809
8810 2015-03-24 Pedro Alves <palves@redhat.com>
8811
8812 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
8813 output. Also dump TRAP_TRACE.
8814 (linux_low_filter_event): In debug output, distinguish a
8815 resume_stop SIGSTOP from a delayed SIGSTOP.
8816
8817 2015-03-24 Gary Benson <gbenson@redhat.com>
8818
8819 * linux-x86-low.c (x86_linux_new_thread): Moved to
8820 nat/x86-linux.c.
8821 (x86_linux_prepare_to_resume): Likewise.
8822
8823 2015-03-24 Gary Benson <gbenson@redhat.com>
8824
8825 * Makefile.in (x86-linux-dregs.o): New rule.
8826 * configure.srv: Add x86-linux-dregs.o to relevant targets.
8827 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
8828 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
8829 (x86_linux_dr_get): Likewise.
8830 (x86_linux_dr_set): Likewise.
8831 (update_debug_registers_callback): Likewise.
8832 (x86_linux_dr_set_addr): Likewise.
8833 (x86_linux_dr_get_addr): Likewise.
8834 (x86_linux_dr_set_control): Likewise.
8835 (x86_linux_dr_get_control): Likewise.
8836 (x86_linux_dr_get_status): Likewise.
8837 (x86_linux_update_debug_registers): Likewise.
8838
8839 2015-03-24 Gary Benson <gbenson@redhat.com>
8840
8841 * linux-x86-low.c (x86_linux_update_debug_registers):
8842 New function, factored out from...
8843 (x86_linux_prepare_to_resume): ...this.
8844
8845 2015-03-24 Gary Benson <gbenson@redhat.com>
8846
8847 * linux-x86-low.c (x86_linux_dr_get): Update comments.
8848 (x86_linux_dr_set): Likewise.
8849 (update_debug_registers_callback): Likewise.
8850 (x86_linux_dr_set_addr): Likewise.
8851 (x86_linux_dr_get_addr): Likewise.
8852 (x86_linux_dr_set_control): Likewise.
8853 (x86_linux_dr_get_control): Likewise.
8854 (x86_linux_dr_get_status): Likewise.
8855 (x86_linux_prepare_to_resume): Likewise.
8856
8857 2015-03-24 Gary Benson <gbenson@redhat.com>
8858
8859 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
8860 Use perror_with_name. Pass string through gettext.
8861 (x86_linux_dr_set): Likewise.
8862
8863 2015-03-24 Gary Benson <gbenson@redhat.com>
8864
8865 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
8866 (x86_linux_dr_set_addr): ...this.
8867 (x86_dr_low_get_addr): Rename to...
8868 (x86_linux_dr_get_addr): ...this.
8869 (x86_dr_low_set_control): Rename to...
8870 (x86_linux_dr_set_control): ...this.
8871 (x86_dr_low_get_control): Rename to...
8872 (x86_linux_dr_get_control): ...this.
8873 (x86_dr_low_get_status): Rename to...
8874 (x86_linux_dr_get_status): ...this.
8875 (x86_dr_low): Update with new function names.
8876
8877 2015-03-24 Gary Benson <gbenson@redhat.com>
8878
8879 * Makefile.in (x86-linux.o): New rule.
8880 * configure.srv: Add x86-linux.o to relevant targets.
8881 * linux-low.c (lwp_set_arch_private_info): New function.
8882 (lwp_arch_private_info): Likewise.
8883 * linux-x86-low.c: Include nat/x86-linux.h.
8884 (arch_lwp_info): Removed structure.
8885 (update_debug_registers_callback):
8886 Use lwp_set_debug_registers_changed.
8887 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
8888 and lwp_set_debug_registers_changed.
8889 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
8890
8891 2015-03-24 Gary Benson <gbenson@redhat.com>
8892
8893 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
8894 * linux-arm-low.c (arm_new_thread): Likewise.
8895 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
8896 * linux-mips-low.c (mips_linux_new_thread): Likewise.
8897 * linux-x86-low.c (x86_linux_new_thread): Likewise.
8898 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
8899
8900 2015-03-24 Gary Benson <gbenson@redhat.com>
8901
8902 * linux-low.c (ptid_of_lwp): New function.
8903 (lwp_is_stopped): Likewise.
8904 (lwp_stop_reason): Likewise.
8905 * linux-x86-low.c (update_debug_registers_callback):
8906 Use lwp_is_stopped.
8907 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
8908 lwp_stop_reason.
8909
8910 2015-03-24 Gary Benson <gbenson@redhat.com>
8911
8912 * linux-low.h (linux_stop_lwp): Remove declaration.
8913
8914 2015-03-24 Gary Benson <gbenson@redhat.com>
8915
8916 * linux-low.h: Include nat/linux-nat.h.
8917 * linux-low.c (iterate_over_lwps_args): New structure.
8918 (iterate_over_lwps_filter): New function.
8919 (iterate_over_lwps): Likewise.
8920 * linux-x86-low.c (update_debug_registers_callback):
8921 Update signature to what iterate_over_lwps expects.
8922 Remove PID check that iterate_over_lwps now performs.
8923 (x86_dr_low_set_addr): Use iterate_over_lwps.
8924 (x86_dr_low_set_control): Likewise.
8925
8926 2015-03-24 Gary Benson <gbenson@redhat.com>
8927
8928 * linux-x86-low.c (x86_debug_reg_state): New function.
8929 (x86_linux_prepare_to_resume): Use the above.
8930
8931 2015-03-24 Gary Benson <gbenson@redhat.com>
8932
8933 * linux-low.c (current_lwp_ptid): New function.
8934 * linux-x86-low.c: Include nat/linux-nat.h.
8935 (x86_dr_low_get_addr): Use current_lwp_ptid.
8936 (x86_dr_low_get_control): Likewise.
8937 (x86_dr_low_get_status): Likewise.
8938
8939 2015-03-20 Pedro Alves <palves@redhat.com>
8940
8941 * tracepoint.c (cmd_qtstatus): Make "str" const.
8942
8943 2015-03-20 Pedro Alves <palves@redhat.com>
8944
8945 * server.c (handle_general_set): Make "req_str" const.
8946
8947 2015-03-19 Pedro Alves <palves@redhat.com>
8948
8949 * linux-low.c (linux_resume_one_lwp): Rename to ...
8950 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
8951 instead call perror_with_name.
8952 (check_ptrace_stopped_lwp_gone): New function.
8953 (linux_resume_one_lwp): Reimplement as wrapper around
8954 linux_resume_one_lwp_throw that swallows errors if the LWP is
8955 gone.
8956
8957 2015-03-19 Pedro Alves <palves@redhat.com>
8958
8959 * linux-low.c (count_events_callback, select_event_lwp_callback):
8960 No longer check whether the thread has resume_stop as last resume
8961 kind.
8962
8963 2015-03-19 Pedro Alves <palves@redhat.com>
8964
8965 * linux-low.c (count_events_callback, select_event_lwp_callback):
8966 Use the lwp's status_pending_p field, not the thread's.
8967
8968 2015-03-19 Pedro Alves <palves@redhat.com>
8969
8970 * linux-low.c (select_event_lwp_callback): Update comments to
8971 no longer mention SIGTRAP.
8972
8973 2015-03-18 Gary Benson <gbenson@redhat.com>
8974
8975 * server.c (handle_query): Do not report vFile:fstat as supported.
8976
8977 2015-03-11 Gary Benson <gbenson@redhat.com>
8978
8979 * hostio.c (sys/types.h): New include.
8980 (sys/stat.h): Likewise.
8981 (common-remote-fileio.h): Likewise.
8982 (handle_fstat): New function.
8983 (handle_vFile): Handle vFile:fstat packets.
8984
8985 2015-03-11 Gary Benson <gbenson@redhat.com>
8986
8987 * configure.ac (AC_CHECK_MEMBERS): Add checks for
8988 struct stat.st_blocks and struct stat.st_blksize.
8989 * configure: Regenerate.
8990 * config.in: Likewise.
8991 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
8992 (OBS): Add common-remote-fileio.o.
8993 (common-remote-fileio.o): New rule.
8994
8995 2015-03-09 Pedro Alves <palves@redhat.com>
8996
8997 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
8998 'struct sockaddr' pointer in 'accept' call.
8999
9000 2015-03-09 Pedro Alves <palves@redhat.com>
9001
9002 Revert:
9003 2015-03-07 Pedro Alves <palves@redhat.com>
9004 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
9005 or <winsock2.h> here. Instead include "gdb_socket.h".
9006 (remote_open): Use union gdb_sockaddr_u.
9007 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
9008 or <winsock2.h> here. Instead include "gdb_socket.h".
9009 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
9010 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
9011 or <sys/un.h>.
9012 (init_named_socket, gdb_agent_helper_thread): Use union
9013 gdb_sockaddr_u.
9014
9015 2015-03-07 Pedro Alves <palves@redhat.com>
9016
9017 * configure.ac (build_warnings): Move
9018 -Wdeclaration-after-statement to the C-specific set.
9019 * configure: Regenerate.
9020
9021 2015-03-07 Pedro Alves <palves@redhat.com>
9022
9023 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
9024 or <winsock2.h> here. Instead include "gdb_socket.h".
9025 (remote_open): Use union gdb_sockaddr_u.
9026 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
9027 or <winsock2.h> here. Instead include "gdb_socket.h".
9028 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
9029 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
9030 or <sys/un.h>.
9031 (init_named_socket, gdb_agent_helper_thread): Use union
9032 gdb_sockaddr_u.
9033
9034 2015-03-07 Pedro Alves <palves@redhat.com>
9035
9036 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
9037 instead.
9038
9039 2015-03-06 Yao Qi <yao.qi@linaro.org>
9040
9041 * linux-aarch64-low.c (aarch64_insert_point): Use
9042 show_debug_regs as a boolean.
9043 (aarch64_remove_point): Likewise.
9044
9045 2015-03-05 Pedro Alves <palves@redhat.com>
9046
9047 * lynx-low.c (lynx_target_ops): Install NULL hooks for
9048 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
9049 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
9050 * nto-low.c (nto_target_ops): Likewise.
9051 * spu-low.c (spu_target_ops): Likewise.
9052 * win32-low.c (win32_target_ops): Likewise.
9053
9054 2015-03-04 Pedro Alves <palves@redhat.com>
9055
9056 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
9057 Decide whether a breakpoint triggered based on the SIGTRAP's
9058 siginfo.si_code.
9059 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
9060 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
9061 (linux_low_filter_event): Check for breakpoints before checking
9062 watchpoints.
9063 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
9064 siginfo.si_code.
9065 (linux_stopped_by_sw_breakpoint)
9066 (linux_supports_stopped_by_sw_breakpoint)
9067 (linux_stopped_by_hw_breakpoint)
9068 (linux_supports_stopped_by_hw_breakpoint): New functions.
9069 (linux_target_ops): Install new target methods.
9070
9071 2015-03-04 Pedro Alves <palves@redhat.com>
9072
9073 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
9074 * server.c (swbreak_feature, hwbreak_feature): New globals.
9075 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
9076 (captured_main): Clear swbreak_feature and hwbreak_feature.
9077 * server.h (swbreak_feature, hwbreak_feature): Declare.
9078 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
9079 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
9080 supports_stopped_by_hw_breakpoint>: New fields.
9081 (target_supports_stopped_by_sw_breakpoint)
9082 (target_stopped_by_sw_breakpoint)
9083 (target_supports_stopped_by_hw_breakpoint)
9084 (target_stopped_by_hw_breakpoint): Declare.
9085
9086 2015-03-04 Pedro Alves <palves@redhat.com>
9087
9088 enum lwp_stop_reason -> enum target_stop_reason
9089 * linux-low.c (check_stopped_by_breakpoint): Adjust.
9090 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
9091 (linux_wait_1, stuck_in_jump_pad_callback)
9092 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
9093 (linux_stopped_by_watchpoint):
9094 * linux-low.h (enum lwp_stop_reason): Delete.
9095 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
9096 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
9097
9098 2015-03-04 Yao Qi <yao.qi@linaro.org>
9099
9100 * Makefile.in (SFILES): Add linux-aarch64-low.c.
9101
9102 2015-03-03 Gary Benson <gbenson@redhat.com>
9103
9104 * hostio.c (handle_vFile): Fix prefix lengths.
9105
9106 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
9107
9108 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
9109 ptr_bits.
9110
9111 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
9112
9113 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
9114 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
9115 (clean): Add "rm -f" for above C files.
9116 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
9117 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
9118 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
9119 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
9120 * linux-s390-low.c (HWCAP_S390_VX): New macro.
9121 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
9122 (init_registers_s390x_vx_linux64)
9123 (init_registers_s390x_tevx_linux64)
9124 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
9125 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
9126 declarations.
9127 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
9128 (s390_store_vxrs_high): New functions.
9129 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
9130 NT_S390_VXRS_HIGH.
9131 (s390_arch_setup): Add logic for selecting one of the new target
9132 descriptions. Activate the new vector regsets if applicable.
9133 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
9134 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
9135 and init_registers_s390x_tevx_linux64.
9136
9137 2015-03-01 Pedro Alves <palves@redhat.com>
9138
9139 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
9140 parameter.
9141
9142 2015-02-27 Pedro Alves <palves@redhat.com>
9143
9144 * linux-x86-low.c (u_debugreg_offset): New function.
9145 (x86_linux_dr_get, x86_linux_dr_set): Use it.
9146
9147 2015-02-27 Pedro Alves <palves@redhat.com>
9148
9149 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
9150 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
9151 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
9152 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
9153 (ps_lsetfpregs, ps_getpid)
9154 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
9155 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
9156 (ps_lsetxregs, ps_plog): Declare.
9157
9158 2015-02-27 Pedro Alves <palves@redhat.com>
9159
9160 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
9161 IP_AGENT_EXPORT_FUNC.
9162 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
9163 IP_AGENT_EXPORT_FUNC.
9164 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
9165 (IP_AGENT_EXPORT): Delete.
9166 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9167 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
9168 (gdb_trampoline_buffer_error, collecting, gdb_collect)
9169 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
9170 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
9171 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
9172 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
9173 (traceframe_read_count, traceframe_write_count)
9174 (traceframes_created, trace_state_variables, get_raw_reg)
9175 (get_trace_state_variable_value, set_trace_state_variable_value)
9176 (ust_loaded, helper_thread_id, cmd_buf): Use
9177 IPA_SYM_EXPORTED_NAME.
9178 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
9179 (tracepoints) Use IP_AGENT_EXPORT_VAR.
9180 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
9181 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
9182 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
9183 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
9184 EXTERN_C_PUSH/EXTERN_C_POP.
9185 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
9186 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
9187 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
9188 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
9189 (traceframe_write_count, traceframe_read_count)
9190 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
9191 (about_to_request_buffer_space, get_trace_state_variable_value)
9192 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
9193 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
9194 EXTERN_C_PUSH/EXTERN_C_POP.
9195 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
9196 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
9197 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
9198 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
9199 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9200 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
9201 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
9202 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
9203 Define.
9204 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
9205 (IP_AGENT_EXPORT_VAR_DECL): Define.
9206 (tracing): Declare.
9207 (gdb_agent_get_raw_reg): Declare.
9208
9209 2015-02-27 Tom Tromey <tromey@redhat.com>
9210 Pedro Alves <palves@redhat.com>
9211
9212 Rename symbols whose names are reserved C++ keywords throughout.
9213
9214 2015-02-27 Pedro Alves <palves@redhat.com>
9215
9216 * Makefile.in (COMPILER): New, get it from autoconf.
9217 (CXX): Get from autoconf instead.
9218 (COMPILE.pre): Use COMPILER.
9219 (CC-LD): Rename to ...
9220 (CC_LD): ... this. Use COMPILER.
9221 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
9222 (CXX_FOR_TARGET): Default to g++ instead of gcc.
9223 * acinclude.m4: Include build-with-cxx.m4.
9224 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
9225 Disable -Werror by default if building in C++ mode.
9226 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
9227 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
9228 the C++ compiler. Save/restore CXXFLAGS too.
9229 * configure: Regenerate.
9230
9231 2015-02-27 Pedro Alves <palves@redhat.com>
9232
9233 * acinclude.m4: Include libiberty.m4.
9234 * configure.ac: Call libiberty_INIT.
9235 * config.in, configure: Regenerate.
9236
9237 2015-02-26 Pedro Alves <palves@redhat.com>
9238
9239 * linux-low.c (linux_wait_1): When incrementing the PC past a
9240 program breakpoint always use the_low_target.breakpoint_len as
9241 increment, rather than the maximum between that and
9242 the_low_target.decr_pc_after_break.
9243
9244 2015-02-23 Pedro Alves <palves@redhat.com>
9245
9246 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
9247 thread was doing a step-over; always adjust the PC if
9248 we stepped over a permanent breakpoint.
9249 (linux_wait_1): If we stepped over breakpoint that was on top of a
9250 permanent breakpoint, manually advance the PC past it.
9251
9252 2015-02-23 Pedro Alves <palves@redhat.com>
9253
9254 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
9255 modes.
9256 (x86_fill_gregset, x86_store_gregset): Use it when handling
9257 $orig_eax.
9258
9259 2015-02-20 Pedro Alves <palves@redhat.com>
9260
9261 * thread-db.c: Include "nat/linux-procfs.h".
9262 (thread_db_init): Skip listing new threads if the kernel supports
9263 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
9264
9265 2015-02-20 Pedro Alves <palves@redhat.com>
9266
9267 * linux-low.c (status_pending_p_callback): Use ptid_match.
9268
9269 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
9270
9271 PR breakpoints/16812
9272 * linux-low.c (wstatus_maybe_breakpoint): Remove.
9273 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
9274 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
9275
9276 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
9277
9278 PR breakpoints/15956
9279 * tracepoint.c (cmd_qtinit): Add check for current_thread.
9280
9281 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
9282
9283 * linux-low.c (linux_low_btrace_conf): Print size.
9284 * server.c (handle_btrace_conf_general_set): New.
9285 (hanle_general_set): Call handle_btrace_conf_general_set.
9286 (handle_query): Report Qbtrace-conf:bts:size as supported.
9287
9288 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
9289
9290 * linux-low.c (linux_low_enable_btrace): Update parameters.
9291 (linux_low_btrace_conf): New.
9292 (linux_target_ops)<to_btrace_conf>: Initialize.
9293 * server.c (current_btrace_conf): New.
9294 (handle_btrace_enable): Rename to ...
9295 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
9296 to target_enable_btrace. Update comment. Update users.
9297 (handle_qxfer_btrace_conf): New.
9298 (qxfer_packets): Add btrace-conf entry.
9299 (handle_query): Report qXfer:btrace-conf:read as supported packet.
9300 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
9301 (target_ops)<read_btrace_conf>: New.
9302 (target_enable_btrace): Update parameters.
9303 (target_read_btrace_conf): New.
9304
9305 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
9306
9307 * server.c (handle_btrace_general_set): Remove call to
9308 target_supports_btrace.
9309 (supported_btrace_packets): New.
9310 (handle_query): Call supported_btrace_packets.
9311 * target.h: include btrace-common.h.
9312 (btrace_target_info): Removed.
9313 (supports_btrace, target_supports_btrace): Update parameters.
9314
9315 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
9316
9317 * Makefile.in (SFILES): Add common/btrace-common.c.
9318 (OBS): Add common/btrace-common.o.
9319 (btrace-common.o): Add build rules.
9320 * linux-low: Include btrace-common.h.
9321 (linux_low_read_btrace): Use struct btrace_data. Call
9322 btrace_data_init and btrace_data_fini.
9323
9324 2015-02-06 Pedro Alves <palves@redhat.com>
9325
9326 * thread-db.c (find_new_threads_callback): Add debug output.
9327
9328 2015-02-04 Pedro Alves <palves@redhat.com>
9329
9330 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
9331 (resume_stopped_resumed_lwps): New function.
9332 (linux_wait_for_event_filtered): Use it.
9333
9334 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
9335
9336 * Makefile.in (SFILES): Add linux-personality.c.
9337 (linux-personality.o): New rule.
9338 * configure.srv (srv_linux_obj): Add linux-personality.o to the
9339 list of objects to be built.
9340 * linux-low.c: Include nat/linux-personality.h.
9341 (linux_create_inferior): Remove code to disable address space
9342 randomization (moved to ../nat/linux-personality.c). Create
9343 cleanup to disable address space randomization.
9344
9345 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
9346
9347 * Makefile.in (posix-strerror.o): New rule.
9348 (mingw-strerror.o): Likewise.
9349 * configure: Regenerated.
9350 * configure.ac: Source file ../common/common.host. Initialize new
9351 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
9352
9353 2015-01-14 Yao Qi <yao@codesourcery.com>
9354
9355 * Makefile.in (SFILES): Add nat/ppc-linux.c.
9356 (ppc-linux.o): New rule.
9357 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
9358 * configure.ac: AC_CHECK_FUNCS(getauxval).
9359 * config.in: Re-generated.
9360 * configure: Re-generated.
9361 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
9362 ppc64_64bit_inferior_p
9363
9364 2015-01-14 Yao Qi <yao@codesourcery.com>
9365
9366 * linux-ppc-low.c: Include "nat/ppc-linux.h".
9367 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
9368 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
9369 (PT_ORIG_R3, PT_TRAP): Likewise.
9370 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
9371 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
9372 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
9373
9374 2015-01-10 Joel Brobecker <brobecker@adacore.com>
9375
9376 * i387-fp.c (i387_cache_to_xsave): In look over
9377 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
9378 zmmh_low_space field by use of zmmh_high_space.
9379
9380 2015-01-09 Pedro Alves <palves@redhat.com>
9381
9382 * linux-low.c (step_over_bkpt): Move higher up in the file.
9383 (handle_extended_wait): Don't store the stop_pc here.
9384 (get_stop_pc): Adjust comments and rename to ...
9385 (check_stopped_by_breakpoint): ... this. Record whether the LWP
9386 stopped for a software breakpoint or hardware breakpoint.
9387 (thread_still_has_status_pending_p): New function.
9388 (status_pending_p_callback): Use
9389 thread_still_has_status_pending_p. If the event is no longer
9390 interesting, resume the LWP.
9391 (handle_tracepoints): Add assert.
9392 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
9393 (wstatus_maybe_breakpoint): New function.
9394 (cancel_breakpoint): Delete function.
9395 (check_stopped_by_watchpoint): New function, factored out from
9396 linux_low_filter_event.
9397 (lp_status_maybe_breakpoint): Delete function.
9398 (linux_low_filter_event): Remove filter_ptid argument.
9399 Leave thread group exits pending here. Store the LWP's stop PC.
9400 Always leave events pending.
9401 (linux_wait_for_event_filtered): Pull all events out of the
9402 kernel, and leave them all pending.
9403 (count_events_callback, select_event_lwp_callback): Consider all
9404 events.
9405 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
9406 (select_event_lwp): Only give preference to the stepping LWP in
9407 all-stop mode. Adjust comments.
9408 (ignore_event): New function.
9409 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
9410 references to cancel_breakpoints. Adjust to renames. Also give
9411 equal priority to all LWPs that have had events in non-stop mode.
9412 If reporting a software breakpoint event, unadjust the LWP's PC.
9413 (linux_wait): If linux_wait_1 returned an ignored event, retry.
9414 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
9415 Adjust.
9416 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
9417 (resume_status_pending_p): Use thread_still_has_status_pending_p.
9418 (linux_stopped_by_watchpoint): Adjust.
9419 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
9420 * linux-low.h (enum lwp_stop_reason): New.
9421 (struct lwp_info) <stop_pc>: Adjust comment.
9422 <stopped_by_watchpoint>: Delete field.
9423 <stop_reason>: New field.
9424 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
9425 * mem-break.c (software_breakpoint_inserted_here)
9426 (hardware_breakpoint_inserted_here): New function.
9427 * mem-break.h (software_breakpoint_inserted_here)
9428 (hardware_breakpoint_inserted_here): Declare.
9429 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
9430 (cancel_breakpoints): Delete.
9431 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
9432 (upload_fast_traceframes): Remove references to
9433 cancel_breakpoints.
9434
9435 2015-01-09 Pedro Alves <palves@redhat.com>
9436
9437 * thread-db.c (find_new_threads_callback): Ignore thread if the
9438 kernel thread ID is -1.
9439
9440 2015-01-09 Pedro Alves <palves@redhat.com>
9441
9442 * linux-low.c (linux_attach_fail_reason_string): Move to
9443 nat/linux-ptrace.c, and rename.
9444 (linux_attach_lwp): Update comment.
9445 (attach_proc_task_lwp_callback): New function.
9446 (linux_attach): Adjust to rename and use
9447 linux_proc_attach_tgid_threads.
9448 (linux_attach_fail_reason_string): Delete declaration.
9449
9450 2015-01-01 Joel Brobecker <brobecker@adacore.com>
9451
9452 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
9453 * server.c (gdbserver_version): Likewise.
9454
9455 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
9456
9457 * remote-utils.c: Include ctype.h.
9458 (input_interrupt): Explicitly handle the case when the char
9459 received is the NUL byte. Improve the printing of non-ASCII
9460 characters.
9461
9462 2014-12-16 Joel Brobecker <brobecker@adacore.com>
9463
9464 * linux-low.c (linux_low_filter_event): Update call to
9465 linux_enable_event_reporting following the addition of
9466 a new parameter to that function.
9467
9468 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
9469
9470 PR server/17457
9471 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
9472 (AARCH64_FPCR_REGNO): Likewise.
9473 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
9474 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
9475 (aarch64_store_fpregset): Likewise.
9476
9477 2014-12-15 Joel Brobecker <brobecker@adacore.com>
9478
9479 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
9480 Remove FIXME comment about assumption about N.
9481
9482 2014-12-13 Joel Brobecker <brobecker@adacore.com>
9483
9484 * configure.ac: If large-file support is disabled in GDBserver,
9485 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
9486 * configure: Regenerate.
9487
9488 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9489
9490 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
9491 warning upon ENODATA from ptrace.
9492 * linux-s390-low.c (s390_store_tdb): New.
9493 (s390_regsets): Add regset for NT_S390_TDB.
9494
9495 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9496
9497 * linux-low.c (regsets_store_inferior_registers): Skip regsets
9498 without a fill_function.
9499 * linux-s390-low.c (s390_fill_last_break): Remove.
9500 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
9501 (s390_arch_setup): Use regset's size instead of fill_function for
9502 loop end condition.
9503
9504 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9505
9506 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
9507 the regset's store function when ptrace returned an error.
9508 * regcache.c (get_thread_regcache): Invalidate register cache
9509 before fetching inferior's registers.
9510
9511 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9512
9513 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
9514 while-loop as for-loop.
9515 (regsets_store_inferior_registers): Likewise.
9516
9517 2014-11-28 Yao Qi <yao@codesourcery.com>
9518
9519 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
9520 * config.in, configure: Re-generate.
9521 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
9522 is defined.
9523
9524 2014-11-21 Yao Qi <yao@codesourcery.com>
9525
9526 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
9527 (AC_CHECK_HEADERS): Remove malloc.h.
9528 * configure: Re-generated.
9529 * config.in: Re-generated.
9530 * server.h: Don't include alloca.h and malloc.h.
9531 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
9532 Don't include malloc.h.
9533
9534 2014-11-17 Joel Brobecker <brobecker@adacore.com>
9535
9536 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
9537 corresponding ERRNO check in same block.
9538
9539 2014-11-12 Pedro Alves <palves@redhat.com>
9540
9541 * server.c (cont_thread): Update comment.
9542 (start_inferior, attach_inferior): No longer clear cont_thread.
9543 (handle_v_cont): No longer set cont_thread.
9544 (captured_main): Clear cont_thread each time a GDB connects.
9545
9546 2014-11-12 Pedro Alves <palves@redhat.com>
9547
9548 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
9549 thread, and don't resume all threads if the Hc thread has exited.
9550
9551 2014-11-12 Pedro Alves <palves@redhat.com>
9552
9553 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
9554 the process group instead of to a specific LWP.
9555
9556 2014-10-15 Pedro Alves <palves@redhat.com>
9557
9558 PR server/17487
9559 * win32-arm-low.c (arm_set_thread_context): Remove current_event
9560 parameter.
9561 (arm_set_thread_context): Delete.
9562 (the_low_target): Adjust.
9563 * win32-i386-low.c (debug_registers_changed)
9564 (debug_registers_used): Delete.
9565 (update_debug_registers_callback): New function.
9566 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
9567 needing to update their debug registers.
9568 (win32_get_current_dr): New function.
9569 (x86_dr_low_get_addr, x86_dr_low_get_control)
9570 (x86_dr_low_get_status): Fetch the debug register from the thread
9571 record's context.
9572 (i386_initial_stuff): Adjust.
9573 (i386_get_thread_context): Remove current_event parameter. Don't
9574 clear debug_registers_changed nor copy DR values to
9575 debug_reg_state.
9576 (i386_set_thread_context): Delete.
9577 (i386_prepare_to_resume): New function.
9578 (i386_thread_added): Mark the thread as needing to update irs
9579 debug registers.
9580 (the_low_target): Remove i386_set_thread_context and install
9581 i386_prepare_to_resume.
9582 * win32-low.c (win32_get_thread_context): Adjust.
9583 (win32_set_thread_context): Use SetThreadContext
9584 directly.
9585 (win32_prepare_to_resume): New function.
9586 (win32_require_context): New function, factored out from ...
9587 (thread_rec): ... this.
9588 (continue_one_thread): Call win32_prepare_to_resume on each thread
9589 we're about to continue.
9590 (win32_resume): Call win32_prepare_to_resume on the event thread.
9591 * win32-low.h (struct win32_thread_info)
9592 <debug_registers_changed>: New field.
9593 (struct win32_target_ops): Change prototype of set_thread_context,
9594 delete set_thread_context and add prepare_to_resume.
9595 (win32_require_context): New declaration.
9596
9597 2014-10-08 Gary Benson <gbenson@redhat.com>
9598
9599 * server.h: Do not include common-exceptions.h.
9600
9601 2014-10-08 Gary Benson <gbenson@redhat.com>
9602
9603 * server.h: Do not include cleanups.h.
9604
9605 2014-09-30 James Hogan <james.hogan@imgtec.com>
9606
9607 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
9608 mips64-dsp-linux.c.
9609
9610 2014-09-23 Yao Qi <yao@codesourcery.com>
9611
9612 * linux-low.c (lp_status_maybe_breakpoint): New function.
9613 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
9614 (count_events_callback): Likewise.
9615 (select_event_lwp_callback): Likewise.
9616 (cancel_breakpoints_callback): Likewise.
9617
9618 2014-09-19 Don Breazeal <donb@codesourcery.com>
9619
9620 * linux-low.c (handle_extended_wait): Call
9621 linux_ptrace_get_extended_event.
9622 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
9623 linux_is_extended_waitstatus.
9624
9625 2014-09-16 Joel Brobecker <brobecker@adacore.com>
9626
9627 * Makefile.in (CPPFLAGS): Define.
9628 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
9629 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
9630
9631 2014-09-16 Gary Benson <gbenson@redhat.com>
9632
9633 * inferiors.h (current_inferior): Renamed as...
9634 (current_thread): New variable. All uses updated.
9635 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
9636 (maybe_move_out_of_jump_pad): Likewise.
9637 (cancel_breakpoint): Likewise.
9638 (linux_low_filter_event): Likewise.
9639 (wait_for_sigstop): Likewise.
9640 (linux_resume_one_lwp): Likewise.
9641 (need_step_over_p): Likewise.
9642 (start_step_over): Likewise.
9643 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
9644 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
9645 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
9646 and save_inferior as saved_thread.
9647 * regcache.c (get_thread_regcache): Renamed saved_inferior as
9648 saved_thread.
9649 (regcache_invalidate_thread): Likewise.
9650 * remote-utils.c (prepare_resume_reply): Likewise.
9651 * thread-db.c (thread_db_get_tls_address): Likewise.
9652 (disable_thread_event_reporting): Likewise.
9653 (remove_thread_event_breakpoints): Likewise.
9654 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
9655 as saved_thread.
9656 * target.h (set_desired_inferior): Renamed as...
9657 (set_desired_thread): New declaration. All uses updated.
9658 * server.c (myresume): Updated comment to reference thread instead
9659 of inferior.
9660 (handle_serial_event): Likewise.
9661 (handle_target_event): Likewise.
9662
9663 2014-09-12 Tom Tromey <tromey@redhat.com>
9664 Gary Benson <gbenson@redhat.com>
9665
9666 * regcache.h: Include common-regcache.h.
9667 (regcache_read_pc): Don't declare.
9668 * regcache.c (get_thread_regcache_for_ptid): New function.
9669
9670 2014-09-11 Tom Tromey <tromey@redhat.com>
9671 Gary Benson <gbenson@redhat.com>
9672
9673 * symbol.c: New file.
9674 * Makefile.in (SFILES): Add symbol.c.
9675 (OBS): Add symbol.o.
9676
9677 2014-09-11 Gary Benson <gbenson@redhat.com>
9678
9679 * target.c (target_stop_ptid, target_continue_ptid): New
9680 functions.
9681
9682 2014-09-11 Tom Tromey <tromey@redhat.com>
9683 Gary Benson <gbenson@redhat.com>
9684
9685 * target.h: Include target/target.h.
9686 * target.c (target_read_memory, target_read_uint32)
9687 (target_write_memory): New functions.
9688
9689 2014-09-11 Gary Benson <gbenson@redhat.com>
9690
9691 * server.h (debug_hw_points): Don't declare.
9692 * server.c (debug_hw_points): Don't define. Replace all uses
9693 with show_debug_regs.
9694 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
9695 all uses with show_debug_regs.
9696
9697 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
9698
9699 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
9700 endianness into account.
9701 (ppc_supply_ptrace_register): Likewise.
9702
9703 2014-09-03 James Hogan <james.hogan@imgtec.com>
9704
9705 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
9706 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
9707
9708 2014-09-03 Gary Benson <gbenson@redhat.com>
9709
9710 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
9711 ALL_DEBUG_ADDRESS_REGISTERS.
9712
9713 2014-09-02 Gary Benson <gbenson@redhat.com>
9714
9715 * i386-low.h: Renamed as...
9716 * x86-low.h: New file. All type, function and variable name
9717 prefixes changed from "i386_" to "x86_". All references updated.
9718 * i386-low.c: Renamed as...
9719 * x86-low.c: New file. All type, function and variable name
9720 prefixes changed from "i386_" to "x86_". All references updated.
9721
9722 2014-09-02 Gary Benson <gbenson@redhat.com>
9723
9724 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
9725 (x86_linux_new_thread): Likewise.
9726
9727 2014-08-29 Gary Benson <gbenson@redhat.com>
9728
9729 * server.h (setjmp.h): Do not include.
9730 (toplevel): Do not declare.
9731 (common-exceptions.h): Include.
9732 (cleanups.h): Likewise.
9733 * server.c (toplevel): Do not define.
9734 (exit_code): New static global.
9735 (detach_or_kill_for_exit_cleanup): New function.
9736 (main): New function. Original main renamed to...
9737 (captured_main): New function.
9738 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
9739
9740 2014-08-29 Gary Benson <gbenson@redhat.com>
9741
9742 * Makefile.in (SFILES): Add common/common-exceptions.c.
9743 (OBS): Add common-exceptions.o.
9744 (common-exceptions.o): New rule.
9745 * utils.c (prepare_to_throw_exception): New function.
9746
9747 2014-08-29 Gary Benson <gbenson@redhat.com>
9748
9749 * config.in: Regenerate.
9750 * configure: Likewise.
9751
9752 2014-08-29 Gary Benson <gbenson@redhat.com>
9753
9754 * Makefile.in (SFILES): Add common/cleanups.c.
9755 (OBS): cleanups.o.
9756 (cleanups.o): New rule.
9757
9758 2014-08-29 Gary Benson <gbenson@redhat.com>
9759
9760 * utils.c (internal_vwarning): New function.
9761
9762 2014-08-28 Gary Benson <gbenson@redhat.com>
9763
9764 * utils.h (fatal): Remove declaration.
9765 * utils.c (fatal): Remove function.
9766
9767 2014-08-28 Gary Benson <gbenson@redhat.com>
9768
9769 * tracepoint.c (gdb_agent_init): Replace fatal with
9770 perror_with_name.
9771 (initialize_tracepoint): Likewise.
9772
9773 2014-08-28 Gary Benson <gbenson@redhat.com>
9774
9775 * remote-utils.c (remote_prepare): Replace fatal with error.
9776
9777 2014-08-28 Gary Benson <gbenson@redhat.com>
9778
9779 * linux-low.c (linux_async): Replace fatal with warning.
9780 Tidy up and return.
9781 (linux_start_non_stop): Return -1 if linux_async failed.
9782
9783 2014-08-28 Gary Benson <gbenson@redhat.com>
9784
9785 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
9786 gdb_assert.
9787 (i386_dr_low_get_addr): Remove vague comment.
9788 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
9789 gdb_assert.
9790
9791 2014-08-28 Gary Benson <gbenson@redhat.com>
9792
9793 * inferiors.c (get_thread_process): Replace check with gdb_assert.
9794 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
9795 internal_error.
9796 (linux_resume_one_lwp): Likewise.
9797 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
9798 gdb_assert.
9799 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
9800 with internal_error.
9801 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
9802 (init_register_cache): Replace fatal with gdb_assert_not_reached.
9803 (find_register_by_name): Replace fatal with internal_error.
9804 (find_regno): Likewise.
9805 * tdesc.c (init_target_desc): Replace check with gdb_assert.
9806 * thread-db.c (thread_db_create_event): Likewise.
9807 (thread_db_load_search): Likewise.
9808 (try_thread_db_load_1): Likewise.
9809 * tracepoint.c (get_jump_space_head): Replace fatal with
9810 internal_error.
9811 (claim_trampoline_space): Likewise.
9812 (have_fast_tracepoint_trampoline_buffer): Likewise.
9813 (cmd_qtstart): Likewise.
9814 (stop_tracing): Likewise.
9815 (fast_tracepoint_collecting): Likewise.
9816 (target_malloc): Likewise.
9817 (download_tracepoint): Likewise.
9818 (download_trace_state_variables): Replace check with gdb_assert.
9819 (upload_fast_traceframes): Replace fatal with internal_error.
9820
9821 2014-08-19 Tom Tromey <tromey@redhat.com>
9822 Gary Benson <gbenson@redhat.com>
9823
9824 * Makefile.in (SFILES): Add common/common-debug.c.
9825 (OBS): Add common-debug.o.
9826 (common-debug.o): New rule.
9827 * debug.h (debug_printf): Don't declare.
9828 * debug.c (debug_printf): Renamed and rewritten as...
9829 (debug_vprintf): New function.
9830
9831 2014-08-19 Gary Benson <gbenson@redhat.com>
9832
9833 * utils.h: Do not include print-utils.h.
9834
9835 2014-08-19 Tom Tromey <tromey@redhat.com>
9836 Gary Benson <gbenson@redhat.com>
9837
9838 * server.h: Add static assertion.
9839 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
9840
9841 2014-08-19 Tom Tromey <tromey@redhat.com>
9842 Gary Benson <gbenson@redhat.com>
9843
9844 * Makefile.in (SFILES): Add common/errors.c.
9845 (OBS): Add errors.o.
9846 (IPA_OBS): Add errors-ipa.o.
9847 (errors.o): New rule.
9848 (errors-ipa.o): Likewise.
9849 * utils.h (perror_with_name, error, warning): Don't declare.
9850 * utils.c (warning): Renamed and rewritten as...
9851 (vwarning): New function.
9852 (error): Renamed and rewritten as...
9853 (verror): New function.
9854 (internal_error): Renamed and rewritten as...
9855 (internal_verror): New function.
9856
9857 2014-08-07 Gary Benson <gbenson@redhat.com>
9858
9859 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
9860 * configure: Regenerate.
9861 * config.in: Likewise.
9862 * server.h: Do not include errno.h.
9863 * event-loop.c: Likewise.
9864 * hostio-errno.c: Likewise.
9865 * linux-low.c: Likewise.
9866 * remote-utils.c: Likewise.
9867 * spu-low.c: Likewise.
9868 * utils.c: Likewise.
9869 * gdbreplay.c: Unconditionally include errno.h.
9870
9871 2014-08-07 Gary Benson <gbenson@redhat.com>
9872
9873 * server.h: Do not include string.h.
9874 * event-loop.c: Likewise.
9875 * linux-low.c: Likewise.
9876 * regcache.c: Likewise.
9877 * remote-utils.c: Likewise.
9878 * spu-low.c: Likewise.
9879 * utils.c: Likewise.
9880
9881 2014-08-07 Gary Benson <gbenson@redhat.com>
9882
9883 * server.h: Do not include gdb_assert.h.
9884
9885 2014-08-07 Gary Benson <gbenson@redhat.com>
9886
9887 * server.h: Do not include common-utils.h.
9888
9889 2014-08-07 Gary Benson <gbenson@redhat.com>
9890
9891 * server.h: Do not include ptid.h.
9892 * notif.h: Likewise.
9893
9894 2014-08-07 Gary Benson <gbenson@redhat.com>
9895
9896 * server.h: Do not include gdb_locale.h.
9897
9898 2014-08-07 Gary Benson <gbenson@redhat.com>
9899
9900 * server.h: Do not include gdb/signals.h.
9901 * win32-low.c: Likewise.
9902
9903 2014-08-07 Gary Benson <gbenson@redhat.com>
9904
9905 * server.h: Do not include pathmax.h.
9906
9907 2014-08-07 Gary Benson <gbenson@redhat.com>
9908
9909 * server.h: Do not include libiberty.h.
9910 * linux-bfin-low.c: Likewise.
9911
9912 2014-08-07 Gary Benson <gbenson@redhat.com>
9913
9914 * server.h: Do not include ansidecl.h.
9915
9916 2014-08-07 Gary Benson <gbenson@redhat.com>
9917
9918 * linux-x86-low.c: Do not include stddef.h.
9919 * lynx-ppc-low.c: Likewise.
9920 * tracepoint.c: Likewise.
9921
9922 2014-08-07 Gary Benson <gbenson@redhat.com>
9923
9924 * server.h: Do not include stdarg.h.
9925 * nto-low.c: Likewise.
9926
9927 2014-08-07 Gary Benson <gbenson@redhat.com>
9928
9929 * server.h: Do not include stdlib.h.
9930 * inferiors.c: Likewise.
9931 * linux-low.c: Likewise.
9932 * regcache.c: Likewise.
9933 * spu-low.c: Likewise.
9934 * tracepoint.c: Likewise.
9935 * utils.c: Likewise.
9936
9937 2014-08-07 Gary Benson <gbenson@redhat.com>
9938
9939 * server.h: Do not include stdio.h.
9940 * linux-low.c: Likewise.
9941 * remote-utils.c: Likewise.
9942 * spu-low.c: Likewise.
9943 * utils.c: Likewise.
9944 * wincecompat.c: Likewise.
9945
9946 2014-08-06 Gary Benson <gbenson@redhat.com>
9947
9948 * regcache.c (init_register_cache): Move conditionals inside if.
9949
9950 2014-08-06 Gary Benson <gbenson@redhat.com>
9951
9952 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
9953
9954 2014-07-31 Gary Benson <gbenson@redhat.com>
9955
9956 * ax.h: Do not include server.h.
9957 * gdbthread.h: Likewise.
9958 * lynx-low.h: Likewise.
9959 * notif.h: Likewise.
9960
9961 2014-07-30 Gary Benson <gbenson@redhat.com>
9962
9963 * server.h: Include common-defs.h.
9964 Do not include config.h or build-gnulib-gdbserver/config.h.
9965
9966 2014-07-30 Gary Benson <gbenson@redhat.com>
9967
9968 * hostio-errno.c: Move server.h to top of includes list.
9969 * inferiors.c: Likewise.
9970 * linux-x86-low.c: Likewise.
9971 * notif.c: Include server.h.
9972
9973 2014-07-24 Tom Tromey <tromey@redhat.com>
9974 Gary Benson <gbenson@redhat.com>
9975
9976 * server.h (CORE_ADDR): Now unsigned.
9977
9978 2014-07-16 Pedro Alves <palves@redhat.com>
9979
9980 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
9981
9982 2014-07-15 Pedro Alves <palves@redhat.com>
9983
9984 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
9985 copy.
9986
9987 2014-07-11 Pedro Alves <palves@redhat.com>
9988
9989 * linux-low.c (kill_wait_lwp): New function, based on
9990 kill_one_lwp_callback, but use my_waitpid directly.
9991 (kill_one_lwp_callback, linux_kill): Use it.
9992
9993 2014-06-23 Pedro Alves <palves@redhat.com>
9994
9995 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
9996 before setting DR0..DR3.
9997
9998 2014-06-20 Gary Benson <gbenson@redhat.com>
9999
10000 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
10001 * configure: Regenerated.
10002 * config.in: Likewise.
10003
10004 2014-06-20 Gary Benson <gbenson@redhat.com>
10005
10006 * Makefile.in (SFILES): Update locations for files moved
10007 from common to nat.
10008 (object file files): Reordered.
10009
10010 2014-06-20 Gary Benson <gbenson@redhat.com>
10011
10012 * i386-low.h (i386_dr_low_can_set_addr): Removed.
10013 (i386_dr_low_set_addr): Likewise.
10014 (i386_dr_low_get_addr): Likewise.
10015 (i386_dr_low_can_set_control): Likewise.
10016 (i386_dr_low_set_control): Likewise.
10017 (i386_dr_low_get_control): Likewise.
10018 (i386_dr_low_get_status): Likewise.
10019 (i386_get_debug_register_length): Likewise.
10020 * linux-x86-low.c (i386_dr_low_set_addr):
10021 Changed signature. Made static.
10022 (i386_dr_low_get_addr): Likewise.
10023 (i386_dr_low_set_control): Likewise.
10024 (i386_dr_low_get_control): Likewise.
10025 (i386_dr_low_get_status): Likewise.
10026 (i386_dr_low): New global variable.
10027 * win32-i386-low.c (i386_dr_low_set_addr):
10028 Changed signature. Made static.
10029 (i386_dr_low_get_addr): Likewise.
10030 (i386_dr_low_set_control): Likewise.
10031 (i386_dr_low_get_control): Likewise.
10032 (i386_dr_low_get_status): Likewise.
10033 (i386_dr_low): New global variable.
10034
10035 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
10036
10037 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
10038 * Makefile.in (AR, AR_FLAGS): Define.
10039 * configure: Regenerate.
10040
10041 2014-06-19 Gary Benson <gbenson@redhat.com>
10042
10043 * Makefile.in (i386-dregs.o): New rule.
10044 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
10045 * i386-low.c (target.h): Remove include.
10046 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
10047 (DR_CONTROL_SHIFT): Likewise.
10048 (DR_CONTROL_SIZE): Likewise.
10049 (DR_RW_EXECUTE): Likewise.
10050 (DR_RW_WRITE): Likewise.
10051 (DR_RW_READ): Likewise.
10052 (DR_RW_IORW): Likewise.
10053 (DR_LEN_1): Likewise.
10054 (DR_LEN_2): Likewise.
10055 (DR_LEN_4): Likewise.
10056 (DR_LEN_8): Likewise.
10057 (DR_LOCAL_ENABLE_SHIFT): Likewise.
10058 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
10059 (DR_ENABLE_SIZE): Likewise.
10060 (DR_LOCAL_SLOWDOWN): Likewise.
10061 (DR_GLOBAL_SLOWDOWN): Likewise.
10062 (DR_CONTROL_RESERVED): Likewise.
10063 (I386_DR_CONTROL_MASK): Likewise.
10064 (I386_DR_VACANT): Likewise.
10065 (I386_DR_LOCAL_ENABLE): Likewise.
10066 (I386_DR_GLOBAL_ENABLE): Likewise.
10067 (I386_DR_DISABLE): Likewise.
10068 (I386_DR_SET_RW_LEN): Likewise.
10069 (I386_DR_GET_RW_LEN): Likewise.
10070 (I386_DR_WATCH_HIT): Likewise.
10071 (i386_wp_op_t): Likewise.
10072 (i386_show_dr): Likewise.
10073 (i386_length_and_rw_bits): Likewise.
10074 (i386_insert_aligned_watchpoint): Likewise.
10075 (i386_remove_aligned_watchpoint): Likewise.
10076 (i386_handle_nonaligned_watchpoint): Likewise.
10077 i386_update_inferior_debug_regs(): Likewise.
10078 (i386_dr_insert_watchpoint): Likewise.
10079 (i386_dr_remove_watchpoint): Likewise.
10080 (i386_dr_region_ok_for_watchpoint): Likewise.
10081 (i386_dr_stopped_data_address): Likewise.
10082 (i386_dr_stopped_by_watchpoint): Likewise.
10083
10084 2014-06-19 Gary Benson <gbenson@redhat.com>
10085
10086 * i386-low.c (i386_dr_show): Renamed to
10087 i386_show_dr and made static. All uses updated.
10088 (i386_dr_length_and_rw_bits): Renamed to
10089 i386_length_and_rw_bits and made static.
10090 All uses updated.
10091 (i386_dr_insert_aligned_watchpoint): Renamed to
10092 i386_insert_aligned_watchpoint and made static.
10093 All uses updated.
10094 (i386_dr_remove_aligned_watchpoint): Renamed to
10095 i386_remove_aligned_watchpoint and made static.
10096 All uses updated.
10097 (i386_dr_update_inferior_debug_regs): Renamed to
10098 i386_update_inferior_debug_regs and made static.
10099 All uses updated.
10100
10101 2014-06-18 Gary Benson <gbenson@redhat.com>
10102
10103 * i386-low.h (i386_dr_low_can_set_addr): New macro.
10104 (i386_dr_low_can_set_control): Likewise.
10105 (i386_get_debug_register_length): Likewise.
10106 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
10107 (i386_dr_low_can_set_control): Likewise.
10108 (i386_get_debug_register_length): Likewise.
10109
10110 2014-06-17 Gary Benson <gbenson@redhat.com>
10111
10112 * i386-low.h (i386-dregs.h): New include.
10113 (DR_FIRSTADDR): Now in i386-dregs.h.
10114 (DR_LASTADDR): Likewise.
10115 (DR_NADDR): Likewise.
10116 (DR_STATUS): Likewise.
10117 (DR_CONTROL): Likewise.
10118 (i386_debug_reg_state): Likewise.
10119 (i386_dr_insert_watchpoint): Likewise.
10120 (i386_dr_remove_watchpoint): Likewise.
10121 (i386_dr_region_ok_for_watchpoint): Likewise.
10122 (i386_dr_stopped_data_address): Likewise.
10123 (i386_dr_stopped_by_watchpoint): Likewise.
10124 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
10125
10126 2014-06-18 Gary Benson <gbenson@redhat.com>
10127
10128 * i386-low.h (i386_low_insert_watchpoint): Renamed to
10129 i386_dr_insert_watchpoint.
10130 (i386_low_remove_watchpoint): Renamed to
10131 i386_dr_remove_watchpoint.
10132 (i386_low_region_ok_for_watchpoint): Renamed to
10133 i386_dr_region_ok_for_watchpoint.
10134 (i386_low_stopped_data_address): Renamed to
10135 i386_dr_stopped_data_address.
10136 (i386_low_stopped_by_watchpoint): Renamed to
10137 i386_dr_stopped_by_watchpoint.
10138 * i386-low.c (i386_show_dr): Renamed to
10139 i386_dr_show and made nonstatic. All uses updated.
10140 (i386_length_and_rw_bits): Renamed to
10141 i386_dr_length_and_rw_bits and made nonstatic.
10142 All uses updated.
10143 (i386_insert_aligned_watchpoint): Renamed to
10144 i386_dr_insert_aligned_watchpoint and made nonstatic.
10145 All uses updated.
10146 (i386_remove_aligned_watchpoint): Renamed to
10147 i386_dr_remove_aligned_watchpoint and made nonstatic.
10148 All uses updated.
10149 (i386_update_inferior_debug_regs): Renamed to
10150 i386_dr_update_inferior_debug_regs and made nonstatic.
10151 All uses updated.
10152 (i386_low_insert_watchpoint): Renamed to
10153 i386_dr_insert_watchpoint. All uses updated.
10154 (i386_low_remove_watchpoint): Renamed to
10155 i386_dr_remove_watchpoint. All uses updated.
10156 (i386_low_region_ok_for_watchpoint): Renamed to
10157 i386_dr_region_ok_for_watchpoint. All uses updated.
10158 (i386_low_stopped_data_address): Renamed to
10159 i386_dr_stopped_data_address. All uses updated.
10160 (i386_low_stopped_by_watchpoint): Renamed to
10161 i386_dr_stopped_by_watchpoint. All uses updated.
10162
10163 2014-06-18 Gary Benson <gbenson@redhat.com>
10164
10165 * i386-low.c (i386_dr_low_can_set_addr): New macro.
10166 (i386_dr_low_can_set_control): Likewise.
10167 (i386_insert_aligned_watchpoint): New check.
10168
10169 2014-06-18 Gary Benson <gbenson@redhat.com>
10170
10171 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
10172 Renamed to state.
10173
10174 2014-06-18 Gary Benson <gbenson@redhat.com>
10175
10176 * i386-low.c (i386_length_and_rw_bits): Use internal_error
10177 instead of fatal and error.
10178 (i386_handle_nonaligned_watchpoint): Likewise.
10179
10180 2014-06-18 Gary Benson <gbenson@redhat.com>
10181
10182 * i386-low.c (i386_get_debug_register_length): New macro.
10183 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
10184 (i386_show_dr): Use debug_printf instead of fprintf. Use
10185 phex to format values.
10186
10187 2014-06-18 Gary Benson <gbenson@redhat.com>
10188
10189 * i386-low.h: Comment changes.
10190 * i386-low.c: Likewise.
10191
10192 2014-06-18 Gary Benson <gbenson@redhat.com>
10193
10194 * i386-low.c: Whitespace changes.
10195
10196 2014-06-12 Tom Tromey <tromey@redhat.com>
10197
10198 * utils.c (freeargv): Remove.
10199
10200 2014-06-12 Tom Tromey <tromey@redhat.com>
10201
10202 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
10203 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
10204 (parse_debug_format_options): Likewise.
10205 (gdbserver_usage): Likewise.
10206 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
10207 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
10208 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
10209 against libiberty.
10210 ($(LIBGNU)): Depend on libiberty.
10211 (all-lib): Recurse into all subdirs.
10212 (install-only): Invoke "install" target in subdirs.
10213 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
10214 targets.
10215 * configure: Rebuild.
10216 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
10217 for vasprintf, vsnprintf, or gettimeofday.
10218 * configure.srv: Don't add safe-ctype.o or lbasename.o to
10219 srv_tgtobj.
10220
10221 2014-06-05 Joel Brobecker <brobecker@adacore.com>
10222
10223 * development.sh: Delete.
10224 * Makefile.in (config.status): Adjust dependency on development.sh.
10225 * configure.ac: Adjust development.sh source call.
10226 * configure: Regenerate.
10227
10228 2014-06-02 Pedro Alves <palves@redhat.com>
10229
10230 * ax.c (gdb_free_agent_expr): New function.
10231 * ax.h (gdb_free_agent_expr): New declaration.
10232 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
10233 list.
10234 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
10235 static.
10236 (clear_breakpoint_conditions_and_commands): New function.
10237 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
10238 (clear_breakpoint_conditions_and_commands): New declaration.
10239
10240 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
10241
10242 * linux-aarch64-low.c (asm/ptrace.h): Include.
10243
10244 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10245
10246 Fix TLS access for -static -pthread.
10247 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
10248 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
10249 (thread_db_load_search, try_thread_db_load_1): Initialize it.
10250
10251 2014-05-20 Pedro Alves <palves@redhat.com>
10252
10253 * linux-aarch64-low.c (aarch64_insert_point)
10254 (aarch64_remove_point): No longer check whether the type is
10255 supported here. Adjust to new interface.
10256 (the_low_target): Install aarch64_supports_z_point_type as
10257 supports_z_point_type method.
10258 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
10259 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
10260 instead of a Z packet char. Adjust.
10261 (arm_supports_z_point_type): New function.
10262 (arm_insert_point, arm_remove_point): Adjust to new interface.
10263 (the_low_target): Install arm_supports_z_point_type.
10264 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
10265 (cris_insert_point, cris_remove_point): Adjust to new interface.
10266 Don't check whether the type is supported here.
10267 (the_low_target): Install cris_supports_z_point_type.
10268 * linux-low.c (linux_supports_z_point_type): New function.
10269 (linux_insert_point, linux_remove_point): Adjust to new interface.
10270 * linux-low.h (struct linux_target_ops) <insert_point,
10271 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
10272 raw_breakpoint pointer parameter.
10273 <supports_z_point_type>: New method.
10274 * linux-mips-low.c (mips_supports_z_point_type): New function.
10275 (mips_insert_point, mips_remove_point): Adjust to new interface.
10276 Use mips_supports_z_point_type.
10277 (the_low_target): Install mips_supports_z_point_type.
10278 * linux-ppc-low.c (the_low_target): Install NULL as
10279 supports_z_point_type method.
10280 * linux-s390-low.c (the_low_target): Install NULL as
10281 supports_z_point_type method.
10282 * linux-sparc-low.c (the_low_target): Install NULL as
10283 supports_z_point_type method.
10284 * linux-x86-low.c (x86_supports_z_point_type): New function.
10285 (x86_insert_point): Adjust to new insert_point interface. Use
10286 insert_memory_breakpoint. Adjust to new
10287 i386_low_insert_watchpoint interface.
10288 (x86_remove_point): Adjust to remove_point interface. Use
10289 remove_memory_breakpoint. Adjust to new
10290 i386_low_remove_watchpoint interface.
10291 (the_low_target): Install x86_supports_z_point_type.
10292 * lynx-low.c (lynx_target_ops): Install NULL as
10293 supports_z_point_type callback.
10294 * nto-low.c (nto_supports_z_point_type): New.
10295 (nto_insert_point, nto_remove_point): Adjust to new interface.
10296 (nto_target_ops): Install nto_supports_z_point_type.
10297 * mem-break.c: Adjust intro comment.
10298 (struct raw_breakpoint) <raw_type, size>: New fields.
10299 <inserted>: Update comment.
10300 <shlib_disabled>: Delete field.
10301 (enum bkpt_type) <gdb_breakpoint>: Delete value.
10302 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
10303 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
10304 (raw_bkpt_type_to_target_hw_bp_type): New function.
10305 (find_enabled_raw_code_breakpoint_at): New function.
10306 (find_raw_breakpoint_at): New type and size parameters. Use them.
10307 (insert_memory_breakpoint): New function, based off
10308 set_raw_breakpoint_at.
10309 (remove_memory_breakpoint): New function.
10310 (set_raw_breakpoint_at): Reimplement.
10311 (set_breakpoint): New, based on set_breakpoint_at.
10312 (set_breakpoint_at): Reimplement.
10313 (delete_raw_breakpoint): Go through the_target->remove_point
10314 instead of assuming memory breakpoints.
10315 (find_gdb_breakpoint_at): Delete.
10316 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
10317 (find_gdb_breakpoint): New function.
10318 (set_gdb_breakpoint_at): Delete.
10319 (z_type_supported): New function.
10320 (set_gdb_breakpoint_1): New function, loosely based off
10321 set_gdb_breakpoint_at.
10322 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
10323 (delete_gdb_breakpoint_at): Delete.
10324 (delete_gdb_breakpoint_1): New function, loosely based off
10325 delete_gdb_breakpoint_at.
10326 (delete_gdb_breakpoint): New function.
10327 (clear_gdb_breakpoint_conditions): Rename to ...
10328 (clear_breakpoint_conditions): ... this. Don't handle a NULL
10329 breakpoint.
10330 (add_condition_to_breakpoint): Make static.
10331 (add_breakpoint_condition): Take a struct breakpoint pointer
10332 instead of an address. Adjust.
10333 (gdb_condition_true_at_breakpoint): Rename to ...
10334 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
10335 z_type parameter.
10336 (gdb_condition_true_at_breakpoint): Reimplement.
10337 (add_breakpoint_commands): Take a struct breakpoint pointer
10338 instead of an address. Adjust.
10339 (gdb_no_commands_at_breakpoint): Rename to ...
10340 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
10341 parameter. Return true if no breakpoint was found. Change debug
10342 output.
10343 (gdb_no_commands_at_breakpoint): Reimplement.
10344 (run_breakpoint_commands): Rename to ...
10345 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
10346 and change return type to boolean.
10347 (run_breakpoint_commands): New function.
10348 (gdb_breakpoint_here): Also check for Z1 breakpoints.
10349 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
10350 breakpoint. Go through the_target->remove_point instead of
10351 assuming memory breakpoint.
10352 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
10353 software and hardware breakpoints.
10354 (reinsert_raw_breakpoint): Go through the_target->insert_point
10355 instead of assuming memory breakpoint.
10356 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
10357 software and hardware breakpoints.
10358 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
10359 Check both software and hardware breakpoints.
10360 (validate_inserted_breakpoint): Assert the breakpoint is a
10361 software breakpoint. Set the inserted flag to -1 instead of
10362 setting shlib_disabled.
10363 (delete_disabled_breakpoints): Adjust.
10364 (validate_breakpoints): Only validate software breakpoints.
10365 Adjust to inserted flag change.
10366 (check_mem_read, check_mem_write): Skip breakpoint types other
10367 than software breakpoints. Adjust to inserted flag change.
10368 * mem-break.h (enum raw_bkpt_type): New enum.
10369 (raw_breakpoint, struct process_info): Forward declare.
10370 (Z_packet_to_target_hw_bp_type): Delete declaration.
10371 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
10372 (set_gdb_breakpoint, delete_gdb_breakpoint)
10373 (clear_breakpoint_conditions): New declarations.
10374 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
10375 (breakpoint_inserted_here): Update comment.
10376 (add_breakpoint_condition, add_breakpoint_commands): Replace
10377 address parameter with a breakpoint pointer parameter.
10378 (gdb_breakpoint_here): Update comment.
10379 (delete_gdb_breakpoint_at): Delete.
10380 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
10381 * server.c (process_point_options): Take a struct breakpoint
10382 pointer instead of an address. Adjust.
10383 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
10384 delete_gdb_breakpoint.
10385 * spu-low.c (spu_target_ops): Install NULL as
10386 supports_z_point_type method.
10387 * target.h: Include mem-break.h.
10388 (struct target_ops) <prepare_to_access_memory>: Update comment.
10389 <supports_z_point_type>: New field.
10390 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
10391 instead of a char. Also take a raw breakpoint pointer.
10392 * win32-arm-low.c (the_low_target): Install NULL as
10393 supports_z_point_type.
10394 * win32-i386-low.c (i386_supports_z_point_type): New function.
10395 (i386_insert_point, i386_remove_point): Adjust to new interface.
10396 (the_low_target): Install i386_supports_z_point_type.
10397 * win32-low.c (win32_supports_z_point_type): New function.
10398 (win32_insert_point, win32_remove_point): Adjust to new interface.
10399 (win32_target_ops): Install win32_supports_z_point_type.
10400 * win32-low.h (struct win32_target_ops):
10401 <supports_z_point_type>: New method.
10402 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
10403 instead of a char. Also take a raw breakpoint pointer.
10404
10405 2014-05-20 Pedro Alves <palves@redhat.com>
10406
10407 * mem-break.h: Include break-common.h.
10408 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
10409 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
10410 (Z_packet_to_target_hw_bp_type): New declaration.
10411 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
10412 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
10413 (Z_PACKET_ACCESS_WP): Delete macros.
10414 (Z_packet_to_hw_type): Delete function.
10415 * i386-low.h: Don't include break-common.h here.
10416 (Z_packet_to_hw_type): Delete declaration.
10417 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
10418 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
10419 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
10420 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
10421 * linux-aarch64-low.c: Don't include break-common.h here.
10422 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
10423 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
10424 (Z_packet_to_target_hw_bp_type): Delete function.
10425 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
10426 function.
10427 (mips_insert_point, mips_remove_point): Use
10428 Z_packet_to_target_hw_bp_type.
10429
10430 2014-05-20 Pedro Alves <palves@redhat.com>
10431
10432 * linux-aarch64-low.c: Include break-common.h.
10433 (enum target_point_type): Delete.
10434 (Z_packet_to_point_type): Rename to ...
10435 (Z_packet_to_target_hw_bp_type): ... this, and return a
10436 target_hw_bp_type instead.
10437 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
10438 instead of an enum target_point_type.
10439 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
10440 breakpoint type.
10441 (aarch64_dr_state_insert_one_point)
10442 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
10443 (aarch64_handle_aligned_watchpoint)
10444 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
10445 Take an enum target_hw_bp_type instead of an enum
10446 target_point_type.
10447 (aarch64_supports_z_point_type): New function.
10448 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
10449 use Z_packet_to_target_hw_bp_type.
10450
10451 2014-05-20 Joel Brobecker <brobecker@adacore.com>
10452
10453 * configure.ac: Only use -Werror by default when DEVELOPMENT
10454 is true.
10455 * configure: Regenerate.
10456
10457 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
10458
10459 Fix gdbserver qGetTLSAddr for x86_64 -m32.
10460 * linux-x86-low.c (X86_64_USER_REGS): New.
10461 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
10462
10463 2014-04-28 Yao Qi <yao@codesourcery.com>
10464
10465 * Makefile.in (i386-avx512.c): Fix the typo of generated file
10466 name.
10467
10468 2014-04-25 Pedro Alves <palves@redhat.com>
10469
10470 PR server/16255
10471 * linux-low.c (linux_attach_fail_reason_string): New function.
10472 (linux_attach_lwp): Delete.
10473 (linux_attach_lwp_1): Rename to ...
10474 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
10475 argument. Remove "initial" parameter. Return int instead of
10476 void. Don't error or warn here.
10477 (linux_attach): Adjust to call linux_attach_lwp. Call error on
10478 failure to attach to the tgid. Call warning when failing to
10479 attach to an lwp.
10480 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
10481 argument. Remove "initial" parameter. Return int instead of
10482 void. Don't error or warn here.
10483 (linux_attach_fail_reason_string): New declaration.
10484 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
10485 interface change. Use linux_attach_fail_reason_string.
10486
10487 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
10488 Walfred Tedeschi <walfred.tedeschi@intel.com>
10489
10490 * Makefile.in: Added rules to handle new files
10491 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
10492 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
10493 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
10494 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
10495 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
10496 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
10497 x32-avx512-linux.o.
10498 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
10499 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
10500 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
10501 i386/x32-avx512.xml.
10502 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
10503 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
10504 i386/x32-avx512-linux.xml.
10505 * i387-fp.c (num_avx512_k_registers): New constant for number
10506 of K registers.
10507 (num_avx512_zmmh_low_registers): New constant for number of
10508 lower ZMM registers (0-15).
10509 (num_avx512_zmmh_high_registers): New constant for number of
10510 higher ZMM registers (16-31).
10511 (num_avx512_ymmh_registers): New contant for number of higher
10512 YMM registers (ymm16-31 added by avx521 on x86_64).
10513 (num_avx512_xmm_registers): New constant for number of higher
10514 XMM registers (xmm16-31 added by AVX512 on x86_64).
10515 (struct i387_xsave): Add space for AVX512 registers.
10516 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
10517 Add code to handle AVX512 registers.
10518 (i387_xsave_to_cache): Add code to handle AVX512 registers.
10519 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
10520 prototypei from generated file.
10521 (tdesc_amd64_avx512_linux): Likewise.
10522 (init_registers_x32_avx512_linux): Likewise.
10523 (tdesc_x32_avx512_linux): Likewise.
10524 (init_registers_i386_avx512_linux): Likewise.
10525 (tdesc_i386_avx512_linux): Likewise.
10526 (x86_64_regmap): Add AVX512 registers.
10527 (x86_linux_read_description): Add code to handle AVX512 XSTATE
10528 mask.
10529 (initialize_low_arch): Add code to initialize AVX512 registers.
10530
10531 2014-04-23 Pedro Alves <palves@redhat.com>
10532
10533 * mem-break.c (find_gdb_breakpoint_at): Make static.
10534 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
10535
10536 2014-04-23 Pedro Alves <palves@redhat.com>
10537
10538 * i386-low.c: Don't include break-common.h here.
10539 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
10540 prototype to take target_hw_bp_type as argument instead of a Z
10541 packet char.
10542 * i386-low.h: Include break-common.h here.
10543 (Z_packet_to_hw_type): Declare.
10544 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
10545 prototypes.
10546 * linux-x86-low.c (x86_insert_point): Convert the packet number to
10547 a target_hw_bp_type before calling i386_low_insert_watchpoint.
10548 (x86_remove_point): Convert the packet number to a
10549 target_hw_bp_type before calling i386_low_remove_watchpoint.
10550 * win32-i386-low.c (i386_insert_point): Convert the packet number
10551 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
10552 (i386_remove_point): Convert the packet number to a
10553 target_hw_bp_type before calling i386_low_remove_watchpoint.
10554
10555 2014-04-23 Pedro Alves <palves@redhat.com>
10556
10557 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
10558
10559 2014-04-10 Pedro Alves <palves@redhat.com>
10560
10561 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
10562 Check if the condition or command is NULL before checking if the
10563 breakpoint is known. On success, return true.
10564 * mem-break.h (add_breakpoint_condition): Document return.
10565 (add_breakpoint_commands): Add describing comment.
10566 * server.c (skip_to_semicolon): New function.
10567 (process_point_options): Use it.
10568
10569 2014-04-09 Pedro Alves <palves@redhat.com>
10570
10571 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
10572 to lwpid_of.
10573
10574 2014-02-27 Pedro Alves <palves@redhat.com>
10575
10576 PR 12702
10577 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
10578 macros.
10579 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
10580 output.
10581 (last_thread_of_process_p): Take a PID argument instead of a
10582 thread pointer.
10583 (linux_wait_for_lwp): Delete.
10584 (num_lwps, check_zombie_leaders, not_stopped_callback): New
10585 functions.
10586 (linux_low_filter_event): New function, party factored out from
10587 linux_wait_for_event.
10588 (linux_wait_for_event): Rename to ...
10589 (linux_wait_for_event_filtered): ... this. Add new filter ptid
10590 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
10591 sigsuspend. Check for zombie leaders.
10592 (linux_wait_for_event): Reimplement as wrapper around
10593 linux_wait_for_event_filtered.
10594 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
10595 a normal or signal exit is seen, it's the whole process exiting.
10596 (wait_for_sigstop): No longer a for_each_inferior callback.
10597 Rewrite on top of linux_wait_for_event_filtered.
10598 (stop_all_lwps): Call wait_for_sigstop directly.
10599 * server.c (resume, handle_target_event): Handle
10600 TARGET_WAITKIND_NO_RESUMED.
10601
10602 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10603
10604 * win32-low.c (psapi_get_dll_name,
10605 * win32_CreateToolhelp32Snapshot): Delete.
10606 (win32_CreateToolhelp32Snapshot, win32_Module32First)
10607 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
10608 Delete.
10609 (handle_load_dll): Add function description.
10610 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
10611
10612 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10613
10614 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
10615 Add comment.
10616 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
10617 base address when calling win32_add_one_solib.
10618 (handle_load_dll): Delete local variable load_addr.
10619 Remove 0x1000 offset applied to DLL base address when calling
10620 win32_add_one_solib.
10621 (handle_unload_dll): Add comment.
10622
10623 2014-02-26 Joel Brobecker <brobecker@adacore.com>
10624
10625 * win32-low.c (win32_add_all_dlls): Renames
10626 win32_ensure_ntdll_loaded. Rewrite function documentation.
10627 Adjust implementation to always load all DLLs.
10628 Add 0x1000 offset to DLL base address when calling
10629 win32_add_one_solib.
10630 (child_initialization_done): New static global.
10631 (do_initial_child_stuff): Set child_initialization_done to
10632 zero during child initialization, and 1 after. Replace call
10633 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
10634 Add comment.
10635 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
10636 (handle_unload_dll): Add function documentation.
10637 (get_child_debug_event): Ignore load and unload DLL events
10638 during child initialization.
10639
10640 2014-02-20 Doug Evans <dje@google.com>
10641
10642 Remove global all_lwps.
10643 * inferiors.h (ptid_of): Move here from linux-low.h.
10644 (pid_of, lwpid_of): Ditto.
10645 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
10646 parameter is a struct thread_info * now.
10647 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
10648 directly. Pass &all_threads to find_inferior instead of &all_lwps.
10649 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
10650 directly.
10651 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
10652 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
10653 * linux-arm-low.c (update_registers_callback): Update, "entry"
10654 parameter is a struct thread_info * now.
10655 Fetch lwpid from current_inferior directly.
10656 (arm_insert_point): Pass &all_threads to find_inferior instead of
10657 &all_lwps.
10658 (arm_remove_point): Ditto.
10659 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
10660 (arm_prepare_to_resume): Fetch pid from thread.
10661 (arm_read_description): Fetch lwpid from current_inferior directly.
10662 * linux-low.c (all_lwps): Delete.
10663 (delete_lwp): Delete call to remove_inferior.
10664 (handle_extended_wait): Fetch lwpid from thread.
10665 (add_lwp): Don't set lwp->entry.id. Remove call to
10666 add_inferior_to_list.
10667 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
10668 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
10669 (kill_one_lwp_callback): Ditto.
10670 (linux_kill): Don't dereference NULL pointer.
10671 Fetch ptid,lwpid from thread.
10672 (get_detach_signal): Fetch ptid from thread.
10673 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
10674 Simplify call to regcache_invalidate_thread.
10675 (delete_lwp_callback): Update, "entry" parameter is a
10676 struct thread_info * now. Fetch pid from thread.
10677 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
10678 (status_pending_p_callback): Update, "entry" parameter is a
10679 struct thread_info * now. Fetch ptid from thread.
10680 (find_lwp_pid): Update, "entry" parameter is a
10681 struct thread_info * now.
10682 (linux_wait_for_lwp): Fetch pid from thread.
10683 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
10684 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
10685 (enqueue_one_deferred_signal): Fetch lwpid from thread.
10686 (dequeue_one_deferred_signal): Ditto.
10687 (cancel_breakpoint): Fetch ptid from current_inferior.
10688 (linux_wait_for_event): Pass &all_threads to find_inferior,
10689 not &all_lwps. Fetch ptid, lwpid from thread.
10690 (count_events_callback): Update, "entry" parameter is a
10691 struct thread_info * now.
10692 (select_singlestep_lwp_callback): Ditto.
10693 (select_event_lwp_callback): Ditto.
10694 (cancel_breakpoints_callback): Ditto.
10695 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
10696 not &all_lwps.
10697 (select_event_lwp): Ditto. Fetch ptid from event_thread.
10698 (unsuspend_one_lwp): Update, "entry" parameter is a
10699 struct thread_info * now.
10700 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
10701 not &all_lwps.
10702 (linux_stabilize_threads): Ditto. And for for_each_inferior.
10703 Fetch lwpid from thread, not lwp.
10704 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
10705 Pass &all_threads to find_inferior, not &all_lwps.
10706 (send_sigstop): Fetch lwpid from thread, not lwp.
10707 (send_sigstop_callback): Update, "entry" parameter is a
10708 struct thread_info * now.
10709 (suspend_and_send_sigstop_callback): Ditto.
10710 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
10711 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
10712 struct thread_info * now.
10713 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
10714 from thread, lwp.
10715 (lwp_running): Update, "entry" parameter is a
10716 struct thread_info * now.
10717 (stop_all_lwps): Fetch ptid from thread.
10718 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
10719 (linux_resume_one_lwp): Fetch lwpid from thread.
10720 (linux_set_resume_request): Update, "entry" parameter is a
10721 struct thread_info * now. Fetch pid, lwpid from thread.
10722 (resume_status_pending_p): Update, "entry" parameter is a
10723 struct thread_info * now.
10724 (need_step_over_p): Ditto. Fetch lwpid from thread.
10725 (start_step_over): Fetch lwpid from thread.
10726 (linux_resume_one_thread): Update, "entry" parameter is a
10727 struct thread_info * now. Fetch lwpid from thread.
10728 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
10729 (proceed_one_lwp): Update, "entry" parameter is a
10730 struct thread_info * now. Fetch lwpid from thread.
10731 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
10732 struct thread_info * now.
10733 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
10734 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
10735 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
10736 directly.
10737 (regsets_store_inferior_registers): Ditto.
10738 (fetch_register, store_register): Ditto.
10739 (linux_read_memory, linux_write_memory): Ditto.
10740 (linux_request_interrupt): Ditto.
10741 (linux_read_auxv): Ditto.
10742 (linux_xfer_siginfo): Ditto.
10743 (linux_qxfer_spu): Ditto.
10744 (linux_qxfer_libraries_svr4): Ditto.
10745 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
10746 moved to inferiors.h.
10747 (get_lwp): Delete.
10748 (get_thread_lwp): Update.
10749 (struct lwp_info): Delete member "entry". Simplify comment for
10750 member "thread".
10751 (all_lwps): Delete.
10752 * linux-mips-low.c (mips_read_description): Fetch lwpid from
10753 current_inferior directly.
10754 (update_watch_registers_callback): Update, "entry" parameter is a
10755 struct thread_info * now. Fetch pid from thread.
10756 (mips_linux_prepare_to_resume): Fetch ptid from thread.
10757 (mips_insert_point): Fetch lwpid from current_inferior.
10758 Pass &all_threads to find_inferior, not &all_lwps.
10759 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
10760 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
10761 directly.
10762 (mips_stopped_data_address): Ditto.
10763 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
10764 directly.
10765 * linux-tile-low.c (tile_arch_setup): Ditto.
10766 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
10767 (update_debug_registers_callback): Update, "entry" parameter is a
10768 struct thread_info * now. Fetch pid from thread.
10769 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
10770 Pass &all_threads to find_inferior, not &all_lwps.
10771 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
10772 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
10773 Pass &all_threads to find_inferior, not &all_lwps.
10774 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
10775 (i386_dr_low_get_status): Ditto.
10776 (x86_linux_prepare_to_resume): Fetch ptid from thread.
10777 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
10778 (x86_linux_read_description): Ditto.
10779 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
10780
10781 2014-02-20 Doug Evans <dje@google.com>
10782
10783 * inferiors.c (get_first_inferior): Fix buglet.
10784
10785 2014-02-19 Doug Evans <dje@google.com>
10786
10787 * gdbthread.h (add_thread): Change result type to struct thread_info *.
10788 * inferiors.c (add_thread): Change result type to struct thread_info *.
10789 All callers updated.
10790 (add_lwp): Call add_thread here instead of in callers.
10791 All callers updated.
10792 * linux-low.h (get_lwp_thread): Rewrite.
10793 (struct lwp_info): New member "thread".
10794
10795 2014-02-19 Doug Evans <dje@google.com>
10796
10797 * linux-low.c (add_lwp): Change result to struct lwp_info *.
10798 All callers updated.
10799
10800 2014-02-19 Doug Evans <dje@google.com>
10801
10802 * inferiors.c (add_thread): Fix whitespace.
10803
10804 2014-02-19 Doug Evans <dje@google.com>
10805
10806 * dll.c (clear_dlls): Replace accessing list implemention details
10807 with API function.
10808 * gdbthread.h (get_first_thread): Declare.
10809 * inferiors.c (for_each_inferior_with_data): New function.
10810 (get_first_thread): New function.
10811 (find_thread_ptid): Simplify.
10812 (get_first_inferior): New function.
10813 (clear_list): Delete.
10814 (one_inferior_p): New function.
10815 (clear_inferior_list): New function.
10816 (clear_inferiors): Update.
10817 * inferiors.h (for_each_inferior_with_data): Declare.
10818 (clear_inferior_list): Declare.
10819 (one_inferior_p): Declare.
10820 (get_first_inferior): Declare.
10821 * linux-low.c (linux_wait_for_event): Replace accessing list
10822 implemention details with API function.
10823 * server.c (target_running): Ditto.
10824 (accumulate_file_name_length): New function.
10825 (emit_dll_description): New function.
10826 (handle_qxfer_libraries): Replace accessing list implemention
10827 details with API function.
10828 (handle_qxfer_threads_worker): New function.
10829 (handle_qxfer_threads_proper): Replace accessing list implemention
10830 details with API function.
10831 (handle_query): Ditto.
10832 (visit_actioned_threads_callback_ftype): New typedef.
10833 (visit_actioned_threads_data): New struct.
10834 (visit_actioned_threads): Rewrite to be find_inferior callback.
10835 (resume): Call find_inferior.
10836 (handle_status): Replace accessing list implemention
10837 details with API function.
10838 (process_serial_event): Replace accessing list implemention details
10839 with API function.
10840 * target.c (set_desired_inferior): Replace accessing list implemention
10841 details with API function.
10842 * tracepoint.c (same_process_p): New function.
10843 (gdb_agent_about_to_close): Replace accessing list implemention
10844 details with API function.
10845 * win32-low.c (child_delete_thread): Replace accessing list
10846 implemention details with API function.
10847 (match_dll_by_basename): New function.
10848 (dll_is_loaded_by_basename): New function.
10849 (win32_ensure_ntdll_loaded): Replace accessing list implemention
10850 details call to dll_is_loaded_by_basename.
10851
10852 2014-02-19 Doug Evans <dje@google.com>
10853
10854 * dll.h (struct dll_info): Add comment.
10855 * gdbthread.h (struct thread_info): Add comment.
10856 (current_ptid): Simplify.
10857 * inferiors.c (add_process): Update.
10858 (remove_process): Update.
10859 * inferiors.h (struct process_info): Rename member "head" to "entry".
10860 * linux-low.c (delete_lwp): Update.
10861 (add_lwp): Update.
10862 (last_thread_of_process_p): Update.
10863 (kill_one_lwp_callback, linux_kill): Update.
10864 (status_pending_p_callback): Update.
10865 (wait_for_sigstop): Update. Simplify read of ptid.
10866 (start_step_over): Update.
10867 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
10868 (get_lwp_thread): Update.
10869 (struct lwp_info): Rename member "head" to "entry".
10870 * regcache.h (inferior_list_entry): Delete.
10871 * server.c (kill_inferior_callback): Update.
10872 (detach_or_kill_inferior_callback): Update.
10873 (print_started_pid): Update.
10874 (print_attached_pid): Update.
10875 (process_serial_event): Simplify read of ptid.
10876 * thread-db.c (thread_db_create_event): Update.
10877 (thread_db_get_tls_address): Update.
10878 * win32-low.c (current_inferior_ptid): Simplify.
10879
10880 2014-02-19 Tom Tromey <tromey@redhat.com>
10881
10882 * target.h (struct target_ops) <supports_btrace>: Add target_ops
10883 argument.
10884 (target_supports_btrace): Update.
10885
10886 2014-02-14 Yao Qi <yao@codesourcery.com>
10887
10888 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
10889 (rsp-low-ipa.o): New target.
10890
10891 2014-02-12 Tom Tromey <tromey@redhat.com>
10892
10893 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
10894 convert_ascii_to_int.
10895 * regcache.c (registers_to_string): Likewise.
10896 * remote-utils.c (decode_M_packet): Likewise.
10897 * server.c (process_serial_event): Likewise.
10898
10899 2014-02-12 Tom Tromey <tromey@redhat.com>
10900
10901 * server.c (handle_query, handle_v_run): Use hex2bin, not
10902 unhexify.
10903 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
10904
10905 2014-02-12 Tom Tromey <tromey@redhat.com>
10906
10907 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
10908 convert_int_to_ascii.
10909 * regcache.c (registers_to_string, collect_register_as_string):
10910 Likewise.
10911 * remote-utils.c (look_up_one_symbol, relocate_instruction):
10912 Likewise.
10913 * server.c (process_serial_event): Likewise.
10914 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
10915 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
10916
10917 2014-02-12 Tom Tromey <tromey@redhat.com>
10918
10919 * remote-utils.c (look_up_one_symbol, monitor_output): Use
10920 bin2hex, not hexify.
10921 * tracepoint.c (cmd_qtstatus): Likewise.
10922
10923 2014-02-12 Tom Tromey <tromey@redhat.com>
10924
10925 * remote-utils.c (monitor_output): Pass explicit length to
10926 hexify.
10927
10928 2014-02-12 Tom Tromey <tromey@redhat.com>
10929
10930 * tracepoint.c: Include rsp-low.h.
10931 * server.c: Include rsp-low.h.
10932 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
10933 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
10934 declare.
10935 * remote-utils.c: Include rsp-low.h.
10936 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
10937 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
10938 (convert_int_to_ascii, convert_ascii_to_int): Move to
10939 common/rsp-low.c.
10940 * regcache.c: Include rsp-low.h.
10941 * ax.c: Include rsp-low.h.
10942 * Makefile.in (SFILES): Add common/rsp-low.c.
10943 (OBS): Add rsp-low.o.
10944 (rsp-low.o): New target.
10945
10946 2014-02-12 Tom Tromey <tromey@redhat.com>
10947
10948 * utils.h (pulongest, plongest, phex_nz): Don't declare.
10949 Include print-utils.h.
10950 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
10951 (plongest, thirty_two, phex_nz): Remove.
10952 * Makefile.in (SFILES): Add common/print-utils.c.
10953 (OBS): Add print-utils.o.
10954 (print-utils-ipa.o): New target.
10955 (print-utils.o): New target.
10956 (IPA_OBJS): Add print-utils-ipa.o.
10957
10958 2014-02-06 Tom Tromey <tromey@redhat.com>
10959
10960 * Makefile.in (SFILES): Fix indentation.
10961
10962 2014-02-05 Doug Evans <dje@google.com>
10963
10964 * linux-low.c (linux_wait_for_event): Improve comment.
10965 (linux_wait_1): Keep current_inferior in sync with event_child.
10966
10967 2014-01-22 Doug Evans <dje@google.com>
10968
10969 * gdbthread.h (gdb_id_to_thread): Delete, unused.
10970
10971 2014-01-22 Doug Evans <dje@google.com>
10972
10973 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
10974 * configure: Regenerate.
10975 * config.in: Regenerate.
10976 * Makefile.in (SFILES): Add debug.c.
10977 (OBS): Add debug.o.
10978 * debug.c: New file.
10979 * debug.h: New file.
10980 * linux-aarch64-low.c (*): Update all debugging printfs to use
10981 debug_printf instead of fprintf.
10982 * linux-arm-low.c (*): Ditto.
10983 * linux-cris-low.c (*): Ditto.
10984 * linux-crisv32-low.c (*): Ditto.
10985 * linux-m32r-low.c (*): Ditto.
10986 * linux-sparc-low.c (*): Ditto.
10987 * linux-x86.c (*): Ditto.
10988 * linux-low.c (*): Ditto.
10989 (linux_wait_1): Add calls to debug_enter, debug_exit.
10990 (linux_wait): Remove redundant debugging printf.
10991 (stop_all_lwps): Add calls to debug_enter, debug_exit.
10992 (linux_resume, unstop_all_lwps): Ditto.
10993 * mem-break.c (*): Update all debugging printfs to use
10994 debug_printf instead of fprintf.
10995 * remote-utils.c (*): Ditto.
10996 * thread-db.c (*): Ditto.
10997 * server.c #include <ctype.h>, "gdb_vecs.h".
10998 (debug_threads): Moved to debug.c.
10999 (*): Update all debugging printfs to use debug_printf instead of
11000 fprintf.
11001 (start_inferior): Replace call to fflush with call to debug_flush.
11002 (monitor_show_help): Mention set debug-format.
11003 (parse_debug_format_options): New function.
11004 (handle_monitor_command): Handle "monitor set debug-format".
11005 (gdbserver_usage): Mention --debug-format.
11006 (main): Parse --debug-format.
11007 * server.h (debug_threads): Declaration moved to debug.h.
11008 #include "debug.h".
11009 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
11010 trace_debug_1 that uses debug_printf.
11011 (tracepoint_look_up_symbols): Update all debugging printfs to use
11012 debug_printf instead of fprintf.
11013
11014 2014-01-20 Baruch Siach <baruch@tkos.co.il>
11015
11016 * linux-xtensa-low.c: Include asm/ptrace.h instead of
11017 sys/ptrace.h.
11018
11019 2014-01-17 Pedro Alves <palves@redhat.com>
11020
11021 PR build/16445
11022 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
11023 defined after including gdb_proc_service.h.
11024
11025 2014-01-16 Doug Evans <dje@google.com>
11026
11027 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
11028 (match_dll): Use it.
11029
11030 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
11031
11032 * target.h (target_ops) <read_btrace>: Change parameters and
11033 return type to allow error reporting.
11034 * server.c (handle_qxfer_btrace): Support delta reads. Pass
11035 trace reading errors on.
11036 * linux-low.c (linux_low_read_btrace): Pass trace reading
11037 errors on.
11038 (linux_low_disable_btrace): New.
11039
11040 2014-01-15 Doug Evans <dje@google.com>
11041
11042 * inferiors.c (thread_id_to_gdb_id): Delete.
11043 * inferiors.h (thread_id_to_gdb_id): Delete.
11044
11045 2014-01-13 Eli Zaretskii <eliz@gnu.org>
11046
11047 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
11048 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
11049 versions.
11050
11051 2014-01-08 Pedro Alves <palves@redhat.com>
11052
11053 * server.c (handle_status): Don't discard previous queued stop
11054 replies or thread's pending status here.
11055 (main) <disconnection>: Do it here instead.
11056
11057 2014-01-08 Pedro Alves <palves@redhat.com>
11058
11059 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
11060 * server.c (visit_actioned_threads, handle_pending_status): New
11061 function.
11062 (handle_v_cont): Factor out parts to ...
11063 (resume): ... this new function. If in all-stop, and a thread
11064 being resumed has a pending status, report it without actually
11065 resuming.
11066 (myresume): Adjust to use the new 'resume' function.
11067 (clear_pending_status_callback, set_pending_status_callback)
11068 (find_status_pending_thread_callback): New functions.
11069 (handle_status): Handle the case of multiple threads having
11070 interesting statuses to report. Report threads' real last signal
11071 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
11072 with an interesting thread to report the status for, instead of
11073 always reporting the status of the first thread.
11074
11075 2014-01-01 Joel Brobecker <brobecker@adacore.com>
11076
11077 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
11078 * gdbreplay.c (gdbreplay_version): Likewise.
11079
11080 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
11081
11082 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
11083 iov.iov_len with the real length in use.
11084
11085 2013-12-13 Joel Brobecker <brobecker@adacore.com>
11086
11087 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
11088 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
11089 for all targets that use win32-low.c.
11090 * win32-low.c (win32_ensure_ntdll_loaded): New function.
11091 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
11092
11093 2013-12-13 Pedro Alves <palves@redhat.com>
11094
11095 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
11096 if equal to TARGET_WAITKIND_LOADED.
11097 * win32-low.c (cached_status): New static global.
11098 (win32_wait): Add declaration.
11099 (do_initial_child_stuff): Flush all initial pending debug events
11100 up to the initial breakpoint.
11101 (win32_wait): If CACHED_STATUS was set, return that instead
11102 of doing a real wait. Remove the code resuming the execution
11103 of the inferior after receiving a TARGET_WAITKIND_LOADED event
11104 during the initial phase. Also remove the code changing
11105 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
11106 TARGET_WAITKIND_STOPPED.
11107
11108 2013-12-11 Yao Qi <yao@codesourcery.com>
11109
11110 * notif.c (handle_notif_ack): Return 0 if no notification
11111 matches.
11112
11113 2013-11-20 Doug Evans <dje@google.com>
11114
11115 * linux-low.c (linux_set_resume_request): Fix comment.
11116
11117 2013-11-20 Doug Evans <dje@google.com>
11118
11119 * linux-low.c (resume_status_pending_p): Tweak comment.
11120
11121 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
11122
11123 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
11124 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
11125 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
11126 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
11127 (srv_amd64_regobj): Add amd64-mpx.o.
11128 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
11129 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
11130 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
11131 * i387-fp.c (num_pl_bnd_register) Added constant.
11132 (num_pl_bnd_cfg_registers) Added constant.
11133 (struct i387_xsave) Added reserved area and MPX fields.
11134 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
11135 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
11136 function.
11137 (tdesc_i386_mpx_linux): Add MPX amd64 target.
11138 (init_registers_amd64_mpx_linux): Declare new function.
11139 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
11140 (x86_64_regmap): Add MPX registers.
11141 (x86_linux_read_description): Add MPX case.
11142 (initialize_low_arch): Initialize MPX targets.
11143
11144 2013-11-18 Tom Tromey <tromey@redhat.com>
11145
11146 * configure: Rebuild.
11147 * configure.ac: Don't check for stdlib.h.
11148 * gdbreplay.c: Unconditionally include stdlib.h.
11149
11150 2013-11-18 Tom Tromey <tromey@redhat.com>
11151
11152 * config.in: Rebuild.
11153 * configure: Rebuild.
11154 * configure.ac: Don't use AC_HEADER_DIRENT.
11155
11156 2013-11-18 Tom Tromey <tromey@redhat.com>
11157
11158 * server.h: Don't check HAVE_STRING_H.
11159 * gdbreplay.c: Don't check HAVE_STRING_H.
11160 * configure: Rebuild.
11161
11162 2013-11-18 Tom Tromey <tromey@redhat.com>
11163
11164 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
11165 LIBGNU.
11166
11167 2013-11-08 Tom Tromey <tromey@redhat.com>
11168
11169 * configure, config.in: Rebuild.
11170 * configure.ac: Remove unused configury.
11171
11172 2013-11-08 Tom Tromey <tromey@redhat.com>
11173
11174 * acinclude.m4: Include common.m4, codeset.m4.
11175 * configure, config.in: Rebuild.
11176 * configure.ac: Use GDB_AC_COMMON.
11177
11178 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
11179
11180 * linux-s390-low.c (HWCAP_S390_TE): New define.
11181 (s390_arch_setup): Consider the TE field in the HWCAP for
11182 determining 'have_regset_tdb'.
11183
11184 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
11185
11186 PR gdb/16014
11187 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
11188 call to sizeof.
11189
11190 2013-10-02 Pedro Alves <palves@redhat.com>
11191
11192 * server.c (process_serial_event): Don't output "GDBserver
11193 exiting" if GDB is connected through stdio.
11194 * target.c (mywait): Likewise, be silent if GDB is connected
11195 through stdio.
11196
11197 2013-10-01 Joel Brobecker <brobecker@adacore.com>
11198
11199 * lynx-low.c (lynx_add_threads_after_attach): New function.
11200 (lynx_attach): Remove call to add_thread. Add call to
11201 lynx_add_threads_after_attach instead.
11202
11203 2013-09-28 Mike Frysinger <vapier@gentoo.org>
11204
11205 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
11206 * config.in, configure: Regenerated.
11207
11208 2013-09-18 Yao Qi <yao@codesourcery.com>
11209
11210 PR server/15959
11211 * server.c (start_inferior): Clear 'resume_info'.
11212
11213 2013-09-16 Jiong Wang <jiwang@tilera.com>
11214
11215 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
11216 for each register.
11217
11218 2013-09-16 Jiong Wang <jiwang@tilera.com>
11219
11220 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
11221 linux-tile-low.o to srv_tgtobj.
11222
11223 2013-09-16 Will Newton <will.newton@linaro.org>
11224
11225 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
11226 out regs.
11227
11228 2013-09-06 Pedro Alves <palves@redhat.com>
11229
11230 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
11231 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
11232 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
11233 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
11234 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
11235 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
11236
11237 2013-09-06 Pedro Alves <palves@redhat.com>
11238
11239 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
11240 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
11241
11242 2013-09-06 Pedro Alves <palves@redhat.com>
11243
11244 * linux-amd64-ipa.c: Include tracepoint.h.
11245 * linux-i386-ipa.c: Include tracepoint.h.
11246
11247 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
11248
11249 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
11250 (ps_get_thread_area): New function.
11251
11252 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
11253
11254 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
11255 (initialize_low_arch): Call init_registers_crisv32 rather than
11256 init_register_crisv32.
11257
11258 2013-09-05 Pedro Alves <palves@redhat.com>
11259
11260 * server.h (handle_vFile, hostio_last_error_from_errno): Move
11261 to ...
11262 * hostio.h: ... this new file.
11263 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
11264 win32-low.c: Include hostio.h.
11265
11266 2013-09-05 Pedro Alves <palves@redhat.com>
11267
11268 * server.h (gdb_client_data, handler_func, callback_handler_func)
11269 (delete_file_handler, add_file_handler, append_callback_event)
11270 (delete_callback_event, start_event_loop, initialize_event_loop):
11271 Move to event-loop.h and include it.
11272 * event-loop.h: New file.
11273
11274 2013-09-05 Pedro Alves <palves@redhat.com>
11275
11276 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
11277 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
11278 (loaded_dll, unloaded_dll): Move to ...
11279 * dll.h: ... this new file.
11280 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
11281
11282 2013-09-05 Pedro Alves <palves@redhat.com>
11283
11284 * server.h (current_process, get_thread_process, all_processes)
11285 (add_inferior_to_list, for_each_inferior, current_inferior)
11286 (remove_inferior, add_process, remove_process, find_process_pid)
11287 (have_started_inferiors_p, have_attached_inferiors_p)
11288 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
11289 (clear_inferiors, find_inferior, find_inferior_id)
11290 (inferior_target_data, set_inferior_target_data)
11291 (inferior_regcache_data, set_inferior_regcache_data): Move to
11292 inferiors.h, and include it.
11293 * inferiors.h: New file.
11294
11295 2013-09-05 Pedro Alves <palves@redhat.com>
11296
11297 * server.h (struct emit_ops, current_insn_ptr, emit_error):
11298 Move ...
11299 * ax.h: ... here.
11300
11301 2013-09-05 Pedro Alves <palves@redhat.com>
11302
11303 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
11304 tracepoint.h.
11305 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
11306 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
11307 (handle_tracepoint_general_set, handle_tracepoint_query)
11308 (tracepoint_finished_step, tracepoint_was_hit)
11309 (release_while_stepping_state_list, current_traceframe)
11310 (in_readonly_region, traceframe_read_mem)
11311 (fetch_traceframe_registers, traceframe_read_sdata)
11312 (traceframe_read_info, struct fast_tpoint_collect_status)
11313 (fast_tracepoint_collecting, force_unlock_trace_buffer)
11314 (handle_tracepoit_bkpts, initialize_low_tracepoint)
11315 (supply_fast_tracepoint_registers)
11316 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
11317 (ipa_tdesc, claim_trampoline_space)
11318 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
11319 (agent_mem_read, agent_get_trace_state_variable_value)
11320 (agent_set_trace_state_variable_value, agent_tsv_read)
11321 (agent_mem_read_string, get_raw_reg_func_addr)
11322 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
11323 * tracepoint.h: ... this new file.
11324
11325 2013-09-05 Pedro Alves <palves@redhat.com>
11326
11327 * server.h (perror_with_name, error, fatal, warning, paddress)
11328 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
11329 include it.
11330 * utils.h: New file.
11331
11332 2013-09-05 Pedro Alves <palves@redhat.com>
11333
11334 * server.h (remote_debug, noack_mode, transport_is_reliable)
11335 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
11336 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
11337 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
11338 (write_enn, initialize_async_io, enable_async_io)
11339 (disable_async_io, check_remote_input_interrupt_request)
11340 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
11341 (dead_thread_notify, prepare_resume_reply)
11342 (decode_address_to_semicolon, decode_address, decode_m_packet)
11343 (decode_M_packet, decode_X_packet, decode_xfer_write)
11344 (decode_search_memory_packet, unhexify, hexify)
11345 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
11346 (look_up_one_symbol, relocate_instruction)
11347 (monitor_output): Move to remote-utils.h, and include it.
11348 * remote-utils.h: New file.
11349
11350 2013-09-05 Pedro Alves <palves@redhat.com>
11351
11352 * server.h (_): Delete.
11353
11354 2013-09-02 Pedro Alves <palves@redhat.com>
11355
11356 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
11357 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
11358 allocated.
11359 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
11360
11361 2013-09-02 Pierre Muller <muller@sourceware.org>
11362
11363 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
11364 or WriteProcessMemory complete successfully and handle
11365 ERROR_PARTIAL_COPY error.
11366
11367 2013-09-02 Pedro Alves <palves@redhat.com>
11368
11369 * server.c (gdb_read_memory): Return -1 on traceframe memory read
11370 error instead of EIO.
11371
11372 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11373
11374 PR server/15604
11375 * linux-low.c: Include filestuff.h.
11376 (linux_create_inferior) <pid == 0>: Call close_most_fds.
11377 * lynx-low.c: Include filestuff.h.
11378 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
11379 * server.c: Include filestuff.h.
11380 (main): Call notice_open_fds.
11381 * spu-low.c: Include filestuff.h.
11382 (spu_create_inferior) <pid == 0>: Call close_most_fds.
11383
11384 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
11385
11386 * Makefile.in: Explain why ../target and ../nat are not
11387 listed as include file search paths.
11388 (linux-waitpid.o): New object file rule.
11389 * configure.srv (srv_native_linux_obj): New variable.
11390 Replace all occurrences of linux native object files with
11391 $srv_native_linux_obj.
11392 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
11393 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
11394 (linux_enable_event_reporting): Remove declaration.
11395 (my_waitpid): Moved to common/linux-waitpid.c.
11396 (linux_wait_for_event): Pass ptid when calling
11397 linux_enable_event_reporting.
11398 (linux_supports_tracefork_flag): Remove.
11399 (linux_enable_event_reporting): Likewise.
11400 (linux_tracefork_grandchild): Remove.
11401 (STACK_SIZE): Moved to common/linux-ptrace.c.
11402 (linux_tracefork_child): Remove.
11403 (linux_test_for_tracefork): Remove.
11404 (linux_look_up_symbols): Call linux_supports_traceclone.
11405 (initialize_low): Remove call to linux_test_for_tracefork.
11406 * linux-low.h (PTRACE_TYPE_ARG3): Move to
11407 common/linux-ptrace.h.
11408 (PTRACE_TYPE_ARG4): Likewise.
11409 Include linux-ptrace.h.
11410
11411 2013-08-21 Pedro Alves <palves@redhat.com>
11412
11413 * config.in: Renegerate.
11414
11415 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
11416
11417 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
11418 (SFILES): Remove $(srcdir)/common/target-common.c and
11419 add $(srcdir)/target/waitstatus.c.
11420 (OBS): Remove target-common.o and add waitstatus.o.
11421 (server_h): Remove $(srcdir)/../common/target-common.h and
11422 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
11423 and $(srcdir)/../target/waitstatus.h.
11424 (target-common.o): Remove.
11425 (waitstatus.o): New target object file.
11426 * target.h: Do not include target-common.h and
11427 include target/resume.h, target/wait.h and
11428 target/waitstatus.h.
11429
11430 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
11431
11432 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
11433 to PTRACE_TYPE_ARG3.
11434 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
11435 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
11436 PTRACE_TYPE_ARG4.
11437 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
11438 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
11439
11440 2013-07-27 Jie Zhang <jie@codesourcery.com>
11441 Daniel Jacobowitz <dan@codesourcery.com>
11442 Yao Qi <yao@codesourcery.com>
11443
11444 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
11445 (mips-linux-watch.o): New rule.
11446 (mips_linux_watch_h): New variable.
11447 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
11448 srv_tgtobj.
11449 * linux-mips-low.c: Include mips-linux-watch.h.
11450 (struct arch_process_info, struct arch_lwp_info): New.
11451 (update_watch_registers_callback): New function.
11452 (mips_linux_new_process, mips_linux_new_thread) New functions.
11453 (mips_linux_prepare_to_resume, mips_insert_point): New
11454 functions.
11455 (mips_remove_point, mips_stopped_by_watchpoint): New
11456 functions.
11457 (rsp_bp_type_to_target_hw_bp_type): New function.
11458 (mips_stopped_data_address): New function.
11459 (the_low_target): Add watchpoint support functions.
11460
11461 2013-07-27 Yao Qi <yao@codesourcery.com>
11462
11463 * i386-low.c: Include break-common.h.
11464 (enum target_hw_bp_type): Remove.
11465
11466 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
11467
11468 * Makefile.in (SFILES): /common/target-common.c.
11469 (OBS): Add target-common.o.
11470 (server_h): Add $(srcdir)/../common/target-common.h.
11471 (target-common.o): New target.
11472 * server.c (queue_stop_reply_callback): Free
11473 status string after use.
11474 * target.c (target_waitstatus_to_string): Remove.
11475 * target.h: Include target-common.h.
11476 (resume_kind): Likewise.
11477 (target_waitkind): Likewise.
11478 (target_waitstatus): Likewise.
11479 (TARGET_WNOHANG): Likewise.
11480
11481 2013-07-04 Yao Qi <yao@codesourcery.com>
11482
11483 * Makefile.in (host_alias): Use @host_noncanonical@.
11484 (target_alias): Use @target_noncanonical@.
11485 * configure.ac: Use ACX_NONCANONICAL_TARGET and
11486 ACX_NONCANONICAL_HOST.
11487 * configure: Regenerated.
11488
11489 Revert:
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-07-03 Pedro Alves <palves@redhat.com>
11498
11499 * Makefile.in (config.status): Depend on development.sh.
11500 * acinclude.m4: Include libmcheck.m4.
11501 * configure: Regenerate.
11502
11503 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
11504
11505 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
11506 attribute inside the parentheses.
11507 (winapi_DebugSetProcessKillOnExit): Ditto.
11508 (winapi_DebugBreakProcess): Ditto.
11509 (winapi_GenerateConsoleCtrlEvent): Ditto.
11510
11511 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
11512
11513 * notif.h (notif_event): Add a dummy member to avoid compiler
11514 errors.
11515
11516 2013-07-01 Pedro Alves <palves@redhat.com>
11517
11518 * hostio.c (HOSTIO_PATH_MAX): Define.
11519 (require_filename, handle_open, handle_unlink, handle_readlink):
11520 Use it.
11521
11522 2013-07-01 Pedro Alves <palves@redhat.com>
11523
11524 * server.h: Include "pathmax.h".
11525 * linux-low.c: Don't include sys/param.h.
11526 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
11527 MAXPATHLEN.
11528 * win32-low.c: Don't include sys/param.h.
11529 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
11530
11531 2013-07-01 Pedro Alves <palves@redhat.com>
11532
11533 * event-loop.c: Don't check HAVE_UNISTD_H before including
11534 <unistd.h>.
11535 * gdbreplay.c: Likewise.
11536 * remote-utils.c: Likewise.
11537 * server.c: Likewise.
11538 * configure.ac: Don't check for unistd.h.
11539 * configure: Regenerate.
11540
11541 2013-06-28 Tom Tromey <tromey@redhat.com>
11542
11543 * Makefile.in (version.c): Use version.in, not
11544 common/version.in.
11545
11546 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
11547
11548 * configure.ac (version_host, version_target): Set and AC_SUBST them.
11549 * configure: Rebuild.
11550 * Makefile.in (version_host, version_target): Get from configure.
11551 (version.c): Use $(version_host) and $(version_target).
11552
11553 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
11554
11555 Fix trace-status to output user name without trailing colon.
11556 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
11557
11558 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
11559
11560 Fix trace-status to output proper start-time and stop-time.
11561 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
11562 output start time and stop time in hex as gdb expects.
11563
11564 2013-06-26 Pedro Alves <pedro@codesourcery.com>
11565
11566 * tracepoint.c (build_traceframe_info_xml): Output trace state
11567 variables present in the trace buffer.
11568
11569 2013-06-24 Tom Tromey <tromey@redhat.com>
11570
11571 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
11572 create-version.sh.
11573 (version.o): Remove.
11574 * gdbreplay.c: Include version.h.
11575 (version, host_name): Don't declare.
11576 * server.h: Include version.h.
11577 (version, host_name): Don't declare.
11578
11579 2013-06-12 Pedro Alves <palves@redhat.com>
11580
11581 * linux-x86-low.c (linux_is_elf64): Delete global.
11582 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
11583 with local linux_pid_exe_is_elf_64_file use.
11584
11585 2013-06-11 Pedro Alves <palves@redhat.com>
11586
11587 * linux-low.c (regset_disabled, disable_regset): New functions.
11588 (regsets_fetch_inferior_registers)
11589 (regsets_store_inferior_registers): Use them.
11590 (initialize_regsets_info); Don't allocate the disabled_regsets
11591 array here.
11592 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
11593 comment.
11594
11595 2013-06-11 Pedro Alves <palves@redhat.com>
11596
11597 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
11598 xmalloc.
11599
11600 2013-06-11 Pedro Alves <palves@redhat.com>
11601
11602 * linux-x86-low.c (initialize_low_arch): Call
11603 init_registers_x32_avx_linux.
11604
11605 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
11606
11607 Fix compatibility with Android Bionic.
11608 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
11609 it is not empty.
11610
11611 2013-06-07 Pedro Alves <palves@redhat.com>
11612
11613 PR server/14823
11614 * Makefile.in (OBS): Add tdesc.o.
11615 (IPA_OBJS): Add tdesc-ipa.o.
11616 (tdesc-ipa.o): New rule.
11617 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
11618 interface.
11619 * linux-low.c (new_inferior): Delete.
11620 (disabled_regsets, num_regsets): Delete.
11621 (linux_add_process): Adjust to set the new per-process
11622 new_inferior flag.
11623 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
11624 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
11625 was a stop. When calling arch_setup, switch the current inferior
11626 to the thread that got an event.
11627 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
11628 (regsets_fetch_inferior_registers)
11629 (regsets_store_inferior_registers): New regsets_info parameter.
11630 Adjust to use it.
11631 (linux_register_in_regsets): New regs_info parameter. Adjust to
11632 use it.
11633 (register_addr, fetch_register, store_register): New usrregs_info
11634 parameter. Adjust to use it.
11635 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
11636 parameter regs_info. Adjust to use it.
11637 (linux_fetch_registers): Get the current inferior's regs_info, and
11638 adjust to use it.
11639 (linux_store_registers): Ditto.
11640 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
11641 (initialize_low): Don't initialize the target_regsets here. Call
11642 initialize_low_arch.
11643 * linux-low.h (target_regsets): Delete declaration.
11644 (struct regsets_info): New.
11645 (struct usrregs_info): New.
11646 (struct regs_info): New.
11647 (struct process_info_private) <new_inferior>: New field.
11648 (struct linux_target_ops): Delete the num_regs, regmap, and
11649 regset_bitmap fields. New field regs_info.
11650 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
11651 * i387-fp.c (num_xmm_registers): Delete.
11652 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
11653 calls to new interface.
11654 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
11655 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
11656 Infer the number of xmm registers from the regcache's target
11657 description.
11658 * i387-fp.h (num_xmm_registers): Delete.
11659 * inferiors.c (add_thread): Don't install the thread's regcache
11660 here.
11661 * proc-service.c (gregset_info): Fetch the current inferior's
11662 regs_info. Adjust to use it.
11663 * regcache.c: Include tdesc.h.
11664 (register_bytes, reg_defs, num_registers)
11665 (gdbserver_expedite_regs): Delete.
11666 (get_thread_regcache): If the thread doesn't have a regcache yet,
11667 create one, instead of aborting gdbserver.
11668 (regcache_invalidate_one): Rename to ...
11669 (regcache_invalidate_thread): ... this.
11670 (regcache_invalidate_one): New.
11671 (regcache_invalidate): Only invalidate registers of the current
11672 process.
11673 (init_register_cache): Add target_desc parameter, and use it.
11674 (new_register_cache): Ditto. Assert the target description has a
11675 non zero registers_size.
11676 (regcache_cpy): Add assertions. Adjust.
11677 (realloc_register_cache, set_register_cache): Delete.
11678 (registers_to_string, registers_from_string): Adjust.
11679 (find_register_by_name, find_regno, find_register_by_number)
11680 (register_cache_size): Add target_desc parameter, and use it.
11681 (free_register_cache_thread, free_register_cache_thread_one)
11682 (regcache_release, register_cache_size): New.
11683 (register_size): Add target_desc parameter, and use it.
11684 (register_data, supply_register, supply_register_zeroed)
11685 (supply_regblock, supply_register_by_name, collect_register)
11686 (collect_register_as_string, collect_register_by_name): Adjust.
11687 * regcache.h (struct target_desc): Forward declare.
11688 (struct regcache) <tdesc>: New field.
11689 (init_register_cache, new_register_cache): Add target_desc
11690 parameter.
11691 (regcache_invalidate_thread): Declare.
11692 (regcache_invalidate_one): Delete declaration.
11693 (regcache_release): Declare.
11694 (find_register_by_number, register_cache_size, register_size)
11695 (find_regno): Add target_desc parameter.
11696 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
11697 declarations.
11698 * remote-utils.c: Include tdesc.h.
11699 (outreg, prepare_resume_reply): Adjust.
11700 * server.c: Include tdesc.h.
11701 (gdbserver_xmltarget): Delete declaration.
11702 (get_features_xml, process_serial_event): Adjust.
11703 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
11704 declare.
11705 (struct process_info) <tdesc>: New field.
11706 (ipa_tdesc): Declare.
11707 * tdesc.c: New file.
11708 * tdesc.h: New file.
11709 * tracepoint.c: Include tdesc.h.
11710 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
11711 (get_context_regcache): Adjust to pass ipa_tdesc down.
11712 (do_action_at_tracepoint): Adjust to get the register cache size
11713 from the context regcache's description.
11714 (traceframe_walk_blocks): Adjust to get the register cache size
11715 from the current trace frame's description.
11716 (traceframe_get_pc): Adjust to get current trace frame's
11717 description and pass it down.
11718 (gdb_collect): Adjust to get the register cache size from the
11719 IPA's description.
11720 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
11721 (gdbserver_xmltarget): Delete.
11722 (initialize_low_tracepoint): Set the ipa's target description.
11723 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
11724 (initialize_low_tracepoint): Set the ipa's target description.
11725 * linux-x86-low.c: Include tdesc.h.
11726 [__x86_64__] (is_64bit_tdesc): New.
11727 (ps_get_thread_area, x86_get_thread_area): Use it.
11728 (i386_cannot_store_register): Rename to ...
11729 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
11730 (i386_cannot_fetch_register): Rename to ...
11731 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
11732 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
11733 to new interface.
11734 (target_regsets): Rename to ...
11735 (x86_regsets): ... this.
11736 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
11737 interface.
11738 (x86_siginfo_fixup): Use is_64bit_tdesc.
11739 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
11740 (tdesc_x32_avx_linux, tdesc_x32_linux)
11741 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
11742 Declare.
11743 (x86_linux_update_xmltarget): Delete.
11744 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
11745 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
11746 (AMD64_LINUX_USER64_CS): New.
11747 (x86_linux_read_description): New, based on
11748 x86_linux_update_xmltarget.
11749 (same_process_callback): New.
11750 (x86_arch_setup_process_callback): New.
11751 (x86_linux_update_xmltarget): New.
11752 (x86_regsets_info): New.
11753 (amd64_linux_regs_info): New.
11754 (i386_linux_usrregs_info): New.
11755 (i386_linux_regs_info): New.
11756 (x86_linux_regs_info): New.
11757 (x86_arch_setup): Reimplement.
11758 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
11759 (x86_emit_ops): Ditto.
11760 (the_low_target): Adjust. Install x86_linux_regs_info,
11761 x86_cannot_fetch_register, and x86_cannot_store_register.
11762 (initialize_low_arch): New.
11763 * linux-ia64-low.c (tdesc_ia64): Declare.
11764 (ia64_fetch_register): Adjust.
11765 (ia64_usrregs_info, regs_info): New globals.
11766 (ia64_regs_info): New function.
11767 (the_low_target): Adjust.
11768 (initialize_low_arch): New function.
11769 * linux-sparc-low.c (tdesc_sparc64): Declare.
11770 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
11771 Adjust.
11772 (sparc_arch_setup): New function.
11773 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
11774 (the_low_target): Adjust.
11775 (initialize_low_arch): New function.
11776 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
11777 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
11778 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
11779 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
11780 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
11781 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
11782 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
11783 (tdesc_powerpc_isa205_vsx64l): Declare.
11784 (ppc_cannot_store_register, ppc_collect_ptrace_register)
11785 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
11786 (ppc_set_pc, ppc_get_hwcap): Adjust.
11787 (ppc_usrregs_info): Forward declare.
11788 (!__powerpc64__) ppc_regmap_adjusted: New global.
11789 (ppc_arch_setup): Adjust to the current process'es target
11790 description.
11791 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
11792 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
11793 (ppc_store_evrregset): Adjust.
11794 (target_regsets): Rename to ...
11795 (ppc_regsets): ... this, and make static.
11796 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
11797 (ppc_regs_info): New function.
11798 (the_low_target): Adjust.
11799 (initialize_low_arch): New function.
11800 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
11801 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
11802 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
11803 (tdesc_s390x_linux64v2): Declare.
11804 (s390_collect_ptrace_register, s390_supply_ptrace_register)
11805 (s390_fill_gregset, s390_store_last_break): Adjust.
11806 (target_regsets): Rename to ...
11807 (s390_regsets): ... this, and make static.
11808 (s390_get_pc, s390_set_pc): Adjust.
11809 (s390_get_hwcap): New target_desc parameter, and use it.
11810 [__s390x__] (have_hwcap_s390_high_gprs): New global.
11811 (s390_arch_setup): Adjust to set the current process'es target
11812 description. Don't adjust the regmap.
11813 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
11814 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
11815 (regs_info_3264): New globals.
11816 (s390_regs_info): New function.
11817 (the_low_target): Adjust.
11818 (initialize_low_arch): New function.
11819 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
11820 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
11821 [__mips64] (init_registers_mips_linux)
11822 (init_registers_mips_dsp_linux): Delete defines.
11823 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
11824 (have_dsp): New global.
11825 (mips_read_description): New, based on mips_arch_setup.
11826 (mips_arch_setup): Reimplement.
11827 (get_usrregs_info): New function.
11828 (mips_cannot_fetch_register, mips_cannot_store_register)
11829 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
11830 (mips_fill_fpregset, mips_store_fpregset): Adjust.
11831 (target_regsets): Rename to ...
11832 (mips_regsets): ... this, and make static.
11833 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
11834 (dsp_regs_info, regs_info): New globals.
11835 (mips_regs_info): New function.
11836 (the_low_target): Adjust.
11837 (initialize_low_arch): New function.
11838 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
11839 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
11840 Declare.
11841 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
11842 (arm_read_description): New, with bits factored from
11843 arm_arch_setup.
11844 (arm_arch_setup): Reimplement.
11845 (target_regsets): Rename to ...
11846 (arm_regsets): ... this, and make static.
11847 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
11848 (arm_regs_info): New function.
11849 (the_low_target): Adjust.
11850 (initialize_low_arch): New function.
11851 * linux-m68k-low.c (tdesc_m68k): Declare.
11852 (target_regsets): Rename to ...
11853 (m68k_regsets): ... this, and make static.
11854 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
11855 (m68k_regs_info): New function.
11856 (m68k_arch_setup): New function.
11857 (the_low_target): Adjust.
11858 (initialize_low_arch): New function.
11859 * linux-sh-low.c (tdesc_sharch): Declare.
11860 (target_regsets): Rename to ...
11861 (sh_regsets): ... this, and make static.
11862 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
11863 (sh_regs_info, sh_arch_setup): New functions.
11864 (the_low_target): Adjust.
11865 (initialize_low_arch): New function.
11866 * linux-bfin-low.c (tdesc_bfin): Declare.
11867 (bfin_arch_setup): New function.
11868 (bfin_usrregs_info, regs_info): New globals.
11869 (bfin_regs_info): New function.
11870 (the_low_target): Adjust.
11871 (initialize_low_arch): New function.
11872 * linux-cris-low.c (tdesc_cris): Declare.
11873 (cris_arch_setup): New function.
11874 (cris_usrregs_info, regs_info): New globals.
11875 (cris_regs_info): New function.
11876 (the_low_target): Adjust.
11877 (initialize_low_arch): New function.
11878 * linux-cris-low.c (tdesc_crisv32): Declare.
11879 (cris_arch_setup): New function.
11880 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
11881 (cris_regs_info): New function.
11882 (the_low_target): Adjust.
11883 (initialize_low_arch): New function.
11884 * linux-m32r-low.c (tdesc_m32r): Declare.
11885 (m32r_arch_setup): New function.
11886 (m32r_usrregs_info, regs_info): New globals.
11887 (m32r_regs_info): Adjust.
11888 (initialize_low_arch): New function.
11889 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
11890 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
11891 (tic6x_usrregs_info): Forward declare.
11892 (tic6x_read_description): New function, based on ...
11893 (tic6x_arch_setup): ... this. Reimplement.
11894 (target_regsets): Rename to ...
11895 (tic6x_regsets): ... this, and make static.
11896 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
11897 (tic6x_regs_info): New function.
11898 (the_low_target): Adjust.
11899 (initialize_low_arch): New function.
11900 * linux-xtensa-low.c (tdesc_xtensa): Declare.
11901 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
11902 (target_regsets): Rename to ...
11903 (xtensa_regsets): ... this, and make static.
11904 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
11905 globals.
11906 (xtensa_arch_setup, xtensa_regs_info): New functions.
11907 (the_low_target): Adjust.
11908 (initialize_low_arch): New function.
11909 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
11910 (nios2_arch_setup): Set the current process'es tdesc.
11911 (target_regsets): Rename to ...
11912 (nios2_regsets): ... this.
11913 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
11914 (nios2_regs_info): New function.
11915 (the_low_target): Adjust.
11916 (initialize_low_arch): New function.
11917 * linux-aarch64-low.c (tdesc_aarch64): Declare.
11918 (aarch64_arch_setup): Set the current process'es tdesc.
11919 (target_regsets): Rename to ...
11920 (aarch64_regsets): ... this.
11921 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
11922 (aarch64_regs_info): New function.
11923 (the_low_target): Adjust.
11924 (initialize_low_arch): New function.
11925 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
11926 globals.
11927 (target_regsets): Rename to ...
11928 (tile_regsets): ... this.
11929 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
11930 (tile_regs_info): New function.
11931 (tile_arch_setup): Set the current process'es tdesc.
11932 (the_low_target): Adjust.
11933 (initialize_low_arch): New function.
11934 * spu-low.c (tdesc_spu): Declare.
11935 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
11936 * win32-arm-low.c (tdesc_arm): Declare.
11937 (arm_arch_setup): New function.
11938 (the_low_target): Install arm_arch_setup instead of
11939 init_registers_arm.
11940 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
11941 (init_windows_x86): Rename to ...
11942 (i386_arch_setup): ... this. Set `win32_tdesc'.
11943 (the_low_target): Adjust.
11944 * win32-low.c (win32_tdesc): New global.
11945 (child_add_thread): Don't create the thread cache here.
11946 (do_initial_child_stuff): Set the new process'es tdesc.
11947 * win32-low.h (struct target_desc): Forward declare.
11948 (win32_tdesc): Declare.
11949 * lynx-i386-low.c (tdesc_i386): Declare global.
11950 (lynx_i386_arch_setup): Set `lynx_tdesc'.
11951 * lynx-low.c (lynx_tdesc): New global.
11952 (lynx_add_process): Set the new process'es tdesc.
11953 * lynx-low.h (struct target_desc): Forward declare.
11954 (lynx_tdesc): Declare global.
11955 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
11956 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
11957 * nto-low.c (nto_tdesc): New global.
11958 (do_attach): Set the new process'es tdesc.
11959 * nto-low.h (struct target_desc): Forward declare.
11960 (nto_tdesc): Declare.
11961 * nto-x86-low.c (tdesc_i386): Declare.
11962 (nto_x86_arch_setup): Set `nto_tdesc'.
11963
11964 2013-06-04 Gary Benson <gbenson@redhat.com>
11965
11966 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
11967 to qSupported response when appropriate.
11968 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
11969 with nonzero-length annex.
11970 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
11971 arguments supplied in annex.
11972
11973 2013-05-31 Doug Evans <dje@google.com>
11974
11975 PR server/15594
11976 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
11977 64 bits in 64-cross-32 environment.
11978
11979 2013-05-28 Pedro Alves <palves@redhat.com>
11980
11981 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
11982 (aarch64-without-fpu.c): Delete rule.
11983 * configure.srv (aarch64*-*-linux*): Remove references to
11984 aarch64-without-fpu.o and aarch64-without-fpu.xml.
11985 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
11986 declaration.
11987
11988 2013-05-24 Pedro Alves <palves@redhat.com>
11989
11990 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
11991 instead of strchr/decode_address. Error if the range isn't split
11992 with a ','. Don't assume there's be a ':' in the action.
11993
11994 2013-05-23 Yao Qi <yao@codesourcery.com>
11995 Pedro Alves <palves@redhat.com>
11996
11997 * linux-low.c (lwp_in_step_range): New function.
11998 (linux_wait_1): If the thread was range stepping and stopped
11999 outside the stepping range, report the stop to GDB. Otherwise,
12000 continue stepping. Add range stepping debug output.
12001 (linux_set_resume_request): Copy the step range from the resume
12002 request to the lwp.
12003 (linux_supports_range_stepping): New.
12004 (linux_target_ops) <supports_range_stepping>: Set to
12005 linux_supports_range_stepping.
12006 * linux-low.h (struct linux_target_ops)
12007 <supports_range_stepping>: New field.
12008 (struct lwp_info) <step_range_start, step_range_end>: New fields.
12009 * linux-x86-low.c (x86_supports_range_stepping): New.
12010 (the_low_target) <supports_range_stepping>: Set to
12011 x86_supports_range_stepping.
12012 * server.c (handle_v_cont): Handle 'r' action.
12013 (handle_v_requests): Append ";r" if the target supports range
12014 stepping.
12015 * target.h (struct thread_resume) <step_range_start,
12016 step_range_end>: New fields.
12017 (struct target_ops) <supports_range_stepping>:
12018 New field.
12019 (target_supports_range_stepping): New macro.
12020
12021 2013-05-17 Joel Brobecker <brobecker@adacore.com>
12022
12023 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
12024 confusion in comment.
12025
12026 2013-05-17 Joel Brobecker <brobecker@adacore.com>
12027
12028 * lynx-low.c (struct process_info_private): New type.
12029 (lynx_add_process): New function.
12030 (lynx_create_inferior, lynx_attach): Replace calls to
12031 add_process by calls to lynx_add_process.
12032 (lynx_resume): If PTID is null, then try using
12033 current_process()->private->last_wait_event_ptid.
12034 Add comments.
12035 (lynx_clear_inferiors): Delete. The contents of that function
12036 has been inlined in lynx_mourn;
12037 (lynx_wait_1): Save the ptid in the process's private data.
12038 (lynx_mourn): Free the process' private data. Replace call
12039 to lynx_clear_inferiors by call to clear_inferiors.
12040
12041 2013-05-17 Yao Qi <yao@codesourcery.com>
12042
12043 * i386-low.c (i386_length_and_rw_bits): Move the comment to
12044 the right place.
12045
12046 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
12047
12048 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
12049 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
12050 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
12051 PT_TEXT_END_ADDR guards. Update comments.
12052 (linux_target_op) <read_offsets>: Conditionally define to
12053 linux_read_offsets if the target is UCLIBC and if it defines
12054 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
12055
12056 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
12057 Andrew Jenner <andrew@codesourcery.com>
12058
12059 * Makefile.in (SFILES): Add linux-nios2-low.c.
12060 (clean): Add action to delete nios2-linux.c.
12061 (nios2-linux.c): New rule.
12062 * configure.srv: Add nios2*-*-linux*.
12063 * linux-nios2-low.c: New.
12064
12065 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
12066
12067 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
12068
12069 2013-04-25 Hui Zhu <hui@codesourcery.com>
12070
12071 PR gdb/15186
12072 * ax.c (ax_printf): Add fflush.
12073
12074 2013-04-22 Tom Tromey <tromey@redhat.com>
12075
12076 * Makefile.in (SFILES): Add filestuff.c.
12077 (OBS): Add filestuff.o.
12078 (filestuff.o): New target.
12079 * config.in, configure: Rebuild.
12080 * configure.ac: Check for fdwalk, pipe2.
12081
12082 2013-04-17 Pedro Alves <palves@redhat.com>
12083
12084 * configure.ac (USE_THREAD_DB): Delete variable.
12085 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
12086 Don't AC_SUBST USE_THREAD_DB.
12087 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
12088 * config.in, configure: Regenerate.
12089
12090 2013-04-16 Pedro Alves <palves@redhat.com>
12091
12092 * linux-low.h (struct lwp_info) <thread_known>: Move under
12093 the USE_THREAD_DB #ifdef.
12094
12095 2013-04-16 Pedro Alves <palves@redhat.com>
12096
12097 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
12098 (linux-low.o): Delete rule.
12099 * linux-low.h: Always include "gdb_thread_db.h" instead of
12100 conditionally including thread_db.h.
12101 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
12102 HAVE_THREAD_DB_H.
12103
12104 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12105
12106 * Makefile.in (install-only): Fix make install regression.
12107
12108 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
12109
12110 Convert man pages to texinfo, new gdbinit.5 texinfo page.
12111 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
12112 installation.
12113 * gdbserver.1: Remove.
12114
12115 2013-03-22 Pedro Alves <palves@redhat.com>
12116
12117 * linux-low.c (handle_extended_wait): Don't call
12118 linux_enable_event_reporting.
12119
12120 2013-03-15 Tony Theodore <tonyt@logyst.com>
12121
12122 PR build/9098:
12123 * Makefile.in (SHELL): Use @SHELL@.
12124
12125 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
12126
12127 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
12128 compiler warning.
12129
12130 2013-03-13 Joel Brobecker <brobecker@adacore.com>
12131
12132 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
12133 Remove extraneous NULL element.
12134
12135 2013-03-13 Yao Qi <yao@codesourcery.com>
12136
12137 * tracepoint.c (traceframe_read_tsv): Look for the last matched
12138 'V' block in trace frame.
12139
12140 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
12141
12142 * target.h (struct target_ops): Add btrace ops.
12143 (target_supports_btrace): New macro.
12144 (target_enable_btrace): New macro.
12145 (target_disable_btrace): New macro.
12146 (target_read_btrace): New macro.
12147 * gdbthread.h (struct thread_info): Add btrace field.
12148 * server.c: Include btrace-common.h.
12149 (handle_btrace_general_set): New function.
12150 (handle_btrace_enable): New function.
12151 (handle_btrace_disable): New function.
12152 (handle_general_set): Call handle_btrace_general_set.
12153 (handle_qxfer_btrace): New function.
12154 (struct qxfer qxfer_packets[]): Add btrace entry.
12155 * inferiors.c (remove_thread): Disable btrace.
12156 * linux-low: Include linux-btrace.h.
12157 (linux_low_enable_btrace): New function.
12158 (linux_low_read_btrace): New function.
12159 (linux_target_ops): Add btrace ops.
12160 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
12161 Add srv_linux_btrace=yes.
12162 (x86_64-*-linux*): Add linux-btrace.o.
12163 Add srv_linux_btrace=yes.
12164 * configure.ac: Define HAVE_LINUX_BTRACE.
12165 * config.in: Regenerated.
12166 * configure: Regenerated.
12167
12168 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
12169
12170 * server.c (handle_qxfer): Preserve error message if -3 is
12171 returned.
12172 (qxfer): Document the -3 return value.
12173
12174 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
12175
12176 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
12177 (linux_btrace_h): New variable.
12178 (linux-btrace.o): New rule.
12179
12180 2013-03-08 Stan Shebs <stan@codesourcery.com>
12181 Hafiz Abid Qadeer <abidh@codesourcery.com>
12182
12183 * tracepoint.c (trace_buffer_size): New global.
12184 (DEFAULT_TRACE_BUFFER_SIZE): New define.
12185 (init_trace_buffer): Change to one-argument function. Allocate
12186 trace buffer memory.
12187 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
12188 handle QTBuffer:size packet.
12189 (cmd_bigqtbuffer_size): New function.
12190 (initialize_tracepoint): Call init_trace_buffer with
12191 DEFAULT_TRACE_BUFFER_SIZE.
12192 * server.c (handle_query): Add QTBuffer:size in the
12193 supported packets.
12194
12195 2013-03-07 Yao Qi <yao@codesourcery.com>
12196
12197 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
12198 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
12199 of -1.
12200 (cmd_qtsp): Adjust condition. Do post increment.
12201 Set cur_action and cur_step_action back to 0.
12202
12203 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
12204
12205 PR server/15236
12206 * linux-low.c (linux_write_memory): Return early success if LEN is
12207 zero.
12208
12209 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
12210
12211 * configure.srv: Add x86_64-*-cygwin* as target.
12212
12213 2013-02-28 Tom Tromey <tromey@redhat.com>
12214
12215 * configure.ac: Invoke AC_SYS_LARGEFILE.
12216 * configure, config.in: Rebuild.
12217
12218 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
12219
12220 * win32-low.c: Throughout, fix format strings and casts of
12221 printf-like functions to avoid type related warnings on all
12222 platforms.
12223 (get_child_debug_event): Print dwDebugEventCode as hex since
12224 that's how it's usually documented.
12225
12226 2013-02-28 Yao Qi <yao@codesourcery.com>
12227
12228 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
12229 pulongest.
12230
12231 2013-02-27 Jiong Wang <jiwang@tilera.com>
12232
12233 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
12234 (reg-tilegx32.c): New rule.
12235 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
12236 * linux-tile-low.c (tile_arch_setup): New function. Invoke
12237 different register info initializer according to elf class.
12238 (init_registers_tilgx32): New function. The tilegx32 register info
12239 initializer.
12240 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
12241 (tile_store_gregset): Likewise.
12242
12243 2013-02-27 Yao Qi <yao@codesourcery.com>
12244
12245 * server.c (process_point_options): Print debug message when
12246 debug_threads is true.
12247
12248 2013-02-26 Yao Qi <yao@codesourcery.com>
12249
12250 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
12251
12252 2013-02-19 Pedro Alves <palves@redhat.com>
12253 Kai Tietz <ktietz@redhat.com>
12254
12255 PR gdb/15161
12256
12257 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
12258 instead of strtoul to extract address from packet.
12259 (process_serial_event) <'z'>: Likewise.
12260
12261 2013-02-18 Yao Qi <yao@codesourcery.com>
12262
12263 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
12264
12265 2013-02-14 Pedro Alves <palves@redhat.com>
12266
12267 Plug memory leak.
12268
12269 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
12270 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
12271
12272 2013-02-14 Pedro Alves <palves@redhat.com>
12273
12274 * tracepoint.c (cmd_qtdpsrc): Use savestring.
12275
12276 2013-02-14 Pedro Alves <palves@redhat.com>
12277
12278 * tracepoint.c (save_string): Delete.
12279 (add_tracepoint_action): Use savestring instead of save_string.
12280
12281 2013-02-12 Pedro Alves <palves@redhat.com>
12282
12283 * linux-xtensa-low.c: Ditto.
12284 * xtensa-xtregs.c: Ditto.
12285
12286 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
12287
12288 * thread-db.c (thread_db_get_tls_address): NULL pointer check
12289 thread_db.
12290
12291 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
12292
12293 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
12294 aarch64_num_wp_regs and aarch64_num_bp_regs to
12295 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
12296
12297 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
12298
12299 * linux-aarch64-low.c (ps_get_thread_area): Replace
12300 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
12301
12302 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
12303 Marcus Shawcroft <marcus.shawcroft@arm.com>
12304 Nigel Stephens <nigel.stephens@arm.com>
12305 Yufeng Zhang <yufeng.zhang@arm.com>
12306
12307 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
12308 (aarch64.c, aarch64-without-fpu.c): New targets.
12309 * configure.srv (aarch64*-*-linux*): New.
12310 * linux-aarch64-low.c: New file.
12311
12312 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
12313
12314 * linux-low.c (handle_extended_wait, linux_create_inferior)
12315 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
12316 (dequeue_one_deferred_signal, linux_resume_one_thread)
12317 (fetch_register, linux_write_memory, linux_enable_event_reporting)
12318 (linux_tracefork_grandchild, linux_test_for_tracefork)
12319 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
12320 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
12321 where the argument is 0.
12322
12323 2013-01-25 Yao Qi <yao@codesourcery.com>
12324
12325 * event-loop.c: Include "queue.h".
12326 (gdb_event_p): New typedef.
12327 (struct gdb_event) <next_event>: Remove.
12328 (event_queue): Change to QUEUE(gdb_event_p).
12329 (async_queue_event): Remove.
12330 (gdb_event_xfree): New.
12331 (initialize_event_loop): New.
12332 (process_event): Use API from QUEUE.
12333 (wait_for_event): Likewise.
12334 * server.c (main): Call initialize_event_loop.
12335 * server.h (initialize_event_loop): Declare.
12336
12337 2013-01-18 Yao Qi <yao@codesourcery.com>
12338
12339 * ax.h (struct eval_agent_expr_context): New.
12340 (gdb_eval_agent_expr): Update declaration.
12341 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
12342 TFRAME. Add new argument CTX.
12343 * server.h (struct eval_agent_expr_context): Declare.
12344 (agent_mem_read, agent_tsv_read): Update declaration.
12345 (agent_mem_read_string): Likewise.
12346 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
12347 (add_traceframe_block): Add new argument TPOINT.
12348 Increase TPOINT->traceframe_usage.
12349 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
12350 eval_tracepoint_agent_expr.
12351 (condition_true_at_tracepoint): Likewise.
12352 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
12353 (agent_mem_read_string, agent_tsv_read): Likewise.
12354
12355 2013-01-16 Yao Qi <yao@codesourcery.com>
12356
12357 * linux-low.c (linux_resume_one_lwp): Don't check
12358 'lwp->bp_reinsert != 0'.
12359
12360 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12361 Pedro Alves <palves@redhat.com>
12362
12363 * lynx-low.c (ptrace_request_to_str): Define a temporary
12364 macro and use it to simplify this function's implementation.
12365
12366 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12367
12368 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
12369 sets errno.
12370
12371 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12372
12373 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
12374
12375 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12376
12377 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
12378
12379 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12380
12381 * lynx-low.c (lynx_resume): Use the resume_info parameter
12382 to determine the ptid for the lynx_ptrace call, unless
12383 it is equal to minus_one_ptid, in which case we use the
12384 ptid of the current_inferior.
12385 (lynx_wait_1): After having received a thread create/exit
12386 event, resume the inferior's execution using the signaling
12387 thread's ptid, rather than the old ptid.
12388
12389 2013-01-07 Joel Brobecker <brobecker@adacore.com>
12390
12391 * lynx-low.c (lynx_resume): Delete variable ret.
12392
12393 2013-01-01 Joel Brobecker <brobecker@adacore.com>
12394
12395 * gdbreplay.c (gdbreplay_version): Update copyright year.
12396 * server.c (gdbserver_version): Likewise.
12397
12398 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12399
12400 * lynx-low.c (lynx_wait_1): Add debug trace before adding
12401 new thread.
12402
12403 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12404
12405 * lynx-low.c (ptrace_request_to_str): Add handling for
12406 PTRACE_GETTRACESIG.
12407
12408 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12409
12410 * lynx-low.c (lynx_attach): Delete variable new_process.
12411
12412 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12413
12414 * lynx-low.c (lynx_create_inferior): Delete variable
12415 new_process.
12416
12417 2012-12-17 Joel Brobecker <brobecker@adacore.com>
12418
12419 * lynx-low.c (ptrace_request_to_str): Do not handle
12420 PTRACE_GETTHREADLIST if this macro does not exist.
12421
12422 2012-12-15 Yao Qi <yao@codesourcery.com>
12423
12424 * Makefile.in (OBS): Add notif.o.
12425 * notif.c, notif.h: New.
12426 * server.c: Include "notif.h".
12427 (struct vstop_notif) <next>: Remove.
12428 <base>: New field.
12429 (queue_stop_reply): Update.
12430 (push_event, send_next_stop_reply): Remove.
12431 (discard_queued_stop_replies): Update.
12432 (notif_stop): New variable.
12433 (handle_v_stopped): Remove.
12434 (handle_v_requests): Don't call handle_v_stopped. Call
12435 handle_ack_notif instead.
12436 (queue_stop_reply_callback): Call notif_event_enque instead
12437 of queue_stop_reply.
12438 (handle_status): Don't call send_next_stop_reply, call
12439 notif_write_event instead.
12440 (kill_inferior_callback): Likewise.
12441 (detach_or_kill_inferior_callback): Likewise.
12442 (main): Call initialize_notif.
12443 (process_serial_event): Call QUEUE_is_empty.
12444 (handle_target_event): Call notif_push instead of push event.
12445 * server.h (push_event): Remove declaration.
12446
12447 2012-12-10 Tom Tromey <tromey@redhat.com>
12448
12449 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
12450 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
12451 macros.
12452 (.c.o): Rewrite.
12453 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
12454 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
12455 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
12456 (amd64-linux-ipa.o, ax.o): Rewrite.
12457 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
12458 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
12459 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
12460 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
12461 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
12462 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
12463 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
12464 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
12465 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
12466 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
12467 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
12468 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
12469 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
12470 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
12471 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
12472 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
12473 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
12474 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
12475 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
12476 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
12477 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
12478 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
12479 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
12480 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
12481 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
12482 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
12483 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
12484 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
12485 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
12486 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
12487 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
12488 (reg-tilegx.o): Remove.
12489 (all_object_files): New macro.
12490 Include .deps files.
12491 * aclocal.m4, configure: Rebuild.
12492 * acinclude.m4: Include depstand.m4, lead-dot.m4.
12493 * configure.ac: Invoke ZW_CREATE_DEPDIR,
12494 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
12495
12496 2012-12-05 Tom Tromey <tromey@redhat.com>
12497
12498 PR gdb/14917:
12499 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
12500
12501 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
12502
12503 * configure.ac: Check for linux/perf_event.h.
12504 * config.in: Regenerated.
12505 * configure: Regenerated.
12506
12507 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
12508
12509 * hostio.c (handle_readlink): Decrease buffer size
12510 parameter passed to readlink by one byte.
12511
12512 2012-11-26 Yao Qi <yao@codesourcery.com>
12513
12514 * configure.ac (build_warnings): Append '-Wempty-body'.
12515 * configure: Regenerated.
12516 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
12517 body.
12518
12519 2012-11-15 Pierre Muller <muller@sourceware.org>
12520
12521 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
12522 * config.in: Regenerate.
12523 * configure: Regenerate.
12524 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
12525 Use "gdb_wait.h" header instead of <sys/wait.h> header.
12526 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
12527 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
12528 header.
12529 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
12530 instead of <sys/wait.h> header.
12531 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
12532
12533 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
12534
12535 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
12536 (various make rules): Remove -DGDBSERVER
12537
12538 2012-11-09 Yao Qi <yao@codesourcery.com>
12539
12540 * spu-low.c (current_ptid): Move it to ..
12541 * gdbthread.h: ... here. New.
12542 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
12543 * server.c (myresume, process_serial_event): Likewise.
12544 * thread-db.c (thread_db_find_new_threads): Likewise.
12545 * tracepoint.c (run_inferior_command): Likewise.
12546
12547 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
12548
12549 * server.c (handle_search_memory_1): Include access length in
12550 warning message.
12551
12552 2012-09-05 Michael Brandt <michael.brandt@axis.com>
12553
12554 * linux-crisv32-low.c: Fix compile errors.
12555
12556 2012-09-04 Yao Qi <yao@codesourcery.com>
12557
12558 * tracepoint.c (cmd_qtsv): Adjust debug message.
12559 Don't check CUR_TPOINT.
12560
12561 2012-08-28 Yao Qi <yao@codesourcery.com>
12562
12563 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
12564 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
12565 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
12566 Remove declarations of xmalloc, xreallloc, xstrdup and
12567 freeargv.
12568 * Makefile.in (libiberty_h): New.
12569 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
12570 (linux-bfin-low.o): Append dependency 'libiberty.h'.
12571
12572 2012-08-23 Yao Qi <yao@codesourcery.com>
12573
12574 * server.h: Remove declaration of 'xsnprintf'.
12575
12576 2012-08-22 Keith Seitz <keiths@redhat.com>
12577
12578 * server.h: Include build-gnulib-gbserver/config.h.
12579 * gdbreplay.c: Likewise.
12580
12581 2012-08-08 Doug Evans <dje@google.com>
12582
12583 * Makefile.in (SFILES): Add gdb_vecs.c.
12584 (OBS): Add gdb_vecs.o.
12585 (gdb_vecs_h, host_defs_h): New variables.
12586 (thread-db.o): Add $(gdb_vecs_h) dependency.
12587 (gdb_vecs.o): New rule.
12588 * thread-db.c: #include "gdb_vecs.h".
12589 (thread_db_load_search): Use a vector to iterate over path elements.
12590 Handle text appearing after "$pdir".
12591
12592 * configure.ac: Add check for strstr.
12593 * config.in: Regenerate.
12594 * configure: Regenerate.
12595
12596 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
12597
12598 * hostio.c (handle_pread): If pread fails, fall back to attempting
12599 lseek/read.
12600 (handle_pwrite): Likewise for pwrite.
12601
12602 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
12603
12604 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
12605 between unsupported TYPE and unimplementable ADDR/LEN combination.
12606 (arm_insert_point): Act on new return value.
12607
12608 2012-07-31 Pedro Alves <palves@redhat.com>
12609
12610 * server.c (process_point_options): Only skip tokens if we find
12611 one that is unrecognized. Don't treat 'X' specially while
12612 skipping unrecognized tokens.
12613
12614 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
12615
12616 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
12617 to 4-byte-align HW breakpoint addresses for Thumb.
12618
12619 2012-07-27 Yao Qi <yao@codesourcery.com>
12620
12621 PR remote/14161.
12622
12623 * server.h: Declare gdb_agent_about_to_close.
12624 * target.c (kill_inferior): Include "agent.h".
12625 New. Send command 'kill'.
12626 * target.h (kill_inferior): Removed macro.
12627 * tracepoint.c (gdb_agent_about_to_close): New.
12628 (gdb_agent_helper_thread): Handle command 'close'.
12629 Wait endlessly until the inferior stops.
12630 Install gdb_agent_remove_socket to atexit hook.
12631 (agent_socket_name): New static variable.
12632 (gdb_agent_socket_init): Replace local variable 'name' with
12633 'agent_socket_name'.
12634 (gdb_agent_remove_socket): New.
12635
12636 2012-07-27 Yao Qi <yao@codesourcery.com>
12637
12638 * server.c (process_point_options): Stop at 'X' when parsing.
12639
12640 2012-07-19 Michael Eager <eager@eagercon.com>
12641
12642 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
12643 to hw_execute.
12644 * linux-x86-low.c (x86_insert_point, x86_remove_point):
12645 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
12646 hardware breakpoint.
12647
12648 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
12649
12650 * gdbserver/linux-low.c (initialize_low): Call
12651 linux_ptrace_init_warnings.
12652
12653 2012-07-02 Doug Evans <dje@google.com>
12654
12655 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
12656 pointer to int.
12657
12658 2012-07-02 Stan Shebs <stan@codesourcery.com>
12659
12660 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
12661 (ax.o): Add it to build rule.
12662 (ax-ipa.o): Ditto.
12663 (OBS): Add format.o.
12664 (IPA_OBS): Add format.o.
12665 * server.c (handle_query): Claim support for breakpoint commands.
12666 (process_point_options): Add command case.
12667 (process_serial_event): Leave running if there are printfs in
12668 effect.
12669 * mem-break.h (any_persistent_commands): Declare.
12670 (add_breakpoint_commands): Declare.
12671 (gdb_no_commands_at_breakpoint): Declare.
12672 (run_breakpoint_commands): Declare.
12673 * mem-break.c (struct point_command_list): New struct.
12674 (struct breakpoint): New field command_list.
12675 (any_persistent_commands): New function.
12676 (add_commands_to_breakpoint): New function.
12677 (add_breakpoint_commands): New function.
12678 (gdb_no_commands_at_breakpoint): New function.
12679 (run_breakpoint_commands): New function.
12680 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
12681 locally.
12682 * ax.c: Include format.h.
12683 (ax_printf): New function.
12684 (gdb_eval_agent_expr): Add printf opcode.
12685
12686 2012-06-13 Yao Qi <yao@codesourcery.com>
12687
12688 * server.c (start_inferior): Remove duplicated writes to fields
12689 'last_resume_kind' and 'last_status' of 'current_inferior'.
12690
12691 2012-06-12 Yao Qi <yao@codesourcery.com>
12692 Pedro Alves <palves@redhat.com>
12693
12694 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
12695 comment.
12696 * server.c (handle_v_cont): Extend comment.
12697
12698 2012-06-11 Yao Qi <yao@codesourcery.com>
12699
12700 * linux-low.c (linux_attach): Add 'static'.
12701
12702 2012-06-06 Yao Qi <yao@codesourcery.com>
12703
12704 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
12705
12706 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
12707
12708 Fix gcc -flto compilation warning.
12709 * server.c (main): Make variable multi_mode and attach volatile.
12710
12711 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12712
12713 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
12714 if the platform doesn't know about it.
12715
12716 2012-05-30 Jeff Kenton <jkenton@tilera.com>
12717
12718 * Makefile.in (SFILES): Add linux-tile-low.c.
12719 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
12720 * configure.srv: Handle tilegx-*-linux*.
12721 * linux-tile-low.c: New file.
12722
12723 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12724
12725 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
12726
12727 2012-05-24 Pedro Alves <palves@redhat.com>
12728
12729 PR gdb/7205
12730
12731 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
12732
12733 2012-05-24 Pedro Alves <palves@redhat.com>
12734
12735 PR gdb/7205
12736
12737 Replace target_signal with gdb_signal throughout.
12738
12739 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
12740
12741 * linux-low.c (linux_store_registers): Avoid the copying sequence
12742 when no data has been retrieved by ptrace.
12743
12744 2012-05-22 Will Deacon <will.deacon@arm.com>
12745
12746 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
12747 Include asm/ptrace.h.
12748 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
12749 already defined.
12750
12751 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
12752
12753 * linux-low.c (linux_store_registers): Don't re-retrieve data
12754 with ptrace that has already been obtained from /proc. Always
12755 copy any data retrieved with ptrace to the buffer supplied.
12756
12757 2012-05-11 Yao Qi <yao@codesourcery.com>
12758 Pedro Alves <palves@redhat.com>
12759
12760 * linux-low.c (enum stopping_threads_kind): New.
12761 (stopping_threads): Change type to `enum stopping_threads_kind'.
12762 (handle_extended_wait): If stopping and suspending threads, leave
12763 the new_lwp suspended too.
12764 (linux_wait_for_event): Adjust.
12765 (stop_all_lwps): Set `stopping_threads' to
12766 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
12767 whether we're suspending threads or just stopping them. Assert no
12768 recursion happens.
12769
12770 2012-04-29 Yao Qi <yao@codesourcery.com>
12771
12772 * server.h: Move some code to ...
12773 * gdbthread.h: ... here. New.
12774 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
12775 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
12776 (nto-low.o, win32-low.o): Likewise.
12777 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
12778 * regcache.c, remote-utils.c, server.c: Likewise.
12779 * target.c, tracepoint.c, win32-low.c: Likewise.
12780
12781 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12782
12783 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
12784 (PTRACE_ARG4_TYPE): Likewise.
12785 (PTRACE_XFER_TYPE): Likewise.
12786 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
12787 ptrace to PTRACE_ARG3_TYPE.
12788 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
12789 (PTRACE_ARG4_TYPE): Likewise.
12790 (PTRACE_XFER_TYPE): Likewise.
12791 (linux_detach_one_lwp): Cast fourth argument of
12792 ptrace to long then PTRACE_ARG4_TYPE.
12793 (regsets_fetch_inferior_registers): Cast third argument of
12794 ptrace to long then PTRACE_ARG3_TYPE.
12795 (regsets_store_inferior_registers): Likewise.
12796
12797 2012-04-20 Pedro Alves <palves@redhat.com>
12798
12799 * configure: Regenerate.
12800
12801 2012-04-19 Pedro Alves <palves@redhat.com>
12802
12803 * Makefile.in (GNULIB_BUILDDIR): New.
12804 (LIBGNU, INCGNU, GNULIB_H): Adjust.
12805 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
12806 (all, install-only, uninstall, clean-info, all-lib, clean): No
12807 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
12808 (maintainer-clean realclean distclean): Use subdir_do.
12809 (subdir_do): New.
12810 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
12811 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
12812 * acinclude.m4: Include acx_configure_dir.m4.
12813 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
12814 calls. Call AC_PROG_RANLIB. Configure gnulib using
12815 ACX_CONFIGURE_DIR.
12816 (GNULIB): New.
12817 (GNULIB_STDINT_H): Adjust.
12818 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
12819 * gdbreplay.c: Include build-gnulib/config.h.
12820 * server.h: Likewise.
12821 * aclocal.m4: Regenerate.
12822 * config.in: Regenerate.
12823 * configure: Regenerate.
12824
12825 2012-04-19 Pedro Alves <palves@redhat.com>
12826
12827 * Makefile.in (LIBGNU, INCGNU): Adjust.
12828 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
12829 (all, install-only, uninstall, clean-info, all-lib, clean)
12830 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
12831 * configure.ac: Adjust AC_OUTPUT output.
12832 * aclocal.m4: Regenerate.
12833 * configure: Regenerate.
12834
12835 2012-04-19 Pedro Alves <palves@redhat.com>
12836
12837 * Makefile.in (generated_files): New.
12838 (server_h): Remove the explicit dependency on config.h, and depend
12839 on $generated_files.
12840
12841 2012-04-19 Pedro Alves <palves@redhat.com>
12842
12843 * Makefile.in (INCGNU): Add -Ignulib.
12844
12845 2012-04-19 Pedro Alves <palves@redhat.com>
12846
12847 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
12848 (INCGNU): ... this, and spell out -I here.
12849 (GNULIB_LIB): Rename to ...
12850 (LIBGNU): ... this.
12851 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
12852
12853 2012-04-19 Pedro Alves <palves@redhat.com>
12854
12855 * config.in: Regenerate.
12856
12857 2012-04-19 Pedro Alves <palves@redhat.com>
12858
12859 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
12860 * server.h (memmem): Remove declaration.
12861 * config.in: Regenerate.
12862 * configure: Regenerate.
12863
12864 2012-04-19 Yao Qi <yao@codesourcery.com>
12865
12866 * Makefile.in (SFILES): Add common/vec.c.
12867 (OBS): Add vec.o.
12868 (vec.o): New rule.
12869
12870 2012-04-19 Yao Qi <yao@codesourcery.com>
12871
12872 * remote-utils.c (prepare_resume_reply): Replace with macro
12873 target_core_of_thread.
12874 * server.c (handle_qxfer_threads_proper): Likewise.
12875 * target.h (traget_core_of_thread): New macro.
12876
12877 2012-04-18 Pedro Alves <palves@redhat.com>
12878
12879 * aclocal.m4: Regenerate.
12880 * configure: Regenerate.
12881
12882 2012-04-16 Yao Qi <yao@codesourcery.com>
12883
12884 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
12885 duplicated on address.
12886
12887 2012-04-16 Yao Qi <yao@codesourcery.com>
12888
12889 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
12890 (struct tracepoint_action_ops) <send>: New field.
12891 (m_tracepoint_action_send, r_tracepoint_action_send): New.
12892 (agent_expr_send, x_tracepoint_action_send): New.
12893 (l_tracepoint_action_send): New.
12894 (cmd_qtdp): Download and install tracepoint
12895 according to `use_agent'.
12896 (run_inferior_command): Add one more parameter `len'.
12897 Update callers.
12898 (tracepoint_send_agent): New.
12899 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
12900
12901 2012-04-16 Yao Qi <yao@codesourcery.com>
12902
12903 * tracepoint.c (download_tracepoints): Moved to ...
12904 (cmd_qtstart): ... here.
12905
12906 2012-04-14 Yao Qi <yao@codesourcery.com>
12907
12908 * tracepoint.c: Include inttypes.h.
12909 (struct collect_memory_action): Use sized types.
12910 (struct tracepoint): Likewise.
12911 (cmd_qtdp, stop_tracing): Update print specifiers.
12912 (cmd_qtp, response_tracepoint): Likewise.
12913 (collect_data_at_tracepoint): Likewise.
12914 (collect_data_at_step): Likewise.
12915
12916 2012-04-14 Yao Qi <yao@codesourcery.com>
12917
12918 Import gnulib module inttypes.
12919 * aclocal.m4, config.in, configure: Regenerated.
12920
12921 2012-04-14 Yao Qi <yao@codesourcery.com>
12922
12923 * Makefile.in (maintainer-clean, realclean, distclean): Remove
12924 Makefile and config.status at last.
12925
12926 2012-04-13 Yao Qi <yao@codesourcery.com>
12927
12928 * tracepoint.c: Include stdint.h unconditionally.
12929
12930 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
12931
12932 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
12933 on BFD_HAVE_SYS_PROCFS_TYPE.
12934 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
12935 * configure: Regenerate.
12936 * config.in: Likewise.
12937
12938 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
12939
12940 * Makefile.in (clean): Also remove x32.c x32-linux.c
12941 x32-avx.c x32-avx-linux.c.
12942 (x32.o): New target.
12943 (x32.c): Likewise.
12944 (x32-linux.o): Likewise.
12945 (x32-linux.c): Likewise.
12946 (x32-avx.o): Likewise.
12947 (x32-avx.c): Likewise.
12948 (x32-avx-linux.o): Likewise.
12949 (x32-avx-linux.c): Likewise.
12950
12951 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
12952 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
12953 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
12954 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
12955 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
12956 i386/x32-avx-linux.xml.
12957
12958 * linux-x86-low.c (init_registers_x32_linux): New prototype.
12959 (init_registers_x32_avx_linux): Likwise.
12960 (x86_linux_update_xmltarget): Call init_registers_x32_linux
12961 or init_registers_x32_avx_linux if linux_is_elf64 is false.
12962
12963 2012-04-13 Pedro Alves <palves@redhat.com>
12964
12965 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
12966 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
12967 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
12968 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
12969 the sub-make.
12970
12971 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12972
12973 * linux-x86-low.c (compat_x32_clock_t): New.
12974 (compat_x32_siginfo_t): Likewise.
12975 (compat_x32_siginfo_from_siginfo): Likewise.
12976 (siginfo_from_compat_x32_siginfo): Likewise.
12977 (linux_is_elf64): Likewise.
12978 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
12979 and siginfo_from_compat_x32_siginfo for x32.
12980 (x86_arch_setup): Set linux_is_elf64.
12981
12982 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
12983
12984 PR gdb/13969
12985 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
12986 e_machine field.
12987 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
12988 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
12989 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
12990 compatible with process.
12991
12992 2012-04-12 Yao Qi <yao@codesourcery.com>
12993
12994 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
12995 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
12996 (install-only, install-info, clean): Handle sub dir gnulib.
12997 (all-lib, am--refresh): New targets.
12998 (memmem.o): Remove target.
12999 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
13000 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
13001 (AC_REPLACE_FUNCS): Remove memmem.
13002 Invoke gl_INIT and AM_INIT_AUTOMAKE.
13003 (AC_OUTPUT): Generate Makefile in gnulib/.
13004 * aclocal.m4, config.in, configure: Regenerated.
13005
13006 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
13007
13008 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
13009
13010 2012-04-05 Pedro Alves <palves@redhat.com>
13011
13012 -Werror=strict-aliasing
13013
13014 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
13015 pointer.
13016
13017 2012-04-04 Pedro Alves <palves@redhat.com>
13018
13019 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13020 (sparc_store_gregset_from_stack, sparc_store_gregset)
13021 (sparc_breakpoint_at): Fix formatting.
13022
13023 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
13024
13025 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
13026 are available.
13027 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
13028 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
13029 * config.in: Regenerate.
13030 * configure: Likewise.
13031
13032 2012-03-29 Pedro Alves <palves@redhat.com>
13033
13034 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
13035 Correct ptrace arguments.
13036
13037 2012-03-28 Pedro Alves <palves@redhat.com>
13038
13039 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
13040 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
13041 (IA64_FR1_REGNUM): New defines.
13042 (ia64_fetch_register): New.
13043 (the_low_target): Install it.
13044 * linux-low.h (struct linux_target_ops) <fetch_register>: New
13045 field.
13046 * linux-low.c (linux_fetch_registers): Try the
13047 the_low_target.fetch_register hook first.
13048
13049 * linux-arm-low.c (the_low_target): Adjust.
13050 * linux-bfin-low.c (the_low_target): Adjust.
13051 * linux-cris-low.c (the_low_target): Adjust.
13052 * linux-crisv32-low.c (the_low_target): Adjust.
13053 * linux-m32r-low.c (the_low_target): Adjust.
13054 * linux-m68k-low.c (the_low_target): Adjust.
13055 * linux-mips-low.c (the_low_target): Adjust.
13056 * linux-ppc-low.c (the_low_target): Adjust.
13057 * linux-s390-low.c (the_low_target): Adjust.
13058 * linux-sh-low.c (the_low_target): Adjust.
13059 * linux-sparc-low.c (the_low_target): Adjust.
13060 * linux-tic6x-low.c (the_low_target): Adjust.
13061 * linux-x86-low.c (the_low_target): Adjust.
13062 * linux-xtensa-low.c (the_low_target): Adjust.
13063
13064 2012-03-26 Pedro Alves <palves@redhat.com>
13065
13066 * server.c (handle_qxfer_libraries): Don't bail early if
13067 the_target->qxfer_libraries_svr4 is not NULL.
13068
13069 2012-03-26 Pedro Alves <palves@redhat.com>
13070
13071 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
13072
13073 2012-03-23 Pedro Alves <palves@redhat.com>
13074
13075 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
13076 "library-list-svr4" element's start tag when the the DSO list is
13077 empty.
13078
13079 2012-03-23 Pedro Alves <palves@redhat.com>
13080
13081 * linux-low.c (read_one_ptr): Read the inferior's pointer through
13082 a variable whose type size is the same as the inferior's pointer
13083 size.
13084
13085 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
13086
13087 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
13088 struct siginfo.
13089 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
13090 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
13091 * linux-low.h: Include <signal.h>.
13092 (struct siginfo): Remove forward declaration.
13093 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
13094 struct siginfo.
13095
13096 2012-03-21 Mike Frysinger <vapier@gentoo.org>
13097
13098 * .gitignore: Ignore more files.
13099
13100 2012-03-19 Pedro Alves <palves@redhat.com>
13101 Jan Kratochvil <jan.kratochvil@redhat.com>
13102
13103 * server.c (cont_thread, general_thread): Add describing comments.
13104 (start_inferior): Clear `cont_thread'.
13105 (handle_v_cont): Don't set `cont_thread' if resuming all threads
13106 of a process.
13107
13108 2012-03-15 Yao Qi <yao@codesourcery.com>
13109
13110 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
13111 handling to ...
13112 (cmd_qtdp): ... here.
13113
13114 2012-03-15 Yao Qi <yao@codesourcery.com>
13115
13116 * tracepoint.c (struct tracepoint_action_ops): New.
13117 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
13118 (m_tracepoint_action_download): New.
13119 (r_tracepoint_action_download): New.
13120 (x_tracepoint_action_download): New.
13121 (l_tracepoint_action_download): New.
13122 (add_tracepoint_action): Install `action->ops' according type.
13123 (download_tracepoint_1): Move code `download' function pointer
13124 of various tracepoint_action_ops.
13125
13126 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
13127
13128 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
13129 linux_ptrace_attach_warnings.
13130
13131 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
13132
13133 * Makefile.in (linux-ptrace.o): New.
13134 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
13135 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
13136 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
13137 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
13138 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
13139 of these targets.
13140 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
13141
13142 2012-03-08 Yao Qi <yao@codesourcery.com>
13143 Pedro Alves <palves@redhat.com>
13144
13145 Fix PR server/13392.
13146 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
13147 offset of JMP insn.
13148 * tracepoint.c (remove_tracepoint): New.
13149 (cmd_qtdp): Call remove_tracepoint when failed to install.
13150
13151 2012-03-07 Pedro Alves <palves@redhat.com>
13152
13153 * linux-low.c (get_detach_signal): New.
13154 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
13155 Pass on pending signals to PTRACE_DETACH. Check the result of the
13156 ptrace call.
13157 * server.c (program_signals, program_signals_p): New.
13158 (handle_general_set): Handle QProgramSignals.
13159 * server.h (program_signals, program_signals_p): Declare.
13160
13161 2012-03-05 Pedro Alves <palves@redhat.com>
13162 Jan Kratochvil <jan.kratochvil@redhat.com>
13163
13164 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
13165 New comment why.
13166
13167 2012-03-03 Yao Qi <yao@codesourcery.com>
13168
13169 * tracepoint.c (tracepoint_look_up_symbols): Update call to
13170 agent_look_up_symbols.
13171
13172 2012-03-03 Yao Qi <yao@codesourcery.com>
13173
13174 * Makefile.in (linux-low.o): Keep dependence on agent.h.
13175 (linux-x86-low.o): Likewise.
13176 * server.h: Remove in_process_agent_loaded.
13177 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
13178 common/agent.c.
13179 Update callers.
13180
13181 2012-03-03 Yao Qi <yao@codesourcery.com>
13182
13183 * tracepoint.c (gdb_agent_capability): New global.
13184 (in_process_agent_loaded_ust): Renamed to
13185 `in_process_agent_supports_ust'.
13186 Update callers.
13187 (in_process_agent_supports_ust): Call agent_capability_check.
13188 (clear_installed_tracepoints): Assert that agent supports
13189 agent.
13190
13191 2012-03-03 Yao Qi <yao@codesourcery.com>
13192
13193 * linux-low.c (linux_supports_agent): New.
13194 (linux_target_ops): Initialize field `supports_agent' with
13195 linux_supports_agent.
13196 * target.h (struct target_ops) <supports_agent>: New.
13197 (target_supports_agent): New macro.
13198 * server.c (handle_general_set): Handle packet 'QAgent'.
13199 (handle_query): Send `QAgent+'.
13200 * Makefile.in (server.o): Depends on agent.h.
13201
13202 2012-03-03 Yao Qi <yao@codesourcery.com>
13203
13204 * Makefile.in (OBS): Add agent.o.
13205 Add new rule for agent.o.
13206 Track dependence of tracepoint.c on agent.h.
13207 * tracepoint.c (run_inferior_command_1):
13208 (run_inferior_command): Call agent_run_command.
13209 (gdb_ust_connect_sync_socket): Deleted. Move it to
13210 common/agent.c.
13211 (resume_thread, stop_thread): Likewise.
13212 (gdb_ust_socket_init): Renamed to ...
13213 (gdb_agent_socket_init): ... New.
13214 (gdb_ust_thread): Renamed to ...
13215 (gdb_agent_helper_thread): ... New.
13216 (gdb_ust_init): Move some code to ...
13217 (gdb_agent_init): ... here. New.
13218 [HAVE_UST]: Call gdb_ust_init.
13219 (initialize_tracepoint_ftlib): Call gdb_agent_init.
13220 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
13221 * config.in, configure: Regenerated.
13222
13223 2012-03-02 Pedro Alves <palves@redhat.com>
13224
13225 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
13226 * linux-low.c (struct simple_pid_list): New.
13227 (stopped_pids): New a struct simple_pid_list pointer.
13228 (add_to_pid_list, pull_pid_from_list): New.
13229 (handle_extended_wait): Don't assume the first signal new children
13230 report is SIGSTOP. Adjust call to pull_pid_from_list.
13231 (linux_wait_for_lwp): Adjust.
13232
13233 2012-03-02 Yao Qi <yao@codesourcery.com>
13234
13235 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
13236 debug log.
13237
13238 2012-03-02 Yao Qi <yao@codesourcery.com>
13239
13240 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
13241 `stop_pc' and `tpoint'. Update caller.
13242
13243 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
13244
13245 * linux-low.h (linux_target_ops): Add regset_bitmap member.
13246 * linux-low.c (use_linux_regsets): New macro.
13247 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
13248 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
13249 (linux_register_in_regsets): New function.
13250 (usr_fetch_inferior_registers): Skip registers covered by
13251 regsets.
13252 (usr_store_inferior_registers): Likewise.
13253 (usr_fetch_inferior_registers): New macro.
13254 (usr_store_inferior_registers): Likewise.
13255 (linux_fetch_registers): Handle mixed regset/non-regset targets.
13256 (linux_store_registers): Likewise.
13257 * linux-mips-low.c (init_registers_mips_dsp_linux): New
13258 prototype.
13259 (init_registers_mips64_dsp_linux): Likewise.
13260 (init_registers_mips_linux): New macro.
13261 (init_registers_mips_dsp_linux): Likewise.
13262 (mips_dsp_num_regs): Likewise.
13263 (DSP_BASE, DSP_CONTROL): New fallback macros.
13264 (mips_base_regs): New macro.
13265 (mips_regmap): Use it. Fix the size.
13266 (mips_dsp_regmap): New variable.
13267 (mips_dsp_regset_bitmap): Likewise.
13268 (mips_arch_setup): New function.
13269 (mips_cannot_fetch_register): Use the_low_target.regmap rather
13270 than mips_regmap.
13271 (mips_cannot_store_register): Likewise.
13272 (the_low_target): Update .arch_setup, .num_regs and .regmap
13273 initializers. Add .regset_bitmap initializer.
13274 * linux-arm-low.c (the_low_target): Add .regset_bitmap
13275 initializer.
13276 * linux-bfin-low.c (the_low_target): Likewise.
13277 * linux-cris-low.c (the_low_target): Likewise.
13278 * linux-crisv32-low.c (the_low_target): Likewise.
13279 * linux-ia64-low.c (the_low_target): Likewise.
13280 * linux-m32r-low.c (the_low_target): Likewise.
13281 * linux-m68k-low.c (the_low_target): Likewise.
13282 * linux-ppc-low.c (the_low_target): Likewise.
13283 * linux-s390-low.c (the_low_target): Likewise.
13284 * linux-sh-low.c (the_low_target): Likewise.
13285 * linux-sparc-low.c (the_low_target): Likewise.
13286 * linux-tic6x-low.c (the_low_target): Likewise.
13287 * linux-x86-low.c (the_low_target): Likewise.
13288 * linux-xtensa-low.c (the_low_target): Likewise.
13289 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
13290 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
13291 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
13292 srv_xmlfiles.
13293 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
13294 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
13295
13296 2012-02-29 Yao Qi <yao@codesourcery.com>
13297 Pedro Alves <palves@redhat.com>
13298
13299 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
13300 `step_over_finished' is true.
13301
13302 2012-02-27 Pedro Alves <palves@redhat.com>
13303
13304 * linux-low.c (pid_is_stopped): Delete, moved to common/.
13305 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
13306
13307 2012-02-27 Pedro Alves <palves@redhat.com>
13308
13309 PR server/9684
13310 * linux-low.c (pid_is_stopped): New.
13311 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
13312
13313 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
13314
13315 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
13316 of conditions.
13317
13318 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
13319
13320 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
13321
13322 2012-02-24 Luis Machado <lgustavo@codesourcery>
13323
13324 * server.c (handle_query): Advertise support for target-side
13325 breakpoint condition evaluation.
13326 (process_point_options): New function.
13327 (process_serial_event): When inserting a breakpoint, check for
13328 a target-side condition that should be evaluated.
13329
13330 * mem-break.c: Include regcache.h and ax.h.
13331 (point_cond_list_t): New data structure.
13332 (breakpoint) <cond_list>: New field.
13333 (find_gdb_breakpoint_at): Make non-static.
13334 (delete_gdb_breakpoint_at): Clear any target-side
13335 conditions.
13336 (clear_gdb_breakpoint_conditions): New function.
13337 (add_condition_to_breakpoint): Likewise.
13338 (add_breakpoint_condition): Likewise.
13339 (gdb_condition_true_at_breakpoint): Likewise.
13340 (gdb_breakpoint_here): Return result directly instead
13341 of going through a local variable.
13342
13343 * mem-break.h (find_gdb_breakpoint_at): New prototype.
13344 (clear_gdb_breakpoint_conditions): Likewise.
13345 (add_breakpoint_condition): Likewise.
13346 (gdb_condition_true_at_breakpoint): Likewise.
13347
13348 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
13349 (need_step_over_p): Take target-side breakpoint condition into
13350 consideration.
13351
13352 2012-02-24 Luis Machado <lgustavo@codesourcery>
13353
13354 * server.h: Include tracepoint.h.
13355 (agent_mem_read, agent_get_trace_state_variable_value,
13356 agent_set_trace_state_variable_value,
13357 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
13358 get_set_tsv_func_addr): New prototypes.
13359
13360 * ax.h: New include file.
13361 * ax.c: New source file.
13362
13363 * tracepoint.c: Include ax.h.
13364 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
13365 agent_expr, eval_result_type): Move to ax.h.
13366 (parse_agent_expr): Rename to ...
13367 (gdb_parse_agent_expr): ... this, make it non-static and move
13368 to ax.h.
13369 (unparse_agent_expr) Rename to ...
13370 (gdb_unparse_agent_expr): ... this, make it non-static and move
13371 to ax.h.
13372 (eval_agent_expr): Rename to ...
13373 (eval_tracepoint_agent_expr): ... this.
13374 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
13375 forward declarations.
13376 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
13377 (agent_get_trace_state_variable_value): New function.
13378 (agent_set_trace_state_variable_value): New function.
13379 (cmd_qtdp): Call gdb_parse_agent_expr (...).
13380 (response_tracepoint): Call gdb_unparse_agent_expr (...).
13381 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
13382 (condition_true_at_tracepoint): Likewise.
13383 (parse_agent_expr): Rename to ...
13384 (gdb_parse_agent_expr): ... this and move to ax.c.
13385 (unparse_agent_expr): Rename to ...
13386 (gdb_unparse_agent_expr): ... this and move to ax.c.
13387 (gdb_agent_op_name): Move to ax.c.
13388 (eval_agent_expr): Rename to ...
13389 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
13390 and move to ax.c.
13391 (eval_tracepoint_agent_expr): New function.
13392 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
13393 non-static.
13394 (current_insn_ptr, emit_error, struct bytecode_address): Move to
13395 ax.c.
13396 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
13397 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
13398 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
13399 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
13400 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
13401 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
13402 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
13403 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
13404 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
13405 (compile_bytecodes): Remove forward declaration.
13406 (is_goto_target): Move to ax.c.
13407 (compile_bytecodes): Move to ax.c and call
13408 agent_get_trace_state_variable_value (...) and
13409 agent_set_trace_state_variable_value (...).
13410
13411 * Makefile.in: Update ax.c and IPA dependencies.
13412
13413 2012-02-24 Pedro Alves <palves@redhat.com>
13414
13415 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
13416 (cmd_bigqtbuffer_circular): ... this. Only handle
13417 'QTBuffer:circular:'.
13418 (handle_tracepoint_general_set): Adjust.
13419
13420 2012-02-16 Yao Qi <yao@codesourcery.com>
13421
13422 * inferiors.c: Move code to ...
13423 * dll.c: .... here. New.
13424 * server.h: Declare clear_dlls.
13425 * Makefile.in (SFILES): Add dll.c.
13426 (OBS): Add dll.o
13427 (dll.o): New rule.
13428
13429 2012-02-11 Yao Qi <yao@codesourcery.com>
13430
13431 * server.c: (handle_monitor_command): Add a new parameter
13432 `own_buf'.
13433 (handle_query): Update caller.
13434
13435 2012-02-09 Joel Brobecker <brobecker@adacore.com>
13436
13437 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
13438 * configure, config.in: Regenerate.
13439 * hostio.c: Provide an alternate implementation if HAVE_READLINK
13440 is not defined.
13441
13442 2012-02-02 Pedro Alves <palves@redhat.com>
13443
13444 Try SIGKILL first, then PTRACE_KILL.
13445 * linux-low.c (linux_kill_one_lwp): New.
13446 (linux_kill_one_lwp): Rename to ...
13447 (kill_one_lwp_callback): ... this. Use the new
13448 linux_kill_one_lwp.
13449
13450 2012-02-02 Pedro Alves <palves@redhat.com>
13451
13452 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
13453 inferior.
13454
13455 2012-01-27 Pedro Alves <palves@redhat.com>
13456
13457 * linux-low.c (linux_child_pid_to_exec_file): Delete.
13458 (elf_64_file_p): Make static.
13459 (linux_pid_exe_is_elf_64_file): New.
13460 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
13461 Delete declarations.
13462 (linux_pid_exe_is_elf_64_file): Declare.
13463 * linux-x86-low.c (x86_arch_setup): Use
13464 linux_pid_exe_is_elf_64_file.
13465
13466 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
13467
13468 * linux-low.c (linux_wait_for_event_1): Rename to ...
13469 (linux_wait_for_event): ... here and merge it with former
13470 linux_wait_for_event - new variable wait_ptid, use it.
13471 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
13472
13473 2012-01-23 Pedro Alves <palves@redhat.com>
13474
13475 * server.c (main): Avoid yet another case of infinite loop while
13476 detaching/killing after a longjmp.
13477
13478 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
13479
13480 Code cleanup.
13481 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
13482
13483 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
13484
13485 * hostio.c (handle_readlink): New function.
13486 (handle_vFile): Call it to handle "vFile:readlink" packets.
13487
13488 2012-01-20 Pedro Alves <palves@redhat.com>
13489 Ulrich Weigand <ulrich.weigand@linaro.org>
13490
13491 * server.c (handle_v_requests): Only support vAttach and vRun to
13492 start multiple processes when in extended protocol mode.
13493
13494 2012-01-17 Pedro Alves <palves@redhat.com>
13495
13496 * tracepoint.c (initialize_tracepoint): Use mmap instead of
13497 memalign plus mprotect to allocate the scratch buffer.
13498
13499 2012-01-13 Pedro Alves <palves@redhat.com>
13500
13501 * server.c (attach_inferior): Clear `cont_thread'.
13502
13503 2012-01-13 Pedro Alves <palves@redhat.com>
13504
13505 * server.c (main): Avoid infinite loop while detaching/killing
13506 after a longjmp.
13507
13508 2012-01-09 Doug Evans <dje@google.com>
13509
13510 * server.c (start_inferior): Set last_ptid in --wrapper case.
13511
13512 2012-01-06 Yao Qi <yao@codesourcery.com>
13513
13514 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
13515 defined.
13516 [IN_PROCESS_AGENT] (debug_agent): New global variable.
13517
13518 2012-01-04 Yao Qi <yao@codesourcery.com>
13519
13520 * tracepoint.c (cmd_qtdp): Print debug message
13521 for static tracepoint.
13522
13523 2012-01-04 Yao Qi <yao@codesourcery.com>
13524
13525 * tracepoint.c (trace_vdebug): Differentiate debug message
13526 between gdbserver and IPA.
13527
13528 2012-01-03 Yao Qi <yao@codesourcery.com>
13529
13530 * tracepoint.c (tracepoint_was_hit): Don't collect for
13531 static tracepoint.
13532
13533 2012-01-02 Joel Brobecker <brobecker@adacore.com>
13534
13535 * terminal.h: Reformat copyright header.
13536
13537 2012-01-02 Joel Brobecker <brobecker@adacore.com>
13538
13539 * server.c (gdbserver_version): Update copyright year.
13540 * gdbreplay.c (gdbreplay_version): Likewise.
13541
13542 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
13543
13544 * linux-low.c (linux_create_inferior): Put empty if clause for write.
13545
13546 Revert:
13547 2011-12-18 Hui Zhu <teawater@gmail.com>
13548 * linux-low.c (linux_create_inferior): Save return value to ret.
13549
13550 2011-12-18 Hui Zhu <teawater@gmail.com>
13551
13552 * linux-low.c (linux_create_inferior): Save return value to ret.
13553
13554 2011-12-16 Doug Evans <dje@google.com>
13555
13556 * linux-low.c (linux_create_inferior): If stdio connection,
13557 redirect stdin from /dev/null, stdout to stderr.
13558 * remote-utils.c (remote_is_stdio): New static global.
13559 (remote_connection_is_stdio): New function.
13560 (remote_prepare): Handle stdio connection.
13561 (remote_open): Ditto.
13562 (remote_close): Don't close stdin for stdio connections.
13563 (read_prim,write_prim): New functions. Replace all calls to
13564 read/write to these.
13565 * server.c (main): Watch for "-" argument. Move call to
13566 remote_prepare before start_inferior.
13567 * server.h (STDIO_CONNECTION_NAME): New macro.
13568 (remote_connection_is_stdio): Declare.
13569
13570 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
13571 in debugging output.
13572
13573 2011-12-15 Yao Qi <yao@codesourcery.com>
13574
13575 * tracepoint.c: Include sys/syscall.h.
13576 (gdb_ust_thread): Remove preprocessor conditional.
13577
13578 2011-12-14 Pedro Alves <pedro@codesourcery.com>
13579
13580 * linux-low.c (linux_detach_one_lwp): Call
13581 the_low_target.prepare_to_resume before detaching.
13582
13583 2011-12-14 Yao Qi <yao@codesourcery.com>
13584
13585 * tracepoint.c (gdb_ust_thread): Don't ignore return value
13586 of write.
13587
13588 2011-12-14 Yao Qi <yao@codesourcery.com>
13589
13590 * i386-low.c (i386_low_stopped_data_address): Initialize local
13591 variable `control'.
13592
13593 2011-12-13 Pedro Alves <pedro@codesourcery.com>
13594
13595 PR remote/13492
13596
13597 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
13598 DR_CONTROL unless necessary. Extend comments.
13599 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
13600 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
13601
13602 2011-12-13 Yao Qi <yao@codesourcery.com>
13603
13604 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
13605 macros.
13606 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
13607
13608 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
13609
13610 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
13611 Print new debug message for such case.
13612
13613 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
13614
13615 Fix overlapping memcpy.
13616 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
13617 the read_inferior_memory transfer.
13618 (delete_fast_tracepoint_jump): New variable buf. Use it for the
13619 write_inferior_memory transfer.
13620 (set_fast_tracepoint_jump): New variable buf. Use it for the
13621 read_inferior_memory and write_inferior_memory transfers.
13622 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
13623 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
13624 Use it for the write_inferior_memory transfer.
13625 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
13626 buffers.
13627
13628 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
13629
13630 * linux-low.c (fetch_register, store_register): Make code
13631 consistent, fix formatting.
13632
13633 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
13634
13635 * linux-low.c (usr_store_inferior_registers): Factor out code
13636 to handle individual registers into...
13637 (store_register): ... this new function.
13638
13639 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
13640
13641 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
13642 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
13643 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
13644 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
13645 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
13646 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
13647 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
13648 (srv_xmlfiles): Add new XML files.
13649
13650 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
13651 and <sys/uio.h>.
13652 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
13653 (init_registers_s390_linux32v1): Add prototype.
13654 (init_registers_s390_linux32v2): Likewise.
13655 (init_registers_s390_linux64v1): Likewise.
13656 (init_registers_s390_linux64v2): Likewise.
13657 (init_registers_s390x_linux64v1): Likewise.
13658 (init_registers_s390x_linux64v2): Likewise.
13659 (s390_num_regs): Increment to 52.
13660 (s390_regmap): Add orig_r2 register.
13661 (s390_num_regs_3264): Increment to 68.
13662 (s390_regmap_3264): Add orig_r2 register.
13663 (s390_collect_ptrace_register): Handle orig_r2 register.
13664 (s390_supply_ptrace_register): Likewise.
13665 (s390_fill_last_break): New function.
13666 (s390_store_last_break): Likewise.
13667 (s390_fill_system_call): New function.
13668 (s390_store_system_call): Likewise.
13669 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
13670 register sets.
13671 (s390_check_regset): New function.
13672 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
13673 NT_S390_SYSTEM_CALL regsets and use appropriate description.
13674 Update target_regsets for available register sets.
13675
13676 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
13677 Jan Kratochvil <jan.kratochvil@redhat.com>
13678
13679 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
13680 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
13681 New.
13682 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
13683 * linux-low.h (struct process_info_private): New member r_debug.
13684 * server.c (handle_qxfer_libraries): Call
13685 the_target->qxfer_libraries_svr4.
13686 (handle_qxfer_libraries_svr4): New function.
13687 (qxfer_packets): New entry "libraries-svr4".
13688 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
13689 * target.h (struct target_ops): New member qxfer_libraries_svr4.
13690 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
13691 PACKET_qXfer_libraries_svr4.
13692
13693 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
13694
13695 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
13696 PSW address/mask between 8-byte and 16-byte formats.
13697 (s390_supply_ptrace_register): Likewise.
13698 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
13699 basic addressing mode bit.
13700
13701 2011-11-24 Stan Shebs <stan@codesourcery.com>
13702
13703 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
13704
13705 2011-11-17 Stan Shebs <stan@codesourcery.com>
13706
13707 * tracepoint.c (struct tracepoint): New field traceframe_usage.
13708 (tracing_start_time): New global.
13709 (tracing_stop_time): New global.
13710 (tracing_user_name): New global.
13711 (tracing_notes): New global.
13712 (tracing_stop_note): New global.
13713 (cmd_qtstart): Set traceframe_usage, start_time.
13714 (stop_tracing): Set stop_time.
13715 (cmd_qtstatus): Report additional status.
13716 (cmd_qtp): New function.
13717 (handle_tracepoint_query): Call it.
13718 (cmd_qtnotes): New function.
13719 (handle_tracepoint_general_set): Call it.
13720 (get_timestamp): Rename from tsv_get_timestamp.
13721
13722 2011-11-14 Stan Shebs <stan@codesourcery.com>
13723 Kwok Cheung Yeung <kcy@codesourcery.com>
13724
13725 * linux-x86-low.c (small_jump_insn): New.
13726 (i386_install_fast_tracepoint_jump_pad): Add arguments for
13727 trampoline and error message, build a trampoline and issue a small
13728 jump instruction to it.
13729 (x86_install_fast_tracepoint_jump_pad): Add arguments for
13730 trampoline and error message.
13731 (x86_get_min_fast_tracepoint_insn_len): New.
13732 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
13733 * linux-low.h (struct linux_target_ops): Add arguments to
13734 install_fast_tracepoint_jump_pad operation, add new operation.
13735 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
13736 arguments.
13737 (linux_get_min_fast_tracepoint_insn_len): New function.
13738 (linux_target_op): Add new operation.
13739 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
13740 (gdb_trampoline_buffer_end): Ditto.
13741 (gdb_trampoline_buffer_error): Ditto.
13742 (struct ipa_sym_addresses): Add fields for new IPA variables.
13743 (symbol_list): Add entries for new IPA variables.
13744 (struct tracepoint): Add fields to hold the address range of the
13745 trampoline used by the tracepoint.
13746 (trampoline_buffer_head): New static variable.
13747 (trampoline_buffer_tail): Ditto.
13748 (claim_trampoline_space): New function.
13749 (have_fast_tracepoint_trampoline_buffer): New function.
13750 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
13751 structure.
13752 (install_fast_tracepoint): Ditto, also add error buffer argument.
13753 (cmd_qtminftpilen): New function.
13754 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
13755 (fast_tracepoint_from_trampoline_address): New function.
13756 (fast_tracepoint_collecting): Handle trampoline as part of jump
13757 pad space.
13758 (set_trampoline_buffer_space): New function.
13759 (initialize_tracepoint): Initialize new IPA variables.
13760 * target.h (struct target_ops): Add arguments to
13761 install_fast_tracepoint_jump_pad operation, add new
13762 get_min_fast_tracepoint_insn_len operation.
13763 (target_get_min_fast_tracepoint_insn_len): New.
13764 (install_fast_tracepoint_jump_pad): Add arguments.
13765 * server.h (IPA_BUFSIZ): Define.
13766 * linux-i386-ipa.c: Include extra header files.
13767 (initialize_fast_tracepoint_trampoline_buffer): New function.
13768 (initialize_low_tracepoint): Call it.
13769 * server.h (set_trampoline_buffer_space): Declare.
13770 (claim_trampoline_space): Ditto.
13771 (have_fast_tracepoint_trampoline_buffer): Ditto.
13772
13773 2011-11-14 Yao Qi <yao@codesourcery.com>
13774
13775 * server.c (handle_query): Handle InstallInTrace for qSupported.
13776 * tracepoint.c (add_tracepoint): Sort list.
13777 (install_tracepoint, download_tracepoint): New.
13778 (cmd_qtdp): Call them to install and download tracepoints.
13779 (sort_tracepoints): Removed.
13780 (cmd_qtstart): Update.
13781
13782 2011-11-14 Yao Qi <yao@codesourcery.com>
13783
13784 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
13785 * mem-break.h: Declare.
13786 * tracepoint.c (cmd_qtstart): Move some code to ...
13787 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
13788 New.
13789 (download_tracepoints): Move some code to ...
13790 (download_tracepoint_1): ... here. New.
13791
13792 2011-11-08 Yao Qi <yao@codesourcery.com>
13793
13794 * remote-utils.c (relocate_instruction): A comment fix.
13795
13796 2011-11-07 Joel Brobecker <brobecker@adacore.com>
13797
13798 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
13799 (i386_dr_low_get_control, i386_dr_low_get_status): Use
13800 dr_status_mirror and dr_control_mirror from debug_reg_state.
13801 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
13802 (i386_initial_stuff): Remove use of deleted globals.
13803 (i386_get_thread_context, i386_set_thread_context,
13804 i386_thread_added): Use dr_status_mirror and dr_control_mirror
13805 from debug_reg_state.
13806
13807 2011-11-05 Yao Qi <yao@codesourcery.com>
13808
13809 * tracepoint.c (gdb_collect): Loop over tracepoints of same
13810 address as TPOINT's.
13811
13812 2011-11-02 Stan Shebs <stan@codesourcery.com>
13813
13814 * tracepoint.c (agent_mem_read_string): New function.
13815 (eval_agent_expr): Call it for tracenz.
13816 * server.c (handle_query): Report support for tracenz.
13817
13818 2011-11-02 Yao Qi <yao@codesourcery.com>
13819
13820 * tracepoint.c (cmd_qtstart): Remove unused local variables.
13821
13822 2011-11-02 Yao Qi <yao@codesourcery.com>
13823
13824 * target.h: Fix a typo in comment.
13825
13826 2011-10-31 Pedro Alves <pedro@codesourcery.com>
13827
13828 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
13829 clobber the breakpoints' shadows with fast tracepoint jumps.
13830 * mem-break.h (check_mem_write): Add `myaddr' parameter.
13831 * target.c (write_inferior_memory): Also pass MYADDR down to
13832 check_mem_write.
13833
13834 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
13835
13836 * configure.ac: Check support for personality routine.
13837 * configure: Regenerate.
13838 * config.in: Likewise.
13839 * linux-low.c: Include <sys/personality.h>.
13840 Define ADDR_NO_RANDOMIZE if necessary.
13841 (linux_create_inferior): Disable address space randomization when
13842 forking inferior, if requested.
13843 (linux_supports_disable_randomization): New function.
13844 (linux_target_ops): Install it.
13845 * server.h (disable_randomization): Declare.
13846 * server.c (disable_randomization): New global variable.
13847 (handle_general_set): Handle QDisableRandomization.
13848 (handle_query): Likewise for qSupported.
13849 (main): Support --disable-randomization and --no-disable-randomization
13850 command line arguments.
13851 * target.h (struct target_ops): Add supports_disable_randomization.
13852 (target_supports_disable_randomization): New macro.
13853
13854 2011-09-29 Mike Frysinger <vapier@gentoo.org>
13855
13856 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
13857 ifdef check.
13858 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
13859 [!PT_GETDSBT] (target_loadmap): New definition.
13860 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
13861 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
13862 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
13863 and PT_GETDSBT to LINUX_LOADMAP.
13864 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
13865 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
13866
13867 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13868
13869 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
13870 (arm_linux_hwbp_cap): New static variable.
13871 (arm_linux_get_hwbp_cap): Replace by ...
13872 (arm_linux_init_hwbp_cap): ... this new function.
13873 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
13874 (arm_linux_get_hw_watchpoint_count): Likewise.
13875 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13876 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
13877 (arm_prepare_to_resume): Use perror_with_name instead of error.
13878
13879 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
13880
13881 * linux-arm-low.c: Include <signal.h>.
13882 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
13883 (struct arm_linux_hwbp_cap): New data type.
13884 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
13885 (struct arm_linux_hw_breakpoint): New data type.
13886 (MAX_BPTS, MAX_WPTS): Define.
13887 (struct arch_process_info, struct arch_lwp_info): New data types.
13888 (arm_linux_get_hwbp_cap): New function.
13889 (arm_linux_get_hw_breakpoint_count): Likewise.
13890 (arm_linux_get_hw_watchpoint_count): Likewise.
13891 (arm_linux_get_hw_watchpoint_max_length): Likewise.
13892 (arm_hwbp_control_initialize): Likewise.
13893 (arm_hwbp_control_is_enabled): Likewise.
13894 (arm_hwbp_control_is_initialized): Likewise.
13895 (arm_hwbp_control_disable): Likewise.
13896 (arm_linux_hw_breakpoint_equal): Likewise.
13897 (arm_linux_hw_point_initialize): Likewise.
13898 (struct update_registers_data): New data structure.
13899 (update_registers_callback: New function.
13900 (arm_insert_point): Likewise.
13901 (arm_remove_point): Likewise.
13902 (arm_stopped_by_watchpoint): Likewise.
13903 (arm_stopped_data_address): Likewise.
13904 (arm_new_process): Likewise.
13905 (arm_new_thread): Likewise.
13906 (arm_prepare_to_resume): Likewise.
13907 (the_low_target): Register arm_insert_point, arm_remove_point,
13908 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
13909 arm_new_thread, and arm_prepare_to_resume.
13910
13911 2011-09-15 Stan Shebs <stan@codesourcery.com>
13912
13913 * server.h (struct emit_ops): Add compare-goto fields.
13914 * tracepoint.c (gdb_agent_op_sizes): New table.
13915 (emit_eq_goto): New function.
13916 (emit_ne_goto): New function.
13917 (emit_lt_goto): New function.
13918 (emit_le_goto): New function.
13919 (emit_gt_goto): New function.
13920 (emit_ge_goto): New function.
13921 (is_goto_target): New function.
13922 (compile_bytecodes): Recognize special cases of compare-goto
13923 combinations and call specialized emitters for them.
13924 * linux-x86-low.c (amd64_emit_eq_goto): New function.
13925 (amd64_emit_ne_goto): New function.
13926 (amd64_emit_lt_goto): New function.
13927 (amd64_emit_le_goto): New function.
13928 (amd64_emit_gt_goto): New function.
13929 (amd64_emit_ge_goto): New function.
13930 (amd64_emit_ops): Add the new functions.
13931 (i386_emit_eq_goto): New function.
13932 (i386_emit_ne_goto): New function.
13933 (i386_emit_lt_goto): New function.
13934 (i386_emit_le_goto): New function.
13935 (i386_emit_gt_goto): New function.
13936 (i386_emit_ge_goto): New function.
13937 (i386_emit_ops): Add the new functions.
13938
13939 2011-09-08 Stan Shebs <stan@codesourcery.com>
13940
13941 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
13942 (i386_emit_epilogue): Restore %ebx.
13943
13944 2011-08-31 Jie Zhang <jzhang918@gmail.com>
13945
13946 * server.c (step_thread): Remove definition.
13947 (process_serial_event): Don't handle Hs.
13948 * server.h (step_thread): Remove declaration.
13949 * target.c (set_desired_inferior): Remove use of step_thread.
13950
13951 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13952
13953 * linux-low.c: Include linux-procfs.h.
13954 (linux_attach_lwp_1): Update comments.
13955 (linux_attach): Scan for existing threads when attaching to a
13956 process that is the tgid.
13957 * Makefile.in: Update dependencies.
13958
13959 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
13960
13961 * configure.srv: Add linux-procfs.o dependencies.
13962
13963 2011-08-14 Yao Qi <yao@codesourcery.com>
13964
13965 * target.h (struct target_ops): Fix indent.
13966 * win32-low.c (win32_target_ops): Fix comment.
13967
13968 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
13969 Yao Qi <yao@codesourcery.com>
13970
13971 * Makefile.in (clean): Remove tic6x-*.c files.
13972 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
13973 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
13974 (tic6x-c64xp-linux.c): Likewise.
13975 * configure.srv: Add support for tic6x-*-uclinux.
13976 * linux-tic6x-low.c: New.
13977 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
13978
13979 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
13980 Yao Qi <yao@codesourcery.com>
13981
13982 * target.h (struct target_ops): Add read_loadmap.
13983 * linux-low.c (struct target_loadseg): New type.
13984 (struct target_loadmap): New type.
13985 (linux_read_loadmap): New function.
13986 (linux_target_ops): Add linux_read_loadmap.
13987 * server.c (handle_query): Support qXfer:fdpic:read packet.
13988 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
13989 to NULL.
13990
13991 2011-08-05 Eli Zaretskii <eliz@gnu.org>
13992
13993 * win32-low.c: Include <stdint.h>.
13994
13995 2011-07-22 Pedro Alves <pedro@codesourcery.com>
13996
13997 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
13998 to the inferior here.
13999 (i386_remove_aligned_watchpoint): Ditto.
14000 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
14001 fit part of the watchpoint in the debug registers.
14002 (i386_update_inferior_debug_regs): New.
14003 (i386_low_insert_watchpoint): Work on a local mirror of the debug
14004 registers, and only update the inferior on success.
14005 (i386_low_remove_watchpoint): Ditto.
14006
14007 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
14008
14009 * linux-low.c (compare_ints, unique, list_threads, show_process,
14010 linux_core_of_thread): Delete.
14011 (linux_target_ops): Change linux_core_of_thread to
14012 linux_common_core_of_thread.
14013 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
14014 * utils.c (malloc_failure): Change type of argument.
14015 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
14016 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
14017 common/linux-osdata.c, common/ptid.c and common/buffer.c.
14018 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
14019 (IPA_OBJS): Add common-utils-ipa.o.
14020 (ptid_h, linux_osdata_h): New macros.
14021 (server_h): Add common/common-utils.h, common/xml-utils.h,
14022 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
14023 common/ptid.h.
14024 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
14025 ptid.o, buffer.o): New rules.
14026 (linux-low.o): Add common/linux-osdata.h as a dependency.
14027 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
14028 * configure.ac: Add AC_HEADER_DIRENT check.
14029 * config.in: Regenerate.
14030 * configure: Regenerate.
14031 * remote-utils.c (xml_escape_text): Delete.
14032 (buffer_grow, buffer_free, buffer_init, buffer_finish,
14033 buffer_xml_printf): Move to common/buffer.c.
14034 * server.c (main): Remove call to initialize_inferiors.
14035 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
14036 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
14037 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
14038 internal_error, gdb_assert, gdb_assert_fail): Delete.
14039 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
14040 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
14041 common/buffer.h.
14042 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
14043 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
14044 initialize_inferiors): Delete.
14045
14046 2011-07-20 Pedro Alves <pedro@codesourcery.com>
14047
14048 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
14049 symbol error.
14050
14051 2011-05-31 Pedro Alves <pedro@codesourcery.com>
14052
14053 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
14054 assertion.
14055 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
14056
14057 2011-05-26 Yao Qi <yao@codesourcery.com>
14058
14059 * Makefile.in (thread-db.o): Track dependence to
14060 common/gdb_thread_db.h.
14061 * thread-db.c: include gdb_thread_db.h from right place.
14062
14063 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
14064
14065 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
14066 __FILE__ and __LINE__ to internal_error.
14067
14068 2011-05-13 Doug Evans <dje@google.com>
14069
14070 * thread-db.c (try_thread_db_load_from_sdir): New function.
14071 (try_thread_db_load_from_dir): New function.
14072 (thread_db_load_search): Handle $sdir, ignore $pdir.
14073 Remove trying of system directories if search of
14074 libthread-db-search-path fails, that is now done via $sdir.
14075
14076 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
14077
14078 * server.c (handle_query): Add EnableDisableTracepoints to the list
14079 of supported features.
14080 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
14081 tracepoints.
14082 (cmd_qtenable_disable): New.
14083 (cmd_qtstart): Install tracepoints even if disabled.
14084 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
14085 receiving a QTEnable or QTDisable packet.
14086 (gdb_collect): Skip data collection if fast tracepoint is disabled.
14087 (ust_marker_to_static_tracepoint): Do not ignore disabled static
14088 tracepoints.
14089 (gdb_probe): Skip data collection if static tracepoint is disabled.
14090
14091 2011-05-10 Doug Evans <dje@google.com>
14092
14093 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
14094
14095 2011-05-04 Doug Evans <dje@google.com>
14096
14097 * linux-low.c (linux_join): Skip process lookup.
14098 * spu-low.c (spu_join): Ditto.
14099 * server.c (join_inferiors_callback): Delete.
14100 (process_serial_event): For 'D' packet (detach) call join_inferior
14101 directly.
14102
14103 2011-05-04 Joseph Myers <joseph@codesourcery.com>
14104
14105 * README: Don't mention xscale*-*-linux*.
14106 * configure.srv (xscale*-*-linux*): Don't handle target.
14107
14108 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
14109
14110 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
14111 casting pointers.
14112 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
14113 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
14114 (i386_emit_void_call_2): Likewise.
14115
14116 2011-04-26 Yao Qi <yao@codesourcery.com>
14117
14118 * linux-low.c: Move common macros to linux-ptrace.h.
14119 Include linux-ptrace.h.
14120 * Makefile.in (linux_ptrace_h): New.
14121 (linux-low.o): Depends on linux-ptrace.h.
14122
14123 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
14124
14125 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
14126 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
14127 (remote_prepare): New function with most of the TCP code from ...
14128 (remote_open): ... here. Detect PORT here unconditionally. Move also
14129 setting transport_is_reliable.
14130 * server.c (run_once): New variable.
14131 (gdbserver_usage): Document it.
14132 (main): Set run_once for `--once'. Call remote_prepare. Exit after
14133 the first run if RUN_ONCE.
14134 * server.h (run_once, remote_prepare): New declarations.
14135
14136 2011-04-19 Tom Tromey <tromey@redhat.com>
14137
14138 * win32-low.c (handle_load_dll): Remove duplicate "the".
14139
14140 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
14141
14142 Remove support for old Cygwin 1.5 versions.
14143 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
14144 function to avoid warning.
14145 (win32_add_one_solib): Use cygwin_conv_path function to avoid
14146 warning.
14147
14148 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
14149
14150 * gdbserver/server.h (Macro _): Define it if not available.
14151
14152 2011-03-14 Michael Snyder <msnyder@vmware.com>
14153
14154 * hostio.c (handle_close): Remove unnecessary null test.
14155
14156 2011-03-10 Joel Brobecker <brobecker@adacore.com>
14157
14158 * Makefile.in (maintainer-clean realclean distclean): Remove
14159 "make ... subdir_do" command.
14160
14161 2011-03-10 Michael Snyder <msnyder@vmware.com>
14162
14163 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
14164
14165 * server.c (handle_v_run): Free alloced buffer on early return.
14166
14167 2011-03-09 Yao Qi <yao@codesourcery.com>
14168
14169 Revert:
14170 2011-03-04 Yao Qi <yao@codesourcery.com>
14171
14172 * Makefile.in: Remove GNU make feature --directory.
14173
14174 2011-03-05 Yao Qi <yao@codesourcery.com>
14175
14176 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
14177 (subdir_do): New make target. Copied from gdb/Makefile.
14178 (maintainer-clean, realclean, distclean, clean): Call corresponding
14179 make targets in common/Makefile.
14180
14181 2011-02-11 Yao Qi <yao@codesourcery.com>
14182
14183 * configure.ac: Call AC_PROG_RANLIB.
14184 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
14185 * configure: Regenerate.
14186
14187 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14188
14189 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
14190
14191 2011-03-06 Yao Qi <yao@codesourcery.com>
14192
14193 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
14194
14195 2011-03-05 Yao Qi <yao@codesourcery.com>
14196
14197 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
14198 (subdir_do): New make target. Copied from gdb/Makefile.
14199 (maintainer-clean, realclean, distclean, clean): Call corresponding
14200 make targets in common/Makefile.
14201
14202 2011-03-04 Yao Qi <yao@codesourcery.com>
14203
14204 * Makefile.in: Remove GNU make feature --directory.
14205
14206 2011-03-04 Michael Snyder <msnyder@vmware.com>
14207
14208 * server.c (queue_stop_reply): Call xmalloc not malloc.
14209
14210 2011-03-02 Michael Snyder <msnyder@vmware.com>
14211
14212 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
14213
14214 2011-02-28 Michael Snyder <msnyder@vmware.com>
14215
14216 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
14217 (cmd_qtframe): Ditto.
14218 (cmd_qtbuffer): Ditto.
14219 (cmd_bigqtbuffer): Ditto.
14220
14221 * utils.c (decimal2str): Initialize 'width' to nine, then
14222 don't mess with it.
14223
14224 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14225
14226 * hostio.c (require_data): Free *data, not data.
14227
14228 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14229
14230 * hostio.c (require_data): Use free, not xfree.
14231
14232 2011-02-27 Michael Snyder <msnyder@vmware.com>
14233
14234 * server.c (handle_query): Discard unused value.
14235
14236 * hostio.c (require_data): Free malloc memory before returning
14237 error.
14238
14239 2011-02-26 Michael Snyder <msnyder@vmware.com>
14240
14241 * linux-low.c (list_threads): Call closedir for dirent.
14242
14243 2011-02-27 Michael Snyder <msnyder@vmware.com>
14244
14245 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
14246 a case statement falls through.
14247
14248 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
14249
14250 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
14251 in comparison.
14252
14253 2011-02-26 Michael Snyder <msnyder@vmware.com>
14254
14255 * utils.c (decimal2str): Eliminate dead code and dead param.
14256 (pulongest): Drop dead param from call to decimal2str.
14257 (plongest): Ditto.
14258
14259 2011-02-24 Joel Brobecker <brobecker@adacore.com>
14260
14261 Revert the following patch (not approved yet):
14262 2011-02-21 Hui Zhu <teawater@gmail.com>
14263 * tracepoint.c (tp_printf): New function.
14264 (eval_agent_expr): Handle gdb_agent_op_printf.
14265
14266 2011-02-21 Hui Zhu <teawater@gmail.com>
14267
14268 * tracepoint.c (tp_printf): New function.
14269 (eval_agent_expr): Handle gdb_agent_op_printf.
14270
14271 2011-02-18 Tom Tromey <tromey@redhat.com>
14272
14273 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
14274 (tracepoint.o): Likewise.
14275 * tracepoint.c (enum gdb_agent_op): Use ax.def.
14276 (gdb_agent_op_names): Likewise.
14277
14278 2011-02-18 Tom Tromey <tromey@redhat.com>
14279
14280 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
14281 gdb_agent_op_rot>: New constants.
14282 (gdb_agent_op_names): Add pick and roll.
14283 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
14284 cases.
14285
14286 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
14287
14288 * aclocal.m4: Regenerated with aclocal-1.11.1.
14289
14290 2011-02-14 Pedro Alves <pedro@codesourcery.com>
14291
14292 * server.c (handle_qxfer_traceframe_info): New.
14293 (qxfer_packets): Register "traceframe-info".
14294 (handle_query): Report support for qXfer:traceframe-info:read+.
14295 * tracepoint.c (match_blocktype): New.
14296 (traceframe_find_block_type): Rename to ...
14297 (traceframe_walk_blocks): ... this. Add callback filter argument,
14298 and use it.
14299 (traceframe_find_block_type): New, reimplemented on top of
14300 traceframe_walk_blocks.
14301 (build_traceframe_info_xml): New.
14302 (traceframe_read_info): New.
14303 * server.h (traceframe_read_info): Declare.
14304
14305 2011-02-11 Yao Qi <yao@codesourcery.com>
14306
14307 * configure.ac: Call AC_PROG_RANLIB.
14308 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
14309 * configure: Regenerate.
14310
14311 2011-02-07 Pedro Alves <pedro@codesourcery.com>
14312
14313 * server.c (gdb_read_memory): Change return semantics to allow
14314 partial transfers.
14315 (handle_search_memory_1): Adjust.
14316 (process_serial_event) <'m' packet>: Handle partial transfers.
14317 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
14318
14319 2011-01-28 Pedro Alves <pedro@codesourcery.com>
14320
14321 * regcache.c (init_register_cache): Initialize
14322 regcache->register_status.
14323 (free_register_cache): Release regcache->register_status.
14324 (regcache_cpy): Copy register_status.
14325 (registers_to_string): Print 'x's for unavailable registers.
14326 (supply_register): Mark the register's status valid or
14327 unavailable, depending on whether a buffer was passed in or not.
14328 (supply_register_zeroed): New.
14329 (supply_regblock): Mark the registers' status valid or
14330 unavailable, depending on whether a buffer was passed in or not.
14331 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
14332 (struct regcache): New `register_status' field.
14333 (supply_register_zeroed): Declare.
14334 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
14335 supply_register_zeroed, rather than passing a NULL buffer to
14336 supply_register.
14337 * tracepoint.c (fetch_traceframe_registers): Update comment.
14338
14339 2011-01-28 Pedro Alves <pedro@codesourcery.com>
14340
14341 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
14342 buffer explicit.
14343
14344 2011-01-25 Pedro Alves <pedro@codesourcery.com>
14345
14346 * server.h (decode_xfer_write): Change prototype.
14347 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
14348 and don't extract the annex here.
14349 * server.c (decode_xfer_read): Remove `annex' parameter,
14350 and don't extract the annex here.
14351 (decode_xfer): New.
14352 (struct qxfer): New.
14353 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
14354 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
14355 (handle_qxfer_statictrace): New functions, abstracted out from
14356 handle_query, and made to use the struct qxfer interface.
14357 (handle_threads_qxfer_proper): Rename to ...
14358 (handle_qxfer_threads_proper): ... this.
14359 (handle_threads_qxfer): Rename to ...
14360 (handle_qxfer_threads): ... this. Adjust.
14361 (qxfer_packets): New array.
14362 (handle_qxfer): New function.
14363 (handle_query): Use handle_qxfer.
14364
14365 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
14366
14367 * gdbreplay.c: Shorten lines of >= 80 columns.
14368 * linux-low.c: Ditto.
14369 * linux-ppc-low.c: Ditto.
14370 * linux-s390-low.c: Ditto.
14371 * linux-sparc-low.c: Ditto.
14372 * linux-x86-low.c: Ditto.
14373 * linux-xtensa-low.c: Ditto.
14374 * mem-break.c: Ditto.
14375 * nto-low.c: Ditto.
14376 * regcache.h: Ditto.
14377 * remote-utils.c: Ditto.
14378 * server.c: Ditto.
14379 * server.h: Ditto.
14380 * thread-db.c: Ditto.
14381 * tracepoint.c: Ditto.
14382 * utils.c: Ditto.
14383 * win32-low.h: Ditto.
14384
14385 2011-01-05 Joel Brobecker <brobecker@adacore.com>
14386
14387 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
14388 update.
14389
14390 2011-01-01 Joel Brobecker <brobecker@adacore.com>
14391
14392 * server.c (gdbserver_version): Update copyright year in version
14393 output.
14394 * gdbreplay.c (gdbreplay_version): Ditto.
14395
14396 2010-12-29 Jie Zhang <jie.zhang@analog.com>
14397
14398 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
14399 * linux-bfin-low.c: New file.
14400 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
14401 PT_DATA_ADDR for BFIN targets.
14402 * Makefile.in (SFILES): Add linux-bfin-low.c.
14403 (clean): Remove reg-bfin.c.
14404 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
14405 * README: Mention supported Blackfin targets.
14406
14407 2010-12-23 Mike Frysinger <vapier@gentoo.org>
14408
14409 * .gitignore: New file.
14410
14411 2010-11-16 Mike Frysinger <vapier@gentoo.org>
14412
14413 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
14414
14415 2010-10-22 Jie Zhang <jie@codesourcery.com>
14416
14417 * Makefile.in: Add FLAGS_TO_PASS variable.
14418 (install): Remove dependency of install-only and recursively
14419 invoke make for install-only.
14420
14421 2010-10-04 Doug Evans <dje@google.com>
14422
14423 * Makefile.in (uninstall): Use $(DESTDIR).
14424
14425 2010-09-24 Pedro Alves <pedro@codesourcery.com>
14426
14427 PR gdb/11842
14428
14429 * linux-x86-low.c (compat_siginfo_from_siginfo)
14430 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
14431 si_code is < 0. Check for si_code == SI_TIMER before checking for
14432 si_code < 0.
14433
14434 2010-09-13 Joel Brobecker <brobecker@adacore.com>
14435
14436 * lynx-i386-low.c: New file.
14437 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
14438
14439 2010-09-13 Joel Brobecker <brobecker@adacore.com>
14440
14441 * lynx-low.c (ptrace_request_to_str): Remove handling for
14442 request values that have been removed in LynxOS 5.x.
14443
14444 2010-09-13 Joel Brobecker <brobecker@adacore.com>
14445
14446 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
14447 <ptrace.h>
14448
14449 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
14450
14451 * configure.ac: Add --enable-inprocess-agent option.
14452 * configure: Rebuilt.
14453
14454 2010-09-06 Yao Qi <yao@codesourcery.com>
14455
14456 * linux-low.c (linux_kill): Remove unused variable.
14457 (linux_stabilize_threads): Likewise.
14458 * server.c (start_inferior): Likewise.
14459 (queue_stop_reply_callback): Likewise.
14460 * tracepoint.c (do_action_at_tracepoint): Likewise.
14461
14462 2010-09-06 Yao Qi <yao@codesourcery.com>
14463
14464 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
14465 on return.
14466
14467 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
14468
14469 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
14470
14471 2010-09-06 Pedro Alves <pedro@codesourcery.com>
14472
14473 * Makefile.in (install-only): Replace $IPA_DEPFILES with
14474 "$(IPA_DEPFILES)".
14475
14476 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14477
14478 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
14479 gdbserver/lynx-ppc-low.c: New files.
14480 * Makefile.in (lynx_low_h): New variable.
14481 (lynx-low.o, lynx-ppc-low.o): New rules.
14482 * configure.ac: On LynxOS, link with -lnetinet.
14483 * configure.srv: Add handling of powerpc-*-lynxos* targets.
14484 * configure: regenerate.
14485
14486 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14487
14488 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
14489 * configure.ac: Add check for vasprintf and vsnprintf.
14490 * configure, config.in: Regenerate.
14491 * server.h (vasprintf, vsnprintf): Add conditional declarations.
14492
14493 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14494
14495 * gdbreplay.c: Move include of alloca.h up, next to include of
14496 malloc.h.
14497 * server.h: Add include of malloc.h.
14498 * mem-break.c: Remove include of malloc.h.
14499 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
14500
14501 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14502
14503 * Makefile.in (memmem.o): Build with -Wno-error.
14504
14505 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14506
14507 * utils.c (xsnprintf): Make non-static.
14508 * server.h: Add xsnprintf declaration.
14509 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
14510 replace calls to snprintf by calls to xsnprintf throughout.
14511
14512 2010-09-01 Joel Brobecker <brobecker@adacore.com>
14513
14514 * configure.ac: Add configure check for alloca.
14515 * configure, config.in: Regenerate.
14516 * server.h: Include alloca.h if it exists.
14517 * gdbreplay.c: Include alloca.h if it exists.
14518
14519 2010-08-28 Pedro Alves <pedro@codesourcery.com>
14520
14521 * linux-low.c (__SIGRTMIN): Define if not already defined.
14522 (linux_create_inferior): Check for __ANDROID__ rather than
14523 __SIGRTMIN.
14524 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
14525 are already deferred.
14526 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
14527 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
14528 stopped and already has a pending signal to report.
14529 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
14530 a pending signal to report or is moving out of a jump pad.
14531 (linux_init_signals): Check for __ANDROID__ rather than
14532 __SIGRTMIN.
14533
14534 2010-08-28 Pedro Alves <pedro@codesourcery.com>
14535
14536 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
14537 debug_threads check. Avoid a linear search when not doing debug
14538 output.
14539
14540 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14541
14542 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
14543 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
14544 (struct file_handler) <fd>: Change type to gdb_fildes_t.
14545 (process_event): Change local fd's type to gdb_fildes_t.
14546 (create_file_handler): Adjust prototype.
14547 (delete_file_handler): Adjust prototype.
14548 (handle_file_event): Adjust prototype. Use pfildes.
14549 (create_file_event): Adjsut prototype.
14550 * remote-utils.c (remote_desc, listen_desc): Change type to
14551 gdb_fildes_t.
14552 * server.h: New gdb_fildes_t typedef.
14553 [USE_WIN32API]: Include winsock2.h.
14554 (delete_file_handler, add_file_handler): Adjust prototypes.
14555 (pfildes): Declare.
14556 * utils.c (pfildes): New.
14557
14558 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14559
14560 * configure.ac (build_warnings): Add -Wno-char-subscripts.
14561 * configure: Regenerate.
14562
14563 2010-08-27 Pedro Alves <pedro@codesourcery.com>
14564
14565 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
14566 (linux_done_accessing_memory): ... this.
14567 (linux_target_ops): Adjust.
14568 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
14569 * nto-low.c (nto_target_ops): Adjust comment.
14570 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
14571 * spu-low.c (spu_target_ops): Adjust comment.
14572 * target.h (target_ops): Rename unprepare_to_access_memory field
14573 to done_accessing_memory.
14574 (unprepare_to_access_memory): Rename to ...
14575 (done_accessing_memory): ... this.
14576
14577 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14578
14579 * linux-low.c (linux_prepare_to_access_memory): New.
14580 (linux_unprepare_to_access_memory): New.
14581 (linux_target_ops): Install them.
14582 * server.c (read_memory): Rename to ...
14583 (gdb_read_memory): ... this. Use
14584 prepare_to_access_memory/prepare_to_access_memory.
14585 (write_memory): Rename to ...
14586 (gdb_write_memory): ... this. Use
14587 prepare_to_access_memory/prepare_to_access_memory.
14588 (handle_search_memory_1): Adjust.
14589 (process_serial_event): Adjust.
14590 * target.h (struct target_ops): New fields
14591 prepare_to_access_memory and unprepare_to_access_memory.
14592 (prepare_to_access_memory, unprepare_to_access_memory): New.
14593 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
14594 prepare_to_access_memory/prepare_to_access_memory.
14595 * nto-low.c (nto_target_ops): Adjust.
14596 * spu-low.c (spu_target_ops): Adjust.
14597 * win32-low.c (win32_target_ops): Adjust.
14598
14599 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14600
14601 * Makefile.in (WARN_CFLAGS): Get it from configure.
14602 (WERROR_CFLAGS): New.
14603 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
14604 * configure.ac: Introduce --enable-werror, which adds -Werror to
14605 the compiler command line. Enabled by default. Disable with
14606 --disable-werror. Add -Wdeclaration-after-statement
14607 Wpointer-arith and -Wformat-nonliteral to warning flags.
14608 * configure: Regenerate.
14609
14610 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14611
14612 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
14613
14614 2010-08-26 Pedro Alves <pedro@codesourcery.com>
14615
14616 * gdbreplay.c (remote_error): New.
14617 (gdbchar): New.
14618 (expect): Use gdbchar. Check for error reading from GDB.
14619 Clarify sync error output.
14620 (play): Check for errors writing to GDB.
14621 * linux-low.c (sigchld_handler): Really ignore `write' errors.
14622 * remote-utils.c (getpkt): Check for errors writing to the remote
14623 descriptor.
14624
14625 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14626
14627 * linux-low.c (linux_wait_1): Move non-debugging code out of
14628 `debug_threads' control.
14629
14630 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14631
14632 * linux-low.c (linux_wait_1): Don't set last_status here.
14633 * server.c (push_event, queue_stop_reply_callback): Assert we're
14634 not pushing a TARGET_WAITKIND_IGNORE event.
14635 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
14636 (myresume, handle_target_event): Set the thread's last_resume_kind
14637 and last_status from the target returned status.
14638
14639 2010-08-25 Pedro Alves <pedro@codesourcery.com>
14640
14641 PR threads/10729
14642
14643 * linux-x86-low.c (update_debug_registers_callback): New.
14644 (i386_dr_low_set_addr): Use it.
14645 (i386_dr_low_get_addr): New.
14646 (i386_dr_low_set_control): Use update_debug_registers_callback.
14647 (i386_dr_low_get_control): New.
14648 (i386_dr_low_get_status): Adjust.
14649 * linux-low.c (linux_stop_lwp): New.
14650 * linux-low.h (linux_stop_lwp): Declare.
14651
14652 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
14653 argument instead of a i386_debug_reg_state.
14654 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
14655 a i386_debug_reg_state.
14656 (i386_insert_aligned_watchpoint): Adjust.
14657 (i386_remove_aligned_watchpoint): Adjust.
14658 (i386_low_stopped_data_address): Read the debug registers from the
14659 inferior instead of from the mirrors.
14660 * i386-low.h (struct i386_debug_reg_state): Extend comment.
14661 (i386_dr_low_get_addr): Declare.
14662 (i386_dr_low_get_control): Declare.
14663 (i386_dr_low_get_status): Change prototype.
14664
14665 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
14666 (i386_dr_low_get_addr): New.
14667 (i386_dr_low_get_control): New.
14668 (i386_dr_low_get_status): Adjust prototype. Return
14669 dr_status_mirror.
14670 (i386_initial_stuff): Clear dr_status_mirror and
14671 dr_control_mirror.
14672 (i386_get_thread_context): Adjust.
14673 (i386_set_thread_context): Adjust.
14674 (i386_thread_added): Adjust.
14675
14676 2010-08-24 Pedro Alves <pedro@codesourcery.com>
14677
14678 * linux-low.h (linux_thread_area): Delete declaration.
14679
14680 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
14681
14682 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
14683 after its termination.
14684
14685 2010-08-09 Pedro Alves <pedro@codesourcery.com>
14686
14687 * linux-low.c (gdb_wants_lwp_stopped): Delete.
14688 (gdb_wants_all_stopped): Delete.
14689 (linux_wait_1): Don't call them.
14690 * server.c (handle_v_cont): Tag all threads as want-stopped.
14691 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
14692 stopped as "client-wants-stopped".
14693
14694 2010-07-31 Pedro Alves <pedro@codesourcery.com>
14695
14696 * Makefile.in (signals_h): New.
14697 (server_h): Depend on it.
14698 (server.o): Don't depend on $(signals_def).
14699 (signals.o): Depend on $(signals_def).
14700
14701 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
14702
14703 * Makefile.in (signals_def): New.
14704 (server_h): Append include/gdb/signals.h and signals_def.
14705 (server.o): Append signals_def.
14706
14707 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
14708
14709 * server.c (handle_target_event): Use target_signal_to_host for
14710 resume_info.sig initialization.
14711 * target.h (struct thread_resume) <sig>: New comment.
14712
14713 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
14714
14715 * server.c (handle_query): strcpy() the returned string from paddress()
14716 instead of sprintf().
14717 * utils.c (paddress): Return phex_nz().
14718
14719 2010-07-07 Joel Brobecker <brobecker@adacore.com>
14720
14721 * server.c (handle_v_cont): Call mourn_inferior if process
14722 just exited.
14723 (myresume): Likewise.
14724
14725 2010-07-01 Pedro Alves <pedro@codesourcery.com>
14726
14727 Static tracepoints, and integration with UST.
14728
14729 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
14730 * mem-break.c (uninsert_all_breakpoints)
14731 (reinsert_all_breakpoints): New.
14732 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
14733 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
14734 (gdb_agent_ust_loaded, helper_thread_id)
14735 (gdb_agent_helper_thread_id): New macros.
14736 (struct ipa_sym_addresses): Add addr_ust_loaded,
14737 addr_helper_thread_id, addr_cmd_buf.
14738 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
14739 (in_process_agent_loaded_ust): New.
14740 (write_e_ust_not_loaded): New.
14741 (maybe_write_ipa_ust_not_loaded): New.
14742 (struct collect_static_trace_data_action): New.
14743 (enum tracepoint_type) <static_tracepoint>: New.
14744 (struct tracepoint) <handle>: Mention static tracepoints.
14745 (struct static_tracepoint_ctx): New.
14746 (CMD_BUF_SIZE): New.
14747 (add_tracepoint_action): Handle static tracepoint actions.
14748 (unprobe_marker_at): New.
14749 (clear_installed_tracepoints): Handle static tracepoints.
14750 (cmd_qtdp): Handle static tracepoints.
14751 (probe_marker_at): New.
14752 (cmd_qtstart): Handle static tracepoints.
14753 (response_tracepoint): Handle static tracepoints.
14754 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
14755 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
14756 (get_context_regcache): Handle static tracepoints.
14757 (do_action_at_tracepoint): Handle static tracepoint actions.
14758 (traceframe_find_block_type): Handle static trace data blocks.
14759 (traceframe_read_sdata): New.
14760 (download_tracepoints): Download static tracepoint actions.
14761 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
14762 (GDB_PROBE_NAME): New.
14763 (ust_ops): New.
14764 (GET_UST_SYM): New.
14765 (USTF): New.
14766 (dlsym_ust): New.
14767 (ust_marker_to_static_tracepoint): New.
14768 (gdb_probe): New.
14769 (collect_ust_data_at_tracepoint): New.
14770 (gdb_ust_probe): New.
14771 (UNIX_PATH_MAX, SOCK_DIR): New.
14772 (gdb_ust_connect_sync_socket): New.
14773 (resume_thread, stop_thread): New.
14774 (run_inferior_command): New.
14775 (init_named_socket): New.
14776 (gdb_ust_socket_init): New.
14777 (cstr_to_hexstr): New.
14778 (next_st): New.
14779 (first_marker, next_marker): New.
14780 (response_ust_marker): New.
14781 (cmd_qtfstm, cmd_qtsstm): New.
14782 (unprobe_marker_at, probe_marker_at): New.
14783 (cmd_qtstmat, gdb_ust_thread): New.
14784 (gdb_ust_init): New.
14785 (initialize_tracepoint_ftlib): Call gdb_ust_init.
14786 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
14787 (ST_REGENTRY): New.
14788 (x86_64_st_collect_regmap): New.
14789 (X86_64_NUM_ST_COLLECT_GREGS): New.
14790 (AMD64_RIP_REGNUM): New.
14791 (supply_static_tracepoint_registers): New.
14792 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
14793 (ST_REGENTRY): New.
14794 (i386_st_collect_regmap): New.
14795 (i386_NUM_ST_COLLECT_GREGS): New.
14796 (supply_static_tracepoint_registers): New.
14797 * server.c (handle_query): Handle qXfer:statictrace:read.
14798 <qSupported>: Report support for StaticTracepoints, and
14799 qXfer:statictrace:read features.
14800 * server.h (traceframe_read_sdata)
14801 (supply_static_tracepoint_registers): Declare.
14802 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
14803 (unpack_varlen_hex): Include in IPA build.
14804 * Makefile.in (ustlibs, ustinc): New.
14805 (IPA_OBJS): Add remote-utils-ipa.o.
14806 ($(IPA_LIB)): Link -ldl and -lpthread.
14807 (UST_CFLAGS): New.
14808 (IPAGENT_CFLAGS): Add UST_CFLAGS.
14809 * config.in, configure: Regenerate.
14810
14811 2010-06-20 Ian Lance Taylor <iant@google.com>
14812 Pedro Alves <pedro@codesourcery.com>
14813
14814 * linux-x86-low.c (always_true): Delete.
14815 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
14816 trying to fool the compiler with always_true.
14817
14818 2010-06-20 Pedro Alves <pedro@codesourcery.com>
14819
14820 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
14821 conditions in gdbserver.
14822
14823 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
14824
14825 * spu-low.c (spu_read_memory): Wrap around local store limit.
14826 (spu_write_memory): Likewise.
14827
14828 2010-06-15 Pedro Alves <pedro@codesourcery.com>
14829
14830 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
14831 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
14832 LONGEST uses.
14833 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
14834 uses.
14835 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
14836 uses with LONGEST uses.
14837
14838 2010-06-14 Stan Shebs <stan@codesourcery.com>
14839 Pedro Alves <pedro@codesourcery.com>
14840
14841 Bytecode compiler.
14842
14843 * linux-x86-low.c: Include limits.h.
14844 (add_insns): New.
14845 (always_true): New.
14846 (EMIT_ASM): New.
14847 (EMIT_ASM32): New.
14848 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
14849 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
14850 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
14851 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
14852 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
14853 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
14854 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
14855 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
14856 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
14857 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
14858 (amd64_emit_void_call_2): New.
14859 (amd64_emit_ops): New.
14860 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
14861 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
14862 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
14863 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
14864 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
14865 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
14866 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
14867 (i386_emit_call, i386_emit_reg, i386_emit_pop)
14868 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
14869 (i386_emit_stack_adjust, i386_emit_int_call_1)
14870 (i386_emit_void_call_2): New.
14871 (i386_emit_ops): New.
14872 (x86_emit_ops): New.
14873 (the_low_target): Install x86_emit_ops.
14874 * server.h (struct emit_ops): New.
14875 (get_raw_reg_func_addr): Declare.
14876 (current_insn_ptr, emit_error): Declare.
14877 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
14878 (set_trace_state_variable_value): New defines.
14879 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
14880 addr_get_trace_state_variable_value and
14881 addr_set_trace_state_variable_value.
14882 (symbol_list): New fields for get_raw_reg,
14883 get_trace_state_variable_value and set_trace_state_variable_value.
14884 (condfn): New typedef.
14885 (struct tracepoint): New field `compiled_cond'.
14886 (do_action_at_tracepoint): Clear compiled_cond.
14887 (get_trace_state_variable_value, set_trace_state_variable_value):
14888 Export in the IPA.
14889 (condition_true_at_tracepoint): If there's a compiled condition,
14890 run that.
14891 (current_insn_ptr, emit_error): New globals.
14892 (struct bytecode_address): New.
14893 (get_raw_reg_func_addr): New.
14894 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
14895 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
14896 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
14897 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
14898 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
14899 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
14900 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
14901 (compile_tracepoint_condition, compile_bytecodes): New.
14902 * target.h (emit_ops): Forward declare.
14903 (struct target_ops): New field emit_ops.
14904 (target_emit_ops): New.
14905 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
14906 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
14907 * linux-low.c (linux_emit_ops): New.
14908 (linux_target_ops): Install it.
14909 * linux-low.h (struct linux_target_ops): New field emit_ops.
14910
14911 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
14912
14913 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
14914 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
14915
14916 2010-06-01 Pedro Alves <pedro@codesourcery.com>
14917 Stan Shebs <stan@codesourcery.com>
14918
14919 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
14920 (all): Depend on $(extra_libraries).
14921 (install-only): Install the IPA.
14922 (IPA_OBJS, IPA_LIB): New.
14923 (clean): Remove the IPA lib.
14924 (IPAGENT_CFLAGS): New.
14925 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
14926 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
14927 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
14928 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
14929 * configure.ac: Check for atomic builtins support in the compiler.
14930 (IPA_DEPFILES, extra_libraries): Define.
14931 * configure.srv (ipa_obj): Add description.
14932 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
14933 (i[34567]86-*-linux*): Set ipa_obj.
14934 (x86_64-*-linux*): Set ipa_obj.
14935 * linux-low.c (stabilizing_threads): New.
14936 (supports_fast_tracepoints): New.
14937 (linux_detach): Stabilize threads before detaching.
14938 (handle_tracepoints): Handle internal tracing breakpoints. Assert
14939 the lwp is either not stabilizing, or is moving out of a jump pad.
14940 (linux_fast_tracepoint_collecting): New.
14941 (maybe_move_out_of_jump_pad): New.
14942 (enqueue_one_deferred_signal): New.
14943 (dequeue_one_deferred_signal): New.
14944 (linux_wait_for_event_1): If moving out of a jump pad, defer
14945 pending signals to later.
14946 (linux_stabilize_threads): New.
14947 (linux_wait_1): Check if threads need moving out of jump pads, and
14948 do it if so.
14949 (stuck_in_jump_pad_callback): New.
14950 (move_out_of_jump_pad_callback): New.
14951 (lwp_running): New.
14952 (linux_resume_one_lwp): Handle moving out of jump pads.
14953 (linux_set_resume_request): Dequeue deferred signals.
14954 (need_step_over_p): Also step over fast tracepoint jumps.
14955 (start_step_over): Also uninsert fast tracepoint jumps.
14956 (finish_step_over): Also reinsert fast tracepoint jumps.
14957 (linux_install_fast_tracepoint_jump): New.
14958 (linux_target_ops): Install linux_stabilize_threads and
14959 linux_install_fast_tracepoint_jump_pad.
14960 * linux-low.h (linux_target_ops) <get_thread_area,
14961 install_fast_tracepoint_jump_pad>: New fields.
14962 (struct lwp_info) <collecting_fast_tracepoint,
14963 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
14964 (linux_get_thread_area): Declare.
14965 * linux-x86-low.c (jump_insn): New.
14966 (x86_get_thread_area): New.
14967 (append_insns): New.
14968 (push_opcode): New.
14969 (amd64_install_fast_tracepoint_jump_pad): New.
14970 (i386_install_fast_tracepoint_jump_pad): New.
14971 (x86_install_fast_tracepoint_jump_pad): New.
14972 (the_low_target): Install x86_get_thread_area and
14973 x86_install_fast_tracepoint_jump_pad.
14974 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
14975 (struct fast_tracepoint_jump): New.
14976 (fast_tracepoint_jump_insn): New.
14977 (fast_tracepoint_jump_shadow): New.
14978 (find_fast_tracepoint_jump_at): New.
14979 (fast_tracepoint_jump_here): New.
14980 (delete_fast_tracepoint_jump): New.
14981 (set_fast_tracepoint_jump): New.
14982 (uninsert_fast_tracepoint_jumps_at): New.
14983 (reinsert_fast_tracepoint_jumps_at): New.
14984 (set_breakpoint_at): Use write_inferior_memory.
14985 (uninsert_raw_breakpoint): Use write_inferior_memory.
14986 (check_mem_read): Mask out fast tracepoint jumps.
14987 (check_mem_write): Mask out fast tracepoint jumps.
14988 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
14989 (set_fast_tracepoint_jump): Declare.
14990 (delete_fast_tracepoint_jump)
14991 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
14992 (reinsert_fast_tracepoint_jumps_at): Declare.
14993 * regcache.c: Don't compile many functions when building the
14994 in-process agent library.
14995 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
14996 the register buffer in the heap.
14997 (free_register_cache): If the register buffer isn't owned by the
14998 regcache, don't free it.
14999 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
15000 pre-existing register caches.
15001 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
15002 type.
15003 (convert_ascii_to_int): : Constify `from' parameter type.
15004 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
15005 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
15006 the needed buffer in-place.
15007 (relocate_instruction): New.
15008 * server.c (handle_query) <qSymbols>: If the target supports
15009 tracepoints, give it a chance of looking up symbols. Report
15010 support for fast tracepoints.
15011 (handle_status): Stabilize threads.
15012 (process_serial_event): Adjust.
15013 * server.h (struct fast_tracepoint_jump): Forward declare.
15014 (struct process_info) <fast_tracepoint_jumps>: New field.
15015 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
15016 (decode_X_packet, decode_M_packet): Adjust.
15017 (relocate_instruction): Declare.
15018 (in_process_agent_loaded): Declare.
15019 (tracepoint_look_up_symbols): Declare.
15020 (struct fast_tpoint_collect_status): Declare.
15021 (fast_tracepoint_collecting): Declare.
15022 (force_unlock_trace_buffer): Declare.
15023 (handle_tracepoint_bkpts): Declare.
15024 (initialize_low_tracepoint)
15025 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
15026 * target.h (struct target_ops) <stabilize_threads,
15027 install_fast_tracepoint_jump_pad>: New fields.
15028 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
15029 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
15030 [HAVE_STDINT_H]: Include stdint.h.
15031 (trace_debug_1): Rename to ...
15032 (trace_vdebug): ... this.
15033 (trace_debug): Rename to ...
15034 (trace_debug_1): ... this. Add `level' parameter.
15035 (trace_debug): New.
15036 (ATTR_USED, ATTR_NOINLINE): New.
15037 (IP_AGENT_EXPORT): New.
15038 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
15039 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
15040 (about_to_request_buffer_space, trace_buffer_is_full)
15041 (stopping_tracepoint, expr_eval_result, error_tracepoint)
15042 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
15043 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
15044 (traceframe_write_count, traceframes_created)
15045 (trace_state_variables)
15046 New renaming defines.
15047 (struct ipa_sym_addresses): New.
15048 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
15049 (symbol_list): New.
15050 (ipa_sym_addrs): New.
15051 (all_tracepoint_symbols_looked_up): New.
15052 (in_process_agent_loaded): New.
15053 (write_e_ipa_not_loaded): New.
15054 (maybe_write_ipa_not_loaded): New.
15055 (tracepoint_look_up_symbols): New.
15056 (debug_threads) [IN_PROCESS_AGENT]: New.
15057 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
15058 (UNKNOWN_SIDE_EFFECTS): New.
15059 (stop_tracing): New.
15060 (flush_trace_buffer): New.
15061 (stop_tracing_bkpt): New.
15062 (flush_trace_buffer_bkpt): New.
15063 (read_inferior_integer): New.
15064 (read_inferior_uinteger): New.
15065 (read_inferior_data_pointer): New.
15066 (write_inferior_data_pointer): New.
15067 (write_inferior_integer): New.
15068 (write_inferior_uinteger): New.
15069 (struct collect_static_trace_data_action): Delete.
15070 (enum tracepoint_type): New.
15071 (struct tracepoint) <type>: New field `type'.
15072 <actions_str, step_actions, step_actions_str>: Only include in
15073 GDBserver.
15074 <orig_size, obj_addr_on_target, adjusted_insn_addr>
15075 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
15076 (tracepoints): Use IP_AGENT_EXPORT.
15077 (last_tracepoint): Don't include in the IPA.
15078 (stopping_tracepoint): Use IP_AGENT_EXPORT.
15079 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
15080 (alloced_trace_state_variables): New.
15081 (trace_state_variables): Use IP_AGENT_EXPORT.
15082 (traceframe_t): Delete unused variable.
15083 (circular_trace_buffer): Don't include in the IPA.
15084 (trace_buffer_start): Delete.
15085 (struct trace_buffer_control): New.
15086 (trace_buffer_free): Delete.
15087 (struct ipa_trace_buffer_control): New.
15088 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
15089 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
15090 New.
15091 (trace_buffer_ctrl): New.
15092 (TRACE_BUFFER_CTRL_CURR): New.
15093 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
15094 Reimplement as macros.
15095 (trace_buffer_wrap): Delete.
15096 (traceframe_write_count, traceframe_read_count)
15097 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
15098 (struct tracepoint_hit_ctx) <type>: New field.
15099 (struct fast_tracepoint_ctx): New.
15100 (memory_barrier): New.
15101 (cmpxchg): New.
15102 (record_tracepoint_error): Update atomically in the IPA.
15103 (clear_inferior_trace_buffer): New.
15104 (about_to_request_buffer_space): New.
15105 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
15106 updating the same buffer.
15107 (add_tracepoint): Default the tracepoint's type to trap
15108 tracepoint, and orig_size to -1.
15109 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
15110 internal variables.
15111 (create_trace_state_variable): New parameter `gdb'. Handle it.
15112 (clear_installed_tracepoints): Clear fast tracepoint jumps.
15113 (cmd_qtdp): Handle fast tracepoints.
15114 (cmd_qtdv): Adjust.
15115 (max_jump_pad_size): New.
15116 (gdb_jump_pad_head): New.
15117 (get_jump_space_head): New.
15118 (claim_jump_space): New.
15119 (sort_tracepoints): New.
15120 (MAX_JUMP_SIZE): New.
15121 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
15122 IPA.
15123 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
15124 support. Upload fast traceframes, and delete internal IPA
15125 breakpoints.
15126 (stop_tracing_handler): New.
15127 (flush_trace_buffer_handler): New.
15128 (cmd_qtstop): Upload fast tracepoints.
15129 (response_tracepoint): Handle fast tracepoints.
15130 (tracepoint_finished_step): Upload fast traceframes. Set the
15131 tracepoint hit context's tracepoint type.
15132 (handle_tracepoint_bkpts): New.
15133 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
15134 type. Add comment about fast tracepoints.
15135 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
15136 non-existing action_str field.
15137 (get_context_regcache): Handle fast tracepoints.
15138 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
15139 to the regcache.
15140 (fast_tracepoint_from_jump_pad_address): New.
15141 (fast_tracepoint_from_ipa_tpoint_address): New.
15142 (collecting_t): New.
15143 (force_unlock_trace_buffer): New.
15144 (fast_tracepoint_collecting): New.
15145 (collecting): New.
15146 (gdb_collect): New.
15147 (write_inferior_data_ptr): New.
15148 (target_tp_heap): New.
15149 (target_malloc): New.
15150 (download_agent_expr): New.
15151 (UALIGN): New.
15152 (download_tracepoints): New.
15153 (download_trace_state_variables): New.
15154 (upload_fast_traceframes): New.
15155 (IPA_FIRST_TRACEFRAME): New.
15156 (IPA_NEXT_TRACEFRAME_1): New.
15157 (IPA_NEXT_TRACEFRAME): New.
15158 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
15159 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
15160 (gdb_jump_pad_buffer_end): New.
15161 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
15162 (initialize_tracepoint): Adjust.
15163 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
15164 buffer. Initialize the low module.
15165 * utils.c (PREFIX, TOOLNAME): New.
15166 (malloc_failure): Use PREFIX.
15167 (error): In the IPA, an error causes an exit.
15168 (fatal, warning): Use PREFIX.
15169 (internal_error): Use TOOLNAME.
15170 (NUMCELLS): Increase to 10.
15171 * configure, config.in: Regenerate.
15172
15173 2010-06-01 Pedro Alves <pedro@codesourcery.com>
15174
15175 * server.c (handle_query) <qSupported>: Do two passes over the
15176 qSupported string to avoid nesting strtok.
15177
15178 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15179
15180 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
15181 (CDEPS): New.
15182 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
15183 -Wl,--dynamic-list.
15184 * configure: Regenerate.
15185 * proc-service.list: New.
15186
15187 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15188
15189 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
15190 New comment.
15191
15192 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
15193
15194 * gdbreplay.c (remote_open): Check error return from socket() call by
15195 its equality to -1 not by it being negative.
15196 * remote-utils.c (remote_open): Likewise.
15197
15198 2010-05-23 Pedro Alves <pedro@codesourcery.com>
15199
15200 * config.h: Regenerate.
15201
15202 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
15203
15204 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
15205 doesn't provide PTRACE_GET_THREAD_AREA.
15206
15207 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
15208
15209 * linux-m68k-low.c: Include <asm/ptrace.h>
15210 (ps_get_thread_area): Implement.
15211
15212 2010-05-03 Doug Evans <dje@google.com>
15213
15214 * event-loop.c (struct callback_event): New struct.
15215 (callback_list): New global.
15216 (append_callback_event, delete_callback_event): New functions.
15217 (process_callback): New function.
15218 (start_event_loop): Call it.
15219 * remote-utils.c (NOT_SCHEDULED): Define.
15220 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
15221 moved out of readchar.
15222 (readchar): Rewrite. Call reschedule before returning.
15223 (reset_readchar): New function.
15224 (remote_close): Call it.
15225 (process_remaining, reschedule): New functions.
15226 * server.h (callback_handler_func): New typedef.
15227 (append_callback_event, delete_callback_event): Declare.
15228
15229 2010-05-03 Pedro Alves <pedro@codesourcery.com>
15230
15231 * proc-service.c (ps_pglobal_lookup): Use
15232 thread_db_look_up_one_symbol.
15233 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
15234 parameter. Use it instead of all_symbols_looked_up.
15235 * server.h (struct process_info) <all_symbols_looked_up>: Delete
15236 field.
15237 (all_symbols_looked_up): Don't declare.
15238 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
15239 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
15240 field.
15241 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
15242 Set all_symbols_looked_up here.
15243 (thread_db_look_up_one_symbol): New.
15244 (thread_db_get_tls_address): Adjust.
15245 (thread_db_load_search, try_thread_db_load_1): Always allocate the
15246 thread_db object on the heap, and tentatively set it in the
15247 process structure.
15248 (thread_db_init): Don't set all_symbols_looked_up here.
15249 * linux-low.h (thread_db_look_up_one_symbol): Declare.
15250
15251 2010-05-03 Pedro Alves <pedro@codesourcery.com>
15252
15253 * linux-low.c (linux_kill, linux_detach): Adjust.
15254 (status_pending_p_callback): Remove redundant statement. Check
15255 for !TARGET_WAITIKIND_IGNORE, instead of
15256 TARGET_WAITKIND_STOPPED.
15257 (handle_tracepoints): Make sure LWP is locked. Adjust.
15258 (linux_wait_for_event_1): Adjust.
15259 (linux_cancel_breakpoints): New.
15260 (unsuspend_one_lwp): New.
15261 (unsuspend_all_lwps): New.
15262 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
15263 (send_sigstop_callback): Change return type to int, add new
15264 `except' parameter and handle it.
15265 (suspend_and_send_sigstop_callback): New.
15266 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
15267 pass them down. If SUSPEND, also increment the lwp's suspend
15268 count.
15269 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
15270 (need_step_over_p): Don't consider suspended LWPs.
15271 (start_step_over): Adjust.
15272 (proceed_one_lwp): Change return type to int, add new `except'
15273 parameter and handle it.
15274 (unsuspend_and_proceed_one_lwp): New.
15275 (proceed_all_lwps): Use find_inferior instead of
15276 for_each_inferior.
15277 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
15278 also decrement the suspend count of LWPs. Pass `except' down,
15279 instead of hacking its suspend count.
15280 (linux_pause_all): Add `freeze' parameter. Adjust.
15281 (linux_unpause_all): New.
15282 (linux_target_ops): Install linux_unpause_all.
15283 * server.c (handle_status): Adjust.
15284 * target.h (struct target_ops): New fields `unpause_all' and
15285 `cancel_breakpoints'. Add new parameter to `pause_all'.
15286 (pause_all): Add new `freeze' parameter.
15287 (unpause_all): New.
15288 (cancel_breakpoints): New.
15289 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
15290 cancel breakpoints.
15291 (cmd_qtstart): Pause threads.
15292 (stop_tracing): Pause threads, and cancel breakpoints.
15293 * win32-low.c (win32_target_ops): Adjust.
15294
15295 2010-05-03 Pedro Alves <pedro@codesourcery.com>
15296
15297 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
15298 the inferior right away from here...
15299 (linux_wait_1): ... to here, and adjust to check the thread's
15300 last_resume_kind instead of the lwp's step or stop_expected flags.
15301
15302 2010-05-02 Pedro Alves <pedro@codesourcery.com>
15303
15304 * README: Use consistent `GDB' and `GDBserver' spellings.
15305
15306 2010-05-02 Pedro Alves <pedro@codesourcery.com>
15307
15308 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
15309 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
15310 (linux_detach_one_lwp): Assume the lwp is stopped.
15311 (any_thread_of): Delete.
15312 (linux_detach): Stop all lwps here. Don't blindly delete all
15313 breakpoints.
15314 (delete_lwp_callback): New.
15315 (linux_mourn): Delete all lwps of the process that is gone.
15316 (linux_wait_1): Don't delete the last lwp of the process here.
15317 * mem-break.h (mark_breakpoints_out): Declare.
15318 * mem-break.c (mark_breakpoints_out): New.
15319 (free_all_breakpoints): Use it.
15320 * server.c (handle_target_event): If the process is gone, mark
15321 breakpoints out.
15322 * thread-db.c (struct thread_db) <create_bp>: New field.
15323 (thread_db_enable_reporting): Fix prototype. Store a thread event
15324 breakpoint reference in the thread_db struct.
15325 (thread_db_load_search): Clear the thread_db object.
15326 (try_thread_db_load_1): Ditto.
15327 (switch_to_process): New.
15328 (disable_thread_event_reporting): Use it.
15329 (remove_thread_event_breakpoints): New.
15330 (thread_db_detach, thread_db_mourn): Use it.
15331
15332 2010-05-01 Pedro Alves <pedro@codesourcery.com>
15333
15334 * linux-low.c (linux_enable_event_reporting): New.
15335 (linux_wait_for_event_1, handle_extended_wait): Use it.
15336
15337 2010-04-30 Pedro Alves <pedro@codesourcery.com>
15338
15339 * linux-low.c (linux_kill_one_lwp, linux_kill)
15340 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
15341 (send_sigstop): Take an lwp_info as parameter instead. Queue a
15342 SIGSTOP even if the LWP is stopped.
15343 (send_sigstop_callback): New.
15344 (stop_all_lwps): Use send_sigstop_callback instead.
15345 (linux_resume_one_thread): Adjust.
15346 (proceed_one_lwp): Still proceed an LWP that the client has
15347 requested to stop, if we haven't reported it as stopped yet. Make
15348 sure that LWPs the client want stopped, have a pending SIGSTOP.
15349
15350 2010-04-26 Doug Evans <dje@google.com>
15351
15352 * server.c (handle_general_set): Make static.
15353
15354 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
15355 Print received char after testing for error/eof instead of before.
15356 (input_interrupt): Tweak comment.
15357
15358 2010-04-23 Doug Evans <dje@google.com>
15359
15360 * server.c (start_inferior): Print inferior argv if --debug.
15361
15362 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
15363
15364 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
15365 * nto-x86-low.c: Include server.h
15366
15367 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
15368
15369 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
15370 be consistent with other sources of this directory.
15371 (init_registers_amd64): Correct name of source file of this function
15372 in the comment.
15373
15374 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
15375
15376 * configure.srv (x86_64-*-mingw*): New configuration for Windows
15377 64-bit executables.
15378
15379 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
15380
15381 * win32-i386-low.c: Add 64-bit support.
15382 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
15383 (init_registers_amd64): Declare.
15384 (mappings): Add 64-bit version of array.
15385 (init_windows_x86): New function.
15386 (the_low_target): Change init_arch field to init_windows_x86.
15387
15388 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
15389
15390 * win32-low.c: Adapt to support also 64-bit architecture.
15391 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
15392 (get_image_name): Use SIZE_T type for local variable `done'.
15393 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
15394 (toolhelp_get_dll_name): Idem.
15395 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
15396 Use uintptr_t typecast to avoid warning.
15397 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
15398 (handle_exception): Use phex_nz to avoid warning.
15399 (win32_wait): Remove unused local variable `process'.
15400
15401 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
15402
15403 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
15404 `amd64-avx.o'.
15405
15406 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
15407
15408 * configure.ac: Use `ws2_32' library for srv_mingw.
15409 * configure: Regenerate.
15410 * gdbreplay.c: Include winsock2.h instead of winsock.h.
15411 * remote-utils.c: Likewise.
15412
15413 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
15414
15415 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
15416 if __x86_64__ is defined.
15417
15418 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
15419
15420 * configure: Regenerate.
15421
15422 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
15423
15424 * server.c (handle_query): Handle 'qGetTIBAddr' query.
15425 * target.h (target_ops): New get_tib_address field.
15426 * win32-low.h (win32_thread_info): Add thread_local_base field.
15427 * win32-low.c (child_add_thread): Add tlb argument.
15428 Set thread_local_base field to TLB.
15429 (get_child_debug_event): Adapt to child_add_thread change.
15430 (win32_get_tib_address): New function.
15431 (win32_target_ops): Set get_tib_address field to
15432 win32_get_tib_address.
15433 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
15434
15435 2010-04-12 Pedro Alves <pedro@codesourcery.com>
15436
15437 * linux-low.c (linux_mourn): Also remove the process.
15438 * server.c (handle_target_event): Don't remove the process here.
15439 * nto-low.c (nto_mourn): New.
15440 (nto_target_ops): Install it.
15441 * spu-low.c (spu_mourn): New.
15442 (spu_target_ops): Install it.
15443 * win32-low.c (win32_mourn): New.
15444 (win32_target_ops): Install it.
15445
15446 2010-04-12 Pedro Alves <pedro@codesourcery.com>
15447
15448 * server.h (buffer_xml_printf): Remove redundant `;'.
15449
15450 2010-04-12 Pedro Alves <pedro@codesourcery.com>
15451
15452 * regcache.c (set_register_cache): Invalidate regcaches before
15453 changing the register cache layout.
15454 (regcache_invalidate_one): Allow a NULL regcache.
15455 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
15456 regcaches before changing the register cache layout or the target
15457 regsets.
15458
15459 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
15460
15461 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
15462 variable warning on Linux/x86-64.
15463
15464 2010-04-11 Pedro Alves <pedro@codesourcery.com>
15465
15466 GDBserver disconnected tracing support.
15467
15468 * linux-low.c (linux_remove_process): Delete.
15469 (add_lwp): Don't set last_resume_kind here.
15470 (linux_kill): Use `mourn'.
15471 (linux_detach): Use `thread_db_detach', and `mourn'.
15472 (linux_mourn): New.
15473 (linux_attach_lwp_1): Adjust comment.
15474 (linux_attach): last_resume_kind moved the thread_info; adjust.
15475 (status_pending_p_callback): Adjust.
15476 (linux_wait_for_event_1): Adjust.
15477 (count_events_callback, select_singlestep_lwp_callback)
15478 (select_event_lwp_callback, cancel_breakpoints_callback)
15479 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
15480 (proceed_one_lwp): Adjust.
15481 (linux_async): Add debug output.
15482 (linux_thread_stopped): New.
15483 (linux_pause_all): New.
15484 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
15485 linux_pause_all.
15486 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
15487 (thread_db_free): Delete declaration.
15488 (thread_db_detach, thread_db_mourn): Declare.
15489 * thread-db.c (thread_db_init): Use thread_db_mourn.
15490 (thread_db_free): Delete, split in two.
15491 (disable_thread_event_reporting): New.
15492 (thread_db_detach): New.
15493 (thread_db_mourn): New.
15494
15495 * server.h (struct thread_info) <last_resume_kind>: New field.
15496 <attached>: Add comment.
15497 <gdb_detached>: New field.
15498 (handler_func): Change return type to int.
15499 (handle_serial_event, handle_target_event): Ditto.
15500 (gdb_connected): Declare.
15501 (tracing): Delete.
15502 (disconnected_tracing): Declare.
15503 (stop_tracing): Declare.
15504
15505 * server.c (handle_query) <qSupported>: Report support for
15506 disconnected tracing.
15507 (queue_stop_reply_callback): Account for running threads.
15508 (gdb_wants_thread_stopped): New.
15509 (gdb_wants_all_threads_stopped): New.
15510 (gdb_reattached_process): New.
15511 (handle_status): Clear the `gdb_detached' flag of all processes.
15512 In all-stop, stop all threads.
15513 (main): Be sure to leave tfind mode. Handle disconnected tracing.
15514 (process_serial_event): If the remote connection breaks, or if an
15515 exit was forced with "monitor exit", force an event loop exit.
15516 Handle disconnected tracing on detach.
15517 (handle_serial_event): Adjust.
15518 (handle_target_event): If GDB isn't connected, forward events back
15519 to the inferior, unless the last process exited, in which case,
15520 exit gdbserver. Adjust interface.
15521
15522 * remote-utils.c (remote_open): Don't block in accept. Instead
15523 register an event loop source on the listen socket file
15524 descriptor. Refactor bits into ...
15525 (listen_desc): ... this new global.
15526 (gdb_connected): ... this new function.
15527 (enable_async_notification): ... this new function.
15528 (handle_accept_event): ... this new function.
15529 (remote_close): Clear remote_desc.
15530
15531 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
15532
15533 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
15534 New fields.
15535 (mourn_inferior): Define.
15536 (target_process_qsupported): Avoid the dangling else problem.
15537 (thread_stopped): Define.
15538 (pause_all): Define.
15539 (target_waitstatus_to_string): Declare.
15540 * target.c (target_waitstatus_to_string): New.
15541
15542 * tracepoint.c (tracing): Make extern.
15543 (disconnected_tracing): New.
15544 (stop_tracing): Make extern. Handle tracing stops due to GDB
15545 disconnecting.
15546 (cmd_qtdisconnected): New.
15547 (cmd_qtstatus): Report disconnected tracing status in trace reply.
15548 (handle_tracepoint_general_set): Handle QTDisconnected.
15549
15550 * event-loop.c (event_handler_func): Change return type to int.
15551 (process_event): Bail out if the event handler wants the event
15552 loop to stop.
15553 (handle_file_event): Ditto.
15554 (start_event_loop): Bail out if the event handler wants the event
15555 loop to stop.
15556
15557 * nto-low.c (nto_target_ops): Adjust.
15558 * spu-low.c (spu_wait): Don't remove the process here.
15559 (spu_target_ops): Adjust.
15560 * win32-low.c (win32_wait): Don't remove the process here.
15561 (win32_target_ops): Adjust.
15562
15563 2010-04-11 Pedro Alves <pedro@codesourcery.com>
15564
15565 * regcache.c (realloc_register_cache): Invalidate inferior's
15566 regcache before recreating it.
15567
15568 2010-04-09 Pedro Alves <pedro@codesourcery.com>
15569
15570 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
15571
15572 2010-04-09 Stan Shebs <stan@codesourcery.com>
15573 Pedro Alves <pedro@codesourcery.com>
15574
15575 * server.h (LONGEST): New.
15576 (struct thread_info) <while_stepping>: New field.
15577 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
15578 Declare.
15579 (initialize_tracepoint, handle_tracepoint_general_set)
15580 (handle_tracepoint_query, tracepoint_finished_step)
15581 (tracepoint_was_hit, release_while_stepping_state_list):
15582 (current_traceframe): Declare.
15583 * server.c (handle_general_set): Handle tracepoint packets.
15584 (read_memory): New.
15585 (write_memory): New.
15586 (handle_search_memory_1): Use read_memory.
15587 (handle_query): Report support for conditional tracepoints, trace
15588 state variables, and tracepoint sources. Handle tracepoint
15589 queries.
15590 (main): Initialize the tracepoints module.
15591 (process_serial_event): Handle traceframe reads/writes.
15592
15593 * linux-low.c (handle_tracepoints): New.
15594 (linux_wait_1): Call it.
15595 (linux_resume_one_lwp): Handle while-stepping.
15596 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
15597 (linux_target_ops): Install them.
15598 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
15599 New field.
15600 * linux-x86-low.c (x86_supports_tracepoints): New.
15601 (the_low_target). Install it.
15602
15603 * mem-break.h (delete_breakpoint): Declare.
15604 * mem-break.c (delete_breakpoint): Make external.
15605
15606 * target.h (struct target_ops): Add `supports_tracepoints',
15607 `read_pc', and `write_pc' fields.
15608 (target_supports_tracepoints): Define.
15609 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
15610 (phex_nz): New.
15611
15612 * regcache.h (struct regcache) <registers_owned>: New field.
15613 (init_register_cache, regcache_cpy): Declare.
15614 (regcache_read_pc, regcache_write_pc): Declare.
15615 (register_cache_size): Declare.
15616 (supply_regblock): Declare.
15617 * regcache.c (init_register_cache): New.
15618 (new_register_cache): Use it.
15619 (regcache_cpy): New.
15620 (register_cache_size): New.
15621 (supply_regblock): New.
15622 (regcache_read_pc, regcache_write_pc): New.
15623
15624 * tracepoint.c: New.
15625
15626 * Makefile.in (OBS): Add tracepoint.o.
15627 (tracepoint.o): New rule.
15628
15629 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
15630
15631 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
15632 (i386-mmx.o): New.
15633 (i386-mmx.c): Likewise.
15634 (i386-mmx-linux.o): Likewise.
15635 (i386-mmx-linux.c): Likewise.
15636
15637 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
15638 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
15639 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
15640 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
15641
15642 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
15643 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
15644 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
15645
15646 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
15647
15648 * Makefile.in (clean): Updated.
15649 (i386-avx.o): New.
15650 (i386-avx.c): Likewise.
15651 (i386-avx-linux.o): Likewise.
15652 (i386-avx-linux.c): Likewise.
15653 (amd64-avx.o): Likewise.
15654 (amd64-avx.c): Likewise.
15655 (amd64-avx-linux.o): Likewise.
15656 (amd64-avx-linux.c): Likewise.
15657
15658 * configure.srv (srv_i386_regobj): Add i386-avx.o.
15659 (srv_i386_linux_regobj): Add i386-avx-linux.o.
15660 (srv_amd64_regobj): Add amd64-avx.o.
15661 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
15662 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
15663 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
15664 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
15665 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
15666 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
15667 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
15668
15669 * i387-fp.c: Include "i386-xstate.h".
15670 (i387_xsave): New.
15671 (i387_cache_to_xsave): Likewise.
15672 (i387_xsave_to_cache): Likewise.
15673 (x86_xcr0): Likewise.
15674
15675 * i387-fp.h (i387_cache_to_xsave): Likewise.
15676 (i387_xsave_to_cache): Likewise.
15677 (x86_xcr0): Likewise.
15678
15679 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
15680 * linux-crisv32-low.c (target_regsets): Likewise.
15681 * linux-m68k-low.c (target_regsets): Likewise.
15682 * linux-mips-low.c (target_regsets): Likewise.
15683 * linux-ppc-low.c (target_regsets): Likewise.
15684 * linux-s390-low.c (target_regsets): Likewise.
15685 * linux-sh-low.c (target_regsets): Likewise.
15686 * linux-sparc-low.c (target_regsets): Likewise.
15687 * linux-xtensa-low.c (target_regsets): Likewise.
15688
15689 * linux-low.c: Include <sys/uio.h>.
15690 (regsets_fetch_inferior_registers): Support nt_type.
15691 (regsets_store_inferior_registers): Likewise.
15692 (linux_process_qsupported): New.
15693 (linux_target_ops): Add linux_process_qsupported.
15694
15695 * linux-low.h (regset_info): Add nt_type.
15696 (linux_target_ops): Add process_qsupported.
15697
15698 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
15699 and <sys/uio.h>.
15700 (init_registers_i386_avx_linux): New.
15701 (init_registers_amd64_avx_linux): Likewise.
15702 (xmltarget_i386_linux_no_xml): Likewise.
15703 (xmltarget_amd64_linux_no_xml): Likewise.
15704 (PTRACE_GETREGSET): Likewise.
15705 (PTRACE_SETREGSET): Likewise.
15706 (x86_fill_xstateregset): Likewise.
15707 (x86_store_xstateregset): Likewise.
15708 (use_xml): Likewise.
15709 (x86_linux_update_xmltarget): Likewise.
15710 (x86_linux_process_qsupported): Likewise.
15711 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
15712 (x86_arch_setup): Don't call init_registers_amd64_linux nor
15713 init_registers_i386_linux here. Call
15714 x86_linux_update_xmltarget.
15715 (the_low_target): Add x86_linux_process_qsupported.
15716
15717 * server.c (handle_query): Call target_process_qsupported.
15718
15719 * target.h (target_ops): Add process_qsupported.
15720 (target_process_qsupported): New.
15721
15722 2010-04-03 Pedro Alves <pedro@codesourcery.com>
15723
15724 * inferiors.c (add_thread): Set last_status kind to
15725 TARGET_WAITKIND_IGNORE.
15726 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
15727 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
15728 (linux_wait_1): Move `thread' local definition to block that uses
15729 it. Don't NULL initialize `event_child'.
15730 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
15731 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
15732 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
15733
15734 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15735
15736 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
15737 an extended waitstatus, or by a watchpoint.
15738 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
15739 thread was stepping or has been stopped by a watchpoint.
15740
15741 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15742
15743 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
15744 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
15745 of another, then delete the previous, and validate all
15746 breakpoints.
15747 (validate_inserted_breakpoint): New.
15748 (delete_disabled_breakpoints): New.
15749 (validate_breakpoints): New.
15750 (check_mem_read): Validate breakpoints before trusting their
15751 shadow. Delete disabled breakpoints.
15752 (check_mem_write): Validate breakpoints before trusting they
15753 should be inserted. Delete disabled breakpoints.
15754 * mem-break.h (validate_breakpoints):
15755 * server.c (handle_query): Validate breakpoints when we see a
15756 qSymbol query.
15757
15758 2010-04-01 Pedro Alves <pedro@codesourcery.com>
15759
15760 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
15761 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
15762 if we could tell there's a GDB breakpoint at stop_pc.
15763 (need_step_over_p): Don't do a step over if we find a GDB
15764 breakpoint at the resume PC.
15765
15766 * mem-break.c (struct raw_breakpoint): New.
15767 (enum bkpt_type): New type `gdb_breakpoint'.
15768 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
15769 fields. New field `raw'.
15770 (find_raw_breakpoint_at): New.
15771 (set_raw_breakpoint_at): Handle refcounting. Create a raw
15772 breakpoint instead.
15773 (set_breakpoint_at): Adjust.
15774 (delete_raw_breakpoint): New.
15775 (release_breakpoint): New.
15776 (delete_breakpoint): Rename to...
15777 (delete_breakpoint_1): ... this. Add proc parameter. Use
15778 release_breakpoint. Return ENOENT.
15779 (delete_breakpoint): Reimplement.
15780 (find_breakpoint_at): Delete.
15781 (find_gdb_breakpoint_at): New.
15782 (delete_breakpoint_at): Delete.
15783 (set_gdb_breakpoint_at): New.
15784 (delete_gdb_breakpoint_at): New.
15785 (gdb_breakpoint_here): New.
15786 (set_reinsert_breakpoint): Use release_breakpoint.
15787 (uninsert_breakpoint): Rename to ...
15788 (uninsert_raw_breakpoint): ... this.
15789 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
15790 (reinsert_raw_breakpoint): Change parameter type to
15791 raw_breakpoint.
15792 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
15793 instead.
15794 (check_breakpoints): Adjust. Use release_breakpoint.
15795 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
15796 (breakpoint_inserted_here): Ditto.
15797 (check_mem_read): Adjust to iterate over raw breakpoints instead.
15798 Don't trust the breakpoint's shadow if it is not inserted.
15799 (check_mem_write): Adjust to iterate over raw breakpoints instead.
15800 (delete_all_breakpoints): Adjust.
15801 (free_all_breakpoints): Mark all breakpoints as uninserted, and
15802 use delete_breakpoint_1.
15803
15804 * mem-break.h (breakpoints_supported): Delete declaration.
15805 (set_gdb_breakpoint_at): Declare.
15806 (gdb_breakpoint_here): Declare.
15807 (delete_breakpoint_at): Delete.
15808 (delete_gdb_breakpoint_at): Declare.
15809
15810 * server.h (struct raw_breakpoint): Forward declare.
15811 (struct process_info): New field `raw_breakpoints'.
15812
15813 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
15814 breakpoints.
15815
15816 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15817
15818 * linux-low.c (status_pending_p_callback): Fix comment.
15819 (linux_wait_for_event_1): Move most of the internal breakpoint
15820 handling from here...
15821 (linux_wait_1): ... to here.
15822 (count_events_callback): New.
15823 (select_singlestep_lwp_callback): New.
15824 (select_event_lwp_callback): New.
15825 (cancel_breakpoints_callback): New.
15826 (select_event_lwp): New.
15827 (linux_wait_1): Simplify internal breakpoint handling. Give equal
15828 priority to all LWPs that have had events that should be reported
15829 to the client. Cancel breakpoints when about to reporting the
15830 event to the client, not while stopping lwps. No longer cancel
15831 finished single-steps here.
15832 (cancel_finished_single_step): Delete.
15833 (cancel_finished_single_steps): Delete.
15834
15835 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15836
15837 * mem-break.c (enum bkpt_type): New.
15838 (struct breakpoint): New field `type'.
15839 (set_breakpoint_at): Change return type to struct breakpoint
15840 pointer. Set type to `other_breakpoint' by default.
15841 (delete_breakpoint): Rewrite, supporting more than one breakpoint
15842 in the breakpoint list.
15843 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
15844 (reinsert_breakpoint): Rename to ...
15845 (reinsert_raw_breakpoint): ... this.
15846 (reinsert_breakpoints_at): Adjust.
15847 * mem-break.h (struct breakpoint): Declare.
15848 (set_breakpoint_at): Change return type to struct breakpoint
15849 pointer.
15850
15851 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15852
15853 * server.c (handle_query): Assign, not compare.
15854
15855 2010-03-24 Pedro Alves <pedro@codesourcery.com>
15856
15857 Teach linux gdbserver to step-over-breakpoints.
15858
15859 * linux-low.c (can_hardware_single_step): New.
15860 (supports_breakpoints): New.
15861 (handle_extended_wait): If stopping threads, read the stop pc of
15862 the new cloned LWP.
15863 (get_pc): New.
15864 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
15865 low target doesn't support retrieving the PC.
15866 (add_lwp): Set last_resume_kind to resume_continue.
15867 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
15868 (linux_attach): Don't clear stop_expected. Set the lwp's
15869 last_resume_kind to resume_stop.
15870 (linux_detach_one_lwp): Don't check for removed breakpoints.
15871 (check_removed_breakpoint): Delete.
15872 (status_pending_p): Rename to ...
15873 (status_pending_p_callback): ... this. Don't check for removed
15874 breakpoints. Don't consider threads that are stopped from GDB's
15875 perspective.
15876 (linux_wait_for_lwp): Always read the stop_pc here.
15877 (cancel_breakpoint): New.
15878 (step_over_bkpt): New global.
15879 (linux_wait_for_event_1): Implement stepping over breakpoints.
15880 (gdb_wants_lwp_stopped): New.
15881 (gdb_wants_all_stopped): New.
15882 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
15883 single-step traps here. Store the thread's last reported target
15884 wait status.
15885 (send_sigstop): Don't clear stop_expected. Always set it,
15886 instead.
15887 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
15888 (cancel_finished_single_step): New.
15889 (cancel_finished_single_steps): New.
15890 (wait_for_sigstop): Don't cancel finished single-step traps here.
15891 (linux_resume_one_lwp): Don't check for removed breakpoints.
15892 Don't set `step' on non-hardware step archs.
15893 (linux_set_resume_request): Ignore resume_stop requests if already
15894 stopping or stopped. Set the lwp's last_resume_kind.
15895 (resume_status_pending_p): Don't check for removed breakpoints.
15896 (need_step_over_p): New.
15897 (start_step_over): New.
15898 (finish_step_over): New.
15899 (linux_resume_one_thread): Always queue a sigstop for resume_stop
15900 requests. Clear the thread's last reported target waitstatus.
15901 Don't use the `suspended' flag. Don't consider pending breakpoints.
15902 (linux_resume): Start a step-over if necessary.
15903 (proceed_one_lwp): New.
15904 (proceed_all_lwps): New.
15905 (unstop_all_lwps): New.
15906 * linux-low.h (struct lwp_info): Rewrite comment for the
15907 `suspended' flag. Add the `stop_pc' field. Delete the
15908 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
15909 Add `'last_resume_kind' and `need_step_over' fields.
15910 * inferiors.c (struct thread_info): Delete, moved elsewhere.
15911 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
15912 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
15913 (set_raw_breakpoint_at): New.
15914 (set_breakpoint_at): Rewrite to use it.
15915 (reinsert_breakpoint_handler): Delete.
15916 (set_reinsert_breakpoint): New.
15917 (reinsert_breakpoint_by_bp): Delete.
15918 (delete_reinsert_breakpoints): New.
15919 (uninsert_breakpoint): Rewrite.
15920 (uninsert_breakpoints_at): New.
15921 (reinsert_breakpoint): Rewrite.
15922 (reinsert_breakpoints_at): New.
15923 (check_breakpoints): Rewrite.
15924 (breakpoint_here): New.
15925 (breakpoint_inserted_here): New.
15926 (check_mem_read): Adjust.
15927 * mem-break.h (breakpoints_supported, breakpoint_here)
15928 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
15929 (reinsert_breakpoint_by_bp): Delete declaration.
15930 (delete_reinsert_breakpoints): Declare.
15931 (reinsert_breakpoint): Delete declaration.
15932 (reinsert_breakpoints_at): Declare.
15933 (uninsert_breakpoint): Delete declaration.
15934 (uninsert_breakpoints_at): Declare.
15935 (check_breakpoints): Adjust prototype.
15936 * server.h: Adjust include order.
15937 (struct thread_info): Declare here. Add a `last_status' field.
15938
15939 2010-03-23 Michael Snyder <msnyder@vmware.com>
15940
15941 * server.c (crc32): New function.
15942 (handle_query): Add handling for 'qCRC:' request.
15943
15944 2010-03-23 Pedro Alves <pedro@codesourcery.com>
15945
15946 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
15947 lwp had been stopped by a watchpoint.
15948
15949 2010-03-16 Pedro Alves <pedro@codesourcery.com>
15950
15951 * server.h (internal_error): Declare.
15952 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
15953 * utils.c (internal_error): New function.
15954
15955 2010-03-15 Andreas Schwab <schwab@redhat.com>
15956
15957 * configure.srv: Fix typo setting srv_regobj.
15958
15959 2010-03-15 Pedro Alves <pedro@codesourcery.com>
15960
15961 * linux-low.c (fetch_register): Avoid passing a non string literal
15962 format to `error'.
15963 (usr_store_inferior_registers): Ditto.
15964
15965 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15966
15967 * linux-low.c (linux_write_memory): Bail out early if peeking
15968 memory failed.
15969
15970 2010-03-14 Pedro Alves <pedro@codesourcery.com>
15971
15972 * linux-low.h (struct lwp_info): New fields
15973 `stopped_by_watchpoint' and `stopped_data_address'.
15974 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
15975 here, and cache them in the lwp object.
15976 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
15977 directly.
15978 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
15979 field.
15980 (linux_stopped_by_watchpoint): Rewrite.
15981 (linux_stopped_data_address): Rewrite.
15982
15983 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
15984
15985 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
15986 switching the current inferior, not before.
15987
15988 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
15989
15990 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
15991 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
15992 i386-linux.c and amd64-linux.c.
15993 (reg-i386.o): Removed.
15994 (reg-i386.c): Likewise.
15995 (reg-i386-linux.o): Likewise.
15996 (reg-i386-linux.c): Likewise.
15997 (reg-x86-64.o): Likewise.
15998 (reg-x86-64.c): Likewise.
15999 (reg-x86-64-linux.o): Likewise.
16000 (reg-x86-64-linux.c): Likewise.
16001 (i386.o): New.
16002 (i386.c): Likewise.
16003 (i386-linux.o): Likewise.
16004 (i386-linux.c): Likewise.
16005 (amd64.o): Likewise.
16006 (amd64.c): Likewise.
16007 (amd64-linux.o): Likewise.
16008 (amd64-linux.c): Likewise.
16009
16010 * configure.srv (srv_i386_regobj): New.
16011 (srv_i386_linux_regobj): Likewise.
16012 (srv_amd64_regobj): Likewise.
16013 (srv_amd64_linux_regobj): Likewise.
16014 (srv_i386_32bit_xmlfiles): Likewise.
16015 (srv_i386_64bit_xmlfiles): Likewise.
16016 (srv_i386_xmlfiles): Likewise.
16017 (srv_amd64_xmlfiles): Likewise.
16018 (srv_i386_linux_xmlfiles): Likewise.
16019 (srv_amd64_linux_xmlfiles): Likewise.
16020 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
16021 srv_xmlfiles to $srv_i386_xmlfiles.
16022 (i[34567]86-*-mingw32ce*): Likewise.
16023 (i[34567]86-*-mingw*): Likewise.
16024 (i[34567]86-*-nto*): Likewise.
16025 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
16026 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
16027 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
16028 (x86_64-*-linux*): Likewise.
16029
16030 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
16031 (init_registers_amd64_linux): New.
16032 (x86_arch_setup): Replace init_registers_x86_64_linux with
16033 init_registers_amd64_linux.
16034
16035 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
16036
16037 * configure.ac: Check for libdl. If it is not available link against
16038 static libthread_db.
16039 * configure: Regenerate.
16040
16041 2010-02-22 Pedro Alves <pedro@codesourcery.com>
16042
16043 PR9605
16044
16045 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
16046 handing a read watchpoint.
16047 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
16048
16049 2010-02-12 Doug Evans <dje@google.com>
16050
16051 * linux-low.c (linux_supports_tracefork_flag): Document.
16052 (linux_look_up_symbols): Add comment.
16053
16054 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
16055
16056 * regcache.c (supply_register): Clear regcache if buf is NULL.
16057
16058 2010-02-02 Nicolas Roche <roche@sourceware.org>
16059 Joel Brobecker <brobecker@adacore.com>
16060
16061 * inferiors.c (find_inferior): Add function documentation.
16062 (unloaded_dll): Handle the case where the unloaded dll has not
16063 been previously registered in the dll list.
16064
16065 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16066
16067 * linux-arm-low.c (thumb_breakpoint_len): Delete.
16068 (thumb2_breakpoint): New.
16069 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
16070
16071 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16072
16073 * linux-low.c (get_stop_pc): Check for SIGTRAP.
16074 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
16075 breakpoints.
16076
16077 2010-01-21 Pedro Alves <pedro@codesourcery.com>
16078
16079 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
16080
16081 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
16082
16083 * linux-s390-low.c (s390_collect_ptrace_register)
16084 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
16085
16086 2010-01-21 Doug Evans <dje@google.com>
16087
16088 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
16089 (PTRACE_ARG4_TYPE): New macro.
16090 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
16091 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
16092 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
16093 (usr_store_inferior_registers): Ditto.
16094 (linux_read_memory, linux_write_memory): Ditto.
16095 (linux_test_for_tracefork): Ditto.
16096
16097 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
16098 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
16099
16100 2010-01-21 Pedro Alves <pedro@codesourcery.com>
16101
16102 * proc-service.c (ps_lgetregs): Don't refetch registers from the
16103 target.
16104
16105 2010-01-21 Pedro Alves <pedro@codesourcery.com>
16106
16107 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
16108 prototype to take a regcache. Adjust.
16109
16110 2010-01-20 Pedro Alves <pedro@codesourcery.com>
16111
16112 * regcache.h (struct thread_info): Forward declare.
16113 (struct regcache): New.
16114 (new_register_cache): Adjust prototype.
16115 (get_thread_regcache): Declare.
16116 (free_register_cache): Adjust prototype.
16117 (registers_to_string, registers_from_string): Ditto.
16118 (supply_register, supply_register_by_name, collect_register)
16119 (collect_register_as_string, collect_register_by_name): Ditto.
16120 * regcache.c (struct inferior_regcache_data): Delete.
16121 (get_regcache): Rename to ...
16122 (get_thread_regcache): ... this. Adjust. Switch inferior before
16123 fetching registers.
16124 (regcache_invalidate_one): Adjust.
16125 (regcache_invalidate): Fix prototype.
16126 (new_register_cache): Return the new register cache.
16127 (free_register_cache): Change prototype.
16128 (realloc_register_cache): Adjust.
16129 (registers_to_string): Change prototype to take a regcache. Adjust.
16130 (registers_from_string): Ditto.
16131 (register_data): Ditto.
16132 (supply_register): Ditto.
16133 (supply_register_by_name): Ditto.
16134 (collect_register): Ditto.
16135 (collect_register_as_string): Ditto.
16136 (collect_register_by_name): Ditto.
16137 * server.c (process_serial_event): Adjust.
16138 * linux-low.h (regset_fill_func, regset_store_func): Change
16139 prototype.
16140 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
16141 Change prototype.
16142 * linux-low.c (get_stop_pc): Adjust.
16143 (check_removed_breakpoint): Adjust.
16144 (linux_wait_for_event): Adjust.
16145 (linux_resume_one_lwp): Adjust.
16146 (fetch_register): Add regcache parameter. Adjust.
16147 (usr_store_inferior_registers): Ditto.
16148 (regsets_fetch_inferior_registers): Ditto.
16149 (regsets_store_inferior_registers): Ditto.
16150 (linux_fetch_registers, linux_store_registers): Ditto.
16151 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
16152 regcache. Adjust.
16153 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
16154 Ditto.
16155 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
16156 prototype to take a regcache.
16157 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
16158 * remote-utils.c (convert_ascii_to_int, outreg)
16159 (prepare_resume_reply): Change prototype to take a regcache.
16160 Adjust.
16161 * target.h (struct target_ops) <fetch_registers, store_registers>:
16162 Change prototype to take a regcache.
16163 (fetch_inferior_registers, store_inferior_registers): Change
16164 prototype to take a regcache. Adjust.
16165 * proc-service.c (ps_lgetregs): Adjust.
16166 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
16167 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
16168 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
16169 take a regcache. Adjust.
16170 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
16171 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
16172 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
16173 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
16174 * linux-cris-low.c (cris_get_pc, cris_set_pc)
16175 (cris_cannot_fetch_register):
16176 (cris_breakpoint_at): Change prototype to take a regcache.
16177 Adjust.
16178 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
16179 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
16180 to take a regcache. Adjust.
16181 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
16182 Adjust.
16183 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
16184 take a regcache. Adjust.
16185 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
16186 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
16187 (m68k_set_pc): Change prototype to take a regcache. Adjust.
16188 * linux-mips-low.c (mips_get_pc):
16189 (mips_set_pc): Change prototype to take a regcache. Adjust.
16190 (mips_reinsert_addr): Adjust.
16191 (mips_collect_register): Change prototype to take a regcache.
16192 Adjust.
16193 (mips_supply_register):
16194 (mips_collect_register_32bit, mips_supply_register_32bit)
16195 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16196 (mips_store_fpregset): Ditto.
16197 * linux-ppc-low.c (ppc_supply_ptrace_register)
16198 (ppc_supply_ptrace_register): Ditto.
16199 (parse_spufs_run): Adjust.
16200 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
16201 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
16202 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
16203 take a regcache. Adjust.
16204 * linux-s390-low.c (s390_collect_ptrace_register)
16205 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
16206 (s390_set_pc): Change prototype to take a regcache. Adjust.
16207 (s390_arch_setup): Adjust.
16208 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
16209 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
16210 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
16211 (sparc_fill_gregset, sparc_store_gregset_from_stack)
16212 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
16213 regcache. Adjust.
16214 (sparc_breakpoint_at): Adjust.
16215 * linux-xtensa-low.c (xtensa_fill_gregset):
16216 (xtensa_store_gregset):
16217 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
16218 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
16219 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
16220 prototype to take a regcache. Adjust.
16221 * win32-arm-low.c (arm_fetch_inferior_register)
16222 (arm_store_inferior_register): Change prototype to take a
16223 regcache. Adjust.
16224 * win32-i386-low.c (i386_fetch_inferior_register)
16225 (i386_store_inferior_register): Change prototype to take a
16226 regcache. Adjust.
16227 * win32-low.c (child_fetch_inferior_registers)
16228 (child_store_inferior_registers): Change prototype to take a
16229 regcache. Adjust.
16230 (win32_wait): Adjust.
16231 (win32_fetch_inferior_registers): Change prototype to take a
16232 regcache. Adjust.
16233 (win32_store_inferior_registers): Adjust.
16234 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
16235 store_inferior_register>: Change prototype to take a regcache.
16236
16237 2010-01-20 Doug Evans <dje@google.com>
16238
16239 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
16240 #ifdef.
16241 (linux_wait_for_event1, linux_init_signals): Ditto.
16242 (W_STOPCODE): Provide definition if missing.
16243
16244 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
16245
16246 * linux-low.c (linux_core_of_thread): New.
16247 (compare_ints, show_process, list_threads): New.
16248 (linux_qxfer_osdata): Report threads and cores.
16249 (linux_target_op): Register linux_core_of_thread.
16250 * remote-utils.c (prepare_resume_reply): Report the core.
16251 (buffer_xml_printf): Support %d specifier.
16252 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
16253 New.
16254 (handle_query): Handle qXfer:threads. Announce availability
16255 thereof.
16256 * target.h (struct target_ops): New field core_of_thread.
16257
16258 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
16259
16260 * Makefile.in (clean): Remove new generated files.
16261 (reg-s390.o, reg-s390.c): Remove rules.
16262 (reg-s390x.o, reg-s390x.c): Likewise.
16263 (s390-linux32.o, s390-linux32.c): Add rules.
16264 (s390-linux64.o, s390-linux64.c): Likewise.
16265 (s390x-linux64.o, s390x-linux64.c): Likewise.
16266 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
16267 * linux-s390-low.c: Include <elf.h>.
16268 (HWCAP_S390_HIGH_GPRS): Define if undefined.
16269 (init_registers_s390): Remove prototype.
16270 (init_registers_s390x): Likewise.
16271 (init_registers_s390_linux32): Add prototype.
16272 (init_registers_s390_linux64): Likewise.
16273 (init_registers_s390x_linux64): Likewise.
16274 (s390_num_regs_3264): New define.
16275 (s390_regmap_3264): New global variable.
16276 (s390_cannot_fetch_register): Remove obsolete check.
16277 (s390_cannot_store_register): Likewise.
16278 (s390_collect_ptrace_register): Handle upper/lower register halves.
16279 (s390_supply_ptrace_register): Likewise.
16280 (s390_fill_gregset): Update to register number changes.
16281 (s390_get_hwcap): New routine.
16282 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
16283 Install appropriate regmap and register set.
16284
16285 2010-01-01 Joel Brobecker <brobecker@adacore.com>
16286
16287 * server.c (gdbserver_version): Update copyright year to 2010.
16288 * gdbreplay.c (gdbreplay_version): Likewise.
16289
16290 2009-12-28 Doug Evans <dje@google.com>
16291
16292 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
16293 elf/external.h. Include <elf.h> instead but only if necessary.
16294
16295 2009-12-28 Pedro Alves <pedro@codesourcery.com>
16296
16297 * linux-low.c (linux_remove_process): Remove `detaching'
16298 parameter. Don't release/detach from thread_db here.
16299 (linux_kill): Release/detach from thread_db here, ...
16300 (linux_detach): ... and here, before actually detaching.
16301 (linux_wait_1): ... and here, when a process exits.
16302 * thread-db.c (any_thread_of): New.
16303 (thread_db_free): Switch the current inferior to a thread of the
16304 passed in process.
16305
16306 2009-12-21 Doug Evans <dje@google.com>
16307
16308 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
16309
16310 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
16311 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
16312 warning ifndef __NR_tkill. Move setting of errno there too.
16313 Delete unnecessary resetting of errno after syscall.
16314 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
16315
16316 * configure.ac: Check for dladdr.
16317 * config.in: Regenerate.
16318 * configure: Regenerate.
16319 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
16320 (try_thread_db_load): Update.
16321
16322 * linux-low.c (my_waitpid): Delete unnecessary prototype.
16323
16324 2009-12-18 Doug Evans <dje@google.com>
16325
16326 * event-loop.c: Include unistd.h if it exists.
16327
16328 * linux-low.c (my_waitpid): Move definition away from being in
16329 between linux_tracefork_child/linux_test_for_tracefork.
16330
16331 * gdb_proc_service.h (psaddr_t): Fix type.
16332 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
16333 signature to match glibc.
16334
16335 2009-12-16 Doug Evans <dje@google.com>
16336
16337 * linux-low.c (linux_read_memory): Fix argument to read.
16338
16339 2009-11-26 Pedro Alves <pedro@codesourcery.com>
16340
16341 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
16342 events, don't leave current_inferior pointing at null.
16343
16344 2009-11-26 Pedro Alves <pedro@codesourcery.com>
16345
16346 * win32-low.c (LOG): Delete.
16347 (OUTMSG): Output to stderr.
16348 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
16349 on compile time LOG macro.
16350 (win32_wait): Fix debug output.
16351
16352 2009-11-26 Pedro Alves <pedro@codesourcery.com>
16353
16354 * win32-low.c (win32_add_one_solib): If the dll name is
16355 "ntdll.dll", prepend the system directory to the dll path.
16356
16357 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
16358
16359 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
16360
16361 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
16362 Vladimir Prus <vladimir@codesourcery.com>
16363
16364 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
16365 * configure.ac: Check for __mcoldfire__ and set
16366 gdb_cv_m68k_is_coldfire.
16367 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
16368 reg-cf.o and reg-m68k.o.
16369 * configure: Regenerated.
16370
16371 2009-11-16 Pedro Alves <pedro@codesourcery.com>
16372
16373 * linux-low.c (linux_remove_process): Add `detaching' parameter.
16374 Pass it to thread_db_free.
16375 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
16376 proper `detaching' argument to linux_remove_process.
16377 * linux-low.h (thread_db_free): Add `detaching' parameter.
16378 * thread-db.c (thread_db_init): Pass false as `detaching' argument
16379 to thread_db_free.
16380 (thread_db_free): Add `detaching' parameter. Only
16381 call td_ta_clear_event if detaching from process.
16382
16383 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
16384
16385 * thread-db.c (thread_db_free): Fix typo.
16386
16387 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
16388
16389 PR gdb/10838
16390 * thread-db.c (thread_db_free): Call td_ta_clear_event.
16391
16392 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
16393
16394 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
16395 with an i686 compiler.
16396 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
16397 needed.
16398 * configure: Rebuilt.
16399
16400 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
16401
16402 PR gdb/10783
16403
16404 * server.c (handle_search_memory_1): Correct read_addr initialization
16405 in loop for searching subsequent chunks.
16406
16407 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
16408
16409 * configure.ac: New --with-libthread-db option.
16410 * thread-db.c: Allow direct dependence on libthread_db.
16411 (thread_db_free): Adjust.
16412 * config.in: Regenerate.
16413 * configure: Likewise.
16414
16415 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
16416
16417 PR gdb/10757
16418 * thread-db.c (attach_thread): New function.
16419 (maybe_attach_thread): Return success/failure.
16420 (find_new_threads_callback): Adjust.
16421 (thread_db_find_new_threads): Loop until no new threads.
16422
16423 2009-10-13 Pedro Alves <pedro@codesourcery.com>
16424
16425 * proc-service.c (ps_lgetregs): Formatting.
16426
16427 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
16428
16429 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
16430 * configure.ac: Adjust.
16431 * linux-low.h (struct process_info_private): Move members to struct
16432 thread_db.
16433 (thread_db_free, thread_db_handle_monitor_command): New prototype.
16434 * linux-low.c (linux_remove_process): Adjust.
16435 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
16436 * server.c (handle_query): Move code ...
16437 (handle_monitor_command): ... here. New function.
16438 * target.h (struct target_ops): New member.
16439 * thread-db.c (struct thread_db): New.
16440 (libthread_db_search_path): New variable.
16441 (thread_db_create_event, thread_db_enable_reporting)
16442 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
16443 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
16444 (try_thread_db_load_1, dladdr_to_soname): New functions.
16445 (try_thread_db_load, thread_db_load_search): New functions.
16446 (thread_db_init): Search for libthread_db.
16447 (thread_db_free): New function.
16448 (thread_db_handle_monitor_command): Likewise.
16449 * config.in: Regenerate.
16450 * configure: Regenerate.
16451
16452 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
16453
16454 * spu-low.c (spu_kill): Wait for inferior to terminate.
16455 Call clear_inferiors.
16456 (spu_detach): Call clear_inferiors.
16457
16458 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16459
16460 * aclocal.m4: Regenerate.
16461 * config.in: Likewise.
16462 * configure: Likewise.
16463
16464 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
16465
16466 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
16467 (parse_spufs_run): New function.
16468 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
16469 (ppc_breakpoint_at): Handle SPU breakpoints.
16470
16471 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
16472
16473 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
16474 (SPUFS_MAGIC): Define.
16475 (spu_enumerate_spu_ids): New function.
16476 (linux_qxfer_spu): New function.
16477 (linux_target_ops): Install linux_qxfer_spu.
16478
16479 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
16480
16481 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
16482 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
16483 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
16484 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
16485 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
16486 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
16487 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
16488 (init_registers_powerpc_cell32l): Add prototype.
16489 (init_registers_powerpc_cell64l): Likewise.
16490 (ppc_arch_setup): Detect Cell/B.E. architecture.
16491
16492 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
16493
16494 * Makefile.in (datarootdir): New variable.
16495
16496 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
16497
16498 * linux-low.c (linux_write_memory): Update debugging output.
16499 * Makefile.in (clean): Add new descriptions.
16500 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
16501 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
16502 * configure.srv: Add new files for arm*-*-linux*.
16503 * linux-arm-low.c: Add new declarations.
16504 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
16505 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
16506 (HWCAP_VFPv3D16): New.
16507 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
16508 instead of __IWMMXT__.
16509 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
16510 (arm_arch_setup): New.
16511 (target_regsets): Remove #ifdef. Add VFP regset.
16512 (the_low_target): Use arm_arch_setup.
16513
16514 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
16515
16516 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
16517 the main thread again.
16518
16519 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
16520
16521 Adding Neutrino gdbserver.
16522 * configure: Regenerated.
16523 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
16524 * configure.srv (i[34567]86-*-nto*): New target.
16525 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
16526 * remote-utils.c [__QNX__]: Include sys/iomgr.h
16527 (nto_comctrl) [__QNX__]: New function.
16528 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
16529
16530 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
16531
16532 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
16533 srv_tgtobj.
16534
16535 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
16536 Pedro Alves <pedro@codesourcery.com>
16537
16538 * win32-i386-low.c (i386_get_thread_context): Handle systems that
16539 don't support CONTEXT_EXTENDED_REGISTERS.
16540 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
16541 (the_low_target): Install them.
16542 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
16543 failing with ERROR_PIPE_NOT_CONNECTED.
16544
16545 2009-06-30 Doug Evans <dje@google.com>
16546 Pierre Muller <muller@ics.u-strasbg.fr>
16547
16548 Add h/w watchpoint support to x86-linux, win32-i386.
16549 * Makefile.in (SFILES): Add i386-low.c
16550 (i386_low_h): Define.
16551 (i386-low.o): Add dependencies.
16552 (linux-x86-low.o): Add i386-low.h dependency.
16553 (win32-i386-low.o): Ditto.
16554 * i386-low.c: New file.
16555 * i386-low.h: New file.
16556 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
16557 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
16558 * linux-low.c (linux_add_process): Initialize arch_private.
16559 (linux_remove_process): Free arch_private.
16560 (add_lwp): Initialize arch_private.
16561 (delete_lwp): Free arch_private.
16562 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
16563 provided.
16564 * linux-low.h (process_info_private): New member arch_private.
16565 (lwp_info): New member arch_private.
16566 (linux_target_ops): New members new_process, new_thread,
16567 prepare_to_resume.
16568 (ptid_of): New macro.
16569 * linux-x86-low.c: Include stddef.h, i386-low.h.
16570 (arch_process_info): New struct.
16571 (arch_lwp_info): New struct.
16572 (x86_linux_dr_get, x86_linux_dr_set): New functions.
16573 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
16574 (i386_dr_low_get_status): New function.
16575 (x86_insert_point, x86_remove_point): New functions.
16576 (x86_stopped_by_watchpoint): New function.
16577 (x86_stopped_data_address): New function.
16578 (x86_linux_new_process, x86_linux_new_thread): New functions.
16579 (x86_linux_prepare_to_resume): New function.
16580 (the_low_target): Add entries for insert_point, remove_point,
16581 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
16582 prepare_to_resume.
16583 * server.c (debug_hw_points): New global.
16584 (monitor_show_help): Document set debug-hw-points.
16585 (handle_query): Process "set debug-hw-points".
16586 * server.h (debug_hw_points): Declare.
16587 (paddress): Declare.
16588 * utils.c (NUMCELLS, CELLSIZE): New macros.
16589 (get_sell, xsnprintf, paddress): New functions.
16590 * win32-arm-low.c (the_low_target): Add entries for insert_point,
16591 remove_point, stopped_by_watchpoint, stopped_data_address.
16592 * win32-i386-low.c: Include i386-low.h.
16593 (debug_reg_state): Replaces dr.
16594 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
16595 (i386_dr_low_get_status): New function.
16596 (i386_insert_point, i386_remove_point): New functions.
16597 (i386_stopped_by_watchpoint): New function.
16598 (i386_stopped_data_address): New function.
16599 (i386_initial_stuff): Update.
16600 (get_thread_context,set_thread_context,i386_thread_added): Update.
16601 (the_low_target): Add entries for insert_point,
16602 remove_point, stopped_by_watchpoint, stopped_data_address.
16603 * win32-low.c (win32_insert_watchpoint): New function.
16604 (win32_remove_watchpoint): New function.
16605 (win32_stopped_by_watchpoint): New function.
16606 (win32_stopped_data_address): New function.
16607 (win32_target_ops): Add entries for insert_watchpoint,
16608 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
16609 * win32-low.h (win32_target_ops): New members insert_point,
16610 remove_point, stopped_by_watchpoint, stopped_data_address.
16611
16612 2009-06-25 Pedro Alves <pedro@codesourcery.com>
16613
16614 * server.c (process_serial_event): Re-return unsupported, not
16615 error, if the type isn't recognized. Re-allow supporting only
16616 insert or remove packets. Also call require_running for
16617 breakpoints. Add missing break statement to default case. Tidy.
16618 * target.h (struct target_ops): Rename insert_watchpoint to
16619 insert_point, and remove_watchpoint to remove_point.
16620
16621 * linux-low.h (struct linux_target_ops): Likewise.
16622 * linux-low.c (linux_insert_watchpoint): Rename to ...
16623 (linux_insert_point): ... this. Adjust.
16624 (linux_remove_watchpoint): Rename to ...
16625 (linux_remove_point): ... this. Adjust.
16626 (linux_target_ops): Adjust.
16627 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
16628 (cris_insert_point): ... this.
16629 (cris_remove_watchpoint): Rename to ...
16630 (cris_remove_point): ... this.
16631 (the_low_target): Adjust.
16632
16633 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
16634
16635 * server.c (handle_v_kill): Pass signal_pid to
16636 kill_inferior if multi_process is zero.
16637
16638 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
16639
16640 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
16641 * target.h (target_ops): Comment for *_watchpoint to make it clear
16642 the functions can get types '0' and '1'.
16643
16644 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
16645
16646 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
16647 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
16648 * regcache.c (get_regcache): Likewise.
16649 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
16650 * win32-low.c (child_fetch_inferior_registers): Remove check for
16651 regno 0.
16652
16653 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
16654 Pedro Alves <pedro@codesourcery.com>
16655
16656 * target.h (struct target_ops) <supports_multi_process>: New
16657 callback.
16658 (target_supports_multi_process): New.
16659 * server.c (handle_query): Even if GDB reports support, only
16660 enable multi-process if the target also supports it. Report
16661 multi-process support only if the target backend supports it.
16662 * linux-low.c (linux_supports_multi_process): New function.
16663 (linux_target_ops): Install it as target_supports_multi_process
16664 callback.
16665
16666 2009-05-24 Doug Evans <dje@google.com>
16667
16668 Global renaming of find_thread_pid to find_thread_ptid.
16669 * server.h (find_thread_ptid): Renamed from find_thread_pid.
16670 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
16671 All callers updated.
16672
16673 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
16674 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
16675 directly.
16676
16677 * linux-low.c (get_stop_pc): Print pc if debug_threads.
16678 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
16679 (linux_resume_one_lwp): Ditto.
16680
16681 2009-05-23 Doug Evans <dje@google.com>
16682
16683 * linux-low.c (linux_resume_one_lwp): Change type of first arg
16684 from struct inferior_list_entry * to struct lwp_info *.
16685 All callers updated.
16686
16687 2009-05-13 Doug Evans <dje@google.com>
16688
16689 * linux-x86-low.c: Don't include assert.h.
16690 (x86_siginfo_fixup): Use fatal, not assert.
16691 (x86_arch_setup): Fix comment.
16692
16693 2009-05-12 Doug Evans <dje@google.com>
16694
16695 Biarch support for i386/amd64 gdbserver.
16696 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
16697 Add linux-x86-low.c.
16698 (linux-i386-low.o, linux-x86-64-low.o): Delete.
16699 (linux-x86-low.o): Add.
16700 * linux-x86-64-low.c: Delete.
16701 * linux-i386-low.c: Delete.
16702 * linux-x86-low.c: New file.
16703 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
16704 linux-x86-low.o.
16705 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
16706 linux-x86-low.o.
16707 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
16708 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
16709 (linux_child_pid_to_exec_file): New function.
16710 (elf_64_header_p, elf_64_file_p): New functions.
16711 (siginfo_fixup): New function.
16712 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
16713 give target a chance to convert layout.
16714 * linux-low.h (linux_target_ops): New member siginfo_fixup.
16715 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
16716
16717 2009-05-07 Doug Evans <dje@google.com>
16718
16719 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
16720 (regsets_store_inferior_registers): Ditto.
16721
16722 2009-05-06 Pedro Alves <pedro@codesourcery.com>
16723
16724 PR server/10048
16725
16726 * linux-low.c (must_set_ptrace_flags): Delete.
16727 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
16728 of the global.
16729 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
16730 `lwp->must_set_ptrace_flags' instead.
16731 (linux_wait_for_event_1): Set ptrace options here.
16732 (linux_wait_1): ... not here.
16733
16734 2009-04-30 Doug Evans <dje@google.com>
16735
16736 * inferiors.c (started_inferior_callback): New function.
16737 (attached_inferior_callback): New function.
16738 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
16739 * server.c (print_started_pid, print_attached_pid): New functions.
16740 (detach_or_kill_for_exit): New function.
16741 (main): Call it instead of for_each_inferior (kill_inferior_callback).
16742 * server.h (have_started_inferiors_p): Declare.
16743 (have_attached_inferiors_p): Declare.
16744
16745 * inferiors.c (remove_process): Fix memory leak, free process.
16746 * linux-low.c (linux_remove_process): New function.
16747 (linux_kill): Call it instead of remove_process.
16748 (linux_detach, linux_wait_1): Ditto.
16749
16750 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
16751
16752 * configure.srv: Add x86 Windows CE target.
16753
16754 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16755
16756 * inferiors.c (get_thread_process): Make global.
16757 * server.h (get_thread_process): Add prototype.
16758 * thread-db.c (find_one_thread): Use get_thread_process
16759 instead of current_process.
16760 (thread_db_get_tls_address): Do not crash if called when
16761 thread layer is not yet initialized.
16762
16763 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
16764
16765 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
16766 * spu-low.c (current_tid): Rename to ...
16767 (current_ptid): ... this.
16768 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
16769 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
16770 ptid_get_lwp (current_ptid) instead of current_tid.
16771 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
16772 instead of current_tid. Use find_process_pid to verify pid
16773 argument is valid. Pass proper argument to remove_process.
16774 (spu_thread_alive): Compare current_ptid instead of current_tid.
16775 (spu_resume): Likewise.
16776
16777 2009-04-02 Pedro Alves <pedro@codesourcery.com>
16778
16779 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
16780 variable.
16781
16782 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16783
16784 Implement the multiprocess extensions, and add linux multiprocess
16785 support.
16786
16787 * server.h (ULONGEST): Declare.
16788 (struct ptid, ptid_t): New.
16789 (minus_one_ptid, null_ptid): Declare.
16790 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16791 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
16792 (struct inferior_list_entry): Change `id' type from unsigned from
16793 to ptid_t.
16794 (struct sym_cache, struct breakpoint, struct
16795 process_info_private): Forward declare.
16796 (struct process_info): Declare.
16797 (current_process): Declare.
16798 (all_processes): Declare.
16799 (initialize_inferiors): Declare.
16800 (add_thread): Adjust to use ptid_t.
16801 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
16802 (add_process, remove_process, find_thread_pid): Declare.
16803 (find_inferior_id): Adjust to use ptid_t.
16804 (cont_thread, general_thread, step_thread): Change type to ptid_t.
16805 (multi_process): Declare.
16806 (push_event): Adjust to use ptid_t.
16807 (read_ptid, write_ptid): Declare.
16808 (prepare_resume_reply): Adjust to use ptid_t.
16809 (clear_symbol_cache): Declare.
16810 * inferiors.c (all_processes): New.
16811 (null_ptid, minus_one_ptid): New.
16812 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
16813 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
16814 (add_thread): Change unsigned long to ptid. Remove gdb_id
16815 parameter. Adjust.
16816 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
16817 (gdb_id_to_thread): Rename to ...
16818 (find_thread_pid): ... this. Change unsigned long to ptid.
16819 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
16820 (loaded_dll, pull_pid_from_list): Adjust.
16821 (add_process, remove_process, find_process_pid)
16822 (get_thread_process, current_process, initialize_inferiors): New.
16823 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
16824 (struct target_waitstatus) <related_pid>: Ditto.
16825 (struct target_ops) <kill, detach>: Add `pid' argument. Change
16826 return type to int.
16827 (struct target_ops) <join>: Add `pid' argument.
16828 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
16829 (struct target_ops) <wait>: Add `ptid' field. Change return type
16830 to ptid.
16831 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
16832 (mywait): Add `ptid' argument. Change return type to ptid_t.
16833 (target_pid_to_str): Declare.
16834 * target.c (set_desired_inferior): Adjust to use ptids.
16835 (mywait): Add new `ptid' argument. Adjust.
16836 (target_pid_to_str): New.
16837 * mem-break.h (free_all_breakpoints): Declare.
16838 * mem-break.c (breakpoints): Delelete.
16839 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
16840 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
16841 to use per-process breakpoint list.
16842 (free_all_breakpoints): New.
16843 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
16844 (symbol_cache, all_symbols_looked_up): Delete.
16845 (hexchars): New.
16846 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
16847 read_ptid): New.
16848 (prepare_resume_reply): Change ptid argument's type from unsigned
16849 long to ptid_t. Adjust. Implement W;process and X;process.
16850 (free_sym_cache, clear_symbol_cache): New.
16851 (look_up_one_symbol): Adjust to per-process symbol cache. *
16852 * server.c (cont_thread, general_thread, step_thread): Change type
16853 to ptid_t.
16854 (attached): Delete.
16855 (multi_process): New.
16856 (last_ptid): Change type to ptid_t.
16857 (struct vstop_notif) <ptid>: Change type to ptid_t.
16858 (queue_stop_reply, push_event): Change `ptid' argument's type to
16859 ptid_t.
16860 (discard_queued_stop_replies): Add `pid' argument.
16861 (start_inferior): Adjust to use ptids. Adjust to mywait interface
16862 changes. Don't reference the `attached' global.
16863 (attach_inferior): Adjust to mywait interface changes.
16864 (handle_query): Adjust to use ptids. Parse GDB's qSupported
16865 features. Handle and report "multiprocess+". Handle
16866 "qAttached:PID".
16867 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
16868 changes.
16869 (handle_v_kill): New.
16870 (handle_v_stopped): Adjust to use target_pid_to_str.
16871 (handle_v_requests): Allow multiple attaches and runs when
16872 multiprocess extensions are in effect. Handle "vKill".
16873 (myresume): Adjust to use ptids.
16874 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
16875 (handle_status): Adjust to discard_queued_stop_replies interface
16876 change.
16877 (first_thread_of, kill_inferior_callback)
16878 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
16879 (main): Call initialize_inferiors. Adjust to use ptids, killing
16880 and detaching from all inferiors. Handle multiprocess packet
16881 variants.
16882 * linux-low.h: Include gdb_proc_service.h.
16883 (struct process_info_private): New.
16884 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
16885 <lwpid_of>: Use ptid_get_lwp.
16886 (get_lwp_thread): Adjust.
16887 (struct lwp_info): Add `dead' member.
16888 (find_lwp_pid): Declare.
16889 * linux-low.c (thread_db_active): Delete.
16890 (new_inferior): Adjust comment.
16891 (inferior_pid): Delete.
16892 (linux_add_process): New.
16893 (handle_extended_wait): Adjust.
16894 (add_lwp): Change unsigned long to ptid.
16895 (linux_create_inferior): Add process to processes table. Adjust
16896 to use ptids. Don't set new_inferior here.
16897 (linux_attach_lwp): Rename to ...
16898 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
16899 it. Adjust to use ptids.
16900 (linux_attach_lwp): New.
16901 (linux_attach): Add process to processes table. Don't set
16902 new_inferior here.
16903 (struct counter): New.
16904 (second_thread_of_pid_p, last_thread_of_process_p): New.
16905 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
16906 multiple processes.
16907 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
16908 processes. Remove process from process table.
16909 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
16910 to multiple processes.
16911 (any_thread_of): New.
16912 (linux_detach): Add `pid' argument, and handle it. Remove process
16913 from processes table.
16914 (linux_join): Add `pid' argument. Handle it.
16915 (linux_thread_alive): Change unsighed long argument to ptid_t.
16916 Consider dead lwps as not being alive.
16917 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
16918 threads we're not interested in.
16919 (same_lwp, find_lwp_pid): New.
16920 (linux_wait_for_lwp): Change `pid' argument's type from int to
16921 ptid_t. Adjust.
16922 (linux_wait_for_event): Rename to ...
16923 (linux_wait_for_event_1): ... this. Change `pid' argument's type
16924 from int to ptid_t. Adjust.
16925 (linux_wait_for_event): New.
16926 (linux_wait_1): Add `ptid' argument. Change return type to
16927 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
16928 that exit from the process table.
16929 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
16930 Adjust.
16931 (mark_lwp_dead): New.
16932 (wait_for_sigstop): Adjust to use ptids. If a process exits while
16933 stopping all threads, mark its main lwp as dead.
16934 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
16935 ptids.
16936 (fetch_register, usr_store_inferior_registers)
16937 (regsets_fetch_inferior_registers)
16938 (regsets_store_inferior_registers, linux_read_memory)
16939 (linux_write_memory): Inline `inferior_pid'.
16940 (linux_look_up_symbols): Adjust to use per-process
16941 `thread_db_active'.
16942 (linux_request_interrupt): Adjust to use ptids.
16943 (linux_read_auxv): Inline `inferior_pid'.
16944 (initialize_low): Don't reference thread_db_active.
16945 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
16946 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
16947 (ps_getpid): Return the pid of the current inferior.
16948 * thread-db.c (proc_handle, thread_agent): Delete.
16949 (thread_db_create_event, thread_db_enable_reporting): Adjust to
16950 per-process data.
16951 (find_one_thread): Change argument type to ptid_t. Adjust to
16952 per-process data.
16953 (maybe_attach_thread): Adjust to per-process data and ptids.
16954 (thread_db_find_new_threads): Ditto.
16955 (thread_db_init): Ditto.
16956 * spu-low.c (spu_create_inferior, spu_attach): Add process to
16957 processes table. Adjust to use ptids.
16958 (spu_kill, spu_detach): Adjust interface. Remove process from
16959 processes table.
16960 (spu_join, spu_thread_alive): Adjust interface.
16961 (spu_wait): Adjust interface. Remove process from processes
16962 table. Adjust to use ptids.
16963 * win32-low.c (current_inferior_tid): Delete.
16964 (current_inferior_ptid): New.
16965 (debug_event_ptid): New.
16966 (thread_rec): Take a ptid. Adjust.
16967 (child_add_thread): Add `pid' argument. Adjust to use ptids.
16968 (child_delete_thread): Ditto.
16969 (do_initial_child_stuff): Add `attached' argument. Add process to
16970 processes table.
16971 (child_fetch_inferior_registers, child_store_inferior_registers):
16972 Adjust.
16973 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
16974 (win32_attach): Pass 1 to do_initial_child_stuff.
16975 (win32_kill): Adjust interface. Remove process from processes
16976 table.
16977 (win32_detach): Ditto.
16978 (win32_join): Adjust interface.
16979 (win32_thread_alive): Take a ptid.
16980 (win32_resume): Adjust to use ptids.
16981 (get_child_debug_event): Ditto.
16982 (win32_wait): Adjust interface. Remove exiting process from
16983 processes table.
16984
16985 2009-04-01 Pedro Alves <pedro@codesourcery.com>
16986
16987 Non-stop mode support.
16988
16989 * server.h (non_stop): Declare.
16990 (gdb_client_data, handler_func): Declare.
16991 (delete_file_handler, add_file_handler, start_event_loop):
16992 Declare.
16993 (handle_serial_event, handle_target_event, push_event)
16994 (putpkt_notif): Declare.
16995 * target.h (enum resume_kind): New.
16996 (struct thread_resume): Replace `step' field by `kind' field.
16997 (TARGET_WNOHANG): Define.
16998 (struct target_ops) <wait>: Add `options' argument.
16999 <supports_non_stop, async, start_non_stop>: New fields.
17000 (target_supports_non_stop, target_async): New.
17001 (start_non_stop): Declare.
17002 (mywait): Add `options' argument.
17003 * target.c (mywait): Add `options' argument. Print child exit
17004 notifications here.
17005 (start_non_stop): New.
17006 * server.c (non_stop, own_buf, mem_buf): New globals.
17007 (struct vstop_notif): New.
17008 (notif_queue): New global.
17009 (queue_stop_reply, push_event, discard_queued_stop_replies)
17010 (send_next_stop_reply): New.
17011 (start_inferior): Adjust to use resume_kind. Adjust to mywait
17012 interface changes.
17013 (attach_inferior): In non-stop mode, don't wait for the target
17014 here.
17015 (handle_general_set): Handle QNonStop.
17016 (handle_query): When handling qC, return the current general
17017 thread, instead of the first thread of the list.
17018 (handle_query): If the backend supports non-stop mode, include
17019 QNonStop+ in the qSupported query response.
17020 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
17021 and non-stop mode.
17022 (handle_v_attach, handle_v_run): Handle non-stop mode.
17023 (handle_v_stopped): New.
17024 (handle_v_requests): Report support for vCont;t. Handle vStopped.
17025 (myresume): Adjust to use resume_kind. Handle non-stop.
17026 (queue_stop_reply_callback): New.
17027 (handle_status): Handle non-stop mode.
17028 (main): Clear non_stop flag on reconnection. Use the event-loop.
17029 Refactor serial protocol handling from here ...
17030 (process_serial_event): ... to this new function. When GDB
17031 selects any thread, select one here. In non-stop mode, wait until
17032 GDB acks all pending events before exiting.
17033 (handle_serial_event, handle_target_event): New.
17034 * remote-utils.c (remote_open): Install remote_desc in the event
17035 loop.
17036 (remote_close): Remove remote_desc from the event loop.
17037 (putpkt_binary): Rename to...
17038 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
17039 (putpkt_binary): New as wrapper around putpkt_binary_1.
17040 (putpkt_notif): New.
17041 (prepare_resume_reply): In non-stop mode, don't change the
17042 general_thread.
17043 * event-loop.c: New.
17044 * Makefile.in (OBJ): Add event-loop.o.
17045 (event-loop.o): New rule.
17046
17047 * linux-low.h (pid_of): Moved here.
17048 (lwpid_of): New.
17049 (get_lwp_thread): Use lwpid_of.
17050 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
17051 * linux-low.c (pid_of): Delete.
17052 (inferior_pid): Use lwpid_of.
17053 (linux_event_pipe): New.
17054 (target_is_async_p): New.
17055 (delete_lwp): New.
17056 (handle_extended_wait): Use lwpid_of.
17057 (add_lwp): Don't set lwpid field.
17058 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
17059 (linux_kill_one_lwp): If killing a running lwp, stop it first.
17060 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
17061 (linux_detach_one_lwp): If detaching from a running lwp, stop it
17062 first. Adjust to linux_wait_for_event interface changes. Use
17063 lwpid_of.
17064 (linux_detach): Don't delete the main lwp here.
17065 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
17066 (status_pending_p): Don't consider explicitly suspended lwps.
17067 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
17068 pointer. Add OPTIONS argument. Change return type to int. Use
17069 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
17070 (linux_wait_for_event): Take an integer pid instead of a lwp_info
17071 pointer. Add status pointer argument. Return a pid instead of a
17072 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
17073 changes. In non-stop mode, don't switch to a random thread.
17074 (linux_wait): Rename to...
17075 (linux_wait_1): ... this. Add target_options argument, and handle
17076 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
17077 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
17078 clean exit and signal exit code. Don't stop all threads in
17079 non-stop mode. In all-stop mode, only stop all threads when
17080 reporting a stop to GDB. Handle explicit thread stop requests.
17081 (async_file_flush, async_file_mark): New.
17082 (linux_wait): New.
17083 (send_sigstop): Use lwpid_of.
17084 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
17085 interface changes. In non-stop mode, don't switch to a random
17086 thread.
17087 (linux_resume_one_lwp): Use lwpid_of.
17088 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
17089 (linux_resume_one_thread): ... this. Handle resume_stop. In
17090 non-stop mode, don't look for pending flag in all threads.
17091 (resume_status_pending_p): Don't consider explicitly suspended
17092 threads.
17093 (my_waitpid): Reimplement. Emulate __WALL.
17094 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
17095 Use lwpid_of.
17096 (sigchld_handler, linux_supports_non_stop, linux_async)
17097 (linux_start_non_stop): New.
17098 (linux_target_ops): Register linux_supports_non_stop, linux_async
17099 and linux_start_non_stop.
17100 (initialize_low): Install SIGCHLD handler.
17101 * thread-db.c (thread_db_create_event, find_one_thread)
17102 (thread_db_get_tls_address): Use lwpid_of.
17103 * win32-low.c (win32_detach): Adjust to use resume_kind.
17104 (win32_wait): Add `options' argument.
17105 * spu-low.c (spu_resume): Adjust to use resume_kind.
17106 (spu_wait): Add `options' argument.
17107
17108 2009-04-01 Pedro Alves <pedro@codesourcery.com>
17109
17110 Decouple target code from remote protocol.
17111
17112 * target.h (enum target_waitkind): New.
17113 (struct target_waitstatus): New.
17114 (struct target_ops) <wait>: Return an unsigned long. Take a
17115 target_waitstatus pointer instead of a char pointer.
17116 (mywait): Likewise.
17117 * target.c (mywait): Change prototype to return an unsigned long.
17118 Take a target_waitstatus pointer instead of a char pointer. Adjust.
17119 * server.h (thread_from_wait, old_thread_from_wait): Delete
17120 declarations.
17121 (prepare_resume_reply): Change prototype to take a
17122 target_waitstatus.
17123 * server.c (thread_from_wait, old_thread_from_wait): Delete.
17124 (last_status, last_ptid): New.
17125 (start_inferior): Remove "statusptr" argument. Adjust. Return a
17126 pid instead of a signal.
17127 (attach_inferior): Remove "status" and "signal" parameters.
17128 Adjust.
17129 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
17130 not as an address.
17131 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
17132 (handle_v_requests, myresume): Remove "status" and "signal"
17133 parameters. Adjust.
17134 (handle_status): New.
17135 (main): Delete local `status'. Adjust.
17136 * remote-utils.c: Include target.h.
17137 (prepare_resume_reply): Change prototype to take a
17138 target_waitstatus. Adjust.
17139
17140 * linux-low.c (linux_wait): Adjust to new target_ops->wait
17141 interface.
17142 * spu-low.c (spu_wait): Adjust.
17143 * win32-low.c (enum target_waitkind, struct target_waitstatus):
17144 Delete.
17145 (win32_wait): Adjust.
17146
17147 2009-04-01 Pedro Alves <pedro@codesourcery.com>
17148
17149 * target.h (struct thread_resume): Delete leave_stopped member.
17150 (struct target_ops): Add a `n' argument to the `resume' callback.
17151 * server.c (start_inferior): Adjust.
17152 (handle_v_cont, myresume): Adjust.
17153 * linux-low.c (check_removed_breakpoint): Adjust to resume
17154 interface change, and to removed leave_stopped field.
17155 (resume_ptr): Delete.
17156 (struct thread_resume_array): New.
17157 (linux_set_resume_request): Add new `arg' parameter. Adjust to
17158 resume interface change.
17159 (linux_continue_one_thread, linux_queue_one_thread)
17160 (resume_status_pending_p): Check if the resume field is NULL
17161 instead of checking the leave_stopped member.
17162 (linux_resume): Adjust to the target resume interface change.
17163 * spu-low.c (spu_resume): Adjust to the target resume interface
17164 change.
17165 * win32-low.c (win32_detach, win32_resume): Ditto.
17166
17167 2009-04-01 Pedro Alves <pedro@codesourcery.com>
17168
17169 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
17170 flag.
17171 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
17172 pending.
17173 (linux_continue_one_thread): Only preserve the stepping flag if
17174 there's a pending breakpoint.
17175
17176 2009-03-31 Pedro Alves <pedro@codesourcery.com>
17177
17178 * server.c (main): After the inferior having exited, call
17179 remote_close before exiting gdbserver.
17180
17181 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
17182
17183 Fix size of FPSCR in Power 7 processors.
17184 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
17185 (PPC_FEATURE_HAS_DFP): New #define.
17186 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
17187 size of the FPSCR.
17188
17189 2009-03-23 Pedro Alves <pedro@codesourcery.com>
17190
17191 * server.c (handle_query) Whitespace and formatting.
17192
17193 2009-03-22 Pedro Alves <pedro@codesourcery.com>
17194
17195 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
17196 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
17197 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
17198 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
17199 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
17200 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
17201 Makefile.in, configure.ac: Fix whitespace throughout.
17202 * configure: Regenerate.
17203
17204 2009-03-22 Pedro Alves <pedro@codesourcery.com>
17205
17206 * inferiors.c (find_inferior): Make it safe for the callback
17207 function to delete the currently iterated inferior.
17208
17209 2009-03-22 Pedro Alves <pedro@codesourcery.com>
17210
17211 * Makefile.in (linuw_low_h): Move higher.
17212 (thread-db.o): Depend on $(linux_low_h).
17213
17214 2009-03-17 Pedro Alves <pedro@codesourcery.com>
17215
17216 Rename "process" to "lwp" throughout.
17217
17218 * linux-low.c (all_processes): Rename to...
17219 (all_lwps): ... this.
17220 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
17221 (add_process): Rename to ...
17222 (add_lwp): ... this. Adjust.
17223 (linux_create_inferior): Adjust.
17224 (linux_attach_lwp): Adjust.
17225 (linux_attach): Adjust.
17226 (linux_kill_one_process): Rename to ...
17227 (linux_kill_one_lwp): ... this. Adjust.
17228 (linux_kill): Adjust.
17229 (linux_detach_one_process): Rename to ...
17230 (linux_detach_one_lwp): ... this. Adjust.
17231 (linux_detach): Adjust.
17232 (check_removed_breakpoint): Adjust.
17233 (status_pending_p): Adjust.
17234 (linux_wait_for_process): Rename to ...
17235 (linux_wait_for_lwp): ... this. Adjust.
17236 (linux_wait_for_event): Adjust.
17237 (send_sigstop): Adjust.
17238 (wait_for_sigstop): Adjust.
17239 (stop_all_processes): Rename to ...
17240 (stop_all_lwps): ... this.
17241 (linux_resume_one_process): Rename to ...
17242 (linux_resume_one_lwp): ... this. Adjust.
17243 (linux_set_resume_request, linux_continue_one_thread)
17244 (linux_queue_one_thread, resume_status_pending_p)
17245 (usr_store_inferior_registers, regsets_store_inferior_registers)
17246 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
17247 Adjust.
17248 * linux-low.h (get_process): Rename to ...
17249 (get_lwp): ... this. Adjust.
17250 (get_thread_process): Rename to ...
17251 (get_thread_lwp): ... this. Adjust.
17252 (get_process_thread): Rename to ...
17253 (get_lwp_thread): ... this. Adjust.
17254 (struct process_info): Rename to ...
17255 (struct lwp_info): ... this.
17256 (all_processes): Rename to ...
17257 (all_lwps): ... this.
17258 * proc-service.c (ps_lgetregs): Adjust.
17259 * thread-db.c (thread_db_create_event, find_one_thread)
17260 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
17261
17262 2009-03-14 Pedro Alves <pedro@codesourcery.com>
17263
17264 * server.c (handle_query): Handle "qAttached".
17265
17266 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
17267
17268 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
17269 GPLv3, update license URL.
17270
17271 2009-03-01 Doug Evans <dje@google.com>
17272
17273 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
17274 (server_h): Add gdb_signals.h.
17275 (signals.o): Update.
17276 * server.h (target_signal_from_host,target_signal_to_host_p)
17277 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
17278
17279 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
17280
17281 * remote-utils.c (getpkt): Also generate remote-debug
17282 information if noack_mode is set.
17283
17284 2009-02-06 Pedro Alves <pedro@codesourcery.com>
17285
17286 * server.c (handle_query): Report qXfer:siginfo:read and
17287 qXfer:siginfo:write as supported and handle them.
17288 * target.h (struct target_ops) <qxfer_siginfo>: New field.
17289 * linux-low.c (linux_xfer_siginfo): New.
17290 (linux_target_ops): Set it.
17291
17292 2009-01-26 Pedro Alves <pedro@codesourcery.com>
17293
17294 * server.c (gdbserver_usage): Mention --remote-debug.
17295 (main): Accept '--remote-debug' switch.
17296
17297 2009-01-18 Doug Evans <dje@google.com>
17298
17299 * regcache.c (new_register_cache): No need to check result of xcalloc.
17300 * server.c (handle_search_memory): Back out calls to xmalloc,
17301 result is checked and error is returned to user upon failure.
17302 (handle_query): Ditto. Add more checks for result of malloc.
17303 (handle_v_cont): Check result of malloc, report error back to
17304 user upon failure.
17305 (handle_v_run): Ditto. Call freeargv.
17306 * server.h (freeargv): Declare.
17307 * utils.c (freeargv): New fn.
17308
17309 2009-01-15 Doug Evans <dje@google.com>
17310
17311 * gdbreplay.c (perror_with_name): Make arg const char *.
17312 * server.h (target_signal_to_name): Make return type const char *.
17313 * thread-db.c (thread_db_err_str): Make return type const char *.
17314 * utils.c (perror_with_name): Make arg const char *.
17315
17316 2009-01-14 Pedro Alves <pedro@codesourcery.com>
17317
17318 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
17319 when handling a EXIT_PROCESS_DEBUG_EVENT.
17320
17321 2009-01-06 Joel Brobecker <brobecker@adacore.com>
17322
17323 * gdbreplay.c (gdbreplay_version): Update copyright year.
17324 * server.c (gdbserver_version): Likewise.
17325
17326 2009-01-05 Doug Evans <dje@google.com>
17327
17328 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
17329 (handle_extended_wait): Improve comment.
17330
17331 2008-12-13 Doug Evans <dje@google.com>
17332
17333 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
17334 * server.h (ATTR_MALLOC): New macro.
17335 (xmalloc,xcalloc,xstrdup): Declare.
17336 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
17337 * inferiors.c: Ditto.
17338 * linux-low.c: Ditto.
17339 * mem-break.c: Ditto.
17340 * regcache.c: Ditto.
17341 * remote-utils.c: Ditto.
17342 * server.c: Ditto.
17343 * target.c: Ditto.
17344 * win32-low.c: Ditto.
17345
17346 2008-12-12 Doug Evans <dje@google.com>
17347
17348 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
17349 in debugging printf.
17350
17351 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
17352
17353 2008-12-09 Doug Evans <dje@google.com>
17354
17355 * linux-low.h (struct process_info): Delete member tid, unused.
17356 * thread-db.c (find_one_thread): Update.
17357 (maybe_attach_thread): Update.
17358
17359 2008-12-02 Pedro Alves <pedro@codesourcery.com>
17360
17361 * target.h (struct target_ops): Add qxfer_osdata member.
17362 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
17363 and dirent.h.
17364 (linux_qxfer_osdata): New functions.
17365 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
17366 callback.
17367 * server.c (handle_query): Handle "qXfer:osdata:read:".
17368 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
17369 (buffer_xml_printf): New functions.
17370 * server.h (struct buffer): New.
17371 (buffer_grow_str, buffer_grow_str0): New macros.
17372 (buffer_grow, buffer_free, buffer_init, buffer_finish)
17373 (buffer_xml_printf): Declare.
17374
17375 2008-11-24 Doug Evans <dje@google.com>
17376
17377 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
17378
17379 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
17380
17381 * server.c (handle_v_run): Always use the supplied argument list.
17382
17383 2008-11-19 Bob Wilson <bob.wilson@acm.org>
17384
17385 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
17386 (xtensa_regmap_table): Add entry for scompare1.
17387
17388 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
17389
17390 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
17391 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
17392 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
17393 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
17394 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
17395 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
17396 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
17397 XML target descriptions.
17398 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
17399 when inferior is running on an ISA 2.05 or later processor. Add
17400 special case to return offset for full 64-bit slot of FPSCR when
17401 in 32-bits.
17402
17403 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
17404
17405 * Makefile.in (SFILES, clean): Added sparc64 files.
17406 (reg-sparc64.o, reg-sparc64.c): New.
17407 * configure.srv (sparc*-*-linux*): New configuration.
17408 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
17409 syscall arguments for SPARC.
17410 (regsets_store_inferior_registers): Likewise.
17411 * linux-sparc-low.c: New file.
17412
17413 2008-10-21 Doug Evans <dje@google.com>
17414
17415 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
17416 (READLINE_DIR,READLINE_DEP): Delete.
17417 (INTERNAL_CFLAGS): Update.
17418 (LINTFLAGS): Update.
17419
17420 2008-10-10 Pedro Alves <pedro@codesourcery.com>
17421
17422 * server.c (handle_v_run): If GDB didn't specify an argv, use the
17423 whole argv from the last run, not just argv[0].
17424
17425 2008-09-08 Pedro Alves <pedro@codesourcery.com>
17426
17427 * regcache.c (new_register_cache): Return NULL if the register
17428 cache size isn't known yet.
17429 (free_register_cache): Avoid dereferencing a NULL regcache.
17430
17431 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
17432
17433 * configure.srv: Merge MIPS and MIPS64.
17434
17435 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
17436
17437 * Makefile.in (uninstall): Apply $(EXEEXT) too.
17438
17439 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
17440
17441 * Makefile.in: Add required vsx dependencies.
17442
17443 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
17444 Declare init_registers_powerpc_vsx32l.
17445 Declare init_registers_powerpc_vsx64l.
17446 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
17447 (ppc_arch_setup): Check for VSX in hwcap.
17448 (ppc_fill_vsxregset): New function.
17449 (ppc_store_vsxregset): New function.
17450 Add new VSX entry in regset_info target_regsets.
17451
17452 * configure.srv: Add new VSX dependencies.
17453
17454 2008-08-12 Pedro Alves <pedro@codesourcery.com>
17455
17456 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
17457 (remote_open): Set or clear transport_is_reliable.
17458 (putpkt_binary): Don't expect acks in noack mode.
17459 (getpkt): Don't send ack/nac in noack mode.
17460 * server.c (handle_general_set): Handle QStartNoAckMode.
17461 (handle_query): If connected by tcp pass QStartNoAckMode+ in
17462 qSupported.
17463 (main): Reset noack_mode on every connection.
17464 * server.h (noack_mode): Declare.
17465
17466 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
17467
17468 * Makefile.in (GDBREPLAY_OBS): New variable.
17469 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
17470
17471 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
17472 Daniel Jacobowitz <dan@codesourcery.com>
17473
17474 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
17475 (usr_store_inferior_registers): Likewise.
17476 (regsets_store_inferior_registers): Likewise.
17477
17478 2008-07-31 Rolf Jansen <rj@surtec.com>
17479 Pedro Alves <pedro@codesourcery.com>
17480
17481 * configure.ac: Check for memmem declaration.
17482 * server.c [HAVE_MALLOC_H]: Include malloc.h.
17483 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
17484 (disable_packet_qfThreadInfo): Unconditionally compile.
17485 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
17486 * configure, config.in: Regenerate.
17487
17488 2008-07-28 Doug Kwan <dougkwan@google.com>
17489
17490 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
17491 (linux_write_memory): Remove declaration of errno.
17492
17493 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
17494
17495 * linux-low.c (handle_extended_wait): Do not use "status"
17496 variable uninitialized.
17497
17498 2008-07-07 Pedro Alves <pedro@codesourcery.com>
17499
17500 * server.c (handle_v_attach): Inhibit reporting dll changes.
17501
17502 2008-06-27 Pedro Alves <pedro@codesourcery.com>
17503
17504 * remote-utils.c (prepare_resume_reply): If requested, don't
17505 output "thread:TID" in the T stop reply.
17506
17507 * server.c (disable_packet_vCont, disable_packet_Tthread)
17508 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
17509 (handle_query): If requested, disable support for qC, qfThreadInfo
17510 and qsThreadInfo.
17511 (handle_v_requests): If requested, disable support for vCont.
17512 (gdbserver_show_disableable): New.
17513 (main): Handle --disable-packet and --disable-packet=LIST.
17514
17515 * server.h (disable_packet_vCont, disable_packet_Tthread)
17516 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
17517
17518 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
17519
17520 * server.c (gdbserver_usage): Mention --version.
17521
17522 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
17523
17524 * Makefile.in (gdbreplay.o): New rule.
17525
17526 2008-06-06 Joseph Myers <joseph@codesourcery.com>
17527
17528 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
17529 message, not gdbserver.
17530
17531 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
17532 Nathan Sidwell <nathan@codesourcery.com>
17533 Joseph Myers <joseph@codesourcery.com>
17534
17535 * acinclude.m4: Include ../../config/acx.m4.
17536 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
17537 * configure, config.in: Regenerate.
17538 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
17539 * server.c (gdbserver_version): Print PKGVERSION.
17540 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
17541 (main): Adjust gdbserver_usage calls.
17542 * gdbreplay.c (version, host_name): Add declarations.
17543 (gdbreplay_version, gdbreplay_usage): New.
17544 (main): Accept --version and --help options.
17545
17546 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
17547
17548 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
17549 (arm_breakpoint_at): Handle Thumb.
17550 (the_low_target): Add comment.
17551
17552 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
17553
17554 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
17555
17556 2008-05-09 Doug Evans <dje@google.com>
17557
17558 * server.h (decode_search_memory_packet): Declare.
17559 * remote-utils.c (decode_search_memory_packet): New fn.
17560 * server.c (handle_search_memory_1): New fn.
17561 (handle_search_memory): New fn.
17562 (handle_query): Process qSearch:memory packets.
17563
17564 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
17565
17566 * regcache.c (registers_length): Remove.
17567 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
17568 full register packet.
17569 * regcache.h (registers_length): Remove prototype.
17570 * server.h (PBUFSIZ): Define to 16384.
17571
17572 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
17573
17574 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
17575 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
17576 powerpc-64l.o, and powerpc-altivec64l.o.
17577 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
17578 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
17579 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
17580 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
17581 rs6000/power-linux.xml, and rs6000/power64-linux.xml
17582 to srv_xmlfiles.
17583
17584 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
17585 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
17586 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
17587 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
17588 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
17589 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
17590 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
17591 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
17592 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
17593 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
17594 (clean): Update.
17595
17596 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
17597 (init_registers_powerpc_32l): ... this new prototype.
17598 (init_registers_powerpc_32): Remove, replace by ...
17599 (init_registers_powerpc_altivec32l): ... this new prototype.
17600 (init_registers_powerpc_e500): Remove, replace by ...
17601 (init_registers_powerpc_e500l): ... this new prototype.
17602 (init_registers_ppc64): Remove, replace by ...
17603 (init_registers_powerpc_64l): ... this new prototype.
17604 (init_registers_powerpc_64): Remove, replace by ...
17605 (init_registers_powerpc_altivec64l): ... this new prototype.
17606 (ppc_num_regs): Set to 73.
17607 (PT_ORIG_R3, PT_TRAP): Define if necessary.
17608 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
17609 (ppc_cannot_store_register): Handle orig_r3 and trap.
17610 (ppc_arch_setup): Update init_registers_... calls.
17611 (ppc_fill_gregset): Handle orig_r3 and trap.
17612
17613 * inferiors.c (clear_inferiors): Reset current_inferior.
17614
17615 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
17616
17617 * acinclude.m4: Add override.m4.
17618 * configure: Regenerate.
17619
17620 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
17621
17622 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
17623 initial call to init_register_ppc64.
17624
17625 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
17626
17627 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
17628 single powerpc*-*-linux* case.
17629 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
17630
17631 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
17632
17633 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
17634 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
17635 from reg_xmlfiles.
17636 * linux-ppc-low.c: Include <elf.h>.
17637 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
17638 (ppc_hwcap): New global variable.
17639 (ppc_regmap): Remove __SPE__ #ifdef sections.
17640 (ppc_regmap_e500): New global variable.
17641 (ppc_cannot_store_register): Update __SPE__ special case.
17642 (ppc_get_hwcap): New function.
17643 (ppc_arch_setup): Use it to determine whether inferior supports
17644 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
17645 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
17646 Do not access registers if target does not support AltiVec.
17647 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
17648 Do not access registers if target does not support SPE.
17649 (target_regsets): Unconditionally include AltiVec and SPE regsets.
17650
17651 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
17652
17653 * linux-low.c (disabled_regsets, num_regsets): New.
17654 (use_regsets_p): Delete.
17655 (linux_wait_for_process): Clear disabled_regsets.
17656 (regsets_fetch_inferior_registers): Check and set it.
17657 (regsets_store_inferior_registers): Likewise.
17658 (linux_fetch_registers, linux_store_registers): Do not use
17659 use_regsets_p.
17660 (initialize_low): Allocate disabled_regsets.
17661
17662 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
17663
17664 * Makefile.in (LIBOBJS): New.
17665 (OBS): Use LIBOBJS.
17666 (memmem.o): New rule.
17667 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
17668 * configure: Regenerated.
17669
17670 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
17671
17672 * server.c (handle_query): Never return "unsupported" for
17673 qXfer:features:read queries.
17674
17675 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
17676
17677 * server.c (get_features_xml): Fix inverted condition.
17678 (handle_query): Always support qXfer:feature:read.
17679
17680 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
17681
17682 * server.c (wrapper_argv): New.
17683 (start_inferior): Handle wrapper_argv. If set, expect an extra
17684 trap.
17685 (gdbserver_usage): Document --wrapper.
17686 (main): Parse --wrapper.
17687
17688 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17689
17690 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
17691 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
17692 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
17693 (ppc_set_pc): Likewise.
17694 (ppc_arch_setup): New function.
17695 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
17696 of collect_register.
17697 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
17698
17699 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17700
17701 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
17702 instead of linux-ppc64-low.o.
17703 * linux-ppc64-low.c: Remove file.
17704 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
17705 (linux-ppc64-low.o): Remove rule.
17706
17707 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
17708 (init_registers_powerpc_64): Likewise.
17709 (ppc_regmap): Conditionally define depending on __powerpc64__.
17710 (ppc_cannot_store_register): Do not special-case "fpscr" when
17711 compiled on __powerpc64__.
17712 (ppc_collect_ptrace_register): New function.
17713 (ppc_supply_ptrace_register): New function.
17714 (ppc_breakpoint): Change type to "unsigned int".
17715 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
17716 (the_low_target): Conditionally provide initializers for the
17717 arch_setup member depending on __powerpc64__. Install
17718 collect_ptrace_register and supply_ptrace_register members.
17719
17720 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
17721
17722 * regcache.h (gdbserver_xmltarget): Add extern declaration.
17723 * server.c (gdbserver_xmltarget): Define.
17724 (get_features_xml): Use it to replace "target.xml" and arch_string.
17725
17726 * configure.srv: Remove srv_xmltarget. Add XML files that were
17727 mentioned there to srv_xmlfiles instead. Remove conditional tests
17728 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
17729 srv_xmlfiles and srv_regobj to include all possible choices.
17730 * configure.ac (srv_xmltarget): Remove.
17731 (srv_xmlfiles): Do not add "target.xml".
17732 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
17733 checks for supplementary target information.
17734 * configure: Regenerate.
17735 * Makefile.in (XML_TARGET): Remove.
17736 (target.xml): Remove rule.
17737 (clean): Do not clean up target.xml.
17738 (.PRECIOUS): Do not mention target.xml.
17739
17740 * target.h (struct target_ops): Remove arch_string member.
17741 * linux-low.c (linux_arch_string): Remove.
17742 (linux_target_ops): Remove arch_string initializer.
17743 * linux-low.h (struct linux_target_ops): Remove arch_string member.
17744 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
17745 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
17746 * spu-low.c (spu_arch_string): Remove.
17747 (spu_target_ops): Remove arch_string initializer.
17748 * win32-low.c (win32_arch_string): Remove.
17749 (win32_target_ops): Remove arch_string initializer.
17750 * win32-low.h (struct win32_target_ops): Remove arch_string member.
17751 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
17752 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
17753
17754 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17755
17756 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
17757 by collect_ptrace_register and supply_ptrace_register hooks.
17758 * linux-low.c (fetch_register): Use supply_ptrace_register callback
17759 instead of checking for the_low_target.left_pad_xfer.
17760 (usr_store_inferior_registers): Use collect_ptrace_register callback
17761 instead of checking for the_low_target.left_pad_xfer.
17762
17763 * linux-s390-low.c (s390_collect_ptrace_register): New function.
17764 (s390_supply_ptrace_register): Likewise.
17765 (s390_fill_gregset): Call s390_collect_ptrace_register.
17766 (the_low_target): Update.
17767
17768 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
17769 (ppc_supply_ptrace_register): Likewise.
17770 (the_low_target): Update.
17771
17772 * linux-i386-low.c (the_low_target): Update.
17773 * linux-x86-64-low.c (the_low_target): Update.
17774
17775 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17776
17777 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
17778 reg-s390.o and reg-s390x.o.
17779
17780 * linux-low.c (new_inferior): New global variable.
17781 (linux_create_inferior, linux_attach): Set it.
17782 (linux_wait_for_process): Call the_low_target.arch_setup after the
17783 target has stopped for the first time.
17784 (initialize_low): Do not call the_low_target.arch_setup.
17785
17786 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
17787 (s390_set_pc): Likewise.
17788 (s390_arch_setup): New function.
17789 (the_low_target): Use s390_arch_setup as arch_setup routine.
17790
17791 * regcache.c (realloc_register_cache): New function.
17792 (set_register_cache): Call it for each existing regcache.
17793
17794 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
17795
17796 * server.h (init_registers): Remove prototype.
17797
17798 * linux-low.h (struct linux_target_ops): Add arch_setup field.
17799 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
17800 instead of init_registers ().
17801 * linux-arm-low.c (init_registers_arm): Add prototype.
17802 (init_registers_arm_with_iwmmxt): Likewise.
17803 (the_low_target): Add initializer for arch_setup field.
17804 * linux-cris-low.c (init_registers_cris): Add prototype.
17805 (the_low_target): Add initializer for arch_setup field.
17806 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
17807 (the_low_target): Add initializer for arch_setup field.
17808 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
17809 (the_low_target): Add initializer for arch_setup field.
17810 * linux-ia64-low.c (init_registers_ia64): Add prototype.
17811 (the_low_target): Add initializer for arch_setup field.
17812 * linux-m32r-low.c (init_registers_m32r): Add prototype.
17813 (the_low_target): Add initializer for arch_setup field.
17814 * linux-m68k-low.c (init_registers_m68k): Add prototype.
17815 (the_low_target): Add initializer for arch_setup field.
17816 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
17817 (init_registers_mips64_linux): Likewise.
17818 (the_low_target): Add initializer for arch_setup field.
17819 * linux-ppc-low.c (init_registers_ppc): Add prototype.
17820 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
17821 (the_low_target): Add initializer for arch_setup field.
17822 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
17823 (init_registers_powerpc_64): Likewise.
17824 (the_low_target): Add initializer for arch_setup field.
17825 * linux-s390-low.c (init_registers_s390): Add prototype.
17826 (init_registers_s390x): Likewise.
17827 (the_low_target): Add initializer for arch_setup field.
17828 * linux-sh-low.c (init_registers_sh): Add prototype.
17829 (the_low_target): Add initializer for arch_setup field.
17830 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
17831 (the_low_target): Add initializer for arch_setup field.
17832 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
17833 (the_low_target): Add initializer for arch_setup field.
17834
17835 * win32-low.h (struct win32_target_ops): Add arch_setup field.
17836 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
17837 instead of init_registers ().
17838 * win32-arm-low.c (init_registers_arm): Add prototype.
17839 (the_low_target): Add initializer for arch_setup field.
17840 * win32-i386-low.c (init_registers_i386): Add prototype.
17841 (the_low_target): Add initializer for arch_setup field.
17842
17843 * spu-low.c (init_registers_spu): Add prototype.
17844 (initialize_low): Call initialie_registers_spu () instead of
17845 initialize_registers ().
17846
17847 2008-02-19 Pedro Alves <pedro@codesourcery.com>
17848
17849 * server.c (handle_v_requests): When handling the vRun and vAttach
17850 packets, if already debugging a process, don't kill it. Return an
17851 error instead.
17852
17853 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
17854
17855 * server.c (handle_query): Correct length check.
17856
17857 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
17858
17859 * win32-low.c (do_initial_child_stuff): Add process handle
17860 parameter. Set current_process_handle and current_process_id from the
17861 parameters. Clear globals.
17862 (win32_create_inferior): Don't set current_process_handle and
17863 current_process_id here. Instead pass them on the call to
17864 do_initial_child_stuff.
17865 (win32_attach): Likewise.
17866 (win32_clear_inferiors): New.
17867 (win32_kill): Don't close the current process handle or the
17868 current thread handle here. Instead call win32_clear_inferiors.
17869 (win32_detach): Don't open a new handle to the process. Call
17870 win32_clear_inferiors.
17871 (win32_join): Don't rely on current_process_handle; open a new
17872 handle using the process id.
17873 (win32_wait): Call win32_clear_inferiors when the inferior process
17874 has exited.
17875
17876 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
17877
17878 * server.c (monitor_show_help): Add "exit".
17879
17880 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
17881
17882 * Makefile.in (SFILES): Add linux-xtensa-low.c.
17883 (clean): Add reg-xtensa.c.
17884 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
17885 * configure.srv (xtensa*-*-linux*) New target.
17886 * linux-xtensa-low.c: New.
17887 * xtensa-xtregs.c: New.
17888
17889 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
17890
17891 * hostio.c: Don't include errno.h.
17892 (errno_to_fileio_errno): Move to hostio-errno.
17893 * hostio.c: (hostio_error): Remove the error parameter. Defer the
17894 error number outputting to the target->hostio_last_error callback.
17895 (hostio_packet_error): Use FILEIO_EINVAL directly.
17896 (handle_open, handle_pread, hostio_error, handle_unlink): Update
17897 calls to hostio_error.
17898 * hostio-errno.c: New.
17899 * server.h (hostio_last_error_from_errno): Declare.
17900 * target.h (target_ops): Add hostio_last_error member.
17901 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
17902 as hostio_last_error handler.
17903 * spu-low.c (spu_target_ops): Likewise.
17904 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
17905 (wince_hostio_last_error): New functions.
17906 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
17907 as hostio_last_error handler.
17908 (win32_target_ops) [!_WIN32_WCE]: Register
17909 hostio_last_error_from_errno as hostio_last_error handler.
17910 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
17911 (hostio-errno.o): New rule.
17912 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
17913 * configure.srv (srv_hostio_err_objs): New variable. Default to
17914 hostio-errno.o.
17915 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
17916 * configure: Regenerate.
17917
17918 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
17919
17920 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
17921 (linux_kill, linux_detach): Clean up the process list.
17922 * remote-utils.c (remote_open): Improve port number parsing.
17923 (putpkt_binary, input_interrupt): Only send interrupts if the target
17924 is running.
17925 * server.c (extended_protocol): Make static.
17926 (attached): Define earlier.
17927 (exit_requested, response_needed, program_argv): New variables.
17928 (target_running): New.
17929 (start_inferior): Clear attached here.
17930 (attach_inferior): Set attached here.
17931 (require_running): Define.
17932 (handle_query): Use require_running and target_running. Implement
17933 "monitor exit".
17934 (handle_v_attach, handle_v_run): New.
17935 (handle_v_requests): Use require_running. Handle vAttach and vRun.
17936 (gdbserver_usage): Update.
17937 (main): Redo argument parsing. Handle --debug and --multi. Handle
17938 --attach along with other options or after the port. Save
17939 program_argv. Support no initial program. Resynchronize
17940 communication with GDB after an error. Handle "monitor exit".
17941 Use require_running and target_running. Always allow the extended
17942 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
17943 restart in extended mode.
17944 * README: Refer to the GDB manual. Update --attach usage.
17945
17946 2007-12-20 Andreas Schwab <schwab@suse.de>
17947
17948 * linux-low.c (STACK_SIZE): Define.
17949 (linux_tracefork_child): Use it. Use __clone2 on ia64.
17950 (linux_test_for_tracefork): Likewise.
17951
17952 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
17953
17954 * linux-low.c (linux_wait_for_event): Update messages. Do not
17955 reinsert auto-delete breakpoints.
17956 * mem-break.c (struct breakpoint): Change return type of handler to
17957 int.
17958 (set_breakpoint_at): Update handler type.
17959 (reinsert_breakpoint_handler): Return 1 instead of calling
17960 delete_breakpoint.
17961 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
17962 setting a new one.
17963 (check_breakpoints): Delete auto-delete breakpoints and return 2.
17964 * mem-break.h (set_breakpoint_at): Update handler type.
17965 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
17966 * win32-low.c (auto_delete_breakpoint): New.
17967 (get_child_debug_event): Use it.
17968
17969 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
17970
17971 * configure.ac: Check for pread and pwrite.
17972 * hostio.c (handle_pread): Fall back to lseek and read.
17973 (handle_pwrite): Fall back to lseek and write.
17974 * config.in, configure: Regenerated.
17975
17976 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
17977
17978 * server.c (myresume): Add own_buf argument.
17979 (main): Update calls.
17980
17981 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
17982
17983 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
17984 * remote-utils.c (remote_open): Do not call disable_async_io.
17985 (block_async_io): Delete.
17986 (unblock_async_io): Make static.
17987 (initialize_async_io): New.
17988 * server.c (handle_v_cont): Handle async I/O here.
17989 (myresume): Likewise. Move other common resume tasks here...
17990 (main): ... from here. Call initialize_async_io. Disable async
17991 I/O before the main loop.
17992 * server.h (initialize_async_io): Declare.
17993 (block_async_io, unblock_async_io): Delete prototypes.
17994 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
17995
17996 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
17997
17998 * remote-utils.c (readchar): Allow binary data in received messages.
17999
18000 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
18001
18002 * win32-low.c (attaching): New global.
18003 (win32_create_inferior): Clear the `attaching' global.
18004 (win32_attach): Set the `attaching' global.
18005 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
18006 attaching. Only set a breakpoint at the entry point if not
18007 attaching.
18008
18009 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
18010
18011 * server.c (main): Don't report dll events on the initial
18012 connection on attaches.
18013
18014 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
18015
18016 * server.c (main): Relax numerical bases supported for the pid of
18017 the --attach command line argument.
18018
18019 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
18020
18021 * win32-low.c (win32_attach): Call OpenProcess before
18022 DebugActiveProcess, not after. Add last error output to error
18023 call.
18024
18025 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
18026
18027 * win32-low.c (win32_get_thread_context)
18028 (win32_set_thread_context): New functions.
18029 (thread_rec): Use win32_get_thread_context.
18030 (continue_one_thread, win32_resume): Use win32_set_thread_context.
18031 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
18032 field.
18033
18034 2007-12-03 Leo Zayas
18035 Pedro Alves <pedro_alves@portugalmail.pt>
18036
18037 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
18038 global variables.
18039 (child_add_thread): Minor cleanup.
18040 (child_continue): Resume artificially suspended threads before
18041 calling ContinueDebugEvent.
18042 (suspend_one_thread): New.
18043 (fake_breakpoint_event): New.
18044 (get_child_debug_event): Change return type to int. Check here if
18045 gdb sent an interrupt request. If a soft interrupt was requested,
18046 fake a breakpoint event. Return 0 if there is no event to handle,
18047 and 1 otherwise.
18048 (win32_wait): Don't check here if gdb sent an interrupt request.
18049 Ensure there is a valid event to handle.
18050 (win32_request_interrupt): Add soft interruption method as last
18051 resort.
18052
18053 2007-12-03 Leo Zayas
18054 Pedro Alves <pedro_alves@portugalmail.pt>
18055
18056 * win32-low.h (win32_thread_info): Add descriptions to the
18057 structure members. Replace `suspend_count' counter by a
18058 `suspended' flag.
18059 * win32-low.c (thread_rec): Update condition of when to get the
18060 context from the inferior. Rely on ContextFlags being set if it
18061 has already been retrieved. Only suspend the inferior thread if
18062 we haven't already. Warn if that fails.
18063 (continue_one_thread): s/suspend_count/suspended/. Only call
18064 ResumeThread once. Warn if that fails.
18065
18066 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
18067
18068 * win32-low.c (win32_wait): Don't read from the inferior when it
18069 has already exited.
18070
18071 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
18072
18073 * Makefile.in (win32_low_h): New variable.
18074 (win32-low.o): Add dependency on $(win32_low_h).
18075 (win32-arm-low.o, win32-i386-low.o): New rules.
18076
18077 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
18078
18079 * hostio.c: Correct copyright year.
18080
18081 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
18082
18083 * Makefile.in (OBS): Add hostio.o.
18084 (hostio.o): New rule.
18085 * server.h (handle_vFile): Declare.
18086 * hostio.c: New file.
18087 * server.c (handle_v_requests): Take packet_len and new_packet_len
18088 for binary packets. Call handle_vFile.
18089 (main): Update call to handle_v_requests.
18090
18091 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
18092
18093 * linux-low.c: Include <sched.h>.
18094
18095 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
18096
18097 * linux-low.c (linux_tracefork_grandchild): New.
18098 (linux_tracefork_child): Use clone.
18099 (linux_test_for_tracefork): Use clone; allocate and free a stack.
18100
18101 2007-10-31 Joel Brobecker <brobecker@adacore.com>
18102
18103 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
18104
18105 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
18106
18107 * linux-low.c (handle_extended_wait): Handle unexpected signals.
18108
18109 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
18110
18111 * inferiors.c (change_inferior_id): Delete.
18112 (add_pid_to_list, pull_pid_from_list): New.
18113 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
18114 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
18115 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
18116 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
18117 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
18118 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
18119 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
18120 (using_threads): Always set to 1.
18121 (handle_extended_wait): New.
18122 (add_process): Do not set TID.
18123 (linux_create_inferior): Set must_set_ptrace_flags.
18124 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
18125 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
18126 (linux_thread_alive): Rename TID argument to LWPID.
18127 (linux_wait_for_process): Handle unknown processes. Do not use TID.
18128 (linux_wait_for_event): Do not use TID or check using_threads. Update
18129 call to dead_thread_notify. Call handle_extended_wait.
18130 (linux_create_inferior): Use PTRACE_SETOPTIONS.
18131 (send_sigstop): Delete sigstop_sent.
18132 (wait_for_sigstop): Avoid TID.
18133 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
18134 (linux_test_for_tracefork): New.
18135 (linux_lookup_signals): Use thread_db_active and
18136 linux_supports_tracefork_flag.
18137 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
18138 * linux-low.h (get_process_thread): Avoid TID.
18139 (struct process_ifo): Move thread_known and tid to the end. Remove
18140 sigstop_sent.
18141 (linux_attach_lwp, thread_db_init): Update prototypes.
18142 * server.h (change_inferior_id): Delete prototype.
18143 (add_pid_to_list, pull_pid_from_list): New prototypes.
18144 * thread-db.c (thread_db_use_events): New.
18145 (find_first_thread): Rename to...
18146 (find_one_thread): ...this. Update callers and messages. Do not
18147 call fatal. Check thread_db_use_events. Do not call
18148 change_inferior_id or new_thread_notify.
18149 (maybe_attach_thread): Update. Do not call new_thread_notify.
18150 (thread_db_init): Set thread_db_use_events. Check use_events.
18151 * utils.c (fatal, warning): Correct message prefix.
18152
18153 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
18154
18155 * Makefile.in (clean): Remove new files.
18156 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
18157 (powerpc-64.o, powerpc-64.c): New rules.
18158 * configure.srv: Use alternate register sets for powerpc64-*-linux*
18159 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
18160 with SPE.
18161 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
18162 SPE targets.
18163 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
18164 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
18165 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
18166 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
18167 (target_regsets): Add AltiVec and SPE register sets.
18168 * configure.ac: Check for AltiVec and SPE.
18169 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
18170 (ppc_fill_vrregset, ppc_store_vrregset): New.
18171 (target_regsets): Add AltiVec register set.
18172 * configure: Regenerated.
18173
18174 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
18175
18176 * linux-low.c (O_LARGEFILE): Define.
18177 (linux_read_memory): Use /proc/PID/mem.
18178 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
18179 * configure, config.in: Regenerated.
18180
18181 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
18182
18183 * linux-low.c (linux_wait_for_event): Do not pass signals while
18184 single-stepping.
18185
18186 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
18187
18188 * win32-low.c (create_process): New.
18189 (win32_create_inferior): Use create_process instead of
18190 CreateProcess. If create_process failed retry appending an ".exe"
18191 suffix. Store the GetLastError result immediatelly after
18192 create_process calls and use it on the call to error.
18193
18194 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
18195
18196 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
18197
18198 2007-08-23 Joel Brobecker <brobecker@adacore.com>
18199
18200 * configure.ac: Switch license to GPLv3.
18201
18202 2007-08-01 Michael Snyder <msnyder@access-company.com>
18203
18204 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
18205
18206 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
18207
18208 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
18209 typedef.
18210 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
18211 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
18212 CloseToolhelp32Snapshot.
18213 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
18214 CloseToolhelp32Snapshot.
18215
18216 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
18217
18218 * server.c (main): Check for inferior exit before main loop.
18219
18220 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
18221
18222 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
18223 instead of on tmp_desc.
18224
18225 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
18226 Daniel Jacobowitz <dan@codesourcery.com>
18227
18228 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
18229 (add_thread): Minor cleanups.
18230 (clear_inferiors): Move lower in the file. Clear the DLL
18231 list.
18232 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
18233 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
18234 (xml_escape_text): New.
18235 * server.c (handle_query): Handle qXfer:libraries:read. Report it
18236 for qSupported.
18237 (handle_v_cont): Report errors.
18238 (gdbserver_version): Update.
18239 (main): Correct size of own_buf. Do not report initial DLL events.
18240 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
18241 (unloaded_dll, xml_escape_text): New.
18242 * win32-low.c (enum target_waitkind): Update comments.
18243 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
18244 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
18245 (win32_EnumProcessModules, win32_GetModuleInformation)
18246 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
18247 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
18248 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
18249 (win32_Module32First, win32_Module32Next, load_toolhelp)
18250 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
18251 (get_child_debug_event): Handle DLL events.
18252 (win32_wait): Likewise.
18253
18254 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
18255
18256 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
18257 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
18258
18259 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
18260
18261 * win32-low.c (handle_output_debug_string): Ignore event if not
18262 waiting.
18263
18264 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
18265
18266 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
18267
18268 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
18269
18270 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
18271
18272 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
18273
18274 * inferiors.c (change_inferior_id): Add comment.
18275 * linux-low.c (check_removed_breakpoint): Add an early
18276 prototype. Improve debug output.
18277 (linux_attach): Doc update.
18278 (linux_detach_one_process, linux_detach): Clean up before releasing
18279 each process.
18280 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
18281 * linux-low.h (struct process_info): Doc improvement.
18282 * mem-break.c (delete_all_breakpoints): New.
18283 * mem-break.h (delete_all_breakpoints): New prototype.
18284 * thread-db.c (find_first_thread): New.
18285 (thread_db_create_event): Call it instead of
18286 thread_db_find_new_threads. Clean up unused variables.
18287 (maybe_attach_thread): Remove first thread handling.
18288 (thread_db_find_new_threads): Use find_first_thread.
18289 (thread_db_get_tls_address): Likewise.
18290
18291 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
18292
18293 * thread-db.c (thread_db_find_new_threads): Add prototype.
18294 (thread_db_create_event): Check for the main thread before adding
18295 a new thread.
18296 (maybe_attach_thread): Only enable event reporting if TID == 0.
18297 (thread_db_get_tls_address): Check for new threads.
18298
18299 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
18300
18301 * linux-low.c (linux_create_inferior): Try execv before execvp.
18302 * spu-low.c (spu_create_inferior): Likewise.
18303
18304 2007-06-13 Mike Frysinger <vapier@gentoo.org>
18305
18306 * linux-low.c (linux_create_inferior): Change execv to execvp.
18307 * spu-low.c (spu_create_inferior): Likewies.
18308
18309 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
18310
18311 * Makefile.in (clean): Clean new files instead of deleted ones.
18312 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
18313 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
18314 rules.
18315 * configure.srv: Specify XML files and new regformats for MIPS and
18316 MIPS64 GNU/Linux.
18317 * linux-mips-low.c (mips_num_regs): Set to only used registers.
18318 (mips_regmap): Do not fetch $0. Remove unused registers. Add
18319 an entry for the restart register.
18320 (mips_cannot_fetch_register, mips_cannot_store_register)
18321 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
18322 register names to match the XML descriptions.
18323 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
18324 restart register instead of $0.
18325
18326 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
18327 Markus Deuling <deuling@de.ibm.com>
18328
18329 * remote-utils.c (decode_xfer_write): New function.
18330 * server.h (decode_xfer_write): Add prototype.
18331 * server.c (handle_query): Add PACKET_LEN argument. Support
18332 qXfer:spu:read and qXfer:spu:write packets.
18333 (main): Pass packet_len to handle_query.
18334 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
18335 * target.h (target_ops): Add qxfer_spu.
18336
18337 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
18338
18339 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
18340 accessing non-seekable spufs files.
18341
18342 2007-05-16 Markus Deuling <deuling@de.ibm.com>
18343
18344 * server.c (handle_query): Add reply for qC packet.
18345
18346 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18347 Leo Zayas <lerele@champenstudios@com>
18348
18349 * server.h (check_remote_input_interrupt_request): New function.
18350 * remote_utils.c (INVALID_DESCRIPTOR): New define.
18351 (remote_desc): Initialize with INVALID_DESCRIPTOR.
18352 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
18353 (check_remote_input_interrupt_request): New function.
18354 * server.h (check_remote_input_interrupt_request): Declare.
18355 * win32-low.c (winapi_DebugBreakProcess,
18356 winapi_GenerateConsoleCtrlEvent): New typedefs.
18357 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
18358 to 250 ms.
18359 (win32_wait): Check for remote interrupt request
18360 with check_remote_input_interrupt_request.
18361 (win32_request_interrupt): New function.
18362 (win32_target_op): Set request_interrupt to win32_request_interrupt.
18363
18364 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18365
18366 * win32-low.c (debug_registers_changed,
18367 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
18368 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
18369 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
18370 (thread_rec): Get context using the low target.
18371 (child_add_thread): Call thread_added on the low target,
18372 which does the same thing.
18373 (regptr): Delete.
18374 (do_initial_child_stuff): Remove debug registers references.
18375 Set context using the low target. Resume threads after
18376 setting the contexts.
18377 (child_continue): Remove dead variable. Remove debug
18378 registers references.
18379 (child_fetch_inferior_registers): Go through the low target.
18380 (do_child_store_inferior_registers): Remove.
18381 (child_store_inferior_registers): Go through the low target.
18382 (win32_resume): Remove debug registers references.
18383 Set context using the low target.
18384 (handle_exception): Change return type to void. Don't record
18385 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
18386 first chance exception.
18387 (get_child_debug_event): Change return type to void. Remove
18388 goto loop. Always return after waiting for debug event.
18389 (win32_wait): Convert to switch statement. Handle spurious
18390 events.
18391
18392 * win32-i386-low.c (debug_registers_changed,
18393 debug_registers_used): New.
18394 (initial_stuff): Rename to ...
18395 (i386_initial_stuff): ... this. Clear debug registers
18396 state variables.
18397 (store_debug_registers): Delete.
18398 (i386_get_thread_context): New.
18399 (load_debug_registers): Delete.
18400 (i386_set_thread_context): New.
18401 (i386_thread_added): New.
18402 (single_step): Rename to ...
18403 (i386_single_step): ... this.
18404 (do_fetch_inferior_registers): Rename to ...
18405 (i386_fetch_inferior_register): ... this.
18406 (i386_store_inferior_register): New.
18407 (the_low_target): Adapt to new interface.
18408
18409 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
18410 (arm_get_thread_context): New.
18411 (arm_set_thread_context): New.
18412 (regptr): New.
18413 (do_fetch_inferior_registers): Rename to ...
18414 (arm_fetch_inferior_register): ... this.
18415 (arm_store_inferior_register): New.
18416 (arm_wince_breakpoint): Reimplement as unsigned long.
18417 (arm_wince_breakpoint_len): Define.
18418 (the_low_target): Adapt to new interface.
18419
18420 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
18421 load_debug_registers. Add get_thread_context, set_thread_context,
18422 thread_added and store_inferior_register. Rename
18423 fetch_inferior_registers to fetch_inferior_register.
18424 (regptr): Remove declaration.
18425
18426 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18427
18428 * linux-low.c (linux_detach): Change return type to int. Return 0.
18429 * spu-low.c (spu_detach): Likewise.
18430
18431 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18432
18433 * target.h (target_ops): Change return type of detach to int.
18434 Add join.
18435 (join_inferior): New.
18436 * server.c (main): Don't skip detach support on mingw32.
18437 If the inferior doesn't support detaching return error.
18438 Call join_inferior instead of using waitpid.
18439 * linux-low.c (linux_join): New.
18440 (linux_target_op): Add linux_join.
18441 * spu-low.c (spu_join): New.
18442 (spu_target_ops): Add spu_join.
18443 * win32-low.c (win32_detach): Adapt to new interface.
18444 Reopen current_process_handle before detaching. Issue a child
18445 resume before detaching.
18446 (win32_join): New.
18447 (win32_target_op): Add win32_join.
18448
18449 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18450
18451 * win32-low.c (win32-attach): Fix return value.
18452 * target.h (target_ops): Describe ATTACH return values.
18453
18454 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18455
18456 * win32-low.c (GETPROCADDRESS): Define.
18457 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
18458 (winapi_DebugSetProcessKillOnExit): Likewise.
18459 (win32_create_inferior): Force usage of ansi CreateProcessA.
18460 (win32_attach): Use GETPROCADDRESS.
18461 (win32_detach): Likewise.
18462
18463 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
18464
18465 * win32-low.c (win32_wait): Don't use WSTOPSIG.
18466
18467 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
18468
18469 * win32-low.c: Commit leftover changes from 2007-03-29.
18470
18471 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
18472
18473 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
18474 fields short instead of int. Add explicit padding.
18475 (i387_cache_to_fsave): Remove unnecessary casts.
18476 (i387_fsave_to_cache): Doc fix.
18477 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
18478
18479 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
18480
18481 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
18482 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
18483
18484 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
18485
18486 * configure.srv (arm*-*-mingw32ce*): Move near the other
18487 arm targets.
18488
18489 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
18490
18491 * configure.ac: Add errno checking.
18492 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
18493 sys/file.h and malloc.h.
18494 (AC_CHECK_DECLS): Add perror.
18495 (srv_mingwce): Handle.
18496 * configure.srv (i[34567]86-*-cygwin*): Add
18497 win32-i386-low.o to srv_tgtobj.
18498 (i[34567]86-*-mingw*): Likewise.
18499 (arm*-*-mingw32ce*): Add case.
18500 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
18501 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
18502 [__MINGW32CE__] (strerror): New function.
18503 [__MINGW32CE__] (errno): Define to GetLastError.
18504 [__MINGW32CE__] (COUNTOF): New macro.
18505 (remote_open): Remove extra close call.
18506 * mem-break.c (delete_breakpoint_at): New function.
18507 * mem-break.h (delete_breakpoint_at): Declare.
18508 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
18509 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
18510 [USE_WIN32API] (read, write): Add char* casts.
18511 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
18512 * server.h: Include wincecompat.h on Windows CE.
18513 [HAVE_ERRNO_H]: Check.
18514 (perror): Declare if not declared.
18515 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
18516 (perror_with_name): Remove errno declaration.
18517 * wincecompat.h: New.
18518 * wincecompat.c: New.
18519 * win32-low.h: New.
18520 * win32-arm-low.c: New.
18521 * win32-i386-low.c: New.
18522 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
18523 (OUTMSG2): Make it safe.
18524 (_T): New macro.
18525 (COUNTOF): New macro.
18526 (NUM_REGS): Get it from the low target.
18527 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
18528 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
18529 (thread_rec): Let low target handle debug registers.
18530 (child_add_thread): Likewise.
18531 (child_init_thread_list): Likewise.
18532 (continue_one_thread): Likewise.
18533 (regptr): New.
18534 (do_child_fetch_inferior_registers): Move to ...
18535 * win32-i386-low.c: ... here, and rename to ...
18536 (do_fetch_inferior_registers): ... this.
18537 * win32-low.c (child_fetch_inferior_registers):
18538 Go through the low target.
18539 (do_child_store_inferior_registers): Use regptr.
18540 (strwinerror): New function.
18541 (win32_create_inferior): Handle Windows CE.
18542 Use strwinerror instead of strerror on Windows error
18543 codes. Add program to the error output.
18544 Don't close the main thread handle on Windows CE.
18545 (win32_attach): Use coredll.dll on Windows CE.
18546 (win32_kill): Close current process and current
18547 thread handles.
18548 (win32_detach): Use coredll.dll on Windows CE.
18549 (win32_resume): Let low target handle debug registers, and
18550 step request.
18551 (handle_exception): Add/Remove initial breakpoint. Avoid
18552 non-existant WSTOPSIG on Windows CE.
18553 (win32_read_inferior_memory): Cast to remove warning.
18554 (win32_arch_string): Go through the low target.
18555 (initialize_low): Call set_breakpoint_data with the low
18556 target's breakpoint.
18557 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
18558 FOP_REGNUM, mappings): Move to ...
18559 * win32-i386-low.c: ... here.
18560 * win32-low.c (win32_thread_info): Move to ...
18561 * win32-low.h: ... here.
18562 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
18563 win32-arm-low.c and wincecompat.c.
18564 (all:): Add $EXEEXT.
18565 (install-only:): Likewise.
18566 (gdbserver:): Likewise.
18567 (gdbreplay:): Likewise.
18568 * config.in: Regenerate.
18569 * configure: Regenerate.
18570
18571 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
18572
18573 * win32-low.c: Rename typedef thread_info to
18574 win32_thread_info throughout.
18575
18576 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
18577
18578 * win32-i386-low.c: Rename to ...
18579 * win32-low.c: ... this.
18580 * configure.srv: Replace win32-i386-low.o with win32-low.o.
18581 * Makefile.in: Likewise.
18582
18583 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
18584
18585 * remote-utils.c (monitor_output): Constify msg parameter.
18586 * server.h (monitor_output): Likewise.
18587 * win32-i386-low.c (handle_output_debug_string): New.
18588 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
18589 handle_output_debug_string.
18590 (get_child_debug_event): Likewise.
18591
18592 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
18593
18594 * server.c (main): Correct strtoul check.
18595
18596 2007-03-27 Jon Ringle <jon@ringle.org>
18597
18598 * linux-low.c: Check __ARCH_HAS_MMU__ also.
18599
18600 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
18601
18602 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
18603
18604 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
18605
18606 * terminal.h: Check HAVE_SGTTY_H.
18607
18608 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
18609
18610 * remote-utils.c (remote_open): Print out the assigned port number.
18611
18612 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
18613
18614 * remote-utils.c (monitor_output): New function.
18615 * server.c (debug_threads): Define here.
18616 (monitor_show_help): New function.
18617 (handle_query): Handle qRcmd.
18618 (main): Do not handle 'd' packet.
18619 * server.h (debug_threads, remote_debug, monitor_output): Declare.
18620 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
18621 of debug_threads.
18622
18623 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18624
18625 * Makefile.in (EXEEXT): New.
18626 (clean): Use $(EXEEXT).
18627
18628 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18629
18630 * target.h (target_ops): Rename send_signal to request_interrupt,
18631 and remove enum target_signal parameter.
18632 * linux-low.c (linux_request_interrupt): Rename from
18633 linux_send_signal, and always send SIGINT.
18634 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
18635 and always send SIGINT.
18636 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
18637 of send_signal.
18638 (input_interrupt): Likewise.
18639
18640 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
18641
18642 * server.c (get_features_xml): Check if target implemented
18643 arch_string.
18644 * win32-i386-low.c (win32_arch_string): New.
18645 (win32_target_ops): Add win32_arch_string as arch_string member.
18646
18647 2007-02-22 Markus Deuling <deuling@de.ibm.com>
18648
18649 * spu-low.c (spu_arch_string): New.
18650 (spu_target_ops): Add spu_arch_string.
18651
18652 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
18653
18654 * remote-utils.c: Remove HAVE_TERMINAL_H check.
18655 * configure.ac: Do not check for terminal.h.
18656 * configure, config.in: Regenerated.
18657
18658 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18659
18660 * Makefile.in (OBS): Add $(XML_BUILTIN).
18661 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
18662 (clean): Update.
18663 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
18664 (arm-with-iwmmxt.c): New.
18665 * config.in, configure: Regenerate.
18666 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
18667 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
18668 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
18669 (arm*-*-linux*): Add iWMMXt and regset support.
18670 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
18671 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
18672 (arm_store_wmmxregset, target_regsets): New.
18673 * server.c (get_features_xml): Take annex argument. Check builtin
18674 XML documents.
18675 (handle_query): Handle multiple annexes.
18676
18677 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18678
18679 * remote-utils.c [USE_WIN32API] (read, write): Define.
18680 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
18681 write.
18682
18683 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
18684
18685 * linux-i386-low.c (the_low_target): Set arch_string.
18686 * linux-x86-64-low.c (the_low_target): Likewise.
18687 * linux-low.c (linux_arch_string): New.
18688 (linux_target_ops): Add it.
18689 * linux-low.h (struct linux_target_ops): Add arch_string.
18690 * server.c (write_qxfer_response): Use const void * for DATA.
18691 (get_features_xml): New.
18692 (handle_query): Handle qXfer:features:read. Report it for qSupported.
18693 * target.h (struct target_ops): Add arch_string method.
18694
18695 2007-01-03 Denis Pilat <denis.pilat@st.com>
18696 Daniel Jacobowitz <dan@codesourcery.com>
18697
18698 * linux-low.c (linux_kill): Handle being called with no threads.
18699 * win32-i386-low.c (win32_kill): Likewise.
18700 (get_child_debug_event): Clear current_process_handle.
18701
18702 2006-12-30 Denis PILAT <denis.pilat@st.com>
18703 Daniel Jacobowitz <dan@codesourcery.com>
18704
18705 * remote-utils.c (remote_open): Check the type of specified
18706 serial port devices before opening them.
18707 * server.c (main): Kill the inferior if an error occurs during
18708 the first remote_open.
18709
18710 2006-12-05 Markus Deuling <deuling@de.ibm.com>
18711
18712 * README: Update supported targets.
18713
18714 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
18715
18716 * Makefile.in (clean): Remove reg-mips64.c.
18717 (reg-mips64.c, reg-mips64.o): New rules.
18718 * configure.srv: Handle mips64. Include regset support for mips.
18719 * linux-mips-low.c (union mips_register): New.
18720 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
18721 (mips_breakpoint, mips_breakpoint_at): Use int.
18722 (mips_collect_register, mips_supply_register)
18723 (mips_collect_register_32bit, mips_supply_register_32bit)
18724 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18725 (mips_store_fpregset, target_regsets): New.
18726 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
18727
18728 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
18729
18730 * configure.srv: Add target "spu*-*-*".
18731 * Makefile.in (clean): Remove reg-spu.c.
18732 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
18733 * spu-low.c: New file.
18734
18735 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18736
18737 * configure.ac: Correct td_thr_tls_get_addr test.
18738 * configure: Regenerated.
18739
18740 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
18741
18742 * linux-low.c (linux_wait_for_event): Reformat. Use the
18743 pass_signals array.
18744 * remote-utils.c (decode_address_to_semicolon): New.
18745 * server.c (pass_signals, handle_general_set): New.
18746 (handle_query): Mention QPassSignals for qSupported.
18747 (main): Call handle_general_set.
18748 * server.h (pass_signals, decode_address_to_semicolon): New.
18749
18750 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
18751
18752 * server.c (handle_query): Correct error handling for read_auxv.
18753
18754 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
18755
18756 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
18757 and srv_linux_thread_db to yes.
18758 * linux-s390-low.c (s390_fill_gregset): New function.
18759 (target_regsets): Define data structure.
18760
18761 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
18762
18763 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
18764 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
18765 * config.in, configure: Regenerated.
18766 * inferiors.c (gdb_id_to_thread): New function.
18767 (gdb_id_to_thread_id): Use it.
18768 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
18769 * linux-low.h (struct process_info): Add th member.
18770 (thread_db_get_tls_address): New prototype.
18771 * remote-utils.c (decode_address): Make non-static.
18772 * server.c (handle_query): Handle qGetTLSAddr.
18773 * server.h (gdb_id_to_thread, decode_address): New prototypes.
18774 * target.h (struct target_ops): Add get_tls_address.
18775 * thread-db.c (maybe_attach_thread): Save the thread handle.
18776 (thread_db_get_tls_address): New.
18777
18778 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
18779
18780 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
18781 (linux_resume_one_process): Take a siginfo_t *. Update all
18782 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
18783 (struct pending_signals): Add a siginfo_t.
18784 (linux_wait_for_process): Always set last_status.
18785 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
18786 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
18787 * linux-low.h (struct process_info): Add last_status.
18788
18789 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
18790
18791 * remote-utils.c (try_rle): New function.
18792 (putpkt_binary): Use it.
18793
18794 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
18795
18796 * Makefile.in (clean): Clean reg-x86-64-linux.c.
18797 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
18798 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
18799 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
18800 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
18801 point registers.
18802
18803 2006-08-08 Richard Sandiford <richard@codesourcery.com>
18804
18805 * server.c (terminal_fd): New variable.
18806 (old_foreground_pgrp): Likewise.
18807 (restore_old_foreground_pgrp): New function.
18808 (start_inferior): Record the terminal file descriptor in terminal_fd
18809 and its original foreground group in old_foreground_pgrp. Register
18810 restore_old_foreground_pgrp with atexit().
18811
18812 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
18813
18814 * server.c (handle_query): Correct qPart to qXfer.
18815
18816 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
18817
18818 * configure.ac: Check for more headers which are missing on
18819 Windows. Automatically supply -lwsock32 and USE_WIN32API.
18820 * configure.srv: Add Cygwin and mingw32.
18821 * remote-utils.c: Don't include headers unconditionally which
18822 are missing on mingw32. Include <winsock.h> for mingw32.
18823 (remote_open): Adjust for mingw32 support. Flush
18824 standard error after writing to it.
18825 (remote_close, putpkt_binary, input_interrupt, block_async_io)
18826 (unblock_async_io, enable_async_io, disable_async_io)
18827 (readchar, getpkt): Update for Winsock support.
18828 (prepare_resume_reply): Expect a protocol signal number.
18829 * server.c: Disable <sys/wait.h> on mingw32.
18830 (start_inferior): Adjust for mingw32 support. Flush
18831 standard error after writing to it.
18832 (attach_inferior): Likewise. Use protocol signal
18833 numbers.
18834 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
18835 and names.
18836 * win32-i386-low.c: New file.
18837 * Makefile.in (XM_CLIBS): Set.
18838 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
18839 (win32-i386-low.o): New dependency rule.
18840 * linux-low.c (linux_wait): Use target signal numbers.
18841 * target.h (struct target_ops): Doc fix.
18842 * server.h (target_signal_to_name): New prototype.
18843 * gdbreplay.c: Don't include headers unconditionally which
18844 are missing on mingw32. Include <winsock.h> for mingw32.
18845 (remote_close, remote_open): Adjust for Winsock support.
18846 * configure, config.in: Regenerated.
18847
18848 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
18849
18850 * server.c (decode_xfer_read, write_qxfer_response): New.
18851 (handle_query): Take a packet length argument. Handle
18852 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
18853 the qSupported response.
18854 (main): Update call to handle_query.
18855
18856 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
18857
18858 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
18859 (putpkt_binary): Renamed from putpkt and adjusted for binary
18860 data.
18861 (putpkt): New wrapper for putpkt_binary.
18862 (readchar): Don't mask off the high bit.
18863 (decode_X_packet): New function.
18864 * server.c (main): Call putpkt_binary if a handler sets the packet
18865 length. Save the length of the incoming packet. Handle 'X'.
18866 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
18867
18868 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
18869
18870 * server.c (handle_query): Handle qSupported.
18871
18872 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18873
18874 * remote-utils.c (all_symbols_looked_up): New variable.
18875 (look_up_one_symbol): Check it.
18876 * server.h (look_up_one_symbol): New declaration.
18877 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
18878
18879 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
18880
18881 * Makefile.in (linux-arm-low.o): Update dependencies.
18882 * linux-arm-low.c: Include "gdb_proc_service.h".
18883 (PTRACE_GET_THREAD_AREA): Define.
18884 (ps_get_thread_area): New function.
18885
18886 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
18887
18888 * configure.srv (m68k*-*-uclinux*): New target.
18889 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
18890 (linux_resume_one_process): Remove extraneous cast.
18891 (linux_read_offsets): New.
18892 (linux_target_op): Add linux_read_offsets on mmuless systems.
18893 * server.c (handle_query): Add qOffsets logic.
18894 * target.h (struct target_ops): Add read_offsets.
18895
18896 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18897
18898 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
18899 (PTRACE_GET_THREAD_AREA): Define.
18900 (ps_get_thread_area): New function.
18901 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
18902 (linux-x86-64-low.o): Update.
18903
18904 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
18905
18906 * configure.ac: Remove checks for prfpregset_t.
18907 * gdb_proc_service.h: New file.
18908 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
18909 new "gdb_proc_service.h".
18910 * proc-service.c: Likewise.
18911 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
18912 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
18913 * Makefile.in (gdb_proc_service_h): Updated.
18914 * configure, config.in: Regenerated.
18915
18916 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
18917
18918 * remote-utils.c (prepare_resume_reply): Move declaration
18919 of gdb_id_from_wait to the top of the block.
18920
18921 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
18922
18923 * linux-low.c (regsets_store_inferior_registers): Read the regset
18924 from the target before filling it.
18925
18926 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
18927
18928 * server.c (attach_inferior): Return SIGTRAP for a successful
18929 attach.
18930
18931 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18932
18933 * Makefile.in (OBS): Add version.o.
18934 (STAGESTUFF): Delete.
18935 (version.o): Add dependencies.
18936 (version.c): Replace rule.
18937 (clean): Remove version.c.
18938 * server.c (gdbserver_version): New.
18939 (gdbserver_usage): Use printf.
18940 (main): Handle --version and --help.
18941 * server.h (version, host_name): Add declarations.
18942
18943 2005-12-23 Eli Zaretskii <eliz@gnu.org>
18944
18945 * linux-arm-low.c:
18946 * linux-arm-low.c:
18947 * inferiors.c:
18948 * i387-fp.h:
18949 * i387-fp.c:
18950 * gdbreplay.c:
18951 * regcache.c:
18952 * proc-service.c:
18953 * mem-break.h:
18954 * mem-break.c:
18955 * linux-x86-64-low.c:
18956 * linux-sh-low.c:
18957 * linux-s390-low.c:
18958 * linux-ppc64-low.c:
18959 * linux-ppc-low.c:
18960 * linux-mips-low.c:
18961 * linux-m68k-low.c:
18962 * linux-m32r-low.c:
18963 * linux-low.h:
18964 * linux-low.c:
18965 * linux-ia64-low.c:
18966 * linux-i386-low.c:
18967 * linux-crisv32-low.c:
18968 * thread-db.c:
18969 * terminal.h:
18970 * target.h:
18971 * target.c:
18972 * server.h:
18973 * server.c:
18974 * remote-utils.c:
18975 * regcache.h:
18976 * utils.c:
18977 * Makefile.in:
18978 * configure.ac:
18979 * gdbserver.1: Add (C) after Copyright. Update the FSF
18980 address.
18981
18982 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
18983
18984 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
18985 (arm_breakpoint_at): Recognize both breakpoints.
18986 (the_low_target): Use the correct breakpoint instruction.
18987
18988 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
18989
18990 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
18991 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
18992 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
18993 (the_low_target): Update.
18994
18995 2005-10-25 Andreas Schwab <schwab@suse.de>
18996
18997 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
18998
18999 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
19000 (ia64_num_regs): Reduce to 462.
19001
19002 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
19003
19004 * acinclude.m4: Correct quoting.
19005 * aclocal.m4: Regenerated.
19006
19007 Suggested by SZOKOVACS Robert <szo@ies.hu>:
19008 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
19009 (thread_db_init): Call thread_db_err_str.
19010 * configure.ac: Check for TD_VERSION.
19011 * config.in, configure: Regenerated.
19012
19013 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19014
19015 * server.h (error, fatal, warning): Add ATTR_FORMAT.
19016
19017 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
19018
19019 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
19020 is not available. Define HAVE_PTRACE_GETREGS if it is.
19021 * config.in, configure: Regenerated.
19022 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
19023 * linux-i386-low.c, linux-m68k-low.c: Update to use
19024 HAVE_PTRACE_GETREGS.
19025 * linux-low.c (regsets_fetch_inferior_registers)
19026 (regsets_store_inferior_registers): Only return 0 if we processed
19027 GENERAL_REGS.
19028 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
19029 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
19030
19031 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
19032
19033 * inferiors.c (struct thread_info): Add gdb_id.
19034 (add_thread): Add gdb_id argument.
19035 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
19036 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
19037 calls to add_thread.
19038 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
19039 * server.c (handle_query): Use thread_to_gdb_id.
19040 (handle_v_cont, main): Use gdb_id_to_thread_id.
19041 * server.h (add_thread): Update prototype.
19042 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
19043 prototypes.
19044
19045 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
19046
19047 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
19048 left-padded registers.
19049 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
19050 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
19051
19052 2005-07-01 Steve Ellcey <sje@cup.hp.com>
19053
19054 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
19055 * configure: Regenerate.
19056 * config.in: Regenerate.
19057 * server.h (NEED_DECLARATION_STRERROR):
19058 Replace with !HAVE_DECL_STRERROR.
19059
19060 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
19061
19062 * linux-low.c (linux_wait, linux_send_signal): Don't test
19063 an unsigned long variable for > 0 if it could be MAX_ULONG.
19064 * server.c (myresume): Likewise.
19065 * target.c (set_desired_inferior): Likewise.
19066
19067 2005-06-13 Mark Kettenis <kettenis@gnu.org>
19068
19069 * configure.ac: Simplify and improve check for socklen_t.
19070 * configure, config.in: Regenerate.
19071
19072 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
19073
19074 * acconfig.h: Remove.
19075 * configure.ac: Add a test for socklen_t. Use three-argument
19076 AC_DEFINE throughout.
19077 * config.in: Regenerated using autoheader 2.59.
19078 * configure: Regenerated.
19079
19080 * gdbreplay.c (socklen_t): Provide a default.
19081 (remote_open): Use socklen_t.
19082 * remote-utils.c (socklen_t): Provide a default.
19083 (remote_open): Use socklen_t.
19084 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
19085 unsigned char.
19086
19087 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
19088 char for buffers.
19089 * linux-low.c (linux_read_memory, linux_write_memory)
19090 (linux_read_auxv): Likewise.
19091 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
19092 (check_mem_write): Likewise.
19093 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
19094 Likewise.
19095 * regcache.c (struct inferior_rgcache_data, registers_to_string)
19096 (registers_from_string, register_data): Likewise.
19097 * server.c (handle_query, main): Likewise.
19098 * server.h (convert_ascii_to_int, convert_int_to_ascii)
19099 (decode_M_packet): Likewise.
19100 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
19101 * target.h (struct target_ops): Update read_memory, write_memory,
19102 and read_auxv.
19103 (read_inferior_memory, write_inferior_memory): Update.
19104 * linux-low.h (struct linux_target_ops): Change type of breakpoint
19105 to unsigned char *.
19106 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
19107 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
19108 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
19109 linux-s390-low.c, linux-sh-low.c: Update for changes in
19110 read_inferior_memory and the_low_target->breakpoint.
19111
19112 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
19113
19114 * Makefile.in (SFILES): Add linux-ppc64-low.c.
19115 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
19116 * configure.srv: Add powerpc64-*-linux*.
19117 * linux-ppc64-low.c: New file.
19118
19119 2005-05-23 Orjan Friberg <orjanf@axis.com>
19120
19121 * linux-cris-low.c: New file with support for CRIS.
19122 * linux-crisv32-low.c: Ditto for CRISv32.
19123 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
19124 (clean): Add reg-cris.c and reg-crisv32.c.
19125 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
19126 reg-crisv32.o, and reg-crisv32.c to make rules.
19127 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
19128 recognized targets.
19129
19130 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
19131
19132 * linux-low.c (fetch_register): Ensure buffer size is a multiple
19133 of sizeof (PTRACE_XFER_TYPE).
19134 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
19135
19136 2005-05-12 Orjan Friberg <orjanf@axis.com>
19137
19138 * target.h (struct target_ops): Add insert_watchpoint,
19139 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
19140 pointers for hardware watchpoint support.
19141 * linux-low.h (struct linux_target_ops): Ditto.
19142 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
19143 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
19144 to linux_target_ops.
19145 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
19146 reply packet.
19147 * server.c (main): Recognize 'Z' and 'z' packets.
19148
19149 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
19150
19151 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
19152 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
19153 (the_low_target): Add new members.
19154
19155 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
19156
19157 * proc-service.c (ps_lgetregs): Search all_processes instead of
19158 all_threads.
19159
19160 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
19161
19162 * server.c (start_inferior): Change return type to int.
19163 (attach_inferior): Change sigptr to int *.
19164 (handle_v_cont, handle_v_requests): Change signal to int *.
19165 (main): Change signal to int.
19166
19167 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
19168
19169 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
19170 * configure.srv: Add m32r*-*-linux*.
19171 * linux-m32r-low.c: New file.
19172
19173 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
19174
19175 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
19176
19177 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
19178
19179 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
19180 Take unsigned long arguments for PIDs.
19181 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
19182 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
19183 (wait_for_sigstop, linux_resume_one_process)
19184 (regsets_fetch_inferior_registers, linux_send_signal)
19185 (linux_read_auxv): Likewise. Update the types of variables holding
19186 PIDs. Update format string specifiers.
19187 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
19188 * remote-utils.c (prepare_resume_reply): Likewise.
19189 * server.c (cont_thread, general_thread, step_thread)
19190 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
19191 unsigned long.
19192 (handle_query): Update format specifiers.
19193 (handle_v_cont, main): Use strtoul for thread IDs.
19194 * server.h (struct inferior_list_entry): Use unsigned long for ID.
19195 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
19196 (general_thread, step_thread, thread_from_wait)
19197 (old_thread_from_wait): Update.
19198 * target.h (struct thread_resume): Use unsigned long for THREAD.
19199 (struct target_ops): Use unsigned long for arguments to attach and
19200 thread_alive.
19201
19202 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
19203
19204 * acinclude.m4: Include bfd/bfd.m4 directly.
19205 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
19206 <agriffis@toolchain.org>.
19207 * aclocal.m4, configure: Regenerated.
19208
19209 2005-01-07 Andrew Cagney <cagney@gnu.org>
19210
19211 * configure.ac: Rename configure.in, require autoconf 2.59.
19212 * configure: Re-generate.
19213
19214 2004-12-08 Daniel Jacobowitz <dan@debian.org>
19215
19216 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
19217 LIBS when finished.
19218 * aclocal.m4: Regenerated.
19219 * configure: Regenerated.
19220
19221 2004-11-21 Andreas Schwab <schwab@suse.de>
19222
19223 * linux-m68k-low.c (m68k_num_gregs): Define.
19224 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
19225 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
19226 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
19227 (m68k_breakpoint_at): New. Add to the_low_target.
19228
19229 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
19230 srv_linux_thread_db to yes.
19231
19232 2004-10-20 Joel Brobecker <brobecker@gnat.com>
19233
19234 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
19235 (ARCH_SET_FS): Likewise.
19236 (ARCH_GET_FS): Likewise.
19237 (ARCH_GET_GS): Likewise.
19238
19239 2004-10-16 Daniel Jacobowitz <dan@debian.org>
19240
19241 * linux-i386-low.c (ps_get_thread_area): New.
19242 * linux-x86-64-low.c (ps_get_thread_area): New.
19243 * linux-low.c: Include <sys/syscall.h>.
19244 (linux_kill_one_process): Don't kill the first thread here.
19245 (linux_kill): Kill the first thread here.
19246 (kill_lwp): New function.
19247 (send_sigstop, linux_send_signal): Use it.
19248 * proc-service.c: Clean up #ifdefs.
19249 (fpregset_info): Delete.
19250 (ps_lgetregs): Update and enable implementation.
19251 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
19252 implementations.
19253 * remote-utils.c (struct sym_cache, symbol_cache): New.
19254 (input_interrupt): Print a clearer message.
19255 (async_io_enabled): New variable.
19256 (enable_async_io, disable_async_io): Use it. Update comments.
19257 (look_up_one_symbol): Use the symbol cache.
19258 * thread-db.c (thread_db_look_up_symbols): New function.
19259 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
19260
19261 2004-10-16 Daniel Jacobowitz <dan@debian.org>
19262
19263 * configure.in: Test for -rdynamic.
19264 * configure: Regenerated.
19265 * Makefile (INTERNAL_LDFLAGS): New.
19266 (gdbserver, gdbreplay): Use it.
19267
19268 2004-09-02 Andrew Cagney <cagney@gnu.org>
19269
19270 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
19271
19272 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
19273
19274 * linux-low.c (linux_wait): Clear all_processes list also.
19275
19276 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
19277
19278 * linux-low.c: Include <errno.h>. Remove extern declaration of
19279 errno.
19280
19281 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
19282
19283 * gdbreplay.c, server.h, utils.c: Update copyright years.
19284
19285 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
19286
19287 * server.c (main): Print child status or termination signal from
19288 variable 'signal', not 'sig'.
19289
19290 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
19291
19292 * linux-low.c (linux_read_memory): Change return type to
19293 int. Check for and return error from ptrace().
19294 * target.c (read_inferior_memory): Change return type to int. Pass
19295 back return status from the_target->read_memory().
19296 * target.h (struct target_ops): Adapt *read_memory() prototype.
19297 Update comment.
19298 (read_inferior_memory): Adapt prototype.
19299 * server.c (main): Return an error packet if
19300 read_inferior_memory() returns an error.
19301
19302 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
19303
19304 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
19305 Unify with other clean targets.
19306
19307 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
19308
19309 * server.c (handle_v_cont): Call set_desired_inferior.
19310
19311 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
19312
19313 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
19314
19315 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
19316
19317 * linux-low.c (linux_wait): Unblock async I/O.
19318 (linux_resume): Block and enable async I/O.
19319 * remote-utils.c (block_async_io, unblock_async_io): New functions.
19320 * server.h (block_async_io, unblock_async_io): Add prototypes.
19321
19322 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
19323
19324 * remote-utils.c (remote_open): Print a status notice after
19325 opening a TCP port.
19326 * server.c (attach_inferior): Print a status notice after
19327 attaching.
19328
19329 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
19330
19331 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
19332
19333 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
19334
19335 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
19336 error packet.
19337 * server.c, target.h: Update copyright years.
19338
19339 2004-02-25 Roland McGrath <roland@redhat.com>
19340
19341 * target.h (struct target_ops): New member `read_auxv'.
19342 * server.c (handle_query): Handle qPart:auxv:read: query using that.
19343 * linux-low.c (linux_read_auxv): New function.
19344 (linux_target_ops): Initialize `read_auxv' member to that.
19345
19346 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
19347
19348 Committed by Jim Blandy <jimb@redhat.com>.
19349
19350 * linux-s390-low.c (s390_num_regs): Update.
19351 (s390_regmap): Remove control registers. Use __s390x__ predefine
19352 instead of GPR_SIZE to distiguish s390 and s390x targets.
19353
19354 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
19355
19356 * linux-low.c: Update copyright year.
19357 (check_removed_breakpoint): Clear pending_is_breakpoint.
19358 (linux_set_resume_request, linux_queue_one_thread)
19359 (resume_status_pending_p): New functions.
19360 (linux_continue_one_thread): Use process->resume.
19361 (linux_resume): Only resume threads if there are no pending events.
19362 * linux-low.h (struct process_info): Add resume request
19363 pointer.
19364
19365 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
19366
19367 * regcache.c (new_register_cache): Clear the allocated register
19368 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
19369
19370 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
19371
19372 * linux-low.c (linux_resume): Take a struct thread_resume *
19373 argument.
19374 (linux_wait): Update call.
19375 (resume_ptr): New static variable.
19376 (linux_continue_one_thread): Renamed from
19377 linux_continue_one_process. Use resume_ptr.
19378 (linux_resume): Use linux_continue_one_thread.
19379 * server.c (handle_v_cont, handle_v_requests): New functions.
19380 (myresume): New function.
19381 (main): Handle 'v' case.
19382 * target.h (struct thread_resume): New type.
19383 (struct target_ops): Change argument of "resume" to struct
19384 thread_resume *.
19385 (myresume): Delete macro.
19386
19387 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
19388
19389 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
19390 (uninstall): Support DESTDIR.
19391
19392 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
19393
19394 * configure.srv: Add xscale*linux copy of arm*linux entry.
19395
19396 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
19397
19398 * linux-arm-low.c (arm_reinsert_addr): New function.
19399 (the_low_target): Add arm_reinsert_addr.
19400
19401 2003-07-08 Mark Kettenis <kettenis@gnu.org>
19402
19403 * mem-break.c: Remove whitespace at end of file.
19404
19405 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
19406
19407 * configure.in: Check whether we need to prototype strerror.
19408 * server.h: Optionally prototype strerror.
19409 * gdbreplay.c (perror_with_name): Use strerror.
19410 * linux-low.c (linux_attach_lwp): Use strerror.
19411 * utils.c (perror_with_name): Use strerror.
19412 * config.in, configure: Regenerated.
19413
19414 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
19415
19416 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
19417 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
19418
19419 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
19420
19421 * Makefile.in (SFILES): Update.
19422 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
19423 low-sun3.c: Remove files.
19424
19425 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
19426
19427 * linux-low.c: Move comment to linux_thread_alive where it belonged.
19428 (linux_detach_one_process, linux_detach): New functions.
19429 (linux_target_ops): Add linux_detach.
19430 * server.c (main): Handle 'D' packet.
19431 * target.h (struct target_ops): Add "detach" member.
19432 (detach_inferior): Define.
19433
19434 2003-06-13 Mark Kettenis <kettenis@gnu.org>
19435
19436 From Kelley Cook <kelleycook@wideopenwest.com>:
19437 * configure.srv: Accept i[34567]86 variants.
19438
19439 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
19440
19441 * linux-low.c (linux_wait_for_event): Correct comment typos.
19442 (linux_resume_one_process): Call check_removed_breakpoint.
19443 (linux_send_signal): New function.
19444 (linux_target_ops): Add linux_send_signal.
19445 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
19446 of kill.
19447 * target.h (struct target_ops): Add send_signal.
19448
19449 2003-05-29 Jim Blandy <jimb@redhat.com>
19450
19451 * linux-low.c (usr_store_inferior_registers): Transfer buf in
19452 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
19453 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
19454 away part of the register's value.
19455
19456 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
19457
19458 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
19459 (linux_wait_for_event, linux_init_signals): Likewise.
19460
19461 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
19462
19463 * configure.in: Check for stdlib.h.
19464 * configure: Regenerated.
19465 * config.in: Regenerated.
19466
19467 2003-01-04 Andreas Schwab <schwab@suse.de>
19468
19469 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
19470
19471 2003-01-02 Andrew Cagney <ac131313@redhat.com>
19472
19473 * Makefile.in: Remove obsolete code.
19474
19475 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
19476
19477 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
19478 defined(PT_FPR0_HI).
19479
19480 2002-11-17 Stuart Hughes <seh@zee2.com>
19481
19482 * linux-arm-low.c (arm_num_regs): Increase.
19483 (arm_regmap): Include status register.
19484
19485 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
19486
19487 * linux-low.c (register_addr): Remove incorrect -1 check.
19488
19489 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
19490
19491 * linux-low.c (linux_create_inferior): Call setpgid. Return
19492 the new PID.
19493 (unstopped_p, linux_signal_pid): Remove.
19494 (linux_target_ops): Remove linux_signal_pid.
19495 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
19496 global instead of target method.
19497 * target.h (struct target_ops): Remove signal_pid. Update comment
19498 for create_inferior.
19499 * server.c (signal_pid): New variable.
19500 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
19501 gdbserver. Set the child to be the foreground process group.
19502 (attach_inferior): Set signal_pid.
19503
19504 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
19505
19506 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
19507
19508 2002-08-20 Jim Blandy <jimb@redhat.com>
19509
19510 * Makefile.in (LDFLAGS): Allow the configure script to establish a
19511 default for this.
19512
19513 2002-08-01 Andrew Cagney <cagney@redhat.com>
19514
19515 * Makefile.in: Make chill references obsolete.
19516
19517 2002-07-24 Kevin Buettner <kevinb@redhat.com>
19518
19519 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
19520 * configure: Regenerate.
19521 * config.in: Regenerate.
19522
19523 2002-07-09 David O'Brien <obrien@FreeBSD.org>
19524
19525 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
19526 (perror_with_name, remote_close, remote_open, expect, play): Static.
19527
19528 2002-07-04 Michal Ludvig <mludvig@suse.cz>
19529
19530 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
19531 byte offsets instead of an array of indexes.
19532 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
19533
19534 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
19535
19536 * regcache.c: Add comment.
19537
19538 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
19539
19540 * thread-db.c: New file.
19541 * proc-service.c: New file.
19542 * acinclude.m4: New file.
19543 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
19544 proc-service.o, and thread-db.o.
19545 (linux-low.o): Add USE_THREAD_DB.
19546 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
19547 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
19548 * aclocal.m4: Regenerated.
19549 * config.in: Regenerated.
19550 * configure: Regenerated.
19551 * configure.in: Check for proc_service.h, sys/procfs.h,
19552 thread_db.h, and linux/elf.h headrs.
19553 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
19554 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
19555 Check for -lthread_db and thread support.
19556 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
19557 PowerPC, and SuperH.
19558 * i387-fp.c: Constify arguments.
19559 * i387-fp.h: Likewise.
19560 * inferiors.c: (struct thread_info): Renamed from
19561 `struct inferior_info'. Remove PID member. Use generic inferior
19562 list header. All uses updated.
19563 (inferiors, signal_pid): Removed.
19564 (all_threads): New variable.
19565 (get_thread): Define.
19566 (add_inferior_to_list): New function.
19567 (for_each_inferior): New function.
19568 (change_inferior_id): New function.
19569 (add_inferior): Removed.
19570 (remove_inferior): New function.
19571 (add_thread): New function.
19572 (free_one_thread): New function.
19573 (remove_thread): New function.
19574 (clear_inferiors): Use for_each_inferior and free_one_thread.
19575 (find_inferior): New function.
19576 (find_inferior_id): New function.
19577 (inferior_target_data): Update argument type.
19578 (set_inferior_target_data): Likewise.
19579 (inferior_regcache_data): Likewise.
19580 (set_inferior_regcache_data): Likewise.
19581 * linux-low.c (linux_bp_reinsert): Remove.
19582 (all_processes, stopping_threads, using_thrads)
19583 (struct pending_signals, debug_threads, pid_of): New.
19584 (inferior_pid): Replace with macro.
19585 (struct inferior_linux_data): Remove.
19586 (get_stop_pc, add_process): New functions.
19587 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
19588 Use add_process and add_thread.
19589 (linux_attach_lwp): New function, based on old linux_attach. Use
19590 add_process and add_thread. Set stop_expected for new threads.
19591 (linux_attach): New function.
19592 (linux_kill_one_process): New function.
19593 (linux_kill): Kill all LWPs.
19594 (linux_thread_alive): Use find_inferior_id.
19595 (check_removed_breakpoints, status_pending_p): New functions.
19596 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
19597 Update. Use WNOHANG. Wait for cloned processes also. Update process
19598 struct for the found process.
19599 (linux_wait_for_event): New function.
19600 (linux_wait): Use it. Support LWPs.
19601 (send_sigstop, wait_for_sigstop, stop_all_processes)
19602 (linux_resume_one_process, linux_continue_one_process): New functions.
19603 (linux_resume): Support LWPs.
19604 (REGISTER_RAW_SIZE): Remove.
19605 (fetch_register): Use register_size instead. Call supply_register.
19606 (usr_store_inferior_registers): Likewise. Call collect_register.
19607 Fix recursive case.
19608 (regsets_fetch_inferior_registers): Improve error message.
19609 (regsets_store_inferior_registers): Add debugging.
19610 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
19611 (unstopped_p, linux_signal_pid): New functions.
19612 (linux_target_ops): Add linux_signal_pid.
19613 (linux_init_signals): New function.
19614 (initialize_low): Call it. Initialize using_threads.
19615 * regcache.c (inferior_regcache_data): Add valid
19616 flag.
19617 (get_regcache): Fetch registers lazily. Add fetch argument
19618 and update all callers.
19619 (regcache_invalidate_one, regcache_invalidate): New
19620 functions.
19621 (new_register_cache): Renamed from create_register_cache.
19622 Return the new regcache.
19623 (free_register_cache): Change argument to a void *.
19624 (registers_to_string, registers_from_string): Call get_regcache
19625 with fetch flag set.
19626 (register_data): Make static. Pass fetch flag to get_regcache.
19627 (supply_register): Call get_regcache with fetch flag clear.
19628 (collect_register): Call get_regcache with fetch flag set.
19629 (collect_register_as_string): New function.
19630 * regcache.h: Update.
19631 * remote-utils.c (putpkt): Flush after debug output and use
19632 stderr.
19633 Handle input interrupts while waiting for an ACK.
19634 (input_interrupt): Use signal_pid method.
19635 (getpkt): Flush after debug output and use stderr.
19636 (outreg): Use collect_register_as_string.
19637 (new_thread_notify, dead_thread_notify): New functions.
19638 (prepare_resume_reply): Check using_threads. Set thread_from_wait
19639 and general_thread.
19640 (look_up_one_symbol): Flush after debug output.
19641 * server.c (step_thread, server_waiting): New variables.
19642 (start_inferior): Don't use signal_pid. Update call to mywait.
19643 (attach_inferior): Update call to mywait.
19644 (handle_query): Handle qfThreadInfo and qsThreadInfo.
19645 (main): Don't fetch/store registers explicitly. Use
19646 set_desired_inferior. Support proposed ``Hs'' packet. Update
19647 calls to mywait.
19648 * server.h: Update.
19649 (struct inferior_list, struct_inferior_list_entry): New.
19650 * target.c (set_desired_inferior): New.
19651 (write_inferior_memory): Constify.
19652 (mywait): New function.
19653 * target.h: Update.
19654 (struct target_ops): New signal_pid method.
19655 (mywait): Removed macro, added prototype.
19656
19657 * linux-low.h (regset_func): Removed.
19658 (regset_fill_func, regset_store_func): New.
19659 (enum regset_type): New.
19660 (struct regset_info): Add type field. Use new operation types.
19661 (struct linux_target_ops): stop_pc renamed to get_pc.
19662 Add decr_pc_after_break and breakpoint_at.
19663 (get_process, get_thread_proess, get_process_thread)
19664 (strut process_info, all_processes, linux_attach_lwp)
19665 (thread_db_init): New.
19666
19667 * linux-arm-low.c (arm_get_pc, arm_set_pc,
19668 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
19669 (the_low_target): Add new members.
19670 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
19671 (i386_store_fpxregset): Constify.
19672 (target_regsets): Add new kind identifier.
19673 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
19674 (i386_set_pc): Add debugging.
19675 (i386_breakpoint_at): New function.
19676 (the_low_target): Add new members.
19677 * linux-mips-low.c (mips_get_pc, mips_set_pc)
19678 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
19679 (mips_breakpoint_at): New.
19680 (the_low_target): Add new members.
19681 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
19682 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
19683 (the_low_target): Add new members.
19684 * linux-sh-low.c (sh_get_pc, sh_set_pc)
19685 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
19686 (the_low_target): Add new members.
19687 * linux-x86-64-low.c (target_regsets): Add new kind
19688 identifier.
19689
19690 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
19691
19692 From Martin Pool <mbp@samba.org>:
19693 * server.c (gdbserver_usage): New function.
19694 (main): Call it.
19695
19696 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
19697
19698 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
19699 stop_at -> stop_pc.
19700
19701 2002-05-04 Andrew Cagney <ac131313@redhat.com>
19702
19703 * Makefile.in: Remove obsolete code.
19704
19705 2002-04-24 Michal Ludvig <mludvig@suse.cz>
19706
19707 * linux-low.c (regsets_fetch_inferior_registers),
19708 (regsets_store_inferior_registers): Removed cast to int from
19709 ptrace() calls.
19710 * regcache.h: Added declaration of struct inferior_info.
19711
19712 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
19713
19714 * inferiors.c (struct inferior_info): Add regcache_data.
19715 (add_inferior): Call create_register_cache.
19716 (clear_inferiors): Call free_register_cache.
19717 (inferior_regcache_data, set_inferior_regcache_data): New functions.
19718 * regcache.c (struct inferior_regcache_data): New.
19719 (registers): Remove.
19720 (get_regcache): New function.
19721 (create_register_cache, free_register_cache): New functions.
19722 (set_register_cache): Don't initialize the register cache here.
19723 (registers_to_string, registers_from_string, register_data): Call
19724 get_regcache.
19725 * regcache.h: Add prototypes.
19726 * server.h: Likewise.
19727
19728 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
19729
19730 * mem-break.c: New file.
19731 * mem-break.h: New file.
19732 * Makefile.in: Add mem-break.o rule; update server.h
19733 dependencies.
19734 * inferiors.c (struct inferior_info): Add target_data
19735 member.
19736 (clear_inferiors): Free target_data member if set.
19737 (inferior_target_data, set_inferior_target_data): New functions.
19738 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
19739 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
19740 * linux-low.c (linux_bp_reinsert): New variable.
19741 (struct inferior_linux_data): New.
19742 (linux_create_inferior): Use set_inferior_target_data.
19743 (linux_attach): Likewise. Call add_inferior.
19744 (linux_wait_for_one_inferior): New function.
19745 (linux_wait): Call it.
19746 (linux_write_memory): Add const.
19747 (initialize_low): Call set_breakpoint_data.
19748 * linux-low.h (struct linux_target_ops): Add breakpoint
19749 handling members.
19750 * server.c (attach_inferior): Remove extra add_inferior
19751 call.
19752 * server.h: Include mem-break.h. Update inferior.c
19753 prototypes.
19754 * target.c (read_inferior_memory)
19755 (write_inferior_memory): New functions.
19756 * target.h (read_inferior_memory)
19757 (write_inferior_memory): Change macros to prototypes.
19758 (struct target_ops): Update comments. Add const to write_memory
19759 definition.
19760
19761 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
19762
19763 * linux-low.c (usr_store_inferior_registers): Support
19764 registers which are allowed to fail to store.
19765 * linux-low.h (linux_target_ops): Likewise.
19766 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
19767 (ppc_cannot_store_register): FPSCR may not be storable.
19768
19769 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19770
19771 * server.h: Include <string.h> if HAVE_STRING_H.
19772 * ChangeLog: Correct paths in last ChangeLog entry.
19773
19774 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19775
19776 * linux-low.h: Remove obsolete prototypes.
19777 (struct linux_target_ops): New.
19778 (extern the_low_target): New.
19779 * linux-low.c (num_regs, regmap): Remove declarations.
19780 (register_addr): Use the_low_target explicitly.
19781 (fetch_register): Likewise.
19782 (usr_fetch_inferior_registers): Likewise.
19783 (usr_store_inferior_registers): Likewise.
19784 * linux-arm-low.c (num_regs): Remove.
19785 (arm_num_regs): Define.
19786 (arm_regmap): Renamed from regmap, made static.
19787 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
19788 made static.
19789 (arm_cannot_store_register): Renamed from cannot_store_register,
19790 made static.
19791 (the_low_target): New.
19792 * linux-i386-low.c (num_regs): Remove.
19793 (i386_num_regs): Define.
19794 (i386_regmap): Renamed from regmap, made static.
19795 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
19796 made static.
19797 (i386_cannot_store_register): Renamed from cannot_store_register,
19798 made static.
19799 (the_low_target): New.
19800 * linux-ia64-low.c (num_regs): Remove.
19801 (ia64_num_regs): Define.
19802 (ia64_regmap): Renamed from regmap, made static.
19803 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
19804 made static.
19805 (ia64_cannot_store_register): Renamed from cannot_store_register,
19806 made static.
19807 (the_low_target): New.
19808 * linux-m68k-low.c (num_regs): Remove.
19809 (m68k_num_regs): Define.
19810 (m68k_regmap): Renamed from regmap, made static.
19811 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
19812 made static.
19813 (m68k_cannot_store_register): Renamed from cannot_store_register,
19814 made static.
19815 (the_low_target): New.
19816 * linux-mips-low.c (num_regs): Remove.
19817 (mips_num_regs): Define.
19818 (mips_regmap): Renamed from regmap, made static.
19819 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
19820 made static.
19821 (mips_cannot_store_register): Renamed from cannot_store_register,
19822 made static.
19823 (the_low_target): New.
19824 * linux-ppc-low.c (num_regs): Remove.
19825 (ppc_num_regs): Define.
19826 (ppc_regmap): Renamed from regmap, made static.
19827 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
19828 made static.
19829 (ppc_cannot_store_register): Renamed from cannot_store_register,
19830 made static.
19831 (the_low_target): New.
19832 * linux-s390-low.c (num_regs): Remove.
19833 (s390_num_regs): Define.
19834 (s390_regmap): Renamed from regmap, made static.
19835 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
19836 made static.
19837 (s390_cannot_store_register): Renamed from cannot_store_register,
19838 made static.
19839 (the_low_target): New.
19840 * linux-sh-low.c (num_regs): Remove.
19841 (sh_num_regs): Define.
19842 (sh_regmap): Renamed from regmap, made static.
19843 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
19844 made static.
19845 (sh_cannot_store_register): Renamed from cannot_store_register,
19846 made static.
19847 (the_low_target): New.
19848 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
19849 (the_low_target): New.
19850
19851 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19852
19853 * Makefile.in: Add stamp-h target.
19854 * configure.in: Create stamp-h.
19855 * configure: Regenerated.
19856
19857 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19858
19859 * inferiors.c: New file.
19860 * target.c: New file.
19861 * target.h: New file.
19862 * Makefile.in: Add target.o and inferiors.o. Update
19863 dependencies.
19864 * linux-low.c (inferior_pid): New static variable,
19865 moved from server.c.
19866 (linux_create_inferior): Renamed from create_inferior.
19867 Call add_inferior. Return 0 on success instead of a PID.
19868 (linux_attach): Renamed from myattach.
19869 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
19870 (linux_thread_alive): Renamed from mythread_alive.
19871 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
19872 child dies.
19873 (linux_resume): Renamed from myresume. Add missing ``return 0''.
19874 (regsets_store_inferior_registers): Correct error message.
19875 Add missing ``return 0''.
19876 (linux_fetch_registers): Renamed from fetch_inferior_registers.
19877 (linux_store_registers): Renamed from store_inferior_registers.
19878 (linux_read_memory): Renamed from read_inferior_memory.
19879 (linux_write_memory): Renamed from write_inferior_memory.
19880 (linux_target_ops): New structure.
19881 (initialize_low): Call set_target_ops ().
19882 * remote-utils.c (unhexify): New function.
19883 (hexify): New function.
19884 (input_interrupt): Send signals to ``signal_pid''.
19885 * server.c (inferior_pid): Remove.
19886 (start_inferior): Update create_inferior call.
19887 (attach_inferior): Call add_inferior.
19888 (handle_query): New function.
19889 (main): Call handle_query for `q' packets.
19890 * server.h: Include "target.h". Remove obsolete prototypes.
19891 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
19892
19893 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
19894
19895 * Makefile.in: Add WARN_CFLAGS. Update configury
19896 dependencies.
19897 * configure.in: Check for <string.h>
19898 * configure: Regenerate.
19899 * config.in: Regenerate.
19900 * gdbreplay.c: Include needed system headers.
19901 (remote_open): Remove strchr prototype.
19902 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
19903 * regcache.c (supply_register): Change buf argument to const void *.
19904 (supply_register_by_name): Likewise.
19905 (collect_register): Change buf argument to void *.
19906 (collect_register_by_name): Likewise.
19907 * regcache.h: Add missing prototypes.
19908 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
19909 * server.c (handle_query): New function.
19910 (attached): New static variable, moved out of main.
19911 (main): Quiet longjmp clobber warnings.
19912 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
19913 * utils.c (error): Remove NORETURN.
19914 (fatal): Likewise.
This page took 0.707922 seconds and 4 git commands to generate.