Apply 'const' in more places
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-09-14 Tom Tromey <tromey@adacore.com>
2
3 * tracepoint.cc (eval_result_names): Now const.
4 * ax.cc (gdb_agent_op_names): Now const.
5
6 2020-09-10 Kamil Rytarowski <n54@gmx.com>
7
8 * netbsd-low.cc: Add.
9 * netbsd-low.h: Likewise.
10 * netbsd-amd64-low.cc: Likewise.
11 * Makefile.in (SFILES): Register "netbsd-low.cc", "netbsd-low.h",
12 "netbsd-amd64-low.cc".
13 * configure.srv: Add x86_64-*-netbsd*.
14
15 2020-08-13 Simon Marchi <simon.marchi@polymtl.ca>
16
17 * server.cc (captured_main): Accept multiple `--selftest=`
18 options. Pass all `--selftest=` arguments to run_tests.
19
20 2020-07-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
21
22 * configure, config.in: Regenerate.
23
24 2020-07-26 Eli Zaretskii <eliz@gnu.org>
25
26 * configure.ac (AC_CHECK_HEADERS): Add ws2tcpip.h.
27 When checking whether socklen_t type is defined, use ws2tcpip.h if
28 it is available and sys/socket.h isn't.
29 * configure: Regenerate.
30 * config.in: Regenerate.
31
32 2020-07-22 Pedro Alves <pedro@palves.net>
33
34 * inferiors.cc (switch_to_process): New, moved here from
35 thread-db.cc, and made extern.
36 * inferiors.h (switch_to_process): Declare.
37 * server.cc: Include "gdbsupport/scoped_restore.h".
38 (handle_qxfer_threads_proper): Now returns bool. Prepare to
39 access memory around target calls.
40 (handle_qxfer_threads): Handle errors.
41 * thread-db.cc (switch_to_process): Moved to inferiors.cc.
42
43 2020-07-21 Simon Marchi <simon.marchi@efficios.com>
44
45 * linux-low.cc (stopped_pids): Make static.
46
47 2020-07-17 Andrew Burgess <andrew.burgess@embecosm.com>
48
49 * tdesc.cc (allocate_target_description): Add header comment.
50 (target_desc_deleter::operator()): New function.
51 * tdesc.h (struct target_desc): Declare as final.
52
53 2020-07-13 Simon Marchi <simon.marchi@polymtl.ca>
54
55 * server.cc (handle_query): Use std::vector of
56 std::string for `qsupported` vector. Use separate
57 vector for unknowns.
58 * target.h (class process_stratum_target) <process_qsupported>:
59 Change parameters to array_view of const char *.
60 (target_process_qsupported): Remove `count` parameter.
61 * target.cc (process_stratum_target::process_qsupported): Change
62 parameters to array_view of const char *.
63 * linux-x86-low.cc (class x86_target) <process_qsupported>:
64 Likewise.
65
66 2020-06-29 Tom de Vries <tdevries@suse.de>
67
68 * ax.h: Include gdbsupport/debug_agent.h.
69
70 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
71
72 * tdesc.cc (struct tdesc_compatible_info): New struct.
73 (tdesc_compatible_info_list): New function.
74 (tdesc_compatible_info_arch_name): New function.
75
76 2020-06-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
77
78 Use std::list to stop pending signal instead of manually-created
79 linked list.
80 * linux-low.h: Include <list>.
81 (struct pending_signal): Move here from linux-low.cc.
82 (struct lwp_info) <pending_signals>
83 <pending_signals_to_report>: Update the type.
84 * linux-low.cc (struct pending_signals): Remove.
85 (linux_process_target::delete_lwp)
86 (linux_process_target::add_lwp)
87 (enqueue_one_deferred_signal)
88 (dequeue_one_deferred_signal)
89 (enqueue_pending_signal)
90 (linux_process_target::resume_one_lwp_throw)
91 (linux_process_target::thread_needs_step_over)
92 (linux_process_target::resume_one_thread)
93 (linux_process_target::proceed_one_lwp): Update the use of pending
94 signal list.
95
96 2020-06-17 Simon Marchi <simon.marchi@efficios.com>
97
98 * Makefile.in (%-generated.cc: ../gdb/regformats/arm/%.dat):
99 Remove.
100
101 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
102
103 * Makefile.in (SFILES): Remove win32-arm-low.cc, wincecompat.cc.
104 * configure.srv: Remove mingw32ce cases.
105 * server.h, win32-low.cc: Remove __MINGW32CE__-guarded code.
106 * win32-low.h (to_back_slashes): Remove.
107 * win32-arm-low.cc, wincecompat.cc, wincecompat.h: Remove.
108
109 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
110
111 * Makefile.in (SFILES): linux-tile-low.cc.
112 * configure.srv: Remove tilegx case.
113 * linux-tile-low.cc: Remove.
114
115 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
116
117 * Makefile.in (SFILES): Remove linux-m32r-low.cc.
118 * configure.srv: Remove m32r case.
119 * linux-m32r-low.cc: Remove.
120
121 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
122
123 * Makefile.in (SFILES): Remove linux-cris-low.c.
124 * configure.srv: Remove cris cases.
125 * linux-cris-low.cc, linux-crisv32-low.cc: Remove.
126
127 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
128
129 * Makefile.in (SFILES): Remove linux-bfin-low.c.
130 * configure.srv: Remove bfin case.
131 * linux-bfin-low.cc: Remove.
132 * linux-low.cc: Remove BFIN-conditional code.
133
134 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
135
136 * configure: Re-generate.
137 * configure.ac: Remove srv_qnx test.
138 * configure.srv: Remove nto case.
139 * nto-low.cc, nto-low.h, nto-x86-low.cc: Remove.
140 * remote-utils.c: Remove __QNX__-guarded code.
141
142 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
143
144 * configure: Re-generate.
145 * configure.ac: Remove srv_lynxos test.
146 * configure.srv: Remove lynxos cases.
147 * lynx-i386-low.cc, lynx-low.cc, lynx-low.h, lynx-ppc-low.c:
148 Remove.
149
150 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
151
152 * README: Fix a few outdated or incoherent things.
153
154 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
155
156 * win32-low.cc (do_initial_child_stuff): Set open_process_used.
157 (win32_clear_inferiors): Use open_process_used.
158 (get_child_debug_event): Likewise.
159
160 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
161
162 PR gdbserver/25893
163 * linux-low.cc (linux_process_target::create_inferior),
164 lynx-low.cc (lynx_process_target::create_inferior),
165 win32-low.cc (win32_process_target::create_inferior): Use
166 construct_inferior_arguments instead of stringify_argv
167 to get string representation which properly escapes
168 special characters.
169 * server.cc (handle_v_run): Just pass empty program arg
170 as such, since any further processing is now handled via
171 construct_inferior_arguments.
172
173 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
174
175 * nto-low.cc (nto_process_target::create_inferior): Pass
176 argv to spawnp function as char **.
177
178 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
179
180 * server.cc (captured_main), (handle_v_run): No longer
181 insert extra NULL element to args vector.
182
183 2020-05-23 Pedro Alves <palves@redhat.com>
184
185 * gdb-safe-ctype.h: New.
186
187 2020-05-16 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
188
189 * linux-ia64-low.cc (ia64_target::sw_breakpoint_from_kind):
190 Fix incorrect 'gdb_assert_no_reached' to 'gdb_assert_not_reached'.
191 (ia64_target::low_breakpoint_at): Ditto.
192
193 2020-05-15 Hannes Domani <ssbssa@yahoo.de>
194
195 * win32-i386-low.cc (i386_supports_z_point_type): Handle
196 Z_PACKET_HW_BP z_type.
197 (i386_insert_point): Handle raw_bkpt_type type.
198 (i386_remove_point): Likewise.
199
200 2020-04-30 Hannes Domani <ssbssa@yahoo.de>
201
202 * configure.srv <x86_64-*-mingw*, x86_64-*-cygwin*> (srv_tgtobj):
203 Add arch/i386.o.
204 * win32-arm-low.cc (arm_num_regs): New function.
205 (struct win32_target_ops): Use arm_num_regs.
206 * win32-i386-low.cc (win32_get_current_dr): Adapt for WOW64
207 processes.
208 (i386_get_thread_context): Likewise.
209 (i386_prepare_to_resume): Likewise.
210 (i386_thread_added): Likewise.
211 (i386_single_step): Likewise.
212 (i386_fetch_inferior_register): Likewise.
213 (i386_store_inferior_register): Likewise.
214 (i386_arch_setup): Likewise.
215 (i386_win32_num_regs): New function.
216 (struct win32_target_ops): Use i386_win32_num_regs.
217 * win32-low.cc (win32_get_thread_context): Adapt for WOW64
218 processes.
219 (win32_require_context): Likewise.
220 (child_add_thread): Likewise.
221 (do_initial_child_stuff): Likewise.
222 (continue_one_thread): Likewise.
223 (win32_process_target::resume): Likewise.
224 (load_psapi): Likewise.
225 (win32_add_all_dlls): Likewise.
226 (maybe_adjust_pc): Likewise.
227 (win32_process_target::qxfer_siginfo): Likewise.
228 (initialize_low): Likewise.
229 * win32-low.h (struct win32_target_ops): Change num_regs to
230 callback function.
231
232 2020-04-27 Simon Marchi <simon.marchi@efficios.com>
233
234 * configure.ac: Remove check for fs_base/gs_base in
235 user_regs_struct.
236 * configure: Re-generate.
237 * config.in: Re-generate.
238 * linux-x86-low.cc (x86_64_regmap, x86_fill_gregset,
239 x86_store_gregset): Adjust.
240
241 2020-04-22 Hannes Domani <ssbssa@yahoo.de>
242
243 * server.cc (handle_search_memory_1): Fix gdb_read_memory return value
244 comparison.
245
246 2020-04-16 Tom Tromey <tromey@adacore.com>
247
248 * win32-low.cc (windows_nat::handle_access_violation): New
249 function.
250
251 2020-04-15 Simon Marchi <simon.marchi@polymtl.ca>
252
253 * win32-low.cc (get_child_debug_event): Fix format string warning.
254
255 2020-04-13 Tom Tromey <tom@tromey.com>
256
257 * server.h (gdb_fildes_t): Remove typedef.
258 * remote-utils.c (remote_desc, list_desc): Now int.
259 (INVALID_DESCRIPTOR): Remove.
260 (gdb_connected, remote_close)
261 (check_remote_input_interrupt_request): Update.
262 * utils.h (pfildes): Don't declare.
263 * utils.c (pfildes): Remove.
264
265 2020-04-13 Tom Tromey <tom@tromey.com>
266
267 * server.h (handle_serial_event, handle_target_event): Update.
268 * server.c: Don't call initialize_event_loop.
269 (keep_processing_events): New global.
270 (handle_serial_event): Return void. Set keep_processing_events.
271 (handle_target_event): Return void.
272 (start_event_loop): Move from event-loop.c. Rewrite.
273 * remote-utils.c (handle_accept_event): Return void.
274 (reset_readchar): Use delete_timer.
275 (process_remaining): Return void.
276 (reschedule): Use create_timer.
277 * event-loop.h: Remove.
278 * event-loop.cc: Remove.
279 * Makefile.in (OBS): Use gdbsupport/event-loop.o, not event-loop.o.
280
281 2020-04-13 Tom Tromey <tom@tromey.com>
282
283 * server.c (invoke_async_signal_handlers)
284 (check_async_event_handlers, flush_streams, gdb_select): New
285 functions.
286
287 2020-04-13 Tom Tromey <tom@tromey.com>
288
289 * configure: Rebuild.
290 * config.in: Rebuild.
291
292 2020-04-08 Tom Tromey <tromey@adacore.com>
293
294 PR gdb/22992
295 * win32-low.c (child_continue): Call matching_pending_stop.
296 (get_child_debug_event): Call fetch_pending_stop. Push pending
297 stop when needed.
298
299 2020-04-08 Tom Tromey <tromey@adacore.com>
300
301 * win32-low.h (win32_process_target::stopped_by_sw_breakpoint)
302 (win32_process_target::supports_stopped_by_sw_breakpoint):
303 Declare.
304 * win32-low.c (win32_supports_z_point_type): Always handle
305 Z_PACKET_SW_BP.
306 (win32_insert_point): Call insert_memory_breakpoint when needed.
307 (win32_remove_point): Call remove_memory_breakpoint when needed.
308 (win32_process_target::stopped_by_sw_breakpoint)
309 (win32_process_target::supports_stopped_by_sw_breakpoint): New
310 methods.
311 (win32_target_ops): Update.
312 (maybe_adjust_pc): New function.
313 (win32_wait): Call maybe_adjust_pc.
314
315 2020-04-08 Tom Tromey <tromey@adacore.com>
316
317 * win32-low.h (struct win32_target_ops) <decr_pc_after_break>: New
318 field.
319 * win32-i386-low.c (the_low_target): Update.
320 * win32-arm-low.c (the_low_target): Update.
321
322 2020-04-08 Tom Tromey <tromey@adacore.com>
323
324 * win32-low.h (win32_process_target::read_pc)
325 (win32_process_target::write_pc): Declare.
326 * win32-low.c (win32_process_target::read_pc)
327 (win32_process_target::write_pc): New methods.
328 * win32-i386-low.c (i386_win32_get_pc, i386_win32_set_pc): New
329 functions.
330 (the_low_target): Update.
331 * win32-arm-low.c (arm_win32_get_pc, arm_win32_set_pc): New
332 functions.
333 (the_low_target): Update.
334
335 2020-04-08 Tom Tromey <tromey@adacore.com>
336
337 * win32-low.c (win32_kill, get_child_debug_event): Use
338 wait_for_debug_event.
339
340 2020-04-08 Tom Tromey <tromey@adacore.com>
341
342 * win32-low.c (child_continue): Call continue_last_debug_event.
343
344 2020-04-08 Tom Tromey <tromey@adacore.com>
345
346 * win32-low.c (handle_exception): Remove.
347 (windows_nat::handle_ms_vc_exception): New function.
348 (get_child_debug_event): Add "continue_status" parameter.
349 Update.
350 (win32_wait): Update.
351
352 2020-04-08 Tom Tromey <tromey@adacore.com>
353
354 * win32-low.c (windows_nat::handle_load_dll): Rename from
355 handle_load_dll. No longer static.
356 (windows_nat::handle_unload_dll): Rename from handle_unload_dll.
357 No longer static.
358
359 2020-04-08 Tom Tromey <tromey@adacore.com>
360
361 * win32-low.c (handle_output_debug_string): Add parameter. Change
362 return type.
363 (win32_kill, get_child_debug_event): Update.
364
365 2020-04-08 Tom Tromey <tromey@adacore.com>
366
367 * win32-low.c (current_process_handle, current_process_id)
368 (main_thread_id, last_sig, current_event, siginfo_er): Move to
369 nat/windows-nat.c.
370
371 2020-04-08 Tom Tromey <tromey@adacore.com>
372
373 * win32-low.c (get_image_name): Remove.
374 (handle_load_dll): Update.
375
376 2020-04-08 Tom Tromey <tromey@adacore.com>
377
378 * win32-low.c (windows_nat::thread_rec): Rename from thread_rec.
379 No longer static. Change parameters.
380 (child_add_thread, child_fetch_inferior_registers)
381 (child_store_inferior_registers, win32_resume)
382 (win32_get_tib_address): Update.
383
384 2020-04-08 Tom Tromey <tromey@adacore.com>
385
386 * win32-low.h (struct win32_target_ops): Use qualified names where
387 needed.
388 * win32-i386-low.c: Add "using namespace".
389 * win32-low.c: Add "using namespace".
390 * win32-arm-low.c: Add "using namespace".
391
392 2020-04-08 Tom Tromey <tromey@adacore.com>
393
394 * win32-low.c (delete_thread_info): Don't call CloseHandle.
395
396 2020-04-08 Tom Tromey <tromey@adacore.com>
397
398 * win32-low.c (win32_require_context, suspend_one_thread): Use
399 windows_thread_info::suspend.
400 (continue_one_thread): Use windows_thread_info::resume.
401 * configure.srv (srv_tgtobj): Add windows-nat.o when needed.
402
403 2020-04-08 Tom Tromey <tromey@adacore.com>
404
405 * win32-i386-low.c (update_debug_registers)
406 (i386_prepare_to_resume, i386_thread_added): Update.
407
408 2020-04-08 Tom Tromey <tromey@adacore.com>
409
410 * win32-low.c (child_add_thread): Use new.
411 (delete_thread_info): Use delete.
412
413 2020-04-08 Tom Tromey <tromey@adacore.com>
414
415 * win32-low.h (struct windows_thread_info): Remove.
416
417 2020-04-08 Tom Tromey <tromey@adacore.com>
418
419 * win32-low.h (struct windows_thread_info): Rename from
420 win32_thread_info. Remove typedef.
421 (struct win32_target_ops, win32_require_context): Update.
422 * win32-low.c (win32_get_thread_context)
423 (win32_set_thread_context, win32_prepare_to_resume)
424 (win32_require_context, thread_rec, child_add_thread)
425 (delete_thread_info, continue_one_thread)
426 (child_fetch_inferior_registers, child_store_inferior_registers)
427 (win32_resume, suspend_one_thread, win32_get_tib_address):
428 Update.
429 * win32-i386-low.c (update_debug_registers)
430 (win32_get_current_dr, i386_get_thread_context)
431 (i386_prepare_to_resume, i386_thread_added, i386_single_step)
432 (i386_fetch_inferior_register, i386_store_inferior_register):
433 Update.
434 * win32-arm-low.c (arm_get_thread_context)
435 (arm_fetch_inferior_register, arm_store_inferior_register):
436 Update.
437
438 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
439
440 * linux-low.h (struct linux_target_ops): Remove.
441 (the_low_target): Remove.
442 * linux-x86-low.cc (the_low_target): Remove.
443 * linux-aarch64-low.cc (the_low_target): Ditto.
444 * linux-arm-low.cc (the_low_target): Ditto.
445 * linux-bfin-low.cc (the_low_target): Ditto.
446 * linux-cris-low.cc (the_low_target): Ditto.
447 * linux-crisv32-low.cc (the_low_target): Ditto.
448 * linux-ia64-low.cc (the_low_target): Ditto.
449 * linux-m32r-low.cc (the_low_target): Ditto.
450 * linux-m68k-low.cc (the_low_target): Ditto.
451 * linux-mips-low.cc (the_low_target): Ditto.
452 * linux-nios2-low.cc (the_low_target): Ditto.
453 * linux-ppc-low.cc (the_low_target): Ditto.
454 * linux-riscv-low.cc (the_low_target): Ditto.
455 * linux-s390-low.cc (the_low_target): Ditto.
456 * linux-sh-low.cc (the_low_target): Ditto.
457 * linux-sparc-low.cc (the_low_target): Ditto.
458 * linux-tic6x-low.cc (the_low_target): Ditto.
459 * linux-tile-low.cc (the_low_target): Ditto.
460 * linux-xtensa-low.cc (the_low_target): Ditto.
461
462 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
463
464 Remove the 'get_ipa_tdesc_idx' linux target op and let a concrete
465 linux target define the op by overriding the declaration in
466 process_stratum_target.
467
468 * linux-low.h (struct linux_target_ops): Remove the op.
469 (class linux_process_target) <get_ipa_tdesc_idx>: Remove.
470 * linux-low.cc (linux_process_target::get_ipa_tdesc_idx): Remove.
471 * linux-x86-low.cc (class x86_target) <get_ipa_tdesc_idx>: Declare.
472 (x86_get_ipa_tdesc_idx): Turn into...
473 (x86_target::get_ipa_tdesc_idx): ...this.
474 (the_low_target): Remove the op field.
475 * linux-ppc-low.cc (class ppc_target) <get_ipa_tdesc_idx>: Declare.
476 (ppc_get_ipa_tdesc_idx): Turn into...
477 (ppc_target::get_ipa_tdesc_idx): ...this.
478 (the_low_target): Remove the op field.
479 * linux-s390-low.cc (class s390_target) <get_ipa_tdesc_idx>: Declare.
480 (s390_get_ipa_tdesc_idx): Turn into...
481 (s390_target::get_ipa_tdesc_idx): ...this.
482 (the_low_target): Remove the op field.
483
484 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
485
486 Turn the 'get_syscall_trapinfo' linux target op into a method
487 of process_stratum_target.
488
489 * linux-low.h (struct linux_target_ops): Remove the op.
490 (class linux_process_target) <get_syscall_trapinfo>
491 <gdb_catch_this_syscall>
492 <low_supports_catch_syscall>
493 <low_get_syscall_trapinfo>: Declare.
494 * linux-low.cc (get_syscall_trapinfo): Turn into...
495 (linux_process_target::get_syscall_trapinfo): ...this.
496 (linux_process_target::low_get_syscall_trapinfo): Define.
497 (gdb_catch_this_syscall_p): Turn into...
498 (linux_process_target::gdb_catch_this_syscall): ...this.
499 (linux_process_target::low_supports_catch_syscall): Define.
500
501 Update the callers below.
502
503 (linux_process_target::wait_1)
504 (linux_process_target::supports_catch_syscall)
505
506 * linux-x86-low.cc (class x86_target) <low_supports_catch_syscall>
507 <low_get_syscall_trapinfo>: Declare.
508 (x86_target::low_supports_catch_syscall): Define.
509 (x86_get_syscall_trapinfo): Turn into...
510 (x86_target::low_get_syscall_trapinfo): ...this.
511 (the_low_target): Remove the op field.
512 * linux-aarch64-low.cc (class aarch64_target)
513 <low_supports_catch_syscall>
514 <low_get_syscall_trapinfo>: Declare.
515 (aarch64_target::low_supports_catch_syscall): Define.
516 (aarch64_get_syscall_trapinfo): Turn into...
517 (aarch64_target::low_get_syscall_trapinfo): ...this.
518 (the_low_target): Remove the op field.
519 * linux-arm-low.cc (class arm_target) <low_supports_catch_syscall>
520 <low_get_syscall_trapinfo>: Declare.
521 (arm_target::low_supports_catch_syscall): Define.
522 (arm_get_syscall_trapinfo): Turn into...
523 (arm_target::low_get_syscall_trapinfo): ...this.
524 (the_low_target): Remove the op field.
525 * linux-ppc-low.cc (the_low_target): Remove the op field.
526 * linux-s390-low.cc (the_low_target): Remove the op field.
527
528 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
529
530 Remove the 'supports_hardware_single_step' linux target op and
531 override the process_stratum_target's op definition in
532 linux_process_target to return true.
533
534 * linux-low.h (struct linux_target_ops): Remove the op.
535 (class linux_process_target) <finish_step_over>
536 <maybe_hw_step>: Declare.
537 * linux-low.cc (can_hardware_single_step): Remove.
538 (maybe_hw_step): Turn into...
539 (linux_process_target::maybe_hw_step): ...this.
540 (finish_step_over): Turn into...
541 (linux_process_target::finish_step_over): ...this.
542 (linux_process_target::supports_hardware_single_step): Update
543 to return true.
544
545 Update the callers below.
546
547 (linux_process_target::single_step)
548 (linux_process_target::resume_one_lwp_throw)
549
550 * linux-arm-low.cc (class arm_target)
551 <supports_hardware_single_step>: Declare.
552 (arm_supports_hardware_single_step): Turn into...
553 (arm_target::supports_hardware_single_step): ...this.
554 (the_low_target): Remove the op field.
555 * linux-x86-low.cc (x86_supports_hardware_single_step): Remove.
556 (the_low_target): Remove the op field.
557 * linux-aarch64-low.cc (aarch64_supports_hardware_single_step):
558 Remove.
559 (the_low_target): Remove the op field.
560 * linux-bfin-low.cc (bfin_supports_hardware_single_step): Remove.
561 (the_low_target): Remove the op field.
562 * linux-crisv32-low.cc (cris_supports_hardware_single_step): Remove.
563 (the_low_target): Remove the op field.
564 * linux-m32r-low.cc (m32r_supports_hardware_single_step): Remove.
565 (the_low_target): Remove the op field.
566 * linux-m68k-low.cc (m68k_supports_hardware_single_step): Remove.
567 (the_low_target): Remove the op field.
568 * linux-ppc-low.cc (ppc_supports_hardware_single_step): Remove.
569 (the_low_target): Remove the op field.
570 * linux-s390-low.cc (s390_supports_hardware_single_step): Remove.
571 (the_low_target): Remove the op field.
572 * linux-sh-low.cc (sh_supports_hardware_single_step): Remove.
573 (the_low_target): Remove the op field.
574 * linux-tic6x-low.cc (tic6x_supports_hardware_single_step): Remove.
575 (the_low_target): Remove the op field.
576 * linux-tile-low.cc (tile_supports_hardware_single_step): Remove.
577 (the_low_target): Remove the op field.
578 * linux-xtensa-low.cc (xtensa_supports_hardware_single_step):
579 Remove.
580 (the_low_target): Remove the op field.
581
582 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
583
584 Turn the 'supports_range_stepping' linux target op into a method
585 of linux_process_target.
586
587 * linux-low.h (struct linux_target_ops): Remove the op.
588 (class linux_process_target) <low_supports_range_stepping>: Declare.
589 * linux-low.cc (linux_process_target::low_supports_range_stepping):
590 Define.
591 (linux_process_target::supports_range_stepping): Update the call
592 site.
593 * linux-x86-low.cc (class x86_target)
594 <low_supports_range_stepping>: Declare.
595 (x86_supports_range_stepping): Turn into...
596 (x86_target::low_supports_range_stepping): ...this.
597 (the_low_target): Remove the op field.
598 * linux-aarch64-low.cc (class aarch64_target)
599 <low_supports_range_stepping>: Declare.
600 (aarch64_supports_range_stepping): Turn into...
601 (aarch64_target::low_supports_range_stepping): ...this.
602 (the_low_target): Remove the op field.
603 * linux-arm-low.cc (the_low_target): Remove the op field.
604 * linux-bfin-low.cc (the_low_target): Ditto.
605 * linux-crisv32-low.cc (the_low_target): Ditto.
606 * linux-m32r-low.cc (the_low_target): Ditto.
607 * linux-m68k-low.cc (the_low_target): Ditto.
608 * linux-ppc-low.cc (the_low_target): Ditto.
609 * linux-s390-low.cc (the_low_target): Ditto.
610 * linux-sh-low.cc (the_low_target): Ditto.
611 * linux-tic6x-low.cc (the_low_target): Ditto.
612 * linux-tile-low.cc (the_low_target): Ditto.
613 * linux-xtensa-low.cc (the_low_target): Ditto.
614
615 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
616
617 Remove the 'emit_ops' linux target ops and let the concrete
618 linux target define the op by overriding the declaration of
619 process_stratum_target.
620
621 * linux-low.h (struct linux_target_ops): Remove the op.
622 (class linux_process_target) <emit_ops>: Remove.
623 * linux-low.cc (linux_process_target::emit_ops): Remove.
624 * linux-x86-low.cc (class x86_target) <emit_ops>: Declare.
625 (x86_emit_ops): Turn into...
626 (x86_target::emit_ops): ...this.
627 (the_low_target): Remove the op field.
628 * linux-aarch64-low.cc (class aarch64_target) <emit_ops>: Declare.
629 (aarch64_emit_ops): Turn into...
630 (aarch64_target::emit_ops): ...this.
631 (the_low_target): Remove the op field.
632 * linux-ppc-low.cc (class ppc_target) <emit_ops>: Declare.
633 (ppc_emit_ops): Turn into...
634 (ppc_target::emit_ops): ...this.
635 (the_low_target): Remove the op field.
636 * linux-s390-low.cc (class s390_target) <emit_ops>: Declare.
637 (s390_emit_ops): Turn into...
638 (s390_target::emit_ops): ...this.
639 (the_low_target): Remove the op field.
640 * linux-arm-low.cc (the_low_target): Remove the op field.
641 * linux-bfin-low.cc (the_low_target): Ditto.
642 * linux-crisv32-low.cc (the_low_target): Ditto.
643 * linux-m32r-low.cc (the_low_target): Ditto.
644 * linux-m68k-low.cc (the_low_target): Ditto.
645 * linux-sh-low.cc (the_low_target): Ditto.
646 * linux-tic6x-low.cc (the_low_target): Ditto.
647 * linux-tile-low.cc (the_low_target): Ditto.
648 * linux-xtensa-low.cc (the_low_target): Ditto.
649
650 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
651
652 Remove the 'install_fast_tracepoint_jump_pad' and
653 'get_min_fast_tracepoint_insn_len' linux target ops to let the
654 concrete linux target define the ops by overriding the declarations
655 of process_stratum_target.
656
657 * linux-low.h (struct linux_target_ops): Remove the ops.
658 (class linux_process_target) <supports_fast_tracepoints>
659 <install_fast_tracepoint_jump_pad>
660 <get_min_fast_tracepoint_insn_len>: Remove.
661 * linux-low.cc (linux_process_target::supports_fast_tracepoints)
662 (linux_process_target::install_fast_tracepoint_jump_pad)
663 (linux_process_target::get_min_fast_tracepoint_insn_len): Remove.
664 * linux-x86-low.cc (class x86_target) <supports_fast_tracepoints>
665 <install_fast_tracepoint_jump_pad>
666 <get_min_fast_tracepoint_insn_len>: Declare.
667 (x86_target::supports_fast_tracepoints): Define.
668 (x86_install_fast_tracepoint_jump_pad): Turn into...
669 (x86_target::install_fast_tracepoint_jump_pad): ...this.
670 (x86_get_min_fast_tracepoint_insn_len): Turn into...
671 (x86_target::get_min_fast_tracepoint_insn_len): ...this.
672 (the_low_target): Remove the op fields.
673 * linux-aarch64-low.cc (class aarch64_target)
674 <supports_fast_tracepoints>
675 <install_fast_tracepoint_jump_pad>
676 <get_min_fast_tracepoint_insn_len>: Declare.
677 (aarch64_target::supports_fast_tracepoints): Define.
678 (aarch64_install_fast_tracepoint_jump_pad): Turn into...
679 (aarch64_target::install_fast_tracepoint_jump_pad): ...this.
680 (aarch64_get_min_fast_tracepoint_insn_len): Turn into...
681 (aarch64_target::get_min_fast_tracepoint_insn_len): ...this.
682 (the_low_target): Remove the op fields.
683 * linux-ppc-low.cc (class ppc_target) <supports_fast_tracepoints>
684 <install_fast_tracepoint_jump_pad>
685 <get_min_fast_tracepoint_insn_len>: Declare.
686 (ppc_target::supports_fast_tracepoints): Define.
687 (ppc_install_fast_tracepoint_jump_pad): Turn into...
688 (ppc_target::install_fast_tracepoint_jump_pad): ...this.
689 (ppc_get_min_fast_tracepoint_insn_len): Turn into...
690 (ppc_target::get_min_fast_tracepoint_insn_len): ...this.
691 (the_low_target): Remove the op fields.
692 * linux-s390-low.cc (class s390_target) <supports_fast_tracepoints>
693 <install_fast_tracepoint_jump_pad>
694 <get_min_fast_tracepoint_insn_len>: Declare.
695 (s390_target::supports_fast_tracepoints): Define.
696 (s390_install_fast_tracepoint_jump_pad): Turn into...
697 (s390_target::install_fast_tracepoint_jump_pad): ...this.
698 (s390_get_min_fast_tracepoint_insn_len): Turn into...
699 (s390_target::get_min_fast_tracepoint_insn_len): ...this.
700 (the_low_target): Remove the op fields.
701 * linux-arm-low.cc (the_low_target): Remove the op fields.
702 * linux-bfin-low.cc (the_low_target): Ditto.
703 * linux-crisv32-low.cc (the_low_target): Ditto.
704 * linux-m32r-low.cc (the_low_target): Ditto.
705 * linux-m68k-low.cc (the_low_target): Ditto.
706 * linux-sh-low.cc (the_low_target): Ditto.
707 * linux-tic6x-low.cc (the_low_target): Ditto.
708 * linux-tile-low.cc (the_low_target): Ditto.
709 * linux-xtensa-low.cc (the_low_target): Ditto.
710
711 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
712
713 Turn the 'get_thread_area' linux target op into a method of
714 process_stratum_target.
715
716 * linux-low.h (struct linux_target_ops): Remove the op.
717 (class linux_process_target) <stuck_in_jump_pad>
718 <linux_fast_tracepoint_collecting>
719 <low_get_thread_area>: Declare.
720 * linux-low.cc (supports_fast_tracepoints): Remove.
721 (linux_fast_tracepoint_collecting): Turn into...
722 (linux_process_target::linux_fast_tracepoint_collecting): ...this.
723 (linux_process_target::low_get_thread_area): Define.
724 (stuck_in_jump_pad_callback): Turn into...
725 (linux_process_target::stuck_in_jump_pad): ...this.
726
727 Update the caller below.
728
729 (linux_process_target::stabilize_threads)
730
731 * linux-x86-low.cc (class x86_target) <low_get_thread_area>:
732 Declare.
733 (x86_get_thread_area): Turn into...
734 (x86_target::low_get_thread_area): ...this.
735 (the_low_target): Remove the op field.
736 * linux-aarch64-low.cc (class aarch64_target) <low_get_thread_area>:
737 Declare.
738 (aarch64_get_thread_area): Turn into...
739 (aarch64_target::low_get_thread_area): ...this.
740 (the_low_target): Remove the op field.
741 * linux-ppc-low.cc (class ppc_target) <low_get_thread_area>:
742 Declare.
743 (ppc_get_thread_area): Turn into...
744 (ppc_target::low_get_thread_area): ...this.
745 (the_low_target): Remove the op field.
746 * linux-s390-low.cc (class s390_target) <low_get_thread_area>:
747 Declare.
748 (s390_get_thread_area): Turn into...
749 (s390_target::low_get_thread_area): ...this.
750 (the_low_target): Remove the op field.
751 * linux-arm-low.cc (the_low_target): Remove the op field.
752 * linux-bfin-low.cc (the_low_target): Ditto.
753 * linux-crisv32-low.cc (the_low_target): Ditto.
754 * linux-m32r-low.cc (the_low_target): Ditto.
755 * linux-m68k-low.cc (the_low_target): Ditto.
756 * linux-sh-low.cc (the_low_target): Ditto.
757 * linux-tic6x-low.cc (the_low_target): Ditto.
758 * linux-tile-low.cc (the_low_target): Ditto.
759 * linux-xtensa-low.cc (the_low_target): Ditto.
760
761 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
762
763 Remote the 'supports_tracepoints' linux target op and let the
764 concrete linux target define it by overriding the op declared in
765 process_stratum_target.
766
767 * linux-low.h (struct linux_target_ops): Remove the op.
768 (class linux_process_target) <supports_tracepoints>: Remove.
769 * linux-low.cc (linux_process_target::supports_tracepoints): Remove.
770 * linux-x86-low.cc (class x86_target) <supports_tracepoints>:
771 Declare.
772 (x86_supports_tracepoints): Turn into...
773 (x86_target::supports_tracepoints): ...this.
774 (the_low_target): Remove the op field.
775 * linux-aarch64-low.cc (class aarch64_target)
776 <supports_tracepoints>: Declare.
777 (aarch64_supports_tracepoints): Turn into...
778 (aarch64_target::supports_tracepoints): ...this.
779 (the_low_target): Remove the op field.
780 * linux-ppc-low.cc (class ppc_target) <supports_tracepoints>:
781 Declare.
782 (ppc_supports_tracepoints): Turn into...
783 (ppc_target::supports_tracepoints): ...this.
784 (the_low_target): Remove the op field.
785 * linux-s390-low.cc (class s390_target) <supports_tracepoints>:
786 Declare.
787 (s390_supports_tracepoints): Turn into...
788 (s390_target::supports_tracepoints): ...this.
789 (the_low_target): Remove the op field.
790 * linux-arm-low.cc (the_low_target): Remove the op field.
791 * linux-bfin-low.cc (the_low_target): Ditto.
792 * linux-crisv32-low.cc (the_low_target): Ditto.
793 * linux-m32r-low.cc (the_low_target): Ditto.
794 * linux-m68k-low.cc (the_low_target): Ditto.
795 * linux-sh-low.cc (the_low_target): Ditto.
796 * linux-tic6x-low.cc (the_low_target): Ditto.
797 * linux-tile-low.cc (the_low_target): Ditto.
798 * linux-xtensa-low.cc (the_low_target): Ditto.
799
800 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
801
802 Remove the 'process_qsupported' linux target op and let a concrete
803 linux target define the op by overriding the op declaration in
804 process_stratum_target.
805
806 * linux-low.h (struct linux_target_ops): Remove the op.
807 (class linux_process_target) <process_qsupported>: Remove.
808 * linux-low.cc (linux_process_target::process_qsupported): Remove.
809 * linux-x86-low.cc (class x86_target) <process_qsupported>: Declare.
810 (x86_linux_process_qsupported): Turn into...
811 (x86_target::process_qsupported): ...this.
812 (the_low_target): Remove the op field.
813 * linux-aarch64-low.cc (the_low_target): Remove the op
814 field.
815 * linux-arm-low.cc (the_low_target): Ditto.
816 * linux-bfin-low.cc (the_low_target): Ditto.
817 * linux-crisv32-low.cc (the_low_target): Ditto.
818 * linux-m32r-low.cc (the_low_target): Ditto.
819 * linux-m68k-low.cc (the_low_target): Ditto.
820 * linux-ppc-low.cc (the_low_target): Ditto.
821 * linux-s390-low.cc (the_low_target): Ditto.
822 * linux-sh-low.cc (the_low_target): Ditto.
823 * linux-tic6x-low.cc (the_low_target): Ditto.
824 * linux-tile-low.cc (the_low_target): Ditto.
825 * linux-xtensa-low.cc (the_low_target): Ditto.
826
827 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
828
829 Turn the 'prepare_to_resume' linux target op into a method of
830 linux_process_target.
831
832 * linux-low.h (struct linux_target_ops): Remove the op.
833 (class linux_process_target) <low_prepare_to_resume>: Declare.
834 * linux-low.cc (linux_process_target::low_prepare_to_resume):
835 Define.
836
837 Update the callers below:
838
839 (linux_process_target::resume_one_lwp_throw)
840 (linux_process_target::low_prepare_to_resume)
841
842 * linux-x86-low.cc (class x86_target) <low_prepare_to_resume>:
843 Declare.
844 (x86_target::low_prepare_to_resume): Define.
845 (the_low_target): Remove the op field.
846 * linux-aarch64-low.cc (class aarch64_target)
847 <low_prepare_to_resume>: Declare.
848 (aarch64_target::low_prepare_to_resume): Define.
849 (the_low_target): Remove the op field.
850 * linux-arm-low.cc (class arm_target) <low_prepare_to_resume>:
851 Declare.
852 (arm_prepare_to_resume): Turn into...
853 (arm_target::low_prepare_to_resume): ...this.
854 (the_low_target): Remove the op field.
855 * linux-mips-low.cc (class mips_target) <low_prepare_to_resume>:
856 Declare.
857 (mips_linux_prepare_to_resume): Turn into...
858 (mips_target::low_prepare_to_resume): ...this.
859 (the_low_target): Remove the op field.
860 * linux-bfin-low.cc (the_low_target): Remove the op field.
861 * linux-crisv32-low.cc (the_low_target): Ditto.
862 * linux-m32r-low.cc (the_low_target): Ditto.
863 * linux-m68k-low.cc (the_low_target): Ditto.
864 * linux-ppc-low.cc (the_low_target): Ditto.
865 * linux-s390-low.cc (the_low_target): Ditto.
866 * linux-sh-low.cc (the_low_target): Ditto.
867 * linux-tic6x-low.cc (the_low_target): Ditto.
868 * linux-tile-low.cc (the_low_target): Ditto.
869 * linux-xtensa-low.cc (the_low_target): Ditto.
870
871 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
872
873 Turn the 'new_process', 'delete_process', 'new_thread',
874 'delete_thread', and 'new_fork' linux target ops into methods
875 of linux_process_target.
876
877 * linux-low.h (struct linux_target_ops): Remove the ops.
878 (class linux_process_target) <add_linux_process>
879 <add_lwp>
880 <delete_lwp>
881 <attach_lwp>
882 <detach_one_lwp>
883 <check_zombie_leaders>
884 <filter_exit_event>
885 <low_new_process>
886 <low_delete_process>
887 <low_new_thread>
888 <low_delete_thread>
889 <low_new_fork>: Declare.
890 * linux-low.cc (delete_lwp): Turn into...
891 (linux_process_target::delete_lwp): ...this.
892 (linux_process_target::low_delete_thread): Define.
893 (linux_add_process): Turn into...
894 (linux_process_target::add_linux_process): ...this.
895 (linux_process_target::low_new_process): Define.
896 (linux_process_target::low_delete_process): Define.
897 (linux_process_target::low_new_fork): Define.
898 (add_lwp): Turn into...
899 (linux_process_target::add_lwp): ...this.
900 (linux_process_target::low_new_thread): Define.
901 (linux_attach_lwp): Turn into...
902 (linux_process_target::attach_lwp): ...this.
903 (linux_detach_one_lwp): Turn into...
904 (linux_process_target::detach_one_lwp): ...this.
905 (linux_detach_lwp_callback): Remove and inline...
906 (linux_process_target::detach): ...here.
907 (check_zombie_leaders): Turn into...
908 (linux_process_target::check_zombie_leaders): ...this.
909 (filter_exit_event): Turn into...
910 (linux_process_target::filter_exit_event): ...this.
911
912 Update the callers below.
913
914 (linux_process_target::handle_extended_wait)
915 (linux_process_target::create_inferior)
916 (attach_proc_task_lwp_callback)
917 (linux_process_target::attach)
918 (linux_process_target::detach)
919 (linux_process_target::mourn)
920 * thread-db.cc (attach_thread)
921
922 * linux-x86-low.cc (class x86_target) <low_new_process>
923 <low_delete_process>
924 <low_new_thread>
925 <low_delete_thread>
926 <low_new_fork>: Declare.
927 (x86_linux_new_process): Turn into...
928 (x86_target::low_new_process): ...this.
929 (x86_linux_delete_process): Turn into...
930 (x86_target::low_delete_process): ...this.
931 (x86_target::low_new_thread): Define.
932 (x86_target::low_delete_thread): Define.
933 (x86_linux_new_fork): Turn into...
934 (x86_target::low_new_fork): ...this.
935 (the_low_target): Remove the op fields.
936 * linux-aarch64-low.cc (class aarch64_target) <low_new_process>
937 <low_delete_process>
938 <low_new_thread>
939 <low_delete_thread>
940 <low_new_fork>: Declare.
941 (aarch64_linux_new_process): Turn into...
942 (aarch64_target::low_new_process): ...this.
943 (aarch64_linux_delete_process): Turn into...
944 (aarch64_target::low_delete_process): ...this.
945 (aarch64_target::low_new_thread): Define.
946 (aarch64_target::low_delete_thread): Define.
947 (aarch64_linux_new_fork): Turn into...
948 (aarch64_target::low_new_fork): ...this.
949 (the_low_target): Remove the op fields.
950 * linux-arm-low.cc (class arm_target) <low_new_process>
951 <low_delete_process>
952 <low_new_thread>
953 <low_delete_thread>
954 <low_new_fork>: Declare.
955 (arm_new_process): Turn into...
956 (arm_target::low_new_process): ...this.
957 (arm_delete_process): Turn into...
958 (arm_target::low_delete_process): ...this.
959 (arm_new_thread): Turn into...
960 (arm_target::low_new_thread): ...this.
961 (arm_delete_thread): Turn into...
962 (arm_target::low_delete_thread): ...this.
963 (arm_new_fork): Turn into...
964 (arm_target::low_new_fork): ...this.
965 (the_low_target): Remove the op fields.
966 * linux-mips-low.cc (class mips_target) <low_new_process>
967 <low_delete_process>
968 <low_new_thread>
969 <low_delete_thread>
970 <low_new_fork>: Declare.
971 (mips_linux_new_process): Turn into...
972 (mips_target::low_new_process): ...this.
973 (mips_linux_delete_process): Turn into...
974 (mips_target::low_delete_process): ...this.
975 (mips_linux_new_thread): Turn into...
976 (mips_target::low_new_thread): ...this.
977 (mips_linux_delete_thread): Turn into...
978 (mips_target::low_delete_thread): ...this.
979 (mips_linux_new_fork): Turn into...
980 (mips_target::low_new_fork): ...this.
981 (the_low_target): Remove the op fields.
982 * linux-bfin-low.cc (the_low_target): Remove the op fields.
983 * linux-crisv32-low.cc (the_low_target): Ditto.
984 * linux-m32r-low.cc (the_low_target): Ditto.
985 * linux-m68k-low.cc (the_low_target): Ditto.
986 * linux-ppc-low.cc (the_low_target): Ditto.
987 * linux-s390-low.cc (the_low_target): Ditto.
988 * linux-sh-low.cc (the_low_target): Ditto.
989 * linux-tic6x-low.cc (the_low_target): Ditto.
990 * linux-tile-low.cc (the_low_target): Ditto.
991 * linux-xtensa-low.cc (the_low_target): Ditto.
992
993 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
994
995 Turn the 'siginfo_fixup' linux target op into a method of
996 linux_process_target.
997
998 * linux-low.h (struct linux_target_ops): Remove the op.
999 (class linux_process_target) <siginfo_fixup>
1000 <low_siginfo_fixup>: Declare.
1001 * linux-low.cc (siginfo_fixup): Turn into...
1002 (linux_process_target::siginfo_fixup): ...this.
1003 (linux_process_target::low_siginfo_fixup): Define.
1004 * linux-x86-low.cc (class x86_target) <low_siginfo_fixup>: Declare.
1005 (x86_siginfo_fixup): Turn into...
1006 (x86_target::low_siginfo_fixup): ...this.
1007 (the_low_target): Remove the op field.
1008 * linux-aarch64-low.cc (class aarch64_target):
1009 <low_siginfo_fixup>: Declare.
1010 (aarch64_linux_siginfo_fixup): Turn into...
1011 (aarch64_target::low_siginfo_fixup): ...this.
1012 (the_low_target): Remove the op field.
1013 * linux-arm-low.cc (the_low_target): Remove the op field.
1014 * linux-bfin-low.cc (the_low_target): Ditto.
1015 * linux-crisv32-low.cc (the_low_target): Ditto.
1016 * linux-m32r-low.cc (the_low_target): Ditto.
1017 * linux-m68k-low.cc (the_low_target): Ditto.
1018 * linux-mips-low.cc (the_low_target): Ditto.
1019 * linux-ppc-low.cc (the_low_target): Ditto.
1020 * linux-s390-low.cc (the_low_target): Ditto.
1021 * linux-sh-low.cc (the_low_target): Ditto.
1022 * linux-tic6x-low.cc (the_low_target): Ditto.
1023 * linux-tile-low.cc (the_low_target): Ditto.
1024 * linux-xtensa-low.cc (the_low_target): Ditto.
1025
1026 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1027
1028 Turn the 'collect_ptrace_register' and 'supply_ptrace_register'
1029 linux target ops into methods of linux_process_target.
1030
1031 * linux-low.h (struct linux_target_ops): Remove the ops.
1032 (class linux_process_target) <low_collect_ptrace_register>
1033 <low_store_ptrace_register>: Declare.
1034 * linux-low.cc (linux_process_target::low_collect_ptrace_register)
1035 (linux_process_target::low_supply_ptrace_register): Define.
1036
1037 Update the callers below.
1038
1039 (linux_process_target::fetch_register)
1040 (linux_process_target::store_register)
1041
1042 * linux-x86-low.cc (the_low_target): Remove the op fields.
1043 * linux-aarch64-low.cc (the_low_target): Ditto.
1044 * linux-arm-low.cc (the_low_target): Ditto.
1045 * linux-bfin-low.cc (the_low_target): Ditto.
1046 * linux-crisv32-low.cc (the_low_target): Ditto.
1047 * linux-m32r-low.cc (the_low_target): Ditto.
1048 * linux-m68k-low.cc (the_low_target): Ditto.
1049 * linux-sh-low.cc (the_low_target): Ditto.
1050 * linux-sparc-low.cc (the_low_target): Ditto.
1051 * linux-tic6x-low.cc (the_low_target): Ditto.
1052 * linux-tile-low.cc (the_low_target): Ditto.
1053 * linux-xtensa-low.cc (the_low_target): Ditto.
1054 * linux-mips-low.cc (class mips_target)
1055 <low_collect_ptrace_register>
1056 <low_supply_ptrace_register>: Declare.
1057 (mips_collect_ptrace_register): Turn into ...
1058 (mips_target::low_collect_ptrace_register): ...this.
1059 (mips_supply_ptrace_register): Turn into...
1060 (mips_target::low_supply_ptrace_register): ...this.
1061 (the_low_target): Remove the op fields.
1062 * linux-ppc-low.cc (class ppc_target)
1063 <low_collect_ptrace_register>
1064 <low_supply_ptrace_register>: Declare.
1065 (ppc_collect_ptrace_register): Turn into ...
1066 (ppc_target::low_collect_ptrace_register): ...this.
1067 (ppc_supply_ptrace_register): Turn into ...
1068 (ppc_target::low_supply_ptrace_register): ...this.
1069 (ppc_fill_gregset): Update for the calls to
1070 low_collect_ptrace_register.
1071 (the_low_target): Remove the op fields.
1072 * linux-s390-low.cc (class s390_target)
1073 <low_collect_ptrace_register>
1074 <low_supply_ptrace_register>: Declare.
1075 (s390_collect_ptrace_register): Turn into ...
1076 (s390_target::low_collect_ptrace_register): ...this.
1077 (s390_supply_ptrace_register): Turn into ...
1078 (s390_target::low_supply_ptrace_register): ...this.
1079 (s390_fill_gregset): Update for the calls to
1080 low_collect_ptrace_register.
1081 (the_low_target): Remove the op fields.
1082
1083 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1084
1085 Turn the 'stopped_by_watchpoint' and 'stopped_data_address' linux
1086 target ops into methods of linux_process_target.
1087
1088 * linux-low.h (struct linux_target_ops): Remove the ops.
1089 (class linux_process_target) <check_stopped_by_watchpoint>
1090 <low_stopped_by_watchpoint>
1091 <low_stopped_data_address>: Declare.
1092 * linux-low.cc (check_stopped_by_watchpoint): Turn into...
1093 (linux_process_target::check_stopped_by_watchpoint): ...this.
1094 (linux_process_target::low_stopped_by_watchpoint): Define.
1095 (linux_process_target::low_stopped_data_address): Define.
1096 * linux-x86-low.cc (class x86_target) <low_stopped_by_watchpoint>
1097 <low_stopped_data_address>: Declare.
1098 (x86_stopped_by_watchpoint): Turn into...
1099 (x86_target::low_stopped_by_watchpoint): ...this.
1100 (x86_stopped_data_address): Turn into...
1101 (x86_target::low_stopped_data_address): ...this.
1102 (the_low_target): Remove the op fields.
1103 * linux-aarch64-low.cc (class aarch64_target)
1104 <low_stopped_by_watchpoint>
1105 <low_stopped_data_address>: Declare.
1106 (aarch64_stopped_by_watchpoint): Turn into...
1107 (aarch64_target::low_stopped_by_watchpoint): ...this.
1108 (aarch64_stopped_data_address): Turn into...
1109 (aarch64_target::low_stopped_data_address): ...this.
1110 (the_low_target): Remove the op fields.
1111 * linux-arm-low.cc (class arm_target) <low_stopped_by_watchpoint>
1112 <low_stopped_data_address>: Declare.
1113 (arm_stopped_by_watchpoint): Turn into...
1114 (arm_target::low_stopped_by_watchpoint): ...this.
1115 (arm_stopped_data_address): Turn into...
1116 (arm_target::low_stopped_data_address): ...this.
1117 (the_low_target): Remove the op fields.
1118 * linux-crisv32-low.cc (class crisv32_target)
1119 <low_stopped_by_watchpoint>
1120 <low_stopped_data_address>: Declare.
1121 (cris_stopped_by_watchpoint): Turn into...
1122 (crisv32_target::low_stopped_by_watchpoint): ...this.
1123 (cris_stopped_data_address): Turn into...
1124 (crisv32_target::low_stopped_data_address): ...this.
1125 (the_low_target): Remove the op fields.
1126 * linux-mips-low.cc (class mips_target) <low_stopped_by_watchpoint>
1127 <low_stopped_data_address>: Declare.
1128 (mips_stopped_by_watchpoint): Turn into...
1129 (mips_target::low_stopped_by_watchpoint): ...this.
1130 (mips_stopped_data_address): Turn into...
1131 (mips_target::low_stopped_data_address): ...this.
1132 (the_low_target): Remove the op fields.
1133 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1134 * linux-m32r-low.cc (the_low_target): Ditto.
1135 * linux-m68k-low.cc (the_low_target): Ditto.
1136 * linux-ppc-low.cc (the_low_target): Ditto.
1137 * linux-s390-low.cc (the_low_target): Ditto.
1138 * linux-sh-low.cc (the_low_target): Ditto.
1139 * linux-sparc-low.cc (the_low_target): Ditto.
1140 * linux-tic6x-low.cc (the_low_target): Ditto.
1141 * linux-tile-low.cc (the_low_target): Ditto.
1142 * linux-xtensa-low.cc (the_low_target): Ditto.
1143
1144 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1145
1146 Turn the 'insert_point' and 'remove_point' linux target ops into
1147 methods of linux_process_target.
1148
1149 * linux-low.h (struct linux_target_ops): Remove the ops.
1150 (class linux_process_target) <low_insert_point>
1151 <low_remove_point>: Declare.
1152 * linux-low.cc (linux_process_target::low_insert_point)
1153 (linux_process_target::low_remove_point): Define.
1154 (linux_process_target::insert_point)
1155 (linux_process_target::remove_point): Update for calls to
1156 low_insert_point and low_remove_point.
1157 * linux-x86-low.cc (class x86_target) <low_insert_point>
1158 <low_remove_point>: Declare.
1159 (x86_insert_point): Turn into...
1160 (x86_target::low_insert_point): ...this.
1161 (x86_remove_point): Turn into...
1162 (x86_target::low_remove_point): ...this.
1163 (the_low_target): Remove the op fields.
1164 * linux-aarch64-low.cc (class aarch64_target) <low_insert_point>
1165 <low_remove_point>: Declare.
1166 (aarch64_insert_point): Turn into...
1167 (aarch64_target::low_insert_point): ...this.
1168 (aarch64_remove_point): Turn into...
1169 (aarch64_target::low_remove_point): ...this.
1170 (the_low_target): Remove the op fields.
1171 * linux-arm-low.cc (class arm_target) <low_insert_point>
1172 <low_remove_point>: Declare.
1173 (arm_insert_point): Turn into...
1174 (arm_target::low_insert_point): ...this.
1175 (arm_remove_point): Turn into...
1176 (arm_target::low_remove_point): ...this.
1177 (the_low_target): Remove the op fields.
1178 * linux-crisv32-low.cc (class crisv32_target) <low_insert_point>
1179 <low_remove_point>: Declare.
1180 (crisv32_insert_point): Turn into...
1181 (crisv32_target::low_insert_point): ...this.
1182 (crisv32_remove_point): Turn into...
1183 (crisv32_target::low_remove_point): ...this.
1184 (the_low_target): Remove the op fields.
1185 * linux-mips-low.cc (class mips_target) <low_insert_point>
1186 <low_remove_point>: Declare.
1187 (mips_insert_point): Turn into...
1188 (mips_target::low_insert_point): ...this.
1189 (mips_remove_point): Turn into...
1190 (mips_target::low_remove_point): ...this.
1191 (the_low_target): Remove the op fields.
1192 * linux-ppc-low.cc (class ppc_target) <low_insert_point>
1193 <low_remove_point>: Declare.
1194 (ppc_insert_point): Turn into...
1195 (ppc_target::low_insert_point): ...this.
1196 (ppc_remove_point): Turn into...
1197 (ppc_target::low_remove_point): ...this.
1198 (the_low_target): Remove the op fields.
1199 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1200 * linux-m32r-low.cc (the_low_target): Ditto.
1201 * linux-m68k-low.cc (the_low_target): Ditto.
1202 * linux-s390-low.cc (the_low_target): Ditto.
1203 * linux-sh-low.cc (the_low_target): Ditto.
1204 * linux-sparc-low.cc (the_low_target): Ditto.
1205 * linux-tic6x-low.cc (the_low_target): Ditto.
1206 * linux-tile-low.cc (the_low_target): Ditto.
1207 * linux-xtensa-low.cc (the_low_target): Ditto.
1208
1209 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1210
1211 Remove the 'supports_z_point_type' linux target op and let the
1212 concrete linux target define it by overriding the op declared in
1213 process_stratum_target.
1214
1215 * linux-low.cc (linux_process_target::supports_z_point_type):
1216 Remove.
1217 * linux-low.h (struct linux_target_ops): Remove the op.
1218 (class linux_process_target) <supports_z_point_type>: Remove.
1219 * linux-x86-low.cc (class x86_target) <supports_z_point_type>:
1220 Declare.
1221 (x86_supports_z_point_type): Turn into...
1222 (x86_target::supports_z_point_type): ...this.
1223 (the_low_target): Remove the op field.
1224 * linux-aarch64-low.cc (class aarch64_target)
1225 <supports_z_point_type>: Declare.
1226 (aarch64_supports_z_point_type): Turn into...
1227 (aarch64_target::supports_z_point_type): ...this.
1228 (the_low_target): Remove the op field.
1229 * linux-arm-low.cc (class arm_target) <supports_z_point_type>:
1230 Declare.
1231 (arm_supports_z_point_type): Turn into...
1232 (arm_target::supports_z_point_type): ...this.
1233 (the_low_target): Remove the op field.
1234 * linux-crisv32-low.cc (class crisv32_target)
1235 <supports_z_point_type>: Declare.
1236 (cris_supports_z_point_type): Turn into...
1237 (crisv32_target::supports_z_point_type): ...this.
1238 (the_low_target): Remove the op field.
1239 * linux-mips-low.cc (class mips_target) <supports_z_point_type>:
1240 Declare.
1241 (mips_supports_z_point_type): Turn into...
1242 (mips_target::supports_z_point_type): ...this.
1243 (the_low_target): Remove the op field.
1244 * linux-ppc-low.cc (class ppc_target) <supports_z_point_type>:
1245 Declare.
1246 (ppc_supports_z_point_type): Turn into...
1247 (ppc_target::supports_z_point_type): ...this.
1248 (the_low_target): Remove the op field.
1249 * linux-s390-low.cc (class s390_target) <supports_z_point_type>:
1250 Declare.
1251 (s390_supports_z_point_type): Turn into...
1252 (s390_target::supports_z_point_type): ...this.
1253 (the_low_target): Remove the op field.
1254 * linux-bfin-low.cc (the_low_target): Remove the op field.
1255 * linux-m32r-low.cc (the_low_target): Ditto.
1256 * linux-m68k-low.cc (the_low_target): Ditto.
1257 * linux-sh-low.cc (the_low_target): Ditto.
1258 * linux-sparc-low.cc (the_low_target): Ditto.
1259 * linux-tic6x-low.cc (the_low_target): Ditto.
1260 * linux-tile-low.cc (the_low_target): Ditto.
1261 * linux-xtensa-low.cc (the_low_target): Ditto.
1262
1263 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1264
1265 Turn the 'breakpoint_at' linux target op into a method of
1266 linux_process_target.
1267
1268 * linux-low.h (struct linux_target_ops): Remove the op.
1269 (class linux_process_target) <low_breakpoint_at>: Declare.
1270
1271 Update the callers below:
1272
1273 * linux-low.cc (linux_process_target::save_stop_reason)
1274 (linux_process_target::thread_still_has_status_pending)
1275 (linux_process_target::wait_1)
1276
1277 * linux-x86-low.cc (class x86_target)
1278 <low_breakpoint_at>: Declare.
1279 (x86_breakpoint_at): Turn into...
1280 (x86_target::low_breakpoint_at): ...this.
1281 (the_low_target): Remove the op field.
1282 * linux-aarch64-low.cc (class aarch64_target)
1283 <low_breakpoint_at>: Declare.
1284 (aarch64_breakpoint_at): Turn into...
1285 (aarch64_target::low_breakpoint_at): ...this.
1286 (the_low_target): Remove the op field.
1287 * linux-arm-low.cc (class arm_target)
1288 <low_breakpoint_at>: Declare.
1289 (arm_target::low_breakpoint_at): Define.
1290 (the_low_target): Remove the op field.
1291 * linux-bfin-low.cc (class bfin_target)
1292 <low_breakpoint_at>: Declare.
1293 (bfin_breakpoint_at): Turn into...
1294 (bfin_target::low_breakpoint_at): ...this.
1295 (the_low_target): Remove the op field.
1296 * linux-cris-low.cc (class cris_target)
1297 <low_breakpoint_at>: Declare.
1298 (cris_breakpoint_at): Turn into...
1299 (cris_target::low_breakpoint_at): ...this.
1300 (the_low_target): Remove the op field.
1301 * linux-crisv32-low.cc (class crisv32_target)
1302 <low_breakpoint_at>: Declare.
1303 (crisv32_breakpoint_at): Turn into...
1304 (crisv32_target::low_breakpoint_at): ...this.
1305 (the_low_target): Remove the op field.
1306 * linux-ia64-low.cc (class ia64_target)
1307 <low_breakpoint_at>: Declare.
1308 (ia64_target::low_breakpoint_at): Define.
1309 * linux-m32r-low.cc (class m32r_target)
1310 <low_breakpoint_at>: Declare.
1311 (m32r_breakpoint_at): Turn into...
1312 (m32r_target::low_breakpoint_at): ...this.
1313 (the_low_target): Remove the op field.
1314 * linux-m68k-low.cc (class m68k_target)
1315 <low_breakpoint_at>: Declare.
1316 (m68k_breakpoint_at): Turn into...
1317 (m68k_target::low_breakpoint_at): ...this.
1318 (the_low_target): Remove the op field.
1319 * linux-mips-low.cc (class mips_target)
1320 <low_breakpoint_at>: Declare.
1321 (mips_breakpoint_at): Turn into...
1322 (mips_target::low_breakpoint_at): ...this.
1323 (the_low_target): Remove the op field.
1324 * linux-nios2-low.cc (class nios2_target)
1325 <low_breakpoint_at>: Declare.
1326 (nios2_breakpoint_at): Turn into...
1327 (nios2_target::low_breakpoint_at): ...this.
1328 (the_low_target): Remove the op field.
1329 * linux-ppc-low.cc (class ppc_target)
1330 <low_breakpoint_at>: Declare.
1331 (ppc_breakpoint_at): Turn into...
1332 (ppc_target::low_breakpoint_at): ...this.
1333 (the_low_target): Remove the op field.
1334 * linux-riscv-low.cc (class riscv_target)
1335 <low_breakpoint_at>: Declare.
1336 (riscv_breakpoint_at): Turn into...
1337 (riscv_target::low_breakpoint_at): ...this.
1338 (the_low_target): Remove the op field.
1339 * linux-s390-low.cc (class s390_target)
1340 <low_breakpoint_at>: Declare.
1341 (s390_breakpoint_at): Turn into...
1342 (s390_target::low_breakpoint_at): ...this.
1343 (the_low_target): Remove the op field.
1344 * linux-sh-low.cc (class sh_target)
1345 <low_breakpoint_at>: Declare.
1346 (sh_breakpoint_at): Turn into...
1347 (sh_target::low_breakpoint_at): ...this.
1348 (the_low_target): Remove the op field.
1349 * linux-sparc-low.cc (class sparc_target)
1350 <low_breakpoint_at>: Declare.
1351 (sparc_breakpoint_at): Turn into...
1352 (sparc_target::low_breakpoint_at): ...this.
1353 (the_low_target): Remove the op field.
1354 * linux-tic6x-low.cc (class tic6x_target)
1355 <low_breakpoint_at>: Declare.
1356 (tic6x_breakpoint_at): Turn into...
1357 (tic6x_target::low_breakpoint_at): ...this.
1358 (the_low_target): Remove the op field.
1359 * linux-tile-low.cc (class tile_target)
1360 <low_breakpoint_at>: Declare.
1361 (tile_breakpoint_at): Turn into...
1362 (tile_target::low_breakpoint_at): ...this.
1363 (the_low_target): Remove the op field.
1364 * linux-xtensa-low.cc (class xtensa_target)
1365 <low_breakpoint_at>: Declare.
1366 (xtensa_breakpoint_at): Turn into...
1367 (xtensa_target::low_breakpoint_at): ...this.
1368 (the_low_target): Remove the op field.
1369
1370 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1371
1372 Turn the 'decr_pc_after_break' linux_target_ops field into
1373 a method of linux_process_target.
1374
1375 * linux-low.h (struct linux_target_ops)
1376 <decr_pc_after_break>: Remove.
1377 (class linux_process_target) <low_decr_pc_after_break>: New method
1378 declaration.
1379 * linux-low.cc (linux_process_target::low_decr_pc_after_break):
1380 New method implementation.
1381
1382 Update the users below.
1383
1384 (linux_process_target::save_stop_reason)
1385 (linux_process_target::wait_1)
1386 * linux-x86-low.cc (class x86_target) <low_decr_pc_after_break>:
1387 New declaration.
1388 (x86_target::low_decr_pc_after_break): New method implementation.
1389 (the_low_target): Remove the field.
1390 * linux-bfin-low.cc (class bfin_target) <low_decr_pc_after_break>:
1391 New declaration.
1392 (bfin_target::low_decr_pc_after_break): New method implementation.
1393 (the_low_target): Remove the field.
1394 * linux-m68k-low.cc (class m68k_target) <low_decr_pc_after_break>:
1395 New declaration.
1396 (m68k_target::low_decr_pc_after_break): New method implementation.
1397 (the_low_target): Remove the field.
1398 * linux-s390-low.cc (class s390_target) <low_decr_pc_after_break>:
1399 New declaration.
1400 (s390_target::low_decr_pc_after_break): New method implementation.
1401 (the_low_target): Remove the field.
1402 * linux-aarch64-low.cc (the_low_target): Remove the field.
1403 * linux-arm-low.cc (the_low_target): Remove the field.
1404 * linux-cris-low.cc (the_low_target): Remove the field.
1405 * linux-crisv32-low.cc (the_low_target): Remove the field.
1406 * linux-m32r-low.cc (the_low_target): Remove the field.
1407 * linux-mips-low.cc (the_low_target): Remove the field.
1408 * linux-nios2-low.cc (the_low_target): Remove the field.
1409 * linux-ppc-low.cc (the_low_target): Remove the field.
1410 * linux-riscv-low.cc (the_low_target): Remove the field.
1411 * linux-sh-low.cc (the_low_target): Remove the field.
1412 * linux-sparc-low.cc (the_low_target): Remove the field.
1413 * linux-tic6x-low.cc (the_low_target): Remove the field.
1414 * linux-tile-low.cc (the_low_target): Remove the field.
1415 * linux-xtensa-low.cc (the_low_target): Remove the field.
1416
1417 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1418
1419 Remove the 'supports_software_single_step' linux target op and let
1420 the concrete linux target define it by overriding the op in
1421 process_stratum_target.
1422 Turn the 'get_next_pcs' linux target op into a method of
1423 linux_process_target.
1424
1425 * linux-low.h (struct linux_target_ops): Remove the ops.
1426 (class linux_process_target) <supports_software_single_step>:
1427 Remove.
1428 <low_get_next_pcs>: Declare.
1429 * linux-low.cc (can_software_single_step): Remove.
1430 (linux_process_target::low_get_next_pcs): Define.
1431 (linux_process_target::supports_software_single_step): Remove.
1432
1433 Update the callers below.
1434
1435 (linux_process_target::handle_extended_wait)
1436 (linux_process_target::wait_1)
1437 (linux_process_target::install_software_single_step_breakpoints)
1438 (linux_process_target::single_step)
1439 (linux_process_target::thread_needs_step_over)
1440 (linux_process_target::proceed_one_lwp)
1441 (linux_process_target::supports_range_stepping)
1442
1443 * linux-x86-low.cc (the_low_target): Remove the op field.
1444 * linux-aarch64-low.cc (the_low_target): Ditto.
1445 * linux-bfin-low.cc (the_low_target): Ditto.
1446 * linux-cris-low.cc (the_low_target): Ditto.
1447 * linux-crisv32-low.cc (the_low_target): Ditto.
1448 * linux-m32r-low.cc (the_low_target): Ditto.
1449 * linux-m68k-low.cc (the_low_target): Ditto.
1450 * linux-mips-low.cc (the_low_target): Ditto.
1451 * linux-nios2-low.cc (the_low_target): Ditto.
1452 * linux-ppc-low.cc (the_low_target): Ditto.
1453 * linux-riscv-low.cc (the_low_target): Ditto.
1454 * linux-s390-low.cc (the_low_target): Ditto.
1455 * linux-sh-low.cc (the_low_target): Ditto.
1456 * linux-sparc-low.cc (the_low_target): Ditto.
1457 * linux-tic6x-low.cc (the_low_target): Ditto.
1458 * linux-tile-low.cc (the_low_target): Ditto.
1459 * linux-xtensa-low.cc (the_low_target): Ditto.
1460 * linux-arm-low.cc (class arm_target) <low_get_next_pcs>
1461 <supports_software_single_step>: Declare.
1462 (arm_target::supports_software_single_step): Define.
1463 (arm_gdbserver_get_next_pcs): Turn into...
1464 (arm_target::low_get_next_pcs): ...this.
1465 (the_low_target): Remove the op field.
1466
1467 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1468
1469 Remove the 'sw_breakpoint_from_kind' linux target op, and let
1470 the concrete linux target define it by overriding the op
1471 in process_stratum_target.
1472
1473 * linux-low.cc (linux_process_target::sw_breakpoint_from_kind):
1474 Remove.
1475 * linux-low.h (struct linux_target_ops): Remove the op.
1476 (class linux_process_target) <sw_breakpoint_from_kind>: Remove.
1477 * linux-x86-low.cc (class x86_target) <sw_breakpoint_from_kind>:
1478 Declare.
1479 (x86_sw_breakpoint_from_kind): Turn into...
1480 (x86_target::sw_breakpoint_from_kind): ...this.
1481 (the_low_target): Remove the op field.
1482 * linux-aarch64-low.cc (class aarch64_target)
1483 <sw_breakpoint_from_kind>: Declare.
1484 (aarch64_sw_breakpoint_from_kind): Turn into...
1485 (aarch64_target::sw_breakpoint_from_kind): ...this.
1486 (the_low_target): Remove the op field.
1487 * linux-arm-low.cc (class arm_target) <sw_breakpoint_from_kind>:
1488 Declare.
1489 (arm_target::sw_breakpoint_from_kind): Define.
1490 (the_low_target): Remove the op field.
1491 * linux-bfin-low.cc (class bfin_target) <sw_breakpoint_from_kind>:
1492 Declare.
1493 (bfin_sw_breakpoint_from_kind): Turn into...
1494 (bfin_target::sw_breakpoint_from_kind): ...this.
1495 (the_low_target): Remove the op field.
1496 * linux-cris-low.cc (class cris_target) <sw_breakpoint_from_kind>:
1497 Declare.
1498 (cris_sw_breakpoint_from_kind): Turn into...
1499 (cris_target::sw_breakpoint_from_kind): ...this.
1500 (the_low_target): Remove the op field.
1501 * linux-crisv32-low.cc (class crisv32_target)
1502 <sw_breakpoint_from_kind>: Declare.
1503 (cris_sw_breakpoint_from_kind): Turn into...
1504 (crisv32_target::sw_breakpoint_from_kind): ...this.
1505 (the_low_target): Remove the op field.
1506 * linux-ia64-low.cc (class ia64_target) <sw_breakpoint_from_kind>:
1507 Declare.
1508 (ia64_target::sw_breakpoint_from_kind): Define.
1509 * linux-m32r-low.cc (class m32r_target) <sw_breakpoint_from_kind>:
1510 Declare.
1511 (m32r_sw_breakpoint_from_kind): Turn into...
1512 (m32r_target::sw_breakpoint_from_kind): ...this.
1513 (the_low_target): Remove the op field.
1514 * linux-m68k-low.cc (class m68k_target) <sw_breakpoint_from_kind>:
1515 Declare.
1516 (m68k_sw_breakpoint_from_kind): Turn into...
1517 (m68k_target::sw_breakpoint_from_kind): ...this.
1518 (the_low_target): Remove the op field.
1519 * linux-mips-low.cc (class mips_target) <sw_breakpoint_from_kind>:
1520 Declare.
1521 (mips_sw_breakpoint_from_kind): Turn into...
1522 (mips_target::sw_breakpoint_from_kind): ...this.
1523 (the_low_target): Remove the op field.
1524 * linux-nios2-low.cc (class nios2_target) <sw_breakpoint_from_kind>:
1525 Declare.
1526 (nios2_sw_breakpoint_from_kind): Turn into...
1527 (nios2_target::sw_breakpoint_from_kind): ...this.
1528 (the_low_target): Remove the op field.
1529 * linux-ppc-low.cc (class ppc_target) <sw_breakpoint_from_kind>:
1530 Declare.
1531 (ppc_sw_breakpoint_from_kind): Turn into...
1532 (ppc_target::sw_breakpoint_from_kind): ...this.
1533 (the_low_target): Remove the op field.
1534 * linux-riscv-low.cc (class riscv_target) <sw_breakpoint_from_kind>:
1535 Declare.
1536 (riscv_sw_breakpoint_from_kind): Turn into...
1537 (riscv_target::sw_breakpoint_from_kind): ...this.
1538 (the_low_target): Remove the op field.
1539 * linux-s390-low.cc (class s390_target) <sw_breakpoint_from_kind>:
1540 Declare.
1541 (s390_sw_breakpoint_from_kind): Turn into...
1542 (s390_target::sw_breakpoint_from_kind): ...this.
1543 (the_low_target): Remove the op field.
1544 * linux-sh-low.cc (class sh_target) <sw_breakpoint_from_kind>:
1545 Declare.
1546 (sh_sw_breakpoint_from_kind): Turn into...
1547 (sh_target::sw_breakpoint_from_kind): ...this.
1548 (the_low_target): Remove the op field.
1549 * linux-sparc-low.cc (class sparc_target) <sw_breakpoint_from_kind>:
1550 Declare.
1551 (sparc_sw_breakpoint_from_kind): Turn into...
1552 (sparc_target::sw_breakpoint_from_kind): ...this.
1553 (the_low_target): Remove the op field.
1554 * linux-tic6x-low.cc (class tic6x_target) <sw_breakpoint_from_kind>:
1555 Declare.
1556 (tic6x_sw_breakpoint_from_kind): Turn into...
1557 (tic6x_target::sw_breakpoint_from_kind): ...this.
1558 (the_low_target): Remove the op field.
1559 * linux-tile-low.cc (class tile_target) <sw_breakpoint_from_kind>:
1560 Declare.
1561 (tile_sw_breakpoint_from_kind): Turn into...
1562 (tile_target::sw_breakpoint_from_kind): ...this.
1563 (the_low_target): Remove the op field.
1564 * linux-xtensa-low.cc (class xtensa_target)
1565 <sw_breakpoint_from_kind>: Declare.
1566 (xtensa_sw_breakpoint_from_kind): Turn into...
1567 (xtensa_target::sw_breakpoint_from_kind): ...this.
1568 (the_low_target): Remove the op field.
1569
1570 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1571
1572 Remove the 'breakpoint_kind_from_pc' and
1573 'breakpoint_kind_from_current_state' linux target ops, and let the
1574 concrete linux target define them by overriding the ops of
1575 process_stratum_target.
1576
1577 * linux-low.cc (linux_process_target::breakpoint_kind_from_pc):
1578 Remove.
1579 (linux_process_target::breakpoint_kind_from_current_state): Remove.
1580 * linux-low.h (struct linux_target_ops): Remove ops.
1581 (class linux_process_target) <breakpoint_kind_from_pc>: Remove.
1582 <breakpoint_kind_from_current_state>: Remove.
1583 * linux-x86-low.cc (the_low_target): Remove the op fields.
1584 * linux-bfin-low.cc (the_low_target): Ditto.
1585 * linux-cris-low.cc (the_low_target): Ditto.
1586 * linux-crisv32-low.cc (the_low_target): Ditto.
1587 * linux-m32r-low.cc (the_low_target): Ditto.
1588 * linux-m68k-low.cc (the_low_target): Ditto.
1589 * linux-mips-low.cc (the_low_target): Ditto.
1590 * linux-nios2-low.cc (the_low_target): Ditto.
1591 * linux-ppc-low.cc (the_low_target): Ditto.
1592 * linux-s390-low.cc (the_low_target): Ditto.
1593 * linux-sh-low.cc (the_low_target): Ditto.
1594 * linux-sparc-low.cc (the_low_target): Ditto.
1595 * linux-tic6x-low.cc (the_low_target): Ditto.
1596 * linux-tile-low.cc (the_low_target): Ditto.
1597 * linux-xtensa-low.cc (the_low_target): Ditto.
1598 * linux-aarch64-low.cc (class aarch64_target)
1599 <breakpoint_kind_from_pc>
1600 <breakpoint_kind_from_current_state>: Declare.
1601 (aarch64_breakpoint_kind_from_pc): Turn into...
1602 (aarch64_target::breakpoint_kind_from_pc): ...this.
1603 (aarch64_breakpoint_kind_from_current_state): Turn into...
1604 (aarch64_target::breakpoint_kind_from_current_state): ...this.
1605 (the_low_target): Remove the op fields.
1606 * linux-arm-low.cc (class arm_target):
1607 <breakpoint_kind_from_pc>
1608 <breakpoint_kind_from_current_state>: Declare.
1609 (arm_target::breakpoint_kind_from_pc): Define.
1610 (arm_target::breakpoint_kind_from_current_state): Define.
1611 (the_low_target): Remove the op fields.
1612 * linux-riscv-low.cc (class riscv_target):
1613 <breakpoint_kind_from_pc>: Declare.
1614 (riscv_breakpoint_kind_from_pc): Turn into...
1615 (riscv_target::breakpoint_kind_from_pc): ...this.
1616 (the_low_target): Remove the op fields.
1617
1618 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1619
1620 Turn the 'get_pc' and 'set_pc' linux target ops into methods
1621 of linux_process_target.
1622
1623 * linux-low.h (struct linux_target_ops): Remove the ops.
1624 (class linux_process_target) <low_supports_breakpoints>
1625 <low_get_pc>
1626 <low_set_pc>: Declare.
1627 * linux-low.cc (supports_breakpoints): Turn into...
1628 (linux_process_target::low_supports_breakpoints): ...this.
1629 (linux_process_target::low_get_pc): Define.
1630 (linux_process_target::low_set_pc): Define.
1631
1632 Update the callers below.
1633
1634 (linux_process_target::get_pc)
1635 (linux_process_target::save_stop_reason)
1636 (linux_process_target::maybe_move_out_of_jump_pad)
1637 (linux_process_target::wait_1)
1638 (linux_process_target::resume_one_lwp_throw)
1639 (linux_process_target::resume)
1640 (linux_process_target::proceed_all_lwps)
1641 (linux_process_target::read_pc)
1642 (linux_process_target::write_pc)
1643
1644 * linux-x86-low.cc (class linux_process_target)
1645 <low_supports_breakpoints>
1646 <low_get_pc>
1647 <low_set_pc>: Declare.
1648 (x86_target::low_supports_breakpoints): Define.
1649 (x86_get_pc): Turn into...
1650 (x86_target::low_get_pc): ...this.
1651 (x86_set_pc): Turn into...
1652 (x86_target::low_set_pc): ...this.
1653 (the_low_target): Remove the op fields.
1654 * linux-arm-low.cc (class arm_target)
1655 <low_supports_breakpoints>
1656 <low_get_pc>
1657 <low_set_pc>: Declare.
1658 (arm_target::low_supports_breakpoints)
1659 (arm_target::low_get_pc)
1660 (arm_target::low_set_pc): Define.
1661 (the_low_target): Remove the op fields.
1662 * linux-bfin-low.cc (class bfin_target)
1663 <low_supports_breakpoints>
1664 <low_get_pc>
1665 <low_set_pc>: Declare.
1666 (bfin_target::low_supports_breakpoints)
1667 (bfin_target::low_get_pc)
1668 (bfin_target::low_set_pc): Define.
1669 (the_low_target): Remove the op fields.
1670 * linux-cris-low.cc (class cris_target)
1671 <low_supports_breakpoints>
1672 <low_get_pc>
1673 <low_set_pc>: Declare.
1674 (cris_target::low_supports_breakpoints)
1675 (cris_target::low_get_pc)
1676 (cris_target::low_set_pc): Define.
1677 (the_low_target): Remove the op fields.
1678 * linux-crisv32-low.cc (class crisv32_target)
1679 <low_supports_breakpoints>
1680 <low_get_pc>
1681 <low_set_pc>: Declare.
1682 (crisv32_target::low_supports_breakpoints)
1683 (crisv32_target::low_get_pc)
1684 (crisv32_target::low_set_pc): Define.
1685 (the_low_target): Remove the op fields.
1686 * linux-m32r-low.cc (class m32r_target)
1687 <low_supports_breakpoints>
1688 <low_get_pc>
1689 <low_set_pc>: Declare.
1690 (m32r_target::low_supports_breakpoints)
1691 (m32r_target::low_get_pc)
1692 (m32r_target::low_set_pc): Define.
1693 (the_low_target): Remove the op fields.
1694 * linux-m68k-low.cc (class m68k_target)
1695 <low_supports_breakpoints>
1696 <low_get_pc>
1697 <low_set_pc>: Declare.
1698 (m68k_target::low_supports_breakpoints)
1699 (m68k_target::low_get_pc)
1700 (m68k_target::low_set_pc): Define.
1701 (the_low_target): Remove the op fields.
1702 * linux-nios2-low.cc (class nios2_target)
1703 <low_supports_breakpoints>
1704 <low_get_pc>
1705 <low_set_pc>: Declare.
1706 (nios2_target::low_supports_breakpoints)
1707 (nios2_target::low_get_pc)
1708 (nios2_target::low_set_pc): Define.
1709 (the_low_target): Remove the op fields.
1710 * linux-sh-low.cc (class sh_target)
1711 <low_supports_breakpoints>
1712 <low_get_pc>
1713 <low_set_pc>: Declare.
1714 (sh_target::low_supports_breakpoints)
1715 (sh_target::low_get_pc)
1716 (sh_target::low_set_pc): Define.
1717 (the_low_target): Remove the op fields.
1718 * linux-xtensa-low.cc (class xtensa_target)
1719 <low_supports_breakpoints>
1720 <low_get_pc>
1721 <low_set_pc>: Declare.
1722 (xtensa_target::low_supports_breakpoints)
1723 (xtensa_target::low_get_pc)
1724 (xtensa_target::low_set_pc): Define.
1725 (the_low_target): Remove the op fields.
1726 * linux-sparc-low.cc (class sparc_target)
1727 <low_supports_breakpoints>
1728 <low_get_pc>: Declare.
1729 (sparc_target::low_supports_breakpoints)
1730 (sparc_target::low_get_pc): Define.
1731 (the_low_target): Remove the op fields.
1732 * linux-tile-low.cc (class tile_target)
1733 <low_supports_breakpoints>
1734 <low_get_pc>
1735 <low_set_pc>: Declare.
1736 (tile_target::low_supports_breakpoints)
1737 (tile_target::low_get_pc)
1738 (tile_target::low_set_pc): Define.
1739 (the_low_target): Remove the op fields.
1740 * linux-aarch64-low.cc (class aarch64_target)
1741 <low_supports_breakpoints>
1742 <low_get_pc>
1743 <low_set_pc>: Declare.
1744 (aarch64_target::low_supports_breakpoints): Define.
1745 (aarch64_get_pc): Turn into...
1746 (aarch64_target::low_get_pc): ...this.
1747 (aarch64_set_pc): Turn into...
1748 (aarch64_target::low_set_pc): ...this.
1749 (the_low_target): Remove the op fields.
1750 * linux-mips-low.cc (class mips_target)
1751 <low_supports_breakpoints>
1752 <low_get_pc>
1753 <low_set_pc>: Declare.
1754 (mips_target::low_supports_breakpoints): Define.
1755 (mips_get_pc): Turn into...
1756 (mips_target::low_get_pc): ...this.
1757 (mips_set_pc): Turn into...
1758 (mips_target::low_set_pc): ...this.
1759 (the_low_target): Remove the op fields.
1760 * linux-ppc-low.cc (class ppc_target)
1761 <low_supports_breakpoints>
1762 <low_get_pc>
1763 <low_set_pc>: Declare.
1764 (ppc_target::low_supports_breakpoints): Define.
1765 (ppc_get_pc): Turn into...
1766 (ppc_target::low_get_pc): ...this.
1767 (ppc_set_pc): Turn into...
1768 (ppc_target::low_set_pc): ...this.
1769 (the_low_target): Remove the op fields.
1770 * linux-riscv-low.cc (class riscv_target)
1771 <low_supports_breakpoints>
1772 <low_get_pc>
1773 <low_set_pc>: Declare.
1774 (riscv_target::low_supports_breakpoints): Define.
1775 (riscv_get_pc): Turn into...
1776 (riscv_target::low_get_pc): ...this.
1777 (riscv_set_pc): Turn into...
1778 (riscv_target::low_set_pc): ...this.
1779 (the_low_target): Remove the op fields.
1780 * linux-s390-low.cc (class s390_target)
1781 <low_supports_breakpoints>
1782 <low_get_pc>
1783 <low_set_pc>: Declare.
1784 (s390_target::low_supports_breakpoints): Define.
1785 (s390_get_pc): Turn into...
1786 (s390_target::low_get_pc): ...this.
1787 (s390_set_pc): Turn into...
1788 (s390_target::low_set_pc): ...this.
1789 (the_low_target): Remove the op fields.
1790 * linux-tic6x-low.cc (class tic6x_target)
1791 <low_supports_breakpoints>
1792 <low_get_pc>
1793 <low_set_pc>: Declare.
1794 (tic6x_target::low_supports_breakpoints): Define.
1795 (tic6x_get_pc): Turn into...
1796 (tic6x_target::low_get_pc): ...this.
1797 (tic6x_set_pc): Turn into...
1798 (tic6x_target::low_set_pc): ...this.
1799 (the_low_target): Remove the op fields.
1800
1801 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1802
1803 Turn some more static methods in linux-low into private methods
1804 of linux_process_target.
1805
1806 * linux-low.cc (get_pc): Turn into...
1807 (linux_process_target::get_pc): ...this.
1808 (save_stop_reason): Turn into...
1809 (linux_process_target::save_stop_reason): ...this.
1810 (thread_still_has_status_pending_p): Turn into...
1811 (linux_process_target::thread_still_has_status_pending): ...this.
1812 (status_pending_p_callback): Turn into...
1813 (linux_process_target::status_pending_p_callback): ...this.
1814 (resume_stopped_resumed_lwps): Turn into...
1815 (linux_process_target::resume_stopped_resumed_lwps): ...this.
1816 (install_software_single_step_breakpoints): Turn into...
1817 (linux_process_target::install_software_single_step_breakpoints):
1818 ...this.
1819 (single_step): Turn into...
1820 (linux_process_target::single_step): ...this.
1821 (linux_resume_one_lwp_throw): Turn into...
1822 (linux_process_target::resume_one_lwp_throw): ...this.
1823 (linux_resume_one_lwp): Turn into...
1824 (linux_process_target::resume_one_lwp): ...this.
1825 (resume_status_pending_p): Turn into...
1826 (linux_process_target::resume_status_pending): ...this.
1827 (need_step_over_p): Turn into...
1828 (linux_process_target::thread_needs_step_over): ...this.
1829 (linux_resume_one_thread): Turn into...
1830 (linux_process_target::resume_one_thread): ...this.
1831 (proceed_one_lwp): Turn into...
1832 (linux_process_target::proceed_one_lwp): ...this.
1833 (unsuspend_and_proceed_one_lwp): Turn into...
1834 (linux_process_target::unsuspend_and_proceed_one_lwp): ...this.
1835
1836 Update the calls/references to the above functions below.
1837
1838 (linux_process_target::handle_extended_wait)
1839 (linux_process_target::filter_event)
1840 (linux_process_target::wait_for_event_filtered)
1841 (linux_process_target::wait_1)
1842 (linux_process_target::move_out_of_jump_pad)
1843 (linux_process_target::start_step_over)
1844 (linux_process_target::resume)
1845 (linux_process_target::proceed_all_lwps)
1846 (regsets_store_inferior_registers)
1847 (linux_process_target::store_register)
1848
1849 * linux-low.h (class linux_process_target)
1850 <get_pc>
1851 <save_stop_reason>
1852 <thread_still_has_status_pending>
1853 <status_pending_p_callback>
1854 <resume_stopped_resumed_lwps>
1855 <install_software_single_step_breakpoints>
1856 <single_step>
1857 <resume_one_lwp_throw>
1858 <resume_one_lwp>
1859 <resume_status_pending>
1860 <thread_needs_step_over>
1861 <resume_one_thread>
1862 <proceed_one_lwp>
1863 <unsuspend_and_proceed_one_lwp>: Declare.
1864
1865 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1866
1867 Turn the 'fetch_register' linux target op into a method of
1868 linux_process_target.
1869
1870 * linux-low.h (struct linux_target_ops) <fetch_register>: Remove.
1871 (class linux_process_target) <low_fetch_register>: Declare.
1872 * linux-x86-low.cc (the_low_target)
1873 * linux-aarch64-low.cc (the_low_target)
1874 * linux-arm-low.cc (the_low_target)
1875 * linux-bfin-low.cc (the_low_target)
1876 * linux-cris-low.cc (the_low_target)
1877 * linux-crisv32-low.cc (the_low_target)
1878 * linux-m32r-low.cc (the_low_target)
1879 * linux-m68k-low.cc (the_low_target)
1880 * linux-nios2-low.cc (the_low_target)
1881 * linux-ppc-low.cc (the_low_target)
1882 * linux-s390-low.cc (the_low_target)
1883 * linux-sh-low.cc (the_low_target)
1884 * linux-sparc-low.cc (the_low_target)
1885 * linux-tic6x-low.cc (the_low_target)
1886 * linux-tile-low.cc (the_low_target)
1887 * linux-xtensa-low.cc (the_low_target): Remove the op field.
1888 * linux-ia64-low.cc (class ia64_target) <low_fetch_register>:
1889 Declare.
1890 (ia64_fetch_register): Turn into...
1891 (ia64_target::low_fetch_register): ...this.
1892 (the_low_target): Remove the op field.
1893 * linux-mips-low.cc (class mips_target) <low_fetch_register>:
1894 Declare.
1895 (mips_fetch_register): Turn into...
1896 (mips_target::low_fetch_register): ...this.
1897 (the_low_target): Remove the op field.
1898 * linux-riscv-low.cc (class riscv_target) <low_fetch_register>:
1899 Declare.
1900 (riscv_fetch_register): Turn into...
1901 (riscv_target::low_fetch_register): ...this.
1902 (the_low_target): Remove the op field.
1903
1904 Update the callers below.
1905
1906 * linux-low.cc (linux_process_target::fetch_registers)
1907 (linux_process_target::low_fetch_register)
1908
1909 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1910
1911 Turn the 'cannot_fetch_register' and 'cannot_store_register'
1912 linux target ops into methods of linux_process_target.
1913
1914 * linux-low.h (struct linux_target_ops): Remove the low target ops.
1915 (class linux_process_target) <fetch_register>
1916 <store_register>
1917 <usr_fetch_inferior_registers>
1918 <usr_store_inferior_registers>
1919 <low_cannot_fetch_register>
1920 <low_cannot_fetch_register> Declare.
1921 * linux-low.cc (fetch_register): Turn into...
1922 (linux_process_target::fetch_register): ...this.
1923 (store_register): Turn into ...
1924 (linux_process_target::store_register): ...this.
1925 (usr_fetch_inferior_registers): Turn into...
1926 (linux_process_target::usr_fetch_inferior_registers): ...this.
1927 (usr_store_inferior_registers): Turn into...
1928 (linux_process_target::usr_store_inferior_registers): ...this.
1929 * linux-x86-low.cc (class x86_target)
1930 <low_cannot_fetch_register>
1931 <low_cannot_store_register>: Declare.
1932 (x86_cannot_store_register): Turn into...
1933 (x86_target::low_cannot_store_register): ...this.
1934 (x86_cannot_fetch_register): Turn into...
1935 (x86_target::low_cannot_fetch_register): ...this.
1936 (the_low_target): Remove the target op fields.
1937 * linux-aarch64-low.cc (class aarch64_target)
1938 <low_cannot_fetch_register>
1939 <low_cannot_store_register>: Declare.
1940 (aarch64_target::low_cannot_fetch_register)
1941 (aarch64_target::low_cannot_store_register): Define.
1942 (the_low_target): Remove the op fields.
1943 * linux-arm-low.cc (class arm_target)
1944 <low_cannot_fetch_register>
1945 <low_cannot_store_register>: Declare.
1946 (arm_cannot_fetch_register): Turn into...
1947 (arm_target::low_cannot_fetch_register): ...this.
1948 (arm_cannot_store_register): Turn into...
1949 (arm_target::low_cannot_store_register): ...this.
1950 (the_low_target): Remove the op fields.
1951 * linux-bfin-low.cc (class bfin_target)
1952 <low_cannot_fetch_register>
1953 <low_cannot_store_register>: Declare.
1954 (bfin_cannot_fetch_register): Turn into...
1955 (bfin_target::low_cannot_fetch_register): ...this.
1956 (bfin_cannot_store_register): Turn into...
1957 (bfin_target::low_cannot_store_register): ...this.
1958 (the_low_target): Remove the op fields.
1959 * linux-cris-low.cc (class cris_target)
1960 <low_cannot_fetch_register>
1961 <low_cannot_store_register>: Declare.
1962 (cris_cannot_fetch_register): Turn into...
1963 (cris_target::low_cannot_fetch_register): ...this.
1964 (cris_cannot_store_register): Turn into...
1965 (cris_target::low_cannot_store_register): ...this.
1966 (the_low_target): Remove the op fields.
1967 * linux-crisv32-low.cc (class crisv32_target)
1968 <low_cannot_fetch_register>
1969 <low_cannot_store_register>: Declare.
1970 (crisv32_target::low_cannot_fetch_register)
1971 (crisv32_target::low_cannot_store_register): Define.
1972 (the_low_target): Remove the op fields.
1973 * linux-ia64-low.cc (class ia64_target)
1974 <low_cannot_fetch_register>
1975 <low_cannot_store_register>: Declare.
1976 (ia64_cannot_fetch_register): Turn into...
1977 (ia64_target::low_cannot_fetch_register): ...this.
1978 (ia64_cannot_store_register): Turn into...
1979 (ia64_target::low_cannot_store_register): ...this.
1980 (the_low_target): Remove the op fields.
1981 * linux-m32r-low.cc (class m32r_target)
1982 <low_cannot_fetch_register>
1983 <low_cannot_store_register>: Declare.
1984 (m32r_cannot_fetch_register): Turn into...
1985 (m32r_target::low_cannot_fetch_register): ...this.
1986 (m32r_cannot_store_register): Turn into...
1987 (m32r_target::low_cannot_store_register): ...this.
1988 (the_low_target): Remove the op fields.
1989 * linux-m68k-low.cc (class m68k_target)
1990 <low_cannot_fetch_register>
1991 <low_cannot_store_register>: Declare.
1992 (m68k_cannot_fetch_register): Turn into...
1993 (m68k_target::low_cannot_fetch_register): ...this.
1994 (m68k_cannot_store_register): Turn into...
1995 (m68k_target::low_cannot_store_register): ...this.
1996 (the_low_target): Remove the op fields.
1997 * linux-mips-low.cc (class mips_target)
1998 <low_cannot_fetch_register>
1999 <low_cannot_store_register>: Declare.
2000 (mips_cannot_fetch_register): Turn into...
2001 (mips_target::low_cannot_fetch_register): ...this.
2002 (mips_cannot_store_register): Turn into...
2003 (mips_target::low_cannot_store_register): ...this.
2004 (get_usrregs_info): Inline at the call sites in
2005 low_cannot_fetch_register and low_cannot_store_register,
2006 and remove.
2007 (the_low_target): Remove the op fields.
2008 * linux-nios2-low.cc (class nios2_target)
2009 <low_cannot_fetch_register>
2010 <low_cannot_store_register>: Declare.
2011 (nios2_cannot_fetch_register): Turn into...
2012 (nios2_target::low_cannot_fetch_register): ...this.
2013 (nios2_cannot_store_register): Turn into...
2014 (nios2_target::low_cannot_store_register): ...this.
2015 (the_low_target): Remove the op fields.
2016 * linux-ppc-low.cc (class ppc_target)
2017 <low_cannot_fetch_register>
2018 <low_cannot_store_register>: Declare.
2019 (ppc_cannot_fetch_register): Turn into...
2020 (ppc_target::low_cannot_fetch_register): ...this.
2021 (ppc_cannot_store_register): Turn into...
2022 (ppc_target::low_cannot_store_register): ...this.
2023 (the_low_target): Remove the op fields.
2024 * linux-riscv-low.cc (class riscv_target)
2025 <low_cannot_fetch_register>
2026 <low_cannot_store_register>: Declare.
2027 (riscv_target::low_cannot_fetch_register)
2028 (riscv_target::low_cannot_store_register): Define.
2029 (the_low_target): Remove the op fields.
2030 * linux-s390-low.cc (class s390_target)
2031 <low_cannot_fetch_register>
2032 <low_cannot_store_register>: Declare.
2033 (s390_cannot_fetch_register): Turn into...
2034 (s390_target::low_cannot_fetch_register): ...this.
2035 (s390_cannot_store_register): Turn into...
2036 (s390_target::low_cannot_store_register): ...this.
2037 (the_low_target): Remove the op fields.
2038 * linux-sh-low.cc (class sh_target)
2039 <low_cannot_fetch_register>
2040 <low_cannot_store_register>: Declare.
2041 (sh_cannot_fetch_register): Turn into...
2042 (sh_target::low_cannot_fetch_register): ...this.
2043 (sh_cannot_store_register): Turn into...
2044 (sh_target::low_cannot_store_register): ...this.
2045 (the_low_target): Remove the op fields.
2046 * linux-sparc-low.cc (class sparc_target)
2047 <low_cannot_fetch_register>
2048 <low_cannot_store_register>: Declare.
2049 (sparc_cannot_fetch_register): Turn into...
2050 (sparc_target::low_cannot_fetch_register): ...this.
2051 (sparc_cannot_store_register): Turn into...
2052 (sparc_target::low_cannot_store_register): ...this.
2053 (the_low_target): Remove the op fields.
2054 * linux-tic6x-low.cc (class tic6x_target)
2055 <low_cannot_fetch_register>
2056 <low_cannot_store_register>: Declare.
2057 (tic6x_cannot_fetch_register): Turn into...
2058 (tic6x_target::low_cannot_fetch_register): ...this.
2059 (tic6x_cannot_store_register): Turn into...
2060 (tic6x_target::low_cannot_store_register): ...this.
2061 (the_low_target): Remove the op fields.
2062 * linux-tile-low.cc (class tile_target)
2063 <low_cannot_fetch_register>
2064 <low_cannot_store_register>: Declare.
2065 (tile_cannot_fetch_register): Turn into...
2066 (tile_target::low_cannot_fetch_register): ...this.
2067 (tile_cannot_store_register): Turn into...
2068 (tile_target::low_cannot_store_register): ...this.
2069 (the_low_target): Remove the op fields.
2070 * linux-xtensa-low.cc (class xtensa_target)
2071 <low_cannot_fetch_register>
2072 <low_cannot_store_register>: Declare.
2073 (xtensa_target::low_cannot_fetch_register)
2074 (xtensa_target::low_cannot_store_register): Define.
2075 (the_low_target): Remove the op fields.
2076
2077 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2078
2079 Turn the 'regs_info' linux target op into a method of
2080 linux_process_target.
2081
2082 * linux-low.h (struct linux_target_ops) <regs_info>: Remove.
2083 (class linux_process_target) <get_regs_info>: Define.
2084
2085 Update the callers below.
2086
2087 * linux-low.cc (linux_process_target::fetch_registers)
2088 (linux_process_target::store_registers)
2089 * proc-service.cc (gregset_info)
2090
2091 * linux-x86-low.cc (class x86_target) <get_regs_info>: Declare.
2092 (x86_linux_regs_info): Turn into ...
2093 (x86_target::get_regs_info): ...this.
2094 (the_low_target): Remove the op field.
2095 * linux-aarch64-low.cc (class aarch64_target) <get_regs_info>:
2096 Declare.
2097 (aarch64_regs_info): Turn into ...
2098 (aarch64_target::get_regs_info): ...this.
2099 (the_low_target): Remove the op field.
2100 * linux-arm-low.cc (class arm_target) <get_regs_info>: Declare.
2101 (arm_regs_info): Turn into ...
2102 (arm_target::get_regs_info): ...this.
2103 (the_low_target): Remove the op field.
2104 * linux-bfin-low.cc (class bfin_target) <get_regs_info>: Declare.
2105 (bfin_regs_info): Turn into ...
2106 (bfin_target::get_regs_info): ...this.
2107 (the_low_target): Remove the op field.
2108 * linux-cris-low.cc (class cris_target) <get_regs_info>: Declare.
2109 (cris_regs_info): Turn into ...
2110 (cris_target::get_regs_info): ...this.
2111 (the_low_target): Remove the op field.
2112 * linux-crisv32-low.cc (class crisv32_target) <get_regs_info>:
2113 Declare.
2114 (crisv32_regs_info): Turn into ...
2115 (crisv32_target::get_regs_info): ...this.
2116 (the_low_target): Remove the op field.
2117 * linux-ia64-low.cc (class ia64_target) <get_regs_info>: Declare.
2118 (ia64_regs_info): Turn into ...
2119 (ia64_target::get_regs_info): ...this.
2120 (the_low_target): Remove the op field.
2121 * linux-m32r-low.cc (class m32r_target) <get_regs_info>: Declare.
2122 (m32r_regs_info): Turn into ...
2123 (m32r_target::get_regs_info): ...this.
2124 (the_low_target): Remove the op field.
2125 * linux-m68k-low.cc (class m68k_target) <get_regs_info>: Declare.
2126 (m68k_regs_info): Turn into ...
2127 (m68k_target::get_regs_info): ...this.
2128 (the_low_target): Remove the op field.
2129 * linux-mips-low.cc (class mips_target) <get_regs_info>: Declare.
2130 (mips_regs_info): Turn into ...
2131 (mips_target::get_regs_info): ...this.
2132 (the_low_target): Remove the op field.
2133 (get_usrregs_info): Update the call to the op.
2134 * linux-nios2-low.cc (class nios2_target) <get_regs_info>: Declare.
2135 (nios2_regs_info): Turn into ...
2136 (nios2_target::get_regs_info): ...this.
2137 (the_low_target): Remove the op field.
2138 * linux-ppc-low.cc (class ppc_target) <get_regs_info>: Declare.
2139 (ppc_regs_info): Turn into ...
2140 (ppc_target::get_regs_info): ...this.
2141 (the_low_target): Remove the op field.
2142 * linux-riscv-low.cc (class riscv_target) <get_regs_info>: Declare.
2143 (riscv_regs_info): Turn into ...
2144 (riscv_target::get_regs_info): ...this.
2145 (the_low_target): Remove the op field.
2146 * linux-s390-low.cc (class s390_target) <get_regs_info>: Declare.
2147 (s390_regs_info): Turn into ...
2148 (s390_target::get_regs_info): ...this.
2149 (the_low_target): Remove the op field.
2150 (s390_collect_ptrace_register)
2151 (s390_supply_ptrace_register)
2152 (s390_fill_gregset): Update the call to the op.
2153 * linux-sh-low.cc (class sh_target) <get_regs_info>: Declare.
2154 (sh_regs_info): Turn into ...
2155 (sh_target::get_regs_info): ...this.
2156 (the_low_target): Remove the op field.
2157 * linux-sparc-low.cc (class sparc_target) <get_regs_info>: Declare.
2158 (sparc_regs_info): Turn into ...
2159 (sparc_target::get_regs_info): ...this.
2160 (the_low_target): Remove the op field.
2161 * linux-tic6x-low.cc (class tic6x_target) <get_regs_info>: Declare.
2162 (tic6x_regs_info): Turn into ...
2163 (tic6x_target::get_regs_info): ...this.
2164 (the_low_target): Remove the op field.
2165 * linux-tile-low.cc (class tile_target) <get_regs_info>: Declare.
2166 (tile_regs_info): Turn into ...
2167 (tile_target::get_regs_info): ...this.
2168 (the_low_target): Remove the op field.
2169 * linux-xtensa-low.cc (class xtensa_target) <get_regs_info>:
2170 Declare.
2171 (xtensa_regs_info): Turn into ...
2172 (xtensa_target::get_regs_info): ...this.
2173 (the_low_target): Remove the op field.
2174
2175 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2176
2177 Turn the 'arch_setup' linux target op into a method of
2178 linux_process_target.
2179
2180 * linux-low.h (struct linux_target_ops) <arch_setup>: Delete.
2181 (class linux_process_target) <arch_setup_thread>
2182 <low_arch_setup>: New declarations.
2183 * linux-low.cc (linux_arch_setup): Delete.
2184 (linux_arch_setup_thread): Turn into...
2185 (linux_process_target::arch_setup_thread): ... this.
2186
2187 Update the callers below.
2188
2189 (linux_process_target::handle_extended_wait)
2190 (linux_process_target::post_create_inferior)
2191 (linux_process_target::filter_event)
2192
2193 * linux-x86-low.cc (class x86_target) <low_arch_setup>: New
2194 declaration.
2195 (x86_linux_update_xmltarget): Turn into...
2196 (x86_target::update_xmltarget): ...this.
2197 (x86_linux_process_qsupported): Update the call to
2198 x86_linux_update_xmltarget.
2199 (x86_arch_setup): Turn into ...
2200 (x86_target::low_arch_setup): ...this.
2201 (the_low_target): Remove the op field.
2202 * linux-aarch64-low.cc (class aarch64_target) <low_arch_setup>: New
2203 declaration.
2204 (aarch64_arch_setup): Turn into ...
2205 (aarch64_target::low_arch_setup): ...this.
2206 (the_low_target): Remove the op field.
2207 * linux-arm-low.cc (class arm_target) <low_arch_setup>: New
2208 declaration.
2209 (arm_arch_setup): Turn into ...
2210 (arm_target::low_arch_setup): ...this.
2211 (the_low_target): Remove the op field.
2212 * linux-bfin-low.cc (class bfin_target) <low_arch_setup>: New
2213 declaration.
2214 (bfin_arch_setup): Turn into ...
2215 (bfin_target::low_arch_setup): ...this.
2216 (the_low_target): Remove the op field.
2217 * linux-cris-low.cc (class cris_target) <low_arch_setup>: New
2218 declaration.
2219 (cris_arch_setup): Turn into ...
2220 (cris_target::low_arch_setup): ...this.
2221 (the_low_target): Remove the op field.
2222 * linux-crisv32-low.cc (class crisv32_target) <low_arch_setup>: New
2223 declaration.
2224 (crisv32_arch_setup): Turn into ...
2225 (crisv32_target::low_arch_setup): ...this.
2226 (the_low_target): Remove the op field.
2227 * linux-ia64-low.cc (class ia64_target) <low_arch_setup>: New
2228 declaration.
2229 (ia64_arch_setup): Turn into ...
2230 (ia64_target::low_arch_setup): ...this.
2231 (the_low_target): Remove the op field.
2232 * linux-m32r-low.cc (class m32r_target) <low_arch_setup>: New
2233 declaration.
2234 (m32r_arch_setup): Turn into ...
2235 (m32r_target::low_arch_setup): ...this.
2236 (the_low_target): Remove the op field.
2237 * linux-m68k-low.cc (class m68k_target) <low_arch_setup>: New
2238 declaration.
2239 (m68k_arch_setup): Turn into ...
2240 (m68k_target::low_arch_setup): ...this.
2241 (the_low_target): Remove the op field.
2242 * linux-mips-low.cc (class mips_target) <low_arch_setup>: New
2243 declaration.
2244 (mips_arch_setup): Turn into ...
2245 (mips_target::low_arch_setup): ...this.
2246 (the_low_target): Remove the op field.
2247 * linux-nios2-low.cc (class nios2_target) <low_arch_setup>: New
2248 declaration.
2249 (nios2_arch_setup): Turn into ...
2250 (nios2_target::low_arch_setup): ...this.
2251 (the_low_target): Remove the op field.
2252 * linux-ppc-low.cc (class ppc_target) <low_arch_setup>: New
2253 declaration.
2254 (ppc_arch_setup): Turn into ...
2255 (ppc_target::low_arch_setup): ...this.
2256 (the_low_target): Remove the op field.
2257 * linux-riscv-low.cc (class riscv_target) <low_arch_setup>: New
2258 declaration.
2259 (riscv_arch_setup): Turn into ...
2260 (riscv_target::low_arch_setup): ...this.
2261 (the_low_target): Remove the op field.
2262 * linux-s390-low.cc (class s390_target) <low_arch_setup>: New
2263 declaration.
2264 (s390_arch_setup): Turn into ...
2265 (s390_target::low_arch_setup): ...this.
2266 (the_low_target): Remove the op field.
2267 * linux-sh-low.cc (class sh_target) <low_arch_setup>: New
2268 declaration.
2269 (sh_arch_setup): Turn into ...
2270 (sh_target::low_arch_setup): ...this.
2271 (the_low_target): Remove the op field.
2272 * linux-sparc-low.cc (class sparc_target) <low_arch_setup>: New
2273 declaration.
2274 (sparc_arch_setup): Turn into ...
2275 (sparc_target::low_arch_setup): ...this.
2276 (the_low_target): Remove the op field.
2277 * linux-tic6x-low.cc (class tic6x_target) <low_arch_setup>: New
2278 declaration.
2279 (tic6x_arch_setup): Turn into ...
2280 (tic6x_target::low_arch_setup): ...this.
2281 (the_low_target): Remove the op field.
2282 * linux-tile-low.cc (class tile_target) <low_arch_setup>: New
2283 declaration.
2284 (tile_arch_setup): Turn into ...
2285 (tile_target::low_arch_setup): ...this.
2286 (the_low_target): Remove the op field.
2287 * linux-xtensa-low.cc (class xtensa_target) <low_arch_setup>: New
2288 declaration.
2289 (xtensa_arch_setup): Turn into ...
2290 (xtensa_target::low_arch_setup): ...this.
2291 (the_low_target): Remove the op field.
2292
2293 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2294
2295 * linux-low.h (the_linux_target): New extern declaration.
2296 * linux-low.cc (initialize_low): Use 'the_linux_target' to set
2297 'the_target'.
2298 (the_linux_target): Remove.
2299 * linux-x86-low.cc (class x86_target): New class.
2300 (the_x86_target): New static object.
2301 (the_linux_target): Define as pointer to the_x86_target.
2302 * linux-aarch64-low.cc (class aarch64_target): New class.
2303 (the_aarch64_target): New static object.
2304 (the_linux_target): Define as pointer to the_aarch64_target.
2305 * linux-arm-low.cc (class arm_target): New class.
2306 (the_arm_target): New static object.
2307 (the_linux_target): Define as pointer to the_arm_target.
2308 * linux-bfin-low.cc (class bfin_target): New class.
2309 (the_bfin_target): New static object.
2310 (the_linux_target): Define as pointer to the_bfin_target.
2311 * linux-cris-low.cc (class cris_target): New class.
2312 (the_cris_target): New static object.
2313 (the_linux_target): Define as pointer to the_cris_target.
2314 * linux-crisv32-low.cc (class crisv32_target): New class.
2315 (the_crisv32_target): New static object.
2316 (the_linux_target): Define as pointer to the_crisv32_target.
2317 * linux-ia64-low.cc (class ia64_target): New class.
2318 (the_ia64_target): New static object.
2319 (the_linux_target): Define as pointer to the_ia64_target.
2320 * linux-m32r-low.cc (class m32r_target): New class.
2321 (the_m32r_target): New static object.
2322 (the_linux_target): Define as pointer to the_m32r_target.
2323 * linux-m68k-low.cc (class m68k_target): New class.
2324 (the_m68k_target): New static object.
2325 (the_linux_target): Define as pointer to the_m68k_target.
2326 * linux-mips-low.cc (class mips_target): New class.
2327 (the_mips_target): New static object.
2328 (the_linux_target): Define as pointer to the_mips_target.
2329 * linux-nios2-low.cc (class nios2_target): New class.
2330 (the_nios2_target): New static object.
2331 (the_linux_target): Define as pointer to the_nios2_target.
2332 * linux-ppc-low.cc (class ppc_target): New class.
2333 (the_ppc_target): New static object.
2334 (the_linux_target): Define as pointer to the_ppc_target.
2335 * linux-riscv-low.cc (class riscv_target): New class.
2336 (the_riscv_target): New static object.
2337 (the_linux_target): Define as pointer to the_riscv_target.
2338 * linux-s390-low.cc (class s390_target): New class.
2339 (the_s390_target): New static object.
2340 (the_linux_target): Define as pointer to the_s390_target.
2341 * linux-sh-low.cc (class sh_target): New class.
2342 (the_sh_target): New static object.
2343 (the_linux_target): Define as pointer to the_sh_target.
2344 * linux-sparc-low.cc (class sparc_target): New class.
2345 (the_sparc_target): New static object.
2346 (the_linux_target): Define as pointer to the_sparc_target.
2347 * linux-tic6x-low.cc (class tic6x_target): New class.
2348 (the_tic6x_target): New static object.
2349 (the_linux_target): Define as pointer to the_tic6x_target.
2350 * linux-tile-low.cc (class tile_target): New class.
2351 (the_tile_target): New static object.
2352 (the_linux_target): Define as pointer to the_tile_target.
2353 * linux-xtensa-low.cc (class xtensa_target): New class.
2354 (the_xtensa_target): New static object.
2355 (the_linux_target): Define as pointer to the_xtensa_target.
2356
2357 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2358
2359 Turn some static functions in linux-low.cc into private methods of
2360 linux_process_target.
2361
2362 * linux-low.cc (handle_extended_wait): Turn into ...
2363 (linux_process_target::handle_extended_wait): ...this. Call
2364 'mourn' on 'this' object instead of 'the_target'.
2365 (maybe_move_out_of_jump_pad): Turn into...
2366 (linux_process_target::maybe_move_out_of_jump_pad): ...this.
2367 (linux_low_filter_event): Turn into...
2368 (linux_process_target::filter_event): ...this.
2369 (linux_wait_for_event_filtered): Turn into...
2370 (linux_process_target::wait_for_event_filtered): ...this.
2371 (linux_wait_for_event): Turn into...
2372 (linux_process_target::wait_for_event): ...this.
2373 (linux_wait_1): Turn into...
2374 (linux_process_target::wait_1): ...this.
2375 (wait_for_sigstop): Turn into...
2376 (linux_process_target::wait_for_sigstop): ...this.
2377 (move_out_of_jump_pad_callback): Turn into...
2378 (linux_process_target::move_out_of_jump_pad): ...this.
2379 (stop_all_lwps): Turn into...
2380 (linux_process_target::stop_all_lwps): ...this.
2381 (start_step_over): Turn into...
2382 (linux_process_target::start_step_over): ...this.
2383 (complete_ongoing_step_over): Turn into...
2384 (linux_process_target::complete_ongoing_step_over): ...this.
2385 (proceed_all_lwps): Turn into...
2386 (linux_process_target::proceed_all_lwps): ...this.
2387 (unstop_all_lwps): Turn into...
2388 (linux_process_target::unstop_all_lwps): ...this.
2389
2390 * linux-low.h (class linux_process_target)
2391 <handle_extended_wait>
2392 <maybe_move_out_of_jump_pad>
2393 filter_event>
2394 <wait_for_event_filtered>
2395 <wait_for_event>
2396 <wait_1>
2397 <wait_for_sigstop>
2398 <move_out_of_jump_pad>
2399 <stop_all_lwps>
2400 <start_step_over>
2401 <complete_ongoing_step_over>
2402 <proceed_all_lwps>
2403 <unstop_all_lwps>: Declare.
2404
2405 Update the callers below.
2406
2407 * linux-low.cc (linux_process_target::attach): Update.
2408 (linux_process_target::stabilize_threads): Ditto.
2409 (linux_process_target::wait): Ditto.
2410
2411 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2412
2413 * linux-low.h (struct linux_target_ops): Update the comment for
2414 'cannot_store_register' to return 0 or 1.
2415 * linux-ppc-low.cc (ppc_cannot_store_register): Return 1 instead
2416 of 2.
2417
2418 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
2419
2420 * config.in: Re-generate.
2421 * configure: Re-generate.
2422
2423 2020-03-17 Kamil Rytarowski <n54@gmx.com>
2424
2425 * regcache.cc (find_register_by_number): Update.
2426 * tdesc.cc (init_target_desc): Likewise.
2427 * tdesc.h (target_desc::reg_defs): Likewise.
2428
2429 2020-03-12 Tom Tromey <tom@tromey.com>
2430
2431 * configure: Rebuild.
2432 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
2433 (WIN32APILIBS): New subst.
2434 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
2435 gdbsupport files.
2436 (gdbsupport/%.o): Remove target.
2437 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
2438 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
2439 (WIN32APILIBS): New variable.
2440 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
2441 (gdbreplay$(EXEEXT)): Likewise.
2442
2443 2020-03-12 Tom Tromey <tom@tromey.com>
2444
2445 * config.in, configure: Rebuild.
2446 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
2447 * acinclude.m4: Include gettext-sister.m4.
2448 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
2449 variables.
2450 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
2451 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
2452
2453 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2454
2455 * acinclude.m4: Update path to selftest.m4.
2456
2457 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2458
2459 * configure.ac: Don't source bfd/development.sh, move
2460 GDB_AC_COMMON higher.
2461 * configure: Re-generate.
2462
2463 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2464
2465 * configure: Re-generate.
2466
2467 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
2468
2469 * configure: Re-generate.
2470
2471 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2472
2473 * .dir-locals.el: New file.
2474
2475 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2476
2477 * .gitattributes: New file.
2478
2479 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
2480
2481 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
2482 reply into an S reply.
2483 * server.cc (disable_packet_T): New global.
2484 (captured_main): Set new global when appropriate.
2485 * server.h (disable_packet_T): Declare.
2486
2487 2020-02-21 Tom Tromey <tom@tromey.com>
2488
2489 * Makefile.in (mostlyclean): New target.
2490
2491 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2492
2493 * target.h (struct process_stratum_target): Remove.
2494 (class process_target): Rename to ...
2495 (class process_stratum_target): ... this.
2496 * linux-low.h (class linux_process_target): Derive from
2497 'process_stratum_target'.
2498 * linux-low.cc (linux_target_ops): Remove.
2499 (initialize_low): Set the_target to the singleton instance of
2500 linux_process_target.
2501 * lynx-low.h (class lynx_process_target): Derive from
2502 'process_stratum_target'.
2503 * lynx-low.cc (lynx_target_ops): Remove.
2504 (initialize_low): Set the_target to the singleton instance of
2505 lynx_process_target.
2506 * nto-low.h (class nto_process_target): Derive from
2507 'process_stratum_target'.
2508 * nto-low.cc (nto_target_ops): Remove.
2509 (initialize_low): Set the_target to the singleton instance of
2510 nto_process_target.
2511 * win32-low.h (class win32_process_target): Derive from
2512 'process_stratum_target'.
2513 * win32-low.cc (win32_target_ops): Remove.
2514 (initialize_low): Set the_target to the singleton instance of
2515 win32_process_target.
2516
2517 Replace 'the_target->pt' with 'the_target' in the uses below.
2518
2519 * hostio.cc (hostio_error)
2520 (handle_setfs)
2521 (handle_open)
2522 (handle_unlink)
2523 (handle_readlink)
2524 * linux-aarch32-low.cc (arm_breakpoint_at)
2525 * linux-aarch64-low.cc (aarch64_breakpoint_at)
2526 * linux-arm-low.cc (arm_sigreturn_next_pc)
2527 (arm_get_hwcap)
2528 (arm_get_syscall_trapinfo)
2529 * linux-cris-low.cc (cris_breakpoint_at)
2530 * linux-crisv32-low.cc (cris_breakpoint_at)
2531 * linux-low.cc (handle_extended_wait)
2532 (linux_wait_1)
2533 (linux_read_memory)
2534 (linux_process_target::breakpoint_kind_from_pc)
2535 (linux_get_auxv)
2536 * linux-m32r-low.cc (m32r_breakpoint_at)
2537 * linux-mips-low.cc (mips_breakpoint_at)
2538 * linux-nios2-low.cc (nios2_breakpoint_at)
2539 * linux-ppc-low.cc (ppc_breakpoint_at)
2540 * linux-s390-low.cc (s390_get_hwcap)
2541 * linux-sh-low.cc (sh_breakpoint_at)
2542 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
2543 (sparc_store_gregset_from_stack)
2544 (sparc_breakpoint_at)
2545 * linux-tic6x-low.cc (tic6x_breakpoint_at)
2546 * linux-tile-low.cc (tile_breakpoint_at)
2547 * linux-x86-low.cc (x86_breakpoint_at)
2548 * linux-xtensa-low.cc (xtensa_breakpoint_at)
2549 * mem-break.cc (bp_size)
2550 (bp_opcode)
2551 (insert_memory_breakpoint)
2552 (set_raw_breakpoint_at)
2553 (delete_raw_breakpoint)
2554 (z_type_supported)
2555 (uninsert_raw_breakpoint)
2556 (reinsert_raw_breakpoint)
2557 (validate_inserted_breakpoint)
2558 * regcache.cc (regcache_read_pc)
2559 (regcache_write_pc)
2560 * remote-utils.cc (putpkt_binary_1)
2561 (input_interrupt)
2562 (getpkt)
2563 (prepare_resume_reply)
2564 * server.cc (handle_general_set)
2565 (handle_detach)
2566 (handle_qxfer_auxv)
2567 (handle_qxfer_exec_file)
2568 (handle_qxfer_libraries_svr4)
2569 (handle_qxfer_osdata)
2570 (handle_qxfer_siginfo)
2571 (handle_qxfer_fdpic)
2572 (handle_query)
2573 (resume)
2574 (handle_v_requests)
2575 (queue_stop_reply_callback)
2576 (captured_main)
2577 * target.cc (prepare_to_access_memory)
2578 (done_accessing_memory)
2579 (read_inferior_memory)
2580 (target_write_memory)
2581 (target_stop_and_wait)
2582 (target_wait)
2583 (target_mourn_inferior)
2584 (target_continue_no_signal)
2585 (target_continue)
2586 (target_supports_multi_process)
2587 (kill_inferior)
2588 * target.h
2589 (target_create_inferior)
2590 (target_post_create_inferior)
2591 (myattach)
2592 (target_supports_fork_events)
2593 (target_supports_vfork_events)
2594 (target_supports_exec_events)
2595 (target_handle_new_gdb_connection)
2596 (detach_inferior)
2597 (mythread_alive)
2598 (fetch_inferior_registers)
2599 (store_inferior_registers)
2600 (join_inferior)
2601 (target_supports_non_stop)
2602 (target_async)
2603 (target_process_qsupported)
2604 (target_supports_catch_syscall)
2605 (target_get_ipa_tdesc_idx)
2606 (target_supports_tracepoints)
2607 (target_supports_fast_tracepoints)
2608 (target_get_min_fast_tracepoint_insn_len)
2609 (target_thread_stopped)
2610 (target_pause_all)
2611 (target_unpause_all)
2612 (target_stabilize_threads)
2613 (target_install_fast_tracepoint_jump_pad)
2614 (target_emit_ops)
2615 (target_supports_disable_randomization)
2616 (target_supports_agent)
2617 (target_enable_btrace)
2618 (target_disable_btrace)
2619 (target_read_btrace)
2620 (target_read_btrace_conf)
2621 (target_supports_range_stepping)
2622 (target_supports_stopped_by_sw_breakpoint)
2623 (target_stopped_by_sw_breakpoint)
2624 (target_supports_stopped_by_hw_breakpoint)
2625 (target_supports_hardware_single_step)
2626 (target_stopped_by_hw_breakpoint)
2627 (target_breakpoint_kind_from_pc)
2628 (target_breakpoint_kind_from_current_state)
2629 (target_supports_software_single_step)
2630 (target_core_of_thread)
2631 (target_thread_name)
2632 (target_thread_handle)
2633 * win32-low.cc (do_initial_child_stuff)
2634
2635 Rename target op default definitions listed below.
2636
2637 * target.cc (process_target::post_create_inferior): Rename as ...
2638 (process_stratum_target::post_create_inferior): ... this.
2639 (process_target::prepare_to_access_memory): Rename as ...
2640 (process_stratum_target::prepare_to_access_memory): ... this.
2641 (process_target::done_accessing_memory): Rename as ...
2642 (process_stratum_target::done_accessing_memory): ... this.
2643 (process_target::look_up_symbols): Rename as ...
2644 (process_stratum_target::look_up_symbols): ... this.
2645 (process_target::supports_read_auxv): Rename as ...
2646 (process_stratum_target::supports_read_auxv): ... this.
2647 (process_target::read_auxv): Rename as ...
2648 (process_stratum_target::read_auxv): ... this.
2649 (process_target::supports_z_point_type): Rename as ...
2650 (process_stratum_target::supports_z_point_type): ... this.
2651 (process_target::insert_point): Rename as ...
2652 (process_stratum_target::insert_point): ... this.
2653 (process_target::remove_point): Rename as ...
2654 (process_stratum_target::remove_point): ... this.
2655 (process_target::stopped_by_sw_breakpoint): Rename as ...
2656 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
2657 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
2658 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
2659 (process_target::stopped_by_hw_breakpoint): Rename as ...
2660 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
2661 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
2662 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
2663 (process_target::supports_hardware_single_step): Rename as ...
2664 (process_stratum_target::supports_hardware_single_step): ... this.
2665 (process_target::stopped_by_watchpoint): Rename as ...
2666 (process_stratum_target::stopped_by_watchpoint): ... this.
2667 (process_target::stopped_data_address): Rename as ...
2668 (process_stratum_target::stopped_data_address): ... this.
2669 (process_target::supports_read_offsets): Rename as ...
2670 (process_stratum_target::supports_read_offsets): ... this.
2671 (process_target::read_offsets): Rename as ...
2672 (process_stratum_target::read_offsets): ... this.
2673 (process_target::supports_get_tls_address): Rename as ...
2674 (process_stratum_target::supports_get_tls_address): ... this.
2675 (process_target::get_tls_address): Rename as ...
2676 (process_stratum_target::get_tls_address): ... this.
2677 (process_target::hostio_last_error): Rename as ...
2678 (process_stratum_target::hostio_last_error): ... this.
2679 (process_target::supports_qxfer_osdata): Rename as ...
2680 (process_stratum_target::supports_qxfer_osdata): ... this.
2681 (process_target::qxfer_osdata): Rename as ...
2682 (process_stratum_target::qxfer_osdata): ... this.
2683 (process_target::supports_qxfer_siginfo): Rename as ...
2684 (process_stratum_target::supports_qxfer_siginfo): ... this.
2685 (process_target::qxfer_siginfo): Rename as ...
2686 (process_stratum_target::qxfer_siginfo): ... this.
2687 (process_target::supports_non_stop): Rename as ...
2688 (process_stratum_target::supports_non_stop): ... this.
2689 (process_target::async): Rename as ...
2690 (process_stratum_target::async): ... this.
2691 (process_target::start_non_stop): Rename as ...
2692 (process_stratum_target::start_non_stop): ... this.
2693 (process_target::supports_multi_process): Rename as ...
2694 (process_stratum_target::supports_multi_process): ... this.
2695 (process_target::supports_fork_events): Rename as ...
2696 (process_stratum_target::supports_fork_events): ... this.
2697 (process_target::supports_vfork_events): Rename as ...
2698 (process_stratum_target::supports_vfork_events): ... this.
2699 (process_target::supports_exec_events): Rename as ...
2700 (process_stratum_target::supports_exec_events): ... this.
2701 (process_target::handle_new_gdb_connection): Rename as ...
2702 (process_stratum_target::handle_new_gdb_connection): ... this.
2703 (process_target::handle_monitor_command): Rename as ...
2704 (process_stratum_target::handle_monitor_command): ... this.
2705 (process_target::core_of_thread): Rename as ...
2706 (process_stratum_target::core_of_thread): ... this.
2707 (process_target::supports_read_loadmap): Rename as ...
2708 (process_stratum_target::supports_read_loadmap): ... this.
2709 (process_target::read_loadmap): Rename as ...
2710 (process_stratum_target::read_loadmap): ... this.
2711 (process_target::process_qsupported): Rename as ...
2712 (process_stratum_target::process_qsupported): ... this.
2713 (process_target::supports_tracepoints): Rename as ...
2714 (process_stratum_target::supports_tracepoints): ... this.
2715 (process_target::read_pc): Rename as ...
2716 (process_stratum_target::read_pc): ... this.
2717 (process_target::write_pc): Rename as ...
2718 (process_stratum_target::write_pc): ... this.
2719 (process_target::supports_thread_stopped): Rename as ...
2720 (process_stratum_target::supports_thread_stopped): ... this.
2721 (process_target::thread_stopped): Rename as ...
2722 (process_stratum_target::thread_stopped): ... this.
2723 (process_target::supports_get_tib_address): Rename as ...
2724 (process_stratum_target::supports_get_tib_address): ... this.
2725 (process_target::get_tib_address): Rename as ...
2726 (process_stratum_target::get_tib_address): ... this.
2727 (process_target::pause_all): Rename as ...
2728 (process_stratum_target::pause_all): ... this.
2729 (process_target::unpause_all): Rename as ...
2730 (process_stratum_target::unpause_all): ... this.
2731 (process_target::stabilize_threads): Rename as ...
2732 (process_stratum_target::stabilize_threads): ... this.
2733 (process_target::supports_fast_tracepoints): Rename as ...
2734 (process_stratum_target::supports_fast_tracepoints): ... this.
2735 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
2736 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
2737 (process_target::emit_ops): Rename as ...
2738 (process_stratum_target::emit_ops): ... this.
2739 (process_target::supports_disable_randomization): Rename as ...
2740 (process_stratum_target::supports_disable_randomization): ... this.
2741 (process_target::supports_qxfer_libraries_svr4): Rename as ...
2742 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
2743 (process_target::qxfer_libraries_svr4): Rename as ...
2744 (process_stratum_target::qxfer_libraries_svr4): ... this.
2745 (process_target::supports_agent): Rename as ...
2746 (process_stratum_target::supports_agent): ... this.
2747 (process_target::enable_btrace): Rename as ...
2748 (process_stratum_target::enable_btrace): ... this.
2749 (process_target::disable_btrace): Rename as ...
2750 (process_stratum_target::disable_btrace): ... this.
2751 (process_target::read_btrace): Rename as ...
2752 (process_stratum_target::read_btrace): ... this.
2753 (process_target::read_btrace_conf): Rename as ...
2754 (process_stratum_target::read_btrace_conf): ... this.
2755 (process_target::supports_range_stepping): Rename as ...
2756 (process_stratum_target::supports_range_stepping): ... this.
2757 (process_target::supports_pid_to_exec_file): Rename as ...
2758 (process_stratum_target::supports_pid_to_exec_file): ... this.
2759 (process_target::pid_to_exec_file): Rename as ...
2760 (process_stratum_target::pid_to_exec_file): ... this.
2761 (process_target::supports_multifs): Rename as ...
2762 (process_stratum_target::supports_multifs): ... this.
2763 (process_target::multifs_open): Rename as ...
2764 (process_stratum_target::multifs_open): ... this.
2765 (process_target::multifs_unlink): Rename as ...
2766 (process_stratum_target::multifs_unlink): ... this.
2767 (process_target::multifs_readlink): Rename as ...
2768 (process_stratum_target::multifs_readlink): ... this.
2769 (process_target::breakpoint_kind_from_pc): Rename as ...
2770 (process_stratum_target::breakpoint_kind_from_pc): ... this.
2771 (process_target::breakpoint_kind_from_current_state): Rename as ...
2772 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
2773 (process_target::thread_name): Rename as ...
2774 (process_stratum_target::thread_name): ... this.
2775 (process_target::thread_handle): Rename as ...
2776 (process_stratum_target::thread_handle): ... this.
2777 (process_target::supports_software_single_step): Rename as ...
2778 (process_stratum_target::supports_software_single_step): ... this.
2779 (process_target::supports_catch_syscall): Rename as ...
2780 (process_stratum_target::supports_catch_syscall): ... this.
2781 (process_target::get_ipa_tdesc_idx): Rename as ...
2782 (process_stratum_target::get_ipa_tdesc_idx): ... this.
2783
2784 2020-02-20 Pedro Alves <palves@redhat.com>
2785
2786 * target.cc (set_target_ops): Simply copy the given target pointer
2787 instead of creating a copy of the pointed object.
2788
2789 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2790
2791 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
2792 of process_target.
2793
2794 * target.h (struct process_stratum_target): Remove the target op.
2795 (class process_target): Add the target op.
2796 (target_get_ipa_tdesc_idx): Update the macro.
2797 * target.cc (process_target::get_ipa_tdesc_idx): Define.
2798
2799 Update the derived classes and callers below.
2800
2801 * linux-low.cc (linux_target_ops): Update.
2802 (linux_get_ipa_tdesc_idx): Turn into ...
2803 (linux_process_target::get_ipa_tdesc_idx): ... this.
2804 * linux-low.h (class linux_process_target): Update.
2805 * lynx-low.cc (lynx_target_ops): Update.
2806 * nto-low.cc (nto_target_ops): Update.
2807 * win32-low.cc (win32_target_ops): Update.
2808
2809 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2810
2811 Turn process_stratum_target's supports_catch_syscall op into a
2812 method of process_target.
2813
2814 * target.h (struct process_stratum_target): Remove the target op.
2815 (class process_target): Add the target op.
2816 (target_supports_catch_syscall): Update the macro.
2817 * target.cc (process_target::supports_catch_syscall): Define.
2818
2819 Update the derived classes and callers below.
2820
2821 * linux-low.cc (linux_target_ops): Update.
2822 (linux_supports_catch_syscall): Turn into ...
2823 (linux_process_target::supports_catch_syscall): ... this.
2824 * linux-low.h (class linux_process_target): Update.
2825 * lynx-low.cc (lynx_target_ops): Update.
2826 * nto-low.cc (nto_target_ops): Update.
2827 * win32-low.cc (win32_target_ops): Update.
2828
2829 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2830
2831 Turn process_stratum_target's supports_software_single_step op
2832 into a method of process_target.
2833
2834 * target.h (struct process_stratum_target): Remove the target op.
2835 (class process_target): Add the target op.
2836 (target_supports_software_single_step): Update the macro.
2837 * target.cc (process_target::supports_software_single_step): Define.
2838
2839 Update the derived classes and callers below.
2840
2841 * linux-low.cc (linux_target_ops): Update.
2842 (linux_supports_software_single_step): Turn into ...
2843 (linux_process_target::supports_software_single_step): ... this.
2844 * linux-low.h (class linux_process_target): Update.
2845 * lynx-low.cc (lynx_target_ops): Update.
2846 * nto-low.cc (nto_target_ops): Update.
2847 * win32-low.cc (win32_target_ops): Update.
2848
2849 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2850
2851 Turn process_stratum_target's thread_name and thread_handle ops
2852 into methods of process_target.
2853
2854 * target.h (struct process_stratum_target): Remove the target ops.
2855 (class process_target): Add the target ops.
2856 (target_thread_name): Update the macro.
2857 (target_thread_handle): Update the macro.
2858 * target.cc (process_target::thread_name): Define.
2859 (process_target::thread_handle): Define.
2860
2861 Update the derived classes and callers below.
2862
2863 * linux-low.cc (linux_target_ops): Update.
2864 (linux_process_target::thread_name): Define.
2865 (linux_process_target::thread_handle): Define.
2866 * linux-low.h (class linux_process_target): Update.
2867 * lynx-low.cc (lynx_target_ops): Update.
2868 * nto-low.cc (nto_target_ops): Update.
2869 * win32-low.cc (win32_target_ops): Update.
2870
2871 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2872
2873 Turn process_stratum_target's breakpoint_kind_from_pc,
2874 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
2875 ops into methods of process_target.
2876
2877 * target.h (struct process_stratum_target): Remove the target op.
2878 (class process_target): Add the target op.
2879 (target_breakpoint_kind_from_pc): Update the macro.
2880 (target_breakpoint_kind_from_current_state): Update the macro.
2881 (default_breakpoint_kind_from_pc): Remove declaration.
2882 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
2883 (process_target::breakpoint_kind_from_pc): ... this.
2884 (process_target::breakpoint_kind_from_current_state): Define.
2885
2886 Update the derived classes and callers below.
2887
2888 * mem-break.cc (bp_size): Update.
2889 (bp_opcode): Update.
2890 * linux-low.cc (linux_target_ops): Update.
2891 (linux_wait_1): Update.
2892 (linux_breakpoint_kind_from_pc): Turn into ...
2893 (linux_process_target::breakpoint_kind_from_pc): ... this.
2894 (linux_sw_breakpoint_from_kind): Turn into ...
2895 (linux_process_target::sw_breakpoint_from_kind): ... this.
2896 (linux_breakpoint_kind_from_current_state): Turn into ...
2897 (linux_process_target::breakpoint_kind_from_current_state): ... this.
2898 * linux-low.h (class linux_process_target): Update.
2899 * lynx-low.cc (lynx_target_ops): Update.
2900 (lynx_process_target::sw_breakpoint_from_kind): Define.
2901 * lynx-low.h (class lynx_process_target): Update.
2902 * nto-low.cc (nto_target_ops): Update.
2903 (nto_sw_breakpoint_from_kind): Turn into ...
2904 (nto_process_target::sw_breakpoint_from_kind): ... this.
2905 * nto-low.h (class nto_process_target): Update.
2906 * win32-low.cc (win32_target_ops): Update.
2907 (win32_sw_breakpoint_from_kind): Turn into ...
2908 (win32_process_target::sw_breakpoint_from_kind): ... this.
2909 * win32-low.h (class win32_process_target): Update.
2910
2911 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2912
2913 Turn process_stratum_target's multifs_open, multifs_readlink,
2914 multifs_unlink ops into methods of process_target.
2915
2916 * target.h (struct process_stratum_target): Remove the target ops.
2917 (class process_target): Add the target ops. Also add
2918 'supports_multifs'.
2919 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
2920 "sys/stat.h".
2921 (process_target::supports_multifs): Define.
2922 (process_target::multifs_open): Define.
2923 (process_target::multifs_readlink): Define.
2924 (process_target::multifs_unlink): Define.
2925
2926 Update the derived classes and callers below.
2927
2928 * hostio.cc (handle_setfs): Update.
2929 (handle_open): Update.
2930 (handle_unlink): Update.
2931 (handle_readlink): Update.
2932 * linux-low.cc (linux_target_ops): Update.
2933 (linux_process_target::supports_multifs): Define.
2934 (linux_process_target::multifs_open): Define.
2935 (linux_process_target::multifs_readlink): Define.
2936 (linux_process_target::multifs_unlink): Define.
2937 * linux-low.h (class linux_process_target): Update.
2938 * lynx-low.cc (lynx_target_ops): Update.
2939 * nto-low.cc (nto_target_ops): Update.
2940 * win32-low.cc (win32_target_ops): Update.
2941
2942 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2943
2944 Turn process_stratum_target's pid_to_exec_file op into a method
2945 of process_target.
2946
2947 * target.h (struct process_stratum_target): Remove the target op.
2948 (class process_target): Add the target op. Also add
2949 'supports_pid_to_exec_file'.
2950 * target.cc (process_target::pid_to_exec_file): Define.
2951 (process_target::supports_pid_to_exec_file): Define.
2952
2953 Update the derived classes and callers below.
2954
2955 * server.cc (handle_qxfer_exec_file): Update.
2956 (handle_query): Update.
2957 * linux-low.cc (linux_target_ops): Update.
2958 (linux_process_target::supports_pid_to_exec_file): Define.
2959 (linux_process_target::pid_to_exec_file): Define.
2960 * linux-low.h (class linux_process_target): Update.
2961 * lynx-low.cc (lynx_target_ops): Update.
2962 * nto-low.cc (nto_target_ops): Update.
2963 * win32-low.cc (win32_target_ops): Update.
2964
2965 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2966
2967 Turn process_stratum_target's supports_range_stepping op into a
2968 method of process_target.
2969
2970 * target.h (struct process_stratum_target): Remove the target op.
2971 (class process_target): Add the target op.
2972 (target_supports_range_stepping): Update the macro.
2973 * target.cc (process_target::supports_range_stepping): Define.
2974
2975 Update the derived classes and callers below.
2976
2977 * linux-low.cc (linux_target_ops): Update.
2978 (linux_supports_range_stepping): Turn into ...
2979 (linux_process_target::supports_range_stepping): ... this.
2980 * linux-low.h (class linux_process_target): Update.
2981 * lynx-low.cc (lynx_target_ops): Update.
2982 * nto-low.cc (nto_target_ops): Update.
2983 * win32-low.cc (win32_target_ops): Update.
2984
2985 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2986
2987 Turn process_stratum_target's btrace-related ops (enable_btrace,
2988 disable_btrace, read_btrace, read_btrace_conf) into methods of
2989 process_target.
2990
2991 * target.h (struct process_stratum_target): Remove the target ops.
2992 (class process_target): Add the target ops.
2993 (target_enable_btrace): Update.
2994 (target_disable_btrace): Update.
2995 (target_read_btrace): Update.
2996 (target_read_btrace_conf): Update.
2997 * target.cc (process_target::enable_btrace): Define.
2998 (process_target::disable_btrace): Define.
2999 (process_target::read_btrace): Define.
3000 (process_target::read_btrace_conf): Define.
3001
3002 Update the derived classes and callers below.
3003
3004 * linux-low.cc (linux_target_ops): Update.
3005 (linux_process_target:enable_btrace): Define as a wrapper around
3006 linux_enable_btrace.
3007 (linux_low_disable_btrace): Turn into ...
3008 (linux_process_target::disable_btrace): ... this.
3009 (linux_low_read_btrace): Turn into ...
3010 (linux_process_target::read_btrace): ... this.
3011 (linux_low_btrace_conf): Turn into ...
3012 (linux_process_target::read_btrace_conf): ... this.
3013 * linux-low.h (class linux_process_target): Update.
3014 * lynx-low.cc (lynx_target_ops): Update.
3015 * nto-low.cc (nto_target_ops): Update.
3016 * win32-low.cc (win32_target_ops): Update.
3017
3018 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3019
3020 Turn process_stratum_target's supports_agent op into a method of
3021 process_target.
3022
3023 * target.h (struct process_stratum_target): Remove the target op.
3024 (class process_target): Add the target op.
3025 (target_supports_agent): Update the macro.
3026 * target.cc (process_target::supports_agent): Define.
3027
3028 Update the derived classes and callers below.
3029
3030 * linux-low.cc (linux_target_ops): Update.
3031 (linux_supports_agent): Turn into ...
3032 (linux_process_target::supports_agent): ... this.
3033 * linux-low.h (class linux_process_target): Update.
3034 * lynx-low.cc (lynx_target_ops): Update.
3035 * nto-low.cc (nto_target_ops): Update.
3036 * win32-low.cc (win32_target_ops): Update.
3037
3038 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3039
3040 Turn process_stratum_target's qxfer_libraries_svr4 op into a
3041 method of process_target.
3042
3043 * target.h (struct process_stratum_target): Remove the target op.
3044 (class process_target): Add the target op. Also add
3045 'supports_qxfer_libraries_svr4'.
3046 * target.cc (process_target::qxfer_libraries_svr4): Define.
3047 (process_target::supports_qxfer_libraries_svr4): Define.
3048
3049 Update the derived classes and callers below.
3050
3051 * server.cc (handle_qxfer_libraries_svr4): Update.
3052 (handle_query): Update.
3053 * linux-low.cc (linux_target_ops): Update.
3054 (linux_process_target::supports_qxfer_libraries_svr4): Define.
3055 (linux_qxfer_libraries_svr4): Turn into ...
3056 (linux_process_target::qxfer_libraries_svr4): ... this.
3057 * linux-low.h (class linux_process_target): Update.
3058 * lynx-low.cc (lynx_target_ops): Update.
3059 * nto-low.cc (nto_target_ops): Update.
3060 * win32-low.cc (win32_target_ops): Update.
3061
3062 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3063
3064 Turn process_stratum_target's supports_disable_randomization op
3065 into a method of process_target.
3066
3067 * target.h (struct process_stratum_target): Remove the target op.
3068 (class process_target): Add the target op.
3069 (target_supports_disable_randomization): Update the macro.
3070 * target.cc (process_target::supports_disable_randomization): Define.
3071
3072 Update the derived classes and callers below.
3073
3074 * linux-low.cc (linux_target_ops): Update.
3075 (linux_supports_disable_randomization): Turn into ...
3076 (linux_process_target::supports_disable_randomization): ... this.
3077 * linux-low.h (class linux_process_target): Update.
3078 * lynx-low.cc (lynx_target_ops): Update.
3079 * nto-low.cc (nto_target_ops): Update.
3080 * win32-low.cc (win32_target_ops): Update.
3081
3082 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3083
3084 Turn process_stratum_target's emit_ops op into a method of
3085 process_target.
3086
3087 * target.h (struct process_stratum_target): Remove the target op.
3088 (class process_target): Add the target op.
3089 (target_emit_ops): Update the macro.
3090 * target.cc (process_target::emit_ops): Define.
3091
3092 Update the derived classes and callers below.
3093
3094 * linux-low.cc (linux_target_ops): Update.
3095 (linux_emit_ops): Turn into ...
3096 (linux_process_target::emit_ops): ... this.
3097 * linux-low.h (class linux_process_target): Update.
3098 * lynx-low.cc (lynx_target_ops): Update.
3099 * nto-low.cc (nto_target_ops): Update.
3100 * win32-low.cc (win32_target_ops): Update.
3101
3102 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3103
3104 Turn process_stratum_target's install_fast_tracepoint_jump_pad
3105 and get_min_fast_tracepoint_insn_len ops into methods of
3106 process_target.
3107
3108 * target.h (struct process_stratum_target): Remove the target ops.
3109 (class process_target): Add the target ops. Also add
3110 'supports_fast_tracepoints'.
3111 (target_supports_fast_tracepoints): Update the macro.
3112 (target_get_min_fast_tracepoint_insn_len): Update the macro.
3113 (install_fast_tracepoint_jump_pad): Update and rename the macro
3114 to ...
3115 (target_install_fast_tracepoint_jump_pad): ... this.
3116 * target.cc (process_target::supports_fast_tracepoints): Define.
3117 (process_target::install_fast_tracepoint_jump_pad): Define.
3118 (process_target::get_min_fast_tracepoint_insn_len): Define.
3119
3120 Update the derived classes and callers below.
3121
3122 * tracepoint.cc (install_fast_tracepoint): Update.
3123 * linux-low.cc (linux_target_ops): Update.
3124 (linux_process_target::supports_fast_tracepoints): Define.
3125 (linux_install_fast_tracepoint_jump_pad): Turn into ...
3126 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
3127 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
3128 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
3129 * linux-low.h (class linux_process_target): Update.
3130 * lynx-low.cc (lynx_target_ops): Update.
3131 * nto-low.cc (nto_target_ops): Update.
3132 * win32-low.cc (win32_target_ops): Update.
3133
3134 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3135
3136 Turn process_stratum_target's stabilize_threads op into a
3137 method of process_target.
3138
3139 * target.h (struct process_stratum_target): Remove the target op.
3140 (class process_target): Add the target op.
3141 (target_stabilize_threads): Update the macro.
3142 * target.cc (process_target::stabilize_threads): Define.
3143
3144 Update the derived classes and callers below.
3145
3146 * server.cc (handle_status): Update.
3147 * tracepoint.cc (cmd_qtdp): Update.
3148 (cmd_qtstart): Update.
3149 * linux-low.cc (linux_target_ops): Update.
3150 (linux_stabilize_threads): Turn into ...
3151 (linux_process_target::stabilize_threads): ... this.
3152 (linux_wait_1): Update.
3153 * linux-low.h (class linux_process_target): Update.
3154 * lynx-low.cc (lynx_target_ops): Update.
3155 * nto-low.cc (nto_target_ops): Update.
3156 * win32-low.cc (win32_target_ops): Update.
3157
3158 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3159
3160 Turn process_stratum_target's pause_all and unpause_all ops
3161 into methods of process_target.
3162
3163 * target.h (struct process_stratum_target): Remove the target ops.
3164 (class process_target): Add the target ops.
3165 (pause_all): Update the macro and rename to...
3166 (target_pause_all): ... this.
3167 (unpause_all): Update the macro and rename to...
3168 (target_unpause_all): ... this.
3169 * target.cc (process_target::pause_all): Define.
3170 (process_target::unpause_all): Define.
3171
3172 Update the derived classes and callers below.
3173
3174 * server.cc (handle_status): Update.
3175 * tracepoint.cc (clear_installed_tracepoints): Update.
3176 (cmd_qtdp): Update.
3177 (cmd_qtstart): Update.
3178 (stop_tracing): Update.
3179 (cmd_qtstatus): Update.
3180 (upload_fast_traceframes): Update.
3181 (run_inferior_command): Update.
3182 * linux-low.cc (linux_target_ops): Update.
3183 (linux_pause_all): Turn into ...
3184 (linux_process_target::pause_all): ... this.
3185 (linux_unpause_all): Turn into ...
3186 (linux_process_target::unpause_all): ... this.
3187 (linux_process_target::prepare_to_access_memory): Update.
3188 (linux_process_target::done_accessing_memory): Update.
3189 * linux-low.h (class linux_process_target): Update.
3190 * lynx-low.cc (lynx_target_ops): Update.
3191 * nto-low.cc (nto_target_ops): Update.
3192 * win32-low.cc (win32_target_ops): Update.
3193
3194 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3195
3196 Turn process_stratum_target's get_tib_address op into a method of
3197 process_target.
3198
3199 * target.h (struct process_stratum_target): Remove the target op.
3200 (class process_target): Add the target op. Also add
3201 'supports_get_tib_address'.
3202 * target.cc (process_target::get_tib_address): Define.
3203 (process_target::supports_get_tib_address): Define.
3204
3205 Update the derived classes and callers below.
3206
3207 * server.cc (handle_query): Update.
3208 * linux-low.cc (win32_target_ops): Update.
3209 * lynx-low.cc (lynx_target_ops): Update.
3210 * nto-low.cc (nto_target_ops): Update.
3211 * win32-low.cc (win32_target_ops): Update.
3212 (win32_process_target::supports_get_tib_address): Define.
3213 (win32_get_tib_address): Turn into ...
3214 (win32_process_target::get_tib_address): ... this.
3215 * win32-low.h (class win32_process_target): Update.
3216
3217 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3218
3219 Turn process_stratum_target's thread_stopped op into a method of
3220 process_target.
3221
3222 * target.h (struct process_stratum_target): Remove the target op.
3223 (class process_target): Add the target op. Also add
3224 'supports_thread_stopped'.
3225 (target_thread_stopped): Update the macro.
3226 * target.cc (process_target::thread_stopped): Define.
3227 (process_target::supports_thread_stopped): Define.
3228 (prepare_to_access_memory): Update.
3229
3230 Update the derived classes and callers below.
3231
3232 * server.cc (queue_stop_reply_callback): Update.
3233 * linux-low.cc (linux_target_ops): Update.
3234 (linux_process_target::supports_thread_stopped): Define.
3235 (linux_thread_stopped): Turn into ...
3236 (linux_process_target::thread_stopped): ... this.
3237 * linux-low.h (class linux_process_target): Update.
3238 * lynx-low.cc (lynx_target_ops): Update.
3239 * nto-low.cc (nto_target_ops): Update.
3240 * win32-low.cc (win32_target_ops): Update.
3241
3242 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3243
3244 Turn process_stratum_target's read_pc and write_pc ops into
3245 methods of process_target.
3246
3247 * target.h (struct process_stratum_target): Remove the target ops.
3248 (class process_target): Add the target ops.
3249 * target.cc (process_target::read_pc): Define.
3250 (process_target::write_pc): Define.
3251
3252 Update the derived classes and callers below.
3253
3254 * regcache.cc (regcache_read_pc): Update.
3255 (regcache_write_pc): Update.
3256 * linux-low.cc (linux_target_ops): Update.
3257 (linux_read_pc): Turn into ...
3258 (linux_process_target::read_pc): ... this.
3259 (linux_write_pc): Turn into ...
3260 (linux_process_target::write_pc): ... this.
3261 * linux-low.h (class linux_process_target): Update.
3262 * lynx-low.cc (lynx_target_ops): Update.
3263 * nto-low.cc (nto_target_ops): Update.
3264 * win32-low.cc (win32_target_ops): Update.
3265
3266 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3267
3268 Turn process_stratum_target's supports_tracepoints op into a
3269 method of process_target.
3270
3271 * target.h (struct process_stratum_target): Remove the target op.
3272 (class process_target): Add the target op.
3273 (target_supports_tracepoints): Update the macro.
3274 * target.cc (process_target::supports_tracepoints): Define.
3275
3276 Update the derived classes and callers below.
3277
3278 * linux-low.cc (linux_target_ops): Update.
3279 (linux_supports_tracepoints): Turn into ...
3280 (linux_process_target::supports_tracepoints): ... this.
3281 * linux-low.h (class linux_process_target): Update.
3282 * lynx-low.cc (lynx_target_ops): Update.
3283 * nto-low.cc (nto_target_ops): Update.
3284 * win32-low.cc (win32_target_ops): Update.
3285
3286 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3287
3288 Turn process_stratum_target's process_qsupported op into a method
3289 of process_target.
3290
3291 * target.h (struct process_stratum_target): Remove the target op.
3292 (class process_target): Add the target op.
3293 (target_process_qsupported): Update the macro.
3294 * target.cc (process_target::process_qsupported): Define.
3295
3296 Update the derived classes and callers below.
3297
3298 * linux-low.cc (linux_target_ops): Update.
3299 (linux_process_qsupported): Turn into ...
3300 (linux_process_target::process_qsupported): ... this.
3301 * linux-low.h (class linux_process_target): Update.
3302 * lynx-low.cc (lynx_target_ops): Update.
3303 * nto-low.cc (nto_target_ops): Update.
3304 * win32-low.cc (win32_target_ops): Update.
3305
3306 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3307
3308 Turn process_stratum_target's read_loadmap op into a method of
3309 process_target.
3310
3311 * target.h (struct process_stratum_target): Remove the target op.
3312 (class process_target): Add the target op. Also add
3313 'supports_read_loadmap'.
3314 * target.cc (process_target::read_loadmap): Define.
3315 (process_target::supports_read_loadmap): Define.
3316
3317 Update the derived classes and callers below.
3318
3319 * server.cc (handle_qxfer_fdpic): Update.
3320 (handle_query): Update.
3321 * linux-low.cc (linux_target_ops): Update.
3322 (linux_process_target::supports_read_loadmap): Define.
3323 (linux_read_loadmap): Turn into ...
3324 (linux_process_target::read_loadmap): ... this.
3325 * linux-low.h (class linux_process_target): Update.
3326 * lynx-low.cc (lynx_target_ops): Update.
3327 * nto-low.cc (nto_target_ops): Update.
3328 * win32-low.cc (win32_target_ops): Update.
3329
3330 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3331
3332 Turn process_stratum_target's core_of_thread op into a method of
3333 process_target.
3334
3335 * target.h (struct process_stratum_target): Remove the target op.
3336 (class process_target): Add the target op.
3337 (target_core_of_thread): Update the macro.
3338 * target.cc (process_target::core_of_thread): Define.
3339
3340 Update the derived classes and callers below.
3341
3342 * linux-low.cc (linux_target_ops): Update.
3343 (linux_process_target::core_of_thread): Define.
3344 * linux-low.h (class linux_process_target): Update.
3345 * lynx-low.cc (lynx_target_ops): Update.
3346 * nto-low.cc (nto_target_ops): Update.
3347 * win32-low.cc (win32_target_ops): Update.
3348
3349 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3350
3351 Turn process_stratum_target's handle_monitor_command op into a
3352 method of process_target.
3353
3354 * target.h (struct process_stratum_target): Remove the target op.
3355 (class process_target): Add the target op.
3356 (target_handle_monitor_command): Update the macro.
3357 * target.cc (process_target::handle_monitor_command): Define.
3358
3359 Update the derived classes and callers below.
3360
3361 * server.cc (handle_query): Update.
3362 * linux-low.cc (linux_target_ops): Update.
3363 (linux_process_target::handle_monitor_command): Define.
3364 * linux-low.h (class linux_process_target): Update.
3365 * lynx-low.cc (lynx_target_ops): Update.
3366 * nto-low.cc (nto_target_ops): Update.
3367 * win32-low.cc (win32_target_ops): Update.
3368
3369 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3370
3371 Turn process_stratum_target's handle_new_gdb_connection op into a
3372 method of process_target.
3373
3374 * target.h (struct process_stratum_target): Remove the target op.
3375 (class process_target): Add the target op.
3376 (target_handle_new_gdb_connection): Update the macro.
3377 * target.cc (process_target::handle_new_gdb_connection): Define.
3378
3379 Update the derived classes and callers below.
3380
3381 * linux-low.cc (linux_target_ops): Update.
3382 (linux_handle_new_gdb_connection): Turn into ...
3383 (linux_process_target::handle_new_gdb_connection): ... this.
3384 * linux-low.h (class linux_process_target): Update.
3385 * lynx-low.cc (lynx_target_ops): Update.
3386 * nto-low.cc (nto_target_ops): Update.
3387 * win32-low.cc (win32_target_ops): Update.
3388
3389 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3390
3391 Turn process_stratum_target's supports_fork_events,
3392 supports_vfork_events, and supports_exec_events ops into methods
3393 of process_target.
3394
3395 * target.h (struct process_stratum_target): Remove the target ops.
3396 (class process_target): Add the target ops.
3397 (target_supports_fork_events): Update the macro.
3398 (target_supports_vfork_events): Update the macro.
3399 (target_supports_exec_events): Update the macro.
3400 * target.cc (process_target::supports_fork_events): Define.
3401 (process_target::supports_vfork_events): Define.
3402 (process_target::supports_exec_events): Define.
3403
3404 Update the derived classes and callers below.
3405
3406 * linux-low.cc (linux_target_ops): Update.
3407 (linux_supports_fork_events): Turn into ...
3408 (linux_process_target::supports_fork_events): ... this.
3409 (linux_supports_vfork_events): Turn into ...
3410 (linux_process_target::supports_vfork_events): ... this.
3411 (linux_supports_exec_events): Turn into ...
3412 (linux_process_target::supports_exec_events): ... this.
3413 * linux-low.h (class linux_process_target): Update.
3414 * lynx-low.cc (lynx_target_ops): Update.
3415 * nto-low.cc (nto_target_ops): Update.
3416 * win32-low.cc (win32_target_ops): Update.
3417
3418 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3419
3420 Turn process_stratum_target's supports_multi_process op into a
3421 method of process_target.
3422
3423 * target.h (struct process_stratum_target): Remove the target op.
3424 (class process_target): Add the target op.
3425 * target.cc (process_target::supports_multi_process): Define.
3426 (target_supports_multi_process): Update.
3427
3428 Update the derived classes and callers below.
3429
3430 * linux-low.cc (linux_target_ops): Update.
3431 (linux_supports_multi_process): Turn into ...
3432 (linux_process_target::supports_multi_process): ... this.
3433 * linux-low.h (class linux_process_target): Update.
3434 * lynx-low.cc (lynx_target_ops): Update.
3435 * nto-low.cc (nto_target_ops): Update.
3436 * win32-low.cc (win32_target_ops): Update.
3437
3438 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3439
3440 Turn process_stratum_target's supports_non_stop, async, and
3441 start_non_stop ops into methods of process_target.
3442
3443 * target.h (struct process_stratum_target): Remove the target ops.
3444 (class process_target): Add the target ops.
3445 (target_supports_non_stop): Update the macro.
3446 (target_async): Update the macro.
3447 (start_non_stop): Remove declaration.
3448 * target.cc (process_target::supports_non_stop): Define.
3449 (process_target::async): Define.
3450 (process_target::start_non_stop): Define.
3451 (start_non_stop): Remove.
3452
3453 Update the derived classes and callers below.
3454
3455 * server.cc (handle_qxfer_siginfo): Update.
3456 (handle_query): Update.
3457 * linux-low.cc (linux_target_ops): Update.
3458 (linux_supports_non_stop): Turn into ...
3459 (linux_process_target::supports_non_stop): ... this.
3460 (linux_async): Turn into ...
3461 (linux_process_target::async): ... this.
3462 (linux_start_non_stop): Turn into ...
3463 (linux_process_target::start_non_stop): ... this.
3464 * linux-low.h (class linux_process_target): Update.
3465 * lynx-low.cc (lynx_target_ops): Update.
3466 * nto-low.cc (nto_target_ops): Update.
3467 (nto_supports_non_stop): Remove; rely on the default behavior
3468 instead.
3469 * win32-low.cc (win32_target_ops): Update.
3470
3471 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3472
3473 Turn process_stratum_target's qxfer_siginfo op into a method of
3474 process_target.
3475
3476 * target.h (struct process_stratum_target): Remove the target op.
3477 (class process_target): Add the target op. Also add
3478 'supports_qxfer_siginfo'.
3479 * target.cc (process_target::qxfer_siginfo): Define.
3480 (process_target::supports_qxfer_siginfo): Define.
3481
3482 Update the derived classes and callers below.
3483
3484 * server.cc (handle_qxfer_siginfo): Update.
3485 (handle_query): Update.
3486 * linux-low.cc (linux_target_ops): Update.
3487 (linux_process_target::supports_qxfer_siginfo): Define.
3488 (linux_xfer_siginfo): Turn into ...
3489 (linux_process_target::qxfer_siginfo): ... this.
3490 * linux-low.h (class linux_process_target): Update.
3491 * lynx-low.cc (lynx_target_ops): Update.
3492 * nto-low.cc (nto_target_ops): Update.
3493 * win32-low.cc (win32_target_ops): Update.
3494
3495 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3496
3497 Turn process_stratum_target's qxfer_osdata op into a method of
3498 process_target.
3499
3500 * target.h (struct process_stratum_target): Remove the target op.
3501 (class process_target): Add the target op. Also add
3502 'supports_qxfer_osdata'.
3503 * target.cc (process_target::qxfer_osdata): Define.
3504 (process_target::supports_qxfer_osdata): Define.
3505
3506 Update the derived classes and callers below.
3507
3508 * server.cc (handle_qxfer_osdata): Update.
3509 (handle_query): Update.
3510 * linux-low.cc (linux_target_ops): Update.
3511 (linux_process_target::supports_qxfer_osdata): Define.
3512 (linux_qxfer_osdata): Turn into ...
3513 (linux_process_target::qxfer_osdata): ... this.
3514 * linux-low.h (class linux_process_target): Update.
3515 * lynx-low.cc (lynx_target_ops): Update.
3516 * nto-low.cc (nto_target_ops): Update.
3517 * win32-low.cc (win32_target_ops): Update.
3518
3519 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3520
3521 Turn process_stratum_target's hostio_last_error op into a
3522 method of process_target.
3523
3524 * target.h (struct process_stratum_target): Remove the target op.
3525 (class process_target): Add the target op.
3526 * target.cc: Add "hostio.h" to includes.
3527 (process_target::hostio_last_error): Define.
3528
3529 Update the derived classes and callers below.
3530
3531 * hostio.cc (hostio_error): Update.
3532 * linux-low.cc: Remove "hostio.h" from includes.
3533 (linux_target_ops): Update.
3534 * lynx-low.cc (lynx_target_ops): Update.
3535 * nto-low.cc (nto_target_ops): Update.
3536 * win32-low.h (class win32_process_target): Update.
3537 * win32-low.cc (win32_target_ops): Update.
3538 (wince_hostio_last_error): Turn into ...
3539 (win32_process_target::hostio_last_error): ... this.
3540
3541 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3542
3543 Turn process_stratum_target's get_tls_address op into a method of
3544 process_target.
3545
3546 * target.h (struct process_stratum_target): Remove the target op.
3547 (class process_target): Add the target op. Also add
3548 'supports_get_tls_address'.
3549 * target.cc (process_target::get_tls_address): Define.
3550 (process_target::supports_get_tls_address): Define.
3551
3552 Update the derived classes and callers below.
3553
3554 * server.cc (handle_query): Update.
3555 * linux-low.cc (linux_target_ops): Update.
3556 (linux_process_target::supports_get_tls_address): Define.
3557 (linux_process_target::get_tls_address): Define.
3558 * linux-low.h (class linux_process_target): Update.
3559 * lynx-low.cc (lynx_target_ops): Update.
3560 * nto-low.cc (nto_target_ops): Update.
3561 * win32-low.cc (win32_target_ops): Update.
3562
3563 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3564
3565 Turn process_stratum_target's read_offsets op into a method of
3566 process_target.
3567
3568 * target.h (struct process_stratum_target): Remove the target op.
3569 (class process_target): Add the target op. Also add
3570 'supports_read_offsets'.
3571 * target.cc (process_target::read_offsets): Define.
3572 (process_target::supports_read_offsets): Define.
3573
3574 Update the derived classes and callers below.
3575
3576 * server.cc (handle_query): Update.
3577 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
3578 (linux_target_ops): Update.
3579 (linux_process_target::supports_read_offsets): Define.
3580 (linux_read_offsets): Turn into ...
3581 (linux_process_target::read_offsets): ... this.
3582 * linux-low.h (class linux_process_target): Update.
3583 * lynx-low.cc (lynx_target_ops): Update.
3584 * nto-low.cc (nto_target_ops): Update.
3585 * win32-low.cc (win32_target_ops): Update.
3586
3587 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3588
3589 Turn process_stratum_target's stopped_by_watchpoint and
3590 stopped_data_address ops into methods of process_target.
3591
3592 * target.h (struct process_stratum_target): Remove the target ops.
3593 (class process_target): Add the target ops.
3594 * target.cc (process_target::stopped_by_watchpoint): Define.
3595 (process_target::stopped_data_address): Define.
3596
3597 Update the derived classes and callers below.
3598
3599 * remote-utils.cc (prepare_resume_reply): Update.
3600 * linux-low.cc (linux_target_ops): Update.
3601 (linux_stopped_by_watchpoint): Turn into ...
3602 (linux_process_target::stopped_by_watchpoint): ... this.
3603 (linux_stopped_data_address): Turn into ...
3604 (linux_process_target::stopped_data_address): ... this.
3605 * linux-low.h (class linux_process_target): Update.
3606 * lynx-low.cc (lynx_target_ops): Update.
3607 * nto-low.cc (nto_target_ops): Update.
3608 (nto_stopped_by_watchpoint): Turn into ...
3609 (nto_process_target::stopped_by_watchpoint): ... this.
3610 (nto_stopped_data_address): Turn into ...
3611 (nto_process_target::stopped_data_address): ... this.
3612 * nto-low.h (class nto_process_target): Update.
3613 * win32-low.cc (win32_target_ops): Update.
3614 (win32_stopped_by_watchpoint): Turn into ...
3615 (win32_process_target::stopped_by_watchpoint): ... this.
3616 (win32_stopped_data_address): Turn into ...
3617 (win32_process_target::stopped_data_address): ... this.
3618 * win32-low.h (class win32_process_target): Update.
3619
3620 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3621
3622 Turn process_stratum_target's supports_hardware_single_step op into
3623 a method of process_target.
3624
3625 * target.h (struct process_stratum_target): Remove the target op.
3626 (class process_target): Add the target op.
3627 (target_supports_hardware_single_step): Update the macro.
3628 (target_can_do_hardware_single_step): Remove declaration.
3629 * target.cc (process_target::supports_hardware_single_step): Define.
3630 (target_can_do_hardware_single_step): Remove.
3631
3632 Update the derived classes and callers below.
3633
3634 * linux-low.h (class linux_process_target): Update.
3635 * linux-low.cc (linux_target_ops): Update.
3636 (linux_supports_hardware_single_step): Turn into ...
3637 (linux_process_target::supports_hardware_single_step): ... this.
3638 * lynx-low.h (class lynx_process_target): Update.
3639 * lynx-low.cc (lynx_target_ops): Update.
3640 (lynx_process_target::supports_hardware_single_step): Define.
3641 * nto-low.h (class nto_process_target): Update.
3642 * nto-low.cc (nto_target_ops): Update.
3643 (nto_process_target::supports_hardware_single_step): Define.
3644 * win32-low.h (class win32_process_target): Update.
3645 * win32-low.cc (win32_target_ops): Update.
3646 (win32_process_target::supports_hardware_single_step): Define.
3647
3648 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3649
3650 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
3651 ops into methods of process_target.
3652
3653 * target.h (struct process_stratum_target): Remove the target ops.
3654 (class process_target): Add the target ops.
3655 (target_stopped_by_hw_breakpoint): Update the macro.
3656 (target_supports_stopped_by_hw_breakpoint): Update the macro.
3657 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
3658 (process_target::supports_stopped_by_hw_breakpoint): Define.
3659
3660 Update the derived classes and callers below.
3661
3662 * linux-low.cc (linux_target_ops): Update.
3663 (linux_stopped_by_hw_breakpoint): Turn into ...
3664 (linux_process_target::stopped_by_hw_breakpoint): ... this.
3665 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
3666 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
3667 * linux-low.h (class linux_process_target): Update.
3668 * lynx-low.cc (lynx_target_ops): Update.
3669 * nto-low.cc (nto_target_ops): Update.
3670 * win32-low.cc (win32_target_ops): Update.
3671
3672 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3673
3674 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
3675 ops into methods of process_target.
3676
3677 * target.h (struct process_stratum_target): Remove the target ops.
3678 (class process_target): Add the target ops.
3679 (target_stopped_by_sw_breakpoint): Update the macro.
3680 (target_supports_stopped_by_sw_breakpoint): Update the macro.
3681 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
3682 (process_target::supports_stopped_by_sw_breakpoint): Define.
3683
3684 Update the derived classes and callers below.
3685
3686 * linux-low.cc (linux_target_ops): Update.
3687 (linux_stopped_by_sw_breakpoint): Turn into ...
3688 (linux_process_target::stopped_by_sw_breakpoint): ... this.
3689 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
3690 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
3691 * linux-low.h (class linux_process_target): Update.
3692 * lynx-low.cc (lynx_target_ops): Update.
3693 * nto-low.cc (nto_target_ops): Update.
3694 * win32-low.cc (win32_target_ops): Update.
3695
3696 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3697
3698 Turn process_stratum_target's insert_point and remove_point ops
3699 into methods of process_target.
3700
3701 * target.h (struct process_stratum_target): Remove the target ops.
3702 (class process_target): Add the target ops.
3703 * target.cc (process_target::insert_point): Define.
3704 (process_target::remove_point): Define.
3705
3706 Update the derived classes and callers below.
3707
3708 * mem-break.cc (set_raw_breakpoint_at): Update.
3709 (delete_raw_breakpoint): Update.
3710 (uninsert_raw_breakpoint): Update.
3711 (reinsert_raw_breakpoint): Update.
3712 * linux-low.cc (linux_target_ops): Update.
3713 (linux_insert_point): Turn into ...
3714 (linux_process_target::insert_point): ... this.
3715 (linux_remove_point): Turn into ...
3716 (linux_process_target::remove_point): ... this.
3717 * linux-low.h (class linux_process_target): Update.
3718 * lynx-low.cc (lynx_target_ops): Update.
3719 * nto-low.cc (nto_target_ops): Update.
3720 (nto_insert_point): Turn into ...
3721 (nto_process_target::insert_point): ... this.
3722 (nto_remove_point): Turn into ...
3723 (nto_process_target::remove_point): ... this.
3724 * nto-low.h (class nto_process_target): Update.
3725 * win32-low.cc (win32_target_ops): Update.
3726 (win32_insert_point): Turn into ...
3727 (win32_process_target::insert_point): ... this.
3728 (win32_remove_point): Turn into ...
3729 (win32_process_target::remove_point): ... this.
3730 * win32-low.h (class win32_process_target): Update.
3731
3732 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3733
3734 Turn process_stratum_target's supports_z_point_type op into a
3735 method of process_target.
3736
3737 * target.h (struct process_stratum_target): Remove the target op.
3738 (class process_target): Add the target op.
3739 * target.cc (process_target::supports_z_point_type): Define.
3740
3741 Update the derived classes and callers below.
3742
3743 * mem-break.cc (z_type_supported): Update.
3744 * linux-low.cc (linux_target_ops): Update.
3745 (linux_supports_z_point_type): Turn into ...
3746 (linux_process_target::supports_z_point_type): ... this.
3747 * linux-low.h (class linux_process_target): Update.
3748 * lynx-low.cc (lynx_target_ops): Update.
3749 * nto-low.cc (nto_target_ops): Update.
3750 (nto_supports_z_point_type): Turn into ...
3751 (nto_process_target::supports_z_point_type): ... this.
3752 * nto-low.h (class nto_process_target): Update.
3753 * win32-low.cc (win32_target_ops): Update.
3754 (win32_supports_z_point_type): Turn into ...
3755 (win32_process_target::supports_z_point_type): ... this.
3756 * win32-low.h (class win32_process_target): Update.
3757
3758 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3759
3760 Turn process_stratum_target's read_auxv op into a method of
3761 process_target.
3762
3763 * target.h (class process_stratum_target): Remove the target op.
3764 (struct process_target): Add the target op. Also add
3765 'supports_read_auxv'.
3766 * target.cc (process_target::read_auxv): Define.
3767 (process_target::supports_read_auxv): Define.
3768
3769 Update the derived classes and callers below.
3770
3771 * server.cc (handle_qxfer_auxv): Update.
3772 (handle_query): Update.
3773 * linux-low.cc (linux_target_ops): Update.
3774 (linux_process_target::supports_read_auxv): Define.
3775 (linux_read_auxv): Turn into ...
3776 (linux_process_target::read_auxv): ... this.
3777 * linux-low.h (class linux_process_target): Update.
3778 * lynx-low.cc (lynx_target_ops): Update.
3779 * nto-low.cc (nto_target_ops): Update.
3780 (nto_process_target::supports_read_auxv): Define.
3781 (nto_read_auxv): Turn into ...
3782 (nto_process_target::read_auxv): ... this.
3783 * nto-low.h (class nto_process_target): Update.
3784 * win32-low.cc (win32_target_ops): Update.
3785
3786 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3787
3788 Turn process_stratum_target's request_interrupt op into a method of
3789 process_target.
3790
3791 * target.h (struct process_stratum_target): Remove the target op.
3792 (class process_target): Add the target op.
3793
3794 Update the derived classes and callers below.
3795
3796 * remote-utils.cc (putpkt_binary_1): Update.
3797 (input_interrupt): Update.
3798 (getpkt): Update.
3799 * server.cc (handle_v_requests): Update.
3800 * linux-low.cc (linux_target_ops): Update.
3801 (linux_request_interrupt): Turn into ...
3802 (linux_process_target::request_interrupt): ... this.
3803 * linux-low.h (class linux_process_target): Update.
3804 * lynx-low.cc (lynx_target_ops): Update.
3805 (lynx_request_interrupt): Turn into ...
3806 (lynx_process_target::request_interrupt): ... this.
3807 * lynx-low.h (class lynx_process_target): Update.
3808 * nto-low.cc (nto_target_ops): Update.
3809 (nto_request_interrupt): Turn into ...
3810 (nto_process_target::request_interrupt): ... this.
3811 * nto-low.h (class nto_process_target): Update.
3812 * win32-low.cc (win32_target_ops): Update.
3813 (win32_request_interrupt): Turn into ...
3814 (win32_process_target::request_interrupt): ... this.
3815 * win32-low.h (class win32_process_target): Update.
3816
3817 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3818
3819 Turn process_stratum_target's look_up_symbols op into a method of
3820 process_target.
3821
3822 * target.h (struct process_stratum_target): Remove the target op.
3823 (class process_target): Add the target op.
3824 * target.cc (process_target::look_up_symbols): Define.
3825
3826 Update the derived classes and callers below.
3827
3828 * server.cc (handle_query): Update.
3829 * linux-low.cc (linux_target_ops): Update.
3830 (linux_look_up_symbols): Turn into ...
3831 (linux_process_target::look_up_symbols): ... this.
3832 * linux-low.h (class linux_process_target): Update.
3833 * lynx-low.cc (lynx_target_ops): Update.
3834 * nto-low.cc (nto_target_ops): Update.
3835 * win32-low.cc (win32_target_ops): Update.
3836
3837 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3838
3839 Turn process_stratum_target's read_memory and write_memory
3840 ops into methods of process_target.
3841
3842 * target.h (struct process_stratum_target): Remove the target ops.
3843 (class process_target): Add the target ops.
3844
3845 Update the derived classes and callers below.
3846
3847 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
3848 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
3849 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
3850 (arm_get_syscall_trapinfo): Update.
3851 * linux-cris-low.cc (cris_breakpoint_at): Update.
3852 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
3853 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
3854 * linux-mips-low.cc (mips_breakpoint_at): Update.
3855 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
3856 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
3857 * linux-sh-low.cc (sh_breakpoint_at): Update.
3858 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
3859 (sparc_store_gregset_from_stack): Update.
3860 (sparc_breakpoint_at): Update.
3861 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
3862 * linux-tile-low.cc (tile_breakpoint_at): Update.
3863 * linux-x86-low.cc (x86_breakpoint_at): Update.
3864 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
3865 * mem-brea.cc (insert_memory_breakpoint): Update.
3866 (validate_inserted_breakpoint): Update.
3867 * target.cc (read_inferior_memory): Update.
3868 (target_write_memory): Update.
3869 * linux-low.cc (linux_target_ops): Update.
3870 (linux_read_memory): Make a wrapper around the read_memory target
3871 op call.
3872 (linux_process_target::read_memory): Rename from linux_read_memory.
3873 (linux_write_memory): Turn into ...
3874 (linux_process_target::write_memory): ... this.
3875 * linux-low.h (class linux_process_target): Update.
3876 * lynx-low.cc (lynx_target_ops): Update.
3877 (lynx_read_memory): Turn into ...
3878 (lynx_process_target::read_memory): ... this.
3879 (lynx_write_memory): Turn into ...
3880 (lynx_process_target::write_memory): ... this.
3881 * lynx-low.h (class lynx_process_target): Update.
3882 * nto-low.cc (nto_target_ops): Update.
3883 (nto_read_memory): Turn into ...
3884 (nto_process_target::read_memory): ... this.
3885 (nto_write_memory): Turn into ...
3886 (nto_process_target::write_memory): ... this.
3887 * nto-low.h (class nto_process_target): Update.
3888 * win32-low.cc (win32_target_ops): Update.
3889 (win32_read_inferior_memory): Turn into ...
3890 (win32_process_target::read_memory): ... this.
3891 (win32_write_inferior_memory): Turn into ...
3892 (win32_process_target::write_memory): ... this.
3893 * win32-low.h (class win32_process_target): Update.
3894
3895 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3896
3897 Turn process_stratum_target's prepare_to_access_memory and
3898 done_accessing_memory ops into methods of process_target.
3899
3900 * target.h (struct process_stratum_target): Remove the target ops.
3901 (class process_target): Add the target ops.
3902 * target.cc (process_target::prepare_to_access_memory): Define.
3903 (process_target::done_accessing_memory): Define.
3904 (prepare_to_access_memory): Update.
3905 (done_accessing_memory): Update.
3906
3907 Update the derived classes and callers below.
3908
3909 * linux-low.cc (linux_target_ops): Update.
3910 (linux_prepare_to_access_memory): Turn into ...
3911 (linux_process_target::prepare_to_access_memory): ... this.
3912 (linux_done_accessing_memory): Turn into ...
3913 (linux_process_target::done_accessing_memory): ... this.
3914 * linux-low.h (class linux_process_target): Update.
3915 * lynx-low.cc (lynx_target_ops): Update.
3916 * nto-low.cc (nto_target_ops): Update.
3917 * win32-low.cc (win32_target_ops): Update.
3918
3919 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3920
3921 Turn process_stratum_target's fetch_registers and store_registers
3922 ops into methods of process_target.
3923
3924 * target.h (struct process_stratum_target): Remove the target ops.
3925 (class process_target): Add the target ops.
3926 (fetch_inferior_registers): Update the macro.
3927 (store_inferior_registers): Update the macro.
3928
3929 Update the derived classes and callers below.
3930
3931 * linux-low.cc (linux_target_ops): Update.
3932 (linux_fetch_registers): Turn into ...
3933 (linux_process_target::fetch_registers): ... this.
3934 (linux_store_registers): Turn into ...
3935 (linux_process_target::store_registers): ... this.
3936 * linux-low.h (class linux_process_target): Update.
3937 * lynx-low.cc (lynx_target_ops): Update.
3938 (lynx_fetch_registers): Turn into ...
3939 (lynx_process_target::fetch_registers): ... this.
3940 (lynx_store_registers): Turn into ...
3941 (lynx_process_target::store_registers): ... this.
3942 * lynx-low.h (class lynx_process_target): Update.
3943 * nto-low.cc (nto_target_ops): Update.
3944 (nto_fetch_registers): Turn into ...
3945 (nto_process_target::fetch_registers): ... this.
3946 (nto_store_registers): Turn into ...
3947 (nto_process_target::store_registers): ... this.
3948 * nto-low.h (class nto_process_target): Update.
3949 * win32-low.cc (win32_target_ops): Update.
3950 (win32_fetch_inferior_registers): Turn into ...
3951 (win32_process_target::fetch_registers): ... this.
3952 (win32_store_inferior_registers): Turn into ...
3953 (win32_process_target::store_registers): ... this.
3954 * win32-low.h (class win32_process_target): Update.
3955
3956 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3957
3958 Turn process_stratum_target's wait op into a method of
3959 process_target.
3960
3961 * target.h (struct process_stratum_target): Remove the target op.
3962 (class process_target): Add the target op.
3963
3964 Update the derived classes and callers below.
3965
3966 * target.cc (target_wait): Update.
3967 * linux-low.cc (linux_target_ops): Update.
3968 (linux_wait): Turn into ...
3969 (linux_process_target::wait): ... this.
3970 * linux-low.h (class linux_process_target): Update.
3971 * lynx-low.cc (lynx_target_ops): Update.
3972 (lynx_wait): Turn into ...
3973 (lynx_process_target::wait): ... this.
3974 * lynx-low.h (class lynx_process_target): Update.
3975 * nto-low.cc (nto_target_ops): Update.
3976 (nto_wait): Turn into ...
3977 (nto_process_target::wait): ... this.
3978 * nto-low.h (class nto_process_target): Update.
3979 * win32-low.cc (win32_target_ops): Update.
3980 (win32_wait): Turn into ...
3981 (win32_process_target::wait): ... this.
3982 (do_initial_child_stuff): Update.
3983 * win32-low.h (class win32_process_target): Update.
3984
3985 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3986
3987 Turn process_stratum_target's resume op into a method of
3988 process_target.
3989
3990 * target.h (struct process_stratum_target): Remove the target op.
3991 (class process_target): Add the target op.
3992
3993 Update the derived classes and callers below.
3994
3995 * server.cc (resume): Update.
3996 * target.cc (target_stop_and_wait): Update.
3997 (target_continue_no_signal): Update.
3998 (target_continue): Update.
3999 * linux-low.cc (linux_target_ops): Update.
4000 (linux_resume): Turn into ...
4001 (linux_process_target::resume): ... this.
4002 * linux-low.h (class linux_process_target): Update.
4003 * lynx-low.cc (lynx_target_ops): Update.
4004 (lynx_resume): Turn into ...
4005 (lynx_process_target::resume): ... this.
4006 * lynx-low.h (class lynx_process_target): Update.
4007 * nto-low.cc (nto_target_ops): Update.
4008 (nto_resume): Turn into ...
4009 (nto_process_target::resume): ... this.
4010 * nto-low.h (class nto_process_target): Update.
4011 * win32-low.cc (win32_target_ops): Update.
4012 (win32_resume): Turn into ...
4013 (win32_process_target::resume): ... this.
4014 (win32_process_target::detach): Update.
4015 (do_initial_child_stuff): Update.
4016 * win32-low.h (class win32_process_target): Update.
4017
4018 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4019
4020 Turn process_stratum_target's thread_alive op into a method of
4021 process_target.
4022
4023 * target.h (struct process_stratum_target): Remove the target op.
4024 (class process_target): Add the target op.
4025 (mythread_alive): Update the macro.
4026
4027 Update the derived classes and callers below.
4028
4029 * linux-low.cc (linux_target_ops): Update.
4030 (linux_thread_alive): Turn into ...
4031 (linux_process_target::thread_alive): ... this.
4032 (wait_for_sigstop): Update.
4033 * linux-low.h (class linux_process_target): Update.
4034 * lynx-low.cc (lynx_target_ops): Update.
4035 (lynx_thread_alive): Turn into ...
4036 (lynx_process_target::thread_alive): ... this.
4037 * lynx-low.h (class lynx_process_target): Update.
4038 * nto-low.cc (nto_target_ops): Update.
4039 (nto_thread_alive): Turn into ...
4040 (nto_process_target::thread_alive): ... this.
4041 * nto-low.h (class nto_process_target): Update.
4042 * win32-low.cc (win32_target_ops): Update.
4043 (win32_thread_alive): Turn into ...
4044 (win32_process_target::thread_alive): ... this.
4045 * win32-low.h (class win32_process_target): Update.
4046
4047 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4048
4049 Turn process_stratum_target's join op into a method of
4050 process_target.
4051
4052 * target.h (struct process_stratum_target): Remove the target op.
4053 (class process_target): Add the target op.
4054 (join_inferior): Update the macro.
4055
4056 Update the derived classes and callers below.
4057
4058 * linux-low.cc (linux_target_ops): Update.
4059 (linux_join): Turn into ...
4060 (linux_process_target::join): ... this.
4061 * linux-low.h (class linux_process_target): Update.
4062 * lynx-low.cc (lynx_target_ops): Update.
4063 (lynx_join): Turn into ...
4064 (lynx_process_target::join): ... this.
4065 * lynx-low.h (class lynx_process_target): Update.
4066 * nto-low.cc (nto_target_ops): Update.
4067 (nto_process_target::join): Define.
4068 * nto-low.h (class nto_process_target): Update.
4069 * win32-low.cc (win32_target_ops): Update.
4070 (win32_join): Turn into ...
4071 (win32_process_target::join): ... this.
4072 * win32-low.h (class win32_process_target): Update.
4073
4074 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4075
4076 Turn process_stratum_target's mourn op into a method of
4077 process_target.
4078
4079 * target.h (struct process_stratum_target): Remove the target op.
4080 (class process_target): Add the target op.
4081
4082 Update the derived classes and callers below.
4083
4084 * target.cc (target_mourn_inferior): Update.
4085 * linux-low.cc (linux_target_ops): Update.
4086 (linux_mourn): Turn into ...
4087 (linux_process_target::mourn): ... this.
4088 (handle_extended_wait): Update.
4089 (linux_process_target::kill): Update.
4090 (linux_process_target::detach): Update.
4091 * linux-low.h (class linux_process_target): Update.
4092 * lynx-low.cc (lynx_target_ops): Update.
4093 (lynx_mourn): Turn into ...
4094 (lynx_process_target::mourn): ... this.
4095 * lynx-low.h (class lynx_process_target): Update.
4096 * nto-low.cc (nto_target_ops): Update.
4097 (nto_mourn): Turn into ...
4098 (nto_process_target::mourn): ... this.
4099 * nto-low.h (class nto_process_target): Update.
4100 * win32-low.cc (win32_target_ops): Update.
4101 (win32_mourn): Turn into ...
4102 (win32_process_target::mourn): ... this.
4103 * win32-low.h (class win32_process_target): Update.
4104
4105 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4106
4107 Turn process_stratum_target's detach op into a method of
4108 process_target.
4109
4110 * target.h (struct process_stratum_target): Remove the target op.
4111 (class process_target): Add the target op.
4112 (detach_inferior): Update the macro.
4113
4114 Update the derived classes and callers below.
4115
4116 * linux-low.cc (linux_target_ops): Update.
4117 (linux_detach): Turn into ...
4118 (linux_process_target::detach): ... this.
4119 * linux-low.h (class linux_process_target): Update.
4120 * lynx-low.cc (lynx_target_ops): Update.
4121 (lynx_detach): Turn into ...
4122 (lynx_process_target::detach): ... this.
4123 * lynx-low.h (class lynx_process_target): Update.
4124 * nto-low.cc (nto_target_ops): Update.
4125 (nto_detach): Turn into ...
4126 (nto_process_target::detach): ... this.
4127 * nto-low.h (class nto_process_target): Update.
4128 * win32-low.cc (win32_target_ops): Update.
4129 (win32_detach): Turn into ...
4130 (win32_process_target::detach): ... this.
4131 * win32-low.h (class win32_process_target): Update.
4132
4133 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4134
4135 Turn process_stratum_target's kill op into a method of
4136 process_target.
4137
4138 * target.h (struct process_stratum_target): Remove the target op.
4139 (class process_target): Add the target op.
4140
4141 Update the derived classes and callers below.
4142
4143 * target.cc (kill_inferior): Update.
4144 * linux-low.cc (linux_target_ops): Update.
4145 (linux_kill): Turn into ...
4146 (linux_process_target::kill): ... this.
4147 * linux-low.h (class linux_process_target): Update.
4148 * lynx-low.cc (lynx_target_ops): Update.
4149 (lynx_kill): Turn into ...
4150 (lynx_process_target::kill): ... this.
4151 * lynx-low.h (class lynx_process_target): Update.
4152 * nto-low.cc (nto_target_ops): Update.
4153 (nto_kill): Turn into ...
4154 (nto_process_target::kill): ... this.
4155 * nto-low.h (class nto_process_target): Update.
4156 * win32-low.cc (win32_target_ops): Update.
4157 (win32_kill): Turn into ...
4158 (win32_process_target::kill): ... this.
4159 * win32-low.h (class win32_process_target): Update.
4160
4161 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4162
4163 Turn process_stratum_target's attach op into a method of
4164 process_target.
4165
4166 * target.h (struct process_stratum_target): Remove the target op.
4167 (class process_target): Add the target op.
4168 (myattach): Update the macro.
4169
4170 Update the derived classes and callers below.
4171
4172 * linux-low.cc (linux_target_ops): Update.
4173 (linux_attach): Turn into ...
4174 (linux_process_target::attach): ... this.
4175 * linux-low.h (class linux_process_target): Update.
4176 * lynx-low.cc (lynx_target_ops): Update.
4177 (lynx_attach): Turn into ...
4178 (lynx_process_target::attach): ... this.
4179 * lynx-low.h (class lynx_process_target): Update.
4180 * nto-low.cc (nto_target_ops): Update.
4181 (nto_attach): Turn into ...
4182 (nto_process_target::attach): ... this.
4183 * nto-low.h (class nto_process_target): Update.
4184 * win32-low.cc (win32_target_ops): Update.
4185 (win32_attach): Turn into ...
4186 (win32_process_target::attach): ... this.
4187 * win32-low.h (class win32_process_target): Update.
4188
4189 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4190
4191 Turn process_stratum_target's post_create_inferior op into a method
4192 of process_target.
4193
4194 * target.h (struct process_stratum_target): Remove the target op.
4195 (class process_target): Add the target op.
4196 (target_post_create_inferior): Update the macro.
4197 * target.cc (process_target::post_create_inferior): Define.
4198
4199 Update the derived classes and callers below.
4200
4201 * linux-low.cc (linux_target_ops): Update.
4202 (linux_post_create_inferior): Turn into ...
4203 (linux_process_target::post_create_inferior): ... this.
4204 * linux-low.h (class linux_process_target): Update.
4205 * lynx-low.cc (lynx_target_ops): Update.
4206 * nto-low.cc (nto_target_ops): Update.
4207 * win32-low.cc (win32_target_ops): Update.
4208
4209 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4210
4211 Turn process_stratum_target's create_inferior op into a method of
4212 process_target.
4213
4214 * target.h (struct process_stratum_target): Remove the target op.
4215 (class process_target): Add the target op.
4216 (create_inferior): Rename the macro to ...
4217 (target_create_inferior): ... this.
4218
4219 Update the derived classes and callers below.
4220
4221 * server.cc (handle_v_run): Update.
4222 (captured_main): Update.
4223 (process_serial_event): Update.
4224 * linux-low.cc (linux_target_ops): Update.
4225 (linux_create_inferior): Turn into ...
4226 (linux_process_target::create_inferior): ... this.
4227 * linux-low.h (class linux_process_target): Update.
4228 * lynx-low.cc (lynx_target_ops): Update.
4229 (lynx_create_inferior): Turn into ...
4230 (lynx_process_target::create_inferior): ... this.
4231 * lynx-low.h (class lynx_process_target): Update.
4232 * nto-low.cc (nto_target_ops): Update.
4233 (nto_create_inferior): Turn into ...
4234 (nto_process_target::create_inferior): ... this.
4235 * nto-low.h (class nto_process_target): Update.
4236 * win32-low.cc (win32_target_ops): Update.
4237 (win32_create_inferior): Turn into ...
4238 (win32_process_target::create_inferior): ... this.
4239 * win32-low.h (class win32_process_target): Update.
4240
4241 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4242
4243 * target.h (class process_target): New class definition.
4244 (struct process_stratum_target) <pt>: New field with type
4245 'process_target*'.
4246 * linux-low.h (class linux_process_target): Define as a derived
4247 class of 'process_target'.
4248 * linux-low.cc (linux_target_ops): Add a linux_process_target*
4249 as the 'pt' field.
4250 * lynx-low.h (class lynx_process_target): Define as a derived
4251 class of 'process_target'.
4252 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
4253 as the 'pt' field.
4254 * nto-low.h (class nto_process_target): Define as a derived
4255 class of 'process_target'.
4256 * nto-low.cc (nto_target_ops): Add an nto_process_target*
4257 as the 'pt' field.
4258 * win32-low.h (class win32_process_target): Define as a derived
4259 class of 'process_target'.
4260 * win32-low.cc (win32_target_ops): Add a win32_process_target*
4261 as the 'pt' field.
4262
4263 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
4264
4265 * configure: Regenerate.
4266
4267 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
4268 Andrew Burgess <andrew.burgess@embecosm.com>
4269
4270 * linux-riscv-low.cc: New file.
4271 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
4272 and nat/riscv-linux-tdesc.c.
4273 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
4274 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
4275 Define.
4276
4277 2020-02-14 Tom Tromey <tom@tromey.com>
4278
4279 * acinclude.m4: Don't include acx_configure_dir.m4.
4280 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
4281 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
4282 (all, install-only, uninstall, clean-info, clean)
4283 (maintainer-clean): Don't recurse.
4284 (subdir_do, all-lib): Remove.
4285 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
4286 (GNULIB_H): Remove.
4287 (generated_files): Update.
4288 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
4289 * configure: Rebuild.
4290 * configure.ac: Don't configure gnulib or libiberty.
4291 (GNULIB): Update.
4292
4293 2020-02-14 Eli Zaretskii <eliz@gnu.org>
4294
4295 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
4296 preparing the command line for CreateProcess.
4297 (win32_create_inferior): Reflect the program name in debugging
4298 output that shows the process and its command line.
4299
4300 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
4301
4302 * Makefile.in: Rename source files from .c to .cc.
4303 * %.c: Rename to %.cc.
4304 * configure.ac: Rename server.c to server.cc.
4305 * configure: Re-generate.
4306
4307 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
4308
4309 * Makefile.in: Rename gdbsupport source files from .c to .cc.
4310
4311 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
4312
4313 * win32-low.c (win32_create_inferior): Set signal_pid.
4314
4315 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
4316 Pedro Alves <palves@redhat.com>
4317
4318 Skip building gdbserver in a cross-configuration.
4319 * configure.srv: Set $gdbserver_host depending on whether $target
4320 is $host. Use $gdbserver_host instead of $host.
4321
4322 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4323
4324 * configure: Re-generate.
4325
4326 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4327
4328 * configure: Re-generate.
4329
4330 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4331
4332 * acinclude.m4: Update warning.m4 path.
4333
4334 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
4335
4336 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
4337 (handle_exception): Set siginfo_er.
4338 (win32_xfer_siginfo): New function.
4339
4340 2020-02-07 Tom Tromey <tom@tromey.com>
4341 Pedro Alves <palves@redhat.com>
4342
4343 * README: Update build documentation.
4344 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
4345 host, not target.
4346 * configure.ac: Update paths.
4347 * configure: Rebuild.
4348 * acinclude.m4: Update paths.
4349 * Makefile.in: Update include paths.
4350 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
4351 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
4352 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
4353 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
4354 (%-generated.c): Update paths.
4355 * Move entire directory from ../gdb/gdbserver.
4356
4357 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
4358
4359 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
4360
4361 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4362
4363 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
4364 assignment instead of srv_linux_obj.
4365
4366 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
4367
4368 * server.c (handle_qxfer_libraries): Write segment-address with
4369 paddress.
4370
4371 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
4372
4373 * Makefile.in (install-strip): New target.
4374 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
4375 * aclocal.m4: Regenerate.
4376 * configure: Regenerate.
4377 * configure.ac: Add AM_PROG_INSTALL_STRIP.
4378
4379 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4380
4381 * Makefile.in (SFILES): Adjust paths to point to real files.
4382 (OBS): Move waitstatus.o to target/waitstatus.o.
4383 (TAGS): Transform paths appropriately.
4384 (%.o): Rename to...
4385 (nat/%.o): ... this pattern rule.
4386 (%.o): Rename to...
4387 (target/%.o): ... this pattern rule.
4388 * configure.srv: Adjust paths throughout to include nat/ prefix
4389 with the revant files.
4390 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
4391 * configure: Regenerate.
4392
4393 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4394
4395 * Makefile.in (TAGS): Remove config files from the recipe.
4396
4397 2020-01-14 Tom Tromey <tom@tromey.com>
4398
4399 * configure: Rebuild.
4400 * configure.ac: Remove any checks that were added to common.m4.
4401 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
4402 lib-link.m4.
4403
4404 2020-01-14 Tom Tromey <tom@tromey.com>
4405
4406 * server.h: Include config.h.
4407 * gdbreplay.c: Include config.h.
4408 * configure: Rebuild.
4409 * configure.ac: Don't source common.host.
4410 * acinclude.m4: Update path.
4411 * Makefile.in (INCSUPPORT): New variable.
4412 (INCLUDE_CFLAGS): Add INCSUPPORT.
4413 (SFILES): Update paths.
4414 (version-generated.c): Update path to create-version.sh.
4415 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
4416
4417 2020-01-14 Tom Tromey <tom@tromey.com>
4418
4419 * configure.ac (LIBS): Use WIN32APILIBS.
4420 (USE_WIN32API): Don't define.
4421 * configure: Rebuild.
4422
4423 2020-01-14 Tom Tromey <tom@tromey.com>
4424
4425 * configure: Rebuild.
4426
4427 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4428
4429 * Makefile.in (%-generated.c): Remove rule for files from
4430 regformats/i386.
4431
4432 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4433
4434 * configure: Re-generate.
4435
4436 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4437
4438 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
4439 Define to static.
4440 * tracepoint.c (stop_tracing, flush_trace_buffer,
4441 about_to_request_buffer_space, get_trace_state_variable_value,
4442 set_trace_state_variable_value, gdb_collect): Add declaration.
4443
4444 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4445
4446 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
4447 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
4448 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
4449 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
4450 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
4451 static.
4452
4453 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4454
4455 * inferiors.c: Include gdbsupport/common-inferior.h.
4456
4457 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4458
4459 * hostio-errno.c: Include hostio.h.
4460
4461 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4462
4463 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
4464 prerequisite.
4465
4466 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4467
4468 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
4469 * linux-arm-tdesc.h: Include arch/arm.h.
4470
4471 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4472
4473 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
4474
4475 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4476
4477 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
4478 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
4479
4480 2020-01-10 Pedro Alves <palves@redhat.com>
4481
4482 * fork-child.c (post_fork_inferior): Pass target down to
4483 startup_inferior.
4484 * inferiors.c (switch_to_thread): Add process_stratum_target
4485 parameter.
4486 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
4487 * nto-low.c (nto_target_ops): Now a process_stratum_target.
4488 * linux-low.c (linux_target_ops): Now a process_stratum_target.
4489 * remote-utils.c (prepare_resume_reply): Pass the target to
4490 switch_to_thread.
4491 * target.c (the_target): Now a process_stratum_target.
4492 (done_accessing_memory): Pass the target to switch_to_thread.
4493 (set_target_ops): Ajust to use process_stratum_target.
4494 * target.h (struct target_ops): Rename to ...
4495 (struct process_stratum_target): ... this.
4496 (the_target, set_target_ops): Adjust.
4497 (prepare_to_access_memory): Adjust comment.
4498 * win32-low.c (child_xfer_memory): Adjust to use
4499 process_stratum_target.
4500 (win32_target_ops): Now a process_stratum_target.
4501
4502 2020-01-06 Eli Zaretskii <eliz@gnu.org>
4503 Pedro Alves <palves@redhat.com>
4504
4505 * win32-low.c (get_child_debug_event): Extract the fatal exception
4506 from the exit status and convert to the equivalent Posix signal
4507 number.
4508 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
4509 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
4510
4511 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
4512
4513 * Makefile.in: Use INSTALL_PROGRAM_ENV.
4514
4515 2020-01-01 Joel Brobecker <brobecker@adacore.com>
4516
4517 * server.c (gdbserver_version): Change copyright year to 2020.
4518 * gdbreplay.c (gdbreplay_version): Likewise.
4519
4520 2019-12-19 Christian Biesinger <cbiesinger@google.com>
4521
4522 * configure: Regenerate.
4523 * configure.ac: Quote variable arguments of test.
4524
4525 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
4526
4527 * Makefile.in: Fix build with GNU Make 3.81
4528
4529 2019-12-16 Tom Tromey <tromey@adacore.com>
4530
4531 * server.c (get_exec_file): Constify result.
4532
4533 2019-12-10 Christian Biesinger <cbiesinger@google.com>
4534
4535 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
4536 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
4537 * config.in: Regenerate.
4538 * configure: Regenerate.
4539 * configure.ac: Don't check for strerror.
4540 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
4541 Call safe_strerror instead of strerror.
4542 * server.h (strerror): Remove this now-unnecessary declaration.
4543 * tracepoint.c (init_named_socket): Call safe_strerror instead of
4544 strerror.
4545 (gdb_agent_helper_thread): Likewise.
4546 * utils.c (perror_with_name): Likewise.
4547
4548 2019-11-26 Tom Tromey <tom@tromey.com>
4549
4550 * configure, config.in: Rebuild.
4551
4552 2019-11-26 Tom Tromey <tom@tromey.com>
4553
4554 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
4555 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
4556 gdb_sigmask.
4557 * configure, config.in: Rebuild.
4558
4559 2019-11-26 Tom Tromey <tom@tromey.com>
4560
4561 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
4562 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
4563 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
4564 * acinclude.m4: Include ax_pthread.m4.
4565 * config.in, configure: Rebuild.
4566
4567 2019-11-26 Christian Biesinger <cbiesinger@google.com>
4568
4569 * debug.c (debug_set_output): Call safe_strerror instead of
4570 strerror.
4571 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
4572 (linux_kill_one_lwp): Likewise.
4573 (linux_detach_one_lwp): Likewise.
4574 (linux_wait_for_event_filtered): Likewise.
4575 (store_register): Likewise.
4576 * lynx-low.c (lynx_attach): Likewise.
4577 * mem-break.c (insert_memory_breakpoint): Likewise.
4578 (remove_memory_breakpoint): Likewise.
4579 (delete_fast_tracepoint_jump): Likewise.
4580 (set_fast_tracepoint_jump): Likewise.
4581 (uninsert_fast_tracepoint_jumps_at): Likewise.
4582 (reinsert_fast_tracepoint_jumps_at): Likewise.
4583 * nto-low.c (nto_xfer_memory): Likewise.
4584 (nto_resume): Likewise.
4585
4586 2019-11-20 Luis Machado <luis.machado@linaro.org>
4587
4588 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
4589 instead of register count.
4590 * tdesc.c (tdesc_contains_feature): New function.
4591 * tdesc.h (tdesc_contains_feature): New prototype.
4592
4593 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4594
4595 * Makefile.in: Add safe-strerror.c.
4596 * configure: Regenerate.
4597 * configure.ac: Don't source common.host.
4598
4599 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4600
4601 * config.in: Regenerate.
4602 * configure: Regenerate.
4603
4604 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
4605
4606 * ax.c (ax_printf): Handle size_t_arg.
4607
4608 2019-11-06 Christian Biesinger <cbiesinger@google.com>
4609
4610 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
4611 * mi/mi-main.c (output_cores): Likewise.
4612 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
4613 (linux_xfer_osdata_modules): Likewise.
4614 * remote.c (register_remote_support_xml): Likewise.
4615 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
4616 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
4617
4618 2019-11-01 Christian Biesinger <cbiesinger@google.com>
4619
4620 * configure: Regenerate.
4621 * configure.ac: Remove check for strerror_r.
4622
4623 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4624
4625 * config.in: Regenerate.
4626 * configure: Regenerate.
4627 * configure.ac: Also check for strerror_r.
4628
4629 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4630
4631 * ax.h (debug_agent): Remove duplicate declaration.
4632
4633 2019-10-26 Tom de Vries <tdevries@suse.de>
4634
4635 * linux-aarch64-low.c: Fix typos in comments.
4636 * linux-arm-low.c: Same.
4637 * linux-low.c: Same.
4638 * linux-ppc-low.c: Same.
4639 * proc-service.c: Same.
4640 * regcache.h: Same.
4641 * server.c: Same.
4642 * tracepoint.c: Same.
4643 * win32-low.c: Same.
4644
4645 2019-10-25 Tom Tromey <tromey@adacore.com>
4646
4647 * utils.c (xstrdup): Remove.
4648
4649 2019-10-23 Tom Tromey <tom@tromey.com>
4650
4651 * configure, config.in: Rebuild.
4652
4653 2019-10-23 Tom Tromey <tom@tromey.com>
4654
4655 * configure: Rebuild.
4656 * acinclude.m4: Use m4_include, not sinclude.
4657
4658 2019-10-17 Tom Tromey <tromey@adacore.com>
4659
4660 * configure: Rebuild.
4661 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
4662 in AC_CONFIG_FILES invocation.
4663 * Makefile.in (stamp-h, Makefile): Use new-style config.status
4664 invocation.
4665
4666 2019-10-16 Christian Biesinger <cbiesinger@google.com>
4667
4668 * server.c: Include xml-builtin.h.
4669 (get_xml_features): Don't declare xml_builtins here.
4670
4671 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4672
4673 * Makefile.in: Remove references to vec-ipa.o.
4674
4675 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4676
4677 * Makefile.in: Remove references to vec.c.
4678
4679 2019-10-02 Christian Biesinger <cbiesinger@google.com>
4680
4681 * server.c (server_waiting): Change to bool.
4682 (extended_protocol): Likewise.
4683 (response_needed): Likewise.
4684 (exit_requested): Likewise.
4685 (run_once): Likewise.
4686 (report_no_resumed): Likewise.
4687 (non_stop): Likewise.
4688 (disable_packet_vCont): Likewise.
4689 (disable_packet_Tthread): Likewise.
4690 (disable_packet_qC): Likewise.
4691 (disable_packet_qfThreadInfo): Likewise.
4692 (handle_general_set): Update.
4693 (handle_detach): Update.
4694 (handle_monitor_command): Update.
4695 (handle_query): Update.
4696 (captured_main): Update.
4697 (process_serial_event): Update.
4698 * server.h (server_waiting): Change to bool.
4699 (disable_packet_vCont): Likewise.
4700 (disable_packet_Tthread): Likewise.
4701 (disable_packet_qC): Likewise.
4702 (disable_packet_qfThreadInfo): Likewise.
4703 (run_once): Likewise.
4704 (non_stop): Likewise.
4705 * target.c (target_stop_and_wait): Update.
4706
4707 2019-10-02 Tom Tromey <tromey@adacore.com>
4708
4709 * Makefile.in (SFILES): Add common-inferior.c.
4710 (OBS): Add common-inferior.o.
4711 * server.c (startup_with_shell): Don't define.
4712
4713 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
4714
4715 * linux-low.c (linux_low_read_btrace): Update for change to
4716 std::vector.
4717
4718 2019-09-20 Christian Biesinger <cbiesinger@google.com>
4719
4720 * debug.c (debug_threads): Remove comment in favor of the header.
4721 * debug.h (using_threads): Add declaration.
4722 (debug_threads): Add comment.
4723 * linux-aarch64-low.c: Include debug.h and remove declaration of
4724 debug_threads.
4725 * nto-low.c: Likewise.
4726 * remote-utils.c: Likewise.
4727 * thread-db.c: Likewise.
4728
4729 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
4730
4731 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
4732 and powerpc-cell64l-ipa.o.
4733 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
4734 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
4735 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
4736 (spu*-*-*): Remove.
4737
4738 * spu-low.c: Remove file.
4739
4740 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
4741 (parse_spufs_run): Remove.
4742 (ppc_get_pc): Remove Cell/B.E. support.
4743 (ppc_set_pc): Likewise.
4744 (ppc_breakpoint_at): Likewise.
4745 (ppc_arch_setup): Likewise.
4746 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
4747 tdesc_powerpc_cell32l.
4748 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
4749 or init_registers_powerpc_cell32l.
4750 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
4751 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
4752 or init_registers_powerpc_cell32l.
4753 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
4754 (init_registers_powerpc_cell32l): Remove prototype.
4755 (init_registers_powerpc_cell64l): Likewise.
4756
4757 * target.h (struct target_ops): Remove qxfer_spu member.
4758 * server.c (handle_qxfer_spu): Remove.
4759 (qxfer_packets): Remove entry for "spu".
4760 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
4761 * linux-low.c (SPUFS_MAGIC): Remove.
4762 (spu_enumerate_spu_ids): Remove.
4763 (linux_qxfer_spu): Remove.
4764 (linux_target_ops): Remove qxfer_spu member.
4765 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
4766 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
4767 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
4768
4769 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
4770
4771 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
4772 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
4773 * config.in: Regenerate.
4774 * configure: Regenerate.
4775
4776 2019-08-15 Tom Tromey <tromey@adacore.com>
4777
4778 * target.c (target_write_memory): Use gdb::byte_vector.
4779
4780 2019-08-15 Tom Tromey <tromey@adacore.com>
4781
4782 * tracepoint.c (write_inferior_data_pointer)
4783 (write_inferior_integer, write_inferior_int8)
4784 (write_inferior_uinteger, m_tracepoint_action_download)
4785 (r_tracepoint_action_download, x_tracepoint_action_download)
4786 (l_tracepoint_action_download, clear_inferior_trace_buffer)
4787 (download_agent_expr, download_tracepoint_1)
4788 (download_trace_state_variables, upload_fast_traceframes): Update.
4789 * server.c (gdb_write_memory): Update.
4790 * remote-utils.c (relocate_instruction): Update.
4791 * proc-service.c (ps_pdwrite): Update.
4792 * mem-break.c (remove_memory_breakpoint)
4793 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
4794 (uninsert_fast_tracepoint_jumps_at)
4795 (reinsert_fast_tracepoint_jumps_at): Update.
4796 * linux-x86-low.c (append_insns)
4797 (i386_install_fast_tracepoint_jump_pad)
4798 (amd64_write_goto_address, i386_write_goto_address): Update.
4799 * linux-s390-low.c (append_insns, s390_write_goto_address):
4800 Update.
4801 * linux-ppc-low.c (ppc_relocate_instruction)
4802 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
4803 (ppc_write_goto_address): Update.
4804 * linux-aarch64-low.c (append_insns): Update.
4805 * target.h (struct target_ops): Update.
4806 (write_inferior_memory): Don't declare.
4807 * target.c (target_write_memory): Rename from
4808 write_inferior_memory. Remove old target_write_memory.
4809
4810 2019-08-15 Tom Tromey <tromey@adacore.com>
4811
4812 * target.c (write_inferior_memory): Use std::vector.
4813
4814 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
4815
4816 PR build/24886
4817 * configure.ac: Drop enable-libmcheck support.
4818 * configure, config.in: Rebuild.
4819 * acinclude.m4: Don't include it.
4820
4821 2019-07-19 Alan Hayward <alan.hayward@arm.com>
4822
4823 * configure.srv: Remove Arm xml files.
4824
4825 2019-07-19 Alan Hayward <alan.hayward@arm.com>
4826
4827 * configure.srv: Add new files. Remove xml generated files.
4828 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
4829 registers.
4830 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
4831 * linux-aarch32-tdesc.c: New file.
4832 * linux-aarch32-tdesc.h: New file.
4833 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
4834 * linux-arm-low.c (init_registers_arm, tdesc_arm)
4835 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
4836 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
4837 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
4838 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4839 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
4840 (arm_read_description): Call arm_linux_read_description.
4841 (initialize_low_arch): Don't init registers.
4842 * linux-arm-tdesc.c: New file.
4843 * linux-arm-tdesc.h: New file.
4844
4845 2019-07-10 Alan Hayward <alan.hayward@arm.com>
4846
4847 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
4848 Move counter inside for.
4849 (arm_read_description): Check ptrace earlier.
4850 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
4851
4852 2019-07-09 Tom Tromey <tom@tromey.com>
4853
4854 * configure: Rebuild.
4855 * configure.ac: Change common to gdbsupport.
4856 * acinclude.m4: Change common to gdbsupport.
4857 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
4858 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
4859 common to gdbsupport.
4860 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
4861 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
4862 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
4863 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
4864 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
4865 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
4866 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
4867 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
4868 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
4869 common to gdbsupport.
4870
4871 2019-07-04 Alan Hayward <alan.hayward@arm.com>
4872
4873 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
4874 defines.
4875 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
4876
4877 2019-07-04 Alan Hayward <alan.hayward@arm.com>
4878
4879 * configure.srv: Remove legacy xml.
4880 * linux-aarch64-low.c (initialize_low_arch): Remove
4881 initialize_low_tdesc call.
4882 * linux-aarch64-tdesc-selftest.c: Remove file.
4883 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
4884 * linux-x86-low.c (initialize_low_arch): Remove
4885 initialize_low_tdesc call.
4886 * linux-x86-tdesc-selftest.c: Remove file.
4887 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
4888
4889 2019-06-20 Tom de Vries <tdevries@suse.de>
4890
4891 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
4892 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
4893
4894 2019-06-19 Tom de Vries <tdevries@suse.de>
4895
4896 * debug.h (debug_write): Change return type to ssize_t.
4897 * debug.c (debug_write): Same.
4898
4899 2019-06-14 Tom Tromey <tom@tromey.com>
4900
4901 * configure.ac: Use new path to gnulib.
4902 * configure: Rebuild.
4903 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
4904 to gnulib.
4905
4906 2019-06-11 Tom Tromey <tom@tromey.com>
4907
4908 * Makefile.in (SFILES): Add alloc.c.
4909 (OBS): Add alloc.o.
4910 (IPA_OBJS): Add alloc-ipa.o.
4911 (alloc-ipa.o): New target.
4912 (%.o: ../%.c): New pattern rule.
4913
4914 2019-06-10 Tom Tromey <tromey@adacore.com>
4915
4916 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
4917 end warning with a newline.
4918 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
4919 newline.
4920 * thread-db.c (attach_thread): Don't end warning with a newline.
4921 (thread_db_notice_clone): Likewise.
4922 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
4923 newline.
4924 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
4925 end warning with a newline.
4926
4927 2019-06-04 Pedro Alves <palves@redhat.com>
4928
4929 * server.c (captured_main): Use make_unique_xstrdup.
4930
4931 2019-06-02 Tom Tromey <tom@tromey.com>
4932
4933 * gdbreplay.c (fromhex): Remove.
4934 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
4935
4936 2019-05-29 Tom Tromey <tromey@adacore.com>
4937
4938 * configure: Rebuild.
4939
4940 2019-05-06 Kevin Buettner <kevinb@redhat.com>
4941
4942 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
4943 sign extension code on 32-bit builds.
4944
4945 2019-05-03 Eli Zaretskii <eliz@gnu.org>
4946
4947 * remote-utils.c:
4948 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
4949
4950 2019-04-19 Tom Tromey <tom@tromey.com>
4951
4952 * server.c (struct vstop_notif): Derive from notif_event.
4953 <base>: Remove.
4954 (queue_stop_reply): Update.
4955 (remove_all_on_match_ptid): Change type. Rewrite.
4956 (discard_queued_stop_replies): Rewrite.
4957 (in_queued_stop_replies_ptid): Change type.
4958 (in_queued_stop_replies): Rewrite.
4959 (notif_stop): Update.
4960 (queue_stop_reply_callback): Update.
4961 (captured_main): Don't call initialize_notif.
4962 (push_stop_notification): Update.
4963 * notif.c (notif_write_event, handle_notif_ack)
4964 (notif_event_enque, notif_push): Update.
4965 (notif_event_xfree, initialize_notif): Remove.
4966 * notif.h (struct notif_event): Include <list>, not
4967 "common/queue.h".
4968 (struct notif_server) <queue>: Now a std::list.
4969 (notif_event_p): Remove typedef.
4970 (initialize_notif): Don't declare.
4971 (struct notif_event): Add virtual destructor.
4972
4973 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4974
4975 * ax.c (ax_vdebug): Call debug_printf.
4976 * debug.c (debug_write): New function.
4977 * debug.h (debug_write): New declaration.
4978 * linux-low.c (sigchld_handler): Call debug_write.
4979
4980 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4981
4982 * debug.c (debug_set_output): New function.
4983 (debug_vprintf): Send output to debug_file.
4984 (debug_flush): Likewise.
4985 * debug.h (debug_set_output): New declaration.
4986 * server.c (handle_monitor_command): Add debug-file option.
4987 (captured_main): Likewise.
4988
4989 2019-04-17 Alan Hayward <alan.hayward@arm.com>
4990
4991 * debug.c (remote_debug): Add definition.
4992 * debug.h (remote_debug): Add declaration.
4993 * hostio.c (remote_debug): Remove declaration.
4994 * remote-utils.c (struct ui_file): Likewise.
4995 (remote_debug): Likewise.
4996 * remote-utils.h (remote_debug): Likewise,
4997 * server.c (remote_debug): Remove definition.
4998
4999 2019-04-10 Kevin Buettner <kevinb@redhat.com>
5000
5001 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
5002 when using a 64-bit gdbserver.
5003
5004 2019-04-09 Tom Tromey <tromey@adacore.com>
5005
5006 * linux-low.c (select_event_lwp): Use find_thread_in_random.
5007
5008 2019-04-08 Tom Tromey <tom@tromey.com>
5009
5010 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
5011 throw.
5012 (linux_resume_one_lwp): Likewise.
5013
5014 2019-04-08 Tom Tromey <tom@tromey.com>
5015
5016 * gdbreplay.c: Update.
5017 * linux-low.c: Update.
5018 * server.c: Update.
5019
5020 2019-04-08 Tom Tromey <tom@tromey.com>
5021
5022 * server.c: Use C++ exception handling.
5023 * linux-low.c: Use C++ exception handling.
5024 * gdbreplay.c: Use C++ exception handling.
5025
5026 2019-04-08 Tom Tromey <tom@tromey.com>
5027
5028 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
5029 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
5030 (captured_main, main): Update.
5031 * gdbreplay.c (main): Update.
5032
5033 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5034
5035 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
5036 value in argument pointer, return 1 if the entry is found and 0
5037 otherwise. Move comment.
5038 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
5039 * linux-low.h (linux_get_auxv): Declare.
5040 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
5041
5042 2019-04-05 Tom Tromey <tromey@adacore.com>
5043
5044 * server.c (gdbserver_usage): Use upper-case for metasyntactic
5045 variables.
5046
5047 2019-03-28 Alan Hayward <alan.hayward@arm.com>
5048
5049 * linux-low.c (AT_HWCAP2): Add define if not already included.
5050
5051 2019-03-26 Alan Hayward <alan.hayward@arm.com>
5052
5053 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
5054 (aarch64_arch_setup): Call linux_get_hwcap.
5055 * linux-arm-low.c (arm_get_hwcap): Remove function.
5056 (arm_read_description): Call linux_get_hwcap.
5057 * linux-low.c (linux_get_auxv): New function.
5058 (linux_get_hwcap): Likewise.
5059 (linux_get_hwcap2): Likewise.
5060 * linux-low.h (linux_get_hwcap): New declaration.
5061 (linux_get_hwcap2): Likewise.
5062 * linux-ppc-low.c (ppc_get_auxv): Remove function.
5063 (ppc_arch_setup): Call linux_get_hwcap.
5064 * linux-s390-low.c (s390_get_hwcap): Remove function.
5065 (s390_arch_setup): Call linux_get_hwcap.
5066
5067 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5068 Jiong Wang <jiong.wang@arm.com>
5069
5070 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
5071 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
5072 to fail.
5073 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
5074
5075 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5076 Jiong Wang <jiong.wang@arm.com>
5077
5078 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
5079 (aarch64_get_hwcap): New function.
5080 (aarch64_arch_setup): Read APIA hwcap.
5081
5082 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5083 Jiong Wang <jiong.wang@arm.com>
5084
5085 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
5086 (initialize_low_tracepoint): Likewise.
5087 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
5088 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
5089 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
5090 (aarch64_linux_read_description): Likewise.
5091 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
5092
5093 2019-03-12 John Baldwin <jhb@FreeBSD.org>
5094
5095 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
5096 i386_create_target_description for 'segments' parameter.
5097 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
5098 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
5099 * win32-i386-low.c (i386_arch_setup): Likewise.
5100
5101 2019-03-12 Tom Tromey <tromey@adacore.com>
5102
5103 * linux-low.c (iterate_over_lwps): Update.
5104
5105 2019-03-06 Tom Tromey <tom@tromey.com>
5106
5107 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
5108 (captured_main): Use SCOPE_EXIT.
5109
5110 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
5111
5112 * configure.srv: Use '$enable_unittest' instead of '$development'
5113 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
5114 case.
5115
5116 2019-02-27 Tom Tromey <tromey@adacore.com>
5117
5118 * gdbreplay.c (logchar): Handle \r\n.
5119
5120 2019-02-07 Alan Hayward <alan.hayward@arm.com>
5121
5122 * linux-low.c (linux_attach): Add process before lwp.
5123 * server.c (attach_inferior): Check if already attached.
5124
5125 2019-02-07 Tom Tromey <tom@tromey.com>
5126
5127 * x86-tdesc.h: Rename include guard.
5128 * x86-low.h: Add include guard.
5129 * wincecompat.h: Rename include guard.
5130 * win32-low.h: Add include guard.
5131 * utils.h: Rename include guard.
5132 * tracepoint.h: Rename include guard.
5133 * tdesc.h: Rename include guard.
5134 * target.h: Rename include guard.
5135 * server.h: Rename include guard.
5136 * remote-utils.h: Rename include guard.
5137 * regcache.h: Rename include guard.
5138 * nto-low.h: Rename include guard.
5139 * notif.h: Add include guard.
5140 * mem-break.h: Rename include guard.
5141 * lynx-low.h: Add include guard.
5142 * linux-x86-tdesc.h: Add include guard.
5143 * linux-s390-tdesc.h: Add include guard.
5144 * linux-ppc-tdesc-init.h: Add include guard.
5145 * linux-low.h: Add include guard.
5146 * linux-aarch64-tdesc.h: Add include guard.
5147 * linux-aarch32-low.h: Add include guard.
5148 * inferiors.h: Rename include guard.
5149 * i387-fp.h: Rename include guard.
5150 * hostio.h: Rename include guard.
5151 * gdbthread.h: Rename include guard.
5152 * gdb_proc_service.h: Rename include guard.
5153 * event-loop.h: Rename include guard.
5154 * dll.h: Rename include guard.
5155 * debug.h: Rename include guard.
5156 * ax.h: Rename include guard.
5157
5158 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
5159
5160 PR gdb/23985
5161 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
5162 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
5163
5164 2019-01-25 Tom Tromey <tom@tromey.com>
5165
5166 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
5167
5168 2019-01-25 Tom Tromey <tom@tromey.com>
5169
5170 * win32-low.c: Fix common/ includes.
5171 * win32-i386-low.c: Fix common/ includes.
5172 * tracepoint.c: Fix common/ includes.
5173 * thread-db.c: Fix common/ includes.
5174 * target.h: Fix common/ includes.
5175 * symbol.c: Fix common/ includes.
5176 * spu-low.c: Fix common/ includes.
5177 * server.h: Fix common/ includes.
5178 * server.c: Fix common/ includes.
5179 * remote-utils.c: Fix common/ includes.
5180 * regcache.h: Fix common/ includes.
5181 * regcache.c: Fix common/ includes.
5182 * nto-x86-low.c: Fix common/ includes.
5183 * notif.h: Fix common/ includes.
5184 * mem-break.h: Fix common/ includes.
5185 * lynx-low.c: Fix common/ includes.
5186 * lynx-i386-low.c: Fix common/ includes.
5187 * linux-x86-tdesc-selftest.c: Fix common/ includes.
5188 * linux-x86-low.c: Fix common/ includes.
5189 * linux-low.c: Fix common/ includes.
5190 * inferiors.h: Fix common/ includes.
5191 * i387-fp.c: Fix common/ includes.
5192 * hostio.c: Fix common/ includes.
5193 * hostio-errno.c: Fix common/ includes.
5194 * gdbthread.h: Fix common/ includes.
5195 * gdbreplay.c: Fix common/ includes.
5196 * fork-child.c: Fix common/ includes.
5197 * event-loop.c: Fix common/ includes.
5198 * ax.c:
5199 (enum gdb_agent_op): Fix common/ includes.
5200
5201 2019-01-21 Tom Tromey <tom@tromey.com>
5202
5203 * tracepoint.c: Fix includes.
5204 * remote-utils.c: Fix includes.
5205 * linux-x86-low.c: Fix includes.
5206
5207 2019-01-01 Joel Brobecker <brobecker@adacore.com>
5208
5209 * gdbreplay.c (gdbreplay_version): Update copyright year in
5210 version message.
5211 * server.c (gdbserver_version): Likewise.
5212
5213 2018-12-05 Alan Hayward <alan.hayward@arm.com>
5214
5215 * linux-low.c (add_lwp): Switch ordering.
5216
5217 2018-11-29 Tom Tromey <tom@tromey.com>
5218
5219 * win32-low.c (win32_join): Take pid, not process.
5220 * target.h (struct target_ops) <join>: Change argument type.
5221 (join_inferior): Change argument name.
5222 * spu-low.c (spu_join): Take pid, not process.
5223 * server.c (handle_detach): Preserve pid before destroying
5224 process.
5225 * lynx-low.c (lynx_join): Take pid, not process.
5226 * linux-low.c (linux_join): Take pid, not process.
5227
5228 2018-11-23 Alan Hayward <alan.hayward@arm.com>
5229
5230 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
5231 (aarch64_cannot_fetch_register): Likewise.
5232 (struct linux_target_ops): Update references.
5233
5234 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5235
5236 * linux-ppc-low.c: Include nat/linux-ptrace.h.
5237
5238 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5239
5240 * configure.srv (ipa_ppc_linux_regobj): Add
5241 powerpc-isa207-htm-vsx32l-ipa.o and
5242 powerpc-isa207-htm-vsx64l-ipa.o.
5243 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
5244 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
5245 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
5246 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
5247 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
5248 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
5249 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
5250 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
5251 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5252 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
5253 (init_registers_powerpc_isa207_htm_vsx32l)
5254 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
5255 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
5256 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
5257 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
5258 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
5259 (ppc_store_tm_ctarregset): New functions.
5260 (ppc_regsets): Add entries for HTM regsets.
5261 (ppc_arch_setup): Set htm in features struct when needed. Set
5262 sizes for the HTM regsets.
5263 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
5264 (initialize_low_arch): Call
5265 init_registers_powerpc_isa207_htm_vsx32l and
5266 init_registers_powerpc_isa207_htm_vsx64l.
5267 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5268 PPC_TDESC_ISA207_HTM_VSX.
5269 (initialize_low_tracepoint): Call
5270 init_registers_powerpc_isa207_htm_vsx32l and
5271 init_registers_powerpc_isa207_htm_vsx64l.
5272
5273 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5274
5275 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
5276 rs6000/power-linux-pmu.xml to srv_xmlfiles.
5277 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
5278 (ppc_store_pmuregset): New functions.
5279 (ppc_regsets): Add entries for ebb and pmu regsets.
5280 (ppc_arch_setup): Set isa207 in features struct if the ebb and
5281 pmu regsets are available. Set sizes for these regsets.
5282
5283 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5284
5285 * configure.srv (ipa_ppc_linux_regobj): Add
5286 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
5287 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
5288 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
5289 rs6000/powerpc-isa207-vsx32l.xml, and
5290 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
5291 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5292 <PPC_TDESC_ISA207_VSX>: New enum value.
5293 (init_registers_powerpc_isa207_vsx32l): Declare.
5294 (init_registers_powerpc_isa207_vsx64l): Declare.
5295 * linux-ppc-low.c (ppc_fill_tarregset): New function.
5296 (ppc_store_tarregset): New function.
5297 (ppc_regsets): Add entry for the TAR regset.
5298 (ppc_arch_setup): Set isa207 in features struct when needed. Set
5299 size for the TAR regsets.
5300 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
5301 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
5302 and init_registers_powerpc_isa207_vsx64l.
5303 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
5304 (initialize_low_tracepoint): Call
5305 init_registers_powerpc_isa207_vsx32l and
5306 init_registers_powerpc_isa207_vsx64l.
5307
5308 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5309 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5310
5311 * configure.srv (ipa_ppc_linux_regobj): Add
5312 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
5313 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
5314 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
5315 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
5316 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
5317 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
5318 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
5319 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5320 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
5321 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
5322 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
5323 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
5324 (ppc_hwcap): Add comment.
5325 (ppc_hwcap2): New global.
5326 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
5327 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
5328 (ppc_regsets): Add entries for the DSCR and PPR regsets.
5329 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
5330 when needed. Set sizes for the the DSCR and PPR regsets.
5331 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
5332 (initialize_low_arch): Call
5333 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5334 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5335 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5336 PPC_TDESC_ISA205_PPR_DSCR_VSX.
5337 (initialize_low_tracepoint): Call
5338 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5339 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5340
5341 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5342
5343 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
5344
5345 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
5346 Simon Marchi <simark@simark.ca>
5347
5348 * acinclude.m4: Include "../selftest.m4".
5349 * configure: Regenerate.
5350 * configure.ac: Use "GDB_AC_SELFTEST".
5351 * configure.srv: Use "$enable_unittests" instead of
5352 "$development" when checking whether unit tests have been
5353 enabled.
5354 * server.c (captured_main): Update message informing that
5355 selftests have been disabled.
5356
5357 2018-10-04 Tom Tromey <tom@tromey.com>
5358
5359 * configure: Rebuild.
5360
5361 2018-10-04 Tom Tromey <tom@tromey.com>
5362
5363 * server.c (handle_status): Rename inner "thread".
5364 (process_serial_event): Declare "res" in 'm' case.
5365 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
5366 (iterate_over_lwps): Rename inner "thread".
5367 (linux_qxfer_libraries_svr4): Rename inner "len".
5368 * gdbthread.h (find_thread_in_random): Rename inner "thread".
5369
5370 2018-10-01 Gary Benson <gbenson@redhat.com>
5371
5372 * gdb_proc_service.h: Moved common code to
5373 common/gdb_proc_service.h.
5374
5375 2018-10-01 Gary Benson <gbenson@redhat.com>
5376
5377 * gdb_proc_service.h: Synchronize comments and whitespace with
5378 GDB's version of this file.
5379
5380 2018-09-25 Tom Tromey <tom@tromey.com>
5381
5382 * configure: Rebuild.
5383 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
5384
5385 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5386
5387 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
5388 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
5389 ($(IPA_LIB)): Sort IPA_OBJS.
5390
5391 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5392
5393 * Makefile.in: Remove references to $(ADD_DEPS).
5394
5395 2018-09-16 Tom Tromey <tom@tromey.com>
5396
5397 * remote-utils.c (remote_open): Use GNU style for metasyntactic
5398 variables.
5399 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
5400 variables.
5401
5402 2018-09-05 Tom Tromey <tom@tromey.com>
5403
5404 * configure: Rebuild.
5405
5406 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
5407
5408 PR build/23399
5409 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
5410
5411 2018-08-27 Tom Tromey <tom@tromey.com>
5412
5413 PR build/23087:
5414 * configure: Rebuild.
5415
5416 2018-08-27 Tom Tromey <tom@tromey.com>
5417
5418 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
5419 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
5420 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
5421 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
5422 (s390x_emit_stack_adjust): Add casts to unsigned char.
5423
5424 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
5425
5426 PR gdb/23374
5427 PR gdb/23375
5428 * server.h (struct client_state) <disable_randomization>:
5429 Initialize to 1.
5430
5431 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
5432
5433 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
5434 variable.
5435 (mips_supply_ptrace_register): Likewise.
5436
5437 2018-07-22 Tom Tromey <tom@tromey.com>
5438
5439 * configure: Rebuild.
5440
5441 2018-07-22 Tom Tromey <tom@tromey.com>
5442
5443 * win32-low.c (win32_create_inferior): Remove unused variables.
5444 * gdbreplay.c (remote_open): Remove unused variable.
5445 * remote-utils.c (remote_prepare): Remove unused variable.
5446 * x86-tdesc.h (X86_TDESC_H): Define.
5447 (amd64_expedite_regs): Define conditionally.
5448 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
5449 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
5450 * remote-utils.c (readchar): Remove unused variable.
5451
5452 2018-07-13 Pedro Alves <palves@redhat.com>
5453
5454 * linux-low.c (linux_kill): Change parameter to process_info
5455 pointer instead of pid. Adjust.
5456 * lynx-low.c (lynx_kill): Likewise.
5457 * nto-low.c (nto_kill): Likewise.
5458 * spu-low.c (spu_kill): Likewise.
5459 * win32-low.c (win32_kill): Likewise.
5460 * server.c (handle_v_kill, kill_inferior_callback)
5461 (detach_or_kill_for_exit): Adjust.
5462 * target.c (kill_inferior): Change parameter to process_info
5463 pointer instead of pid. Adjust.
5464 * target.h (struct target_ops) <kill>: Change parameter to
5465 process_info pointer instead of pid. Adjust all implementations
5466 and callers.
5467 (kill_inferior): Likewise.
5468
5469 2018-07-13 Pedro Alves <palves@redhat.com>
5470
5471 * linux-low.c (linux_detach, linux_join): Change parameter to
5472 process_info pointer instead of pid. Adjust.
5473 * lynx-low.c (lynx_detach, lynx_join): Likewise.
5474 * nto-low.c (nto_detach): Likewise.
5475 * spu-low.c (spu_detach, spu_join): Likewise.
5476 * win32-low.c (win32_detach, win32_join): Likewise.
5477 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
5478 * target.h (struct target_ops) <detach, join>: Change parameter to
5479 process_info pointer instead of pid. Adjust all implementations
5480 and callers.
5481 (detach_inferior, join_inferior): Rename 'pid' parameter to
5482 'proc'.
5483
5484 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5485 Jan Kratochvil <jan.kratochvil@redhat.com>
5486 Paul Fertser <fercerpav@gmail.com>
5487 Tsutomu Seki <sekiriki@gmail.com>
5488
5489 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
5490 (OBS): Add 'common/netstuff.o'.
5491 (GDBREPLAY_OBS): Likewise.
5492 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
5493 (remote_open): Implement support for IPv6
5494 connections.
5495 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
5496 and 'wspiapi.h'.
5497 (handle_accept_event): Accept connections from IPv6 sources.
5498 (remote_prepare): Handle IPv6-style hostnames; implement
5499 support for IPv6 connections.
5500 (remote_open): Implement support for printing connections from
5501 IPv6 sources.
5502
5503 2018-07-11 Pedro Alves <palves@redhat.com>
5504
5505 PR gdb/23377
5506 * mem-break.c (any_persistent_commands): Add process_info
5507 parameter and use it instead of relying on the current process.
5508 Change return type to bool.
5509 * mem-break.h (any_persistent_commands): Add process_info
5510 parameter and change return type to bool.
5511 * server.c (handle_detach): Remove require_running_or_return call.
5512 Look up the process_info for the process we're about to detach.
5513 If not found, return back error to GDB. Adjust
5514 any_persistent_commands call to pass down a process pointer.
5515
5516 2018-07-11 Pedro Alves <palves@redhat.com>
5517
5518 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
5519 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
5520 instead of collect_register_by_name.
5521 * regcache.c (regcache_raw_get_unsigned_by_name): New.
5522 * regcache.h (regcache_raw_get_unsigned_by_name): New.
5523
5524 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
5525 Pedro Alves <palves@redhat.com>
5526
5527 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
5528
5529 2018-07-03 Tom Tromey <tom@tromey.com>
5530
5531 * linux-low.c: Update.
5532 * lynx-low.c: Update.
5533 * mem-break.c: Update.
5534 * nto-low.c: Update.
5535 * remote-utils.c: Update.
5536 * server.c: Update.
5537 * spu-low.c: Update.
5538 * target.c: Update.
5539 * win32-low.c: Update.
5540
5541 2018-07-03 Tom Tromey <tom@tromey.com>
5542
5543 * server.c: Update.
5544
5545 2018-07-03 Tom Tromey <tom@tromey.com>
5546
5547 * linux-low.c: Update.
5548
5549 2018-07-03 Tom Tromey <tom@tromey.com>
5550
5551 * target.c: Update.
5552
5553 2018-07-03 Tom Tromey <tom@tromey.com>
5554
5555 * linux-low.c: Update.
5556 * linux-mips-low.c: Update.
5557 * lynx-low.c: Update.
5558 * nto-low.c: Update.
5559 * remote-utils.c: Update.
5560 * server.c: Update.
5561 * spu-low.c: Update.
5562 * target.c: Update.
5563 * thread-db.c: Update.
5564
5565 2018-07-03 Tom Tromey <tom@tromey.com>
5566
5567 * linux-low.c: Update.
5568 * linux-mips-low.c: Update.
5569 * lynx-low.c: Update.
5570 * mem-break.c: Update.
5571 * nto-low.c: Update.
5572 * remote-utils.c: Update.
5573 * server.c: Update.
5574 * spu-low.c: Update.
5575 * target.c: Update.
5576 * tracepoint.c: Update.
5577
5578 2018-07-03 Tom Tromey <tom@tromey.com>
5579
5580 * linux-low.c: Update.
5581 * linux-ppc-low.c: Update.
5582 * linux-x86-low.c: Update.
5583 * proc-service.c: Update.
5584 * server.c: Update.
5585 * spu-low.c: Update.
5586 * thread-db.c: Update.
5587 * win32-low.c: Update.
5588
5589 2018-07-03 Tom Tromey <tom@tromey.com>
5590
5591 * linux-low.c: Update.
5592 * lynx-low.c: Update.
5593 * nto-low.c: Update.
5594 * remote-utils.c: Update.
5595 * spu-low.c: Update.
5596 * thread-db.c: Update.
5597 * win32-low.c: Update.
5598
5599 2018-06-29 Joel Brobecker <brobecker@adacore.com>
5600
5601 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
5602 parameter in call to 'amd64_create_target_description'.
5603
5604 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5605
5606 * x86-tdesc.h: Remove executable permission flag.
5607
5608 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5609
5610 * configure.ac: Remove AC_PREREQ, add missing quoting.
5611 * configure: Re-generate.
5612 * config.in: Re-generate.
5613 * aclocal.m4: Re-generate.
5614
5615 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
5616
5617 * tracepoint.h (current_traceframe): Remove declaration.
5618
5619 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5620
5621 * linux-aarch64-low.c (is_sve_tdesc): New function.
5622 (aarch64_sve_regs_copy_to_regcache): Likewise.
5623 (aarch64_sve_regs_copy_from_regcache): Likewise.
5624 (aarch64_regs_info): Add SVE checks.
5625 (initialize_low_arch): Initialize SVE.
5626
5627 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5628
5629 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
5630
5631 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5632
5633 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
5634 (initialize_low_tracepoint): Likewise
5635 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
5636 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
5637 param.
5638 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
5639 checks.
5640 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
5641
5642 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5643
5644 * server.h (PBUFSIZ): Increase size
5645
5646 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5647
5648 * regcache.c (regcache::raw_compare): New function.
5649 * regcache.h (regcache::raw_compare): New declaration.
5650
5651 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5652
5653 * regcache.c (new_register_cache): Use new.
5654 (free_register_cache): Use delete.
5655 (register_data): Use const.
5656 (supply_register): Move body inside regcache.
5657 (regcache::raw_supply): New override function.
5658 (collect_register): Move body inside regcache.
5659 (regcache::raw_collect): New override function.
5660 (regcache::get_register_status): New override function.
5661 * regcache.h (struct regcache): Inherit from reg_buffer_common.
5662
5663 2018-06-09 Tom Tromey <tom@tromey.com>
5664
5665 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
5666 declare queue.
5667 (event_queue): Use std::queue.
5668 (gdb_event_xfree): Remove.
5669 (initialize_event_loop, process_event, wait_for_event): Update.
5670
5671 2018-06-08 Stan Cox <scox@redhat.com>
5672
5673 * win32-low.c (win32_create_inferior): last_ptid and last_status
5674 moved to client_state.
5675
5676 2018-06-08 Pedro Alves <palves@redhat.com>
5677
5678 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
5679 common/common-exceptions.o, common/common-utils.o,
5680 common/errors.o, common/print-utils.o and utils.o.
5681 * gdbreplay.c: Include "common-defs.h" instead of the two
5682 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
5683 string.h or alloca.h.
5684 (perror_with_name): Delete.
5685 (remote_open): Use xstrdup instead of strdup.
5686 (main): Rename to ...
5687 (captured_main): ... this.
5688 (main): New.
5689
5690 2018-06-08 Tom Tromey <tom@tromey.com>
5691
5692 * linux-low.c (linux_low_read_btrace): Update.
5693
5694 2018-06-04 Stan Cox <scox@redhat.com>
5695
5696 * server.h (struct client_state): New.
5697 * server.c (cont_thread, general_thread, multi_process)
5698 (report_fork_events, report_vfork_events, report_exec_events)
5699 (report_thread_events, swbreak_feature, hwbreak_feature)
5700 (vCont_supported, disable_randomization, pass_signals)
5701 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
5702 Moved to client_state.
5703 * remote-utils.c (remote_debug, noack_mode)
5704 (transport_is_reliable): Moved to client_state.
5705 * tracepoint.c (current_traceframe): Moved to client_state.
5706
5707 Update all callers.
5708 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
5709 linux-low.c, remote-utils.h, target.c: Use client_state.
5710
5711 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5712
5713 * configure.srv: Add new c/h file.
5714
5715 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5716
5717 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
5718 null VQ.
5719
5720 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5721
5722 * gdb.arch/mips-fpregset-core.exp: New test.
5723 * gdb.arch/mips-fpregset-core.c: New test source.
5724
5725 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
5726
5727 PR server/23198
5728 * hostio.c (require_int): Do not report overflow for integers
5729 between 0xfffffff and 0x7fffffff.
5730
5731 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5732
5733 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
5734 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
5735 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
5736 functions.
5737 (the_low_target): Wire them.
5738
5739 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5740
5741 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
5742 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
5743 mode. Call collect_register_by_name with vscr using
5744 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
5745 (ppc_store_vrregset): Add and set vscr_offset variable as in
5746 ppc_fill_vrregset. Call supply_register_by_name with vscr using
5747 vscr_offset.
5748
5749 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5750
5751 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5752 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
5753 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
5754
5755 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5756
5757 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
5758 (ppc_store_vsxregset): Likewise.
5759 (ppc_fill_vrregset): Likewise.
5760 (ppc_store_vrregset): Likewise.
5761 (ppc_fill_evrregset): Likewise.
5762 (ppc_store_evrregset): Likewise.
5763 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
5764 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
5765 needed.
5766
5767 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5768
5769 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
5770 wordsize of the inferior. Call ppc_linux_target_wordsize.
5771
5772 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5773
5774 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
5775 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
5776 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
5777 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5778 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5779 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5780 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5781 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5782 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5783 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5784 (tdesc_powerpc_e500l): Remove.
5785 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
5786 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
5787 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
5788 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
5789 linux-ppc-tdesc.h.
5790 (ppc_arch_setup): Remove target description matching code. Fill a
5791 ppc_linux_features struct and call ppc_linux_match_description
5792 with it.
5793
5794 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5795
5796 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
5797 width of the requested register exceeds the width of the
5798 `ptrace' data type.
5799 (mips_cannot_store_register): Likewise.
5800
5801 2018-05-21 Maciej W. Rozycki <macro@mips.com>
5802
5803 * linux-mips-low.c (mips_fetch_register): New function. Update
5804 preceding comment.
5805 (mips_store_gregset): Supply 0 rather than $restart for $zero.
5806 (the_low_target): Wire `mips_fetch_register'.
5807
5808 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5809
5810 * lynx-i386-low.c (LYNXOS_178): New macro.
5811 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
5812 the layout on LynxOS-178.
5813 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
5814 handle floating point registers that are not supported by
5815 LynxOS-178.
5816
5817 2018-05-10 Tom Tromey <tom@tromey.com>
5818
5819 * configure: Rebuild.
5820
5821 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5822
5823 PR server/23158:
5824 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
5825 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
5826 Use it to set the expedite_regs field in the given tdesc.
5827 * x86-tdesc.h: New file.
5828 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
5829 Adjust following the addition of the new expedite_regs parameter
5830 to init_target_desc.
5831 * linux-tic6x-low.c (tic6x_read_description): Likewise.
5832 * linux-x86-tdesc.c: #include "x86-tdesc.h".
5833 (i386_linux_read_description, amd64_linux_read_description):
5834 Adjust following the addition of the new expedite_regs parameter
5835 to init_target_desc.
5836 * lynx-i386-low.c: #include "x86-tdesc.h".
5837 (lynx_i386_arch_setup): Adjust following the addition of the new
5838 expedite_regs parameter to init_target_desc.
5839 * nto-x86-low.c: #include "x86-tdesc.h".
5840 (nto_x86_arch_setup): Adjust following the addition of the new
5841 expedite_regs parameter to init_target_desc.
5842 * win32-i386-low.c: #include "x86-tdesc.h".
5843 (i386_arch_setup): Adjust following the addition of the new
5844 expedite_regs parameter to init_target_desc.
5845
5846 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5847
5848 PR server/23158:
5849 * win32-low.c (win32_create_inferior): Add call to my_wait
5850 setting last_status global.
5851
5852 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5853
5854 PR server/23158:
5855 * win32-low.c (create_process): Only call gdb_tilde_expand if
5856 inferior_cwd is not NULL.
5857
5858 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5859
5860 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
5861 registers to the cache if their values have changed.
5862 (i387_xsave_to_cache): Provide default values for x87 control
5863 registers when these features are available, but disabled.
5864 * regcache.c (supply_register_by_name_zeroed): New function.
5865 * regcache.h (supply_register_by_name_zeroed): Declare new
5866 function.
5867
5868 2018-05-07 Tom Tromey <tom@tromey.com>
5869
5870 * configure: Rebuild.
5871
5872 2018-05-04 Tom Tromey <tom@tromey.com>
5873
5874 * configure: Rebuild.
5875
5876 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5877 Pedro Alves <palves@redhat.com>
5878
5879 * linux-aarch64-low.c (aarch64_stopped_data_address):
5880 Likewise.
5881
5882 2018-04-27 Tom Tromey <tom@tromey.com>
5883
5884 * configure: Rebuild.
5885
5886 2018-04-23 Tom Tromey <tom@tromey.com>
5887
5888 * configure: Rebuild.
5889
5890 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
5891
5892 * Makefile.in (depcomp): Add "..".
5893 (all_deps_files): New and use it.
5894
5895 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5896
5897 * configure.srv (aarch64*-*-linux*): Don't include xml.
5898 (i[34567]86-*-cygwin*): Likewise.
5899 (i[34567]86-*-linux*): Likewise.
5900 (i[34567]86-*-lynxos*): Likewise.
5901 (i[34567]86-*-mingw32ce*): Likewise.
5902 (i[34567]86-*-mingw*): Likewise.
5903 (i[34567]86-*-nto*): Likewise.
5904 (tic6x-*-uclinux): Likewise.
5905 (x86_64-*-linux*): Likewise.
5906 (x86_64-*-mingw*): Likewise.
5907 (x86_64-*-cygwin*): Likewise.
5908
5909 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5910
5911 * tdesc.c: Remove xml parameter.
5912
5913 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5914
5915 * server.c (get_features_xml): Remove cast.
5916 * tdesc.c (void target_desc::accept): Fill in function.
5917 (tdesc_get_features_xml): Remove old xml creation.
5918 (print_xml_feature::visit_pre): Add xml vistor.
5919 * tdesc.h (struct target_desc): Make xmltarget mutable.
5920 (tdesc_get_features_xml): Remove declaration.
5921
5922 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5923
5924 * tdesc.c (tdesc_architecture_name): Add new function.
5925 (tdesc_osabi_name): Likewise.
5926 (tdesc_get_features_xml): Use new functions.
5927
5928 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5929
5930 * tdesc.c (tdesc_create_flags): Remove.
5931 (tdesc_add_flag): Likewise.
5932 (tdesc_named_type): Likewise.
5933 (tdesc_create_union): Likewise.
5934 (tdesc_create_struct): Likewise.
5935 (tdesc_create_vector): Likewise.
5936 (tdesc_add_bitfield): Likewise.
5937 (tdesc_add_field): Likewise.
5938 (tdesc_set_struct_size): Likewise.
5939
5940 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5941
5942 * tdesc.c (~target_desc): Remove implictly deleted items.
5943 (init_target_desc): Iterate all features.
5944 (tdesc_get_features_xml): Use vector.
5945 (tdesc_create_feature): Create feature.
5946 * tdesc.h (tdesc_feature) Remove
5947 (target_desc): Add features.
5948
5949 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5950
5951 * Makefile.in: Add common/tdesc.c
5952 * tdesc.c (init_target_desc): init all reg_defs from register
5953 vector.
5954 (tdesc_create_reg): Create tdesc_reg.
5955 * tdesc.h (tdesc_feature): Add register vector.
5956
5957 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
5958
5959 * tdesc.h (struct target_desc) <features>: Change type to
5960 std::vector<std::string>.
5961 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
5962 changes.
5963 (tdesc_get_features_xml): Likewise.
5964 (tdesc_create_feature): Likewise.
5965
5966 2018-03-26 Alan Hayward <alan.hayward@arm.com>
5967
5968 * regcache.c (find_register_by_number): Return a ref.
5969 (find_regno): Use references.
5970 (register_size): Likewise.
5971 (register_data): Likewise.
5972 * tdesc.c (target_desc::~target_desc): Remove free calls.
5973 (target_desc::operator==): Use std::vector compare.
5974 (init_target_desc): Use reference.
5975 (tdesc_create_reg): Use reg constructors.
5976 * tdesc.h (struct target_desc): Replace pointer with object.
5977
5978 2018-03-23 Alan Hayward <alan.hayward@arm.com>
5979
5980 * regcache.c (find_register_by_number): Make static.
5981 (find_regno): Use find_register_by_number
5982 * regcache.h (struct reg): Remove declaration.
5983
5984 2018-03-23 Alan Hayward <alan.hayward@arm.com>
5985
5986 * tdesc.c (target_desc::~target_desc): Move to here.
5987 (target_desc::operator==): Likewise.
5988 * tdesc.h (target_desc::~target_desc): Move from here.
5989 (target_desc::operator==): Likewise.
5990
5991 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
5992
5993 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
5994
5995 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
5996
5997 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
5998 S390_TDESC_GS.
5999 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
6000 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
6001 and init_registers_s390_gs_linux64.
6002
6003 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6004
6005 * linux-s390-low.c (s390_fill_gs): Remove function.
6006 (s390_fill_gsbc): Remove function.
6007 (s390_regsets): Set fill functions for the guarded storage regsets
6008 to NULL.
6009
6010 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6011
6012 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
6013 the word size. Add comment.
6014 (s390_get_wordsize): New function.
6015 (s390_arch_setup): No longer select a temporary tdesc to fetch the
6016 pswm with it. Instead, use s390_get_wordsize to determine the
6017 word size first and derive the correct tdesc from that directly.
6018
6019 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
6020
6021 * Makefile.in: Include silent-rules.mk.
6022 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
6023 (COMPILE): Add ECHO_CXX.
6024 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
6025 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
6026 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
6027 (version-generated.c): Add ECHO_GEN.
6028 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
6029 (IPAGENT_COMPILE): Add ECHO_CXX.
6030 (%-generated.c): Add ECHO_REGDAT.
6031
6032 2018-03-14 Tom Tromey <tom@tromey.com>
6033
6034 PR cli/14977:
6035 * ax.c (ax_printf): Special case for NULL.
6036
6037 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6038
6039 * linux-low.c (linux_qxfer_libraries_svr4): Use
6040 xml_escape_text_append.
6041
6042 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6043
6044 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
6045
6046 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6047
6048 * server.c (handle_general_set): Remove unnecessary xstrdup.
6049
6050 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6051
6052 * server.c (parse_debug_format_options): Adjust to
6053 delim_string_to_char_ptr_vec changes.
6054 * thread-db.c (thread_db_load_search): Adjust to
6055 dirnames_to_char_ptr_vec changes.
6056
6057 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
6058
6059 * target.h (target_enable_btrace, target_disable_btrace)
6060 (target_read_btrace, target_read_btrace_conf): Turn macro into
6061 inline function. Throw error if target method is not defined.
6062 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
6063 check for btrace target method. Be prepared to handle exceptions
6064 from btrace target methods.
6065
6066 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6067
6068 * server.c (captured_main): Change order of error message printed
6069 when the current working directory cannot be found.
6070
6071 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6072
6073 * server.c: Include "filenames.h" and "pathstuff.h".
6074 (program_name): Delete variable.
6075 (program_path): New anonymous class.
6076 (get_exec_wrapper): Use "program_path" instead of
6077 "program_name".
6078 (handle_v_run): Likewise.
6079 (captured_main): Likewise.
6080 (process_serial_event): Likewise.
6081
6082 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6083
6084 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
6085 (OBJS): Add "pathstuff.o".
6086 * server.c (current_directory): New global variable.
6087 (captured_main): Initialize "current_directory".
6088
6089 2018-02-26 Alan Hayward <alan.hayward@arm.com>
6090
6091 * tdesc.c: Use common/tdesc.h.
6092 * tdesc.h: Likewise.
6093
6094 2018-02-20 Alan Hayward <alan.hayward@arm.com>
6095 Simon Marchi <simon.marchi@ericsson.com>
6096
6097 * Makefile.in: Switch order of make rules.
6098
6099 2018-02-19 Alan Hayward <alan.hayward@arm.com>
6100
6101 * Makefile.in: Add common directory in build.
6102 * configure.ac: Add common reference.
6103 * configure: Regenerate.
6104
6105 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6106
6107 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
6108 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
6109 * spu-low.c (spu_target_ops): Likewise.
6110 * win32-low.c (win32_target_ops): Likewise.
6111 * server.c (supported_btrace_packets): Report packets unconditionally.
6112 * target.h (target_ops) <supports_btrace>: Remove.
6113 (target_supports_btrace): Remove.
6114
6115 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6116
6117 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
6118 (handle_btrace_disable): Change return type to void. Use exceptions
6119 to report errors.
6120 (handle_btrace_general_set): Catch exception and copy message to
6121 return message.
6122
6123 2018-02-08 Tom Tromey <tom@tromey.com>
6124
6125 * linux-low.c (install_software_single_step_breakpoints): Use
6126 make_scoped_restore.
6127 * inferiors.c (make_cleanup_restore_current_thread): Remove.
6128 (do_restore_current_thread_cleanup): Remove.
6129 * gdbthread.h (make_cleanup_restore_current_thread): Don't
6130 declare.
6131
6132 2018-02-08 Tom Tromey <tom@tromey.com>
6133
6134 * mem-break.c (set_raw_breakpoint_at): Use
6135 gdb::unique_xmalloc_ptr.
6136
6137 2018-01-30 Pedro Alves <palves@redhat.com>
6138
6139 PR gdb/13211
6140 * target.c (target_terminal::terminal_state): Rename to ...
6141 (target_terminal::m_terminal_state): ... this.
6142
6143 2018-01-19 James Clarke <jrtc27@jrtc27.com>
6144
6145 * linux-low.c (handle_extended_wait): Surround call to
6146 thread_db_notice_clone with #ifdef USE_THREAD_DB.
6147
6148 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
6149
6150 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
6151 linux_ptrace_attach_fail_reason_string now returning an
6152 std::string.
6153 (linux_attach): Likewise.
6154 * thread-db.c (attach_thread): Likewise.
6155
6156 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
6157
6158 PR gdb/21559
6159 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
6160 checking for fs_base/gs_base fields in struct user_regs_struct.
6161 * configure: Regenerate.
6162
6163 2018-01-16 Yao Qi <yao.qi@linaro.org>
6164
6165 PR gdb/18749
6166 * linux-low.c (fetch_register): Call supply_register instead of
6167 error.
6168
6169 2018-01-08 Yao Qi <yao.qi@linaro.org>
6170 Simon Marchi <simon.marchi@ericsson.com>
6171
6172 * Makefile.in (OBS): Remove selftest.o.
6173 * configure.ac: Set srv_selftest_objs if $development is true.
6174 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
6175 * configure: Re-generated.
6176 * server.c (captured_main): Wrap variable selftest_filter with
6177 GDB_SELF_TEST.
6178
6179 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6180
6181 * server.c (parse_debug_format_options): Return std::string.
6182 (handle_monitor_command, captured_main): Adjust.
6183
6184 2018-01-05 Pedro Alves <palves@redhat.com>
6185
6186 PR gdb/18653
6187 * server.c (captured_main): Pass quiet=false to
6188 save_original_signals_state.
6189
6190 2018-01-01 Joel Brobecker <brobecker@adacore.com>
6191
6192 * gdbreplay.c (gdbreplay_version): Update copyright year in
6193 version message.
6194 * server.c (gdbserver_version): Likewise.
6195
6196 2017-12-08 Tom Tromey <tom@tromey.com>
6197
6198 * ax.c (ax_printf): Update.
6199
6200 2017-12-07 Yao Qi <yao.qi@linaro.org>
6201
6202 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
6203 aarch64_linux_read_description.
6204 * linux-amd64-ipa.c (idx2mask): New array.
6205 (get_ipa_tdesc): Move idx2mask out.
6206 (initialize_low_tracepoint): Initialize target descriptions.
6207 * linux-i386-ipa.c (idx2mask): New array.
6208 (get_ipa_tdesc): Move idx2mask out.
6209 (initialize_low_tracepoint): Initialize target descriptions.
6210
6211 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
6212
6213 * tdesc.c (struct tdesc_type): Change return type.
6214 (tdesc_add_flag): Change parameter type.
6215 (tdesc_add_bitfield): Likewise.
6216 (tdesc_add_field): Likewise.
6217 (tdesc_set_struct_size): Likewise.
6218
6219 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
6220
6221 * regcache.c (registers_to_string): Remove unused variable.
6222
6223 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6224
6225 * inferiors.c (for_each_inferior_with_data): Remove.
6226 * inferiors.h (for_each_inferior_with_data): Remove.
6227 * server.c (handle_qxfer_threads_worker): Change parameter type.
6228 (handle_qxfer_threads_proper): Use for_each_thread.
6229
6230 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6231
6232 * inferiors.c (for_each_inferior): Remove.
6233 (clear_inferiors): Use for_each_thread.
6234 * inferiors.h (for_each_inferior): Remove.
6235 * linux-low.c (linux_wait_for_event_filtered): Use
6236 for_each_thread.
6237 (linux_stabilize_threads): Likewise.
6238 * regcache.c (regcache_release): Likewise.
6239 * server.c (gdb_wants_all_threads_stopped): Likewise.
6240 (clear_pending_status_callback): Remove.
6241 (handle_status): Use for_each_thread.
6242 (captured_main): Likewise.
6243 * win32-low.c (child_init_thread_list): Likewise.
6244 (win32_clear_inferiors): Likewise.
6245 (fake_breakpoint_event): Likewise.
6246
6247 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6248
6249 * inferiors.h (find_inferior): Remove.
6250 * inferiors.c (find_inferior): Remove.
6251
6252 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6253
6254 * linux-low.c (resume_status_pending_p): Update comment.
6255 (need_step_over_p): Update comment.
6256
6257 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6258
6259 * linux-low.c (proceed_one_lwp): Return void, change parameter
6260 type.
6261 (unsuspend_and_proceed_one_lwp): Likewise.
6262 (proceed_all_lwps): Use for_each_thread.
6263 (unstop_all_lwps): Likewise.
6264
6265 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6266
6267 * linux-low.c (linux_resume_one_thread): Return void, take
6268 parameter directly.
6269 (linux_resume): Use for_each_thread.
6270
6271 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6272
6273 * linux-low.c (send_sigstop_callback): Return void, change
6274 parameter type. Rename to...
6275 (send_sigstop): ... this.
6276 (suspend_and_send_sigstop_callback): Return void, change parameter
6277 type. Rename to...
6278 (suspend_and_send_sigstop): ... this.
6279 (stop_all_lwps): Use for_each_thread.
6280
6281 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6282
6283 * linux-low.c (lwp_running): Return bool, remove unused
6284 argument.
6285 (linux_stabilize_threads): Use find_thread.
6286
6287 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6288
6289 * linux-low.c (select_singlestep_lwp_callback): Remove.
6290 (count_events_callback): Remove.
6291 (select_event_lwp_callback): Remove.
6292 (select_event_lwp): Use find_thread/for_each_thread.
6293
6294 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6295
6296 * linux-low.c (not_stopped_callback): Return bool, take filter
6297 argument directly.
6298 (linux_wait_for_event_filtered): Use find_thread.
6299 (linux_wait_1): Likewise.
6300
6301 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6302
6303 * linux-low.c (same_lwp): Remove.
6304 (find_lwp_pid): Use find_thread.
6305
6306 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6307
6308 * linux-low.c (delete_lwp_callback): Remove.
6309 (linux_mourn): Use for_each_thread.
6310
6311 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6312
6313 * linux-low.c (linux_detach_lwp_callback): Return void, remove
6314 args parameter, don't check for pid.
6315 (linux_detach): Use for_each_thread.
6316
6317 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6318
6319 * linux-low.c (struct counter): Remove.
6320 (second_thread_of_pid_p): Remove.
6321 (last_thread_of_process_p): Use find_thread.
6322
6323 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6324
6325 * inferiors.c (find_inferior_in_random): Remove.
6326 * inferiors.h (find_inferior_in_random): Remove.
6327 * linux-low.c (status_pending_p_callback): Return bool, accept
6328 parameter ptid directly.
6329 (linux_wait_for_event_filtered): Use find_thread_in_random.
6330 (linux_wait_1): Likewise.
6331
6332 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6333
6334 * inferiors.c (find_inferior_id): Remove.
6335 (find_thread_ptid): Move implemention from find_inferior_id to
6336 here.
6337 * inferiors.h (find_inferior_id): Remove.
6338 * server.c (handle_status): Use find_thread_ptid.
6339 (process_serial_event): Likewise.
6340 * thread-db.c (find_one_thread): Likewise.
6341 (thread_db_thread_handle): Likewise.
6342 * win32-low.c (thread_rec): Likewise.
6343 (child_delete_thread): Likewise.
6344 (win32_thread_alive): Likewise.
6345 (get_child_debug_event): Likewise.
6346
6347 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6348
6349 * linux-mips-low.c (update_watch_registers_callback): Return
6350 void, remove pid_p parameter, don't check for pid.
6351 (mips_insert_point, mips_remove_point): Use for_each_thread.
6352
6353 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6354
6355 * lynx.low (lynx_delete_thread_callback): Remove.
6356 (lynx_mourn): Use for_each_thread.
6357
6358 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6359
6360 * regcache.c (regcache_invalidate_one): Remove.
6361 (regcache_invalidate_pid): use for_each_thread.
6362
6363 2017-11-26 Tom Tromey <tom@tromey.com>
6364
6365 * linux-low.c (linux_create_inferior): Update.
6366
6367 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
6368
6369 * spu-low.c (spu_create_inferior): Fix typo in argument name.
6370
6371 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6372
6373 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
6374 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6375 * linux-aarch64-tdesc-selftest.c: New file.
6376 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6377
6378 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6379
6380 * configure.srv: Add new file.
6381 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6382 * linux-aarch64-tdesc-selftest.c: New file.
6383 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6384
6385 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6386
6387 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
6388 * linux-aarch64-low.c (initialize_low_arch): Remove init.
6389 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
6390
6391 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6392
6393 * configure.srv: Add new files.
6394 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
6395 aarch64_linux_read_description.
6396 * linux-aarch64-low.c (aarch64_linux_read_description):
6397 Merge with aarch64_arch_setup.
6398 (aarch64_arch_setup): Call aarch64_linux_read_description.
6399 * linux-aarch64-tdesc.c: New file.
6400 * linux-aarch64-tdesc.h: New file.
6401
6402 2017-11-24 Yao Qi <yao.qi@linaro.org>
6403
6404 * configure.srv: Set $srv_regobj for tic6x-linux.
6405 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
6406 (tic6x_read_description): Move some code to tic6x_arch_setup.
6407 (tic6x_tdesc_test): New function.
6408 (initialize_low_arch): Call selftests::register_test.
6409
6410 2017-11-22 Yao Qi <yao.qi@linaro.org>
6411
6412 * remote-utils.c (prepare_resume_reply): Use memcpy.
6413
6414 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6415
6416 * linux-low.c (kill_one_lwp_callback): Return void, take
6417 argument directly, don't filter on pid.
6418 (linux_kill): Use for_each_thread.
6419
6420 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6421
6422 * linux-low.c (need_step_over_p): Return bool, remove dummy
6423 argument.
6424 (linux_resume, proceed_all_lwps): Use find_thread.
6425
6426 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6427
6428 * linux-low.c (resume_status_pending_p): Return bool, remove
6429 flag_p argument.
6430 (linux_resume): Use find_thread.
6431
6432 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6433
6434 * linux-low.c (struct thread_resume_array): Remove.
6435 (linux_set_resume_request): Return void, take arguments
6436 directly.
6437 (linux_resume): Use for_each_thread.
6438
6439 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6440
6441 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
6442 return bool, remove data argument.
6443 (linux_stabilize_threads): Use find_thread.
6444
6445 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6446
6447 * linux-low.c (unsuspend_one_lwp): Remove.
6448 (unsuspend_all_lwps): Use for_each_thread, inline code from
6449 unsuspend_one_lwp.
6450
6451 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6452
6453 * gdbthread.h (find_thread): Add overload with ptid_t filter.
6454 * linux-low.c (struct iterate_over_lwps_args): Remove.
6455 (iterate_over_lwps_filter): Remove.
6456 (iterate_over_lwps): Use find_thread.
6457
6458 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6459
6460 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
6461 (linux_handle_new_gdb_connection): Use for_each_thread, inline
6462 code from reset_lwp_ptrace_options_callback.
6463
6464 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6465
6466 * linux-arm-low.c (struct update_registers_data): Remove.
6467 (update_registers_callback): Return void, take arguments
6468 directly, don't check thread's pid.
6469 (arm_insert_point, arm_remove_point): Use for_each_thread.
6470
6471 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6472
6473 * win32-low.c (continue_one_thread): Return void, take argument
6474 directly.
6475 (child_continue): Use for_each_thread.
6476
6477 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6478
6479 * win32-i386-low.c (update_debug_registers_callback): Rename
6480 to ...
6481 (update_debug_registers): ... this, return void, remove pid_p arg.
6482 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
6483
6484 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6485
6486 * inferiors.h (struct process_info): Add constructor, initialize
6487 fields..
6488 <syscalls_to_catch>: Change type to std::vector<int>.
6489 * inferiors.c (add_process): Allocate process_info with new.
6490 (remove_process): Free process_info with delete.
6491 * linux-low.c (handle_extended_wait): Adjust.
6492 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
6493 * server.c (handle_general_set): Adjust.
6494
6495 2017-11-16 Pedro Alves <palves@redhat.com>
6496
6497 * remote-utils.c (remote_close): Block SIGIO signals instead of
6498 uninstalling the SIGIO handler.
6499
6500 2017-11-16 Alan Hayward <alan.hayward@arm.com>
6501
6502 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
6503
6504 2017-11-16 Yao Qi <yao.qi@linaro.org>
6505
6506 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
6507 (tic6x_store_gregset): Likewise.
6508 (tic6x_usrregs_info): Move it up.
6509
6510 2017-11-15 Alan Hayward <alan.hayward@arm.com>
6511
6512 * Makefile.in: Update arch rules.
6513 * configure.srv: Explicitly mark arch/ files.
6514
6515 2017-11-13 Andreas Schwab <schwab@suse.de>
6516
6517 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
6518 function.
6519 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6520
6521 2017-11-06 Pedro Alves <palves@redhat.com>
6522
6523 * config.in, configure: Regenerate.
6524
6525 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6526
6527 * target.c (struct thread_search): Remove.
6528 (thread_search_callback): Remove.
6529 (prepare_to_access_memory): Use for_each_thread instead of
6530 find_inferior. Inline code from thread_search_callback.
6531
6532 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6533
6534 * server.c (struct visit_actioned_threads_data): Remove.
6535 (visit_actioned_threads): Change prototype to take arguments
6536 directly.
6537 (resume): Use find_thread instead of find_inferior.
6538
6539 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6540
6541 * server.c (queue_stop_reply_callback): Change prototype, return
6542 void.
6543 (find_status_pending_thread_callback): Remove.
6544 (handle_status): Replace find_inferior with find_thread and
6545 for_each_thread.
6546
6547 2017-10-25 Alan Hayward <alan.hayward@arm.com>
6548
6549 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
6550 with REGNO.
6551 (aarch64_store_gregset): Likewise.
6552 (aarch64_fill_fpregset): Likewise.
6553 (aarch64_store_fpregset): Likewise.
6554
6555 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
6556
6557 * gdbthread.h (find_thread, for_each_thread): New functions.
6558 * inferiors.c (thread_of_pid): Remove.
6559 (find_any_thread_of_pid): Use find_thread.
6560 * linux-low.c (num_lwps): Use for_each_thread.
6561
6562 2017-10-17 Yao Qi <yao.qi@linaro.org>
6563
6564 * Makefile.in: Remove one rule.
6565 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
6566
6567 2017-10-17 Yao Qi <yao.qi@linaro.org>
6568
6569 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
6570 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
6571
6572 2017-10-17 Yao Qi <yao.qi@linaro.org>
6573
6574 * configure.srv: Rename arm.o with arch/arm.o.
6575
6576 2017-10-17 Yao Qi <yao.qi@linaro.org>
6577
6578 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
6579 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
6580 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
6581 (arch-i386.o, arch-amd64.o): Remove rules.
6582 (arch/%.o): New rule.
6583 Update POSTCOMPILE and COMPILE.pre.
6584 * configure.ac: Invoke AC_CONFIG_COMMANDS.
6585 * configure: Re-generated.
6586 * configure.srv: Replace arch-i386.o with arch/i386.o.
6587 Replace arch-amd64.o with arch/amd64.o.
6588
6589 2017-10-16 Yao Qi <yao.qi@linaro.org>
6590
6591 * configure: Regenerated.
6592
6593 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6594
6595 * inferiors.h: (struct inferior_list): Remove.
6596 (struct inferior_list_entry); Remove.
6597 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
6598 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
6599 get_first_inferior): Remove.
6600 (for_each_inferior, for_each_inferior_with_data, find_inferior,
6601 find_inferior_id, find_inferior_in_random): Change signature.
6602 * inferiors.c (all_threads): Change type to
6603 std::list<thread_info *>.
6604 (get_thread): Remove macro.
6605 (find_inferior, find_inferior_id): Change signature, implement
6606 using find_thread.
6607 (find_inferior_in_random): Change signature, implement using
6608 find_thread_in_random.
6609 (for_each_inferior, for_each_inferior_with_data): Change
6610 signature, implement using for_each_thread.
6611 (add_inferior_to_list, remove_inferior): Remove.
6612 (add_thread, get_first_thread, thread_of_pid,
6613 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
6614 (get_first_inferior, one_inferior_p, clear_inferior_list):
6615 Remove.
6616 (clear_inferiors, get_thread_process): Update.
6617 * gdbthread.h: Include <list>.
6618 (struct thread_info) <entry>: Remove field.
6619 <id>: New field.
6620 (all_threads): Change type to std::list<thread_info *>.
6621 (get_first_inferior): Add doc.
6622 (find_thread, for_each_thread, find_thread_in_random): New
6623 functions.
6624 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
6625 * linux-arm-low.c (update_registers_callback): Update.
6626 * linux-low.c (second_thread_of_pid_p): Update.
6627 (kill_one_lwp_callback, linux_detach_lwp_callback,
6628 delete_lwp_callback, status_pending_p_callback, same_lwp,
6629 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
6630 iterate_over_lwps, not_stopped_callback,
6631 resume_stopped_resumed_lwps, count_events_callback,
6632 select_singlestep_lwp_callback, select_event_lwp_callback,
6633 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
6634 suspend_and_send_sigstop_callback, wait_for_sigstop,
6635 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
6636 lwp_running, linux_set_resume_request, resume_status_pending_p,
6637 need_step_over_p, start_step_over, linux_resume_one_thread,
6638 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
6639 reset_lwp_ptrace_options_callback): Update.
6640 * linux-mips-low.c (update_watch_registers_callback): Update.
6641 * regcache.c (regcache_invalidate_one, regcache_invalidate):
6642 Update.
6643 (free_register_cache_thread_one): Remove.
6644 (regcache_release): Update.
6645 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
6646 handle_qxfer_threads_worker): Update.
6647 (handle_query): Update, use list iterator.
6648 (visit_actioned_threads, handle_pending_status,
6649 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
6650 clear_pending_status_callback, set_pending_status_callback,
6651 find_status_pending_thread_callback, handle_status,
6652 process_serial_event): Update.
6653 * target.c (thread_search_callback): Update.
6654 * thread-db.c (thread_db_get_tls_address): Update.
6655 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
6656 Update.
6657 * win32-i386-low.c (update_debug_registers_callback): Update.
6658 * win32-low.c (delete_thread_info, child_delete_thread,
6659 continue_one_thread, suspend_one_thread,
6660 get_child_debug_event): Adjust.
6661
6662 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6663
6664 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
6665 * inferiors.h: Include <list>.
6666 (struct process_info) <entry>: Remove field.
6667 <pid>: New field.
6668 (pid_of): Change macro to function.
6669 (ptid_of, lwpid_of): Remove macro.
6670 (all_processes): Change type to std::list<process_info *>.
6671 (ALL_PROCESSES): Remove macro.
6672 (for_each_process, find_process): New function.
6673 * inferiors.c (all_processes): Change type to
6674 std::list<process_info *>.
6675 (find_thread_process): Adjust.
6676 (add_process): Likewise.
6677 (remove_process): Likewise.
6678 (find_process_pid): Likewise.
6679 (get_first_process): Likewise.
6680 (started_inferior_callback): Remove.
6681 (have_started_inferiors_p): Adjust.
6682 (attached_inferior_callback): Remove.
6683 (have_attached_inferiors_p): Adjust.
6684 * linux-low.c (check_zombie_leaders): Likewise.
6685 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
6686 (x86_linux_update_xmltarget): Adjust.
6687 * server.c (handle_query): Likewise.
6688 (gdb_reattached_process): Remove.
6689 (handle_status): Adjust.
6690 (kill_inferior_callback): Likewise.
6691 (detach_or_kill_inferior): Remove.
6692 (print_started_pid): Likewise.
6693 (print_attached_pid): Likewise.
6694 (detach_or_kill_for_exit): Update.
6695 (process_serial_event): Likewise.
6696 * linux-arm-low.c (arm_new_fork): Likewise.
6697
6698 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6699
6700 * dll.h: Include <list>.
6701 (struct dll_info): Add constructor.
6702 <entry>: Remove field.
6703 (all_dlls): Change type to std::list<dll_info>.
6704 * dll.c: Include <algorithm>.
6705 (get_dll): Remove macro.
6706 (all_dlls): Change type to std::list<dll_info *>.
6707 (free_one_dll): Remove.
6708 (match_dll): Likewise.
6709 (loaded_dll): Adjust.
6710 (unloaded_dll): Adjust to all_dlls type change, use
6711 std::find_if. Inline code from match_dll.
6712 (clear_dlls): Adjust to all_dlls type change.
6713 * server.c (emit_dll_description): Remove.
6714 (handle_qxfer_libraries): Adjust to all_dlls type change,
6715 integrate emit_dll_description's functionality.
6716
6717 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6718
6719 * linux-low.h (struct linux_target_ops) <delete_process>: New
6720 field.
6721 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
6722 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
6723 (struct linux_target_ops): Add delete_process callback.
6724 * linux-arm-low.c (arm_delete_process): New.
6725 (struct linux_target_ops): Add delete_process callback.
6726 * linux-bfin-low.c (struct linux_target_ops): Likewise.
6727 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
6728 * linux-m32r-low.c (struct linux_target_ops): Likewise.
6729 * linux-mips-low.c (mips_linux_delete_process): New.
6730 (struct linux_target_ops): Add delete_process callback.
6731 * linux-ppc-low.c (struct linux_target_ops): Likewise.
6732 * linux-s390-low.c (struct linux_target_ops): Likewise.
6733 * linux-sh-low.c (struct linux_target_ops): Likewise.
6734 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
6735 * linux-tile-low.c (struct linux_target_ops): Likewise.
6736 * linux-x86-low.c (x86_linux_delete_process): New.
6737 (struct linux_target_ops): Add delete_process callback.
6738 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
6739
6740 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6741
6742 * linux-aarch64-low.c (the_low_target): Add thread delete
6743 callback.
6744 * linux-arm-low.c (arm_delete_thread): New function.
6745 (the_low_target): Add thread delete callback.
6746 * linux-bfin-low.c (the_low_target): Likewise.
6747 * linux-crisv32-low.c (the_low_target): Likewise.
6748 * linux-low.c (delete_lwp): Invoke delete_thread callback if
6749 set.
6750 * linux-low.h (struct linux_target_ops) <delete_thread>: New
6751 field.
6752 * linux-m32r-low.c (the_low_target): Add thread delete callback.
6753 * linux-mips-low.c (mips_linux_delete_thread): New function.
6754 (the_low_target): Add thread delete callback.
6755 * linux-ppc-low.c (the_low_target): Likewise.
6756 * linux-s390-low.c (the_low_target): Likewise.
6757 * linux-sh-low.c (the_low_target): Likewise.
6758 * linux-tic6x-low.c (the_low_target): Likewise.
6759 * linux-tile-low.c (the_low_target): Likewise.
6760 * linux-x86-low.c (the_low_target): Likewise.
6761 * linux-xtensa-low.c (the_low_target): Likewise.
6762
6763 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
6764
6765 * win32-low.c: Include "common-inferior.h".
6766
6767 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6768
6769 * inferiors.c (set_inferior_cwd): New function.
6770 * server.c (handle_general_set): Handle QSetWorkingDir packet.
6771 (handle_query): Inform that QSetWorkingDir is supported.
6772 * win32-low.c (create_process): Pass the inferior's cwd to
6773 CreateProcess.
6774
6775 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6776
6777 * inferiors.c (current_inferior_cwd): New global variable.
6778 (get_inferior_cwd): New function.
6779 * inferiors.h (struct process_info) <cwd>: New field.
6780
6781 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6782
6783 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
6784 (OBS): Add gdb_tilde_expand.o.
6785
6786 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
6787
6788 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
6789 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
6790
6791 2017-09-29 Pedro Alves <palves@redhat.com>
6792
6793 * ax.c (gdb_parse_agent_expr): Constify.
6794 * ax.h (gdb_parse_agent_expr): Constify.
6795 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6796 Constify.
6797 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
6798 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
6799 * remote-utils.h (read_ptid): Constify.
6800 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
6801 (process_point_options, process_serial_event): Constify.
6802 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
6803 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
6804 (cmd_qtbuffer): Constify.
6805
6806 2017-09-29 Pedro Alves <palves@redhat.com>
6807
6808 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
6809 fails.
6810
6811 2017-09-29 Pedro Alves <palves@redhat.com>
6812
6813 * linux-low.c (handle_extended_wait): Pass parent thread instead
6814 of process to thread_db_notice_clone.
6815 * linux-low.h (thread_db_notice_clone): Replace parent process
6816 parameter with parent thread parameter.
6817 * thread-db.c (find_one_thread): Add comment.
6818 (thread_db_notice_clone): Replace parent process parameter with
6819 parent thread parameter. Temporarily switch to the parent thread.
6820
6821 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
6822
6823 * gdbthread.h: Include "common-gdbthread.h".
6824 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
6825 "if" when validating the ptid.
6826 * remote-utils.c: Include "gdbthread.h".
6827 (prepare_resume_reply): Use "switch_to_thread".
6828 * target.c (done_accessing_memory): Likewise.
6829
6830 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6831
6832 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
6833 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
6834 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
6835 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
6836 s390x-gs-linux64-ipa.o to ipa_obj.
6837 * linux-s390-low.c (HWCAP_S390_GS): New define.
6838 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
6839 New functions.
6840 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
6841 (s390_arch_setup): Check for guarded-storage support and choose
6842 appropriate tdesc.
6843 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
6844 init_registers_s390x_gs_linux64.
6845 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
6846 enum value.
6847 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
6848 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
6849
6850 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
6851
6852 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
6853
6854 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6855
6856 * linux-low.h (struct lwp_info): Add new field, thread_handle.
6857 (thread_db_thread_handle): Declare.
6858 * linux-low.c (linux_target_ops): Initialize thread_handle.
6859 * server.c (handle_qxfer_threads_worker): Add support for
6860 "handle" attribute.
6861 * target.h (struct target_ops): Add new function pointer,
6862 thread_handle.
6863 (target_thread_handle): Define.
6864 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
6865 field in lwp.
6866 (thread_db_thread_handle): New function.
6867
6868 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6869
6870 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
6871 * linux-low.h (thread_db_notice_clone): Declare.
6872 * thread-db.c (thread_db_notice_clone): New function.
6873
6874 2017-09-21 Pedro Alves <palves@redhat.com>
6875
6876 * server.c (gdb_read_memory, handle_status, process_serial_event)
6877 (handle_serial_event, handle_target_event): Adjust to
6878 set_desired_thread prototype change.
6879 * target.c (set_desired_thread): Remove 'use_general' parameter
6880 and adjust.
6881 * target.h (set_desired_thread): Remove 'use_general' parameter.
6882
6883 2017-09-20 Tom Tromey <tom@tromey.com>
6884
6885 * target.c (target_terminal::terminal_state): Define.
6886 (target_terminal::init): Rename from target_terminal_init.
6887 (target_terminal::inferior): Rename from
6888 target_terminal_inferior.
6889 (target_terminal::ours): Rename from target_terminal_ours.
6890 (target_terminal::ours_for_output, target_terminal::info): New.
6891
6892 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6893
6894 * server.c (accumulate_file_name_length): Remove.
6895 (emit_dll_description): Adjust to std::string change.
6896 (handle_qxfer_libraries): Use std::string to hold document.
6897
6898 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6899
6900 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
6901 return type of xml_escape_text.
6902 * server.c (emit_dll_description): Likewise.
6903
6904 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6905
6906 * server.c (captured_main): Accept argument for --selftest.
6907 Update run_tests call.
6908 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
6909 when registering selftests.
6910
6911 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
6912
6913 * regcache.c (get_thread_regcache): Update code to use "std::vector"
6914 instead of "VEC" for "target_desc.reg_defs".
6915 (regcache_cpy): Likewise.
6916 (registers_to_string): Likewise.
6917 (registers_from_string): Likewise.
6918 (find_regno): Likewise.
6919 (supply_regblock): Likewise.
6920 (regcache_raw_read_unsigned): Likewise.
6921 * tdesc.c (init_target_desc): Likewise.
6922 (tdesc_create_reg): Likewise.
6923 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
6924 (struct target_desc) <reg_defs>: Convert to "std::vector".
6925 (target_desc): Do not initialize "reg_defs".
6926 (~target_desc): Update code to use "std::vector" instead of "VEC"
6927 for "target_desc.reg_defs".
6928 (operator==): Likewise.
6929
6930 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6931
6932 * inferiors.h (thread_to_gdb_id): Remove.
6933 * inferiors.c (thread_to_gdb_id): Remove.
6934 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
6935 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
6936 lynx_store_registers, lynx_read_memory, lynx_write_memory):
6937 Likewise.
6938 * nto-low.c (nto_fetch_registers, nto_store_registers,
6939 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
6940
6941 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6942
6943 * inferiors.h (gdb_id_to_thread_id): Remove.
6944 * inferiors.c (gdb_id_to_thread_id): Remove.
6945 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
6946 removal. Move pid declaration closer to where it's used.
6947
6948 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6949
6950 * server.c (handle_detach): New function.
6951 (process_serial_event): Move code out, call handle_detach.
6952
6953 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6954
6955 * server.c (require_running): Rename to ...
6956 (require_running_or_return): ... this ...
6957 (require_running_or_break): ... and this.
6958 (handle_query, process_serial_event): Adjust.
6959
6960 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6961
6962 * linux-low.c (linux_set_resume_request): Remove unused
6963 variables.
6964
6965 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6966
6967 * server.c (first_thread_of): Remove.
6968 (process_serial_event): Replace usage of first_thread_of with
6969 find_any_thread_of_pid.
6970 * tracepoint.c (same_process_p): Remove.
6971 (gdb_agent_about_to_close): Replace usage of same_process_p with
6972 find_any_thread_of_pid.
6973 * linux-x86-low.c (same_process_callback): Remove.
6974 (x86_arch_setup_process_callback): Replace usage of
6975 same_process_callback with find_any_thread_of_pid.
6976 * thread-db.c (any_thread_of): Remove.
6977 (switch_to_process): Replace usage of any_thread_of with
6978 find_any_thread_of_pid.
6979 * inferiors.c (thread_pid_matches_callback): Remove.
6980 (find_thread_process): Adjust to use find_any_thread_of_pid.
6981
6982 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
6983
6984 * regcache.c (get_thread_regcache): Guard calls to "memset"
6985 with "!VEC_empty".
6986
6987 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
6988
6989 * linux-low.c (handle_extended_wait): Use
6990 "allocate_target_description" instead of "XNEW".
6991 * linux-x86-low.c (initialize_low_arch): Likewise.
6992
6993 2017-09-05 Yao Qi <yao.qi@linaro.org>
6994
6995 * configure.srv (srv_i386_regobj): Remove.
6996 (srv_amd64_regobj): Remove.
6997 (srv_regobj): Set it to "" for x86 non-linux targets.
6998 * linux-x86-tdesc.c (i386_linux_read_description):
6999 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
7000 (init_registers_i386): Remove the declaration.
7001 (tdesc_i386): Remove the declaration.
7002 (lynx_i386_arch_setup): Call i386_create_target_description.
7003 * nto-x86-low.c: Likewise.
7004 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
7005 [!__x86_64__]: include arch/i386.h.
7006 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
7007
7008 2017-09-05 Yao Qi <yao.qi@linaro.org>
7009
7010 * configure.srv (srv_amd64_linux_xmlfiles): Remove
7011 i386/amd64-XXX-linux from it.
7012
7013 2017-09-05 Yao Qi <yao.qi@linaro.org>
7014
7015 * configure.srv: Empty srv_amd64_linux_regobj if $development is
7016 false.
7017 (ipa_amd64_linux_regobj): Remove.
7018 (ipa_x32_linux_regobj): Remove.
7019
7020 2017-09-05 Yao Qi <yao.qi@linaro.org>
7021
7022 * Makefile.in (arch-amd64.o): New rule.
7023 * configure.srv: Append arch-amd64.o.
7024 * linux-amd64-ipa.c: Include common/x86-xstate.h.
7025 (get_ipa_tdesc): Call amd64_linux_read_description.
7026 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
7027 and init_registers_amd64_XXX.
7028 * linux-x86-low.c (x86_linux_read_description): Call
7029 amd64_linux_read_description.
7030 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
7031 (initialize_low_arch): Don't call init_registers_x32_XXX and
7032 init_registers_amd64_XXX.
7033 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
7034 and tdesc_amd64_XXX.
7035 [__x86_64__] (amd64_tdesc_test): New function.
7036 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
7037 and init_registers_amd64_XXX.
7038 * linux-x86-tdesc.c: Include arch/amd64.h.
7039 (xcr0_to_tdesc_idx): New function.
7040 (i386_linux_read_description): New function.
7041 (amd64_get_ipa_tdesc_idx): New function.
7042 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
7043 (amd64_get_ipa_tdesc): Declare.
7044
7045 2017-09-05 Yao Qi <yao.qi@linaro.org>
7046
7047 * configure.srv (srv_i386_linux_xmlfiles): Remove
7048 i386/i386-XXX-linux.xml from it.
7049
7050 2017-09-05 Yao Qi <yao.qi@linaro.org>
7051
7052 * configure.srv: Set srv_i386_linux_regobj empty if $development
7053 is false.
7054 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
7055 initialize_low_tdesc.
7056 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
7057 with #if initialize_low_tdesc.
7058 * linux-x86-tdesc-selftest.c: New file.
7059 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
7060
7061 2017-09-05 Yao Qi <yao.qi@linaro.org>
7062
7063 * Makefile.in (arch-i386.o): New rule.
7064 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
7065 (x86_64-*-linux*): Likewise.
7066 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
7067 include arch/i386.h.
7068 (i386_linux_read_description): Remove code and call
7069 i386_create_target_description.
7070 * tdesc.c (allocate_target_description): New function.
7071 * tdesc.h (set_tdesc_architecture): Remove declaration.
7072 (set_tdesc_osabi): Likewise.
7073
7074 2017-09-05 Yao Qi <yao.qi@linaro.org>
7075
7076 * linux-x86-tdesc.c: Don't include <inttypes.h>.
7077 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
7078 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
7079 .xmltarget.
7080 * server.c (get_features_xml): Call tdesc_get_features_xml.
7081 * tdesc.c (set_tdesc_architecture): New function.
7082 (set_tdesc_osabi): New function.
7083 (tdesc_get_features_xml): New function.
7084 (tdesc_create_feature): Add an argument.
7085 * tdesc.h (struct target_desc) <features>: New field.
7086 <arch, osabi>: New field.
7087 (~target_desc): xfree features, arch, and osabi.
7088 (target_desc::oerator==): Don't compare .xmltarget.
7089 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
7090 (set_tdesc_osabi): Likewise.
7091 (tdesc_get_features_xml): Likewise.
7092
7093 2017-09-05 Yao Qi <yao.qi@linaro.org>
7094
7095 * linux-x86-tdesc.c: Include selftest.h.
7096 (i386_tdesc_test): New function.
7097 (initialize_low_tdesc): Call selftests::register_test.
7098 * tdesc.h: Include regdef.h.
7099 (target_desc): Override operator == and !=.
7100
7101 2017-09-05 Yao Qi <yao.qi@linaro.org>
7102
7103 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
7104 (ipa_obj): Likewise.
7105 * linux-i386-ipa.c: Include common/x86-xstate.h
7106 (get_ipa_tdesc): Call i386_linux_read_description.
7107 (initialize_low_tracepoint): Don't call init_registers_XXX
7108 functions, call initialize_low_tdesc instead.
7109 * linux-x86-low.c (x86_linux_read_description): Call
7110 i386_linux_read_description.
7111 (initialize_low_arch): Don't call init_registers_i386_XXX
7112 functions, call initialize_low_tdesc.
7113 * linux-x86-tdesc.c: New file.
7114 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
7115 (i386_get_ipa_tdesc_idx): Declare.
7116 (i386_get_ipa_tdesc): Declare.
7117 (initialize_low_tdesc): Declare.
7118
7119 2017-09-05 Yao Qi <yao.qi@linaro.org>
7120
7121 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
7122 instead of 0.
7123
7124 2017-09-05 Yao Qi <yao.qi@linaro.org>
7125
7126 * Makefile.in (IPA_OBJS): Add vec-ipa.o
7127 * regcache.c (get_thread_regcache): Use VEC_length.
7128 (init_register_cache): Likewise.
7129 (regcache_cpy): Likewise.
7130 (registers_to_string): Iterate reg_defs via VEC_iterate.
7131 (find_regno): Likewise.
7132 (find_register_by_number): Use VEC_index.
7133 (register_size): Call find_register_by_number.
7134 (register_data): Call find_register_by_number.
7135 (supply_regblock): Use VEC_length.
7136 (regcache_raw_read_unsigned): Likewise.
7137 * tdesc.c (init_target_desc): Iterate reg_defs via
7138 VEC_iterate.
7139 (default_description): Update initializer.
7140 (copy_target_description): Don't update field num_registers.
7141 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
7142 <num_registers>: Remove.
7143
7144 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7145
7146 * Makefile.in (.SECONDARY): Define target.
7147
7148 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
7149
7150 * linux-low.c (linux_wait_1): Adjust.
7151 * server.c (queue_stop_reply_callback): Adjust.
7152
7153 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7154
7155 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
7156 QEnvironmentUnset and QEnvironmentReset packets.
7157 (handle_query): Inform remote that QEnvironmentHexEncoded,
7158 QEnvironmentUnset and QEnvironmentReset are supported.
7159
7160 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
7161
7162 * inferiors.h (inferior_target_data): Rename to ...
7163 (thread_target_data): ... this.
7164 (inferior_regcache_data): Rename to ...
7165 (thread_regcache_data): ... this.
7166 (set_inferior_regcache_data): Rename to ...
7167 (set_thread_regcache_data): ... this.
7168 * inferiors.c (inferior_target_data): Rename to ...
7169 (thread_target_data): ... this.
7170 (inferior_regcache_data): Rename to ...
7171 (thread_regcache_data): ... this.
7172 (set_inferior_regcache_data): Rename to ...
7173 (set_thread_regcache_data): ... this.
7174 (free_one_thread): Update.
7175 * linux-low.h (get_thread_lwp): Update.
7176 * regcache.c (get_thread_regcache): Update.
7177 (regcache_invalidate_thread): Update.
7178 (free_register_cache_thread): Update.
7179 * win32-i386-low.c (update_debug_registers_callback): Update.
7180 (win32_get_current_dr): Update.
7181 * win32-low.c (thread_rec): Update.
7182 (delete_thread_info): Update.
7183 (continue_one_thread): Update.
7184 (suspend_one_thread): Update.
7185
7186 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
7187
7188 * inferiors.c (set_inferior_target_data): Remove.
7189 * inferiors.h (set_inferior_target_data): Remove.
7190
7191 2017-08-18 Yao Qi <yao.qi@linaro.org>
7192
7193 * Makefile.in (OBS): Add selftest.o.
7194 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
7195 * configure, config.in: Re-generated.
7196 * server.c: Include common/sefltest.h.
7197 (captured_main): Handle option --selftest.
7198
7199 2017-08-09 Yao Qi <yao.qi@linaro.org>
7200
7201 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
7202 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
7203 i386-avx-mpx.o and i386-mmx.o.
7204 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
7205 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
7206 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
7207 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
7208 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
7209 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
7210 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
7211 i386/amd64-avx-mpx.xml.
7212
7213 2017-08-09 Yao Qi <yao.qi@linaro.org>
7214
7215 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
7216 and x32-avx-avx512.o.
7217 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
7218 i386/x32-avx-avx512.xml.
7219
7220 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
7221
7222 * tracepoint.h (enum class fast_tpoint_collect_result): New
7223 enumeration.
7224 (fast_tracepoint_collecting): Change return type to
7225 fast_tpoint_collect_result.
7226 * tracepoint.c (fast_tracepoint_collecting): Likewise.
7227 * linux-low.h: Include tracepoint.h.
7228 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
7229 fast_tpoint_collect_result.
7230 * linux-low.c (handle_tracepoints): Adjust.
7231 (linux_fast_tracepoint_collecting): Change return type to
7232 fast_tpoint_collect_result.
7233 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
7234 linux_wait_1, stuck_in_jump_pad_callback,
7235 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
7236 proceed_one_lwp): Adjust to type change.
7237
7238 2017-07-10 Yao Qi <yao.qi@linaro.org>
7239
7240 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
7241
7242 2017-06-29 Yao Qi <yao.qi@linaro.org>
7243
7244 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
7245 Remove.
7246 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
7247
7248 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
7249
7250 * Makefile.in (IPA_OBJS): Sort and format one item per line.
7251
7252 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
7253
7254 * linux-low.c (linux_create_inferior): Adjust code to access the
7255 environment information via 'gdb_environ' class.
7256 * lynx-low.c (lynx_create_inferior): Likewise.
7257 * server.c (our_environ): Make it an instance of 'gdb_environ'.
7258 (get_environ): Return a pointer to 'our_environ'.
7259 (captured_main): Initialize 'our_environ'.
7260 * server.h (get_environ): Adjust prototype.
7261 * spu-low.c (spu_create_inferior): Adjust code to access the
7262 environment information via 'gdb_environ' class.
7263
7264 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7265
7266 * linux-low.c (linux_read_memory, linux_write_memory): Remove
7267 usage of "register" keyword.
7268
7269 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7270
7271 * configure: Re-generate.
7272
7273 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7274
7275 * configure: Re-generate.
7276
7277 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7278
7279 * Makefile.in (COMPILE.pre): Add "-x c++".
7280
7281 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
7282
7283 * fork-child.c: Conditionally include <signal.h>.
7284
7285 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7286
7287 * server.c (handle_general_set): Handle new packet
7288 "QStartupWithShell".
7289 (handle_query): Add "QStartupWithShell" to the list of supported
7290 packets.
7291 (gdbserver_usage): Add help text explaining the
7292 new "--startup-with-shell" and "--no-startup-with-shell" CLI
7293 options.
7294 (captured_main): Recognize and act upon the presence of the new
7295 CLI options.
7296
7297 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7298 Pedro Alves <palves@redhat.com>
7299
7300 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
7301 * configure: Regenerate.
7302 * configure.srv (srv_linux_obj): Add "fork-child.o" and
7303 "fork-inferior.o".
7304 (i[34567]86-*-lynxos*): Likewise.
7305 (spu*-*-*): Likewise.
7306 * fork-child.c: New file.
7307 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
7308 and "environ.h".
7309 (linux_ptrace_fun): New function.
7310 (linux_create_inferior): Adjust function prototype to reflect
7311 change on "target.h". Adjust function code to use
7312 "fork_inferior".
7313 (linux_request_interrupt): Delete "signal_pid".
7314 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7315 (lynx_ptrace_fun): New function.
7316 (lynx_create_inferior): Adjust function prototype to reflect
7317 change on "target.h". Adjust function code to use
7318 "fork_inferior".
7319 * nto-low.c (nto_create_inferior): Adjust function prototype and
7320 code to reflect change on "target.h". Update comments.
7321 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
7322 "common-terminal.h" and "environ.h".
7323 (terminal_fd): Moved to fork-child.c.
7324 (old_foreground_pgrp): Likewise.
7325 (restore_old_foreground_pgrp): Likewise.
7326 (last_status): Make it global.
7327 (last_ptid): Likewise.
7328 (our_environ): New variable.
7329 (startup_with_shell): Likewise.
7330 (program_name): Likewise.
7331 (program_argv): Rename to...
7332 (program_args): ...this.
7333 (wrapper_argv): New variable.
7334 (start_inferior): Delete function.
7335 (get_exec_wrapper): New function.
7336 (get_exec_file): Likewise.
7337 (get_environ): Likewise.
7338 (prefork_hook): Likewise.
7339 (post_fork_inferior): Likewise.
7340 (postfork_hook): Likewise.
7341 (postfork_child_hook): Likewise.
7342 (handle_v_run): Update code to deal with arguments coming from the
7343 remote host. Update calls from "start_inferior" to
7344 "create_inferior".
7345 (captured_main): Likewise. Initialize environment variable. Call
7346 "have_job_control".
7347 * server.h (post_fork_inferior): New prototype.
7348 (get_environ): Likewise.
7349 (last_status): Declare.
7350 (last_ptid): Likewise.
7351 (signal_pid): Likewise.
7352 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7353 (spu_ptrace_fun): New function.
7354 (spu_create_inferior): Adjust function prototype to reflect change
7355 on "target.h". Adjust function code to use "fork_inferior".
7356 * target.c (target_terminal_init): New function.
7357 (target_terminal_inferior): Likewise.
7358 (target_terminal_ours): Likewise.
7359 * target.h: Include <vector>.
7360 (struct target_ops) <create_inferior>: Update prototype.
7361 (create_inferior): Update macro.
7362 * utils.c (gdb_flush_out_err): New function.
7363 * win32-low.c (win32_create_inferior): Adjust function prototype
7364 and code to reflect change on "target.h".
7365
7366 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7367
7368 * inferiors.c (switch_to_thread): New function.
7369
7370 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7371
7372 * Makefile.in (SFILE): Add "common/job-control.c".
7373 (OBS): Add "job-control.o".
7374
7375 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
7376
7377 * Makefile: Remove "@host_makefile_frag@".
7378
7379 2017-05-05 Pedro Alves <palves@redhat.com>
7380
7381 * configure: Regenerate.
7382
7383 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
7384
7385 * configure: Regenerate.
7386
7387 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7388
7389 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
7390 software_single_step change of return type to
7391 std::vector<CORE_ADDR>.
7392 * linux-low.c (install_software_single_step_breakpoints):
7393 Likewise.
7394 * linux-low.h (install_software_single_step_breakpoints):
7395 Likewise.
7396
7397 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7398
7399 * remote-utils.c: Include "gdb_termios.h" instead of
7400 "terminal.h".
7401 * terminal.h: Delete file.
7402
7403 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7404
7405 * server.c: Include <vector>.
7406 <program_argv, wrapper_argv>: Convert to std::vector.
7407 (start_inferior): Rewrite function to use C++.
7408 (handle_v_run): Likewise. Update code that calculates the argv
7409 based on the vRun packet; use C++.
7410 (captured_main): Likewise.
7411
7412 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7413
7414 * server.c (handle_v_cont): Initialize thread_resume::thread
7415 with null_ptid.
7416
7417 2017-04-05 Pedro Alves <palves@redhat.com>
7418
7419 * configure: Regenerate.
7420
7421 2017-04-05 Pedro Alves <palves@redhat.com>
7422
7423 * gdbreplay.c (sync_error): Constify.
7424 * linux-x86-low.c (push_opcode): Constify.
7425
7426 2017-04-05 Pedro Alves <palves@redhat.com>
7427
7428 * win32-low.c (get_child_debug_event)
7429 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
7430 Report TARGET_WAITKIND_SPURIOUS instead.
7431
7432 2017-04-05 Pedro Alves <palves@redhat.com>
7433
7434 * remote-utils.c (remote_prepare, remote_open): Constify.
7435 * remote-utils.h (remote_prepare, remote_open): Constify.
7436 * server.c (captured_main): Constify 'port' handling.
7437
7438 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
7439
7440 * Makefile.in (clean): Clear .deps.
7441
7442 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
7443
7444 * .gitignore: Remove generated files, replace with wildcard.
7445 * (clean): Replace removal of generated files with wildcard.
7446 (version.c): Replace with...
7447 (version-generated.c): ...this.
7448 (xml-builtin.c): Replace with...
7449 (xml-builtin-generated.c): ...this.
7450 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
7451 (%.c: *regformats*): Replace with...
7452 (%-generated.c: *regformats*): ...this.
7453
7454 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7455
7456 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
7457 (xtensa_fill_gregset): Call collect_register_by_name for
7458 threadptr register.
7459 (xtensa_store_gregset): Call supply_register_by_name for
7460 threadptr register.
7461
7462 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7463
7464 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
7465 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
7466 (xtensa_store_gregset): Call supply_register for all registers in
7467 a0_regnum..a0_regnum + C0_NREGS range.
7468
7469 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7470
7471 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
7472 (ax-ipa.o: ax.c): Remove.
7473 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
7474 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
7475 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
7476 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
7477 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
7478
7479 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7480
7481 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
7482 (print-utils-ipa.o: ../common/print-utils.c): Remove.
7483 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
7484 (errors-ipa.o: ../common/errors.c): Remove.
7485 (format-ipa.o: ../common/format.c): Remove.
7486 (common-utils-ipa.o: ../common/common-utils.c): Remove.
7487
7488 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7489
7490 * Makefile.in (%-ipa.o: %.c): New rule.
7491 (tracepoint-ipa.o: tracepoint.c): Remove.
7492 (utils-ipa.o: utils.c): Remove.
7493 (remote-utils-ipa.o: remote-utils.c): Remove.
7494 (regcache-ipa.o: regcache.c): Remove.
7495 (i386-linux-ipa.o: i386-linux.c): Remove.
7496 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
7497 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
7498 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
7499 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
7500 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
7501 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
7502 (amd64-linux-ipa.o: amd64-linux.c): Remove.
7503 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
7504 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
7505 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
7506 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
7507 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
7508 (aarch64-ipa.o: aarch64.c): Remove.
7509 (s390-linux32-ipa.o: s390-linux32.c): Remove.
7510 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
7511 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
7512 (s390-linux64-ipa.o: s390-linux64.c): Remove.
7513 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
7514 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
7515 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
7516 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
7517 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
7518 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
7519 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
7520 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
7521 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
7522 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
7523 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
7524 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
7525 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
7526 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
7527 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
7528 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
7529 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
7530 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
7531 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
7532 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
7533 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
7534 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
7535 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
7536 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
7537 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
7538 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
7539 (tdesc-ipa.o: tdesc.c): Remove.
7540 (x32-linux-ipa.o: x32-linux.c): Remove.
7541 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
7542 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
7543
7544 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7545
7546 * Makefile.in (%.o: ../arch/%.c): New rule.
7547 (arm.o: ../arch/arm.c): Remove.
7548 (arm-linux.o: ../arch/arm-linux.c): Remove.
7549 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
7550 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
7551
7552 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7553
7554 * Makefile.in (%.o: ../nat/%.c): New rule.
7555 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
7556 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
7557 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
7558 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
7559 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
7560 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
7561 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
7562 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
7563 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
7564 (linux-personality.o: ../nat/linux-personality.c): Remove.
7565 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
7566 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
7567 (x86-linux.o: ../nat/x86-linux.c): Remove.
7568 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
7569 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
7570
7571 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7572
7573 * Makefile.in (%.o: ../common/%.c): New rule.
7574 (signals.o: ../common/signals.c): Remove.
7575 (print-utils.o: ../common/print-utils.c): Remove.
7576 (rsp-low.o: ../common/rsp-low.c): Remove.
7577 (common-utils.o: ../common/common-utils.c): Remove.
7578 (posix-strerror.o: ../common/posix-strerror.c): Remove.
7579 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
7580 (vec.o: ../common/vec.c): Remove.
7581 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
7582 (xml-utils.o: ../common/xml-utils.c): Remove.
7583 (ptid.o: ../common/ptid.c): Remove.
7584 (buffer.o: ../common/buffer.c): Remove.
7585 (format.o: ../common/format.c): Remove.
7586 (filestuff.o: ../common/filestuff.c): Remove.
7587 (agent.o: ../common/agent.c): Remove.
7588 (errors.o: ../common/errors.c): Remove.
7589 (environ.o: ../common/environ.c): Remove.
7590 (common-debug.o: ../common/common-debug.c): Remove.
7591 (cleanups.o: ../common/cleanups.c): Remove.
7592 (common-exceptions.o: ../common/common-exceptions.c): Remove.
7593 (fileio.o: ../common/fileio.c): Remove.
7594 (common-regcache.o: ../common/common-regcache.c): Remove.
7595 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
7596 (new-op.o: ../common/new-op.c): Remove.
7597 (btrace-common.o: ../common/btrace-common.c): Remove.
7598
7599 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7600
7601 * Makefile.in (%.o: ../target/%.c): New rule.
7602 (waitstatus.o: ../target/waitstatus.c): Remove.
7603
7604 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7605
7606 * Makefile.in
7607 (%.c: ../regformats/%.dat,
7608 (%.c: ../regformats/arm/%.dat,
7609 (%.c: ../regformats/i386/%.dat,
7610 (%.c: ../regformats/rs6000/%.dat): New rules.
7611 (aarch64.c): Remove.
7612 (reg-arm.c): Remove.
7613 (arm-with-iwmmxt.c): Remove.
7614 (arm-with-vfpv2.c): Remove.
7615 (arm-with-vfpv3.c): Remove.
7616 (arm-with-neon.c): Remove.
7617 (reg-bfin.c): Remove.
7618 (reg-cris.c): Remove.
7619 (reg-crisv32.c): Remove.
7620 (i386.c): Remove.
7621 (i386-linux.c): Remove.
7622 (i386-avx.c): Remove.
7623 (i386-avx-linux.c): Remove.
7624 (i386-avx-avx512.c): Remove.
7625 (i386-avx-avx512-linux.c): Remove.
7626 (i386-mpx.c): Remove.
7627 (i386-mpx-linux.c): Remove.
7628 (i386-avx-mpx-avx512-pku.c): Remove.
7629 (i386-avx-mpx-avx512-pku-linux.c): Remove.
7630 (i386-avx-mpx.c): Remove.
7631 (i386-avx-mpx-linux.c): Remove.
7632 (i386-mmx.c): Remove.
7633 (i386-mmx-linux.c): Remove.
7634 (reg-ia64.c): Remove.
7635 (reg-m32r.c): Remove.
7636 (reg-m68k.c): Remove.
7637 (reg-cf.c): Remove.
7638 (mips-linux.c): Remove.
7639 (mips-dsp-linux.c): Remove.
7640 (mips64-linux.c): Remove.
7641 (mips64-dsp-linux.c): Remove.
7642 (nios2-linux.c): Remove.
7643 (powerpc-32.c): Remove.
7644 (powerpc-32l.c): Remove.
7645 (powerpc-altivec32l.c): Remove.
7646 (powerpc-cell32l.c): Remove.
7647 (powerpc-vsx32l.c): Remove.
7648 (powerpc-isa205-32l.c): Remove.
7649 (powerpc-isa205-altivec32l.c): Remove.
7650 (powerpc-isa205-vsx32l.c): Remove.
7651 (powerpc-e500l.c): Remove.
7652 (powerpc-64l.c): Remove.
7653 (powerpc-altivec64l.c): Remove.
7654 (powerpc-cell64l.c): Remove.
7655 (powerpc-vsx64l.c): Remove.
7656 (powerpc-isa205-64l.c): Remove.
7657 (powerpc-isa205-altivec64l.c): Remove.
7658 (powerpc-isa205-vsx64l.c): Remove.
7659 (s390-linux32.c): Remove.
7660 (s390-linux32v1.c): Remove.
7661 (s390-linux32v2.c): Remove.
7662 (s390-linux64.c): Remove.
7663 (s390-linux64v1.c): Remove.
7664 (s390-linux64v2.c): Remove.
7665 (s390-te-linux64.c): Remove.
7666 (s390-vx-linux64.c): Remove.
7667 (s390-tevx-linux64.c): Remove.
7668 (s390x-linux64.c): Remove.
7669 (s390x-linux64v1.c): Remove.
7670 (s390x-linux64v2.c): Remove.
7671 (s390x-te-linux64.c): Remove.
7672 (s390x-vx-linux64.c): Remove.
7673 (s390x-tevx-linux64.c): Remove.
7674 (tic6x-c64xp-linux.c): Remove.
7675 (tic6x-c64x-linux.c): Remove.
7676 (tic6x-c62x-linux.c): Remove.
7677 (reg-sh.c): Remove.
7678 (reg-sparc64.c): Remove.
7679 (reg-spu.c): Remove.
7680 (amd64.c): Remove.
7681 (amd64-linux.c): Remove.
7682 (amd64-avx.c): Remove.
7683 (amd64-avx-linux.c): Remove.
7684 (amd64-avx-avx512.c): Remove.
7685 (amd64-avx-avx512-linux.c): Remove.
7686 (amd64-mpx.c): Remove.
7687 (amd64-mpx-linux.c): Remove.
7688 (amd64-avx-mpx-avx512-pku.c): Remove.
7689 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
7690 (amd64-avx-mpx.c): Remove.
7691 (amd64-avx-mpx-linux.c): Remove.
7692 (x32.c): Remove.
7693 (x32-linux.c): Remove.
7694 (x32-avx.c): Remove.
7695 (x32-avx-linux.c): Remove.
7696 (x32-avx-avx512.c): Remove.
7697 (x32-avx-avx512-linux.c): Remove.
7698 (reg-xtensa.c): Remove.
7699 (reg-tilegx.c): Remove.
7700 (reg-tilegx32.c): Remove.
7701
7702 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
7703
7704 * Makefile.in (SFILES): Add "common/environ.c".
7705 (OBJS): Add "common/environ.h".
7706
7707 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
7708
7709 * configure.ac: Check if the fs_base and gs_base members of
7710 `struct user_regs_struct' exist.
7711 * config.in: Regenerated.
7712 * configure: Likewise.
7713
7714 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
7715
7716 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
7717 target_read_memory.
7718 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
7719 (get_next_pcs_syscall_next_pc): Likewise.
7720
7721 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
7722
7723 * win32-i386-low.c: Fix incorrect reference to a couple source files.
7724 * nto-x86-low.c: Likewise.
7725
7726 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
7727
7728 * Makefile.in: Include disable-implicit-rules.mk.
7729
7730 2016-11-23 Pedro Alves <palves@redhat.com>
7731
7732 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
7733 (debug_vprintf): Use std::chrono::steady_clock instead of
7734 gettimeofday. Use '.' instead of ':'.
7735 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
7736 (get_timestamp): Use std::chrono::steady_clock instead of
7737 gettimeofday.
7738
7739 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7740
7741 * Makefile.in: Fix whitespace formatting.
7742
7743 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7744
7745 * Makefile.in (SFILES, OBS): Flatten list and order
7746 alphabetically.
7747
7748 2016-11-23 Pedro Alves <palves@redhat.com>
7749
7750 * event-loop.c (handle_file_event): Use warning.
7751 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
7752 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7753 Use warning.
7754
7755 2016-11-23 Pedro Alves <palves@redhat.com>
7756
7757 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
7758 output.
7759 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
7760 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
7761 debug_printf and debug_flush for debug output.
7762 * server.c (handle_general_set): Likewise.
7763 * thread-db.c (try_thread_db_load): Use debug_printf for debug
7764 output.
7765
7766 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7767
7768 * Makefile.in (.c.o): Replace rule with ...
7769 (%.o: %.c): ... this one.
7770
7771 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7772
7773 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
7774 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
7775 make.
7776 * configure.ac: Remove checks for the make program.
7777 * configure: Re-generate.
7778
7779 2016-10-28 Pedro Alves <palves@redhat.com>
7780
7781 * Makefile.in (CXX_DIALECT): Get from configure.
7782 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
7783 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
7784 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
7785 * config.in: Regenerate.
7786 * configure: Regenerate.
7787
7788 2016-10-27 Yao Qi <yao.qi@linaro.org>
7789
7790 * linux-low.c (linux_supports_range_stepping): Return true if
7791 can_software_single_step return true.
7792
7793 2016-10-27 Yao Qi <yao.qi@linaro.org>
7794
7795 * inferiors.c (find_inferior_in_random): New function.
7796 * inferiors.h (find_inferior_in_random): Declare.
7797 * linux-low.c (linux_wait_for_event_filtered): Call
7798 find_inferior_in_random instead of find_inferior.
7799
7800 2016-10-27 Yao Qi <yao.qi@linaro.org>
7801
7802 * linux-low.c (linux_wait_1): If single-step breakpoints are
7803 inserted, remove them.
7804
7805 2016-10-26 Pedro Alves <palves@redhat.com>
7806
7807 * linux-low.c (handle_extended_wait): Link parent/child fork
7808 threads.
7809 (linux_wait_1): Unlink them.
7810 (linux_set_resume_request): Ignore resume requests for
7811 already-resumed and unhandled fork child threads.
7812 * linux-low.h (struct lwp_info) <fork_relative>: New field.
7813 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
7814 New functions.
7815 (handle_v_requests) <vCont>: Don't call require_running.
7816 * server.h (in_queued_stop_replies): New declaration.
7817
7818 2016-10-24 Yao Qi <yao.qi@linaro.org>
7819
7820 PR server/20733
7821 * linux-aarch64-low.c (append_insns): Cast the return value to
7822 'uint32_t *'.
7823
7824 2016-10-10 Yao Qi <yao.qi@linaro.org>
7825
7826 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
7827
7828 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
7829
7830 * target.c (target_supports_multi_process): New function, moved
7831 from...
7832 * target.h (target_supports_multi_process): ... here. Remove
7833 macro.
7834
7835 2016-10-05 Tom Tromey <tom@tromey.com>
7836
7837 PR remote/20655:
7838 * tracepoint.c (handle_tracepoint_bkpts): Check
7839 ipa_error_tracepoint, not ipa_stopping_tracepoint.
7840
7841 2016-10-05 Yao Qi <yao.qi@linaro.org>
7842
7843 * configure.srv: Update the path of arm-*.xml files.
7844
7845 2016-10-05 Terry Guo <terry.guo@arm.com>
7846 Yao Qi <yao.qi@linaro.org>
7847
7848 * Makefile.in: Adjust the path of rules.
7849 * configure.srv: Update the path of xml files.
7850 * regformats/arm-with-iwmmxt.dat: Regenerated.
7851 * regformats/arm-with-neon.dat: Likewise.
7852 * regformats/arm-with-vfpv2.dat: Likewise.
7853 * regformats/arm-with-vfpv3.dat Likewise.
7854
7855 2016-09-30 Yao Qi <yao.qi@linaro.org>
7856
7857 PR gdbserver/20627
7858 * target.c (target_stop_and_wait): Don't call
7859 target_continue_no_signal, use resume_stop instead.
7860
7861 2016-09-26 Yao Qi <yao.qi@linaro.org>
7862
7863 * linux-low.c (linux_wait_1): Call debug_exit.
7864
7865 2016-09-23 Pedro Alves <palves@redhat.com>
7866
7867 * Makefile.in (SFILES): Add common/new-op.c.
7868 (OBS): Add common/new-op.o.
7869 (new-op.o): New rule.
7870
7871 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
7872
7873 * .gitinore: Ignore more files.
7874
7875 2016-09-21 Yao Qi <yao.qi@linaro.org>
7876
7877 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
7878 23.
7879
7880 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
7881
7882 * server.c (start_inferior): Call target_mourn_inferior instead of
7883 mourn_inferior; pass ptid_t argument to it.
7884 (resume): Likewise.
7885 (handle_target_event): Likewise.
7886 * target.c (target_mourn_inferior): New function.
7887 * target.h (mourn_inferior): Delete macro.
7888
7889 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
7890
7891 * linux-low.c (lwp_is_stepping): New function.
7892
7893 2016-09-06 Carl Love <cel@us.ibm.com>
7894
7895 * server.c (start_inferior): Fixed comment, requested comment change
7896 didn't get updated correctly. Removed reference to ptrace () call as
7897 it is only true on Linux systems.
7898
7899 2016-09-06 Carl Love <cel@us.ibm.com>
7900
7901 * server.c (start_inferior): Do not call
7902 function target_post_create_inferior () if the
7903 inferior process has already exited.
7904
7905 2016-09-05 Pedro Alves <palves@redhat.com>
7906
7907 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
7908 (COMPILE.pre, CC_LD): Use CXX directly.
7909 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
7910 * acinclude.m4: Don't include build-with-cxx.m4.
7911 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
7912 * configure: Regenerate.
7913
7914 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
7915
7916 PR gdb/19495
7917 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
7918 call writing data to own_buf.
7919
7920 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7921
7922 * target.c (mywait): Call target_wait instead of
7923 the_target->wait.
7924 (target_wait): New function.
7925
7926 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7927
7928 * server.c (start_inferior): New variable 'ptid'. Replace calls
7929 to the_target->resume by target_continue{,_no_signal}, depending
7930 on the case.
7931 * target.c (target_stop_and_wait): Call target_continue_no_signal
7932 instead of the_target->resume.
7933 (target_continue): New function.
7934
7935 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
7936
7937 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
7938
7939 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
7940
7941 PR server/20491
7942 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
7943 ps_prochandle.
7944 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
7945 * linux-arm-low.c (ps_get_thread_area): Likewise.
7946 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
7947 * linux-m68k-low.c (ps_get_thread_area): Likewise.
7948 * linux-mips-low.c (ps_get_thread_area): Likewise.
7949 * linux-nios2-low.c (ps_get_thread_area): Likewise.
7950 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
7951 * linux-x86-low.c (ps_get_thread_area): Likewise.
7952 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
7953
7954 2016-08-19 Pedro Alves <palves@redhat.com>
7955
7956 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
7957
7958 2016-08-19 Pedro Alves <palves@redhat.com>
7959
7960 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
7961 comment. Use memcpy instead of casting through unsigned long.
7962
7963 2016-08-19 Pedro Alves <palves@redhat.com>
7964
7965 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
7966 allocating around 0x80000000.
7967
7968 2016-08-19 Pedro Alves <palves@redhat.com>
7969
7970 PR gdb/20415
7971 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
7972 (x32-avx512-linux-ipa.o): New rules.
7973 * configure.ac (x86_64-*-linux*): New x32 check.
7974 * configure.srv (ipa_x32_linux_regobj): New.
7975 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
7976 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
7977 descriptions.
7978 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
7979 descriptions.
7980 * configure: Regenerate.
7981
7982 2016-08-09 Pedro Alves <palves@redhat.com>
7983
7984 PR gdb/18653
7985 * Makefile.in (OBS): Add signals-state-save-restore.o.
7986 (signals-state-save-restore.o): New rule.
7987 * config.in: Regenerate.
7988 * configure: Regenerate.
7989 * linux-low.c: Include "signals-state-save-restore.h".
7990 (linux_create_inferior): Call
7991 restore_original_signals_state.
7992 * server.c: Include "dispositions-save-restore.h".
7993 (captured_main): Call save_original_signals_state.
7994
7995 2016-08-05 Pedro Alves <palves@redhat.com>
7996
7997 * configure: Regenerate.
7998
7999 2016-08-04 Yao Qi <yao.qi@linaro.org>
8000
8001 * linux-low.c (regsets_fetch_inferior_registers): Check
8002 errno is ESRCH or not.
8003
8004 2016-08-02 Yao Qi <yao.qi@linaro.org>
8005
8006 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
8007 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
8008 (thread_db_load_search): Update.
8009 (try_thread_db_load_1): Don't look for td_ta_event_addr,
8010 td_ta_set_event and td_ta_event_getmsg.
8011
8012 2016-07-26 Pedro Alves <palves@redhat.com>
8013
8014 PR server/20414
8015 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
8016 of unsigned long for 64-bit registers and use uint32_t instead of
8017 unsigned int for 32-bit registers.
8018
8019 2016-07-26 Pedro Alves <palves@redhat.com>
8020
8021 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
8022 to 'ptrace'.
8023
8024 2016-07-21 Tom Tromey <tom@tromey.com>
8025
8026 * configure: Rebuild.
8027
8028 2016-07-21 Yao Qi <yao.qi@linaro.org>
8029
8030 * mem-break.c (find_gdb_breakpoint): Cast bp to
8031 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
8032
8033 2016-07-21 Yao Qi <yao.qi@linaro.org>
8034
8035 * server.c (handle_v_requests): Support s and S actions
8036 if target_supports_software_single_step return true.
8037
8038 2016-07-21 Yao Qi <yao.qi@linaro.org>
8039
8040 * linux-low.c (resume_stopped_resumed_lwps): If resume request
8041 is resume_step, call maybe_hw_step.
8042 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
8043 and unstop them.
8044 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
8045 breakpoints or not.
8046 (proceed_one_lwp): If resume request is resume_step, install
8047 reinsert breakpoints and call maybe_hw_step.
8048
8049 2016-07-21 Yao Qi <yao.qi@linaro.org>
8050
8051 * linux-low.c (proceed_one_lwp): Declare.
8052 (linux_resume_one_thread): Remove local variable 'step'.
8053 Lift code enqueue signal. Call proceed_one_lwp instead of
8054 linux_resume_one_lwp.
8055
8056 2016-07-21 Yao Qi <yao.qi@linaro.org>
8057
8058 * linux-low.c (linux_resume_one_thread): Call
8059 enqueue_pending_signal.
8060
8061 2016-07-21 Yao Qi <yao.qi@linaro.org>
8062
8063 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
8064 * inferiors.c (do_restore_current_thread_cleanup): New function.
8065 (make_cleanup_restore_current_thread): Likewise.
8066 * linux-low.c (install_software_single_step_breakpoints): Call
8067 make_cleanup_restore_current_thread. Switch current_thread to
8068 thread.
8069
8070 2016-07-21 Yao Qi <yao.qi@linaro.org>
8071
8072 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
8073 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
8074 (clone_one_breakpoint): Likewise.
8075 (delete_reinsert_breakpoints): Change parameter to thread.
8076 Callers updated.
8077 (has_reinsert_breakpoints): Likewise.
8078 (uninsert_reinsert_breakpoints): Likewise.
8079 (reinsert_reinsert_breakpoints): Likewise.
8080 * mem-break.h (set_reinsert_breakpoint): Update declaration.
8081 (delete_reinsert_breakpoints): Likewise.
8082 (reinsert_reinsert_breakpoints): Likewise.
8083 (uninsert_reinsert_breakpoints): Likewise.
8084 (has_reinsert_breakpoints): Likewise.
8085
8086 2016-07-21 Yao Qi <yao.qi@linaro.org>
8087
8088 * inferiors.c (get_thread_process): Make parameter const.
8089 * inferiors.h (get_thread_process): Update declaration.
8090 * mem-break.c (clone_all_breakpoints): Remove all parameters.
8091 Add new parameters child_thread and parent_thread. Callers
8092 updated.
8093 * mem-break.h (clone_all_breakpoints): Update declaration.
8094
8095 2016-07-21 Yao Qi <yao.qi@linaro.org>
8096
8097 * mem-break.c (struct breakpoint) <cond_list>: Remove.
8098 <command_list, handler>: Remove.
8099 (struct gdb_breakpoint): New.
8100 (struct other_breakpoint): New.
8101 (struct reinsert_breakpoint): New.
8102 (is_gdb_breakpoint): New function.
8103 (any_persistent_commands): Update command_list if
8104 is_gdb_breakpoint returns true.
8105 (set_breakpoint): Create breakpoints according to their types.
8106 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
8107 (set_gdb_breakpoint_1): Likewise.
8108 (set_gdb_breakpoint): Likewise.
8109 (clear_breakpoint_conditions): Change parameter type to
8110 'struct gdb_breakpoint *'.
8111 (clear_breakpoint_commands): Likewise.
8112 (clear_breakpoint_conditions_and_commands): Likewise.
8113 (add_condition_to_breakpoint): Likewise.
8114 (add_breakpoint_condition): Likewise.
8115 (add_commands_to_breakpoint): Likewise.
8116 (check_breakpoints): Check other_breakpoint.
8117 (clone_one_breakpoint): Clone breakpopint according to its type.
8118 * mem-break.h (struct gdb_breakpoint): Declare.
8119 (set_gdb_breakpoint): Update declaration.
8120 (clear_breakpoint_conditions_and_commands): Likewise.
8121 (add_breakpoint_condition): Likewise.
8122 (add_breakpoint_commands): Likewise.
8123 * server.c (process_point_options): Change parameter type to
8124 'struct gdb_breakpoint *'.
8125
8126 2016-07-21 Yao Qi <yao.qi@linaro.org>
8127
8128 * mem-break.c (set_breakpoint_at): Rename it to ...
8129 (set_breakpoint_type_at): ... it.
8130 (set_breakpoint_at): Call set_breakpoint_type_at.
8131 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
8132 * mem-break.h (set_breakpoint_at): Update comments.
8133
8134 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
8135
8136 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
8137 to buf parameter.
8138 (nios2_store_gregset): Likewise.
8139
8140 2016-07-01 Pedro Alves <palves@redhat.com>
8141 Antoine Tremblay <antoine.tremblay@ericsson.com>
8142
8143 * linux-low.c: Change interface to take the target lwp_info
8144 pointer directly and return void. Handle detaching from a zombie
8145 thread.
8146 (linux_detach_lwp_callback): New function.
8147 (linux_detach): Detach from the leader thread after detaching from
8148 the clone threads.
8149
8150 2016-06-28 Yao Qi <yao.qi@linaro.org>
8151
8152 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
8153 for variable new_offset.
8154 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
8155 (aarch64_ftrace_insn_reloc_cb): Likewise.
8156 (aarch64_ftrace_insn_reloc_tb): Likewise.
8157 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
8158 PRIx64 instead of PRIx32.
8159
8160 2016-06-28 Yao Qi <yao.qi@linaro.org>
8161
8162 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
8163 (the_low_target): Install arm_get_syscall_trapinfo.
8164
8165 2016-06-28 Yao Qi <yao.qi@linaro.org>
8166
8167 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
8168 function.
8169 (the_low_target): Install aarch64_get_syscall_trapinfo.
8170
8171 2016-06-28 Yao Qi <yao.qi@linaro.org>
8172
8173 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
8174 Callers updated.
8175 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
8176 Remove parameter sysno.
8177 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
8178 sysret.
8179
8180 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
8181
8182 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
8183 (s390_emit_ne_goto): Likewise.
8184 (s390_emit_lt_goto): Likewise.
8185 (s390_emit_le_goto): Likewise.
8186 (s390_emit_gt_goto): Likewise.
8187 (s390_emit_ge_goto): Likewise.
8188 (s390x_emit_eq_goto): Likewise.
8189 (s390x_emit_ne_goto): Likewise.
8190 (s390x_emit_lt_goto): Likewise.
8191 (s390x_emit_le_goto): Likewise.
8192 (s390x_emit_gt_goto): Likewise.
8193 (s390x_emit_ge_goto): Likewise.
8194 (s390_emit_ops_impl): Mark variable static.
8195 (s390x_emit_ops): Likewise.
8196
8197 2016-06-17 Yao Qi <yao.qi@linaro.org>
8198
8199 * linux-low.c (handle_extended_wait): Call
8200 uninsert_reinsert_breakpoints for the parent process. Remove
8201 reinsert breakpoints from the child process. Reinsert them to
8202 the parent process when vfork is done.
8203 * mem-break.c (uninsert_reinsert_breakpoints): New function.
8204 (reinsert_reinsert_breakpoints): New function.
8205 * mem-break.h (uninsert_reinsert_breakpoints): Declare
8206 (reinsert_reinsert_breakpoints): Declare.
8207
8208 2016-06-17 Yao Qi <yao.qi@linaro.org>
8209
8210 * linux-low.c (handle_extended_wait): If the parent is doing
8211 step-over, remove the reinsert breakpoints from the forked child.
8212
8213 2016-06-17 Yao Qi <yao.qi@linaro.org>
8214
8215 * linux-low.c (unsuspend_all_lwps): Declare.
8216 (linux_low_filter_event): If thread exited, call finish_step_over.
8217 If step-over is finished, unsuspend other threads.
8218
8219 2016-06-17 Yao Qi <yao.qi@linaro.org>
8220
8221 * linux-low.c (linux_resume_one_lwp_throw): Assert
8222 has_reinsert_breakpoints returns false.
8223 * mem-break.c (delete_disabled_breakpoints): Assert
8224 bp type isn't reinsert_breakpoint.
8225
8226 2016-06-17 Yao Qi <yao.qi@linaro.org>
8227
8228 * linux-low.c (maybe_hw_step): New function.
8229 (linux_resume_one_lwp_throw): Call maybe_hw_step.
8230 (finish_step_over): Switch current_thread to lwp temporarily,
8231 and assert has_reinsert_breakpoints returns true.
8232 (proceed_one_lwp): Call maybe_hw_step.
8233 * mem-break.c (has_reinsert_breakpoints): New function.
8234 * mem-break.h (has_reinsert_breakpoints): Declare.
8235
8236 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
8237
8238 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
8239
8240 2016-05-17 Yao Qi <yao.qi@linaro.org>
8241
8242 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
8243 instead of find_inferior.
8244
8245 2016-05-05 Yao Qi <yao.qi@linaro.org>
8246
8247 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
8248 Initialize res to zero.
8249
8250 2016-05-05 Yao Qi <yao.qi@linaro.org>
8251
8252 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
8253 to uint32_t.
8254
8255 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8256
8257 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
8258 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
8259 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
8260
8261 2016-04-28 Par Olsson <par.olsson@windriver.com>
8262 Simon Marchi <simon.marchi@ericsson.com>
8263
8264 * tracepoint.c (write_inferior_int8): New function.
8265 (cmd_qtenable_disable): Write enable flag using
8266 write_inferior_int8.
8267
8268 2016-04-25 Yao Qi <yao.qi@linaro.org>
8269
8270 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
8271 (need_step_over_p): Return zero if the LWP has pending signals
8272 can be delivered on software single step target.
8273
8274 2016-04-25 Yao Qi <yao.qi@linaro.org>
8275
8276 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
8277 return instead of error.
8278
8279 2016-04-22 Yao Qi <yao.qi@linaro.org>
8280
8281 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
8282 to 23.
8283
8284 2016-04-22 Yao Qi <yao.qi@linaro.org>
8285
8286 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
8287 signal when stepping over breakpoint with software single
8288 step.
8289
8290 2016-04-21 Pedro Alves <palves@redhat.com>
8291
8292 * linux-s390-low.c (s390_collect_ptrace_register)
8293 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
8294 add casts.
8295 (s390_check_regset): Use void * instead of gdb_byte *.
8296
8297 2016-04-20 Pedro Alves <palves@redhat.com>
8298
8299 * configure: Renegerate.
8300
8301 2016-04-20 Yao Qi <yao.qi@linaro.org>
8302
8303 * linux-aarch32-low.c: Include "arch/arm-linux.h".
8304 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
8305 number 16.
8306 (arm_store_gregset): Likewise.
8307
8308 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
8309
8310 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
8311 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
8312 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
8313 (amd64-avx-mpx-linux.c): New rules.
8314 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
8315 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
8316 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
8317 (srv_amd64_regobj): Add amd64-avx-mpx.o.
8318 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
8319 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
8320 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
8321 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
8322 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
8323 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
8324 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
8325 * linux-x86-low.c (x86_linux_read_description): Add case for
8326 X86_XSTATE_AVX_MPX_MASK.
8327 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
8328 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
8329 init_registers_i386_avx_mpx_linux.
8330 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8331 (initialize_low_tracepoint): Call
8332 init_registers_i386_avx_mpx_linux.
8333 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8334 (initialize_low_tracepoint): Call
8335 init_registers_amd64_avx_mpx_linux.
8336 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
8337 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
8338 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
8339 declarations.
8340
8341 2016-04-18 Pedro Alves <palves@redhat.com>
8342
8343 * configure: Regenerate.
8344
8345 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
8346
8347 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
8348 (aarch64_emit_sub): Likewise.
8349
8350 2016-04-12 Pedro Alves <palves@redhat.com>
8351
8352 * utils.c (prepare_to_throw_exception): Delete.
8353
8354 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
8355
8356 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
8357
8358 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
8359
8360 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
8361
8362 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
8363
8364 * linux-aarch64-ipa.c: Add <elf.h> include.
8365 * linux-ppc-ipa.c: Add <elf.h> include.
8366 * linux-s390-ipa.c: Add <elf.h> include.
8367
8368 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8369
8370 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
8371 (get_raw_reg_ptr): Likewise.
8372 (get_trace_state_variable_value_ptr): Likewise.
8373 (set_trace_state_variable_value_ptr): Likewise.
8374 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
8375 char *.
8376
8377 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8378 Marcin Kościelnicki <koriakin@0x04.net>
8379
8380 PR/17221
8381 * linux-ppc-low.c (emit_insns): New function.
8382 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
8383 (ppc_emit_prologue): New function.
8384 (ppc_emit_epilogue): New function.
8385 (ppc_emit_add): New function.
8386 (ppc_emit_sub): New function.
8387 (ppc_emit_mul): New function.
8388 (ppc_emit_lsh): New function.
8389 (ppc_emit_rsh_signed): New function.
8390 (ppc_emit_rsh_unsigned): New function.
8391 (ppc_emit_ext): New function.
8392 (ppc_emit_zero_ext): New function.
8393 (ppc_emit_log_not): New function.
8394 (ppc_emit_bit_and): New function.
8395 (ppc_emit_bit_or): New function.
8396 (ppc_emit_bit_xor): New function.
8397 (ppc_emit_bit_not): New function.
8398 (ppc_emit_equal): New function.
8399 (ppc_emit_less_signed): New function.
8400 (ppc_emit_less_unsigned): New function.
8401 (ppc_emit_ref): New function.
8402 (ppc_emit_const): New function.
8403 (ppc_emit_reg): New function.
8404 (ppc_emit_pop): New function.
8405 (ppc_emit_stack_flush): New function.
8406 (ppc_emit_swap): New function.
8407 (ppc_emit_stack_adjust): New function.
8408 (ppc_emit_call): New function.
8409 (ppc_emit_int_call_1): New function.
8410 (ppc_emit_void_call_2): New function.
8411 (ppc_emit_if_goto): New function.
8412 (ppc_emit_goto): New function.
8413 (ppc_emit_eq_goto): New function.
8414 (ppc_emit_ne_goto): New function.
8415 (ppc_emit_lt_goto): New function.
8416 (ppc_emit_le_goto): New function.
8417 (ppc_emit_gt_goto): New function.
8418 (ppc_emit_ge_goto): New function.
8419 (ppc_write_goto_address): New function.
8420 (ppc_emit_ops_impl): New static variable.
8421 (ppc64v1_emit_prologue): New function.
8422 (ppc64v2_emit_prologue): New function.
8423 (ppc64_emit_epilogue): New function.
8424 (ppc64_emit_add): New function.
8425 (ppc64_emit_sub): New function.
8426 (ppc64_emit_mul): New function.
8427 (ppc64_emit_lsh): New function.
8428 (ppc64_emit_rsh_signed): New function.
8429 (ppc64_emit_rsh_unsigned): New function.
8430 (ppc64_emit_ext): New function.
8431 (ppc64_emit_zero_ext): New function.
8432 (ppc64_emit_log_not): New function.
8433 (ppc64_emit_bit_and): New function.
8434 (ppc64_emit_bit_or): New function.
8435 (ppc64_emit_bit_xor): New function.
8436 (ppc64_emit_bit_not): New function.
8437 (ppc64_emit_equal): New function.
8438 (ppc64_emit_less_signed): New function.
8439 (ppc64_emit_less_unsigned): New function.
8440 (ppc64_emit_ref): New function.
8441 (ppc64_emit_const): New function.
8442 (ppc64v1_emit_reg): New function.
8443 (ppc64v2_emit_reg): New function.
8444 (ppc64_emit_pop): New function.
8445 (ppc64_emit_stack_flush): New function.
8446 (ppc64_emit_swap): New function.
8447 (ppc64v1_emit_call): New function.
8448 (ppc64v2_emit_call): New function.
8449 (ppc64v1_emit_int_call_1): New function.
8450 (ppc64v2_emit_int_call_1): New function.
8451 (ppc64v1_emit_void_call_2): New function.
8452 (ppc64v2_emit_void_call_2): New function.
8453 (ppc64_emit_if_goto): New function.
8454 (ppc64_emit_eq_goto): New function.
8455 (ppc64_emit_ne_goto): New function.
8456 (ppc64_emit_lt_goto): New function.
8457 (ppc64_emit_le_goto): New function.
8458 (ppc64_emit_gt_goto): New function.
8459 (ppc64_emit_ge_goto): New function.
8460 (ppc64v1_emit_ops_impl): New static variable.
8461 (ppc64v2_emit_ops_impl): New static variable.
8462 (ppc_emit_ops): New function.
8463 (linux_low_target): Wire in ppc_emit_ops.
8464
8465 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8466 Marcin Kościelnicki <koriakin@0x04.net>
8467
8468 PR/17221
8469 * Makefile.in: Add powerpc-*-ipa.o
8470 * configure.srv: Add ipa_obj for powerpc*-linux.
8471 * linux-ppc-ipa.c: New file.
8472 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
8473 includes.
8474 (PPC_FIELD): New macro.
8475 (PPC_SEXT): New macro.
8476 (PPC_OP6): New macro.
8477 (PPC_BO): New macro.
8478 (PPC_LI): New macro.
8479 (PPC_BD): New macro.
8480 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
8481 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
8482 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
8483 (ppc_get_thread_area): New function.
8484 (is_elfv2_inferior): New function.
8485 (gen_ds_form): New function.
8486 (GEN_STD): New macro.
8487 (GEN_STDU): New macro.
8488 (GEN_LD): New macro.
8489 (GEN_LDU): New macro.
8490 (gen_d_form): New function.
8491 (GEN_ADDI): New macro.
8492 (GEN_ADDIS): New macro.
8493 (GEN_LI): New macro.
8494 (GEN_LIS): New macro.
8495 (GEN_ORI): New macro.
8496 (GEN_ORIS): New macro.
8497 (GEN_LWZ): New macro.
8498 (GEN_STW): New macro.
8499 (GEN_STWU): New macro.
8500 (gen_xfx_form): New function.
8501 (GEN_MFSPR): New macro.
8502 (GEN_MTSPR): New macro.
8503 (GEN_MFCR): New macro.
8504 (GEN_MTCR): New macro.
8505 (GEN_SYNC): New macro.
8506 (GEN_LWSYNC): New macro.
8507 (gen_x_form): New function.
8508 (GEN_OR): New macro.
8509 (GEN_MR): New macro.
8510 (GEN_LWARX): New macro.
8511 (GEN_STWCX): New macro.
8512 (GEN_CMPW): New macro.
8513 (gen_md_form): New function.
8514 (GEN_RLDICL): New macro.
8515 (GEN_RLDICR): New macro.
8516 (gen_i_form): New function.
8517 (GEN_B): New macro.
8518 (GEN_BL): New macro.
8519 (gen_b_form): New function.
8520 (GEN_BNE): New macro.
8521 (GEN_LOAD): New macro.
8522 (GEN_STORE): New macro.
8523 (gen_limm): New function.
8524 (gen_atomic_xchg): New function.
8525 (gen_call): New function.
8526 (ppc_relocate_instruction): New function.
8527 (ppc_install_fast_tracepoint_jump_pad): New function.
8528 (ppc_get_min_fast_tracepoint_insn_len): New function.
8529 (ppc_get_ipa_tdesc_idx): New function.
8530 (the_low_target): Wire in the new functions.
8531 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
8532 tdescs.
8533 * linux-ppc-tdesc.h: New file.
8534
8535 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8536
8537 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8538 (alloc_jump_pad_buffer): New function.
8539 * linux-amd64-ipa.c: Add <sys/mman.h> include.
8540 (alloc_jump_pad_buffer): New function.
8541 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
8542 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8543 (alloc_jump_pad_buffer): New function.
8544 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
8545 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
8546 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
8547 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
8548
8549 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8550
8551 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
8552 * linux-amd64-ipa.c: Likewise.
8553 * linux-i386-ipa.c: Likewise.
8554 * linux-s390-ipa.c: Likewise.
8555 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
8556 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
8557 set_trace_state_variable_value_ptr.
8558 (struct ipa_sym_addresses): Likewise.
8559 (symbol_list): Likewise.
8560 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
8561 accessing gdb_collect directly.
8562 (gdb_collect_ptr_type): New typedef.
8563 (get_raw_reg_ptr_type): New typedef.
8564 (get_trace_state_variable_value_ptr_type): New typedef.
8565 (set_trace_state_variable_value_ptr_type): New typedef.
8566 (gdb_collect_ptr): New global.
8567 (get_raw_reg_ptr): New global.
8568 (get_trace_state_variable_value_ptr): New global.
8569 (set_trace_state_variable_value_ptr): New global.
8570 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
8571 accessing get_raw_reg directly.
8572 (get_get_tsv_func_addr): Likewise for
8573 get_trace_state_variable_value_ptr.
8574 (get_set_tsv_func_addr): Likewise for
8575 set_trace_state_variable_value_ptr.
8576 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
8577
8578 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
8579
8580 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
8581
8582 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8583
8584 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
8585 packets.
8586 (relocate_instruction): Remove own_buf.
8587 * server.c (own_buf): Make global.
8588 (handle_v_requests): Make global.
8589 * server.h (own_buf): New declaration.
8590 (handle_v_requests): New prototype.
8591
8592 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8593
8594 PR 18377
8595 * linux-s390-low.c (add_insns): New function.
8596 (s390_emit_prologue): New function.
8597 (s390_emit_epilogue): New function.
8598 (s390_emit_add): New function.
8599 (s390_emit_sub): New function.
8600 (s390_emit_mul): New function.
8601 (s390_emit_lsh): New function.
8602 (s390_emit_rsh_signed): New function.
8603 (s390_emit_rsh_unsigned): New function.
8604 (s390_emit_ext): New function.
8605 (s390_emit_log_not): New function.
8606 (s390_emit_bit_and): New function.
8607 (s390_emit_bit_or): New function.
8608 (s390_emit_bit_xor): New function.
8609 (s390_emit_bit_not): New function.
8610 (s390_emit_equal): New function.
8611 (s390_emit_less_signed): New function.
8612 (s390_emit_less_unsigned): New function.
8613 (s390_emit_ref): New function.
8614 (s390_emit_if_goto): New function.
8615 (s390_emit_goto): New function.
8616 (s390_write_goto_address): New function.
8617 (s390_emit_litpool): New function.
8618 (s390_emit_const): New function.
8619 (s390_emit_call): New function.
8620 (s390_emit_reg): New function.
8621 (s390_emit_pop): New function.
8622 (s390_emit_stack_flush): New function.
8623 (s390_emit_zero_ext): New function.
8624 (s390_emit_swap): New function.
8625 (s390_emit_stack_adjust): New function.
8626 (s390_emit_set_r2): New function.
8627 (s390_emit_int_call_1): New function.
8628 (s390_emit_void_call_2): New function.
8629 (s390_emit_eq_goto): New function.
8630 (s390_emit_ne_goto): New function.
8631 (s390_emit_lt_goto): New function.
8632 (s390_emit_le_goto): New function.
8633 (s390_emit_gt_goto): New function.
8634 (s390_emit_ge_goto): New function.
8635 (s390x_emit_prologue): New function.
8636 (s390x_emit_epilogue): New function.
8637 (s390x_emit_add): New function.
8638 (s390x_emit_sub): New function.
8639 (s390x_emit_mul): New function.
8640 (s390x_emit_lsh): New function.
8641 (s390x_emit_rsh_signed): New function.
8642 (s390x_emit_rsh_unsigned): New function.
8643 (s390x_emit_ext): New function.
8644 (s390x_emit_log_not): New function.
8645 (s390x_emit_bit_and): New function.
8646 (s390x_emit_bit_or): New function.
8647 (s390x_emit_bit_xor): New function.
8648 (s390x_emit_bit_not): New function.
8649 (s390x_emit_equal): New function.
8650 (s390x_emit_less_signed): New function.
8651 (s390x_emit_less_unsigned): New function.
8652 (s390x_emit_ref): New function.
8653 (s390x_emit_if_goto): New function.
8654 (s390x_emit_const): New function.
8655 (s390x_emit_call): New function.
8656 (s390x_emit_reg): New function.
8657 (s390x_emit_pop): New function.
8658 (s390x_emit_stack_flush): New function.
8659 (s390x_emit_zero_ext): New function.
8660 (s390x_emit_swap): New function.
8661 (s390x_emit_stack_adjust): New function.
8662 (s390x_emit_int_call_1): New function.
8663 (s390x_emit_void_call_2): New function.
8664 (s390x_emit_eq_goto): New function.
8665 (s390x_emit_ne_goto): New function.
8666 (s390x_emit_lt_goto): New function.
8667 (s390x_emit_le_goto): New function.
8668 (s390x_emit_gt_goto): New function.
8669 (s390x_emit_ge_goto): New function.
8670 (s390_emit_ops): New function.
8671 (struct linux_target_ops): Fill in emit_ops hook.
8672
8673 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8674
8675 PR 18377
8676 * Makefile.in: Add s390 IPA files.
8677 * configure.srv: Build IPA for s390.
8678 * linux-s390-ipa.c: New file.
8679 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
8680 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
8681 (tdesc_s390_linux32): Likewise.
8682 (init_registers_s390_linux32v1): Likewise.
8683 (tdesc_s390_linux32v1): Likewise.
8684 (init_registers_s390_linux32v2): Likewise.
8685 (tdesc_s390_linux32v2): Likewise.
8686 (init_registers_s390_linux64): Likewise.
8687 (tdesc_s390_linux64): Likewise.
8688 (init_registers_s390_linux64v1): Likewise.
8689 (tdesc_s390_linux64v1): Likewise.
8690 (init_registers_s390_linux64v2): Likewise.
8691 (tdesc_s390_linux64v2): Likewise.
8692 (init_registers_s390_te_linux64): Likewise.
8693 (tdesc_s390_te_linux64): Likewise.
8694 (init_registers_s390_vx_linux64): Likewise.
8695 (tdesc_s390_vx_linux64): Likewise.
8696 (init_registers_s390_tevx_linux64): Likewise.
8697 (tdesc_s390_tevx_linux64): Likewise.
8698 (init_registers_s390x_linux64): Likewise.
8699 (tdesc_s390x_linux64): Likewise.
8700 (init_registers_s390x_linux64v1): Likewise.
8701 (tdesc_s390x_linux64v1): Likewise.
8702 (init_registers_s390x_linux64v2): Likewise.
8703 (tdesc_s390x_linux64v2): Likewise.
8704 (init_registers_s390x_te_linux64): Likewise.
8705 (tdesc_s390x_te_linux64): Likewise.
8706 (init_registers_s390x_vx_linux64): Likewise.
8707 (tdesc_s390x_vx_linux64): Likewise.
8708 (init_registers_s390x_tevx_linux64): Likewise.
8709 (tdesc_s390x_tevx_linux64): Likewise.
8710 (have_hwcap_s390_vx): New static variable.
8711 (s390_arch_setup): Fill have_hwcap_s390_vx.
8712 (s390_get_thread_area): New function.
8713 (s390_ft_entry_gpr_esa): New const.
8714 (s390_ft_entry_gpr_zarch): New const.
8715 (s390_ft_entry_misc): New const.
8716 (s390_ft_entry_fr): New const.
8717 (s390_ft_entry_vr): New const.
8718 (s390_ft_main_31): New const.
8719 (s390_ft_main_64): New const.
8720 (s390_ft_exit_fr): New const.
8721 (s390_ft_exit_vr): New const.
8722 (s390_ft_exit_misc): New const.
8723 (s390_ft_exit_gpr_esa): New const.
8724 (s390_ft_exit_gpr_zarch): New const.
8725 (append_insns): New function.
8726 (s390_relocate_instruction): New function.
8727 (s390_install_fast_tracepoint_jump_pad): New function.
8728 (s390_get_min_fast_tracepoint_insn_len): New function.
8729 (s390_get_ipa_tdesc_idx): New function.
8730 (struct linux_target_ops): Wire in the above functions.
8731 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
8732 * linux-s390-tdesc.h: New file.
8733
8734 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8735
8736 * linux-s390-low.c (s390_supports_tracepoints): New function.
8737 (struct linux_target_ops): Fill supports_tracepoints hook.
8738
8739 2016-03-18 Yao Qi <yao.qi@linaro.org>
8740
8741 * linux-low.c (lwp_signal_can_be_delivered): New function.
8742 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
8743
8744 2016-03-18 Yao Qi <yao.qi@linaro.org>
8745
8746 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
8747 0 if signal is enqueued. Remove 'signal' from one debugging
8748 message. Move one debugging message to some lines below.
8749 Remove code setting 'signal' to 0.
8750
8751 2016-03-18 Yao Qi <yao.qi@linaro.org>
8752
8753 * linux-low.c (linux_low_filter_event): Remove redundant
8754 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
8755
8756 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
8757
8758 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
8759 (struct linux_target_ops): Wire in the above.
8760
8761 2016-03-03 Yao Qi <yao.qi@linaro.org>
8762
8763 * linux-low.c: Update comments to start_step_over.
8764
8765 2016-03-03 Yao Qi <yao.qi@linaro.org>
8766
8767 PR server/19736
8768 * linux-low.c (handle_extended_wait): Set child suspended
8769 if event_lwp->bp_reinsert isn't zero.
8770
8771 2016-03-02 Yao Qi <yao.qi@linaro.org>
8772
8773 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
8774 enqueue_pending_signal.
8775
8776 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
8777
8778 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
8779 is actually loaded.
8780
8781 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8782
8783 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
8784 (s390_regmap_3264) [!__s390x__]: New global.
8785 (s390_collect_ptrace_register): Skip map entries containing -1.
8786 (s390_supply_ptrace_register): Ditto.
8787 (s390_fill_gprs_high): New function.
8788 (s390_store_gprs_high): New function.
8789 (s390_regsets): Add NT_S390_HIGH_GPRS.
8790 (s390_get_hwcap): Enable on 31-bit.
8791 (have_hwcap_s390_high_gprs): Enable on 31-bit.
8792 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
8793 Detect NT_S390_HIGH_GPRS.
8794 (s390_usrregs_info_3264): Enable on 31-bit.
8795 (s390_regs_info): Enable regs_info_3264 on 31-bit.
8796 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
8797
8798 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8799
8800 PR gdb/13808
8801 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
8802 * configure.srv: Ditto.
8803 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
8804 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
8805 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
8806 (init_registers_amd64_linux): Remove prototype.
8807 (tdesc_amd64_linux): Remove declaration.
8808 (get_ipa_tdesc): New function.
8809 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8810 initialize remaining tdescs.
8811 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
8812 (init_registers_i386_linux): Remove prototype.
8813 (tdesc_i386_linux): Remove declaration.
8814 (get_ipa_tdesc): New function.
8815 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8816 initialize remaining tdescs.
8817 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
8818 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
8819 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
8820 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
8821 (x86_get_ipa_tdesc_idx): New function.
8822 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
8823 * linux-x86-tdesc.h: New file.
8824 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
8825 (target_get_ipa_tdesc_idx): New macro.
8826 * tracepoint.c (ipa_tdesc_idx): New macro.
8827 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
8828 (symbol_list): Add ipa_tdesc_idx.
8829 (cmd_qtstart): Write ipa_tdesc_idx in the target.
8830 (ipa_tdesc): Remove.
8831 (ipa_tdesc_idx): New variable.
8832 (get_context_regcache): Use get_ipa_tdesc.
8833 (gdb_collect): Ditto.
8834 (gdb_probe): Ditto.
8835 * tracepoint.h (get_ipa_tdesc): New prototype.
8836 (ipa_tdesc): Remove.
8837
8838 2016-02-24 Pedro Alves <palves@redhat.com>
8839
8840 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
8841 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
8842 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
8843 Factor out common code between the USE_SIGTRAP_SIGINFO and
8844 !USE_SIGTRAP_SIGINFO blocks.
8845 (linux_low_filter_event): Call save_stop_reason instead of
8846 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
8847 Update comments.
8848 (linux_wait_1): Update comments.
8849
8850 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
8851
8852 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
8853 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
8854 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
8855 ppc_insert_point, ppc_remove_point.
8856
8857 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
8858
8859 * linux-s390-low.c (s390_supports_z_point_type): New function.
8860 (struct linux_target_ops): Wire s390_supports_z_point_type in.
8861
8862 2016-02-16 Yao Qi <yao.qi@linaro.org>
8863
8864 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
8865 PC. Get pc from regcache_read_pc.
8866
8867 2016-02-12 Yao Qi <yao.qi@linaro.org>
8868
8869 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
8870 or linux_get_pc_32bit.
8871 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
8872
8873 2016-02-12 Yao Qi <yao.qi@linaro.org>
8874
8875 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
8876 arm_linux_get_next_pcs_fixup.
8877
8878 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
8879
8880 * tracepoint.c (x_tracepoint_action_download): Change
8881 write_inferior_data_ptr to write_inferior_data_pointer.
8882 (cmd_qtstart): Likewise.
8883 (write_inferior_data_ptr): Remove.
8884 (download_agent_expr): Change write_inferior_data_ptr to
8885 write_inferior_data_pointer.
8886 (download_tracepoint_1): Likewise.
8887 (download_tracepoint): Likewise.
8888 (download_trace_state_variables): Likewise.
8889
8890 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
8891 Marcin Kościelnicki <koriakin@0x04.net>
8892
8893 * tracepoint.c (struct tracepoint_action_ops): Remove.
8894 (struct tracepoint_action): Remove ops.
8895 (m_tracepoint_action_download, r_tracepoint_action_download)
8896 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
8897 size and offset accordingly.
8898 (m_tracepoint_action_ops, r_tracepoint_action_ops)
8899 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
8900 (tracepoint_action_send, tracepoint_action_download): New functions.
8901 Helpers for trace action handlers.
8902 (add_tracepoint_action): Remove setup actions ops.
8903 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
8904
8905 2016-02-10 Yao Qi <yao.qi@linaro.org>
8906
8907 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
8908
8909 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8910
8911 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
8912 to AC_OUTPUT.
8913 * configure: Regenerate.
8914
8915 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8916
8917 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
8918 void * to gdb_byte *.
8919 * linux-low.c (siginfo_fixup): Likewise.
8920 (linux_xfer_siginfo): Likewise.
8921 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
8922 Likewise.
8923 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8924
8925 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
8926
8927 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
8928 to srv_tgtobj.
8929 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
8930 to srv_tgtobj.
8931 * linux-x86-low.c [__x86_64__]: Include
8932 "nat/amd64-linux-siginfo.h".
8933 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
8934 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
8935 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
8936 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
8937 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
8938 (cpt_si_fd, si_timerid, si_overrun): Move from
8939 nat/amd64-linux-siginfo.c.
8940 * Makefile.in (amd64-linux-siginfo.o:): New rule.
8941
8942 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
8943
8944 * server.c (skip_to_semicolon): Remove.
8945 (process_point_options): Use strchrnul instead of
8946 skip_to_semicolon.
8947
8948 2016-01-26 Yao Qi <yao.qi@linaro.org>
8949
8950 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
8951 * linux-low.c (install_software_single_step_breakpoints): Don't
8952 call regcache_read_pc.
8953 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
8954 argument pc.
8955
8956 2016-01-26 Yao Qi <yao.qi@linaro.org>
8957
8958 * linux-low.c (install_software_single_step_breakpoints): Call
8959 regcache_read_pc instead of get_pc.
8960
8961 2016-01-26 Yao Qi <yao.qi@linaro.org>
8962
8963 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
8964 (unblock_async_io): Rename to ...
8965 (block_unblock_async_io): ... it. New function.
8966 (enable_async_io): Don't install SIGIO handler. Unblock it
8967 instead.
8968 (disable_async_io): Don't ignore SIGIO. Block it instead.
8969 (initialize_async_io): Install SIGIO handler. Don't call
8970 unblock_async_io.
8971
8972 2016-01-26 Yao Qi <yao.qi@linaro.org>
8973
8974 * remote-utils.c (getpkt): If the buffer isn't empty, and the
8975 first character is '\003', call *the_target->request_interrupt.
8976
8977 2016-01-25 Yao Qi <yao.qi@linaro.org>
8978
8979 * remote-utils.c (new_thread_notify): Remove.
8980 (dead_thread_notify): Likewise.
8981 * remote-utils.h (new_thread_notify): Remove declaration.
8982 (dead_thread_notify): Likewise.
8983
8984 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
8985
8986 * gdb.trace/pending.exp: Fix expected message on continue.
8987
8988 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
8989
8990 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
8991 it works properly on big-endian machines where sizeof (CORE_ADDR)
8992 != sizeof (void *).
8993
8994 2016-01-21 Pedro Alves <palves@redhat.com>
8995
8996 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
8997 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
8998 * configure: Regenerate.
8999
9000 2016-01-21 Yao Qi <yao.qi@linaro.org>
9001
9002 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
9003 is_thumb and set it according to CPSR saved on the stack.
9004 (get_next_pcs_syscall_next_pc): Pass is_thumb to
9005 arm_sigreturn_next_pc.
9006
9007 2016-01-18 Yao Qi <yao.qi@linaro.org>
9008
9009 * linux-low.c (linux_set_pc_64bit): New function.
9010 (linux_get_pc_64bit): New function.
9011 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
9012 Declare.
9013 * linux-sparc-low.c (debug_threads): Remove declaration.
9014 (sparc_get_pc): Remove.
9015 (the_low_target): Use linux_get_pc_64bit instead of
9016 sparc_get_pc.
9017 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
9018 (the_low_target): Use linux_get_pc_64bit and
9019 linux_set_pc_64bit.
9020
9021 2016-01-18 Yao Qi <yao.qi@linaro.org>
9022
9023 * linux-arm-low.c (debug_threads): Remove declaration.
9024 (arm_get_pc, arm_set_pc): Remove.
9025 (the_low_target): Use linux_get_pc_32bit and
9026 linux_set_pc_32bit.
9027 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
9028 (the_low_target): Use linux_get_pc_32bit and
9029 linux_set_pc_32bit.
9030 * linux-cris-low.c (debug_threads): Remove declaration.
9031 (cris_get_pc, cris_set_pc,): Remove.
9032 (the_low_target): Use linux_get_pc_32bit and
9033 linux_set_pc_32bit.
9034 * linux-crisv32-low.c (debug_threads): Remove declaration.
9035 (cris_get_pc, cris_set_pc): Remove.
9036 (the_low_target): Use linux_get_pc_32bit and
9037 linux_set_pc_32bit.
9038 * linux-low.c: Include inttypes.h.
9039 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
9040 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
9041 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
9042 (the_low_target): Use linux_get_pc_32bit and
9043 linux_set_pc_32bit.
9044 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
9045 (the_low_target): Use linux_get_pc_32bit and
9046 linux_set_pc_32bit.
9047 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
9048 (the_low_target): Use linux_get_pc_32bit and
9049 linux_set_pc_32bit.
9050 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
9051 (the_low_target): Use linux_get_pc_32bit and
9052 linux_set_pc_32bit.
9053 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
9054 (the_low_target): Use linux_get_pc_32bit and
9055 linux_set_pc_32bit.
9056
9057 2016-01-18 Gary Benson <gbenson@redhat.com>
9058
9059 * configure.ac (AC_FUNC_FORK): New check.
9060 * config.in: Regenerate.
9061 * configure: Likewise.
9062
9063 2016-01-14 Yao Qi <yao.qi@linaro.org>
9064
9065 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
9066 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
9067 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
9068 arm_get_next_pcs_ctor.
9069
9070 2016-01-12 Josh Stone <jistone@redhat.com>
9071 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9072
9073 * inferiors.h: Include "gdb_vecs.h".
9074 (struct process_info): Add syscalls_to_catch.
9075 * inferiors.c (remove_process): Free syscalls_to_catch.
9076 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
9077 syscall_return stops.
9078 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
9079 * server.c (handle_general_set): Handle QCatchSyscalls.
9080 (handle_query): Report support for QCatchSyscalls.
9081 * target.h (struct target_ops): Add supports_catch_syscall.
9082 (target_supports_catch_syscall): New macro.
9083 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
9084 (struct lwp_info): Add syscall_state.
9085 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
9086 Maintain syscall_state and syscalls_to_catch across exec.
9087 (get_syscall_trapinfo): New function, proxy to the_low_target.
9088 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
9089 (linux_low_filter_event): Toggle syscall_state entry/return for
9090 syscall traps, and set it ignored for all others.
9091 (gdb_catching_syscalls_p): New function.
9092 (gdb_catch_this_syscall_p): New function.
9093 (linux_wait_1): Handle SYSCALL_SIGTRAP.
9094 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
9095 (linux_supports_catch_syscall): New function.
9096 (linux_target_ops): Install it.
9097 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
9098 (the_low_target): Install it.
9099
9100 2016-01-12 Mike Frysinger <vapier@gentoo.org>
9101
9102 * acinclude.m4: Include new ../warning.m4 file.
9103 * configure: Regenerated.
9104 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
9105
9106 2016-01-12 Mike Frysinger <vapier@gentoo.org>
9107
9108 * ax.c (is_goto_target): Mark static.
9109 * linux-low.c (register_addr): Likewise.
9110 (linux_fetch_registers, linux_store_registers): Likewise.
9111 * mem-break.c (any_persistent_commands): Fix old prototype.
9112 (add_commands_to_breakpoint): Mark static.
9113 * regcache.c (find_register_by_name): Delete unused func.
9114 * remote-utils.c (hex_or_minus_one): Mark static.
9115 * server.c (monitor_show_help): Mark static.
9116 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
9117 handle_v_requests): Likewise.
9118
9119 2016-01-12 Pedro Alves <palves@redhat.com>
9120
9121 Remove use of the registered trademark symbol throughout.
9122
9123 2016-01-08 Yao Qi <yao.qi@linaro.org>
9124
9125 * remote-utils.c (getpkt): If c is '\003', call target hook
9126 request_interrupt.
9127
9128 2016-01-06 Yao Qi <yao.qi@linaro.org>
9129
9130 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
9131 linux-aarch32-low.c.
9132 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9133 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
9134 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9135 (thumb2_breakpoint): Declare.
9136 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
9137 linux-aarch32-low.h.
9138 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9139 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
9140 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9141
9142 2016-01-01 Joel Brobecker <brobecker@adacore.com>
9143
9144 * gdbreplay.c (gdbreplay_version): Change copyright year in
9145 version message.
9146 * server.c (gdbserver_version): Likewise.
9147
9148 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
9149
9150 * server.c (crc32_table): Delete.
9151 (crc32): Use libiberty's xcrc32 function.
9152
9153 2015-12-22 Joel Brobecker <brobecker@adacore.com>
9154
9155 * lynx-low.c (lynx_delete_thread_callback): New function.
9156 (lynx_mourn): Properly delete our process and all of its
9157 threads. Remove call to clear_inferiors.
9158
9159 2015-12-22 Joel Brobecker <brobecker@adacore.com>
9160
9161 * target.c (thread_search_callback): Add check that
9162 the thread_stopped target callback is not NULL before
9163 calling it.
9164
9165 2015-12-21 Yao Qi <yao.qi@linaro.org>
9166
9167 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
9168 arm breakpoint.
9169
9170 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9171
9172 * server.c (handle_query): Call target_supports_software_single_step.
9173
9174 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9175
9176 * linux-low.c (single_step): New function.
9177 (linux_resume_one_lwp_throw): Call single_step.
9178 (start_step_over): Likewise.
9179
9180 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9181
9182 * Makefile.in (SFILES): Append arch/arm-linux.c,
9183 arch/arm-get-next-pcs.c.
9184 (arm-linux.o): New rule.
9185 (arm-get-next-pcs.o): New rule.
9186 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
9187 arm-linux.o.
9188 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
9189 to linux-aarch32-low.c.
9190 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9191 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9192 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9193 (thumb2_breakpoint_len): Likewise.
9194 (arm_is_thumb_mode): Make non-static.
9195 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
9196 from linux-aarch32-low.c.
9197 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9198 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9199 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9200 (thumb2_breakpoint_len): Likewise.
9201 (arm_is_thumb_mode): New declaration.
9202 * linux-arm-low.c: Include arch/arm-linux.h
9203 aarch/arm-get-next-pcs.h, sys/syscall.h.
9204 (get_next_pcs_ops): New struct.
9205 (get_next_pcs_addr_bits_remove): New function.
9206 (get_next_pcs_is_thumb): New function.
9207 (get_next_pcs_read_memory_unsigned_integer): Likewise.
9208 (arm_sigreturn_next_pc): Likewise.
9209 (get_next_pcs_syscall_next_pc): Likewise.
9210 (arm_gdbserver_get_next_pcs): Likewise.
9211 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
9212 Initialize.
9213 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
9214 * server.h: Include gdb_vecs.h.
9215
9216 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9217
9218 * Makefile.in (SFILES): Append common/common-regcache.c.
9219 (OBS): Append common-regcache.o.
9220 (common-regcache.o): New rule.
9221 * regcache.c (init_register_cache): Initialize cache to
9222 REG_UNAVAILABLE.
9223 (regcache_raw_read_unsigned): New function.
9224 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
9225 register_status enum.
9226
9227 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9228
9229 * linux-aarch64-low.c (the_low_targets): Rename
9230 breakpoint_reinsert_addr to get_next_pcs.
9231 * linux-arm-low.c (the_low_targets): Likewise.
9232 * linux-bfin-low.c (the_low_targets): Likewise.
9233 * linux-cris-low.c (the_low_targets): Likewise.
9234 * linux-crisv32-low.c (the_low_targets): Likewise.
9235 * linux-low.c (can_software_single_step): Likewise.
9236 (install_software_single_step_breakpoints): New function.
9237 (start_step_over): Use install_software_single_step_breakpoints.
9238 * linux-low.h: New CORE_ADDR vector.
9239 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
9240 get_next_pcs.
9241 * linux-mips-low.c (the_low_targets): Likewise.
9242 * linux-nios2-low.c (the_low_targets): Likewise.
9243 * linux-sparc-low.c (the_low_targets): Likewise.
9244
9245 2015-12-17 Pedro Alves <palves@redhat.com>
9246
9247 * linux-low.c (linux_kill_one_lwp): Remove references to
9248 LinuxThreads.
9249 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
9250 to 'kill'.
9251 (linux_init_signals): Delete.
9252 (initialize_low): Adjust.
9253 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
9254
9255 2015-12-16 Pedro Alves <palves@redhat.com>
9256
9257 * configure.ac (compiler warning flags): When testing a
9258 -Wno-foo option, check whether -Wfoo works instead.
9259 * configure: Regenerate.
9260
9261 2015-12-11 Don Breazeal <donb@codesourcery.com>
9262
9263 * server.c (process_serial_event): Don't exit from gdbserver
9264 in remote mode if there are still active inferiors.
9265
9266 2015-12-11 Yao Qi <yao.qi@linaro.org>
9267
9268 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
9269 arm_breakpoint_at if the process is 32-bit.
9270
9271 2015-12-11 Yao Qi <yao.qi@linaro.org>
9272
9273 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
9274 arm breakpoint.
9275
9276 2015-12-07 Yao Qi <yao.qi@linaro.org>
9277
9278 * configure.srv: Append arm.o to srv_tgtobj for
9279 aarch64*-*-linux* target.
9280 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
9281 from linux-arm-low.c.
9282 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9283 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9284 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9285 (thumb2_breakpoint_len): Likewise.
9286 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
9287 (arm_breakpoint_kinds): Likewise.
9288 (arm_breakpoint_kind_from_pc): Likewise.
9289 (arm_sw_breakpoint_from_kind): Likewise.
9290 (arm_breakpoint_kind_from_current_state): Likewise.
9291 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
9292 (arm_sw_breakpoint_from_kind): Declare.
9293 (arm_breakpoint_kind_from_current_state): Declare.
9294 (arm_breakpoint_at): Declare.
9295 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
9296 arm_sw_breakpoint_from_kind if process is 32-bit.
9297 (aarch64_breakpoint_kind_from_pc): New function.
9298 (aarch64_breakpoint_kind_from_current_state): New function.
9299 (the_low_target): Initialize fields breakpoint_kind_from_pc
9300 and breakpoint_kind_from_current_state.
9301 * linux-arm-low.c (arm_breakpoint_kinds): Move to
9302 linux-aarch32-low.c.
9303 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
9304 (arm_breakpoint, arm_breakpoint_len): Likewise.
9305 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
9306 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9307 (arm_is_thumb_mode): Likewise.
9308 (arm_breakpoint_at): Likewise.
9309 (arm_breakpoint_kind_from_pc): Likewise.
9310 (arm_sw_breakpoint_from_kind): Likewise.
9311 (arm_breakpoint_kind_from_current_state): Likewise.
9312
9313 Revert:
9314 2015-08-04 Yao Qi <yao.qi@linaro.org>
9315
9316 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
9317 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
9318 * server.c (extended_protocol): Remove "static".
9319 * server.h (extended_protocol): Declare it.
9320
9321 2015-12-04 Josh Stone <jistone@redhat.com>
9322
9323 * target.h (struct target_ops) <arch_setup>: Rename to ...
9324 (struct target_ops) <post_create_inferior>: ... this.
9325 (target_arch_setup): Rename to ...
9326 (target_post_create_inferior): ... this, calling post_create_inferior.
9327 * server.c (start_inferior): Update target_arch_setup calls to
9328 target_post_create_inferior.
9329 * linux-low.c (linux_low_ptrace_options): Forward declare.
9330 (linux_arch_setup): Update its comment for general use.
9331 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
9332 (struct linux_target_ops): Use linux_post_create_inferior.
9333 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
9334 to post_create_inferior.
9335 * nto-low.c (struct nto_target_ops): Likewise.
9336 * spu-low.c (struct spu_target_ops): Likewise.
9337 * win32-low.c (struct win32_target_ops): Likewise.
9338
9339 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
9340
9341 * linux-arm-low.c: Remove duplicate arch/arm.h include.
9342
9343 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9344
9345 * linux-arm-low.c (arm_reinsert_addr): Remove function.
9346 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
9347 * linux-cris-low.c (cris_reinsert_addr> Remove function.
9348 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9349 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
9350 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9351 * linux-mips-low.c (mips_reinsert_addr): Remove function.
9352 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9353 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
9354 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9355 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
9356 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9357
9358 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9359
9360 * linux-low.c (linux_look_up_symbols): Don't call
9361 linux_supports_traceclone.
9362 * linux-low.h (thread_db_init): Remove use_events argument.
9363 * thread-db.c (thread_db_use_event): Remove global variable.
9364 (struct thread_db) <td_thr_event_enable_p>: Remove field.
9365 (struct thread_db) <td_create_bp>: Remove field.
9366 (thread_db_create_event): Remove function.
9367 (thread_db_enable_reporting): Likewise.
9368 (find_one_thread): Don't check for thread_db_use_events.
9369 (attach_thread): Likewise.
9370 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
9371 (try_thread_db_load_1): Don't check for thread_db_use_events.
9372 (thread_db_init): Remove use_events argument and thread events
9373 handling.
9374 (remove_thread_event_breakpoints): Remove function.
9375 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
9376
9377 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9378
9379 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
9380 New function.
9381 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9382 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
9383 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9384 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
9385 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
9386 Initialize.
9387 * linux-crisv32-low.c (cris_supports_hardware_single_step):
9388 New function.
9389 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9390 * linux-low.c (can_hardware_single_step): Use
9391 supports_hardware_single_step.
9392 (can_software_single_step): New function.
9393 (start_step_over): Call can_software_single_step.
9394 (linux_supports_hardware_single_step): New function.
9395 (struct target_ops) <supports_software_single_step>: Initialize.
9396 * linux-low.h (struct linux_target_ops)
9397 <supports_hardware_single_step>: Initialize.
9398 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
9399 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9400 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
9401 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
9402 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
9403 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9404 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
9405 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9406 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
9407 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
9408 Initialize.
9409 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
9410 (struct linux_target_ops) <tile_supports_hardware_single_step>:
9411 Initialize.
9412 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
9413 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9414 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
9415 New function.
9416 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9417 * target.h (struct target_ops): <supports_software_single_step>:
9418 New field.
9419 (target_supports_software_single_step): New macro.
9420
9421 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9422
9423 * linux-low.c (linux_wait_1): Fix pc advance condition.
9424 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
9425 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
9426
9427 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9428
9429 * linux-arm-low.c (arm_is_thumb_mode): New function.
9430 (arm_breakpoint_at): Use arm_is_thumb_mode.
9431 (arm_breakpoint_kind_from_current_state): New function.
9432 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
9433 Initialize.
9434 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
9435 (linux_breakpoint_kind_from_current_state): New function.
9436 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
9437 * linux-low.h (struct linux_target_ops)
9438 <breakpoint_kind_from_current_state>: New field.
9439 * target.h (struct target_ops): Likewise.
9440 (target_breakpoint_kind_from_current_state): New macro.
9441
9442 2015-11-30 Pedro Alves <palves@redhat.com>
9443
9444 * linux-low.c (linux_resume): Wake up the event loop before
9445 returning.
9446
9447 2015-11-30 Pedro Alves <palves@redhat.com>
9448
9449 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
9450 check.
9451 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
9452 to -1.
9453 * target.c (struct thread_search): New structure.
9454 (thread_search_callback): New function.
9455 (prev_general_thread): New global.
9456 (prepare_to_access_memory, done_accessing_memory): New functions.
9457 * target.h (prepare_to_access_memory, done_accessing_memory):
9458 Replace macros with function declarations.
9459
9460 2015-11-30 Pedro Alves <palves@redhat.com>
9461
9462 PR 14618
9463 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
9464 report TARGET_WAITKIND_NO_RESUMED.
9465 * remote-utils.c (prepare_resume_reply): Handle
9466 TARGET_WAITKIND_NO_RESUMED.
9467 * server.c (report_no_resumed): New global.
9468 (handle_query) <qSupported>: Handle "no-resumed+". Report
9469 "no-resumed+" support.
9470 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
9471 return error if the client doesn't support no-resumed events.
9472 (push_stop_notification): New function.
9473 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
9474 events if the client supports them.
9475
9476 2015-11-30 Pedro Alves <palves@redhat.com>
9477
9478 * linux-low.c (thread_still_has_status_pending_p): Don't check
9479 vCont;t here.
9480 (lwp_resumed): New function.
9481 (status_pending_p_callback): Return early if the LWP is not
9482 supposed to be resumed.
9483
9484 2015-11-30 Pedro Alves <palves@redhat.com>
9485
9486 * linux-low.c (handle_extended_wait): Assert that the LWP's
9487 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
9488 thread create events, leave the new child's status pending.
9489 (linux_low_filter_event): If GDB wants to hear about thread exit
9490 events, leave the LWP marked dead and don't delete it.
9491 (linux_wait_for_event_filtered): Don't check for thread exit.
9492 (filter_exit_event): New function.
9493 (linux_wait_1): Use it, when returning an exit event.
9494 (linux_resume_one_lwp_throw): Assert that the LWP's
9495 waitstatus is TARGET_WAITKIND_IGNORE.
9496 * remote-utils.c (prepare_resume_reply): Handle
9497 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
9498 * server.c (report_thread_events): New global.
9499 (handle_general_set): Handle QThreadEvents.
9500 (handle_query) <qSupported>: Handle and report QThreadEvents+;
9501 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
9502 TARGET_WAITKIND_THREAD_EXITED.
9503 * server.h (report_thread_events): Declare.
9504
9505 2015-11-30 Pedro Alves <palves@redhat.com>
9506
9507 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
9508 the thread's last_resume_kind was resume_stop.
9509
9510 2015-11-30 Pedro Alves <palves@redhat.com>
9511
9512 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
9513 before returning.
9514
9515 2015-11-30 Pedro Alves <palves@redhat.com>
9516
9517 * server.c (handle_v_requests): Handle vCtrlC.
9518
9519 2015-11-30 Pedro Alves <palves@redhat.com>
9520
9521 * gdbthread.h (find_any_thread_of_pid): Declare.
9522 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
9523 functions.
9524 * server.c (handle_query): If current_thread is NULL, look for
9525 another thread of the selected process.
9526
9527 2015-11-26 Daniel Colascione <dancol@dancol.org>
9528 Simon Marchi <simon.marchi@ericsson.com>
9529
9530 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
9531 * server.c (handle_qxfer_threads_worker): Refactor to include thread
9532 name in reply.
9533 * target.h (struct target_ops) <thread_name>: New field.
9534 (target_thread_name): New macro.
9535
9536 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9537
9538 * regcache.h (regcache_invalidate_pid): Add declaration.
9539 * regcache.c (regcache_invalidate_pid): New function, extracted
9540 from regcache_invalidate.
9541 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
9542 Add trivial documentation comment.
9543 * lynx-low.c: Use regcache_invalidate_pid instead of
9544 regcache_invalidate.
9545
9546 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9547
9548 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
9549 and Elf64_auxv_t if the target is Android.
9550
9551 2015-11-22 Doug Evans <xdje42@gmail.com>
9552
9553 * target.h: #include <sys/types.h>.
9554
9555 2015-11-19 Pedro Alves <palves@redhat.com>
9556
9557 * linux-low.c (linux_process_qsupported): Change prototype.
9558 Adjust.
9559 * linux-low.h (struct linux_target_ops) <process_qsupported>:
9560 Change prototype.
9561 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
9562 and adjust to loop over all features.
9563 * server.c (handle_query) <qSupported>: Adjust to call
9564 target_process_qsupported once, passing it a vector of unprocessed
9565 features.
9566 * target.h (struct target_ops) <process_qsupported>: Change
9567 prototype.
9568 (target_process_qsupported): Adjust.
9569
9570 2015-11-19 Pedro Alves <palves@redhat.com>
9571
9572 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
9573 mode.
9574 * configure: Regenerate.
9575
9576 2015-11-19 Pedro Alves <palves@redhat.com>
9577
9578 * configure: Regenerate.
9579
9580 2015-11-19 Yao Qi <yao.qi@linaro.org>
9581
9582 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
9583 type to uint32_t.
9584
9585 2015-11-19 Yao Qi <yao.qi@linaro.org>
9586
9587 * linux-aarch64-low.c (enum aarch64_operand_type): New.
9588 (struct aarch64_operand): Move enum out.
9589
9590 2015-11-19 Yao Qi <yao.qi@linaro.org>
9591
9592 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
9593 struct user_fpsimd_state *.
9594 (aarch64_store_fpregset): Likewise.
9595
9596 2015-11-19 Yao Qi <yao.qi@linaro.org>
9597
9598 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
9599 struct user_pt_regs *.
9600 (aarch64_store_gregset): Likewise.
9601
9602 2015-11-18 Pedro Alves <palves@redhat.com>
9603
9604 * Makefile.in (all_object_files): Add $IPA_OBJS.
9605
9606 2015-11-17 Pedro Alves <palves@redhat.com>
9607
9608 * win32-low.c (win32_resume): Use gdb_signal_from_host,
9609 GDB_SIGNAL_0 and gdb_signal_to_string.
9610
9611 2015-11-17 Pedro Alves <palves@redhat.com>
9612
9613 * win32-low.c (handle_output_debug_string): Remove parameter.
9614 (win32_kill): Remove our_status local and adjust call to
9615 handle_output_debug_string.
9616 (get_child_debug_event): Adjust call to
9617 handle_output_debug_string.
9618
9619 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9620
9621 * linux-mips-low.c (mips_fill_gregset): Add cast.
9622 (mips_store_gregset): Likewise.
9623 (mips_fill_fpregset): Likewise.
9624 (mips_store_fpregset): Likewise.
9625
9626 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9627
9628 * linux-mips-low.c (mips_add_watchpoint): Rename private to
9629 priv.
9630
9631 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9632
9633 * linux-mips-low.c (mips_linux_new_thread): Change type of
9634 watch_type to enum target_hw_bp_type.
9635
9636 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9637
9638 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
9639 Change return type to arm_hwbp_type.
9640
9641 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9642
9643 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
9644 (arm_store_gregset): Likewise.
9645 * linux-arm-low.c (arm_get_hwcap): Likewise.
9646 (arm_read_description): Likewise.
9647
9648 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9649
9650 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
9651
9652 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9653
9654 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
9655 (ppc_fill_vsxregset): Likewise.
9656 (ppc_store_vsxregset): Likewise.
9657 (ppc_fill_vrregset): Likewise.
9658 (ppc_store_vrregset): Likewise.
9659 (ppc_fill_evrregset): Likewise.
9660 (ppc_store_evrregset): Likewise.
9661
9662 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9663
9664 * linux-ppc-low.c (ppc_usrregs_info): Remove
9665 forward-declaration.
9666 (ppc_arch_setup): Move lower in file.
9667
9668 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
9669
9670 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
9671 (ps_pdwrite): Likewise.
9672
9673 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
9674
9675 * linux-arm-low.c (arm_new_thread): Move pointer dereference
9676 to after assert checks.
9677
9678 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
9679
9680 * proc-service.c (ps_pdread): Add/adjust casts.
9681 (ps_pdwrite): Add/adjust casts.
9682
9683 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9684
9685 * server.c (handle_search_memory_1): Cast return value of
9686 memmem.
9687
9688 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9689
9690 * server.c (write_qxfer_response): Change type of data to
9691 gdb_byte *.
9692
9693 2015-10-29 Pedro Alves <palves@redhat.com>
9694
9695 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
9696
9697 2015-10-29 Pedro Alves <palves@redhat.com>
9698
9699 * tracepoint.c (clear_installed_tracepoints): Add casts.
9700
9701 2015-10-29 Pedro Alves <palves@redhat.com>
9702
9703 * server.c (handle_v_cont, process_serial_event): Add enum
9704 gdb_signal casts to signal parsing code.
9705
9706 2015-10-29 Pedro Alves <palves@redhat.com>
9707
9708 * linux-low.h (NULL_REGSET): Define.
9709 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9710 * linux-arm-low.c (arm_regsets): Likewise.
9711 * linux-crisv32-low.c (cris_regsets): Likewise.
9712 * linux-m68k-low.c (m68k_regsets): Likewise.
9713 * linux-mips-low.c (mips_regsets): Likewise.
9714 * linux-nios2-low.c (nios2_regsets): Likewise.
9715 * linux-ppc-low.c (ppc_regsets): Likewise.
9716 * linux-s390-low.c (s390_regsets): Likewise.
9717 * linux-sh-low.c (sh_regsets): Likewise.
9718 * linux-sparc-low.c (sparc_regsets): Likewise.
9719 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9720 * linux-tile-low.c (tile_regsets): Likewise.
9721 * linux-x86-low.c (x86_regsets): Likewise.
9722 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9723
9724 2015-10-29 Pedro Alves <palves@redhat.com>
9725
9726 * linux-low.h (NULL_REGSET): Define.
9727 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9728 * linux-arm-low.c (arm_regsets): Likewise.
9729 * linux-crisv32-low.c (cris_regsets): Likewise.
9730 * linux-m68k-low.c (m68k_regsets): Likewise.
9731 * linux-mips-low.c (mips_regsets): Likewise.
9732 * linux-nios2-low.c (nios2_regsets): Likewise.
9733 * linux-ppc-low.c (ppc_regsets): Likewise.
9734 * linux-s390-low.c (s390_regsets): Likewise.
9735 * linux-sh-low.c (sh_regsets): Likewise.
9736 * linux-sparc-low.c (sparc_regsets): Likewise.
9737 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9738 * linux-tile-low.c (tile_regsets): Likewise.
9739 * linux-x86-low.c (x86_regsets): Likewise.
9740 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9741
9742 2015-10-26 Doug Evans <dje@google.com>
9743
9744 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
9745
9746 2015-10-26 Doug Evans <dje@google.com>
9747
9748 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
9749
9750 2015-10-26 Doug Evans <dje@google.com>
9751
9752 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
9753 for debug_printf.
9754 (attach_thread, find_new_threads_callback): Ditto.
9755
9756 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9757
9758 * mem-break.h (set_breakpoint_data): Remove.
9759
9760 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9761
9762 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
9763 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9764 (initialize_low): Remove set_breakpoint_data call.
9765 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
9766 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
9767 (initialize_low): Remove set_breakpoint_data call.
9768 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
9769 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9770 (initialize_low): Remove set_breakpoint_data call.
9771
9772 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9773
9774 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
9775 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
9776 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
9777 * target.h (target_breakpoint_kind_from_pc): New macro.
9778
9779 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
9780
9781 * linux-low.c (default_breakpoint_kind_from_pc): New function.
9782 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
9783 the default breakpoint kind.
9784
9785 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9786
9787 * linux-arm-low.c (arm_supports_z_point_type): Add software
9788 breakpoint support.
9789
9790 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9791
9792 * linux-arm-low.c: Refactor breakpoint definitions.
9793 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
9794 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
9795
9796 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9797
9798 * Makefile.in: Add arm.c/o.
9799 * configure.srv: Likewise.
9800 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
9801 (arm_breakpoint_kind_from_pc): New function.
9802 (arm_sw_breakpoint_from_kind): Return proper kind.
9803 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
9804
9805 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9806
9807 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
9808 removal.
9809 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
9810 (struct raw_breakpoint) <size>: Remove.
9811 (struct raw_breakpoint) <kind>: Add.
9812 (bp_size): New function.
9813 (bp_opcode): Likewise.
9814 (find_raw_breakpoint_at): Adjust for kind.
9815 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
9816 (remove_memory_breakpoint): Adjust for kind call bp_size.
9817 (set_raw_breakpoint_at): Adjust for kind.
9818 (set_breakpoint): Likewise.
9819 (set_breakpoint_at): Call breakpoint_kind_from_pc.
9820 (delete_raw_breakpoint): Adjust for kind.
9821 (delete_breakpoint): Likewise.
9822 (find_gdb_breakpoint): Likewise.
9823 (set_gdb_breakpoint_1): Likewise.
9824 (set_gdb_breakpoint): Likewise.
9825 (delete_gdb_breakpoint_1): Likewise.
9826 (delete_gdb_breakpoint): Likewise.
9827 (uninsert_raw_breakpoint): Likewise.
9828 (reinsert_raw_breakpoint): Likewise.
9829 (set_breakpoint_data): Remove.
9830 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
9831 (check_mem_read): Adjust for kind call bp_size.
9832 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
9833 (clone_one_breakpoint): Adjust for kind.
9834 * mem-break.h (set_gdb_breakpoint): Likewise.
9835 (delete_gdb_breakpoint): Likewise.
9836 * server.c (process_serial_event): Likewise.
9837
9838 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9839
9840 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
9841 (struct linux_target_ops) <breakpoint>: Remove.
9842 (struct linux_target_ops) <breakpoint_len>: Remove.
9843 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9844 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9845 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
9846 (arm_sw_breakpoint_from_kind): New function.
9847 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
9848 (struct linux_target_ops) <breakpoint>: Remove.
9849 (struct linux_target_ops) <breakpoint_len>: Remove.
9850 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9851 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9852 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
9853 (struct linux_target_ops) <breakpoint>: Remove.
9854 (struct linux_target_ops) <breakpoint_len>: Remove.
9855 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9856 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9857 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
9858 (struct linux_target_ops) <breakpoint>: Remove.
9859 (struct linux_target_ops) <breakpoint_len>: Remove.
9860 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9861 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9862 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
9863 and sw_breakpoint_from_kind to increment the pc.
9864 (linux_breakpoint_kind_from_pc): New function.
9865 (linux_sw_breakpoint_from_kind): New function.
9866 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
9867 (initialize_low): Call breakpoint_kind_from_pc and
9868 sw_breakpoint_from_kind to replace breakpoint_data/len.
9869 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
9870 New field.
9871 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
9872 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
9873 (struct linux_target_ops) <breakpoint>: Remove.
9874 (struct linux_target_ops) <breakpoint_len>: Remove.
9875 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9876 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9877 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
9878 (struct linux_target_ops) <breakpoint>: Remove.
9879 (struct linux_target_ops) <breakpoint_len>: Remove.
9880 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9881 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9882 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
9883 (struct linux_target_ops) <breakpoint>: Remove.
9884 (struct linux_target_ops) <breakpoint_len>: Remove.
9885 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9886 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9887 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
9888 (struct linux_target_ops) <breakpoint>: Remove.
9889 (struct linux_target_ops) <breakpoint_len>: Remove.
9890 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9891 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9892 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
9893 (struct linux_target_ops) <breakpoint>: Remove.
9894 (struct linux_target_ops) <breakpoint_len>: Remove.
9895 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9896 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9897 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
9898 (struct linux_target_ops) <breakpoint>: Remove.
9899 (struct linux_target_ops) <breakpoint_len>: Remove.
9900 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9901 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9902 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
9903 (struct linux_target_ops) <breakpoint>: Remove.
9904 (struct linux_target_ops) <breakpoint_len>: Remove.
9905 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9906 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9907 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
9908 (struct linux_target_ops) <breakpoint>: Remove.
9909 (struct linux_target_ops) <breakpoint_len>: Remove.
9910 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9911 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9912 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
9913 (struct linux_target_ops) <breakpoint>: Remove.
9914 (struct linux_target_ops) <breakpoint_len>: Remove.
9915 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9916 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9917 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
9918 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
9919 (struct linux_target_ops) <breakpoint>: Remove.
9920 (struct linux_target_ops) <breakpoint_len>: Remove.
9921 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9922 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9923 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
9924 (struct linux_target_ops) <breakpoint>: Remove.
9925 (struct linux_target_ops) <breakpoint_len>: Remove.
9926 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9927 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9928
9929 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9930
9931 * linux-cris-low.c (cris_get_pc): Remove void arg.
9932
9933 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9934
9935 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
9936 variable name.
9937
9938 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9939
9940 * inferiors.c (thread_pid_matches_callback): New function.
9941 (find_thread_process): New function.
9942 (remove_thread): Reset current_thread.
9943 (remove_process): Assert threads have been removed first.
9944
9945 2015-10-15 Yao Qi <yao.qi@linaro.org>
9946
9947 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
9948 if it is 3.
9949 (aarch64_remove_point): Likewise.
9950 * regcache.c (regcache_register_size): New function.
9951
9952 2015-10-12 Yao Qi <yao.qi@linaro.org>
9953
9954 * linux-aarch64-low.c: Update all callers as emit_load_store
9955 is renamed to aarch64_emit_load_store.
9956
9957 2015-10-12 Yao Qi <yao.qi@linaro.org>
9958
9959 * linux-aarch64-low.c: Update all callers of function renaming
9960 from emit_insn to aarch64_emit_insn.
9961
9962 2015-10-12 Yao Qi <yao.qi@linaro.org>
9963
9964 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
9965 arch/aarch64-insn.h.
9966 (struct aarch64_memory_operand): Likewise.
9967 (ENCODE): Likewise.
9968 (emit_insn): Move to arch/aarch64-insn.c.
9969 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
9970 (emit_load_store): Move to arch/aarch64-insn.c.
9971 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
9972 (can_encode_int32): Remove.
9973
9974 2015-10-12 Yao Qi <yao.qi@linaro.org>
9975
9976 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
9977 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
9978 (aarch64_relocate_instruction): Likewise.
9979 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
9980 (struct aarch64_insn_visitor): Likewise.
9981
9982 2015-10-12 Yao Qi <yao.qi@linaro.org>
9983
9984 * linux-aarch64-low.c (struct aarch64_insn_data): New.
9985 (struct aarch64_insn_visitor): New.
9986 (struct aarch64_insn_relocation_data): New.
9987 (aarch64_ftrace_insn_reloc_b): New function.
9988 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
9989 (aarch64_ftrace_insn_reloc_cb): Likewise.
9990 (aarch64_ftrace_insn_reloc_tb): Likewise.
9991 (aarch64_ftrace_insn_reloc_adr): Likewise.
9992 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
9993 (aarch64_ftrace_insn_reloc_others): Likewise.
9994 (visitor): New.
9995 (aarch64_relocate_instruction): Use visitor.
9996
9997 2015-10-12 Yao Qi <yao.qi@linaro.org>
9998
9999 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
10000 int. Add argument buf.
10001 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
10002 aarch64_relocate_instruction.
10003
10004 2015-10-12 Yao Qi <yao.qi@linaro.org>
10005
10006 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
10007 argument insn. Remove local variable insn. Don't call
10008 target_read_uint32.
10009 (aarch64_install_fast_tracepoint_jump_pad): Call
10010 target_read_uint32.
10011
10012 2015-09-30 Yao Qi <yao.qi@linaro.org>
10013
10014 * linux-aarch64-low.c (emit_movk): Shorten a long line.
10015 (emit_load_store_pair): Likewise.
10016
10017 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
10018
10019 * dll.c (match_dll): Add cast(s).
10020 (unloaded_dll): Likewise.
10021 * linux-low.c (second_thread_of_pid_p): Likewise.
10022 (delete_lwp_callback): Likewise.
10023 (count_events_callback): Likewise.
10024 (select_event_lwp_callback): Likewise.
10025 (linux_set_resume_request): Likewise.
10026 * server.c (accumulate_file_name_length): Likewise.
10027 (emit_dll_description): Likewise.
10028 (handle_qxfer_threads_worker): Likewise.
10029 (visit_actioned_threads): Likewise.
10030 * thread-db.c (any_thread_of): Likewise.
10031 * tracepoint.c (same_process_p): Likewise.
10032 (match_blocktype): Likewise.
10033 (build_traceframe_info_xml): Likewise.
10034
10035 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
10036
10037 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
10038 assignment.
10039 (gdb_unparse_agent_expr): Likewise.
10040 * hostio.c (require_data): Likewise.
10041 (handle_pread): Likewise.
10042 * linux-low.c (disable_regset): Likewise.
10043 (fetch_register): Likewise.
10044 (store_register): Likewise.
10045 (get_dynamic): Likewise.
10046 (linux_qxfer_libraries_svr4): Likewise.
10047 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
10048 (set_fast_tracepoint_jump): Likewise.
10049 (uninsert_fast_tracepoint_jumps_at): Likewise.
10050 (reinsert_fast_tracepoint_jumps_at): Likewise.
10051 (validate_inserted_breakpoint): Likewise.
10052 (clone_agent_expr): Likewise.
10053 * regcache.c (init_register_cache): Likewise.
10054 * remote-utils.c (putpkt_binary_1): Likewise.
10055 (decode_M_packet): Likewise.
10056 (decode_X_packet): Likewise.
10057 (look_up_one_symbol): Likewise.
10058 (relocate_instruction): Likewise.
10059 (monitor_output): Likewise.
10060 * server.c (handle_search_memory): Likewise.
10061 (handle_qxfer_exec_file): Likewise.
10062 (handle_qxfer_libraries): Likewise.
10063 (handle_qxfer): Likewise.
10064 (handle_query): Likewise.
10065 (handle_v_cont): Likewise.
10066 (handle_v_run): Likewise.
10067 (captured_main): Likewise.
10068 * target.c (write_inferior_memory): Likewise.
10069 * thread-db.c (try_thread_db_load_from_dir): Likewise.
10070 * tracepoint.c (init_trace_buffer): Likewise.
10071 (add_tracepoint_action): Likewise.
10072 (add_traceframe): Likewise.
10073 (add_traceframe_block): Likewise.
10074 (cmd_qtdpsrc): Likewise.
10075 (cmd_qtdv): Likewise.
10076 (cmd_qtstatus): Likewise.
10077 (response_source): Likewise.
10078 (response_tsv): Likewise.
10079 (cmd_qtnotes): Likewise.
10080 (gdb_collect): Likewise.
10081 (initialize_tracepoint): Likewise.
10082
10083 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10084
10085 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
10086 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
10087 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
10088 <NOP>: New.
10089 (enum aarch64_condition_codes): New enum.
10090 (w0): New static global.
10091 (fp): Likewise.
10092 (lr): Likewise.
10093 (struct aarch64_memory_operand) <type>: New
10094 MEMORY_OPERAND_POSTINDEX type.
10095 (postindex_memory_operand): New helper function.
10096 (emit_ret): New function.
10097 (emit_load_store_pair): New function, factored out of emit_stp
10098 with support for MEMORY_OPERAND_POSTINDEX.
10099 (emit_stp): Rewrite using emit_load_store_pair.
10100 (emit_ldp): New function.
10101 (emit_load_store): Likewise.
10102 (emit_ldr): Mention post-index instruction in comment.
10103 (emit_ldrh): New function.
10104 (emit_ldrb): New function.
10105 (emit_ldrsw): Mention post-index instruction in comment.
10106 (emit_str): Likewise.
10107 (emit_subs): New function.
10108 (emit_cmp): Likewise.
10109 (emit_and): Likewise.
10110 (emit_orr): Likewise.
10111 (emit_orn): Likewise.
10112 (emit_eor): Likewise.
10113 (emit_mvn): Likewise.
10114 (emit_lslv): Likewise.
10115 (emit_lsrv): Likewise.
10116 (emit_asrv): Likewise.
10117 (emit_mul): Likewise.
10118 (emit_sbfm): Likewise.
10119 (emit_sbfx): Likewise.
10120 (emit_ubfm): Likewise.
10121 (emit_ubfx): Likewise.
10122 (emit_csinc): Likewise.
10123 (emit_cset): Likewise.
10124 (emit_nop): Likewise.
10125 (emit_ops_insns): New helper function.
10126 (emit_pop): Likewise.
10127 (emit_push): Likewise.
10128 (aarch64_emit_prologue): New function.
10129 (aarch64_emit_epilogue): Likewise.
10130 (aarch64_emit_add): Likewise.
10131 (aarch64_emit_sub): Likewise.
10132 (aarch64_emit_mul): Likewise.
10133 (aarch64_emit_lsh): Likewise.
10134 (aarch64_emit_rsh_signed): Likewise.
10135 (aarch64_emit_rsh_unsigned): Likewise.
10136 (aarch64_emit_ext): Likewise.
10137 (aarch64_emit_log_not): Likewise.
10138 (aarch64_emit_bit_and): Likewise.
10139 (aarch64_emit_bit_or): Likewise.
10140 (aarch64_emit_bit_xor): Likewise.
10141 (aarch64_emit_bit_not): Likewise.
10142 (aarch64_emit_equal): Likewise.
10143 (aarch64_emit_less_signed): Likewise.
10144 (aarch64_emit_less_unsigned): Likewise.
10145 (aarch64_emit_ref): Likewise.
10146 (aarch64_emit_if_goto): Likewise.
10147 (aarch64_emit_goto): Likewise.
10148 (aarch64_write_goto_address): Likewise.
10149 (aarch64_emit_const): Likewise.
10150 (aarch64_emit_call): Likewise.
10151 (aarch64_emit_reg): Likewise.
10152 (aarch64_emit_pop): Likewise.
10153 (aarch64_emit_stack_flush): Likewise.
10154 (aarch64_emit_zero_ext): Likewise.
10155 (aarch64_emit_swap): Likewise.
10156 (aarch64_emit_stack_adjust): Likewise.
10157 (aarch64_emit_int_call_1): Likewise.
10158 (aarch64_emit_void_call_2): Likewise.
10159 (aarch64_emit_eq_goto): Likewise.
10160 (aarch64_emit_ne_goto): Likewise.
10161 (aarch64_emit_lt_goto): Likewise.
10162 (aarch64_emit_le_goto): Likewise.
10163 (aarch64_emit_gt_goto): Likewise.
10164 (aarch64_emit_ge_got): Likewise.
10165 (aarch64_emit_ops_impl): New static global variable.
10166 (aarch64_emit_ops): New target function, return
10167 &aarch64_emit_ops_impl.
10168 (struct linux_target_ops): Install it.
10169
10170 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10171
10172 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
10173 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
10174 aarch64-ipa.o.
10175 * linux-aarch64-ipa.c: New file.
10176 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
10177 and endian.h.
10178 (aarch64_get_thread_area): New target method.
10179 (extract_signed_bitfield): New helper function.
10180 (aarch64_decode_ldr_literal): New function.
10181 (enum aarch64_opcodes): New enum.
10182 (struct aarch64_register): New struct.
10183 (struct aarch64_operand): New struct.
10184 (x0): New static global.
10185 (x1): Likewise.
10186 (x2): Likewise.
10187 (x3): Likewise.
10188 (x4): Likewise.
10189 (w2): Likewise.
10190 (ip0): Likewise.
10191 (sp): Likewise.
10192 (xzr): Likewise.
10193 (aarch64_register): New helper function.
10194 (register_operand): Likewise.
10195 (immediate_operand): Likewise.
10196 (struct aarch64_memory_operand): New struct.
10197 (offset_memory_operand): New helper function.
10198 (preindex_memory_operand): Likewise.
10199 (enum aarch64_system_control_registers): New enum.
10200 (ENCODE): New macro.
10201 (emit_insn): New helper function.
10202 (emit_b): New function.
10203 (emit_bcond): Likewise.
10204 (emit_cb): Likewise.
10205 (emit_tb): Likewise.
10206 (emit_blr): Likewise.
10207 (emit_stp): Likewise.
10208 (emit_ldp_q_offset): Likewise.
10209 (emit_stp_q_offset): Likewise.
10210 (emit_load_store): Likewise.
10211 (emit_ldr): Likewise.
10212 (emit_ldrsw): Likewise.
10213 (emit_str): Likewise.
10214 (emit_ldaxr): Likewise.
10215 (emit_stxr): Likewise.
10216 (emit_stlr): Likewise.
10217 (emit_data_processing_reg): Likewise.
10218 (emit_data_processing): Likewise.
10219 (emit_add): Likewise.
10220 (emit_sub): Likewise.
10221 (emit_mov): Likewise.
10222 (emit_movk): Likewise.
10223 (emit_mov_addr): Likewise.
10224 (emit_mrs): Likewise.
10225 (emit_msr): Likewise.
10226 (emit_sevl): Likewise.
10227 (emit_wfe): Likewise.
10228 (append_insns): Likewise.
10229 (can_encode_int32_in): New helper function.
10230 (aarch64_relocate_instruction): New function.
10231 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
10232 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
10233 (struct linux_target_ops): Install aarch64_get_thread_area,
10234 aarch64_install_fast_tracepoint_jump_pad and
10235 aarch64_get_min_fast_tracepoint_insn_len.
10236
10237 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10238
10239 * Makefile.in (aarch64-insn.o): New rule.
10240 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
10241
10242 2015-09-21 Yao Qi <yao.qi@linaro.org>
10243
10244 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
10245
10246 2015-09-21 Yao Qi <yao.qi@linaro.org>
10247
10248 * tracepoint.c (max_jump_pad_size): Remove.
10249
10250 2015-09-18 Yao Qi <yao.qi@linaro.org>
10251
10252 * linux-aarch64-low.c: Don't include sys/uio.h.
10253 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
10254
10255 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
10256
10257 * tracepoint.c (eval_result_type): Change prototype.
10258 (condition_true_at_tracepoint): Fix argument to compiled_cond.
10259
10260 2015-09-15 Pedro Alves <palves@redhat.com>
10261
10262 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
10263 Check whether to report exec events instead of checking whether
10264 multiprocess is enabled.
10265
10266 2015-09-15 Pedro Alves <palves@redhat.com>
10267
10268 PR remote/18965
10269 * remote-utils.c (prepare_resume_reply): Merge
10270 TARGET_WAITKIND_VFORK_DONE switch case with the
10271 TARGET_WAITKIND_FORKED case.
10272
10273 2015-09-15 Yao Qi <yao.qi@linaro.org>
10274
10275 * server.c (handle_query): Check string comparison using
10276 "else if" instead of "if".
10277
10278 2015-09-15 Yao Qi <yao.qi@linaro.org>
10279
10280 * server.c (vCont_supported): New global variable.
10281 (handle_query): Set vCont_supported to 1 if "vContSupported+"
10282 matches. Append ";vContSupported+" to own_buf.
10283 (handle_v_requests): Append ";s;S" to own_buf if target supports
10284 hardware single step or vCont_supported is false.
10285 (capture_main): Set vCont_supported to zero.
10286
10287 2015-09-15 Yao Qi <yao.qi@linaro.org>
10288
10289 * linux-low.c (linux_supports_conditional_breakpoints): Rename
10290 it to ...
10291 (linux_supports_hardware_single_step): ... New function.
10292 (linux_target_ops): Update.
10293 * lynx-low.c (lynx_target_ops): Set field
10294 supports_hardware_single_step to target_can_do_hardware_single_step.
10295 * nto-low.c (nto_target_ops): Likewise.
10296 * spu-low.c (spu_target_ops): Likewise.
10297 * win32-low.c (win32_target_ops): Likewise.
10298 * target.c (target_can_do_hardware_single_step): New function.
10299 * target.h (struct target_ops) <supports_conditional_breakpoints>:
10300 Remove. <supports_hardware_single_step>: New field.
10301 (target_supports_conditional_breakpoints): Remove.
10302 (target_supports_hardware_single_step): New macro.
10303 (target_can_do_hardware_single_step): Declare.
10304 * server.c (handle_query): Use target_supports_hardware_single_step
10305 instead of target_supports_conditional_breakpoints.
10306
10307 2015-09-15 Yao Qi <yao.qi@linaro.org>
10308
10309 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
10310 function.
10311 (struct linux_target_ops the_low_target): Install
10312 aarch64_linux_siginfo_fixup.
10313
10314 2015-09-11 Don Breazeal <donb@codesourcery.com>
10315 Luis Machado <lgustavo@codesourcery.com>
10316
10317 * linux-low.c (linux_mourn): Static declaration.
10318 (linux_arch_setup): Move in front of
10319 handle_extended_wait.
10320 (linux_arch_setup_thread): New function.
10321 (handle_extended_wait): Handle exec events. Call
10322 linux_arch_setup_thread. Make event_lwp argument a
10323 pointer-to-a-pointer.
10324 (check_zombie_leaders): Do not check stopped threads.
10325 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
10326 (linux_low_filter_event): Add lwp and thread for exec'ing
10327 non-leader thread if leader thread has been deleted.
10328 Refactor code into linux_arch_setup_thread and call it.
10329 Pass child lwp pointer by reference to handle_extended_wait.
10330 (linux_wait_for_event_filtered): Update comment.
10331 (linux_wait_1): Prevent clobbering exec event status.
10332 (linux_supports_exec_events): New function.
10333 (linux_target_ops) <supports_exec_events>: Initialize new member.
10334 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
10335 new member.
10336 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
10337 * server.c (report_exec_events): New global variable.
10338 (handle_query): Handle qSupported query for exec-events feature.
10339 (captured_main): Initialize report_exec_events.
10340 * server.h (report_exec_events): Declare new global variable.
10341 * target.h (struct target_ops) <supports_exec_events>: New
10342 member.
10343 (target_supports_exec_events): New macro.
10344 * win32-low.c (win32_target_ops) <supports_exec_events>:
10345 Initialize new member.
10346
10347 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
10348
10349 * linux-low.c (linux_low_enable_btrace): Remove.
10350 (linux_target_ops): Replace linux_low_enable_btrace with
10351 linux_enable_btrace.
10352
10353 2015-09-03 Yao Qi <yao.qi@linaro.org>
10354
10355 * linux-aarch64-low.c (aarch64_insert_point): Call
10356 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
10357 returns true.
10358
10359 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10360
10361 * linux-low.c (check_stopped_by_breakpoint): Use
10362 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
10363
10364 2015-08-27 Pedro Alves <palves@redhat.com>
10365
10366 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
10367
10368 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
10369
10370 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
10371 the XNEW-family equivalent.
10372 (compile_bytecodes): Likewise.
10373 * dll.c (loaded_dll): Likewise.
10374 * event-loop.c (append_callback_event): Likewise.
10375 (create_file_handler): Likewise.
10376 (create_file_event): Likewise.
10377 * hostio.c (handle_open): Likewise.
10378 * inferiors.c (add_thread): Likewise.
10379 (add_process): Likewise.
10380 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
10381 * linux-arm-low.c (arm_new_process): Likewise.
10382 (arm_new_thread): Likewise.
10383 * linux-low.c (add_to_pid_list): Likewise.
10384 (linux_add_process): Likewise.
10385 (handle_extended_wait): Likewise.
10386 (add_lwp): Likewise.
10387 (enqueue_one_deferred_signal): Likewise.
10388 (enqueue_pending_signal): Likewise.
10389 (linux_resume_one_lwp_throw): Likewise.
10390 (linux_resume_one_thread): Likewise.
10391 (linux_read_memory): Likewise.
10392 (linux_write_memory): Likewise.
10393 * linux-mips-low.c (mips_linux_new_process): Likewise.
10394 (mips_linux_new_thread): Likewise.
10395 (mips_add_watchpoint): Likewise.
10396 * linux-x86-low.c (initialize_low_arch): Likewise.
10397 * lynx-low.c (lynx_add_process): Likewise.
10398 * mem-break.c (set_raw_breakpoint_at): Likewise.
10399 (set_breakpoint): Likewise.
10400 (add_condition_to_breakpoint): Likewise.
10401 (add_commands_to_breakpoint): Likewise.
10402 (clone_agent_expr): Likewise.
10403 (clone_one_breakpoint): Likewise.
10404 * regcache.c (new_register_cache): Likewise.
10405 * remote-utils.c (look_up_one_symbol): Likewise.
10406 * server.c (queue_stop_reply): Likewise.
10407 (start_inferior): Likewise.
10408 (queue_stop_reply_callback): Likewise.
10409 (handle_target_event): Likewise.
10410 * spu-low.c (fetch_ppc_memory): Likewise.
10411 (store_ppc_memory): Likewise.
10412 * target.c (set_target_ops): Likewise.
10413 * thread-db.c (thread_db_load_search): Likewise.
10414 (try_thread_db_load_1): Likewise.
10415 * tracepoint.c (add_tracepoint): Likewise.
10416 (add_tracepoint_action): Likewise.
10417 (create_trace_state_variable): Likewise.
10418 (cmd_qtdpsrc): Likewise.
10419 (cmd_qtro): Likewise.
10420 (add_while_stepping_state): Likewise.
10421 * win32-low.c (child_add_thread): Likewise.
10422 (get_image_name): Likewise.
10423
10424 2015-08-25 Yao Qi <yao.qi@linaro.org>
10425
10426 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
10427
10428 2015-08-25 Yao Qi <yao.qi@linaro.org>
10429
10430 * Makefile.in (aarch64-linux.o): New rule.
10431 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
10432 srv_tgtobj.
10433 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
10434 (aarch64_init_debug_reg_state): Make it extern.
10435 (aarch64_linux_prepare_to_resume): Remove.
10436
10437 2015-08-25 Yao Qi <yao.qi@linaro.org>
10438
10439 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
10440 lwp_arch_private_info and ptid_of_lwp.
10441
10442 2015-08-25 Yao Qi <yao.qi@linaro.org>
10443
10444 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
10445 Find proc_info by find_process_pid. All callers updated.
10446
10447 2015-08-25 Yao Qi <yao.qi@linaro.org>
10448
10449 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
10450 Remove.
10451 (debug_reg_change_callback): Remove.
10452 (aarch64_notify_debug_reg_change): Remove.
10453
10454 2015-08-25 Yao Qi <yao.qi@linaro.org>
10455
10456 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
10457 Call current_lwp_ptid.
10458
10459 2015-08-25 Yao Qi <yao.qi@linaro.org>
10460
10461 * linux-aarch64-low.c (debug_reg_change_callback): Use
10462 debug_printf.
10463
10464 2015-08-25 Yao Qi <yao.qi@linaro.org>
10465
10466 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
10467
10468 2015-08-25 Yao Qi <yao.qi@linaro.org>
10469
10470 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
10471
10472 2015-08-25 Yao Qi <yao.qi@linaro.org>
10473
10474 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
10475 the code.
10476
10477 2015-08-25 Yao Qi <yao.qi@linaro.org>
10478
10479 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
10480 Remove.
10481 (debug_reg_change_callback): Remove argument entry and add argument
10482 lwp. Remove local variable thread. Don't print thread id in the
10483 debugging output. Don't check whether pid of thread equals to pid.
10484 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
10485 iterate_over_lwps instead find_inferior.
10486
10487 2015-08-24 Pedro Alves <palves@redhat.com>
10488
10489 * inferiors.c (get_first_process): New function.
10490 * inferiors.h (get_first_process): New declaration.
10491 * remote-utils.c (read_ptid): Default to the first process in the
10492 list, instead of to the current thread's process.
10493
10494 2015-08-24 Pedro Alves <palves@redhat.com>
10495
10496 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
10497 * event-loop.c: Likewise.
10498 * remote-utils.c: Likewise.
10499 * tracepoint.c: Likewise.
10500
10501 2015-08-24 Pedro Alves <palves@redhat.com>
10502
10503 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
10504 ptid_get_lwp.
10505
10506 2015-08-21 Pedro Alves <palves@redhat.com>
10507
10508 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
10509 instead of literal 1.
10510
10511 2015-08-21 Pedro Alves <palves@redhat.com>
10512
10513 * tdesc.c (default_description): Explicitly zero-initialize.
10514
10515 2015-08-21 Pedro Alves <palves@redhat.com>
10516
10517 PR gdb/18749
10518 * inferiors.c (remove_thread): Discard any pending stop reply for
10519 this thread.
10520 * server.c (remove_all_on_match_pid): Rename to ...
10521 (remove_all_on_match_ptid): ... this. Work with a filter ptid
10522 instead of a pid.
10523 (discard_queued_stop_replies): Change parameter to a ptid. Now
10524 extern.
10525 (handle_v_kill, kill_inferior_callback, captured_main)
10526 (process_serial_event): Adjust.
10527 * server.h (discard_queued_stop_replies): Declare.
10528
10529 2015-08-21 Pedro Alves <palves@redhat.com>
10530
10531 * linux-low.c (wait_for_sigstop): Always switch to no thread
10532 selected if the previously current thread dies.
10533 * lynx-low.c (lynx_request_interrupt): Use the first thread's
10534 process instead of the current thread's.
10535 * remote-utils.c (input_interrupt): Don't check if there's no
10536 current thread.
10537 * server.c (gdb_read_memory, gdb_write_memory): If setting the
10538 current thread to the general thread fails, error out.
10539 (handle_qxfer_auxv, handle_qxfer_libraries)
10540 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
10541 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
10542 (handle_query): Check if there's a thread selected instead of
10543 checking whether there's any thread in the thread list.
10544 (handle_qxfer_threads, handle_qxfer_btrace)
10545 (handle_qxfer_btrace_conf): Don't error out early if there's no
10546 thread in the thread list.
10547 (handle_v_cont, myresume): Don't set the current thread to the
10548 continue thread.
10549 (process_serial_event) <Hg handling>: Also set thread_id if the
10550 previous general thread is still alive.
10551 (process_serial_event) <g/G handling>: If setting the current
10552 thread to the general thread fails, error out.
10553 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
10554 thread's lwp instead of the current thread's.
10555 * target.c (set_desired_thread): If the desired thread was not
10556 found, leave the current thread pointing to NULL. Return an int
10557 (boolean) indicating success.
10558 * target.h (set_desired_thread): Change return type to int.
10559
10560 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
10561
10562 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
10563 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
10564 #includes.
10565 (ps_get_thread_area): New function.
10566
10567 2015-08-19 Gary Benson <gbenson@redhat.com>
10568
10569 * hostio.c (handle_pread): Do not attempt to read more data
10570 than hostio_reply_with_data can fit in a packet.
10571
10572 2015-08-18 Joel Brobecker <brobecker@adacore.com>
10573
10574 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
10575
10576 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
10577
10578 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
10579
10580 2015-08-06 Pedro Alves <palves@redhat.com>
10581
10582 * tracepoint.c (expr_eval_result): Now an int.
10583
10584 2015-08-06 Pedro Alves <palves@redhat.com>
10585
10586 * gdbthread.h (struct regcache): Forward declare.
10587 (struct thread_info) <regcache_data>: Now a struct regcache
10588 pointer.
10589 * inferiors.c (inferior_regcache_data)
10590 (set_inferior_regcache_data): Now work with struct regcache
10591 pointers.
10592 * inferiors.h (struct regcache): Forward declare.
10593 (inferior_regcache_data, set_inferior_regcache_data): Now work
10594 with struct regcache pointers.
10595 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
10596 (free_register_cache_thread): Remove struct regcache pointer
10597 casts.
10598
10599 2015-08-06 Pedro Alves <palves@redhat.com>
10600
10601 * server.c (captured_main): On error, print the exception message
10602 to stderr, and if run_once is set, throw a quit.
10603
10604 2015-08-06 Pedro Alves <palves@redhat.com>
10605
10606 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
10607 the current thread.
10608
10609 2015-08-06 Pedro Alves <palves@redhat.com>
10610
10611 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
10612 reading beyond the passed in buffer length.
10613
10614 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
10615
10616 * tracepoint.c (symbol_list) <required>: Remove.
10617
10618 2015-08-06 Pedro Alves <palves@redhat.com>
10619
10620 * linux-low.c (handle_extended_wait): Set the fork child's suspend
10621 count if stopping and suspending threads.
10622 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
10623 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
10624 (linux_detach): Complete an ongoing step-over.
10625 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
10626 throughout.
10627 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
10628 (linux_wait_1): If passing a signal to the inferior after
10629 finishing a step-over, unsuspend and re-resume all lwps. If we
10630 see a single-step event but the thread should be continuing, don't
10631 pass the trap to gdb.
10632 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
10633 internal_error instead of gdb_assert.
10634 (enqueue_pending_signal): New function.
10635 (check_ptrace_stopped_lwp_gone): Add debug output.
10636 (start_step_over): Use internal_error instead of gdb_assert.
10637 (complete_ongoing_step_over): New function.
10638 (linux_resume_one_thread): Don't resume a suspended thread.
10639 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
10640 it stepping.
10641
10642 2015-08-06 Pedro Alves <palves@redhat.com>
10643
10644 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
10645 (linux_thread_alive): Use lwp_is_marked_dead.
10646 (extended_event_reported): Delete.
10647 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
10648 instead of extended_event_reported.
10649 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
10650 as well.
10651 (lwp_is_marked_dead): New function.
10652 (lwp_running): Use lwp_is_marked_dead.
10653 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
10654 comment.
10655
10656 2015-08-06 Pedro Alves <palves@redhat.com>
10657
10658 * linux-low.c (linux_wait_1): Move fork event output out of the
10659 !report_to_gdb check. Pass event_child->waitstatus to
10660 target_waitstatus_to_string instead of ourstatus.
10661
10662 2015-08-04 Yao Qi <yao.qi@linaro.org>
10663
10664 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
10665 if current_thread is 32 bit.
10666
10667 2015-08-04 Yao Qi <yao.qi@linaro.org>
10668
10669 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
10670 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
10671 * server.c (extended_protocol): Remove "static".
10672 * server.h (extended_protocol): Declare it.
10673
10674 2015-08-04 Yao Qi <yao.qi@linaro.org>
10675
10676 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
10677 both aarch64 and aarch32.
10678 (aarch64_set_pc): Likewise.
10679
10680 2015-08-04 Yao Qi <yao.qi@linaro.org>
10681
10682 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
10683 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
10684 arm-with-neon.xml to srv_xmlfiles.
10685 * linux-aarch64-low.c: Include linux-aarch32-low.h.
10686 (is_64bit_tdesc): New function.
10687 (aarch64_linux_read_description): New function.
10688 (aarch64_arch_setup): Call aarch64_linux_read_description.
10689 (regs_info): Rename to regs_info_aarch64.
10690 (aarch64_regs_info): Return right regs_info.
10691 (initialize_low_arch): Call initialize_low_arch_aarch32.
10692
10693 2015-08-04 Yao Qi <yao.qi@linaro.org>
10694
10695 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
10696 * linux-aarch32-low.c: New file.
10697 * linux-aarch32-low.h: New file.
10698 * linux-arm-low.c (arm_fill_gregset): Move it to
10699 linux-aarch32-low.c.
10700 (arm_store_gregset): Likewise.
10701 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
10702 (arm_store_vfpregset): Call arm_store_vfpregset_num.
10703 (arm_arch_setup): Check if PTRACE_GETREGSET works.
10704 (regs_info): Rename to regs_info_arm.
10705 (arm_regs_info): Return regs_info_aarch32 if
10706 have_ptrace_getregset is 1 and target description is
10707 arm_with_neon or arm_with_vfpv3.
10708 (initialize_low_arch): Don't call init_registers_arm_with_neon.
10709 Call initialize_low_arch_aarch32 instead.
10710
10711 2015-08-04 Yao Qi <yao.qi@linaro.org>
10712
10713 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
10714 * linux-low.c: ... here.
10715 * linux-low.h (have_ptrace_getregset): Declare it.
10716
10717 2015-08-04 Pedro Alves <palves@redhat.com>
10718
10719 * thread-db.c (struct thread_db): Use new typedefs.
10720 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
10721 CHK calls.
10722 (disable_thread_event_reporting): Cast result of dlsym to
10723 destination function pointer type.
10724 (thread_db_mourn): Use td_ta_delete_ftype.
10725
10726 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
10727
10728 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
10729 arch variant.
10730 (CDX_BREAKPOINT): Define for R2.
10731 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
10732 (the_low_target): Add comments.
10733
10734 2015-07-30 Yao Qi <yao.qi@linaro.org>
10735
10736 * linux-arm-low.c (arm_hwcap): Remove it.
10737 (arm_read_description): New local variable arm_hwcap. Don't
10738 set arm_hwcap to zero.
10739
10740 2015-07-30 Yao Qi <yao.qi@linaro.org>
10741
10742 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
10743 Use regcache->tdesc instead.
10744 (arm_store_wmmxregset): Likewise.
10745 (arm_fill_vfpregset): Likewise.
10746 (arm_store_vfpregset): Likewise.
10747
10748 2015-07-30 Yao Qi <yao.qi@linaro.org>
10749
10750 * linux-arm-low.c: Include arch/arm.h.
10751 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
10752 (arm_store_gregset): Likewise.
10753
10754 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
10755
10756 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
10757 ptrace's 4th parameter.
10758
10759 2015-07-27 Yao Qi <yao.qi@linaro.org>
10760
10761 * configure.srv (case aarch64*-*-linux*): Don't set
10762 srv_linux_usrregs.
10763
10764 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
10765
10766 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
10767 sys/ptrace.h.
10768 * linux-arm-low.c: Likewise.
10769 * linux-cris-low.c: Likewise.
10770 * linux-crisv32-low.c: Likewise.
10771 * linux-low.c: Likewise.
10772 * linux-m68k-low.c: Likewise.
10773 * linux-mips-low.c: Likewise.
10774 * linux-nios2-low.c: Likewise.
10775 * linux-s390-low.c: Likewise.
10776 * linux-sparc-low.c: Likewise.
10777 * linux-tic6x-low.c: Likewise.
10778 * linux-tile-low.c: Likewise.
10779 * linux-x86-low.c: Likewise.
10780
10781 2015-07-24 Pedro Alves <palves@redhat.com>
10782
10783 * config.in: Regenerate.
10784 * configure: Regenerate.
10785
10786 2015-07-24 Pedro Alves <palves@redhat.com>
10787
10788 * acinclude.m4: Include ../ptrace.m4.
10789 * configure.ac: Call GDB_AC_PTRACE.
10790 * config.in, configure: Regenerate.
10791
10792 2015-07-24 Yao Qi <yao.qi@linaro.org>
10793
10794 * linux-low.c (linux_create_inferior): Remove setting to
10795 proc->priv->new_inferior.
10796 (linux_attach): Likewise.
10797 (linux_low_filter_event): Likewise.
10798 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
10799
10800 2015-07-24 Yao Qi <yao.qi@linaro.org>
10801
10802 * linux-low.c (linux_arch_setup): New function.
10803 (linux_low_filter_event): If proc->tdesc is NULL and
10804 proc->attached is true, call the_low_target.arch_setup.
10805 Otherwise, keep status pending, and return.
10806 (linux_resume_one_lwp_throw): Don't call get_pc if
10807 thread->while_stepping isn't NULL. Don't call
10808 get_thread_regcache if proc->tdesc is NULL.
10809 (need_step_over_p): Return 0 if proc->tdesc is NULL.
10810 (linux_target_ops): Install arch_setup.
10811 * server.c (start_inferior): Call the_target->arch_setup.
10812 * target.h (struct target_ops) <arch_setup>: New field.
10813 (target_arch_setup): New marco.
10814 * lynx-low.c (lynx_target_ops): Update.
10815 * nto-low.c (nto_target_ops): Update.
10816 * spu-low.c (spu_target_ops): Update.
10817 * win32-low.c (win32_target_ops): Update.
10818
10819 2015-07-24 Yao Qi <yao.qi@linaro.org>
10820
10821 * linux-low.c (linux_add_process): Don't set
10822 proc->priv->new_inferior.
10823 (linux_create_inferior): Set proc->priv->new_inferior to 1.
10824 (linux_attach): Likewise.
10825
10826 2015-07-24 Yao Qi <yao.qi@linaro.org>
10827
10828 * server.c (start_inferior): Code refactor.
10829
10830 2015-07-24 Yao Qi <yao.qi@linaro.org>
10831
10832 * server.c (process_serial_event): Set general_thread.
10833
10834 2015-07-21 Yao Qi <yao.qi@linaro.org>
10835
10836 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
10837 aarch64_linux_get_debug_reg_capacity.
10838
10839 2015-07-17 Yao Qi <yao.qi@linaro.org>
10840
10841 * Makefile.in (aarch64-linux-hw-point.o): New rule.
10842 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
10843 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
10844 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
10845 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
10846 (AARCH64_HWP_ALIGNMENT): Likewise.
10847 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
10848 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
10849 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
10850 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
10851 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
10852 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
10853 (struct aarch64_debug_reg_state): Likewise.
10854 (struct arch_lwp_info): Likewise.
10855 (aarch64_align_watchpoint): Likewise.
10856 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
10857 (aarch64_watchpoint_length): Likewise.
10858 (aarch64_point_encode_ctrl_reg): Likewise
10859 (aarch64_point_is_aligned): Likewise.
10860 (aarch64_align_watchpoint): Likewise.
10861 (aarch64_linux_set_debug_regs):
10862 (aarch64_dr_state_insert_one_point): Likewise.
10863 (aarch64_dr_state_remove_one_point): Likewise.
10864 (aarch64_handle_breakpoint): Likewise.
10865 (aarch64_handle_aligned_watchpoint): Likewise.
10866 (aarch64_handle_unaligned_watchpoint): Likewise.
10867 (aarch64_handle_watchpoint): Likewise.
10868
10869 2015-07-17 Yao Qi <yao.qi@linaro.org>
10870
10871 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
10872 and don't aarch64_get_debug_reg_state. All callers update.
10873 (aarch64_handle_aligned_watchpoint): Likewise.
10874 (aarch64_handle_unaligned_watchpoint): Likewise.
10875 (aarch64_handle_watchpoint): Likewise.
10876 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
10877 (aarch64_remove_point): Likewise.
10878
10879 2015-07-17 Yao Qi <yao.qi@linaro.org>
10880
10881 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
10882 debug_printf.
10883 (aarch64_handle_unaligned_watchpoint): Likewise.
10884
10885 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10886
10887 Revert the previous 3 commits:
10888 Move gdb_regex* to common/
10889 Move linux_find_memory_regions_full & co.
10890 gdbserver build-id attribute generator
10891
10892 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10893 Jan Kratochvil <jan.kratochvil@redhat.com>
10894
10895 gdbserver build-id attribute generator.
10896 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
10897 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
10898 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
10899 (find_phdr): New.
10900 (get_dynamic): Use find_pdhr to traverse program headers.
10901 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
10902 (compare_mapping_entry_range, struct find_memory_region_callback_data)
10903 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
10904 (get_hex_build_id): New.
10905 (linux_qxfer_libraries_svr4): Add optional build-id attribute
10906 to reply XML document.
10907
10908 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10909 Jan Kratochvil <jan.kratochvil@redhat.com>
10910
10911 * target.c: Include target/target-utils.h and fcntl.h.
10912 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
10913 (target_fileio_read_stralloc): New functions.
10914
10915 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10916
10917 * Makefile.in (OBS): Add gdb_regex.o.
10918 (gdb_regex.o): New.
10919 * config.in: Rebuilt.
10920 * configure: Rebuilt.
10921
10922 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10923 Jan Kratochvil <jan.kratochvil@redhat.com>
10924
10925 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
10926 * Makefile.in (OBS): Add target-utils.o.
10927 (linux-maps.o, target-utils.o): New.
10928 * configure.srv (srv_linux_obj): Add linux-maps.o.
10929
10930 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
10931
10932 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
10933 function, return 1.
10934 (the_low_target): Install it.
10935
10936 2015-07-14 Pedro Alves <palves@redhat.com>
10937
10938 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
10939 Instead, ignore ECHILD, and throw an error for other errnos.
10940
10941 2015-07-10 Pedro Alves <palves@redhat.com>
10942
10943 * event-loop.c (struct callback_event) <data>: Change type to
10944 gdb_client_data instance instead of gdb_client_data pointer.
10945 (append_callback_event): Adjust.
10946
10947 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
10948
10949 * linux-aarch64-low.c: Add comments for each linux_target_ops
10950 method. Remove comments already covered in target_ops and
10951 linux_target_ops definitions.
10952 (the_low_target): Add comments for each unimplemented method.
10953
10954 2015-07-09 Yao Qi <yao.qi@linaro.org>
10955
10956 * linux-aarch64-low.c (aarch64_regmap): Remove.
10957 (aarch64_usrregs_info): Remove.
10958 (regs_info): Set field usrregs to NULL.
10959
10960 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
10961
10962 * linux-low.c: Include "rsp-low.h"
10963 (linux_low_encode_pt_config, linux_low_encode_raw): New.
10964 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
10965 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
10966 (handle_btrace_enable_pt): New.
10967 (handle_btrace_general_set): Support "pt".
10968 (handle_btrace_conf_general_set): Support "pt:size".
10969
10970 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
10971
10972 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
10973 Z_PACKET_SW_BP.
10974
10975 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
10976
10977 * linux-aarch64-low.c: Remove comment about endianness.
10978 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
10979 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
10980 memcmp.
10981
10982 2015-06-24 Gary Benson <gbenson@redhat.com>
10983
10984 * linux-i386-ipa.c (stdint.h): Do not include.
10985 * lynx-i386-low.c (stdint.h): Likewise.
10986 * lynx-ppc-low.c (stdint.h): Likewise.
10987 * mem-break.c (stdint.h): Likewise.
10988 * thread-db.c (stdint.h): Likewise.
10989 * tracepoint.c (stdint.h): Likewise.
10990 * win32-low.c (stdint.h): Likewise.
10991
10992 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
10993
10994 * server.c (write_qxfer_response): Update call to
10995 remote_escape_output.
10996
10997 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
10998 Jan Kratochvil <jan.kratochvil@redhat.com>
10999
11000 Merge multiple hex conversions.
11001 * gdbreplay.c (tohex): Rename to 'fromhex'.
11002 (logchar): Use fromhex.
11003
11004 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
11005
11006 * server.c (handle_qxfer_libraries): Set `version' attribute for
11007 <library-list>.
11008
11009 2015-06-10 Gary Benson <gbenson@redhat.com>
11010
11011 * target.h (struct target_ops) <multifs_open>: New field.
11012 <multifs_unlink>: Likewise.
11013 <multifs_readlink>: Likewise.
11014 * linux-low.c (nat/linux-namespaces.h): New include.
11015 (linux_target_ops): Initialize the_target->multifs_open,
11016 the_target->multifs_unlink and the_target->multifs_readlink.
11017 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
11018 * hostio.c (hostio_fs_pid): New static variable.
11019 (hostio_handle_new_gdb_connection): New function.
11020 (handle_setfs): Likewise.
11021 (handle_open): Use the_target->multifs_open as appropriate.
11022 (handle_unlink): Use the_target->multifs_unlink as appropriate.
11023 (handle_readlink): Use the_target->multifs_readlink as
11024 appropriate.
11025 (handle_vFile): Handle vFile:setfs packets.
11026 * server.c (handle_query): Call hostio_handle_new_gdb_connection
11027 after target_handle_new_gdb_connection.
11028
11029 2015-06-10 Gary Benson <gbenson@redhat.com>
11030
11031 * configure.ac (AC_CHECK_FUNCS): Add setns.
11032 * config.in: Regenerate.
11033 * configure: Likewise.
11034 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
11035 (linux-namespaces.o): New rule.
11036 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
11037
11038 2015-06-09 Gary Benson <gbenson@redhat.com>
11039
11040 * hostio.c (handle_open): Process mode argument with
11041 fileio_to_host_mode.
11042
11043 2015-06-01 Yao Qi <yao.qi@linaro.org>
11044
11045 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
11046 * linux-x86-low.c: Likewise.
11047
11048 2015-05-28 Don Breazeal <donb@codesourcery.com>
11049
11050 * linux-low.c (handle_extended_wait): Initialize
11051 thread_info.last_resume_kind for new fork children.
11052
11053 2015-05-15 Pedro Alves <palves@redhat.com>
11054
11055 * target.h (target_handle_new_gdb_connection): Rewrite using if
11056 wrapped in do/while.
11057
11058 2015-05-14 Joel Brobecker <brobecker@adacore.com>
11059
11060 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
11061 * configure, config.in: Regenerate.
11062 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
11063 Declare typedef.
11064
11065 2015-05-12 Don Breazeal <donb@codesourcery.com>
11066
11067 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
11068 PTRACE_EVENT_VFORK_DONE.
11069 (linux_low_ptrace_options, extended_event_reported): Add vfork
11070 events.
11071 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
11072 and "vforkdone" for RSP 'T' Stop Reply Packet.
11073 * server.h (report_vfork_events): Declare
11074 global variable.
11075
11076 2015-05-12 Don Breazeal <donb@codesourcery.com>
11077
11078 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
11079 (the_low_target) <new_fork>: Initialize new member.
11080 * linux-arm-low.c (arm_new_fork): New function.
11081 (the_low_target) <new_fork>: Initialize new member.
11082 * linux-low.c (handle_extended_wait): Call new target function
11083 new_fork.
11084 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
11085 * linux-mips-low.c (mips_add_watchpoint): New function
11086 extracted from mips_insert_point.
11087 (the_low_target) <new_fork>: Initialize new member.
11088 (mips_linux_new_fork): New function.
11089 (mips_insert_point): Call mips_add_watchpoint.
11090 * linux-x86-low.c (x86_linux_new_fork): New function.
11091 (the_low_target) <new_fork>: Initialize new member.
11092
11093 2015-05-12 Don Breazeal <donb@codesourcery.com>
11094
11095 * linux-low.c (handle_extended_wait): Implement return value,
11096 rename argument 'event_child' to 'event_lwp', handle
11097 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
11098 (linux_low_ptrace_options): New function.
11099 (linux_low_filter_event): Call linux_low_ptrace_options,
11100 use different argument fo linux_enable_event_reporting,
11101 use return value from handle_extended_wait.
11102 (extended_event_reported): New function.
11103 (linux_wait_1): Call extended_event_reported and set
11104 status to report fork events.
11105 (linux_write_memory): Add pid to debug message.
11106 (reset_lwp_ptrace_options_callback): New function.
11107 (linux_handle_new_gdb_connection): New function.
11108 (linux_target_ops): Initialize new structure member.
11109 * linux-low.h (struct lwp_info) <waitstatus>: New member.
11110 * lynx-low.c: Initialize new structure member.
11111 * remote-utils.c (prepare_resume_reply): Implement stop reason
11112 "fork" for "T" stop message.
11113 * server.c (handle_query): Call handle_new_gdb_connection.
11114 * server.h (report_fork_events): Declare global flag.
11115 * target.h (struct target_ops) <handle_new_gdb_connection>:
11116 New member.
11117 (target_handle_new_gdb_connection): New macro.
11118 * win32-low.c: Initialize new structure member.
11119
11120 2015-05-12 Don Breazeal <donb@codesourcery.com>
11121
11122 * mem-break.c (APPEND_TO_LIST): Define macro.
11123 (clone_agent_expr): New function.
11124 (clone_one_breakpoint): New function.
11125 (clone_all_breakpoints): New function.
11126 * mem-break.h: Declare new functions.
11127
11128 2015-05-12 Don Breazeal <donb@codesourcery.com>
11129
11130 * linux-low.c (linux_supports_fork_events): New function.
11131 (linux_supports_vfork_events): New function.
11132 (linux_target_ops): Initialize new structure members.
11133 (initialize_low): Call linux_check_ptrace_features.
11134 * lynx-low.c (lynx_target_ops): Initialize new structure
11135 members.
11136 * server.c (report_fork_events, report_vfork_events):
11137 New global flags.
11138 (handle_query): Add new features to qSupported packet and
11139 response.
11140 (captured_main): Initialize new global variables.
11141 * target.h (struct target_ops) <supports_fork_events>:
11142 New member.
11143 <supports_vfork_events>: New member.
11144 (target_supports_fork_events): New macro.
11145 (target_supports_vfork_events): New macro.
11146 * win32-low.c (win32_target_ops): Initialize new structure
11147 members.
11148
11149 2015-05-12 Gary Benson <gbenson@redhat.com>
11150
11151 * server.c (handle_qxfer_exec_file): Use current process
11152 if annex is empty.
11153
11154 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
11155
11156 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
11157 Remove HAVE_PTRACE_GETREGS conditionals.
11158 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
11159 instead of PTRACE_GETREGS and PTRACE_SETREGS.
11160
11161 2015-05-08 Yao Qi <yao.qi@linaro.org>
11162
11163 * linux-low.c (linux_supports_conditional_breakpoints): New
11164 function.
11165 (linux_target_ops): Install new target method.
11166 * lynx-low.c (lynx_target_ops): Install NULL hook for
11167 supports_conditional_breakpoints.
11168 * nto-low.c (nto_target_ops): Likewise.
11169 * spu-low.c (spu_target_ops): Likewise.
11170 * win32-low.c (win32_target_ops): Likewise.
11171 * server.c (handle_query): Check
11172 target_supports_conditional_breakpoints.
11173 * target.h (struct target_ops) <supports_conditional_breakpoints>:
11174 New field.
11175 (target_supports_conditional_breakpoints): New macro.
11176
11177 2015-05-06 Pedro Alves <palves@redhat.com>
11178
11179 PR server/18081
11180 * server.c (start_inferior): If the process exits, mourn it.
11181
11182 2015-04-21 Gary Benson <gbenson@redhat.com>
11183
11184 * hostio.c (fileio_open_flags_to_host): Factored out to
11185 fileio_to_host_openflags in common/fileio.c. Single use
11186 updated.
11187
11188 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
11189
11190 * linux-xtensa-low.c (xtensa_fill_gregset)
11191 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
11192 XCHAL_HAVE_LOOP.
11193
11194 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
11195
11196 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
11197 (regs_info): Replace usrregs pointer with NULL.
11198
11199 2015-04-17 Gary Benson <gbenson@redhat.com>
11200
11201 * target.h (struct target_ops) <pid_to_exec_file>: New field.
11202 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
11203 * server.c (handle_qxfer_exec_file): New function.
11204 (qxfer_packets): Add exec-file entry.
11205 (handle_query): Report qXfer:exec-file:read as supported packet.
11206
11207 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
11208
11209 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
11210
11211 2015-04-09 Gary Benson <gbenson@redhat.com>
11212
11213 * hostio-errno.c (errno_to_fileio_error): Remove function.
11214 Update caller to use remote_fileio_to_fio_error.
11215
11216 2015-04-09 Yao Qi <yao.qi@linaro.org>
11217
11218 * linux-low.c (linux_insert_point): Call
11219 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
11220 (linux_remove_point): Call remove_memory_breakpoint if type is
11221 raw_bkpt_type_sw.
11222 * linux-x86-low.c (x86_insert_point): Don't call
11223 insert_memory_breakpoint.
11224 (x86_remove_point): Don't call remove_memory_breakpoint.
11225
11226 2015-04-01 Pedro Alves <palves@redhat.com>
11227 Cleber Rosa <crosa@redhat.com>
11228
11229 * server.c (gdbserver_usage): Reorganize and extend the usage
11230 message.
11231
11232 2015-03-24 Pedro Alves <palves@redhat.com>
11233
11234 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
11235 output. Also dump TRAP_TRACE.
11236 (linux_low_filter_event): In debug output, distinguish a
11237 resume_stop SIGSTOP from a delayed SIGSTOP.
11238
11239 2015-03-24 Gary Benson <gbenson@redhat.com>
11240
11241 * linux-x86-low.c (x86_linux_new_thread): Moved to
11242 nat/x86-linux.c.
11243 (x86_linux_prepare_to_resume): Likewise.
11244
11245 2015-03-24 Gary Benson <gbenson@redhat.com>
11246
11247 * Makefile.in (x86-linux-dregs.o): New rule.
11248 * configure.srv: Add x86-linux-dregs.o to relevant targets.
11249 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
11250 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
11251 (x86_linux_dr_get): Likewise.
11252 (x86_linux_dr_set): Likewise.
11253 (update_debug_registers_callback): Likewise.
11254 (x86_linux_dr_set_addr): Likewise.
11255 (x86_linux_dr_get_addr): Likewise.
11256 (x86_linux_dr_set_control): Likewise.
11257 (x86_linux_dr_get_control): Likewise.
11258 (x86_linux_dr_get_status): Likewise.
11259 (x86_linux_update_debug_registers): Likewise.
11260
11261 2015-03-24 Gary Benson <gbenson@redhat.com>
11262
11263 * linux-x86-low.c (x86_linux_update_debug_registers):
11264 New function, factored out from...
11265 (x86_linux_prepare_to_resume): ...this.
11266
11267 2015-03-24 Gary Benson <gbenson@redhat.com>
11268
11269 * linux-x86-low.c (x86_linux_dr_get): Update comments.
11270 (x86_linux_dr_set): Likewise.
11271 (update_debug_registers_callback): Likewise.
11272 (x86_linux_dr_set_addr): Likewise.
11273 (x86_linux_dr_get_addr): Likewise.
11274 (x86_linux_dr_set_control): Likewise.
11275 (x86_linux_dr_get_control): Likewise.
11276 (x86_linux_dr_get_status): Likewise.
11277 (x86_linux_prepare_to_resume): Likewise.
11278
11279 2015-03-24 Gary Benson <gbenson@redhat.com>
11280
11281 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
11282 Use perror_with_name. Pass string through gettext.
11283 (x86_linux_dr_set): Likewise.
11284
11285 2015-03-24 Gary Benson <gbenson@redhat.com>
11286
11287 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
11288 (x86_linux_dr_set_addr): ...this.
11289 (x86_dr_low_get_addr): Rename to...
11290 (x86_linux_dr_get_addr): ...this.
11291 (x86_dr_low_set_control): Rename to...
11292 (x86_linux_dr_set_control): ...this.
11293 (x86_dr_low_get_control): Rename to...
11294 (x86_linux_dr_get_control): ...this.
11295 (x86_dr_low_get_status): Rename to...
11296 (x86_linux_dr_get_status): ...this.
11297 (x86_dr_low): Update with new function names.
11298
11299 2015-03-24 Gary Benson <gbenson@redhat.com>
11300
11301 * Makefile.in (x86-linux.o): New rule.
11302 * configure.srv: Add x86-linux.o to relevant targets.
11303 * linux-low.c (lwp_set_arch_private_info): New function.
11304 (lwp_arch_private_info): Likewise.
11305 * linux-x86-low.c: Include nat/x86-linux.h.
11306 (arch_lwp_info): Removed structure.
11307 (update_debug_registers_callback):
11308 Use lwp_set_debug_registers_changed.
11309 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
11310 and lwp_set_debug_registers_changed.
11311 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
11312
11313 2015-03-24 Gary Benson <gbenson@redhat.com>
11314
11315 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
11316 * linux-arm-low.c (arm_new_thread): Likewise.
11317 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
11318 * linux-mips-low.c (mips_linux_new_thread): Likewise.
11319 * linux-x86-low.c (x86_linux_new_thread): Likewise.
11320 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
11321
11322 2015-03-24 Gary Benson <gbenson@redhat.com>
11323
11324 * linux-low.c (ptid_of_lwp): New function.
11325 (lwp_is_stopped): Likewise.
11326 (lwp_stop_reason): Likewise.
11327 * linux-x86-low.c (update_debug_registers_callback):
11328 Use lwp_is_stopped.
11329 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
11330 lwp_stop_reason.
11331
11332 2015-03-24 Gary Benson <gbenson@redhat.com>
11333
11334 * linux-low.h (linux_stop_lwp): Remove declaration.
11335
11336 2015-03-24 Gary Benson <gbenson@redhat.com>
11337
11338 * linux-low.h: Include nat/linux-nat.h.
11339 * linux-low.c (iterate_over_lwps_args): New structure.
11340 (iterate_over_lwps_filter): New function.
11341 (iterate_over_lwps): Likewise.
11342 * linux-x86-low.c (update_debug_registers_callback):
11343 Update signature to what iterate_over_lwps expects.
11344 Remove PID check that iterate_over_lwps now performs.
11345 (x86_dr_low_set_addr): Use iterate_over_lwps.
11346 (x86_dr_low_set_control): Likewise.
11347
11348 2015-03-24 Gary Benson <gbenson@redhat.com>
11349
11350 * linux-x86-low.c (x86_debug_reg_state): New function.
11351 (x86_linux_prepare_to_resume): Use the above.
11352
11353 2015-03-24 Gary Benson <gbenson@redhat.com>
11354
11355 * linux-low.c (current_lwp_ptid): New function.
11356 * linux-x86-low.c: Include nat/linux-nat.h.
11357 (x86_dr_low_get_addr): Use current_lwp_ptid.
11358 (x86_dr_low_get_control): Likewise.
11359 (x86_dr_low_get_status): Likewise.
11360
11361 2015-03-20 Pedro Alves <palves@redhat.com>
11362
11363 * tracepoint.c (cmd_qtstatus): Make "str" const.
11364
11365 2015-03-20 Pedro Alves <palves@redhat.com>
11366
11367 * server.c (handle_general_set): Make "req_str" const.
11368
11369 2015-03-19 Pedro Alves <palves@redhat.com>
11370
11371 * linux-low.c (linux_resume_one_lwp): Rename to ...
11372 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
11373 instead call perror_with_name.
11374 (check_ptrace_stopped_lwp_gone): New function.
11375 (linux_resume_one_lwp): Reimplement as wrapper around
11376 linux_resume_one_lwp_throw that swallows errors if the LWP is
11377 gone.
11378
11379 2015-03-19 Pedro Alves <palves@redhat.com>
11380
11381 * linux-low.c (count_events_callback, select_event_lwp_callback):
11382 No longer check whether the thread has resume_stop as last resume
11383 kind.
11384
11385 2015-03-19 Pedro Alves <palves@redhat.com>
11386
11387 * linux-low.c (count_events_callback, select_event_lwp_callback):
11388 Use the lwp's status_pending_p field, not the thread's.
11389
11390 2015-03-19 Pedro Alves <palves@redhat.com>
11391
11392 * linux-low.c (select_event_lwp_callback): Update comments to
11393 no longer mention SIGTRAP.
11394
11395 2015-03-18 Gary Benson <gbenson@redhat.com>
11396
11397 * server.c (handle_query): Do not report vFile:fstat as supported.
11398
11399 2015-03-11 Gary Benson <gbenson@redhat.com>
11400
11401 * hostio.c (sys/types.h): New include.
11402 (sys/stat.h): Likewise.
11403 (common-remote-fileio.h): Likewise.
11404 (handle_fstat): New function.
11405 (handle_vFile): Handle vFile:fstat packets.
11406
11407 2015-03-11 Gary Benson <gbenson@redhat.com>
11408
11409 * configure.ac (AC_CHECK_MEMBERS): Add checks for
11410 struct stat.st_blocks and struct stat.st_blksize.
11411 * configure: Regenerate.
11412 * config.in: Likewise.
11413 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
11414 (OBS): Add common-remote-fileio.o.
11415 (common-remote-fileio.o): New rule.
11416
11417 2015-03-09 Pedro Alves <palves@redhat.com>
11418
11419 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
11420 'struct sockaddr' pointer in 'accept' call.
11421
11422 2015-03-09 Pedro Alves <palves@redhat.com>
11423
11424 Revert:
11425 2015-03-07 Pedro Alves <palves@redhat.com>
11426 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11427 or <winsock2.h> here. Instead include "gdb_socket.h".
11428 (remote_open): Use union gdb_sockaddr_u.
11429 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11430 or <winsock2.h> here. Instead include "gdb_socket.h".
11431 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11432 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11433 or <sys/un.h>.
11434 (init_named_socket, gdb_agent_helper_thread): Use union
11435 gdb_sockaddr_u.
11436
11437 2015-03-07 Pedro Alves <palves@redhat.com>
11438
11439 * configure.ac (build_warnings): Move
11440 -Wdeclaration-after-statement to the C-specific set.
11441 * configure: Regenerate.
11442
11443 2015-03-07 Pedro Alves <palves@redhat.com>
11444
11445 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11446 or <winsock2.h> here. Instead include "gdb_socket.h".
11447 (remote_open): Use union gdb_sockaddr_u.
11448 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11449 or <winsock2.h> here. Instead include "gdb_socket.h".
11450 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11451 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11452 or <sys/un.h>.
11453 (init_named_socket, gdb_agent_helper_thread): Use union
11454 gdb_sockaddr_u.
11455
11456 2015-03-07 Pedro Alves <palves@redhat.com>
11457
11458 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
11459 instead.
11460
11461 2015-03-06 Yao Qi <yao.qi@linaro.org>
11462
11463 * linux-aarch64-low.c (aarch64_insert_point): Use
11464 show_debug_regs as a boolean.
11465 (aarch64_remove_point): Likewise.
11466
11467 2015-03-05 Pedro Alves <palves@redhat.com>
11468
11469 * lynx-low.c (lynx_target_ops): Install NULL hooks for
11470 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
11471 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
11472 * nto-low.c (nto_target_ops): Likewise.
11473 * spu-low.c (spu_target_ops): Likewise.
11474 * win32-low.c (win32_target_ops): Likewise.
11475
11476 2015-03-04 Pedro Alves <palves@redhat.com>
11477
11478 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
11479 Decide whether a breakpoint triggered based on the SIGTRAP's
11480 siginfo.si_code.
11481 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
11482 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
11483 (linux_low_filter_event): Check for breakpoints before checking
11484 watchpoints.
11485 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
11486 siginfo.si_code.
11487 (linux_stopped_by_sw_breakpoint)
11488 (linux_supports_stopped_by_sw_breakpoint)
11489 (linux_stopped_by_hw_breakpoint)
11490 (linux_supports_stopped_by_hw_breakpoint): New functions.
11491 (linux_target_ops): Install new target methods.
11492
11493 2015-03-04 Pedro Alves <palves@redhat.com>
11494
11495 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
11496 * server.c (swbreak_feature, hwbreak_feature): New globals.
11497 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
11498 (captured_main): Clear swbreak_feature and hwbreak_feature.
11499 * server.h (swbreak_feature, hwbreak_feature): Declare.
11500 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
11501 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
11502 supports_stopped_by_hw_breakpoint>: New fields.
11503 (target_supports_stopped_by_sw_breakpoint)
11504 (target_stopped_by_sw_breakpoint)
11505 (target_supports_stopped_by_hw_breakpoint)
11506 (target_stopped_by_hw_breakpoint): Declare.
11507
11508 2015-03-04 Pedro Alves <palves@redhat.com>
11509
11510 enum lwp_stop_reason -> enum target_stop_reason
11511 * linux-low.c (check_stopped_by_breakpoint): Adjust.
11512 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
11513 (linux_wait_1, stuck_in_jump_pad_callback)
11514 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
11515 (linux_stopped_by_watchpoint):
11516 * linux-low.h (enum lwp_stop_reason): Delete.
11517 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
11518 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11519
11520 2015-03-04 Yao Qi <yao.qi@linaro.org>
11521
11522 * Makefile.in (SFILES): Add linux-aarch64-low.c.
11523
11524 2015-03-03 Gary Benson <gbenson@redhat.com>
11525
11526 * hostio.c (handle_vFile): Fix prefix lengths.
11527
11528 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
11529
11530 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
11531 ptr_bits.
11532
11533 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
11534
11535 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
11536 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
11537 (clean): Add "rm -f" for above C files.
11538 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
11539 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
11540 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
11541 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
11542 * linux-s390-low.c (HWCAP_S390_VX): New macro.
11543 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
11544 (init_registers_s390x_vx_linux64)
11545 (init_registers_s390x_tevx_linux64)
11546 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
11547 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
11548 declarations.
11549 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
11550 (s390_store_vxrs_high): New functions.
11551 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
11552 NT_S390_VXRS_HIGH.
11553 (s390_arch_setup): Add logic for selecting one of the new target
11554 descriptions. Activate the new vector regsets if applicable.
11555 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
11556 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
11557 and init_registers_s390x_tevx_linux64.
11558
11559 2015-03-01 Pedro Alves <palves@redhat.com>
11560
11561 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
11562 parameter.
11563
11564 2015-02-27 Pedro Alves <palves@redhat.com>
11565
11566 * linux-x86-low.c (u_debugreg_offset): New function.
11567 (x86_linux_dr_get, x86_linux_dr_set): Use it.
11568
11569 2015-02-27 Pedro Alves <palves@redhat.com>
11570
11571 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
11572 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
11573 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
11574 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
11575 (ps_lsetfpregs, ps_getpid)
11576 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
11577 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
11578 (ps_lsetxregs, ps_plog): Declare.
11579
11580 2015-02-27 Pedro Alves <palves@redhat.com>
11581
11582 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
11583 IP_AGENT_EXPORT_FUNC.
11584 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
11585 IP_AGENT_EXPORT_FUNC.
11586 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
11587 (IP_AGENT_EXPORT): Delete.
11588 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11589 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11590 (gdb_trampoline_buffer_error, collecting, gdb_collect)
11591 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
11592 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
11593 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
11594 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
11595 (traceframe_read_count, traceframe_write_count)
11596 (traceframes_created, trace_state_variables, get_raw_reg)
11597 (get_trace_state_variable_value, set_trace_state_variable_value)
11598 (ust_loaded, helper_thread_id, cmd_buf): Use
11599 IPA_SYM_EXPORTED_NAME.
11600 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
11601 (tracepoints) Use IP_AGENT_EXPORT_VAR.
11602 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
11603 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11604 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
11605 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
11606 EXTERN_C_PUSH/EXTERN_C_POP.
11607 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
11608 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
11609 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11610 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
11611 (traceframe_write_count, traceframe_read_count)
11612 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
11613 (about_to_request_buffer_space, get_trace_state_variable_value)
11614 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
11615 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
11616 EXTERN_C_PUSH/EXTERN_C_POP.
11617 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
11618 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
11619 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
11620 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11621 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11622 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11623 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
11624 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
11625 Define.
11626 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
11627 (IP_AGENT_EXPORT_VAR_DECL): Define.
11628 (tracing): Declare.
11629 (gdb_agent_get_raw_reg): Declare.
11630
11631 2015-02-27 Tom Tromey <tromey@redhat.com>
11632 Pedro Alves <palves@redhat.com>
11633
11634 Rename symbols whose names are reserved C++ keywords throughout.
11635
11636 2015-02-27 Pedro Alves <palves@redhat.com>
11637
11638 * Makefile.in (COMPILER): New, get it from autoconf.
11639 (CXX): Get from autoconf instead.
11640 (COMPILE.pre): Use COMPILER.
11641 (CC-LD): Rename to ...
11642 (CC_LD): ... this. Use COMPILER.
11643 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
11644 (CXX_FOR_TARGET): Default to g++ instead of gcc.
11645 * acinclude.m4: Include build-with-cxx.m4.
11646 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
11647 Disable -Werror by default if building in C++ mode.
11648 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
11649 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
11650 the C++ compiler. Save/restore CXXFLAGS too.
11651 * configure: Regenerate.
11652
11653 2015-02-27 Pedro Alves <palves@redhat.com>
11654
11655 * acinclude.m4: Include libiberty.m4.
11656 * configure.ac: Call libiberty_INIT.
11657 * config.in, configure: Regenerate.
11658
11659 2015-02-26 Pedro Alves <palves@redhat.com>
11660
11661 * linux-low.c (linux_wait_1): When incrementing the PC past a
11662 program breakpoint always use the_low_target.breakpoint_len as
11663 increment, rather than the maximum between that and
11664 the_low_target.decr_pc_after_break.
11665
11666 2015-02-23 Pedro Alves <palves@redhat.com>
11667
11668 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
11669 thread was doing a step-over; always adjust the PC if
11670 we stepped over a permanent breakpoint.
11671 (linux_wait_1): If we stepped over breakpoint that was on top of a
11672 permanent breakpoint, manually advance the PC past it.
11673
11674 2015-02-23 Pedro Alves <palves@redhat.com>
11675
11676 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
11677 modes.
11678 (x86_fill_gregset, x86_store_gregset): Use it when handling
11679 $orig_eax.
11680
11681 2015-02-20 Pedro Alves <palves@redhat.com>
11682
11683 * thread-db.c: Include "nat/linux-procfs.h".
11684 (thread_db_init): Skip listing new threads if the kernel supports
11685 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
11686
11687 2015-02-20 Pedro Alves <palves@redhat.com>
11688
11689 * linux-low.c (status_pending_p_callback): Use ptid_match.
11690
11691 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
11692
11693 PR breakpoints/16812
11694 * linux-low.c (wstatus_maybe_breakpoint): Remove.
11695 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
11696 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
11697
11698 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
11699
11700 PR breakpoints/15956
11701 * tracepoint.c (cmd_qtinit): Add check for current_thread.
11702
11703 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11704
11705 * linux-low.c (linux_low_btrace_conf): Print size.
11706 * server.c (handle_btrace_conf_general_set): New.
11707 (hanle_general_set): Call handle_btrace_conf_general_set.
11708 (handle_query): Report Qbtrace-conf:bts:size as supported.
11709
11710 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11711
11712 * linux-low.c (linux_low_enable_btrace): Update parameters.
11713 (linux_low_btrace_conf): New.
11714 (linux_target_ops)<to_btrace_conf>: Initialize.
11715 * server.c (current_btrace_conf): New.
11716 (handle_btrace_enable): Rename to ...
11717 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
11718 to target_enable_btrace. Update comment. Update users.
11719 (handle_qxfer_btrace_conf): New.
11720 (qxfer_packets): Add btrace-conf entry.
11721 (handle_query): Report qXfer:btrace-conf:read as supported packet.
11722 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
11723 (target_ops)<read_btrace_conf>: New.
11724 (target_enable_btrace): Update parameters.
11725 (target_read_btrace_conf): New.
11726
11727 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11728
11729 * server.c (handle_btrace_general_set): Remove call to
11730 target_supports_btrace.
11731 (supported_btrace_packets): New.
11732 (handle_query): Call supported_btrace_packets.
11733 * target.h: include btrace-common.h.
11734 (btrace_target_info): Removed.
11735 (supports_btrace, target_supports_btrace): Update parameters.
11736
11737 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11738
11739 * Makefile.in (SFILES): Add common/btrace-common.c.
11740 (OBS): Add common/btrace-common.o.
11741 (btrace-common.o): Add build rules.
11742 * linux-low: Include btrace-common.h.
11743 (linux_low_read_btrace): Use struct btrace_data. Call
11744 btrace_data_init and btrace_data_fini.
11745
11746 2015-02-06 Pedro Alves <palves@redhat.com>
11747
11748 * thread-db.c (find_new_threads_callback): Add debug output.
11749
11750 2015-02-04 Pedro Alves <palves@redhat.com>
11751
11752 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
11753 (resume_stopped_resumed_lwps): New function.
11754 (linux_wait_for_event_filtered): Use it.
11755
11756 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11757
11758 * Makefile.in (SFILES): Add linux-personality.c.
11759 (linux-personality.o): New rule.
11760 * configure.srv (srv_linux_obj): Add linux-personality.o to the
11761 list of objects to be built.
11762 * linux-low.c: Include nat/linux-personality.h.
11763 (linux_create_inferior): Remove code to disable address space
11764 randomization (moved to ../nat/linux-personality.c). Create
11765 cleanup to disable address space randomization.
11766
11767 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11768
11769 * Makefile.in (posix-strerror.o): New rule.
11770 (mingw-strerror.o): Likewise.
11771 * configure: Regenerated.
11772 * configure.ac: Source file ../common/common.host. Initialize new
11773 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
11774
11775 2015-01-14 Yao Qi <yao@codesourcery.com>
11776
11777 * Makefile.in (SFILES): Add nat/ppc-linux.c.
11778 (ppc-linux.o): New rule.
11779 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
11780 * configure.ac: AC_CHECK_FUNCS(getauxval).
11781 * config.in: Re-generated.
11782 * configure: Re-generated.
11783 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
11784 ppc64_64bit_inferior_p
11785
11786 2015-01-14 Yao Qi <yao@codesourcery.com>
11787
11788 * linux-ppc-low.c: Include "nat/ppc-linux.h".
11789 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
11790 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
11791 (PT_ORIG_R3, PT_TRAP): Likewise.
11792 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
11793 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
11794 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
11795
11796 2015-01-10 Joel Brobecker <brobecker@adacore.com>
11797
11798 * i387-fp.c (i387_cache_to_xsave): In look over
11799 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
11800 zmmh_low_space field by use of zmmh_high_space.
11801
11802 2015-01-09 Pedro Alves <palves@redhat.com>
11803
11804 * linux-low.c (step_over_bkpt): Move higher up in the file.
11805 (handle_extended_wait): Don't store the stop_pc here.
11806 (get_stop_pc): Adjust comments and rename to ...
11807 (check_stopped_by_breakpoint): ... this. Record whether the LWP
11808 stopped for a software breakpoint or hardware breakpoint.
11809 (thread_still_has_status_pending_p): New function.
11810 (status_pending_p_callback): Use
11811 thread_still_has_status_pending_p. If the event is no longer
11812 interesting, resume the LWP.
11813 (handle_tracepoints): Add assert.
11814 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
11815 (wstatus_maybe_breakpoint): New function.
11816 (cancel_breakpoint): Delete function.
11817 (check_stopped_by_watchpoint): New function, factored out from
11818 linux_low_filter_event.
11819 (lp_status_maybe_breakpoint): Delete function.
11820 (linux_low_filter_event): Remove filter_ptid argument.
11821 Leave thread group exits pending here. Store the LWP's stop PC.
11822 Always leave events pending.
11823 (linux_wait_for_event_filtered): Pull all events out of the
11824 kernel, and leave them all pending.
11825 (count_events_callback, select_event_lwp_callback): Consider all
11826 events.
11827 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
11828 (select_event_lwp): Only give preference to the stepping LWP in
11829 all-stop mode. Adjust comments.
11830 (ignore_event): New function.
11831 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
11832 references to cancel_breakpoints. Adjust to renames. Also give
11833 equal priority to all LWPs that have had events in non-stop mode.
11834 If reporting a software breakpoint event, unadjust the LWP's PC.
11835 (linux_wait): If linux_wait_1 returned an ignored event, retry.
11836 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
11837 Adjust.
11838 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
11839 (resume_status_pending_p): Use thread_still_has_status_pending_p.
11840 (linux_stopped_by_watchpoint): Adjust.
11841 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
11842 * linux-low.h (enum lwp_stop_reason): New.
11843 (struct lwp_info) <stop_pc>: Adjust comment.
11844 <stopped_by_watchpoint>: Delete field.
11845 <stop_reason>: New field.
11846 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11847 * mem-break.c (software_breakpoint_inserted_here)
11848 (hardware_breakpoint_inserted_here): New function.
11849 * mem-break.h (software_breakpoint_inserted_here)
11850 (hardware_breakpoint_inserted_here): Declare.
11851 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
11852 (cancel_breakpoints): Delete.
11853 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
11854 (upload_fast_traceframes): Remove references to
11855 cancel_breakpoints.
11856
11857 2015-01-09 Pedro Alves <palves@redhat.com>
11858
11859 * thread-db.c (find_new_threads_callback): Ignore thread if the
11860 kernel thread ID is -1.
11861
11862 2015-01-09 Pedro Alves <palves@redhat.com>
11863
11864 * linux-low.c (linux_attach_fail_reason_string): Move to
11865 nat/linux-ptrace.c, and rename.
11866 (linux_attach_lwp): Update comment.
11867 (attach_proc_task_lwp_callback): New function.
11868 (linux_attach): Adjust to rename and use
11869 linux_proc_attach_tgid_threads.
11870 (linux_attach_fail_reason_string): Delete declaration.
11871
11872 2015-01-01 Joel Brobecker <brobecker@adacore.com>
11873
11874 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
11875 * server.c (gdbserver_version): Likewise.
11876
11877 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
11878
11879 * remote-utils.c: Include ctype.h.
11880 (input_interrupt): Explicitly handle the case when the char
11881 received is the NUL byte. Improve the printing of non-ASCII
11882 characters.
11883
11884 2014-12-16 Joel Brobecker <brobecker@adacore.com>
11885
11886 * linux-low.c (linux_low_filter_event): Update call to
11887 linux_enable_event_reporting following the addition of
11888 a new parameter to that function.
11889
11890 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
11891
11892 PR server/17457
11893 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
11894 (AARCH64_FPCR_REGNO): Likewise.
11895 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
11896 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
11897 (aarch64_store_fpregset): Likewise.
11898
11899 2014-12-15 Joel Brobecker <brobecker@adacore.com>
11900
11901 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
11902 Remove FIXME comment about assumption about N.
11903
11904 2014-12-13 Joel Brobecker <brobecker@adacore.com>
11905
11906 * configure.ac: If large-file support is disabled in GDBserver,
11907 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
11908 * configure: Regenerate.
11909
11910 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11911
11912 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
11913 warning upon ENODATA from ptrace.
11914 * linux-s390-low.c (s390_store_tdb): New.
11915 (s390_regsets): Add regset for NT_S390_TDB.
11916
11917 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11918
11919 * linux-low.c (regsets_store_inferior_registers): Skip regsets
11920 without a fill_function.
11921 * linux-s390-low.c (s390_fill_last_break): Remove.
11922 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
11923 (s390_arch_setup): Use regset's size instead of fill_function for
11924 loop end condition.
11925
11926 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11927
11928 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
11929 the regset's store function when ptrace returned an error.
11930 * regcache.c (get_thread_regcache): Invalidate register cache
11931 before fetching inferior's registers.
11932
11933 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11934
11935 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
11936 while-loop as for-loop.
11937 (regsets_store_inferior_registers): Likewise.
11938
11939 2014-11-28 Yao Qi <yao@codesourcery.com>
11940
11941 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
11942 * config.in, configure: Re-generate.
11943 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
11944 is defined.
11945
11946 2014-11-21 Yao Qi <yao@codesourcery.com>
11947
11948 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
11949 (AC_CHECK_HEADERS): Remove malloc.h.
11950 * configure: Re-generated.
11951 * config.in: Re-generated.
11952 * server.h: Don't include alloca.h and malloc.h.
11953 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
11954 Don't include malloc.h.
11955
11956 2014-11-17 Joel Brobecker <brobecker@adacore.com>
11957
11958 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
11959 corresponding ERRNO check in same block.
11960
11961 2014-11-12 Pedro Alves <palves@redhat.com>
11962
11963 * server.c (cont_thread): Update comment.
11964 (start_inferior, attach_inferior): No longer clear cont_thread.
11965 (handle_v_cont): No longer set cont_thread.
11966 (captured_main): Clear cont_thread each time a GDB connects.
11967
11968 2014-11-12 Pedro Alves <palves@redhat.com>
11969
11970 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
11971 thread, and don't resume all threads if the Hc thread has exited.
11972
11973 2014-11-12 Pedro Alves <palves@redhat.com>
11974
11975 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
11976 the process group instead of to a specific LWP.
11977
11978 2014-10-15 Pedro Alves <palves@redhat.com>
11979
11980 PR server/17487
11981 * win32-arm-low.c (arm_set_thread_context): Remove current_event
11982 parameter.
11983 (arm_set_thread_context): Delete.
11984 (the_low_target): Adjust.
11985 * win32-i386-low.c (debug_registers_changed)
11986 (debug_registers_used): Delete.
11987 (update_debug_registers_callback): New function.
11988 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
11989 needing to update their debug registers.
11990 (win32_get_current_dr): New function.
11991 (x86_dr_low_get_addr, x86_dr_low_get_control)
11992 (x86_dr_low_get_status): Fetch the debug register from the thread
11993 record's context.
11994 (i386_initial_stuff): Adjust.
11995 (i386_get_thread_context): Remove current_event parameter. Don't
11996 clear debug_registers_changed nor copy DR values to
11997 debug_reg_state.
11998 (i386_set_thread_context): Delete.
11999 (i386_prepare_to_resume): New function.
12000 (i386_thread_added): Mark the thread as needing to update irs
12001 debug registers.
12002 (the_low_target): Remove i386_set_thread_context and install
12003 i386_prepare_to_resume.
12004 * win32-low.c (win32_get_thread_context): Adjust.
12005 (win32_set_thread_context): Use SetThreadContext
12006 directly.
12007 (win32_prepare_to_resume): New function.
12008 (win32_require_context): New function, factored out from ...
12009 (thread_rec): ... this.
12010 (continue_one_thread): Call win32_prepare_to_resume on each thread
12011 we're about to continue.
12012 (win32_resume): Call win32_prepare_to_resume on the event thread.
12013 * win32-low.h (struct win32_thread_info)
12014 <debug_registers_changed>: New field.
12015 (struct win32_target_ops): Change prototype of set_thread_context,
12016 delete set_thread_context and add prepare_to_resume.
12017 (win32_require_context): New declaration.
12018
12019 2014-10-08 Gary Benson <gbenson@redhat.com>
12020
12021 * server.h: Do not include common-exceptions.h.
12022
12023 2014-10-08 Gary Benson <gbenson@redhat.com>
12024
12025 * server.h: Do not include cleanups.h.
12026
12027 2014-09-30 James Hogan <james.hogan@imgtec.com>
12028
12029 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
12030 mips64-dsp-linux.c.
12031
12032 2014-09-23 Yao Qi <yao@codesourcery.com>
12033
12034 * linux-low.c (lp_status_maybe_breakpoint): New function.
12035 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
12036 (count_events_callback): Likewise.
12037 (select_event_lwp_callback): Likewise.
12038 (cancel_breakpoints_callback): Likewise.
12039
12040 2014-09-19 Don Breazeal <donb@codesourcery.com>
12041
12042 * linux-low.c (handle_extended_wait): Call
12043 linux_ptrace_get_extended_event.
12044 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
12045 linux_is_extended_waitstatus.
12046
12047 2014-09-16 Joel Brobecker <brobecker@adacore.com>
12048
12049 * Makefile.in (CPPFLAGS): Define.
12050 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
12051 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
12052
12053 2014-09-16 Gary Benson <gbenson@redhat.com>
12054
12055 * inferiors.h (current_inferior): Renamed as...
12056 (current_thread): New variable. All uses updated.
12057 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
12058 (maybe_move_out_of_jump_pad): Likewise.
12059 (cancel_breakpoint): Likewise.
12060 (linux_low_filter_event): Likewise.
12061 (wait_for_sigstop): Likewise.
12062 (linux_resume_one_lwp): Likewise.
12063 (need_step_over_p): Likewise.
12064 (start_step_over): Likewise.
12065 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
12066 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
12067 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
12068 and save_inferior as saved_thread.
12069 * regcache.c (get_thread_regcache): Renamed saved_inferior as
12070 saved_thread.
12071 (regcache_invalidate_thread): Likewise.
12072 * remote-utils.c (prepare_resume_reply): Likewise.
12073 * thread-db.c (thread_db_get_tls_address): Likewise.
12074 (disable_thread_event_reporting): Likewise.
12075 (remove_thread_event_breakpoints): Likewise.
12076 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
12077 as saved_thread.
12078 * target.h (set_desired_inferior): Renamed as...
12079 (set_desired_thread): New declaration. All uses updated.
12080 * server.c (myresume): Updated comment to reference thread instead
12081 of inferior.
12082 (handle_serial_event): Likewise.
12083 (handle_target_event): Likewise.
12084
12085 2014-09-12 Tom Tromey <tromey@redhat.com>
12086 Gary Benson <gbenson@redhat.com>
12087
12088 * regcache.h: Include common-regcache.h.
12089 (regcache_read_pc): Don't declare.
12090 * regcache.c (get_thread_regcache_for_ptid): New function.
12091
12092 2014-09-11 Tom Tromey <tromey@redhat.com>
12093 Gary Benson <gbenson@redhat.com>
12094
12095 * symbol.c: New file.
12096 * Makefile.in (SFILES): Add symbol.c.
12097 (OBS): Add symbol.o.
12098
12099 2014-09-11 Gary Benson <gbenson@redhat.com>
12100
12101 * target.c (target_stop_ptid, target_continue_ptid): New
12102 functions.
12103
12104 2014-09-11 Tom Tromey <tromey@redhat.com>
12105 Gary Benson <gbenson@redhat.com>
12106
12107 * target.h: Include target/target.h.
12108 * target.c (target_read_memory, target_read_uint32)
12109 (target_write_memory): New functions.
12110
12111 2014-09-11 Gary Benson <gbenson@redhat.com>
12112
12113 * server.h (debug_hw_points): Don't declare.
12114 * server.c (debug_hw_points): Don't define. Replace all uses
12115 with show_debug_regs.
12116 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
12117 all uses with show_debug_regs.
12118
12119 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
12120
12121 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
12122 endianness into account.
12123 (ppc_supply_ptrace_register): Likewise.
12124
12125 2014-09-03 James Hogan <james.hogan@imgtec.com>
12126
12127 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
12128 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
12129
12130 2014-09-03 Gary Benson <gbenson@redhat.com>
12131
12132 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
12133 ALL_DEBUG_ADDRESS_REGISTERS.
12134
12135 2014-09-02 Gary Benson <gbenson@redhat.com>
12136
12137 * i386-low.h: Renamed as...
12138 * x86-low.h: New file. All type, function and variable name
12139 prefixes changed from "i386_" to "x86_". All references updated.
12140 * i386-low.c: Renamed as...
12141 * x86-low.c: New file. All type, function and variable name
12142 prefixes changed from "i386_" to "x86_". All references updated.
12143
12144 2014-09-02 Gary Benson <gbenson@redhat.com>
12145
12146 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
12147 (x86_linux_new_thread): Likewise.
12148
12149 2014-08-29 Gary Benson <gbenson@redhat.com>
12150
12151 * server.h (setjmp.h): Do not include.
12152 (toplevel): Do not declare.
12153 (common-exceptions.h): Include.
12154 (cleanups.h): Likewise.
12155 * server.c (toplevel): Do not define.
12156 (exit_code): New static global.
12157 (detach_or_kill_for_exit_cleanup): New function.
12158 (main): New function. Original main renamed to...
12159 (captured_main): New function.
12160 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
12161
12162 2014-08-29 Gary Benson <gbenson@redhat.com>
12163
12164 * Makefile.in (SFILES): Add common/common-exceptions.c.
12165 (OBS): Add common-exceptions.o.
12166 (common-exceptions.o): New rule.
12167 * utils.c (prepare_to_throw_exception): New function.
12168
12169 2014-08-29 Gary Benson <gbenson@redhat.com>
12170
12171 * config.in: Regenerate.
12172 * configure: Likewise.
12173
12174 2014-08-29 Gary Benson <gbenson@redhat.com>
12175
12176 * Makefile.in (SFILES): Add common/cleanups.c.
12177 (OBS): cleanups.o.
12178 (cleanups.o): New rule.
12179
12180 2014-08-29 Gary Benson <gbenson@redhat.com>
12181
12182 * utils.c (internal_vwarning): New function.
12183
12184 2014-08-28 Gary Benson <gbenson@redhat.com>
12185
12186 * utils.h (fatal): Remove declaration.
12187 * utils.c (fatal): Remove function.
12188
12189 2014-08-28 Gary Benson <gbenson@redhat.com>
12190
12191 * tracepoint.c (gdb_agent_init): Replace fatal with
12192 perror_with_name.
12193 (initialize_tracepoint): Likewise.
12194
12195 2014-08-28 Gary Benson <gbenson@redhat.com>
12196
12197 * remote-utils.c (remote_prepare): Replace fatal with error.
12198
12199 2014-08-28 Gary Benson <gbenson@redhat.com>
12200
12201 * linux-low.c (linux_async): Replace fatal with warning.
12202 Tidy up and return.
12203 (linux_start_non_stop): Return -1 if linux_async failed.
12204
12205 2014-08-28 Gary Benson <gbenson@redhat.com>
12206
12207 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
12208 gdb_assert.
12209 (i386_dr_low_get_addr): Remove vague comment.
12210 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
12211 gdb_assert.
12212
12213 2014-08-28 Gary Benson <gbenson@redhat.com>
12214
12215 * inferiors.c (get_thread_process): Replace check with gdb_assert.
12216 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
12217 internal_error.
12218 (linux_resume_one_lwp): Likewise.
12219 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
12220 gdb_assert.
12221 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
12222 with internal_error.
12223 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
12224 (init_register_cache): Replace fatal with gdb_assert_not_reached.
12225 (find_register_by_name): Replace fatal with internal_error.
12226 (find_regno): Likewise.
12227 * tdesc.c (init_target_desc): Replace check with gdb_assert.
12228 * thread-db.c (thread_db_create_event): Likewise.
12229 (thread_db_load_search): Likewise.
12230 (try_thread_db_load_1): Likewise.
12231 * tracepoint.c (get_jump_space_head): Replace fatal with
12232 internal_error.
12233 (claim_trampoline_space): Likewise.
12234 (have_fast_tracepoint_trampoline_buffer): Likewise.
12235 (cmd_qtstart): Likewise.
12236 (stop_tracing): Likewise.
12237 (fast_tracepoint_collecting): Likewise.
12238 (target_malloc): Likewise.
12239 (download_tracepoint): Likewise.
12240 (download_trace_state_variables): Replace check with gdb_assert.
12241 (upload_fast_traceframes): Replace fatal with internal_error.
12242
12243 2014-08-19 Tom Tromey <tromey@redhat.com>
12244 Gary Benson <gbenson@redhat.com>
12245
12246 * Makefile.in (SFILES): Add common/common-debug.c.
12247 (OBS): Add common-debug.o.
12248 (common-debug.o): New rule.
12249 * debug.h (debug_printf): Don't declare.
12250 * debug.c (debug_printf): Renamed and rewritten as...
12251 (debug_vprintf): New function.
12252
12253 2014-08-19 Gary Benson <gbenson@redhat.com>
12254
12255 * utils.h: Do not include print-utils.h.
12256
12257 2014-08-19 Tom Tromey <tromey@redhat.com>
12258 Gary Benson <gbenson@redhat.com>
12259
12260 * server.h: Add static assertion.
12261 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
12262
12263 2014-08-19 Tom Tromey <tromey@redhat.com>
12264 Gary Benson <gbenson@redhat.com>
12265
12266 * Makefile.in (SFILES): Add common/errors.c.
12267 (OBS): Add errors.o.
12268 (IPA_OBS): Add errors-ipa.o.
12269 (errors.o): New rule.
12270 (errors-ipa.o): Likewise.
12271 * utils.h (perror_with_name, error, warning): Don't declare.
12272 * utils.c (warning): Renamed and rewritten as...
12273 (vwarning): New function.
12274 (error): Renamed and rewritten as...
12275 (verror): New function.
12276 (internal_error): Renamed and rewritten as...
12277 (internal_verror): New function.
12278
12279 2014-08-07 Gary Benson <gbenson@redhat.com>
12280
12281 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
12282 * configure: Regenerate.
12283 * config.in: Likewise.
12284 * server.h: Do not include errno.h.
12285 * event-loop.c: Likewise.
12286 * hostio-errno.c: Likewise.
12287 * linux-low.c: Likewise.
12288 * remote-utils.c: Likewise.
12289 * spu-low.c: Likewise.
12290 * utils.c: Likewise.
12291 * gdbreplay.c: Unconditionally include errno.h.
12292
12293 2014-08-07 Gary Benson <gbenson@redhat.com>
12294
12295 * server.h: Do not include string.h.
12296 * event-loop.c: Likewise.
12297 * linux-low.c: Likewise.
12298 * regcache.c: Likewise.
12299 * remote-utils.c: Likewise.
12300 * spu-low.c: Likewise.
12301 * utils.c: Likewise.
12302
12303 2014-08-07 Gary Benson <gbenson@redhat.com>
12304
12305 * server.h: Do not include gdb_assert.h.
12306
12307 2014-08-07 Gary Benson <gbenson@redhat.com>
12308
12309 * server.h: Do not include common-utils.h.
12310
12311 2014-08-07 Gary Benson <gbenson@redhat.com>
12312
12313 * server.h: Do not include ptid.h.
12314 * notif.h: Likewise.
12315
12316 2014-08-07 Gary Benson <gbenson@redhat.com>
12317
12318 * server.h: Do not include gdb_locale.h.
12319
12320 2014-08-07 Gary Benson <gbenson@redhat.com>
12321
12322 * server.h: Do not include gdb/signals.h.
12323 * win32-low.c: Likewise.
12324
12325 2014-08-07 Gary Benson <gbenson@redhat.com>
12326
12327 * server.h: Do not include pathmax.h.
12328
12329 2014-08-07 Gary Benson <gbenson@redhat.com>
12330
12331 * server.h: Do not include libiberty.h.
12332 * linux-bfin-low.c: Likewise.
12333
12334 2014-08-07 Gary Benson <gbenson@redhat.com>
12335
12336 * server.h: Do not include ansidecl.h.
12337
12338 2014-08-07 Gary Benson <gbenson@redhat.com>
12339
12340 * linux-x86-low.c: Do not include stddef.h.
12341 * lynx-ppc-low.c: Likewise.
12342 * tracepoint.c: Likewise.
12343
12344 2014-08-07 Gary Benson <gbenson@redhat.com>
12345
12346 * server.h: Do not include stdarg.h.
12347 * nto-low.c: Likewise.
12348
12349 2014-08-07 Gary Benson <gbenson@redhat.com>
12350
12351 * server.h: Do not include stdlib.h.
12352 * inferiors.c: Likewise.
12353 * linux-low.c: Likewise.
12354 * regcache.c: Likewise.
12355 * spu-low.c: Likewise.
12356 * tracepoint.c: Likewise.
12357 * utils.c: Likewise.
12358
12359 2014-08-07 Gary Benson <gbenson@redhat.com>
12360
12361 * server.h: Do not include stdio.h.
12362 * linux-low.c: Likewise.
12363 * remote-utils.c: Likewise.
12364 * spu-low.c: Likewise.
12365 * utils.c: Likewise.
12366 * wincecompat.c: Likewise.
12367
12368 2014-08-06 Gary Benson <gbenson@redhat.com>
12369
12370 * regcache.c (init_register_cache): Move conditionals inside if.
12371
12372 2014-08-06 Gary Benson <gbenson@redhat.com>
12373
12374 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
12375
12376 2014-07-31 Gary Benson <gbenson@redhat.com>
12377
12378 * ax.h: Do not include server.h.
12379 * gdbthread.h: Likewise.
12380 * lynx-low.h: Likewise.
12381 * notif.h: Likewise.
12382
12383 2014-07-30 Gary Benson <gbenson@redhat.com>
12384
12385 * server.h: Include common-defs.h.
12386 Do not include config.h or build-gnulib-gdbserver/config.h.
12387
12388 2014-07-30 Gary Benson <gbenson@redhat.com>
12389
12390 * hostio-errno.c: Move server.h to top of includes list.
12391 * inferiors.c: Likewise.
12392 * linux-x86-low.c: Likewise.
12393 * notif.c: Include server.h.
12394
12395 2014-07-24 Tom Tromey <tromey@redhat.com>
12396 Gary Benson <gbenson@redhat.com>
12397
12398 * server.h (CORE_ADDR): Now unsigned.
12399
12400 2014-07-16 Pedro Alves <palves@redhat.com>
12401
12402 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
12403
12404 2014-07-15 Pedro Alves <palves@redhat.com>
12405
12406 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
12407 copy.
12408
12409 2014-07-11 Pedro Alves <palves@redhat.com>
12410
12411 * linux-low.c (kill_wait_lwp): New function, based on
12412 kill_one_lwp_callback, but use my_waitpid directly.
12413 (kill_one_lwp_callback, linux_kill): Use it.
12414
12415 2014-06-23 Pedro Alves <palves@redhat.com>
12416
12417 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
12418 before setting DR0..DR3.
12419
12420 2014-06-20 Gary Benson <gbenson@redhat.com>
12421
12422 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
12423 * configure: Regenerated.
12424 * config.in: Likewise.
12425
12426 2014-06-20 Gary Benson <gbenson@redhat.com>
12427
12428 * Makefile.in (SFILES): Update locations for files moved
12429 from common to nat.
12430 (object file files): Reordered.
12431
12432 2014-06-20 Gary Benson <gbenson@redhat.com>
12433
12434 * i386-low.h (i386_dr_low_can_set_addr): Removed.
12435 (i386_dr_low_set_addr): Likewise.
12436 (i386_dr_low_get_addr): Likewise.
12437 (i386_dr_low_can_set_control): Likewise.
12438 (i386_dr_low_set_control): Likewise.
12439 (i386_dr_low_get_control): Likewise.
12440 (i386_dr_low_get_status): Likewise.
12441 (i386_get_debug_register_length): Likewise.
12442 * linux-x86-low.c (i386_dr_low_set_addr):
12443 Changed signature. Made static.
12444 (i386_dr_low_get_addr): Likewise.
12445 (i386_dr_low_set_control): Likewise.
12446 (i386_dr_low_get_control): Likewise.
12447 (i386_dr_low_get_status): Likewise.
12448 (i386_dr_low): New global variable.
12449 * win32-i386-low.c (i386_dr_low_set_addr):
12450 Changed signature. Made static.
12451 (i386_dr_low_get_addr): Likewise.
12452 (i386_dr_low_set_control): Likewise.
12453 (i386_dr_low_get_control): Likewise.
12454 (i386_dr_low_get_status): Likewise.
12455 (i386_dr_low): New global variable.
12456
12457 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
12458
12459 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
12460 * Makefile.in (AR, AR_FLAGS): Define.
12461 * configure: Regenerate.
12462
12463 2014-06-19 Gary Benson <gbenson@redhat.com>
12464
12465 * Makefile.in (i386-dregs.o): New rule.
12466 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
12467 * i386-low.c (target.h): Remove include.
12468 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
12469 (DR_CONTROL_SHIFT): Likewise.
12470 (DR_CONTROL_SIZE): Likewise.
12471 (DR_RW_EXECUTE): Likewise.
12472 (DR_RW_WRITE): Likewise.
12473 (DR_RW_READ): Likewise.
12474 (DR_RW_IORW): Likewise.
12475 (DR_LEN_1): Likewise.
12476 (DR_LEN_2): Likewise.
12477 (DR_LEN_4): Likewise.
12478 (DR_LEN_8): Likewise.
12479 (DR_LOCAL_ENABLE_SHIFT): Likewise.
12480 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
12481 (DR_ENABLE_SIZE): Likewise.
12482 (DR_LOCAL_SLOWDOWN): Likewise.
12483 (DR_GLOBAL_SLOWDOWN): Likewise.
12484 (DR_CONTROL_RESERVED): Likewise.
12485 (I386_DR_CONTROL_MASK): Likewise.
12486 (I386_DR_VACANT): Likewise.
12487 (I386_DR_LOCAL_ENABLE): Likewise.
12488 (I386_DR_GLOBAL_ENABLE): Likewise.
12489 (I386_DR_DISABLE): Likewise.
12490 (I386_DR_SET_RW_LEN): Likewise.
12491 (I386_DR_GET_RW_LEN): Likewise.
12492 (I386_DR_WATCH_HIT): Likewise.
12493 (i386_wp_op_t): Likewise.
12494 (i386_show_dr): Likewise.
12495 (i386_length_and_rw_bits): Likewise.
12496 (i386_insert_aligned_watchpoint): Likewise.
12497 (i386_remove_aligned_watchpoint): Likewise.
12498 (i386_handle_nonaligned_watchpoint): Likewise.
12499 i386_update_inferior_debug_regs(): Likewise.
12500 (i386_dr_insert_watchpoint): Likewise.
12501 (i386_dr_remove_watchpoint): Likewise.
12502 (i386_dr_region_ok_for_watchpoint): Likewise.
12503 (i386_dr_stopped_data_address): Likewise.
12504 (i386_dr_stopped_by_watchpoint): Likewise.
12505
12506 2014-06-19 Gary Benson <gbenson@redhat.com>
12507
12508 * i386-low.c (i386_dr_show): Renamed to
12509 i386_show_dr and made static. All uses updated.
12510 (i386_dr_length_and_rw_bits): Renamed to
12511 i386_length_and_rw_bits and made static.
12512 All uses updated.
12513 (i386_dr_insert_aligned_watchpoint): Renamed to
12514 i386_insert_aligned_watchpoint and made static.
12515 All uses updated.
12516 (i386_dr_remove_aligned_watchpoint): Renamed to
12517 i386_remove_aligned_watchpoint and made static.
12518 All uses updated.
12519 (i386_dr_update_inferior_debug_regs): Renamed to
12520 i386_update_inferior_debug_regs and made static.
12521 All uses updated.
12522
12523 2014-06-18 Gary Benson <gbenson@redhat.com>
12524
12525 * i386-low.h (i386_dr_low_can_set_addr): New macro.
12526 (i386_dr_low_can_set_control): Likewise.
12527 (i386_get_debug_register_length): Likewise.
12528 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
12529 (i386_dr_low_can_set_control): Likewise.
12530 (i386_get_debug_register_length): Likewise.
12531
12532 2014-06-17 Gary Benson <gbenson@redhat.com>
12533
12534 * i386-low.h (i386-dregs.h): New include.
12535 (DR_FIRSTADDR): Now in i386-dregs.h.
12536 (DR_LASTADDR): Likewise.
12537 (DR_NADDR): Likewise.
12538 (DR_STATUS): Likewise.
12539 (DR_CONTROL): Likewise.
12540 (i386_debug_reg_state): Likewise.
12541 (i386_dr_insert_watchpoint): Likewise.
12542 (i386_dr_remove_watchpoint): Likewise.
12543 (i386_dr_region_ok_for_watchpoint): Likewise.
12544 (i386_dr_stopped_data_address): Likewise.
12545 (i386_dr_stopped_by_watchpoint): Likewise.
12546 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
12547
12548 2014-06-18 Gary Benson <gbenson@redhat.com>
12549
12550 * i386-low.h (i386_low_insert_watchpoint): Renamed to
12551 i386_dr_insert_watchpoint.
12552 (i386_low_remove_watchpoint): Renamed to
12553 i386_dr_remove_watchpoint.
12554 (i386_low_region_ok_for_watchpoint): Renamed to
12555 i386_dr_region_ok_for_watchpoint.
12556 (i386_low_stopped_data_address): Renamed to
12557 i386_dr_stopped_data_address.
12558 (i386_low_stopped_by_watchpoint): Renamed to
12559 i386_dr_stopped_by_watchpoint.
12560 * i386-low.c (i386_show_dr): Renamed to
12561 i386_dr_show and made nonstatic. All uses updated.
12562 (i386_length_and_rw_bits): Renamed to
12563 i386_dr_length_and_rw_bits and made nonstatic.
12564 All uses updated.
12565 (i386_insert_aligned_watchpoint): Renamed to
12566 i386_dr_insert_aligned_watchpoint and made nonstatic.
12567 All uses updated.
12568 (i386_remove_aligned_watchpoint): Renamed to
12569 i386_dr_remove_aligned_watchpoint and made nonstatic.
12570 All uses updated.
12571 (i386_update_inferior_debug_regs): Renamed to
12572 i386_dr_update_inferior_debug_regs and made nonstatic.
12573 All uses updated.
12574 (i386_low_insert_watchpoint): Renamed to
12575 i386_dr_insert_watchpoint. All uses updated.
12576 (i386_low_remove_watchpoint): Renamed to
12577 i386_dr_remove_watchpoint. All uses updated.
12578 (i386_low_region_ok_for_watchpoint): Renamed to
12579 i386_dr_region_ok_for_watchpoint. All uses updated.
12580 (i386_low_stopped_data_address): Renamed to
12581 i386_dr_stopped_data_address. All uses updated.
12582 (i386_low_stopped_by_watchpoint): Renamed to
12583 i386_dr_stopped_by_watchpoint. All uses updated.
12584
12585 2014-06-18 Gary Benson <gbenson@redhat.com>
12586
12587 * i386-low.c (i386_dr_low_can_set_addr): New macro.
12588 (i386_dr_low_can_set_control): Likewise.
12589 (i386_insert_aligned_watchpoint): New check.
12590
12591 2014-06-18 Gary Benson <gbenson@redhat.com>
12592
12593 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
12594 Renamed to state.
12595
12596 2014-06-18 Gary Benson <gbenson@redhat.com>
12597
12598 * i386-low.c (i386_length_and_rw_bits): Use internal_error
12599 instead of fatal and error.
12600 (i386_handle_nonaligned_watchpoint): Likewise.
12601
12602 2014-06-18 Gary Benson <gbenson@redhat.com>
12603
12604 * i386-low.c (i386_get_debug_register_length): New macro.
12605 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
12606 (i386_show_dr): Use debug_printf instead of fprintf. Use
12607 phex to format values.
12608
12609 2014-06-18 Gary Benson <gbenson@redhat.com>
12610
12611 * i386-low.h: Comment changes.
12612 * i386-low.c: Likewise.
12613
12614 2014-06-18 Gary Benson <gbenson@redhat.com>
12615
12616 * i386-low.c: Whitespace changes.
12617
12618 2014-06-12 Tom Tromey <tromey@redhat.com>
12619
12620 * utils.c (freeargv): Remove.
12621
12622 2014-06-12 Tom Tromey <tromey@redhat.com>
12623
12624 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
12625 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
12626 (parse_debug_format_options): Likewise.
12627 (gdbserver_usage): Likewise.
12628 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
12629 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
12630 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
12631 against libiberty.
12632 ($(LIBGNU)): Depend on libiberty.
12633 (all-lib): Recurse into all subdirs.
12634 (install-only): Invoke "install" target in subdirs.
12635 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
12636 targets.
12637 * configure: Rebuild.
12638 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
12639 for vasprintf, vsnprintf, or gettimeofday.
12640 * configure.srv: Don't add safe-ctype.o or lbasename.o to
12641 srv_tgtobj.
12642
12643 2014-06-05 Joel Brobecker <brobecker@adacore.com>
12644
12645 * development.sh: Delete.
12646 * Makefile.in (config.status): Adjust dependency on development.sh.
12647 * configure.ac: Adjust development.sh source call.
12648 * configure: Regenerate.
12649
12650 2014-06-02 Pedro Alves <palves@redhat.com>
12651
12652 * ax.c (gdb_free_agent_expr): New function.
12653 * ax.h (gdb_free_agent_expr): New declaration.
12654 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
12655 list.
12656 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
12657 static.
12658 (clear_breakpoint_conditions_and_commands): New function.
12659 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
12660 (clear_breakpoint_conditions_and_commands): New declaration.
12661
12662 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12663
12664 * linux-aarch64-low.c (asm/ptrace.h): Include.
12665
12666 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12667
12668 Fix TLS access for -static -pthread.
12669 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
12670 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
12671 (thread_db_load_search, try_thread_db_load_1): Initialize it.
12672
12673 2014-05-20 Pedro Alves <palves@redhat.com>
12674
12675 * linux-aarch64-low.c (aarch64_insert_point)
12676 (aarch64_remove_point): No longer check whether the type is
12677 supported here. Adjust to new interface.
12678 (the_low_target): Install aarch64_supports_z_point_type as
12679 supports_z_point_type method.
12680 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
12681 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
12682 instead of a Z packet char. Adjust.
12683 (arm_supports_z_point_type): New function.
12684 (arm_insert_point, arm_remove_point): Adjust to new interface.
12685 (the_low_target): Install arm_supports_z_point_type.
12686 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
12687 (cris_insert_point, cris_remove_point): Adjust to new interface.
12688 Don't check whether the type is supported here.
12689 (the_low_target): Install cris_supports_z_point_type.
12690 * linux-low.c (linux_supports_z_point_type): New function.
12691 (linux_insert_point, linux_remove_point): Adjust to new interface.
12692 * linux-low.h (struct linux_target_ops) <insert_point,
12693 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
12694 raw_breakpoint pointer parameter.
12695 <supports_z_point_type>: New method.
12696 * linux-mips-low.c (mips_supports_z_point_type): New function.
12697 (mips_insert_point, mips_remove_point): Adjust to new interface.
12698 Use mips_supports_z_point_type.
12699 (the_low_target): Install mips_supports_z_point_type.
12700 * linux-ppc-low.c (the_low_target): Install NULL as
12701 supports_z_point_type method.
12702 * linux-s390-low.c (the_low_target): Install NULL as
12703 supports_z_point_type method.
12704 * linux-sparc-low.c (the_low_target): Install NULL as
12705 supports_z_point_type method.
12706 * linux-x86-low.c (x86_supports_z_point_type): New function.
12707 (x86_insert_point): Adjust to new insert_point interface. Use
12708 insert_memory_breakpoint. Adjust to new
12709 i386_low_insert_watchpoint interface.
12710 (x86_remove_point): Adjust to remove_point interface. Use
12711 remove_memory_breakpoint. Adjust to new
12712 i386_low_remove_watchpoint interface.
12713 (the_low_target): Install x86_supports_z_point_type.
12714 * lynx-low.c (lynx_target_ops): Install NULL as
12715 supports_z_point_type callback.
12716 * nto-low.c (nto_supports_z_point_type): New.
12717 (nto_insert_point, nto_remove_point): Adjust to new interface.
12718 (nto_target_ops): Install nto_supports_z_point_type.
12719 * mem-break.c: Adjust intro comment.
12720 (struct raw_breakpoint) <raw_type, size>: New fields.
12721 <inserted>: Update comment.
12722 <shlib_disabled>: Delete field.
12723 (enum bkpt_type) <gdb_breakpoint>: Delete value.
12724 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
12725 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
12726 (raw_bkpt_type_to_target_hw_bp_type): New function.
12727 (find_enabled_raw_code_breakpoint_at): New function.
12728 (find_raw_breakpoint_at): New type and size parameters. Use them.
12729 (insert_memory_breakpoint): New function, based off
12730 set_raw_breakpoint_at.
12731 (remove_memory_breakpoint): New function.
12732 (set_raw_breakpoint_at): Reimplement.
12733 (set_breakpoint): New, based on set_breakpoint_at.
12734 (set_breakpoint_at): Reimplement.
12735 (delete_raw_breakpoint): Go through the_target->remove_point
12736 instead of assuming memory breakpoints.
12737 (find_gdb_breakpoint_at): Delete.
12738 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
12739 (find_gdb_breakpoint): New function.
12740 (set_gdb_breakpoint_at): Delete.
12741 (z_type_supported): New function.
12742 (set_gdb_breakpoint_1): New function, loosely based off
12743 set_gdb_breakpoint_at.
12744 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
12745 (delete_gdb_breakpoint_at): Delete.
12746 (delete_gdb_breakpoint_1): New function, loosely based off
12747 delete_gdb_breakpoint_at.
12748 (delete_gdb_breakpoint): New function.
12749 (clear_gdb_breakpoint_conditions): Rename to ...
12750 (clear_breakpoint_conditions): ... this. Don't handle a NULL
12751 breakpoint.
12752 (add_condition_to_breakpoint): Make static.
12753 (add_breakpoint_condition): Take a struct breakpoint pointer
12754 instead of an address. Adjust.
12755 (gdb_condition_true_at_breakpoint): Rename to ...
12756 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
12757 z_type parameter.
12758 (gdb_condition_true_at_breakpoint): Reimplement.
12759 (add_breakpoint_commands): Take a struct breakpoint pointer
12760 instead of an address. Adjust.
12761 (gdb_no_commands_at_breakpoint): Rename to ...
12762 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
12763 parameter. Return true if no breakpoint was found. Change debug
12764 output.
12765 (gdb_no_commands_at_breakpoint): Reimplement.
12766 (run_breakpoint_commands): Rename to ...
12767 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
12768 and change return type to boolean.
12769 (run_breakpoint_commands): New function.
12770 (gdb_breakpoint_here): Also check for Z1 breakpoints.
12771 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
12772 breakpoint. Go through the_target->remove_point instead of
12773 assuming memory breakpoint.
12774 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
12775 software and hardware breakpoints.
12776 (reinsert_raw_breakpoint): Go through the_target->insert_point
12777 instead of assuming memory breakpoint.
12778 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
12779 software and hardware breakpoints.
12780 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
12781 Check both software and hardware breakpoints.
12782 (validate_inserted_breakpoint): Assert the breakpoint is a
12783 software breakpoint. Set the inserted flag to -1 instead of
12784 setting shlib_disabled.
12785 (delete_disabled_breakpoints): Adjust.
12786 (validate_breakpoints): Only validate software breakpoints.
12787 Adjust to inserted flag change.
12788 (check_mem_read, check_mem_write): Skip breakpoint types other
12789 than software breakpoints. Adjust to inserted flag change.
12790 * mem-break.h (enum raw_bkpt_type): New enum.
12791 (raw_breakpoint, struct process_info): Forward declare.
12792 (Z_packet_to_target_hw_bp_type): Delete declaration.
12793 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
12794 (set_gdb_breakpoint, delete_gdb_breakpoint)
12795 (clear_breakpoint_conditions): New declarations.
12796 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
12797 (breakpoint_inserted_here): Update comment.
12798 (add_breakpoint_condition, add_breakpoint_commands): Replace
12799 address parameter with a breakpoint pointer parameter.
12800 (gdb_breakpoint_here): Update comment.
12801 (delete_gdb_breakpoint_at): Delete.
12802 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
12803 * server.c (process_point_options): Take a struct breakpoint
12804 pointer instead of an address. Adjust.
12805 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
12806 delete_gdb_breakpoint.
12807 * spu-low.c (spu_target_ops): Install NULL as
12808 supports_z_point_type method.
12809 * target.h: Include mem-break.h.
12810 (struct target_ops) <prepare_to_access_memory>: Update comment.
12811 <supports_z_point_type>: New field.
12812 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12813 instead of a char. Also take a raw breakpoint pointer.
12814 * win32-arm-low.c (the_low_target): Install NULL as
12815 supports_z_point_type.
12816 * win32-i386-low.c (i386_supports_z_point_type): New function.
12817 (i386_insert_point, i386_remove_point): Adjust to new interface.
12818 (the_low_target): Install i386_supports_z_point_type.
12819 * win32-low.c (win32_supports_z_point_type): New function.
12820 (win32_insert_point, win32_remove_point): Adjust to new interface.
12821 (win32_target_ops): Install win32_supports_z_point_type.
12822 * win32-low.h (struct win32_target_ops):
12823 <supports_z_point_type>: New method.
12824 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12825 instead of a char. Also take a raw breakpoint pointer.
12826
12827 2014-05-20 Pedro Alves <palves@redhat.com>
12828
12829 * mem-break.h: Include break-common.h.
12830 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12831 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
12832 (Z_packet_to_target_hw_bp_type): New declaration.
12833 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
12834 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
12835 (Z_PACKET_ACCESS_WP): Delete macros.
12836 (Z_packet_to_hw_type): Delete function.
12837 * i386-low.h: Don't include break-common.h here.
12838 (Z_packet_to_hw_type): Delete declaration.
12839 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
12840 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12841 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
12842 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12843 * linux-aarch64-low.c: Don't include break-common.h here.
12844 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12845 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
12846 (Z_packet_to_target_hw_bp_type): Delete function.
12847 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
12848 function.
12849 (mips_insert_point, mips_remove_point): Use
12850 Z_packet_to_target_hw_bp_type.
12851
12852 2014-05-20 Pedro Alves <palves@redhat.com>
12853
12854 * linux-aarch64-low.c: Include break-common.h.
12855 (enum target_point_type): Delete.
12856 (Z_packet_to_point_type): Rename to ...
12857 (Z_packet_to_target_hw_bp_type): ... this, and return a
12858 target_hw_bp_type instead.
12859 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
12860 instead of an enum target_point_type.
12861 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
12862 breakpoint type.
12863 (aarch64_dr_state_insert_one_point)
12864 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
12865 (aarch64_handle_aligned_watchpoint)
12866 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
12867 Take an enum target_hw_bp_type instead of an enum
12868 target_point_type.
12869 (aarch64_supports_z_point_type): New function.
12870 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
12871 use Z_packet_to_target_hw_bp_type.
12872
12873 2014-05-20 Joel Brobecker <brobecker@adacore.com>
12874
12875 * configure.ac: Only use -Werror by default when DEVELOPMENT
12876 is true.
12877 * configure: Regenerate.
12878
12879 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
12880
12881 Fix gdbserver qGetTLSAddr for x86_64 -m32.
12882 * linux-x86-low.c (X86_64_USER_REGS): New.
12883 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
12884
12885 2014-04-28 Yao Qi <yao@codesourcery.com>
12886
12887 * Makefile.in (i386-avx512.c): Fix the typo of generated file
12888 name.
12889
12890 2014-04-25 Pedro Alves <palves@redhat.com>
12891
12892 PR server/16255
12893 * linux-low.c (linux_attach_fail_reason_string): New function.
12894 (linux_attach_lwp): Delete.
12895 (linux_attach_lwp_1): Rename to ...
12896 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
12897 argument. Remove "initial" parameter. Return int instead of
12898 void. Don't error or warn here.
12899 (linux_attach): Adjust to call linux_attach_lwp. Call error on
12900 failure to attach to the tgid. Call warning when failing to
12901 attach to an lwp.
12902 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
12903 argument. Remove "initial" parameter. Return int instead of
12904 void. Don't error or warn here.
12905 (linux_attach_fail_reason_string): New declaration.
12906 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
12907 interface change. Use linux_attach_fail_reason_string.
12908
12909 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
12910 Walfred Tedeschi <walfred.tedeschi@intel.com>
12911
12912 * Makefile.in: Added rules to handle new files
12913 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
12914 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
12915 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
12916 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
12917 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
12918 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
12919 x32-avx512-linux.o.
12920 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
12921 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
12922 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
12923 i386/x32-avx512.xml.
12924 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
12925 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
12926 i386/x32-avx512-linux.xml.
12927 * i387-fp.c (num_avx512_k_registers): New constant for number
12928 of K registers.
12929 (num_avx512_zmmh_low_registers): New constant for number of
12930 lower ZMM registers (0-15).
12931 (num_avx512_zmmh_high_registers): New constant for number of
12932 higher ZMM registers (16-31).
12933 (num_avx512_ymmh_registers): New contant for number of higher
12934 YMM registers (ymm16-31 added by avx521 on x86_64).
12935 (num_avx512_xmm_registers): New constant for number of higher
12936 XMM registers (xmm16-31 added by AVX512 on x86_64).
12937 (struct i387_xsave): Add space for AVX512 registers.
12938 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
12939 Add code to handle AVX512 registers.
12940 (i387_xsave_to_cache): Add code to handle AVX512 registers.
12941 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
12942 prototypei from generated file.
12943 (tdesc_amd64_avx512_linux): Likewise.
12944 (init_registers_x32_avx512_linux): Likewise.
12945 (tdesc_x32_avx512_linux): Likewise.
12946 (init_registers_i386_avx512_linux): Likewise.
12947 (tdesc_i386_avx512_linux): Likewise.
12948 (x86_64_regmap): Add AVX512 registers.
12949 (x86_linux_read_description): Add code to handle AVX512 XSTATE
12950 mask.
12951 (initialize_low_arch): Add code to initialize AVX512 registers.
12952
12953 2014-04-23 Pedro Alves <palves@redhat.com>
12954
12955 * mem-break.c (find_gdb_breakpoint_at): Make static.
12956 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
12957
12958 2014-04-23 Pedro Alves <palves@redhat.com>
12959
12960 * i386-low.c: Don't include break-common.h here.
12961 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
12962 prototype to take target_hw_bp_type as argument instead of a Z
12963 packet char.
12964 * i386-low.h: Include break-common.h here.
12965 (Z_packet_to_hw_type): Declare.
12966 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
12967 prototypes.
12968 * linux-x86-low.c (x86_insert_point): Convert the packet number to
12969 a target_hw_bp_type before calling i386_low_insert_watchpoint.
12970 (x86_remove_point): Convert the packet number to a
12971 target_hw_bp_type before calling i386_low_remove_watchpoint.
12972 * win32-i386-low.c (i386_insert_point): Convert the packet number
12973 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
12974 (i386_remove_point): Convert the packet number to a
12975 target_hw_bp_type before calling i386_low_remove_watchpoint.
12976
12977 2014-04-23 Pedro Alves <palves@redhat.com>
12978
12979 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
12980
12981 2014-04-10 Pedro Alves <palves@redhat.com>
12982
12983 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
12984 Check if the condition or command is NULL before checking if the
12985 breakpoint is known. On success, return true.
12986 * mem-break.h (add_breakpoint_condition): Document return.
12987 (add_breakpoint_commands): Add describing comment.
12988 * server.c (skip_to_semicolon): New function.
12989 (process_point_options): Use it.
12990
12991 2014-04-09 Pedro Alves <palves@redhat.com>
12992
12993 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
12994 to lwpid_of.
12995
12996 2014-02-27 Pedro Alves <palves@redhat.com>
12997
12998 PR 12702
12999 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
13000 macros.
13001 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
13002 output.
13003 (last_thread_of_process_p): Take a PID argument instead of a
13004 thread pointer.
13005 (linux_wait_for_lwp): Delete.
13006 (num_lwps, check_zombie_leaders, not_stopped_callback): New
13007 functions.
13008 (linux_low_filter_event): New function, party factored out from
13009 linux_wait_for_event.
13010 (linux_wait_for_event): Rename to ...
13011 (linux_wait_for_event_filtered): ... this. Add new filter ptid
13012 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
13013 sigsuspend. Check for zombie leaders.
13014 (linux_wait_for_event): Reimplement as wrapper around
13015 linux_wait_for_event_filtered.
13016 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
13017 a normal or signal exit is seen, it's the whole process exiting.
13018 (wait_for_sigstop): No longer a for_each_inferior callback.
13019 Rewrite on top of linux_wait_for_event_filtered.
13020 (stop_all_lwps): Call wait_for_sigstop directly.
13021 * server.c (resume, handle_target_event): Handle
13022 TARGET_WAITKIND_NO_RESUMED.
13023
13024 2014-02-26 Joel Brobecker <brobecker@adacore.com>
13025
13026 * win32-low.c (psapi_get_dll_name,
13027 * win32_CreateToolhelp32Snapshot): Delete.
13028 (win32_CreateToolhelp32Snapshot, win32_Module32First)
13029 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
13030 Delete.
13031 (handle_load_dll): Add function description.
13032 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
13033
13034 2014-02-26 Joel Brobecker <brobecker@adacore.com>
13035
13036 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
13037 Add comment.
13038 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
13039 base address when calling win32_add_one_solib.
13040 (handle_load_dll): Delete local variable load_addr.
13041 Remove 0x1000 offset applied to DLL base address when calling
13042 win32_add_one_solib.
13043 (handle_unload_dll): Add comment.
13044
13045 2014-02-26 Joel Brobecker <brobecker@adacore.com>
13046
13047 * win32-low.c (win32_add_all_dlls): Renames
13048 win32_ensure_ntdll_loaded. Rewrite function documentation.
13049 Adjust implementation to always load all DLLs.
13050 Add 0x1000 offset to DLL base address when calling
13051 win32_add_one_solib.
13052 (child_initialization_done): New static global.
13053 (do_initial_child_stuff): Set child_initialization_done to
13054 zero during child initialization, and 1 after. Replace call
13055 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
13056 Add comment.
13057 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
13058 (handle_unload_dll): Add function documentation.
13059 (get_child_debug_event): Ignore load and unload DLL events
13060 during child initialization.
13061
13062 2014-02-20 Doug Evans <dje@google.com>
13063
13064 Remove global all_lwps.
13065 * inferiors.h (ptid_of): Move here from linux-low.h.
13066 (pid_of, lwpid_of): Ditto.
13067 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
13068 parameter is a struct thread_info * now.
13069 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
13070 directly. Pass &all_threads to find_inferior instead of &all_lwps.
13071 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
13072 directly.
13073 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
13074 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
13075 * linux-arm-low.c (update_registers_callback): Update, "entry"
13076 parameter is a struct thread_info * now.
13077 Fetch lwpid from current_inferior directly.
13078 (arm_insert_point): Pass &all_threads to find_inferior instead of
13079 &all_lwps.
13080 (arm_remove_point): Ditto.
13081 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
13082 (arm_prepare_to_resume): Fetch pid from thread.
13083 (arm_read_description): Fetch lwpid from current_inferior directly.
13084 * linux-low.c (all_lwps): Delete.
13085 (delete_lwp): Delete call to remove_inferior.
13086 (handle_extended_wait): Fetch lwpid from thread.
13087 (add_lwp): Don't set lwp->entry.id. Remove call to
13088 add_inferior_to_list.
13089 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
13090 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
13091 (kill_one_lwp_callback): Ditto.
13092 (linux_kill): Don't dereference NULL pointer.
13093 Fetch ptid,lwpid from thread.
13094 (get_detach_signal): Fetch ptid from thread.
13095 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
13096 Simplify call to regcache_invalidate_thread.
13097 (delete_lwp_callback): Update, "entry" parameter is a
13098 struct thread_info * now. Fetch pid from thread.
13099 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
13100 (status_pending_p_callback): Update, "entry" parameter is a
13101 struct thread_info * now. Fetch ptid from thread.
13102 (find_lwp_pid): Update, "entry" parameter is a
13103 struct thread_info * now.
13104 (linux_wait_for_lwp): Fetch pid from thread.
13105 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
13106 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
13107 (enqueue_one_deferred_signal): Fetch lwpid from thread.
13108 (dequeue_one_deferred_signal): Ditto.
13109 (cancel_breakpoint): Fetch ptid from current_inferior.
13110 (linux_wait_for_event): Pass &all_threads to find_inferior,
13111 not &all_lwps. Fetch ptid, lwpid from thread.
13112 (count_events_callback): Update, "entry" parameter is a
13113 struct thread_info * now.
13114 (select_singlestep_lwp_callback): Ditto.
13115 (select_event_lwp_callback): Ditto.
13116 (cancel_breakpoints_callback): Ditto.
13117 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
13118 not &all_lwps.
13119 (select_event_lwp): Ditto. Fetch ptid from event_thread.
13120 (unsuspend_one_lwp): Update, "entry" parameter is a
13121 struct thread_info * now.
13122 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
13123 not &all_lwps.
13124 (linux_stabilize_threads): Ditto. And for for_each_inferior.
13125 Fetch lwpid from thread, not lwp.
13126 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
13127 Pass &all_threads to find_inferior, not &all_lwps.
13128 (send_sigstop): Fetch lwpid from thread, not lwp.
13129 (send_sigstop_callback): Update, "entry" parameter is a
13130 struct thread_info * now.
13131 (suspend_and_send_sigstop_callback): Ditto.
13132 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
13133 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
13134 struct thread_info * now.
13135 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
13136 from thread, lwp.
13137 (lwp_running): Update, "entry" parameter is a
13138 struct thread_info * now.
13139 (stop_all_lwps): Fetch ptid from thread.
13140 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
13141 (linux_resume_one_lwp): Fetch lwpid from thread.
13142 (linux_set_resume_request): Update, "entry" parameter is a
13143 struct thread_info * now. Fetch pid, lwpid from thread.
13144 (resume_status_pending_p): Update, "entry" parameter is a
13145 struct thread_info * now.
13146 (need_step_over_p): Ditto. Fetch lwpid from thread.
13147 (start_step_over): Fetch lwpid from thread.
13148 (linux_resume_one_thread): Update, "entry" parameter is a
13149 struct thread_info * now. Fetch lwpid from thread.
13150 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
13151 (proceed_one_lwp): Update, "entry" parameter is a
13152 struct thread_info * now. Fetch lwpid from thread.
13153 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
13154 struct thread_info * now.
13155 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
13156 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
13157 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
13158 directly.
13159 (regsets_store_inferior_registers): Ditto.
13160 (fetch_register, store_register): Ditto.
13161 (linux_read_memory, linux_write_memory): Ditto.
13162 (linux_request_interrupt): Ditto.
13163 (linux_read_auxv): Ditto.
13164 (linux_xfer_siginfo): Ditto.
13165 (linux_qxfer_spu): Ditto.
13166 (linux_qxfer_libraries_svr4): Ditto.
13167 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
13168 moved to inferiors.h.
13169 (get_lwp): Delete.
13170 (get_thread_lwp): Update.
13171 (struct lwp_info): Delete member "entry". Simplify comment for
13172 member "thread".
13173 (all_lwps): Delete.
13174 * linux-mips-low.c (mips_read_description): Fetch lwpid from
13175 current_inferior directly.
13176 (update_watch_registers_callback): Update, "entry" parameter is a
13177 struct thread_info * now. Fetch pid from thread.
13178 (mips_linux_prepare_to_resume): Fetch ptid from thread.
13179 (mips_insert_point): Fetch lwpid from current_inferior.
13180 Pass &all_threads to find_inferior, not &all_lwps.
13181 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
13182 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
13183 directly.
13184 (mips_stopped_data_address): Ditto.
13185 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
13186 directly.
13187 * linux-tile-low.c (tile_arch_setup): Ditto.
13188 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
13189 (update_debug_registers_callback): Update, "entry" parameter is a
13190 struct thread_info * now. Fetch pid from thread.
13191 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
13192 Pass &all_threads to find_inferior, not &all_lwps.
13193 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
13194 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
13195 Pass &all_threads to find_inferior, not &all_lwps.
13196 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
13197 (i386_dr_low_get_status): Ditto.
13198 (x86_linux_prepare_to_resume): Fetch ptid from thread.
13199 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
13200 (x86_linux_read_description): Ditto.
13201 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
13202
13203 2014-02-20 Doug Evans <dje@google.com>
13204
13205 * inferiors.c (get_first_inferior): Fix buglet.
13206
13207 2014-02-19 Doug Evans <dje@google.com>
13208
13209 * gdbthread.h (add_thread): Change result type to struct thread_info *.
13210 * inferiors.c (add_thread): Change result type to struct thread_info *.
13211 All callers updated.
13212 (add_lwp): Call add_thread here instead of in callers.
13213 All callers updated.
13214 * linux-low.h (get_lwp_thread): Rewrite.
13215 (struct lwp_info): New member "thread".
13216
13217 2014-02-19 Doug Evans <dje@google.com>
13218
13219 * linux-low.c (add_lwp): Change result to struct lwp_info *.
13220 All callers updated.
13221
13222 2014-02-19 Doug Evans <dje@google.com>
13223
13224 * inferiors.c (add_thread): Fix whitespace.
13225
13226 2014-02-19 Doug Evans <dje@google.com>
13227
13228 * dll.c (clear_dlls): Replace accessing list implemention details
13229 with API function.
13230 * gdbthread.h (get_first_thread): Declare.
13231 * inferiors.c (for_each_inferior_with_data): New function.
13232 (get_first_thread): New function.
13233 (find_thread_ptid): Simplify.
13234 (get_first_inferior): New function.
13235 (clear_list): Delete.
13236 (one_inferior_p): New function.
13237 (clear_inferior_list): New function.
13238 (clear_inferiors): Update.
13239 * inferiors.h (for_each_inferior_with_data): Declare.
13240 (clear_inferior_list): Declare.
13241 (one_inferior_p): Declare.
13242 (get_first_inferior): Declare.
13243 * linux-low.c (linux_wait_for_event): Replace accessing list
13244 implemention details with API function.
13245 * server.c (target_running): Ditto.
13246 (accumulate_file_name_length): New function.
13247 (emit_dll_description): New function.
13248 (handle_qxfer_libraries): Replace accessing list implemention
13249 details with API function.
13250 (handle_qxfer_threads_worker): New function.
13251 (handle_qxfer_threads_proper): Replace accessing list implemention
13252 details with API function.
13253 (handle_query): Ditto.
13254 (visit_actioned_threads_callback_ftype): New typedef.
13255 (visit_actioned_threads_data): New struct.
13256 (visit_actioned_threads): Rewrite to be find_inferior callback.
13257 (resume): Call find_inferior.
13258 (handle_status): Replace accessing list implemention
13259 details with API function.
13260 (process_serial_event): Replace accessing list implemention details
13261 with API function.
13262 * target.c (set_desired_inferior): Replace accessing list implemention
13263 details with API function.
13264 * tracepoint.c (same_process_p): New function.
13265 (gdb_agent_about_to_close): Replace accessing list implemention
13266 details with API function.
13267 * win32-low.c (child_delete_thread): Replace accessing list
13268 implemention details with API function.
13269 (match_dll_by_basename): New function.
13270 (dll_is_loaded_by_basename): New function.
13271 (win32_ensure_ntdll_loaded): Replace accessing list implemention
13272 details call to dll_is_loaded_by_basename.
13273
13274 2014-02-19 Doug Evans <dje@google.com>
13275
13276 * dll.h (struct dll_info): Add comment.
13277 * gdbthread.h (struct thread_info): Add comment.
13278 (current_ptid): Simplify.
13279 * inferiors.c (add_process): Update.
13280 (remove_process): Update.
13281 * inferiors.h (struct process_info): Rename member "head" to "entry".
13282 * linux-low.c (delete_lwp): Update.
13283 (add_lwp): Update.
13284 (last_thread_of_process_p): Update.
13285 (kill_one_lwp_callback, linux_kill): Update.
13286 (status_pending_p_callback): Update.
13287 (wait_for_sigstop): Update. Simplify read of ptid.
13288 (start_step_over): Update.
13289 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
13290 (get_lwp_thread): Update.
13291 (struct lwp_info): Rename member "head" to "entry".
13292 * regcache.h (inferior_list_entry): Delete.
13293 * server.c (kill_inferior_callback): Update.
13294 (detach_or_kill_inferior_callback): Update.
13295 (print_started_pid): Update.
13296 (print_attached_pid): Update.
13297 (process_serial_event): Simplify read of ptid.
13298 * thread-db.c (thread_db_create_event): Update.
13299 (thread_db_get_tls_address): Update.
13300 * win32-low.c (current_inferior_ptid): Simplify.
13301
13302 2014-02-19 Tom Tromey <tromey@redhat.com>
13303
13304 * target.h (struct target_ops) <supports_btrace>: Add target_ops
13305 argument.
13306 (target_supports_btrace): Update.
13307
13308 2014-02-14 Yao Qi <yao@codesourcery.com>
13309
13310 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
13311 (rsp-low-ipa.o): New target.
13312
13313 2014-02-12 Tom Tromey <tromey@redhat.com>
13314
13315 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
13316 convert_ascii_to_int.
13317 * regcache.c (registers_to_string): Likewise.
13318 * remote-utils.c (decode_M_packet): Likewise.
13319 * server.c (process_serial_event): Likewise.
13320
13321 2014-02-12 Tom Tromey <tromey@redhat.com>
13322
13323 * server.c (handle_query, handle_v_run): Use hex2bin, not
13324 unhexify.
13325 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
13326
13327 2014-02-12 Tom Tromey <tromey@redhat.com>
13328
13329 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
13330 convert_int_to_ascii.
13331 * regcache.c (registers_to_string, collect_register_as_string):
13332 Likewise.
13333 * remote-utils.c (look_up_one_symbol, relocate_instruction):
13334 Likewise.
13335 * server.c (process_serial_event): Likewise.
13336 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
13337 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
13338
13339 2014-02-12 Tom Tromey <tromey@redhat.com>
13340
13341 * remote-utils.c (look_up_one_symbol, monitor_output): Use
13342 bin2hex, not hexify.
13343 * tracepoint.c (cmd_qtstatus): Likewise.
13344
13345 2014-02-12 Tom Tromey <tromey@redhat.com>
13346
13347 * remote-utils.c (monitor_output): Pass explicit length to
13348 hexify.
13349
13350 2014-02-12 Tom Tromey <tromey@redhat.com>
13351
13352 * tracepoint.c: Include rsp-low.h.
13353 * server.c: Include rsp-low.h.
13354 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
13355 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
13356 declare.
13357 * remote-utils.c: Include rsp-low.h.
13358 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
13359 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
13360 (convert_int_to_ascii, convert_ascii_to_int): Move to
13361 common/rsp-low.c.
13362 * regcache.c: Include rsp-low.h.
13363 * ax.c: Include rsp-low.h.
13364 * Makefile.in (SFILES): Add common/rsp-low.c.
13365 (OBS): Add rsp-low.o.
13366 (rsp-low.o): New target.
13367
13368 2014-02-12 Tom Tromey <tromey@redhat.com>
13369
13370 * utils.h (pulongest, plongest, phex_nz): Don't declare.
13371 Include print-utils.h.
13372 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
13373 (plongest, thirty_two, phex_nz): Remove.
13374 * Makefile.in (SFILES): Add common/print-utils.c.
13375 (OBS): Add print-utils.o.
13376 (print-utils-ipa.o): New target.
13377 (print-utils.o): New target.
13378 (IPA_OBJS): Add print-utils-ipa.o.
13379
13380 2014-02-06 Tom Tromey <tromey@redhat.com>
13381
13382 * Makefile.in (SFILES): Fix indentation.
13383
13384 2014-02-05 Doug Evans <dje@google.com>
13385
13386 * linux-low.c (linux_wait_for_event): Improve comment.
13387 (linux_wait_1): Keep current_inferior in sync with event_child.
13388
13389 2014-01-22 Doug Evans <dje@google.com>
13390
13391 * gdbthread.h (gdb_id_to_thread): Delete, unused.
13392
13393 2014-01-22 Doug Evans <dje@google.com>
13394
13395 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
13396 * configure: Regenerate.
13397 * config.in: Regenerate.
13398 * Makefile.in (SFILES): Add debug.c.
13399 (OBS): Add debug.o.
13400 * debug.c: New file.
13401 * debug.h: New file.
13402 * linux-aarch64-low.c (*): Update all debugging printfs to use
13403 debug_printf instead of fprintf.
13404 * linux-arm-low.c (*): Ditto.
13405 * linux-cris-low.c (*): Ditto.
13406 * linux-crisv32-low.c (*): Ditto.
13407 * linux-m32r-low.c (*): Ditto.
13408 * linux-sparc-low.c (*): Ditto.
13409 * linux-x86.c (*): Ditto.
13410 * linux-low.c (*): Ditto.
13411 (linux_wait_1): Add calls to debug_enter, debug_exit.
13412 (linux_wait): Remove redundant debugging printf.
13413 (stop_all_lwps): Add calls to debug_enter, debug_exit.
13414 (linux_resume, unstop_all_lwps): Ditto.
13415 * mem-break.c (*): Update all debugging printfs to use
13416 debug_printf instead of fprintf.
13417 * remote-utils.c (*): Ditto.
13418 * thread-db.c (*): Ditto.
13419 * server.c #include <ctype.h>, "gdb_vecs.h".
13420 (debug_threads): Moved to debug.c.
13421 (*): Update all debugging printfs to use debug_printf instead of
13422 fprintf.
13423 (start_inferior): Replace call to fflush with call to debug_flush.
13424 (monitor_show_help): Mention set debug-format.
13425 (parse_debug_format_options): New function.
13426 (handle_monitor_command): Handle "monitor set debug-format".
13427 (gdbserver_usage): Mention --debug-format.
13428 (main): Parse --debug-format.
13429 * server.h (debug_threads): Declaration moved to debug.h.
13430 #include "debug.h".
13431 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
13432 trace_debug_1 that uses debug_printf.
13433 (tracepoint_look_up_symbols): Update all debugging printfs to use
13434 debug_printf instead of fprintf.
13435
13436 2014-01-20 Baruch Siach <baruch@tkos.co.il>
13437
13438 * linux-xtensa-low.c: Include asm/ptrace.h instead of
13439 sys/ptrace.h.
13440
13441 2014-01-17 Pedro Alves <palves@redhat.com>
13442
13443 PR build/16445
13444 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
13445 defined after including gdb_proc_service.h.
13446
13447 2014-01-16 Doug Evans <dje@google.com>
13448
13449 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
13450 (match_dll): Use it.
13451
13452 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
13453
13454 * target.h (target_ops) <read_btrace>: Change parameters and
13455 return type to allow error reporting.
13456 * server.c (handle_qxfer_btrace): Support delta reads. Pass
13457 trace reading errors on.
13458 * linux-low.c (linux_low_read_btrace): Pass trace reading
13459 errors on.
13460 (linux_low_disable_btrace): New.
13461
13462 2014-01-15 Doug Evans <dje@google.com>
13463
13464 * inferiors.c (thread_id_to_gdb_id): Delete.
13465 * inferiors.h (thread_id_to_gdb_id): Delete.
13466
13467 2014-01-13 Eli Zaretskii <eliz@gnu.org>
13468
13469 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
13470 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
13471 versions.
13472
13473 2014-01-08 Pedro Alves <palves@redhat.com>
13474
13475 * server.c (handle_status): Don't discard previous queued stop
13476 replies or thread's pending status here.
13477 (main) <disconnection>: Do it here instead.
13478
13479 2014-01-08 Pedro Alves <palves@redhat.com>
13480
13481 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
13482 * server.c (visit_actioned_threads, handle_pending_status): New
13483 function.
13484 (handle_v_cont): Factor out parts to ...
13485 (resume): ... this new function. If in all-stop, and a thread
13486 being resumed has a pending status, report it without actually
13487 resuming.
13488 (myresume): Adjust to use the new 'resume' function.
13489 (clear_pending_status_callback, set_pending_status_callback)
13490 (find_status_pending_thread_callback): New functions.
13491 (handle_status): Handle the case of multiple threads having
13492 interesting statuses to report. Report threads' real last signal
13493 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
13494 with an interesting thread to report the status for, instead of
13495 always reporting the status of the first thread.
13496
13497 2014-01-01 Joel Brobecker <brobecker@adacore.com>
13498
13499 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
13500 * gdbreplay.c (gdbreplay_version): Likewise.
13501
13502 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
13503
13504 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
13505 iov.iov_len with the real length in use.
13506
13507 2013-12-13 Joel Brobecker <brobecker@adacore.com>
13508
13509 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
13510 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
13511 for all targets that use win32-low.c.
13512 * win32-low.c (win32_ensure_ntdll_loaded): New function.
13513 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
13514
13515 2013-12-13 Pedro Alves <palves@redhat.com>
13516
13517 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
13518 if equal to TARGET_WAITKIND_LOADED.
13519 * win32-low.c (cached_status): New static global.
13520 (win32_wait): Add declaration.
13521 (do_initial_child_stuff): Flush all initial pending debug events
13522 up to the initial breakpoint.
13523 (win32_wait): If CACHED_STATUS was set, return that instead
13524 of doing a real wait. Remove the code resuming the execution
13525 of the inferior after receiving a TARGET_WAITKIND_LOADED event
13526 during the initial phase. Also remove the code changing
13527 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
13528 TARGET_WAITKIND_STOPPED.
13529
13530 2013-12-11 Yao Qi <yao@codesourcery.com>
13531
13532 * notif.c (handle_notif_ack): Return 0 if no notification
13533 matches.
13534
13535 2013-11-20 Doug Evans <dje@google.com>
13536
13537 * linux-low.c (linux_set_resume_request): Fix comment.
13538
13539 2013-11-20 Doug Evans <dje@google.com>
13540
13541 * linux-low.c (resume_status_pending_p): Tweak comment.
13542
13543 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
13544
13545 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
13546 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
13547 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
13548 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
13549 (srv_amd64_regobj): Add amd64-mpx.o.
13550 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
13551 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
13552 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
13553 * i387-fp.c (num_pl_bnd_register) Added constant.
13554 (num_pl_bnd_cfg_registers) Added constant.
13555 (struct i387_xsave) Added reserved area and MPX fields.
13556 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
13557 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
13558 function.
13559 (tdesc_i386_mpx_linux): Add MPX amd64 target.
13560 (init_registers_amd64_mpx_linux): Declare new function.
13561 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
13562 (x86_64_regmap): Add MPX registers.
13563 (x86_linux_read_description): Add MPX case.
13564 (initialize_low_arch): Initialize MPX targets.
13565
13566 2013-11-18 Tom Tromey <tromey@redhat.com>
13567
13568 * configure: Rebuild.
13569 * configure.ac: Don't check for stdlib.h.
13570 * gdbreplay.c: Unconditionally include stdlib.h.
13571
13572 2013-11-18 Tom Tromey <tromey@redhat.com>
13573
13574 * config.in: Rebuild.
13575 * configure: Rebuild.
13576 * configure.ac: Don't use AC_HEADER_DIRENT.
13577
13578 2013-11-18 Tom Tromey <tromey@redhat.com>
13579
13580 * server.h: Don't check HAVE_STRING_H.
13581 * gdbreplay.c: Don't check HAVE_STRING_H.
13582 * configure: Rebuild.
13583
13584 2013-11-18 Tom Tromey <tromey@redhat.com>
13585
13586 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
13587 LIBGNU.
13588
13589 2013-11-08 Tom Tromey <tromey@redhat.com>
13590
13591 * configure, config.in: Rebuild.
13592 * configure.ac: Remove unused configury.
13593
13594 2013-11-08 Tom Tromey <tromey@redhat.com>
13595
13596 * acinclude.m4: Include common.m4, codeset.m4.
13597 * configure, config.in: Rebuild.
13598 * configure.ac: Use GDB_AC_COMMON.
13599
13600 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
13601
13602 * linux-s390-low.c (HWCAP_S390_TE): New define.
13603 (s390_arch_setup): Consider the TE field in the HWCAP for
13604 determining 'have_regset_tdb'.
13605
13606 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
13607
13608 PR gdb/16014
13609 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
13610 call to sizeof.
13611
13612 2013-10-02 Pedro Alves <palves@redhat.com>
13613
13614 * server.c (process_serial_event): Don't output "GDBserver
13615 exiting" if GDB is connected through stdio.
13616 * target.c (mywait): Likewise, be silent if GDB is connected
13617 through stdio.
13618
13619 2013-10-01 Joel Brobecker <brobecker@adacore.com>
13620
13621 * lynx-low.c (lynx_add_threads_after_attach): New function.
13622 (lynx_attach): Remove call to add_thread. Add call to
13623 lynx_add_threads_after_attach instead.
13624
13625 2013-09-28 Mike Frysinger <vapier@gentoo.org>
13626
13627 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
13628 * config.in, configure: Regenerated.
13629
13630 2013-09-18 Yao Qi <yao@codesourcery.com>
13631
13632 PR server/15959
13633 * server.c (start_inferior): Clear 'resume_info'.
13634
13635 2013-09-16 Jiong Wang <jiwang@tilera.com>
13636
13637 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
13638 for each register.
13639
13640 2013-09-16 Jiong Wang <jiwang@tilera.com>
13641
13642 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
13643 linux-tile-low.o to srv_tgtobj.
13644
13645 2013-09-16 Will Newton <will.newton@linaro.org>
13646
13647 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
13648 out regs.
13649
13650 2013-09-06 Pedro Alves <palves@redhat.com>
13651
13652 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
13653 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
13654 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
13655 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
13656 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
13657 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
13658
13659 2013-09-06 Pedro Alves <palves@redhat.com>
13660
13661 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
13662 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
13663
13664 2013-09-06 Pedro Alves <palves@redhat.com>
13665
13666 * linux-amd64-ipa.c: Include tracepoint.h.
13667 * linux-i386-ipa.c: Include tracepoint.h.
13668
13669 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13670
13671 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
13672 (ps_get_thread_area): New function.
13673
13674 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13675
13676 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
13677 (initialize_low_arch): Call init_registers_crisv32 rather than
13678 init_register_crisv32.
13679
13680 2013-09-05 Pedro Alves <palves@redhat.com>
13681
13682 * server.h (handle_vFile, hostio_last_error_from_errno): Move
13683 to ...
13684 * hostio.h: ... this new file.
13685 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
13686 win32-low.c: Include hostio.h.
13687
13688 2013-09-05 Pedro Alves <palves@redhat.com>
13689
13690 * server.h (gdb_client_data, handler_func, callback_handler_func)
13691 (delete_file_handler, add_file_handler, append_callback_event)
13692 (delete_callback_event, start_event_loop, initialize_event_loop):
13693 Move to event-loop.h and include it.
13694 * event-loop.h: New file.
13695
13696 2013-09-05 Pedro Alves <palves@redhat.com>
13697
13698 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
13699 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
13700 (loaded_dll, unloaded_dll): Move to ...
13701 * dll.h: ... this new file.
13702 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
13703
13704 2013-09-05 Pedro Alves <palves@redhat.com>
13705
13706 * server.h (current_process, get_thread_process, all_processes)
13707 (add_inferior_to_list, for_each_inferior, current_inferior)
13708 (remove_inferior, add_process, remove_process, find_process_pid)
13709 (have_started_inferiors_p, have_attached_inferiors_p)
13710 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
13711 (clear_inferiors, find_inferior, find_inferior_id)
13712 (inferior_target_data, set_inferior_target_data)
13713 (inferior_regcache_data, set_inferior_regcache_data): Move to
13714 inferiors.h, and include it.
13715 * inferiors.h: New file.
13716
13717 2013-09-05 Pedro Alves <palves@redhat.com>
13718
13719 * server.h (struct emit_ops, current_insn_ptr, emit_error):
13720 Move ...
13721 * ax.h: ... here.
13722
13723 2013-09-05 Pedro Alves <palves@redhat.com>
13724
13725 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
13726 tracepoint.h.
13727 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
13728 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
13729 (handle_tracepoint_general_set, handle_tracepoint_query)
13730 (tracepoint_finished_step, tracepoint_was_hit)
13731 (release_while_stepping_state_list, current_traceframe)
13732 (in_readonly_region, traceframe_read_mem)
13733 (fetch_traceframe_registers, traceframe_read_sdata)
13734 (traceframe_read_info, struct fast_tpoint_collect_status)
13735 (fast_tracepoint_collecting, force_unlock_trace_buffer)
13736 (handle_tracepoit_bkpts, initialize_low_tracepoint)
13737 (supply_fast_tracepoint_registers)
13738 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
13739 (ipa_tdesc, claim_trampoline_space)
13740 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
13741 (agent_mem_read, agent_get_trace_state_variable_value)
13742 (agent_set_trace_state_variable_value, agent_tsv_read)
13743 (agent_mem_read_string, get_raw_reg_func_addr)
13744 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
13745 * tracepoint.h: ... this new file.
13746
13747 2013-09-05 Pedro Alves <palves@redhat.com>
13748
13749 * server.h (perror_with_name, error, fatal, warning, paddress)
13750 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
13751 include it.
13752 * utils.h: New file.
13753
13754 2013-09-05 Pedro Alves <palves@redhat.com>
13755
13756 * server.h (remote_debug, noack_mode, transport_is_reliable)
13757 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
13758 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
13759 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
13760 (write_enn, initialize_async_io, enable_async_io)
13761 (disable_async_io, check_remote_input_interrupt_request)
13762 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
13763 (dead_thread_notify, prepare_resume_reply)
13764 (decode_address_to_semicolon, decode_address, decode_m_packet)
13765 (decode_M_packet, decode_X_packet, decode_xfer_write)
13766 (decode_search_memory_packet, unhexify, hexify)
13767 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
13768 (look_up_one_symbol, relocate_instruction)
13769 (monitor_output): Move to remote-utils.h, and include it.
13770 * remote-utils.h: New file.
13771
13772 2013-09-05 Pedro Alves <palves@redhat.com>
13773
13774 * server.h (_): Delete.
13775
13776 2013-09-02 Pedro Alves <palves@redhat.com>
13777
13778 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
13779 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
13780 allocated.
13781 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
13782
13783 2013-09-02 Pierre Muller <muller@sourceware.org>
13784
13785 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
13786 or WriteProcessMemory complete successfully and handle
13787 ERROR_PARTIAL_COPY error.
13788
13789 2013-09-02 Pedro Alves <palves@redhat.com>
13790
13791 * server.c (gdb_read_memory): Return -1 on traceframe memory read
13792 error instead of EIO.
13793
13794 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13795
13796 PR server/15604
13797 * linux-low.c: Include filestuff.h.
13798 (linux_create_inferior) <pid == 0>: Call close_most_fds.
13799 * lynx-low.c: Include filestuff.h.
13800 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
13801 * server.c: Include filestuff.h.
13802 (main): Call notice_open_fds.
13803 * spu-low.c: Include filestuff.h.
13804 (spu_create_inferior) <pid == 0>: Call close_most_fds.
13805
13806 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
13807
13808 * Makefile.in: Explain why ../target and ../nat are not
13809 listed as include file search paths.
13810 (linux-waitpid.o): New object file rule.
13811 * configure.srv (srv_native_linux_obj): New variable.
13812 Replace all occurrences of linux native object files with
13813 $srv_native_linux_obj.
13814 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
13815 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
13816 (linux_enable_event_reporting): Remove declaration.
13817 (my_waitpid): Moved to common/linux-waitpid.c.
13818 (linux_wait_for_event): Pass ptid when calling
13819 linux_enable_event_reporting.
13820 (linux_supports_tracefork_flag): Remove.
13821 (linux_enable_event_reporting): Likewise.
13822 (linux_tracefork_grandchild): Remove.
13823 (STACK_SIZE): Moved to common/linux-ptrace.c.
13824 (linux_tracefork_child): Remove.
13825 (linux_test_for_tracefork): Remove.
13826 (linux_look_up_symbols): Call linux_supports_traceclone.
13827 (initialize_low): Remove call to linux_test_for_tracefork.
13828 * linux-low.h (PTRACE_TYPE_ARG3): Move to
13829 common/linux-ptrace.h.
13830 (PTRACE_TYPE_ARG4): Likewise.
13831 Include linux-ptrace.h.
13832
13833 2013-08-21 Pedro Alves <palves@redhat.com>
13834
13835 * config.in: Renegerate.
13836
13837 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
13838
13839 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
13840 (SFILES): Remove $(srcdir)/common/target-common.c and
13841 add $(srcdir)/target/waitstatus.c.
13842 (OBS): Remove target-common.o and add waitstatus.o.
13843 (server_h): Remove $(srcdir)/../common/target-common.h and
13844 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
13845 and $(srcdir)/../target/waitstatus.h.
13846 (target-common.o): Remove.
13847 (waitstatus.o): New target object file.
13848 * target.h: Do not include target-common.h and
13849 include target/resume.h, target/wait.h and
13850 target/waitstatus.h.
13851
13852 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
13853
13854 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13855 to PTRACE_TYPE_ARG3.
13856 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13857 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
13858 PTRACE_TYPE_ARG4.
13859 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
13860 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
13861
13862 2013-07-27 Jie Zhang <jie@codesourcery.com>
13863 Daniel Jacobowitz <dan@codesourcery.com>
13864 Yao Qi <yao@codesourcery.com>
13865
13866 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
13867 (mips-linux-watch.o): New rule.
13868 (mips_linux_watch_h): New variable.
13869 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
13870 srv_tgtobj.
13871 * linux-mips-low.c: Include mips-linux-watch.h.
13872 (struct arch_process_info, struct arch_lwp_info): New.
13873 (update_watch_registers_callback): New function.
13874 (mips_linux_new_process, mips_linux_new_thread) New functions.
13875 (mips_linux_prepare_to_resume, mips_insert_point): New
13876 functions.
13877 (mips_remove_point, mips_stopped_by_watchpoint): New
13878 functions.
13879 (rsp_bp_type_to_target_hw_bp_type): New function.
13880 (mips_stopped_data_address): New function.
13881 (the_low_target): Add watchpoint support functions.
13882
13883 2013-07-27 Yao Qi <yao@codesourcery.com>
13884
13885 * i386-low.c: Include break-common.h.
13886 (enum target_hw_bp_type): Remove.
13887
13888 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
13889
13890 * Makefile.in (SFILES): /common/target-common.c.
13891 (OBS): Add target-common.o.
13892 (server_h): Add $(srcdir)/../common/target-common.h.
13893 (target-common.o): New target.
13894 * server.c (queue_stop_reply_callback): Free
13895 status string after use.
13896 * target.c (target_waitstatus_to_string): Remove.
13897 * target.h: Include target-common.h.
13898 (resume_kind): Likewise.
13899 (target_waitkind): Likewise.
13900 (target_waitstatus): Likewise.
13901 (TARGET_WNOHANG): Likewise.
13902
13903 2013-07-04 Yao Qi <yao@codesourcery.com>
13904
13905 * Makefile.in (host_alias): Use @host_noncanonical@.
13906 (target_alias): Use @target_noncanonical@.
13907 * configure.ac: Use ACX_NONCANONICAL_TARGET and
13908 ACX_NONCANONICAL_HOST.
13909 * configure: Regenerated.
13910
13911 Revert:
13912 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13913
13914 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13915 * configure: Rebuild.
13916 * Makefile.in (version_host, version_target): Get from configure.
13917 (version.c): Use $(version_host) and $(version_target).
13918
13919 2013-07-03 Pedro Alves <palves@redhat.com>
13920
13921 * Makefile.in (config.status): Depend on development.sh.
13922 * acinclude.m4: Include libmcheck.m4.
13923 * configure: Regenerate.
13924
13925 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13926
13927 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
13928 attribute inside the parentheses.
13929 (winapi_DebugSetProcessKillOnExit): Ditto.
13930 (winapi_DebugBreakProcess): Ditto.
13931 (winapi_GenerateConsoleCtrlEvent): Ditto.
13932
13933 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13934
13935 * notif.h (notif_event): Add a dummy member to avoid compiler
13936 errors.
13937
13938 2013-07-01 Pedro Alves <palves@redhat.com>
13939
13940 * hostio.c (HOSTIO_PATH_MAX): Define.
13941 (require_filename, handle_open, handle_unlink, handle_readlink):
13942 Use it.
13943
13944 2013-07-01 Pedro Alves <palves@redhat.com>
13945
13946 * server.h: Include "pathmax.h".
13947 * linux-low.c: Don't include sys/param.h.
13948 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
13949 MAXPATHLEN.
13950 * win32-low.c: Don't include sys/param.h.
13951 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
13952
13953 2013-07-01 Pedro Alves <palves@redhat.com>
13954
13955 * event-loop.c: Don't check HAVE_UNISTD_H before including
13956 <unistd.h>.
13957 * gdbreplay.c: Likewise.
13958 * remote-utils.c: Likewise.
13959 * server.c: Likewise.
13960 * configure.ac: Don't check for unistd.h.
13961 * configure: Regenerate.
13962
13963 2013-06-28 Tom Tromey <tromey@redhat.com>
13964
13965 * Makefile.in (version.c): Use version.in, not
13966 common/version.in.
13967
13968 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13969
13970 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13971 * configure: Rebuild.
13972 * Makefile.in (version_host, version_target): Get from configure.
13973 (version.c): Use $(version_host) and $(version_target).
13974
13975 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
13976
13977 Fix trace-status to output user name without trailing colon.
13978 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
13979
13980 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
13981
13982 Fix trace-status to output proper start-time and stop-time.
13983 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
13984 output start time and stop time in hex as gdb expects.
13985
13986 2013-06-26 Pedro Alves <pedro@codesourcery.com>
13987
13988 * tracepoint.c (build_traceframe_info_xml): Output trace state
13989 variables present in the trace buffer.
13990
13991 2013-06-24 Tom Tromey <tromey@redhat.com>
13992
13993 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
13994 create-version.sh.
13995 (version.o): Remove.
13996 * gdbreplay.c: Include version.h.
13997 (version, host_name): Don't declare.
13998 * server.h: Include version.h.
13999 (version, host_name): Don't declare.
14000
14001 2013-06-12 Pedro Alves <palves@redhat.com>
14002
14003 * linux-x86-low.c (linux_is_elf64): Delete global.
14004 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
14005 with local linux_pid_exe_is_elf_64_file use.
14006
14007 2013-06-11 Pedro Alves <palves@redhat.com>
14008
14009 * linux-low.c (regset_disabled, disable_regset): New functions.
14010 (regsets_fetch_inferior_registers)
14011 (regsets_store_inferior_registers): Use them.
14012 (initialize_regsets_info); Don't allocate the disabled_regsets
14013 array here.
14014 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
14015 comment.
14016
14017 2013-06-11 Pedro Alves <palves@redhat.com>
14018
14019 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
14020 xmalloc.
14021
14022 2013-06-11 Pedro Alves <palves@redhat.com>
14023
14024 * linux-x86-low.c (initialize_low_arch): Call
14025 init_registers_x32_avx_linux.
14026
14027 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
14028
14029 Fix compatibility with Android Bionic.
14030 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
14031 it is not empty.
14032
14033 2013-06-07 Pedro Alves <palves@redhat.com>
14034
14035 PR server/14823
14036 * Makefile.in (OBS): Add tdesc.o.
14037 (IPA_OBJS): Add tdesc-ipa.o.
14038 (tdesc-ipa.o): New rule.
14039 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
14040 interface.
14041 * linux-low.c (new_inferior): Delete.
14042 (disabled_regsets, num_regsets): Delete.
14043 (linux_add_process): Adjust to set the new per-process
14044 new_inferior flag.
14045 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
14046 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
14047 was a stop. When calling arch_setup, switch the current inferior
14048 to the thread that got an event.
14049 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
14050 (regsets_fetch_inferior_registers)
14051 (regsets_store_inferior_registers): New regsets_info parameter.
14052 Adjust to use it.
14053 (linux_register_in_regsets): New regs_info parameter. Adjust to
14054 use it.
14055 (register_addr, fetch_register, store_register): New usrregs_info
14056 parameter. Adjust to use it.
14057 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
14058 parameter regs_info. Adjust to use it.
14059 (linux_fetch_registers): Get the current inferior's regs_info, and
14060 adjust to use it.
14061 (linux_store_registers): Ditto.
14062 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
14063 (initialize_low): Don't initialize the target_regsets here. Call
14064 initialize_low_arch.
14065 * linux-low.h (target_regsets): Delete declaration.
14066 (struct regsets_info): New.
14067 (struct usrregs_info): New.
14068 (struct regs_info): New.
14069 (struct process_info_private) <new_inferior>: New field.
14070 (struct linux_target_ops): Delete the num_regs, regmap, and
14071 regset_bitmap fields. New field regs_info.
14072 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
14073 * i387-fp.c (num_xmm_registers): Delete.
14074 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
14075 calls to new interface.
14076 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
14077 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
14078 Infer the number of xmm registers from the regcache's target
14079 description.
14080 * i387-fp.h (num_xmm_registers): Delete.
14081 * inferiors.c (add_thread): Don't install the thread's regcache
14082 here.
14083 * proc-service.c (gregset_info): Fetch the current inferior's
14084 regs_info. Adjust to use it.
14085 * regcache.c: Include tdesc.h.
14086 (register_bytes, reg_defs, num_registers)
14087 (gdbserver_expedite_regs): Delete.
14088 (get_thread_regcache): If the thread doesn't have a regcache yet,
14089 create one, instead of aborting gdbserver.
14090 (regcache_invalidate_one): Rename to ...
14091 (regcache_invalidate_thread): ... this.
14092 (regcache_invalidate_one): New.
14093 (regcache_invalidate): Only invalidate registers of the current
14094 process.
14095 (init_register_cache): Add target_desc parameter, and use it.
14096 (new_register_cache): Ditto. Assert the target description has a
14097 non zero registers_size.
14098 (regcache_cpy): Add assertions. Adjust.
14099 (realloc_register_cache, set_register_cache): Delete.
14100 (registers_to_string, registers_from_string): Adjust.
14101 (find_register_by_name, find_regno, find_register_by_number)
14102 (register_cache_size): Add target_desc parameter, and use it.
14103 (free_register_cache_thread, free_register_cache_thread_one)
14104 (regcache_release, register_cache_size): New.
14105 (register_size): Add target_desc parameter, and use it.
14106 (register_data, supply_register, supply_register_zeroed)
14107 (supply_regblock, supply_register_by_name, collect_register)
14108 (collect_register_as_string, collect_register_by_name): Adjust.
14109 * regcache.h (struct target_desc): Forward declare.
14110 (struct regcache) <tdesc>: New field.
14111 (init_register_cache, new_register_cache): Add target_desc
14112 parameter.
14113 (regcache_invalidate_thread): Declare.
14114 (regcache_invalidate_one): Delete declaration.
14115 (regcache_release): Declare.
14116 (find_register_by_number, register_cache_size, register_size)
14117 (find_regno): Add target_desc parameter.
14118 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
14119 declarations.
14120 * remote-utils.c: Include tdesc.h.
14121 (outreg, prepare_resume_reply): Adjust.
14122 * server.c: Include tdesc.h.
14123 (gdbserver_xmltarget): Delete declaration.
14124 (get_features_xml, process_serial_event): Adjust.
14125 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
14126 declare.
14127 (struct process_info) <tdesc>: New field.
14128 (ipa_tdesc): Declare.
14129 * tdesc.c: New file.
14130 * tdesc.h: New file.
14131 * tracepoint.c: Include tdesc.h.
14132 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
14133 (get_context_regcache): Adjust to pass ipa_tdesc down.
14134 (do_action_at_tracepoint): Adjust to get the register cache size
14135 from the context regcache's description.
14136 (traceframe_walk_blocks): Adjust to get the register cache size
14137 from the current trace frame's description.
14138 (traceframe_get_pc): Adjust to get current trace frame's
14139 description and pass it down.
14140 (gdb_collect): Adjust to get the register cache size from the
14141 IPA's description.
14142 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
14143 (gdbserver_xmltarget): Delete.
14144 (initialize_low_tracepoint): Set the ipa's target description.
14145 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
14146 (initialize_low_tracepoint): Set the ipa's target description.
14147 * linux-x86-low.c: Include tdesc.h.
14148 [__x86_64__] (is_64bit_tdesc): New.
14149 (ps_get_thread_area, x86_get_thread_area): Use it.
14150 (i386_cannot_store_register): Rename to ...
14151 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
14152 (i386_cannot_fetch_register): Rename to ...
14153 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
14154 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
14155 to new interface.
14156 (target_regsets): Rename to ...
14157 (x86_regsets): ... this.
14158 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
14159 interface.
14160 (x86_siginfo_fixup): Use is_64bit_tdesc.
14161 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
14162 (tdesc_x32_avx_linux, tdesc_x32_linux)
14163 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
14164 Declare.
14165 (x86_linux_update_xmltarget): Delete.
14166 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
14167 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
14168 (AMD64_LINUX_USER64_CS): New.
14169 (x86_linux_read_description): New, based on
14170 x86_linux_update_xmltarget.
14171 (same_process_callback): New.
14172 (x86_arch_setup_process_callback): New.
14173 (x86_linux_update_xmltarget): New.
14174 (x86_regsets_info): New.
14175 (amd64_linux_regs_info): New.
14176 (i386_linux_usrregs_info): New.
14177 (i386_linux_regs_info): New.
14178 (x86_linux_regs_info): New.
14179 (x86_arch_setup): Reimplement.
14180 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
14181 (x86_emit_ops): Ditto.
14182 (the_low_target): Adjust. Install x86_linux_regs_info,
14183 x86_cannot_fetch_register, and x86_cannot_store_register.
14184 (initialize_low_arch): New.
14185 * linux-ia64-low.c (tdesc_ia64): Declare.
14186 (ia64_fetch_register): Adjust.
14187 (ia64_usrregs_info, regs_info): New globals.
14188 (ia64_regs_info): New function.
14189 (the_low_target): Adjust.
14190 (initialize_low_arch): New function.
14191 * linux-sparc-low.c (tdesc_sparc64): Declare.
14192 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
14193 Adjust.
14194 (sparc_arch_setup): New function.
14195 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
14196 (the_low_target): Adjust.
14197 (initialize_low_arch): New function.
14198 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
14199 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
14200 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
14201 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
14202 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
14203 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
14204 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
14205 (tdesc_powerpc_isa205_vsx64l): Declare.
14206 (ppc_cannot_store_register, ppc_collect_ptrace_register)
14207 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
14208 (ppc_set_pc, ppc_get_hwcap): Adjust.
14209 (ppc_usrregs_info): Forward declare.
14210 (!__powerpc64__) ppc_regmap_adjusted: New global.
14211 (ppc_arch_setup): Adjust to the current process'es target
14212 description.
14213 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
14214 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
14215 (ppc_store_evrregset): Adjust.
14216 (target_regsets): Rename to ...
14217 (ppc_regsets): ... this, and make static.
14218 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
14219 (ppc_regs_info): New function.
14220 (the_low_target): Adjust.
14221 (initialize_low_arch): New function.
14222 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
14223 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
14224 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
14225 (tdesc_s390x_linux64v2): Declare.
14226 (s390_collect_ptrace_register, s390_supply_ptrace_register)
14227 (s390_fill_gregset, s390_store_last_break): Adjust.
14228 (target_regsets): Rename to ...
14229 (s390_regsets): ... this, and make static.
14230 (s390_get_pc, s390_set_pc): Adjust.
14231 (s390_get_hwcap): New target_desc parameter, and use it.
14232 [__s390x__] (have_hwcap_s390_high_gprs): New global.
14233 (s390_arch_setup): Adjust to set the current process'es target
14234 description. Don't adjust the regmap.
14235 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
14236 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
14237 (regs_info_3264): New globals.
14238 (s390_regs_info): New function.
14239 (the_low_target): Adjust.
14240 (initialize_low_arch): New function.
14241 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
14242 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
14243 [__mips64] (init_registers_mips_linux)
14244 (init_registers_mips_dsp_linux): Delete defines.
14245 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
14246 (have_dsp): New global.
14247 (mips_read_description): New, based on mips_arch_setup.
14248 (mips_arch_setup): Reimplement.
14249 (get_usrregs_info): New function.
14250 (mips_cannot_fetch_register, mips_cannot_store_register)
14251 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
14252 (mips_fill_fpregset, mips_store_fpregset): Adjust.
14253 (target_regsets): Rename to ...
14254 (mips_regsets): ... this, and make static.
14255 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
14256 (dsp_regs_info, regs_info): New globals.
14257 (mips_regs_info): New function.
14258 (the_low_target): Adjust.
14259 (initialize_low_arch): New function.
14260 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
14261 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
14262 Declare.
14263 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
14264 (arm_read_description): New, with bits factored from
14265 arm_arch_setup.
14266 (arm_arch_setup): Reimplement.
14267 (target_regsets): Rename to ...
14268 (arm_regsets): ... this, and make static.
14269 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
14270 (arm_regs_info): New function.
14271 (the_low_target): Adjust.
14272 (initialize_low_arch): New function.
14273 * linux-m68k-low.c (tdesc_m68k): Declare.
14274 (target_regsets): Rename to ...
14275 (m68k_regsets): ... this, and make static.
14276 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
14277 (m68k_regs_info): New function.
14278 (m68k_arch_setup): New function.
14279 (the_low_target): Adjust.
14280 (initialize_low_arch): New function.
14281 * linux-sh-low.c (tdesc_sharch): Declare.
14282 (target_regsets): Rename to ...
14283 (sh_regsets): ... this, and make static.
14284 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
14285 (sh_regs_info, sh_arch_setup): New functions.
14286 (the_low_target): Adjust.
14287 (initialize_low_arch): New function.
14288 * linux-bfin-low.c (tdesc_bfin): Declare.
14289 (bfin_arch_setup): New function.
14290 (bfin_usrregs_info, regs_info): New globals.
14291 (bfin_regs_info): New function.
14292 (the_low_target): Adjust.
14293 (initialize_low_arch): New function.
14294 * linux-cris-low.c (tdesc_cris): Declare.
14295 (cris_arch_setup): New function.
14296 (cris_usrregs_info, regs_info): New globals.
14297 (cris_regs_info): New function.
14298 (the_low_target): Adjust.
14299 (initialize_low_arch): New function.
14300 * linux-cris-low.c (tdesc_crisv32): Declare.
14301 (cris_arch_setup): New function.
14302 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
14303 (cris_regs_info): New function.
14304 (the_low_target): Adjust.
14305 (initialize_low_arch): New function.
14306 * linux-m32r-low.c (tdesc_m32r): Declare.
14307 (m32r_arch_setup): New function.
14308 (m32r_usrregs_info, regs_info): New globals.
14309 (m32r_regs_info): Adjust.
14310 (initialize_low_arch): New function.
14311 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
14312 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
14313 (tic6x_usrregs_info): Forward declare.
14314 (tic6x_read_description): New function, based on ...
14315 (tic6x_arch_setup): ... this. Reimplement.
14316 (target_regsets): Rename to ...
14317 (tic6x_regsets): ... this, and make static.
14318 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
14319 (tic6x_regs_info): New function.
14320 (the_low_target): Adjust.
14321 (initialize_low_arch): New function.
14322 * linux-xtensa-low.c (tdesc_xtensa): Declare.
14323 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
14324 (target_regsets): Rename to ...
14325 (xtensa_regsets): ... this, and make static.
14326 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
14327 globals.
14328 (xtensa_arch_setup, xtensa_regs_info): New functions.
14329 (the_low_target): Adjust.
14330 (initialize_low_arch): New function.
14331 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
14332 (nios2_arch_setup): Set the current process'es tdesc.
14333 (target_regsets): Rename to ...
14334 (nios2_regsets): ... this.
14335 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
14336 (nios2_regs_info): New function.
14337 (the_low_target): Adjust.
14338 (initialize_low_arch): New function.
14339 * linux-aarch64-low.c (tdesc_aarch64): Declare.
14340 (aarch64_arch_setup): Set the current process'es tdesc.
14341 (target_regsets): Rename to ...
14342 (aarch64_regsets): ... this.
14343 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
14344 (aarch64_regs_info): New function.
14345 (the_low_target): Adjust.
14346 (initialize_low_arch): New function.
14347 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
14348 globals.
14349 (target_regsets): Rename to ...
14350 (tile_regsets): ... this.
14351 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
14352 (tile_regs_info): New function.
14353 (tile_arch_setup): Set the current process'es tdesc.
14354 (the_low_target): Adjust.
14355 (initialize_low_arch): New function.
14356 * spu-low.c (tdesc_spu): Declare.
14357 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
14358 * win32-arm-low.c (tdesc_arm): Declare.
14359 (arm_arch_setup): New function.
14360 (the_low_target): Install arm_arch_setup instead of
14361 init_registers_arm.
14362 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
14363 (init_windows_x86): Rename to ...
14364 (i386_arch_setup): ... this. Set `win32_tdesc'.
14365 (the_low_target): Adjust.
14366 * win32-low.c (win32_tdesc): New global.
14367 (child_add_thread): Don't create the thread cache here.
14368 (do_initial_child_stuff): Set the new process'es tdesc.
14369 * win32-low.h (struct target_desc): Forward declare.
14370 (win32_tdesc): Declare.
14371 * lynx-i386-low.c (tdesc_i386): Declare global.
14372 (lynx_i386_arch_setup): Set `lynx_tdesc'.
14373 * lynx-low.c (lynx_tdesc): New global.
14374 (lynx_add_process): Set the new process'es tdesc.
14375 * lynx-low.h (struct target_desc): Forward declare.
14376 (lynx_tdesc): Declare global.
14377 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
14378 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
14379 * nto-low.c (nto_tdesc): New global.
14380 (do_attach): Set the new process'es tdesc.
14381 * nto-low.h (struct target_desc): Forward declare.
14382 (nto_tdesc): Declare.
14383 * nto-x86-low.c (tdesc_i386): Declare.
14384 (nto_x86_arch_setup): Set `nto_tdesc'.
14385
14386 2013-06-04 Gary Benson <gbenson@redhat.com>
14387
14388 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
14389 to qSupported response when appropriate.
14390 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
14391 with nonzero-length annex.
14392 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
14393 arguments supplied in annex.
14394
14395 2013-05-31 Doug Evans <dje@google.com>
14396
14397 PR server/15594
14398 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
14399 64 bits in 64-cross-32 environment.
14400
14401 2013-05-28 Pedro Alves <palves@redhat.com>
14402
14403 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
14404 (aarch64-without-fpu.c): Delete rule.
14405 * configure.srv (aarch64*-*-linux*): Remove references to
14406 aarch64-without-fpu.o and aarch64-without-fpu.xml.
14407 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
14408 declaration.
14409
14410 2013-05-24 Pedro Alves <palves@redhat.com>
14411
14412 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
14413 instead of strchr/decode_address. Error if the range isn't split
14414 with a ','. Don't assume there's be a ':' in the action.
14415
14416 2013-05-23 Yao Qi <yao@codesourcery.com>
14417 Pedro Alves <palves@redhat.com>
14418
14419 * linux-low.c (lwp_in_step_range): New function.
14420 (linux_wait_1): If the thread was range stepping and stopped
14421 outside the stepping range, report the stop to GDB. Otherwise,
14422 continue stepping. Add range stepping debug output.
14423 (linux_set_resume_request): Copy the step range from the resume
14424 request to the lwp.
14425 (linux_supports_range_stepping): New.
14426 (linux_target_ops) <supports_range_stepping>: Set to
14427 linux_supports_range_stepping.
14428 * linux-low.h (struct linux_target_ops)
14429 <supports_range_stepping>: New field.
14430 (struct lwp_info) <step_range_start, step_range_end>: New fields.
14431 * linux-x86-low.c (x86_supports_range_stepping): New.
14432 (the_low_target) <supports_range_stepping>: Set to
14433 x86_supports_range_stepping.
14434 * server.c (handle_v_cont): Handle 'r' action.
14435 (handle_v_requests): Append ";r" if the target supports range
14436 stepping.
14437 * target.h (struct thread_resume) <step_range_start,
14438 step_range_end>: New fields.
14439 (struct target_ops) <supports_range_stepping>:
14440 New field.
14441 (target_supports_range_stepping): New macro.
14442
14443 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14444
14445 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
14446 confusion in comment.
14447
14448 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14449
14450 * lynx-low.c (struct process_info_private): New type.
14451 (lynx_add_process): New function.
14452 (lynx_create_inferior, lynx_attach): Replace calls to
14453 add_process by calls to lynx_add_process.
14454 (lynx_resume): If PTID is null, then try using
14455 current_process()->private->last_wait_event_ptid.
14456 Add comments.
14457 (lynx_clear_inferiors): Delete. The contents of that function
14458 has been inlined in lynx_mourn;
14459 (lynx_wait_1): Save the ptid in the process's private data.
14460 (lynx_mourn): Free the process' private data. Replace call
14461 to lynx_clear_inferiors by call to clear_inferiors.
14462
14463 2013-05-17 Yao Qi <yao@codesourcery.com>
14464
14465 * i386-low.c (i386_length_and_rw_bits): Move the comment to
14466 the right place.
14467
14468 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
14469
14470 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
14471 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
14472 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
14473 PT_TEXT_END_ADDR guards. Update comments.
14474 (linux_target_op) <read_offsets>: Conditionally define to
14475 linux_read_offsets if the target is UCLIBC and if it defines
14476 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
14477
14478 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
14479 Andrew Jenner <andrew@codesourcery.com>
14480
14481 * Makefile.in (SFILES): Add linux-nios2-low.c.
14482 (clean): Add action to delete nios2-linux.c.
14483 (nios2-linux.c): New rule.
14484 * configure.srv: Add nios2*-*-linux*.
14485 * linux-nios2-low.c: New.
14486
14487 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
14488
14489 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
14490
14491 2013-04-25 Hui Zhu <hui@codesourcery.com>
14492
14493 PR gdb/15186
14494 * ax.c (ax_printf): Add fflush.
14495
14496 2013-04-22 Tom Tromey <tromey@redhat.com>
14497
14498 * Makefile.in (SFILES): Add filestuff.c.
14499 (OBS): Add filestuff.o.
14500 (filestuff.o): New target.
14501 * config.in, configure: Rebuild.
14502 * configure.ac: Check for fdwalk, pipe2.
14503
14504 2013-04-17 Pedro Alves <palves@redhat.com>
14505
14506 * configure.ac (USE_THREAD_DB): Delete variable.
14507 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
14508 Don't AC_SUBST USE_THREAD_DB.
14509 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
14510 * config.in, configure: Regenerate.
14511
14512 2013-04-16 Pedro Alves <palves@redhat.com>
14513
14514 * linux-low.h (struct lwp_info) <thread_known>: Move under
14515 the USE_THREAD_DB #ifdef.
14516
14517 2013-04-16 Pedro Alves <palves@redhat.com>
14518
14519 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
14520 (linux-low.o): Delete rule.
14521 * linux-low.h: Always include "gdb_thread_db.h" instead of
14522 conditionally including thread_db.h.
14523 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
14524 HAVE_THREAD_DB_H.
14525
14526 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14527
14528 * Makefile.in (install-only): Fix make install regression.
14529
14530 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
14531
14532 Convert man pages to texinfo, new gdbinit.5 texinfo page.
14533 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
14534 installation.
14535 * gdbserver.1: Remove.
14536
14537 2013-03-22 Pedro Alves <palves@redhat.com>
14538
14539 * linux-low.c (handle_extended_wait): Don't call
14540 linux_enable_event_reporting.
14541
14542 2013-03-15 Tony Theodore <tonyt@logyst.com>
14543
14544 PR build/9098:
14545 * Makefile.in (SHELL): Use @SHELL@.
14546
14547 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
14548
14549 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
14550 compiler warning.
14551
14552 2013-03-13 Joel Brobecker <brobecker@adacore.com>
14553
14554 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
14555 Remove extraneous NULL element.
14556
14557 2013-03-13 Yao Qi <yao@codesourcery.com>
14558
14559 * tracepoint.c (traceframe_read_tsv): Look for the last matched
14560 'V' block in trace frame.
14561
14562 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14563
14564 * target.h (struct target_ops): Add btrace ops.
14565 (target_supports_btrace): New macro.
14566 (target_enable_btrace): New macro.
14567 (target_disable_btrace): New macro.
14568 (target_read_btrace): New macro.
14569 * gdbthread.h (struct thread_info): Add btrace field.
14570 * server.c: Include btrace-common.h.
14571 (handle_btrace_general_set): New function.
14572 (handle_btrace_enable): New function.
14573 (handle_btrace_disable): New function.
14574 (handle_general_set): Call handle_btrace_general_set.
14575 (handle_qxfer_btrace): New function.
14576 (struct qxfer qxfer_packets[]): Add btrace entry.
14577 * inferiors.c (remove_thread): Disable btrace.
14578 * linux-low: Include linux-btrace.h.
14579 (linux_low_enable_btrace): New function.
14580 (linux_low_read_btrace): New function.
14581 (linux_target_ops): Add btrace ops.
14582 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
14583 Add srv_linux_btrace=yes.
14584 (x86_64-*-linux*): Add linux-btrace.o.
14585 Add srv_linux_btrace=yes.
14586 * configure.ac: Define HAVE_LINUX_BTRACE.
14587 * config.in: Regenerated.
14588 * configure: Regenerated.
14589
14590 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14591
14592 * server.c (handle_qxfer): Preserve error message if -3 is
14593 returned.
14594 (qxfer): Document the -3 return value.
14595
14596 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14597
14598 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
14599 (linux_btrace_h): New variable.
14600 (linux-btrace.o): New rule.
14601
14602 2013-03-08 Stan Shebs <stan@codesourcery.com>
14603 Hafiz Abid Qadeer <abidh@codesourcery.com>
14604
14605 * tracepoint.c (trace_buffer_size): New global.
14606 (DEFAULT_TRACE_BUFFER_SIZE): New define.
14607 (init_trace_buffer): Change to one-argument function. Allocate
14608 trace buffer memory.
14609 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
14610 handle QTBuffer:size packet.
14611 (cmd_bigqtbuffer_size): New function.
14612 (initialize_tracepoint): Call init_trace_buffer with
14613 DEFAULT_TRACE_BUFFER_SIZE.
14614 * server.c (handle_query): Add QTBuffer:size in the
14615 supported packets.
14616
14617 2013-03-07 Yao Qi <yao@codesourcery.com>
14618
14619 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
14620 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
14621 of -1.
14622 (cmd_qtsp): Adjust condition. Do post increment.
14623 Set cur_action and cur_step_action back to 0.
14624
14625 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
14626
14627 PR server/15236
14628 * linux-low.c (linux_write_memory): Return early success if LEN is
14629 zero.
14630
14631 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
14632
14633 * configure.srv: Add x86_64-*-cygwin* as target.
14634
14635 2013-02-28 Tom Tromey <tromey@redhat.com>
14636
14637 * configure.ac: Invoke AC_SYS_LARGEFILE.
14638 * configure, config.in: Rebuild.
14639
14640 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
14641
14642 * win32-low.c: Throughout, fix format strings and casts of
14643 printf-like functions to avoid type related warnings on all
14644 platforms.
14645 (get_child_debug_event): Print dwDebugEventCode as hex since
14646 that's how it's usually documented.
14647
14648 2013-02-28 Yao Qi <yao@codesourcery.com>
14649
14650 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
14651 pulongest.
14652
14653 2013-02-27 Jiong Wang <jiwang@tilera.com>
14654
14655 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
14656 (reg-tilegx32.c): New rule.
14657 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
14658 * linux-tile-low.c (tile_arch_setup): New function. Invoke
14659 different register info initializer according to elf class.
14660 (init_registers_tilgx32): New function. The tilegx32 register info
14661 initializer.
14662 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
14663 (tile_store_gregset): Likewise.
14664
14665 2013-02-27 Yao Qi <yao@codesourcery.com>
14666
14667 * server.c (process_point_options): Print debug message when
14668 debug_threads is true.
14669
14670 2013-02-26 Yao Qi <yao@codesourcery.com>
14671
14672 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
14673
14674 2013-02-19 Pedro Alves <palves@redhat.com>
14675 Kai Tietz <ktietz@redhat.com>
14676
14677 PR gdb/15161
14678
14679 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
14680 instead of strtoul to extract address from packet.
14681 (process_serial_event) <'z'>: Likewise.
14682
14683 2013-02-18 Yao Qi <yao@codesourcery.com>
14684
14685 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
14686
14687 2013-02-14 Pedro Alves <palves@redhat.com>
14688
14689 Plug memory leak.
14690
14691 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
14692 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
14693
14694 2013-02-14 Pedro Alves <palves@redhat.com>
14695
14696 * tracepoint.c (cmd_qtdpsrc): Use savestring.
14697
14698 2013-02-14 Pedro Alves <palves@redhat.com>
14699
14700 * tracepoint.c (save_string): Delete.
14701 (add_tracepoint_action): Use savestring instead of save_string.
14702
14703 2013-02-12 Pedro Alves <palves@redhat.com>
14704
14705 * linux-xtensa-low.c: Ditto.
14706 * xtensa-xtregs.c: Ditto.
14707
14708 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
14709
14710 * thread-db.c (thread_db_get_tls_address): NULL pointer check
14711 thread_db.
14712
14713 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14714
14715 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
14716 aarch64_num_wp_regs and aarch64_num_bp_regs to
14717 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
14718
14719 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14720
14721 * linux-aarch64-low.c (ps_get_thread_area): Replace
14722 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
14723
14724 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
14725 Marcus Shawcroft <marcus.shawcroft@arm.com>
14726 Nigel Stephens <nigel.stephens@arm.com>
14727 Yufeng Zhang <yufeng.zhang@arm.com>
14728
14729 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
14730 (aarch64.c, aarch64-without-fpu.c): New targets.
14731 * configure.srv (aarch64*-*-linux*): New.
14732 * linux-aarch64-low.c: New file.
14733
14734 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
14735
14736 * linux-low.c (handle_extended_wait, linux_create_inferior)
14737 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
14738 (dequeue_one_deferred_signal, linux_resume_one_thread)
14739 (fetch_register, linux_write_memory, linux_enable_event_reporting)
14740 (linux_tracefork_grandchild, linux_test_for_tracefork)
14741 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
14742 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
14743 where the argument is 0.
14744
14745 2013-01-25 Yao Qi <yao@codesourcery.com>
14746
14747 * event-loop.c: Include "queue.h".
14748 (gdb_event_p): New typedef.
14749 (struct gdb_event) <next_event>: Remove.
14750 (event_queue): Change to QUEUE(gdb_event_p).
14751 (async_queue_event): Remove.
14752 (gdb_event_xfree): New.
14753 (initialize_event_loop): New.
14754 (process_event): Use API from QUEUE.
14755 (wait_for_event): Likewise.
14756 * server.c (main): Call initialize_event_loop.
14757 * server.h (initialize_event_loop): Declare.
14758
14759 2013-01-18 Yao Qi <yao@codesourcery.com>
14760
14761 * ax.h (struct eval_agent_expr_context): New.
14762 (gdb_eval_agent_expr): Update declaration.
14763 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
14764 TFRAME. Add new argument CTX.
14765 * server.h (struct eval_agent_expr_context): Declare.
14766 (agent_mem_read, agent_tsv_read): Update declaration.
14767 (agent_mem_read_string): Likewise.
14768 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
14769 (add_traceframe_block): Add new argument TPOINT.
14770 Increase TPOINT->traceframe_usage.
14771 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
14772 eval_tracepoint_agent_expr.
14773 (condition_true_at_tracepoint): Likewise.
14774 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
14775 (agent_mem_read_string, agent_tsv_read): Likewise.
14776
14777 2013-01-16 Yao Qi <yao@codesourcery.com>
14778
14779 * linux-low.c (linux_resume_one_lwp): Don't check
14780 'lwp->bp_reinsert != 0'.
14781
14782 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14783 Pedro Alves <palves@redhat.com>
14784
14785 * lynx-low.c (ptrace_request_to_str): Define a temporary
14786 macro and use it to simplify this function's implementation.
14787
14788 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14789
14790 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
14791 sets errno.
14792
14793 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14794
14795 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
14796
14797 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14798
14799 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
14800
14801 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14802
14803 * lynx-low.c (lynx_resume): Use the resume_info parameter
14804 to determine the ptid for the lynx_ptrace call, unless
14805 it is equal to minus_one_ptid, in which case we use the
14806 ptid of the current_inferior.
14807 (lynx_wait_1): After having received a thread create/exit
14808 event, resume the inferior's execution using the signaling
14809 thread's ptid, rather than the old ptid.
14810
14811 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14812
14813 * lynx-low.c (lynx_resume): Delete variable ret.
14814
14815 2013-01-01 Joel Brobecker <brobecker@adacore.com>
14816
14817 * gdbreplay.c (gdbreplay_version): Update copyright year.
14818 * server.c (gdbserver_version): Likewise.
14819
14820 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14821
14822 * lynx-low.c (lynx_wait_1): Add debug trace before adding
14823 new thread.
14824
14825 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14826
14827 * lynx-low.c (ptrace_request_to_str): Add handling for
14828 PTRACE_GETTRACESIG.
14829
14830 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14831
14832 * lynx-low.c (lynx_attach): Delete variable new_process.
14833
14834 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14835
14836 * lynx-low.c (lynx_create_inferior): Delete variable
14837 new_process.
14838
14839 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14840
14841 * lynx-low.c (ptrace_request_to_str): Do not handle
14842 PTRACE_GETTHREADLIST if this macro does not exist.
14843
14844 2012-12-15 Yao Qi <yao@codesourcery.com>
14845
14846 * Makefile.in (OBS): Add notif.o.
14847 * notif.c, notif.h: New.
14848 * server.c: Include "notif.h".
14849 (struct vstop_notif) <next>: Remove.
14850 <base>: New field.
14851 (queue_stop_reply): Update.
14852 (push_event, send_next_stop_reply): Remove.
14853 (discard_queued_stop_replies): Update.
14854 (notif_stop): New variable.
14855 (handle_v_stopped): Remove.
14856 (handle_v_requests): Don't call handle_v_stopped. Call
14857 handle_ack_notif instead.
14858 (queue_stop_reply_callback): Call notif_event_enque instead
14859 of queue_stop_reply.
14860 (handle_status): Don't call send_next_stop_reply, call
14861 notif_write_event instead.
14862 (kill_inferior_callback): Likewise.
14863 (detach_or_kill_inferior_callback): Likewise.
14864 (main): Call initialize_notif.
14865 (process_serial_event): Call QUEUE_is_empty.
14866 (handle_target_event): Call notif_push instead of push event.
14867 * server.h (push_event): Remove declaration.
14868
14869 2012-12-10 Tom Tromey <tromey@redhat.com>
14870
14871 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
14872 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
14873 macros.
14874 (.c.o): Rewrite.
14875 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
14876 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
14877 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
14878 (amd64-linux-ipa.o, ax.o): Rewrite.
14879 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
14880 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
14881 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
14882 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
14883 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
14884 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
14885 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
14886 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
14887 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
14888 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
14889 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
14890 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
14891 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
14892 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
14893 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
14894 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
14895 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
14896 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
14897 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
14898 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
14899 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
14900 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
14901 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
14902 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
14903 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
14904 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
14905 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
14906 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
14907 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
14908 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
14909 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
14910 (reg-tilegx.o): Remove.
14911 (all_object_files): New macro.
14912 Include .deps files.
14913 * aclocal.m4, configure: Rebuild.
14914 * acinclude.m4: Include depstand.m4, lead-dot.m4.
14915 * configure.ac: Invoke ZW_CREATE_DEPDIR,
14916 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
14917
14918 2012-12-05 Tom Tromey <tromey@redhat.com>
14919
14920 PR gdb/14917:
14921 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
14922
14923 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
14924
14925 * configure.ac: Check for linux/perf_event.h.
14926 * config.in: Regenerated.
14927 * configure: Regenerated.
14928
14929 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
14930
14931 * hostio.c (handle_readlink): Decrease buffer size
14932 parameter passed to readlink by one byte.
14933
14934 2012-11-26 Yao Qi <yao@codesourcery.com>
14935
14936 * configure.ac (build_warnings): Append '-Wempty-body'.
14937 * configure: Regenerated.
14938 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
14939 body.
14940
14941 2012-11-15 Pierre Muller <muller@sourceware.org>
14942
14943 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
14944 * config.in: Regenerate.
14945 * configure: Regenerate.
14946 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
14947 Use "gdb_wait.h" header instead of <sys/wait.h> header.
14948 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
14949 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
14950 header.
14951 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
14952 instead of <sys/wait.h> header.
14953 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
14954
14955 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
14956
14957 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
14958 (various make rules): Remove -DGDBSERVER
14959
14960 2012-11-09 Yao Qi <yao@codesourcery.com>
14961
14962 * spu-low.c (current_ptid): Move it to ..
14963 * gdbthread.h: ... here. New.
14964 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
14965 * server.c (myresume, process_serial_event): Likewise.
14966 * thread-db.c (thread_db_find_new_threads): Likewise.
14967 * tracepoint.c (run_inferior_command): Likewise.
14968
14969 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
14970
14971 * server.c (handle_search_memory_1): Include access length in
14972 warning message.
14973
14974 2012-09-05 Michael Brandt <michael.brandt@axis.com>
14975
14976 * linux-crisv32-low.c: Fix compile errors.
14977
14978 2012-09-04 Yao Qi <yao@codesourcery.com>
14979
14980 * tracepoint.c (cmd_qtsv): Adjust debug message.
14981 Don't check CUR_TPOINT.
14982
14983 2012-08-28 Yao Qi <yao@codesourcery.com>
14984
14985 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
14986 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
14987 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
14988 Remove declarations of xmalloc, xreallloc, xstrdup and
14989 freeargv.
14990 * Makefile.in (libiberty_h): New.
14991 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
14992 (linux-bfin-low.o): Append dependency 'libiberty.h'.
14993
14994 2012-08-23 Yao Qi <yao@codesourcery.com>
14995
14996 * server.h: Remove declaration of 'xsnprintf'.
14997
14998 2012-08-22 Keith Seitz <keiths@redhat.com>
14999
15000 * server.h: Include build-gnulib-gbserver/config.h.
15001 * gdbreplay.c: Likewise.
15002
15003 2012-08-08 Doug Evans <dje@google.com>
15004
15005 * Makefile.in (SFILES): Add gdb_vecs.c.
15006 (OBS): Add gdb_vecs.o.
15007 (gdb_vecs_h, host_defs_h): New variables.
15008 (thread-db.o): Add $(gdb_vecs_h) dependency.
15009 (gdb_vecs.o): New rule.
15010 * thread-db.c: #include "gdb_vecs.h".
15011 (thread_db_load_search): Use a vector to iterate over path elements.
15012 Handle text appearing after "$pdir".
15013
15014 * configure.ac: Add check for strstr.
15015 * config.in: Regenerate.
15016 * configure: Regenerate.
15017
15018 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
15019
15020 * hostio.c (handle_pread): If pread fails, fall back to attempting
15021 lseek/read.
15022 (handle_pwrite): Likewise for pwrite.
15023
15024 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
15025
15026 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
15027 between unsupported TYPE and unimplementable ADDR/LEN combination.
15028 (arm_insert_point): Act on new return value.
15029
15030 2012-07-31 Pedro Alves <palves@redhat.com>
15031
15032 * server.c (process_point_options): Only skip tokens if we find
15033 one that is unrecognized. Don't treat 'X' specially while
15034 skipping unrecognized tokens.
15035
15036 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
15037
15038 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
15039 to 4-byte-align HW breakpoint addresses for Thumb.
15040
15041 2012-07-27 Yao Qi <yao@codesourcery.com>
15042
15043 PR remote/14161.
15044
15045 * server.h: Declare gdb_agent_about_to_close.
15046 * target.c (kill_inferior): Include "agent.h".
15047 New. Send command 'kill'.
15048 * target.h (kill_inferior): Removed macro.
15049 * tracepoint.c (gdb_agent_about_to_close): New.
15050 (gdb_agent_helper_thread): Handle command 'close'.
15051 Wait endlessly until the inferior stops.
15052 Install gdb_agent_remove_socket to atexit hook.
15053 (agent_socket_name): New static variable.
15054 (gdb_agent_socket_init): Replace local variable 'name' with
15055 'agent_socket_name'.
15056 (gdb_agent_remove_socket): New.
15057
15058 2012-07-27 Yao Qi <yao@codesourcery.com>
15059
15060 * server.c (process_point_options): Stop at 'X' when parsing.
15061
15062 2012-07-19 Michael Eager <eager@eagercon.com>
15063
15064 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
15065 to hw_execute.
15066 * linux-x86-low.c (x86_insert_point, x86_remove_point):
15067 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
15068 hardware breakpoint.
15069
15070 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
15071
15072 * gdbserver/linux-low.c (initialize_low): Call
15073 linux_ptrace_init_warnings.
15074
15075 2012-07-02 Doug Evans <dje@google.com>
15076
15077 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
15078 pointer to int.
15079
15080 2012-07-02 Stan Shebs <stan@codesourcery.com>
15081
15082 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
15083 (ax.o): Add it to build rule.
15084 (ax-ipa.o): Ditto.
15085 (OBS): Add format.o.
15086 (IPA_OBS): Add format.o.
15087 * server.c (handle_query): Claim support for breakpoint commands.
15088 (process_point_options): Add command case.
15089 (process_serial_event): Leave running if there are printfs in
15090 effect.
15091 * mem-break.h (any_persistent_commands): Declare.
15092 (add_breakpoint_commands): Declare.
15093 (gdb_no_commands_at_breakpoint): Declare.
15094 (run_breakpoint_commands): Declare.
15095 * mem-break.c (struct point_command_list): New struct.
15096 (struct breakpoint): New field command_list.
15097 (any_persistent_commands): New function.
15098 (add_commands_to_breakpoint): New function.
15099 (add_breakpoint_commands): New function.
15100 (gdb_no_commands_at_breakpoint): New function.
15101 (run_breakpoint_commands): New function.
15102 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
15103 locally.
15104 * ax.c: Include format.h.
15105 (ax_printf): New function.
15106 (gdb_eval_agent_expr): Add printf opcode.
15107
15108 2012-06-13 Yao Qi <yao@codesourcery.com>
15109
15110 * server.c (start_inferior): Remove duplicated writes to fields
15111 'last_resume_kind' and 'last_status' of 'current_inferior'.
15112
15113 2012-06-12 Yao Qi <yao@codesourcery.com>
15114 Pedro Alves <palves@redhat.com>
15115
15116 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
15117 comment.
15118 * server.c (handle_v_cont): Extend comment.
15119
15120 2012-06-11 Yao Qi <yao@codesourcery.com>
15121
15122 * linux-low.c (linux_attach): Add 'static'.
15123
15124 2012-06-06 Yao Qi <yao@codesourcery.com>
15125
15126 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
15127
15128 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
15129
15130 Fix gcc -flto compilation warning.
15131 * server.c (main): Make variable multi_mode and attach volatile.
15132
15133 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15134
15135 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
15136 if the platform doesn't know about it.
15137
15138 2012-05-30 Jeff Kenton <jkenton@tilera.com>
15139
15140 * Makefile.in (SFILES): Add linux-tile-low.c.
15141 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
15142 * configure.srv: Handle tilegx-*-linux*.
15143 * linux-tile-low.c: New file.
15144
15145 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15146
15147 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
15148
15149 2012-05-24 Pedro Alves <palves@redhat.com>
15150
15151 PR gdb/7205
15152
15153 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
15154
15155 2012-05-24 Pedro Alves <palves@redhat.com>
15156
15157 PR gdb/7205
15158
15159 Replace target_signal with gdb_signal throughout.
15160
15161 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
15162
15163 * linux-low.c (linux_store_registers): Avoid the copying sequence
15164 when no data has been retrieved by ptrace.
15165
15166 2012-05-22 Will Deacon <will.deacon@arm.com>
15167
15168 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
15169 Include asm/ptrace.h.
15170 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
15171 already defined.
15172
15173 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
15174
15175 * linux-low.c (linux_store_registers): Don't re-retrieve data
15176 with ptrace that has already been obtained from /proc. Always
15177 copy any data retrieved with ptrace to the buffer supplied.
15178
15179 2012-05-11 Yao Qi <yao@codesourcery.com>
15180 Pedro Alves <palves@redhat.com>
15181
15182 * linux-low.c (enum stopping_threads_kind): New.
15183 (stopping_threads): Change type to `enum stopping_threads_kind'.
15184 (handle_extended_wait): If stopping and suspending threads, leave
15185 the new_lwp suspended too.
15186 (linux_wait_for_event): Adjust.
15187 (stop_all_lwps): Set `stopping_threads' to
15188 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
15189 whether we're suspending threads or just stopping them. Assert no
15190 recursion happens.
15191
15192 2012-04-29 Yao Qi <yao@codesourcery.com>
15193
15194 * server.h: Move some code to ...
15195 * gdbthread.h: ... here. New.
15196 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
15197 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
15198 (nto-low.o, win32-low.o): Likewise.
15199 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
15200 * regcache.c, remote-utils.c, server.c: Likewise.
15201 * target.c, tracepoint.c, win32-low.c: Likewise.
15202
15203 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15204
15205 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
15206 (PTRACE_ARG4_TYPE): Likewise.
15207 (PTRACE_XFER_TYPE): Likewise.
15208 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
15209 ptrace to PTRACE_ARG3_TYPE.
15210 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
15211 (PTRACE_ARG4_TYPE): Likewise.
15212 (PTRACE_XFER_TYPE): Likewise.
15213 (linux_detach_one_lwp): Cast fourth argument of
15214 ptrace to long then PTRACE_ARG4_TYPE.
15215 (regsets_fetch_inferior_registers): Cast third argument of
15216 ptrace to long then PTRACE_ARG3_TYPE.
15217 (regsets_store_inferior_registers): Likewise.
15218
15219 2012-04-20 Pedro Alves <palves@redhat.com>
15220
15221 * configure: Regenerate.
15222
15223 2012-04-19 Pedro Alves <palves@redhat.com>
15224
15225 * Makefile.in (GNULIB_BUILDDIR): New.
15226 (LIBGNU, INCGNU, GNULIB_H): Adjust.
15227 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
15228 (all, install-only, uninstall, clean-info, all-lib, clean): No
15229 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
15230 (maintainer-clean realclean distclean): Use subdir_do.
15231 (subdir_do): New.
15232 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
15233 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
15234 * acinclude.m4: Include acx_configure_dir.m4.
15235 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
15236 calls. Call AC_PROG_RANLIB. Configure gnulib using
15237 ACX_CONFIGURE_DIR.
15238 (GNULIB): New.
15239 (GNULIB_STDINT_H): Adjust.
15240 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
15241 * gdbreplay.c: Include build-gnulib/config.h.
15242 * server.h: Likewise.
15243 * aclocal.m4: Regenerate.
15244 * config.in: Regenerate.
15245 * configure: Regenerate.
15246
15247 2012-04-19 Pedro Alves <palves@redhat.com>
15248
15249 * Makefile.in (LIBGNU, INCGNU): Adjust.
15250 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
15251 (all, install-only, uninstall, clean-info, all-lib, clean)
15252 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
15253 * configure.ac: Adjust AC_OUTPUT output.
15254 * aclocal.m4: Regenerate.
15255 * configure: Regenerate.
15256
15257 2012-04-19 Pedro Alves <palves@redhat.com>
15258
15259 * Makefile.in (generated_files): New.
15260 (server_h): Remove the explicit dependency on config.h, and depend
15261 on $generated_files.
15262
15263 2012-04-19 Pedro Alves <palves@redhat.com>
15264
15265 * Makefile.in (INCGNU): Add -Ignulib.
15266
15267 2012-04-19 Pedro Alves <palves@redhat.com>
15268
15269 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
15270 (INCGNU): ... this, and spell out -I here.
15271 (GNULIB_LIB): Rename to ...
15272 (LIBGNU): ... this.
15273 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
15274
15275 2012-04-19 Pedro Alves <palves@redhat.com>
15276
15277 * config.in: Regenerate.
15278
15279 2012-04-19 Pedro Alves <palves@redhat.com>
15280
15281 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
15282 * server.h (memmem): Remove declaration.
15283 * config.in: Regenerate.
15284 * configure: Regenerate.
15285
15286 2012-04-19 Yao Qi <yao@codesourcery.com>
15287
15288 * Makefile.in (SFILES): Add common/vec.c.
15289 (OBS): Add vec.o.
15290 (vec.o): New rule.
15291
15292 2012-04-19 Yao Qi <yao@codesourcery.com>
15293
15294 * remote-utils.c (prepare_resume_reply): Replace with macro
15295 target_core_of_thread.
15296 * server.c (handle_qxfer_threads_proper): Likewise.
15297 * target.h (traget_core_of_thread): New macro.
15298
15299 2012-04-18 Pedro Alves <palves@redhat.com>
15300
15301 * aclocal.m4: Regenerate.
15302 * configure: Regenerate.
15303
15304 2012-04-16 Yao Qi <yao@codesourcery.com>
15305
15306 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
15307 duplicated on address.
15308
15309 2012-04-16 Yao Qi <yao@codesourcery.com>
15310
15311 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
15312 (struct tracepoint_action_ops) <send>: New field.
15313 (m_tracepoint_action_send, r_tracepoint_action_send): New.
15314 (agent_expr_send, x_tracepoint_action_send): New.
15315 (l_tracepoint_action_send): New.
15316 (cmd_qtdp): Download and install tracepoint
15317 according to `use_agent'.
15318 (run_inferior_command): Add one more parameter `len'.
15319 Update callers.
15320 (tracepoint_send_agent): New.
15321 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
15322
15323 2012-04-16 Yao Qi <yao@codesourcery.com>
15324
15325 * tracepoint.c (download_tracepoints): Moved to ...
15326 (cmd_qtstart): ... here.
15327
15328 2012-04-14 Yao Qi <yao@codesourcery.com>
15329
15330 * tracepoint.c: Include inttypes.h.
15331 (struct collect_memory_action): Use sized types.
15332 (struct tracepoint): Likewise.
15333 (cmd_qtdp, stop_tracing): Update print specifiers.
15334 (cmd_qtp, response_tracepoint): Likewise.
15335 (collect_data_at_tracepoint): Likewise.
15336 (collect_data_at_step): Likewise.
15337
15338 2012-04-14 Yao Qi <yao@codesourcery.com>
15339
15340 Import gnulib module inttypes.
15341 * aclocal.m4, config.in, configure: Regenerated.
15342
15343 2012-04-14 Yao Qi <yao@codesourcery.com>
15344
15345 * Makefile.in (maintainer-clean, realclean, distclean): Remove
15346 Makefile and config.status at last.
15347
15348 2012-04-13 Yao Qi <yao@codesourcery.com>
15349
15350 * tracepoint.c: Include stdint.h unconditionally.
15351
15352 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15353
15354 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
15355 on BFD_HAVE_SYS_PROCFS_TYPE.
15356 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
15357 * configure: Regenerate.
15358 * config.in: Likewise.
15359
15360 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
15361
15362 * Makefile.in (clean): Also remove x32.c x32-linux.c
15363 x32-avx.c x32-avx-linux.c.
15364 (x32.o): New target.
15365 (x32.c): Likewise.
15366 (x32-linux.o): Likewise.
15367 (x32-linux.c): Likewise.
15368 (x32-avx.o): Likewise.
15369 (x32-avx.c): Likewise.
15370 (x32-avx-linux.o): Likewise.
15371 (x32-avx-linux.c): Likewise.
15372
15373 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
15374 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
15375 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
15376 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
15377 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
15378 i386/x32-avx-linux.xml.
15379
15380 * linux-x86-low.c (init_registers_x32_linux): New prototype.
15381 (init_registers_x32_avx_linux): Likwise.
15382 (x86_linux_update_xmltarget): Call init_registers_x32_linux
15383 or init_registers_x32_avx_linux if linux_is_elf64 is false.
15384
15385 2012-04-13 Pedro Alves <palves@redhat.com>
15386
15387 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
15388 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
15389 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
15390 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
15391 the sub-make.
15392
15393 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15394
15395 * linux-x86-low.c (compat_x32_clock_t): New.
15396 (compat_x32_siginfo_t): Likewise.
15397 (compat_x32_siginfo_from_siginfo): Likewise.
15398 (siginfo_from_compat_x32_siginfo): Likewise.
15399 (linux_is_elf64): Likewise.
15400 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
15401 and siginfo_from_compat_x32_siginfo for x32.
15402 (x86_arch_setup): Set linux_is_elf64.
15403
15404 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15405
15406 PR gdb/13969
15407 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
15408 e_machine field.
15409 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
15410 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
15411 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
15412 compatible with process.
15413
15414 2012-04-12 Yao Qi <yao@codesourcery.com>
15415
15416 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
15417 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
15418 (install-only, install-info, clean): Handle sub dir gnulib.
15419 (all-lib, am--refresh): New targets.
15420 (memmem.o): Remove target.
15421 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
15422 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
15423 (AC_REPLACE_FUNCS): Remove memmem.
15424 Invoke gl_INIT and AM_INIT_AUTOMAKE.
15425 (AC_OUTPUT): Generate Makefile in gnulib/.
15426 * aclocal.m4, config.in, configure: Regenerated.
15427
15428 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
15429
15430 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
15431
15432 2012-04-05 Pedro Alves <palves@redhat.com>
15433
15434 -Werror=strict-aliasing
15435
15436 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
15437 pointer.
15438
15439 2012-04-04 Pedro Alves <palves@redhat.com>
15440
15441 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15442 (sparc_store_gregset_from_stack, sparc_store_gregset)
15443 (sparc_breakpoint_at): Fix formatting.
15444
15445 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15446
15447 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
15448 are available.
15449 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
15450 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
15451 * config.in: Regenerate.
15452 * configure: Likewise.
15453
15454 2012-03-29 Pedro Alves <palves@redhat.com>
15455
15456 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
15457 Correct ptrace arguments.
15458
15459 2012-03-28 Pedro Alves <palves@redhat.com>
15460
15461 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
15462 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
15463 (IA64_FR1_REGNUM): New defines.
15464 (ia64_fetch_register): New.
15465 (the_low_target): Install it.
15466 * linux-low.h (struct linux_target_ops) <fetch_register>: New
15467 field.
15468 * linux-low.c (linux_fetch_registers): Try the
15469 the_low_target.fetch_register hook first.
15470
15471 * linux-arm-low.c (the_low_target): Adjust.
15472 * linux-bfin-low.c (the_low_target): Adjust.
15473 * linux-cris-low.c (the_low_target): Adjust.
15474 * linux-crisv32-low.c (the_low_target): Adjust.
15475 * linux-m32r-low.c (the_low_target): Adjust.
15476 * linux-m68k-low.c (the_low_target): Adjust.
15477 * linux-mips-low.c (the_low_target): Adjust.
15478 * linux-ppc-low.c (the_low_target): Adjust.
15479 * linux-s390-low.c (the_low_target): Adjust.
15480 * linux-sh-low.c (the_low_target): Adjust.
15481 * linux-sparc-low.c (the_low_target): Adjust.
15482 * linux-tic6x-low.c (the_low_target): Adjust.
15483 * linux-x86-low.c (the_low_target): Adjust.
15484 * linux-xtensa-low.c (the_low_target): Adjust.
15485
15486 2012-03-26 Pedro Alves <palves@redhat.com>
15487
15488 * server.c (handle_qxfer_libraries): Don't bail early if
15489 the_target->qxfer_libraries_svr4 is not NULL.
15490
15491 2012-03-26 Pedro Alves <palves@redhat.com>
15492
15493 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
15494
15495 2012-03-23 Pedro Alves <palves@redhat.com>
15496
15497 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
15498 "library-list-svr4" element's start tag when the the DSO list is
15499 empty.
15500
15501 2012-03-23 Pedro Alves <palves@redhat.com>
15502
15503 * linux-low.c (read_one_ptr): Read the inferior's pointer through
15504 a variable whose type size is the same as the inferior's pointer
15505 size.
15506
15507 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
15508
15509 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
15510 struct siginfo.
15511 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
15512 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
15513 * linux-low.h: Include <signal.h>.
15514 (struct siginfo): Remove forward declaration.
15515 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
15516 struct siginfo.
15517
15518 2012-03-21 Mike Frysinger <vapier@gentoo.org>
15519
15520 * .gitignore: Ignore more files.
15521
15522 2012-03-19 Pedro Alves <palves@redhat.com>
15523 Jan Kratochvil <jan.kratochvil@redhat.com>
15524
15525 * server.c (cont_thread, general_thread): Add describing comments.
15526 (start_inferior): Clear `cont_thread'.
15527 (handle_v_cont): Don't set `cont_thread' if resuming all threads
15528 of a process.
15529
15530 2012-03-15 Yao Qi <yao@codesourcery.com>
15531
15532 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
15533 handling to ...
15534 (cmd_qtdp): ... here.
15535
15536 2012-03-15 Yao Qi <yao@codesourcery.com>
15537
15538 * tracepoint.c (struct tracepoint_action_ops): New.
15539 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
15540 (m_tracepoint_action_download): New.
15541 (r_tracepoint_action_download): New.
15542 (x_tracepoint_action_download): New.
15543 (l_tracepoint_action_download): New.
15544 (add_tracepoint_action): Install `action->ops' according type.
15545 (download_tracepoint_1): Move code `download' function pointer
15546 of various tracepoint_action_ops.
15547
15548 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15549
15550 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
15551 linux_ptrace_attach_warnings.
15552
15553 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15554
15555 * Makefile.in (linux-ptrace.o): New.
15556 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
15557 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
15558 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
15559 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
15560 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
15561 of these targets.
15562 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
15563
15564 2012-03-08 Yao Qi <yao@codesourcery.com>
15565 Pedro Alves <palves@redhat.com>
15566
15567 Fix PR server/13392.
15568 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
15569 offset of JMP insn.
15570 * tracepoint.c (remove_tracepoint): New.
15571 (cmd_qtdp): Call remove_tracepoint when failed to install.
15572
15573 2012-03-07 Pedro Alves <palves@redhat.com>
15574
15575 * linux-low.c (get_detach_signal): New.
15576 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
15577 Pass on pending signals to PTRACE_DETACH. Check the result of the
15578 ptrace call.
15579 * server.c (program_signals, program_signals_p): New.
15580 (handle_general_set): Handle QProgramSignals.
15581 * server.h (program_signals, program_signals_p): Declare.
15582
15583 2012-03-05 Pedro Alves <palves@redhat.com>
15584 Jan Kratochvil <jan.kratochvil@redhat.com>
15585
15586 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
15587 New comment why.
15588
15589 2012-03-03 Yao Qi <yao@codesourcery.com>
15590
15591 * tracepoint.c (tracepoint_look_up_symbols): Update call to
15592 agent_look_up_symbols.
15593
15594 2012-03-03 Yao Qi <yao@codesourcery.com>
15595
15596 * Makefile.in (linux-low.o): Keep dependence on agent.h.
15597 (linux-x86-low.o): Likewise.
15598 * server.h: Remove in_process_agent_loaded.
15599 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
15600 common/agent.c.
15601 Update callers.
15602
15603 2012-03-03 Yao Qi <yao@codesourcery.com>
15604
15605 * tracepoint.c (gdb_agent_capability): New global.
15606 (in_process_agent_loaded_ust): Renamed to
15607 `in_process_agent_supports_ust'.
15608 Update callers.
15609 (in_process_agent_supports_ust): Call agent_capability_check.
15610 (clear_installed_tracepoints): Assert that agent supports
15611 agent.
15612
15613 2012-03-03 Yao Qi <yao@codesourcery.com>
15614
15615 * linux-low.c (linux_supports_agent): New.
15616 (linux_target_ops): Initialize field `supports_agent' with
15617 linux_supports_agent.
15618 * target.h (struct target_ops) <supports_agent>: New.
15619 (target_supports_agent): New macro.
15620 * server.c (handle_general_set): Handle packet 'QAgent'.
15621 (handle_query): Send `QAgent+'.
15622 * Makefile.in (server.o): Depends on agent.h.
15623
15624 2012-03-03 Yao Qi <yao@codesourcery.com>
15625
15626 * Makefile.in (OBS): Add agent.o.
15627 Add new rule for agent.o.
15628 Track dependence of tracepoint.c on agent.h.
15629 * tracepoint.c (run_inferior_command_1):
15630 (run_inferior_command): Call agent_run_command.
15631 (gdb_ust_connect_sync_socket): Deleted. Move it to
15632 common/agent.c.
15633 (resume_thread, stop_thread): Likewise.
15634 (gdb_ust_socket_init): Renamed to ...
15635 (gdb_agent_socket_init): ... New.
15636 (gdb_ust_thread): Renamed to ...
15637 (gdb_agent_helper_thread): ... New.
15638 (gdb_ust_init): Move some code to ...
15639 (gdb_agent_init): ... here. New.
15640 [HAVE_UST]: Call gdb_ust_init.
15641 (initialize_tracepoint_ftlib): Call gdb_agent_init.
15642 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
15643 * config.in, configure: Regenerated.
15644
15645 2012-03-02 Pedro Alves <palves@redhat.com>
15646
15647 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
15648 * linux-low.c (struct simple_pid_list): New.
15649 (stopped_pids): New a struct simple_pid_list pointer.
15650 (add_to_pid_list, pull_pid_from_list): New.
15651 (handle_extended_wait): Don't assume the first signal new children
15652 report is SIGSTOP. Adjust call to pull_pid_from_list.
15653 (linux_wait_for_lwp): Adjust.
15654
15655 2012-03-02 Yao Qi <yao@codesourcery.com>
15656
15657 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
15658 debug log.
15659
15660 2012-03-02 Yao Qi <yao@codesourcery.com>
15661
15662 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
15663 `stop_pc' and `tpoint'. Update caller.
15664
15665 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
15666
15667 * linux-low.h (linux_target_ops): Add regset_bitmap member.
15668 * linux-low.c (use_linux_regsets): New macro.
15669 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
15670 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
15671 (linux_register_in_regsets): New function.
15672 (usr_fetch_inferior_registers): Skip registers covered by
15673 regsets.
15674 (usr_store_inferior_registers): Likewise.
15675 (usr_fetch_inferior_registers): New macro.
15676 (usr_store_inferior_registers): Likewise.
15677 (linux_fetch_registers): Handle mixed regset/non-regset targets.
15678 (linux_store_registers): Likewise.
15679 * linux-mips-low.c (init_registers_mips_dsp_linux): New
15680 prototype.
15681 (init_registers_mips64_dsp_linux): Likewise.
15682 (init_registers_mips_linux): New macro.
15683 (init_registers_mips_dsp_linux): Likewise.
15684 (mips_dsp_num_regs): Likewise.
15685 (DSP_BASE, DSP_CONTROL): New fallback macros.
15686 (mips_base_regs): New macro.
15687 (mips_regmap): Use it. Fix the size.
15688 (mips_dsp_regmap): New variable.
15689 (mips_dsp_regset_bitmap): Likewise.
15690 (mips_arch_setup): New function.
15691 (mips_cannot_fetch_register): Use the_low_target.regmap rather
15692 than mips_regmap.
15693 (mips_cannot_store_register): Likewise.
15694 (the_low_target): Update .arch_setup, .num_regs and .regmap
15695 initializers. Add .regset_bitmap initializer.
15696 * linux-arm-low.c (the_low_target): Add .regset_bitmap
15697 initializer.
15698 * linux-bfin-low.c (the_low_target): Likewise.
15699 * linux-cris-low.c (the_low_target): Likewise.
15700 * linux-crisv32-low.c (the_low_target): Likewise.
15701 * linux-ia64-low.c (the_low_target): Likewise.
15702 * linux-m32r-low.c (the_low_target): Likewise.
15703 * linux-m68k-low.c (the_low_target): Likewise.
15704 * linux-ppc-low.c (the_low_target): Likewise.
15705 * linux-s390-low.c (the_low_target): Likewise.
15706 * linux-sh-low.c (the_low_target): Likewise.
15707 * linux-sparc-low.c (the_low_target): Likewise.
15708 * linux-tic6x-low.c (the_low_target): Likewise.
15709 * linux-x86-low.c (the_low_target): Likewise.
15710 * linux-xtensa-low.c (the_low_target): Likewise.
15711 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
15712 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
15713 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
15714 srv_xmlfiles.
15715 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
15716 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
15717
15718 2012-02-29 Yao Qi <yao@codesourcery.com>
15719 Pedro Alves <palves@redhat.com>
15720
15721 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
15722 `step_over_finished' is true.
15723
15724 2012-02-27 Pedro Alves <palves@redhat.com>
15725
15726 * linux-low.c (pid_is_stopped): Delete, moved to common/.
15727 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
15728
15729 2012-02-27 Pedro Alves <palves@redhat.com>
15730
15731 PR server/9684
15732 * linux-low.c (pid_is_stopped): New.
15733 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
15734
15735 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
15736
15737 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
15738 of conditions.
15739
15740 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
15741
15742 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
15743
15744 2012-02-24 Luis Machado <lgustavo@codesourcery>
15745
15746 * server.c (handle_query): Advertise support for target-side
15747 breakpoint condition evaluation.
15748 (process_point_options): New function.
15749 (process_serial_event): When inserting a breakpoint, check for
15750 a target-side condition that should be evaluated.
15751
15752 * mem-break.c: Include regcache.h and ax.h.
15753 (point_cond_list_t): New data structure.
15754 (breakpoint) <cond_list>: New field.
15755 (find_gdb_breakpoint_at): Make non-static.
15756 (delete_gdb_breakpoint_at): Clear any target-side
15757 conditions.
15758 (clear_gdb_breakpoint_conditions): New function.
15759 (add_condition_to_breakpoint): Likewise.
15760 (add_breakpoint_condition): Likewise.
15761 (gdb_condition_true_at_breakpoint): Likewise.
15762 (gdb_breakpoint_here): Return result directly instead
15763 of going through a local variable.
15764
15765 * mem-break.h (find_gdb_breakpoint_at): New prototype.
15766 (clear_gdb_breakpoint_conditions): Likewise.
15767 (add_breakpoint_condition): Likewise.
15768 (gdb_condition_true_at_breakpoint): Likewise.
15769
15770 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
15771 (need_step_over_p): Take target-side breakpoint condition into
15772 consideration.
15773
15774 2012-02-24 Luis Machado <lgustavo@codesourcery>
15775
15776 * server.h: Include tracepoint.h.
15777 (agent_mem_read, agent_get_trace_state_variable_value,
15778 agent_set_trace_state_variable_value,
15779 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
15780 get_set_tsv_func_addr): New prototypes.
15781
15782 * ax.h: New include file.
15783 * ax.c: New source file.
15784
15785 * tracepoint.c: Include ax.h.
15786 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
15787 agent_expr, eval_result_type): Move to ax.h.
15788 (parse_agent_expr): Rename to ...
15789 (gdb_parse_agent_expr): ... this, make it non-static and move
15790 to ax.h.
15791 (unparse_agent_expr) Rename to ...
15792 (gdb_unparse_agent_expr): ... this, make it non-static and move
15793 to ax.h.
15794 (eval_agent_expr): Rename to ...
15795 (eval_tracepoint_agent_expr): ... this.
15796 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
15797 forward declarations.
15798 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
15799 (agent_get_trace_state_variable_value): New function.
15800 (agent_set_trace_state_variable_value): New function.
15801 (cmd_qtdp): Call gdb_parse_agent_expr (...).
15802 (response_tracepoint): Call gdb_unparse_agent_expr (...).
15803 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
15804 (condition_true_at_tracepoint): Likewise.
15805 (parse_agent_expr): Rename to ...
15806 (gdb_parse_agent_expr): ... this and move to ax.c.
15807 (unparse_agent_expr): Rename to ...
15808 (gdb_unparse_agent_expr): ... this and move to ax.c.
15809 (gdb_agent_op_name): Move to ax.c.
15810 (eval_agent_expr): Rename to ...
15811 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
15812 and move to ax.c.
15813 (eval_tracepoint_agent_expr): New function.
15814 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
15815 non-static.
15816 (current_insn_ptr, emit_error, struct bytecode_address): Move to
15817 ax.c.
15818 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
15819 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
15820 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
15821 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
15822 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
15823 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
15824 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
15825 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
15826 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
15827 (compile_bytecodes): Remove forward declaration.
15828 (is_goto_target): Move to ax.c.
15829 (compile_bytecodes): Move to ax.c and call
15830 agent_get_trace_state_variable_value (...) and
15831 agent_set_trace_state_variable_value (...).
15832
15833 * Makefile.in: Update ax.c and IPA dependencies.
15834
15835 2012-02-24 Pedro Alves <palves@redhat.com>
15836
15837 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
15838 (cmd_bigqtbuffer_circular): ... this. Only handle
15839 'QTBuffer:circular:'.
15840 (handle_tracepoint_general_set): Adjust.
15841
15842 2012-02-16 Yao Qi <yao@codesourcery.com>
15843
15844 * inferiors.c: Move code to ...
15845 * dll.c: .... here. New.
15846 * server.h: Declare clear_dlls.
15847 * Makefile.in (SFILES): Add dll.c.
15848 (OBS): Add dll.o
15849 (dll.o): New rule.
15850
15851 2012-02-11 Yao Qi <yao@codesourcery.com>
15852
15853 * server.c: (handle_monitor_command): Add a new parameter
15854 `own_buf'.
15855 (handle_query): Update caller.
15856
15857 2012-02-09 Joel Brobecker <brobecker@adacore.com>
15858
15859 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
15860 * configure, config.in: Regenerate.
15861 * hostio.c: Provide an alternate implementation if HAVE_READLINK
15862 is not defined.
15863
15864 2012-02-02 Pedro Alves <palves@redhat.com>
15865
15866 Try SIGKILL first, then PTRACE_KILL.
15867 * linux-low.c (linux_kill_one_lwp): New.
15868 (linux_kill_one_lwp): Rename to ...
15869 (kill_one_lwp_callback): ... this. Use the new
15870 linux_kill_one_lwp.
15871
15872 2012-02-02 Pedro Alves <palves@redhat.com>
15873
15874 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
15875 inferior.
15876
15877 2012-01-27 Pedro Alves <palves@redhat.com>
15878
15879 * linux-low.c (linux_child_pid_to_exec_file): Delete.
15880 (elf_64_file_p): Make static.
15881 (linux_pid_exe_is_elf_64_file): New.
15882 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
15883 Delete declarations.
15884 (linux_pid_exe_is_elf_64_file): Declare.
15885 * linux-x86-low.c (x86_arch_setup): Use
15886 linux_pid_exe_is_elf_64_file.
15887
15888 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
15889
15890 * linux-low.c (linux_wait_for_event_1): Rename to ...
15891 (linux_wait_for_event): ... here and merge it with former
15892 linux_wait_for_event - new variable wait_ptid, use it.
15893 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
15894
15895 2012-01-23 Pedro Alves <palves@redhat.com>
15896
15897 * server.c (main): Avoid yet another case of infinite loop while
15898 detaching/killing after a longjmp.
15899
15900 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15901
15902 Code cleanup.
15903 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
15904
15905 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
15906
15907 * hostio.c (handle_readlink): New function.
15908 (handle_vFile): Call it to handle "vFile:readlink" packets.
15909
15910 2012-01-20 Pedro Alves <palves@redhat.com>
15911 Ulrich Weigand <ulrich.weigand@linaro.org>
15912
15913 * server.c (handle_v_requests): Only support vAttach and vRun to
15914 start multiple processes when in extended protocol mode.
15915
15916 2012-01-17 Pedro Alves <palves@redhat.com>
15917
15918 * tracepoint.c (initialize_tracepoint): Use mmap instead of
15919 memalign plus mprotect to allocate the scratch buffer.
15920
15921 2012-01-13 Pedro Alves <palves@redhat.com>
15922
15923 * server.c (attach_inferior): Clear `cont_thread'.
15924
15925 2012-01-13 Pedro Alves <palves@redhat.com>
15926
15927 * server.c (main): Avoid infinite loop while detaching/killing
15928 after a longjmp.
15929
15930 2012-01-09 Doug Evans <dje@google.com>
15931
15932 * server.c (start_inferior): Set last_ptid in --wrapper case.
15933
15934 2012-01-06 Yao Qi <yao@codesourcery.com>
15935
15936 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
15937 defined.
15938 [IN_PROCESS_AGENT] (debug_agent): New global variable.
15939
15940 2012-01-04 Yao Qi <yao@codesourcery.com>
15941
15942 * tracepoint.c (cmd_qtdp): Print debug message
15943 for static tracepoint.
15944
15945 2012-01-04 Yao Qi <yao@codesourcery.com>
15946
15947 * tracepoint.c (trace_vdebug): Differentiate debug message
15948 between gdbserver and IPA.
15949
15950 2012-01-03 Yao Qi <yao@codesourcery.com>
15951
15952 * tracepoint.c (tracepoint_was_hit): Don't collect for
15953 static tracepoint.
15954
15955 2012-01-02 Joel Brobecker <brobecker@adacore.com>
15956
15957 * terminal.h: Reformat copyright header.
15958
15959 2012-01-02 Joel Brobecker <brobecker@adacore.com>
15960
15961 * server.c (gdbserver_version): Update copyright year.
15962 * gdbreplay.c (gdbreplay_version): Likewise.
15963
15964 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
15965
15966 * linux-low.c (linux_create_inferior): Put empty if clause for write.
15967
15968 Revert:
15969 2011-12-18 Hui Zhu <teawater@gmail.com>
15970 * linux-low.c (linux_create_inferior): Save return value to ret.
15971
15972 2011-12-18 Hui Zhu <teawater@gmail.com>
15973
15974 * linux-low.c (linux_create_inferior): Save return value to ret.
15975
15976 2011-12-16 Doug Evans <dje@google.com>
15977
15978 * linux-low.c (linux_create_inferior): If stdio connection,
15979 redirect stdin from /dev/null, stdout to stderr.
15980 * remote-utils.c (remote_is_stdio): New static global.
15981 (remote_connection_is_stdio): New function.
15982 (remote_prepare): Handle stdio connection.
15983 (remote_open): Ditto.
15984 (remote_close): Don't close stdin for stdio connections.
15985 (read_prim,write_prim): New functions. Replace all calls to
15986 read/write to these.
15987 * server.c (main): Watch for "-" argument. Move call to
15988 remote_prepare before start_inferior.
15989 * server.h (STDIO_CONNECTION_NAME): New macro.
15990 (remote_connection_is_stdio): Declare.
15991
15992 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
15993 in debugging output.
15994
15995 2011-12-15 Yao Qi <yao@codesourcery.com>
15996
15997 * tracepoint.c: Include sys/syscall.h.
15998 (gdb_ust_thread): Remove preprocessor conditional.
15999
16000 2011-12-14 Pedro Alves <pedro@codesourcery.com>
16001
16002 * linux-low.c (linux_detach_one_lwp): Call
16003 the_low_target.prepare_to_resume before detaching.
16004
16005 2011-12-14 Yao Qi <yao@codesourcery.com>
16006
16007 * tracepoint.c (gdb_ust_thread): Don't ignore return value
16008 of write.
16009
16010 2011-12-14 Yao Qi <yao@codesourcery.com>
16011
16012 * i386-low.c (i386_low_stopped_data_address): Initialize local
16013 variable `control'.
16014
16015 2011-12-13 Pedro Alves <pedro@codesourcery.com>
16016
16017 PR remote/13492
16018
16019 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
16020 DR_CONTROL unless necessary. Extend comments.
16021 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
16022 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
16023
16024 2011-12-13 Yao Qi <yao@codesourcery.com>
16025
16026 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
16027 macros.
16028 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
16029
16030 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
16031
16032 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
16033 Print new debug message for such case.
16034
16035 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
16036
16037 Fix overlapping memcpy.
16038 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
16039 the read_inferior_memory transfer.
16040 (delete_fast_tracepoint_jump): New variable buf. Use it for the
16041 write_inferior_memory transfer.
16042 (set_fast_tracepoint_jump): New variable buf. Use it for the
16043 read_inferior_memory and write_inferior_memory transfers.
16044 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
16045 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
16046 Use it for the write_inferior_memory transfer.
16047 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
16048 buffers.
16049
16050 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
16051
16052 * linux-low.c (fetch_register, store_register): Make code
16053 consistent, fix formatting.
16054
16055 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
16056
16057 * linux-low.c (usr_store_inferior_registers): Factor out code
16058 to handle individual registers into...
16059 (store_register): ... this new function.
16060
16061 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
16062
16063 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
16064 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
16065 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
16066 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
16067 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
16068 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
16069 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
16070 (srv_xmlfiles): Add new XML files.
16071
16072 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
16073 and <sys/uio.h>.
16074 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
16075 (init_registers_s390_linux32v1): Add prototype.
16076 (init_registers_s390_linux32v2): Likewise.
16077 (init_registers_s390_linux64v1): Likewise.
16078 (init_registers_s390_linux64v2): Likewise.
16079 (init_registers_s390x_linux64v1): Likewise.
16080 (init_registers_s390x_linux64v2): Likewise.
16081 (s390_num_regs): Increment to 52.
16082 (s390_regmap): Add orig_r2 register.
16083 (s390_num_regs_3264): Increment to 68.
16084 (s390_regmap_3264): Add orig_r2 register.
16085 (s390_collect_ptrace_register): Handle orig_r2 register.
16086 (s390_supply_ptrace_register): Likewise.
16087 (s390_fill_last_break): New function.
16088 (s390_store_last_break): Likewise.
16089 (s390_fill_system_call): New function.
16090 (s390_store_system_call): Likewise.
16091 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
16092 register sets.
16093 (s390_check_regset): New function.
16094 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
16095 NT_S390_SYSTEM_CALL regsets and use appropriate description.
16096 Update target_regsets for available register sets.
16097
16098 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
16099 Jan Kratochvil <jan.kratochvil@redhat.com>
16100
16101 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
16102 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
16103 New.
16104 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
16105 * linux-low.h (struct process_info_private): New member r_debug.
16106 * server.c (handle_qxfer_libraries): Call
16107 the_target->qxfer_libraries_svr4.
16108 (handle_qxfer_libraries_svr4): New function.
16109 (qxfer_packets): New entry "libraries-svr4".
16110 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
16111 * target.h (struct target_ops): New member qxfer_libraries_svr4.
16112 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
16113 PACKET_qXfer_libraries_svr4.
16114
16115 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
16116
16117 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
16118 PSW address/mask between 8-byte and 16-byte formats.
16119 (s390_supply_ptrace_register): Likewise.
16120 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
16121 basic addressing mode bit.
16122
16123 2011-11-24 Stan Shebs <stan@codesourcery.com>
16124
16125 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
16126
16127 2011-11-17 Stan Shebs <stan@codesourcery.com>
16128
16129 * tracepoint.c (struct tracepoint): New field traceframe_usage.
16130 (tracing_start_time): New global.
16131 (tracing_stop_time): New global.
16132 (tracing_user_name): New global.
16133 (tracing_notes): New global.
16134 (tracing_stop_note): New global.
16135 (cmd_qtstart): Set traceframe_usage, start_time.
16136 (stop_tracing): Set stop_time.
16137 (cmd_qtstatus): Report additional status.
16138 (cmd_qtp): New function.
16139 (handle_tracepoint_query): Call it.
16140 (cmd_qtnotes): New function.
16141 (handle_tracepoint_general_set): Call it.
16142 (get_timestamp): Rename from tsv_get_timestamp.
16143
16144 2011-11-14 Stan Shebs <stan@codesourcery.com>
16145 Kwok Cheung Yeung <kcy@codesourcery.com>
16146
16147 * linux-x86-low.c (small_jump_insn): New.
16148 (i386_install_fast_tracepoint_jump_pad): Add arguments for
16149 trampoline and error message, build a trampoline and issue a small
16150 jump instruction to it.
16151 (x86_install_fast_tracepoint_jump_pad): Add arguments for
16152 trampoline and error message.
16153 (x86_get_min_fast_tracepoint_insn_len): New.
16154 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
16155 * linux-low.h (struct linux_target_ops): Add arguments to
16156 install_fast_tracepoint_jump_pad operation, add new operation.
16157 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
16158 arguments.
16159 (linux_get_min_fast_tracepoint_insn_len): New function.
16160 (linux_target_op): Add new operation.
16161 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
16162 (gdb_trampoline_buffer_end): Ditto.
16163 (gdb_trampoline_buffer_error): Ditto.
16164 (struct ipa_sym_addresses): Add fields for new IPA variables.
16165 (symbol_list): Add entries for new IPA variables.
16166 (struct tracepoint): Add fields to hold the address range of the
16167 trampoline used by the tracepoint.
16168 (trampoline_buffer_head): New static variable.
16169 (trampoline_buffer_tail): Ditto.
16170 (claim_trampoline_space): New function.
16171 (have_fast_tracepoint_trampoline_buffer): New function.
16172 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
16173 structure.
16174 (install_fast_tracepoint): Ditto, also add error buffer argument.
16175 (cmd_qtminftpilen): New function.
16176 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
16177 (fast_tracepoint_from_trampoline_address): New function.
16178 (fast_tracepoint_collecting): Handle trampoline as part of jump
16179 pad space.
16180 (set_trampoline_buffer_space): New function.
16181 (initialize_tracepoint): Initialize new IPA variables.
16182 * target.h (struct target_ops): Add arguments to
16183 install_fast_tracepoint_jump_pad operation, add new
16184 get_min_fast_tracepoint_insn_len operation.
16185 (target_get_min_fast_tracepoint_insn_len): New.
16186 (install_fast_tracepoint_jump_pad): Add arguments.
16187 * server.h (IPA_BUFSIZ): Define.
16188 * linux-i386-ipa.c: Include extra header files.
16189 (initialize_fast_tracepoint_trampoline_buffer): New function.
16190 (initialize_low_tracepoint): Call it.
16191 * server.h (set_trampoline_buffer_space): Declare.
16192 (claim_trampoline_space): Ditto.
16193 (have_fast_tracepoint_trampoline_buffer): Ditto.
16194
16195 2011-11-14 Yao Qi <yao@codesourcery.com>
16196
16197 * server.c (handle_query): Handle InstallInTrace for qSupported.
16198 * tracepoint.c (add_tracepoint): Sort list.
16199 (install_tracepoint, download_tracepoint): New.
16200 (cmd_qtdp): Call them to install and download tracepoints.
16201 (sort_tracepoints): Removed.
16202 (cmd_qtstart): Update.
16203
16204 2011-11-14 Yao Qi <yao@codesourcery.com>
16205
16206 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
16207 * mem-break.h: Declare.
16208 * tracepoint.c (cmd_qtstart): Move some code to ...
16209 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
16210 New.
16211 (download_tracepoints): Move some code to ...
16212 (download_tracepoint_1): ... here. New.
16213
16214 2011-11-08 Yao Qi <yao@codesourcery.com>
16215
16216 * remote-utils.c (relocate_instruction): A comment fix.
16217
16218 2011-11-07 Joel Brobecker <brobecker@adacore.com>
16219
16220 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
16221 (i386_dr_low_get_control, i386_dr_low_get_status): Use
16222 dr_status_mirror and dr_control_mirror from debug_reg_state.
16223 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
16224 (i386_initial_stuff): Remove use of deleted globals.
16225 (i386_get_thread_context, i386_set_thread_context,
16226 i386_thread_added): Use dr_status_mirror and dr_control_mirror
16227 from debug_reg_state.
16228
16229 2011-11-05 Yao Qi <yao@codesourcery.com>
16230
16231 * tracepoint.c (gdb_collect): Loop over tracepoints of same
16232 address as TPOINT's.
16233
16234 2011-11-02 Stan Shebs <stan@codesourcery.com>
16235
16236 * tracepoint.c (agent_mem_read_string): New function.
16237 (eval_agent_expr): Call it for tracenz.
16238 * server.c (handle_query): Report support for tracenz.
16239
16240 2011-11-02 Yao Qi <yao@codesourcery.com>
16241
16242 * tracepoint.c (cmd_qtstart): Remove unused local variables.
16243
16244 2011-11-02 Yao Qi <yao@codesourcery.com>
16245
16246 * target.h: Fix a typo in comment.
16247
16248 2011-10-31 Pedro Alves <pedro@codesourcery.com>
16249
16250 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
16251 clobber the breakpoints' shadows with fast tracepoint jumps.
16252 * mem-break.h (check_mem_write): Add `myaddr' parameter.
16253 * target.c (write_inferior_memory): Also pass MYADDR down to
16254 check_mem_write.
16255
16256 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
16257
16258 * configure.ac: Check support for personality routine.
16259 * configure: Regenerate.
16260 * config.in: Likewise.
16261 * linux-low.c: Include <sys/personality.h>.
16262 Define ADDR_NO_RANDOMIZE if necessary.
16263 (linux_create_inferior): Disable address space randomization when
16264 forking inferior, if requested.
16265 (linux_supports_disable_randomization): New function.
16266 (linux_target_ops): Install it.
16267 * server.h (disable_randomization): Declare.
16268 * server.c (disable_randomization): New global variable.
16269 (handle_general_set): Handle QDisableRandomization.
16270 (handle_query): Likewise for qSupported.
16271 (main): Support --disable-randomization and --no-disable-randomization
16272 command line arguments.
16273 * target.h (struct target_ops): Add supports_disable_randomization.
16274 (target_supports_disable_randomization): New macro.
16275
16276 2011-09-29 Mike Frysinger <vapier@gentoo.org>
16277
16278 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
16279 ifdef check.
16280 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
16281 [!PT_GETDSBT] (target_loadmap): New definition.
16282 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
16283 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
16284 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
16285 and PT_GETDSBT to LINUX_LOADMAP.
16286 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
16287 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
16288
16289 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
16290
16291 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
16292 (arm_linux_hwbp_cap): New static variable.
16293 (arm_linux_get_hwbp_cap): Replace by ...
16294 (arm_linux_init_hwbp_cap): ... this new function.
16295 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
16296 (arm_linux_get_hw_watchpoint_count): Likewise.
16297 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16298 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
16299 (arm_prepare_to_resume): Use perror_with_name instead of error.
16300
16301 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
16302
16303 * linux-arm-low.c: Include <signal.h>.
16304 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
16305 (struct arm_linux_hwbp_cap): New data type.
16306 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
16307 (struct arm_linux_hw_breakpoint): New data type.
16308 (MAX_BPTS, MAX_WPTS): Define.
16309 (struct arch_process_info, struct arch_lwp_info): New data types.
16310 (arm_linux_get_hwbp_cap): New function.
16311 (arm_linux_get_hw_breakpoint_count): Likewise.
16312 (arm_linux_get_hw_watchpoint_count): Likewise.
16313 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16314 (arm_hwbp_control_initialize): Likewise.
16315 (arm_hwbp_control_is_enabled): Likewise.
16316 (arm_hwbp_control_is_initialized): Likewise.
16317 (arm_hwbp_control_disable): Likewise.
16318 (arm_linux_hw_breakpoint_equal): Likewise.
16319 (arm_linux_hw_point_initialize): Likewise.
16320 (struct update_registers_data): New data structure.
16321 (update_registers_callback: New function.
16322 (arm_insert_point): Likewise.
16323 (arm_remove_point): Likewise.
16324 (arm_stopped_by_watchpoint): Likewise.
16325 (arm_stopped_data_address): Likewise.
16326 (arm_new_process): Likewise.
16327 (arm_new_thread): Likewise.
16328 (arm_prepare_to_resume): Likewise.
16329 (the_low_target): Register arm_insert_point, arm_remove_point,
16330 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
16331 arm_new_thread, and arm_prepare_to_resume.
16332
16333 2011-09-15 Stan Shebs <stan@codesourcery.com>
16334
16335 * server.h (struct emit_ops): Add compare-goto fields.
16336 * tracepoint.c (gdb_agent_op_sizes): New table.
16337 (emit_eq_goto): New function.
16338 (emit_ne_goto): New function.
16339 (emit_lt_goto): New function.
16340 (emit_le_goto): New function.
16341 (emit_gt_goto): New function.
16342 (emit_ge_goto): New function.
16343 (is_goto_target): New function.
16344 (compile_bytecodes): Recognize special cases of compare-goto
16345 combinations and call specialized emitters for them.
16346 * linux-x86-low.c (amd64_emit_eq_goto): New function.
16347 (amd64_emit_ne_goto): New function.
16348 (amd64_emit_lt_goto): New function.
16349 (amd64_emit_le_goto): New function.
16350 (amd64_emit_gt_goto): New function.
16351 (amd64_emit_ge_goto): New function.
16352 (amd64_emit_ops): Add the new functions.
16353 (i386_emit_eq_goto): New function.
16354 (i386_emit_ne_goto): New function.
16355 (i386_emit_lt_goto): New function.
16356 (i386_emit_le_goto): New function.
16357 (i386_emit_gt_goto): New function.
16358 (i386_emit_ge_goto): New function.
16359 (i386_emit_ops): Add the new functions.
16360
16361 2011-09-08 Stan Shebs <stan@codesourcery.com>
16362
16363 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
16364 (i386_emit_epilogue): Restore %ebx.
16365
16366 2011-08-31 Jie Zhang <jzhang918@gmail.com>
16367
16368 * server.c (step_thread): Remove definition.
16369 (process_serial_event): Don't handle Hs.
16370 * server.h (step_thread): Remove declaration.
16371 * target.c (set_desired_inferior): Remove use of step_thread.
16372
16373 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16374
16375 * linux-low.c: Include linux-procfs.h.
16376 (linux_attach_lwp_1): Update comments.
16377 (linux_attach): Scan for existing threads when attaching to a
16378 process that is the tgid.
16379 * Makefile.in: Update dependencies.
16380
16381 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16382
16383 * configure.srv: Add linux-procfs.o dependencies.
16384
16385 2011-08-14 Yao Qi <yao@codesourcery.com>
16386
16387 * target.h (struct target_ops): Fix indent.
16388 * win32-low.c (win32_target_ops): Fix comment.
16389
16390 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
16391 Yao Qi <yao@codesourcery.com>
16392
16393 * Makefile.in (clean): Remove tic6x-*.c files.
16394 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
16395 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
16396 (tic6x-c64xp-linux.c): Likewise.
16397 * configure.srv: Add support for tic6x-*-uclinux.
16398 * linux-tic6x-low.c: New.
16399 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
16400
16401 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
16402 Yao Qi <yao@codesourcery.com>
16403
16404 * target.h (struct target_ops): Add read_loadmap.
16405 * linux-low.c (struct target_loadseg): New type.
16406 (struct target_loadmap): New type.
16407 (linux_read_loadmap): New function.
16408 (linux_target_ops): Add linux_read_loadmap.
16409 * server.c (handle_query): Support qXfer:fdpic:read packet.
16410 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
16411 to NULL.
16412
16413 2011-08-05 Eli Zaretskii <eliz@gnu.org>
16414
16415 * win32-low.c: Include <stdint.h>.
16416
16417 2011-07-22 Pedro Alves <pedro@codesourcery.com>
16418
16419 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
16420 to the inferior here.
16421 (i386_remove_aligned_watchpoint): Ditto.
16422 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
16423 fit part of the watchpoint in the debug registers.
16424 (i386_update_inferior_debug_regs): New.
16425 (i386_low_insert_watchpoint): Work on a local mirror of the debug
16426 registers, and only update the inferior on success.
16427 (i386_low_remove_watchpoint): Ditto.
16428
16429 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
16430
16431 * linux-low.c (compare_ints, unique, list_threads, show_process,
16432 linux_core_of_thread): Delete.
16433 (linux_target_ops): Change linux_core_of_thread to
16434 linux_common_core_of_thread.
16435 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
16436 * utils.c (malloc_failure): Change type of argument.
16437 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
16438 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
16439 common/linux-osdata.c, common/ptid.c and common/buffer.c.
16440 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
16441 (IPA_OBJS): Add common-utils-ipa.o.
16442 (ptid_h, linux_osdata_h): New macros.
16443 (server_h): Add common/common-utils.h, common/xml-utils.h,
16444 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
16445 common/ptid.h.
16446 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
16447 ptid.o, buffer.o): New rules.
16448 (linux-low.o): Add common/linux-osdata.h as a dependency.
16449 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
16450 * configure.ac: Add AC_HEADER_DIRENT check.
16451 * config.in: Regenerate.
16452 * configure: Regenerate.
16453 * remote-utils.c (xml_escape_text): Delete.
16454 (buffer_grow, buffer_free, buffer_init, buffer_finish,
16455 buffer_xml_printf): Move to common/buffer.c.
16456 * server.c (main): Remove call to initialize_inferiors.
16457 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
16458 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
16459 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
16460 internal_error, gdb_assert, gdb_assert_fail): Delete.
16461 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
16462 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
16463 common/buffer.h.
16464 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
16465 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
16466 initialize_inferiors): Delete.
16467
16468 2011-07-20 Pedro Alves <pedro@codesourcery.com>
16469
16470 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
16471 symbol error.
16472
16473 2011-05-31 Pedro Alves <pedro@codesourcery.com>
16474
16475 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
16476 assertion.
16477 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
16478
16479 2011-05-26 Yao Qi <yao@codesourcery.com>
16480
16481 * Makefile.in (thread-db.o): Track dependence to
16482 common/gdb_thread_db.h.
16483 * thread-db.c: include gdb_thread_db.h from right place.
16484
16485 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
16486
16487 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
16488 __FILE__ and __LINE__ to internal_error.
16489
16490 2011-05-13 Doug Evans <dje@google.com>
16491
16492 * thread-db.c (try_thread_db_load_from_sdir): New function.
16493 (try_thread_db_load_from_dir): New function.
16494 (thread_db_load_search): Handle $sdir, ignore $pdir.
16495 Remove trying of system directories if search of
16496 libthread-db-search-path fails, that is now done via $sdir.
16497
16498 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
16499
16500 * server.c (handle_query): Add EnableDisableTracepoints to the list
16501 of supported features.
16502 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
16503 tracepoints.
16504 (cmd_qtenable_disable): New.
16505 (cmd_qtstart): Install tracepoints even if disabled.
16506 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
16507 receiving a QTEnable or QTDisable packet.
16508 (gdb_collect): Skip data collection if fast tracepoint is disabled.
16509 (ust_marker_to_static_tracepoint): Do not ignore disabled static
16510 tracepoints.
16511 (gdb_probe): Skip data collection if static tracepoint is disabled.
16512
16513 2011-05-10 Doug Evans <dje@google.com>
16514
16515 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
16516
16517 2011-05-04 Doug Evans <dje@google.com>
16518
16519 * linux-low.c (linux_join): Skip process lookup.
16520 * spu-low.c (spu_join): Ditto.
16521 * server.c (join_inferiors_callback): Delete.
16522 (process_serial_event): For 'D' packet (detach) call join_inferior
16523 directly.
16524
16525 2011-05-04 Joseph Myers <joseph@codesourcery.com>
16526
16527 * README: Don't mention xscale*-*-linux*.
16528 * configure.srv (xscale*-*-linux*): Don't handle target.
16529
16530 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
16531
16532 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
16533 casting pointers.
16534 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
16535 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
16536 (i386_emit_void_call_2): Likewise.
16537
16538 2011-04-26 Yao Qi <yao@codesourcery.com>
16539
16540 * linux-low.c: Move common macros to linux-ptrace.h.
16541 Include linux-ptrace.h.
16542 * Makefile.in (linux_ptrace_h): New.
16543 (linux-low.o): Depends on linux-ptrace.h.
16544
16545 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
16546
16547 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
16548 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
16549 (remote_prepare): New function with most of the TCP code from ...
16550 (remote_open): ... here. Detect PORT here unconditionally. Move also
16551 setting transport_is_reliable.
16552 * server.c (run_once): New variable.
16553 (gdbserver_usage): Document it.
16554 (main): Set run_once for `--once'. Call remote_prepare. Exit after
16555 the first run if RUN_ONCE.
16556 * server.h (run_once, remote_prepare): New declarations.
16557
16558 2011-04-19 Tom Tromey <tromey@redhat.com>
16559
16560 * win32-low.c (handle_load_dll): Remove duplicate "the".
16561
16562 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
16563
16564 Remove support for old Cygwin 1.5 versions.
16565 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
16566 function to avoid warning.
16567 (win32_add_one_solib): Use cygwin_conv_path function to avoid
16568 warning.
16569
16570 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
16571
16572 * gdbserver/server.h (Macro _): Define it if not available.
16573
16574 2011-03-14 Michael Snyder <msnyder@vmware.com>
16575
16576 * hostio.c (handle_close): Remove unnecessary null test.
16577
16578 2011-03-10 Joel Brobecker <brobecker@adacore.com>
16579
16580 * Makefile.in (maintainer-clean realclean distclean): Remove
16581 "make ... subdir_do" command.
16582
16583 2011-03-10 Michael Snyder <msnyder@vmware.com>
16584
16585 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
16586
16587 * server.c (handle_v_run): Free alloced buffer on early return.
16588
16589 2011-03-09 Yao Qi <yao@codesourcery.com>
16590
16591 Revert:
16592 2011-03-04 Yao Qi <yao@codesourcery.com>
16593
16594 * Makefile.in: Remove GNU make feature --directory.
16595
16596 2011-03-05 Yao Qi <yao@codesourcery.com>
16597
16598 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16599 (subdir_do): New make target. Copied from gdb/Makefile.
16600 (maintainer-clean, realclean, distclean, clean): Call corresponding
16601 make targets in common/Makefile.
16602
16603 2011-02-11 Yao Qi <yao@codesourcery.com>
16604
16605 * configure.ac: Call AC_PROG_RANLIB.
16606 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16607 * configure: Regenerate.
16608
16609 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
16610
16611 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
16612
16613 2011-03-06 Yao Qi <yao@codesourcery.com>
16614
16615 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
16616
16617 2011-03-05 Yao Qi <yao@codesourcery.com>
16618
16619 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16620 (subdir_do): New make target. Copied from gdb/Makefile.
16621 (maintainer-clean, realclean, distclean, clean): Call corresponding
16622 make targets in common/Makefile.
16623
16624 2011-03-04 Yao Qi <yao@codesourcery.com>
16625
16626 * Makefile.in: Remove GNU make feature --directory.
16627
16628 2011-03-04 Michael Snyder <msnyder@vmware.com>
16629
16630 * server.c (queue_stop_reply): Call xmalloc not malloc.
16631
16632 2011-03-02 Michael Snyder <msnyder@vmware.com>
16633
16634 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
16635
16636 2011-02-28 Michael Snyder <msnyder@vmware.com>
16637
16638 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
16639 (cmd_qtframe): Ditto.
16640 (cmd_qtbuffer): Ditto.
16641 (cmd_bigqtbuffer): Ditto.
16642
16643 * utils.c (decimal2str): Initialize 'width' to nine, then
16644 don't mess with it.
16645
16646 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16647
16648 * hostio.c (require_data): Free *data, not data.
16649
16650 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16651
16652 * hostio.c (require_data): Use free, not xfree.
16653
16654 2011-02-27 Michael Snyder <msnyder@vmware.com>
16655
16656 * server.c (handle_query): Discard unused value.
16657
16658 * hostio.c (require_data): Free malloc memory before returning
16659 error.
16660
16661 2011-02-26 Michael Snyder <msnyder@vmware.com>
16662
16663 * linux-low.c (list_threads): Call closedir for dirent.
16664
16665 2011-02-27 Michael Snyder <msnyder@vmware.com>
16666
16667 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
16668 a case statement falls through.
16669
16670 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
16671
16672 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
16673 in comparison.
16674
16675 2011-02-26 Michael Snyder <msnyder@vmware.com>
16676
16677 * utils.c (decimal2str): Eliminate dead code and dead param.
16678 (pulongest): Drop dead param from call to decimal2str.
16679 (plongest): Ditto.
16680
16681 2011-02-24 Joel Brobecker <brobecker@adacore.com>
16682
16683 Revert the following patch (not approved yet):
16684 2011-02-21 Hui Zhu <teawater@gmail.com>
16685 * tracepoint.c (tp_printf): New function.
16686 (eval_agent_expr): Handle gdb_agent_op_printf.
16687
16688 2011-02-21 Hui Zhu <teawater@gmail.com>
16689
16690 * tracepoint.c (tp_printf): New function.
16691 (eval_agent_expr): Handle gdb_agent_op_printf.
16692
16693 2011-02-18 Tom Tromey <tromey@redhat.com>
16694
16695 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
16696 (tracepoint.o): Likewise.
16697 * tracepoint.c (enum gdb_agent_op): Use ax.def.
16698 (gdb_agent_op_names): Likewise.
16699
16700 2011-02-18 Tom Tromey <tromey@redhat.com>
16701
16702 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
16703 gdb_agent_op_rot>: New constants.
16704 (gdb_agent_op_names): Add pick and roll.
16705 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
16706 cases.
16707
16708 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
16709
16710 * aclocal.m4: Regenerated with aclocal-1.11.1.
16711
16712 2011-02-14 Pedro Alves <pedro@codesourcery.com>
16713
16714 * server.c (handle_qxfer_traceframe_info): New.
16715 (qxfer_packets): Register "traceframe-info".
16716 (handle_query): Report support for qXfer:traceframe-info:read+.
16717 * tracepoint.c (match_blocktype): New.
16718 (traceframe_find_block_type): Rename to ...
16719 (traceframe_walk_blocks): ... this. Add callback filter argument,
16720 and use it.
16721 (traceframe_find_block_type): New, reimplemented on top of
16722 traceframe_walk_blocks.
16723 (build_traceframe_info_xml): New.
16724 (traceframe_read_info): New.
16725 * server.h (traceframe_read_info): Declare.
16726
16727 2011-02-11 Yao Qi <yao@codesourcery.com>
16728
16729 * configure.ac: Call AC_PROG_RANLIB.
16730 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16731 * configure: Regenerate.
16732
16733 2011-02-07 Pedro Alves <pedro@codesourcery.com>
16734
16735 * server.c (gdb_read_memory): Change return semantics to allow
16736 partial transfers.
16737 (handle_search_memory_1): Adjust.
16738 (process_serial_event) <'m' packet>: Handle partial transfers.
16739 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
16740
16741 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16742
16743 * regcache.c (init_register_cache): Initialize
16744 regcache->register_status.
16745 (free_register_cache): Release regcache->register_status.
16746 (regcache_cpy): Copy register_status.
16747 (registers_to_string): Print 'x's for unavailable registers.
16748 (supply_register): Mark the register's status valid or
16749 unavailable, depending on whether a buffer was passed in or not.
16750 (supply_register_zeroed): New.
16751 (supply_regblock): Mark the registers' status valid or
16752 unavailable, depending on whether a buffer was passed in or not.
16753 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
16754 (struct regcache): New `register_status' field.
16755 (supply_register_zeroed): Declare.
16756 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
16757 supply_register_zeroed, rather than passing a NULL buffer to
16758 supply_register.
16759 * tracepoint.c (fetch_traceframe_registers): Update comment.
16760
16761 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16762
16763 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
16764 buffer explicit.
16765
16766 2011-01-25 Pedro Alves <pedro@codesourcery.com>
16767
16768 * server.h (decode_xfer_write): Change prototype.
16769 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
16770 and don't extract the annex here.
16771 * server.c (decode_xfer_read): Remove `annex' parameter,
16772 and don't extract the annex here.
16773 (decode_xfer): New.
16774 (struct qxfer): New.
16775 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
16776 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
16777 (handle_qxfer_statictrace): New functions, abstracted out from
16778 handle_query, and made to use the struct qxfer interface.
16779 (handle_threads_qxfer_proper): Rename to ...
16780 (handle_qxfer_threads_proper): ... this.
16781 (handle_threads_qxfer): Rename to ...
16782 (handle_qxfer_threads): ... this. Adjust.
16783 (qxfer_packets): New array.
16784 (handle_qxfer): New function.
16785 (handle_query): Use handle_qxfer.
16786
16787 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
16788
16789 * gdbreplay.c: Shorten lines of >= 80 columns.
16790 * linux-low.c: Ditto.
16791 * linux-ppc-low.c: Ditto.
16792 * linux-s390-low.c: Ditto.
16793 * linux-sparc-low.c: Ditto.
16794 * linux-x86-low.c: Ditto.
16795 * linux-xtensa-low.c: Ditto.
16796 * mem-break.c: Ditto.
16797 * nto-low.c: Ditto.
16798 * regcache.h: Ditto.
16799 * remote-utils.c: Ditto.
16800 * server.c: Ditto.
16801 * server.h: Ditto.
16802 * thread-db.c: Ditto.
16803 * tracepoint.c: Ditto.
16804 * utils.c: Ditto.
16805 * win32-low.h: Ditto.
16806
16807 2011-01-05 Joel Brobecker <brobecker@adacore.com>
16808
16809 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
16810 update.
16811
16812 2011-01-01 Joel Brobecker <brobecker@adacore.com>
16813
16814 * server.c (gdbserver_version): Update copyright year in version
16815 output.
16816 * gdbreplay.c (gdbreplay_version): Ditto.
16817
16818 2010-12-29 Jie Zhang <jie.zhang@analog.com>
16819
16820 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
16821 * linux-bfin-low.c: New file.
16822 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
16823 PT_DATA_ADDR for BFIN targets.
16824 * Makefile.in (SFILES): Add linux-bfin-low.c.
16825 (clean): Remove reg-bfin.c.
16826 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
16827 * README: Mention supported Blackfin targets.
16828
16829 2010-12-23 Mike Frysinger <vapier@gentoo.org>
16830
16831 * .gitignore: New file.
16832
16833 2010-11-16 Mike Frysinger <vapier@gentoo.org>
16834
16835 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
16836
16837 2010-10-22 Jie Zhang <jie@codesourcery.com>
16838
16839 * Makefile.in: Add FLAGS_TO_PASS variable.
16840 (install): Remove dependency of install-only and recursively
16841 invoke make for install-only.
16842
16843 2010-10-04 Doug Evans <dje@google.com>
16844
16845 * Makefile.in (uninstall): Use $(DESTDIR).
16846
16847 2010-09-24 Pedro Alves <pedro@codesourcery.com>
16848
16849 PR gdb/11842
16850
16851 * linux-x86-low.c (compat_siginfo_from_siginfo)
16852 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
16853 si_code is < 0. Check for si_code == SI_TIMER before checking for
16854 si_code < 0.
16855
16856 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16857
16858 * lynx-i386-low.c: New file.
16859 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
16860
16861 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16862
16863 * lynx-low.c (ptrace_request_to_str): Remove handling for
16864 request values that have been removed in LynxOS 5.x.
16865
16866 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16867
16868 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
16869 <ptrace.h>
16870
16871 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
16872
16873 * configure.ac: Add --enable-inprocess-agent option.
16874 * configure: Rebuilt.
16875
16876 2010-09-06 Yao Qi <yao@codesourcery.com>
16877
16878 * linux-low.c (linux_kill): Remove unused variable.
16879 (linux_stabilize_threads): Likewise.
16880 * server.c (start_inferior): Likewise.
16881 (queue_stop_reply_callback): Likewise.
16882 * tracepoint.c (do_action_at_tracepoint): Likewise.
16883
16884 2010-09-06 Yao Qi <yao@codesourcery.com>
16885
16886 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
16887 on return.
16888
16889 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
16890
16891 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
16892
16893 2010-09-06 Pedro Alves <pedro@codesourcery.com>
16894
16895 * Makefile.in (install-only): Replace $IPA_DEPFILES with
16896 "$(IPA_DEPFILES)".
16897
16898 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16899
16900 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
16901 gdbserver/lynx-ppc-low.c: New files.
16902 * Makefile.in (lynx_low_h): New variable.
16903 (lynx-low.o, lynx-ppc-low.o): New rules.
16904 * configure.ac: On LynxOS, link with -lnetinet.
16905 * configure.srv: Add handling of powerpc-*-lynxos* targets.
16906 * configure: regenerate.
16907
16908 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16909
16910 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
16911 * configure.ac: Add check for vasprintf and vsnprintf.
16912 * configure, config.in: Regenerate.
16913 * server.h (vasprintf, vsnprintf): Add conditional declarations.
16914
16915 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16916
16917 * gdbreplay.c: Move include of alloca.h up, next to include of
16918 malloc.h.
16919 * server.h: Add include of malloc.h.
16920 * mem-break.c: Remove include of malloc.h.
16921 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
16922
16923 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16924
16925 * Makefile.in (memmem.o): Build with -Wno-error.
16926
16927 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16928
16929 * utils.c (xsnprintf): Make non-static.
16930 * server.h: Add xsnprintf declaration.
16931 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
16932 replace calls to snprintf by calls to xsnprintf throughout.
16933
16934 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16935
16936 * configure.ac: Add configure check for alloca.
16937 * configure, config.in: Regenerate.
16938 * server.h: Include alloca.h if it exists.
16939 * gdbreplay.c: Include alloca.h if it exists.
16940
16941 2010-08-28 Pedro Alves <pedro@codesourcery.com>
16942
16943 * linux-low.c (__SIGRTMIN): Define if not already defined.
16944 (linux_create_inferior): Check for __ANDROID__ rather than
16945 __SIGRTMIN.
16946 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
16947 are already deferred.
16948 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
16949 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
16950 stopped and already has a pending signal to report.
16951 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
16952 a pending signal to report or is moving out of a jump pad.
16953 (linux_init_signals): Check for __ANDROID__ rather than
16954 __SIGRTMIN.
16955
16956 2010-08-28 Pedro Alves <pedro@codesourcery.com>
16957
16958 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
16959 debug_threads check. Avoid a linear search when not doing debug
16960 output.
16961
16962 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16963
16964 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
16965 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
16966 (struct file_handler) <fd>: Change type to gdb_fildes_t.
16967 (process_event): Change local fd's type to gdb_fildes_t.
16968 (create_file_handler): Adjust prototype.
16969 (delete_file_handler): Adjust prototype.
16970 (handle_file_event): Adjust prototype. Use pfildes.
16971 (create_file_event): Adjsut prototype.
16972 * remote-utils.c (remote_desc, listen_desc): Change type to
16973 gdb_fildes_t.
16974 * server.h: New gdb_fildes_t typedef.
16975 [USE_WIN32API]: Include winsock2.h.
16976 (delete_file_handler, add_file_handler): Adjust prototypes.
16977 (pfildes): Declare.
16978 * utils.c (pfildes): New.
16979
16980 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16981
16982 * configure.ac (build_warnings): Add -Wno-char-subscripts.
16983 * configure: Regenerate.
16984
16985 2010-08-27 Pedro Alves <pedro@codesourcery.com>
16986
16987 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
16988 (linux_done_accessing_memory): ... this.
16989 (linux_target_ops): Adjust.
16990 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
16991 * nto-low.c (nto_target_ops): Adjust comment.
16992 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
16993 * spu-low.c (spu_target_ops): Adjust comment.
16994 * target.h (target_ops): Rename unprepare_to_access_memory field
16995 to done_accessing_memory.
16996 (unprepare_to_access_memory): Rename to ...
16997 (done_accessing_memory): ... this.
16998
16999 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17000
17001 * linux-low.c (linux_prepare_to_access_memory): New.
17002 (linux_unprepare_to_access_memory): New.
17003 (linux_target_ops): Install them.
17004 * server.c (read_memory): Rename to ...
17005 (gdb_read_memory): ... this. Use
17006 prepare_to_access_memory/prepare_to_access_memory.
17007 (write_memory): Rename to ...
17008 (gdb_write_memory): ... this. Use
17009 prepare_to_access_memory/prepare_to_access_memory.
17010 (handle_search_memory_1): Adjust.
17011 (process_serial_event): Adjust.
17012 * target.h (struct target_ops): New fields
17013 prepare_to_access_memory and unprepare_to_access_memory.
17014 (prepare_to_access_memory, unprepare_to_access_memory): New.
17015 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
17016 prepare_to_access_memory/prepare_to_access_memory.
17017 * nto-low.c (nto_target_ops): Adjust.
17018 * spu-low.c (spu_target_ops): Adjust.
17019 * win32-low.c (win32_target_ops): Adjust.
17020
17021 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17022
17023 * Makefile.in (WARN_CFLAGS): Get it from configure.
17024 (WERROR_CFLAGS): New.
17025 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
17026 * configure.ac: Introduce --enable-werror, which adds -Werror to
17027 the compiler command line. Enabled by default. Disable with
17028 --disable-werror. Add -Wdeclaration-after-statement
17029 Wpointer-arith and -Wformat-nonliteral to warning flags.
17030 * configure: Regenerate.
17031
17032 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17033
17034 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
17035
17036 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17037
17038 * gdbreplay.c (remote_error): New.
17039 (gdbchar): New.
17040 (expect): Use gdbchar. Check for error reading from GDB.
17041 Clarify sync error output.
17042 (play): Check for errors writing to GDB.
17043 * linux-low.c (sigchld_handler): Really ignore `write' errors.
17044 * remote-utils.c (getpkt): Check for errors writing to the remote
17045 descriptor.
17046
17047 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17048
17049 * linux-low.c (linux_wait_1): Move non-debugging code out of
17050 `debug_threads' control.
17051
17052 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17053
17054 * linux-low.c (linux_wait_1): Don't set last_status here.
17055 * server.c (push_event, queue_stop_reply_callback): Assert we're
17056 not pushing a TARGET_WAITKIND_IGNORE event.
17057 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
17058 (myresume, handle_target_event): Set the thread's last_resume_kind
17059 and last_status from the target returned status.
17060
17061 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17062
17063 PR threads/10729
17064
17065 * linux-x86-low.c (update_debug_registers_callback): New.
17066 (i386_dr_low_set_addr): Use it.
17067 (i386_dr_low_get_addr): New.
17068 (i386_dr_low_set_control): Use update_debug_registers_callback.
17069 (i386_dr_low_get_control): New.
17070 (i386_dr_low_get_status): Adjust.
17071 * linux-low.c (linux_stop_lwp): New.
17072 * linux-low.h (linux_stop_lwp): Declare.
17073
17074 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
17075 argument instead of a i386_debug_reg_state.
17076 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
17077 a i386_debug_reg_state.
17078 (i386_insert_aligned_watchpoint): Adjust.
17079 (i386_remove_aligned_watchpoint): Adjust.
17080 (i386_low_stopped_data_address): Read the debug registers from the
17081 inferior instead of from the mirrors.
17082 * i386-low.h (struct i386_debug_reg_state): Extend comment.
17083 (i386_dr_low_get_addr): Declare.
17084 (i386_dr_low_get_control): Declare.
17085 (i386_dr_low_get_status): Change prototype.
17086
17087 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
17088 (i386_dr_low_get_addr): New.
17089 (i386_dr_low_get_control): New.
17090 (i386_dr_low_get_status): Adjust prototype. Return
17091 dr_status_mirror.
17092 (i386_initial_stuff): Clear dr_status_mirror and
17093 dr_control_mirror.
17094 (i386_get_thread_context): Adjust.
17095 (i386_set_thread_context): Adjust.
17096 (i386_thread_added): Adjust.
17097
17098 2010-08-24 Pedro Alves <pedro@codesourcery.com>
17099
17100 * linux-low.h (linux_thread_area): Delete declaration.
17101
17102 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
17103
17104 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
17105 after its termination.
17106
17107 2010-08-09 Pedro Alves <pedro@codesourcery.com>
17108
17109 * linux-low.c (gdb_wants_lwp_stopped): Delete.
17110 (gdb_wants_all_stopped): Delete.
17111 (linux_wait_1): Don't call them.
17112 * server.c (handle_v_cont): Tag all threads as want-stopped.
17113 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
17114 stopped as "client-wants-stopped".
17115
17116 2010-07-31 Pedro Alves <pedro@codesourcery.com>
17117
17118 * Makefile.in (signals_h): New.
17119 (server_h): Depend on it.
17120 (server.o): Don't depend on $(signals_def).
17121 (signals.o): Depend on $(signals_def).
17122
17123 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
17124
17125 * Makefile.in (signals_def): New.
17126 (server_h): Append include/gdb/signals.h and signals_def.
17127 (server.o): Append signals_def.
17128
17129 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
17130
17131 * server.c (handle_target_event): Use target_signal_to_host for
17132 resume_info.sig initialization.
17133 * target.h (struct thread_resume) <sig>: New comment.
17134
17135 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
17136
17137 * server.c (handle_query): strcpy() the returned string from paddress()
17138 instead of sprintf().
17139 * utils.c (paddress): Return phex_nz().
17140
17141 2010-07-07 Joel Brobecker <brobecker@adacore.com>
17142
17143 * server.c (handle_v_cont): Call mourn_inferior if process
17144 just exited.
17145 (myresume): Likewise.
17146
17147 2010-07-01 Pedro Alves <pedro@codesourcery.com>
17148
17149 Static tracepoints, and integration with UST.
17150
17151 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
17152 * mem-break.c (uninsert_all_breakpoints)
17153 (reinsert_all_breakpoints): New.
17154 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
17155 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
17156 (gdb_agent_ust_loaded, helper_thread_id)
17157 (gdb_agent_helper_thread_id): New macros.
17158 (struct ipa_sym_addresses): Add addr_ust_loaded,
17159 addr_helper_thread_id, addr_cmd_buf.
17160 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
17161 (in_process_agent_loaded_ust): New.
17162 (write_e_ust_not_loaded): New.
17163 (maybe_write_ipa_ust_not_loaded): New.
17164 (struct collect_static_trace_data_action): New.
17165 (enum tracepoint_type) <static_tracepoint>: New.
17166 (struct tracepoint) <handle>: Mention static tracepoints.
17167 (struct static_tracepoint_ctx): New.
17168 (CMD_BUF_SIZE): New.
17169 (add_tracepoint_action): Handle static tracepoint actions.
17170 (unprobe_marker_at): New.
17171 (clear_installed_tracepoints): Handle static tracepoints.
17172 (cmd_qtdp): Handle static tracepoints.
17173 (probe_marker_at): New.
17174 (cmd_qtstart): Handle static tracepoints.
17175 (response_tracepoint): Handle static tracepoints.
17176 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
17177 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
17178 (get_context_regcache): Handle static tracepoints.
17179 (do_action_at_tracepoint): Handle static tracepoint actions.
17180 (traceframe_find_block_type): Handle static trace data blocks.
17181 (traceframe_read_sdata): New.
17182 (download_tracepoints): Download static tracepoint actions.
17183 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
17184 (GDB_PROBE_NAME): New.
17185 (ust_ops): New.
17186 (GET_UST_SYM): New.
17187 (USTF): New.
17188 (dlsym_ust): New.
17189 (ust_marker_to_static_tracepoint): New.
17190 (gdb_probe): New.
17191 (collect_ust_data_at_tracepoint): New.
17192 (gdb_ust_probe): New.
17193 (UNIX_PATH_MAX, SOCK_DIR): New.
17194 (gdb_ust_connect_sync_socket): New.
17195 (resume_thread, stop_thread): New.
17196 (run_inferior_command): New.
17197 (init_named_socket): New.
17198 (gdb_ust_socket_init): New.
17199 (cstr_to_hexstr): New.
17200 (next_st): New.
17201 (first_marker, next_marker): New.
17202 (response_ust_marker): New.
17203 (cmd_qtfstm, cmd_qtsstm): New.
17204 (unprobe_marker_at, probe_marker_at): New.
17205 (cmd_qtstmat, gdb_ust_thread): New.
17206 (gdb_ust_init): New.
17207 (initialize_tracepoint_ftlib): Call gdb_ust_init.
17208 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
17209 (ST_REGENTRY): New.
17210 (x86_64_st_collect_regmap): New.
17211 (X86_64_NUM_ST_COLLECT_GREGS): New.
17212 (AMD64_RIP_REGNUM): New.
17213 (supply_static_tracepoint_registers): New.
17214 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
17215 (ST_REGENTRY): New.
17216 (i386_st_collect_regmap): New.
17217 (i386_NUM_ST_COLLECT_GREGS): New.
17218 (supply_static_tracepoint_registers): New.
17219 * server.c (handle_query): Handle qXfer:statictrace:read.
17220 <qSupported>: Report support for StaticTracepoints, and
17221 qXfer:statictrace:read features.
17222 * server.h (traceframe_read_sdata)
17223 (supply_static_tracepoint_registers): Declare.
17224 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
17225 (unpack_varlen_hex): Include in IPA build.
17226 * Makefile.in (ustlibs, ustinc): New.
17227 (IPA_OBJS): Add remote-utils-ipa.o.
17228 ($(IPA_LIB)): Link -ldl and -lpthread.
17229 (UST_CFLAGS): New.
17230 (IPAGENT_CFLAGS): Add UST_CFLAGS.
17231 * config.in, configure: Regenerate.
17232
17233 2010-06-20 Ian Lance Taylor <iant@google.com>
17234 Pedro Alves <pedro@codesourcery.com>
17235
17236 * linux-x86-low.c (always_true): Delete.
17237 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
17238 trying to fool the compiler with always_true.
17239
17240 2010-06-20 Pedro Alves <pedro@codesourcery.com>
17241
17242 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
17243 conditions in gdbserver.
17244
17245 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
17246
17247 * spu-low.c (spu_read_memory): Wrap around local store limit.
17248 (spu_write_memory): Likewise.
17249
17250 2010-06-15 Pedro Alves <pedro@codesourcery.com>
17251
17252 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
17253 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
17254 LONGEST uses.
17255 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
17256 uses.
17257 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
17258 uses with LONGEST uses.
17259
17260 2010-06-14 Stan Shebs <stan@codesourcery.com>
17261 Pedro Alves <pedro@codesourcery.com>
17262
17263 Bytecode compiler.
17264
17265 * linux-x86-low.c: Include limits.h.
17266 (add_insns): New.
17267 (always_true): New.
17268 (EMIT_ASM): New.
17269 (EMIT_ASM32): New.
17270 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
17271 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
17272 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
17273 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
17274 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
17275 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
17276 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
17277 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
17278 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
17279 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
17280 (amd64_emit_void_call_2): New.
17281 (amd64_emit_ops): New.
17282 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
17283 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
17284 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
17285 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
17286 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
17287 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
17288 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
17289 (i386_emit_call, i386_emit_reg, i386_emit_pop)
17290 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
17291 (i386_emit_stack_adjust, i386_emit_int_call_1)
17292 (i386_emit_void_call_2): New.
17293 (i386_emit_ops): New.
17294 (x86_emit_ops): New.
17295 (the_low_target): Install x86_emit_ops.
17296 * server.h (struct emit_ops): New.
17297 (get_raw_reg_func_addr): Declare.
17298 (current_insn_ptr, emit_error): Declare.
17299 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
17300 (set_trace_state_variable_value): New defines.
17301 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
17302 addr_get_trace_state_variable_value and
17303 addr_set_trace_state_variable_value.
17304 (symbol_list): New fields for get_raw_reg,
17305 get_trace_state_variable_value and set_trace_state_variable_value.
17306 (condfn): New typedef.
17307 (struct tracepoint): New field `compiled_cond'.
17308 (do_action_at_tracepoint): Clear compiled_cond.
17309 (get_trace_state_variable_value, set_trace_state_variable_value):
17310 Export in the IPA.
17311 (condition_true_at_tracepoint): If there's a compiled condition,
17312 run that.
17313 (current_insn_ptr, emit_error): New globals.
17314 (struct bytecode_address): New.
17315 (get_raw_reg_func_addr): New.
17316 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
17317 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
17318 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
17319 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
17320 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
17321 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
17322 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
17323 (compile_tracepoint_condition, compile_bytecodes): New.
17324 * target.h (emit_ops): Forward declare.
17325 (struct target_ops): New field emit_ops.
17326 (target_emit_ops): New.
17327 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
17328 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
17329 * linux-low.c (linux_emit_ops): New.
17330 (linux_target_ops): Install it.
17331 * linux-low.h (struct linux_target_ops): New field emit_ops.
17332
17333 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
17334
17335 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
17336 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
17337
17338 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17339 Stan Shebs <stan@codesourcery.com>
17340
17341 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
17342 (all): Depend on $(extra_libraries).
17343 (install-only): Install the IPA.
17344 (IPA_OBJS, IPA_LIB): New.
17345 (clean): Remove the IPA lib.
17346 (IPAGENT_CFLAGS): New.
17347 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
17348 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
17349 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
17350 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
17351 * configure.ac: Check for atomic builtins support in the compiler.
17352 (IPA_DEPFILES, extra_libraries): Define.
17353 * configure.srv (ipa_obj): Add description.
17354 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
17355 (i[34567]86-*-linux*): Set ipa_obj.
17356 (x86_64-*-linux*): Set ipa_obj.
17357 * linux-low.c (stabilizing_threads): New.
17358 (supports_fast_tracepoints): New.
17359 (linux_detach): Stabilize threads before detaching.
17360 (handle_tracepoints): Handle internal tracing breakpoints. Assert
17361 the lwp is either not stabilizing, or is moving out of a jump pad.
17362 (linux_fast_tracepoint_collecting): New.
17363 (maybe_move_out_of_jump_pad): New.
17364 (enqueue_one_deferred_signal): New.
17365 (dequeue_one_deferred_signal): New.
17366 (linux_wait_for_event_1): If moving out of a jump pad, defer
17367 pending signals to later.
17368 (linux_stabilize_threads): New.
17369 (linux_wait_1): Check if threads need moving out of jump pads, and
17370 do it if so.
17371 (stuck_in_jump_pad_callback): New.
17372 (move_out_of_jump_pad_callback): New.
17373 (lwp_running): New.
17374 (linux_resume_one_lwp): Handle moving out of jump pads.
17375 (linux_set_resume_request): Dequeue deferred signals.
17376 (need_step_over_p): Also step over fast tracepoint jumps.
17377 (start_step_over): Also uninsert fast tracepoint jumps.
17378 (finish_step_over): Also reinsert fast tracepoint jumps.
17379 (linux_install_fast_tracepoint_jump): New.
17380 (linux_target_ops): Install linux_stabilize_threads and
17381 linux_install_fast_tracepoint_jump_pad.
17382 * linux-low.h (linux_target_ops) <get_thread_area,
17383 install_fast_tracepoint_jump_pad>: New fields.
17384 (struct lwp_info) <collecting_fast_tracepoint,
17385 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
17386 (linux_get_thread_area): Declare.
17387 * linux-x86-low.c (jump_insn): New.
17388 (x86_get_thread_area): New.
17389 (append_insns): New.
17390 (push_opcode): New.
17391 (amd64_install_fast_tracepoint_jump_pad): New.
17392 (i386_install_fast_tracepoint_jump_pad): New.
17393 (x86_install_fast_tracepoint_jump_pad): New.
17394 (the_low_target): Install x86_get_thread_area and
17395 x86_install_fast_tracepoint_jump_pad.
17396 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
17397 (struct fast_tracepoint_jump): New.
17398 (fast_tracepoint_jump_insn): New.
17399 (fast_tracepoint_jump_shadow): New.
17400 (find_fast_tracepoint_jump_at): New.
17401 (fast_tracepoint_jump_here): New.
17402 (delete_fast_tracepoint_jump): New.
17403 (set_fast_tracepoint_jump): New.
17404 (uninsert_fast_tracepoint_jumps_at): New.
17405 (reinsert_fast_tracepoint_jumps_at): New.
17406 (set_breakpoint_at): Use write_inferior_memory.
17407 (uninsert_raw_breakpoint): Use write_inferior_memory.
17408 (check_mem_read): Mask out fast tracepoint jumps.
17409 (check_mem_write): Mask out fast tracepoint jumps.
17410 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
17411 (set_fast_tracepoint_jump): Declare.
17412 (delete_fast_tracepoint_jump)
17413 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
17414 (reinsert_fast_tracepoint_jumps_at): Declare.
17415 * regcache.c: Don't compile many functions when building the
17416 in-process agent library.
17417 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
17418 the register buffer in the heap.
17419 (free_register_cache): If the register buffer isn't owned by the
17420 regcache, don't free it.
17421 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
17422 pre-existing register caches.
17423 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
17424 type.
17425 (convert_ascii_to_int): : Constify `from' parameter type.
17426 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
17427 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
17428 the needed buffer in-place.
17429 (relocate_instruction): New.
17430 * server.c (handle_query) <qSymbols>: If the target supports
17431 tracepoints, give it a chance of looking up symbols. Report
17432 support for fast tracepoints.
17433 (handle_status): Stabilize threads.
17434 (process_serial_event): Adjust.
17435 * server.h (struct fast_tracepoint_jump): Forward declare.
17436 (struct process_info) <fast_tracepoint_jumps>: New field.
17437 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
17438 (decode_X_packet, decode_M_packet): Adjust.
17439 (relocate_instruction): Declare.
17440 (in_process_agent_loaded): Declare.
17441 (tracepoint_look_up_symbols): Declare.
17442 (struct fast_tpoint_collect_status): Declare.
17443 (fast_tracepoint_collecting): Declare.
17444 (force_unlock_trace_buffer): Declare.
17445 (handle_tracepoint_bkpts): Declare.
17446 (initialize_low_tracepoint)
17447 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
17448 * target.h (struct target_ops) <stabilize_threads,
17449 install_fast_tracepoint_jump_pad>: New fields.
17450 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
17451 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
17452 [HAVE_STDINT_H]: Include stdint.h.
17453 (trace_debug_1): Rename to ...
17454 (trace_vdebug): ... this.
17455 (trace_debug): Rename to ...
17456 (trace_debug_1): ... this. Add `level' parameter.
17457 (trace_debug): New.
17458 (ATTR_USED, ATTR_NOINLINE): New.
17459 (IP_AGENT_EXPORT): New.
17460 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
17461 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
17462 (about_to_request_buffer_space, trace_buffer_is_full)
17463 (stopping_tracepoint, expr_eval_result, error_tracepoint)
17464 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
17465 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
17466 (traceframe_write_count, traceframes_created)
17467 (trace_state_variables)
17468 New renaming defines.
17469 (struct ipa_sym_addresses): New.
17470 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
17471 (symbol_list): New.
17472 (ipa_sym_addrs): New.
17473 (all_tracepoint_symbols_looked_up): New.
17474 (in_process_agent_loaded): New.
17475 (write_e_ipa_not_loaded): New.
17476 (maybe_write_ipa_not_loaded): New.
17477 (tracepoint_look_up_symbols): New.
17478 (debug_threads) [IN_PROCESS_AGENT]: New.
17479 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
17480 (UNKNOWN_SIDE_EFFECTS): New.
17481 (stop_tracing): New.
17482 (flush_trace_buffer): New.
17483 (stop_tracing_bkpt): New.
17484 (flush_trace_buffer_bkpt): New.
17485 (read_inferior_integer): New.
17486 (read_inferior_uinteger): New.
17487 (read_inferior_data_pointer): New.
17488 (write_inferior_data_pointer): New.
17489 (write_inferior_integer): New.
17490 (write_inferior_uinteger): New.
17491 (struct collect_static_trace_data_action): Delete.
17492 (enum tracepoint_type): New.
17493 (struct tracepoint) <type>: New field `type'.
17494 <actions_str, step_actions, step_actions_str>: Only include in
17495 GDBserver.
17496 <orig_size, obj_addr_on_target, adjusted_insn_addr>
17497 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
17498 (tracepoints): Use IP_AGENT_EXPORT.
17499 (last_tracepoint): Don't include in the IPA.
17500 (stopping_tracepoint): Use IP_AGENT_EXPORT.
17501 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
17502 (alloced_trace_state_variables): New.
17503 (trace_state_variables): Use IP_AGENT_EXPORT.
17504 (traceframe_t): Delete unused variable.
17505 (circular_trace_buffer): Don't include in the IPA.
17506 (trace_buffer_start): Delete.
17507 (struct trace_buffer_control): New.
17508 (trace_buffer_free): Delete.
17509 (struct ipa_trace_buffer_control): New.
17510 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
17511 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
17512 New.
17513 (trace_buffer_ctrl): New.
17514 (TRACE_BUFFER_CTRL_CURR): New.
17515 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
17516 Reimplement as macros.
17517 (trace_buffer_wrap): Delete.
17518 (traceframe_write_count, traceframe_read_count)
17519 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
17520 (struct tracepoint_hit_ctx) <type>: New field.
17521 (struct fast_tracepoint_ctx): New.
17522 (memory_barrier): New.
17523 (cmpxchg): New.
17524 (record_tracepoint_error): Update atomically in the IPA.
17525 (clear_inferior_trace_buffer): New.
17526 (about_to_request_buffer_space): New.
17527 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
17528 updating the same buffer.
17529 (add_tracepoint): Default the tracepoint's type to trap
17530 tracepoint, and orig_size to -1.
17531 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
17532 internal variables.
17533 (create_trace_state_variable): New parameter `gdb'. Handle it.
17534 (clear_installed_tracepoints): Clear fast tracepoint jumps.
17535 (cmd_qtdp): Handle fast tracepoints.
17536 (cmd_qtdv): Adjust.
17537 (max_jump_pad_size): New.
17538 (gdb_jump_pad_head): New.
17539 (get_jump_space_head): New.
17540 (claim_jump_space): New.
17541 (sort_tracepoints): New.
17542 (MAX_JUMP_SIZE): New.
17543 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
17544 IPA.
17545 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
17546 support. Upload fast traceframes, and delete internal IPA
17547 breakpoints.
17548 (stop_tracing_handler): New.
17549 (flush_trace_buffer_handler): New.
17550 (cmd_qtstop): Upload fast tracepoints.
17551 (response_tracepoint): Handle fast tracepoints.
17552 (tracepoint_finished_step): Upload fast traceframes. Set the
17553 tracepoint hit context's tracepoint type.
17554 (handle_tracepoint_bkpts): New.
17555 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
17556 type. Add comment about fast tracepoints.
17557 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
17558 non-existing action_str field.
17559 (get_context_regcache): Handle fast tracepoints.
17560 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
17561 to the regcache.
17562 (fast_tracepoint_from_jump_pad_address): New.
17563 (fast_tracepoint_from_ipa_tpoint_address): New.
17564 (collecting_t): New.
17565 (force_unlock_trace_buffer): New.
17566 (fast_tracepoint_collecting): New.
17567 (collecting): New.
17568 (gdb_collect): New.
17569 (write_inferior_data_ptr): New.
17570 (target_tp_heap): New.
17571 (target_malloc): New.
17572 (download_agent_expr): New.
17573 (UALIGN): New.
17574 (download_tracepoints): New.
17575 (download_trace_state_variables): New.
17576 (upload_fast_traceframes): New.
17577 (IPA_FIRST_TRACEFRAME): New.
17578 (IPA_NEXT_TRACEFRAME_1): New.
17579 (IPA_NEXT_TRACEFRAME): New.
17580 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
17581 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
17582 (gdb_jump_pad_buffer_end): New.
17583 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
17584 (initialize_tracepoint): Adjust.
17585 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
17586 buffer. Initialize the low module.
17587 * utils.c (PREFIX, TOOLNAME): New.
17588 (malloc_failure): Use PREFIX.
17589 (error): In the IPA, an error causes an exit.
17590 (fatal, warning): Use PREFIX.
17591 (internal_error): Use TOOLNAME.
17592 (NUMCELLS): Increase to 10.
17593 * configure, config.in: Regenerate.
17594
17595 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17596
17597 * server.c (handle_query) <qSupported>: Do two passes over the
17598 qSupported string to avoid nesting strtok.
17599
17600 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17601
17602 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
17603 (CDEPS): New.
17604 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
17605 -Wl,--dynamic-list.
17606 * configure: Regenerate.
17607 * proc-service.list: New.
17608
17609 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17610
17611 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
17612 New comment.
17613
17614 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
17615
17616 * gdbreplay.c (remote_open): Check error return from socket() call by
17617 its equality to -1 not by it being negative.
17618 * remote-utils.c (remote_open): Likewise.
17619
17620 2010-05-23 Pedro Alves <pedro@codesourcery.com>
17621
17622 * config.h: Regenerate.
17623
17624 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17625
17626 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
17627 doesn't provide PTRACE_GET_THREAD_AREA.
17628
17629 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17630
17631 * linux-m68k-low.c: Include <asm/ptrace.h>
17632 (ps_get_thread_area): Implement.
17633
17634 2010-05-03 Doug Evans <dje@google.com>
17635
17636 * event-loop.c (struct callback_event): New struct.
17637 (callback_list): New global.
17638 (append_callback_event, delete_callback_event): New functions.
17639 (process_callback): New function.
17640 (start_event_loop): Call it.
17641 * remote-utils.c (NOT_SCHEDULED): Define.
17642 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
17643 moved out of readchar.
17644 (readchar): Rewrite. Call reschedule before returning.
17645 (reset_readchar): New function.
17646 (remote_close): Call it.
17647 (process_remaining, reschedule): New functions.
17648 * server.h (callback_handler_func): New typedef.
17649 (append_callback_event, delete_callback_event): Declare.
17650
17651 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17652
17653 * proc-service.c (ps_pglobal_lookup): Use
17654 thread_db_look_up_one_symbol.
17655 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
17656 parameter. Use it instead of all_symbols_looked_up.
17657 * server.h (struct process_info) <all_symbols_looked_up>: Delete
17658 field.
17659 (all_symbols_looked_up): Don't declare.
17660 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
17661 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
17662 field.
17663 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
17664 Set all_symbols_looked_up here.
17665 (thread_db_look_up_one_symbol): New.
17666 (thread_db_get_tls_address): Adjust.
17667 (thread_db_load_search, try_thread_db_load_1): Always allocate the
17668 thread_db object on the heap, and tentatively set it in the
17669 process structure.
17670 (thread_db_init): Don't set all_symbols_looked_up here.
17671 * linux-low.h (thread_db_look_up_one_symbol): Declare.
17672
17673 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17674
17675 * linux-low.c (linux_kill, linux_detach): Adjust.
17676 (status_pending_p_callback): Remove redundant statement. Check
17677 for !TARGET_WAITIKIND_IGNORE, instead of
17678 TARGET_WAITKIND_STOPPED.
17679 (handle_tracepoints): Make sure LWP is locked. Adjust.
17680 (linux_wait_for_event_1): Adjust.
17681 (linux_cancel_breakpoints): New.
17682 (unsuspend_one_lwp): New.
17683 (unsuspend_all_lwps): New.
17684 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
17685 (send_sigstop_callback): Change return type to int, add new
17686 `except' parameter and handle it.
17687 (suspend_and_send_sigstop_callback): New.
17688 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
17689 pass them down. If SUSPEND, also increment the lwp's suspend
17690 count.
17691 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
17692 (need_step_over_p): Don't consider suspended LWPs.
17693 (start_step_over): Adjust.
17694 (proceed_one_lwp): Change return type to int, add new `except'
17695 parameter and handle it.
17696 (unsuspend_and_proceed_one_lwp): New.
17697 (proceed_all_lwps): Use find_inferior instead of
17698 for_each_inferior.
17699 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
17700 also decrement the suspend count of LWPs. Pass `except' down,
17701 instead of hacking its suspend count.
17702 (linux_pause_all): Add `freeze' parameter. Adjust.
17703 (linux_unpause_all): New.
17704 (linux_target_ops): Install linux_unpause_all.
17705 * server.c (handle_status): Adjust.
17706 * target.h (struct target_ops): New fields `unpause_all' and
17707 `cancel_breakpoints'. Add new parameter to `pause_all'.
17708 (pause_all): Add new `freeze' parameter.
17709 (unpause_all): New.
17710 (cancel_breakpoints): New.
17711 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
17712 cancel breakpoints.
17713 (cmd_qtstart): Pause threads.
17714 (stop_tracing): Pause threads, and cancel breakpoints.
17715 * win32-low.c (win32_target_ops): Adjust.
17716
17717 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17718
17719 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
17720 the inferior right away from here...
17721 (linux_wait_1): ... to here, and adjust to check the thread's
17722 last_resume_kind instead of the lwp's step or stop_expected flags.
17723
17724 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17725
17726 * README: Use consistent `GDB' and `GDBserver' spellings.
17727
17728 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17729
17730 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
17731 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
17732 (linux_detach_one_lwp): Assume the lwp is stopped.
17733 (any_thread_of): Delete.
17734 (linux_detach): Stop all lwps here. Don't blindly delete all
17735 breakpoints.
17736 (delete_lwp_callback): New.
17737 (linux_mourn): Delete all lwps of the process that is gone.
17738 (linux_wait_1): Don't delete the last lwp of the process here.
17739 * mem-break.h (mark_breakpoints_out): Declare.
17740 * mem-break.c (mark_breakpoints_out): New.
17741 (free_all_breakpoints): Use it.
17742 * server.c (handle_target_event): If the process is gone, mark
17743 breakpoints out.
17744 * thread-db.c (struct thread_db) <create_bp>: New field.
17745 (thread_db_enable_reporting): Fix prototype. Store a thread event
17746 breakpoint reference in the thread_db struct.
17747 (thread_db_load_search): Clear the thread_db object.
17748 (try_thread_db_load_1): Ditto.
17749 (switch_to_process): New.
17750 (disable_thread_event_reporting): Use it.
17751 (remove_thread_event_breakpoints): New.
17752 (thread_db_detach, thread_db_mourn): Use it.
17753
17754 2010-05-01 Pedro Alves <pedro@codesourcery.com>
17755
17756 * linux-low.c (linux_enable_event_reporting): New.
17757 (linux_wait_for_event_1, handle_extended_wait): Use it.
17758
17759 2010-04-30 Pedro Alves <pedro@codesourcery.com>
17760
17761 * linux-low.c (linux_kill_one_lwp, linux_kill)
17762 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
17763 (send_sigstop): Take an lwp_info as parameter instead. Queue a
17764 SIGSTOP even if the LWP is stopped.
17765 (send_sigstop_callback): New.
17766 (stop_all_lwps): Use send_sigstop_callback instead.
17767 (linux_resume_one_thread): Adjust.
17768 (proceed_one_lwp): Still proceed an LWP that the client has
17769 requested to stop, if we haven't reported it as stopped yet. Make
17770 sure that LWPs the client want stopped, have a pending SIGSTOP.
17771
17772 2010-04-26 Doug Evans <dje@google.com>
17773
17774 * server.c (handle_general_set): Make static.
17775
17776 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
17777 Print received char after testing for error/eof instead of before.
17778 (input_interrupt): Tweak comment.
17779
17780 2010-04-23 Doug Evans <dje@google.com>
17781
17782 * server.c (start_inferior): Print inferior argv if --debug.
17783
17784 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
17785
17786 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
17787 * nto-x86-low.c: Include server.h
17788
17789 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
17790
17791 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
17792 be consistent with other sources of this directory.
17793 (init_registers_amd64): Correct name of source file of this function
17794 in the comment.
17795
17796 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17797
17798 * configure.srv (x86_64-*-mingw*): New configuration for Windows
17799 64-bit executables.
17800
17801 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17802
17803 * win32-i386-low.c: Add 64-bit support.
17804 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
17805 (init_registers_amd64): Declare.
17806 (mappings): Add 64-bit version of array.
17807 (init_windows_x86): New function.
17808 (the_low_target): Change init_arch field to init_windows_x86.
17809
17810 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17811
17812 * win32-low.c: Adapt to support also 64-bit architecture.
17813 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
17814 (get_image_name): Use SIZE_T type for local variable `done'.
17815 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
17816 (toolhelp_get_dll_name): Idem.
17817 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
17818 Use uintptr_t typecast to avoid warning.
17819 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
17820 (handle_exception): Use phex_nz to avoid warning.
17821 (win32_wait): Remove unused local variable `process'.
17822
17823 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17824
17825 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
17826 `amd64-avx.o'.
17827
17828 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
17829
17830 * configure.ac: Use `ws2_32' library for srv_mingw.
17831 * configure: Regenerate.
17832 * gdbreplay.c: Include winsock2.h instead of winsock.h.
17833 * remote-utils.c: Likewise.
17834
17835 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
17836
17837 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
17838 if __x86_64__ is defined.
17839
17840 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17841
17842 * configure: Regenerate.
17843
17844 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17845
17846 * server.c (handle_query): Handle 'qGetTIBAddr' query.
17847 * target.h (target_ops): New get_tib_address field.
17848 * win32-low.h (win32_thread_info): Add thread_local_base field.
17849 * win32-low.c (child_add_thread): Add tlb argument.
17850 Set thread_local_base field to TLB.
17851 (get_child_debug_event): Adapt to child_add_thread change.
17852 (win32_get_tib_address): New function.
17853 (win32_target_ops): Set get_tib_address field to
17854 win32_get_tib_address.
17855 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
17856
17857 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17858
17859 * linux-low.c (linux_mourn): Also remove the process.
17860 * server.c (handle_target_event): Don't remove the process here.
17861 * nto-low.c (nto_mourn): New.
17862 (nto_target_ops): Install it.
17863 * spu-low.c (spu_mourn): New.
17864 (spu_target_ops): Install it.
17865 * win32-low.c (win32_mourn): New.
17866 (win32_target_ops): Install it.
17867
17868 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17869
17870 * server.h (buffer_xml_printf): Remove redundant `;'.
17871
17872 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17873
17874 * regcache.c (set_register_cache): Invalidate regcaches before
17875 changing the register cache layout.
17876 (regcache_invalidate_one): Allow a NULL regcache.
17877 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
17878 regcaches before changing the register cache layout or the target
17879 regsets.
17880
17881 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
17882
17883 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
17884 variable warning on Linux/x86-64.
17885
17886 2010-04-11 Pedro Alves <pedro@codesourcery.com>
17887
17888 GDBserver disconnected tracing support.
17889
17890 * linux-low.c (linux_remove_process): Delete.
17891 (add_lwp): Don't set last_resume_kind here.
17892 (linux_kill): Use `mourn'.
17893 (linux_detach): Use `thread_db_detach', and `mourn'.
17894 (linux_mourn): New.
17895 (linux_attach_lwp_1): Adjust comment.
17896 (linux_attach): last_resume_kind moved the thread_info; adjust.
17897 (status_pending_p_callback): Adjust.
17898 (linux_wait_for_event_1): Adjust.
17899 (count_events_callback, select_singlestep_lwp_callback)
17900 (select_event_lwp_callback, cancel_breakpoints_callback)
17901 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
17902 (proceed_one_lwp): Adjust.
17903 (linux_async): Add debug output.
17904 (linux_thread_stopped): New.
17905 (linux_pause_all): New.
17906 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
17907 linux_pause_all.
17908 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
17909 (thread_db_free): Delete declaration.
17910 (thread_db_detach, thread_db_mourn): Declare.
17911 * thread-db.c (thread_db_init): Use thread_db_mourn.
17912 (thread_db_free): Delete, split in two.
17913 (disable_thread_event_reporting): New.
17914 (thread_db_detach): New.
17915 (thread_db_mourn): New.
17916
17917 * server.h (struct thread_info) <last_resume_kind>: New field.
17918 <attached>: Add comment.
17919 <gdb_detached>: New field.
17920 (handler_func): Change return type to int.
17921 (handle_serial_event, handle_target_event): Ditto.
17922 (gdb_connected): Declare.
17923 (tracing): Delete.
17924 (disconnected_tracing): Declare.
17925 (stop_tracing): Declare.
17926
17927 * server.c (handle_query) <qSupported>: Report support for
17928 disconnected tracing.
17929 (queue_stop_reply_callback): Account for running threads.
17930 (gdb_wants_thread_stopped): New.
17931 (gdb_wants_all_threads_stopped): New.
17932 (gdb_reattached_process): New.
17933 (handle_status): Clear the `gdb_detached' flag of all processes.
17934 In all-stop, stop all threads.
17935 (main): Be sure to leave tfind mode. Handle disconnected tracing.
17936 (process_serial_event): If the remote connection breaks, or if an
17937 exit was forced with "monitor exit", force an event loop exit.
17938 Handle disconnected tracing on detach.
17939 (handle_serial_event): Adjust.
17940 (handle_target_event): If GDB isn't connected, forward events back
17941 to the inferior, unless the last process exited, in which case,
17942 exit gdbserver. Adjust interface.
17943
17944 * remote-utils.c (remote_open): Don't block in accept. Instead
17945 register an event loop source on the listen socket file
17946 descriptor. Refactor bits into ...
17947 (listen_desc): ... this new global.
17948 (gdb_connected): ... this new function.
17949 (enable_async_notification): ... this new function.
17950 (handle_accept_event): ... this new function.
17951 (remote_close): Clear remote_desc.
17952
17953 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
17954
17955 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
17956 New fields.
17957 (mourn_inferior): Define.
17958 (target_process_qsupported): Avoid the dangling else problem.
17959 (thread_stopped): Define.
17960 (pause_all): Define.
17961 (target_waitstatus_to_string): Declare.
17962 * target.c (target_waitstatus_to_string): New.
17963
17964 * tracepoint.c (tracing): Make extern.
17965 (disconnected_tracing): New.
17966 (stop_tracing): Make extern. Handle tracing stops due to GDB
17967 disconnecting.
17968 (cmd_qtdisconnected): New.
17969 (cmd_qtstatus): Report disconnected tracing status in trace reply.
17970 (handle_tracepoint_general_set): Handle QTDisconnected.
17971
17972 * event-loop.c (event_handler_func): Change return type to int.
17973 (process_event): Bail out if the event handler wants the event
17974 loop to stop.
17975 (handle_file_event): Ditto.
17976 (start_event_loop): Bail out if the event handler wants the event
17977 loop to stop.
17978
17979 * nto-low.c (nto_target_ops): Adjust.
17980 * spu-low.c (spu_wait): Don't remove the process here.
17981 (spu_target_ops): Adjust.
17982 * win32-low.c (win32_wait): Don't remove the process here.
17983 (win32_target_ops): Adjust.
17984
17985 2010-04-11 Pedro Alves <pedro@codesourcery.com>
17986
17987 * regcache.c (realloc_register_cache): Invalidate inferior's
17988 regcache before recreating it.
17989
17990 2010-04-09 Pedro Alves <pedro@codesourcery.com>
17991
17992 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
17993
17994 2010-04-09 Stan Shebs <stan@codesourcery.com>
17995 Pedro Alves <pedro@codesourcery.com>
17996
17997 * server.h (LONGEST): New.
17998 (struct thread_info) <while_stepping>: New field.
17999 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
18000 Declare.
18001 (initialize_tracepoint, handle_tracepoint_general_set)
18002 (handle_tracepoint_query, tracepoint_finished_step)
18003 (tracepoint_was_hit, release_while_stepping_state_list):
18004 (current_traceframe): Declare.
18005 * server.c (handle_general_set): Handle tracepoint packets.
18006 (read_memory): New.
18007 (write_memory): New.
18008 (handle_search_memory_1): Use read_memory.
18009 (handle_query): Report support for conditional tracepoints, trace
18010 state variables, and tracepoint sources. Handle tracepoint
18011 queries.
18012 (main): Initialize the tracepoints module.
18013 (process_serial_event): Handle traceframe reads/writes.
18014
18015 * linux-low.c (handle_tracepoints): New.
18016 (linux_wait_1): Call it.
18017 (linux_resume_one_lwp): Handle while-stepping.
18018 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
18019 (linux_target_ops): Install them.
18020 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
18021 New field.
18022 * linux-x86-low.c (x86_supports_tracepoints): New.
18023 (the_low_target). Install it.
18024
18025 * mem-break.h (delete_breakpoint): Declare.
18026 * mem-break.c (delete_breakpoint): Make external.
18027
18028 * target.h (struct target_ops): Add `supports_tracepoints',
18029 `read_pc', and `write_pc' fields.
18030 (target_supports_tracepoints): Define.
18031 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
18032 (phex_nz): New.
18033
18034 * regcache.h (struct regcache) <registers_owned>: New field.
18035 (init_register_cache, regcache_cpy): Declare.
18036 (regcache_read_pc, regcache_write_pc): Declare.
18037 (register_cache_size): Declare.
18038 (supply_regblock): Declare.
18039 * regcache.c (init_register_cache): New.
18040 (new_register_cache): Use it.
18041 (regcache_cpy): New.
18042 (register_cache_size): New.
18043 (supply_regblock): New.
18044 (regcache_read_pc, regcache_write_pc): New.
18045
18046 * tracepoint.c: New.
18047
18048 * Makefile.in (OBS): Add tracepoint.o.
18049 (tracepoint.o): New rule.
18050
18051 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
18052
18053 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
18054 (i386-mmx.o): New.
18055 (i386-mmx.c): Likewise.
18056 (i386-mmx-linux.o): Likewise.
18057 (i386-mmx-linux.c): Likewise.
18058
18059 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
18060 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
18061 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
18062 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
18063
18064 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
18065 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
18066 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
18067
18068 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
18069
18070 * Makefile.in (clean): Updated.
18071 (i386-avx.o): New.
18072 (i386-avx.c): Likewise.
18073 (i386-avx-linux.o): Likewise.
18074 (i386-avx-linux.c): Likewise.
18075 (amd64-avx.o): Likewise.
18076 (amd64-avx.c): Likewise.
18077 (amd64-avx-linux.o): Likewise.
18078 (amd64-avx-linux.c): Likewise.
18079
18080 * configure.srv (srv_i386_regobj): Add i386-avx.o.
18081 (srv_i386_linux_regobj): Add i386-avx-linux.o.
18082 (srv_amd64_regobj): Add amd64-avx.o.
18083 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
18084 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
18085 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
18086 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
18087 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
18088 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
18089 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
18090
18091 * i387-fp.c: Include "i386-xstate.h".
18092 (i387_xsave): New.
18093 (i387_cache_to_xsave): Likewise.
18094 (i387_xsave_to_cache): Likewise.
18095 (x86_xcr0): Likewise.
18096
18097 * i387-fp.h (i387_cache_to_xsave): Likewise.
18098 (i387_xsave_to_cache): Likewise.
18099 (x86_xcr0): Likewise.
18100
18101 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
18102 * linux-crisv32-low.c (target_regsets): Likewise.
18103 * linux-m68k-low.c (target_regsets): Likewise.
18104 * linux-mips-low.c (target_regsets): Likewise.
18105 * linux-ppc-low.c (target_regsets): Likewise.
18106 * linux-s390-low.c (target_regsets): Likewise.
18107 * linux-sh-low.c (target_regsets): Likewise.
18108 * linux-sparc-low.c (target_regsets): Likewise.
18109 * linux-xtensa-low.c (target_regsets): Likewise.
18110
18111 * linux-low.c: Include <sys/uio.h>.
18112 (regsets_fetch_inferior_registers): Support nt_type.
18113 (regsets_store_inferior_registers): Likewise.
18114 (linux_process_qsupported): New.
18115 (linux_target_ops): Add linux_process_qsupported.
18116
18117 * linux-low.h (regset_info): Add nt_type.
18118 (linux_target_ops): Add process_qsupported.
18119
18120 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
18121 and <sys/uio.h>.
18122 (init_registers_i386_avx_linux): New.
18123 (init_registers_amd64_avx_linux): Likewise.
18124 (xmltarget_i386_linux_no_xml): Likewise.
18125 (xmltarget_amd64_linux_no_xml): Likewise.
18126 (PTRACE_GETREGSET): Likewise.
18127 (PTRACE_SETREGSET): Likewise.
18128 (x86_fill_xstateregset): Likewise.
18129 (x86_store_xstateregset): Likewise.
18130 (use_xml): Likewise.
18131 (x86_linux_update_xmltarget): Likewise.
18132 (x86_linux_process_qsupported): Likewise.
18133 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
18134 (x86_arch_setup): Don't call init_registers_amd64_linux nor
18135 init_registers_i386_linux here. Call
18136 x86_linux_update_xmltarget.
18137 (the_low_target): Add x86_linux_process_qsupported.
18138
18139 * server.c (handle_query): Call target_process_qsupported.
18140
18141 * target.h (target_ops): Add process_qsupported.
18142 (target_process_qsupported): New.
18143
18144 2010-04-03 Pedro Alves <pedro@codesourcery.com>
18145
18146 * inferiors.c (add_thread): Set last_status kind to
18147 TARGET_WAITKIND_IGNORE.
18148 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
18149 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
18150 (linux_wait_1): Move `thread' local definition to block that uses
18151 it. Don't NULL initialize `event_child'.
18152 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
18153 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
18154 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
18155
18156 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18157
18158 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
18159 an extended waitstatus, or by a watchpoint.
18160 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
18161 thread was stepping or has been stopped by a watchpoint.
18162
18163 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18164
18165 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
18166 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
18167 of another, then delete the previous, and validate all
18168 breakpoints.
18169 (validate_inserted_breakpoint): New.
18170 (delete_disabled_breakpoints): New.
18171 (validate_breakpoints): New.
18172 (check_mem_read): Validate breakpoints before trusting their
18173 shadow. Delete disabled breakpoints.
18174 (check_mem_write): Validate breakpoints before trusting they
18175 should be inserted. Delete disabled breakpoints.
18176 * mem-break.h (validate_breakpoints):
18177 * server.c (handle_query): Validate breakpoints when we see a
18178 qSymbol query.
18179
18180 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18181
18182 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
18183 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
18184 if we could tell there's a GDB breakpoint at stop_pc.
18185 (need_step_over_p): Don't do a step over if we find a GDB
18186 breakpoint at the resume PC.
18187
18188 * mem-break.c (struct raw_breakpoint): New.
18189 (enum bkpt_type): New type `gdb_breakpoint'.
18190 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
18191 fields. New field `raw'.
18192 (find_raw_breakpoint_at): New.
18193 (set_raw_breakpoint_at): Handle refcounting. Create a raw
18194 breakpoint instead.
18195 (set_breakpoint_at): Adjust.
18196 (delete_raw_breakpoint): New.
18197 (release_breakpoint): New.
18198 (delete_breakpoint): Rename to...
18199 (delete_breakpoint_1): ... this. Add proc parameter. Use
18200 release_breakpoint. Return ENOENT.
18201 (delete_breakpoint): Reimplement.
18202 (find_breakpoint_at): Delete.
18203 (find_gdb_breakpoint_at): New.
18204 (delete_breakpoint_at): Delete.
18205 (set_gdb_breakpoint_at): New.
18206 (delete_gdb_breakpoint_at): New.
18207 (gdb_breakpoint_here): New.
18208 (set_reinsert_breakpoint): Use release_breakpoint.
18209 (uninsert_breakpoint): Rename to ...
18210 (uninsert_raw_breakpoint): ... this.
18211 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
18212 (reinsert_raw_breakpoint): Change parameter type to
18213 raw_breakpoint.
18214 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
18215 instead.
18216 (check_breakpoints): Adjust. Use release_breakpoint.
18217 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
18218 (breakpoint_inserted_here): Ditto.
18219 (check_mem_read): Adjust to iterate over raw breakpoints instead.
18220 Don't trust the breakpoint's shadow if it is not inserted.
18221 (check_mem_write): Adjust to iterate over raw breakpoints instead.
18222 (delete_all_breakpoints): Adjust.
18223 (free_all_breakpoints): Mark all breakpoints as uninserted, and
18224 use delete_breakpoint_1.
18225
18226 * mem-break.h (breakpoints_supported): Delete declaration.
18227 (set_gdb_breakpoint_at): Declare.
18228 (gdb_breakpoint_here): Declare.
18229 (delete_breakpoint_at): Delete.
18230 (delete_gdb_breakpoint_at): Declare.
18231
18232 * server.h (struct raw_breakpoint): Forward declare.
18233 (struct process_info): New field `raw_breakpoints'.
18234
18235 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
18236 breakpoints.
18237
18238 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18239
18240 * linux-low.c (status_pending_p_callback): Fix comment.
18241 (linux_wait_for_event_1): Move most of the internal breakpoint
18242 handling from here...
18243 (linux_wait_1): ... to here.
18244 (count_events_callback): New.
18245 (select_singlestep_lwp_callback): New.
18246 (select_event_lwp_callback): New.
18247 (cancel_breakpoints_callback): New.
18248 (select_event_lwp): New.
18249 (linux_wait_1): Simplify internal breakpoint handling. Give equal
18250 priority to all LWPs that have had events that should be reported
18251 to the client. Cancel breakpoints when about to reporting the
18252 event to the client, not while stopping lwps. No longer cancel
18253 finished single-steps here.
18254 (cancel_finished_single_step): Delete.
18255 (cancel_finished_single_steps): Delete.
18256
18257 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18258
18259 * mem-break.c (enum bkpt_type): New.
18260 (struct breakpoint): New field `type'.
18261 (set_breakpoint_at): Change return type to struct breakpoint
18262 pointer. Set type to `other_breakpoint' by default.
18263 (delete_breakpoint): Rewrite, supporting more than one breakpoint
18264 in the breakpoint list.
18265 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
18266 (reinsert_breakpoint): Rename to ...
18267 (reinsert_raw_breakpoint): ... this.
18268 (reinsert_breakpoints_at): Adjust.
18269 * mem-break.h (struct breakpoint): Declare.
18270 (set_breakpoint_at): Change return type to struct breakpoint
18271 pointer.
18272
18273 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18274
18275 * server.c (handle_query): Assign, not compare.
18276
18277 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18278
18279 Teach linux gdbserver to step-over-breakpoints.
18280
18281 * linux-low.c (can_hardware_single_step): New.
18282 (supports_breakpoints): New.
18283 (handle_extended_wait): If stopping threads, read the stop pc of
18284 the new cloned LWP.
18285 (get_pc): New.
18286 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
18287 low target doesn't support retrieving the PC.
18288 (add_lwp): Set last_resume_kind to resume_continue.
18289 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
18290 (linux_attach): Don't clear stop_expected. Set the lwp's
18291 last_resume_kind to resume_stop.
18292 (linux_detach_one_lwp): Don't check for removed breakpoints.
18293 (check_removed_breakpoint): Delete.
18294 (status_pending_p): Rename to ...
18295 (status_pending_p_callback): ... this. Don't check for removed
18296 breakpoints. Don't consider threads that are stopped from GDB's
18297 perspective.
18298 (linux_wait_for_lwp): Always read the stop_pc here.
18299 (cancel_breakpoint): New.
18300 (step_over_bkpt): New global.
18301 (linux_wait_for_event_1): Implement stepping over breakpoints.
18302 (gdb_wants_lwp_stopped): New.
18303 (gdb_wants_all_stopped): New.
18304 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
18305 single-step traps here. Store the thread's last reported target
18306 wait status.
18307 (send_sigstop): Don't clear stop_expected. Always set it,
18308 instead.
18309 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
18310 (cancel_finished_single_step): New.
18311 (cancel_finished_single_steps): New.
18312 (wait_for_sigstop): Don't cancel finished single-step traps here.
18313 (linux_resume_one_lwp): Don't check for removed breakpoints.
18314 Don't set `step' on non-hardware step archs.
18315 (linux_set_resume_request): Ignore resume_stop requests if already
18316 stopping or stopped. Set the lwp's last_resume_kind.
18317 (resume_status_pending_p): Don't check for removed breakpoints.
18318 (need_step_over_p): New.
18319 (start_step_over): New.
18320 (finish_step_over): New.
18321 (linux_resume_one_thread): Always queue a sigstop for resume_stop
18322 requests. Clear the thread's last reported target waitstatus.
18323 Don't use the `suspended' flag. Don't consider pending breakpoints.
18324 (linux_resume): Start a step-over if necessary.
18325 (proceed_one_lwp): New.
18326 (proceed_all_lwps): New.
18327 (unstop_all_lwps): New.
18328 * linux-low.h (struct lwp_info): Rewrite comment for the
18329 `suspended' flag. Add the `stop_pc' field. Delete the
18330 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
18331 Add `'last_resume_kind' and `need_step_over' fields.
18332 * inferiors.c (struct thread_info): Delete, moved elsewhere.
18333 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
18334 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
18335 (set_raw_breakpoint_at): New.
18336 (set_breakpoint_at): Rewrite to use it.
18337 (reinsert_breakpoint_handler): Delete.
18338 (set_reinsert_breakpoint): New.
18339 (reinsert_breakpoint_by_bp): Delete.
18340 (delete_reinsert_breakpoints): New.
18341 (uninsert_breakpoint): Rewrite.
18342 (uninsert_breakpoints_at): New.
18343 (reinsert_breakpoint): Rewrite.
18344 (reinsert_breakpoints_at): New.
18345 (check_breakpoints): Rewrite.
18346 (breakpoint_here): New.
18347 (breakpoint_inserted_here): New.
18348 (check_mem_read): Adjust.
18349 * mem-break.h (breakpoints_supported, breakpoint_here)
18350 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
18351 (reinsert_breakpoint_by_bp): Delete declaration.
18352 (delete_reinsert_breakpoints): Declare.
18353 (reinsert_breakpoint): Delete declaration.
18354 (reinsert_breakpoints_at): Declare.
18355 (uninsert_breakpoint): Delete declaration.
18356 (uninsert_breakpoints_at): Declare.
18357 (check_breakpoints): Adjust prototype.
18358 * server.h: Adjust include order.
18359 (struct thread_info): Declare here. Add a `last_status' field.
18360
18361 2010-03-23 Michael Snyder <msnyder@vmware.com>
18362
18363 * server.c (crc32): New function.
18364 (handle_query): Add handling for 'qCRC:' request.
18365
18366 2010-03-23 Pedro Alves <pedro@codesourcery.com>
18367
18368 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
18369 lwp had been stopped by a watchpoint.
18370
18371 2010-03-16 Pedro Alves <pedro@codesourcery.com>
18372
18373 * server.h (internal_error): Declare.
18374 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
18375 * utils.c (internal_error): New function.
18376
18377 2010-03-15 Andreas Schwab <schwab@redhat.com>
18378
18379 * configure.srv: Fix typo setting srv_regobj.
18380
18381 2010-03-15 Pedro Alves <pedro@codesourcery.com>
18382
18383 * linux-low.c (fetch_register): Avoid passing a non string literal
18384 format to `error'.
18385 (usr_store_inferior_registers): Ditto.
18386
18387 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18388
18389 * linux-low.c (linux_write_memory): Bail out early if peeking
18390 memory failed.
18391
18392 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18393
18394 * linux-low.h (struct lwp_info): New fields
18395 `stopped_by_watchpoint' and `stopped_data_address'.
18396 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
18397 here, and cache them in the lwp object.
18398 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
18399 directly.
18400 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
18401 field.
18402 (linux_stopped_by_watchpoint): Rewrite.
18403 (linux_stopped_data_address): Rewrite.
18404
18405 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
18406
18407 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
18408 switching the current inferior, not before.
18409
18410 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
18411
18412 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
18413 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
18414 i386-linux.c and amd64-linux.c.
18415 (reg-i386.o): Removed.
18416 (reg-i386.c): Likewise.
18417 (reg-i386-linux.o): Likewise.
18418 (reg-i386-linux.c): Likewise.
18419 (reg-x86-64.o): Likewise.
18420 (reg-x86-64.c): Likewise.
18421 (reg-x86-64-linux.o): Likewise.
18422 (reg-x86-64-linux.c): Likewise.
18423 (i386.o): New.
18424 (i386.c): Likewise.
18425 (i386-linux.o): Likewise.
18426 (i386-linux.c): Likewise.
18427 (amd64.o): Likewise.
18428 (amd64.c): Likewise.
18429 (amd64-linux.o): Likewise.
18430 (amd64-linux.c): Likewise.
18431
18432 * configure.srv (srv_i386_regobj): New.
18433 (srv_i386_linux_regobj): Likewise.
18434 (srv_amd64_regobj): Likewise.
18435 (srv_amd64_linux_regobj): Likewise.
18436 (srv_i386_32bit_xmlfiles): Likewise.
18437 (srv_i386_64bit_xmlfiles): Likewise.
18438 (srv_i386_xmlfiles): Likewise.
18439 (srv_amd64_xmlfiles): Likewise.
18440 (srv_i386_linux_xmlfiles): Likewise.
18441 (srv_amd64_linux_xmlfiles): Likewise.
18442 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
18443 srv_xmlfiles to $srv_i386_xmlfiles.
18444 (i[34567]86-*-mingw32ce*): Likewise.
18445 (i[34567]86-*-mingw*): Likewise.
18446 (i[34567]86-*-nto*): Likewise.
18447 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
18448 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
18449 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
18450 (x86_64-*-linux*): Likewise.
18451
18452 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
18453 (init_registers_amd64_linux): New.
18454 (x86_arch_setup): Replace init_registers_x86_64_linux with
18455 init_registers_amd64_linux.
18456
18457 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
18458
18459 * configure.ac: Check for libdl. If it is not available link against
18460 static libthread_db.
18461 * configure: Regenerate.
18462
18463 2010-02-22 Pedro Alves <pedro@codesourcery.com>
18464
18465 PR9605
18466
18467 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
18468 handing a read watchpoint.
18469 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
18470
18471 2010-02-12 Doug Evans <dje@google.com>
18472
18473 * linux-low.c (linux_supports_tracefork_flag): Document.
18474 (linux_look_up_symbols): Add comment.
18475
18476 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
18477
18478 * regcache.c (supply_register): Clear regcache if buf is NULL.
18479
18480 2010-02-02 Nicolas Roche <roche@sourceware.org>
18481 Joel Brobecker <brobecker@adacore.com>
18482
18483 * inferiors.c (find_inferior): Add function documentation.
18484 (unloaded_dll): Handle the case where the unloaded dll has not
18485 been previously registered in the dll list.
18486
18487 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18488
18489 * linux-arm-low.c (thumb_breakpoint_len): Delete.
18490 (thumb2_breakpoint): New.
18491 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
18492
18493 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18494
18495 * linux-low.c (get_stop_pc): Check for SIGTRAP.
18496 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
18497 breakpoints.
18498
18499 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18500
18501 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
18502
18503 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
18504
18505 * linux-s390-low.c (s390_collect_ptrace_register)
18506 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
18507
18508 2010-01-21 Doug Evans <dje@google.com>
18509
18510 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
18511 (PTRACE_ARG4_TYPE): New macro.
18512 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
18513 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
18514 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
18515 (usr_store_inferior_registers): Ditto.
18516 (linux_read_memory, linux_write_memory): Ditto.
18517 (linux_test_for_tracefork): Ditto.
18518
18519 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
18520 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
18521
18522 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18523
18524 * proc-service.c (ps_lgetregs): Don't refetch registers from the
18525 target.
18526
18527 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18528
18529 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
18530 prototype to take a regcache. Adjust.
18531
18532 2010-01-20 Pedro Alves <pedro@codesourcery.com>
18533
18534 * regcache.h (struct thread_info): Forward declare.
18535 (struct regcache): New.
18536 (new_register_cache): Adjust prototype.
18537 (get_thread_regcache): Declare.
18538 (free_register_cache): Adjust prototype.
18539 (registers_to_string, registers_from_string): Ditto.
18540 (supply_register, supply_register_by_name, collect_register)
18541 (collect_register_as_string, collect_register_by_name): Ditto.
18542 * regcache.c (struct inferior_regcache_data): Delete.
18543 (get_regcache): Rename to ...
18544 (get_thread_regcache): ... this. Adjust. Switch inferior before
18545 fetching registers.
18546 (regcache_invalidate_one): Adjust.
18547 (regcache_invalidate): Fix prototype.
18548 (new_register_cache): Return the new register cache.
18549 (free_register_cache): Change prototype.
18550 (realloc_register_cache): Adjust.
18551 (registers_to_string): Change prototype to take a regcache. Adjust.
18552 (registers_from_string): Ditto.
18553 (register_data): Ditto.
18554 (supply_register): Ditto.
18555 (supply_register_by_name): Ditto.
18556 (collect_register): Ditto.
18557 (collect_register_as_string): Ditto.
18558 (collect_register_by_name): Ditto.
18559 * server.c (process_serial_event): Adjust.
18560 * linux-low.h (regset_fill_func, regset_store_func): Change
18561 prototype.
18562 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
18563 Change prototype.
18564 * linux-low.c (get_stop_pc): Adjust.
18565 (check_removed_breakpoint): Adjust.
18566 (linux_wait_for_event): Adjust.
18567 (linux_resume_one_lwp): Adjust.
18568 (fetch_register): Add regcache parameter. Adjust.
18569 (usr_store_inferior_registers): Ditto.
18570 (regsets_fetch_inferior_registers): Ditto.
18571 (regsets_store_inferior_registers): Ditto.
18572 (linux_fetch_registers, linux_store_registers): Ditto.
18573 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
18574 regcache. Adjust.
18575 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
18576 Ditto.
18577 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
18578 prototype to take a regcache.
18579 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
18580 * remote-utils.c (convert_ascii_to_int, outreg)
18581 (prepare_resume_reply): Change prototype to take a regcache.
18582 Adjust.
18583 * target.h (struct target_ops) <fetch_registers, store_registers>:
18584 Change prototype to take a regcache.
18585 (fetch_inferior_registers, store_inferior_registers): Change
18586 prototype to take a regcache. Adjust.
18587 * proc-service.c (ps_lgetregs): Adjust.
18588 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
18589 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
18590 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
18591 take a regcache. Adjust.
18592 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
18593 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
18594 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
18595 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
18596 * linux-cris-low.c (cris_get_pc, cris_set_pc)
18597 (cris_cannot_fetch_register):
18598 (cris_breakpoint_at): Change prototype to take a regcache.
18599 Adjust.
18600 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
18601 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
18602 to take a regcache. Adjust.
18603 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
18604 Adjust.
18605 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
18606 take a regcache. Adjust.
18607 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
18608 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
18609 (m68k_set_pc): Change prototype to take a regcache. Adjust.
18610 * linux-mips-low.c (mips_get_pc):
18611 (mips_set_pc): Change prototype to take a regcache. Adjust.
18612 (mips_reinsert_addr): Adjust.
18613 (mips_collect_register): Change prototype to take a regcache.
18614 Adjust.
18615 (mips_supply_register):
18616 (mips_collect_register_32bit, mips_supply_register_32bit)
18617 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18618 (mips_store_fpregset): Ditto.
18619 * linux-ppc-low.c (ppc_supply_ptrace_register)
18620 (ppc_supply_ptrace_register): Ditto.
18621 (parse_spufs_run): Adjust.
18622 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
18623 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
18624 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
18625 take a regcache. Adjust.
18626 * linux-s390-low.c (s390_collect_ptrace_register)
18627 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
18628 (s390_set_pc): Change prototype to take a regcache. Adjust.
18629 (s390_arch_setup): Adjust.
18630 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
18631 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
18632 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
18633 (sparc_fill_gregset, sparc_store_gregset_from_stack)
18634 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
18635 regcache. Adjust.
18636 (sparc_breakpoint_at): Adjust.
18637 * linux-xtensa-low.c (xtensa_fill_gregset):
18638 (xtensa_store_gregset):
18639 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
18640 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
18641 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
18642 prototype to take a regcache. Adjust.
18643 * win32-arm-low.c (arm_fetch_inferior_register)
18644 (arm_store_inferior_register): Change prototype to take a
18645 regcache. Adjust.
18646 * win32-i386-low.c (i386_fetch_inferior_register)
18647 (i386_store_inferior_register): Change prototype to take a
18648 regcache. Adjust.
18649 * win32-low.c (child_fetch_inferior_registers)
18650 (child_store_inferior_registers): Change prototype to take a
18651 regcache. Adjust.
18652 (win32_wait): Adjust.
18653 (win32_fetch_inferior_registers): Change prototype to take a
18654 regcache. Adjust.
18655 (win32_store_inferior_registers): Adjust.
18656 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
18657 store_inferior_register>: Change prototype to take a regcache.
18658
18659 2010-01-20 Doug Evans <dje@google.com>
18660
18661 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
18662 #ifdef.
18663 (linux_wait_for_event1, linux_init_signals): Ditto.
18664 (W_STOPCODE): Provide definition if missing.
18665
18666 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
18667
18668 * linux-low.c (linux_core_of_thread): New.
18669 (compare_ints, show_process, list_threads): New.
18670 (linux_qxfer_osdata): Report threads and cores.
18671 (linux_target_op): Register linux_core_of_thread.
18672 * remote-utils.c (prepare_resume_reply): Report the core.
18673 (buffer_xml_printf): Support %d specifier.
18674 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
18675 New.
18676 (handle_query): Handle qXfer:threads. Announce availability
18677 thereof.
18678 * target.h (struct target_ops): New field core_of_thread.
18679
18680 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
18681
18682 * Makefile.in (clean): Remove new generated files.
18683 (reg-s390.o, reg-s390.c): Remove rules.
18684 (reg-s390x.o, reg-s390x.c): Likewise.
18685 (s390-linux32.o, s390-linux32.c): Add rules.
18686 (s390-linux64.o, s390-linux64.c): Likewise.
18687 (s390x-linux64.o, s390x-linux64.c): Likewise.
18688 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
18689 * linux-s390-low.c: Include <elf.h>.
18690 (HWCAP_S390_HIGH_GPRS): Define if undefined.
18691 (init_registers_s390): Remove prototype.
18692 (init_registers_s390x): Likewise.
18693 (init_registers_s390_linux32): Add prototype.
18694 (init_registers_s390_linux64): Likewise.
18695 (init_registers_s390x_linux64): Likewise.
18696 (s390_num_regs_3264): New define.
18697 (s390_regmap_3264): New global variable.
18698 (s390_cannot_fetch_register): Remove obsolete check.
18699 (s390_cannot_store_register): Likewise.
18700 (s390_collect_ptrace_register): Handle upper/lower register halves.
18701 (s390_supply_ptrace_register): Likewise.
18702 (s390_fill_gregset): Update to register number changes.
18703 (s390_get_hwcap): New routine.
18704 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
18705 Install appropriate regmap and register set.
18706
18707 2010-01-01 Joel Brobecker <brobecker@adacore.com>
18708
18709 * server.c (gdbserver_version): Update copyright year to 2010.
18710 * gdbreplay.c (gdbreplay_version): Likewise.
18711
18712 2009-12-28 Doug Evans <dje@google.com>
18713
18714 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
18715 elf/external.h. Include <elf.h> instead but only if necessary.
18716
18717 2009-12-28 Pedro Alves <pedro@codesourcery.com>
18718
18719 * linux-low.c (linux_remove_process): Remove `detaching'
18720 parameter. Don't release/detach from thread_db here.
18721 (linux_kill): Release/detach from thread_db here, ...
18722 (linux_detach): ... and here, before actually detaching.
18723 (linux_wait_1): ... and here, when a process exits.
18724 * thread-db.c (any_thread_of): New.
18725 (thread_db_free): Switch the current inferior to a thread of the
18726 passed in process.
18727
18728 2009-12-21 Doug Evans <dje@google.com>
18729
18730 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
18731
18732 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
18733 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
18734 warning ifndef __NR_tkill. Move setting of errno there too.
18735 Delete unnecessary resetting of errno after syscall.
18736 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
18737
18738 * configure.ac: Check for dladdr.
18739 * config.in: Regenerate.
18740 * configure: Regenerate.
18741 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
18742 (try_thread_db_load): Update.
18743
18744 * linux-low.c (my_waitpid): Delete unnecessary prototype.
18745
18746 2009-12-18 Doug Evans <dje@google.com>
18747
18748 * event-loop.c: Include unistd.h if it exists.
18749
18750 * linux-low.c (my_waitpid): Move definition away from being in
18751 between linux_tracefork_child/linux_test_for_tracefork.
18752
18753 * gdb_proc_service.h (psaddr_t): Fix type.
18754 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
18755 signature to match glibc.
18756
18757 2009-12-16 Doug Evans <dje@google.com>
18758
18759 * linux-low.c (linux_read_memory): Fix argument to read.
18760
18761 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18762
18763 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
18764 events, don't leave current_inferior pointing at null.
18765
18766 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18767
18768 * win32-low.c (LOG): Delete.
18769 (OUTMSG): Output to stderr.
18770 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
18771 on compile time LOG macro.
18772 (win32_wait): Fix debug output.
18773
18774 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18775
18776 * win32-low.c (win32_add_one_solib): If the dll name is
18777 "ntdll.dll", prepend the system directory to the dll path.
18778
18779 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
18780
18781 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
18782
18783 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
18784 Vladimir Prus <vladimir@codesourcery.com>
18785
18786 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
18787 * configure.ac: Check for __mcoldfire__ and set
18788 gdb_cv_m68k_is_coldfire.
18789 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
18790 reg-cf.o and reg-m68k.o.
18791 * configure: Regenerated.
18792
18793 2009-11-16 Pedro Alves <pedro@codesourcery.com>
18794
18795 * linux-low.c (linux_remove_process): Add `detaching' parameter.
18796 Pass it to thread_db_free.
18797 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
18798 proper `detaching' argument to linux_remove_process.
18799 * linux-low.h (thread_db_free): Add `detaching' parameter.
18800 * thread-db.c (thread_db_init): Pass false as `detaching' argument
18801 to thread_db_free.
18802 (thread_db_free): Add `detaching' parameter. Only
18803 call td_ta_clear_event if detaching from process.
18804
18805 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
18806
18807 * thread-db.c (thread_db_free): Fix typo.
18808
18809 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
18810
18811 PR gdb/10838
18812 * thread-db.c (thread_db_free): Call td_ta_clear_event.
18813
18814 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
18815
18816 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
18817 with an i686 compiler.
18818 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
18819 needed.
18820 * configure: Rebuilt.
18821
18822 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
18823
18824 PR gdb/10783
18825
18826 * server.c (handle_search_memory_1): Correct read_addr initialization
18827 in loop for searching subsequent chunks.
18828
18829 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
18830
18831 * configure.ac: New --with-libthread-db option.
18832 * thread-db.c: Allow direct dependence on libthread_db.
18833 (thread_db_free): Adjust.
18834 * config.in: Regenerate.
18835 * configure: Likewise.
18836
18837 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
18838
18839 PR gdb/10757
18840 * thread-db.c (attach_thread): New function.
18841 (maybe_attach_thread): Return success/failure.
18842 (find_new_threads_callback): Adjust.
18843 (thread_db_find_new_threads): Loop until no new threads.
18844
18845 2009-10-13 Pedro Alves <pedro@codesourcery.com>
18846
18847 * proc-service.c (ps_lgetregs): Formatting.
18848
18849 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
18850
18851 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
18852 * configure.ac: Adjust.
18853 * linux-low.h (struct process_info_private): Move members to struct
18854 thread_db.
18855 (thread_db_free, thread_db_handle_monitor_command): New prototype.
18856 * linux-low.c (linux_remove_process): Adjust.
18857 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
18858 * server.c (handle_query): Move code ...
18859 (handle_monitor_command): ... here. New function.
18860 * target.h (struct target_ops): New member.
18861 * thread-db.c (struct thread_db): New.
18862 (libthread_db_search_path): New variable.
18863 (thread_db_create_event, thread_db_enable_reporting)
18864 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
18865 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
18866 (try_thread_db_load_1, dladdr_to_soname): New functions.
18867 (try_thread_db_load, thread_db_load_search): New functions.
18868 (thread_db_init): Search for libthread_db.
18869 (thread_db_free): New function.
18870 (thread_db_handle_monitor_command): Likewise.
18871 * config.in: Regenerate.
18872 * configure: Regenerate.
18873
18874 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
18875
18876 * spu-low.c (spu_kill): Wait for inferior to terminate.
18877 Call clear_inferiors.
18878 (spu_detach): Call clear_inferiors.
18879
18880 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18881
18882 * aclocal.m4: Regenerate.
18883 * config.in: Likewise.
18884 * configure: Likewise.
18885
18886 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18887
18888 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
18889 (parse_spufs_run): New function.
18890 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
18891 (ppc_breakpoint_at): Handle SPU breakpoints.
18892
18893 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18894
18895 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
18896 (SPUFS_MAGIC): Define.
18897 (spu_enumerate_spu_ids): New function.
18898 (linux_qxfer_spu): New function.
18899 (linux_target_ops): Install linux_qxfer_spu.
18900
18901 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18902
18903 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
18904 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
18905 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
18906 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
18907 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
18908 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
18909 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
18910 (init_registers_powerpc_cell32l): Add prototype.
18911 (init_registers_powerpc_cell64l): Likewise.
18912 (ppc_arch_setup): Detect Cell/B.E. architecture.
18913
18914 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18915
18916 * Makefile.in (datarootdir): New variable.
18917
18918 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18919
18920 * linux-low.c (linux_write_memory): Update debugging output.
18921 * Makefile.in (clean): Add new descriptions.
18922 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
18923 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
18924 * configure.srv: Add new files for arm*-*-linux*.
18925 * linux-arm-low.c: Add new declarations.
18926 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
18927 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
18928 (HWCAP_VFPv3D16): New.
18929 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
18930 instead of __IWMMXT__.
18931 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
18932 (arm_arch_setup): New.
18933 (target_regsets): Remove #ifdef. Add VFP regset.
18934 (the_low_target): Use arm_arch_setup.
18935
18936 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18937
18938 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
18939 the main thread again.
18940
18941 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
18942
18943 Adding Neutrino gdbserver.
18944 * configure: Regenerated.
18945 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
18946 * configure.srv (i[34567]86-*-nto*): New target.
18947 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
18948 * remote-utils.c [__QNX__]: Include sys/iomgr.h
18949 (nto_comctrl) [__QNX__]: New function.
18950 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
18951
18952 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
18953
18954 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
18955 srv_tgtobj.
18956
18957 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
18958 Pedro Alves <pedro@codesourcery.com>
18959
18960 * win32-i386-low.c (i386_get_thread_context): Handle systems that
18961 don't support CONTEXT_EXTENDED_REGISTERS.
18962 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
18963 (the_low_target): Install them.
18964 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
18965 failing with ERROR_PIPE_NOT_CONNECTED.
18966
18967 2009-06-30 Doug Evans <dje@google.com>
18968 Pierre Muller <muller@ics.u-strasbg.fr>
18969
18970 Add h/w watchpoint support to x86-linux, win32-i386.
18971 * Makefile.in (SFILES): Add i386-low.c
18972 (i386_low_h): Define.
18973 (i386-low.o): Add dependencies.
18974 (linux-x86-low.o): Add i386-low.h dependency.
18975 (win32-i386-low.o): Ditto.
18976 * i386-low.c: New file.
18977 * i386-low.h: New file.
18978 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
18979 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
18980 * linux-low.c (linux_add_process): Initialize arch_private.
18981 (linux_remove_process): Free arch_private.
18982 (add_lwp): Initialize arch_private.
18983 (delete_lwp): Free arch_private.
18984 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
18985 provided.
18986 * linux-low.h (process_info_private): New member arch_private.
18987 (lwp_info): New member arch_private.
18988 (linux_target_ops): New members new_process, new_thread,
18989 prepare_to_resume.
18990 (ptid_of): New macro.
18991 * linux-x86-low.c: Include stddef.h, i386-low.h.
18992 (arch_process_info): New struct.
18993 (arch_lwp_info): New struct.
18994 (x86_linux_dr_get, x86_linux_dr_set): New functions.
18995 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
18996 (i386_dr_low_get_status): New function.
18997 (x86_insert_point, x86_remove_point): New functions.
18998 (x86_stopped_by_watchpoint): New function.
18999 (x86_stopped_data_address): New function.
19000 (x86_linux_new_process, x86_linux_new_thread): New functions.
19001 (x86_linux_prepare_to_resume): New function.
19002 (the_low_target): Add entries for insert_point, remove_point,
19003 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
19004 prepare_to_resume.
19005 * server.c (debug_hw_points): New global.
19006 (monitor_show_help): Document set debug-hw-points.
19007 (handle_query): Process "set debug-hw-points".
19008 * server.h (debug_hw_points): Declare.
19009 (paddress): Declare.
19010 * utils.c (NUMCELLS, CELLSIZE): New macros.
19011 (get_sell, xsnprintf, paddress): New functions.
19012 * win32-arm-low.c (the_low_target): Add entries for insert_point,
19013 remove_point, stopped_by_watchpoint, stopped_data_address.
19014 * win32-i386-low.c: Include i386-low.h.
19015 (debug_reg_state): Replaces dr.
19016 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
19017 (i386_dr_low_get_status): New function.
19018 (i386_insert_point, i386_remove_point): New functions.
19019 (i386_stopped_by_watchpoint): New function.
19020 (i386_stopped_data_address): New function.
19021 (i386_initial_stuff): Update.
19022 (get_thread_context,set_thread_context,i386_thread_added): Update.
19023 (the_low_target): Add entries for insert_point,
19024 remove_point, stopped_by_watchpoint, stopped_data_address.
19025 * win32-low.c (win32_insert_watchpoint): New function.
19026 (win32_remove_watchpoint): New function.
19027 (win32_stopped_by_watchpoint): New function.
19028 (win32_stopped_data_address): New function.
19029 (win32_target_ops): Add entries for insert_watchpoint,
19030 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
19031 * win32-low.h (win32_target_ops): New members insert_point,
19032 remove_point, stopped_by_watchpoint, stopped_data_address.
19033
19034 2009-06-25 Pedro Alves <pedro@codesourcery.com>
19035
19036 * server.c (process_serial_event): Re-return unsupported, not
19037 error, if the type isn't recognized. Re-allow supporting only
19038 insert or remove packets. Also call require_running for
19039 breakpoints. Add missing break statement to default case. Tidy.
19040 * target.h (struct target_ops): Rename insert_watchpoint to
19041 insert_point, and remove_watchpoint to remove_point.
19042
19043 * linux-low.h (struct linux_target_ops): Likewise.
19044 * linux-low.c (linux_insert_watchpoint): Rename to ...
19045 (linux_insert_point): ... this. Adjust.
19046 (linux_remove_watchpoint): Rename to ...
19047 (linux_remove_point): ... this. Adjust.
19048 (linux_target_ops): Adjust.
19049 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
19050 (cris_insert_point): ... this.
19051 (cris_remove_watchpoint): Rename to ...
19052 (cris_remove_point): ... this.
19053 (the_low_target): Adjust.
19054
19055 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
19056
19057 * server.c (handle_v_kill): Pass signal_pid to
19058 kill_inferior if multi_process is zero.
19059
19060 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
19061
19062 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
19063 * target.h (target_ops): Comment for *_watchpoint to make it clear
19064 the functions can get types '0' and '1'.
19065
19066 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
19067
19068 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
19069 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
19070 * regcache.c (get_regcache): Likewise.
19071 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
19072 * win32-low.c (child_fetch_inferior_registers): Remove check for
19073 regno 0.
19074
19075 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
19076 Pedro Alves <pedro@codesourcery.com>
19077
19078 * target.h (struct target_ops) <supports_multi_process>: New
19079 callback.
19080 (target_supports_multi_process): New.
19081 * server.c (handle_query): Even if GDB reports support, only
19082 enable multi-process if the target also supports it. Report
19083 multi-process support only if the target backend supports it.
19084 * linux-low.c (linux_supports_multi_process): New function.
19085 (linux_target_ops): Install it as target_supports_multi_process
19086 callback.
19087
19088 2009-05-24 Doug Evans <dje@google.com>
19089
19090 Global renaming of find_thread_pid to find_thread_ptid.
19091 * server.h (find_thread_ptid): Renamed from find_thread_pid.
19092 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
19093 All callers updated.
19094
19095 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
19096 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
19097 directly.
19098
19099 * linux-low.c (get_stop_pc): Print pc if debug_threads.
19100 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
19101 (linux_resume_one_lwp): Ditto.
19102
19103 2009-05-23 Doug Evans <dje@google.com>
19104
19105 * linux-low.c (linux_resume_one_lwp): Change type of first arg
19106 from struct inferior_list_entry * to struct lwp_info *.
19107 All callers updated.
19108
19109 2009-05-13 Doug Evans <dje@google.com>
19110
19111 * linux-x86-low.c: Don't include assert.h.
19112 (x86_siginfo_fixup): Use fatal, not assert.
19113 (x86_arch_setup): Fix comment.
19114
19115 2009-05-12 Doug Evans <dje@google.com>
19116
19117 Biarch support for i386/amd64 gdbserver.
19118 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
19119 Add linux-x86-low.c.
19120 (linux-i386-low.o, linux-x86-64-low.o): Delete.
19121 (linux-x86-low.o): Add.
19122 * linux-x86-64-low.c: Delete.
19123 * linux-i386-low.c: Delete.
19124 * linux-x86-low.c: New file.
19125 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
19126 linux-x86-low.o.
19127 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
19128 linux-x86-low.o.
19129 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
19130 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
19131 (linux_child_pid_to_exec_file): New function.
19132 (elf_64_header_p, elf_64_file_p): New functions.
19133 (siginfo_fixup): New function.
19134 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
19135 give target a chance to convert layout.
19136 * linux-low.h (linux_target_ops): New member siginfo_fixup.
19137 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
19138
19139 2009-05-07 Doug Evans <dje@google.com>
19140
19141 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
19142 (regsets_store_inferior_registers): Ditto.
19143
19144 2009-05-06 Pedro Alves <pedro@codesourcery.com>
19145
19146 PR server/10048
19147
19148 * linux-low.c (must_set_ptrace_flags): Delete.
19149 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
19150 of the global.
19151 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
19152 `lwp->must_set_ptrace_flags' instead.
19153 (linux_wait_for_event_1): Set ptrace options here.
19154 (linux_wait_1): ... not here.
19155
19156 2009-04-30 Doug Evans <dje@google.com>
19157
19158 * inferiors.c (started_inferior_callback): New function.
19159 (attached_inferior_callback): New function.
19160 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
19161 * server.c (print_started_pid, print_attached_pid): New functions.
19162 (detach_or_kill_for_exit): New function.
19163 (main): Call it instead of for_each_inferior (kill_inferior_callback).
19164 * server.h (have_started_inferiors_p): Declare.
19165 (have_attached_inferiors_p): Declare.
19166
19167 * inferiors.c (remove_process): Fix memory leak, free process.
19168 * linux-low.c (linux_remove_process): New function.
19169 (linux_kill): Call it instead of remove_process.
19170 (linux_detach, linux_wait_1): Ditto.
19171
19172 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
19173
19174 * configure.srv: Add x86 Windows CE target.
19175
19176 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
19177
19178 * inferiors.c (get_thread_process): Make global.
19179 * server.h (get_thread_process): Add prototype.
19180 * thread-db.c (find_one_thread): Use get_thread_process
19181 instead of current_process.
19182 (thread_db_get_tls_address): Do not crash if called when
19183 thread layer is not yet initialized.
19184
19185 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
19186
19187 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
19188 * spu-low.c (current_tid): Rename to ...
19189 (current_ptid): ... this.
19190 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
19191 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
19192 ptid_get_lwp (current_ptid) instead of current_tid.
19193 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
19194 instead of current_tid. Use find_process_pid to verify pid
19195 argument is valid. Pass proper argument to remove_process.
19196 (spu_thread_alive): Compare current_ptid instead of current_tid.
19197 (spu_resume): Likewise.
19198
19199 2009-04-02 Pedro Alves <pedro@codesourcery.com>
19200
19201 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
19202 variable.
19203
19204 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19205
19206 Implement the multiprocess extensions, and add linux multiprocess
19207 support.
19208
19209 * server.h (ULONGEST): Declare.
19210 (struct ptid, ptid_t): New.
19211 (minus_one_ptid, null_ptid): Declare.
19212 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
19213 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
19214 (struct inferior_list_entry): Change `id' type from unsigned from
19215 to ptid_t.
19216 (struct sym_cache, struct breakpoint, struct
19217 process_info_private): Forward declare.
19218 (struct process_info): Declare.
19219 (current_process): Declare.
19220 (all_processes): Declare.
19221 (initialize_inferiors): Declare.
19222 (add_thread): Adjust to use ptid_t.
19223 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
19224 (add_process, remove_process, find_thread_pid): Declare.
19225 (find_inferior_id): Adjust to use ptid_t.
19226 (cont_thread, general_thread, step_thread): Change type to ptid_t.
19227 (multi_process): Declare.
19228 (push_event): Adjust to use ptid_t.
19229 (read_ptid, write_ptid): Declare.
19230 (prepare_resume_reply): Adjust to use ptid_t.
19231 (clear_symbol_cache): Declare.
19232 * inferiors.c (all_processes): New.
19233 (null_ptid, minus_one_ptid): New.
19234 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
19235 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
19236 (add_thread): Change unsigned long to ptid. Remove gdb_id
19237 parameter. Adjust.
19238 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
19239 (gdb_id_to_thread): Rename to ...
19240 (find_thread_pid): ... this. Change unsigned long to ptid.
19241 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
19242 (loaded_dll, pull_pid_from_list): Adjust.
19243 (add_process, remove_process, find_process_pid)
19244 (get_thread_process, current_process, initialize_inferiors): New.
19245 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
19246 (struct target_waitstatus) <related_pid>: Ditto.
19247 (struct target_ops) <kill, detach>: Add `pid' argument. Change
19248 return type to int.
19249 (struct target_ops) <join>: Add `pid' argument.
19250 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
19251 (struct target_ops) <wait>: Add `ptid' field. Change return type
19252 to ptid.
19253 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
19254 (mywait): Add `ptid' argument. Change return type to ptid_t.
19255 (target_pid_to_str): Declare.
19256 * target.c (set_desired_inferior): Adjust to use ptids.
19257 (mywait): Add new `ptid' argument. Adjust.
19258 (target_pid_to_str): New.
19259 * mem-break.h (free_all_breakpoints): Declare.
19260 * mem-break.c (breakpoints): Delelete.
19261 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
19262 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
19263 to use per-process breakpoint list.
19264 (free_all_breakpoints): New.
19265 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
19266 (symbol_cache, all_symbols_looked_up): Delete.
19267 (hexchars): New.
19268 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
19269 read_ptid): New.
19270 (prepare_resume_reply): Change ptid argument's type from unsigned
19271 long to ptid_t. Adjust. Implement W;process and X;process.
19272 (free_sym_cache, clear_symbol_cache): New.
19273 (look_up_one_symbol): Adjust to per-process symbol cache. *
19274 * server.c (cont_thread, general_thread, step_thread): Change type
19275 to ptid_t.
19276 (attached): Delete.
19277 (multi_process): New.
19278 (last_ptid): Change type to ptid_t.
19279 (struct vstop_notif) <ptid>: Change type to ptid_t.
19280 (queue_stop_reply, push_event): Change `ptid' argument's type to
19281 ptid_t.
19282 (discard_queued_stop_replies): Add `pid' argument.
19283 (start_inferior): Adjust to use ptids. Adjust to mywait interface
19284 changes. Don't reference the `attached' global.
19285 (attach_inferior): Adjust to mywait interface changes.
19286 (handle_query): Adjust to use ptids. Parse GDB's qSupported
19287 features. Handle and report "multiprocess+". Handle
19288 "qAttached:PID".
19289 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
19290 changes.
19291 (handle_v_kill): New.
19292 (handle_v_stopped): Adjust to use target_pid_to_str.
19293 (handle_v_requests): Allow multiple attaches and runs when
19294 multiprocess extensions are in effect. Handle "vKill".
19295 (myresume): Adjust to use ptids.
19296 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
19297 (handle_status): Adjust to discard_queued_stop_replies interface
19298 change.
19299 (first_thread_of, kill_inferior_callback)
19300 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
19301 (main): Call initialize_inferiors. Adjust to use ptids, killing
19302 and detaching from all inferiors. Handle multiprocess packet
19303 variants.
19304 * linux-low.h: Include gdb_proc_service.h.
19305 (struct process_info_private): New.
19306 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
19307 <lwpid_of>: Use ptid_get_lwp.
19308 (get_lwp_thread): Adjust.
19309 (struct lwp_info): Add `dead' member.
19310 (find_lwp_pid): Declare.
19311 * linux-low.c (thread_db_active): Delete.
19312 (new_inferior): Adjust comment.
19313 (inferior_pid): Delete.
19314 (linux_add_process): New.
19315 (handle_extended_wait): Adjust.
19316 (add_lwp): Change unsigned long to ptid.
19317 (linux_create_inferior): Add process to processes table. Adjust
19318 to use ptids. Don't set new_inferior here.
19319 (linux_attach_lwp): Rename to ...
19320 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
19321 it. Adjust to use ptids.
19322 (linux_attach_lwp): New.
19323 (linux_attach): Add process to processes table. Don't set
19324 new_inferior here.
19325 (struct counter): New.
19326 (second_thread_of_pid_p, last_thread_of_process_p): New.
19327 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
19328 multiple processes.
19329 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
19330 processes. Remove process from process table.
19331 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
19332 to multiple processes.
19333 (any_thread_of): New.
19334 (linux_detach): Add `pid' argument, and handle it. Remove process
19335 from processes table.
19336 (linux_join): Add `pid' argument. Handle it.
19337 (linux_thread_alive): Change unsighed long argument to ptid_t.
19338 Consider dead lwps as not being alive.
19339 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
19340 threads we're not interested in.
19341 (same_lwp, find_lwp_pid): New.
19342 (linux_wait_for_lwp): Change `pid' argument's type from int to
19343 ptid_t. Adjust.
19344 (linux_wait_for_event): Rename to ...
19345 (linux_wait_for_event_1): ... this. Change `pid' argument's type
19346 from int to ptid_t. Adjust.
19347 (linux_wait_for_event): New.
19348 (linux_wait_1): Add `ptid' argument. Change return type to
19349 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
19350 that exit from the process table.
19351 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
19352 Adjust.
19353 (mark_lwp_dead): New.
19354 (wait_for_sigstop): Adjust to use ptids. If a process exits while
19355 stopping all threads, mark its main lwp as dead.
19356 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
19357 ptids.
19358 (fetch_register, usr_store_inferior_registers)
19359 (regsets_fetch_inferior_registers)
19360 (regsets_store_inferior_registers, linux_read_memory)
19361 (linux_write_memory): Inline `inferior_pid'.
19362 (linux_look_up_symbols): Adjust to use per-process
19363 `thread_db_active'.
19364 (linux_request_interrupt): Adjust to use ptids.
19365 (linux_read_auxv): Inline `inferior_pid'.
19366 (initialize_low): Don't reference thread_db_active.
19367 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
19368 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
19369 (ps_getpid): Return the pid of the current inferior.
19370 * thread-db.c (proc_handle, thread_agent): Delete.
19371 (thread_db_create_event, thread_db_enable_reporting): Adjust to
19372 per-process data.
19373 (find_one_thread): Change argument type to ptid_t. Adjust to
19374 per-process data.
19375 (maybe_attach_thread): Adjust to per-process data and ptids.
19376 (thread_db_find_new_threads): Ditto.
19377 (thread_db_init): Ditto.
19378 * spu-low.c (spu_create_inferior, spu_attach): Add process to
19379 processes table. Adjust to use ptids.
19380 (spu_kill, spu_detach): Adjust interface. Remove process from
19381 processes table.
19382 (spu_join, spu_thread_alive): Adjust interface.
19383 (spu_wait): Adjust interface. Remove process from processes
19384 table. Adjust to use ptids.
19385 * win32-low.c (current_inferior_tid): Delete.
19386 (current_inferior_ptid): New.
19387 (debug_event_ptid): New.
19388 (thread_rec): Take a ptid. Adjust.
19389 (child_add_thread): Add `pid' argument. Adjust to use ptids.
19390 (child_delete_thread): Ditto.
19391 (do_initial_child_stuff): Add `attached' argument. Add process to
19392 processes table.
19393 (child_fetch_inferior_registers, child_store_inferior_registers):
19394 Adjust.
19395 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
19396 (win32_attach): Pass 1 to do_initial_child_stuff.
19397 (win32_kill): Adjust interface. Remove process from processes
19398 table.
19399 (win32_detach): Ditto.
19400 (win32_join): Adjust interface.
19401 (win32_thread_alive): Take a ptid.
19402 (win32_resume): Adjust to use ptids.
19403 (get_child_debug_event): Ditto.
19404 (win32_wait): Adjust interface. Remove exiting process from
19405 processes table.
19406
19407 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19408
19409 Non-stop mode support.
19410
19411 * server.h (non_stop): Declare.
19412 (gdb_client_data, handler_func): Declare.
19413 (delete_file_handler, add_file_handler, start_event_loop):
19414 Declare.
19415 (handle_serial_event, handle_target_event, push_event)
19416 (putpkt_notif): Declare.
19417 * target.h (enum resume_kind): New.
19418 (struct thread_resume): Replace `step' field by `kind' field.
19419 (TARGET_WNOHANG): Define.
19420 (struct target_ops) <wait>: Add `options' argument.
19421 <supports_non_stop, async, start_non_stop>: New fields.
19422 (target_supports_non_stop, target_async): New.
19423 (start_non_stop): Declare.
19424 (mywait): Add `options' argument.
19425 * target.c (mywait): Add `options' argument. Print child exit
19426 notifications here.
19427 (start_non_stop): New.
19428 * server.c (non_stop, own_buf, mem_buf): New globals.
19429 (struct vstop_notif): New.
19430 (notif_queue): New global.
19431 (queue_stop_reply, push_event, discard_queued_stop_replies)
19432 (send_next_stop_reply): New.
19433 (start_inferior): Adjust to use resume_kind. Adjust to mywait
19434 interface changes.
19435 (attach_inferior): In non-stop mode, don't wait for the target
19436 here.
19437 (handle_general_set): Handle QNonStop.
19438 (handle_query): When handling qC, return the current general
19439 thread, instead of the first thread of the list.
19440 (handle_query): If the backend supports non-stop mode, include
19441 QNonStop+ in the qSupported query response.
19442 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
19443 and non-stop mode.
19444 (handle_v_attach, handle_v_run): Handle non-stop mode.
19445 (handle_v_stopped): New.
19446 (handle_v_requests): Report support for vCont;t. Handle vStopped.
19447 (myresume): Adjust to use resume_kind. Handle non-stop.
19448 (queue_stop_reply_callback): New.
19449 (handle_status): Handle non-stop mode.
19450 (main): Clear non_stop flag on reconnection. Use the event-loop.
19451 Refactor serial protocol handling from here ...
19452 (process_serial_event): ... to this new function. When GDB
19453 selects any thread, select one here. In non-stop mode, wait until
19454 GDB acks all pending events before exiting.
19455 (handle_serial_event, handle_target_event): New.
19456 * remote-utils.c (remote_open): Install remote_desc in the event
19457 loop.
19458 (remote_close): Remove remote_desc from the event loop.
19459 (putpkt_binary): Rename to...
19460 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
19461 (putpkt_binary): New as wrapper around putpkt_binary_1.
19462 (putpkt_notif): New.
19463 (prepare_resume_reply): In non-stop mode, don't change the
19464 general_thread.
19465 * event-loop.c: New.
19466 * Makefile.in (OBJ): Add event-loop.o.
19467 (event-loop.o): New rule.
19468
19469 * linux-low.h (pid_of): Moved here.
19470 (lwpid_of): New.
19471 (get_lwp_thread): Use lwpid_of.
19472 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
19473 * linux-low.c (pid_of): Delete.
19474 (inferior_pid): Use lwpid_of.
19475 (linux_event_pipe): New.
19476 (target_is_async_p): New.
19477 (delete_lwp): New.
19478 (handle_extended_wait): Use lwpid_of.
19479 (add_lwp): Don't set lwpid field.
19480 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
19481 (linux_kill_one_lwp): If killing a running lwp, stop it first.
19482 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
19483 (linux_detach_one_lwp): If detaching from a running lwp, stop it
19484 first. Adjust to linux_wait_for_event interface changes. Use
19485 lwpid_of.
19486 (linux_detach): Don't delete the main lwp here.
19487 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
19488 (status_pending_p): Don't consider explicitly suspended lwps.
19489 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
19490 pointer. Add OPTIONS argument. Change return type to int. Use
19491 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
19492 (linux_wait_for_event): Take an integer pid instead of a lwp_info
19493 pointer. Add status pointer argument. Return a pid instead of a
19494 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
19495 changes. In non-stop mode, don't switch to a random thread.
19496 (linux_wait): Rename to...
19497 (linux_wait_1): ... this. Add target_options argument, and handle
19498 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
19499 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
19500 clean exit and signal exit code. Don't stop all threads in
19501 non-stop mode. In all-stop mode, only stop all threads when
19502 reporting a stop to GDB. Handle explicit thread stop requests.
19503 (async_file_flush, async_file_mark): New.
19504 (linux_wait): New.
19505 (send_sigstop): Use lwpid_of.
19506 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
19507 interface changes. In non-stop mode, don't switch to a random
19508 thread.
19509 (linux_resume_one_lwp): Use lwpid_of.
19510 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
19511 (linux_resume_one_thread): ... this. Handle resume_stop. In
19512 non-stop mode, don't look for pending flag in all threads.
19513 (resume_status_pending_p): Don't consider explicitly suspended
19514 threads.
19515 (my_waitpid): Reimplement. Emulate __WALL.
19516 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19517 Use lwpid_of.
19518 (sigchld_handler, linux_supports_non_stop, linux_async)
19519 (linux_start_non_stop): New.
19520 (linux_target_ops): Register linux_supports_non_stop, linux_async
19521 and linux_start_non_stop.
19522 (initialize_low): Install SIGCHLD handler.
19523 * thread-db.c (thread_db_create_event, find_one_thread)
19524 (thread_db_get_tls_address): Use lwpid_of.
19525 * win32-low.c (win32_detach): Adjust to use resume_kind.
19526 (win32_wait): Add `options' argument.
19527 * spu-low.c (spu_resume): Adjust to use resume_kind.
19528 (spu_wait): Add `options' argument.
19529
19530 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19531
19532 Decouple target code from remote protocol.
19533
19534 * target.h (enum target_waitkind): New.
19535 (struct target_waitstatus): New.
19536 (struct target_ops) <wait>: Return an unsigned long. Take a
19537 target_waitstatus pointer instead of a char pointer.
19538 (mywait): Likewise.
19539 * target.c (mywait): Change prototype to return an unsigned long.
19540 Take a target_waitstatus pointer instead of a char pointer. Adjust.
19541 * server.h (thread_from_wait, old_thread_from_wait): Delete
19542 declarations.
19543 (prepare_resume_reply): Change prototype to take a
19544 target_waitstatus.
19545 * server.c (thread_from_wait, old_thread_from_wait): Delete.
19546 (last_status, last_ptid): New.
19547 (start_inferior): Remove "statusptr" argument. Adjust. Return a
19548 pid instead of a signal.
19549 (attach_inferior): Remove "status" and "signal" parameters.
19550 Adjust.
19551 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
19552 not as an address.
19553 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
19554 (handle_v_requests, myresume): Remove "status" and "signal"
19555 parameters. Adjust.
19556 (handle_status): New.
19557 (main): Delete local `status'. Adjust.
19558 * remote-utils.c: Include target.h.
19559 (prepare_resume_reply): Change prototype to take a
19560 target_waitstatus. Adjust.
19561
19562 * linux-low.c (linux_wait): Adjust to new target_ops->wait
19563 interface.
19564 * spu-low.c (spu_wait): Adjust.
19565 * win32-low.c (enum target_waitkind, struct target_waitstatus):
19566 Delete.
19567 (win32_wait): Adjust.
19568
19569 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19570
19571 * target.h (struct thread_resume): Delete leave_stopped member.
19572 (struct target_ops): Add a `n' argument to the `resume' callback.
19573 * server.c (start_inferior): Adjust.
19574 (handle_v_cont, myresume): Adjust.
19575 * linux-low.c (check_removed_breakpoint): Adjust to resume
19576 interface change, and to removed leave_stopped field.
19577 (resume_ptr): Delete.
19578 (struct thread_resume_array): New.
19579 (linux_set_resume_request): Add new `arg' parameter. Adjust to
19580 resume interface change.
19581 (linux_continue_one_thread, linux_queue_one_thread)
19582 (resume_status_pending_p): Check if the resume field is NULL
19583 instead of checking the leave_stopped member.
19584 (linux_resume): Adjust to the target resume interface change.
19585 * spu-low.c (spu_resume): Adjust to the target resume interface
19586 change.
19587 * win32-low.c (win32_detach, win32_resume): Ditto.
19588
19589 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19590
19591 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
19592 flag.
19593 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
19594 pending.
19595 (linux_continue_one_thread): Only preserve the stepping flag if
19596 there's a pending breakpoint.
19597
19598 2009-03-31 Pedro Alves <pedro@codesourcery.com>
19599
19600 * server.c (main): After the inferior having exited, call
19601 remote_close before exiting gdbserver.
19602
19603 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
19604
19605 Fix size of FPSCR in Power 7 processors.
19606 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
19607 (PPC_FEATURE_HAS_DFP): New #define.
19608 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
19609 size of the FPSCR.
19610
19611 2009-03-23 Pedro Alves <pedro@codesourcery.com>
19612
19613 * server.c (handle_query) Whitespace and formatting.
19614
19615 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19616
19617 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
19618 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
19619 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
19620 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
19621 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
19622 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
19623 Makefile.in, configure.ac: Fix whitespace throughout.
19624 * configure: Regenerate.
19625
19626 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19627
19628 * inferiors.c (find_inferior): Make it safe for the callback
19629 function to delete the currently iterated inferior.
19630
19631 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19632
19633 * Makefile.in (linuw_low_h): Move higher.
19634 (thread-db.o): Depend on $(linux_low_h).
19635
19636 2009-03-17 Pedro Alves <pedro@codesourcery.com>
19637
19638 Rename "process" to "lwp" throughout.
19639
19640 * linux-low.c (all_processes): Rename to...
19641 (all_lwps): ... this.
19642 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
19643 (add_process): Rename to ...
19644 (add_lwp): ... this. Adjust.
19645 (linux_create_inferior): Adjust.
19646 (linux_attach_lwp): Adjust.
19647 (linux_attach): Adjust.
19648 (linux_kill_one_process): Rename to ...
19649 (linux_kill_one_lwp): ... this. Adjust.
19650 (linux_kill): Adjust.
19651 (linux_detach_one_process): Rename to ...
19652 (linux_detach_one_lwp): ... this. Adjust.
19653 (linux_detach): Adjust.
19654 (check_removed_breakpoint): Adjust.
19655 (status_pending_p): Adjust.
19656 (linux_wait_for_process): Rename to ...
19657 (linux_wait_for_lwp): ... this. Adjust.
19658 (linux_wait_for_event): Adjust.
19659 (send_sigstop): Adjust.
19660 (wait_for_sigstop): Adjust.
19661 (stop_all_processes): Rename to ...
19662 (stop_all_lwps): ... this.
19663 (linux_resume_one_process): Rename to ...
19664 (linux_resume_one_lwp): ... this. Adjust.
19665 (linux_set_resume_request, linux_continue_one_thread)
19666 (linux_queue_one_thread, resume_status_pending_p)
19667 (usr_store_inferior_registers, regsets_store_inferior_registers)
19668 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19669 Adjust.
19670 * linux-low.h (get_process): Rename to ...
19671 (get_lwp): ... this. Adjust.
19672 (get_thread_process): Rename to ...
19673 (get_thread_lwp): ... this. Adjust.
19674 (get_process_thread): Rename to ...
19675 (get_lwp_thread): ... this. Adjust.
19676 (struct process_info): Rename to ...
19677 (struct lwp_info): ... this.
19678 (all_processes): Rename to ...
19679 (all_lwps): ... this.
19680 * proc-service.c (ps_lgetregs): Adjust.
19681 * thread-db.c (thread_db_create_event, find_one_thread)
19682 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
19683
19684 2009-03-14 Pedro Alves <pedro@codesourcery.com>
19685
19686 * server.c (handle_query): Handle "qAttached".
19687
19688 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
19689
19690 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
19691 GPLv3, update license URL.
19692
19693 2009-03-01 Doug Evans <dje@google.com>
19694
19695 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
19696 (server_h): Add gdb_signals.h.
19697 (signals.o): Update.
19698 * server.h (target_signal_from_host,target_signal_to_host_p)
19699 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
19700
19701 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
19702
19703 * remote-utils.c (getpkt): Also generate remote-debug
19704 information if noack_mode is set.
19705
19706 2009-02-06 Pedro Alves <pedro@codesourcery.com>
19707
19708 * server.c (handle_query): Report qXfer:siginfo:read and
19709 qXfer:siginfo:write as supported and handle them.
19710 * target.h (struct target_ops) <qxfer_siginfo>: New field.
19711 * linux-low.c (linux_xfer_siginfo): New.
19712 (linux_target_ops): Set it.
19713
19714 2009-01-26 Pedro Alves <pedro@codesourcery.com>
19715
19716 * server.c (gdbserver_usage): Mention --remote-debug.
19717 (main): Accept '--remote-debug' switch.
19718
19719 2009-01-18 Doug Evans <dje@google.com>
19720
19721 * regcache.c (new_register_cache): No need to check result of xcalloc.
19722 * server.c (handle_search_memory): Back out calls to xmalloc,
19723 result is checked and error is returned to user upon failure.
19724 (handle_query): Ditto. Add more checks for result of malloc.
19725 (handle_v_cont): Check result of malloc, report error back to
19726 user upon failure.
19727 (handle_v_run): Ditto. Call freeargv.
19728 * server.h (freeargv): Declare.
19729 * utils.c (freeargv): New fn.
19730
19731 2009-01-15 Doug Evans <dje@google.com>
19732
19733 * gdbreplay.c (perror_with_name): Make arg const char *.
19734 * server.h (target_signal_to_name): Make return type const char *.
19735 * thread-db.c (thread_db_err_str): Make return type const char *.
19736 * utils.c (perror_with_name): Make arg const char *.
19737
19738 2009-01-14 Pedro Alves <pedro@codesourcery.com>
19739
19740 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
19741 when handling a EXIT_PROCESS_DEBUG_EVENT.
19742
19743 2009-01-06 Joel Brobecker <brobecker@adacore.com>
19744
19745 * gdbreplay.c (gdbreplay_version): Update copyright year.
19746 * server.c (gdbserver_version): Likewise.
19747
19748 2009-01-05 Doug Evans <dje@google.com>
19749
19750 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
19751 (handle_extended_wait): Improve comment.
19752
19753 2008-12-13 Doug Evans <dje@google.com>
19754
19755 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
19756 * server.h (ATTR_MALLOC): New macro.
19757 (xmalloc,xcalloc,xstrdup): Declare.
19758 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
19759 * inferiors.c: Ditto.
19760 * linux-low.c: Ditto.
19761 * mem-break.c: Ditto.
19762 * regcache.c: Ditto.
19763 * remote-utils.c: Ditto.
19764 * server.c: Ditto.
19765 * target.c: Ditto.
19766 * win32-low.c: Ditto.
19767
19768 2008-12-12 Doug Evans <dje@google.com>
19769
19770 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
19771 in debugging printf.
19772
19773 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
19774
19775 2008-12-09 Doug Evans <dje@google.com>
19776
19777 * linux-low.h (struct process_info): Delete member tid, unused.
19778 * thread-db.c (find_one_thread): Update.
19779 (maybe_attach_thread): Update.
19780
19781 2008-12-02 Pedro Alves <pedro@codesourcery.com>
19782
19783 * target.h (struct target_ops): Add qxfer_osdata member.
19784 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
19785 and dirent.h.
19786 (linux_qxfer_osdata): New functions.
19787 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
19788 callback.
19789 * server.c (handle_query): Handle "qXfer:osdata:read:".
19790 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
19791 (buffer_xml_printf): New functions.
19792 * server.h (struct buffer): New.
19793 (buffer_grow_str, buffer_grow_str0): New macros.
19794 (buffer_grow, buffer_free, buffer_init, buffer_finish)
19795 (buffer_xml_printf): Declare.
19796
19797 2008-11-24 Doug Evans <dje@google.com>
19798
19799 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
19800
19801 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
19802
19803 * server.c (handle_v_run): Always use the supplied argument list.
19804
19805 2008-11-19 Bob Wilson <bob.wilson@acm.org>
19806
19807 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
19808 (xtensa_regmap_table): Add entry for scompare1.
19809
19810 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
19811
19812 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
19813 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
19814 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
19815 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
19816 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
19817 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
19818 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
19819 XML target descriptions.
19820 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
19821 when inferior is running on an ISA 2.05 or later processor. Add
19822 special case to return offset for full 64-bit slot of FPSCR when
19823 in 32-bits.
19824
19825 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
19826
19827 * Makefile.in (SFILES, clean): Added sparc64 files.
19828 (reg-sparc64.o, reg-sparc64.c): New.
19829 * configure.srv (sparc*-*-linux*): New configuration.
19830 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
19831 syscall arguments for SPARC.
19832 (regsets_store_inferior_registers): Likewise.
19833 * linux-sparc-low.c: New file.
19834
19835 2008-10-21 Doug Evans <dje@google.com>
19836
19837 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
19838 (READLINE_DIR,READLINE_DEP): Delete.
19839 (INTERNAL_CFLAGS): Update.
19840 (LINTFLAGS): Update.
19841
19842 2008-10-10 Pedro Alves <pedro@codesourcery.com>
19843
19844 * server.c (handle_v_run): If GDB didn't specify an argv, use the
19845 whole argv from the last run, not just argv[0].
19846
19847 2008-09-08 Pedro Alves <pedro@codesourcery.com>
19848
19849 * regcache.c (new_register_cache): Return NULL if the register
19850 cache size isn't known yet.
19851 (free_register_cache): Avoid dereferencing a NULL regcache.
19852
19853 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
19854
19855 * configure.srv: Merge MIPS and MIPS64.
19856
19857 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
19858
19859 * Makefile.in (uninstall): Apply $(EXEEXT) too.
19860
19861 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
19862
19863 * Makefile.in: Add required vsx dependencies.
19864
19865 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
19866 Declare init_registers_powerpc_vsx32l.
19867 Declare init_registers_powerpc_vsx64l.
19868 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
19869 (ppc_arch_setup): Check for VSX in hwcap.
19870 (ppc_fill_vsxregset): New function.
19871 (ppc_store_vsxregset): New function.
19872 Add new VSX entry in regset_info target_regsets.
19873
19874 * configure.srv: Add new VSX dependencies.
19875
19876 2008-08-12 Pedro Alves <pedro@codesourcery.com>
19877
19878 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
19879 (remote_open): Set or clear transport_is_reliable.
19880 (putpkt_binary): Don't expect acks in noack mode.
19881 (getpkt): Don't send ack/nac in noack mode.
19882 * server.c (handle_general_set): Handle QStartNoAckMode.
19883 (handle_query): If connected by tcp pass QStartNoAckMode+ in
19884 qSupported.
19885 (main): Reset noack_mode on every connection.
19886 * server.h (noack_mode): Declare.
19887
19888 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19889
19890 * Makefile.in (GDBREPLAY_OBS): New variable.
19891 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
19892
19893 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
19894 Daniel Jacobowitz <dan@codesourcery.com>
19895
19896 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
19897 (usr_store_inferior_registers): Likewise.
19898 (regsets_store_inferior_registers): Likewise.
19899
19900 2008-07-31 Rolf Jansen <rj@surtec.com>
19901 Pedro Alves <pedro@codesourcery.com>
19902
19903 * configure.ac: Check for memmem declaration.
19904 * server.c [HAVE_MALLOC_H]: Include malloc.h.
19905 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
19906 (disable_packet_qfThreadInfo): Unconditionally compile.
19907 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
19908 * configure, config.in: Regenerate.
19909
19910 2008-07-28 Doug Kwan <dougkwan@google.com>
19911
19912 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
19913 (linux_write_memory): Remove declaration of errno.
19914
19915 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
19916
19917 * linux-low.c (handle_extended_wait): Do not use "status"
19918 variable uninitialized.
19919
19920 2008-07-07 Pedro Alves <pedro@codesourcery.com>
19921
19922 * server.c (handle_v_attach): Inhibit reporting dll changes.
19923
19924 2008-06-27 Pedro Alves <pedro@codesourcery.com>
19925
19926 * remote-utils.c (prepare_resume_reply): If requested, don't
19927 output "thread:TID" in the T stop reply.
19928
19929 * server.c (disable_packet_vCont, disable_packet_Tthread)
19930 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
19931 (handle_query): If requested, disable support for qC, qfThreadInfo
19932 and qsThreadInfo.
19933 (handle_v_requests): If requested, disable support for vCont.
19934 (gdbserver_show_disableable): New.
19935 (main): Handle --disable-packet and --disable-packet=LIST.
19936
19937 * server.h (disable_packet_vCont, disable_packet_Tthread)
19938 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
19939
19940 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
19941
19942 * server.c (gdbserver_usage): Mention --version.
19943
19944 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
19945
19946 * Makefile.in (gdbreplay.o): New rule.
19947
19948 2008-06-06 Joseph Myers <joseph@codesourcery.com>
19949
19950 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
19951 message, not gdbserver.
19952
19953 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
19954 Nathan Sidwell <nathan@codesourcery.com>
19955 Joseph Myers <joseph@codesourcery.com>
19956
19957 * acinclude.m4: Include ../../config/acx.m4.
19958 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
19959 * configure, config.in: Regenerate.
19960 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
19961 * server.c (gdbserver_version): Print PKGVERSION.
19962 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
19963 (main): Adjust gdbserver_usage calls.
19964 * gdbreplay.c (version, host_name): Add declarations.
19965 (gdbreplay_version, gdbreplay_usage): New.
19966 (main): Accept --version and --help options.
19967
19968 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
19969
19970 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
19971 (arm_breakpoint_at): Handle Thumb.
19972 (the_low_target): Add comment.
19973
19974 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
19975
19976 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
19977
19978 2008-05-09 Doug Evans <dje@google.com>
19979
19980 * server.h (decode_search_memory_packet): Declare.
19981 * remote-utils.c (decode_search_memory_packet): New fn.
19982 * server.c (handle_search_memory_1): New fn.
19983 (handle_search_memory): New fn.
19984 (handle_query): Process qSearch:memory packets.
19985
19986 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
19987
19988 * regcache.c (registers_length): Remove.
19989 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
19990 full register packet.
19991 * regcache.h (registers_length): Remove prototype.
19992 * server.h (PBUFSIZ): Define to 16384.
19993
19994 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
19995
19996 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
19997 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
19998 powerpc-64l.o, and powerpc-altivec64l.o.
19999 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
20000 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
20001 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
20002 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
20003 rs6000/power-linux.xml, and rs6000/power64-linux.xml
20004 to srv_xmlfiles.
20005
20006 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
20007 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
20008 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
20009 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
20010 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
20011 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
20012 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
20013 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
20014 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
20015 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
20016 (clean): Update.
20017
20018 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
20019 (init_registers_powerpc_32l): ... this new prototype.
20020 (init_registers_powerpc_32): Remove, replace by ...
20021 (init_registers_powerpc_altivec32l): ... this new prototype.
20022 (init_registers_powerpc_e500): Remove, replace by ...
20023 (init_registers_powerpc_e500l): ... this new prototype.
20024 (init_registers_ppc64): Remove, replace by ...
20025 (init_registers_powerpc_64l): ... this new prototype.
20026 (init_registers_powerpc_64): Remove, replace by ...
20027 (init_registers_powerpc_altivec64l): ... this new prototype.
20028 (ppc_num_regs): Set to 73.
20029 (PT_ORIG_R3, PT_TRAP): Define if necessary.
20030 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
20031 (ppc_cannot_store_register): Handle orig_r3 and trap.
20032 (ppc_arch_setup): Update init_registers_... calls.
20033 (ppc_fill_gregset): Handle orig_r3 and trap.
20034
20035 * inferiors.c (clear_inferiors): Reset current_inferior.
20036
20037 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
20038
20039 * acinclude.m4: Add override.m4.
20040 * configure: Regenerate.
20041
20042 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
20043
20044 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
20045 initial call to init_register_ppc64.
20046
20047 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
20048
20049 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
20050 single powerpc*-*-linux* case.
20051 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
20052
20053 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
20054
20055 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
20056 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
20057 from reg_xmlfiles.
20058 * linux-ppc-low.c: Include <elf.h>.
20059 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
20060 (ppc_hwcap): New global variable.
20061 (ppc_regmap): Remove __SPE__ #ifdef sections.
20062 (ppc_regmap_e500): New global variable.
20063 (ppc_cannot_store_register): Update __SPE__ special case.
20064 (ppc_get_hwcap): New function.
20065 (ppc_arch_setup): Use it to determine whether inferior supports
20066 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
20067 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
20068 Do not access registers if target does not support AltiVec.
20069 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
20070 Do not access registers if target does not support SPE.
20071 (target_regsets): Unconditionally include AltiVec and SPE regsets.
20072
20073 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
20074
20075 * linux-low.c (disabled_regsets, num_regsets): New.
20076 (use_regsets_p): Delete.
20077 (linux_wait_for_process): Clear disabled_regsets.
20078 (regsets_fetch_inferior_registers): Check and set it.
20079 (regsets_store_inferior_registers): Likewise.
20080 (linux_fetch_registers, linux_store_registers): Do not use
20081 use_regsets_p.
20082 (initialize_low): Allocate disabled_regsets.
20083
20084 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
20085
20086 * Makefile.in (LIBOBJS): New.
20087 (OBS): Use LIBOBJS.
20088 (memmem.o): New rule.
20089 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
20090 * configure: Regenerated.
20091
20092 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
20093
20094 * server.c (handle_query): Never return "unsupported" for
20095 qXfer:features:read queries.
20096
20097 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
20098
20099 * server.c (get_features_xml): Fix inverted condition.
20100 (handle_query): Always support qXfer:feature:read.
20101
20102 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
20103
20104 * server.c (wrapper_argv): New.
20105 (start_inferior): Handle wrapper_argv. If set, expect an extra
20106 trap.
20107 (gdbserver_usage): Document --wrapper.
20108 (main): Parse --wrapper.
20109
20110 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20111
20112 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
20113 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
20114 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
20115 (ppc_set_pc): Likewise.
20116 (ppc_arch_setup): New function.
20117 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
20118 of collect_register.
20119 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
20120
20121 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20122
20123 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
20124 instead of linux-ppc64-low.o.
20125 * linux-ppc64-low.c: Remove file.
20126 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
20127 (linux-ppc64-low.o): Remove rule.
20128
20129 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
20130 (init_registers_powerpc_64): Likewise.
20131 (ppc_regmap): Conditionally define depending on __powerpc64__.
20132 (ppc_cannot_store_register): Do not special-case "fpscr" when
20133 compiled on __powerpc64__.
20134 (ppc_collect_ptrace_register): New function.
20135 (ppc_supply_ptrace_register): New function.
20136 (ppc_breakpoint): Change type to "unsigned int".
20137 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
20138 (the_low_target): Conditionally provide initializers for the
20139 arch_setup member depending on __powerpc64__. Install
20140 collect_ptrace_register and supply_ptrace_register members.
20141
20142 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20143
20144 * regcache.h (gdbserver_xmltarget): Add extern declaration.
20145 * server.c (gdbserver_xmltarget): Define.
20146 (get_features_xml): Use it to replace "target.xml" and arch_string.
20147
20148 * configure.srv: Remove srv_xmltarget. Add XML files that were
20149 mentioned there to srv_xmlfiles instead. Remove conditional tests
20150 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
20151 srv_xmlfiles and srv_regobj to include all possible choices.
20152 * configure.ac (srv_xmltarget): Remove.
20153 (srv_xmlfiles): Do not add "target.xml".
20154 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
20155 checks for supplementary target information.
20156 * configure: Regenerate.
20157 * Makefile.in (XML_TARGET): Remove.
20158 (target.xml): Remove rule.
20159 (clean): Do not clean up target.xml.
20160 (.PRECIOUS): Do not mention target.xml.
20161
20162 * target.h (struct target_ops): Remove arch_string member.
20163 * linux-low.c (linux_arch_string): Remove.
20164 (linux_target_ops): Remove arch_string initializer.
20165 * linux-low.h (struct linux_target_ops): Remove arch_string member.
20166 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
20167 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
20168 * spu-low.c (spu_arch_string): Remove.
20169 (spu_target_ops): Remove arch_string initializer.
20170 * win32-low.c (win32_arch_string): Remove.
20171 (win32_target_ops): Remove arch_string initializer.
20172 * win32-low.h (struct win32_target_ops): Remove arch_string member.
20173 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
20174 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
20175
20176 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20177
20178 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
20179 by collect_ptrace_register and supply_ptrace_register hooks.
20180 * linux-low.c (fetch_register): Use supply_ptrace_register callback
20181 instead of checking for the_low_target.left_pad_xfer.
20182 (usr_store_inferior_registers): Use collect_ptrace_register callback
20183 instead of checking for the_low_target.left_pad_xfer.
20184
20185 * linux-s390-low.c (s390_collect_ptrace_register): New function.
20186 (s390_supply_ptrace_register): Likewise.
20187 (s390_fill_gregset): Call s390_collect_ptrace_register.
20188 (the_low_target): Update.
20189
20190 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
20191 (ppc_supply_ptrace_register): Likewise.
20192 (the_low_target): Update.
20193
20194 * linux-i386-low.c (the_low_target): Update.
20195 * linux-x86-64-low.c (the_low_target): Update.
20196
20197 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20198
20199 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
20200 reg-s390.o and reg-s390x.o.
20201
20202 * linux-low.c (new_inferior): New global variable.
20203 (linux_create_inferior, linux_attach): Set it.
20204 (linux_wait_for_process): Call the_low_target.arch_setup after the
20205 target has stopped for the first time.
20206 (initialize_low): Do not call the_low_target.arch_setup.
20207
20208 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
20209 (s390_set_pc): Likewise.
20210 (s390_arch_setup): New function.
20211 (the_low_target): Use s390_arch_setup as arch_setup routine.
20212
20213 * regcache.c (realloc_register_cache): New function.
20214 (set_register_cache): Call it for each existing regcache.
20215
20216 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20217
20218 * server.h (init_registers): Remove prototype.
20219
20220 * linux-low.h (struct linux_target_ops): Add arch_setup field.
20221 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
20222 instead of init_registers ().
20223 * linux-arm-low.c (init_registers_arm): Add prototype.
20224 (init_registers_arm_with_iwmmxt): Likewise.
20225 (the_low_target): Add initializer for arch_setup field.
20226 * linux-cris-low.c (init_registers_cris): Add prototype.
20227 (the_low_target): Add initializer for arch_setup field.
20228 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
20229 (the_low_target): Add initializer for arch_setup field.
20230 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
20231 (the_low_target): Add initializer for arch_setup field.
20232 * linux-ia64-low.c (init_registers_ia64): Add prototype.
20233 (the_low_target): Add initializer for arch_setup field.
20234 * linux-m32r-low.c (init_registers_m32r): Add prototype.
20235 (the_low_target): Add initializer for arch_setup field.
20236 * linux-m68k-low.c (init_registers_m68k): Add prototype.
20237 (the_low_target): Add initializer for arch_setup field.
20238 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
20239 (init_registers_mips64_linux): Likewise.
20240 (the_low_target): Add initializer for arch_setup field.
20241 * linux-ppc-low.c (init_registers_ppc): Add prototype.
20242 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
20243 (the_low_target): Add initializer for arch_setup field.
20244 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
20245 (init_registers_powerpc_64): Likewise.
20246 (the_low_target): Add initializer for arch_setup field.
20247 * linux-s390-low.c (init_registers_s390): Add prototype.
20248 (init_registers_s390x): Likewise.
20249 (the_low_target): Add initializer for arch_setup field.
20250 * linux-sh-low.c (init_registers_sh): Add prototype.
20251 (the_low_target): Add initializer for arch_setup field.
20252 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
20253 (the_low_target): Add initializer for arch_setup field.
20254 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
20255 (the_low_target): Add initializer for arch_setup field.
20256
20257 * win32-low.h (struct win32_target_ops): Add arch_setup field.
20258 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
20259 instead of init_registers ().
20260 * win32-arm-low.c (init_registers_arm): Add prototype.
20261 (the_low_target): Add initializer for arch_setup field.
20262 * win32-i386-low.c (init_registers_i386): Add prototype.
20263 (the_low_target): Add initializer for arch_setup field.
20264
20265 * spu-low.c (init_registers_spu): Add prototype.
20266 (initialize_low): Call initialie_registers_spu () instead of
20267 initialize_registers ().
20268
20269 2008-02-19 Pedro Alves <pedro@codesourcery.com>
20270
20271 * server.c (handle_v_requests): When handling the vRun and vAttach
20272 packets, if already debugging a process, don't kill it. Return an
20273 error instead.
20274
20275 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
20276
20277 * server.c (handle_query): Correct length check.
20278
20279 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
20280
20281 * win32-low.c (do_initial_child_stuff): Add process handle
20282 parameter. Set current_process_handle and current_process_id from the
20283 parameters. Clear globals.
20284 (win32_create_inferior): Don't set current_process_handle and
20285 current_process_id here. Instead pass them on the call to
20286 do_initial_child_stuff.
20287 (win32_attach): Likewise.
20288 (win32_clear_inferiors): New.
20289 (win32_kill): Don't close the current process handle or the
20290 current thread handle here. Instead call win32_clear_inferiors.
20291 (win32_detach): Don't open a new handle to the process. Call
20292 win32_clear_inferiors.
20293 (win32_join): Don't rely on current_process_handle; open a new
20294 handle using the process id.
20295 (win32_wait): Call win32_clear_inferiors when the inferior process
20296 has exited.
20297
20298 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
20299
20300 * server.c (monitor_show_help): Add "exit".
20301
20302 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
20303
20304 * Makefile.in (SFILES): Add linux-xtensa-low.c.
20305 (clean): Add reg-xtensa.c.
20306 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
20307 * configure.srv (xtensa*-*-linux*) New target.
20308 * linux-xtensa-low.c: New.
20309 * xtensa-xtregs.c: New.
20310
20311 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
20312
20313 * hostio.c: Don't include errno.h.
20314 (errno_to_fileio_errno): Move to hostio-errno.
20315 * hostio.c: (hostio_error): Remove the error parameter. Defer the
20316 error number outputting to the target->hostio_last_error callback.
20317 (hostio_packet_error): Use FILEIO_EINVAL directly.
20318 (handle_open, handle_pread, hostio_error, handle_unlink): Update
20319 calls to hostio_error.
20320 * hostio-errno.c: New.
20321 * server.h (hostio_last_error_from_errno): Declare.
20322 * target.h (target_ops): Add hostio_last_error member.
20323 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
20324 as hostio_last_error handler.
20325 * spu-low.c (spu_target_ops): Likewise.
20326 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
20327 (wince_hostio_last_error): New functions.
20328 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
20329 as hostio_last_error handler.
20330 (win32_target_ops) [!_WIN32_WCE]: Register
20331 hostio_last_error_from_errno as hostio_last_error handler.
20332 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
20333 (hostio-errno.o): New rule.
20334 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
20335 * configure.srv (srv_hostio_err_objs): New variable. Default to
20336 hostio-errno.o.
20337 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
20338 * configure: Regenerate.
20339
20340 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
20341
20342 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
20343 (linux_kill, linux_detach): Clean up the process list.
20344 * remote-utils.c (remote_open): Improve port number parsing.
20345 (putpkt_binary, input_interrupt): Only send interrupts if the target
20346 is running.
20347 * server.c (extended_protocol): Make static.
20348 (attached): Define earlier.
20349 (exit_requested, response_needed, program_argv): New variables.
20350 (target_running): New.
20351 (start_inferior): Clear attached here.
20352 (attach_inferior): Set attached here.
20353 (require_running): Define.
20354 (handle_query): Use require_running and target_running. Implement
20355 "monitor exit".
20356 (handle_v_attach, handle_v_run): New.
20357 (handle_v_requests): Use require_running. Handle vAttach and vRun.
20358 (gdbserver_usage): Update.
20359 (main): Redo argument parsing. Handle --debug and --multi. Handle
20360 --attach along with other options or after the port. Save
20361 program_argv. Support no initial program. Resynchronize
20362 communication with GDB after an error. Handle "monitor exit".
20363 Use require_running and target_running. Always allow the extended
20364 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
20365 restart in extended mode.
20366 * README: Refer to the GDB manual. Update --attach usage.
20367
20368 2007-12-20 Andreas Schwab <schwab@suse.de>
20369
20370 * linux-low.c (STACK_SIZE): Define.
20371 (linux_tracefork_child): Use it. Use __clone2 on ia64.
20372 (linux_test_for_tracefork): Likewise.
20373
20374 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
20375
20376 * linux-low.c (linux_wait_for_event): Update messages. Do not
20377 reinsert auto-delete breakpoints.
20378 * mem-break.c (struct breakpoint): Change return type of handler to
20379 int.
20380 (set_breakpoint_at): Update handler type.
20381 (reinsert_breakpoint_handler): Return 1 instead of calling
20382 delete_breakpoint.
20383 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
20384 setting a new one.
20385 (check_breakpoints): Delete auto-delete breakpoints and return 2.
20386 * mem-break.h (set_breakpoint_at): Update handler type.
20387 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
20388 * win32-low.c (auto_delete_breakpoint): New.
20389 (get_child_debug_event): Use it.
20390
20391 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
20392
20393 * configure.ac: Check for pread and pwrite.
20394 * hostio.c (handle_pread): Fall back to lseek and read.
20395 (handle_pwrite): Fall back to lseek and write.
20396 * config.in, configure: Regenerated.
20397
20398 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
20399
20400 * server.c (myresume): Add own_buf argument.
20401 (main): Update calls.
20402
20403 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
20404
20405 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
20406 * remote-utils.c (remote_open): Do not call disable_async_io.
20407 (block_async_io): Delete.
20408 (unblock_async_io): Make static.
20409 (initialize_async_io): New.
20410 * server.c (handle_v_cont): Handle async I/O here.
20411 (myresume): Likewise. Move other common resume tasks here...
20412 (main): ... from here. Call initialize_async_io. Disable async
20413 I/O before the main loop.
20414 * server.h (initialize_async_io): Declare.
20415 (block_async_io, unblock_async_io): Delete prototypes.
20416 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
20417
20418 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
20419
20420 * remote-utils.c (readchar): Allow binary data in received messages.
20421
20422 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20423
20424 * win32-low.c (attaching): New global.
20425 (win32_create_inferior): Clear the `attaching' global.
20426 (win32_attach): Set the `attaching' global.
20427 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
20428 attaching. Only set a breakpoint at the entry point if not
20429 attaching.
20430
20431 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20432
20433 * server.c (main): Don't report dll events on the initial
20434 connection on attaches.
20435
20436 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20437
20438 * server.c (main): Relax numerical bases supported for the pid of
20439 the --attach command line argument.
20440
20441 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20442
20443 * win32-low.c (win32_attach): Call OpenProcess before
20444 DebugActiveProcess, not after. Add last error output to error
20445 call.
20446
20447 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20448
20449 * win32-low.c (win32_get_thread_context)
20450 (win32_set_thread_context): New functions.
20451 (thread_rec): Use win32_get_thread_context.
20452 (continue_one_thread, win32_resume): Use win32_set_thread_context.
20453 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
20454 field.
20455
20456 2007-12-03 Leo Zayas
20457 Pedro Alves <pedro_alves@portugalmail.pt>
20458
20459 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
20460 global variables.
20461 (child_add_thread): Minor cleanup.
20462 (child_continue): Resume artificially suspended threads before
20463 calling ContinueDebugEvent.
20464 (suspend_one_thread): New.
20465 (fake_breakpoint_event): New.
20466 (get_child_debug_event): Change return type to int. Check here if
20467 gdb sent an interrupt request. If a soft interrupt was requested,
20468 fake a breakpoint event. Return 0 if there is no event to handle,
20469 and 1 otherwise.
20470 (win32_wait): Don't check here if gdb sent an interrupt request.
20471 Ensure there is a valid event to handle.
20472 (win32_request_interrupt): Add soft interruption method as last
20473 resort.
20474
20475 2007-12-03 Leo Zayas
20476 Pedro Alves <pedro_alves@portugalmail.pt>
20477
20478 * win32-low.h (win32_thread_info): Add descriptions to the
20479 structure members. Replace `suspend_count' counter by a
20480 `suspended' flag.
20481 * win32-low.c (thread_rec): Update condition of when to get the
20482 context from the inferior. Rely on ContextFlags being set if it
20483 has already been retrieved. Only suspend the inferior thread if
20484 we haven't already. Warn if that fails.
20485 (continue_one_thread): s/suspend_count/suspended/. Only call
20486 ResumeThread once. Warn if that fails.
20487
20488 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20489
20490 * win32-low.c (win32_wait): Don't read from the inferior when it
20491 has already exited.
20492
20493 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20494
20495 * Makefile.in (win32_low_h): New variable.
20496 (win32-low.o): Add dependency on $(win32_low_h).
20497 (win32-arm-low.o, win32-i386-low.o): New rules.
20498
20499 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20500
20501 * hostio.c: Correct copyright year.
20502
20503 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20504
20505 * Makefile.in (OBS): Add hostio.o.
20506 (hostio.o): New rule.
20507 * server.h (handle_vFile): Declare.
20508 * hostio.c: New file.
20509 * server.c (handle_v_requests): Take packet_len and new_packet_len
20510 for binary packets. Call handle_vFile.
20511 (main): Update call to handle_v_requests.
20512
20513 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
20514
20515 * linux-low.c: Include <sched.h>.
20516
20517 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
20518
20519 * linux-low.c (linux_tracefork_grandchild): New.
20520 (linux_tracefork_child): Use clone.
20521 (linux_test_for_tracefork): Use clone; allocate and free a stack.
20522
20523 2007-10-31 Joel Brobecker <brobecker@adacore.com>
20524
20525 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
20526
20527 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
20528
20529 * linux-low.c (handle_extended_wait): Handle unexpected signals.
20530
20531 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
20532
20533 * inferiors.c (change_inferior_id): Delete.
20534 (add_pid_to_list, pull_pid_from_list): New.
20535 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
20536 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
20537 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
20538 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
20539 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
20540 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
20541 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
20542 (using_threads): Always set to 1.
20543 (handle_extended_wait): New.
20544 (add_process): Do not set TID.
20545 (linux_create_inferior): Set must_set_ptrace_flags.
20546 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
20547 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
20548 (linux_thread_alive): Rename TID argument to LWPID.
20549 (linux_wait_for_process): Handle unknown processes. Do not use TID.
20550 (linux_wait_for_event): Do not use TID or check using_threads. Update
20551 call to dead_thread_notify. Call handle_extended_wait.
20552 (linux_create_inferior): Use PTRACE_SETOPTIONS.
20553 (send_sigstop): Delete sigstop_sent.
20554 (wait_for_sigstop): Avoid TID.
20555 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
20556 (linux_test_for_tracefork): New.
20557 (linux_lookup_signals): Use thread_db_active and
20558 linux_supports_tracefork_flag.
20559 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
20560 * linux-low.h (get_process_thread): Avoid TID.
20561 (struct process_ifo): Move thread_known and tid to the end. Remove
20562 sigstop_sent.
20563 (linux_attach_lwp, thread_db_init): Update prototypes.
20564 * server.h (change_inferior_id): Delete prototype.
20565 (add_pid_to_list, pull_pid_from_list): New prototypes.
20566 * thread-db.c (thread_db_use_events): New.
20567 (find_first_thread): Rename to...
20568 (find_one_thread): ...this. Update callers and messages. Do not
20569 call fatal. Check thread_db_use_events. Do not call
20570 change_inferior_id or new_thread_notify.
20571 (maybe_attach_thread): Update. Do not call new_thread_notify.
20572 (thread_db_init): Set thread_db_use_events. Check use_events.
20573 * utils.c (fatal, warning): Correct message prefix.
20574
20575 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
20576
20577 * Makefile.in (clean): Remove new files.
20578 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
20579 (powerpc-64.o, powerpc-64.c): New rules.
20580 * configure.srv: Use alternate register sets for powerpc64-*-linux*
20581 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
20582 with SPE.
20583 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
20584 SPE targets.
20585 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
20586 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
20587 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
20588 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
20589 (target_regsets): Add AltiVec and SPE register sets.
20590 * configure.ac: Check for AltiVec and SPE.
20591 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
20592 (ppc_fill_vrregset, ppc_store_vrregset): New.
20593 (target_regsets): Add AltiVec register set.
20594 * configure: Regenerated.
20595
20596 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
20597
20598 * linux-low.c (O_LARGEFILE): Define.
20599 (linux_read_memory): Use /proc/PID/mem.
20600 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
20601 * configure, config.in: Regenerated.
20602
20603 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
20604
20605 * linux-low.c (linux_wait_for_event): Do not pass signals while
20606 single-stepping.
20607
20608 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20609
20610 * win32-low.c (create_process): New.
20611 (win32_create_inferior): Use create_process instead of
20612 CreateProcess. If create_process failed retry appending an ".exe"
20613 suffix. Store the GetLastError result immediatelly after
20614 create_process calls and use it on the call to error.
20615
20616 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20617
20618 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
20619
20620 2007-08-23 Joel Brobecker <brobecker@adacore.com>
20621
20622 * configure.ac: Switch license to GPLv3.
20623
20624 2007-08-01 Michael Snyder <msnyder@access-company.com>
20625
20626 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
20627
20628 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
20629
20630 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
20631 typedef.
20632 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
20633 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
20634 CloseToolhelp32Snapshot.
20635 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
20636 CloseToolhelp32Snapshot.
20637
20638 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
20639
20640 * server.c (main): Check for inferior exit before main loop.
20641
20642 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
20643
20644 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
20645 instead of on tmp_desc.
20646
20647 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
20648 Daniel Jacobowitz <dan@codesourcery.com>
20649
20650 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
20651 (add_thread): Minor cleanups.
20652 (clear_inferiors): Move lower in the file. Clear the DLL
20653 list.
20654 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
20655 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
20656 (xml_escape_text): New.
20657 * server.c (handle_query): Handle qXfer:libraries:read. Report it
20658 for qSupported.
20659 (handle_v_cont): Report errors.
20660 (gdbserver_version): Update.
20661 (main): Correct size of own_buf. Do not report initial DLL events.
20662 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
20663 (unloaded_dll, xml_escape_text): New.
20664 * win32-low.c (enum target_waitkind): Update comments.
20665 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
20666 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
20667 (win32_EnumProcessModules, win32_GetModuleInformation)
20668 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
20669 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
20670 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
20671 (win32_Module32First, win32_Module32Next, load_toolhelp)
20672 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
20673 (get_child_debug_event): Handle DLL events.
20674 (win32_wait): Likewise.
20675
20676 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
20677
20678 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
20679 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
20680
20681 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20682
20683 * win32-low.c (handle_output_debug_string): Ignore event if not
20684 waiting.
20685
20686 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20687
20688 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
20689
20690 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
20691
20692 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
20693
20694 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
20695
20696 * inferiors.c (change_inferior_id): Add comment.
20697 * linux-low.c (check_removed_breakpoint): Add an early
20698 prototype. Improve debug output.
20699 (linux_attach): Doc update.
20700 (linux_detach_one_process, linux_detach): Clean up before releasing
20701 each process.
20702 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
20703 * linux-low.h (struct process_info): Doc improvement.
20704 * mem-break.c (delete_all_breakpoints): New.
20705 * mem-break.h (delete_all_breakpoints): New prototype.
20706 * thread-db.c (find_first_thread): New.
20707 (thread_db_create_event): Call it instead of
20708 thread_db_find_new_threads. Clean up unused variables.
20709 (maybe_attach_thread): Remove first thread handling.
20710 (thread_db_find_new_threads): Use find_first_thread.
20711 (thread_db_get_tls_address): Likewise.
20712
20713 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
20714
20715 * thread-db.c (thread_db_find_new_threads): Add prototype.
20716 (thread_db_create_event): Check for the main thread before adding
20717 a new thread.
20718 (maybe_attach_thread): Only enable event reporting if TID == 0.
20719 (thread_db_get_tls_address): Check for new threads.
20720
20721 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
20722
20723 * linux-low.c (linux_create_inferior): Try execv before execvp.
20724 * spu-low.c (spu_create_inferior): Likewise.
20725
20726 2007-06-13 Mike Frysinger <vapier@gentoo.org>
20727
20728 * linux-low.c (linux_create_inferior): Change execv to execvp.
20729 * spu-low.c (spu_create_inferior): Likewies.
20730
20731 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
20732
20733 * Makefile.in (clean): Clean new files instead of deleted ones.
20734 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
20735 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
20736 rules.
20737 * configure.srv: Specify XML files and new regformats for MIPS and
20738 MIPS64 GNU/Linux.
20739 * linux-mips-low.c (mips_num_regs): Set to only used registers.
20740 (mips_regmap): Do not fetch $0. Remove unused registers. Add
20741 an entry for the restart register.
20742 (mips_cannot_fetch_register, mips_cannot_store_register)
20743 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
20744 register names to match the XML descriptions.
20745 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
20746 restart register instead of $0.
20747
20748 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20749 Markus Deuling <deuling@de.ibm.com>
20750
20751 * remote-utils.c (decode_xfer_write): New function.
20752 * server.h (decode_xfer_write): Add prototype.
20753 * server.c (handle_query): Add PACKET_LEN argument. Support
20754 qXfer:spu:read and qXfer:spu:write packets.
20755 (main): Pass packet_len to handle_query.
20756 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
20757 * target.h (target_ops): Add qxfer_spu.
20758
20759 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20760
20761 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
20762 accessing non-seekable spufs files.
20763
20764 2007-05-16 Markus Deuling <deuling@de.ibm.com>
20765
20766 * server.c (handle_query): Add reply for qC packet.
20767
20768 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20769 Leo Zayas <lerele@champenstudios@com>
20770
20771 * server.h (check_remote_input_interrupt_request): New function.
20772 * remote_utils.c (INVALID_DESCRIPTOR): New define.
20773 (remote_desc): Initialize with INVALID_DESCRIPTOR.
20774 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
20775 (check_remote_input_interrupt_request): New function.
20776 * server.h (check_remote_input_interrupt_request): Declare.
20777 * win32-low.c (winapi_DebugBreakProcess,
20778 winapi_GenerateConsoleCtrlEvent): New typedefs.
20779 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
20780 to 250 ms.
20781 (win32_wait): Check for remote interrupt request
20782 with check_remote_input_interrupt_request.
20783 (win32_request_interrupt): New function.
20784 (win32_target_op): Set request_interrupt to win32_request_interrupt.
20785
20786 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20787
20788 * win32-low.c (debug_registers_changed,
20789 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
20790 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
20791 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
20792 (thread_rec): Get context using the low target.
20793 (child_add_thread): Call thread_added on the low target,
20794 which does the same thing.
20795 (regptr): Delete.
20796 (do_initial_child_stuff): Remove debug registers references.
20797 Set context using the low target. Resume threads after
20798 setting the contexts.
20799 (child_continue): Remove dead variable. Remove debug
20800 registers references.
20801 (child_fetch_inferior_registers): Go through the low target.
20802 (do_child_store_inferior_registers): Remove.
20803 (child_store_inferior_registers): Go through the low target.
20804 (win32_resume): Remove debug registers references.
20805 Set context using the low target.
20806 (handle_exception): Change return type to void. Don't record
20807 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
20808 first chance exception.
20809 (get_child_debug_event): Change return type to void. Remove
20810 goto loop. Always return after waiting for debug event.
20811 (win32_wait): Convert to switch statement. Handle spurious
20812 events.
20813
20814 * win32-i386-low.c (debug_registers_changed,
20815 debug_registers_used): New.
20816 (initial_stuff): Rename to ...
20817 (i386_initial_stuff): ... this. Clear debug registers
20818 state variables.
20819 (store_debug_registers): Delete.
20820 (i386_get_thread_context): New.
20821 (load_debug_registers): Delete.
20822 (i386_set_thread_context): New.
20823 (i386_thread_added): New.
20824 (single_step): Rename to ...
20825 (i386_single_step): ... this.
20826 (do_fetch_inferior_registers): Rename to ...
20827 (i386_fetch_inferior_register): ... this.
20828 (i386_store_inferior_register): New.
20829 (the_low_target): Adapt to new interface.
20830
20831 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
20832 (arm_get_thread_context): New.
20833 (arm_set_thread_context): New.
20834 (regptr): New.
20835 (do_fetch_inferior_registers): Rename to ...
20836 (arm_fetch_inferior_register): ... this.
20837 (arm_store_inferior_register): New.
20838 (arm_wince_breakpoint): Reimplement as unsigned long.
20839 (arm_wince_breakpoint_len): Define.
20840 (the_low_target): Adapt to new interface.
20841
20842 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
20843 load_debug_registers. Add get_thread_context, set_thread_context,
20844 thread_added and store_inferior_register. Rename
20845 fetch_inferior_registers to fetch_inferior_register.
20846 (regptr): Remove declaration.
20847
20848 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20849
20850 * linux-low.c (linux_detach): Change return type to int. Return 0.
20851 * spu-low.c (spu_detach): Likewise.
20852
20853 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20854
20855 * target.h (target_ops): Change return type of detach to int.
20856 Add join.
20857 (join_inferior): New.
20858 * server.c (main): Don't skip detach support on mingw32.
20859 If the inferior doesn't support detaching return error.
20860 Call join_inferior instead of using waitpid.
20861 * linux-low.c (linux_join): New.
20862 (linux_target_op): Add linux_join.
20863 * spu-low.c (spu_join): New.
20864 (spu_target_ops): Add spu_join.
20865 * win32-low.c (win32_detach): Adapt to new interface.
20866 Reopen current_process_handle before detaching. Issue a child
20867 resume before detaching.
20868 (win32_join): New.
20869 (win32_target_op): Add win32_join.
20870
20871 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20872
20873 * win32-low.c (win32-attach): Fix return value.
20874 * target.h (target_ops): Describe ATTACH return values.
20875
20876 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20877
20878 * win32-low.c (GETPROCADDRESS): Define.
20879 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
20880 (winapi_DebugSetProcessKillOnExit): Likewise.
20881 (win32_create_inferior): Force usage of ansi CreateProcessA.
20882 (win32_attach): Use GETPROCADDRESS.
20883 (win32_detach): Likewise.
20884
20885 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20886
20887 * win32-low.c (win32_wait): Don't use WSTOPSIG.
20888
20889 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
20890
20891 * win32-low.c: Commit leftover changes from 2007-03-29.
20892
20893 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20894
20895 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
20896 fields short instead of int. Add explicit padding.
20897 (i387_cache_to_fsave): Remove unnecessary casts.
20898 (i387_fsave_to_cache): Doc fix.
20899 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
20900
20901 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20902
20903 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
20904 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
20905
20906 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20907
20908 * configure.srv (arm*-*-mingw32ce*): Move near the other
20909 arm targets.
20910
20911 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20912
20913 * configure.ac: Add errno checking.
20914 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
20915 sys/file.h and malloc.h.
20916 (AC_CHECK_DECLS): Add perror.
20917 (srv_mingwce): Handle.
20918 * configure.srv (i[34567]86-*-cygwin*): Add
20919 win32-i386-low.o to srv_tgtobj.
20920 (i[34567]86-*-mingw*): Likewise.
20921 (arm*-*-mingw32ce*): Add case.
20922 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20923 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
20924 [__MINGW32CE__] (strerror): New function.
20925 [__MINGW32CE__] (errno): Define to GetLastError.
20926 [__MINGW32CE__] (COUNTOF): New macro.
20927 (remote_open): Remove extra close call.
20928 * mem-break.c (delete_breakpoint_at): New function.
20929 * mem-break.h (delete_breakpoint_at): Declare.
20930 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20931 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
20932 [USE_WIN32API] (read, write): Add char* casts.
20933 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
20934 * server.h: Include wincecompat.h on Windows CE.
20935 [HAVE_ERRNO_H]: Check.
20936 (perror): Declare if not declared.
20937 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
20938 (perror_with_name): Remove errno declaration.
20939 * wincecompat.h: New.
20940 * wincecompat.c: New.
20941 * win32-low.h: New.
20942 * win32-arm-low.c: New.
20943 * win32-i386-low.c: New.
20944 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
20945 (OUTMSG2): Make it safe.
20946 (_T): New macro.
20947 (COUNTOF): New macro.
20948 (NUM_REGS): Get it from the low target.
20949 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
20950 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
20951 (thread_rec): Let low target handle debug registers.
20952 (child_add_thread): Likewise.
20953 (child_init_thread_list): Likewise.
20954 (continue_one_thread): Likewise.
20955 (regptr): New.
20956 (do_child_fetch_inferior_registers): Move to ...
20957 * win32-i386-low.c: ... here, and rename to ...
20958 (do_fetch_inferior_registers): ... this.
20959 * win32-low.c (child_fetch_inferior_registers):
20960 Go through the low target.
20961 (do_child_store_inferior_registers): Use regptr.
20962 (strwinerror): New function.
20963 (win32_create_inferior): Handle Windows CE.
20964 Use strwinerror instead of strerror on Windows error
20965 codes. Add program to the error output.
20966 Don't close the main thread handle on Windows CE.
20967 (win32_attach): Use coredll.dll on Windows CE.
20968 (win32_kill): Close current process and current
20969 thread handles.
20970 (win32_detach): Use coredll.dll on Windows CE.
20971 (win32_resume): Let low target handle debug registers, and
20972 step request.
20973 (handle_exception): Add/Remove initial breakpoint. Avoid
20974 non-existant WSTOPSIG on Windows CE.
20975 (win32_read_inferior_memory): Cast to remove warning.
20976 (win32_arch_string): Go through the low target.
20977 (initialize_low): Call set_breakpoint_data with the low
20978 target's breakpoint.
20979 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
20980 FOP_REGNUM, mappings): Move to ...
20981 * win32-i386-low.c: ... here.
20982 * win32-low.c (win32_thread_info): Move to ...
20983 * win32-low.h: ... here.
20984 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
20985 win32-arm-low.c and wincecompat.c.
20986 (all:): Add $EXEEXT.
20987 (install-only:): Likewise.
20988 (gdbserver:): Likewise.
20989 (gdbreplay:): Likewise.
20990 * config.in: Regenerate.
20991 * configure: Regenerate.
20992
20993 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
20994
20995 * win32-low.c: Rename typedef thread_info to
20996 win32_thread_info throughout.
20997
20998 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
20999
21000 * win32-i386-low.c: Rename to ...
21001 * win32-low.c: ... this.
21002 * configure.srv: Replace win32-i386-low.o with win32-low.o.
21003 * Makefile.in: Likewise.
21004
21005 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
21006
21007 * remote-utils.c (monitor_output): Constify msg parameter.
21008 * server.h (monitor_output): Likewise.
21009 * win32-i386-low.c (handle_output_debug_string): New.
21010 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
21011 handle_output_debug_string.
21012 (get_child_debug_event): Likewise.
21013
21014 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
21015
21016 * server.c (main): Correct strtoul check.
21017
21018 2007-03-27 Jon Ringle <jon@ringle.org>
21019
21020 * linux-low.c: Check __ARCH_HAS_MMU__ also.
21021
21022 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
21023
21024 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
21025
21026 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
21027
21028 * terminal.h: Check HAVE_SGTTY_H.
21029
21030 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
21031
21032 * remote-utils.c (remote_open): Print out the assigned port number.
21033
21034 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
21035
21036 * remote-utils.c (monitor_output): New function.
21037 * server.c (debug_threads): Define here.
21038 (monitor_show_help): New function.
21039 (handle_query): Handle qRcmd.
21040 (main): Do not handle 'd' packet.
21041 * server.h (debug_threads, remote_debug, monitor_output): Declare.
21042 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
21043 of debug_threads.
21044
21045 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21046
21047 * Makefile.in (EXEEXT): New.
21048 (clean): Use $(EXEEXT).
21049
21050 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21051
21052 * target.h (target_ops): Rename send_signal to request_interrupt,
21053 and remove enum target_signal parameter.
21054 * linux-low.c (linux_request_interrupt): Rename from
21055 linux_send_signal, and always send SIGINT.
21056 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
21057 and always send SIGINT.
21058 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
21059 of send_signal.
21060 (input_interrupt): Likewise.
21061
21062 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21063
21064 * server.c (get_features_xml): Check if target implemented
21065 arch_string.
21066 * win32-i386-low.c (win32_arch_string): New.
21067 (win32_target_ops): Add win32_arch_string as arch_string member.
21068
21069 2007-02-22 Markus Deuling <deuling@de.ibm.com>
21070
21071 * spu-low.c (spu_arch_string): New.
21072 (spu_target_ops): Add spu_arch_string.
21073
21074 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
21075
21076 * remote-utils.c: Remove HAVE_TERMINAL_H check.
21077 * configure.ac: Do not check for terminal.h.
21078 * configure, config.in: Regenerated.
21079
21080 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
21081
21082 * Makefile.in (OBS): Add $(XML_BUILTIN).
21083 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
21084 (clean): Update.
21085 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
21086 (arm-with-iwmmxt.c): New.
21087 * config.in, configure: Regenerate.
21088 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
21089 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
21090 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
21091 (arm*-*-linux*): Add iWMMXt and regset support.
21092 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
21093 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
21094 (arm_store_wmmxregset, target_regsets): New.
21095 * server.c (get_features_xml): Take annex argument. Check builtin
21096 XML documents.
21097 (handle_query): Handle multiple annexes.
21098
21099 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
21100
21101 * remote-utils.c [USE_WIN32API] (read, write): Define.
21102 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
21103 write.
21104
21105 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
21106
21107 * linux-i386-low.c (the_low_target): Set arch_string.
21108 * linux-x86-64-low.c (the_low_target): Likewise.
21109 * linux-low.c (linux_arch_string): New.
21110 (linux_target_ops): Add it.
21111 * linux-low.h (struct linux_target_ops): Add arch_string.
21112 * server.c (write_qxfer_response): Use const void * for DATA.
21113 (get_features_xml): New.
21114 (handle_query): Handle qXfer:features:read. Report it for qSupported.
21115 * target.h (struct target_ops): Add arch_string method.
21116
21117 2007-01-03 Denis Pilat <denis.pilat@st.com>
21118 Daniel Jacobowitz <dan@codesourcery.com>
21119
21120 * linux-low.c (linux_kill): Handle being called with no threads.
21121 * win32-i386-low.c (win32_kill): Likewise.
21122 (get_child_debug_event): Clear current_process_handle.
21123
21124 2006-12-30 Denis PILAT <denis.pilat@st.com>
21125 Daniel Jacobowitz <dan@codesourcery.com>
21126
21127 * remote-utils.c (remote_open): Check the type of specified
21128 serial port devices before opening them.
21129 * server.c (main): Kill the inferior if an error occurs during
21130 the first remote_open.
21131
21132 2006-12-05 Markus Deuling <deuling@de.ibm.com>
21133
21134 * README: Update supported targets.
21135
21136 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
21137
21138 * Makefile.in (clean): Remove reg-mips64.c.
21139 (reg-mips64.c, reg-mips64.o): New rules.
21140 * configure.srv: Handle mips64. Include regset support for mips.
21141 * linux-mips-low.c (union mips_register): New.
21142 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
21143 (mips_breakpoint, mips_breakpoint_at): Use int.
21144 (mips_collect_register, mips_supply_register)
21145 (mips_collect_register_32bit, mips_supply_register_32bit)
21146 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
21147 (mips_store_fpregset, target_regsets): New.
21148 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
21149
21150 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
21151
21152 * configure.srv: Add target "spu*-*-*".
21153 * Makefile.in (clean): Remove reg-spu.c.
21154 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
21155 * spu-low.c: New file.
21156
21157 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
21158
21159 * configure.ac: Correct td_thr_tls_get_addr test.
21160 * configure: Regenerated.
21161
21162 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
21163
21164 * linux-low.c (linux_wait_for_event): Reformat. Use the
21165 pass_signals array.
21166 * remote-utils.c (decode_address_to_semicolon): New.
21167 * server.c (pass_signals, handle_general_set): New.
21168 (handle_query): Mention QPassSignals for qSupported.
21169 (main): Call handle_general_set.
21170 * server.h (pass_signals, decode_address_to_semicolon): New.
21171
21172 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
21173
21174 * server.c (handle_query): Correct error handling for read_auxv.
21175
21176 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
21177
21178 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
21179 and srv_linux_thread_db to yes.
21180 * linux-s390-low.c (s390_fill_gregset): New function.
21181 (target_regsets): Define data structure.
21182
21183 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
21184
21185 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
21186 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
21187 * config.in, configure: Regenerated.
21188 * inferiors.c (gdb_id_to_thread): New function.
21189 (gdb_id_to_thread_id): Use it.
21190 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
21191 * linux-low.h (struct process_info): Add th member.
21192 (thread_db_get_tls_address): New prototype.
21193 * remote-utils.c (decode_address): Make non-static.
21194 * server.c (handle_query): Handle qGetTLSAddr.
21195 * server.h (gdb_id_to_thread, decode_address): New prototypes.
21196 * target.h (struct target_ops): Add get_tls_address.
21197 * thread-db.c (maybe_attach_thread): Save the thread handle.
21198 (thread_db_get_tls_address): New.
21199
21200 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
21201
21202 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
21203 (linux_resume_one_process): Take a siginfo_t *. Update all
21204 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
21205 (struct pending_signals): Add a siginfo_t.
21206 (linux_wait_for_process): Always set last_status.
21207 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
21208 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
21209 * linux-low.h (struct process_info): Add last_status.
21210
21211 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
21212
21213 * remote-utils.c (try_rle): New function.
21214 (putpkt_binary): Use it.
21215
21216 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
21217
21218 * Makefile.in (clean): Clean reg-x86-64-linux.c.
21219 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
21220 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
21221 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
21222 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
21223 point registers.
21224
21225 2006-08-08 Richard Sandiford <richard@codesourcery.com>
21226
21227 * server.c (terminal_fd): New variable.
21228 (old_foreground_pgrp): Likewise.
21229 (restore_old_foreground_pgrp): New function.
21230 (start_inferior): Record the terminal file descriptor in terminal_fd
21231 and its original foreground group in old_foreground_pgrp. Register
21232 restore_old_foreground_pgrp with atexit().
21233
21234 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
21235
21236 * server.c (handle_query): Correct qPart to qXfer.
21237
21238 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
21239
21240 * configure.ac: Check for more headers which are missing on
21241 Windows. Automatically supply -lwsock32 and USE_WIN32API.
21242 * configure.srv: Add Cygwin and mingw32.
21243 * remote-utils.c: Don't include headers unconditionally which
21244 are missing on mingw32. Include <winsock.h> for mingw32.
21245 (remote_open): Adjust for mingw32 support. Flush
21246 standard error after writing to it.
21247 (remote_close, putpkt_binary, input_interrupt, block_async_io)
21248 (unblock_async_io, enable_async_io, disable_async_io)
21249 (readchar, getpkt): Update for Winsock support.
21250 (prepare_resume_reply): Expect a protocol signal number.
21251 * server.c: Disable <sys/wait.h> on mingw32.
21252 (start_inferior): Adjust for mingw32 support. Flush
21253 standard error after writing to it.
21254 (attach_inferior): Likewise. Use protocol signal
21255 numbers.
21256 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
21257 and names.
21258 * win32-i386-low.c: New file.
21259 * Makefile.in (XM_CLIBS): Set.
21260 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
21261 (win32-i386-low.o): New dependency rule.
21262 * linux-low.c (linux_wait): Use target signal numbers.
21263 * target.h (struct target_ops): Doc fix.
21264 * server.h (target_signal_to_name): New prototype.
21265 * gdbreplay.c: Don't include headers unconditionally which
21266 are missing on mingw32. Include <winsock.h> for mingw32.
21267 (remote_close, remote_open): Adjust for Winsock support.
21268 * configure, config.in: Regenerated.
21269
21270 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
21271
21272 * server.c (decode_xfer_read, write_qxfer_response): New.
21273 (handle_query): Take a packet length argument. Handle
21274 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
21275 the qSupported response.
21276 (main): Update call to handle_query.
21277
21278 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
21279
21280 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
21281 (putpkt_binary): Renamed from putpkt and adjusted for binary
21282 data.
21283 (putpkt): New wrapper for putpkt_binary.
21284 (readchar): Don't mask off the high bit.
21285 (decode_X_packet): New function.
21286 * server.c (main): Call putpkt_binary if a handler sets the packet
21287 length. Save the length of the incoming packet. Handle 'X'.
21288 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
21289
21290 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
21291
21292 * server.c (handle_query): Handle qSupported.
21293
21294 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21295
21296 * remote-utils.c (all_symbols_looked_up): New variable.
21297 (look_up_one_symbol): Check it.
21298 * server.h (look_up_one_symbol): New declaration.
21299 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
21300
21301 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21302
21303 * Makefile.in (linux-arm-low.o): Update dependencies.
21304 * linux-arm-low.c: Include "gdb_proc_service.h".
21305 (PTRACE_GET_THREAD_AREA): Define.
21306 (ps_get_thread_area): New function.
21307
21308 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
21309
21310 * configure.srv (m68k*-*-uclinux*): New target.
21311 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
21312 (linux_resume_one_process): Remove extraneous cast.
21313 (linux_read_offsets): New.
21314 (linux_target_op): Add linux_read_offsets on mmuless systems.
21315 * server.c (handle_query): Add qOffsets logic.
21316 * target.h (struct target_ops): Add read_offsets.
21317
21318 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21319
21320 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
21321 (PTRACE_GET_THREAD_AREA): Define.
21322 (ps_get_thread_area): New function.
21323 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
21324 (linux-x86-64-low.o): Update.
21325
21326 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21327
21328 * configure.ac: Remove checks for prfpregset_t.
21329 * gdb_proc_service.h: New file.
21330 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
21331 new "gdb_proc_service.h".
21332 * proc-service.c: Likewise.
21333 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
21334 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
21335 * Makefile.in (gdb_proc_service_h): Updated.
21336 * configure, config.in: Regenerated.
21337
21338 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21339
21340 * remote-utils.c (prepare_resume_reply): Move declaration
21341 of gdb_id_from_wait to the top of the block.
21342
21343 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
21344
21345 * linux-low.c (regsets_store_inferior_registers): Read the regset
21346 from the target before filling it.
21347
21348 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
21349
21350 * server.c (attach_inferior): Return SIGTRAP for a successful
21351 attach.
21352
21353 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
21354
21355 * Makefile.in (OBS): Add version.o.
21356 (STAGESTUFF): Delete.
21357 (version.o): Add dependencies.
21358 (version.c): Replace rule.
21359 (clean): Remove version.c.
21360 * server.c (gdbserver_version): New.
21361 (gdbserver_usage): Use printf.
21362 (main): Handle --version and --help.
21363 * server.h (version, host_name): Add declarations.
21364
21365 2005-12-23 Eli Zaretskii <eliz@gnu.org>
21366
21367 * linux-arm-low.c:
21368 * linux-arm-low.c:
21369 * inferiors.c:
21370 * i387-fp.h:
21371 * i387-fp.c:
21372 * gdbreplay.c:
21373 * regcache.c:
21374 * proc-service.c:
21375 * mem-break.h:
21376 * mem-break.c:
21377 * linux-x86-64-low.c:
21378 * linux-sh-low.c:
21379 * linux-s390-low.c:
21380 * linux-ppc64-low.c:
21381 * linux-ppc-low.c:
21382 * linux-mips-low.c:
21383 * linux-m68k-low.c:
21384 * linux-m32r-low.c:
21385 * linux-low.h:
21386 * linux-low.c:
21387 * linux-ia64-low.c:
21388 * linux-i386-low.c:
21389 * linux-crisv32-low.c:
21390 * thread-db.c:
21391 * terminal.h:
21392 * target.h:
21393 * target.c:
21394 * server.h:
21395 * server.c:
21396 * remote-utils.c:
21397 * regcache.h:
21398 * utils.c:
21399 * Makefile.in:
21400 * configure.ac:
21401 * gdbserver.1: Add (C) after Copyright. Update the FSF
21402 address.
21403
21404 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
21405
21406 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
21407 (arm_breakpoint_at): Recognize both breakpoints.
21408 (the_low_target): Use the correct breakpoint instruction.
21409
21410 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
21411
21412 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
21413 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
21414 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
21415 (the_low_target): Update.
21416
21417 2005-10-25 Andreas Schwab <schwab@suse.de>
21418
21419 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
21420
21421 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
21422 (ia64_num_regs): Reduce to 462.
21423
21424 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
21425
21426 * acinclude.m4: Correct quoting.
21427 * aclocal.m4: Regenerated.
21428
21429 Suggested by SZOKOVACS Robert <szo@ies.hu>:
21430 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
21431 (thread_db_init): Call thread_db_err_str.
21432 * configure.ac: Check for TD_VERSION.
21433 * config.in, configure: Regenerated.
21434
21435 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21436
21437 * server.h (error, fatal, warning): Add ATTR_FORMAT.
21438
21439 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21440
21441 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
21442 is not available. Define HAVE_PTRACE_GETREGS if it is.
21443 * config.in, configure: Regenerated.
21444 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
21445 * linux-i386-low.c, linux-m68k-low.c: Update to use
21446 HAVE_PTRACE_GETREGS.
21447 * linux-low.c (regsets_fetch_inferior_registers)
21448 (regsets_store_inferior_registers): Only return 0 if we processed
21449 GENERAL_REGS.
21450 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
21451 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
21452
21453 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21454
21455 * inferiors.c (struct thread_info): Add gdb_id.
21456 (add_thread): Add gdb_id argument.
21457 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
21458 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
21459 calls to add_thread.
21460 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
21461 * server.c (handle_query): Use thread_to_gdb_id.
21462 (handle_v_cont, main): Use gdb_id_to_thread_id.
21463 * server.h (add_thread): Update prototype.
21464 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
21465 prototypes.
21466
21467 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21468
21469 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
21470 left-padded registers.
21471 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
21472 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
21473
21474 2005-07-01 Steve Ellcey <sje@cup.hp.com>
21475
21476 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
21477 * configure: Regenerate.
21478 * config.in: Regenerate.
21479 * server.h (NEED_DECLARATION_STRERROR):
21480 Replace with !HAVE_DECL_STRERROR.
21481
21482 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
21483
21484 * linux-low.c (linux_wait, linux_send_signal): Don't test
21485 an unsigned long variable for > 0 if it could be MAX_ULONG.
21486 * server.c (myresume): Likewise.
21487 * target.c (set_desired_inferior): Likewise.
21488
21489 2005-06-13 Mark Kettenis <kettenis@gnu.org>
21490
21491 * configure.ac: Simplify and improve check for socklen_t.
21492 * configure, config.in: Regenerate.
21493
21494 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
21495
21496 * acconfig.h: Remove.
21497 * configure.ac: Add a test for socklen_t. Use three-argument
21498 AC_DEFINE throughout.
21499 * config.in: Regenerated using autoheader 2.59.
21500 * configure: Regenerated.
21501
21502 * gdbreplay.c (socklen_t): Provide a default.
21503 (remote_open): Use socklen_t.
21504 * remote-utils.c (socklen_t): Provide a default.
21505 (remote_open): Use socklen_t.
21506 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
21507 unsigned char.
21508
21509 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
21510 char for buffers.
21511 * linux-low.c (linux_read_memory, linux_write_memory)
21512 (linux_read_auxv): Likewise.
21513 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
21514 (check_mem_write): Likewise.
21515 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
21516 Likewise.
21517 * regcache.c (struct inferior_rgcache_data, registers_to_string)
21518 (registers_from_string, register_data): Likewise.
21519 * server.c (handle_query, main): Likewise.
21520 * server.h (convert_ascii_to_int, convert_int_to_ascii)
21521 (decode_M_packet): Likewise.
21522 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
21523 * target.h (struct target_ops): Update read_memory, write_memory,
21524 and read_auxv.
21525 (read_inferior_memory, write_inferior_memory): Update.
21526 * linux-low.h (struct linux_target_ops): Change type of breakpoint
21527 to unsigned char *.
21528 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
21529 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
21530 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
21531 linux-s390-low.c, linux-sh-low.c: Update for changes in
21532 read_inferior_memory and the_low_target->breakpoint.
21533
21534 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
21535
21536 * Makefile.in (SFILES): Add linux-ppc64-low.c.
21537 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
21538 * configure.srv: Add powerpc64-*-linux*.
21539 * linux-ppc64-low.c: New file.
21540
21541 2005-05-23 Orjan Friberg <orjanf@axis.com>
21542
21543 * linux-cris-low.c: New file with support for CRIS.
21544 * linux-crisv32-low.c: Ditto for CRISv32.
21545 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
21546 (clean): Add reg-cris.c and reg-crisv32.c.
21547 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
21548 reg-crisv32.o, and reg-crisv32.c to make rules.
21549 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
21550 recognized targets.
21551
21552 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
21553
21554 * linux-low.c (fetch_register): Ensure buffer size is a multiple
21555 of sizeof (PTRACE_XFER_TYPE).
21556 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
21557
21558 2005-05-12 Orjan Friberg <orjanf@axis.com>
21559
21560 * target.h (struct target_ops): Add insert_watchpoint,
21561 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
21562 pointers for hardware watchpoint support.
21563 * linux-low.h (struct linux_target_ops): Ditto.
21564 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
21565 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
21566 to linux_target_ops.
21567 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
21568 reply packet.
21569 * server.c (main): Recognize 'Z' and 'z' packets.
21570
21571 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
21572
21573 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
21574 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
21575 (the_low_target): Add new members.
21576
21577 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21578
21579 * proc-service.c (ps_lgetregs): Search all_processes instead of
21580 all_threads.
21581
21582 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21583
21584 * server.c (start_inferior): Change return type to int.
21585 (attach_inferior): Change sigptr to int *.
21586 (handle_v_cont, handle_v_requests): Change signal to int *.
21587 (main): Change signal to int.
21588
21589 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
21590
21591 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
21592 * configure.srv: Add m32r*-*-linux*.
21593 * linux-m32r-low.c: New file.
21594
21595 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
21596
21597 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
21598
21599 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21600
21601 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
21602 Take unsigned long arguments for PIDs.
21603 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
21604 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
21605 (wait_for_sigstop, linux_resume_one_process)
21606 (regsets_fetch_inferior_registers, linux_send_signal)
21607 (linux_read_auxv): Likewise. Update the types of variables holding
21608 PIDs. Update format string specifiers.
21609 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
21610 * remote-utils.c (prepare_resume_reply): Likewise.
21611 * server.c (cont_thread, general_thread, step_thread)
21612 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
21613 unsigned long.
21614 (handle_query): Update format specifiers.
21615 (handle_v_cont, main): Use strtoul for thread IDs.
21616 * server.h (struct inferior_list_entry): Use unsigned long for ID.
21617 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
21618 (general_thread, step_thread, thread_from_wait)
21619 (old_thread_from_wait): Update.
21620 * target.h (struct thread_resume): Use unsigned long for THREAD.
21621 (struct target_ops): Use unsigned long for arguments to attach and
21622 thread_alive.
21623
21624 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
21625
21626 * acinclude.m4: Include bfd/bfd.m4 directly.
21627 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
21628 <agriffis@toolchain.org>.
21629 * aclocal.m4, configure: Regenerated.
21630
21631 2005-01-07 Andrew Cagney <cagney@gnu.org>
21632
21633 * configure.ac: Rename configure.in, require autoconf 2.59.
21634 * configure: Re-generate.
21635
21636 2004-12-08 Daniel Jacobowitz <dan@debian.org>
21637
21638 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
21639 LIBS when finished.
21640 * aclocal.m4: Regenerated.
21641 * configure: Regenerated.
21642
21643 2004-11-21 Andreas Schwab <schwab@suse.de>
21644
21645 * linux-m68k-low.c (m68k_num_gregs): Define.
21646 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
21647 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
21648 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
21649 (m68k_breakpoint_at): New. Add to the_low_target.
21650
21651 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
21652 srv_linux_thread_db to yes.
21653
21654 2004-10-20 Joel Brobecker <brobecker@gnat.com>
21655
21656 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
21657 (ARCH_SET_FS): Likewise.
21658 (ARCH_GET_FS): Likewise.
21659 (ARCH_GET_GS): Likewise.
21660
21661 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21662
21663 * linux-i386-low.c (ps_get_thread_area): New.
21664 * linux-x86-64-low.c (ps_get_thread_area): New.
21665 * linux-low.c: Include <sys/syscall.h>.
21666 (linux_kill_one_process): Don't kill the first thread here.
21667 (linux_kill): Kill the first thread here.
21668 (kill_lwp): New function.
21669 (send_sigstop, linux_send_signal): Use it.
21670 * proc-service.c: Clean up #ifdefs.
21671 (fpregset_info): Delete.
21672 (ps_lgetregs): Update and enable implementation.
21673 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
21674 implementations.
21675 * remote-utils.c (struct sym_cache, symbol_cache): New.
21676 (input_interrupt): Print a clearer message.
21677 (async_io_enabled): New variable.
21678 (enable_async_io, disable_async_io): Use it. Update comments.
21679 (look_up_one_symbol): Use the symbol cache.
21680 * thread-db.c (thread_db_look_up_symbols): New function.
21681 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
21682
21683 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21684
21685 * configure.in: Test for -rdynamic.
21686 * configure: Regenerated.
21687 * Makefile (INTERNAL_LDFLAGS): New.
21688 (gdbserver, gdbreplay): Use it.
21689
21690 2004-09-02 Andrew Cagney <cagney@gnu.org>
21691
21692 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
21693
21694 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
21695
21696 * linux-low.c (linux_wait): Clear all_processes list also.
21697
21698 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21699
21700 * linux-low.c: Include <errno.h>. Remove extern declaration of
21701 errno.
21702
21703 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21704
21705 * gdbreplay.c, server.h, utils.c: Update copyright years.
21706
21707 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21708
21709 * server.c (main): Print child status or termination signal from
21710 variable 'signal', not 'sig'.
21711
21712 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21713
21714 * linux-low.c (linux_read_memory): Change return type to
21715 int. Check for and return error from ptrace().
21716 * target.c (read_inferior_memory): Change return type to int. Pass
21717 back return status from the_target->read_memory().
21718 * target.h (struct target_ops): Adapt *read_memory() prototype.
21719 Update comment.
21720 (read_inferior_memory): Adapt prototype.
21721 * server.c (main): Return an error packet if
21722 read_inferior_memory() returns an error.
21723
21724 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
21725
21726 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
21727 Unify with other clean targets.
21728
21729 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21730
21731 * server.c (handle_v_cont): Call set_desired_inferior.
21732
21733 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21734
21735 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
21736
21737 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21738
21739 * linux-low.c (linux_wait): Unblock async I/O.
21740 (linux_resume): Block and enable async I/O.
21741 * remote-utils.c (block_async_io, unblock_async_io): New functions.
21742 * server.h (block_async_io, unblock_async_io): Add prototypes.
21743
21744 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21745
21746 * remote-utils.c (remote_open): Print a status notice after
21747 opening a TCP port.
21748 * server.c (attach_inferior): Print a status notice after
21749 attaching.
21750
21751 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21752
21753 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
21754
21755 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
21756
21757 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
21758 error packet.
21759 * server.c, target.h: Update copyright years.
21760
21761 2004-02-25 Roland McGrath <roland@redhat.com>
21762
21763 * target.h (struct target_ops): New member `read_auxv'.
21764 * server.c (handle_query): Handle qPart:auxv:read: query using that.
21765 * linux-low.c (linux_read_auxv): New function.
21766 (linux_target_ops): Initialize `read_auxv' member to that.
21767
21768 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
21769
21770 Committed by Jim Blandy <jimb@redhat.com>.
21771
21772 * linux-s390-low.c (s390_num_regs): Update.
21773 (s390_regmap): Remove control registers. Use __s390x__ predefine
21774 instead of GPR_SIZE to distiguish s390 and s390x targets.
21775
21776 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
21777
21778 * linux-low.c: Update copyright year.
21779 (check_removed_breakpoint): Clear pending_is_breakpoint.
21780 (linux_set_resume_request, linux_queue_one_thread)
21781 (resume_status_pending_p): New functions.
21782 (linux_continue_one_thread): Use process->resume.
21783 (linux_resume): Only resume threads if there are no pending events.
21784 * linux-low.h (struct process_info): Add resume request
21785 pointer.
21786
21787 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
21788
21789 * regcache.c (new_register_cache): Clear the allocated register
21790 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
21791
21792 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
21793
21794 * linux-low.c (linux_resume): Take a struct thread_resume *
21795 argument.
21796 (linux_wait): Update call.
21797 (resume_ptr): New static variable.
21798 (linux_continue_one_thread): Renamed from
21799 linux_continue_one_process. Use resume_ptr.
21800 (linux_resume): Use linux_continue_one_thread.
21801 * server.c (handle_v_cont, handle_v_requests): New functions.
21802 (myresume): New function.
21803 (main): Handle 'v' case.
21804 * target.h (struct thread_resume): New type.
21805 (struct target_ops): Change argument of "resume" to struct
21806 thread_resume *.
21807 (myresume): Delete macro.
21808
21809 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
21810
21811 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
21812 (uninstall): Support DESTDIR.
21813
21814 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
21815
21816 * configure.srv: Add xscale*linux copy of arm*linux entry.
21817
21818 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
21819
21820 * linux-arm-low.c (arm_reinsert_addr): New function.
21821 (the_low_target): Add arm_reinsert_addr.
21822
21823 2003-07-08 Mark Kettenis <kettenis@gnu.org>
21824
21825 * mem-break.c: Remove whitespace at end of file.
21826
21827 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
21828
21829 * configure.in: Check whether we need to prototype strerror.
21830 * server.h: Optionally prototype strerror.
21831 * gdbreplay.c (perror_with_name): Use strerror.
21832 * linux-low.c (linux_attach_lwp): Use strerror.
21833 * utils.c (perror_with_name): Use strerror.
21834 * config.in, configure: Regenerated.
21835
21836 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
21837
21838 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
21839 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
21840
21841 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
21842
21843 * Makefile.in (SFILES): Update.
21844 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
21845 low-sun3.c: Remove files.
21846
21847 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
21848
21849 * linux-low.c: Move comment to linux_thread_alive where it belonged.
21850 (linux_detach_one_process, linux_detach): New functions.
21851 (linux_target_ops): Add linux_detach.
21852 * server.c (main): Handle 'D' packet.
21853 * target.h (struct target_ops): Add "detach" member.
21854 (detach_inferior): Define.
21855
21856 2003-06-13 Mark Kettenis <kettenis@gnu.org>
21857
21858 From Kelley Cook <kelleycook@wideopenwest.com>:
21859 * configure.srv: Accept i[34567]86 variants.
21860
21861 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
21862
21863 * linux-low.c (linux_wait_for_event): Correct comment typos.
21864 (linux_resume_one_process): Call check_removed_breakpoint.
21865 (linux_send_signal): New function.
21866 (linux_target_ops): Add linux_send_signal.
21867 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
21868 of kill.
21869 * target.h (struct target_ops): Add send_signal.
21870
21871 2003-05-29 Jim Blandy <jimb@redhat.com>
21872
21873 * linux-low.c (usr_store_inferior_registers): Transfer buf in
21874 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
21875 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
21876 away part of the register's value.
21877
21878 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
21879
21880 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
21881 (linux_wait_for_event, linux_init_signals): Likewise.
21882
21883 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
21884
21885 * configure.in: Check for stdlib.h.
21886 * configure: Regenerated.
21887 * config.in: Regenerated.
21888
21889 2003-01-04 Andreas Schwab <schwab@suse.de>
21890
21891 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
21892
21893 2003-01-02 Andrew Cagney <ac131313@redhat.com>
21894
21895 * Makefile.in: Remove obsolete code.
21896
21897 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
21898
21899 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
21900 defined(PT_FPR0_HI).
21901
21902 2002-11-17 Stuart Hughes <seh@zee2.com>
21903
21904 * linux-arm-low.c (arm_num_regs): Increase.
21905 (arm_regmap): Include status register.
21906
21907 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
21908
21909 * linux-low.c (register_addr): Remove incorrect -1 check.
21910
21911 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
21912
21913 * linux-low.c (linux_create_inferior): Call setpgid. Return
21914 the new PID.
21915 (unstopped_p, linux_signal_pid): Remove.
21916 (linux_target_ops): Remove linux_signal_pid.
21917 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
21918 global instead of target method.
21919 * target.h (struct target_ops): Remove signal_pid. Update comment
21920 for create_inferior.
21921 * server.c (signal_pid): New variable.
21922 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
21923 gdbserver. Set the child to be the foreground process group.
21924 (attach_inferior): Set signal_pid.
21925
21926 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
21927
21928 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
21929
21930 2002-08-20 Jim Blandy <jimb@redhat.com>
21931
21932 * Makefile.in (LDFLAGS): Allow the configure script to establish a
21933 default for this.
21934
21935 2002-08-01 Andrew Cagney <cagney@redhat.com>
21936
21937 * Makefile.in: Make chill references obsolete.
21938
21939 2002-07-24 Kevin Buettner <kevinb@redhat.com>
21940
21941 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
21942 * configure: Regenerate.
21943 * config.in: Regenerate.
21944
21945 2002-07-09 David O'Brien <obrien@FreeBSD.org>
21946
21947 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
21948 (perror_with_name, remote_close, remote_open, expect, play): Static.
21949
21950 2002-07-04 Michal Ludvig <mludvig@suse.cz>
21951
21952 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
21953 byte offsets instead of an array of indexes.
21954 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
21955
21956 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
21957
21958 * regcache.c: Add comment.
21959
21960 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
21961
21962 * thread-db.c: New file.
21963 * proc-service.c: New file.
21964 * acinclude.m4: New file.
21965 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
21966 proc-service.o, and thread-db.o.
21967 (linux-low.o): Add USE_THREAD_DB.
21968 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
21969 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
21970 * aclocal.m4: Regenerated.
21971 * config.in: Regenerated.
21972 * configure: Regenerated.
21973 * configure.in: Check for proc_service.h, sys/procfs.h,
21974 thread_db.h, and linux/elf.h headrs.
21975 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
21976 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
21977 Check for -lthread_db and thread support.
21978 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
21979 PowerPC, and SuperH.
21980 * i387-fp.c: Constify arguments.
21981 * i387-fp.h: Likewise.
21982 * inferiors.c: (struct thread_info): Renamed from
21983 `struct inferior_info'. Remove PID member. Use generic inferior
21984 list header. All uses updated.
21985 (inferiors, signal_pid): Removed.
21986 (all_threads): New variable.
21987 (get_thread): Define.
21988 (add_inferior_to_list): New function.
21989 (for_each_inferior): New function.
21990 (change_inferior_id): New function.
21991 (add_inferior): Removed.
21992 (remove_inferior): New function.
21993 (add_thread): New function.
21994 (free_one_thread): New function.
21995 (remove_thread): New function.
21996 (clear_inferiors): Use for_each_inferior and free_one_thread.
21997 (find_inferior): New function.
21998 (find_inferior_id): New function.
21999 (inferior_target_data): Update argument type.
22000 (set_inferior_target_data): Likewise.
22001 (inferior_regcache_data): Likewise.
22002 (set_inferior_regcache_data): Likewise.
22003 * linux-low.c (linux_bp_reinsert): Remove.
22004 (all_processes, stopping_threads, using_thrads)
22005 (struct pending_signals, debug_threads, pid_of): New.
22006 (inferior_pid): Replace with macro.
22007 (struct inferior_linux_data): Remove.
22008 (get_stop_pc, add_process): New functions.
22009 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
22010 Use add_process and add_thread.
22011 (linux_attach_lwp): New function, based on old linux_attach. Use
22012 add_process and add_thread. Set stop_expected for new threads.
22013 (linux_attach): New function.
22014 (linux_kill_one_process): New function.
22015 (linux_kill): Kill all LWPs.
22016 (linux_thread_alive): Use find_inferior_id.
22017 (check_removed_breakpoints, status_pending_p): New functions.
22018 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
22019 Update. Use WNOHANG. Wait for cloned processes also. Update process
22020 struct for the found process.
22021 (linux_wait_for_event): New function.
22022 (linux_wait): Use it. Support LWPs.
22023 (send_sigstop, wait_for_sigstop, stop_all_processes)
22024 (linux_resume_one_process, linux_continue_one_process): New functions.
22025 (linux_resume): Support LWPs.
22026 (REGISTER_RAW_SIZE): Remove.
22027 (fetch_register): Use register_size instead. Call supply_register.
22028 (usr_store_inferior_registers): Likewise. Call collect_register.
22029 Fix recursive case.
22030 (regsets_fetch_inferior_registers): Improve error message.
22031 (regsets_store_inferior_registers): Add debugging.
22032 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
22033 (unstopped_p, linux_signal_pid): New functions.
22034 (linux_target_ops): Add linux_signal_pid.
22035 (linux_init_signals): New function.
22036 (initialize_low): Call it. Initialize using_threads.
22037 * regcache.c (inferior_regcache_data): Add valid
22038 flag.
22039 (get_regcache): Fetch registers lazily. Add fetch argument
22040 and update all callers.
22041 (regcache_invalidate_one, regcache_invalidate): New
22042 functions.
22043 (new_register_cache): Renamed from create_register_cache.
22044 Return the new regcache.
22045 (free_register_cache): Change argument to a void *.
22046 (registers_to_string, registers_from_string): Call get_regcache
22047 with fetch flag set.
22048 (register_data): Make static. Pass fetch flag to get_regcache.
22049 (supply_register): Call get_regcache with fetch flag clear.
22050 (collect_register): Call get_regcache with fetch flag set.
22051 (collect_register_as_string): New function.
22052 * regcache.h: Update.
22053 * remote-utils.c (putpkt): Flush after debug output and use
22054 stderr.
22055 Handle input interrupts while waiting for an ACK.
22056 (input_interrupt): Use signal_pid method.
22057 (getpkt): Flush after debug output and use stderr.
22058 (outreg): Use collect_register_as_string.
22059 (new_thread_notify, dead_thread_notify): New functions.
22060 (prepare_resume_reply): Check using_threads. Set thread_from_wait
22061 and general_thread.
22062 (look_up_one_symbol): Flush after debug output.
22063 * server.c (step_thread, server_waiting): New variables.
22064 (start_inferior): Don't use signal_pid. Update call to mywait.
22065 (attach_inferior): Update call to mywait.
22066 (handle_query): Handle qfThreadInfo and qsThreadInfo.
22067 (main): Don't fetch/store registers explicitly. Use
22068 set_desired_inferior. Support proposed ``Hs'' packet. Update
22069 calls to mywait.
22070 * server.h: Update.
22071 (struct inferior_list, struct_inferior_list_entry): New.
22072 * target.c (set_desired_inferior): New.
22073 (write_inferior_memory): Constify.
22074 (mywait): New function.
22075 * target.h: Update.
22076 (struct target_ops): New signal_pid method.
22077 (mywait): Removed macro, added prototype.
22078
22079 * linux-low.h (regset_func): Removed.
22080 (regset_fill_func, regset_store_func): New.
22081 (enum regset_type): New.
22082 (struct regset_info): Add type field. Use new operation types.
22083 (struct linux_target_ops): stop_pc renamed to get_pc.
22084 Add decr_pc_after_break and breakpoint_at.
22085 (get_process, get_thread_proess, get_process_thread)
22086 (strut process_info, all_processes, linux_attach_lwp)
22087 (thread_db_init): New.
22088
22089 * linux-arm-low.c (arm_get_pc, arm_set_pc,
22090 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
22091 (the_low_target): Add new members.
22092 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
22093 (i386_store_fpxregset): Constify.
22094 (target_regsets): Add new kind identifier.
22095 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
22096 (i386_set_pc): Add debugging.
22097 (i386_breakpoint_at): New function.
22098 (the_low_target): Add new members.
22099 * linux-mips-low.c (mips_get_pc, mips_set_pc)
22100 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
22101 (mips_breakpoint_at): New.
22102 (the_low_target): Add new members.
22103 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
22104 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
22105 (the_low_target): Add new members.
22106 * linux-sh-low.c (sh_get_pc, sh_set_pc)
22107 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
22108 (the_low_target): Add new members.
22109 * linux-x86-64-low.c (target_regsets): Add new kind
22110 identifier.
22111
22112 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
22113
22114 From Martin Pool <mbp@samba.org>:
22115 * server.c (gdbserver_usage): New function.
22116 (main): Call it.
22117
22118 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
22119
22120 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
22121 stop_at -> stop_pc.
22122
22123 2002-05-04 Andrew Cagney <ac131313@redhat.com>
22124
22125 * Makefile.in: Remove obsolete code.
22126
22127 2002-04-24 Michal Ludvig <mludvig@suse.cz>
22128
22129 * linux-low.c (regsets_fetch_inferior_registers),
22130 (regsets_store_inferior_registers): Removed cast to int from
22131 ptrace() calls.
22132 * regcache.h: Added declaration of struct inferior_info.
22133
22134 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
22135
22136 * inferiors.c (struct inferior_info): Add regcache_data.
22137 (add_inferior): Call create_register_cache.
22138 (clear_inferiors): Call free_register_cache.
22139 (inferior_regcache_data, set_inferior_regcache_data): New functions.
22140 * regcache.c (struct inferior_regcache_data): New.
22141 (registers): Remove.
22142 (get_regcache): New function.
22143 (create_register_cache, free_register_cache): New functions.
22144 (set_register_cache): Don't initialize the register cache here.
22145 (registers_to_string, registers_from_string, register_data): Call
22146 get_regcache.
22147 * regcache.h: Add prototypes.
22148 * server.h: Likewise.
22149
22150 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
22151
22152 * mem-break.c: New file.
22153 * mem-break.h: New file.
22154 * Makefile.in: Add mem-break.o rule; update server.h
22155 dependencies.
22156 * inferiors.c (struct inferior_info): Add target_data
22157 member.
22158 (clear_inferiors): Free target_data member if set.
22159 (inferior_target_data, set_inferior_target_data): New functions.
22160 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
22161 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
22162 * linux-low.c (linux_bp_reinsert): New variable.
22163 (struct inferior_linux_data): New.
22164 (linux_create_inferior): Use set_inferior_target_data.
22165 (linux_attach): Likewise. Call add_inferior.
22166 (linux_wait_for_one_inferior): New function.
22167 (linux_wait): Call it.
22168 (linux_write_memory): Add const.
22169 (initialize_low): Call set_breakpoint_data.
22170 * linux-low.h (struct linux_target_ops): Add breakpoint
22171 handling members.
22172 * server.c (attach_inferior): Remove extra add_inferior
22173 call.
22174 * server.h: Include mem-break.h. Update inferior.c
22175 prototypes.
22176 * target.c (read_inferior_memory)
22177 (write_inferior_memory): New functions.
22178 * target.h (read_inferior_memory)
22179 (write_inferior_memory): Change macros to prototypes.
22180 (struct target_ops): Update comments. Add const to write_memory
22181 definition.
22182
22183 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
22184
22185 * linux-low.c (usr_store_inferior_registers): Support
22186 registers which are allowed to fail to store.
22187 * linux-low.h (linux_target_ops): Likewise.
22188 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
22189 (ppc_cannot_store_register): FPSCR may not be storable.
22190
22191 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22192
22193 * server.h: Include <string.h> if HAVE_STRING_H.
22194 * ChangeLog: Correct paths in last ChangeLog entry.
22195
22196 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22197
22198 * linux-low.h: Remove obsolete prototypes.
22199 (struct linux_target_ops): New.
22200 (extern the_low_target): New.
22201 * linux-low.c (num_regs, regmap): Remove declarations.
22202 (register_addr): Use the_low_target explicitly.
22203 (fetch_register): Likewise.
22204 (usr_fetch_inferior_registers): Likewise.
22205 (usr_store_inferior_registers): Likewise.
22206 * linux-arm-low.c (num_regs): Remove.
22207 (arm_num_regs): Define.
22208 (arm_regmap): Renamed from regmap, made static.
22209 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
22210 made static.
22211 (arm_cannot_store_register): Renamed from cannot_store_register,
22212 made static.
22213 (the_low_target): New.
22214 * linux-i386-low.c (num_regs): Remove.
22215 (i386_num_regs): Define.
22216 (i386_regmap): Renamed from regmap, made static.
22217 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
22218 made static.
22219 (i386_cannot_store_register): Renamed from cannot_store_register,
22220 made static.
22221 (the_low_target): New.
22222 * linux-ia64-low.c (num_regs): Remove.
22223 (ia64_num_regs): Define.
22224 (ia64_regmap): Renamed from regmap, made static.
22225 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
22226 made static.
22227 (ia64_cannot_store_register): Renamed from cannot_store_register,
22228 made static.
22229 (the_low_target): New.
22230 * linux-m68k-low.c (num_regs): Remove.
22231 (m68k_num_regs): Define.
22232 (m68k_regmap): Renamed from regmap, made static.
22233 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
22234 made static.
22235 (m68k_cannot_store_register): Renamed from cannot_store_register,
22236 made static.
22237 (the_low_target): New.
22238 * linux-mips-low.c (num_regs): Remove.
22239 (mips_num_regs): Define.
22240 (mips_regmap): Renamed from regmap, made static.
22241 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
22242 made static.
22243 (mips_cannot_store_register): Renamed from cannot_store_register,
22244 made static.
22245 (the_low_target): New.
22246 * linux-ppc-low.c (num_regs): Remove.
22247 (ppc_num_regs): Define.
22248 (ppc_regmap): Renamed from regmap, made static.
22249 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
22250 made static.
22251 (ppc_cannot_store_register): Renamed from cannot_store_register,
22252 made static.
22253 (the_low_target): New.
22254 * linux-s390-low.c (num_regs): Remove.
22255 (s390_num_regs): Define.
22256 (s390_regmap): Renamed from regmap, made static.
22257 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
22258 made static.
22259 (s390_cannot_store_register): Renamed from cannot_store_register,
22260 made static.
22261 (the_low_target): New.
22262 * linux-sh-low.c (num_regs): Remove.
22263 (sh_num_regs): Define.
22264 (sh_regmap): Renamed from regmap, made static.
22265 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
22266 made static.
22267 (sh_cannot_store_register): Renamed from cannot_store_register,
22268 made static.
22269 (the_low_target): New.
22270 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
22271 (the_low_target): New.
22272
22273 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22274
22275 * Makefile.in: Add stamp-h target.
22276 * configure.in: Create stamp-h.
22277 * configure: Regenerated.
22278
22279 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22280
22281 * inferiors.c: New file.
22282 * target.c: New file.
22283 * target.h: New file.
22284 * Makefile.in: Add target.o and inferiors.o. Update
22285 dependencies.
22286 * linux-low.c (inferior_pid): New static variable,
22287 moved from server.c.
22288 (linux_create_inferior): Renamed from create_inferior.
22289 Call add_inferior. Return 0 on success instead of a PID.
22290 (linux_attach): Renamed from myattach.
22291 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
22292 (linux_thread_alive): Renamed from mythread_alive.
22293 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
22294 child dies.
22295 (linux_resume): Renamed from myresume. Add missing ``return 0''.
22296 (regsets_store_inferior_registers): Correct error message.
22297 Add missing ``return 0''.
22298 (linux_fetch_registers): Renamed from fetch_inferior_registers.
22299 (linux_store_registers): Renamed from store_inferior_registers.
22300 (linux_read_memory): Renamed from read_inferior_memory.
22301 (linux_write_memory): Renamed from write_inferior_memory.
22302 (linux_target_ops): New structure.
22303 (initialize_low): Call set_target_ops ().
22304 * remote-utils.c (unhexify): New function.
22305 (hexify): New function.
22306 (input_interrupt): Send signals to ``signal_pid''.
22307 * server.c (inferior_pid): Remove.
22308 (start_inferior): Update create_inferior call.
22309 (attach_inferior): Call add_inferior.
22310 (handle_query): New function.
22311 (main): Call handle_query for `q' packets.
22312 * server.h: Include "target.h". Remove obsolete prototypes.
22313 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
22314
22315 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22316
22317 * Makefile.in: Add WARN_CFLAGS. Update configury
22318 dependencies.
22319 * configure.in: Check for <string.h>
22320 * configure: Regenerate.
22321 * config.in: Regenerate.
22322 * gdbreplay.c: Include needed system headers.
22323 (remote_open): Remove strchr prototype.
22324 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
22325 * regcache.c (supply_register): Change buf argument to const void *.
22326 (supply_register_by_name): Likewise.
22327 (collect_register): Change buf argument to void *.
22328 (collect_register_by_name): Likewise.
22329 * regcache.h: Add missing prototypes.
22330 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
22331 * server.c (handle_query): New function.
22332 (attached): New static variable, moved out of main.
22333 (main): Quiet longjmp clobber warnings.
22334 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
22335 * utils.c (error): Remove NORETURN.
22336 (fatal): Likewise.
This page took 0.577186 seconds and 5 git commands to generate.