PowerPC use_local_plt
[binutils-gdb.git] / gdbserver / ChangeLog
1 2021-01-07 Tom de Vries <tdevries@suse.de>
2
3 * Makefile.in (LIBIBERTY_NORMAL, LIBIBERTY_NOASAN, LIBIBERTY_PIC):
4 (LIBIBERTY_FOR_SHLIB): New var.
5 (LIBIBERTY): Set using $(LIBIBERTY_NORMAL).
6 (IPA_LIB): Use LIBIBERTY_FOR_SHLIB instead of LIBIBERTY in target rule.
7
8 2021-01-04 Simon Marchi <simon.marchi@efficios.com>
9
10 * debug.cc (debug_print_depth): New.
11
12 2021-01-01 Joel Brobecker <brobecker@adacore.com>
13
14 * server.cc (gdbserver_version): Update copyright year.
15 * gdbreplay.cc (gdbreplay_version): Likewise.
16
17 2020-12-16 Luis Machado <luis.machado@linaro.org>
18
19 * linux-aarch64-low.cc (address_significant): New function.
20 (aarch64_target::low_stopped_data_address): Handle the TBI.
21
22 2020-12-11 Andrew Burgess <andrew.burgess@embecosm.com>
23
24 * Makefile.in (IPA_LIB): Include libiberty library.
25
26 2020-11-11 Andrew Burgess <andrew.burgess@embecosm.com>
27
28 * server.cc (gdbserver_usage): Add missing option to usage text.
29 (gdbserver_show_disableable): Likewise.
30
31 2020-11-02 Simon Marchi <simon.marchi@efficios.com>
32
33 * ax.cc: Fix indentation.
34 * dll.cc: Fix indentation.
35 * inferiors.h: Fix indentation.
36 * linux-low.cc: Fix indentation.
37 * linux-nios2-low.cc: Fix indentation.
38 * linux-ppc-ipa.cc: Fix indentation.
39 * linux-ppc-low.cc: Fix indentation.
40 * linux-x86-low.cc: Fix indentation.
41 * linux-xtensa-low.cc: Fix indentation.
42 * regcache.cc: Fix indentation.
43 * server.cc: Fix indentation.
44 * tracepoint.cc: Fix indentation.
45
46 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
47
48 * acinclude.m4: Replace AC_TRY_COMPILE with AC_COMPILE_IFELSE +
49 AC_LANG_PROGRAM.
50 * configure: Re-generate.
51
52 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
53
54 * configure: Re-generate.
55
56 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
57
58 * configure: Re-generate.
59
60 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
61
62 * configure: Re-generate.
63
64 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
65
66 * configure: Re-generate.
67
68 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
69
70 * configure.ac: Modernize.
71 * configure: Re-generate.
72
73 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
74
75 * configure.ac: Use AC_CANONICAL_{BUILD,HOST,TARGET} instead of
76 AC_CANONICAL_SYSTEM.
77 * configure: Re-generate.
78
79 2020-10-26 Pedro Alves <pedro@palves.net>
80
81 * netbsd-low.cc (netbsd_waitpid, netbsd_process_target::kill)
82 (netbsd_qxfer_libraries_svr4): Use gdb::handle_eintr without
83 explicit type.
84
85 2020-10-25 Simon Marchi <simon.marchi@polymtl.ca>
86
87 * acinclude.m4: Update ptrace.m4 path.
88
89 2020-10-24 Simon Marchi <simon.marchi@polymtl.ca>
90
91 * config.in: Re-generate.
92 * configure: Re-generate.
93
94 2020-10-21 Simon Marchi <simon.marchi@polymtl.ca>
95
96 * server.cc (handle_general_set): Don't use sprintf with
97 argument overlapping buffer.
98
99 2020-10-20 Tom Tromey <tromey@adacore.com>
100
101 PR gdb/26742:
102 * inferiors.cc (remove_thread): Clear current_thread before
103 freeing the thread.
104
105 2020-10-13 Kamil Rytarowski <n54@gmx.com>x
106
107 * netbsd-low.cc (netbsd_tdesc): Remove.
108 (netbsd_add_process): Likewise.
109 (netbsd_process_target::create_inferior): Update.
110
111 2020-10-09 Andrew Burgess <andrew.burgess@embecosm.com>
112
113 * linux-arc-low.cc (arc_linux_read_description): Release the
114 unique_ptr returned from arc_create_target_description.
115
116 2020-10-09 Andrew Burgess <andrew.burgess@embecosm.com>
117
118 * Makefile.in: Include Makefile.gnulib.inc. Don't define LIBGNU
119 or INCGNU. Make use of LIBGNU_EXTRA_LIBS when linking.
120
121 2020-10-08 Andrew Burgess <andrew.burgess@embecosm.com>
122
123 * linux-low.cc (linux_process_target::handle_extended_wait):
124 Release the unique_ptr returned from allocate_target_description.
125 * linux-riscv-low.cc (riscv_target::low_arch_setup): Likewise.
126 * linux-x86-low.cc (tdesc_amd64_linux_no_xml): Change type.
127 (tdesc_i386_linux_no_xml): Change type.
128 (x86_linux_read_description): Borrow pointer from unique_ptr
129 object.
130 (x86_target::get_ipa_tdesc_idx): Likewise.
131 (initialize_low_arch): Likewise.
132 * tdesc.cc (allocate_target_description): Update return type.
133
134 2020-10-07 Tom Tromey <tromey@adacore.com>
135
136 * server.cc (handle_search_memory): Remove dead code.
137
138 2020-10-07 Tom Tromey <tromey@adacore.com>
139
140 * server.cc (handle_search_memory_1): Remove.
141 (handle_search_memory): Use simple_search_memory.
142
143 2020-10-07 Simon Marchi <simon.marchi@efficios.com>
144
145 * Makefile.in (COMPILE): Add CXXFLAGS.
146 (INTERNAL_CFLAGS_BASE): Remove CXXFLAGS.
147 (gdbserver$(EXEEXT)): Add CXXFLAGS.
148 (gdbreplay$(EXEEXT)): Add CXXFLAGS.
149 ($(IPA_LIB)): Add CXXFLAGS.
150 (IPAGENT_COMPILE): Add CXXFLAGS.
151
152 2020-10-07 Anton Kolesov <anton.kolesov@synopsys.com>
153
154 * configure.srv: Support ARC architecture.
155 * Makefile.in: Add linux-arc-low.cc and arch/arc.o.
156 * linux-arc-low.cc: New file.
157
158 2020-10-07 Kamil Rytarowski <n54@gmx.com>
159
160 * netbsd-low.cc (get_dynamic, get_r_debug, read_one_ptr)
161 (netbsd_qxfer_libraries_svr4): Remove "target" argument and update.
162 (netbsd_process_target::qxfer_libraries_svr4): Update.
163
164 2020-10-07 Kamil Rytarowski <n54@gmx.com>
165
166 * netbsd-low.cc: Fix whitespace formatting.
167 * netbsd-amd64-low.cc: Likewise.
168
169 2020-10-07 Kamil Rytarowski <n54@gmx.com>
170
171 * netbsd-low.cc (netbsd_process_target::read_memory)
172 (netbsd_process_target::write_memory): Update.
173
174 2020-10-07 Kamil Rytarowski <n54@gmx.com>
175
176 * netbsd-aarch64-low.cc: Add.
177 * Makefile.in (SFILES): Register "netbsd-aarch64-low.c".
178 * configure.srv: Add aarch64*-*-netbsd*.
179
180 2020-10-06 Shahab Vahedi <shahab@synopsys.com>
181
182 * regcache.cc (register_data): Remove unused "fetch" argument.
183
184 2020-10-02 Simon Marchi <simon.marchi@polymtl.ca>
185
186 * server.cc (handle_monitor_command): Handle "set
187 debug-event-loop".
188 (captured_main): Handle "--debug-event-loop".
189 (monitor_show_help): Mention new setting.
190 (gdbserver_usage): Mention new flag.
191
192 2020-10-02 Simon Marchi <simon.marchi@polymtl.ca>
193
194 * linux-low.cc (linux_process_target::async): Pass name to
195 add_file_handler.
196 * remote-utils.cc (handle_accept_event): Likewise.
197 (remote_open): Likewise.
198
199 2020-10-01 Kamil Rytarowski <n54@gmx.com>
200
201 * netbsd-i386-low.cc: Add.
202 * Makefile.in (SFILES): Register "netbsd-i386-low.c".
203 * configure.srv: Add i[34567]86-*-netbsd*.
204
205 2020-10-01 Kamil Rytarowski <n54@gmx.com>
206
207 * netbsd-amd64-low.cc (netbsd_x86_64_arch_setup): Remove.
208 (netbsd_target_regsets): Now const.
209 (the_low_target): Remove.
210 (class netbsd_amd64_target, the_netbsd_amd64_target)
211 (the_netbsd_target): Add.
212 * netbsd-low.cc (netbsd_process_target::post_create_inferior): Call
213 low_arch_setup ().
214 (netbsd_process_target::fetch_registers)
215 (netbsd_process_target::store_registers, initialize_low): Update.
216 (the_netbsd_target): Remove.
217 * netbsd-low.h (netbsd_target_regsets, netbsd_target_ops)
218 (the_low_target, netbsd_tdesc): Remove.
219 (netbsd_process_target::get_regs_info)
220 (netbsd_process_target::low_arch_setup): Add.
221
222 2020-09-23 Hannes Domani <ssbssa@yahoo.de>
223
224 * win32-low.cc: Remove local wow64_process variable.
225 * win32-low.h: Remove local wow64_process variable.
226
227 2020-09-18 Tom Tromey <tromey@adacore.com>
228
229 * netbsd-low.h (class netbsd_process_target) <wait>: Update.
230 * netbsd-low.cc (netbsd_waitpid, netbsd_wait)
231 (netbsd_process_target::wait): Change type of target_options.
232 * win32-low.h (class win32_process_target) <wait>: Update.
233 * win32-low.cc (win32_process_target::wait): Update.
234 * target.h (class process_stratum_target) <wait>: Update.
235 (mywait): Update.
236 * target.cc (mywait, target_wait): Change type of "options".
237 * linux-low.h (class linux_process_target) <wait, wait_1>:
238 Update.
239 * linux-low.cc (linux_process_target::wait)
240 (linux_process_target::wait_1): Update.
241
242 2020-09-15 Tom Tromey <tromey@adacore.com>
243
244 * linux-x86-low.cc (xmltarget_i386_linux_no_xml)
245 (xmltarget_amd64_linux_no_xml): Now arrays.
246
247 2020-09-14 Tom Tromey <tromey@adacore.com>
248
249 * tracepoint.cc (eval_result_names): Now const.
250 * ax.cc (gdb_agent_op_names): Now const.
251
252 2020-09-10 Kamil Rytarowski <n54@gmx.com>
253
254 * netbsd-low.cc: Add.
255 * netbsd-low.h: Likewise.
256 * netbsd-amd64-low.cc: Likewise.
257 * Makefile.in (SFILES): Register "netbsd-low.cc", "netbsd-low.h",
258 "netbsd-amd64-low.cc".
259 * configure.srv: Add x86_64-*-netbsd*.
260
261 2020-08-13 Simon Marchi <simon.marchi@polymtl.ca>
262
263 * server.cc (captured_main): Accept multiple `--selftest=`
264 options. Pass all `--selftest=` arguments to run_tests.
265
266 2020-07-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
267
268 * configure, config.in: Regenerate.
269
270 2020-07-26 Eli Zaretskii <eliz@gnu.org>
271
272 * configure.ac (AC_CHECK_HEADERS): Add ws2tcpip.h.
273 When checking whether socklen_t type is defined, use ws2tcpip.h if
274 it is available and sys/socket.h isn't.
275 * configure: Regenerate.
276 * config.in: Regenerate.
277
278 2020-07-22 Pedro Alves <pedro@palves.net>
279
280 * inferiors.cc (switch_to_process): New, moved here from
281 thread-db.cc, and made extern.
282 * inferiors.h (switch_to_process): Declare.
283 * server.cc: Include "gdbsupport/scoped_restore.h".
284 (handle_qxfer_threads_proper): Now returns bool. Prepare to
285 access memory around target calls.
286 (handle_qxfer_threads): Handle errors.
287 * thread-db.cc (switch_to_process): Moved to inferiors.cc.
288
289 2020-07-21 Simon Marchi <simon.marchi@efficios.com>
290
291 * linux-low.cc (stopped_pids): Make static.
292
293 2020-07-17 Andrew Burgess <andrew.burgess@embecosm.com>
294
295 * tdesc.cc (allocate_target_description): Add header comment.
296 (target_desc_deleter::operator()): New function.
297 * tdesc.h (struct target_desc): Declare as final.
298
299 2020-07-13 Simon Marchi <simon.marchi@polymtl.ca>
300
301 * server.cc (handle_query): Use std::vector of
302 std::string for `qsupported` vector. Use separate
303 vector for unknowns.
304 * target.h (class process_stratum_target) <process_qsupported>:
305 Change parameters to array_view of const char *.
306 (target_process_qsupported): Remove `count` parameter.
307 * target.cc (process_stratum_target::process_qsupported): Change
308 parameters to array_view of const char *.
309 * linux-x86-low.cc (class x86_target) <process_qsupported>:
310 Likewise.
311
312 2020-06-29 Tom de Vries <tdevries@suse.de>
313
314 * ax.h: Include gdbsupport/debug_agent.h.
315
316 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
317
318 * tdesc.cc (struct tdesc_compatible_info): New struct.
319 (tdesc_compatible_info_list): New function.
320 (tdesc_compatible_info_arch_name): New function.
321
322 2020-06-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
323
324 Use std::list to stop pending signal instead of manually-created
325 linked list.
326 * linux-low.h: Include <list>.
327 (struct pending_signal): Move here from linux-low.cc.
328 (struct lwp_info) <pending_signals>
329 <pending_signals_to_report>: Update the type.
330 * linux-low.cc (struct pending_signals): Remove.
331 (linux_process_target::delete_lwp)
332 (linux_process_target::add_lwp)
333 (enqueue_one_deferred_signal)
334 (dequeue_one_deferred_signal)
335 (enqueue_pending_signal)
336 (linux_process_target::resume_one_lwp_throw)
337 (linux_process_target::thread_needs_step_over)
338 (linux_process_target::resume_one_thread)
339 (linux_process_target::proceed_one_lwp): Update the use of pending
340 signal list.
341
342 2020-06-17 Simon Marchi <simon.marchi@efficios.com>
343
344 * Makefile.in (%-generated.cc: ../gdb/regformats/arm/%.dat):
345 Remove.
346
347 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
348
349 * Makefile.in (SFILES): Remove win32-arm-low.cc, wincecompat.cc.
350 * configure.srv: Remove mingw32ce cases.
351 * server.h, win32-low.cc: Remove __MINGW32CE__-guarded code.
352 * win32-low.h (to_back_slashes): Remove.
353 * win32-arm-low.cc, wincecompat.cc, wincecompat.h: Remove.
354
355 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
356
357 * Makefile.in (SFILES): linux-tile-low.cc.
358 * configure.srv: Remove tilegx case.
359 * linux-tile-low.cc: Remove.
360
361 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
362
363 * Makefile.in (SFILES): Remove linux-m32r-low.cc.
364 * configure.srv: Remove m32r case.
365 * linux-m32r-low.cc: Remove.
366
367 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
368
369 * Makefile.in (SFILES): Remove linux-cris-low.c.
370 * configure.srv: Remove cris cases.
371 * linux-cris-low.cc, linux-crisv32-low.cc: Remove.
372
373 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
374
375 * Makefile.in (SFILES): Remove linux-bfin-low.c.
376 * configure.srv: Remove bfin case.
377 * linux-bfin-low.cc: Remove.
378 * linux-low.cc: Remove BFIN-conditional code.
379
380 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
381
382 * configure: Re-generate.
383 * configure.ac: Remove srv_qnx test.
384 * configure.srv: Remove nto case.
385 * nto-low.cc, nto-low.h, nto-x86-low.cc: Remove.
386 * remote-utils.c: Remove __QNX__-guarded code.
387
388 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
389
390 * configure: Re-generate.
391 * configure.ac: Remove srv_lynxos test.
392 * configure.srv: Remove lynxos cases.
393 * lynx-i386-low.cc, lynx-low.cc, lynx-low.h, lynx-ppc-low.c:
394 Remove.
395
396 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
397
398 * README: Fix a few outdated or incoherent things.
399
400 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
401
402 * win32-low.cc (do_initial_child_stuff): Set open_process_used.
403 (win32_clear_inferiors): Use open_process_used.
404 (get_child_debug_event): Likewise.
405
406 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
407
408 PR gdbserver/25893
409 * linux-low.cc (linux_process_target::create_inferior),
410 lynx-low.cc (lynx_process_target::create_inferior),
411 win32-low.cc (win32_process_target::create_inferior): Use
412 construct_inferior_arguments instead of stringify_argv
413 to get string representation which properly escapes
414 special characters.
415 * server.cc (handle_v_run): Just pass empty program arg
416 as such, since any further processing is now handled via
417 construct_inferior_arguments.
418
419 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
420
421 * nto-low.cc (nto_process_target::create_inferior): Pass
422 argv to spawnp function as char **.
423
424 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
425
426 * server.cc (captured_main), (handle_v_run): No longer
427 insert extra NULL element to args vector.
428
429 2020-05-23 Pedro Alves <palves@redhat.com>
430
431 * gdb-safe-ctype.h: New.
432
433 2020-05-16 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
434
435 * linux-ia64-low.cc (ia64_target::sw_breakpoint_from_kind):
436 Fix incorrect 'gdb_assert_no_reached' to 'gdb_assert_not_reached'.
437 (ia64_target::low_breakpoint_at): Ditto.
438
439 2020-05-15 Hannes Domani <ssbssa@yahoo.de>
440
441 * win32-i386-low.cc (i386_supports_z_point_type): Handle
442 Z_PACKET_HW_BP z_type.
443 (i386_insert_point): Handle raw_bkpt_type type.
444 (i386_remove_point): Likewise.
445
446 2020-04-30 Hannes Domani <ssbssa@yahoo.de>
447
448 * configure.srv <x86_64-*-mingw*, x86_64-*-cygwin*> (srv_tgtobj):
449 Add arch/i386.o.
450 * win32-arm-low.cc (arm_num_regs): New function.
451 (struct win32_target_ops): Use arm_num_regs.
452 * win32-i386-low.cc (win32_get_current_dr): Adapt for WOW64
453 processes.
454 (i386_get_thread_context): Likewise.
455 (i386_prepare_to_resume): Likewise.
456 (i386_thread_added): Likewise.
457 (i386_single_step): Likewise.
458 (i386_fetch_inferior_register): Likewise.
459 (i386_store_inferior_register): Likewise.
460 (i386_arch_setup): Likewise.
461 (i386_win32_num_regs): New function.
462 (struct win32_target_ops): Use i386_win32_num_regs.
463 * win32-low.cc (win32_get_thread_context): Adapt for WOW64
464 processes.
465 (win32_require_context): Likewise.
466 (child_add_thread): Likewise.
467 (do_initial_child_stuff): Likewise.
468 (continue_one_thread): Likewise.
469 (win32_process_target::resume): Likewise.
470 (load_psapi): Likewise.
471 (win32_add_all_dlls): Likewise.
472 (maybe_adjust_pc): Likewise.
473 (win32_process_target::qxfer_siginfo): Likewise.
474 (initialize_low): Likewise.
475 * win32-low.h (struct win32_target_ops): Change num_regs to
476 callback function.
477
478 2020-04-27 Simon Marchi <simon.marchi@efficios.com>
479
480 * configure.ac: Remove check for fs_base/gs_base in
481 user_regs_struct.
482 * configure: Re-generate.
483 * config.in: Re-generate.
484 * linux-x86-low.cc (x86_64_regmap, x86_fill_gregset,
485 x86_store_gregset): Adjust.
486
487 2020-04-22 Hannes Domani <ssbssa@yahoo.de>
488
489 * server.cc (handle_search_memory_1): Fix gdb_read_memory return value
490 comparison.
491
492 2020-04-16 Tom Tromey <tromey@adacore.com>
493
494 * win32-low.cc (windows_nat::handle_access_violation): New
495 function.
496
497 2020-04-15 Simon Marchi <simon.marchi@polymtl.ca>
498
499 * win32-low.cc (get_child_debug_event): Fix format string warning.
500
501 2020-04-13 Tom Tromey <tom@tromey.com>
502
503 * server.h (gdb_fildes_t): Remove typedef.
504 * remote-utils.c (remote_desc, list_desc): Now int.
505 (INVALID_DESCRIPTOR): Remove.
506 (gdb_connected, remote_close)
507 (check_remote_input_interrupt_request): Update.
508 * utils.h (pfildes): Don't declare.
509 * utils.c (pfildes): Remove.
510
511 2020-04-13 Tom Tromey <tom@tromey.com>
512
513 * server.h (handle_serial_event, handle_target_event): Update.
514 * server.c: Don't call initialize_event_loop.
515 (keep_processing_events): New global.
516 (handle_serial_event): Return void. Set keep_processing_events.
517 (handle_target_event): Return void.
518 (start_event_loop): Move from event-loop.c. Rewrite.
519 * remote-utils.c (handle_accept_event): Return void.
520 (reset_readchar): Use delete_timer.
521 (process_remaining): Return void.
522 (reschedule): Use create_timer.
523 * event-loop.h: Remove.
524 * event-loop.cc: Remove.
525 * Makefile.in (OBS): Use gdbsupport/event-loop.o, not event-loop.o.
526
527 2020-04-13 Tom Tromey <tom@tromey.com>
528
529 * server.c (invoke_async_signal_handlers)
530 (check_async_event_handlers, flush_streams, gdb_select): New
531 functions.
532
533 2020-04-13 Tom Tromey <tom@tromey.com>
534
535 * configure: Rebuild.
536 * config.in: Rebuild.
537
538 2020-04-08 Tom Tromey <tromey@adacore.com>
539
540 PR gdb/22992
541 * win32-low.c (child_continue): Call matching_pending_stop.
542 (get_child_debug_event): Call fetch_pending_stop. Push pending
543 stop when needed.
544
545 2020-04-08 Tom Tromey <tromey@adacore.com>
546
547 * win32-low.h (win32_process_target::stopped_by_sw_breakpoint)
548 (win32_process_target::supports_stopped_by_sw_breakpoint):
549 Declare.
550 * win32-low.c (win32_supports_z_point_type): Always handle
551 Z_PACKET_SW_BP.
552 (win32_insert_point): Call insert_memory_breakpoint when needed.
553 (win32_remove_point): Call remove_memory_breakpoint when needed.
554 (win32_process_target::stopped_by_sw_breakpoint)
555 (win32_process_target::supports_stopped_by_sw_breakpoint): New
556 methods.
557 (win32_target_ops): Update.
558 (maybe_adjust_pc): New function.
559 (win32_wait): Call maybe_adjust_pc.
560
561 2020-04-08 Tom Tromey <tromey@adacore.com>
562
563 * win32-low.h (struct win32_target_ops) <decr_pc_after_break>: New
564 field.
565 * win32-i386-low.c (the_low_target): Update.
566 * win32-arm-low.c (the_low_target): Update.
567
568 2020-04-08 Tom Tromey <tromey@adacore.com>
569
570 * win32-low.h (win32_process_target::read_pc)
571 (win32_process_target::write_pc): Declare.
572 * win32-low.c (win32_process_target::read_pc)
573 (win32_process_target::write_pc): New methods.
574 * win32-i386-low.c (i386_win32_get_pc, i386_win32_set_pc): New
575 functions.
576 (the_low_target): Update.
577 * win32-arm-low.c (arm_win32_get_pc, arm_win32_set_pc): New
578 functions.
579 (the_low_target): Update.
580
581 2020-04-08 Tom Tromey <tromey@adacore.com>
582
583 * win32-low.c (win32_kill, get_child_debug_event): Use
584 wait_for_debug_event.
585
586 2020-04-08 Tom Tromey <tromey@adacore.com>
587
588 * win32-low.c (child_continue): Call continue_last_debug_event.
589
590 2020-04-08 Tom Tromey <tromey@adacore.com>
591
592 * win32-low.c (handle_exception): Remove.
593 (windows_nat::handle_ms_vc_exception): New function.
594 (get_child_debug_event): Add "continue_status" parameter.
595 Update.
596 (win32_wait): Update.
597
598 2020-04-08 Tom Tromey <tromey@adacore.com>
599
600 * win32-low.c (windows_nat::handle_load_dll): Rename from
601 handle_load_dll. No longer static.
602 (windows_nat::handle_unload_dll): Rename from handle_unload_dll.
603 No longer static.
604
605 2020-04-08 Tom Tromey <tromey@adacore.com>
606
607 * win32-low.c (handle_output_debug_string): Add parameter. Change
608 return type.
609 (win32_kill, get_child_debug_event): Update.
610
611 2020-04-08 Tom Tromey <tromey@adacore.com>
612
613 * win32-low.c (current_process_handle, current_process_id)
614 (main_thread_id, last_sig, current_event, siginfo_er): Move to
615 nat/windows-nat.c.
616
617 2020-04-08 Tom Tromey <tromey@adacore.com>
618
619 * win32-low.c (get_image_name): Remove.
620 (handle_load_dll): Update.
621
622 2020-04-08 Tom Tromey <tromey@adacore.com>
623
624 * win32-low.c (windows_nat::thread_rec): Rename from thread_rec.
625 No longer static. Change parameters.
626 (child_add_thread, child_fetch_inferior_registers)
627 (child_store_inferior_registers, win32_resume)
628 (win32_get_tib_address): Update.
629
630 2020-04-08 Tom Tromey <tromey@adacore.com>
631
632 * win32-low.h (struct win32_target_ops): Use qualified names where
633 needed.
634 * win32-i386-low.c: Add "using namespace".
635 * win32-low.c: Add "using namespace".
636 * win32-arm-low.c: Add "using namespace".
637
638 2020-04-08 Tom Tromey <tromey@adacore.com>
639
640 * win32-low.c (delete_thread_info): Don't call CloseHandle.
641
642 2020-04-08 Tom Tromey <tromey@adacore.com>
643
644 * win32-low.c (win32_require_context, suspend_one_thread): Use
645 windows_thread_info::suspend.
646 (continue_one_thread): Use windows_thread_info::resume.
647 * configure.srv (srv_tgtobj): Add windows-nat.o when needed.
648
649 2020-04-08 Tom Tromey <tromey@adacore.com>
650
651 * win32-i386-low.c (update_debug_registers)
652 (i386_prepare_to_resume, i386_thread_added): Update.
653
654 2020-04-08 Tom Tromey <tromey@adacore.com>
655
656 * win32-low.c (child_add_thread): Use new.
657 (delete_thread_info): Use delete.
658
659 2020-04-08 Tom Tromey <tromey@adacore.com>
660
661 * win32-low.h (struct windows_thread_info): Remove.
662
663 2020-04-08 Tom Tromey <tromey@adacore.com>
664
665 * win32-low.h (struct windows_thread_info): Rename from
666 win32_thread_info. Remove typedef.
667 (struct win32_target_ops, win32_require_context): Update.
668 * win32-low.c (win32_get_thread_context)
669 (win32_set_thread_context, win32_prepare_to_resume)
670 (win32_require_context, thread_rec, child_add_thread)
671 (delete_thread_info, continue_one_thread)
672 (child_fetch_inferior_registers, child_store_inferior_registers)
673 (win32_resume, suspend_one_thread, win32_get_tib_address):
674 Update.
675 * win32-i386-low.c (update_debug_registers)
676 (win32_get_current_dr, i386_get_thread_context)
677 (i386_prepare_to_resume, i386_thread_added, i386_single_step)
678 (i386_fetch_inferior_register, i386_store_inferior_register):
679 Update.
680 * win32-arm-low.c (arm_get_thread_context)
681 (arm_fetch_inferior_register, arm_store_inferior_register):
682 Update.
683
684 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
685
686 * linux-low.h (struct linux_target_ops): Remove.
687 (the_low_target): Remove.
688 * linux-x86-low.cc (the_low_target): Remove.
689 * linux-aarch64-low.cc (the_low_target): Ditto.
690 * linux-arm-low.cc (the_low_target): Ditto.
691 * linux-bfin-low.cc (the_low_target): Ditto.
692 * linux-cris-low.cc (the_low_target): Ditto.
693 * linux-crisv32-low.cc (the_low_target): Ditto.
694 * linux-ia64-low.cc (the_low_target): Ditto.
695 * linux-m32r-low.cc (the_low_target): Ditto.
696 * linux-m68k-low.cc (the_low_target): Ditto.
697 * linux-mips-low.cc (the_low_target): Ditto.
698 * linux-nios2-low.cc (the_low_target): Ditto.
699 * linux-ppc-low.cc (the_low_target): Ditto.
700 * linux-riscv-low.cc (the_low_target): Ditto.
701 * linux-s390-low.cc (the_low_target): Ditto.
702 * linux-sh-low.cc (the_low_target): Ditto.
703 * linux-sparc-low.cc (the_low_target): Ditto.
704 * linux-tic6x-low.cc (the_low_target): Ditto.
705 * linux-tile-low.cc (the_low_target): Ditto.
706 * linux-xtensa-low.cc (the_low_target): Ditto.
707
708 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
709
710 Remove the 'get_ipa_tdesc_idx' linux target op and let a concrete
711 linux target define the op by overriding the declaration in
712 process_stratum_target.
713
714 * linux-low.h (struct linux_target_ops): Remove the op.
715 (class linux_process_target) <get_ipa_tdesc_idx>: Remove.
716 * linux-low.cc (linux_process_target::get_ipa_tdesc_idx): Remove.
717 * linux-x86-low.cc (class x86_target) <get_ipa_tdesc_idx>: Declare.
718 (x86_get_ipa_tdesc_idx): Turn into...
719 (x86_target::get_ipa_tdesc_idx): ...this.
720 (the_low_target): Remove the op field.
721 * linux-ppc-low.cc (class ppc_target) <get_ipa_tdesc_idx>: Declare.
722 (ppc_get_ipa_tdesc_idx): Turn into...
723 (ppc_target::get_ipa_tdesc_idx): ...this.
724 (the_low_target): Remove the op field.
725 * linux-s390-low.cc (class s390_target) <get_ipa_tdesc_idx>: Declare.
726 (s390_get_ipa_tdesc_idx): Turn into...
727 (s390_target::get_ipa_tdesc_idx): ...this.
728 (the_low_target): Remove the op field.
729
730 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
731
732 Turn the 'get_syscall_trapinfo' linux target op into a method
733 of process_stratum_target.
734
735 * linux-low.h (struct linux_target_ops): Remove the op.
736 (class linux_process_target) <get_syscall_trapinfo>
737 <gdb_catch_this_syscall>
738 <low_supports_catch_syscall>
739 <low_get_syscall_trapinfo>: Declare.
740 * linux-low.cc (get_syscall_trapinfo): Turn into...
741 (linux_process_target::get_syscall_trapinfo): ...this.
742 (linux_process_target::low_get_syscall_trapinfo): Define.
743 (gdb_catch_this_syscall_p): Turn into...
744 (linux_process_target::gdb_catch_this_syscall): ...this.
745 (linux_process_target::low_supports_catch_syscall): Define.
746
747 Update the callers below.
748
749 (linux_process_target::wait_1)
750 (linux_process_target::supports_catch_syscall)
751
752 * linux-x86-low.cc (class x86_target) <low_supports_catch_syscall>
753 <low_get_syscall_trapinfo>: Declare.
754 (x86_target::low_supports_catch_syscall): Define.
755 (x86_get_syscall_trapinfo): Turn into...
756 (x86_target::low_get_syscall_trapinfo): ...this.
757 (the_low_target): Remove the op field.
758 * linux-aarch64-low.cc (class aarch64_target)
759 <low_supports_catch_syscall>
760 <low_get_syscall_trapinfo>: Declare.
761 (aarch64_target::low_supports_catch_syscall): Define.
762 (aarch64_get_syscall_trapinfo): Turn into...
763 (aarch64_target::low_get_syscall_trapinfo): ...this.
764 (the_low_target): Remove the op field.
765 * linux-arm-low.cc (class arm_target) <low_supports_catch_syscall>
766 <low_get_syscall_trapinfo>: Declare.
767 (arm_target::low_supports_catch_syscall): Define.
768 (arm_get_syscall_trapinfo): Turn into...
769 (arm_target::low_get_syscall_trapinfo): ...this.
770 (the_low_target): Remove the op field.
771 * linux-ppc-low.cc (the_low_target): Remove the op field.
772 * linux-s390-low.cc (the_low_target): Remove the op field.
773
774 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
775
776 Remove the 'supports_hardware_single_step' linux target op and
777 override the process_stratum_target's op definition in
778 linux_process_target to return true.
779
780 * linux-low.h (struct linux_target_ops): Remove the op.
781 (class linux_process_target) <finish_step_over>
782 <maybe_hw_step>: Declare.
783 * linux-low.cc (can_hardware_single_step): Remove.
784 (maybe_hw_step): Turn into...
785 (linux_process_target::maybe_hw_step): ...this.
786 (finish_step_over): Turn into...
787 (linux_process_target::finish_step_over): ...this.
788 (linux_process_target::supports_hardware_single_step): Update
789 to return true.
790
791 Update the callers below.
792
793 (linux_process_target::single_step)
794 (linux_process_target::resume_one_lwp_throw)
795
796 * linux-arm-low.cc (class arm_target)
797 <supports_hardware_single_step>: Declare.
798 (arm_supports_hardware_single_step): Turn into...
799 (arm_target::supports_hardware_single_step): ...this.
800 (the_low_target): Remove the op field.
801 * linux-x86-low.cc (x86_supports_hardware_single_step): Remove.
802 (the_low_target): Remove the op field.
803 * linux-aarch64-low.cc (aarch64_supports_hardware_single_step):
804 Remove.
805 (the_low_target): Remove the op field.
806 * linux-bfin-low.cc (bfin_supports_hardware_single_step): Remove.
807 (the_low_target): Remove the op field.
808 * linux-crisv32-low.cc (cris_supports_hardware_single_step): Remove.
809 (the_low_target): Remove the op field.
810 * linux-m32r-low.cc (m32r_supports_hardware_single_step): Remove.
811 (the_low_target): Remove the op field.
812 * linux-m68k-low.cc (m68k_supports_hardware_single_step): Remove.
813 (the_low_target): Remove the op field.
814 * linux-ppc-low.cc (ppc_supports_hardware_single_step): Remove.
815 (the_low_target): Remove the op field.
816 * linux-s390-low.cc (s390_supports_hardware_single_step): Remove.
817 (the_low_target): Remove the op field.
818 * linux-sh-low.cc (sh_supports_hardware_single_step): Remove.
819 (the_low_target): Remove the op field.
820 * linux-tic6x-low.cc (tic6x_supports_hardware_single_step): Remove.
821 (the_low_target): Remove the op field.
822 * linux-tile-low.cc (tile_supports_hardware_single_step): Remove.
823 (the_low_target): Remove the op field.
824 * linux-xtensa-low.cc (xtensa_supports_hardware_single_step):
825 Remove.
826 (the_low_target): Remove the op field.
827
828 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
829
830 Turn the 'supports_range_stepping' linux target op into a method
831 of linux_process_target.
832
833 * linux-low.h (struct linux_target_ops): Remove the op.
834 (class linux_process_target) <low_supports_range_stepping>: Declare.
835 * linux-low.cc (linux_process_target::low_supports_range_stepping):
836 Define.
837 (linux_process_target::supports_range_stepping): Update the call
838 site.
839 * linux-x86-low.cc (class x86_target)
840 <low_supports_range_stepping>: Declare.
841 (x86_supports_range_stepping): Turn into...
842 (x86_target::low_supports_range_stepping): ...this.
843 (the_low_target): Remove the op field.
844 * linux-aarch64-low.cc (class aarch64_target)
845 <low_supports_range_stepping>: Declare.
846 (aarch64_supports_range_stepping): Turn into...
847 (aarch64_target::low_supports_range_stepping): ...this.
848 (the_low_target): Remove the op field.
849 * linux-arm-low.cc (the_low_target): Remove the op field.
850 * linux-bfin-low.cc (the_low_target): Ditto.
851 * linux-crisv32-low.cc (the_low_target): Ditto.
852 * linux-m32r-low.cc (the_low_target): Ditto.
853 * linux-m68k-low.cc (the_low_target): Ditto.
854 * linux-ppc-low.cc (the_low_target): Ditto.
855 * linux-s390-low.cc (the_low_target): Ditto.
856 * linux-sh-low.cc (the_low_target): Ditto.
857 * linux-tic6x-low.cc (the_low_target): Ditto.
858 * linux-tile-low.cc (the_low_target): Ditto.
859 * linux-xtensa-low.cc (the_low_target): Ditto.
860
861 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
862
863 Remove the 'emit_ops' linux target ops and let the concrete
864 linux target define the op by overriding the declaration of
865 process_stratum_target.
866
867 * linux-low.h (struct linux_target_ops): Remove the op.
868 (class linux_process_target) <emit_ops>: Remove.
869 * linux-low.cc (linux_process_target::emit_ops): Remove.
870 * linux-x86-low.cc (class x86_target) <emit_ops>: Declare.
871 (x86_emit_ops): Turn into...
872 (x86_target::emit_ops): ...this.
873 (the_low_target): Remove the op field.
874 * linux-aarch64-low.cc (class aarch64_target) <emit_ops>: Declare.
875 (aarch64_emit_ops): Turn into...
876 (aarch64_target::emit_ops): ...this.
877 (the_low_target): Remove the op field.
878 * linux-ppc-low.cc (class ppc_target) <emit_ops>: Declare.
879 (ppc_emit_ops): Turn into...
880 (ppc_target::emit_ops): ...this.
881 (the_low_target): Remove the op field.
882 * linux-s390-low.cc (class s390_target) <emit_ops>: Declare.
883 (s390_emit_ops): Turn into...
884 (s390_target::emit_ops): ...this.
885 (the_low_target): Remove the op field.
886 * linux-arm-low.cc (the_low_target): Remove the op field.
887 * linux-bfin-low.cc (the_low_target): Ditto.
888 * linux-crisv32-low.cc (the_low_target): Ditto.
889 * linux-m32r-low.cc (the_low_target): Ditto.
890 * linux-m68k-low.cc (the_low_target): Ditto.
891 * linux-sh-low.cc (the_low_target): Ditto.
892 * linux-tic6x-low.cc (the_low_target): Ditto.
893 * linux-tile-low.cc (the_low_target): Ditto.
894 * linux-xtensa-low.cc (the_low_target): Ditto.
895
896 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
897
898 Remove the 'install_fast_tracepoint_jump_pad' and
899 'get_min_fast_tracepoint_insn_len' linux target ops to let the
900 concrete linux target define the ops by overriding the declarations
901 of process_stratum_target.
902
903 * linux-low.h (struct linux_target_ops): Remove the ops.
904 (class linux_process_target) <supports_fast_tracepoints>
905 <install_fast_tracepoint_jump_pad>
906 <get_min_fast_tracepoint_insn_len>: Remove.
907 * linux-low.cc (linux_process_target::supports_fast_tracepoints)
908 (linux_process_target::install_fast_tracepoint_jump_pad)
909 (linux_process_target::get_min_fast_tracepoint_insn_len): Remove.
910 * linux-x86-low.cc (class x86_target) <supports_fast_tracepoints>
911 <install_fast_tracepoint_jump_pad>
912 <get_min_fast_tracepoint_insn_len>: Declare.
913 (x86_target::supports_fast_tracepoints): Define.
914 (x86_install_fast_tracepoint_jump_pad): Turn into...
915 (x86_target::install_fast_tracepoint_jump_pad): ...this.
916 (x86_get_min_fast_tracepoint_insn_len): Turn into...
917 (x86_target::get_min_fast_tracepoint_insn_len): ...this.
918 (the_low_target): Remove the op fields.
919 * linux-aarch64-low.cc (class aarch64_target)
920 <supports_fast_tracepoints>
921 <install_fast_tracepoint_jump_pad>
922 <get_min_fast_tracepoint_insn_len>: Declare.
923 (aarch64_target::supports_fast_tracepoints): Define.
924 (aarch64_install_fast_tracepoint_jump_pad): Turn into...
925 (aarch64_target::install_fast_tracepoint_jump_pad): ...this.
926 (aarch64_get_min_fast_tracepoint_insn_len): Turn into...
927 (aarch64_target::get_min_fast_tracepoint_insn_len): ...this.
928 (the_low_target): Remove the op fields.
929 * linux-ppc-low.cc (class ppc_target) <supports_fast_tracepoints>
930 <install_fast_tracepoint_jump_pad>
931 <get_min_fast_tracepoint_insn_len>: Declare.
932 (ppc_target::supports_fast_tracepoints): Define.
933 (ppc_install_fast_tracepoint_jump_pad): Turn into...
934 (ppc_target::install_fast_tracepoint_jump_pad): ...this.
935 (ppc_get_min_fast_tracepoint_insn_len): Turn into...
936 (ppc_target::get_min_fast_tracepoint_insn_len): ...this.
937 (the_low_target): Remove the op fields.
938 * linux-s390-low.cc (class s390_target) <supports_fast_tracepoints>
939 <install_fast_tracepoint_jump_pad>
940 <get_min_fast_tracepoint_insn_len>: Declare.
941 (s390_target::supports_fast_tracepoints): Define.
942 (s390_install_fast_tracepoint_jump_pad): Turn into...
943 (s390_target::install_fast_tracepoint_jump_pad): ...this.
944 (s390_get_min_fast_tracepoint_insn_len): Turn into...
945 (s390_target::get_min_fast_tracepoint_insn_len): ...this.
946 (the_low_target): Remove the op fields.
947 * linux-arm-low.cc (the_low_target): Remove the op fields.
948 * linux-bfin-low.cc (the_low_target): Ditto.
949 * linux-crisv32-low.cc (the_low_target): Ditto.
950 * linux-m32r-low.cc (the_low_target): Ditto.
951 * linux-m68k-low.cc (the_low_target): Ditto.
952 * linux-sh-low.cc (the_low_target): Ditto.
953 * linux-tic6x-low.cc (the_low_target): Ditto.
954 * linux-tile-low.cc (the_low_target): Ditto.
955 * linux-xtensa-low.cc (the_low_target): Ditto.
956
957 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
958
959 Turn the 'get_thread_area' linux target op into a method of
960 process_stratum_target.
961
962 * linux-low.h (struct linux_target_ops): Remove the op.
963 (class linux_process_target) <stuck_in_jump_pad>
964 <linux_fast_tracepoint_collecting>
965 <low_get_thread_area>: Declare.
966 * linux-low.cc (supports_fast_tracepoints): Remove.
967 (linux_fast_tracepoint_collecting): Turn into...
968 (linux_process_target::linux_fast_tracepoint_collecting): ...this.
969 (linux_process_target::low_get_thread_area): Define.
970 (stuck_in_jump_pad_callback): Turn into...
971 (linux_process_target::stuck_in_jump_pad): ...this.
972
973 Update the caller below.
974
975 (linux_process_target::stabilize_threads)
976
977 * linux-x86-low.cc (class x86_target) <low_get_thread_area>:
978 Declare.
979 (x86_get_thread_area): Turn into...
980 (x86_target::low_get_thread_area): ...this.
981 (the_low_target): Remove the op field.
982 * linux-aarch64-low.cc (class aarch64_target) <low_get_thread_area>:
983 Declare.
984 (aarch64_get_thread_area): Turn into...
985 (aarch64_target::low_get_thread_area): ...this.
986 (the_low_target): Remove the op field.
987 * linux-ppc-low.cc (class ppc_target) <low_get_thread_area>:
988 Declare.
989 (ppc_get_thread_area): Turn into...
990 (ppc_target::low_get_thread_area): ...this.
991 (the_low_target): Remove the op field.
992 * linux-s390-low.cc (class s390_target) <low_get_thread_area>:
993 Declare.
994 (s390_get_thread_area): Turn into...
995 (s390_target::low_get_thread_area): ...this.
996 (the_low_target): Remove the op field.
997 * linux-arm-low.cc (the_low_target): Remove the op field.
998 * linux-bfin-low.cc (the_low_target): Ditto.
999 * linux-crisv32-low.cc (the_low_target): Ditto.
1000 * linux-m32r-low.cc (the_low_target): Ditto.
1001 * linux-m68k-low.cc (the_low_target): Ditto.
1002 * linux-sh-low.cc (the_low_target): Ditto.
1003 * linux-tic6x-low.cc (the_low_target): Ditto.
1004 * linux-tile-low.cc (the_low_target): Ditto.
1005 * linux-xtensa-low.cc (the_low_target): Ditto.
1006
1007 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1008
1009 Remote the 'supports_tracepoints' linux target op and let the
1010 concrete linux target define it by overriding the op declared in
1011 process_stratum_target.
1012
1013 * linux-low.h (struct linux_target_ops): Remove the op.
1014 (class linux_process_target) <supports_tracepoints>: Remove.
1015 * linux-low.cc (linux_process_target::supports_tracepoints): Remove.
1016 * linux-x86-low.cc (class x86_target) <supports_tracepoints>:
1017 Declare.
1018 (x86_supports_tracepoints): Turn into...
1019 (x86_target::supports_tracepoints): ...this.
1020 (the_low_target): Remove the op field.
1021 * linux-aarch64-low.cc (class aarch64_target)
1022 <supports_tracepoints>: Declare.
1023 (aarch64_supports_tracepoints): Turn into...
1024 (aarch64_target::supports_tracepoints): ...this.
1025 (the_low_target): Remove the op field.
1026 * linux-ppc-low.cc (class ppc_target) <supports_tracepoints>:
1027 Declare.
1028 (ppc_supports_tracepoints): Turn into...
1029 (ppc_target::supports_tracepoints): ...this.
1030 (the_low_target): Remove the op field.
1031 * linux-s390-low.cc (class s390_target) <supports_tracepoints>:
1032 Declare.
1033 (s390_supports_tracepoints): Turn into...
1034 (s390_target::supports_tracepoints): ...this.
1035 (the_low_target): Remove the op field.
1036 * linux-arm-low.cc (the_low_target): Remove the op field.
1037 * linux-bfin-low.cc (the_low_target): Ditto.
1038 * linux-crisv32-low.cc (the_low_target): Ditto.
1039 * linux-m32r-low.cc (the_low_target): Ditto.
1040 * linux-m68k-low.cc (the_low_target): Ditto.
1041 * linux-sh-low.cc (the_low_target): Ditto.
1042 * linux-tic6x-low.cc (the_low_target): Ditto.
1043 * linux-tile-low.cc (the_low_target): Ditto.
1044 * linux-xtensa-low.cc (the_low_target): Ditto.
1045
1046 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1047
1048 Remove the 'process_qsupported' linux target op and let a concrete
1049 linux target define the op by overriding the op declaration in
1050 process_stratum_target.
1051
1052 * linux-low.h (struct linux_target_ops): Remove the op.
1053 (class linux_process_target) <process_qsupported>: Remove.
1054 * linux-low.cc (linux_process_target::process_qsupported): Remove.
1055 * linux-x86-low.cc (class x86_target) <process_qsupported>: Declare.
1056 (x86_linux_process_qsupported): Turn into...
1057 (x86_target::process_qsupported): ...this.
1058 (the_low_target): Remove the op field.
1059 * linux-aarch64-low.cc (the_low_target): Remove the op
1060 field.
1061 * linux-arm-low.cc (the_low_target): Ditto.
1062 * linux-bfin-low.cc (the_low_target): Ditto.
1063 * linux-crisv32-low.cc (the_low_target): Ditto.
1064 * linux-m32r-low.cc (the_low_target): Ditto.
1065 * linux-m68k-low.cc (the_low_target): Ditto.
1066 * linux-ppc-low.cc (the_low_target): Ditto.
1067 * linux-s390-low.cc (the_low_target): Ditto.
1068 * linux-sh-low.cc (the_low_target): Ditto.
1069 * linux-tic6x-low.cc (the_low_target): Ditto.
1070 * linux-tile-low.cc (the_low_target): Ditto.
1071 * linux-xtensa-low.cc (the_low_target): Ditto.
1072
1073 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1074
1075 Turn the 'prepare_to_resume' linux target op into a method of
1076 linux_process_target.
1077
1078 * linux-low.h (struct linux_target_ops): Remove the op.
1079 (class linux_process_target) <low_prepare_to_resume>: Declare.
1080 * linux-low.cc (linux_process_target::low_prepare_to_resume):
1081 Define.
1082
1083 Update the callers below:
1084
1085 (linux_process_target::resume_one_lwp_throw)
1086 (linux_process_target::low_prepare_to_resume)
1087
1088 * linux-x86-low.cc (class x86_target) <low_prepare_to_resume>:
1089 Declare.
1090 (x86_target::low_prepare_to_resume): Define.
1091 (the_low_target): Remove the op field.
1092 * linux-aarch64-low.cc (class aarch64_target)
1093 <low_prepare_to_resume>: Declare.
1094 (aarch64_target::low_prepare_to_resume): Define.
1095 (the_low_target): Remove the op field.
1096 * linux-arm-low.cc (class arm_target) <low_prepare_to_resume>:
1097 Declare.
1098 (arm_prepare_to_resume): Turn into...
1099 (arm_target::low_prepare_to_resume): ...this.
1100 (the_low_target): Remove the op field.
1101 * linux-mips-low.cc (class mips_target) <low_prepare_to_resume>:
1102 Declare.
1103 (mips_linux_prepare_to_resume): Turn into...
1104 (mips_target::low_prepare_to_resume): ...this.
1105 (the_low_target): Remove the op field.
1106 * linux-bfin-low.cc (the_low_target): Remove the op field.
1107 * linux-crisv32-low.cc (the_low_target): Ditto.
1108 * linux-m32r-low.cc (the_low_target): Ditto.
1109 * linux-m68k-low.cc (the_low_target): Ditto.
1110 * linux-ppc-low.cc (the_low_target): Ditto.
1111 * linux-s390-low.cc (the_low_target): Ditto.
1112 * linux-sh-low.cc (the_low_target): Ditto.
1113 * linux-tic6x-low.cc (the_low_target): Ditto.
1114 * linux-tile-low.cc (the_low_target): Ditto.
1115 * linux-xtensa-low.cc (the_low_target): Ditto.
1116
1117 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1118
1119 Turn the 'new_process', 'delete_process', 'new_thread',
1120 'delete_thread', and 'new_fork' linux target ops into methods
1121 of linux_process_target.
1122
1123 * linux-low.h (struct linux_target_ops): Remove the ops.
1124 (class linux_process_target) <add_linux_process>
1125 <add_lwp>
1126 <delete_lwp>
1127 <attach_lwp>
1128 <detach_one_lwp>
1129 <check_zombie_leaders>
1130 <filter_exit_event>
1131 <low_new_process>
1132 <low_delete_process>
1133 <low_new_thread>
1134 <low_delete_thread>
1135 <low_new_fork>: Declare.
1136 * linux-low.cc (delete_lwp): Turn into...
1137 (linux_process_target::delete_lwp): ...this.
1138 (linux_process_target::low_delete_thread): Define.
1139 (linux_add_process): Turn into...
1140 (linux_process_target::add_linux_process): ...this.
1141 (linux_process_target::low_new_process): Define.
1142 (linux_process_target::low_delete_process): Define.
1143 (linux_process_target::low_new_fork): Define.
1144 (add_lwp): Turn into...
1145 (linux_process_target::add_lwp): ...this.
1146 (linux_process_target::low_new_thread): Define.
1147 (linux_attach_lwp): Turn into...
1148 (linux_process_target::attach_lwp): ...this.
1149 (linux_detach_one_lwp): Turn into...
1150 (linux_process_target::detach_one_lwp): ...this.
1151 (linux_detach_lwp_callback): Remove and inline...
1152 (linux_process_target::detach): ...here.
1153 (check_zombie_leaders): Turn into...
1154 (linux_process_target::check_zombie_leaders): ...this.
1155 (filter_exit_event): Turn into...
1156 (linux_process_target::filter_exit_event): ...this.
1157
1158 Update the callers below.
1159
1160 (linux_process_target::handle_extended_wait)
1161 (linux_process_target::create_inferior)
1162 (attach_proc_task_lwp_callback)
1163 (linux_process_target::attach)
1164 (linux_process_target::detach)
1165 (linux_process_target::mourn)
1166 * thread-db.cc (attach_thread)
1167
1168 * linux-x86-low.cc (class x86_target) <low_new_process>
1169 <low_delete_process>
1170 <low_new_thread>
1171 <low_delete_thread>
1172 <low_new_fork>: Declare.
1173 (x86_linux_new_process): Turn into...
1174 (x86_target::low_new_process): ...this.
1175 (x86_linux_delete_process): Turn into...
1176 (x86_target::low_delete_process): ...this.
1177 (x86_target::low_new_thread): Define.
1178 (x86_target::low_delete_thread): Define.
1179 (x86_linux_new_fork): Turn into...
1180 (x86_target::low_new_fork): ...this.
1181 (the_low_target): Remove the op fields.
1182 * linux-aarch64-low.cc (class aarch64_target) <low_new_process>
1183 <low_delete_process>
1184 <low_new_thread>
1185 <low_delete_thread>
1186 <low_new_fork>: Declare.
1187 (aarch64_linux_new_process): Turn into...
1188 (aarch64_target::low_new_process): ...this.
1189 (aarch64_linux_delete_process): Turn into...
1190 (aarch64_target::low_delete_process): ...this.
1191 (aarch64_target::low_new_thread): Define.
1192 (aarch64_target::low_delete_thread): Define.
1193 (aarch64_linux_new_fork): Turn into...
1194 (aarch64_target::low_new_fork): ...this.
1195 (the_low_target): Remove the op fields.
1196 * linux-arm-low.cc (class arm_target) <low_new_process>
1197 <low_delete_process>
1198 <low_new_thread>
1199 <low_delete_thread>
1200 <low_new_fork>: Declare.
1201 (arm_new_process): Turn into...
1202 (arm_target::low_new_process): ...this.
1203 (arm_delete_process): Turn into...
1204 (arm_target::low_delete_process): ...this.
1205 (arm_new_thread): Turn into...
1206 (arm_target::low_new_thread): ...this.
1207 (arm_delete_thread): Turn into...
1208 (arm_target::low_delete_thread): ...this.
1209 (arm_new_fork): Turn into...
1210 (arm_target::low_new_fork): ...this.
1211 (the_low_target): Remove the op fields.
1212 * linux-mips-low.cc (class mips_target) <low_new_process>
1213 <low_delete_process>
1214 <low_new_thread>
1215 <low_delete_thread>
1216 <low_new_fork>: Declare.
1217 (mips_linux_new_process): Turn into...
1218 (mips_target::low_new_process): ...this.
1219 (mips_linux_delete_process): Turn into...
1220 (mips_target::low_delete_process): ...this.
1221 (mips_linux_new_thread): Turn into...
1222 (mips_target::low_new_thread): ...this.
1223 (mips_linux_delete_thread): Turn into...
1224 (mips_target::low_delete_thread): ...this.
1225 (mips_linux_new_fork): Turn into...
1226 (mips_target::low_new_fork): ...this.
1227 (the_low_target): Remove the op fields.
1228 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1229 * linux-crisv32-low.cc (the_low_target): Ditto.
1230 * linux-m32r-low.cc (the_low_target): Ditto.
1231 * linux-m68k-low.cc (the_low_target): Ditto.
1232 * linux-ppc-low.cc (the_low_target): Ditto.
1233 * linux-s390-low.cc (the_low_target): Ditto.
1234 * linux-sh-low.cc (the_low_target): Ditto.
1235 * linux-tic6x-low.cc (the_low_target): Ditto.
1236 * linux-tile-low.cc (the_low_target): Ditto.
1237 * linux-xtensa-low.cc (the_low_target): Ditto.
1238
1239 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1240
1241 Turn the 'siginfo_fixup' linux target op into a method of
1242 linux_process_target.
1243
1244 * linux-low.h (struct linux_target_ops): Remove the op.
1245 (class linux_process_target) <siginfo_fixup>
1246 <low_siginfo_fixup>: Declare.
1247 * linux-low.cc (siginfo_fixup): Turn into...
1248 (linux_process_target::siginfo_fixup): ...this.
1249 (linux_process_target::low_siginfo_fixup): Define.
1250 * linux-x86-low.cc (class x86_target) <low_siginfo_fixup>: Declare.
1251 (x86_siginfo_fixup): Turn into...
1252 (x86_target::low_siginfo_fixup): ...this.
1253 (the_low_target): Remove the op field.
1254 * linux-aarch64-low.cc (class aarch64_target):
1255 <low_siginfo_fixup>: Declare.
1256 (aarch64_linux_siginfo_fixup): Turn into...
1257 (aarch64_target::low_siginfo_fixup): ...this.
1258 (the_low_target): Remove the op field.
1259 * linux-arm-low.cc (the_low_target): Remove the op field.
1260 * linux-bfin-low.cc (the_low_target): Ditto.
1261 * linux-crisv32-low.cc (the_low_target): Ditto.
1262 * linux-m32r-low.cc (the_low_target): Ditto.
1263 * linux-m68k-low.cc (the_low_target): Ditto.
1264 * linux-mips-low.cc (the_low_target): Ditto.
1265 * linux-ppc-low.cc (the_low_target): Ditto.
1266 * linux-s390-low.cc (the_low_target): Ditto.
1267 * linux-sh-low.cc (the_low_target): Ditto.
1268 * linux-tic6x-low.cc (the_low_target): Ditto.
1269 * linux-tile-low.cc (the_low_target): Ditto.
1270 * linux-xtensa-low.cc (the_low_target): Ditto.
1271
1272 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1273
1274 Turn the 'collect_ptrace_register' and 'supply_ptrace_register'
1275 linux target ops into methods of linux_process_target.
1276
1277 * linux-low.h (struct linux_target_ops): Remove the ops.
1278 (class linux_process_target) <low_collect_ptrace_register>
1279 <low_store_ptrace_register>: Declare.
1280 * linux-low.cc (linux_process_target::low_collect_ptrace_register)
1281 (linux_process_target::low_supply_ptrace_register): Define.
1282
1283 Update the callers below.
1284
1285 (linux_process_target::fetch_register)
1286 (linux_process_target::store_register)
1287
1288 * linux-x86-low.cc (the_low_target): Remove the op fields.
1289 * linux-aarch64-low.cc (the_low_target): Ditto.
1290 * linux-arm-low.cc (the_low_target): Ditto.
1291 * linux-bfin-low.cc (the_low_target): Ditto.
1292 * linux-crisv32-low.cc (the_low_target): Ditto.
1293 * linux-m32r-low.cc (the_low_target): Ditto.
1294 * linux-m68k-low.cc (the_low_target): Ditto.
1295 * linux-sh-low.cc (the_low_target): Ditto.
1296 * linux-sparc-low.cc (the_low_target): Ditto.
1297 * linux-tic6x-low.cc (the_low_target): Ditto.
1298 * linux-tile-low.cc (the_low_target): Ditto.
1299 * linux-xtensa-low.cc (the_low_target): Ditto.
1300 * linux-mips-low.cc (class mips_target)
1301 <low_collect_ptrace_register>
1302 <low_supply_ptrace_register>: Declare.
1303 (mips_collect_ptrace_register): Turn into ...
1304 (mips_target::low_collect_ptrace_register): ...this.
1305 (mips_supply_ptrace_register): Turn into...
1306 (mips_target::low_supply_ptrace_register): ...this.
1307 (the_low_target): Remove the op fields.
1308 * linux-ppc-low.cc (class ppc_target)
1309 <low_collect_ptrace_register>
1310 <low_supply_ptrace_register>: Declare.
1311 (ppc_collect_ptrace_register): Turn into ...
1312 (ppc_target::low_collect_ptrace_register): ...this.
1313 (ppc_supply_ptrace_register): Turn into ...
1314 (ppc_target::low_supply_ptrace_register): ...this.
1315 (ppc_fill_gregset): Update for the calls to
1316 low_collect_ptrace_register.
1317 (the_low_target): Remove the op fields.
1318 * linux-s390-low.cc (class s390_target)
1319 <low_collect_ptrace_register>
1320 <low_supply_ptrace_register>: Declare.
1321 (s390_collect_ptrace_register): Turn into ...
1322 (s390_target::low_collect_ptrace_register): ...this.
1323 (s390_supply_ptrace_register): Turn into ...
1324 (s390_target::low_supply_ptrace_register): ...this.
1325 (s390_fill_gregset): Update for the calls to
1326 low_collect_ptrace_register.
1327 (the_low_target): Remove the op fields.
1328
1329 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1330
1331 Turn the 'stopped_by_watchpoint' and 'stopped_data_address' linux
1332 target ops into methods of linux_process_target.
1333
1334 * linux-low.h (struct linux_target_ops): Remove the ops.
1335 (class linux_process_target) <check_stopped_by_watchpoint>
1336 <low_stopped_by_watchpoint>
1337 <low_stopped_data_address>: Declare.
1338 * linux-low.cc (check_stopped_by_watchpoint): Turn into...
1339 (linux_process_target::check_stopped_by_watchpoint): ...this.
1340 (linux_process_target::low_stopped_by_watchpoint): Define.
1341 (linux_process_target::low_stopped_data_address): Define.
1342 * linux-x86-low.cc (class x86_target) <low_stopped_by_watchpoint>
1343 <low_stopped_data_address>: Declare.
1344 (x86_stopped_by_watchpoint): Turn into...
1345 (x86_target::low_stopped_by_watchpoint): ...this.
1346 (x86_stopped_data_address): Turn into...
1347 (x86_target::low_stopped_data_address): ...this.
1348 (the_low_target): Remove the op fields.
1349 * linux-aarch64-low.cc (class aarch64_target)
1350 <low_stopped_by_watchpoint>
1351 <low_stopped_data_address>: Declare.
1352 (aarch64_stopped_by_watchpoint): Turn into...
1353 (aarch64_target::low_stopped_by_watchpoint): ...this.
1354 (aarch64_stopped_data_address): Turn into...
1355 (aarch64_target::low_stopped_data_address): ...this.
1356 (the_low_target): Remove the op fields.
1357 * linux-arm-low.cc (class arm_target) <low_stopped_by_watchpoint>
1358 <low_stopped_data_address>: Declare.
1359 (arm_stopped_by_watchpoint): Turn into...
1360 (arm_target::low_stopped_by_watchpoint): ...this.
1361 (arm_stopped_data_address): Turn into...
1362 (arm_target::low_stopped_data_address): ...this.
1363 (the_low_target): Remove the op fields.
1364 * linux-crisv32-low.cc (class crisv32_target)
1365 <low_stopped_by_watchpoint>
1366 <low_stopped_data_address>: Declare.
1367 (cris_stopped_by_watchpoint): Turn into...
1368 (crisv32_target::low_stopped_by_watchpoint): ...this.
1369 (cris_stopped_data_address): Turn into...
1370 (crisv32_target::low_stopped_data_address): ...this.
1371 (the_low_target): Remove the op fields.
1372 * linux-mips-low.cc (class mips_target) <low_stopped_by_watchpoint>
1373 <low_stopped_data_address>: Declare.
1374 (mips_stopped_by_watchpoint): Turn into...
1375 (mips_target::low_stopped_by_watchpoint): ...this.
1376 (mips_stopped_data_address): Turn into...
1377 (mips_target::low_stopped_data_address): ...this.
1378 (the_low_target): Remove the op fields.
1379 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1380 * linux-m32r-low.cc (the_low_target): Ditto.
1381 * linux-m68k-low.cc (the_low_target): Ditto.
1382 * linux-ppc-low.cc (the_low_target): Ditto.
1383 * linux-s390-low.cc (the_low_target): Ditto.
1384 * linux-sh-low.cc (the_low_target): Ditto.
1385 * linux-sparc-low.cc (the_low_target): Ditto.
1386 * linux-tic6x-low.cc (the_low_target): Ditto.
1387 * linux-tile-low.cc (the_low_target): Ditto.
1388 * linux-xtensa-low.cc (the_low_target): Ditto.
1389
1390 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1391
1392 Turn the 'insert_point' and 'remove_point' linux target ops into
1393 methods of linux_process_target.
1394
1395 * linux-low.h (struct linux_target_ops): Remove the ops.
1396 (class linux_process_target) <low_insert_point>
1397 <low_remove_point>: Declare.
1398 * linux-low.cc (linux_process_target::low_insert_point)
1399 (linux_process_target::low_remove_point): Define.
1400 (linux_process_target::insert_point)
1401 (linux_process_target::remove_point): Update for calls to
1402 low_insert_point and low_remove_point.
1403 * linux-x86-low.cc (class x86_target) <low_insert_point>
1404 <low_remove_point>: Declare.
1405 (x86_insert_point): Turn into...
1406 (x86_target::low_insert_point): ...this.
1407 (x86_remove_point): Turn into...
1408 (x86_target::low_remove_point): ...this.
1409 (the_low_target): Remove the op fields.
1410 * linux-aarch64-low.cc (class aarch64_target) <low_insert_point>
1411 <low_remove_point>: Declare.
1412 (aarch64_insert_point): Turn into...
1413 (aarch64_target::low_insert_point): ...this.
1414 (aarch64_remove_point): Turn into...
1415 (aarch64_target::low_remove_point): ...this.
1416 (the_low_target): Remove the op fields.
1417 * linux-arm-low.cc (class arm_target) <low_insert_point>
1418 <low_remove_point>: Declare.
1419 (arm_insert_point): Turn into...
1420 (arm_target::low_insert_point): ...this.
1421 (arm_remove_point): Turn into...
1422 (arm_target::low_remove_point): ...this.
1423 (the_low_target): Remove the op fields.
1424 * linux-crisv32-low.cc (class crisv32_target) <low_insert_point>
1425 <low_remove_point>: Declare.
1426 (crisv32_insert_point): Turn into...
1427 (crisv32_target::low_insert_point): ...this.
1428 (crisv32_remove_point): Turn into...
1429 (crisv32_target::low_remove_point): ...this.
1430 (the_low_target): Remove the op fields.
1431 * linux-mips-low.cc (class mips_target) <low_insert_point>
1432 <low_remove_point>: Declare.
1433 (mips_insert_point): Turn into...
1434 (mips_target::low_insert_point): ...this.
1435 (mips_remove_point): Turn into...
1436 (mips_target::low_remove_point): ...this.
1437 (the_low_target): Remove the op fields.
1438 * linux-ppc-low.cc (class ppc_target) <low_insert_point>
1439 <low_remove_point>: Declare.
1440 (ppc_insert_point): Turn into...
1441 (ppc_target::low_insert_point): ...this.
1442 (ppc_remove_point): Turn into...
1443 (ppc_target::low_remove_point): ...this.
1444 (the_low_target): Remove the op fields.
1445 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1446 * linux-m32r-low.cc (the_low_target): Ditto.
1447 * linux-m68k-low.cc (the_low_target): Ditto.
1448 * linux-s390-low.cc (the_low_target): Ditto.
1449 * linux-sh-low.cc (the_low_target): Ditto.
1450 * linux-sparc-low.cc (the_low_target): Ditto.
1451 * linux-tic6x-low.cc (the_low_target): Ditto.
1452 * linux-tile-low.cc (the_low_target): Ditto.
1453 * linux-xtensa-low.cc (the_low_target): Ditto.
1454
1455 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1456
1457 Remove the 'supports_z_point_type' linux target op and let the
1458 concrete linux target define it by overriding the op declared in
1459 process_stratum_target.
1460
1461 * linux-low.cc (linux_process_target::supports_z_point_type):
1462 Remove.
1463 * linux-low.h (struct linux_target_ops): Remove the op.
1464 (class linux_process_target) <supports_z_point_type>: Remove.
1465 * linux-x86-low.cc (class x86_target) <supports_z_point_type>:
1466 Declare.
1467 (x86_supports_z_point_type): Turn into...
1468 (x86_target::supports_z_point_type): ...this.
1469 (the_low_target): Remove the op field.
1470 * linux-aarch64-low.cc (class aarch64_target)
1471 <supports_z_point_type>: Declare.
1472 (aarch64_supports_z_point_type): Turn into...
1473 (aarch64_target::supports_z_point_type): ...this.
1474 (the_low_target): Remove the op field.
1475 * linux-arm-low.cc (class arm_target) <supports_z_point_type>:
1476 Declare.
1477 (arm_supports_z_point_type): Turn into...
1478 (arm_target::supports_z_point_type): ...this.
1479 (the_low_target): Remove the op field.
1480 * linux-crisv32-low.cc (class crisv32_target)
1481 <supports_z_point_type>: Declare.
1482 (cris_supports_z_point_type): Turn into...
1483 (crisv32_target::supports_z_point_type): ...this.
1484 (the_low_target): Remove the op field.
1485 * linux-mips-low.cc (class mips_target) <supports_z_point_type>:
1486 Declare.
1487 (mips_supports_z_point_type): Turn into...
1488 (mips_target::supports_z_point_type): ...this.
1489 (the_low_target): Remove the op field.
1490 * linux-ppc-low.cc (class ppc_target) <supports_z_point_type>:
1491 Declare.
1492 (ppc_supports_z_point_type): Turn into...
1493 (ppc_target::supports_z_point_type): ...this.
1494 (the_low_target): Remove the op field.
1495 * linux-s390-low.cc (class s390_target) <supports_z_point_type>:
1496 Declare.
1497 (s390_supports_z_point_type): Turn into...
1498 (s390_target::supports_z_point_type): ...this.
1499 (the_low_target): Remove the op field.
1500 * linux-bfin-low.cc (the_low_target): Remove the op field.
1501 * linux-m32r-low.cc (the_low_target): Ditto.
1502 * linux-m68k-low.cc (the_low_target): Ditto.
1503 * linux-sh-low.cc (the_low_target): Ditto.
1504 * linux-sparc-low.cc (the_low_target): Ditto.
1505 * linux-tic6x-low.cc (the_low_target): Ditto.
1506 * linux-tile-low.cc (the_low_target): Ditto.
1507 * linux-xtensa-low.cc (the_low_target): Ditto.
1508
1509 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1510
1511 Turn the 'breakpoint_at' linux target op into a method of
1512 linux_process_target.
1513
1514 * linux-low.h (struct linux_target_ops): Remove the op.
1515 (class linux_process_target) <low_breakpoint_at>: Declare.
1516
1517 Update the callers below:
1518
1519 * linux-low.cc (linux_process_target::save_stop_reason)
1520 (linux_process_target::thread_still_has_status_pending)
1521 (linux_process_target::wait_1)
1522
1523 * linux-x86-low.cc (class x86_target)
1524 <low_breakpoint_at>: Declare.
1525 (x86_breakpoint_at): Turn into...
1526 (x86_target::low_breakpoint_at): ...this.
1527 (the_low_target): Remove the op field.
1528 * linux-aarch64-low.cc (class aarch64_target)
1529 <low_breakpoint_at>: Declare.
1530 (aarch64_breakpoint_at): Turn into...
1531 (aarch64_target::low_breakpoint_at): ...this.
1532 (the_low_target): Remove the op field.
1533 * linux-arm-low.cc (class arm_target)
1534 <low_breakpoint_at>: Declare.
1535 (arm_target::low_breakpoint_at): Define.
1536 (the_low_target): Remove the op field.
1537 * linux-bfin-low.cc (class bfin_target)
1538 <low_breakpoint_at>: Declare.
1539 (bfin_breakpoint_at): Turn into...
1540 (bfin_target::low_breakpoint_at): ...this.
1541 (the_low_target): Remove the op field.
1542 * linux-cris-low.cc (class cris_target)
1543 <low_breakpoint_at>: Declare.
1544 (cris_breakpoint_at): Turn into...
1545 (cris_target::low_breakpoint_at): ...this.
1546 (the_low_target): Remove the op field.
1547 * linux-crisv32-low.cc (class crisv32_target)
1548 <low_breakpoint_at>: Declare.
1549 (crisv32_breakpoint_at): Turn into...
1550 (crisv32_target::low_breakpoint_at): ...this.
1551 (the_low_target): Remove the op field.
1552 * linux-ia64-low.cc (class ia64_target)
1553 <low_breakpoint_at>: Declare.
1554 (ia64_target::low_breakpoint_at): Define.
1555 * linux-m32r-low.cc (class m32r_target)
1556 <low_breakpoint_at>: Declare.
1557 (m32r_breakpoint_at): Turn into...
1558 (m32r_target::low_breakpoint_at): ...this.
1559 (the_low_target): Remove the op field.
1560 * linux-m68k-low.cc (class m68k_target)
1561 <low_breakpoint_at>: Declare.
1562 (m68k_breakpoint_at): Turn into...
1563 (m68k_target::low_breakpoint_at): ...this.
1564 (the_low_target): Remove the op field.
1565 * linux-mips-low.cc (class mips_target)
1566 <low_breakpoint_at>: Declare.
1567 (mips_breakpoint_at): Turn into...
1568 (mips_target::low_breakpoint_at): ...this.
1569 (the_low_target): Remove the op field.
1570 * linux-nios2-low.cc (class nios2_target)
1571 <low_breakpoint_at>: Declare.
1572 (nios2_breakpoint_at): Turn into...
1573 (nios2_target::low_breakpoint_at): ...this.
1574 (the_low_target): Remove the op field.
1575 * linux-ppc-low.cc (class ppc_target)
1576 <low_breakpoint_at>: Declare.
1577 (ppc_breakpoint_at): Turn into...
1578 (ppc_target::low_breakpoint_at): ...this.
1579 (the_low_target): Remove the op field.
1580 * linux-riscv-low.cc (class riscv_target)
1581 <low_breakpoint_at>: Declare.
1582 (riscv_breakpoint_at): Turn into...
1583 (riscv_target::low_breakpoint_at): ...this.
1584 (the_low_target): Remove the op field.
1585 * linux-s390-low.cc (class s390_target)
1586 <low_breakpoint_at>: Declare.
1587 (s390_breakpoint_at): Turn into...
1588 (s390_target::low_breakpoint_at): ...this.
1589 (the_low_target): Remove the op field.
1590 * linux-sh-low.cc (class sh_target)
1591 <low_breakpoint_at>: Declare.
1592 (sh_breakpoint_at): Turn into...
1593 (sh_target::low_breakpoint_at): ...this.
1594 (the_low_target): Remove the op field.
1595 * linux-sparc-low.cc (class sparc_target)
1596 <low_breakpoint_at>: Declare.
1597 (sparc_breakpoint_at): Turn into...
1598 (sparc_target::low_breakpoint_at): ...this.
1599 (the_low_target): Remove the op field.
1600 * linux-tic6x-low.cc (class tic6x_target)
1601 <low_breakpoint_at>: Declare.
1602 (tic6x_breakpoint_at): Turn into...
1603 (tic6x_target::low_breakpoint_at): ...this.
1604 (the_low_target): Remove the op field.
1605 * linux-tile-low.cc (class tile_target)
1606 <low_breakpoint_at>: Declare.
1607 (tile_breakpoint_at): Turn into...
1608 (tile_target::low_breakpoint_at): ...this.
1609 (the_low_target): Remove the op field.
1610 * linux-xtensa-low.cc (class xtensa_target)
1611 <low_breakpoint_at>: Declare.
1612 (xtensa_breakpoint_at): Turn into...
1613 (xtensa_target::low_breakpoint_at): ...this.
1614 (the_low_target): Remove the op field.
1615
1616 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1617
1618 Turn the 'decr_pc_after_break' linux_target_ops field into
1619 a method of linux_process_target.
1620
1621 * linux-low.h (struct linux_target_ops)
1622 <decr_pc_after_break>: Remove.
1623 (class linux_process_target) <low_decr_pc_after_break>: New method
1624 declaration.
1625 * linux-low.cc (linux_process_target::low_decr_pc_after_break):
1626 New method implementation.
1627
1628 Update the users below.
1629
1630 (linux_process_target::save_stop_reason)
1631 (linux_process_target::wait_1)
1632 * linux-x86-low.cc (class x86_target) <low_decr_pc_after_break>:
1633 New declaration.
1634 (x86_target::low_decr_pc_after_break): New method implementation.
1635 (the_low_target): Remove the field.
1636 * linux-bfin-low.cc (class bfin_target) <low_decr_pc_after_break>:
1637 New declaration.
1638 (bfin_target::low_decr_pc_after_break): New method implementation.
1639 (the_low_target): Remove the field.
1640 * linux-m68k-low.cc (class m68k_target) <low_decr_pc_after_break>:
1641 New declaration.
1642 (m68k_target::low_decr_pc_after_break): New method implementation.
1643 (the_low_target): Remove the field.
1644 * linux-s390-low.cc (class s390_target) <low_decr_pc_after_break>:
1645 New declaration.
1646 (s390_target::low_decr_pc_after_break): New method implementation.
1647 (the_low_target): Remove the field.
1648 * linux-aarch64-low.cc (the_low_target): Remove the field.
1649 * linux-arm-low.cc (the_low_target): Remove the field.
1650 * linux-cris-low.cc (the_low_target): Remove the field.
1651 * linux-crisv32-low.cc (the_low_target): Remove the field.
1652 * linux-m32r-low.cc (the_low_target): Remove the field.
1653 * linux-mips-low.cc (the_low_target): Remove the field.
1654 * linux-nios2-low.cc (the_low_target): Remove the field.
1655 * linux-ppc-low.cc (the_low_target): Remove the field.
1656 * linux-riscv-low.cc (the_low_target): Remove the field.
1657 * linux-sh-low.cc (the_low_target): Remove the field.
1658 * linux-sparc-low.cc (the_low_target): Remove the field.
1659 * linux-tic6x-low.cc (the_low_target): Remove the field.
1660 * linux-tile-low.cc (the_low_target): Remove the field.
1661 * linux-xtensa-low.cc (the_low_target): Remove the field.
1662
1663 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1664
1665 Remove the 'supports_software_single_step' linux target op and let
1666 the concrete linux target define it by overriding the op in
1667 process_stratum_target.
1668 Turn the 'get_next_pcs' linux target op into a method of
1669 linux_process_target.
1670
1671 * linux-low.h (struct linux_target_ops): Remove the ops.
1672 (class linux_process_target) <supports_software_single_step>:
1673 Remove.
1674 <low_get_next_pcs>: Declare.
1675 * linux-low.cc (can_software_single_step): Remove.
1676 (linux_process_target::low_get_next_pcs): Define.
1677 (linux_process_target::supports_software_single_step): Remove.
1678
1679 Update the callers below.
1680
1681 (linux_process_target::handle_extended_wait)
1682 (linux_process_target::wait_1)
1683 (linux_process_target::install_software_single_step_breakpoints)
1684 (linux_process_target::single_step)
1685 (linux_process_target::thread_needs_step_over)
1686 (linux_process_target::proceed_one_lwp)
1687 (linux_process_target::supports_range_stepping)
1688
1689 * linux-x86-low.cc (the_low_target): Remove the op field.
1690 * linux-aarch64-low.cc (the_low_target): Ditto.
1691 * linux-bfin-low.cc (the_low_target): Ditto.
1692 * linux-cris-low.cc (the_low_target): Ditto.
1693 * linux-crisv32-low.cc (the_low_target): Ditto.
1694 * linux-m32r-low.cc (the_low_target): Ditto.
1695 * linux-m68k-low.cc (the_low_target): Ditto.
1696 * linux-mips-low.cc (the_low_target): Ditto.
1697 * linux-nios2-low.cc (the_low_target): Ditto.
1698 * linux-ppc-low.cc (the_low_target): Ditto.
1699 * linux-riscv-low.cc (the_low_target): Ditto.
1700 * linux-s390-low.cc (the_low_target): Ditto.
1701 * linux-sh-low.cc (the_low_target): Ditto.
1702 * linux-sparc-low.cc (the_low_target): Ditto.
1703 * linux-tic6x-low.cc (the_low_target): Ditto.
1704 * linux-tile-low.cc (the_low_target): Ditto.
1705 * linux-xtensa-low.cc (the_low_target): Ditto.
1706 * linux-arm-low.cc (class arm_target) <low_get_next_pcs>
1707 <supports_software_single_step>: Declare.
1708 (arm_target::supports_software_single_step): Define.
1709 (arm_gdbserver_get_next_pcs): Turn into...
1710 (arm_target::low_get_next_pcs): ...this.
1711 (the_low_target): Remove the op field.
1712
1713 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1714
1715 Remove the 'sw_breakpoint_from_kind' linux target op, and let
1716 the concrete linux target define it by overriding the op
1717 in process_stratum_target.
1718
1719 * linux-low.cc (linux_process_target::sw_breakpoint_from_kind):
1720 Remove.
1721 * linux-low.h (struct linux_target_ops): Remove the op.
1722 (class linux_process_target) <sw_breakpoint_from_kind>: Remove.
1723 * linux-x86-low.cc (class x86_target) <sw_breakpoint_from_kind>:
1724 Declare.
1725 (x86_sw_breakpoint_from_kind): Turn into...
1726 (x86_target::sw_breakpoint_from_kind): ...this.
1727 (the_low_target): Remove the op field.
1728 * linux-aarch64-low.cc (class aarch64_target)
1729 <sw_breakpoint_from_kind>: Declare.
1730 (aarch64_sw_breakpoint_from_kind): Turn into...
1731 (aarch64_target::sw_breakpoint_from_kind): ...this.
1732 (the_low_target): Remove the op field.
1733 * linux-arm-low.cc (class arm_target) <sw_breakpoint_from_kind>:
1734 Declare.
1735 (arm_target::sw_breakpoint_from_kind): Define.
1736 (the_low_target): Remove the op field.
1737 * linux-bfin-low.cc (class bfin_target) <sw_breakpoint_from_kind>:
1738 Declare.
1739 (bfin_sw_breakpoint_from_kind): Turn into...
1740 (bfin_target::sw_breakpoint_from_kind): ...this.
1741 (the_low_target): Remove the op field.
1742 * linux-cris-low.cc (class cris_target) <sw_breakpoint_from_kind>:
1743 Declare.
1744 (cris_sw_breakpoint_from_kind): Turn into...
1745 (cris_target::sw_breakpoint_from_kind): ...this.
1746 (the_low_target): Remove the op field.
1747 * linux-crisv32-low.cc (class crisv32_target)
1748 <sw_breakpoint_from_kind>: Declare.
1749 (cris_sw_breakpoint_from_kind): Turn into...
1750 (crisv32_target::sw_breakpoint_from_kind): ...this.
1751 (the_low_target): Remove the op field.
1752 * linux-ia64-low.cc (class ia64_target) <sw_breakpoint_from_kind>:
1753 Declare.
1754 (ia64_target::sw_breakpoint_from_kind): Define.
1755 * linux-m32r-low.cc (class m32r_target) <sw_breakpoint_from_kind>:
1756 Declare.
1757 (m32r_sw_breakpoint_from_kind): Turn into...
1758 (m32r_target::sw_breakpoint_from_kind): ...this.
1759 (the_low_target): Remove the op field.
1760 * linux-m68k-low.cc (class m68k_target) <sw_breakpoint_from_kind>:
1761 Declare.
1762 (m68k_sw_breakpoint_from_kind): Turn into...
1763 (m68k_target::sw_breakpoint_from_kind): ...this.
1764 (the_low_target): Remove the op field.
1765 * linux-mips-low.cc (class mips_target) <sw_breakpoint_from_kind>:
1766 Declare.
1767 (mips_sw_breakpoint_from_kind): Turn into...
1768 (mips_target::sw_breakpoint_from_kind): ...this.
1769 (the_low_target): Remove the op field.
1770 * linux-nios2-low.cc (class nios2_target) <sw_breakpoint_from_kind>:
1771 Declare.
1772 (nios2_sw_breakpoint_from_kind): Turn into...
1773 (nios2_target::sw_breakpoint_from_kind): ...this.
1774 (the_low_target): Remove the op field.
1775 * linux-ppc-low.cc (class ppc_target) <sw_breakpoint_from_kind>:
1776 Declare.
1777 (ppc_sw_breakpoint_from_kind): Turn into...
1778 (ppc_target::sw_breakpoint_from_kind): ...this.
1779 (the_low_target): Remove the op field.
1780 * linux-riscv-low.cc (class riscv_target) <sw_breakpoint_from_kind>:
1781 Declare.
1782 (riscv_sw_breakpoint_from_kind): Turn into...
1783 (riscv_target::sw_breakpoint_from_kind): ...this.
1784 (the_low_target): Remove the op field.
1785 * linux-s390-low.cc (class s390_target) <sw_breakpoint_from_kind>:
1786 Declare.
1787 (s390_sw_breakpoint_from_kind): Turn into...
1788 (s390_target::sw_breakpoint_from_kind): ...this.
1789 (the_low_target): Remove the op field.
1790 * linux-sh-low.cc (class sh_target) <sw_breakpoint_from_kind>:
1791 Declare.
1792 (sh_sw_breakpoint_from_kind): Turn into...
1793 (sh_target::sw_breakpoint_from_kind): ...this.
1794 (the_low_target): Remove the op field.
1795 * linux-sparc-low.cc (class sparc_target) <sw_breakpoint_from_kind>:
1796 Declare.
1797 (sparc_sw_breakpoint_from_kind): Turn into...
1798 (sparc_target::sw_breakpoint_from_kind): ...this.
1799 (the_low_target): Remove the op field.
1800 * linux-tic6x-low.cc (class tic6x_target) <sw_breakpoint_from_kind>:
1801 Declare.
1802 (tic6x_sw_breakpoint_from_kind): Turn into...
1803 (tic6x_target::sw_breakpoint_from_kind): ...this.
1804 (the_low_target): Remove the op field.
1805 * linux-tile-low.cc (class tile_target) <sw_breakpoint_from_kind>:
1806 Declare.
1807 (tile_sw_breakpoint_from_kind): Turn into...
1808 (tile_target::sw_breakpoint_from_kind): ...this.
1809 (the_low_target): Remove the op field.
1810 * linux-xtensa-low.cc (class xtensa_target)
1811 <sw_breakpoint_from_kind>: Declare.
1812 (xtensa_sw_breakpoint_from_kind): Turn into...
1813 (xtensa_target::sw_breakpoint_from_kind): ...this.
1814 (the_low_target): Remove the op field.
1815
1816 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1817
1818 Remove the 'breakpoint_kind_from_pc' and
1819 'breakpoint_kind_from_current_state' linux target ops, and let the
1820 concrete linux target define them by overriding the ops of
1821 process_stratum_target.
1822
1823 * linux-low.cc (linux_process_target::breakpoint_kind_from_pc):
1824 Remove.
1825 (linux_process_target::breakpoint_kind_from_current_state): Remove.
1826 * linux-low.h (struct linux_target_ops): Remove ops.
1827 (class linux_process_target) <breakpoint_kind_from_pc>: Remove.
1828 <breakpoint_kind_from_current_state>: Remove.
1829 * linux-x86-low.cc (the_low_target): Remove the op fields.
1830 * linux-bfin-low.cc (the_low_target): Ditto.
1831 * linux-cris-low.cc (the_low_target): Ditto.
1832 * linux-crisv32-low.cc (the_low_target): Ditto.
1833 * linux-m32r-low.cc (the_low_target): Ditto.
1834 * linux-m68k-low.cc (the_low_target): Ditto.
1835 * linux-mips-low.cc (the_low_target): Ditto.
1836 * linux-nios2-low.cc (the_low_target): Ditto.
1837 * linux-ppc-low.cc (the_low_target): Ditto.
1838 * linux-s390-low.cc (the_low_target): Ditto.
1839 * linux-sh-low.cc (the_low_target): Ditto.
1840 * linux-sparc-low.cc (the_low_target): Ditto.
1841 * linux-tic6x-low.cc (the_low_target): Ditto.
1842 * linux-tile-low.cc (the_low_target): Ditto.
1843 * linux-xtensa-low.cc (the_low_target): Ditto.
1844 * linux-aarch64-low.cc (class aarch64_target)
1845 <breakpoint_kind_from_pc>
1846 <breakpoint_kind_from_current_state>: Declare.
1847 (aarch64_breakpoint_kind_from_pc): Turn into...
1848 (aarch64_target::breakpoint_kind_from_pc): ...this.
1849 (aarch64_breakpoint_kind_from_current_state): Turn into...
1850 (aarch64_target::breakpoint_kind_from_current_state): ...this.
1851 (the_low_target): Remove the op fields.
1852 * linux-arm-low.cc (class arm_target):
1853 <breakpoint_kind_from_pc>
1854 <breakpoint_kind_from_current_state>: Declare.
1855 (arm_target::breakpoint_kind_from_pc): Define.
1856 (arm_target::breakpoint_kind_from_current_state): Define.
1857 (the_low_target): Remove the op fields.
1858 * linux-riscv-low.cc (class riscv_target):
1859 <breakpoint_kind_from_pc>: Declare.
1860 (riscv_breakpoint_kind_from_pc): Turn into...
1861 (riscv_target::breakpoint_kind_from_pc): ...this.
1862 (the_low_target): Remove the op fields.
1863
1864 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1865
1866 Turn the 'get_pc' and 'set_pc' linux target ops into methods
1867 of linux_process_target.
1868
1869 * linux-low.h (struct linux_target_ops): Remove the ops.
1870 (class linux_process_target) <low_supports_breakpoints>
1871 <low_get_pc>
1872 <low_set_pc>: Declare.
1873 * linux-low.cc (supports_breakpoints): Turn into...
1874 (linux_process_target::low_supports_breakpoints): ...this.
1875 (linux_process_target::low_get_pc): Define.
1876 (linux_process_target::low_set_pc): Define.
1877
1878 Update the callers below.
1879
1880 (linux_process_target::get_pc)
1881 (linux_process_target::save_stop_reason)
1882 (linux_process_target::maybe_move_out_of_jump_pad)
1883 (linux_process_target::wait_1)
1884 (linux_process_target::resume_one_lwp_throw)
1885 (linux_process_target::resume)
1886 (linux_process_target::proceed_all_lwps)
1887 (linux_process_target::read_pc)
1888 (linux_process_target::write_pc)
1889
1890 * linux-x86-low.cc (class linux_process_target)
1891 <low_supports_breakpoints>
1892 <low_get_pc>
1893 <low_set_pc>: Declare.
1894 (x86_target::low_supports_breakpoints): Define.
1895 (x86_get_pc): Turn into...
1896 (x86_target::low_get_pc): ...this.
1897 (x86_set_pc): Turn into...
1898 (x86_target::low_set_pc): ...this.
1899 (the_low_target): Remove the op fields.
1900 * linux-arm-low.cc (class arm_target)
1901 <low_supports_breakpoints>
1902 <low_get_pc>
1903 <low_set_pc>: Declare.
1904 (arm_target::low_supports_breakpoints)
1905 (arm_target::low_get_pc)
1906 (arm_target::low_set_pc): Define.
1907 (the_low_target): Remove the op fields.
1908 * linux-bfin-low.cc (class bfin_target)
1909 <low_supports_breakpoints>
1910 <low_get_pc>
1911 <low_set_pc>: Declare.
1912 (bfin_target::low_supports_breakpoints)
1913 (bfin_target::low_get_pc)
1914 (bfin_target::low_set_pc): Define.
1915 (the_low_target): Remove the op fields.
1916 * linux-cris-low.cc (class cris_target)
1917 <low_supports_breakpoints>
1918 <low_get_pc>
1919 <low_set_pc>: Declare.
1920 (cris_target::low_supports_breakpoints)
1921 (cris_target::low_get_pc)
1922 (cris_target::low_set_pc): Define.
1923 (the_low_target): Remove the op fields.
1924 * linux-crisv32-low.cc (class crisv32_target)
1925 <low_supports_breakpoints>
1926 <low_get_pc>
1927 <low_set_pc>: Declare.
1928 (crisv32_target::low_supports_breakpoints)
1929 (crisv32_target::low_get_pc)
1930 (crisv32_target::low_set_pc): Define.
1931 (the_low_target): Remove the op fields.
1932 * linux-m32r-low.cc (class m32r_target)
1933 <low_supports_breakpoints>
1934 <low_get_pc>
1935 <low_set_pc>: Declare.
1936 (m32r_target::low_supports_breakpoints)
1937 (m32r_target::low_get_pc)
1938 (m32r_target::low_set_pc): Define.
1939 (the_low_target): Remove the op fields.
1940 * linux-m68k-low.cc (class m68k_target)
1941 <low_supports_breakpoints>
1942 <low_get_pc>
1943 <low_set_pc>: Declare.
1944 (m68k_target::low_supports_breakpoints)
1945 (m68k_target::low_get_pc)
1946 (m68k_target::low_set_pc): Define.
1947 (the_low_target): Remove the op fields.
1948 * linux-nios2-low.cc (class nios2_target)
1949 <low_supports_breakpoints>
1950 <low_get_pc>
1951 <low_set_pc>: Declare.
1952 (nios2_target::low_supports_breakpoints)
1953 (nios2_target::low_get_pc)
1954 (nios2_target::low_set_pc): Define.
1955 (the_low_target): Remove the op fields.
1956 * linux-sh-low.cc (class sh_target)
1957 <low_supports_breakpoints>
1958 <low_get_pc>
1959 <low_set_pc>: Declare.
1960 (sh_target::low_supports_breakpoints)
1961 (sh_target::low_get_pc)
1962 (sh_target::low_set_pc): Define.
1963 (the_low_target): Remove the op fields.
1964 * linux-xtensa-low.cc (class xtensa_target)
1965 <low_supports_breakpoints>
1966 <low_get_pc>
1967 <low_set_pc>: Declare.
1968 (xtensa_target::low_supports_breakpoints)
1969 (xtensa_target::low_get_pc)
1970 (xtensa_target::low_set_pc): Define.
1971 (the_low_target): Remove the op fields.
1972 * linux-sparc-low.cc (class sparc_target)
1973 <low_supports_breakpoints>
1974 <low_get_pc>: Declare.
1975 (sparc_target::low_supports_breakpoints)
1976 (sparc_target::low_get_pc): Define.
1977 (the_low_target): Remove the op fields.
1978 * linux-tile-low.cc (class tile_target)
1979 <low_supports_breakpoints>
1980 <low_get_pc>
1981 <low_set_pc>: Declare.
1982 (tile_target::low_supports_breakpoints)
1983 (tile_target::low_get_pc)
1984 (tile_target::low_set_pc): Define.
1985 (the_low_target): Remove the op fields.
1986 * linux-aarch64-low.cc (class aarch64_target)
1987 <low_supports_breakpoints>
1988 <low_get_pc>
1989 <low_set_pc>: Declare.
1990 (aarch64_target::low_supports_breakpoints): Define.
1991 (aarch64_get_pc): Turn into...
1992 (aarch64_target::low_get_pc): ...this.
1993 (aarch64_set_pc): Turn into...
1994 (aarch64_target::low_set_pc): ...this.
1995 (the_low_target): Remove the op fields.
1996 * linux-mips-low.cc (class mips_target)
1997 <low_supports_breakpoints>
1998 <low_get_pc>
1999 <low_set_pc>: Declare.
2000 (mips_target::low_supports_breakpoints): Define.
2001 (mips_get_pc): Turn into...
2002 (mips_target::low_get_pc): ...this.
2003 (mips_set_pc): Turn into...
2004 (mips_target::low_set_pc): ...this.
2005 (the_low_target): Remove the op fields.
2006 * linux-ppc-low.cc (class ppc_target)
2007 <low_supports_breakpoints>
2008 <low_get_pc>
2009 <low_set_pc>: Declare.
2010 (ppc_target::low_supports_breakpoints): Define.
2011 (ppc_get_pc): Turn into...
2012 (ppc_target::low_get_pc): ...this.
2013 (ppc_set_pc): Turn into...
2014 (ppc_target::low_set_pc): ...this.
2015 (the_low_target): Remove the op fields.
2016 * linux-riscv-low.cc (class riscv_target)
2017 <low_supports_breakpoints>
2018 <low_get_pc>
2019 <low_set_pc>: Declare.
2020 (riscv_target::low_supports_breakpoints): Define.
2021 (riscv_get_pc): Turn into...
2022 (riscv_target::low_get_pc): ...this.
2023 (riscv_set_pc): Turn into...
2024 (riscv_target::low_set_pc): ...this.
2025 (the_low_target): Remove the op fields.
2026 * linux-s390-low.cc (class s390_target)
2027 <low_supports_breakpoints>
2028 <low_get_pc>
2029 <low_set_pc>: Declare.
2030 (s390_target::low_supports_breakpoints): Define.
2031 (s390_get_pc): Turn into...
2032 (s390_target::low_get_pc): ...this.
2033 (s390_set_pc): Turn into...
2034 (s390_target::low_set_pc): ...this.
2035 (the_low_target): Remove the op fields.
2036 * linux-tic6x-low.cc (class tic6x_target)
2037 <low_supports_breakpoints>
2038 <low_get_pc>
2039 <low_set_pc>: Declare.
2040 (tic6x_target::low_supports_breakpoints): Define.
2041 (tic6x_get_pc): Turn into...
2042 (tic6x_target::low_get_pc): ...this.
2043 (tic6x_set_pc): Turn into...
2044 (tic6x_target::low_set_pc): ...this.
2045 (the_low_target): Remove the op fields.
2046
2047 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2048
2049 Turn some more static methods in linux-low into private methods
2050 of linux_process_target.
2051
2052 * linux-low.cc (get_pc): Turn into...
2053 (linux_process_target::get_pc): ...this.
2054 (save_stop_reason): Turn into...
2055 (linux_process_target::save_stop_reason): ...this.
2056 (thread_still_has_status_pending_p): Turn into...
2057 (linux_process_target::thread_still_has_status_pending): ...this.
2058 (status_pending_p_callback): Turn into...
2059 (linux_process_target::status_pending_p_callback): ...this.
2060 (resume_stopped_resumed_lwps): Turn into...
2061 (linux_process_target::resume_stopped_resumed_lwps): ...this.
2062 (install_software_single_step_breakpoints): Turn into...
2063 (linux_process_target::install_software_single_step_breakpoints):
2064 ...this.
2065 (single_step): Turn into...
2066 (linux_process_target::single_step): ...this.
2067 (linux_resume_one_lwp_throw): Turn into...
2068 (linux_process_target::resume_one_lwp_throw): ...this.
2069 (linux_resume_one_lwp): Turn into...
2070 (linux_process_target::resume_one_lwp): ...this.
2071 (resume_status_pending_p): Turn into...
2072 (linux_process_target::resume_status_pending): ...this.
2073 (need_step_over_p): Turn into...
2074 (linux_process_target::thread_needs_step_over): ...this.
2075 (linux_resume_one_thread): Turn into...
2076 (linux_process_target::resume_one_thread): ...this.
2077 (proceed_one_lwp): Turn into...
2078 (linux_process_target::proceed_one_lwp): ...this.
2079 (unsuspend_and_proceed_one_lwp): Turn into...
2080 (linux_process_target::unsuspend_and_proceed_one_lwp): ...this.
2081
2082 Update the calls/references to the above functions below.
2083
2084 (linux_process_target::handle_extended_wait)
2085 (linux_process_target::filter_event)
2086 (linux_process_target::wait_for_event_filtered)
2087 (linux_process_target::wait_1)
2088 (linux_process_target::move_out_of_jump_pad)
2089 (linux_process_target::start_step_over)
2090 (linux_process_target::resume)
2091 (linux_process_target::proceed_all_lwps)
2092 (regsets_store_inferior_registers)
2093 (linux_process_target::store_register)
2094
2095 * linux-low.h (class linux_process_target)
2096 <get_pc>
2097 <save_stop_reason>
2098 <thread_still_has_status_pending>
2099 <status_pending_p_callback>
2100 <resume_stopped_resumed_lwps>
2101 <install_software_single_step_breakpoints>
2102 <single_step>
2103 <resume_one_lwp_throw>
2104 <resume_one_lwp>
2105 <resume_status_pending>
2106 <thread_needs_step_over>
2107 <resume_one_thread>
2108 <proceed_one_lwp>
2109 <unsuspend_and_proceed_one_lwp>: Declare.
2110
2111 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2112
2113 Turn the 'fetch_register' linux target op into a method of
2114 linux_process_target.
2115
2116 * linux-low.h (struct linux_target_ops) <fetch_register>: Remove.
2117 (class linux_process_target) <low_fetch_register>: Declare.
2118 * linux-x86-low.cc (the_low_target)
2119 * linux-aarch64-low.cc (the_low_target)
2120 * linux-arm-low.cc (the_low_target)
2121 * linux-bfin-low.cc (the_low_target)
2122 * linux-cris-low.cc (the_low_target)
2123 * linux-crisv32-low.cc (the_low_target)
2124 * linux-m32r-low.cc (the_low_target)
2125 * linux-m68k-low.cc (the_low_target)
2126 * linux-nios2-low.cc (the_low_target)
2127 * linux-ppc-low.cc (the_low_target)
2128 * linux-s390-low.cc (the_low_target)
2129 * linux-sh-low.cc (the_low_target)
2130 * linux-sparc-low.cc (the_low_target)
2131 * linux-tic6x-low.cc (the_low_target)
2132 * linux-tile-low.cc (the_low_target)
2133 * linux-xtensa-low.cc (the_low_target): Remove the op field.
2134 * linux-ia64-low.cc (class ia64_target) <low_fetch_register>:
2135 Declare.
2136 (ia64_fetch_register): Turn into...
2137 (ia64_target::low_fetch_register): ...this.
2138 (the_low_target): Remove the op field.
2139 * linux-mips-low.cc (class mips_target) <low_fetch_register>:
2140 Declare.
2141 (mips_fetch_register): Turn into...
2142 (mips_target::low_fetch_register): ...this.
2143 (the_low_target): Remove the op field.
2144 * linux-riscv-low.cc (class riscv_target) <low_fetch_register>:
2145 Declare.
2146 (riscv_fetch_register): Turn into...
2147 (riscv_target::low_fetch_register): ...this.
2148 (the_low_target): Remove the op field.
2149
2150 Update the callers below.
2151
2152 * linux-low.cc (linux_process_target::fetch_registers)
2153 (linux_process_target::low_fetch_register)
2154
2155 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2156
2157 Turn the 'cannot_fetch_register' and 'cannot_store_register'
2158 linux target ops into methods of linux_process_target.
2159
2160 * linux-low.h (struct linux_target_ops): Remove the low target ops.
2161 (class linux_process_target) <fetch_register>
2162 <store_register>
2163 <usr_fetch_inferior_registers>
2164 <usr_store_inferior_registers>
2165 <low_cannot_fetch_register>
2166 <low_cannot_fetch_register> Declare.
2167 * linux-low.cc (fetch_register): Turn into...
2168 (linux_process_target::fetch_register): ...this.
2169 (store_register): Turn into ...
2170 (linux_process_target::store_register): ...this.
2171 (usr_fetch_inferior_registers): Turn into...
2172 (linux_process_target::usr_fetch_inferior_registers): ...this.
2173 (usr_store_inferior_registers): Turn into...
2174 (linux_process_target::usr_store_inferior_registers): ...this.
2175 * linux-x86-low.cc (class x86_target)
2176 <low_cannot_fetch_register>
2177 <low_cannot_store_register>: Declare.
2178 (x86_cannot_store_register): Turn into...
2179 (x86_target::low_cannot_store_register): ...this.
2180 (x86_cannot_fetch_register): Turn into...
2181 (x86_target::low_cannot_fetch_register): ...this.
2182 (the_low_target): Remove the target op fields.
2183 * linux-aarch64-low.cc (class aarch64_target)
2184 <low_cannot_fetch_register>
2185 <low_cannot_store_register>: Declare.
2186 (aarch64_target::low_cannot_fetch_register)
2187 (aarch64_target::low_cannot_store_register): Define.
2188 (the_low_target): Remove the op fields.
2189 * linux-arm-low.cc (class arm_target)
2190 <low_cannot_fetch_register>
2191 <low_cannot_store_register>: Declare.
2192 (arm_cannot_fetch_register): Turn into...
2193 (arm_target::low_cannot_fetch_register): ...this.
2194 (arm_cannot_store_register): Turn into...
2195 (arm_target::low_cannot_store_register): ...this.
2196 (the_low_target): Remove the op fields.
2197 * linux-bfin-low.cc (class bfin_target)
2198 <low_cannot_fetch_register>
2199 <low_cannot_store_register>: Declare.
2200 (bfin_cannot_fetch_register): Turn into...
2201 (bfin_target::low_cannot_fetch_register): ...this.
2202 (bfin_cannot_store_register): Turn into...
2203 (bfin_target::low_cannot_store_register): ...this.
2204 (the_low_target): Remove the op fields.
2205 * linux-cris-low.cc (class cris_target)
2206 <low_cannot_fetch_register>
2207 <low_cannot_store_register>: Declare.
2208 (cris_cannot_fetch_register): Turn into...
2209 (cris_target::low_cannot_fetch_register): ...this.
2210 (cris_cannot_store_register): Turn into...
2211 (cris_target::low_cannot_store_register): ...this.
2212 (the_low_target): Remove the op fields.
2213 * linux-crisv32-low.cc (class crisv32_target)
2214 <low_cannot_fetch_register>
2215 <low_cannot_store_register>: Declare.
2216 (crisv32_target::low_cannot_fetch_register)
2217 (crisv32_target::low_cannot_store_register): Define.
2218 (the_low_target): Remove the op fields.
2219 * linux-ia64-low.cc (class ia64_target)
2220 <low_cannot_fetch_register>
2221 <low_cannot_store_register>: Declare.
2222 (ia64_cannot_fetch_register): Turn into...
2223 (ia64_target::low_cannot_fetch_register): ...this.
2224 (ia64_cannot_store_register): Turn into...
2225 (ia64_target::low_cannot_store_register): ...this.
2226 (the_low_target): Remove the op fields.
2227 * linux-m32r-low.cc (class m32r_target)
2228 <low_cannot_fetch_register>
2229 <low_cannot_store_register>: Declare.
2230 (m32r_cannot_fetch_register): Turn into...
2231 (m32r_target::low_cannot_fetch_register): ...this.
2232 (m32r_cannot_store_register): Turn into...
2233 (m32r_target::low_cannot_store_register): ...this.
2234 (the_low_target): Remove the op fields.
2235 * linux-m68k-low.cc (class m68k_target)
2236 <low_cannot_fetch_register>
2237 <low_cannot_store_register>: Declare.
2238 (m68k_cannot_fetch_register): Turn into...
2239 (m68k_target::low_cannot_fetch_register): ...this.
2240 (m68k_cannot_store_register): Turn into...
2241 (m68k_target::low_cannot_store_register): ...this.
2242 (the_low_target): Remove the op fields.
2243 * linux-mips-low.cc (class mips_target)
2244 <low_cannot_fetch_register>
2245 <low_cannot_store_register>: Declare.
2246 (mips_cannot_fetch_register): Turn into...
2247 (mips_target::low_cannot_fetch_register): ...this.
2248 (mips_cannot_store_register): Turn into...
2249 (mips_target::low_cannot_store_register): ...this.
2250 (get_usrregs_info): Inline at the call sites in
2251 low_cannot_fetch_register and low_cannot_store_register,
2252 and remove.
2253 (the_low_target): Remove the op fields.
2254 * linux-nios2-low.cc (class nios2_target)
2255 <low_cannot_fetch_register>
2256 <low_cannot_store_register>: Declare.
2257 (nios2_cannot_fetch_register): Turn into...
2258 (nios2_target::low_cannot_fetch_register): ...this.
2259 (nios2_cannot_store_register): Turn into...
2260 (nios2_target::low_cannot_store_register): ...this.
2261 (the_low_target): Remove the op fields.
2262 * linux-ppc-low.cc (class ppc_target)
2263 <low_cannot_fetch_register>
2264 <low_cannot_store_register>: Declare.
2265 (ppc_cannot_fetch_register): Turn into...
2266 (ppc_target::low_cannot_fetch_register): ...this.
2267 (ppc_cannot_store_register): Turn into...
2268 (ppc_target::low_cannot_store_register): ...this.
2269 (the_low_target): Remove the op fields.
2270 * linux-riscv-low.cc (class riscv_target)
2271 <low_cannot_fetch_register>
2272 <low_cannot_store_register>: Declare.
2273 (riscv_target::low_cannot_fetch_register)
2274 (riscv_target::low_cannot_store_register): Define.
2275 (the_low_target): Remove the op fields.
2276 * linux-s390-low.cc (class s390_target)
2277 <low_cannot_fetch_register>
2278 <low_cannot_store_register>: Declare.
2279 (s390_cannot_fetch_register): Turn into...
2280 (s390_target::low_cannot_fetch_register): ...this.
2281 (s390_cannot_store_register): Turn into...
2282 (s390_target::low_cannot_store_register): ...this.
2283 (the_low_target): Remove the op fields.
2284 * linux-sh-low.cc (class sh_target)
2285 <low_cannot_fetch_register>
2286 <low_cannot_store_register>: Declare.
2287 (sh_cannot_fetch_register): Turn into...
2288 (sh_target::low_cannot_fetch_register): ...this.
2289 (sh_cannot_store_register): Turn into...
2290 (sh_target::low_cannot_store_register): ...this.
2291 (the_low_target): Remove the op fields.
2292 * linux-sparc-low.cc (class sparc_target)
2293 <low_cannot_fetch_register>
2294 <low_cannot_store_register>: Declare.
2295 (sparc_cannot_fetch_register): Turn into...
2296 (sparc_target::low_cannot_fetch_register): ...this.
2297 (sparc_cannot_store_register): Turn into...
2298 (sparc_target::low_cannot_store_register): ...this.
2299 (the_low_target): Remove the op fields.
2300 * linux-tic6x-low.cc (class tic6x_target)
2301 <low_cannot_fetch_register>
2302 <low_cannot_store_register>: Declare.
2303 (tic6x_cannot_fetch_register): Turn into...
2304 (tic6x_target::low_cannot_fetch_register): ...this.
2305 (tic6x_cannot_store_register): Turn into...
2306 (tic6x_target::low_cannot_store_register): ...this.
2307 (the_low_target): Remove the op fields.
2308 * linux-tile-low.cc (class tile_target)
2309 <low_cannot_fetch_register>
2310 <low_cannot_store_register>: Declare.
2311 (tile_cannot_fetch_register): Turn into...
2312 (tile_target::low_cannot_fetch_register): ...this.
2313 (tile_cannot_store_register): Turn into...
2314 (tile_target::low_cannot_store_register): ...this.
2315 (the_low_target): Remove the op fields.
2316 * linux-xtensa-low.cc (class xtensa_target)
2317 <low_cannot_fetch_register>
2318 <low_cannot_store_register>: Declare.
2319 (xtensa_target::low_cannot_fetch_register)
2320 (xtensa_target::low_cannot_store_register): Define.
2321 (the_low_target): Remove the op fields.
2322
2323 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2324
2325 Turn the 'regs_info' linux target op into a method of
2326 linux_process_target.
2327
2328 * linux-low.h (struct linux_target_ops) <regs_info>: Remove.
2329 (class linux_process_target) <get_regs_info>: Define.
2330
2331 Update the callers below.
2332
2333 * linux-low.cc (linux_process_target::fetch_registers)
2334 (linux_process_target::store_registers)
2335 * proc-service.cc (gregset_info)
2336
2337 * linux-x86-low.cc (class x86_target) <get_regs_info>: Declare.
2338 (x86_linux_regs_info): Turn into ...
2339 (x86_target::get_regs_info): ...this.
2340 (the_low_target): Remove the op field.
2341 * linux-aarch64-low.cc (class aarch64_target) <get_regs_info>:
2342 Declare.
2343 (aarch64_regs_info): Turn into ...
2344 (aarch64_target::get_regs_info): ...this.
2345 (the_low_target): Remove the op field.
2346 * linux-arm-low.cc (class arm_target) <get_regs_info>: Declare.
2347 (arm_regs_info): Turn into ...
2348 (arm_target::get_regs_info): ...this.
2349 (the_low_target): Remove the op field.
2350 * linux-bfin-low.cc (class bfin_target) <get_regs_info>: Declare.
2351 (bfin_regs_info): Turn into ...
2352 (bfin_target::get_regs_info): ...this.
2353 (the_low_target): Remove the op field.
2354 * linux-cris-low.cc (class cris_target) <get_regs_info>: Declare.
2355 (cris_regs_info): Turn into ...
2356 (cris_target::get_regs_info): ...this.
2357 (the_low_target): Remove the op field.
2358 * linux-crisv32-low.cc (class crisv32_target) <get_regs_info>:
2359 Declare.
2360 (crisv32_regs_info): Turn into ...
2361 (crisv32_target::get_regs_info): ...this.
2362 (the_low_target): Remove the op field.
2363 * linux-ia64-low.cc (class ia64_target) <get_regs_info>: Declare.
2364 (ia64_regs_info): Turn into ...
2365 (ia64_target::get_regs_info): ...this.
2366 (the_low_target): Remove the op field.
2367 * linux-m32r-low.cc (class m32r_target) <get_regs_info>: Declare.
2368 (m32r_regs_info): Turn into ...
2369 (m32r_target::get_regs_info): ...this.
2370 (the_low_target): Remove the op field.
2371 * linux-m68k-low.cc (class m68k_target) <get_regs_info>: Declare.
2372 (m68k_regs_info): Turn into ...
2373 (m68k_target::get_regs_info): ...this.
2374 (the_low_target): Remove the op field.
2375 * linux-mips-low.cc (class mips_target) <get_regs_info>: Declare.
2376 (mips_regs_info): Turn into ...
2377 (mips_target::get_regs_info): ...this.
2378 (the_low_target): Remove the op field.
2379 (get_usrregs_info): Update the call to the op.
2380 * linux-nios2-low.cc (class nios2_target) <get_regs_info>: Declare.
2381 (nios2_regs_info): Turn into ...
2382 (nios2_target::get_regs_info): ...this.
2383 (the_low_target): Remove the op field.
2384 * linux-ppc-low.cc (class ppc_target) <get_regs_info>: Declare.
2385 (ppc_regs_info): Turn into ...
2386 (ppc_target::get_regs_info): ...this.
2387 (the_low_target): Remove the op field.
2388 * linux-riscv-low.cc (class riscv_target) <get_regs_info>: Declare.
2389 (riscv_regs_info): Turn into ...
2390 (riscv_target::get_regs_info): ...this.
2391 (the_low_target): Remove the op field.
2392 * linux-s390-low.cc (class s390_target) <get_regs_info>: Declare.
2393 (s390_regs_info): Turn into ...
2394 (s390_target::get_regs_info): ...this.
2395 (the_low_target): Remove the op field.
2396 (s390_collect_ptrace_register)
2397 (s390_supply_ptrace_register)
2398 (s390_fill_gregset): Update the call to the op.
2399 * linux-sh-low.cc (class sh_target) <get_regs_info>: Declare.
2400 (sh_regs_info): Turn into ...
2401 (sh_target::get_regs_info): ...this.
2402 (the_low_target): Remove the op field.
2403 * linux-sparc-low.cc (class sparc_target) <get_regs_info>: Declare.
2404 (sparc_regs_info): Turn into ...
2405 (sparc_target::get_regs_info): ...this.
2406 (the_low_target): Remove the op field.
2407 * linux-tic6x-low.cc (class tic6x_target) <get_regs_info>: Declare.
2408 (tic6x_regs_info): Turn into ...
2409 (tic6x_target::get_regs_info): ...this.
2410 (the_low_target): Remove the op field.
2411 * linux-tile-low.cc (class tile_target) <get_regs_info>: Declare.
2412 (tile_regs_info): Turn into ...
2413 (tile_target::get_regs_info): ...this.
2414 (the_low_target): Remove the op field.
2415 * linux-xtensa-low.cc (class xtensa_target) <get_regs_info>:
2416 Declare.
2417 (xtensa_regs_info): Turn into ...
2418 (xtensa_target::get_regs_info): ...this.
2419 (the_low_target): Remove the op field.
2420
2421 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2422
2423 Turn the 'arch_setup' linux target op into a method of
2424 linux_process_target.
2425
2426 * linux-low.h (struct linux_target_ops) <arch_setup>: Delete.
2427 (class linux_process_target) <arch_setup_thread>
2428 <low_arch_setup>: New declarations.
2429 * linux-low.cc (linux_arch_setup): Delete.
2430 (linux_arch_setup_thread): Turn into...
2431 (linux_process_target::arch_setup_thread): ... this.
2432
2433 Update the callers below.
2434
2435 (linux_process_target::handle_extended_wait)
2436 (linux_process_target::post_create_inferior)
2437 (linux_process_target::filter_event)
2438
2439 * linux-x86-low.cc (class x86_target) <low_arch_setup>: New
2440 declaration.
2441 (x86_linux_update_xmltarget): Turn into...
2442 (x86_target::update_xmltarget): ...this.
2443 (x86_linux_process_qsupported): Update the call to
2444 x86_linux_update_xmltarget.
2445 (x86_arch_setup): Turn into ...
2446 (x86_target::low_arch_setup): ...this.
2447 (the_low_target): Remove the op field.
2448 * linux-aarch64-low.cc (class aarch64_target) <low_arch_setup>: New
2449 declaration.
2450 (aarch64_arch_setup): Turn into ...
2451 (aarch64_target::low_arch_setup): ...this.
2452 (the_low_target): Remove the op field.
2453 * linux-arm-low.cc (class arm_target) <low_arch_setup>: New
2454 declaration.
2455 (arm_arch_setup): Turn into ...
2456 (arm_target::low_arch_setup): ...this.
2457 (the_low_target): Remove the op field.
2458 * linux-bfin-low.cc (class bfin_target) <low_arch_setup>: New
2459 declaration.
2460 (bfin_arch_setup): Turn into ...
2461 (bfin_target::low_arch_setup): ...this.
2462 (the_low_target): Remove the op field.
2463 * linux-cris-low.cc (class cris_target) <low_arch_setup>: New
2464 declaration.
2465 (cris_arch_setup): Turn into ...
2466 (cris_target::low_arch_setup): ...this.
2467 (the_low_target): Remove the op field.
2468 * linux-crisv32-low.cc (class crisv32_target) <low_arch_setup>: New
2469 declaration.
2470 (crisv32_arch_setup): Turn into ...
2471 (crisv32_target::low_arch_setup): ...this.
2472 (the_low_target): Remove the op field.
2473 * linux-ia64-low.cc (class ia64_target) <low_arch_setup>: New
2474 declaration.
2475 (ia64_arch_setup): Turn into ...
2476 (ia64_target::low_arch_setup): ...this.
2477 (the_low_target): Remove the op field.
2478 * linux-m32r-low.cc (class m32r_target) <low_arch_setup>: New
2479 declaration.
2480 (m32r_arch_setup): Turn into ...
2481 (m32r_target::low_arch_setup): ...this.
2482 (the_low_target): Remove the op field.
2483 * linux-m68k-low.cc (class m68k_target) <low_arch_setup>: New
2484 declaration.
2485 (m68k_arch_setup): Turn into ...
2486 (m68k_target::low_arch_setup): ...this.
2487 (the_low_target): Remove the op field.
2488 * linux-mips-low.cc (class mips_target) <low_arch_setup>: New
2489 declaration.
2490 (mips_arch_setup): Turn into ...
2491 (mips_target::low_arch_setup): ...this.
2492 (the_low_target): Remove the op field.
2493 * linux-nios2-low.cc (class nios2_target) <low_arch_setup>: New
2494 declaration.
2495 (nios2_arch_setup): Turn into ...
2496 (nios2_target::low_arch_setup): ...this.
2497 (the_low_target): Remove the op field.
2498 * linux-ppc-low.cc (class ppc_target) <low_arch_setup>: New
2499 declaration.
2500 (ppc_arch_setup): Turn into ...
2501 (ppc_target::low_arch_setup): ...this.
2502 (the_low_target): Remove the op field.
2503 * linux-riscv-low.cc (class riscv_target) <low_arch_setup>: New
2504 declaration.
2505 (riscv_arch_setup): Turn into ...
2506 (riscv_target::low_arch_setup): ...this.
2507 (the_low_target): Remove the op field.
2508 * linux-s390-low.cc (class s390_target) <low_arch_setup>: New
2509 declaration.
2510 (s390_arch_setup): Turn into ...
2511 (s390_target::low_arch_setup): ...this.
2512 (the_low_target): Remove the op field.
2513 * linux-sh-low.cc (class sh_target) <low_arch_setup>: New
2514 declaration.
2515 (sh_arch_setup): Turn into ...
2516 (sh_target::low_arch_setup): ...this.
2517 (the_low_target): Remove the op field.
2518 * linux-sparc-low.cc (class sparc_target) <low_arch_setup>: New
2519 declaration.
2520 (sparc_arch_setup): Turn into ...
2521 (sparc_target::low_arch_setup): ...this.
2522 (the_low_target): Remove the op field.
2523 * linux-tic6x-low.cc (class tic6x_target) <low_arch_setup>: New
2524 declaration.
2525 (tic6x_arch_setup): Turn into ...
2526 (tic6x_target::low_arch_setup): ...this.
2527 (the_low_target): Remove the op field.
2528 * linux-tile-low.cc (class tile_target) <low_arch_setup>: New
2529 declaration.
2530 (tile_arch_setup): Turn into ...
2531 (tile_target::low_arch_setup): ...this.
2532 (the_low_target): Remove the op field.
2533 * linux-xtensa-low.cc (class xtensa_target) <low_arch_setup>: New
2534 declaration.
2535 (xtensa_arch_setup): Turn into ...
2536 (xtensa_target::low_arch_setup): ...this.
2537 (the_low_target): Remove the op field.
2538
2539 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2540
2541 * linux-low.h (the_linux_target): New extern declaration.
2542 * linux-low.cc (initialize_low): Use 'the_linux_target' to set
2543 'the_target'.
2544 (the_linux_target): Remove.
2545 * linux-x86-low.cc (class x86_target): New class.
2546 (the_x86_target): New static object.
2547 (the_linux_target): Define as pointer to the_x86_target.
2548 * linux-aarch64-low.cc (class aarch64_target): New class.
2549 (the_aarch64_target): New static object.
2550 (the_linux_target): Define as pointer to the_aarch64_target.
2551 * linux-arm-low.cc (class arm_target): New class.
2552 (the_arm_target): New static object.
2553 (the_linux_target): Define as pointer to the_arm_target.
2554 * linux-bfin-low.cc (class bfin_target): New class.
2555 (the_bfin_target): New static object.
2556 (the_linux_target): Define as pointer to the_bfin_target.
2557 * linux-cris-low.cc (class cris_target): New class.
2558 (the_cris_target): New static object.
2559 (the_linux_target): Define as pointer to the_cris_target.
2560 * linux-crisv32-low.cc (class crisv32_target): New class.
2561 (the_crisv32_target): New static object.
2562 (the_linux_target): Define as pointer to the_crisv32_target.
2563 * linux-ia64-low.cc (class ia64_target): New class.
2564 (the_ia64_target): New static object.
2565 (the_linux_target): Define as pointer to the_ia64_target.
2566 * linux-m32r-low.cc (class m32r_target): New class.
2567 (the_m32r_target): New static object.
2568 (the_linux_target): Define as pointer to the_m32r_target.
2569 * linux-m68k-low.cc (class m68k_target): New class.
2570 (the_m68k_target): New static object.
2571 (the_linux_target): Define as pointer to the_m68k_target.
2572 * linux-mips-low.cc (class mips_target): New class.
2573 (the_mips_target): New static object.
2574 (the_linux_target): Define as pointer to the_mips_target.
2575 * linux-nios2-low.cc (class nios2_target): New class.
2576 (the_nios2_target): New static object.
2577 (the_linux_target): Define as pointer to the_nios2_target.
2578 * linux-ppc-low.cc (class ppc_target): New class.
2579 (the_ppc_target): New static object.
2580 (the_linux_target): Define as pointer to the_ppc_target.
2581 * linux-riscv-low.cc (class riscv_target): New class.
2582 (the_riscv_target): New static object.
2583 (the_linux_target): Define as pointer to the_riscv_target.
2584 * linux-s390-low.cc (class s390_target): New class.
2585 (the_s390_target): New static object.
2586 (the_linux_target): Define as pointer to the_s390_target.
2587 * linux-sh-low.cc (class sh_target): New class.
2588 (the_sh_target): New static object.
2589 (the_linux_target): Define as pointer to the_sh_target.
2590 * linux-sparc-low.cc (class sparc_target): New class.
2591 (the_sparc_target): New static object.
2592 (the_linux_target): Define as pointer to the_sparc_target.
2593 * linux-tic6x-low.cc (class tic6x_target): New class.
2594 (the_tic6x_target): New static object.
2595 (the_linux_target): Define as pointer to the_tic6x_target.
2596 * linux-tile-low.cc (class tile_target): New class.
2597 (the_tile_target): New static object.
2598 (the_linux_target): Define as pointer to the_tile_target.
2599 * linux-xtensa-low.cc (class xtensa_target): New class.
2600 (the_xtensa_target): New static object.
2601 (the_linux_target): Define as pointer to the_xtensa_target.
2602
2603 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2604
2605 Turn some static functions in linux-low.cc into private methods of
2606 linux_process_target.
2607
2608 * linux-low.cc (handle_extended_wait): Turn into ...
2609 (linux_process_target::handle_extended_wait): ...this. Call
2610 'mourn' on 'this' object instead of 'the_target'.
2611 (maybe_move_out_of_jump_pad): Turn into...
2612 (linux_process_target::maybe_move_out_of_jump_pad): ...this.
2613 (linux_low_filter_event): Turn into...
2614 (linux_process_target::filter_event): ...this.
2615 (linux_wait_for_event_filtered): Turn into...
2616 (linux_process_target::wait_for_event_filtered): ...this.
2617 (linux_wait_for_event): Turn into...
2618 (linux_process_target::wait_for_event): ...this.
2619 (linux_wait_1): Turn into...
2620 (linux_process_target::wait_1): ...this.
2621 (wait_for_sigstop): Turn into...
2622 (linux_process_target::wait_for_sigstop): ...this.
2623 (move_out_of_jump_pad_callback): Turn into...
2624 (linux_process_target::move_out_of_jump_pad): ...this.
2625 (stop_all_lwps): Turn into...
2626 (linux_process_target::stop_all_lwps): ...this.
2627 (start_step_over): Turn into...
2628 (linux_process_target::start_step_over): ...this.
2629 (complete_ongoing_step_over): Turn into...
2630 (linux_process_target::complete_ongoing_step_over): ...this.
2631 (proceed_all_lwps): Turn into...
2632 (linux_process_target::proceed_all_lwps): ...this.
2633 (unstop_all_lwps): Turn into...
2634 (linux_process_target::unstop_all_lwps): ...this.
2635
2636 * linux-low.h (class linux_process_target)
2637 <handle_extended_wait>
2638 <maybe_move_out_of_jump_pad>
2639 filter_event>
2640 <wait_for_event_filtered>
2641 <wait_for_event>
2642 <wait_1>
2643 <wait_for_sigstop>
2644 <move_out_of_jump_pad>
2645 <stop_all_lwps>
2646 <start_step_over>
2647 <complete_ongoing_step_over>
2648 <proceed_all_lwps>
2649 <unstop_all_lwps>: Declare.
2650
2651 Update the callers below.
2652
2653 * linux-low.cc (linux_process_target::attach): Update.
2654 (linux_process_target::stabilize_threads): Ditto.
2655 (linux_process_target::wait): Ditto.
2656
2657 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2658
2659 * linux-low.h (struct linux_target_ops): Update the comment for
2660 'cannot_store_register' to return 0 or 1.
2661 * linux-ppc-low.cc (ppc_cannot_store_register): Return 1 instead
2662 of 2.
2663
2664 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
2665
2666 * config.in: Re-generate.
2667 * configure: Re-generate.
2668
2669 2020-03-17 Kamil Rytarowski <n54@gmx.com>
2670
2671 * regcache.cc (find_register_by_number): Update.
2672 * tdesc.cc (init_target_desc): Likewise.
2673 * tdesc.h (target_desc::reg_defs): Likewise.
2674
2675 2020-03-12 Tom Tromey <tom@tromey.com>
2676
2677 * configure: Rebuild.
2678 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
2679 (WIN32APILIBS): New subst.
2680 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
2681 gdbsupport files.
2682 (gdbsupport/%.o): Remove target.
2683 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
2684 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
2685 (WIN32APILIBS): New variable.
2686 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
2687 (gdbreplay$(EXEEXT)): Likewise.
2688
2689 2020-03-12 Tom Tromey <tom@tromey.com>
2690
2691 * config.in, configure: Rebuild.
2692 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
2693 * acinclude.m4: Include gettext-sister.m4.
2694 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
2695 variables.
2696 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
2697 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
2698
2699 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2700
2701 * acinclude.m4: Update path to selftest.m4.
2702
2703 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2704
2705 * configure.ac: Don't source bfd/development.sh, move
2706 GDB_AC_COMMON higher.
2707 * configure: Re-generate.
2708
2709 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2710
2711 * configure: Re-generate.
2712
2713 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
2714
2715 * configure: Re-generate.
2716
2717 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2718
2719 * .dir-locals.el: New file.
2720
2721 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2722
2723 * .gitattributes: New file.
2724
2725 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
2726
2727 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
2728 reply into an S reply.
2729 * server.cc (disable_packet_T): New global.
2730 (captured_main): Set new global when appropriate.
2731 * server.h (disable_packet_T): Declare.
2732
2733 2020-02-21 Tom Tromey <tom@tromey.com>
2734
2735 * Makefile.in (mostlyclean): New target.
2736
2737 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2738
2739 * target.h (struct process_stratum_target): Remove.
2740 (class process_target): Rename to ...
2741 (class process_stratum_target): ... this.
2742 * linux-low.h (class linux_process_target): Derive from
2743 'process_stratum_target'.
2744 * linux-low.cc (linux_target_ops): Remove.
2745 (initialize_low): Set the_target to the singleton instance of
2746 linux_process_target.
2747 * lynx-low.h (class lynx_process_target): Derive from
2748 'process_stratum_target'.
2749 * lynx-low.cc (lynx_target_ops): Remove.
2750 (initialize_low): Set the_target to the singleton instance of
2751 lynx_process_target.
2752 * nto-low.h (class nto_process_target): Derive from
2753 'process_stratum_target'.
2754 * nto-low.cc (nto_target_ops): Remove.
2755 (initialize_low): Set the_target to the singleton instance of
2756 nto_process_target.
2757 * win32-low.h (class win32_process_target): Derive from
2758 'process_stratum_target'.
2759 * win32-low.cc (win32_target_ops): Remove.
2760 (initialize_low): Set the_target to the singleton instance of
2761 win32_process_target.
2762
2763 Replace 'the_target->pt' with 'the_target' in the uses below.
2764
2765 * hostio.cc (hostio_error)
2766 (handle_setfs)
2767 (handle_open)
2768 (handle_unlink)
2769 (handle_readlink)
2770 * linux-aarch32-low.cc (arm_breakpoint_at)
2771 * linux-aarch64-low.cc (aarch64_breakpoint_at)
2772 * linux-arm-low.cc (arm_sigreturn_next_pc)
2773 (arm_get_hwcap)
2774 (arm_get_syscall_trapinfo)
2775 * linux-cris-low.cc (cris_breakpoint_at)
2776 * linux-crisv32-low.cc (cris_breakpoint_at)
2777 * linux-low.cc (handle_extended_wait)
2778 (linux_wait_1)
2779 (linux_read_memory)
2780 (linux_process_target::breakpoint_kind_from_pc)
2781 (linux_get_auxv)
2782 * linux-m32r-low.cc (m32r_breakpoint_at)
2783 * linux-mips-low.cc (mips_breakpoint_at)
2784 * linux-nios2-low.cc (nios2_breakpoint_at)
2785 * linux-ppc-low.cc (ppc_breakpoint_at)
2786 * linux-s390-low.cc (s390_get_hwcap)
2787 * linux-sh-low.cc (sh_breakpoint_at)
2788 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
2789 (sparc_store_gregset_from_stack)
2790 (sparc_breakpoint_at)
2791 * linux-tic6x-low.cc (tic6x_breakpoint_at)
2792 * linux-tile-low.cc (tile_breakpoint_at)
2793 * linux-x86-low.cc (x86_breakpoint_at)
2794 * linux-xtensa-low.cc (xtensa_breakpoint_at)
2795 * mem-break.cc (bp_size)
2796 (bp_opcode)
2797 (insert_memory_breakpoint)
2798 (set_raw_breakpoint_at)
2799 (delete_raw_breakpoint)
2800 (z_type_supported)
2801 (uninsert_raw_breakpoint)
2802 (reinsert_raw_breakpoint)
2803 (validate_inserted_breakpoint)
2804 * regcache.cc (regcache_read_pc)
2805 (regcache_write_pc)
2806 * remote-utils.cc (putpkt_binary_1)
2807 (input_interrupt)
2808 (getpkt)
2809 (prepare_resume_reply)
2810 * server.cc (handle_general_set)
2811 (handle_detach)
2812 (handle_qxfer_auxv)
2813 (handle_qxfer_exec_file)
2814 (handle_qxfer_libraries_svr4)
2815 (handle_qxfer_osdata)
2816 (handle_qxfer_siginfo)
2817 (handle_qxfer_fdpic)
2818 (handle_query)
2819 (resume)
2820 (handle_v_requests)
2821 (queue_stop_reply_callback)
2822 (captured_main)
2823 * target.cc (prepare_to_access_memory)
2824 (done_accessing_memory)
2825 (read_inferior_memory)
2826 (target_write_memory)
2827 (target_stop_and_wait)
2828 (target_wait)
2829 (target_mourn_inferior)
2830 (target_continue_no_signal)
2831 (target_continue)
2832 (target_supports_multi_process)
2833 (kill_inferior)
2834 * target.h
2835 (target_create_inferior)
2836 (target_post_create_inferior)
2837 (myattach)
2838 (target_supports_fork_events)
2839 (target_supports_vfork_events)
2840 (target_supports_exec_events)
2841 (target_handle_new_gdb_connection)
2842 (detach_inferior)
2843 (mythread_alive)
2844 (fetch_inferior_registers)
2845 (store_inferior_registers)
2846 (join_inferior)
2847 (target_supports_non_stop)
2848 (target_async)
2849 (target_process_qsupported)
2850 (target_supports_catch_syscall)
2851 (target_get_ipa_tdesc_idx)
2852 (target_supports_tracepoints)
2853 (target_supports_fast_tracepoints)
2854 (target_get_min_fast_tracepoint_insn_len)
2855 (target_thread_stopped)
2856 (target_pause_all)
2857 (target_unpause_all)
2858 (target_stabilize_threads)
2859 (target_install_fast_tracepoint_jump_pad)
2860 (target_emit_ops)
2861 (target_supports_disable_randomization)
2862 (target_supports_agent)
2863 (target_enable_btrace)
2864 (target_disable_btrace)
2865 (target_read_btrace)
2866 (target_read_btrace_conf)
2867 (target_supports_range_stepping)
2868 (target_supports_stopped_by_sw_breakpoint)
2869 (target_stopped_by_sw_breakpoint)
2870 (target_supports_stopped_by_hw_breakpoint)
2871 (target_supports_hardware_single_step)
2872 (target_stopped_by_hw_breakpoint)
2873 (target_breakpoint_kind_from_pc)
2874 (target_breakpoint_kind_from_current_state)
2875 (target_supports_software_single_step)
2876 (target_core_of_thread)
2877 (target_thread_name)
2878 (target_thread_handle)
2879 * win32-low.cc (do_initial_child_stuff)
2880
2881 Rename target op default definitions listed below.
2882
2883 * target.cc (process_target::post_create_inferior): Rename as ...
2884 (process_stratum_target::post_create_inferior): ... this.
2885 (process_target::prepare_to_access_memory): Rename as ...
2886 (process_stratum_target::prepare_to_access_memory): ... this.
2887 (process_target::done_accessing_memory): Rename as ...
2888 (process_stratum_target::done_accessing_memory): ... this.
2889 (process_target::look_up_symbols): Rename as ...
2890 (process_stratum_target::look_up_symbols): ... this.
2891 (process_target::supports_read_auxv): Rename as ...
2892 (process_stratum_target::supports_read_auxv): ... this.
2893 (process_target::read_auxv): Rename as ...
2894 (process_stratum_target::read_auxv): ... this.
2895 (process_target::supports_z_point_type): Rename as ...
2896 (process_stratum_target::supports_z_point_type): ... this.
2897 (process_target::insert_point): Rename as ...
2898 (process_stratum_target::insert_point): ... this.
2899 (process_target::remove_point): Rename as ...
2900 (process_stratum_target::remove_point): ... this.
2901 (process_target::stopped_by_sw_breakpoint): Rename as ...
2902 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
2903 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
2904 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
2905 (process_target::stopped_by_hw_breakpoint): Rename as ...
2906 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
2907 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
2908 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
2909 (process_target::supports_hardware_single_step): Rename as ...
2910 (process_stratum_target::supports_hardware_single_step): ... this.
2911 (process_target::stopped_by_watchpoint): Rename as ...
2912 (process_stratum_target::stopped_by_watchpoint): ... this.
2913 (process_target::stopped_data_address): Rename as ...
2914 (process_stratum_target::stopped_data_address): ... this.
2915 (process_target::supports_read_offsets): Rename as ...
2916 (process_stratum_target::supports_read_offsets): ... this.
2917 (process_target::read_offsets): Rename as ...
2918 (process_stratum_target::read_offsets): ... this.
2919 (process_target::supports_get_tls_address): Rename as ...
2920 (process_stratum_target::supports_get_tls_address): ... this.
2921 (process_target::get_tls_address): Rename as ...
2922 (process_stratum_target::get_tls_address): ... this.
2923 (process_target::hostio_last_error): Rename as ...
2924 (process_stratum_target::hostio_last_error): ... this.
2925 (process_target::supports_qxfer_osdata): Rename as ...
2926 (process_stratum_target::supports_qxfer_osdata): ... this.
2927 (process_target::qxfer_osdata): Rename as ...
2928 (process_stratum_target::qxfer_osdata): ... this.
2929 (process_target::supports_qxfer_siginfo): Rename as ...
2930 (process_stratum_target::supports_qxfer_siginfo): ... this.
2931 (process_target::qxfer_siginfo): Rename as ...
2932 (process_stratum_target::qxfer_siginfo): ... this.
2933 (process_target::supports_non_stop): Rename as ...
2934 (process_stratum_target::supports_non_stop): ... this.
2935 (process_target::async): Rename as ...
2936 (process_stratum_target::async): ... this.
2937 (process_target::start_non_stop): Rename as ...
2938 (process_stratum_target::start_non_stop): ... this.
2939 (process_target::supports_multi_process): Rename as ...
2940 (process_stratum_target::supports_multi_process): ... this.
2941 (process_target::supports_fork_events): Rename as ...
2942 (process_stratum_target::supports_fork_events): ... this.
2943 (process_target::supports_vfork_events): Rename as ...
2944 (process_stratum_target::supports_vfork_events): ... this.
2945 (process_target::supports_exec_events): Rename as ...
2946 (process_stratum_target::supports_exec_events): ... this.
2947 (process_target::handle_new_gdb_connection): Rename as ...
2948 (process_stratum_target::handle_new_gdb_connection): ... this.
2949 (process_target::handle_monitor_command): Rename as ...
2950 (process_stratum_target::handle_monitor_command): ... this.
2951 (process_target::core_of_thread): Rename as ...
2952 (process_stratum_target::core_of_thread): ... this.
2953 (process_target::supports_read_loadmap): Rename as ...
2954 (process_stratum_target::supports_read_loadmap): ... this.
2955 (process_target::read_loadmap): Rename as ...
2956 (process_stratum_target::read_loadmap): ... this.
2957 (process_target::process_qsupported): Rename as ...
2958 (process_stratum_target::process_qsupported): ... this.
2959 (process_target::supports_tracepoints): Rename as ...
2960 (process_stratum_target::supports_tracepoints): ... this.
2961 (process_target::read_pc): Rename as ...
2962 (process_stratum_target::read_pc): ... this.
2963 (process_target::write_pc): Rename as ...
2964 (process_stratum_target::write_pc): ... this.
2965 (process_target::supports_thread_stopped): Rename as ...
2966 (process_stratum_target::supports_thread_stopped): ... this.
2967 (process_target::thread_stopped): Rename as ...
2968 (process_stratum_target::thread_stopped): ... this.
2969 (process_target::supports_get_tib_address): Rename as ...
2970 (process_stratum_target::supports_get_tib_address): ... this.
2971 (process_target::get_tib_address): Rename as ...
2972 (process_stratum_target::get_tib_address): ... this.
2973 (process_target::pause_all): Rename as ...
2974 (process_stratum_target::pause_all): ... this.
2975 (process_target::unpause_all): Rename as ...
2976 (process_stratum_target::unpause_all): ... this.
2977 (process_target::stabilize_threads): Rename as ...
2978 (process_stratum_target::stabilize_threads): ... this.
2979 (process_target::supports_fast_tracepoints): Rename as ...
2980 (process_stratum_target::supports_fast_tracepoints): ... this.
2981 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
2982 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
2983 (process_target::emit_ops): Rename as ...
2984 (process_stratum_target::emit_ops): ... this.
2985 (process_target::supports_disable_randomization): Rename as ...
2986 (process_stratum_target::supports_disable_randomization): ... this.
2987 (process_target::supports_qxfer_libraries_svr4): Rename as ...
2988 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
2989 (process_target::qxfer_libraries_svr4): Rename as ...
2990 (process_stratum_target::qxfer_libraries_svr4): ... this.
2991 (process_target::supports_agent): Rename as ...
2992 (process_stratum_target::supports_agent): ... this.
2993 (process_target::enable_btrace): Rename as ...
2994 (process_stratum_target::enable_btrace): ... this.
2995 (process_target::disable_btrace): Rename as ...
2996 (process_stratum_target::disable_btrace): ... this.
2997 (process_target::read_btrace): Rename as ...
2998 (process_stratum_target::read_btrace): ... this.
2999 (process_target::read_btrace_conf): Rename as ...
3000 (process_stratum_target::read_btrace_conf): ... this.
3001 (process_target::supports_range_stepping): Rename as ...
3002 (process_stratum_target::supports_range_stepping): ... this.
3003 (process_target::supports_pid_to_exec_file): Rename as ...
3004 (process_stratum_target::supports_pid_to_exec_file): ... this.
3005 (process_target::pid_to_exec_file): Rename as ...
3006 (process_stratum_target::pid_to_exec_file): ... this.
3007 (process_target::supports_multifs): Rename as ...
3008 (process_stratum_target::supports_multifs): ... this.
3009 (process_target::multifs_open): Rename as ...
3010 (process_stratum_target::multifs_open): ... this.
3011 (process_target::multifs_unlink): Rename as ...
3012 (process_stratum_target::multifs_unlink): ... this.
3013 (process_target::multifs_readlink): Rename as ...
3014 (process_stratum_target::multifs_readlink): ... this.
3015 (process_target::breakpoint_kind_from_pc): Rename as ...
3016 (process_stratum_target::breakpoint_kind_from_pc): ... this.
3017 (process_target::breakpoint_kind_from_current_state): Rename as ...
3018 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
3019 (process_target::thread_name): Rename as ...
3020 (process_stratum_target::thread_name): ... this.
3021 (process_target::thread_handle): Rename as ...
3022 (process_stratum_target::thread_handle): ... this.
3023 (process_target::supports_software_single_step): Rename as ...
3024 (process_stratum_target::supports_software_single_step): ... this.
3025 (process_target::supports_catch_syscall): Rename as ...
3026 (process_stratum_target::supports_catch_syscall): ... this.
3027 (process_target::get_ipa_tdesc_idx): Rename as ...
3028 (process_stratum_target::get_ipa_tdesc_idx): ... this.
3029
3030 2020-02-20 Pedro Alves <palves@redhat.com>
3031
3032 * target.cc (set_target_ops): Simply copy the given target pointer
3033 instead of creating a copy of the pointed object.
3034
3035 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3036
3037 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
3038 of process_target.
3039
3040 * target.h (struct process_stratum_target): Remove the target op.
3041 (class process_target): Add the target op.
3042 (target_get_ipa_tdesc_idx): Update the macro.
3043 * target.cc (process_target::get_ipa_tdesc_idx): Define.
3044
3045 Update the derived classes and callers below.
3046
3047 * linux-low.cc (linux_target_ops): Update.
3048 (linux_get_ipa_tdesc_idx): Turn into ...
3049 (linux_process_target::get_ipa_tdesc_idx): ... this.
3050 * linux-low.h (class linux_process_target): Update.
3051 * lynx-low.cc (lynx_target_ops): Update.
3052 * nto-low.cc (nto_target_ops): Update.
3053 * win32-low.cc (win32_target_ops): Update.
3054
3055 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3056
3057 Turn process_stratum_target's supports_catch_syscall op into a
3058 method of process_target.
3059
3060 * target.h (struct process_stratum_target): Remove the target op.
3061 (class process_target): Add the target op.
3062 (target_supports_catch_syscall): Update the macro.
3063 * target.cc (process_target::supports_catch_syscall): Define.
3064
3065 Update the derived classes and callers below.
3066
3067 * linux-low.cc (linux_target_ops): Update.
3068 (linux_supports_catch_syscall): Turn into ...
3069 (linux_process_target::supports_catch_syscall): ... this.
3070 * linux-low.h (class linux_process_target): Update.
3071 * lynx-low.cc (lynx_target_ops): Update.
3072 * nto-low.cc (nto_target_ops): Update.
3073 * win32-low.cc (win32_target_ops): Update.
3074
3075 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3076
3077 Turn process_stratum_target's supports_software_single_step op
3078 into a method of process_target.
3079
3080 * target.h (struct process_stratum_target): Remove the target op.
3081 (class process_target): Add the target op.
3082 (target_supports_software_single_step): Update the macro.
3083 * target.cc (process_target::supports_software_single_step): Define.
3084
3085 Update the derived classes and callers below.
3086
3087 * linux-low.cc (linux_target_ops): Update.
3088 (linux_supports_software_single_step): Turn into ...
3089 (linux_process_target::supports_software_single_step): ... this.
3090 * linux-low.h (class linux_process_target): Update.
3091 * lynx-low.cc (lynx_target_ops): Update.
3092 * nto-low.cc (nto_target_ops): Update.
3093 * win32-low.cc (win32_target_ops): Update.
3094
3095 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3096
3097 Turn process_stratum_target's thread_name and thread_handle ops
3098 into methods of process_target.
3099
3100 * target.h (struct process_stratum_target): Remove the target ops.
3101 (class process_target): Add the target ops.
3102 (target_thread_name): Update the macro.
3103 (target_thread_handle): Update the macro.
3104 * target.cc (process_target::thread_name): Define.
3105 (process_target::thread_handle): Define.
3106
3107 Update the derived classes and callers below.
3108
3109 * linux-low.cc (linux_target_ops): Update.
3110 (linux_process_target::thread_name): Define.
3111 (linux_process_target::thread_handle): Define.
3112 * linux-low.h (class linux_process_target): Update.
3113 * lynx-low.cc (lynx_target_ops): Update.
3114 * nto-low.cc (nto_target_ops): Update.
3115 * win32-low.cc (win32_target_ops): Update.
3116
3117 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3118
3119 Turn process_stratum_target's breakpoint_kind_from_pc,
3120 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
3121 ops into methods of process_target.
3122
3123 * target.h (struct process_stratum_target): Remove the target op.
3124 (class process_target): Add the target op.
3125 (target_breakpoint_kind_from_pc): Update the macro.
3126 (target_breakpoint_kind_from_current_state): Update the macro.
3127 (default_breakpoint_kind_from_pc): Remove declaration.
3128 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
3129 (process_target::breakpoint_kind_from_pc): ... this.
3130 (process_target::breakpoint_kind_from_current_state): Define.
3131
3132 Update the derived classes and callers below.
3133
3134 * mem-break.cc (bp_size): Update.
3135 (bp_opcode): Update.
3136 * linux-low.cc (linux_target_ops): Update.
3137 (linux_wait_1): Update.
3138 (linux_breakpoint_kind_from_pc): Turn into ...
3139 (linux_process_target::breakpoint_kind_from_pc): ... this.
3140 (linux_sw_breakpoint_from_kind): Turn into ...
3141 (linux_process_target::sw_breakpoint_from_kind): ... this.
3142 (linux_breakpoint_kind_from_current_state): Turn into ...
3143 (linux_process_target::breakpoint_kind_from_current_state): ... this.
3144 * linux-low.h (class linux_process_target): Update.
3145 * lynx-low.cc (lynx_target_ops): Update.
3146 (lynx_process_target::sw_breakpoint_from_kind): Define.
3147 * lynx-low.h (class lynx_process_target): Update.
3148 * nto-low.cc (nto_target_ops): Update.
3149 (nto_sw_breakpoint_from_kind): Turn into ...
3150 (nto_process_target::sw_breakpoint_from_kind): ... this.
3151 * nto-low.h (class nto_process_target): Update.
3152 * win32-low.cc (win32_target_ops): Update.
3153 (win32_sw_breakpoint_from_kind): Turn into ...
3154 (win32_process_target::sw_breakpoint_from_kind): ... this.
3155 * win32-low.h (class win32_process_target): Update.
3156
3157 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3158
3159 Turn process_stratum_target's multifs_open, multifs_readlink,
3160 multifs_unlink ops into methods of process_target.
3161
3162 * target.h (struct process_stratum_target): Remove the target ops.
3163 (class process_target): Add the target ops. Also add
3164 'supports_multifs'.
3165 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
3166 "sys/stat.h".
3167 (process_target::supports_multifs): Define.
3168 (process_target::multifs_open): Define.
3169 (process_target::multifs_readlink): Define.
3170 (process_target::multifs_unlink): Define.
3171
3172 Update the derived classes and callers below.
3173
3174 * hostio.cc (handle_setfs): Update.
3175 (handle_open): Update.
3176 (handle_unlink): Update.
3177 (handle_readlink): Update.
3178 * linux-low.cc (linux_target_ops): Update.
3179 (linux_process_target::supports_multifs): Define.
3180 (linux_process_target::multifs_open): Define.
3181 (linux_process_target::multifs_readlink): Define.
3182 (linux_process_target::multifs_unlink): Define.
3183 * linux-low.h (class linux_process_target): Update.
3184 * lynx-low.cc (lynx_target_ops): Update.
3185 * nto-low.cc (nto_target_ops): Update.
3186 * win32-low.cc (win32_target_ops): Update.
3187
3188 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3189
3190 Turn process_stratum_target's pid_to_exec_file op into a method
3191 of process_target.
3192
3193 * target.h (struct process_stratum_target): Remove the target op.
3194 (class process_target): Add the target op. Also add
3195 'supports_pid_to_exec_file'.
3196 * target.cc (process_target::pid_to_exec_file): Define.
3197 (process_target::supports_pid_to_exec_file): Define.
3198
3199 Update the derived classes and callers below.
3200
3201 * server.cc (handle_qxfer_exec_file): Update.
3202 (handle_query): Update.
3203 * linux-low.cc (linux_target_ops): Update.
3204 (linux_process_target::supports_pid_to_exec_file): Define.
3205 (linux_process_target::pid_to_exec_file): Define.
3206 * linux-low.h (class linux_process_target): Update.
3207 * lynx-low.cc (lynx_target_ops): Update.
3208 * nto-low.cc (nto_target_ops): Update.
3209 * win32-low.cc (win32_target_ops): Update.
3210
3211 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3212
3213 Turn process_stratum_target's supports_range_stepping op into a
3214 method of process_target.
3215
3216 * target.h (struct process_stratum_target): Remove the target op.
3217 (class process_target): Add the target op.
3218 (target_supports_range_stepping): Update the macro.
3219 * target.cc (process_target::supports_range_stepping): Define.
3220
3221 Update the derived classes and callers below.
3222
3223 * linux-low.cc (linux_target_ops): Update.
3224 (linux_supports_range_stepping): Turn into ...
3225 (linux_process_target::supports_range_stepping): ... this.
3226 * linux-low.h (class linux_process_target): Update.
3227 * lynx-low.cc (lynx_target_ops): Update.
3228 * nto-low.cc (nto_target_ops): Update.
3229 * win32-low.cc (win32_target_ops): Update.
3230
3231 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3232
3233 Turn process_stratum_target's btrace-related ops (enable_btrace,
3234 disable_btrace, read_btrace, read_btrace_conf) into methods of
3235 process_target.
3236
3237 * target.h (struct process_stratum_target): Remove the target ops.
3238 (class process_target): Add the target ops.
3239 (target_enable_btrace): Update.
3240 (target_disable_btrace): Update.
3241 (target_read_btrace): Update.
3242 (target_read_btrace_conf): Update.
3243 * target.cc (process_target::enable_btrace): Define.
3244 (process_target::disable_btrace): Define.
3245 (process_target::read_btrace): Define.
3246 (process_target::read_btrace_conf): Define.
3247
3248 Update the derived classes and callers below.
3249
3250 * linux-low.cc (linux_target_ops): Update.
3251 (linux_process_target:enable_btrace): Define as a wrapper around
3252 linux_enable_btrace.
3253 (linux_low_disable_btrace): Turn into ...
3254 (linux_process_target::disable_btrace): ... this.
3255 (linux_low_read_btrace): Turn into ...
3256 (linux_process_target::read_btrace): ... this.
3257 (linux_low_btrace_conf): Turn into ...
3258 (linux_process_target::read_btrace_conf): ... this.
3259 * linux-low.h (class linux_process_target): Update.
3260 * lynx-low.cc (lynx_target_ops): Update.
3261 * nto-low.cc (nto_target_ops): Update.
3262 * win32-low.cc (win32_target_ops): Update.
3263
3264 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3265
3266 Turn process_stratum_target's supports_agent op into a method of
3267 process_target.
3268
3269 * target.h (struct process_stratum_target): Remove the target op.
3270 (class process_target): Add the target op.
3271 (target_supports_agent): Update the macro.
3272 * target.cc (process_target::supports_agent): Define.
3273
3274 Update the derived classes and callers below.
3275
3276 * linux-low.cc (linux_target_ops): Update.
3277 (linux_supports_agent): Turn into ...
3278 (linux_process_target::supports_agent): ... this.
3279 * linux-low.h (class linux_process_target): Update.
3280 * lynx-low.cc (lynx_target_ops): Update.
3281 * nto-low.cc (nto_target_ops): Update.
3282 * win32-low.cc (win32_target_ops): Update.
3283
3284 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3285
3286 Turn process_stratum_target's qxfer_libraries_svr4 op into a
3287 method of process_target.
3288
3289 * target.h (struct process_stratum_target): Remove the target op.
3290 (class process_target): Add the target op. Also add
3291 'supports_qxfer_libraries_svr4'.
3292 * target.cc (process_target::qxfer_libraries_svr4): Define.
3293 (process_target::supports_qxfer_libraries_svr4): Define.
3294
3295 Update the derived classes and callers below.
3296
3297 * server.cc (handle_qxfer_libraries_svr4): Update.
3298 (handle_query): Update.
3299 * linux-low.cc (linux_target_ops): Update.
3300 (linux_process_target::supports_qxfer_libraries_svr4): Define.
3301 (linux_qxfer_libraries_svr4): Turn into ...
3302 (linux_process_target::qxfer_libraries_svr4): ... this.
3303 * linux-low.h (class linux_process_target): Update.
3304 * lynx-low.cc (lynx_target_ops): Update.
3305 * nto-low.cc (nto_target_ops): Update.
3306 * win32-low.cc (win32_target_ops): Update.
3307
3308 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3309
3310 Turn process_stratum_target's supports_disable_randomization op
3311 into a method of process_target.
3312
3313 * target.h (struct process_stratum_target): Remove the target op.
3314 (class process_target): Add the target op.
3315 (target_supports_disable_randomization): Update the macro.
3316 * target.cc (process_target::supports_disable_randomization): Define.
3317
3318 Update the derived classes and callers below.
3319
3320 * linux-low.cc (linux_target_ops): Update.
3321 (linux_supports_disable_randomization): Turn into ...
3322 (linux_process_target::supports_disable_randomization): ... this.
3323 * linux-low.h (class linux_process_target): Update.
3324 * lynx-low.cc (lynx_target_ops): Update.
3325 * nto-low.cc (nto_target_ops): Update.
3326 * win32-low.cc (win32_target_ops): Update.
3327
3328 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3329
3330 Turn process_stratum_target's emit_ops op into a method of
3331 process_target.
3332
3333 * target.h (struct process_stratum_target): Remove the target op.
3334 (class process_target): Add the target op.
3335 (target_emit_ops): Update the macro.
3336 * target.cc (process_target::emit_ops): Define.
3337
3338 Update the derived classes and callers below.
3339
3340 * linux-low.cc (linux_target_ops): Update.
3341 (linux_emit_ops): Turn into ...
3342 (linux_process_target::emit_ops): ... this.
3343 * linux-low.h (class linux_process_target): Update.
3344 * lynx-low.cc (lynx_target_ops): Update.
3345 * nto-low.cc (nto_target_ops): Update.
3346 * win32-low.cc (win32_target_ops): Update.
3347
3348 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3349
3350 Turn process_stratum_target's install_fast_tracepoint_jump_pad
3351 and get_min_fast_tracepoint_insn_len ops into methods of
3352 process_target.
3353
3354 * target.h (struct process_stratum_target): Remove the target ops.
3355 (class process_target): Add the target ops. Also add
3356 'supports_fast_tracepoints'.
3357 (target_supports_fast_tracepoints): Update the macro.
3358 (target_get_min_fast_tracepoint_insn_len): Update the macro.
3359 (install_fast_tracepoint_jump_pad): Update and rename the macro
3360 to ...
3361 (target_install_fast_tracepoint_jump_pad): ... this.
3362 * target.cc (process_target::supports_fast_tracepoints): Define.
3363 (process_target::install_fast_tracepoint_jump_pad): Define.
3364 (process_target::get_min_fast_tracepoint_insn_len): Define.
3365
3366 Update the derived classes and callers below.
3367
3368 * tracepoint.cc (install_fast_tracepoint): Update.
3369 * linux-low.cc (linux_target_ops): Update.
3370 (linux_process_target::supports_fast_tracepoints): Define.
3371 (linux_install_fast_tracepoint_jump_pad): Turn into ...
3372 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
3373 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
3374 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
3375 * linux-low.h (class linux_process_target): Update.
3376 * lynx-low.cc (lynx_target_ops): Update.
3377 * nto-low.cc (nto_target_ops): Update.
3378 * win32-low.cc (win32_target_ops): Update.
3379
3380 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3381
3382 Turn process_stratum_target's stabilize_threads op into a
3383 method of process_target.
3384
3385 * target.h (struct process_stratum_target): Remove the target op.
3386 (class process_target): Add the target op.
3387 (target_stabilize_threads): Update the macro.
3388 * target.cc (process_target::stabilize_threads): Define.
3389
3390 Update the derived classes and callers below.
3391
3392 * server.cc (handle_status): Update.
3393 * tracepoint.cc (cmd_qtdp): Update.
3394 (cmd_qtstart): Update.
3395 * linux-low.cc (linux_target_ops): Update.
3396 (linux_stabilize_threads): Turn into ...
3397 (linux_process_target::stabilize_threads): ... this.
3398 (linux_wait_1): Update.
3399 * linux-low.h (class linux_process_target): Update.
3400 * lynx-low.cc (lynx_target_ops): Update.
3401 * nto-low.cc (nto_target_ops): Update.
3402 * win32-low.cc (win32_target_ops): Update.
3403
3404 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3405
3406 Turn process_stratum_target's pause_all and unpause_all ops
3407 into methods of process_target.
3408
3409 * target.h (struct process_stratum_target): Remove the target ops.
3410 (class process_target): Add the target ops.
3411 (pause_all): Update the macro and rename to...
3412 (target_pause_all): ... this.
3413 (unpause_all): Update the macro and rename to...
3414 (target_unpause_all): ... this.
3415 * target.cc (process_target::pause_all): Define.
3416 (process_target::unpause_all): Define.
3417
3418 Update the derived classes and callers below.
3419
3420 * server.cc (handle_status): Update.
3421 * tracepoint.cc (clear_installed_tracepoints): Update.
3422 (cmd_qtdp): Update.
3423 (cmd_qtstart): Update.
3424 (stop_tracing): Update.
3425 (cmd_qtstatus): Update.
3426 (upload_fast_traceframes): Update.
3427 (run_inferior_command): Update.
3428 * linux-low.cc (linux_target_ops): Update.
3429 (linux_pause_all): Turn into ...
3430 (linux_process_target::pause_all): ... this.
3431 (linux_unpause_all): Turn into ...
3432 (linux_process_target::unpause_all): ... this.
3433 (linux_process_target::prepare_to_access_memory): Update.
3434 (linux_process_target::done_accessing_memory): Update.
3435 * linux-low.h (class linux_process_target): Update.
3436 * lynx-low.cc (lynx_target_ops): Update.
3437 * nto-low.cc (nto_target_ops): Update.
3438 * win32-low.cc (win32_target_ops): Update.
3439
3440 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3441
3442 Turn process_stratum_target's get_tib_address op into a method of
3443 process_target.
3444
3445 * target.h (struct process_stratum_target): Remove the target op.
3446 (class process_target): Add the target op. Also add
3447 'supports_get_tib_address'.
3448 * target.cc (process_target::get_tib_address): Define.
3449 (process_target::supports_get_tib_address): Define.
3450
3451 Update the derived classes and callers below.
3452
3453 * server.cc (handle_query): Update.
3454 * linux-low.cc (win32_target_ops): Update.
3455 * lynx-low.cc (lynx_target_ops): Update.
3456 * nto-low.cc (nto_target_ops): Update.
3457 * win32-low.cc (win32_target_ops): Update.
3458 (win32_process_target::supports_get_tib_address): Define.
3459 (win32_get_tib_address): Turn into ...
3460 (win32_process_target::get_tib_address): ... this.
3461 * win32-low.h (class win32_process_target): Update.
3462
3463 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3464
3465 Turn process_stratum_target's thread_stopped op into a method of
3466 process_target.
3467
3468 * target.h (struct process_stratum_target): Remove the target op.
3469 (class process_target): Add the target op. Also add
3470 'supports_thread_stopped'.
3471 (target_thread_stopped): Update the macro.
3472 * target.cc (process_target::thread_stopped): Define.
3473 (process_target::supports_thread_stopped): Define.
3474 (prepare_to_access_memory): Update.
3475
3476 Update the derived classes and callers below.
3477
3478 * server.cc (queue_stop_reply_callback): Update.
3479 * linux-low.cc (linux_target_ops): Update.
3480 (linux_process_target::supports_thread_stopped): Define.
3481 (linux_thread_stopped): Turn into ...
3482 (linux_process_target::thread_stopped): ... this.
3483 * linux-low.h (class linux_process_target): Update.
3484 * lynx-low.cc (lynx_target_ops): Update.
3485 * nto-low.cc (nto_target_ops): Update.
3486 * win32-low.cc (win32_target_ops): Update.
3487
3488 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3489
3490 Turn process_stratum_target's read_pc and write_pc ops into
3491 methods of process_target.
3492
3493 * target.h (struct process_stratum_target): Remove the target ops.
3494 (class process_target): Add the target ops.
3495 * target.cc (process_target::read_pc): Define.
3496 (process_target::write_pc): Define.
3497
3498 Update the derived classes and callers below.
3499
3500 * regcache.cc (regcache_read_pc): Update.
3501 (regcache_write_pc): Update.
3502 * linux-low.cc (linux_target_ops): Update.
3503 (linux_read_pc): Turn into ...
3504 (linux_process_target::read_pc): ... this.
3505 (linux_write_pc): Turn into ...
3506 (linux_process_target::write_pc): ... this.
3507 * linux-low.h (class linux_process_target): Update.
3508 * lynx-low.cc (lynx_target_ops): Update.
3509 * nto-low.cc (nto_target_ops): Update.
3510 * win32-low.cc (win32_target_ops): Update.
3511
3512 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3513
3514 Turn process_stratum_target's supports_tracepoints op into a
3515 method of process_target.
3516
3517 * target.h (struct process_stratum_target): Remove the target op.
3518 (class process_target): Add the target op.
3519 (target_supports_tracepoints): Update the macro.
3520 * target.cc (process_target::supports_tracepoints): Define.
3521
3522 Update the derived classes and callers below.
3523
3524 * linux-low.cc (linux_target_ops): Update.
3525 (linux_supports_tracepoints): Turn into ...
3526 (linux_process_target::supports_tracepoints): ... this.
3527 * linux-low.h (class linux_process_target): Update.
3528 * lynx-low.cc (lynx_target_ops): Update.
3529 * nto-low.cc (nto_target_ops): Update.
3530 * win32-low.cc (win32_target_ops): Update.
3531
3532 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3533
3534 Turn process_stratum_target's process_qsupported op into a method
3535 of process_target.
3536
3537 * target.h (struct process_stratum_target): Remove the target op.
3538 (class process_target): Add the target op.
3539 (target_process_qsupported): Update the macro.
3540 * target.cc (process_target::process_qsupported): Define.
3541
3542 Update the derived classes and callers below.
3543
3544 * linux-low.cc (linux_target_ops): Update.
3545 (linux_process_qsupported): Turn into ...
3546 (linux_process_target::process_qsupported): ... this.
3547 * linux-low.h (class linux_process_target): Update.
3548 * lynx-low.cc (lynx_target_ops): Update.
3549 * nto-low.cc (nto_target_ops): Update.
3550 * win32-low.cc (win32_target_ops): Update.
3551
3552 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3553
3554 Turn process_stratum_target's read_loadmap op into a method of
3555 process_target.
3556
3557 * target.h (struct process_stratum_target): Remove the target op.
3558 (class process_target): Add the target op. Also add
3559 'supports_read_loadmap'.
3560 * target.cc (process_target::read_loadmap): Define.
3561 (process_target::supports_read_loadmap): Define.
3562
3563 Update the derived classes and callers below.
3564
3565 * server.cc (handle_qxfer_fdpic): Update.
3566 (handle_query): Update.
3567 * linux-low.cc (linux_target_ops): Update.
3568 (linux_process_target::supports_read_loadmap): Define.
3569 (linux_read_loadmap): Turn into ...
3570 (linux_process_target::read_loadmap): ... this.
3571 * linux-low.h (class linux_process_target): Update.
3572 * lynx-low.cc (lynx_target_ops): Update.
3573 * nto-low.cc (nto_target_ops): Update.
3574 * win32-low.cc (win32_target_ops): Update.
3575
3576 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3577
3578 Turn process_stratum_target's core_of_thread op into a method of
3579 process_target.
3580
3581 * target.h (struct process_stratum_target): Remove the target op.
3582 (class process_target): Add the target op.
3583 (target_core_of_thread): Update the macro.
3584 * target.cc (process_target::core_of_thread): Define.
3585
3586 Update the derived classes and callers below.
3587
3588 * linux-low.cc (linux_target_ops): Update.
3589 (linux_process_target::core_of_thread): Define.
3590 * linux-low.h (class linux_process_target): Update.
3591 * lynx-low.cc (lynx_target_ops): Update.
3592 * nto-low.cc (nto_target_ops): Update.
3593 * win32-low.cc (win32_target_ops): Update.
3594
3595 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3596
3597 Turn process_stratum_target's handle_monitor_command op into a
3598 method of process_target.
3599
3600 * target.h (struct process_stratum_target): Remove the target op.
3601 (class process_target): Add the target op.
3602 (target_handle_monitor_command): Update the macro.
3603 * target.cc (process_target::handle_monitor_command): Define.
3604
3605 Update the derived classes and callers below.
3606
3607 * server.cc (handle_query): Update.
3608 * linux-low.cc (linux_target_ops): Update.
3609 (linux_process_target::handle_monitor_command): Define.
3610 * linux-low.h (class linux_process_target): Update.
3611 * lynx-low.cc (lynx_target_ops): Update.
3612 * nto-low.cc (nto_target_ops): Update.
3613 * win32-low.cc (win32_target_ops): Update.
3614
3615 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3616
3617 Turn process_stratum_target's handle_new_gdb_connection op into a
3618 method of process_target.
3619
3620 * target.h (struct process_stratum_target): Remove the target op.
3621 (class process_target): Add the target op.
3622 (target_handle_new_gdb_connection): Update the macro.
3623 * target.cc (process_target::handle_new_gdb_connection): Define.
3624
3625 Update the derived classes and callers below.
3626
3627 * linux-low.cc (linux_target_ops): Update.
3628 (linux_handle_new_gdb_connection): Turn into ...
3629 (linux_process_target::handle_new_gdb_connection): ... this.
3630 * linux-low.h (class linux_process_target): Update.
3631 * lynx-low.cc (lynx_target_ops): Update.
3632 * nto-low.cc (nto_target_ops): Update.
3633 * win32-low.cc (win32_target_ops): Update.
3634
3635 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3636
3637 Turn process_stratum_target's supports_fork_events,
3638 supports_vfork_events, and supports_exec_events ops into methods
3639 of process_target.
3640
3641 * target.h (struct process_stratum_target): Remove the target ops.
3642 (class process_target): Add the target ops.
3643 (target_supports_fork_events): Update the macro.
3644 (target_supports_vfork_events): Update the macro.
3645 (target_supports_exec_events): Update the macro.
3646 * target.cc (process_target::supports_fork_events): Define.
3647 (process_target::supports_vfork_events): Define.
3648 (process_target::supports_exec_events): Define.
3649
3650 Update the derived classes and callers below.
3651
3652 * linux-low.cc (linux_target_ops): Update.
3653 (linux_supports_fork_events): Turn into ...
3654 (linux_process_target::supports_fork_events): ... this.
3655 (linux_supports_vfork_events): Turn into ...
3656 (linux_process_target::supports_vfork_events): ... this.
3657 (linux_supports_exec_events): Turn into ...
3658 (linux_process_target::supports_exec_events): ... this.
3659 * linux-low.h (class linux_process_target): Update.
3660 * lynx-low.cc (lynx_target_ops): Update.
3661 * nto-low.cc (nto_target_ops): Update.
3662 * win32-low.cc (win32_target_ops): Update.
3663
3664 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3665
3666 Turn process_stratum_target's supports_multi_process op into a
3667 method of process_target.
3668
3669 * target.h (struct process_stratum_target): Remove the target op.
3670 (class process_target): Add the target op.
3671 * target.cc (process_target::supports_multi_process): Define.
3672 (target_supports_multi_process): Update.
3673
3674 Update the derived classes and callers below.
3675
3676 * linux-low.cc (linux_target_ops): Update.
3677 (linux_supports_multi_process): Turn into ...
3678 (linux_process_target::supports_multi_process): ... this.
3679 * linux-low.h (class linux_process_target): Update.
3680 * lynx-low.cc (lynx_target_ops): Update.
3681 * nto-low.cc (nto_target_ops): Update.
3682 * win32-low.cc (win32_target_ops): Update.
3683
3684 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3685
3686 Turn process_stratum_target's supports_non_stop, async, and
3687 start_non_stop ops into methods of process_target.
3688
3689 * target.h (struct process_stratum_target): Remove the target ops.
3690 (class process_target): Add the target ops.
3691 (target_supports_non_stop): Update the macro.
3692 (target_async): Update the macro.
3693 (start_non_stop): Remove declaration.
3694 * target.cc (process_target::supports_non_stop): Define.
3695 (process_target::async): Define.
3696 (process_target::start_non_stop): Define.
3697 (start_non_stop): Remove.
3698
3699 Update the derived classes and callers below.
3700
3701 * server.cc (handle_qxfer_siginfo): Update.
3702 (handle_query): Update.
3703 * linux-low.cc (linux_target_ops): Update.
3704 (linux_supports_non_stop): Turn into ...
3705 (linux_process_target::supports_non_stop): ... this.
3706 (linux_async): Turn into ...
3707 (linux_process_target::async): ... this.
3708 (linux_start_non_stop): Turn into ...
3709 (linux_process_target::start_non_stop): ... this.
3710 * linux-low.h (class linux_process_target): Update.
3711 * lynx-low.cc (lynx_target_ops): Update.
3712 * nto-low.cc (nto_target_ops): Update.
3713 (nto_supports_non_stop): Remove; rely on the default behavior
3714 instead.
3715 * win32-low.cc (win32_target_ops): Update.
3716
3717 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3718
3719 Turn process_stratum_target's qxfer_siginfo op into a method of
3720 process_target.
3721
3722 * target.h (struct process_stratum_target): Remove the target op.
3723 (class process_target): Add the target op. Also add
3724 'supports_qxfer_siginfo'.
3725 * target.cc (process_target::qxfer_siginfo): Define.
3726 (process_target::supports_qxfer_siginfo): Define.
3727
3728 Update the derived classes and callers below.
3729
3730 * server.cc (handle_qxfer_siginfo): Update.
3731 (handle_query): Update.
3732 * linux-low.cc (linux_target_ops): Update.
3733 (linux_process_target::supports_qxfer_siginfo): Define.
3734 (linux_xfer_siginfo): Turn into ...
3735 (linux_process_target::qxfer_siginfo): ... this.
3736 * linux-low.h (class linux_process_target): Update.
3737 * lynx-low.cc (lynx_target_ops): Update.
3738 * nto-low.cc (nto_target_ops): Update.
3739 * win32-low.cc (win32_target_ops): Update.
3740
3741 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3742
3743 Turn process_stratum_target's qxfer_osdata op into a method of
3744 process_target.
3745
3746 * target.h (struct process_stratum_target): Remove the target op.
3747 (class process_target): Add the target op. Also add
3748 'supports_qxfer_osdata'.
3749 * target.cc (process_target::qxfer_osdata): Define.
3750 (process_target::supports_qxfer_osdata): Define.
3751
3752 Update the derived classes and callers below.
3753
3754 * server.cc (handle_qxfer_osdata): Update.
3755 (handle_query): Update.
3756 * linux-low.cc (linux_target_ops): Update.
3757 (linux_process_target::supports_qxfer_osdata): Define.
3758 (linux_qxfer_osdata): Turn into ...
3759 (linux_process_target::qxfer_osdata): ... this.
3760 * linux-low.h (class linux_process_target): Update.
3761 * lynx-low.cc (lynx_target_ops): Update.
3762 * nto-low.cc (nto_target_ops): Update.
3763 * win32-low.cc (win32_target_ops): Update.
3764
3765 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3766
3767 Turn process_stratum_target's hostio_last_error op into a
3768 method of process_target.
3769
3770 * target.h (struct process_stratum_target): Remove the target op.
3771 (class process_target): Add the target op.
3772 * target.cc: Add "hostio.h" to includes.
3773 (process_target::hostio_last_error): Define.
3774
3775 Update the derived classes and callers below.
3776
3777 * hostio.cc (hostio_error): Update.
3778 * linux-low.cc: Remove "hostio.h" from includes.
3779 (linux_target_ops): Update.
3780 * lynx-low.cc (lynx_target_ops): Update.
3781 * nto-low.cc (nto_target_ops): Update.
3782 * win32-low.h (class win32_process_target): Update.
3783 * win32-low.cc (win32_target_ops): Update.
3784 (wince_hostio_last_error): Turn into ...
3785 (win32_process_target::hostio_last_error): ... this.
3786
3787 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3788
3789 Turn process_stratum_target's get_tls_address op into a method of
3790 process_target.
3791
3792 * target.h (struct process_stratum_target): Remove the target op.
3793 (class process_target): Add the target op. Also add
3794 'supports_get_tls_address'.
3795 * target.cc (process_target::get_tls_address): Define.
3796 (process_target::supports_get_tls_address): Define.
3797
3798 Update the derived classes and callers below.
3799
3800 * server.cc (handle_query): Update.
3801 * linux-low.cc (linux_target_ops): Update.
3802 (linux_process_target::supports_get_tls_address): Define.
3803 (linux_process_target::get_tls_address): Define.
3804 * linux-low.h (class linux_process_target): Update.
3805 * lynx-low.cc (lynx_target_ops): Update.
3806 * nto-low.cc (nto_target_ops): Update.
3807 * win32-low.cc (win32_target_ops): Update.
3808
3809 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3810
3811 Turn process_stratum_target's read_offsets op into a method of
3812 process_target.
3813
3814 * target.h (struct process_stratum_target): Remove the target op.
3815 (class process_target): Add the target op. Also add
3816 'supports_read_offsets'.
3817 * target.cc (process_target::read_offsets): Define.
3818 (process_target::supports_read_offsets): Define.
3819
3820 Update the derived classes and callers below.
3821
3822 * server.cc (handle_query): Update.
3823 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
3824 (linux_target_ops): Update.
3825 (linux_process_target::supports_read_offsets): Define.
3826 (linux_read_offsets): Turn into ...
3827 (linux_process_target::read_offsets): ... this.
3828 * linux-low.h (class linux_process_target): Update.
3829 * lynx-low.cc (lynx_target_ops): Update.
3830 * nto-low.cc (nto_target_ops): Update.
3831 * win32-low.cc (win32_target_ops): Update.
3832
3833 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3834
3835 Turn process_stratum_target's stopped_by_watchpoint and
3836 stopped_data_address ops into methods of process_target.
3837
3838 * target.h (struct process_stratum_target): Remove the target ops.
3839 (class process_target): Add the target ops.
3840 * target.cc (process_target::stopped_by_watchpoint): Define.
3841 (process_target::stopped_data_address): Define.
3842
3843 Update the derived classes and callers below.
3844
3845 * remote-utils.cc (prepare_resume_reply): Update.
3846 * linux-low.cc (linux_target_ops): Update.
3847 (linux_stopped_by_watchpoint): Turn into ...
3848 (linux_process_target::stopped_by_watchpoint): ... this.
3849 (linux_stopped_data_address): Turn into ...
3850 (linux_process_target::stopped_data_address): ... this.
3851 * linux-low.h (class linux_process_target): Update.
3852 * lynx-low.cc (lynx_target_ops): Update.
3853 * nto-low.cc (nto_target_ops): Update.
3854 (nto_stopped_by_watchpoint): Turn into ...
3855 (nto_process_target::stopped_by_watchpoint): ... this.
3856 (nto_stopped_data_address): Turn into ...
3857 (nto_process_target::stopped_data_address): ... this.
3858 * nto-low.h (class nto_process_target): Update.
3859 * win32-low.cc (win32_target_ops): Update.
3860 (win32_stopped_by_watchpoint): Turn into ...
3861 (win32_process_target::stopped_by_watchpoint): ... this.
3862 (win32_stopped_data_address): Turn into ...
3863 (win32_process_target::stopped_data_address): ... this.
3864 * win32-low.h (class win32_process_target): Update.
3865
3866 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3867
3868 Turn process_stratum_target's supports_hardware_single_step op into
3869 a method of process_target.
3870
3871 * target.h (struct process_stratum_target): Remove the target op.
3872 (class process_target): Add the target op.
3873 (target_supports_hardware_single_step): Update the macro.
3874 (target_can_do_hardware_single_step): Remove declaration.
3875 * target.cc (process_target::supports_hardware_single_step): Define.
3876 (target_can_do_hardware_single_step): Remove.
3877
3878 Update the derived classes and callers below.
3879
3880 * linux-low.h (class linux_process_target): Update.
3881 * linux-low.cc (linux_target_ops): Update.
3882 (linux_supports_hardware_single_step): Turn into ...
3883 (linux_process_target::supports_hardware_single_step): ... this.
3884 * lynx-low.h (class lynx_process_target): Update.
3885 * lynx-low.cc (lynx_target_ops): Update.
3886 (lynx_process_target::supports_hardware_single_step): Define.
3887 * nto-low.h (class nto_process_target): Update.
3888 * nto-low.cc (nto_target_ops): Update.
3889 (nto_process_target::supports_hardware_single_step): Define.
3890 * win32-low.h (class win32_process_target): Update.
3891 * win32-low.cc (win32_target_ops): Update.
3892 (win32_process_target::supports_hardware_single_step): Define.
3893
3894 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3895
3896 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
3897 ops into methods of process_target.
3898
3899 * target.h (struct process_stratum_target): Remove the target ops.
3900 (class process_target): Add the target ops.
3901 (target_stopped_by_hw_breakpoint): Update the macro.
3902 (target_supports_stopped_by_hw_breakpoint): Update the macro.
3903 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
3904 (process_target::supports_stopped_by_hw_breakpoint): Define.
3905
3906 Update the derived classes and callers below.
3907
3908 * linux-low.cc (linux_target_ops): Update.
3909 (linux_stopped_by_hw_breakpoint): Turn into ...
3910 (linux_process_target::stopped_by_hw_breakpoint): ... this.
3911 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
3912 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
3913 * linux-low.h (class linux_process_target): Update.
3914 * lynx-low.cc (lynx_target_ops): Update.
3915 * nto-low.cc (nto_target_ops): Update.
3916 * win32-low.cc (win32_target_ops): Update.
3917
3918 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3919
3920 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
3921 ops into methods of process_target.
3922
3923 * target.h (struct process_stratum_target): Remove the target ops.
3924 (class process_target): Add the target ops.
3925 (target_stopped_by_sw_breakpoint): Update the macro.
3926 (target_supports_stopped_by_sw_breakpoint): Update the macro.
3927 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
3928 (process_target::supports_stopped_by_sw_breakpoint): Define.
3929
3930 Update the derived classes and callers below.
3931
3932 * linux-low.cc (linux_target_ops): Update.
3933 (linux_stopped_by_sw_breakpoint): Turn into ...
3934 (linux_process_target::stopped_by_sw_breakpoint): ... this.
3935 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
3936 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
3937 * linux-low.h (class linux_process_target): Update.
3938 * lynx-low.cc (lynx_target_ops): Update.
3939 * nto-low.cc (nto_target_ops): Update.
3940 * win32-low.cc (win32_target_ops): Update.
3941
3942 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3943
3944 Turn process_stratum_target's insert_point and remove_point ops
3945 into methods of process_target.
3946
3947 * target.h (struct process_stratum_target): Remove the target ops.
3948 (class process_target): Add the target ops.
3949 * target.cc (process_target::insert_point): Define.
3950 (process_target::remove_point): Define.
3951
3952 Update the derived classes and callers below.
3953
3954 * mem-break.cc (set_raw_breakpoint_at): Update.
3955 (delete_raw_breakpoint): Update.
3956 (uninsert_raw_breakpoint): Update.
3957 (reinsert_raw_breakpoint): Update.
3958 * linux-low.cc (linux_target_ops): Update.
3959 (linux_insert_point): Turn into ...
3960 (linux_process_target::insert_point): ... this.
3961 (linux_remove_point): Turn into ...
3962 (linux_process_target::remove_point): ... this.
3963 * linux-low.h (class linux_process_target): Update.
3964 * lynx-low.cc (lynx_target_ops): Update.
3965 * nto-low.cc (nto_target_ops): Update.
3966 (nto_insert_point): Turn into ...
3967 (nto_process_target::insert_point): ... this.
3968 (nto_remove_point): Turn into ...
3969 (nto_process_target::remove_point): ... this.
3970 * nto-low.h (class nto_process_target): Update.
3971 * win32-low.cc (win32_target_ops): Update.
3972 (win32_insert_point): Turn into ...
3973 (win32_process_target::insert_point): ... this.
3974 (win32_remove_point): Turn into ...
3975 (win32_process_target::remove_point): ... this.
3976 * win32-low.h (class win32_process_target): Update.
3977
3978 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3979
3980 Turn process_stratum_target's supports_z_point_type op into a
3981 method of process_target.
3982
3983 * target.h (struct process_stratum_target): Remove the target op.
3984 (class process_target): Add the target op.
3985 * target.cc (process_target::supports_z_point_type): Define.
3986
3987 Update the derived classes and callers below.
3988
3989 * mem-break.cc (z_type_supported): Update.
3990 * linux-low.cc (linux_target_ops): Update.
3991 (linux_supports_z_point_type): Turn into ...
3992 (linux_process_target::supports_z_point_type): ... this.
3993 * linux-low.h (class linux_process_target): Update.
3994 * lynx-low.cc (lynx_target_ops): Update.
3995 * nto-low.cc (nto_target_ops): Update.
3996 (nto_supports_z_point_type): Turn into ...
3997 (nto_process_target::supports_z_point_type): ... this.
3998 * nto-low.h (class nto_process_target): Update.
3999 * win32-low.cc (win32_target_ops): Update.
4000 (win32_supports_z_point_type): Turn into ...
4001 (win32_process_target::supports_z_point_type): ... this.
4002 * win32-low.h (class win32_process_target): Update.
4003
4004 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4005
4006 Turn process_stratum_target's read_auxv op into a method of
4007 process_target.
4008
4009 * target.h (class process_stratum_target): Remove the target op.
4010 (struct process_target): Add the target op. Also add
4011 'supports_read_auxv'.
4012 * target.cc (process_target::read_auxv): Define.
4013 (process_target::supports_read_auxv): Define.
4014
4015 Update the derived classes and callers below.
4016
4017 * server.cc (handle_qxfer_auxv): Update.
4018 (handle_query): Update.
4019 * linux-low.cc (linux_target_ops): Update.
4020 (linux_process_target::supports_read_auxv): Define.
4021 (linux_read_auxv): Turn into ...
4022 (linux_process_target::read_auxv): ... this.
4023 * linux-low.h (class linux_process_target): Update.
4024 * lynx-low.cc (lynx_target_ops): Update.
4025 * nto-low.cc (nto_target_ops): Update.
4026 (nto_process_target::supports_read_auxv): Define.
4027 (nto_read_auxv): Turn into ...
4028 (nto_process_target::read_auxv): ... this.
4029 * nto-low.h (class nto_process_target): Update.
4030 * win32-low.cc (win32_target_ops): Update.
4031
4032 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4033
4034 Turn process_stratum_target's request_interrupt op into a method of
4035 process_target.
4036
4037 * target.h (struct process_stratum_target): Remove the target op.
4038 (class process_target): Add the target op.
4039
4040 Update the derived classes and callers below.
4041
4042 * remote-utils.cc (putpkt_binary_1): Update.
4043 (input_interrupt): Update.
4044 (getpkt): Update.
4045 * server.cc (handle_v_requests): Update.
4046 * linux-low.cc (linux_target_ops): Update.
4047 (linux_request_interrupt): Turn into ...
4048 (linux_process_target::request_interrupt): ... this.
4049 * linux-low.h (class linux_process_target): Update.
4050 * lynx-low.cc (lynx_target_ops): Update.
4051 (lynx_request_interrupt): Turn into ...
4052 (lynx_process_target::request_interrupt): ... this.
4053 * lynx-low.h (class lynx_process_target): Update.
4054 * nto-low.cc (nto_target_ops): Update.
4055 (nto_request_interrupt): Turn into ...
4056 (nto_process_target::request_interrupt): ... this.
4057 * nto-low.h (class nto_process_target): Update.
4058 * win32-low.cc (win32_target_ops): Update.
4059 (win32_request_interrupt): Turn into ...
4060 (win32_process_target::request_interrupt): ... this.
4061 * win32-low.h (class win32_process_target): Update.
4062
4063 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4064
4065 Turn process_stratum_target's look_up_symbols op into a method of
4066 process_target.
4067
4068 * target.h (struct process_stratum_target): Remove the target op.
4069 (class process_target): Add the target op.
4070 * target.cc (process_target::look_up_symbols): Define.
4071
4072 Update the derived classes and callers below.
4073
4074 * server.cc (handle_query): Update.
4075 * linux-low.cc (linux_target_ops): Update.
4076 (linux_look_up_symbols): Turn into ...
4077 (linux_process_target::look_up_symbols): ... this.
4078 * linux-low.h (class linux_process_target): Update.
4079 * lynx-low.cc (lynx_target_ops): Update.
4080 * nto-low.cc (nto_target_ops): Update.
4081 * win32-low.cc (win32_target_ops): Update.
4082
4083 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4084
4085 Turn process_stratum_target's read_memory and write_memory
4086 ops into methods of process_target.
4087
4088 * target.h (struct process_stratum_target): Remove the target ops.
4089 (class process_target): Add the target ops.
4090
4091 Update the derived classes and callers below.
4092
4093 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
4094 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
4095 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
4096 (arm_get_syscall_trapinfo): Update.
4097 * linux-cris-low.cc (cris_breakpoint_at): Update.
4098 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
4099 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
4100 * linux-mips-low.cc (mips_breakpoint_at): Update.
4101 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
4102 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
4103 * linux-sh-low.cc (sh_breakpoint_at): Update.
4104 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
4105 (sparc_store_gregset_from_stack): Update.
4106 (sparc_breakpoint_at): Update.
4107 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
4108 * linux-tile-low.cc (tile_breakpoint_at): Update.
4109 * linux-x86-low.cc (x86_breakpoint_at): Update.
4110 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
4111 * mem-brea.cc (insert_memory_breakpoint): Update.
4112 (validate_inserted_breakpoint): Update.
4113 * target.cc (read_inferior_memory): Update.
4114 (target_write_memory): Update.
4115 * linux-low.cc (linux_target_ops): Update.
4116 (linux_read_memory): Make a wrapper around the read_memory target
4117 op call.
4118 (linux_process_target::read_memory): Rename from linux_read_memory.
4119 (linux_write_memory): Turn into ...
4120 (linux_process_target::write_memory): ... this.
4121 * linux-low.h (class linux_process_target): Update.
4122 * lynx-low.cc (lynx_target_ops): Update.
4123 (lynx_read_memory): Turn into ...
4124 (lynx_process_target::read_memory): ... this.
4125 (lynx_write_memory): Turn into ...
4126 (lynx_process_target::write_memory): ... this.
4127 * lynx-low.h (class lynx_process_target): Update.
4128 * nto-low.cc (nto_target_ops): Update.
4129 (nto_read_memory): Turn into ...
4130 (nto_process_target::read_memory): ... this.
4131 (nto_write_memory): Turn into ...
4132 (nto_process_target::write_memory): ... this.
4133 * nto-low.h (class nto_process_target): Update.
4134 * win32-low.cc (win32_target_ops): Update.
4135 (win32_read_inferior_memory): Turn into ...
4136 (win32_process_target::read_memory): ... this.
4137 (win32_write_inferior_memory): Turn into ...
4138 (win32_process_target::write_memory): ... this.
4139 * win32-low.h (class win32_process_target): Update.
4140
4141 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4142
4143 Turn process_stratum_target's prepare_to_access_memory and
4144 done_accessing_memory ops into methods of process_target.
4145
4146 * target.h (struct process_stratum_target): Remove the target ops.
4147 (class process_target): Add the target ops.
4148 * target.cc (process_target::prepare_to_access_memory): Define.
4149 (process_target::done_accessing_memory): Define.
4150 (prepare_to_access_memory): Update.
4151 (done_accessing_memory): Update.
4152
4153 Update the derived classes and callers below.
4154
4155 * linux-low.cc (linux_target_ops): Update.
4156 (linux_prepare_to_access_memory): Turn into ...
4157 (linux_process_target::prepare_to_access_memory): ... this.
4158 (linux_done_accessing_memory): Turn into ...
4159 (linux_process_target::done_accessing_memory): ... this.
4160 * linux-low.h (class linux_process_target): Update.
4161 * lynx-low.cc (lynx_target_ops): Update.
4162 * nto-low.cc (nto_target_ops): Update.
4163 * win32-low.cc (win32_target_ops): Update.
4164
4165 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4166
4167 Turn process_stratum_target's fetch_registers and store_registers
4168 ops into methods of process_target.
4169
4170 * target.h (struct process_stratum_target): Remove the target ops.
4171 (class process_target): Add the target ops.
4172 (fetch_inferior_registers): Update the macro.
4173 (store_inferior_registers): Update the macro.
4174
4175 Update the derived classes and callers below.
4176
4177 * linux-low.cc (linux_target_ops): Update.
4178 (linux_fetch_registers): Turn into ...
4179 (linux_process_target::fetch_registers): ... this.
4180 (linux_store_registers): Turn into ...
4181 (linux_process_target::store_registers): ... this.
4182 * linux-low.h (class linux_process_target): Update.
4183 * lynx-low.cc (lynx_target_ops): Update.
4184 (lynx_fetch_registers): Turn into ...
4185 (lynx_process_target::fetch_registers): ... this.
4186 (lynx_store_registers): Turn into ...
4187 (lynx_process_target::store_registers): ... this.
4188 * lynx-low.h (class lynx_process_target): Update.
4189 * nto-low.cc (nto_target_ops): Update.
4190 (nto_fetch_registers): Turn into ...
4191 (nto_process_target::fetch_registers): ... this.
4192 (nto_store_registers): Turn into ...
4193 (nto_process_target::store_registers): ... this.
4194 * nto-low.h (class nto_process_target): Update.
4195 * win32-low.cc (win32_target_ops): Update.
4196 (win32_fetch_inferior_registers): Turn into ...
4197 (win32_process_target::fetch_registers): ... this.
4198 (win32_store_inferior_registers): Turn into ...
4199 (win32_process_target::store_registers): ... this.
4200 * win32-low.h (class win32_process_target): Update.
4201
4202 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4203
4204 Turn process_stratum_target's wait op into a method of
4205 process_target.
4206
4207 * target.h (struct process_stratum_target): Remove the target op.
4208 (class process_target): Add the target op.
4209
4210 Update the derived classes and callers below.
4211
4212 * target.cc (target_wait): Update.
4213 * linux-low.cc (linux_target_ops): Update.
4214 (linux_wait): Turn into ...
4215 (linux_process_target::wait): ... this.
4216 * linux-low.h (class linux_process_target): Update.
4217 * lynx-low.cc (lynx_target_ops): Update.
4218 (lynx_wait): Turn into ...
4219 (lynx_process_target::wait): ... this.
4220 * lynx-low.h (class lynx_process_target): Update.
4221 * nto-low.cc (nto_target_ops): Update.
4222 (nto_wait): Turn into ...
4223 (nto_process_target::wait): ... this.
4224 * nto-low.h (class nto_process_target): Update.
4225 * win32-low.cc (win32_target_ops): Update.
4226 (win32_wait): Turn into ...
4227 (win32_process_target::wait): ... this.
4228 (do_initial_child_stuff): Update.
4229 * win32-low.h (class win32_process_target): Update.
4230
4231 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4232
4233 Turn process_stratum_target's resume op into a method of
4234 process_target.
4235
4236 * target.h (struct process_stratum_target): Remove the target op.
4237 (class process_target): Add the target op.
4238
4239 Update the derived classes and callers below.
4240
4241 * server.cc (resume): Update.
4242 * target.cc (target_stop_and_wait): Update.
4243 (target_continue_no_signal): Update.
4244 (target_continue): Update.
4245 * linux-low.cc (linux_target_ops): Update.
4246 (linux_resume): Turn into ...
4247 (linux_process_target::resume): ... this.
4248 * linux-low.h (class linux_process_target): Update.
4249 * lynx-low.cc (lynx_target_ops): Update.
4250 (lynx_resume): Turn into ...
4251 (lynx_process_target::resume): ... this.
4252 * lynx-low.h (class lynx_process_target): Update.
4253 * nto-low.cc (nto_target_ops): Update.
4254 (nto_resume): Turn into ...
4255 (nto_process_target::resume): ... this.
4256 * nto-low.h (class nto_process_target): Update.
4257 * win32-low.cc (win32_target_ops): Update.
4258 (win32_resume): Turn into ...
4259 (win32_process_target::resume): ... this.
4260 (win32_process_target::detach): Update.
4261 (do_initial_child_stuff): Update.
4262 * win32-low.h (class win32_process_target): Update.
4263
4264 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4265
4266 Turn process_stratum_target's thread_alive op into a method of
4267 process_target.
4268
4269 * target.h (struct process_stratum_target): Remove the target op.
4270 (class process_target): Add the target op.
4271 (mythread_alive): Update the macro.
4272
4273 Update the derived classes and callers below.
4274
4275 * linux-low.cc (linux_target_ops): Update.
4276 (linux_thread_alive): Turn into ...
4277 (linux_process_target::thread_alive): ... this.
4278 (wait_for_sigstop): Update.
4279 * linux-low.h (class linux_process_target): Update.
4280 * lynx-low.cc (lynx_target_ops): Update.
4281 (lynx_thread_alive): Turn into ...
4282 (lynx_process_target::thread_alive): ... this.
4283 * lynx-low.h (class lynx_process_target): Update.
4284 * nto-low.cc (nto_target_ops): Update.
4285 (nto_thread_alive): Turn into ...
4286 (nto_process_target::thread_alive): ... this.
4287 * nto-low.h (class nto_process_target): Update.
4288 * win32-low.cc (win32_target_ops): Update.
4289 (win32_thread_alive): Turn into ...
4290 (win32_process_target::thread_alive): ... this.
4291 * win32-low.h (class win32_process_target): Update.
4292
4293 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4294
4295 Turn process_stratum_target's join op into a method of
4296 process_target.
4297
4298 * target.h (struct process_stratum_target): Remove the target op.
4299 (class process_target): Add the target op.
4300 (join_inferior): Update the macro.
4301
4302 Update the derived classes and callers below.
4303
4304 * linux-low.cc (linux_target_ops): Update.
4305 (linux_join): Turn into ...
4306 (linux_process_target::join): ... this.
4307 * linux-low.h (class linux_process_target): Update.
4308 * lynx-low.cc (lynx_target_ops): Update.
4309 (lynx_join): Turn into ...
4310 (lynx_process_target::join): ... this.
4311 * lynx-low.h (class lynx_process_target): Update.
4312 * nto-low.cc (nto_target_ops): Update.
4313 (nto_process_target::join): Define.
4314 * nto-low.h (class nto_process_target): Update.
4315 * win32-low.cc (win32_target_ops): Update.
4316 (win32_join): Turn into ...
4317 (win32_process_target::join): ... this.
4318 * win32-low.h (class win32_process_target): Update.
4319
4320 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4321
4322 Turn process_stratum_target's mourn op into a method of
4323 process_target.
4324
4325 * target.h (struct process_stratum_target): Remove the target op.
4326 (class process_target): Add the target op.
4327
4328 Update the derived classes and callers below.
4329
4330 * target.cc (target_mourn_inferior): Update.
4331 * linux-low.cc (linux_target_ops): Update.
4332 (linux_mourn): Turn into ...
4333 (linux_process_target::mourn): ... this.
4334 (handle_extended_wait): Update.
4335 (linux_process_target::kill): Update.
4336 (linux_process_target::detach): Update.
4337 * linux-low.h (class linux_process_target): Update.
4338 * lynx-low.cc (lynx_target_ops): Update.
4339 (lynx_mourn): Turn into ...
4340 (lynx_process_target::mourn): ... this.
4341 * lynx-low.h (class lynx_process_target): Update.
4342 * nto-low.cc (nto_target_ops): Update.
4343 (nto_mourn): Turn into ...
4344 (nto_process_target::mourn): ... this.
4345 * nto-low.h (class nto_process_target): Update.
4346 * win32-low.cc (win32_target_ops): Update.
4347 (win32_mourn): Turn into ...
4348 (win32_process_target::mourn): ... this.
4349 * win32-low.h (class win32_process_target): Update.
4350
4351 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4352
4353 Turn process_stratum_target's detach op into a method of
4354 process_target.
4355
4356 * target.h (struct process_stratum_target): Remove the target op.
4357 (class process_target): Add the target op.
4358 (detach_inferior): Update the macro.
4359
4360 Update the derived classes and callers below.
4361
4362 * linux-low.cc (linux_target_ops): Update.
4363 (linux_detach): Turn into ...
4364 (linux_process_target::detach): ... this.
4365 * linux-low.h (class linux_process_target): Update.
4366 * lynx-low.cc (lynx_target_ops): Update.
4367 (lynx_detach): Turn into ...
4368 (lynx_process_target::detach): ... this.
4369 * lynx-low.h (class lynx_process_target): Update.
4370 * nto-low.cc (nto_target_ops): Update.
4371 (nto_detach): Turn into ...
4372 (nto_process_target::detach): ... this.
4373 * nto-low.h (class nto_process_target): Update.
4374 * win32-low.cc (win32_target_ops): Update.
4375 (win32_detach): Turn into ...
4376 (win32_process_target::detach): ... this.
4377 * win32-low.h (class win32_process_target): Update.
4378
4379 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4380
4381 Turn process_stratum_target's kill op into a method of
4382 process_target.
4383
4384 * target.h (struct process_stratum_target): Remove the target op.
4385 (class process_target): Add the target op.
4386
4387 Update the derived classes and callers below.
4388
4389 * target.cc (kill_inferior): Update.
4390 * linux-low.cc (linux_target_ops): Update.
4391 (linux_kill): Turn into ...
4392 (linux_process_target::kill): ... this.
4393 * linux-low.h (class linux_process_target): Update.
4394 * lynx-low.cc (lynx_target_ops): Update.
4395 (lynx_kill): Turn into ...
4396 (lynx_process_target::kill): ... this.
4397 * lynx-low.h (class lynx_process_target): Update.
4398 * nto-low.cc (nto_target_ops): Update.
4399 (nto_kill): Turn into ...
4400 (nto_process_target::kill): ... this.
4401 * nto-low.h (class nto_process_target): Update.
4402 * win32-low.cc (win32_target_ops): Update.
4403 (win32_kill): Turn into ...
4404 (win32_process_target::kill): ... this.
4405 * win32-low.h (class win32_process_target): Update.
4406
4407 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4408
4409 Turn process_stratum_target's attach op into a method of
4410 process_target.
4411
4412 * target.h (struct process_stratum_target): Remove the target op.
4413 (class process_target): Add the target op.
4414 (myattach): Update the macro.
4415
4416 Update the derived classes and callers below.
4417
4418 * linux-low.cc (linux_target_ops): Update.
4419 (linux_attach): Turn into ...
4420 (linux_process_target::attach): ... this.
4421 * linux-low.h (class linux_process_target): Update.
4422 * lynx-low.cc (lynx_target_ops): Update.
4423 (lynx_attach): Turn into ...
4424 (lynx_process_target::attach): ... this.
4425 * lynx-low.h (class lynx_process_target): Update.
4426 * nto-low.cc (nto_target_ops): Update.
4427 (nto_attach): Turn into ...
4428 (nto_process_target::attach): ... this.
4429 * nto-low.h (class nto_process_target): Update.
4430 * win32-low.cc (win32_target_ops): Update.
4431 (win32_attach): Turn into ...
4432 (win32_process_target::attach): ... this.
4433 * win32-low.h (class win32_process_target): Update.
4434
4435 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4436
4437 Turn process_stratum_target's post_create_inferior op into a method
4438 of process_target.
4439
4440 * target.h (struct process_stratum_target): Remove the target op.
4441 (class process_target): Add the target op.
4442 (target_post_create_inferior): Update the macro.
4443 * target.cc (process_target::post_create_inferior): Define.
4444
4445 Update the derived classes and callers below.
4446
4447 * linux-low.cc (linux_target_ops): Update.
4448 (linux_post_create_inferior): Turn into ...
4449 (linux_process_target::post_create_inferior): ... this.
4450 * linux-low.h (class linux_process_target): Update.
4451 * lynx-low.cc (lynx_target_ops): Update.
4452 * nto-low.cc (nto_target_ops): Update.
4453 * win32-low.cc (win32_target_ops): Update.
4454
4455 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4456
4457 Turn process_stratum_target's create_inferior op into a method of
4458 process_target.
4459
4460 * target.h (struct process_stratum_target): Remove the target op.
4461 (class process_target): Add the target op.
4462 (create_inferior): Rename the macro to ...
4463 (target_create_inferior): ... this.
4464
4465 Update the derived classes and callers below.
4466
4467 * server.cc (handle_v_run): Update.
4468 (captured_main): Update.
4469 (process_serial_event): Update.
4470 * linux-low.cc (linux_target_ops): Update.
4471 (linux_create_inferior): Turn into ...
4472 (linux_process_target::create_inferior): ... this.
4473 * linux-low.h (class linux_process_target): Update.
4474 * lynx-low.cc (lynx_target_ops): Update.
4475 (lynx_create_inferior): Turn into ...
4476 (lynx_process_target::create_inferior): ... this.
4477 * lynx-low.h (class lynx_process_target): Update.
4478 * nto-low.cc (nto_target_ops): Update.
4479 (nto_create_inferior): Turn into ...
4480 (nto_process_target::create_inferior): ... this.
4481 * nto-low.h (class nto_process_target): Update.
4482 * win32-low.cc (win32_target_ops): Update.
4483 (win32_create_inferior): Turn into ...
4484 (win32_process_target::create_inferior): ... this.
4485 * win32-low.h (class win32_process_target): Update.
4486
4487 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4488
4489 * target.h (class process_target): New class definition.
4490 (struct process_stratum_target) <pt>: New field with type
4491 'process_target*'.
4492 * linux-low.h (class linux_process_target): Define as a derived
4493 class of 'process_target'.
4494 * linux-low.cc (linux_target_ops): Add a linux_process_target*
4495 as the 'pt' field.
4496 * lynx-low.h (class lynx_process_target): Define as a derived
4497 class of 'process_target'.
4498 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
4499 as the 'pt' field.
4500 * nto-low.h (class nto_process_target): Define as a derived
4501 class of 'process_target'.
4502 * nto-low.cc (nto_target_ops): Add an nto_process_target*
4503 as the 'pt' field.
4504 * win32-low.h (class win32_process_target): Define as a derived
4505 class of 'process_target'.
4506 * win32-low.cc (win32_target_ops): Add a win32_process_target*
4507 as the 'pt' field.
4508
4509 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
4510
4511 * configure: Regenerate.
4512
4513 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
4514 Andrew Burgess <andrew.burgess@embecosm.com>
4515
4516 * linux-riscv-low.cc: New file.
4517 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
4518 and nat/riscv-linux-tdesc.c.
4519 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
4520 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
4521 Define.
4522
4523 2020-02-14 Tom Tromey <tom@tromey.com>
4524
4525 * acinclude.m4: Don't include acx_configure_dir.m4.
4526 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
4527 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
4528 (all, install-only, uninstall, clean-info, clean)
4529 (maintainer-clean): Don't recurse.
4530 (subdir_do, all-lib): Remove.
4531 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
4532 (GNULIB_H): Remove.
4533 (generated_files): Update.
4534 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
4535 * configure: Rebuild.
4536 * configure.ac: Don't configure gnulib or libiberty.
4537 (GNULIB): Update.
4538
4539 2020-02-14 Eli Zaretskii <eliz@gnu.org>
4540
4541 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
4542 preparing the command line for CreateProcess.
4543 (win32_create_inferior): Reflect the program name in debugging
4544 output that shows the process and its command line.
4545
4546 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
4547
4548 * Makefile.in: Rename source files from .c to .cc.
4549 * %.c: Rename to %.cc.
4550 * configure.ac: Rename server.c to server.cc.
4551 * configure: Re-generate.
4552
4553 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
4554
4555 * Makefile.in: Rename gdbsupport source files from .c to .cc.
4556
4557 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
4558
4559 * win32-low.c (win32_create_inferior): Set signal_pid.
4560
4561 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
4562 Pedro Alves <palves@redhat.com>
4563
4564 Skip building gdbserver in a cross-configuration.
4565 * configure.srv: Set $gdbserver_host depending on whether $target
4566 is $host. Use $gdbserver_host instead of $host.
4567
4568 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4569
4570 * configure: Re-generate.
4571
4572 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4573
4574 * configure: Re-generate.
4575
4576 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4577
4578 * acinclude.m4: Update warning.m4 path.
4579
4580 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
4581
4582 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
4583 (handle_exception): Set siginfo_er.
4584 (win32_xfer_siginfo): New function.
4585
4586 2020-02-07 Tom Tromey <tom@tromey.com>
4587 Pedro Alves <palves@redhat.com>
4588
4589 * README: Update build documentation.
4590 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
4591 host, not target.
4592 * configure.ac: Update paths.
4593 * configure: Rebuild.
4594 * acinclude.m4: Update paths.
4595 * Makefile.in: Update include paths.
4596 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
4597 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
4598 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
4599 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
4600 (%-generated.c): Update paths.
4601 * Move entire directory from ../gdb/gdbserver.
4602
4603 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
4604
4605 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
4606
4607 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4608
4609 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
4610 assignment instead of srv_linux_obj.
4611
4612 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
4613
4614 * server.c (handle_qxfer_libraries): Write segment-address with
4615 paddress.
4616
4617 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
4618
4619 * Makefile.in (install-strip): New target.
4620 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
4621 * aclocal.m4: Regenerate.
4622 * configure: Regenerate.
4623 * configure.ac: Add AM_PROG_INSTALL_STRIP.
4624
4625 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4626
4627 * Makefile.in (SFILES): Adjust paths to point to real files.
4628 (OBS): Move waitstatus.o to target/waitstatus.o.
4629 (TAGS): Transform paths appropriately.
4630 (%.o): Rename to...
4631 (nat/%.o): ... this pattern rule.
4632 (%.o): Rename to...
4633 (target/%.o): ... this pattern rule.
4634 * configure.srv: Adjust paths throughout to include nat/ prefix
4635 with the revant files.
4636 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
4637 * configure: Regenerate.
4638
4639 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4640
4641 * Makefile.in (TAGS): Remove config files from the recipe.
4642
4643 2020-01-14 Tom Tromey <tom@tromey.com>
4644
4645 * configure: Rebuild.
4646 * configure.ac: Remove any checks that were added to common.m4.
4647 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
4648 lib-link.m4.
4649
4650 2020-01-14 Tom Tromey <tom@tromey.com>
4651
4652 * server.h: Include config.h.
4653 * gdbreplay.c: Include config.h.
4654 * configure: Rebuild.
4655 * configure.ac: Don't source common.host.
4656 * acinclude.m4: Update path.
4657 * Makefile.in (INCSUPPORT): New variable.
4658 (INCLUDE_CFLAGS): Add INCSUPPORT.
4659 (SFILES): Update paths.
4660 (version-generated.c): Update path to create-version.sh.
4661 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
4662
4663 2020-01-14 Tom Tromey <tom@tromey.com>
4664
4665 * configure.ac (LIBS): Use WIN32APILIBS.
4666 (USE_WIN32API): Don't define.
4667 * configure: Rebuild.
4668
4669 2020-01-14 Tom Tromey <tom@tromey.com>
4670
4671 * configure: Rebuild.
4672
4673 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4674
4675 * Makefile.in (%-generated.c): Remove rule for files from
4676 regformats/i386.
4677
4678 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4679
4680 * configure: Re-generate.
4681
4682 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4683
4684 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
4685 Define to static.
4686 * tracepoint.c (stop_tracing, flush_trace_buffer,
4687 about_to_request_buffer_space, get_trace_state_variable_value,
4688 set_trace_state_variable_value, gdb_collect): Add declaration.
4689
4690 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4691
4692 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
4693 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
4694 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
4695 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
4696 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
4697 static.
4698
4699 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4700
4701 * inferiors.c: Include gdbsupport/common-inferior.h.
4702
4703 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4704
4705 * hostio-errno.c: Include hostio.h.
4706
4707 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4708
4709 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
4710 prerequisite.
4711
4712 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4713
4714 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
4715 * linux-arm-tdesc.h: Include arch/arm.h.
4716
4717 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4718
4719 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
4720
4721 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4722
4723 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
4724 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
4725
4726 2020-01-10 Pedro Alves <palves@redhat.com>
4727
4728 * fork-child.c (post_fork_inferior): Pass target down to
4729 startup_inferior.
4730 * inferiors.c (switch_to_thread): Add process_stratum_target
4731 parameter.
4732 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
4733 * nto-low.c (nto_target_ops): Now a process_stratum_target.
4734 * linux-low.c (linux_target_ops): Now a process_stratum_target.
4735 * remote-utils.c (prepare_resume_reply): Pass the target to
4736 switch_to_thread.
4737 * target.c (the_target): Now a process_stratum_target.
4738 (done_accessing_memory): Pass the target to switch_to_thread.
4739 (set_target_ops): Ajust to use process_stratum_target.
4740 * target.h (struct target_ops): Rename to ...
4741 (struct process_stratum_target): ... this.
4742 (the_target, set_target_ops): Adjust.
4743 (prepare_to_access_memory): Adjust comment.
4744 * win32-low.c (child_xfer_memory): Adjust to use
4745 process_stratum_target.
4746 (win32_target_ops): Now a process_stratum_target.
4747
4748 2020-01-06 Eli Zaretskii <eliz@gnu.org>
4749 Pedro Alves <palves@redhat.com>
4750
4751 * win32-low.c (get_child_debug_event): Extract the fatal exception
4752 from the exit status and convert to the equivalent Posix signal
4753 number.
4754 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
4755 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
4756
4757 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
4758
4759 * Makefile.in: Use INSTALL_PROGRAM_ENV.
4760
4761 2020-01-01 Joel Brobecker <brobecker@adacore.com>
4762
4763 * server.c (gdbserver_version): Change copyright year to 2020.
4764 * gdbreplay.c (gdbreplay_version): Likewise.
4765
4766 2019-12-19 Christian Biesinger <cbiesinger@google.com>
4767
4768 * configure: Regenerate.
4769 * configure.ac: Quote variable arguments of test.
4770
4771 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
4772
4773 * Makefile.in: Fix build with GNU Make 3.81
4774
4775 2019-12-16 Tom Tromey <tromey@adacore.com>
4776
4777 * server.c (get_exec_file): Constify result.
4778
4779 2019-12-10 Christian Biesinger <cbiesinger@google.com>
4780
4781 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
4782 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
4783 * config.in: Regenerate.
4784 * configure: Regenerate.
4785 * configure.ac: Don't check for strerror.
4786 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
4787 Call safe_strerror instead of strerror.
4788 * server.h (strerror): Remove this now-unnecessary declaration.
4789 * tracepoint.c (init_named_socket): Call safe_strerror instead of
4790 strerror.
4791 (gdb_agent_helper_thread): Likewise.
4792 * utils.c (perror_with_name): Likewise.
4793
4794 2019-11-26 Tom Tromey <tom@tromey.com>
4795
4796 * configure, config.in: Rebuild.
4797
4798 2019-11-26 Tom Tromey <tom@tromey.com>
4799
4800 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
4801 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
4802 gdb_sigmask.
4803 * configure, config.in: Rebuild.
4804
4805 2019-11-26 Tom Tromey <tom@tromey.com>
4806
4807 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
4808 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
4809 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
4810 * acinclude.m4: Include ax_pthread.m4.
4811 * config.in, configure: Rebuild.
4812
4813 2019-11-26 Christian Biesinger <cbiesinger@google.com>
4814
4815 * debug.c (debug_set_output): Call safe_strerror instead of
4816 strerror.
4817 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
4818 (linux_kill_one_lwp): Likewise.
4819 (linux_detach_one_lwp): Likewise.
4820 (linux_wait_for_event_filtered): Likewise.
4821 (store_register): Likewise.
4822 * lynx-low.c (lynx_attach): Likewise.
4823 * mem-break.c (insert_memory_breakpoint): Likewise.
4824 (remove_memory_breakpoint): Likewise.
4825 (delete_fast_tracepoint_jump): Likewise.
4826 (set_fast_tracepoint_jump): Likewise.
4827 (uninsert_fast_tracepoint_jumps_at): Likewise.
4828 (reinsert_fast_tracepoint_jumps_at): Likewise.
4829 * nto-low.c (nto_xfer_memory): Likewise.
4830 (nto_resume): Likewise.
4831
4832 2019-11-20 Luis Machado <luis.machado@linaro.org>
4833
4834 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
4835 instead of register count.
4836 * tdesc.c (tdesc_contains_feature): New function.
4837 * tdesc.h (tdesc_contains_feature): New prototype.
4838
4839 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4840
4841 * Makefile.in: Add safe-strerror.c.
4842 * configure: Regenerate.
4843 * configure.ac: Don't source common.host.
4844
4845 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4846
4847 * config.in: Regenerate.
4848 * configure: Regenerate.
4849
4850 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
4851
4852 * ax.c (ax_printf): Handle size_t_arg.
4853
4854 2019-11-06 Christian Biesinger <cbiesinger@google.com>
4855
4856 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
4857 * mi/mi-main.c (output_cores): Likewise.
4858 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
4859 (linux_xfer_osdata_modules): Likewise.
4860 * remote.c (register_remote_support_xml): Likewise.
4861 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
4862 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
4863
4864 2019-11-01 Christian Biesinger <cbiesinger@google.com>
4865
4866 * configure: Regenerate.
4867 * configure.ac: Remove check for strerror_r.
4868
4869 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4870
4871 * config.in: Regenerate.
4872 * configure: Regenerate.
4873 * configure.ac: Also check for strerror_r.
4874
4875 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4876
4877 * ax.h (debug_agent): Remove duplicate declaration.
4878
4879 2019-10-26 Tom de Vries <tdevries@suse.de>
4880
4881 * linux-aarch64-low.c: Fix typos in comments.
4882 * linux-arm-low.c: Same.
4883 * linux-low.c: Same.
4884 * linux-ppc-low.c: Same.
4885 * proc-service.c: Same.
4886 * regcache.h: Same.
4887 * server.c: Same.
4888 * tracepoint.c: Same.
4889 * win32-low.c: Same.
4890
4891 2019-10-25 Tom Tromey <tromey@adacore.com>
4892
4893 * utils.c (xstrdup): Remove.
4894
4895 2019-10-23 Tom Tromey <tom@tromey.com>
4896
4897 * configure, config.in: Rebuild.
4898
4899 2019-10-23 Tom Tromey <tom@tromey.com>
4900
4901 * configure: Rebuild.
4902 * acinclude.m4: Use m4_include, not sinclude.
4903
4904 2019-10-17 Tom Tromey <tromey@adacore.com>
4905
4906 * configure: Rebuild.
4907 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
4908 in AC_CONFIG_FILES invocation.
4909 * Makefile.in (stamp-h, Makefile): Use new-style config.status
4910 invocation.
4911
4912 2019-10-16 Christian Biesinger <cbiesinger@google.com>
4913
4914 * server.c: Include xml-builtin.h.
4915 (get_xml_features): Don't declare xml_builtins here.
4916
4917 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4918
4919 * Makefile.in: Remove references to vec-ipa.o.
4920
4921 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4922
4923 * Makefile.in: Remove references to vec.c.
4924
4925 2019-10-02 Christian Biesinger <cbiesinger@google.com>
4926
4927 * server.c (server_waiting): Change to bool.
4928 (extended_protocol): Likewise.
4929 (response_needed): Likewise.
4930 (exit_requested): Likewise.
4931 (run_once): Likewise.
4932 (report_no_resumed): Likewise.
4933 (non_stop): Likewise.
4934 (disable_packet_vCont): Likewise.
4935 (disable_packet_Tthread): Likewise.
4936 (disable_packet_qC): Likewise.
4937 (disable_packet_qfThreadInfo): Likewise.
4938 (handle_general_set): Update.
4939 (handle_detach): Update.
4940 (handle_monitor_command): Update.
4941 (handle_query): Update.
4942 (captured_main): Update.
4943 (process_serial_event): Update.
4944 * server.h (server_waiting): Change to bool.
4945 (disable_packet_vCont): Likewise.
4946 (disable_packet_Tthread): Likewise.
4947 (disable_packet_qC): Likewise.
4948 (disable_packet_qfThreadInfo): Likewise.
4949 (run_once): Likewise.
4950 (non_stop): Likewise.
4951 * target.c (target_stop_and_wait): Update.
4952
4953 2019-10-02 Tom Tromey <tromey@adacore.com>
4954
4955 * Makefile.in (SFILES): Add common-inferior.c.
4956 (OBS): Add common-inferior.o.
4957 * server.c (startup_with_shell): Don't define.
4958
4959 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
4960
4961 * linux-low.c (linux_low_read_btrace): Update for change to
4962 std::vector.
4963
4964 2019-09-20 Christian Biesinger <cbiesinger@google.com>
4965
4966 * debug.c (debug_threads): Remove comment in favor of the header.
4967 * debug.h (using_threads): Add declaration.
4968 (debug_threads): Add comment.
4969 * linux-aarch64-low.c: Include debug.h and remove declaration of
4970 debug_threads.
4971 * nto-low.c: Likewise.
4972 * remote-utils.c: Likewise.
4973 * thread-db.c: Likewise.
4974
4975 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
4976
4977 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
4978 and powerpc-cell64l-ipa.o.
4979 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
4980 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
4981 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
4982 (spu*-*-*): Remove.
4983
4984 * spu-low.c: Remove file.
4985
4986 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
4987 (parse_spufs_run): Remove.
4988 (ppc_get_pc): Remove Cell/B.E. support.
4989 (ppc_set_pc): Likewise.
4990 (ppc_breakpoint_at): Likewise.
4991 (ppc_arch_setup): Likewise.
4992 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
4993 tdesc_powerpc_cell32l.
4994 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
4995 or init_registers_powerpc_cell32l.
4996 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
4997 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
4998 or init_registers_powerpc_cell32l.
4999 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
5000 (init_registers_powerpc_cell32l): Remove prototype.
5001 (init_registers_powerpc_cell64l): Likewise.
5002
5003 * target.h (struct target_ops): Remove qxfer_spu member.
5004 * server.c (handle_qxfer_spu): Remove.
5005 (qxfer_packets): Remove entry for "spu".
5006 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
5007 * linux-low.c (SPUFS_MAGIC): Remove.
5008 (spu_enumerate_spu_ids): Remove.
5009 (linux_qxfer_spu): Remove.
5010 (linux_target_ops): Remove qxfer_spu member.
5011 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
5012 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
5013 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
5014
5015 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
5016
5017 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
5018 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
5019 * config.in: Regenerate.
5020 * configure: Regenerate.
5021
5022 2019-08-15 Tom Tromey <tromey@adacore.com>
5023
5024 * target.c (target_write_memory): Use gdb::byte_vector.
5025
5026 2019-08-15 Tom Tromey <tromey@adacore.com>
5027
5028 * tracepoint.c (write_inferior_data_pointer)
5029 (write_inferior_integer, write_inferior_int8)
5030 (write_inferior_uinteger, m_tracepoint_action_download)
5031 (r_tracepoint_action_download, x_tracepoint_action_download)
5032 (l_tracepoint_action_download, clear_inferior_trace_buffer)
5033 (download_agent_expr, download_tracepoint_1)
5034 (download_trace_state_variables, upload_fast_traceframes): Update.
5035 * server.c (gdb_write_memory): Update.
5036 * remote-utils.c (relocate_instruction): Update.
5037 * proc-service.c (ps_pdwrite): Update.
5038 * mem-break.c (remove_memory_breakpoint)
5039 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
5040 (uninsert_fast_tracepoint_jumps_at)
5041 (reinsert_fast_tracepoint_jumps_at): Update.
5042 * linux-x86-low.c (append_insns)
5043 (i386_install_fast_tracepoint_jump_pad)
5044 (amd64_write_goto_address, i386_write_goto_address): Update.
5045 * linux-s390-low.c (append_insns, s390_write_goto_address):
5046 Update.
5047 * linux-ppc-low.c (ppc_relocate_instruction)
5048 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
5049 (ppc_write_goto_address): Update.
5050 * linux-aarch64-low.c (append_insns): Update.
5051 * target.h (struct target_ops): Update.
5052 (write_inferior_memory): Don't declare.
5053 * target.c (target_write_memory): Rename from
5054 write_inferior_memory. Remove old target_write_memory.
5055
5056 2019-08-15 Tom Tromey <tromey@adacore.com>
5057
5058 * target.c (write_inferior_memory): Use std::vector.
5059
5060 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
5061
5062 PR build/24886
5063 * configure.ac: Drop enable-libmcheck support.
5064 * configure, config.in: Rebuild.
5065 * acinclude.m4: Don't include it.
5066
5067 2019-07-19 Alan Hayward <alan.hayward@arm.com>
5068
5069 * configure.srv: Remove Arm xml files.
5070
5071 2019-07-19 Alan Hayward <alan.hayward@arm.com>
5072
5073 * configure.srv: Add new files. Remove xml generated files.
5074 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
5075 registers.
5076 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
5077 * linux-aarch32-tdesc.c: New file.
5078 * linux-aarch32-tdesc.h: New file.
5079 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
5080 * linux-arm-low.c (init_registers_arm, tdesc_arm)
5081 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
5082 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
5083 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
5084 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
5085 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
5086 (arm_read_description): Call arm_linux_read_description.
5087 (initialize_low_arch): Don't init registers.
5088 * linux-arm-tdesc.c: New file.
5089 * linux-arm-tdesc.h: New file.
5090
5091 2019-07-10 Alan Hayward <alan.hayward@arm.com>
5092
5093 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
5094 Move counter inside for.
5095 (arm_read_description): Check ptrace earlier.
5096 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
5097
5098 2019-07-09 Tom Tromey <tom@tromey.com>
5099
5100 * configure: Rebuild.
5101 * configure.ac: Change common to gdbsupport.
5102 * acinclude.m4: Change common to gdbsupport.
5103 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
5104 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
5105 common to gdbsupport.
5106 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
5107 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
5108 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
5109 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
5110 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
5111 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
5112 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
5113 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
5114 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
5115 common to gdbsupport.
5116
5117 2019-07-04 Alan Hayward <alan.hayward@arm.com>
5118
5119 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
5120 defines.
5121 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
5122
5123 2019-07-04 Alan Hayward <alan.hayward@arm.com>
5124
5125 * configure.srv: Remove legacy xml.
5126 * linux-aarch64-low.c (initialize_low_arch): Remove
5127 initialize_low_tdesc call.
5128 * linux-aarch64-tdesc-selftest.c: Remove file.
5129 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
5130 * linux-x86-low.c (initialize_low_arch): Remove
5131 initialize_low_tdesc call.
5132 * linux-x86-tdesc-selftest.c: Remove file.
5133 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
5134
5135 2019-06-20 Tom de Vries <tdevries@suse.de>
5136
5137 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
5138 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
5139
5140 2019-06-19 Tom de Vries <tdevries@suse.de>
5141
5142 * debug.h (debug_write): Change return type to ssize_t.
5143 * debug.c (debug_write): Same.
5144
5145 2019-06-14 Tom Tromey <tom@tromey.com>
5146
5147 * configure.ac: Use new path to gnulib.
5148 * configure: Rebuild.
5149 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
5150 to gnulib.
5151
5152 2019-06-11 Tom Tromey <tom@tromey.com>
5153
5154 * Makefile.in (SFILES): Add alloc.c.
5155 (OBS): Add alloc.o.
5156 (IPA_OBJS): Add alloc-ipa.o.
5157 (alloc-ipa.o): New target.
5158 (%.o: ../%.c): New pattern rule.
5159
5160 2019-06-10 Tom Tromey <tromey@adacore.com>
5161
5162 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
5163 end warning with a newline.
5164 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
5165 newline.
5166 * thread-db.c (attach_thread): Don't end warning with a newline.
5167 (thread_db_notice_clone): Likewise.
5168 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
5169 newline.
5170 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
5171 end warning with a newline.
5172
5173 2019-06-04 Pedro Alves <palves@redhat.com>
5174
5175 * server.c (captured_main): Use make_unique_xstrdup.
5176
5177 2019-06-02 Tom Tromey <tom@tromey.com>
5178
5179 * gdbreplay.c (fromhex): Remove.
5180 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
5181
5182 2019-05-29 Tom Tromey <tromey@adacore.com>
5183
5184 * configure: Rebuild.
5185
5186 2019-05-06 Kevin Buettner <kevinb@redhat.com>
5187
5188 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
5189 sign extension code on 32-bit builds.
5190
5191 2019-05-03 Eli Zaretskii <eliz@gnu.org>
5192
5193 * remote-utils.c:
5194 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
5195
5196 2019-04-19 Tom Tromey <tom@tromey.com>
5197
5198 * server.c (struct vstop_notif): Derive from notif_event.
5199 <base>: Remove.
5200 (queue_stop_reply): Update.
5201 (remove_all_on_match_ptid): Change type. Rewrite.
5202 (discard_queued_stop_replies): Rewrite.
5203 (in_queued_stop_replies_ptid): Change type.
5204 (in_queued_stop_replies): Rewrite.
5205 (notif_stop): Update.
5206 (queue_stop_reply_callback): Update.
5207 (captured_main): Don't call initialize_notif.
5208 (push_stop_notification): Update.
5209 * notif.c (notif_write_event, handle_notif_ack)
5210 (notif_event_enque, notif_push): Update.
5211 (notif_event_xfree, initialize_notif): Remove.
5212 * notif.h (struct notif_event): Include <list>, not
5213 "common/queue.h".
5214 (struct notif_server) <queue>: Now a std::list.
5215 (notif_event_p): Remove typedef.
5216 (initialize_notif): Don't declare.
5217 (struct notif_event): Add virtual destructor.
5218
5219 2019-04-17 Alan Hayward <alan.hayward@arm.com>
5220
5221 * ax.c (ax_vdebug): Call debug_printf.
5222 * debug.c (debug_write): New function.
5223 * debug.h (debug_write): New declaration.
5224 * linux-low.c (sigchld_handler): Call debug_write.
5225
5226 2019-04-17 Alan Hayward <alan.hayward@arm.com>
5227
5228 * debug.c (debug_set_output): New function.
5229 (debug_vprintf): Send output to debug_file.
5230 (debug_flush): Likewise.
5231 * debug.h (debug_set_output): New declaration.
5232 * server.c (handle_monitor_command): Add debug-file option.
5233 (captured_main): Likewise.
5234
5235 2019-04-17 Alan Hayward <alan.hayward@arm.com>
5236
5237 * debug.c (remote_debug): Add definition.
5238 * debug.h (remote_debug): Add declaration.
5239 * hostio.c (remote_debug): Remove declaration.
5240 * remote-utils.c (struct ui_file): Likewise.
5241 (remote_debug): Likewise.
5242 * remote-utils.h (remote_debug): Likewise,
5243 * server.c (remote_debug): Remove definition.
5244
5245 2019-04-10 Kevin Buettner <kevinb@redhat.com>
5246
5247 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
5248 when using a 64-bit gdbserver.
5249
5250 2019-04-09 Tom Tromey <tromey@adacore.com>
5251
5252 * linux-low.c (select_event_lwp): Use find_thread_in_random.
5253
5254 2019-04-08 Tom Tromey <tom@tromey.com>
5255
5256 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
5257 throw.
5258 (linux_resume_one_lwp): Likewise.
5259
5260 2019-04-08 Tom Tromey <tom@tromey.com>
5261
5262 * gdbreplay.c: Update.
5263 * linux-low.c: Update.
5264 * server.c: Update.
5265
5266 2019-04-08 Tom Tromey <tom@tromey.com>
5267
5268 * server.c: Use C++ exception handling.
5269 * linux-low.c: Use C++ exception handling.
5270 * gdbreplay.c: Use C++ exception handling.
5271
5272 2019-04-08 Tom Tromey <tom@tromey.com>
5273
5274 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
5275 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
5276 (captured_main, main): Update.
5277 * gdbreplay.c (main): Update.
5278
5279 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5280
5281 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
5282 value in argument pointer, return 1 if the entry is found and 0
5283 otherwise. Move comment.
5284 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
5285 * linux-low.h (linux_get_auxv): Declare.
5286 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
5287
5288 2019-04-05 Tom Tromey <tromey@adacore.com>
5289
5290 * server.c (gdbserver_usage): Use upper-case for metasyntactic
5291 variables.
5292
5293 2019-03-28 Alan Hayward <alan.hayward@arm.com>
5294
5295 * linux-low.c (AT_HWCAP2): Add define if not already included.
5296
5297 2019-03-26 Alan Hayward <alan.hayward@arm.com>
5298
5299 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
5300 (aarch64_arch_setup): Call linux_get_hwcap.
5301 * linux-arm-low.c (arm_get_hwcap): Remove function.
5302 (arm_read_description): Call linux_get_hwcap.
5303 * linux-low.c (linux_get_auxv): New function.
5304 (linux_get_hwcap): Likewise.
5305 (linux_get_hwcap2): Likewise.
5306 * linux-low.h (linux_get_hwcap): New declaration.
5307 (linux_get_hwcap2): Likewise.
5308 * linux-ppc-low.c (ppc_get_auxv): Remove function.
5309 (ppc_arch_setup): Call linux_get_hwcap.
5310 * linux-s390-low.c (s390_get_hwcap): Remove function.
5311 (s390_arch_setup): Call linux_get_hwcap.
5312
5313 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5314 Jiong Wang <jiong.wang@arm.com>
5315
5316 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
5317 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
5318 to fail.
5319 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
5320
5321 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5322 Jiong Wang <jiong.wang@arm.com>
5323
5324 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
5325 (aarch64_get_hwcap): New function.
5326 (aarch64_arch_setup): Read APIA hwcap.
5327
5328 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5329 Jiong Wang <jiong.wang@arm.com>
5330
5331 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
5332 (initialize_low_tracepoint): Likewise.
5333 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
5334 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
5335 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
5336 (aarch64_linux_read_description): Likewise.
5337 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
5338
5339 2019-03-12 John Baldwin <jhb@FreeBSD.org>
5340
5341 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
5342 i386_create_target_description for 'segments' parameter.
5343 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
5344 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
5345 * win32-i386-low.c (i386_arch_setup): Likewise.
5346
5347 2019-03-12 Tom Tromey <tromey@adacore.com>
5348
5349 * linux-low.c (iterate_over_lwps): Update.
5350
5351 2019-03-06 Tom Tromey <tom@tromey.com>
5352
5353 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
5354 (captured_main): Use SCOPE_EXIT.
5355
5356 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
5357
5358 * configure.srv: Use '$enable_unittest' instead of '$development'
5359 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
5360 case.
5361
5362 2019-02-27 Tom Tromey <tromey@adacore.com>
5363
5364 * gdbreplay.c (logchar): Handle \r\n.
5365
5366 2019-02-07 Alan Hayward <alan.hayward@arm.com>
5367
5368 * linux-low.c (linux_attach): Add process before lwp.
5369 * server.c (attach_inferior): Check if already attached.
5370
5371 2019-02-07 Tom Tromey <tom@tromey.com>
5372
5373 * x86-tdesc.h: Rename include guard.
5374 * x86-low.h: Add include guard.
5375 * wincecompat.h: Rename include guard.
5376 * win32-low.h: Add include guard.
5377 * utils.h: Rename include guard.
5378 * tracepoint.h: Rename include guard.
5379 * tdesc.h: Rename include guard.
5380 * target.h: Rename include guard.
5381 * server.h: Rename include guard.
5382 * remote-utils.h: Rename include guard.
5383 * regcache.h: Rename include guard.
5384 * nto-low.h: Rename include guard.
5385 * notif.h: Add include guard.
5386 * mem-break.h: Rename include guard.
5387 * lynx-low.h: Add include guard.
5388 * linux-x86-tdesc.h: Add include guard.
5389 * linux-s390-tdesc.h: Add include guard.
5390 * linux-ppc-tdesc-init.h: Add include guard.
5391 * linux-low.h: Add include guard.
5392 * linux-aarch64-tdesc.h: Add include guard.
5393 * linux-aarch32-low.h: Add include guard.
5394 * inferiors.h: Rename include guard.
5395 * i387-fp.h: Rename include guard.
5396 * hostio.h: Rename include guard.
5397 * gdbthread.h: Rename include guard.
5398 * gdb_proc_service.h: Rename include guard.
5399 * event-loop.h: Rename include guard.
5400 * dll.h: Rename include guard.
5401 * debug.h: Rename include guard.
5402 * ax.h: Rename include guard.
5403
5404 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
5405
5406 PR gdb/23985
5407 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
5408 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
5409
5410 2019-01-25 Tom Tromey <tom@tromey.com>
5411
5412 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
5413
5414 2019-01-25 Tom Tromey <tom@tromey.com>
5415
5416 * win32-low.c: Fix common/ includes.
5417 * win32-i386-low.c: Fix common/ includes.
5418 * tracepoint.c: Fix common/ includes.
5419 * thread-db.c: Fix common/ includes.
5420 * target.h: Fix common/ includes.
5421 * symbol.c: Fix common/ includes.
5422 * spu-low.c: Fix common/ includes.
5423 * server.h: Fix common/ includes.
5424 * server.c: Fix common/ includes.
5425 * remote-utils.c: Fix common/ includes.
5426 * regcache.h: Fix common/ includes.
5427 * regcache.c: Fix common/ includes.
5428 * nto-x86-low.c: Fix common/ includes.
5429 * notif.h: Fix common/ includes.
5430 * mem-break.h: Fix common/ includes.
5431 * lynx-low.c: Fix common/ includes.
5432 * lynx-i386-low.c: Fix common/ includes.
5433 * linux-x86-tdesc-selftest.c: Fix common/ includes.
5434 * linux-x86-low.c: Fix common/ includes.
5435 * linux-low.c: Fix common/ includes.
5436 * inferiors.h: Fix common/ includes.
5437 * i387-fp.c: Fix common/ includes.
5438 * hostio.c: Fix common/ includes.
5439 * hostio-errno.c: Fix common/ includes.
5440 * gdbthread.h: Fix common/ includes.
5441 * gdbreplay.c: Fix common/ includes.
5442 * fork-child.c: Fix common/ includes.
5443 * event-loop.c: Fix common/ includes.
5444 * ax.c:
5445 (enum gdb_agent_op): Fix common/ includes.
5446
5447 2019-01-21 Tom Tromey <tom@tromey.com>
5448
5449 * tracepoint.c: Fix includes.
5450 * remote-utils.c: Fix includes.
5451 * linux-x86-low.c: Fix includes.
5452
5453 2019-01-01 Joel Brobecker <brobecker@adacore.com>
5454
5455 * gdbreplay.c (gdbreplay_version): Update copyright year in
5456 version message.
5457 * server.c (gdbserver_version): Likewise.
5458
5459 2018-12-05 Alan Hayward <alan.hayward@arm.com>
5460
5461 * linux-low.c (add_lwp): Switch ordering.
5462
5463 2018-11-29 Tom Tromey <tom@tromey.com>
5464
5465 * win32-low.c (win32_join): Take pid, not process.
5466 * target.h (struct target_ops) <join>: Change argument type.
5467 (join_inferior): Change argument name.
5468 * spu-low.c (spu_join): Take pid, not process.
5469 * server.c (handle_detach): Preserve pid before destroying
5470 process.
5471 * lynx-low.c (lynx_join): Take pid, not process.
5472 * linux-low.c (linux_join): Take pid, not process.
5473
5474 2018-11-23 Alan Hayward <alan.hayward@arm.com>
5475
5476 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
5477 (aarch64_cannot_fetch_register): Likewise.
5478 (struct linux_target_ops): Update references.
5479
5480 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5481
5482 * linux-ppc-low.c: Include nat/linux-ptrace.h.
5483
5484 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5485
5486 * configure.srv (ipa_ppc_linux_regobj): Add
5487 powerpc-isa207-htm-vsx32l-ipa.o and
5488 powerpc-isa207-htm-vsx64l-ipa.o.
5489 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
5490 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
5491 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
5492 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
5493 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
5494 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
5495 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
5496 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
5497 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5498 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
5499 (init_registers_powerpc_isa207_htm_vsx32l)
5500 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
5501 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
5502 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
5503 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
5504 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
5505 (ppc_store_tm_ctarregset): New functions.
5506 (ppc_regsets): Add entries for HTM regsets.
5507 (ppc_arch_setup): Set htm in features struct when needed. Set
5508 sizes for the HTM regsets.
5509 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
5510 (initialize_low_arch): Call
5511 init_registers_powerpc_isa207_htm_vsx32l and
5512 init_registers_powerpc_isa207_htm_vsx64l.
5513 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5514 PPC_TDESC_ISA207_HTM_VSX.
5515 (initialize_low_tracepoint): Call
5516 init_registers_powerpc_isa207_htm_vsx32l and
5517 init_registers_powerpc_isa207_htm_vsx64l.
5518
5519 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5520
5521 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
5522 rs6000/power-linux-pmu.xml to srv_xmlfiles.
5523 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
5524 (ppc_store_pmuregset): New functions.
5525 (ppc_regsets): Add entries for ebb and pmu regsets.
5526 (ppc_arch_setup): Set isa207 in features struct if the ebb and
5527 pmu regsets are available. Set sizes for these regsets.
5528
5529 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5530
5531 * configure.srv (ipa_ppc_linux_regobj): Add
5532 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
5533 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
5534 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
5535 rs6000/powerpc-isa207-vsx32l.xml, and
5536 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
5537 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5538 <PPC_TDESC_ISA207_VSX>: New enum value.
5539 (init_registers_powerpc_isa207_vsx32l): Declare.
5540 (init_registers_powerpc_isa207_vsx64l): Declare.
5541 * linux-ppc-low.c (ppc_fill_tarregset): New function.
5542 (ppc_store_tarregset): New function.
5543 (ppc_regsets): Add entry for the TAR regset.
5544 (ppc_arch_setup): Set isa207 in features struct when needed. Set
5545 size for the TAR regsets.
5546 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
5547 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
5548 and init_registers_powerpc_isa207_vsx64l.
5549 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
5550 (initialize_low_tracepoint): Call
5551 init_registers_powerpc_isa207_vsx32l and
5552 init_registers_powerpc_isa207_vsx64l.
5553
5554 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5555 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5556
5557 * configure.srv (ipa_ppc_linux_regobj): Add
5558 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
5559 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
5560 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
5561 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
5562 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
5563 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
5564 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
5565 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5566 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
5567 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
5568 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
5569 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
5570 (ppc_hwcap): Add comment.
5571 (ppc_hwcap2): New global.
5572 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
5573 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
5574 (ppc_regsets): Add entries for the DSCR and PPR regsets.
5575 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
5576 when needed. Set sizes for the the DSCR and PPR regsets.
5577 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
5578 (initialize_low_arch): Call
5579 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5580 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5581 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5582 PPC_TDESC_ISA205_PPR_DSCR_VSX.
5583 (initialize_low_tracepoint): Call
5584 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5585 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5586
5587 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5588
5589 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
5590
5591 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
5592 Simon Marchi <simark@simark.ca>
5593
5594 * acinclude.m4: Include "../selftest.m4".
5595 * configure: Regenerate.
5596 * configure.ac: Use "GDB_AC_SELFTEST".
5597 * configure.srv: Use "$enable_unittests" instead of
5598 "$development" when checking whether unit tests have been
5599 enabled.
5600 * server.c (captured_main): Update message informing that
5601 selftests have been disabled.
5602
5603 2018-10-04 Tom Tromey <tom@tromey.com>
5604
5605 * configure: Rebuild.
5606
5607 2018-10-04 Tom Tromey <tom@tromey.com>
5608
5609 * server.c (handle_status): Rename inner "thread".
5610 (process_serial_event): Declare "res" in 'm' case.
5611 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
5612 (iterate_over_lwps): Rename inner "thread".
5613 (linux_qxfer_libraries_svr4): Rename inner "len".
5614 * gdbthread.h (find_thread_in_random): Rename inner "thread".
5615
5616 2018-10-01 Gary Benson <gbenson@redhat.com>
5617
5618 * gdb_proc_service.h: Moved common code to
5619 common/gdb_proc_service.h.
5620
5621 2018-10-01 Gary Benson <gbenson@redhat.com>
5622
5623 * gdb_proc_service.h: Synchronize comments and whitespace with
5624 GDB's version of this file.
5625
5626 2018-09-25 Tom Tromey <tom@tromey.com>
5627
5628 * configure: Rebuild.
5629 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
5630
5631 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5632
5633 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
5634 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
5635 ($(IPA_LIB)): Sort IPA_OBJS.
5636
5637 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5638
5639 * Makefile.in: Remove references to $(ADD_DEPS).
5640
5641 2018-09-16 Tom Tromey <tom@tromey.com>
5642
5643 * remote-utils.c (remote_open): Use GNU style for metasyntactic
5644 variables.
5645 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
5646 variables.
5647
5648 2018-09-05 Tom Tromey <tom@tromey.com>
5649
5650 * configure: Rebuild.
5651
5652 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
5653
5654 PR build/23399
5655 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
5656
5657 2018-08-27 Tom Tromey <tom@tromey.com>
5658
5659 PR build/23087:
5660 * configure: Rebuild.
5661
5662 2018-08-27 Tom Tromey <tom@tromey.com>
5663
5664 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
5665 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
5666 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
5667 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
5668 (s390x_emit_stack_adjust): Add casts to unsigned char.
5669
5670 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
5671
5672 PR gdb/23374
5673 PR gdb/23375
5674 * server.h (struct client_state) <disable_randomization>:
5675 Initialize to 1.
5676
5677 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
5678
5679 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
5680 variable.
5681 (mips_supply_ptrace_register): Likewise.
5682
5683 2018-07-22 Tom Tromey <tom@tromey.com>
5684
5685 * configure: Rebuild.
5686
5687 2018-07-22 Tom Tromey <tom@tromey.com>
5688
5689 * win32-low.c (win32_create_inferior): Remove unused variables.
5690 * gdbreplay.c (remote_open): Remove unused variable.
5691 * remote-utils.c (remote_prepare): Remove unused variable.
5692 * x86-tdesc.h (X86_TDESC_H): Define.
5693 (amd64_expedite_regs): Define conditionally.
5694 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
5695 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
5696 * remote-utils.c (readchar): Remove unused variable.
5697
5698 2018-07-13 Pedro Alves <palves@redhat.com>
5699
5700 * linux-low.c (linux_kill): Change parameter to process_info
5701 pointer instead of pid. Adjust.
5702 * lynx-low.c (lynx_kill): Likewise.
5703 * nto-low.c (nto_kill): Likewise.
5704 * spu-low.c (spu_kill): Likewise.
5705 * win32-low.c (win32_kill): Likewise.
5706 * server.c (handle_v_kill, kill_inferior_callback)
5707 (detach_or_kill_for_exit): Adjust.
5708 * target.c (kill_inferior): Change parameter to process_info
5709 pointer instead of pid. Adjust.
5710 * target.h (struct target_ops) <kill>: Change parameter to
5711 process_info pointer instead of pid. Adjust all implementations
5712 and callers.
5713 (kill_inferior): Likewise.
5714
5715 2018-07-13 Pedro Alves <palves@redhat.com>
5716
5717 * linux-low.c (linux_detach, linux_join): Change parameter to
5718 process_info pointer instead of pid. Adjust.
5719 * lynx-low.c (lynx_detach, lynx_join): Likewise.
5720 * nto-low.c (nto_detach): Likewise.
5721 * spu-low.c (spu_detach, spu_join): Likewise.
5722 * win32-low.c (win32_detach, win32_join): Likewise.
5723 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
5724 * target.h (struct target_ops) <detach, join>: Change parameter to
5725 process_info pointer instead of pid. Adjust all implementations
5726 and callers.
5727 (detach_inferior, join_inferior): Rename 'pid' parameter to
5728 'proc'.
5729
5730 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5731 Jan Kratochvil <jan.kratochvil@redhat.com>
5732 Paul Fertser <fercerpav@gmail.com>
5733 Tsutomu Seki <sekiriki@gmail.com>
5734
5735 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
5736 (OBS): Add 'common/netstuff.o'.
5737 (GDBREPLAY_OBS): Likewise.
5738 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
5739 (remote_open): Implement support for IPv6
5740 connections.
5741 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
5742 and 'wspiapi.h'.
5743 (handle_accept_event): Accept connections from IPv6 sources.
5744 (remote_prepare): Handle IPv6-style hostnames; implement
5745 support for IPv6 connections.
5746 (remote_open): Implement support for printing connections from
5747 IPv6 sources.
5748
5749 2018-07-11 Pedro Alves <palves@redhat.com>
5750
5751 PR gdb/23377
5752 * mem-break.c (any_persistent_commands): Add process_info
5753 parameter and use it instead of relying on the current process.
5754 Change return type to bool.
5755 * mem-break.h (any_persistent_commands): Add process_info
5756 parameter and change return type to bool.
5757 * server.c (handle_detach): Remove require_running_or_return call.
5758 Look up the process_info for the process we're about to detach.
5759 If not found, return back error to GDB. Adjust
5760 any_persistent_commands call to pass down a process pointer.
5761
5762 2018-07-11 Pedro Alves <palves@redhat.com>
5763
5764 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
5765 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
5766 instead of collect_register_by_name.
5767 * regcache.c (regcache_raw_get_unsigned_by_name): New.
5768 * regcache.h (regcache_raw_get_unsigned_by_name): New.
5769
5770 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
5771 Pedro Alves <palves@redhat.com>
5772
5773 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
5774
5775 2018-07-03 Tom Tromey <tom@tromey.com>
5776
5777 * linux-low.c: Update.
5778 * lynx-low.c: Update.
5779 * mem-break.c: Update.
5780 * nto-low.c: Update.
5781 * remote-utils.c: Update.
5782 * server.c: Update.
5783 * spu-low.c: Update.
5784 * target.c: Update.
5785 * win32-low.c: Update.
5786
5787 2018-07-03 Tom Tromey <tom@tromey.com>
5788
5789 * server.c: Update.
5790
5791 2018-07-03 Tom Tromey <tom@tromey.com>
5792
5793 * linux-low.c: Update.
5794
5795 2018-07-03 Tom Tromey <tom@tromey.com>
5796
5797 * target.c: Update.
5798
5799 2018-07-03 Tom Tromey <tom@tromey.com>
5800
5801 * linux-low.c: Update.
5802 * linux-mips-low.c: Update.
5803 * lynx-low.c: Update.
5804 * nto-low.c: Update.
5805 * remote-utils.c: Update.
5806 * server.c: Update.
5807 * spu-low.c: Update.
5808 * target.c: Update.
5809 * thread-db.c: Update.
5810
5811 2018-07-03 Tom Tromey <tom@tromey.com>
5812
5813 * linux-low.c: Update.
5814 * linux-mips-low.c: Update.
5815 * lynx-low.c: Update.
5816 * mem-break.c: Update.
5817 * nto-low.c: Update.
5818 * remote-utils.c: Update.
5819 * server.c: Update.
5820 * spu-low.c: Update.
5821 * target.c: Update.
5822 * tracepoint.c: Update.
5823
5824 2018-07-03 Tom Tromey <tom@tromey.com>
5825
5826 * linux-low.c: Update.
5827 * linux-ppc-low.c: Update.
5828 * linux-x86-low.c: Update.
5829 * proc-service.c: Update.
5830 * server.c: Update.
5831 * spu-low.c: Update.
5832 * thread-db.c: Update.
5833 * win32-low.c: Update.
5834
5835 2018-07-03 Tom Tromey <tom@tromey.com>
5836
5837 * linux-low.c: Update.
5838 * lynx-low.c: Update.
5839 * nto-low.c: Update.
5840 * remote-utils.c: Update.
5841 * spu-low.c: Update.
5842 * thread-db.c: Update.
5843 * win32-low.c: Update.
5844
5845 2018-06-29 Joel Brobecker <brobecker@adacore.com>
5846
5847 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
5848 parameter in call to 'amd64_create_target_description'.
5849
5850 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5851
5852 * x86-tdesc.h: Remove executable permission flag.
5853
5854 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5855
5856 * configure.ac: Remove AC_PREREQ, add missing quoting.
5857 * configure: Re-generate.
5858 * config.in: Re-generate.
5859 * aclocal.m4: Re-generate.
5860
5861 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
5862
5863 * tracepoint.h (current_traceframe): Remove declaration.
5864
5865 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5866
5867 * linux-aarch64-low.c (is_sve_tdesc): New function.
5868 (aarch64_sve_regs_copy_to_regcache): Likewise.
5869 (aarch64_sve_regs_copy_from_regcache): Likewise.
5870 (aarch64_regs_info): Add SVE checks.
5871 (initialize_low_arch): Initialize SVE.
5872
5873 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5874
5875 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
5876
5877 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5878
5879 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
5880 (initialize_low_tracepoint): Likewise
5881 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
5882 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
5883 param.
5884 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
5885 checks.
5886 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
5887
5888 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5889
5890 * server.h (PBUFSIZ): Increase size
5891
5892 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5893
5894 * regcache.c (regcache::raw_compare): New function.
5895 * regcache.h (regcache::raw_compare): New declaration.
5896
5897 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5898
5899 * regcache.c (new_register_cache): Use new.
5900 (free_register_cache): Use delete.
5901 (register_data): Use const.
5902 (supply_register): Move body inside regcache.
5903 (regcache::raw_supply): New override function.
5904 (collect_register): Move body inside regcache.
5905 (regcache::raw_collect): New override function.
5906 (regcache::get_register_status): New override function.
5907 * regcache.h (struct regcache): Inherit from reg_buffer_common.
5908
5909 2018-06-09 Tom Tromey <tom@tromey.com>
5910
5911 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
5912 declare queue.
5913 (event_queue): Use std::queue.
5914 (gdb_event_xfree): Remove.
5915 (initialize_event_loop, process_event, wait_for_event): Update.
5916
5917 2018-06-08 Stan Cox <scox@redhat.com>
5918
5919 * win32-low.c (win32_create_inferior): last_ptid and last_status
5920 moved to client_state.
5921
5922 2018-06-08 Pedro Alves <palves@redhat.com>
5923
5924 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
5925 common/common-exceptions.o, common/common-utils.o,
5926 common/errors.o, common/print-utils.o and utils.o.
5927 * gdbreplay.c: Include "common-defs.h" instead of the two
5928 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
5929 string.h or alloca.h.
5930 (perror_with_name): Delete.
5931 (remote_open): Use xstrdup instead of strdup.
5932 (main): Rename to ...
5933 (captured_main): ... this.
5934 (main): New.
5935
5936 2018-06-08 Tom Tromey <tom@tromey.com>
5937
5938 * linux-low.c (linux_low_read_btrace): Update.
5939
5940 2018-06-04 Stan Cox <scox@redhat.com>
5941
5942 * server.h (struct client_state): New.
5943 * server.c (cont_thread, general_thread, multi_process)
5944 (report_fork_events, report_vfork_events, report_exec_events)
5945 (report_thread_events, swbreak_feature, hwbreak_feature)
5946 (vCont_supported, disable_randomization, pass_signals)
5947 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
5948 Moved to client_state.
5949 * remote-utils.c (remote_debug, noack_mode)
5950 (transport_is_reliable): Moved to client_state.
5951 * tracepoint.c (current_traceframe): Moved to client_state.
5952
5953 Update all callers.
5954 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
5955 linux-low.c, remote-utils.h, target.c: Use client_state.
5956
5957 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5958
5959 * configure.srv: Add new c/h file.
5960
5961 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5962
5963 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
5964 null VQ.
5965
5966 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5967
5968 * gdb.arch/mips-fpregset-core.exp: New test.
5969 * gdb.arch/mips-fpregset-core.c: New test source.
5970
5971 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
5972
5973 PR server/23198
5974 * hostio.c (require_int): Do not report overflow for integers
5975 between 0xfffffff and 0x7fffffff.
5976
5977 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5978
5979 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
5980 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
5981 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
5982 functions.
5983 (the_low_target): Wire them.
5984
5985 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5986
5987 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
5988 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
5989 mode. Call collect_register_by_name with vscr using
5990 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
5991 (ppc_store_vrregset): Add and set vscr_offset variable as in
5992 ppc_fill_vrregset. Call supply_register_by_name with vscr using
5993 vscr_offset.
5994
5995 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5996
5997 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5998 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
5999 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
6000
6001 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6002
6003 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
6004 (ppc_store_vsxregset): Likewise.
6005 (ppc_fill_vrregset): Likewise.
6006 (ppc_store_vrregset): Likewise.
6007 (ppc_fill_evrregset): Likewise.
6008 (ppc_store_evrregset): Likewise.
6009 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
6010 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
6011 needed.
6012
6013 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6014
6015 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
6016 wordsize of the inferior. Call ppc_linux_target_wordsize.
6017
6018 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6019
6020 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
6021 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
6022 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
6023 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
6024 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
6025 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
6026 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
6027 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
6028 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
6029 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
6030 (tdesc_powerpc_e500l): Remove.
6031 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
6032 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
6033 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
6034 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
6035 linux-ppc-tdesc.h.
6036 (ppc_arch_setup): Remove target description matching code. Fill a
6037 ppc_linux_features struct and call ppc_linux_match_description
6038 with it.
6039
6040 2018-05-22 Maciej W. Rozycki <macro@mips.com>
6041
6042 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
6043 width of the requested register exceeds the width of the
6044 `ptrace' data type.
6045 (mips_cannot_store_register): Likewise.
6046
6047 2018-05-21 Maciej W. Rozycki <macro@mips.com>
6048
6049 * linux-mips-low.c (mips_fetch_register): New function. Update
6050 preceding comment.
6051 (mips_store_gregset): Supply 0 rather than $restart for $zero.
6052 (the_low_target): Wire `mips_fetch_register'.
6053
6054 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6055
6056 * lynx-i386-low.c (LYNXOS_178): New macro.
6057 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
6058 the layout on LynxOS-178.
6059 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
6060 handle floating point registers that are not supported by
6061 LynxOS-178.
6062
6063 2018-05-10 Tom Tromey <tom@tromey.com>
6064
6065 * configure: Rebuild.
6066
6067 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6068
6069 PR server/23158:
6070 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
6071 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
6072 Use it to set the expedite_regs field in the given tdesc.
6073 * x86-tdesc.h: New file.
6074 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
6075 Adjust following the addition of the new expedite_regs parameter
6076 to init_target_desc.
6077 * linux-tic6x-low.c (tic6x_read_description): Likewise.
6078 * linux-x86-tdesc.c: #include "x86-tdesc.h".
6079 (i386_linux_read_description, amd64_linux_read_description):
6080 Adjust following the addition of the new expedite_regs parameter
6081 to init_target_desc.
6082 * lynx-i386-low.c: #include "x86-tdesc.h".
6083 (lynx_i386_arch_setup): Adjust following the addition of the new
6084 expedite_regs parameter to init_target_desc.
6085 * nto-x86-low.c: #include "x86-tdesc.h".
6086 (nto_x86_arch_setup): Adjust following the addition of the new
6087 expedite_regs parameter to init_target_desc.
6088 * win32-i386-low.c: #include "x86-tdesc.h".
6089 (i386_arch_setup): Adjust following the addition of the new
6090 expedite_regs parameter to init_target_desc.
6091
6092 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6093
6094 PR server/23158:
6095 * win32-low.c (win32_create_inferior): Add call to my_wait
6096 setting last_status global.
6097
6098 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6099
6100 PR server/23158:
6101 * win32-low.c (create_process): Only call gdb_tilde_expand if
6102 inferior_cwd is not NULL.
6103
6104 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
6105
6106 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
6107 registers to the cache if their values have changed.
6108 (i387_xsave_to_cache): Provide default values for x87 control
6109 registers when these features are available, but disabled.
6110 * regcache.c (supply_register_by_name_zeroed): New function.
6111 * regcache.h (supply_register_by_name_zeroed): Declare new
6112 function.
6113
6114 2018-05-07 Tom Tromey <tom@tromey.com>
6115
6116 * configure: Rebuild.
6117
6118 2018-05-04 Tom Tromey <tom@tromey.com>
6119
6120 * configure: Rebuild.
6121
6122 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
6123 Pedro Alves <palves@redhat.com>
6124
6125 * linux-aarch64-low.c (aarch64_stopped_data_address):
6126 Likewise.
6127
6128 2018-04-27 Tom Tromey <tom@tromey.com>
6129
6130 * configure: Rebuild.
6131
6132 2018-04-23 Tom Tromey <tom@tromey.com>
6133
6134 * configure: Rebuild.
6135
6136 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
6137
6138 * Makefile.in (depcomp): Add "..".
6139 (all_deps_files): New and use it.
6140
6141 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6142
6143 * configure.srv (aarch64*-*-linux*): Don't include xml.
6144 (i[34567]86-*-cygwin*): Likewise.
6145 (i[34567]86-*-linux*): Likewise.
6146 (i[34567]86-*-lynxos*): Likewise.
6147 (i[34567]86-*-mingw32ce*): Likewise.
6148 (i[34567]86-*-mingw*): Likewise.
6149 (i[34567]86-*-nto*): Likewise.
6150 (tic6x-*-uclinux): Likewise.
6151 (x86_64-*-linux*): Likewise.
6152 (x86_64-*-mingw*): Likewise.
6153 (x86_64-*-cygwin*): Likewise.
6154
6155 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6156
6157 * tdesc.c: Remove xml parameter.
6158
6159 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6160
6161 * server.c (get_features_xml): Remove cast.
6162 * tdesc.c (void target_desc::accept): Fill in function.
6163 (tdesc_get_features_xml): Remove old xml creation.
6164 (print_xml_feature::visit_pre): Add xml vistor.
6165 * tdesc.h (struct target_desc): Make xmltarget mutable.
6166 (tdesc_get_features_xml): Remove declaration.
6167
6168 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6169
6170 * tdesc.c (tdesc_architecture_name): Add new function.
6171 (tdesc_osabi_name): Likewise.
6172 (tdesc_get_features_xml): Use new functions.
6173
6174 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6175
6176 * tdesc.c (tdesc_create_flags): Remove.
6177 (tdesc_add_flag): Likewise.
6178 (tdesc_named_type): Likewise.
6179 (tdesc_create_union): Likewise.
6180 (tdesc_create_struct): Likewise.
6181 (tdesc_create_vector): Likewise.
6182 (tdesc_add_bitfield): Likewise.
6183 (tdesc_add_field): Likewise.
6184 (tdesc_set_struct_size): Likewise.
6185
6186 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6187
6188 * tdesc.c (~target_desc): Remove implictly deleted items.
6189 (init_target_desc): Iterate all features.
6190 (tdesc_get_features_xml): Use vector.
6191 (tdesc_create_feature): Create feature.
6192 * tdesc.h (tdesc_feature) Remove
6193 (target_desc): Add features.
6194
6195 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6196
6197 * Makefile.in: Add common/tdesc.c
6198 * tdesc.c (init_target_desc): init all reg_defs from register
6199 vector.
6200 (tdesc_create_reg): Create tdesc_reg.
6201 * tdesc.h (tdesc_feature): Add register vector.
6202
6203 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6204
6205 * tdesc.h (struct target_desc) <features>: Change type to
6206 std::vector<std::string>.
6207 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
6208 changes.
6209 (tdesc_get_features_xml): Likewise.
6210 (tdesc_create_feature): Likewise.
6211
6212 2018-03-26 Alan Hayward <alan.hayward@arm.com>
6213
6214 * regcache.c (find_register_by_number): Return a ref.
6215 (find_regno): Use references.
6216 (register_size): Likewise.
6217 (register_data): Likewise.
6218 * tdesc.c (target_desc::~target_desc): Remove free calls.
6219 (target_desc::operator==): Use std::vector compare.
6220 (init_target_desc): Use reference.
6221 (tdesc_create_reg): Use reg constructors.
6222 * tdesc.h (struct target_desc): Replace pointer with object.
6223
6224 2018-03-23 Alan Hayward <alan.hayward@arm.com>
6225
6226 * regcache.c (find_register_by_number): Make static.
6227 (find_regno): Use find_register_by_number
6228 * regcache.h (struct reg): Remove declaration.
6229
6230 2018-03-23 Alan Hayward <alan.hayward@arm.com>
6231
6232 * tdesc.c (target_desc::~target_desc): Move to here.
6233 (target_desc::operator==): Likewise.
6234 * tdesc.h (target_desc::~target_desc): Move from here.
6235 (target_desc::operator==): Likewise.
6236
6237 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
6238
6239 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
6240
6241 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6242
6243 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
6244 S390_TDESC_GS.
6245 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
6246 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
6247 and init_registers_s390_gs_linux64.
6248
6249 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6250
6251 * linux-s390-low.c (s390_fill_gs): Remove function.
6252 (s390_fill_gsbc): Remove function.
6253 (s390_regsets): Set fill functions for the guarded storage regsets
6254 to NULL.
6255
6256 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6257
6258 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
6259 the word size. Add comment.
6260 (s390_get_wordsize): New function.
6261 (s390_arch_setup): No longer select a temporary tdesc to fetch the
6262 pswm with it. Instead, use s390_get_wordsize to determine the
6263 word size first and derive the correct tdesc from that directly.
6264
6265 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
6266
6267 * Makefile.in: Include silent-rules.mk.
6268 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
6269 (COMPILE): Add ECHO_CXX.
6270 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
6271 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
6272 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
6273 (version-generated.c): Add ECHO_GEN.
6274 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
6275 (IPAGENT_COMPILE): Add ECHO_CXX.
6276 (%-generated.c): Add ECHO_REGDAT.
6277
6278 2018-03-14 Tom Tromey <tom@tromey.com>
6279
6280 PR cli/14977:
6281 * ax.c (ax_printf): Special case for NULL.
6282
6283 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6284
6285 * linux-low.c (linux_qxfer_libraries_svr4): Use
6286 xml_escape_text_append.
6287
6288 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6289
6290 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
6291
6292 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6293
6294 * server.c (handle_general_set): Remove unnecessary xstrdup.
6295
6296 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6297
6298 * server.c (parse_debug_format_options): Adjust to
6299 delim_string_to_char_ptr_vec changes.
6300 * thread-db.c (thread_db_load_search): Adjust to
6301 dirnames_to_char_ptr_vec changes.
6302
6303 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
6304
6305 * target.h (target_enable_btrace, target_disable_btrace)
6306 (target_read_btrace, target_read_btrace_conf): Turn macro into
6307 inline function. Throw error if target method is not defined.
6308 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
6309 check for btrace target method. Be prepared to handle exceptions
6310 from btrace target methods.
6311
6312 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6313
6314 * server.c (captured_main): Change order of error message printed
6315 when the current working directory cannot be found.
6316
6317 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6318
6319 * server.c: Include "filenames.h" and "pathstuff.h".
6320 (program_name): Delete variable.
6321 (program_path): New anonymous class.
6322 (get_exec_wrapper): Use "program_path" instead of
6323 "program_name".
6324 (handle_v_run): Likewise.
6325 (captured_main): Likewise.
6326 (process_serial_event): Likewise.
6327
6328 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6329
6330 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
6331 (OBJS): Add "pathstuff.o".
6332 * server.c (current_directory): New global variable.
6333 (captured_main): Initialize "current_directory".
6334
6335 2018-02-26 Alan Hayward <alan.hayward@arm.com>
6336
6337 * tdesc.c: Use common/tdesc.h.
6338 * tdesc.h: Likewise.
6339
6340 2018-02-20 Alan Hayward <alan.hayward@arm.com>
6341 Simon Marchi <simon.marchi@ericsson.com>
6342
6343 * Makefile.in: Switch order of make rules.
6344
6345 2018-02-19 Alan Hayward <alan.hayward@arm.com>
6346
6347 * Makefile.in: Add common directory in build.
6348 * configure.ac: Add common reference.
6349 * configure: Regenerate.
6350
6351 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6352
6353 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
6354 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
6355 * spu-low.c (spu_target_ops): Likewise.
6356 * win32-low.c (win32_target_ops): Likewise.
6357 * server.c (supported_btrace_packets): Report packets unconditionally.
6358 * target.h (target_ops) <supports_btrace>: Remove.
6359 (target_supports_btrace): Remove.
6360
6361 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6362
6363 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
6364 (handle_btrace_disable): Change return type to void. Use exceptions
6365 to report errors.
6366 (handle_btrace_general_set): Catch exception and copy message to
6367 return message.
6368
6369 2018-02-08 Tom Tromey <tom@tromey.com>
6370
6371 * linux-low.c (install_software_single_step_breakpoints): Use
6372 make_scoped_restore.
6373 * inferiors.c (make_cleanup_restore_current_thread): Remove.
6374 (do_restore_current_thread_cleanup): Remove.
6375 * gdbthread.h (make_cleanup_restore_current_thread): Don't
6376 declare.
6377
6378 2018-02-08 Tom Tromey <tom@tromey.com>
6379
6380 * mem-break.c (set_raw_breakpoint_at): Use
6381 gdb::unique_xmalloc_ptr.
6382
6383 2018-01-30 Pedro Alves <palves@redhat.com>
6384
6385 PR gdb/13211
6386 * target.c (target_terminal::terminal_state): Rename to ...
6387 (target_terminal::m_terminal_state): ... this.
6388
6389 2018-01-19 James Clarke <jrtc27@jrtc27.com>
6390
6391 * linux-low.c (handle_extended_wait): Surround call to
6392 thread_db_notice_clone with #ifdef USE_THREAD_DB.
6393
6394 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
6395
6396 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
6397 linux_ptrace_attach_fail_reason_string now returning an
6398 std::string.
6399 (linux_attach): Likewise.
6400 * thread-db.c (attach_thread): Likewise.
6401
6402 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
6403
6404 PR gdb/21559
6405 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
6406 checking for fs_base/gs_base fields in struct user_regs_struct.
6407 * configure: Regenerate.
6408
6409 2018-01-16 Yao Qi <yao.qi@linaro.org>
6410
6411 PR gdb/18749
6412 * linux-low.c (fetch_register): Call supply_register instead of
6413 error.
6414
6415 2018-01-08 Yao Qi <yao.qi@linaro.org>
6416 Simon Marchi <simon.marchi@ericsson.com>
6417
6418 * Makefile.in (OBS): Remove selftest.o.
6419 * configure.ac: Set srv_selftest_objs if $development is true.
6420 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
6421 * configure: Re-generated.
6422 * server.c (captured_main): Wrap variable selftest_filter with
6423 GDB_SELF_TEST.
6424
6425 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6426
6427 * server.c (parse_debug_format_options): Return std::string.
6428 (handle_monitor_command, captured_main): Adjust.
6429
6430 2018-01-05 Pedro Alves <palves@redhat.com>
6431
6432 PR gdb/18653
6433 * server.c (captured_main): Pass quiet=false to
6434 save_original_signals_state.
6435
6436 2018-01-01 Joel Brobecker <brobecker@adacore.com>
6437
6438 * gdbreplay.c (gdbreplay_version): Update copyright year in
6439 version message.
6440 * server.c (gdbserver_version): Likewise.
6441
6442 2017-12-08 Tom Tromey <tom@tromey.com>
6443
6444 * ax.c (ax_printf): Update.
6445
6446 2017-12-07 Yao Qi <yao.qi@linaro.org>
6447
6448 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
6449 aarch64_linux_read_description.
6450 * linux-amd64-ipa.c (idx2mask): New array.
6451 (get_ipa_tdesc): Move idx2mask out.
6452 (initialize_low_tracepoint): Initialize target descriptions.
6453 * linux-i386-ipa.c (idx2mask): New array.
6454 (get_ipa_tdesc): Move idx2mask out.
6455 (initialize_low_tracepoint): Initialize target descriptions.
6456
6457 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
6458
6459 * tdesc.c (struct tdesc_type): Change return type.
6460 (tdesc_add_flag): Change parameter type.
6461 (tdesc_add_bitfield): Likewise.
6462 (tdesc_add_field): Likewise.
6463 (tdesc_set_struct_size): Likewise.
6464
6465 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
6466
6467 * regcache.c (registers_to_string): Remove unused variable.
6468
6469 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6470
6471 * inferiors.c (for_each_inferior_with_data): Remove.
6472 * inferiors.h (for_each_inferior_with_data): Remove.
6473 * server.c (handle_qxfer_threads_worker): Change parameter type.
6474 (handle_qxfer_threads_proper): Use for_each_thread.
6475
6476 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6477
6478 * inferiors.c (for_each_inferior): Remove.
6479 (clear_inferiors): Use for_each_thread.
6480 * inferiors.h (for_each_inferior): Remove.
6481 * linux-low.c (linux_wait_for_event_filtered): Use
6482 for_each_thread.
6483 (linux_stabilize_threads): Likewise.
6484 * regcache.c (regcache_release): Likewise.
6485 * server.c (gdb_wants_all_threads_stopped): Likewise.
6486 (clear_pending_status_callback): Remove.
6487 (handle_status): Use for_each_thread.
6488 (captured_main): Likewise.
6489 * win32-low.c (child_init_thread_list): Likewise.
6490 (win32_clear_inferiors): Likewise.
6491 (fake_breakpoint_event): Likewise.
6492
6493 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6494
6495 * inferiors.h (find_inferior): Remove.
6496 * inferiors.c (find_inferior): Remove.
6497
6498 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6499
6500 * linux-low.c (resume_status_pending_p): Update comment.
6501 (need_step_over_p): Update comment.
6502
6503 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6504
6505 * linux-low.c (proceed_one_lwp): Return void, change parameter
6506 type.
6507 (unsuspend_and_proceed_one_lwp): Likewise.
6508 (proceed_all_lwps): Use for_each_thread.
6509 (unstop_all_lwps): Likewise.
6510
6511 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6512
6513 * linux-low.c (linux_resume_one_thread): Return void, take
6514 parameter directly.
6515 (linux_resume): Use for_each_thread.
6516
6517 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6518
6519 * linux-low.c (send_sigstop_callback): Return void, change
6520 parameter type. Rename to...
6521 (send_sigstop): ... this.
6522 (suspend_and_send_sigstop_callback): Return void, change parameter
6523 type. Rename to...
6524 (suspend_and_send_sigstop): ... this.
6525 (stop_all_lwps): Use for_each_thread.
6526
6527 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6528
6529 * linux-low.c (lwp_running): Return bool, remove unused
6530 argument.
6531 (linux_stabilize_threads): Use find_thread.
6532
6533 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6534
6535 * linux-low.c (select_singlestep_lwp_callback): Remove.
6536 (count_events_callback): Remove.
6537 (select_event_lwp_callback): Remove.
6538 (select_event_lwp): Use find_thread/for_each_thread.
6539
6540 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6541
6542 * linux-low.c (not_stopped_callback): Return bool, take filter
6543 argument directly.
6544 (linux_wait_for_event_filtered): Use find_thread.
6545 (linux_wait_1): Likewise.
6546
6547 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6548
6549 * linux-low.c (same_lwp): Remove.
6550 (find_lwp_pid): Use find_thread.
6551
6552 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6553
6554 * linux-low.c (delete_lwp_callback): Remove.
6555 (linux_mourn): Use for_each_thread.
6556
6557 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6558
6559 * linux-low.c (linux_detach_lwp_callback): Return void, remove
6560 args parameter, don't check for pid.
6561 (linux_detach): Use for_each_thread.
6562
6563 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6564
6565 * linux-low.c (struct counter): Remove.
6566 (second_thread_of_pid_p): Remove.
6567 (last_thread_of_process_p): Use find_thread.
6568
6569 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6570
6571 * inferiors.c (find_inferior_in_random): Remove.
6572 * inferiors.h (find_inferior_in_random): Remove.
6573 * linux-low.c (status_pending_p_callback): Return bool, accept
6574 parameter ptid directly.
6575 (linux_wait_for_event_filtered): Use find_thread_in_random.
6576 (linux_wait_1): Likewise.
6577
6578 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6579
6580 * inferiors.c (find_inferior_id): Remove.
6581 (find_thread_ptid): Move implemention from find_inferior_id to
6582 here.
6583 * inferiors.h (find_inferior_id): Remove.
6584 * server.c (handle_status): Use find_thread_ptid.
6585 (process_serial_event): Likewise.
6586 * thread-db.c (find_one_thread): Likewise.
6587 (thread_db_thread_handle): Likewise.
6588 * win32-low.c (thread_rec): Likewise.
6589 (child_delete_thread): Likewise.
6590 (win32_thread_alive): Likewise.
6591 (get_child_debug_event): Likewise.
6592
6593 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6594
6595 * linux-mips-low.c (update_watch_registers_callback): Return
6596 void, remove pid_p parameter, don't check for pid.
6597 (mips_insert_point, mips_remove_point): Use for_each_thread.
6598
6599 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6600
6601 * lynx.low (lynx_delete_thread_callback): Remove.
6602 (lynx_mourn): Use for_each_thread.
6603
6604 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6605
6606 * regcache.c (regcache_invalidate_one): Remove.
6607 (regcache_invalidate_pid): use for_each_thread.
6608
6609 2017-11-26 Tom Tromey <tom@tromey.com>
6610
6611 * linux-low.c (linux_create_inferior): Update.
6612
6613 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
6614
6615 * spu-low.c (spu_create_inferior): Fix typo in argument name.
6616
6617 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6618
6619 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
6620 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6621 * linux-aarch64-tdesc-selftest.c: New file.
6622 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6623
6624 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6625
6626 * configure.srv: Add new file.
6627 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6628 * linux-aarch64-tdesc-selftest.c: New file.
6629 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6630
6631 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6632
6633 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
6634 * linux-aarch64-low.c (initialize_low_arch): Remove init.
6635 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
6636
6637 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6638
6639 * configure.srv: Add new files.
6640 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
6641 aarch64_linux_read_description.
6642 * linux-aarch64-low.c (aarch64_linux_read_description):
6643 Merge with aarch64_arch_setup.
6644 (aarch64_arch_setup): Call aarch64_linux_read_description.
6645 * linux-aarch64-tdesc.c: New file.
6646 * linux-aarch64-tdesc.h: New file.
6647
6648 2017-11-24 Yao Qi <yao.qi@linaro.org>
6649
6650 * configure.srv: Set $srv_regobj for tic6x-linux.
6651 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
6652 (tic6x_read_description): Move some code to tic6x_arch_setup.
6653 (tic6x_tdesc_test): New function.
6654 (initialize_low_arch): Call selftests::register_test.
6655
6656 2017-11-22 Yao Qi <yao.qi@linaro.org>
6657
6658 * remote-utils.c (prepare_resume_reply): Use memcpy.
6659
6660 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6661
6662 * linux-low.c (kill_one_lwp_callback): Return void, take
6663 argument directly, don't filter on pid.
6664 (linux_kill): Use for_each_thread.
6665
6666 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6667
6668 * linux-low.c (need_step_over_p): Return bool, remove dummy
6669 argument.
6670 (linux_resume, proceed_all_lwps): Use find_thread.
6671
6672 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6673
6674 * linux-low.c (resume_status_pending_p): Return bool, remove
6675 flag_p argument.
6676 (linux_resume): Use find_thread.
6677
6678 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6679
6680 * linux-low.c (struct thread_resume_array): Remove.
6681 (linux_set_resume_request): Return void, take arguments
6682 directly.
6683 (linux_resume): Use for_each_thread.
6684
6685 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6686
6687 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
6688 return bool, remove data argument.
6689 (linux_stabilize_threads): Use find_thread.
6690
6691 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6692
6693 * linux-low.c (unsuspend_one_lwp): Remove.
6694 (unsuspend_all_lwps): Use for_each_thread, inline code from
6695 unsuspend_one_lwp.
6696
6697 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6698
6699 * gdbthread.h (find_thread): Add overload with ptid_t filter.
6700 * linux-low.c (struct iterate_over_lwps_args): Remove.
6701 (iterate_over_lwps_filter): Remove.
6702 (iterate_over_lwps): Use find_thread.
6703
6704 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6705
6706 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
6707 (linux_handle_new_gdb_connection): Use for_each_thread, inline
6708 code from reset_lwp_ptrace_options_callback.
6709
6710 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6711
6712 * linux-arm-low.c (struct update_registers_data): Remove.
6713 (update_registers_callback): Return void, take arguments
6714 directly, don't check thread's pid.
6715 (arm_insert_point, arm_remove_point): Use for_each_thread.
6716
6717 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6718
6719 * win32-low.c (continue_one_thread): Return void, take argument
6720 directly.
6721 (child_continue): Use for_each_thread.
6722
6723 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6724
6725 * win32-i386-low.c (update_debug_registers_callback): Rename
6726 to ...
6727 (update_debug_registers): ... this, return void, remove pid_p arg.
6728 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
6729
6730 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6731
6732 * inferiors.h (struct process_info): Add constructor, initialize
6733 fields..
6734 <syscalls_to_catch>: Change type to std::vector<int>.
6735 * inferiors.c (add_process): Allocate process_info with new.
6736 (remove_process): Free process_info with delete.
6737 * linux-low.c (handle_extended_wait): Adjust.
6738 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
6739 * server.c (handle_general_set): Adjust.
6740
6741 2017-11-16 Pedro Alves <palves@redhat.com>
6742
6743 * remote-utils.c (remote_close): Block SIGIO signals instead of
6744 uninstalling the SIGIO handler.
6745
6746 2017-11-16 Alan Hayward <alan.hayward@arm.com>
6747
6748 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
6749
6750 2017-11-16 Yao Qi <yao.qi@linaro.org>
6751
6752 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
6753 (tic6x_store_gregset): Likewise.
6754 (tic6x_usrregs_info): Move it up.
6755
6756 2017-11-15 Alan Hayward <alan.hayward@arm.com>
6757
6758 * Makefile.in: Update arch rules.
6759 * configure.srv: Explicitly mark arch/ files.
6760
6761 2017-11-13 Andreas Schwab <schwab@suse.de>
6762
6763 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
6764 function.
6765 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6766
6767 2017-11-06 Pedro Alves <palves@redhat.com>
6768
6769 * config.in, configure: Regenerate.
6770
6771 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6772
6773 * target.c (struct thread_search): Remove.
6774 (thread_search_callback): Remove.
6775 (prepare_to_access_memory): Use for_each_thread instead of
6776 find_inferior. Inline code from thread_search_callback.
6777
6778 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6779
6780 * server.c (struct visit_actioned_threads_data): Remove.
6781 (visit_actioned_threads): Change prototype to take arguments
6782 directly.
6783 (resume): Use find_thread instead of find_inferior.
6784
6785 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6786
6787 * server.c (queue_stop_reply_callback): Change prototype, return
6788 void.
6789 (find_status_pending_thread_callback): Remove.
6790 (handle_status): Replace find_inferior with find_thread and
6791 for_each_thread.
6792
6793 2017-10-25 Alan Hayward <alan.hayward@arm.com>
6794
6795 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
6796 with REGNO.
6797 (aarch64_store_gregset): Likewise.
6798 (aarch64_fill_fpregset): Likewise.
6799 (aarch64_store_fpregset): Likewise.
6800
6801 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
6802
6803 * gdbthread.h (find_thread, for_each_thread): New functions.
6804 * inferiors.c (thread_of_pid): Remove.
6805 (find_any_thread_of_pid): Use find_thread.
6806 * linux-low.c (num_lwps): Use for_each_thread.
6807
6808 2017-10-17 Yao Qi <yao.qi@linaro.org>
6809
6810 * Makefile.in: Remove one rule.
6811 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
6812
6813 2017-10-17 Yao Qi <yao.qi@linaro.org>
6814
6815 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
6816 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
6817
6818 2017-10-17 Yao Qi <yao.qi@linaro.org>
6819
6820 * configure.srv: Rename arm.o with arch/arm.o.
6821
6822 2017-10-17 Yao Qi <yao.qi@linaro.org>
6823
6824 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
6825 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
6826 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
6827 (arch-i386.o, arch-amd64.o): Remove rules.
6828 (arch/%.o): New rule.
6829 Update POSTCOMPILE and COMPILE.pre.
6830 * configure.ac: Invoke AC_CONFIG_COMMANDS.
6831 * configure: Re-generated.
6832 * configure.srv: Replace arch-i386.o with arch/i386.o.
6833 Replace arch-amd64.o with arch/amd64.o.
6834
6835 2017-10-16 Yao Qi <yao.qi@linaro.org>
6836
6837 * configure: Regenerated.
6838
6839 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6840
6841 * inferiors.h: (struct inferior_list): Remove.
6842 (struct inferior_list_entry); Remove.
6843 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
6844 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
6845 get_first_inferior): Remove.
6846 (for_each_inferior, for_each_inferior_with_data, find_inferior,
6847 find_inferior_id, find_inferior_in_random): Change signature.
6848 * inferiors.c (all_threads): Change type to
6849 std::list<thread_info *>.
6850 (get_thread): Remove macro.
6851 (find_inferior, find_inferior_id): Change signature, implement
6852 using find_thread.
6853 (find_inferior_in_random): Change signature, implement using
6854 find_thread_in_random.
6855 (for_each_inferior, for_each_inferior_with_data): Change
6856 signature, implement using for_each_thread.
6857 (add_inferior_to_list, remove_inferior): Remove.
6858 (add_thread, get_first_thread, thread_of_pid,
6859 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
6860 (get_first_inferior, one_inferior_p, clear_inferior_list):
6861 Remove.
6862 (clear_inferiors, get_thread_process): Update.
6863 * gdbthread.h: Include <list>.
6864 (struct thread_info) <entry>: Remove field.
6865 <id>: New field.
6866 (all_threads): Change type to std::list<thread_info *>.
6867 (get_first_inferior): Add doc.
6868 (find_thread, for_each_thread, find_thread_in_random): New
6869 functions.
6870 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
6871 * linux-arm-low.c (update_registers_callback): Update.
6872 * linux-low.c (second_thread_of_pid_p): Update.
6873 (kill_one_lwp_callback, linux_detach_lwp_callback,
6874 delete_lwp_callback, status_pending_p_callback, same_lwp,
6875 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
6876 iterate_over_lwps, not_stopped_callback,
6877 resume_stopped_resumed_lwps, count_events_callback,
6878 select_singlestep_lwp_callback, select_event_lwp_callback,
6879 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
6880 suspend_and_send_sigstop_callback, wait_for_sigstop,
6881 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
6882 lwp_running, linux_set_resume_request, resume_status_pending_p,
6883 need_step_over_p, start_step_over, linux_resume_one_thread,
6884 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
6885 reset_lwp_ptrace_options_callback): Update.
6886 * linux-mips-low.c (update_watch_registers_callback): Update.
6887 * regcache.c (regcache_invalidate_one, regcache_invalidate):
6888 Update.
6889 (free_register_cache_thread_one): Remove.
6890 (regcache_release): Update.
6891 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
6892 handle_qxfer_threads_worker): Update.
6893 (handle_query): Update, use list iterator.
6894 (visit_actioned_threads, handle_pending_status,
6895 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
6896 clear_pending_status_callback, set_pending_status_callback,
6897 find_status_pending_thread_callback, handle_status,
6898 process_serial_event): Update.
6899 * target.c (thread_search_callback): Update.
6900 * thread-db.c (thread_db_get_tls_address): Update.
6901 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
6902 Update.
6903 * win32-i386-low.c (update_debug_registers_callback): Update.
6904 * win32-low.c (delete_thread_info, child_delete_thread,
6905 continue_one_thread, suspend_one_thread,
6906 get_child_debug_event): Adjust.
6907
6908 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6909
6910 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
6911 * inferiors.h: Include <list>.
6912 (struct process_info) <entry>: Remove field.
6913 <pid>: New field.
6914 (pid_of): Change macro to function.
6915 (ptid_of, lwpid_of): Remove macro.
6916 (all_processes): Change type to std::list<process_info *>.
6917 (ALL_PROCESSES): Remove macro.
6918 (for_each_process, find_process): New function.
6919 * inferiors.c (all_processes): Change type to
6920 std::list<process_info *>.
6921 (find_thread_process): Adjust.
6922 (add_process): Likewise.
6923 (remove_process): Likewise.
6924 (find_process_pid): Likewise.
6925 (get_first_process): Likewise.
6926 (started_inferior_callback): Remove.
6927 (have_started_inferiors_p): Adjust.
6928 (attached_inferior_callback): Remove.
6929 (have_attached_inferiors_p): Adjust.
6930 * linux-low.c (check_zombie_leaders): Likewise.
6931 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
6932 (x86_linux_update_xmltarget): Adjust.
6933 * server.c (handle_query): Likewise.
6934 (gdb_reattached_process): Remove.
6935 (handle_status): Adjust.
6936 (kill_inferior_callback): Likewise.
6937 (detach_or_kill_inferior): Remove.
6938 (print_started_pid): Likewise.
6939 (print_attached_pid): Likewise.
6940 (detach_or_kill_for_exit): Update.
6941 (process_serial_event): Likewise.
6942 * linux-arm-low.c (arm_new_fork): Likewise.
6943
6944 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6945
6946 * dll.h: Include <list>.
6947 (struct dll_info): Add constructor.
6948 <entry>: Remove field.
6949 (all_dlls): Change type to std::list<dll_info>.
6950 * dll.c: Include <algorithm>.
6951 (get_dll): Remove macro.
6952 (all_dlls): Change type to std::list<dll_info *>.
6953 (free_one_dll): Remove.
6954 (match_dll): Likewise.
6955 (loaded_dll): Adjust.
6956 (unloaded_dll): Adjust to all_dlls type change, use
6957 std::find_if. Inline code from match_dll.
6958 (clear_dlls): Adjust to all_dlls type change.
6959 * server.c (emit_dll_description): Remove.
6960 (handle_qxfer_libraries): Adjust to all_dlls type change,
6961 integrate emit_dll_description's functionality.
6962
6963 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6964
6965 * linux-low.h (struct linux_target_ops) <delete_process>: New
6966 field.
6967 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
6968 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
6969 (struct linux_target_ops): Add delete_process callback.
6970 * linux-arm-low.c (arm_delete_process): New.
6971 (struct linux_target_ops): Add delete_process callback.
6972 * linux-bfin-low.c (struct linux_target_ops): Likewise.
6973 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
6974 * linux-m32r-low.c (struct linux_target_ops): Likewise.
6975 * linux-mips-low.c (mips_linux_delete_process): New.
6976 (struct linux_target_ops): Add delete_process callback.
6977 * linux-ppc-low.c (struct linux_target_ops): Likewise.
6978 * linux-s390-low.c (struct linux_target_ops): Likewise.
6979 * linux-sh-low.c (struct linux_target_ops): Likewise.
6980 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
6981 * linux-tile-low.c (struct linux_target_ops): Likewise.
6982 * linux-x86-low.c (x86_linux_delete_process): New.
6983 (struct linux_target_ops): Add delete_process callback.
6984 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
6985
6986 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6987
6988 * linux-aarch64-low.c (the_low_target): Add thread delete
6989 callback.
6990 * linux-arm-low.c (arm_delete_thread): New function.
6991 (the_low_target): Add thread delete callback.
6992 * linux-bfin-low.c (the_low_target): Likewise.
6993 * linux-crisv32-low.c (the_low_target): Likewise.
6994 * linux-low.c (delete_lwp): Invoke delete_thread callback if
6995 set.
6996 * linux-low.h (struct linux_target_ops) <delete_thread>: New
6997 field.
6998 * linux-m32r-low.c (the_low_target): Add thread delete callback.
6999 * linux-mips-low.c (mips_linux_delete_thread): New function.
7000 (the_low_target): Add thread delete callback.
7001 * linux-ppc-low.c (the_low_target): Likewise.
7002 * linux-s390-low.c (the_low_target): Likewise.
7003 * linux-sh-low.c (the_low_target): Likewise.
7004 * linux-tic6x-low.c (the_low_target): Likewise.
7005 * linux-tile-low.c (the_low_target): Likewise.
7006 * linux-x86-low.c (the_low_target): Likewise.
7007 * linux-xtensa-low.c (the_low_target): Likewise.
7008
7009 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
7010
7011 * win32-low.c: Include "common-inferior.h".
7012
7013 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
7014
7015 * inferiors.c (set_inferior_cwd): New function.
7016 * server.c (handle_general_set): Handle QSetWorkingDir packet.
7017 (handle_query): Inform that QSetWorkingDir is supported.
7018 * win32-low.c (create_process): Pass the inferior's cwd to
7019 CreateProcess.
7020
7021 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
7022
7023 * inferiors.c (current_inferior_cwd): New global variable.
7024 (get_inferior_cwd): New function.
7025 * inferiors.h (struct process_info) <cwd>: New field.
7026
7027 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
7028
7029 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
7030 (OBS): Add gdb_tilde_expand.o.
7031
7032 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
7033
7034 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
7035 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
7036
7037 2017-09-29 Pedro Alves <palves@redhat.com>
7038
7039 * ax.c (gdb_parse_agent_expr): Constify.
7040 * ax.h (gdb_parse_agent_expr): Constify.
7041 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7042 Constify.
7043 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
7044 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
7045 * remote-utils.h (read_ptid): Constify.
7046 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
7047 (process_point_options, process_serial_event): Constify.
7048 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
7049 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
7050 (cmd_qtbuffer): Constify.
7051
7052 2017-09-29 Pedro Alves <palves@redhat.com>
7053
7054 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
7055 fails.
7056
7057 2017-09-29 Pedro Alves <palves@redhat.com>
7058
7059 * linux-low.c (handle_extended_wait): Pass parent thread instead
7060 of process to thread_db_notice_clone.
7061 * linux-low.h (thread_db_notice_clone): Replace parent process
7062 parameter with parent thread parameter.
7063 * thread-db.c (find_one_thread): Add comment.
7064 (thread_db_notice_clone): Replace parent process parameter with
7065 parent thread parameter. Temporarily switch to the parent thread.
7066
7067 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
7068
7069 * gdbthread.h: Include "common-gdbthread.h".
7070 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
7071 "if" when validating the ptid.
7072 * remote-utils.c: Include "gdbthread.h".
7073 (prepare_resume_reply): Use "switch_to_thread".
7074 * target.c (done_accessing_memory): Likewise.
7075
7076 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
7077
7078 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
7079 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
7080 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
7081 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
7082 s390x-gs-linux64-ipa.o to ipa_obj.
7083 * linux-s390-low.c (HWCAP_S390_GS): New define.
7084 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
7085 New functions.
7086 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
7087 (s390_arch_setup): Check for guarded-storage support and choose
7088 appropriate tdesc.
7089 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
7090 init_registers_s390x_gs_linux64.
7091 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
7092 enum value.
7093 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
7094 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
7095
7096 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
7097
7098 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
7099
7100 2017-09-21 Kevin Buettner <kevinb@redhat.com>
7101
7102 * linux-low.h (struct lwp_info): Add new field, thread_handle.
7103 (thread_db_thread_handle): Declare.
7104 * linux-low.c (linux_target_ops): Initialize thread_handle.
7105 * server.c (handle_qxfer_threads_worker): Add support for
7106 "handle" attribute.
7107 * target.h (struct target_ops): Add new function pointer,
7108 thread_handle.
7109 (target_thread_handle): Define.
7110 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
7111 field in lwp.
7112 (thread_db_thread_handle): New function.
7113
7114 2017-09-21 Kevin Buettner <kevinb@redhat.com>
7115
7116 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
7117 * linux-low.h (thread_db_notice_clone): Declare.
7118 * thread-db.c (thread_db_notice_clone): New function.
7119
7120 2017-09-21 Pedro Alves <palves@redhat.com>
7121
7122 * server.c (gdb_read_memory, handle_status, process_serial_event)
7123 (handle_serial_event, handle_target_event): Adjust to
7124 set_desired_thread prototype change.
7125 * target.c (set_desired_thread): Remove 'use_general' parameter
7126 and adjust.
7127 * target.h (set_desired_thread): Remove 'use_general' parameter.
7128
7129 2017-09-20 Tom Tromey <tom@tromey.com>
7130
7131 * target.c (target_terminal::terminal_state): Define.
7132 (target_terminal::init): Rename from target_terminal_init.
7133 (target_terminal::inferior): Rename from
7134 target_terminal_inferior.
7135 (target_terminal::ours): Rename from target_terminal_ours.
7136 (target_terminal::ours_for_output, target_terminal::info): New.
7137
7138 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7139
7140 * server.c (accumulate_file_name_length): Remove.
7141 (emit_dll_description): Adjust to std::string change.
7142 (handle_qxfer_libraries): Use std::string to hold document.
7143
7144 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7145
7146 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
7147 return type of xml_escape_text.
7148 * server.c (emit_dll_description): Likewise.
7149
7150 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7151
7152 * server.c (captured_main): Accept argument for --selftest.
7153 Update run_tests call.
7154 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
7155 when registering selftests.
7156
7157 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
7158
7159 * regcache.c (get_thread_regcache): Update code to use "std::vector"
7160 instead of "VEC" for "target_desc.reg_defs".
7161 (regcache_cpy): Likewise.
7162 (registers_to_string): Likewise.
7163 (registers_from_string): Likewise.
7164 (find_regno): Likewise.
7165 (supply_regblock): Likewise.
7166 (regcache_raw_read_unsigned): Likewise.
7167 * tdesc.c (init_target_desc): Likewise.
7168 (tdesc_create_reg): Likewise.
7169 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
7170 (struct target_desc) <reg_defs>: Convert to "std::vector".
7171 (target_desc): Do not initialize "reg_defs".
7172 (~target_desc): Update code to use "std::vector" instead of "VEC"
7173 for "target_desc.reg_defs".
7174 (operator==): Likewise.
7175
7176 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7177
7178 * inferiors.h (thread_to_gdb_id): Remove.
7179 * inferiors.c (thread_to_gdb_id): Remove.
7180 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
7181 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
7182 lynx_store_registers, lynx_read_memory, lynx_write_memory):
7183 Likewise.
7184 * nto-low.c (nto_fetch_registers, nto_store_registers,
7185 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
7186
7187 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7188
7189 * inferiors.h (gdb_id_to_thread_id): Remove.
7190 * inferiors.c (gdb_id_to_thread_id): Remove.
7191 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
7192 removal. Move pid declaration closer to where it's used.
7193
7194 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7195
7196 * server.c (handle_detach): New function.
7197 (process_serial_event): Move code out, call handle_detach.
7198
7199 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7200
7201 * server.c (require_running): Rename to ...
7202 (require_running_or_return): ... this ...
7203 (require_running_or_break): ... and this.
7204 (handle_query, process_serial_event): Adjust.
7205
7206 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7207
7208 * linux-low.c (linux_set_resume_request): Remove unused
7209 variables.
7210
7211 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7212
7213 * server.c (first_thread_of): Remove.
7214 (process_serial_event): Replace usage of first_thread_of with
7215 find_any_thread_of_pid.
7216 * tracepoint.c (same_process_p): Remove.
7217 (gdb_agent_about_to_close): Replace usage of same_process_p with
7218 find_any_thread_of_pid.
7219 * linux-x86-low.c (same_process_callback): Remove.
7220 (x86_arch_setup_process_callback): Replace usage of
7221 same_process_callback with find_any_thread_of_pid.
7222 * thread-db.c (any_thread_of): Remove.
7223 (switch_to_process): Replace usage of any_thread_of with
7224 find_any_thread_of_pid.
7225 * inferiors.c (thread_pid_matches_callback): Remove.
7226 (find_thread_process): Adjust to use find_any_thread_of_pid.
7227
7228 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
7229
7230 * regcache.c (get_thread_regcache): Guard calls to "memset"
7231 with "!VEC_empty".
7232
7233 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
7234
7235 * linux-low.c (handle_extended_wait): Use
7236 "allocate_target_description" instead of "XNEW".
7237 * linux-x86-low.c (initialize_low_arch): Likewise.
7238
7239 2017-09-05 Yao Qi <yao.qi@linaro.org>
7240
7241 * configure.srv (srv_i386_regobj): Remove.
7242 (srv_amd64_regobj): Remove.
7243 (srv_regobj): Set it to "" for x86 non-linux targets.
7244 * linux-x86-tdesc.c (i386_linux_read_description):
7245 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
7246 (init_registers_i386): Remove the declaration.
7247 (tdesc_i386): Remove the declaration.
7248 (lynx_i386_arch_setup): Call i386_create_target_description.
7249 * nto-x86-low.c: Likewise.
7250 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
7251 [!__x86_64__]: include arch/i386.h.
7252 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
7253
7254 2017-09-05 Yao Qi <yao.qi@linaro.org>
7255
7256 * configure.srv (srv_amd64_linux_xmlfiles): Remove
7257 i386/amd64-XXX-linux from it.
7258
7259 2017-09-05 Yao Qi <yao.qi@linaro.org>
7260
7261 * configure.srv: Empty srv_amd64_linux_regobj if $development is
7262 false.
7263 (ipa_amd64_linux_regobj): Remove.
7264 (ipa_x32_linux_regobj): Remove.
7265
7266 2017-09-05 Yao Qi <yao.qi@linaro.org>
7267
7268 * Makefile.in (arch-amd64.o): New rule.
7269 * configure.srv: Append arch-amd64.o.
7270 * linux-amd64-ipa.c: Include common/x86-xstate.h.
7271 (get_ipa_tdesc): Call amd64_linux_read_description.
7272 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
7273 and init_registers_amd64_XXX.
7274 * linux-x86-low.c (x86_linux_read_description): Call
7275 amd64_linux_read_description.
7276 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
7277 (initialize_low_arch): Don't call init_registers_x32_XXX and
7278 init_registers_amd64_XXX.
7279 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
7280 and tdesc_amd64_XXX.
7281 [__x86_64__] (amd64_tdesc_test): New function.
7282 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
7283 and init_registers_amd64_XXX.
7284 * linux-x86-tdesc.c: Include arch/amd64.h.
7285 (xcr0_to_tdesc_idx): New function.
7286 (i386_linux_read_description): New function.
7287 (amd64_get_ipa_tdesc_idx): New function.
7288 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
7289 (amd64_get_ipa_tdesc): Declare.
7290
7291 2017-09-05 Yao Qi <yao.qi@linaro.org>
7292
7293 * configure.srv (srv_i386_linux_xmlfiles): Remove
7294 i386/i386-XXX-linux.xml from it.
7295
7296 2017-09-05 Yao Qi <yao.qi@linaro.org>
7297
7298 * configure.srv: Set srv_i386_linux_regobj empty if $development
7299 is false.
7300 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
7301 initialize_low_tdesc.
7302 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
7303 with #if initialize_low_tdesc.
7304 * linux-x86-tdesc-selftest.c: New file.
7305 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
7306
7307 2017-09-05 Yao Qi <yao.qi@linaro.org>
7308
7309 * Makefile.in (arch-i386.o): New rule.
7310 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
7311 (x86_64-*-linux*): Likewise.
7312 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
7313 include arch/i386.h.
7314 (i386_linux_read_description): Remove code and call
7315 i386_create_target_description.
7316 * tdesc.c (allocate_target_description): New function.
7317 * tdesc.h (set_tdesc_architecture): Remove declaration.
7318 (set_tdesc_osabi): Likewise.
7319
7320 2017-09-05 Yao Qi <yao.qi@linaro.org>
7321
7322 * linux-x86-tdesc.c: Don't include <inttypes.h>.
7323 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
7324 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
7325 .xmltarget.
7326 * server.c (get_features_xml): Call tdesc_get_features_xml.
7327 * tdesc.c (set_tdesc_architecture): New function.
7328 (set_tdesc_osabi): New function.
7329 (tdesc_get_features_xml): New function.
7330 (tdesc_create_feature): Add an argument.
7331 * tdesc.h (struct target_desc) <features>: New field.
7332 <arch, osabi>: New field.
7333 (~target_desc): xfree features, arch, and osabi.
7334 (target_desc::oerator==): Don't compare .xmltarget.
7335 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
7336 (set_tdesc_osabi): Likewise.
7337 (tdesc_get_features_xml): Likewise.
7338
7339 2017-09-05 Yao Qi <yao.qi@linaro.org>
7340
7341 * linux-x86-tdesc.c: Include selftest.h.
7342 (i386_tdesc_test): New function.
7343 (initialize_low_tdesc): Call selftests::register_test.
7344 * tdesc.h: Include regdef.h.
7345 (target_desc): Override operator == and !=.
7346
7347 2017-09-05 Yao Qi <yao.qi@linaro.org>
7348
7349 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
7350 (ipa_obj): Likewise.
7351 * linux-i386-ipa.c: Include common/x86-xstate.h
7352 (get_ipa_tdesc): Call i386_linux_read_description.
7353 (initialize_low_tracepoint): Don't call init_registers_XXX
7354 functions, call initialize_low_tdesc instead.
7355 * linux-x86-low.c (x86_linux_read_description): Call
7356 i386_linux_read_description.
7357 (initialize_low_arch): Don't call init_registers_i386_XXX
7358 functions, call initialize_low_tdesc.
7359 * linux-x86-tdesc.c: New file.
7360 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
7361 (i386_get_ipa_tdesc_idx): Declare.
7362 (i386_get_ipa_tdesc): Declare.
7363 (initialize_low_tdesc): Declare.
7364
7365 2017-09-05 Yao Qi <yao.qi@linaro.org>
7366
7367 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
7368 instead of 0.
7369
7370 2017-09-05 Yao Qi <yao.qi@linaro.org>
7371
7372 * Makefile.in (IPA_OBJS): Add vec-ipa.o
7373 * regcache.c (get_thread_regcache): Use VEC_length.
7374 (init_register_cache): Likewise.
7375 (regcache_cpy): Likewise.
7376 (registers_to_string): Iterate reg_defs via VEC_iterate.
7377 (find_regno): Likewise.
7378 (find_register_by_number): Use VEC_index.
7379 (register_size): Call find_register_by_number.
7380 (register_data): Call find_register_by_number.
7381 (supply_regblock): Use VEC_length.
7382 (regcache_raw_read_unsigned): Likewise.
7383 * tdesc.c (init_target_desc): Iterate reg_defs via
7384 VEC_iterate.
7385 (default_description): Update initializer.
7386 (copy_target_description): Don't update field num_registers.
7387 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
7388 <num_registers>: Remove.
7389
7390 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7391
7392 * Makefile.in (.SECONDARY): Define target.
7393
7394 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
7395
7396 * linux-low.c (linux_wait_1): Adjust.
7397 * server.c (queue_stop_reply_callback): Adjust.
7398
7399 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7400
7401 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
7402 QEnvironmentUnset and QEnvironmentReset packets.
7403 (handle_query): Inform remote that QEnvironmentHexEncoded,
7404 QEnvironmentUnset and QEnvironmentReset are supported.
7405
7406 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
7407
7408 * inferiors.h (inferior_target_data): Rename to ...
7409 (thread_target_data): ... this.
7410 (inferior_regcache_data): Rename to ...
7411 (thread_regcache_data): ... this.
7412 (set_inferior_regcache_data): Rename to ...
7413 (set_thread_regcache_data): ... this.
7414 * inferiors.c (inferior_target_data): Rename to ...
7415 (thread_target_data): ... this.
7416 (inferior_regcache_data): Rename to ...
7417 (thread_regcache_data): ... this.
7418 (set_inferior_regcache_data): Rename to ...
7419 (set_thread_regcache_data): ... this.
7420 (free_one_thread): Update.
7421 * linux-low.h (get_thread_lwp): Update.
7422 * regcache.c (get_thread_regcache): Update.
7423 (regcache_invalidate_thread): Update.
7424 (free_register_cache_thread): Update.
7425 * win32-i386-low.c (update_debug_registers_callback): Update.
7426 (win32_get_current_dr): Update.
7427 * win32-low.c (thread_rec): Update.
7428 (delete_thread_info): Update.
7429 (continue_one_thread): Update.
7430 (suspend_one_thread): Update.
7431
7432 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
7433
7434 * inferiors.c (set_inferior_target_data): Remove.
7435 * inferiors.h (set_inferior_target_data): Remove.
7436
7437 2017-08-18 Yao Qi <yao.qi@linaro.org>
7438
7439 * Makefile.in (OBS): Add selftest.o.
7440 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
7441 * configure, config.in: Re-generated.
7442 * server.c: Include common/sefltest.h.
7443 (captured_main): Handle option --selftest.
7444
7445 2017-08-09 Yao Qi <yao.qi@linaro.org>
7446
7447 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
7448 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
7449 i386-avx-mpx.o and i386-mmx.o.
7450 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
7451 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
7452 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
7453 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
7454 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
7455 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
7456 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
7457 i386/amd64-avx-mpx.xml.
7458
7459 2017-08-09 Yao Qi <yao.qi@linaro.org>
7460
7461 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
7462 and x32-avx-avx512.o.
7463 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
7464 i386/x32-avx-avx512.xml.
7465
7466 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
7467
7468 * tracepoint.h (enum class fast_tpoint_collect_result): New
7469 enumeration.
7470 (fast_tracepoint_collecting): Change return type to
7471 fast_tpoint_collect_result.
7472 * tracepoint.c (fast_tracepoint_collecting): Likewise.
7473 * linux-low.h: Include tracepoint.h.
7474 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
7475 fast_tpoint_collect_result.
7476 * linux-low.c (handle_tracepoints): Adjust.
7477 (linux_fast_tracepoint_collecting): Change return type to
7478 fast_tpoint_collect_result.
7479 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
7480 linux_wait_1, stuck_in_jump_pad_callback,
7481 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
7482 proceed_one_lwp): Adjust to type change.
7483
7484 2017-07-10 Yao Qi <yao.qi@linaro.org>
7485
7486 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
7487
7488 2017-06-29 Yao Qi <yao.qi@linaro.org>
7489
7490 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
7491 Remove.
7492 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
7493
7494 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
7495
7496 * Makefile.in (IPA_OBJS): Sort and format one item per line.
7497
7498 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
7499
7500 * linux-low.c (linux_create_inferior): Adjust code to access the
7501 environment information via 'gdb_environ' class.
7502 * lynx-low.c (lynx_create_inferior): Likewise.
7503 * server.c (our_environ): Make it an instance of 'gdb_environ'.
7504 (get_environ): Return a pointer to 'our_environ'.
7505 (captured_main): Initialize 'our_environ'.
7506 * server.h (get_environ): Adjust prototype.
7507 * spu-low.c (spu_create_inferior): Adjust code to access the
7508 environment information via 'gdb_environ' class.
7509
7510 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7511
7512 * linux-low.c (linux_read_memory, linux_write_memory): Remove
7513 usage of "register" keyword.
7514
7515 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7516
7517 * configure: Re-generate.
7518
7519 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7520
7521 * configure: Re-generate.
7522
7523 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7524
7525 * Makefile.in (COMPILE.pre): Add "-x c++".
7526
7527 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
7528
7529 * fork-child.c: Conditionally include <signal.h>.
7530
7531 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7532
7533 * server.c (handle_general_set): Handle new packet
7534 "QStartupWithShell".
7535 (handle_query): Add "QStartupWithShell" to the list of supported
7536 packets.
7537 (gdbserver_usage): Add help text explaining the
7538 new "--startup-with-shell" and "--no-startup-with-shell" CLI
7539 options.
7540 (captured_main): Recognize and act upon the presence of the new
7541 CLI options.
7542
7543 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7544 Pedro Alves <palves@redhat.com>
7545
7546 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
7547 * configure: Regenerate.
7548 * configure.srv (srv_linux_obj): Add "fork-child.o" and
7549 "fork-inferior.o".
7550 (i[34567]86-*-lynxos*): Likewise.
7551 (spu*-*-*): Likewise.
7552 * fork-child.c: New file.
7553 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
7554 and "environ.h".
7555 (linux_ptrace_fun): New function.
7556 (linux_create_inferior): Adjust function prototype to reflect
7557 change on "target.h". Adjust function code to use
7558 "fork_inferior".
7559 (linux_request_interrupt): Delete "signal_pid".
7560 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7561 (lynx_ptrace_fun): New function.
7562 (lynx_create_inferior): Adjust function prototype to reflect
7563 change on "target.h". Adjust function code to use
7564 "fork_inferior".
7565 * nto-low.c (nto_create_inferior): Adjust function prototype and
7566 code to reflect change on "target.h". Update comments.
7567 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
7568 "common-terminal.h" and "environ.h".
7569 (terminal_fd): Moved to fork-child.c.
7570 (old_foreground_pgrp): Likewise.
7571 (restore_old_foreground_pgrp): Likewise.
7572 (last_status): Make it global.
7573 (last_ptid): Likewise.
7574 (our_environ): New variable.
7575 (startup_with_shell): Likewise.
7576 (program_name): Likewise.
7577 (program_argv): Rename to...
7578 (program_args): ...this.
7579 (wrapper_argv): New variable.
7580 (start_inferior): Delete function.
7581 (get_exec_wrapper): New function.
7582 (get_exec_file): Likewise.
7583 (get_environ): Likewise.
7584 (prefork_hook): Likewise.
7585 (post_fork_inferior): Likewise.
7586 (postfork_hook): Likewise.
7587 (postfork_child_hook): Likewise.
7588 (handle_v_run): Update code to deal with arguments coming from the
7589 remote host. Update calls from "start_inferior" to
7590 "create_inferior".
7591 (captured_main): Likewise. Initialize environment variable. Call
7592 "have_job_control".
7593 * server.h (post_fork_inferior): New prototype.
7594 (get_environ): Likewise.
7595 (last_status): Declare.
7596 (last_ptid): Likewise.
7597 (signal_pid): Likewise.
7598 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7599 (spu_ptrace_fun): New function.
7600 (spu_create_inferior): Adjust function prototype to reflect change
7601 on "target.h". Adjust function code to use "fork_inferior".
7602 * target.c (target_terminal_init): New function.
7603 (target_terminal_inferior): Likewise.
7604 (target_terminal_ours): Likewise.
7605 * target.h: Include <vector>.
7606 (struct target_ops) <create_inferior>: Update prototype.
7607 (create_inferior): Update macro.
7608 * utils.c (gdb_flush_out_err): New function.
7609 * win32-low.c (win32_create_inferior): Adjust function prototype
7610 and code to reflect change on "target.h".
7611
7612 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7613
7614 * inferiors.c (switch_to_thread): New function.
7615
7616 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7617
7618 * Makefile.in (SFILE): Add "common/job-control.c".
7619 (OBS): Add "job-control.o".
7620
7621 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
7622
7623 * Makefile: Remove "@host_makefile_frag@".
7624
7625 2017-05-05 Pedro Alves <palves@redhat.com>
7626
7627 * configure: Regenerate.
7628
7629 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
7630
7631 * configure: Regenerate.
7632
7633 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7634
7635 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
7636 software_single_step change of return type to
7637 std::vector<CORE_ADDR>.
7638 * linux-low.c (install_software_single_step_breakpoints):
7639 Likewise.
7640 * linux-low.h (install_software_single_step_breakpoints):
7641 Likewise.
7642
7643 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7644
7645 * remote-utils.c: Include "gdb_termios.h" instead of
7646 "terminal.h".
7647 * terminal.h: Delete file.
7648
7649 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7650
7651 * server.c: Include <vector>.
7652 <program_argv, wrapper_argv>: Convert to std::vector.
7653 (start_inferior): Rewrite function to use C++.
7654 (handle_v_run): Likewise. Update code that calculates the argv
7655 based on the vRun packet; use C++.
7656 (captured_main): Likewise.
7657
7658 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7659
7660 * server.c (handle_v_cont): Initialize thread_resume::thread
7661 with null_ptid.
7662
7663 2017-04-05 Pedro Alves <palves@redhat.com>
7664
7665 * configure: Regenerate.
7666
7667 2017-04-05 Pedro Alves <palves@redhat.com>
7668
7669 * gdbreplay.c (sync_error): Constify.
7670 * linux-x86-low.c (push_opcode): Constify.
7671
7672 2017-04-05 Pedro Alves <palves@redhat.com>
7673
7674 * win32-low.c (get_child_debug_event)
7675 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
7676 Report TARGET_WAITKIND_SPURIOUS instead.
7677
7678 2017-04-05 Pedro Alves <palves@redhat.com>
7679
7680 * remote-utils.c (remote_prepare, remote_open): Constify.
7681 * remote-utils.h (remote_prepare, remote_open): Constify.
7682 * server.c (captured_main): Constify 'port' handling.
7683
7684 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
7685
7686 * Makefile.in (clean): Clear .deps.
7687
7688 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
7689
7690 * .gitignore: Remove generated files, replace with wildcard.
7691 * (clean): Replace removal of generated files with wildcard.
7692 (version.c): Replace with...
7693 (version-generated.c): ...this.
7694 (xml-builtin.c): Replace with...
7695 (xml-builtin-generated.c): ...this.
7696 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
7697 (%.c: *regformats*): Replace with...
7698 (%-generated.c: *regformats*): ...this.
7699
7700 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7701
7702 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
7703 (xtensa_fill_gregset): Call collect_register_by_name for
7704 threadptr register.
7705 (xtensa_store_gregset): Call supply_register_by_name for
7706 threadptr register.
7707
7708 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7709
7710 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
7711 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
7712 (xtensa_store_gregset): Call supply_register for all registers in
7713 a0_regnum..a0_regnum + C0_NREGS range.
7714
7715 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7716
7717 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
7718 (ax-ipa.o: ax.c): Remove.
7719 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
7720 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
7721 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
7722 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
7723 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
7724
7725 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7726
7727 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
7728 (print-utils-ipa.o: ../common/print-utils.c): Remove.
7729 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
7730 (errors-ipa.o: ../common/errors.c): Remove.
7731 (format-ipa.o: ../common/format.c): Remove.
7732 (common-utils-ipa.o: ../common/common-utils.c): Remove.
7733
7734 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7735
7736 * Makefile.in (%-ipa.o: %.c): New rule.
7737 (tracepoint-ipa.o: tracepoint.c): Remove.
7738 (utils-ipa.o: utils.c): Remove.
7739 (remote-utils-ipa.o: remote-utils.c): Remove.
7740 (regcache-ipa.o: regcache.c): Remove.
7741 (i386-linux-ipa.o: i386-linux.c): Remove.
7742 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
7743 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
7744 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
7745 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
7746 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
7747 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
7748 (amd64-linux-ipa.o: amd64-linux.c): Remove.
7749 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
7750 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
7751 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
7752 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
7753 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
7754 (aarch64-ipa.o: aarch64.c): Remove.
7755 (s390-linux32-ipa.o: s390-linux32.c): Remove.
7756 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
7757 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
7758 (s390-linux64-ipa.o: s390-linux64.c): Remove.
7759 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
7760 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
7761 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
7762 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
7763 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
7764 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
7765 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
7766 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
7767 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
7768 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
7769 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
7770 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
7771 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
7772 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
7773 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
7774 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
7775 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
7776 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
7777 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
7778 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
7779 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
7780 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
7781 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
7782 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
7783 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
7784 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
7785 (tdesc-ipa.o: tdesc.c): Remove.
7786 (x32-linux-ipa.o: x32-linux.c): Remove.
7787 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
7788 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
7789
7790 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7791
7792 * Makefile.in (%.o: ../arch/%.c): New rule.
7793 (arm.o: ../arch/arm.c): Remove.
7794 (arm-linux.o: ../arch/arm-linux.c): Remove.
7795 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
7796 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
7797
7798 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7799
7800 * Makefile.in (%.o: ../nat/%.c): New rule.
7801 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
7802 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
7803 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
7804 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
7805 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
7806 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
7807 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
7808 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
7809 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
7810 (linux-personality.o: ../nat/linux-personality.c): Remove.
7811 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
7812 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
7813 (x86-linux.o: ../nat/x86-linux.c): Remove.
7814 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
7815 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
7816
7817 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7818
7819 * Makefile.in (%.o: ../common/%.c): New rule.
7820 (signals.o: ../common/signals.c): Remove.
7821 (print-utils.o: ../common/print-utils.c): Remove.
7822 (rsp-low.o: ../common/rsp-low.c): Remove.
7823 (common-utils.o: ../common/common-utils.c): Remove.
7824 (posix-strerror.o: ../common/posix-strerror.c): Remove.
7825 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
7826 (vec.o: ../common/vec.c): Remove.
7827 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
7828 (xml-utils.o: ../common/xml-utils.c): Remove.
7829 (ptid.o: ../common/ptid.c): Remove.
7830 (buffer.o: ../common/buffer.c): Remove.
7831 (format.o: ../common/format.c): Remove.
7832 (filestuff.o: ../common/filestuff.c): Remove.
7833 (agent.o: ../common/agent.c): Remove.
7834 (errors.o: ../common/errors.c): Remove.
7835 (environ.o: ../common/environ.c): Remove.
7836 (common-debug.o: ../common/common-debug.c): Remove.
7837 (cleanups.o: ../common/cleanups.c): Remove.
7838 (common-exceptions.o: ../common/common-exceptions.c): Remove.
7839 (fileio.o: ../common/fileio.c): Remove.
7840 (common-regcache.o: ../common/common-regcache.c): Remove.
7841 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
7842 (new-op.o: ../common/new-op.c): Remove.
7843 (btrace-common.o: ../common/btrace-common.c): Remove.
7844
7845 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7846
7847 * Makefile.in (%.o: ../target/%.c): New rule.
7848 (waitstatus.o: ../target/waitstatus.c): Remove.
7849
7850 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7851
7852 * Makefile.in
7853 (%.c: ../regformats/%.dat,
7854 (%.c: ../regformats/arm/%.dat,
7855 (%.c: ../regformats/i386/%.dat,
7856 (%.c: ../regformats/rs6000/%.dat): New rules.
7857 (aarch64.c): Remove.
7858 (reg-arm.c): Remove.
7859 (arm-with-iwmmxt.c): Remove.
7860 (arm-with-vfpv2.c): Remove.
7861 (arm-with-vfpv3.c): Remove.
7862 (arm-with-neon.c): Remove.
7863 (reg-bfin.c): Remove.
7864 (reg-cris.c): Remove.
7865 (reg-crisv32.c): Remove.
7866 (i386.c): Remove.
7867 (i386-linux.c): Remove.
7868 (i386-avx.c): Remove.
7869 (i386-avx-linux.c): Remove.
7870 (i386-avx-avx512.c): Remove.
7871 (i386-avx-avx512-linux.c): Remove.
7872 (i386-mpx.c): Remove.
7873 (i386-mpx-linux.c): Remove.
7874 (i386-avx-mpx-avx512-pku.c): Remove.
7875 (i386-avx-mpx-avx512-pku-linux.c): Remove.
7876 (i386-avx-mpx.c): Remove.
7877 (i386-avx-mpx-linux.c): Remove.
7878 (i386-mmx.c): Remove.
7879 (i386-mmx-linux.c): Remove.
7880 (reg-ia64.c): Remove.
7881 (reg-m32r.c): Remove.
7882 (reg-m68k.c): Remove.
7883 (reg-cf.c): Remove.
7884 (mips-linux.c): Remove.
7885 (mips-dsp-linux.c): Remove.
7886 (mips64-linux.c): Remove.
7887 (mips64-dsp-linux.c): Remove.
7888 (nios2-linux.c): Remove.
7889 (powerpc-32.c): Remove.
7890 (powerpc-32l.c): Remove.
7891 (powerpc-altivec32l.c): Remove.
7892 (powerpc-cell32l.c): Remove.
7893 (powerpc-vsx32l.c): Remove.
7894 (powerpc-isa205-32l.c): Remove.
7895 (powerpc-isa205-altivec32l.c): Remove.
7896 (powerpc-isa205-vsx32l.c): Remove.
7897 (powerpc-e500l.c): Remove.
7898 (powerpc-64l.c): Remove.
7899 (powerpc-altivec64l.c): Remove.
7900 (powerpc-cell64l.c): Remove.
7901 (powerpc-vsx64l.c): Remove.
7902 (powerpc-isa205-64l.c): Remove.
7903 (powerpc-isa205-altivec64l.c): Remove.
7904 (powerpc-isa205-vsx64l.c): Remove.
7905 (s390-linux32.c): Remove.
7906 (s390-linux32v1.c): Remove.
7907 (s390-linux32v2.c): Remove.
7908 (s390-linux64.c): Remove.
7909 (s390-linux64v1.c): Remove.
7910 (s390-linux64v2.c): Remove.
7911 (s390-te-linux64.c): Remove.
7912 (s390-vx-linux64.c): Remove.
7913 (s390-tevx-linux64.c): Remove.
7914 (s390x-linux64.c): Remove.
7915 (s390x-linux64v1.c): Remove.
7916 (s390x-linux64v2.c): Remove.
7917 (s390x-te-linux64.c): Remove.
7918 (s390x-vx-linux64.c): Remove.
7919 (s390x-tevx-linux64.c): Remove.
7920 (tic6x-c64xp-linux.c): Remove.
7921 (tic6x-c64x-linux.c): Remove.
7922 (tic6x-c62x-linux.c): Remove.
7923 (reg-sh.c): Remove.
7924 (reg-sparc64.c): Remove.
7925 (reg-spu.c): Remove.
7926 (amd64.c): Remove.
7927 (amd64-linux.c): Remove.
7928 (amd64-avx.c): Remove.
7929 (amd64-avx-linux.c): Remove.
7930 (amd64-avx-avx512.c): Remove.
7931 (amd64-avx-avx512-linux.c): Remove.
7932 (amd64-mpx.c): Remove.
7933 (amd64-mpx-linux.c): Remove.
7934 (amd64-avx-mpx-avx512-pku.c): Remove.
7935 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
7936 (amd64-avx-mpx.c): Remove.
7937 (amd64-avx-mpx-linux.c): Remove.
7938 (x32.c): Remove.
7939 (x32-linux.c): Remove.
7940 (x32-avx.c): Remove.
7941 (x32-avx-linux.c): Remove.
7942 (x32-avx-avx512.c): Remove.
7943 (x32-avx-avx512-linux.c): Remove.
7944 (reg-xtensa.c): Remove.
7945 (reg-tilegx.c): Remove.
7946 (reg-tilegx32.c): Remove.
7947
7948 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
7949
7950 * Makefile.in (SFILES): Add "common/environ.c".
7951 (OBJS): Add "common/environ.h".
7952
7953 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
7954
7955 * configure.ac: Check if the fs_base and gs_base members of
7956 `struct user_regs_struct' exist.
7957 * config.in: Regenerated.
7958 * configure: Likewise.
7959
7960 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
7961
7962 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
7963 target_read_memory.
7964 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
7965 (get_next_pcs_syscall_next_pc): Likewise.
7966
7967 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
7968
7969 * win32-i386-low.c: Fix incorrect reference to a couple source files.
7970 * nto-x86-low.c: Likewise.
7971
7972 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
7973
7974 * Makefile.in: Include disable-implicit-rules.mk.
7975
7976 2016-11-23 Pedro Alves <palves@redhat.com>
7977
7978 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
7979 (debug_vprintf): Use std::chrono::steady_clock instead of
7980 gettimeofday. Use '.' instead of ':'.
7981 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
7982 (get_timestamp): Use std::chrono::steady_clock instead of
7983 gettimeofday.
7984
7985 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7986
7987 * Makefile.in: Fix whitespace formatting.
7988
7989 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7990
7991 * Makefile.in (SFILES, OBS): Flatten list and order
7992 alphabetically.
7993
7994 2016-11-23 Pedro Alves <palves@redhat.com>
7995
7996 * event-loop.c (handle_file_event): Use warning.
7997 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
7998 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7999 Use warning.
8000
8001 2016-11-23 Pedro Alves <palves@redhat.com>
8002
8003 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
8004 output.
8005 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
8006 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
8007 debug_printf and debug_flush for debug output.
8008 * server.c (handle_general_set): Likewise.
8009 * thread-db.c (try_thread_db_load): Use debug_printf for debug
8010 output.
8011
8012 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
8013
8014 * Makefile.in (.c.o): Replace rule with ...
8015 (%.o: %.c): ... this one.
8016
8017 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
8018
8019 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
8020 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
8021 make.
8022 * configure.ac: Remove checks for the make program.
8023 * configure: Re-generate.
8024
8025 2016-10-28 Pedro Alves <palves@redhat.com>
8026
8027 * Makefile.in (CXX_DIALECT): Get from configure.
8028 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
8029 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
8030 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
8031 * config.in: Regenerate.
8032 * configure: Regenerate.
8033
8034 2016-10-27 Yao Qi <yao.qi@linaro.org>
8035
8036 * linux-low.c (linux_supports_range_stepping): Return true if
8037 can_software_single_step return true.
8038
8039 2016-10-27 Yao Qi <yao.qi@linaro.org>
8040
8041 * inferiors.c (find_inferior_in_random): New function.
8042 * inferiors.h (find_inferior_in_random): Declare.
8043 * linux-low.c (linux_wait_for_event_filtered): Call
8044 find_inferior_in_random instead of find_inferior.
8045
8046 2016-10-27 Yao Qi <yao.qi@linaro.org>
8047
8048 * linux-low.c (linux_wait_1): If single-step breakpoints are
8049 inserted, remove them.
8050
8051 2016-10-26 Pedro Alves <palves@redhat.com>
8052
8053 * linux-low.c (handle_extended_wait): Link parent/child fork
8054 threads.
8055 (linux_wait_1): Unlink them.
8056 (linux_set_resume_request): Ignore resume requests for
8057 already-resumed and unhandled fork child threads.
8058 * linux-low.h (struct lwp_info) <fork_relative>: New field.
8059 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
8060 New functions.
8061 (handle_v_requests) <vCont>: Don't call require_running.
8062 * server.h (in_queued_stop_replies): New declaration.
8063
8064 2016-10-24 Yao Qi <yao.qi@linaro.org>
8065
8066 PR server/20733
8067 * linux-aarch64-low.c (append_insns): Cast the return value to
8068 'uint32_t *'.
8069
8070 2016-10-10 Yao Qi <yao.qi@linaro.org>
8071
8072 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
8073
8074 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
8075
8076 * target.c (target_supports_multi_process): New function, moved
8077 from...
8078 * target.h (target_supports_multi_process): ... here. Remove
8079 macro.
8080
8081 2016-10-05 Tom Tromey <tom@tromey.com>
8082
8083 PR remote/20655:
8084 * tracepoint.c (handle_tracepoint_bkpts): Check
8085 ipa_error_tracepoint, not ipa_stopping_tracepoint.
8086
8087 2016-10-05 Yao Qi <yao.qi@linaro.org>
8088
8089 * configure.srv: Update the path of arm-*.xml files.
8090
8091 2016-10-05 Terry Guo <terry.guo@arm.com>
8092 Yao Qi <yao.qi@linaro.org>
8093
8094 * Makefile.in: Adjust the path of rules.
8095 * configure.srv: Update the path of xml files.
8096 * regformats/arm-with-iwmmxt.dat: Regenerated.
8097 * regformats/arm-with-neon.dat: Likewise.
8098 * regformats/arm-with-vfpv2.dat: Likewise.
8099 * regformats/arm-with-vfpv3.dat Likewise.
8100
8101 2016-09-30 Yao Qi <yao.qi@linaro.org>
8102
8103 PR gdbserver/20627
8104 * target.c (target_stop_and_wait): Don't call
8105 target_continue_no_signal, use resume_stop instead.
8106
8107 2016-09-26 Yao Qi <yao.qi@linaro.org>
8108
8109 * linux-low.c (linux_wait_1): Call debug_exit.
8110
8111 2016-09-23 Pedro Alves <palves@redhat.com>
8112
8113 * Makefile.in (SFILES): Add common/new-op.c.
8114 (OBS): Add common/new-op.o.
8115 (new-op.o): New rule.
8116
8117 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
8118
8119 * .gitinore: Ignore more files.
8120
8121 2016-09-21 Yao Qi <yao.qi@linaro.org>
8122
8123 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
8124 23.
8125
8126 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
8127
8128 * server.c (start_inferior): Call target_mourn_inferior instead of
8129 mourn_inferior; pass ptid_t argument to it.
8130 (resume): Likewise.
8131 (handle_target_event): Likewise.
8132 * target.c (target_mourn_inferior): New function.
8133 * target.h (mourn_inferior): Delete macro.
8134
8135 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
8136
8137 * linux-low.c (lwp_is_stepping): New function.
8138
8139 2016-09-06 Carl Love <cel@us.ibm.com>
8140
8141 * server.c (start_inferior): Fixed comment, requested comment change
8142 didn't get updated correctly. Removed reference to ptrace () call as
8143 it is only true on Linux systems.
8144
8145 2016-09-06 Carl Love <cel@us.ibm.com>
8146
8147 * server.c (start_inferior): Do not call
8148 function target_post_create_inferior () if the
8149 inferior process has already exited.
8150
8151 2016-09-05 Pedro Alves <palves@redhat.com>
8152
8153 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
8154 (COMPILE.pre, CC_LD): Use CXX directly.
8155 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
8156 * acinclude.m4: Don't include build-with-cxx.m4.
8157 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
8158 * configure: Regenerate.
8159
8160 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
8161
8162 PR gdb/19495
8163 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
8164 call writing data to own_buf.
8165
8166 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
8167
8168 * target.c (mywait): Call target_wait instead of
8169 the_target->wait.
8170 (target_wait): New function.
8171
8172 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
8173
8174 * server.c (start_inferior): New variable 'ptid'. Replace calls
8175 to the_target->resume by target_continue{,_no_signal}, depending
8176 on the case.
8177 * target.c (target_stop_and_wait): Call target_continue_no_signal
8178 instead of the_target->resume.
8179 (target_continue): New function.
8180
8181 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
8182
8183 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
8184
8185 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
8186
8187 PR server/20491
8188 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
8189 ps_prochandle.
8190 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
8191 * linux-arm-low.c (ps_get_thread_area): Likewise.
8192 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
8193 * linux-m68k-low.c (ps_get_thread_area): Likewise.
8194 * linux-mips-low.c (ps_get_thread_area): Likewise.
8195 * linux-nios2-low.c (ps_get_thread_area): Likewise.
8196 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
8197 * linux-x86-low.c (ps_get_thread_area): Likewise.
8198 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
8199
8200 2016-08-19 Pedro Alves <palves@redhat.com>
8201
8202 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
8203
8204 2016-08-19 Pedro Alves <palves@redhat.com>
8205
8206 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
8207 comment. Use memcpy instead of casting through unsigned long.
8208
8209 2016-08-19 Pedro Alves <palves@redhat.com>
8210
8211 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
8212 allocating around 0x80000000.
8213
8214 2016-08-19 Pedro Alves <palves@redhat.com>
8215
8216 PR gdb/20415
8217 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
8218 (x32-avx512-linux-ipa.o): New rules.
8219 * configure.ac (x86_64-*-linux*): New x32 check.
8220 * configure.srv (ipa_x32_linux_regobj): New.
8221 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
8222 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
8223 descriptions.
8224 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
8225 descriptions.
8226 * configure: Regenerate.
8227
8228 2016-08-09 Pedro Alves <palves@redhat.com>
8229
8230 PR gdb/18653
8231 * Makefile.in (OBS): Add signals-state-save-restore.o.
8232 (signals-state-save-restore.o): New rule.
8233 * config.in: Regenerate.
8234 * configure: Regenerate.
8235 * linux-low.c: Include "signals-state-save-restore.h".
8236 (linux_create_inferior): Call
8237 restore_original_signals_state.
8238 * server.c: Include "dispositions-save-restore.h".
8239 (captured_main): Call save_original_signals_state.
8240
8241 2016-08-05 Pedro Alves <palves@redhat.com>
8242
8243 * configure: Regenerate.
8244
8245 2016-08-04 Yao Qi <yao.qi@linaro.org>
8246
8247 * linux-low.c (regsets_fetch_inferior_registers): Check
8248 errno is ESRCH or not.
8249
8250 2016-08-02 Yao Qi <yao.qi@linaro.org>
8251
8252 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
8253 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
8254 (thread_db_load_search): Update.
8255 (try_thread_db_load_1): Don't look for td_ta_event_addr,
8256 td_ta_set_event and td_ta_event_getmsg.
8257
8258 2016-07-26 Pedro Alves <palves@redhat.com>
8259
8260 PR server/20414
8261 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
8262 of unsigned long for 64-bit registers and use uint32_t instead of
8263 unsigned int for 32-bit registers.
8264
8265 2016-07-26 Pedro Alves <palves@redhat.com>
8266
8267 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
8268 to 'ptrace'.
8269
8270 2016-07-21 Tom Tromey <tom@tromey.com>
8271
8272 * configure: Rebuild.
8273
8274 2016-07-21 Yao Qi <yao.qi@linaro.org>
8275
8276 * mem-break.c (find_gdb_breakpoint): Cast bp to
8277 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
8278
8279 2016-07-21 Yao Qi <yao.qi@linaro.org>
8280
8281 * server.c (handle_v_requests): Support s and S actions
8282 if target_supports_software_single_step return true.
8283
8284 2016-07-21 Yao Qi <yao.qi@linaro.org>
8285
8286 * linux-low.c (resume_stopped_resumed_lwps): If resume request
8287 is resume_step, call maybe_hw_step.
8288 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
8289 and unstop them.
8290 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
8291 breakpoints or not.
8292 (proceed_one_lwp): If resume request is resume_step, install
8293 reinsert breakpoints and call maybe_hw_step.
8294
8295 2016-07-21 Yao Qi <yao.qi@linaro.org>
8296
8297 * linux-low.c (proceed_one_lwp): Declare.
8298 (linux_resume_one_thread): Remove local variable 'step'.
8299 Lift code enqueue signal. Call proceed_one_lwp instead of
8300 linux_resume_one_lwp.
8301
8302 2016-07-21 Yao Qi <yao.qi@linaro.org>
8303
8304 * linux-low.c (linux_resume_one_thread): Call
8305 enqueue_pending_signal.
8306
8307 2016-07-21 Yao Qi <yao.qi@linaro.org>
8308
8309 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
8310 * inferiors.c (do_restore_current_thread_cleanup): New function.
8311 (make_cleanup_restore_current_thread): Likewise.
8312 * linux-low.c (install_software_single_step_breakpoints): Call
8313 make_cleanup_restore_current_thread. Switch current_thread to
8314 thread.
8315
8316 2016-07-21 Yao Qi <yao.qi@linaro.org>
8317
8318 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
8319 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
8320 (clone_one_breakpoint): Likewise.
8321 (delete_reinsert_breakpoints): Change parameter to thread.
8322 Callers updated.
8323 (has_reinsert_breakpoints): Likewise.
8324 (uninsert_reinsert_breakpoints): Likewise.
8325 (reinsert_reinsert_breakpoints): Likewise.
8326 * mem-break.h (set_reinsert_breakpoint): Update declaration.
8327 (delete_reinsert_breakpoints): Likewise.
8328 (reinsert_reinsert_breakpoints): Likewise.
8329 (uninsert_reinsert_breakpoints): Likewise.
8330 (has_reinsert_breakpoints): Likewise.
8331
8332 2016-07-21 Yao Qi <yao.qi@linaro.org>
8333
8334 * inferiors.c (get_thread_process): Make parameter const.
8335 * inferiors.h (get_thread_process): Update declaration.
8336 * mem-break.c (clone_all_breakpoints): Remove all parameters.
8337 Add new parameters child_thread and parent_thread. Callers
8338 updated.
8339 * mem-break.h (clone_all_breakpoints): Update declaration.
8340
8341 2016-07-21 Yao Qi <yao.qi@linaro.org>
8342
8343 * mem-break.c (struct breakpoint) <cond_list>: Remove.
8344 <command_list, handler>: Remove.
8345 (struct gdb_breakpoint): New.
8346 (struct other_breakpoint): New.
8347 (struct reinsert_breakpoint): New.
8348 (is_gdb_breakpoint): New function.
8349 (any_persistent_commands): Update command_list if
8350 is_gdb_breakpoint returns true.
8351 (set_breakpoint): Create breakpoints according to their types.
8352 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
8353 (set_gdb_breakpoint_1): Likewise.
8354 (set_gdb_breakpoint): Likewise.
8355 (clear_breakpoint_conditions): Change parameter type to
8356 'struct gdb_breakpoint *'.
8357 (clear_breakpoint_commands): Likewise.
8358 (clear_breakpoint_conditions_and_commands): Likewise.
8359 (add_condition_to_breakpoint): Likewise.
8360 (add_breakpoint_condition): Likewise.
8361 (add_commands_to_breakpoint): Likewise.
8362 (check_breakpoints): Check other_breakpoint.
8363 (clone_one_breakpoint): Clone breakpopint according to its type.
8364 * mem-break.h (struct gdb_breakpoint): Declare.
8365 (set_gdb_breakpoint): Update declaration.
8366 (clear_breakpoint_conditions_and_commands): Likewise.
8367 (add_breakpoint_condition): Likewise.
8368 (add_breakpoint_commands): Likewise.
8369 * server.c (process_point_options): Change parameter type to
8370 'struct gdb_breakpoint *'.
8371
8372 2016-07-21 Yao Qi <yao.qi@linaro.org>
8373
8374 * mem-break.c (set_breakpoint_at): Rename it to ...
8375 (set_breakpoint_type_at): ... it.
8376 (set_breakpoint_at): Call set_breakpoint_type_at.
8377 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
8378 * mem-break.h (set_breakpoint_at): Update comments.
8379
8380 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
8381
8382 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
8383 to buf parameter.
8384 (nios2_store_gregset): Likewise.
8385
8386 2016-07-01 Pedro Alves <palves@redhat.com>
8387 Antoine Tremblay <antoine.tremblay@ericsson.com>
8388
8389 * linux-low.c: Change interface to take the target lwp_info
8390 pointer directly and return void. Handle detaching from a zombie
8391 thread.
8392 (linux_detach_lwp_callback): New function.
8393 (linux_detach): Detach from the leader thread after detaching from
8394 the clone threads.
8395
8396 2016-06-28 Yao Qi <yao.qi@linaro.org>
8397
8398 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
8399 for variable new_offset.
8400 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
8401 (aarch64_ftrace_insn_reloc_cb): Likewise.
8402 (aarch64_ftrace_insn_reloc_tb): Likewise.
8403 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
8404 PRIx64 instead of PRIx32.
8405
8406 2016-06-28 Yao Qi <yao.qi@linaro.org>
8407
8408 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
8409 (the_low_target): Install arm_get_syscall_trapinfo.
8410
8411 2016-06-28 Yao Qi <yao.qi@linaro.org>
8412
8413 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
8414 function.
8415 (the_low_target): Install aarch64_get_syscall_trapinfo.
8416
8417 2016-06-28 Yao Qi <yao.qi@linaro.org>
8418
8419 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
8420 Callers updated.
8421 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
8422 Remove parameter sysno.
8423 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
8424 sysret.
8425
8426 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
8427
8428 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
8429 (s390_emit_ne_goto): Likewise.
8430 (s390_emit_lt_goto): Likewise.
8431 (s390_emit_le_goto): Likewise.
8432 (s390_emit_gt_goto): Likewise.
8433 (s390_emit_ge_goto): Likewise.
8434 (s390x_emit_eq_goto): Likewise.
8435 (s390x_emit_ne_goto): Likewise.
8436 (s390x_emit_lt_goto): Likewise.
8437 (s390x_emit_le_goto): Likewise.
8438 (s390x_emit_gt_goto): Likewise.
8439 (s390x_emit_ge_goto): Likewise.
8440 (s390_emit_ops_impl): Mark variable static.
8441 (s390x_emit_ops): Likewise.
8442
8443 2016-06-17 Yao Qi <yao.qi@linaro.org>
8444
8445 * linux-low.c (handle_extended_wait): Call
8446 uninsert_reinsert_breakpoints for the parent process. Remove
8447 reinsert breakpoints from the child process. Reinsert them to
8448 the parent process when vfork is done.
8449 * mem-break.c (uninsert_reinsert_breakpoints): New function.
8450 (reinsert_reinsert_breakpoints): New function.
8451 * mem-break.h (uninsert_reinsert_breakpoints): Declare
8452 (reinsert_reinsert_breakpoints): Declare.
8453
8454 2016-06-17 Yao Qi <yao.qi@linaro.org>
8455
8456 * linux-low.c (handle_extended_wait): If the parent is doing
8457 step-over, remove the reinsert breakpoints from the forked child.
8458
8459 2016-06-17 Yao Qi <yao.qi@linaro.org>
8460
8461 * linux-low.c (unsuspend_all_lwps): Declare.
8462 (linux_low_filter_event): If thread exited, call finish_step_over.
8463 If step-over is finished, unsuspend other threads.
8464
8465 2016-06-17 Yao Qi <yao.qi@linaro.org>
8466
8467 * linux-low.c (linux_resume_one_lwp_throw): Assert
8468 has_reinsert_breakpoints returns false.
8469 * mem-break.c (delete_disabled_breakpoints): Assert
8470 bp type isn't reinsert_breakpoint.
8471
8472 2016-06-17 Yao Qi <yao.qi@linaro.org>
8473
8474 * linux-low.c (maybe_hw_step): New function.
8475 (linux_resume_one_lwp_throw): Call maybe_hw_step.
8476 (finish_step_over): Switch current_thread to lwp temporarily,
8477 and assert has_reinsert_breakpoints returns true.
8478 (proceed_one_lwp): Call maybe_hw_step.
8479 * mem-break.c (has_reinsert_breakpoints): New function.
8480 * mem-break.h (has_reinsert_breakpoints): Declare.
8481
8482 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
8483
8484 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
8485
8486 2016-05-17 Yao Qi <yao.qi@linaro.org>
8487
8488 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
8489 instead of find_inferior.
8490
8491 2016-05-05 Yao Qi <yao.qi@linaro.org>
8492
8493 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
8494 Initialize res to zero.
8495
8496 2016-05-05 Yao Qi <yao.qi@linaro.org>
8497
8498 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
8499 to uint32_t.
8500
8501 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8502
8503 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
8504 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
8505 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
8506
8507 2016-04-28 Par Olsson <par.olsson@windriver.com>
8508 Simon Marchi <simon.marchi@ericsson.com>
8509
8510 * tracepoint.c (write_inferior_int8): New function.
8511 (cmd_qtenable_disable): Write enable flag using
8512 write_inferior_int8.
8513
8514 2016-04-25 Yao Qi <yao.qi@linaro.org>
8515
8516 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
8517 (need_step_over_p): Return zero if the LWP has pending signals
8518 can be delivered on software single step target.
8519
8520 2016-04-25 Yao Qi <yao.qi@linaro.org>
8521
8522 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
8523 return instead of error.
8524
8525 2016-04-22 Yao Qi <yao.qi@linaro.org>
8526
8527 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
8528 to 23.
8529
8530 2016-04-22 Yao Qi <yao.qi@linaro.org>
8531
8532 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
8533 signal when stepping over breakpoint with software single
8534 step.
8535
8536 2016-04-21 Pedro Alves <palves@redhat.com>
8537
8538 * linux-s390-low.c (s390_collect_ptrace_register)
8539 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
8540 add casts.
8541 (s390_check_regset): Use void * instead of gdb_byte *.
8542
8543 2016-04-20 Pedro Alves <palves@redhat.com>
8544
8545 * configure: Renegerate.
8546
8547 2016-04-20 Yao Qi <yao.qi@linaro.org>
8548
8549 * linux-aarch32-low.c: Include "arch/arm-linux.h".
8550 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
8551 number 16.
8552 (arm_store_gregset): Likewise.
8553
8554 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
8555
8556 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
8557 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
8558 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
8559 (amd64-avx-mpx-linux.c): New rules.
8560 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
8561 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
8562 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
8563 (srv_amd64_regobj): Add amd64-avx-mpx.o.
8564 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
8565 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
8566 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
8567 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
8568 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
8569 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
8570 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
8571 * linux-x86-low.c (x86_linux_read_description): Add case for
8572 X86_XSTATE_AVX_MPX_MASK.
8573 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
8574 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
8575 init_registers_i386_avx_mpx_linux.
8576 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8577 (initialize_low_tracepoint): Call
8578 init_registers_i386_avx_mpx_linux.
8579 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8580 (initialize_low_tracepoint): Call
8581 init_registers_amd64_avx_mpx_linux.
8582 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
8583 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
8584 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
8585 declarations.
8586
8587 2016-04-18 Pedro Alves <palves@redhat.com>
8588
8589 * configure: Regenerate.
8590
8591 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
8592
8593 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
8594 (aarch64_emit_sub): Likewise.
8595
8596 2016-04-12 Pedro Alves <palves@redhat.com>
8597
8598 * utils.c (prepare_to_throw_exception): Delete.
8599
8600 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
8601
8602 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
8603
8604 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
8605
8606 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
8607
8608 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
8609
8610 * linux-aarch64-ipa.c: Add <elf.h> include.
8611 * linux-ppc-ipa.c: Add <elf.h> include.
8612 * linux-s390-ipa.c: Add <elf.h> include.
8613
8614 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8615
8616 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
8617 (get_raw_reg_ptr): Likewise.
8618 (get_trace_state_variable_value_ptr): Likewise.
8619 (set_trace_state_variable_value_ptr): Likewise.
8620 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
8621 char *.
8622
8623 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8624 Marcin Kościelnicki <koriakin@0x04.net>
8625
8626 PR/17221
8627 * linux-ppc-low.c (emit_insns): New function.
8628 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
8629 (ppc_emit_prologue): New function.
8630 (ppc_emit_epilogue): New function.
8631 (ppc_emit_add): New function.
8632 (ppc_emit_sub): New function.
8633 (ppc_emit_mul): New function.
8634 (ppc_emit_lsh): New function.
8635 (ppc_emit_rsh_signed): New function.
8636 (ppc_emit_rsh_unsigned): New function.
8637 (ppc_emit_ext): New function.
8638 (ppc_emit_zero_ext): New function.
8639 (ppc_emit_log_not): New function.
8640 (ppc_emit_bit_and): New function.
8641 (ppc_emit_bit_or): New function.
8642 (ppc_emit_bit_xor): New function.
8643 (ppc_emit_bit_not): New function.
8644 (ppc_emit_equal): New function.
8645 (ppc_emit_less_signed): New function.
8646 (ppc_emit_less_unsigned): New function.
8647 (ppc_emit_ref): New function.
8648 (ppc_emit_const): New function.
8649 (ppc_emit_reg): New function.
8650 (ppc_emit_pop): New function.
8651 (ppc_emit_stack_flush): New function.
8652 (ppc_emit_swap): New function.
8653 (ppc_emit_stack_adjust): New function.
8654 (ppc_emit_call): New function.
8655 (ppc_emit_int_call_1): New function.
8656 (ppc_emit_void_call_2): New function.
8657 (ppc_emit_if_goto): New function.
8658 (ppc_emit_goto): New function.
8659 (ppc_emit_eq_goto): New function.
8660 (ppc_emit_ne_goto): New function.
8661 (ppc_emit_lt_goto): New function.
8662 (ppc_emit_le_goto): New function.
8663 (ppc_emit_gt_goto): New function.
8664 (ppc_emit_ge_goto): New function.
8665 (ppc_write_goto_address): New function.
8666 (ppc_emit_ops_impl): New static variable.
8667 (ppc64v1_emit_prologue): New function.
8668 (ppc64v2_emit_prologue): New function.
8669 (ppc64_emit_epilogue): New function.
8670 (ppc64_emit_add): New function.
8671 (ppc64_emit_sub): New function.
8672 (ppc64_emit_mul): New function.
8673 (ppc64_emit_lsh): New function.
8674 (ppc64_emit_rsh_signed): New function.
8675 (ppc64_emit_rsh_unsigned): New function.
8676 (ppc64_emit_ext): New function.
8677 (ppc64_emit_zero_ext): New function.
8678 (ppc64_emit_log_not): New function.
8679 (ppc64_emit_bit_and): New function.
8680 (ppc64_emit_bit_or): New function.
8681 (ppc64_emit_bit_xor): New function.
8682 (ppc64_emit_bit_not): New function.
8683 (ppc64_emit_equal): New function.
8684 (ppc64_emit_less_signed): New function.
8685 (ppc64_emit_less_unsigned): New function.
8686 (ppc64_emit_ref): New function.
8687 (ppc64_emit_const): New function.
8688 (ppc64v1_emit_reg): New function.
8689 (ppc64v2_emit_reg): New function.
8690 (ppc64_emit_pop): New function.
8691 (ppc64_emit_stack_flush): New function.
8692 (ppc64_emit_swap): New function.
8693 (ppc64v1_emit_call): New function.
8694 (ppc64v2_emit_call): New function.
8695 (ppc64v1_emit_int_call_1): New function.
8696 (ppc64v2_emit_int_call_1): New function.
8697 (ppc64v1_emit_void_call_2): New function.
8698 (ppc64v2_emit_void_call_2): New function.
8699 (ppc64_emit_if_goto): New function.
8700 (ppc64_emit_eq_goto): New function.
8701 (ppc64_emit_ne_goto): New function.
8702 (ppc64_emit_lt_goto): New function.
8703 (ppc64_emit_le_goto): New function.
8704 (ppc64_emit_gt_goto): New function.
8705 (ppc64_emit_ge_goto): New function.
8706 (ppc64v1_emit_ops_impl): New static variable.
8707 (ppc64v2_emit_ops_impl): New static variable.
8708 (ppc_emit_ops): New function.
8709 (linux_low_target): Wire in ppc_emit_ops.
8710
8711 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8712 Marcin Kościelnicki <koriakin@0x04.net>
8713
8714 PR/17221
8715 * Makefile.in: Add powerpc-*-ipa.o
8716 * configure.srv: Add ipa_obj for powerpc*-linux.
8717 * linux-ppc-ipa.c: New file.
8718 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
8719 includes.
8720 (PPC_FIELD): New macro.
8721 (PPC_SEXT): New macro.
8722 (PPC_OP6): New macro.
8723 (PPC_BO): New macro.
8724 (PPC_LI): New macro.
8725 (PPC_BD): New macro.
8726 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
8727 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
8728 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
8729 (ppc_get_thread_area): New function.
8730 (is_elfv2_inferior): New function.
8731 (gen_ds_form): New function.
8732 (GEN_STD): New macro.
8733 (GEN_STDU): New macro.
8734 (GEN_LD): New macro.
8735 (GEN_LDU): New macro.
8736 (gen_d_form): New function.
8737 (GEN_ADDI): New macro.
8738 (GEN_ADDIS): New macro.
8739 (GEN_LI): New macro.
8740 (GEN_LIS): New macro.
8741 (GEN_ORI): New macro.
8742 (GEN_ORIS): New macro.
8743 (GEN_LWZ): New macro.
8744 (GEN_STW): New macro.
8745 (GEN_STWU): New macro.
8746 (gen_xfx_form): New function.
8747 (GEN_MFSPR): New macro.
8748 (GEN_MTSPR): New macro.
8749 (GEN_MFCR): New macro.
8750 (GEN_MTCR): New macro.
8751 (GEN_SYNC): New macro.
8752 (GEN_LWSYNC): New macro.
8753 (gen_x_form): New function.
8754 (GEN_OR): New macro.
8755 (GEN_MR): New macro.
8756 (GEN_LWARX): New macro.
8757 (GEN_STWCX): New macro.
8758 (GEN_CMPW): New macro.
8759 (gen_md_form): New function.
8760 (GEN_RLDICL): New macro.
8761 (GEN_RLDICR): New macro.
8762 (gen_i_form): New function.
8763 (GEN_B): New macro.
8764 (GEN_BL): New macro.
8765 (gen_b_form): New function.
8766 (GEN_BNE): New macro.
8767 (GEN_LOAD): New macro.
8768 (GEN_STORE): New macro.
8769 (gen_limm): New function.
8770 (gen_atomic_xchg): New function.
8771 (gen_call): New function.
8772 (ppc_relocate_instruction): New function.
8773 (ppc_install_fast_tracepoint_jump_pad): New function.
8774 (ppc_get_min_fast_tracepoint_insn_len): New function.
8775 (ppc_get_ipa_tdesc_idx): New function.
8776 (the_low_target): Wire in the new functions.
8777 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
8778 tdescs.
8779 * linux-ppc-tdesc.h: New file.
8780
8781 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8782
8783 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8784 (alloc_jump_pad_buffer): New function.
8785 * linux-amd64-ipa.c: Add <sys/mman.h> include.
8786 (alloc_jump_pad_buffer): New function.
8787 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
8788 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8789 (alloc_jump_pad_buffer): New function.
8790 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
8791 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
8792 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
8793 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
8794
8795 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8796
8797 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
8798 * linux-amd64-ipa.c: Likewise.
8799 * linux-i386-ipa.c: Likewise.
8800 * linux-s390-ipa.c: Likewise.
8801 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
8802 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
8803 set_trace_state_variable_value_ptr.
8804 (struct ipa_sym_addresses): Likewise.
8805 (symbol_list): Likewise.
8806 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
8807 accessing gdb_collect directly.
8808 (gdb_collect_ptr_type): New typedef.
8809 (get_raw_reg_ptr_type): New typedef.
8810 (get_trace_state_variable_value_ptr_type): New typedef.
8811 (set_trace_state_variable_value_ptr_type): New typedef.
8812 (gdb_collect_ptr): New global.
8813 (get_raw_reg_ptr): New global.
8814 (get_trace_state_variable_value_ptr): New global.
8815 (set_trace_state_variable_value_ptr): New global.
8816 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
8817 accessing get_raw_reg directly.
8818 (get_get_tsv_func_addr): Likewise for
8819 get_trace_state_variable_value_ptr.
8820 (get_set_tsv_func_addr): Likewise for
8821 set_trace_state_variable_value_ptr.
8822 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
8823
8824 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
8825
8826 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
8827
8828 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8829
8830 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
8831 packets.
8832 (relocate_instruction): Remove own_buf.
8833 * server.c (own_buf): Make global.
8834 (handle_v_requests): Make global.
8835 * server.h (own_buf): New declaration.
8836 (handle_v_requests): New prototype.
8837
8838 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8839
8840 PR 18377
8841 * linux-s390-low.c (add_insns): New function.
8842 (s390_emit_prologue): New function.
8843 (s390_emit_epilogue): New function.
8844 (s390_emit_add): New function.
8845 (s390_emit_sub): New function.
8846 (s390_emit_mul): New function.
8847 (s390_emit_lsh): New function.
8848 (s390_emit_rsh_signed): New function.
8849 (s390_emit_rsh_unsigned): New function.
8850 (s390_emit_ext): New function.
8851 (s390_emit_log_not): New function.
8852 (s390_emit_bit_and): New function.
8853 (s390_emit_bit_or): New function.
8854 (s390_emit_bit_xor): New function.
8855 (s390_emit_bit_not): New function.
8856 (s390_emit_equal): New function.
8857 (s390_emit_less_signed): New function.
8858 (s390_emit_less_unsigned): New function.
8859 (s390_emit_ref): New function.
8860 (s390_emit_if_goto): New function.
8861 (s390_emit_goto): New function.
8862 (s390_write_goto_address): New function.
8863 (s390_emit_litpool): New function.
8864 (s390_emit_const): New function.
8865 (s390_emit_call): New function.
8866 (s390_emit_reg): New function.
8867 (s390_emit_pop): New function.
8868 (s390_emit_stack_flush): New function.
8869 (s390_emit_zero_ext): New function.
8870 (s390_emit_swap): New function.
8871 (s390_emit_stack_adjust): New function.
8872 (s390_emit_set_r2): New function.
8873 (s390_emit_int_call_1): New function.
8874 (s390_emit_void_call_2): New function.
8875 (s390_emit_eq_goto): New function.
8876 (s390_emit_ne_goto): New function.
8877 (s390_emit_lt_goto): New function.
8878 (s390_emit_le_goto): New function.
8879 (s390_emit_gt_goto): New function.
8880 (s390_emit_ge_goto): New function.
8881 (s390x_emit_prologue): New function.
8882 (s390x_emit_epilogue): New function.
8883 (s390x_emit_add): New function.
8884 (s390x_emit_sub): New function.
8885 (s390x_emit_mul): New function.
8886 (s390x_emit_lsh): New function.
8887 (s390x_emit_rsh_signed): New function.
8888 (s390x_emit_rsh_unsigned): New function.
8889 (s390x_emit_ext): New function.
8890 (s390x_emit_log_not): New function.
8891 (s390x_emit_bit_and): New function.
8892 (s390x_emit_bit_or): New function.
8893 (s390x_emit_bit_xor): New function.
8894 (s390x_emit_bit_not): New function.
8895 (s390x_emit_equal): New function.
8896 (s390x_emit_less_signed): New function.
8897 (s390x_emit_less_unsigned): New function.
8898 (s390x_emit_ref): New function.
8899 (s390x_emit_if_goto): New function.
8900 (s390x_emit_const): New function.
8901 (s390x_emit_call): New function.
8902 (s390x_emit_reg): New function.
8903 (s390x_emit_pop): New function.
8904 (s390x_emit_stack_flush): New function.
8905 (s390x_emit_zero_ext): New function.
8906 (s390x_emit_swap): New function.
8907 (s390x_emit_stack_adjust): New function.
8908 (s390x_emit_int_call_1): New function.
8909 (s390x_emit_void_call_2): New function.
8910 (s390x_emit_eq_goto): New function.
8911 (s390x_emit_ne_goto): New function.
8912 (s390x_emit_lt_goto): New function.
8913 (s390x_emit_le_goto): New function.
8914 (s390x_emit_gt_goto): New function.
8915 (s390x_emit_ge_goto): New function.
8916 (s390_emit_ops): New function.
8917 (struct linux_target_ops): Fill in emit_ops hook.
8918
8919 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8920
8921 PR 18377
8922 * Makefile.in: Add s390 IPA files.
8923 * configure.srv: Build IPA for s390.
8924 * linux-s390-ipa.c: New file.
8925 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
8926 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
8927 (tdesc_s390_linux32): Likewise.
8928 (init_registers_s390_linux32v1): Likewise.
8929 (tdesc_s390_linux32v1): Likewise.
8930 (init_registers_s390_linux32v2): Likewise.
8931 (tdesc_s390_linux32v2): Likewise.
8932 (init_registers_s390_linux64): Likewise.
8933 (tdesc_s390_linux64): Likewise.
8934 (init_registers_s390_linux64v1): Likewise.
8935 (tdesc_s390_linux64v1): Likewise.
8936 (init_registers_s390_linux64v2): Likewise.
8937 (tdesc_s390_linux64v2): Likewise.
8938 (init_registers_s390_te_linux64): Likewise.
8939 (tdesc_s390_te_linux64): Likewise.
8940 (init_registers_s390_vx_linux64): Likewise.
8941 (tdesc_s390_vx_linux64): Likewise.
8942 (init_registers_s390_tevx_linux64): Likewise.
8943 (tdesc_s390_tevx_linux64): Likewise.
8944 (init_registers_s390x_linux64): Likewise.
8945 (tdesc_s390x_linux64): Likewise.
8946 (init_registers_s390x_linux64v1): Likewise.
8947 (tdesc_s390x_linux64v1): Likewise.
8948 (init_registers_s390x_linux64v2): Likewise.
8949 (tdesc_s390x_linux64v2): Likewise.
8950 (init_registers_s390x_te_linux64): Likewise.
8951 (tdesc_s390x_te_linux64): Likewise.
8952 (init_registers_s390x_vx_linux64): Likewise.
8953 (tdesc_s390x_vx_linux64): Likewise.
8954 (init_registers_s390x_tevx_linux64): Likewise.
8955 (tdesc_s390x_tevx_linux64): Likewise.
8956 (have_hwcap_s390_vx): New static variable.
8957 (s390_arch_setup): Fill have_hwcap_s390_vx.
8958 (s390_get_thread_area): New function.
8959 (s390_ft_entry_gpr_esa): New const.
8960 (s390_ft_entry_gpr_zarch): New const.
8961 (s390_ft_entry_misc): New const.
8962 (s390_ft_entry_fr): New const.
8963 (s390_ft_entry_vr): New const.
8964 (s390_ft_main_31): New const.
8965 (s390_ft_main_64): New const.
8966 (s390_ft_exit_fr): New const.
8967 (s390_ft_exit_vr): New const.
8968 (s390_ft_exit_misc): New const.
8969 (s390_ft_exit_gpr_esa): New const.
8970 (s390_ft_exit_gpr_zarch): New const.
8971 (append_insns): New function.
8972 (s390_relocate_instruction): New function.
8973 (s390_install_fast_tracepoint_jump_pad): New function.
8974 (s390_get_min_fast_tracepoint_insn_len): New function.
8975 (s390_get_ipa_tdesc_idx): New function.
8976 (struct linux_target_ops): Wire in the above functions.
8977 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
8978 * linux-s390-tdesc.h: New file.
8979
8980 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8981
8982 * linux-s390-low.c (s390_supports_tracepoints): New function.
8983 (struct linux_target_ops): Fill supports_tracepoints hook.
8984
8985 2016-03-18 Yao Qi <yao.qi@linaro.org>
8986
8987 * linux-low.c (lwp_signal_can_be_delivered): New function.
8988 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
8989
8990 2016-03-18 Yao Qi <yao.qi@linaro.org>
8991
8992 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
8993 0 if signal is enqueued. Remove 'signal' from one debugging
8994 message. Move one debugging message to some lines below.
8995 Remove code setting 'signal' to 0.
8996
8997 2016-03-18 Yao Qi <yao.qi@linaro.org>
8998
8999 * linux-low.c (linux_low_filter_event): Remove redundant
9000 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
9001
9002 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
9003
9004 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
9005 (struct linux_target_ops): Wire in the above.
9006
9007 2016-03-03 Yao Qi <yao.qi@linaro.org>
9008
9009 * linux-low.c: Update comments to start_step_over.
9010
9011 2016-03-03 Yao Qi <yao.qi@linaro.org>
9012
9013 PR server/19736
9014 * linux-low.c (handle_extended_wait): Set child suspended
9015 if event_lwp->bp_reinsert isn't zero.
9016
9017 2016-03-02 Yao Qi <yao.qi@linaro.org>
9018
9019 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
9020 enqueue_pending_signal.
9021
9022 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
9023
9024 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
9025 is actually loaded.
9026
9027 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
9028
9029 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
9030 (s390_regmap_3264) [!__s390x__]: New global.
9031 (s390_collect_ptrace_register): Skip map entries containing -1.
9032 (s390_supply_ptrace_register): Ditto.
9033 (s390_fill_gprs_high): New function.
9034 (s390_store_gprs_high): New function.
9035 (s390_regsets): Add NT_S390_HIGH_GPRS.
9036 (s390_get_hwcap): Enable on 31-bit.
9037 (have_hwcap_s390_high_gprs): Enable on 31-bit.
9038 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
9039 Detect NT_S390_HIGH_GPRS.
9040 (s390_usrregs_info_3264): Enable on 31-bit.
9041 (s390_regs_info): Enable regs_info_3264 on 31-bit.
9042 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
9043
9044 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
9045
9046 PR gdb/13808
9047 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
9048 * configure.srv: Ditto.
9049 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
9050 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
9051 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
9052 (init_registers_amd64_linux): Remove prototype.
9053 (tdesc_amd64_linux): Remove declaration.
9054 (get_ipa_tdesc): New function.
9055 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
9056 initialize remaining tdescs.
9057 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
9058 (init_registers_i386_linux): Remove prototype.
9059 (tdesc_i386_linux): Remove declaration.
9060 (get_ipa_tdesc): New function.
9061 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
9062 initialize remaining tdescs.
9063 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
9064 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
9065 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
9066 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
9067 (x86_get_ipa_tdesc_idx): New function.
9068 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
9069 * linux-x86-tdesc.h: New file.
9070 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
9071 (target_get_ipa_tdesc_idx): New macro.
9072 * tracepoint.c (ipa_tdesc_idx): New macro.
9073 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
9074 (symbol_list): Add ipa_tdesc_idx.
9075 (cmd_qtstart): Write ipa_tdesc_idx in the target.
9076 (ipa_tdesc): Remove.
9077 (ipa_tdesc_idx): New variable.
9078 (get_context_regcache): Use get_ipa_tdesc.
9079 (gdb_collect): Ditto.
9080 (gdb_probe): Ditto.
9081 * tracepoint.h (get_ipa_tdesc): New prototype.
9082 (ipa_tdesc): Remove.
9083
9084 2016-02-24 Pedro Alves <palves@redhat.com>
9085
9086 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
9087 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
9088 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
9089 Factor out common code between the USE_SIGTRAP_SIGINFO and
9090 !USE_SIGTRAP_SIGINFO blocks.
9091 (linux_low_filter_event): Call save_stop_reason instead of
9092 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
9093 Update comments.
9094 (linux_wait_1): Update comments.
9095
9096 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
9097
9098 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
9099 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
9100 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
9101 ppc_insert_point, ppc_remove_point.
9102
9103 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
9104
9105 * linux-s390-low.c (s390_supports_z_point_type): New function.
9106 (struct linux_target_ops): Wire s390_supports_z_point_type in.
9107
9108 2016-02-16 Yao Qi <yao.qi@linaro.org>
9109
9110 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
9111 PC. Get pc from regcache_read_pc.
9112
9113 2016-02-12 Yao Qi <yao.qi@linaro.org>
9114
9115 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
9116 or linux_get_pc_32bit.
9117 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
9118
9119 2016-02-12 Yao Qi <yao.qi@linaro.org>
9120
9121 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
9122 arm_linux_get_next_pcs_fixup.
9123
9124 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
9125
9126 * tracepoint.c (x_tracepoint_action_download): Change
9127 write_inferior_data_ptr to write_inferior_data_pointer.
9128 (cmd_qtstart): Likewise.
9129 (write_inferior_data_ptr): Remove.
9130 (download_agent_expr): Change write_inferior_data_ptr to
9131 write_inferior_data_pointer.
9132 (download_tracepoint_1): Likewise.
9133 (download_tracepoint): Likewise.
9134 (download_trace_state_variables): Likewise.
9135
9136 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
9137 Marcin Kościelnicki <koriakin@0x04.net>
9138
9139 * tracepoint.c (struct tracepoint_action_ops): Remove.
9140 (struct tracepoint_action): Remove ops.
9141 (m_tracepoint_action_download, r_tracepoint_action_download)
9142 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
9143 size and offset accordingly.
9144 (m_tracepoint_action_ops, r_tracepoint_action_ops)
9145 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
9146 (tracepoint_action_send, tracepoint_action_download): New functions.
9147 Helpers for trace action handlers.
9148 (add_tracepoint_action): Remove setup actions ops.
9149 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
9150
9151 2016-02-10 Yao Qi <yao.qi@linaro.org>
9152
9153 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
9154
9155 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
9156
9157 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
9158 to AC_OUTPUT.
9159 * configure: Regenerate.
9160
9161 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
9162
9163 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
9164 void * to gdb_byte *.
9165 * linux-low.c (siginfo_fixup): Likewise.
9166 (linux_xfer_siginfo): Likewise.
9167 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
9168 Likewise.
9169 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9170
9171 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
9172
9173 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
9174 to srv_tgtobj.
9175 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
9176 to srv_tgtobj.
9177 * linux-x86-low.c [__x86_64__]: Include
9178 "nat/amd64-linux-siginfo.h".
9179 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
9180 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
9181 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
9182 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
9183 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
9184 (cpt_si_fd, si_timerid, si_overrun): Move from
9185 nat/amd64-linux-siginfo.c.
9186 * Makefile.in (amd64-linux-siginfo.o:): New rule.
9187
9188 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
9189
9190 * server.c (skip_to_semicolon): Remove.
9191 (process_point_options): Use strchrnul instead of
9192 skip_to_semicolon.
9193
9194 2016-01-26 Yao Qi <yao.qi@linaro.org>
9195
9196 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
9197 * linux-low.c (install_software_single_step_breakpoints): Don't
9198 call regcache_read_pc.
9199 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
9200 argument pc.
9201
9202 2016-01-26 Yao Qi <yao.qi@linaro.org>
9203
9204 * linux-low.c (install_software_single_step_breakpoints): Call
9205 regcache_read_pc instead of get_pc.
9206
9207 2016-01-26 Yao Qi <yao.qi@linaro.org>
9208
9209 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
9210 (unblock_async_io): Rename to ...
9211 (block_unblock_async_io): ... it. New function.
9212 (enable_async_io): Don't install SIGIO handler. Unblock it
9213 instead.
9214 (disable_async_io): Don't ignore SIGIO. Block it instead.
9215 (initialize_async_io): Install SIGIO handler. Don't call
9216 unblock_async_io.
9217
9218 2016-01-26 Yao Qi <yao.qi@linaro.org>
9219
9220 * remote-utils.c (getpkt): If the buffer isn't empty, and the
9221 first character is '\003', call *the_target->request_interrupt.
9222
9223 2016-01-25 Yao Qi <yao.qi@linaro.org>
9224
9225 * remote-utils.c (new_thread_notify): Remove.
9226 (dead_thread_notify): Likewise.
9227 * remote-utils.h (new_thread_notify): Remove declaration.
9228 (dead_thread_notify): Likewise.
9229
9230 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
9231
9232 * gdb.trace/pending.exp: Fix expected message on continue.
9233
9234 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
9235
9236 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
9237 it works properly on big-endian machines where sizeof (CORE_ADDR)
9238 != sizeof (void *).
9239
9240 2016-01-21 Pedro Alves <palves@redhat.com>
9241
9242 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
9243 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
9244 * configure: Regenerate.
9245
9246 2016-01-21 Yao Qi <yao.qi@linaro.org>
9247
9248 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
9249 is_thumb and set it according to CPSR saved on the stack.
9250 (get_next_pcs_syscall_next_pc): Pass is_thumb to
9251 arm_sigreturn_next_pc.
9252
9253 2016-01-18 Yao Qi <yao.qi@linaro.org>
9254
9255 * linux-low.c (linux_set_pc_64bit): New function.
9256 (linux_get_pc_64bit): New function.
9257 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
9258 Declare.
9259 * linux-sparc-low.c (debug_threads): Remove declaration.
9260 (sparc_get_pc): Remove.
9261 (the_low_target): Use linux_get_pc_64bit instead of
9262 sparc_get_pc.
9263 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
9264 (the_low_target): Use linux_get_pc_64bit and
9265 linux_set_pc_64bit.
9266
9267 2016-01-18 Yao Qi <yao.qi@linaro.org>
9268
9269 * linux-arm-low.c (debug_threads): Remove declaration.
9270 (arm_get_pc, arm_set_pc): Remove.
9271 (the_low_target): Use linux_get_pc_32bit and
9272 linux_set_pc_32bit.
9273 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
9274 (the_low_target): Use linux_get_pc_32bit and
9275 linux_set_pc_32bit.
9276 * linux-cris-low.c (debug_threads): Remove declaration.
9277 (cris_get_pc, cris_set_pc,): Remove.
9278 (the_low_target): Use linux_get_pc_32bit and
9279 linux_set_pc_32bit.
9280 * linux-crisv32-low.c (debug_threads): Remove declaration.
9281 (cris_get_pc, cris_set_pc): Remove.
9282 (the_low_target): Use linux_get_pc_32bit and
9283 linux_set_pc_32bit.
9284 * linux-low.c: Include inttypes.h.
9285 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
9286 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
9287 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
9288 (the_low_target): Use linux_get_pc_32bit and
9289 linux_set_pc_32bit.
9290 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
9291 (the_low_target): Use linux_get_pc_32bit and
9292 linux_set_pc_32bit.
9293 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
9294 (the_low_target): Use linux_get_pc_32bit and
9295 linux_set_pc_32bit.
9296 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
9297 (the_low_target): Use linux_get_pc_32bit and
9298 linux_set_pc_32bit.
9299 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
9300 (the_low_target): Use linux_get_pc_32bit and
9301 linux_set_pc_32bit.
9302
9303 2016-01-18 Gary Benson <gbenson@redhat.com>
9304
9305 * configure.ac (AC_FUNC_FORK): New check.
9306 * config.in: Regenerate.
9307 * configure: Likewise.
9308
9309 2016-01-14 Yao Qi <yao.qi@linaro.org>
9310
9311 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
9312 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
9313 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
9314 arm_get_next_pcs_ctor.
9315
9316 2016-01-12 Josh Stone <jistone@redhat.com>
9317 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9318
9319 * inferiors.h: Include "gdb_vecs.h".
9320 (struct process_info): Add syscalls_to_catch.
9321 * inferiors.c (remove_process): Free syscalls_to_catch.
9322 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
9323 syscall_return stops.
9324 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
9325 * server.c (handle_general_set): Handle QCatchSyscalls.
9326 (handle_query): Report support for QCatchSyscalls.
9327 * target.h (struct target_ops): Add supports_catch_syscall.
9328 (target_supports_catch_syscall): New macro.
9329 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
9330 (struct lwp_info): Add syscall_state.
9331 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
9332 Maintain syscall_state and syscalls_to_catch across exec.
9333 (get_syscall_trapinfo): New function, proxy to the_low_target.
9334 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
9335 (linux_low_filter_event): Toggle syscall_state entry/return for
9336 syscall traps, and set it ignored for all others.
9337 (gdb_catching_syscalls_p): New function.
9338 (gdb_catch_this_syscall_p): New function.
9339 (linux_wait_1): Handle SYSCALL_SIGTRAP.
9340 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
9341 (linux_supports_catch_syscall): New function.
9342 (linux_target_ops): Install it.
9343 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
9344 (the_low_target): Install it.
9345
9346 2016-01-12 Mike Frysinger <vapier@gentoo.org>
9347
9348 * acinclude.m4: Include new ../warning.m4 file.
9349 * configure: Regenerated.
9350 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
9351
9352 2016-01-12 Mike Frysinger <vapier@gentoo.org>
9353
9354 * ax.c (is_goto_target): Mark static.
9355 * linux-low.c (register_addr): Likewise.
9356 (linux_fetch_registers, linux_store_registers): Likewise.
9357 * mem-break.c (any_persistent_commands): Fix old prototype.
9358 (add_commands_to_breakpoint): Mark static.
9359 * regcache.c (find_register_by_name): Delete unused func.
9360 * remote-utils.c (hex_or_minus_one): Mark static.
9361 * server.c (monitor_show_help): Mark static.
9362 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
9363 handle_v_requests): Likewise.
9364
9365 2016-01-12 Pedro Alves <palves@redhat.com>
9366
9367 Remove use of the registered trademark symbol throughout.
9368
9369 2016-01-08 Yao Qi <yao.qi@linaro.org>
9370
9371 * remote-utils.c (getpkt): If c is '\003', call target hook
9372 request_interrupt.
9373
9374 2016-01-06 Yao Qi <yao.qi@linaro.org>
9375
9376 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
9377 linux-aarch32-low.c.
9378 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9379 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
9380 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9381 (thumb2_breakpoint): Declare.
9382 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
9383 linux-aarch32-low.h.
9384 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9385 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
9386 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9387
9388 2016-01-01 Joel Brobecker <brobecker@adacore.com>
9389
9390 * gdbreplay.c (gdbreplay_version): Change copyright year in
9391 version message.
9392 * server.c (gdbserver_version): Likewise.
9393
9394 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
9395
9396 * server.c (crc32_table): Delete.
9397 (crc32): Use libiberty's xcrc32 function.
9398
9399 2015-12-22 Joel Brobecker <brobecker@adacore.com>
9400
9401 * lynx-low.c (lynx_delete_thread_callback): New function.
9402 (lynx_mourn): Properly delete our process and all of its
9403 threads. Remove call to clear_inferiors.
9404
9405 2015-12-22 Joel Brobecker <brobecker@adacore.com>
9406
9407 * target.c (thread_search_callback): Add check that
9408 the thread_stopped target callback is not NULL before
9409 calling it.
9410
9411 2015-12-21 Yao Qi <yao.qi@linaro.org>
9412
9413 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
9414 arm breakpoint.
9415
9416 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9417
9418 * server.c (handle_query): Call target_supports_software_single_step.
9419
9420 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9421
9422 * linux-low.c (single_step): New function.
9423 (linux_resume_one_lwp_throw): Call single_step.
9424 (start_step_over): Likewise.
9425
9426 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9427
9428 * Makefile.in (SFILES): Append arch/arm-linux.c,
9429 arch/arm-get-next-pcs.c.
9430 (arm-linux.o): New rule.
9431 (arm-get-next-pcs.o): New rule.
9432 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
9433 arm-linux.o.
9434 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
9435 to linux-aarch32-low.c.
9436 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9437 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9438 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9439 (thumb2_breakpoint_len): Likewise.
9440 (arm_is_thumb_mode): Make non-static.
9441 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
9442 from linux-aarch32-low.c.
9443 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9444 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9445 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9446 (thumb2_breakpoint_len): Likewise.
9447 (arm_is_thumb_mode): New declaration.
9448 * linux-arm-low.c: Include arch/arm-linux.h
9449 aarch/arm-get-next-pcs.h, sys/syscall.h.
9450 (get_next_pcs_ops): New struct.
9451 (get_next_pcs_addr_bits_remove): New function.
9452 (get_next_pcs_is_thumb): New function.
9453 (get_next_pcs_read_memory_unsigned_integer): Likewise.
9454 (arm_sigreturn_next_pc): Likewise.
9455 (get_next_pcs_syscall_next_pc): Likewise.
9456 (arm_gdbserver_get_next_pcs): Likewise.
9457 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
9458 Initialize.
9459 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
9460 * server.h: Include gdb_vecs.h.
9461
9462 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9463
9464 * Makefile.in (SFILES): Append common/common-regcache.c.
9465 (OBS): Append common-regcache.o.
9466 (common-regcache.o): New rule.
9467 * regcache.c (init_register_cache): Initialize cache to
9468 REG_UNAVAILABLE.
9469 (regcache_raw_read_unsigned): New function.
9470 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
9471 register_status enum.
9472
9473 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9474
9475 * linux-aarch64-low.c (the_low_targets): Rename
9476 breakpoint_reinsert_addr to get_next_pcs.
9477 * linux-arm-low.c (the_low_targets): Likewise.
9478 * linux-bfin-low.c (the_low_targets): Likewise.
9479 * linux-cris-low.c (the_low_targets): Likewise.
9480 * linux-crisv32-low.c (the_low_targets): Likewise.
9481 * linux-low.c (can_software_single_step): Likewise.
9482 (install_software_single_step_breakpoints): New function.
9483 (start_step_over): Use install_software_single_step_breakpoints.
9484 * linux-low.h: New CORE_ADDR vector.
9485 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
9486 get_next_pcs.
9487 * linux-mips-low.c (the_low_targets): Likewise.
9488 * linux-nios2-low.c (the_low_targets): Likewise.
9489 * linux-sparc-low.c (the_low_targets): Likewise.
9490
9491 2015-12-17 Pedro Alves <palves@redhat.com>
9492
9493 * linux-low.c (linux_kill_one_lwp): Remove references to
9494 LinuxThreads.
9495 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
9496 to 'kill'.
9497 (linux_init_signals): Delete.
9498 (initialize_low): Adjust.
9499 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
9500
9501 2015-12-16 Pedro Alves <palves@redhat.com>
9502
9503 * configure.ac (compiler warning flags): When testing a
9504 -Wno-foo option, check whether -Wfoo works instead.
9505 * configure: Regenerate.
9506
9507 2015-12-11 Don Breazeal <donb@codesourcery.com>
9508
9509 * server.c (process_serial_event): Don't exit from gdbserver
9510 in remote mode if there are still active inferiors.
9511
9512 2015-12-11 Yao Qi <yao.qi@linaro.org>
9513
9514 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
9515 arm_breakpoint_at if the process is 32-bit.
9516
9517 2015-12-11 Yao Qi <yao.qi@linaro.org>
9518
9519 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
9520 arm breakpoint.
9521
9522 2015-12-07 Yao Qi <yao.qi@linaro.org>
9523
9524 * configure.srv: Append arm.o to srv_tgtobj for
9525 aarch64*-*-linux* target.
9526 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
9527 from linux-arm-low.c.
9528 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9529 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9530 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9531 (thumb2_breakpoint_len): Likewise.
9532 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
9533 (arm_breakpoint_kinds): Likewise.
9534 (arm_breakpoint_kind_from_pc): Likewise.
9535 (arm_sw_breakpoint_from_kind): Likewise.
9536 (arm_breakpoint_kind_from_current_state): Likewise.
9537 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
9538 (arm_sw_breakpoint_from_kind): Declare.
9539 (arm_breakpoint_kind_from_current_state): Declare.
9540 (arm_breakpoint_at): Declare.
9541 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
9542 arm_sw_breakpoint_from_kind if process is 32-bit.
9543 (aarch64_breakpoint_kind_from_pc): New function.
9544 (aarch64_breakpoint_kind_from_current_state): New function.
9545 (the_low_target): Initialize fields breakpoint_kind_from_pc
9546 and breakpoint_kind_from_current_state.
9547 * linux-arm-low.c (arm_breakpoint_kinds): Move to
9548 linux-aarch32-low.c.
9549 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
9550 (arm_breakpoint, arm_breakpoint_len): Likewise.
9551 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
9552 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9553 (arm_is_thumb_mode): Likewise.
9554 (arm_breakpoint_at): Likewise.
9555 (arm_breakpoint_kind_from_pc): Likewise.
9556 (arm_sw_breakpoint_from_kind): Likewise.
9557 (arm_breakpoint_kind_from_current_state): Likewise.
9558
9559 Revert:
9560 2015-08-04 Yao Qi <yao.qi@linaro.org>
9561
9562 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
9563 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
9564 * server.c (extended_protocol): Remove "static".
9565 * server.h (extended_protocol): Declare it.
9566
9567 2015-12-04 Josh Stone <jistone@redhat.com>
9568
9569 * target.h (struct target_ops) <arch_setup>: Rename to ...
9570 (struct target_ops) <post_create_inferior>: ... this.
9571 (target_arch_setup): Rename to ...
9572 (target_post_create_inferior): ... this, calling post_create_inferior.
9573 * server.c (start_inferior): Update target_arch_setup calls to
9574 target_post_create_inferior.
9575 * linux-low.c (linux_low_ptrace_options): Forward declare.
9576 (linux_arch_setup): Update its comment for general use.
9577 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
9578 (struct linux_target_ops): Use linux_post_create_inferior.
9579 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
9580 to post_create_inferior.
9581 * nto-low.c (struct nto_target_ops): Likewise.
9582 * spu-low.c (struct spu_target_ops): Likewise.
9583 * win32-low.c (struct win32_target_ops): Likewise.
9584
9585 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
9586
9587 * linux-arm-low.c: Remove duplicate arch/arm.h include.
9588
9589 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9590
9591 * linux-arm-low.c (arm_reinsert_addr): Remove function.
9592 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
9593 * linux-cris-low.c (cris_reinsert_addr> Remove function.
9594 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9595 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
9596 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9597 * linux-mips-low.c (mips_reinsert_addr): Remove function.
9598 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9599 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
9600 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9601 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
9602 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9603
9604 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9605
9606 * linux-low.c (linux_look_up_symbols): Don't call
9607 linux_supports_traceclone.
9608 * linux-low.h (thread_db_init): Remove use_events argument.
9609 * thread-db.c (thread_db_use_event): Remove global variable.
9610 (struct thread_db) <td_thr_event_enable_p>: Remove field.
9611 (struct thread_db) <td_create_bp>: Remove field.
9612 (thread_db_create_event): Remove function.
9613 (thread_db_enable_reporting): Likewise.
9614 (find_one_thread): Don't check for thread_db_use_events.
9615 (attach_thread): Likewise.
9616 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
9617 (try_thread_db_load_1): Don't check for thread_db_use_events.
9618 (thread_db_init): Remove use_events argument and thread events
9619 handling.
9620 (remove_thread_event_breakpoints): Remove function.
9621 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
9622
9623 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9624
9625 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
9626 New function.
9627 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9628 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
9629 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9630 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
9631 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
9632 Initialize.
9633 * linux-crisv32-low.c (cris_supports_hardware_single_step):
9634 New function.
9635 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9636 * linux-low.c (can_hardware_single_step): Use
9637 supports_hardware_single_step.
9638 (can_software_single_step): New function.
9639 (start_step_over): Call can_software_single_step.
9640 (linux_supports_hardware_single_step): New function.
9641 (struct target_ops) <supports_software_single_step>: Initialize.
9642 * linux-low.h (struct linux_target_ops)
9643 <supports_hardware_single_step>: Initialize.
9644 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
9645 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9646 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
9647 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
9648 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
9649 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9650 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
9651 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9652 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
9653 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
9654 Initialize.
9655 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
9656 (struct linux_target_ops) <tile_supports_hardware_single_step>:
9657 Initialize.
9658 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
9659 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9660 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
9661 New function.
9662 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9663 * target.h (struct target_ops): <supports_software_single_step>:
9664 New field.
9665 (target_supports_software_single_step): New macro.
9666
9667 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9668
9669 * linux-low.c (linux_wait_1): Fix pc advance condition.
9670 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
9671 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
9672
9673 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9674
9675 * linux-arm-low.c (arm_is_thumb_mode): New function.
9676 (arm_breakpoint_at): Use arm_is_thumb_mode.
9677 (arm_breakpoint_kind_from_current_state): New function.
9678 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
9679 Initialize.
9680 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
9681 (linux_breakpoint_kind_from_current_state): New function.
9682 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
9683 * linux-low.h (struct linux_target_ops)
9684 <breakpoint_kind_from_current_state>: New field.
9685 * target.h (struct target_ops): Likewise.
9686 (target_breakpoint_kind_from_current_state): New macro.
9687
9688 2015-11-30 Pedro Alves <palves@redhat.com>
9689
9690 * linux-low.c (linux_resume): Wake up the event loop before
9691 returning.
9692
9693 2015-11-30 Pedro Alves <palves@redhat.com>
9694
9695 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
9696 check.
9697 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
9698 to -1.
9699 * target.c (struct thread_search): New structure.
9700 (thread_search_callback): New function.
9701 (prev_general_thread): New global.
9702 (prepare_to_access_memory, done_accessing_memory): New functions.
9703 * target.h (prepare_to_access_memory, done_accessing_memory):
9704 Replace macros with function declarations.
9705
9706 2015-11-30 Pedro Alves <palves@redhat.com>
9707
9708 PR 14618
9709 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
9710 report TARGET_WAITKIND_NO_RESUMED.
9711 * remote-utils.c (prepare_resume_reply): Handle
9712 TARGET_WAITKIND_NO_RESUMED.
9713 * server.c (report_no_resumed): New global.
9714 (handle_query) <qSupported>: Handle "no-resumed+". Report
9715 "no-resumed+" support.
9716 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
9717 return error if the client doesn't support no-resumed events.
9718 (push_stop_notification): New function.
9719 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
9720 events if the client supports them.
9721
9722 2015-11-30 Pedro Alves <palves@redhat.com>
9723
9724 * linux-low.c (thread_still_has_status_pending_p): Don't check
9725 vCont;t here.
9726 (lwp_resumed): New function.
9727 (status_pending_p_callback): Return early if the LWP is not
9728 supposed to be resumed.
9729
9730 2015-11-30 Pedro Alves <palves@redhat.com>
9731
9732 * linux-low.c (handle_extended_wait): Assert that the LWP's
9733 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
9734 thread create events, leave the new child's status pending.
9735 (linux_low_filter_event): If GDB wants to hear about thread exit
9736 events, leave the LWP marked dead and don't delete it.
9737 (linux_wait_for_event_filtered): Don't check for thread exit.
9738 (filter_exit_event): New function.
9739 (linux_wait_1): Use it, when returning an exit event.
9740 (linux_resume_one_lwp_throw): Assert that the LWP's
9741 waitstatus is TARGET_WAITKIND_IGNORE.
9742 * remote-utils.c (prepare_resume_reply): Handle
9743 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
9744 * server.c (report_thread_events): New global.
9745 (handle_general_set): Handle QThreadEvents.
9746 (handle_query) <qSupported>: Handle and report QThreadEvents+;
9747 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
9748 TARGET_WAITKIND_THREAD_EXITED.
9749 * server.h (report_thread_events): Declare.
9750
9751 2015-11-30 Pedro Alves <palves@redhat.com>
9752
9753 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
9754 the thread's last_resume_kind was resume_stop.
9755
9756 2015-11-30 Pedro Alves <palves@redhat.com>
9757
9758 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
9759 before returning.
9760
9761 2015-11-30 Pedro Alves <palves@redhat.com>
9762
9763 * server.c (handle_v_requests): Handle vCtrlC.
9764
9765 2015-11-30 Pedro Alves <palves@redhat.com>
9766
9767 * gdbthread.h (find_any_thread_of_pid): Declare.
9768 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
9769 functions.
9770 * server.c (handle_query): If current_thread is NULL, look for
9771 another thread of the selected process.
9772
9773 2015-11-26 Daniel Colascione <dancol@dancol.org>
9774 Simon Marchi <simon.marchi@ericsson.com>
9775
9776 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
9777 * server.c (handle_qxfer_threads_worker): Refactor to include thread
9778 name in reply.
9779 * target.h (struct target_ops) <thread_name>: New field.
9780 (target_thread_name): New macro.
9781
9782 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9783
9784 * regcache.h (regcache_invalidate_pid): Add declaration.
9785 * regcache.c (regcache_invalidate_pid): New function, extracted
9786 from regcache_invalidate.
9787 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
9788 Add trivial documentation comment.
9789 * lynx-low.c: Use regcache_invalidate_pid instead of
9790 regcache_invalidate.
9791
9792 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9793
9794 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
9795 and Elf64_auxv_t if the target is Android.
9796
9797 2015-11-22 Doug Evans <xdje42@gmail.com>
9798
9799 * target.h: #include <sys/types.h>.
9800
9801 2015-11-19 Pedro Alves <palves@redhat.com>
9802
9803 * linux-low.c (linux_process_qsupported): Change prototype.
9804 Adjust.
9805 * linux-low.h (struct linux_target_ops) <process_qsupported>:
9806 Change prototype.
9807 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
9808 and adjust to loop over all features.
9809 * server.c (handle_query) <qSupported>: Adjust to call
9810 target_process_qsupported once, passing it a vector of unprocessed
9811 features.
9812 * target.h (struct target_ops) <process_qsupported>: Change
9813 prototype.
9814 (target_process_qsupported): Adjust.
9815
9816 2015-11-19 Pedro Alves <palves@redhat.com>
9817
9818 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
9819 mode.
9820 * configure: Regenerate.
9821
9822 2015-11-19 Pedro Alves <palves@redhat.com>
9823
9824 * configure: Regenerate.
9825
9826 2015-11-19 Yao Qi <yao.qi@linaro.org>
9827
9828 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
9829 type to uint32_t.
9830
9831 2015-11-19 Yao Qi <yao.qi@linaro.org>
9832
9833 * linux-aarch64-low.c (enum aarch64_operand_type): New.
9834 (struct aarch64_operand): Move enum out.
9835
9836 2015-11-19 Yao Qi <yao.qi@linaro.org>
9837
9838 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
9839 struct user_fpsimd_state *.
9840 (aarch64_store_fpregset): Likewise.
9841
9842 2015-11-19 Yao Qi <yao.qi@linaro.org>
9843
9844 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
9845 struct user_pt_regs *.
9846 (aarch64_store_gregset): Likewise.
9847
9848 2015-11-18 Pedro Alves <palves@redhat.com>
9849
9850 * Makefile.in (all_object_files): Add $IPA_OBJS.
9851
9852 2015-11-17 Pedro Alves <palves@redhat.com>
9853
9854 * win32-low.c (win32_resume): Use gdb_signal_from_host,
9855 GDB_SIGNAL_0 and gdb_signal_to_string.
9856
9857 2015-11-17 Pedro Alves <palves@redhat.com>
9858
9859 * win32-low.c (handle_output_debug_string): Remove parameter.
9860 (win32_kill): Remove our_status local and adjust call to
9861 handle_output_debug_string.
9862 (get_child_debug_event): Adjust call to
9863 handle_output_debug_string.
9864
9865 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9866
9867 * linux-mips-low.c (mips_fill_gregset): Add cast.
9868 (mips_store_gregset): Likewise.
9869 (mips_fill_fpregset): Likewise.
9870 (mips_store_fpregset): Likewise.
9871
9872 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9873
9874 * linux-mips-low.c (mips_add_watchpoint): Rename private to
9875 priv.
9876
9877 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9878
9879 * linux-mips-low.c (mips_linux_new_thread): Change type of
9880 watch_type to enum target_hw_bp_type.
9881
9882 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9883
9884 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
9885 Change return type to arm_hwbp_type.
9886
9887 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9888
9889 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
9890 (arm_store_gregset): Likewise.
9891 * linux-arm-low.c (arm_get_hwcap): Likewise.
9892 (arm_read_description): Likewise.
9893
9894 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9895
9896 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
9897
9898 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9899
9900 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
9901 (ppc_fill_vsxregset): Likewise.
9902 (ppc_store_vsxregset): Likewise.
9903 (ppc_fill_vrregset): Likewise.
9904 (ppc_store_vrregset): Likewise.
9905 (ppc_fill_evrregset): Likewise.
9906 (ppc_store_evrregset): Likewise.
9907
9908 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9909
9910 * linux-ppc-low.c (ppc_usrregs_info): Remove
9911 forward-declaration.
9912 (ppc_arch_setup): Move lower in file.
9913
9914 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
9915
9916 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
9917 (ps_pdwrite): Likewise.
9918
9919 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
9920
9921 * linux-arm-low.c (arm_new_thread): Move pointer dereference
9922 to after assert checks.
9923
9924 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
9925
9926 * proc-service.c (ps_pdread): Add/adjust casts.
9927 (ps_pdwrite): Add/adjust casts.
9928
9929 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9930
9931 * server.c (handle_search_memory_1): Cast return value of
9932 memmem.
9933
9934 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9935
9936 * server.c (write_qxfer_response): Change type of data to
9937 gdb_byte *.
9938
9939 2015-10-29 Pedro Alves <palves@redhat.com>
9940
9941 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
9942
9943 2015-10-29 Pedro Alves <palves@redhat.com>
9944
9945 * tracepoint.c (clear_installed_tracepoints): Add casts.
9946
9947 2015-10-29 Pedro Alves <palves@redhat.com>
9948
9949 * server.c (handle_v_cont, process_serial_event): Add enum
9950 gdb_signal casts to signal parsing code.
9951
9952 2015-10-29 Pedro Alves <palves@redhat.com>
9953
9954 * linux-low.h (NULL_REGSET): Define.
9955 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9956 * linux-arm-low.c (arm_regsets): Likewise.
9957 * linux-crisv32-low.c (cris_regsets): Likewise.
9958 * linux-m68k-low.c (m68k_regsets): Likewise.
9959 * linux-mips-low.c (mips_regsets): Likewise.
9960 * linux-nios2-low.c (nios2_regsets): Likewise.
9961 * linux-ppc-low.c (ppc_regsets): Likewise.
9962 * linux-s390-low.c (s390_regsets): Likewise.
9963 * linux-sh-low.c (sh_regsets): Likewise.
9964 * linux-sparc-low.c (sparc_regsets): Likewise.
9965 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9966 * linux-tile-low.c (tile_regsets): Likewise.
9967 * linux-x86-low.c (x86_regsets): Likewise.
9968 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9969
9970 2015-10-29 Pedro Alves <palves@redhat.com>
9971
9972 * linux-low.h (NULL_REGSET): Define.
9973 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9974 * linux-arm-low.c (arm_regsets): Likewise.
9975 * linux-crisv32-low.c (cris_regsets): Likewise.
9976 * linux-m68k-low.c (m68k_regsets): Likewise.
9977 * linux-mips-low.c (mips_regsets): Likewise.
9978 * linux-nios2-low.c (nios2_regsets): Likewise.
9979 * linux-ppc-low.c (ppc_regsets): Likewise.
9980 * linux-s390-low.c (s390_regsets): Likewise.
9981 * linux-sh-low.c (sh_regsets): Likewise.
9982 * linux-sparc-low.c (sparc_regsets): Likewise.
9983 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9984 * linux-tile-low.c (tile_regsets): Likewise.
9985 * linux-x86-low.c (x86_regsets): Likewise.
9986 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9987
9988 2015-10-26 Doug Evans <dje@google.com>
9989
9990 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
9991
9992 2015-10-26 Doug Evans <dje@google.com>
9993
9994 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
9995
9996 2015-10-26 Doug Evans <dje@google.com>
9997
9998 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
9999 for debug_printf.
10000 (attach_thread, find_new_threads_callback): Ditto.
10001
10002 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
10003
10004 * mem-break.h (set_breakpoint_data): Remove.
10005
10006 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
10007
10008 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
10009 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
10010 (initialize_low): Remove set_breakpoint_data call.
10011 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
10012 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
10013 (initialize_low): Remove set_breakpoint_data call.
10014 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
10015 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
10016 (initialize_low): Remove set_breakpoint_data call.
10017
10018 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
10019
10020 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
10021 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
10022 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
10023 * target.h (target_breakpoint_kind_from_pc): New macro.
10024
10025 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
10026
10027 * linux-low.c (default_breakpoint_kind_from_pc): New function.
10028 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
10029 the default breakpoint kind.
10030
10031 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10032
10033 * linux-arm-low.c (arm_supports_z_point_type): Add software
10034 breakpoint support.
10035
10036 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10037
10038 * linux-arm-low.c: Refactor breakpoint definitions.
10039 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
10040 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
10041
10042 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10043
10044 * Makefile.in: Add arm.c/o.
10045 * configure.srv: Likewise.
10046 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
10047 (arm_breakpoint_kind_from_pc): New function.
10048 (arm_sw_breakpoint_from_kind): Return proper kind.
10049 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
10050
10051 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10052
10053 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
10054 removal.
10055 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
10056 (struct raw_breakpoint) <size>: Remove.
10057 (struct raw_breakpoint) <kind>: Add.
10058 (bp_size): New function.
10059 (bp_opcode): Likewise.
10060 (find_raw_breakpoint_at): Adjust for kind.
10061 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
10062 (remove_memory_breakpoint): Adjust for kind call bp_size.
10063 (set_raw_breakpoint_at): Adjust for kind.
10064 (set_breakpoint): Likewise.
10065 (set_breakpoint_at): Call breakpoint_kind_from_pc.
10066 (delete_raw_breakpoint): Adjust for kind.
10067 (delete_breakpoint): Likewise.
10068 (find_gdb_breakpoint): Likewise.
10069 (set_gdb_breakpoint_1): Likewise.
10070 (set_gdb_breakpoint): Likewise.
10071 (delete_gdb_breakpoint_1): Likewise.
10072 (delete_gdb_breakpoint): Likewise.
10073 (uninsert_raw_breakpoint): Likewise.
10074 (reinsert_raw_breakpoint): Likewise.
10075 (set_breakpoint_data): Remove.
10076 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
10077 (check_mem_read): Adjust for kind call bp_size.
10078 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
10079 (clone_one_breakpoint): Adjust for kind.
10080 * mem-break.h (set_gdb_breakpoint): Likewise.
10081 (delete_gdb_breakpoint): Likewise.
10082 * server.c (process_serial_event): Likewise.
10083
10084 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10085
10086 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
10087 (struct linux_target_ops) <breakpoint>: Remove.
10088 (struct linux_target_ops) <breakpoint_len>: Remove.
10089 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10090 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10091 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
10092 (arm_sw_breakpoint_from_kind): New function.
10093 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
10094 (struct linux_target_ops) <breakpoint>: Remove.
10095 (struct linux_target_ops) <breakpoint_len>: Remove.
10096 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10097 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10098 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
10099 (struct linux_target_ops) <breakpoint>: Remove.
10100 (struct linux_target_ops) <breakpoint_len>: Remove.
10101 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10102 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10103 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
10104 (struct linux_target_ops) <breakpoint>: Remove.
10105 (struct linux_target_ops) <breakpoint_len>: Remove.
10106 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10107 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10108 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
10109 and sw_breakpoint_from_kind to increment the pc.
10110 (linux_breakpoint_kind_from_pc): New function.
10111 (linux_sw_breakpoint_from_kind): New function.
10112 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
10113 (initialize_low): Call breakpoint_kind_from_pc and
10114 sw_breakpoint_from_kind to replace breakpoint_data/len.
10115 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
10116 New field.
10117 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
10118 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
10119 (struct linux_target_ops) <breakpoint>: Remove.
10120 (struct linux_target_ops) <breakpoint_len>: Remove.
10121 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10122 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10123 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
10124 (struct linux_target_ops) <breakpoint>: Remove.
10125 (struct linux_target_ops) <breakpoint_len>: Remove.
10126 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10127 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10128 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
10129 (struct linux_target_ops) <breakpoint>: Remove.
10130 (struct linux_target_ops) <breakpoint_len>: Remove.
10131 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10132 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10133 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
10134 (struct linux_target_ops) <breakpoint>: Remove.
10135 (struct linux_target_ops) <breakpoint_len>: Remove.
10136 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10137 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10138 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
10139 (struct linux_target_ops) <breakpoint>: Remove.
10140 (struct linux_target_ops) <breakpoint_len>: Remove.
10141 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10142 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10143 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
10144 (struct linux_target_ops) <breakpoint>: Remove.
10145 (struct linux_target_ops) <breakpoint_len>: Remove.
10146 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10147 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10148 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
10149 (struct linux_target_ops) <breakpoint>: Remove.
10150 (struct linux_target_ops) <breakpoint_len>: Remove.
10151 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10152 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10153 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
10154 (struct linux_target_ops) <breakpoint>: Remove.
10155 (struct linux_target_ops) <breakpoint_len>: Remove.
10156 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10157 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10158 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
10159 (struct linux_target_ops) <breakpoint>: Remove.
10160 (struct linux_target_ops) <breakpoint_len>: Remove.
10161 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10162 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10163 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
10164 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
10165 (struct linux_target_ops) <breakpoint>: Remove.
10166 (struct linux_target_ops) <breakpoint_len>: Remove.
10167 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10168 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10169 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
10170 (struct linux_target_ops) <breakpoint>: Remove.
10171 (struct linux_target_ops) <breakpoint_len>: Remove.
10172 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10173 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10174
10175 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10176
10177 * linux-cris-low.c (cris_get_pc): Remove void arg.
10178
10179 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
10180
10181 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
10182 variable name.
10183
10184 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
10185
10186 * inferiors.c (thread_pid_matches_callback): New function.
10187 (find_thread_process): New function.
10188 (remove_thread): Reset current_thread.
10189 (remove_process): Assert threads have been removed first.
10190
10191 2015-10-15 Yao Qi <yao.qi@linaro.org>
10192
10193 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
10194 if it is 3.
10195 (aarch64_remove_point): Likewise.
10196 * regcache.c (regcache_register_size): New function.
10197
10198 2015-10-12 Yao Qi <yao.qi@linaro.org>
10199
10200 * linux-aarch64-low.c: Update all callers as emit_load_store
10201 is renamed to aarch64_emit_load_store.
10202
10203 2015-10-12 Yao Qi <yao.qi@linaro.org>
10204
10205 * linux-aarch64-low.c: Update all callers of function renaming
10206 from emit_insn to aarch64_emit_insn.
10207
10208 2015-10-12 Yao Qi <yao.qi@linaro.org>
10209
10210 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
10211 arch/aarch64-insn.h.
10212 (struct aarch64_memory_operand): Likewise.
10213 (ENCODE): Likewise.
10214 (emit_insn): Move to arch/aarch64-insn.c.
10215 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
10216 (emit_load_store): Move to arch/aarch64-insn.c.
10217 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
10218 (can_encode_int32): Remove.
10219
10220 2015-10-12 Yao Qi <yao.qi@linaro.org>
10221
10222 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
10223 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
10224 (aarch64_relocate_instruction): Likewise.
10225 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
10226 (struct aarch64_insn_visitor): Likewise.
10227
10228 2015-10-12 Yao Qi <yao.qi@linaro.org>
10229
10230 * linux-aarch64-low.c (struct aarch64_insn_data): New.
10231 (struct aarch64_insn_visitor): New.
10232 (struct aarch64_insn_relocation_data): New.
10233 (aarch64_ftrace_insn_reloc_b): New function.
10234 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
10235 (aarch64_ftrace_insn_reloc_cb): Likewise.
10236 (aarch64_ftrace_insn_reloc_tb): Likewise.
10237 (aarch64_ftrace_insn_reloc_adr): Likewise.
10238 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
10239 (aarch64_ftrace_insn_reloc_others): Likewise.
10240 (visitor): New.
10241 (aarch64_relocate_instruction): Use visitor.
10242
10243 2015-10-12 Yao Qi <yao.qi@linaro.org>
10244
10245 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
10246 int. Add argument buf.
10247 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
10248 aarch64_relocate_instruction.
10249
10250 2015-10-12 Yao Qi <yao.qi@linaro.org>
10251
10252 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
10253 argument insn. Remove local variable insn. Don't call
10254 target_read_uint32.
10255 (aarch64_install_fast_tracepoint_jump_pad): Call
10256 target_read_uint32.
10257
10258 2015-09-30 Yao Qi <yao.qi@linaro.org>
10259
10260 * linux-aarch64-low.c (emit_movk): Shorten a long line.
10261 (emit_load_store_pair): Likewise.
10262
10263 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
10264
10265 * dll.c (match_dll): Add cast(s).
10266 (unloaded_dll): Likewise.
10267 * linux-low.c (second_thread_of_pid_p): Likewise.
10268 (delete_lwp_callback): Likewise.
10269 (count_events_callback): Likewise.
10270 (select_event_lwp_callback): Likewise.
10271 (linux_set_resume_request): Likewise.
10272 * server.c (accumulate_file_name_length): Likewise.
10273 (emit_dll_description): Likewise.
10274 (handle_qxfer_threads_worker): Likewise.
10275 (visit_actioned_threads): Likewise.
10276 * thread-db.c (any_thread_of): Likewise.
10277 * tracepoint.c (same_process_p): Likewise.
10278 (match_blocktype): Likewise.
10279 (build_traceframe_info_xml): Likewise.
10280
10281 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
10282
10283 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
10284 assignment.
10285 (gdb_unparse_agent_expr): Likewise.
10286 * hostio.c (require_data): Likewise.
10287 (handle_pread): Likewise.
10288 * linux-low.c (disable_regset): Likewise.
10289 (fetch_register): Likewise.
10290 (store_register): Likewise.
10291 (get_dynamic): Likewise.
10292 (linux_qxfer_libraries_svr4): Likewise.
10293 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
10294 (set_fast_tracepoint_jump): Likewise.
10295 (uninsert_fast_tracepoint_jumps_at): Likewise.
10296 (reinsert_fast_tracepoint_jumps_at): Likewise.
10297 (validate_inserted_breakpoint): Likewise.
10298 (clone_agent_expr): Likewise.
10299 * regcache.c (init_register_cache): Likewise.
10300 * remote-utils.c (putpkt_binary_1): Likewise.
10301 (decode_M_packet): Likewise.
10302 (decode_X_packet): Likewise.
10303 (look_up_one_symbol): Likewise.
10304 (relocate_instruction): Likewise.
10305 (monitor_output): Likewise.
10306 * server.c (handle_search_memory): Likewise.
10307 (handle_qxfer_exec_file): Likewise.
10308 (handle_qxfer_libraries): Likewise.
10309 (handle_qxfer): Likewise.
10310 (handle_query): Likewise.
10311 (handle_v_cont): Likewise.
10312 (handle_v_run): Likewise.
10313 (captured_main): Likewise.
10314 * target.c (write_inferior_memory): Likewise.
10315 * thread-db.c (try_thread_db_load_from_dir): Likewise.
10316 * tracepoint.c (init_trace_buffer): Likewise.
10317 (add_tracepoint_action): Likewise.
10318 (add_traceframe): Likewise.
10319 (add_traceframe_block): Likewise.
10320 (cmd_qtdpsrc): Likewise.
10321 (cmd_qtdv): Likewise.
10322 (cmd_qtstatus): Likewise.
10323 (response_source): Likewise.
10324 (response_tsv): Likewise.
10325 (cmd_qtnotes): Likewise.
10326 (gdb_collect): Likewise.
10327 (initialize_tracepoint): Likewise.
10328
10329 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10330
10331 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
10332 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
10333 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
10334 <NOP>: New.
10335 (enum aarch64_condition_codes): New enum.
10336 (w0): New static global.
10337 (fp): Likewise.
10338 (lr): Likewise.
10339 (struct aarch64_memory_operand) <type>: New
10340 MEMORY_OPERAND_POSTINDEX type.
10341 (postindex_memory_operand): New helper function.
10342 (emit_ret): New function.
10343 (emit_load_store_pair): New function, factored out of emit_stp
10344 with support for MEMORY_OPERAND_POSTINDEX.
10345 (emit_stp): Rewrite using emit_load_store_pair.
10346 (emit_ldp): New function.
10347 (emit_load_store): Likewise.
10348 (emit_ldr): Mention post-index instruction in comment.
10349 (emit_ldrh): New function.
10350 (emit_ldrb): New function.
10351 (emit_ldrsw): Mention post-index instruction in comment.
10352 (emit_str): Likewise.
10353 (emit_subs): New function.
10354 (emit_cmp): Likewise.
10355 (emit_and): Likewise.
10356 (emit_orr): Likewise.
10357 (emit_orn): Likewise.
10358 (emit_eor): Likewise.
10359 (emit_mvn): Likewise.
10360 (emit_lslv): Likewise.
10361 (emit_lsrv): Likewise.
10362 (emit_asrv): Likewise.
10363 (emit_mul): Likewise.
10364 (emit_sbfm): Likewise.
10365 (emit_sbfx): Likewise.
10366 (emit_ubfm): Likewise.
10367 (emit_ubfx): Likewise.
10368 (emit_csinc): Likewise.
10369 (emit_cset): Likewise.
10370 (emit_nop): Likewise.
10371 (emit_ops_insns): New helper function.
10372 (emit_pop): Likewise.
10373 (emit_push): Likewise.
10374 (aarch64_emit_prologue): New function.
10375 (aarch64_emit_epilogue): Likewise.
10376 (aarch64_emit_add): Likewise.
10377 (aarch64_emit_sub): Likewise.
10378 (aarch64_emit_mul): Likewise.
10379 (aarch64_emit_lsh): Likewise.
10380 (aarch64_emit_rsh_signed): Likewise.
10381 (aarch64_emit_rsh_unsigned): Likewise.
10382 (aarch64_emit_ext): Likewise.
10383 (aarch64_emit_log_not): Likewise.
10384 (aarch64_emit_bit_and): Likewise.
10385 (aarch64_emit_bit_or): Likewise.
10386 (aarch64_emit_bit_xor): Likewise.
10387 (aarch64_emit_bit_not): Likewise.
10388 (aarch64_emit_equal): Likewise.
10389 (aarch64_emit_less_signed): Likewise.
10390 (aarch64_emit_less_unsigned): Likewise.
10391 (aarch64_emit_ref): Likewise.
10392 (aarch64_emit_if_goto): Likewise.
10393 (aarch64_emit_goto): Likewise.
10394 (aarch64_write_goto_address): Likewise.
10395 (aarch64_emit_const): Likewise.
10396 (aarch64_emit_call): Likewise.
10397 (aarch64_emit_reg): Likewise.
10398 (aarch64_emit_pop): Likewise.
10399 (aarch64_emit_stack_flush): Likewise.
10400 (aarch64_emit_zero_ext): Likewise.
10401 (aarch64_emit_swap): Likewise.
10402 (aarch64_emit_stack_adjust): Likewise.
10403 (aarch64_emit_int_call_1): Likewise.
10404 (aarch64_emit_void_call_2): Likewise.
10405 (aarch64_emit_eq_goto): Likewise.
10406 (aarch64_emit_ne_goto): Likewise.
10407 (aarch64_emit_lt_goto): Likewise.
10408 (aarch64_emit_le_goto): Likewise.
10409 (aarch64_emit_gt_goto): Likewise.
10410 (aarch64_emit_ge_got): Likewise.
10411 (aarch64_emit_ops_impl): New static global variable.
10412 (aarch64_emit_ops): New target function, return
10413 &aarch64_emit_ops_impl.
10414 (struct linux_target_ops): Install it.
10415
10416 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10417
10418 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
10419 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
10420 aarch64-ipa.o.
10421 * linux-aarch64-ipa.c: New file.
10422 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
10423 and endian.h.
10424 (aarch64_get_thread_area): New target method.
10425 (extract_signed_bitfield): New helper function.
10426 (aarch64_decode_ldr_literal): New function.
10427 (enum aarch64_opcodes): New enum.
10428 (struct aarch64_register): New struct.
10429 (struct aarch64_operand): New struct.
10430 (x0): New static global.
10431 (x1): Likewise.
10432 (x2): Likewise.
10433 (x3): Likewise.
10434 (x4): Likewise.
10435 (w2): Likewise.
10436 (ip0): Likewise.
10437 (sp): Likewise.
10438 (xzr): Likewise.
10439 (aarch64_register): New helper function.
10440 (register_operand): Likewise.
10441 (immediate_operand): Likewise.
10442 (struct aarch64_memory_operand): New struct.
10443 (offset_memory_operand): New helper function.
10444 (preindex_memory_operand): Likewise.
10445 (enum aarch64_system_control_registers): New enum.
10446 (ENCODE): New macro.
10447 (emit_insn): New helper function.
10448 (emit_b): New function.
10449 (emit_bcond): Likewise.
10450 (emit_cb): Likewise.
10451 (emit_tb): Likewise.
10452 (emit_blr): Likewise.
10453 (emit_stp): Likewise.
10454 (emit_ldp_q_offset): Likewise.
10455 (emit_stp_q_offset): Likewise.
10456 (emit_load_store): Likewise.
10457 (emit_ldr): Likewise.
10458 (emit_ldrsw): Likewise.
10459 (emit_str): Likewise.
10460 (emit_ldaxr): Likewise.
10461 (emit_stxr): Likewise.
10462 (emit_stlr): Likewise.
10463 (emit_data_processing_reg): Likewise.
10464 (emit_data_processing): Likewise.
10465 (emit_add): Likewise.
10466 (emit_sub): Likewise.
10467 (emit_mov): Likewise.
10468 (emit_movk): Likewise.
10469 (emit_mov_addr): Likewise.
10470 (emit_mrs): Likewise.
10471 (emit_msr): Likewise.
10472 (emit_sevl): Likewise.
10473 (emit_wfe): Likewise.
10474 (append_insns): Likewise.
10475 (can_encode_int32_in): New helper function.
10476 (aarch64_relocate_instruction): New function.
10477 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
10478 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
10479 (struct linux_target_ops): Install aarch64_get_thread_area,
10480 aarch64_install_fast_tracepoint_jump_pad and
10481 aarch64_get_min_fast_tracepoint_insn_len.
10482
10483 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10484
10485 * Makefile.in (aarch64-insn.o): New rule.
10486 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
10487
10488 2015-09-21 Yao Qi <yao.qi@linaro.org>
10489
10490 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
10491
10492 2015-09-21 Yao Qi <yao.qi@linaro.org>
10493
10494 * tracepoint.c (max_jump_pad_size): Remove.
10495
10496 2015-09-18 Yao Qi <yao.qi@linaro.org>
10497
10498 * linux-aarch64-low.c: Don't include sys/uio.h.
10499 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
10500
10501 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
10502
10503 * tracepoint.c (eval_result_type): Change prototype.
10504 (condition_true_at_tracepoint): Fix argument to compiled_cond.
10505
10506 2015-09-15 Pedro Alves <palves@redhat.com>
10507
10508 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
10509 Check whether to report exec events instead of checking whether
10510 multiprocess is enabled.
10511
10512 2015-09-15 Pedro Alves <palves@redhat.com>
10513
10514 PR remote/18965
10515 * remote-utils.c (prepare_resume_reply): Merge
10516 TARGET_WAITKIND_VFORK_DONE switch case with the
10517 TARGET_WAITKIND_FORKED case.
10518
10519 2015-09-15 Yao Qi <yao.qi@linaro.org>
10520
10521 * server.c (handle_query): Check string comparison using
10522 "else if" instead of "if".
10523
10524 2015-09-15 Yao Qi <yao.qi@linaro.org>
10525
10526 * server.c (vCont_supported): New global variable.
10527 (handle_query): Set vCont_supported to 1 if "vContSupported+"
10528 matches. Append ";vContSupported+" to own_buf.
10529 (handle_v_requests): Append ";s;S" to own_buf if target supports
10530 hardware single step or vCont_supported is false.
10531 (capture_main): Set vCont_supported to zero.
10532
10533 2015-09-15 Yao Qi <yao.qi@linaro.org>
10534
10535 * linux-low.c (linux_supports_conditional_breakpoints): Rename
10536 it to ...
10537 (linux_supports_hardware_single_step): ... New function.
10538 (linux_target_ops): Update.
10539 * lynx-low.c (lynx_target_ops): Set field
10540 supports_hardware_single_step to target_can_do_hardware_single_step.
10541 * nto-low.c (nto_target_ops): Likewise.
10542 * spu-low.c (spu_target_ops): Likewise.
10543 * win32-low.c (win32_target_ops): Likewise.
10544 * target.c (target_can_do_hardware_single_step): New function.
10545 * target.h (struct target_ops) <supports_conditional_breakpoints>:
10546 Remove. <supports_hardware_single_step>: New field.
10547 (target_supports_conditional_breakpoints): Remove.
10548 (target_supports_hardware_single_step): New macro.
10549 (target_can_do_hardware_single_step): Declare.
10550 * server.c (handle_query): Use target_supports_hardware_single_step
10551 instead of target_supports_conditional_breakpoints.
10552
10553 2015-09-15 Yao Qi <yao.qi@linaro.org>
10554
10555 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
10556 function.
10557 (struct linux_target_ops the_low_target): Install
10558 aarch64_linux_siginfo_fixup.
10559
10560 2015-09-11 Don Breazeal <donb@codesourcery.com>
10561 Luis Machado <lgustavo@codesourcery.com>
10562
10563 * linux-low.c (linux_mourn): Static declaration.
10564 (linux_arch_setup): Move in front of
10565 handle_extended_wait.
10566 (linux_arch_setup_thread): New function.
10567 (handle_extended_wait): Handle exec events. Call
10568 linux_arch_setup_thread. Make event_lwp argument a
10569 pointer-to-a-pointer.
10570 (check_zombie_leaders): Do not check stopped threads.
10571 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
10572 (linux_low_filter_event): Add lwp and thread for exec'ing
10573 non-leader thread if leader thread has been deleted.
10574 Refactor code into linux_arch_setup_thread and call it.
10575 Pass child lwp pointer by reference to handle_extended_wait.
10576 (linux_wait_for_event_filtered): Update comment.
10577 (linux_wait_1): Prevent clobbering exec event status.
10578 (linux_supports_exec_events): New function.
10579 (linux_target_ops) <supports_exec_events>: Initialize new member.
10580 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
10581 new member.
10582 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
10583 * server.c (report_exec_events): New global variable.
10584 (handle_query): Handle qSupported query for exec-events feature.
10585 (captured_main): Initialize report_exec_events.
10586 * server.h (report_exec_events): Declare new global variable.
10587 * target.h (struct target_ops) <supports_exec_events>: New
10588 member.
10589 (target_supports_exec_events): New macro.
10590 * win32-low.c (win32_target_ops) <supports_exec_events>:
10591 Initialize new member.
10592
10593 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
10594
10595 * linux-low.c (linux_low_enable_btrace): Remove.
10596 (linux_target_ops): Replace linux_low_enable_btrace with
10597 linux_enable_btrace.
10598
10599 2015-09-03 Yao Qi <yao.qi@linaro.org>
10600
10601 * linux-aarch64-low.c (aarch64_insert_point): Call
10602 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
10603 returns true.
10604
10605 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10606
10607 * linux-low.c (check_stopped_by_breakpoint): Use
10608 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
10609
10610 2015-08-27 Pedro Alves <palves@redhat.com>
10611
10612 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
10613
10614 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
10615
10616 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
10617 the XNEW-family equivalent.
10618 (compile_bytecodes): Likewise.
10619 * dll.c (loaded_dll): Likewise.
10620 * event-loop.c (append_callback_event): Likewise.
10621 (create_file_handler): Likewise.
10622 (create_file_event): Likewise.
10623 * hostio.c (handle_open): Likewise.
10624 * inferiors.c (add_thread): Likewise.
10625 (add_process): Likewise.
10626 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
10627 * linux-arm-low.c (arm_new_process): Likewise.
10628 (arm_new_thread): Likewise.
10629 * linux-low.c (add_to_pid_list): Likewise.
10630 (linux_add_process): Likewise.
10631 (handle_extended_wait): Likewise.
10632 (add_lwp): Likewise.
10633 (enqueue_one_deferred_signal): Likewise.
10634 (enqueue_pending_signal): Likewise.
10635 (linux_resume_one_lwp_throw): Likewise.
10636 (linux_resume_one_thread): Likewise.
10637 (linux_read_memory): Likewise.
10638 (linux_write_memory): Likewise.
10639 * linux-mips-low.c (mips_linux_new_process): Likewise.
10640 (mips_linux_new_thread): Likewise.
10641 (mips_add_watchpoint): Likewise.
10642 * linux-x86-low.c (initialize_low_arch): Likewise.
10643 * lynx-low.c (lynx_add_process): Likewise.
10644 * mem-break.c (set_raw_breakpoint_at): Likewise.
10645 (set_breakpoint): Likewise.
10646 (add_condition_to_breakpoint): Likewise.
10647 (add_commands_to_breakpoint): Likewise.
10648 (clone_agent_expr): Likewise.
10649 (clone_one_breakpoint): Likewise.
10650 * regcache.c (new_register_cache): Likewise.
10651 * remote-utils.c (look_up_one_symbol): Likewise.
10652 * server.c (queue_stop_reply): Likewise.
10653 (start_inferior): Likewise.
10654 (queue_stop_reply_callback): Likewise.
10655 (handle_target_event): Likewise.
10656 * spu-low.c (fetch_ppc_memory): Likewise.
10657 (store_ppc_memory): Likewise.
10658 * target.c (set_target_ops): Likewise.
10659 * thread-db.c (thread_db_load_search): Likewise.
10660 (try_thread_db_load_1): Likewise.
10661 * tracepoint.c (add_tracepoint): Likewise.
10662 (add_tracepoint_action): Likewise.
10663 (create_trace_state_variable): Likewise.
10664 (cmd_qtdpsrc): Likewise.
10665 (cmd_qtro): Likewise.
10666 (add_while_stepping_state): Likewise.
10667 * win32-low.c (child_add_thread): Likewise.
10668 (get_image_name): Likewise.
10669
10670 2015-08-25 Yao Qi <yao.qi@linaro.org>
10671
10672 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
10673
10674 2015-08-25 Yao Qi <yao.qi@linaro.org>
10675
10676 * Makefile.in (aarch64-linux.o): New rule.
10677 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
10678 srv_tgtobj.
10679 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
10680 (aarch64_init_debug_reg_state): Make it extern.
10681 (aarch64_linux_prepare_to_resume): Remove.
10682
10683 2015-08-25 Yao Qi <yao.qi@linaro.org>
10684
10685 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
10686 lwp_arch_private_info and ptid_of_lwp.
10687
10688 2015-08-25 Yao Qi <yao.qi@linaro.org>
10689
10690 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
10691 Find proc_info by find_process_pid. All callers updated.
10692
10693 2015-08-25 Yao Qi <yao.qi@linaro.org>
10694
10695 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
10696 Remove.
10697 (debug_reg_change_callback): Remove.
10698 (aarch64_notify_debug_reg_change): Remove.
10699
10700 2015-08-25 Yao Qi <yao.qi@linaro.org>
10701
10702 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
10703 Call current_lwp_ptid.
10704
10705 2015-08-25 Yao Qi <yao.qi@linaro.org>
10706
10707 * linux-aarch64-low.c (debug_reg_change_callback): Use
10708 debug_printf.
10709
10710 2015-08-25 Yao Qi <yao.qi@linaro.org>
10711
10712 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
10713
10714 2015-08-25 Yao Qi <yao.qi@linaro.org>
10715
10716 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
10717
10718 2015-08-25 Yao Qi <yao.qi@linaro.org>
10719
10720 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
10721 the code.
10722
10723 2015-08-25 Yao Qi <yao.qi@linaro.org>
10724
10725 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
10726 Remove.
10727 (debug_reg_change_callback): Remove argument entry and add argument
10728 lwp. Remove local variable thread. Don't print thread id in the
10729 debugging output. Don't check whether pid of thread equals to pid.
10730 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
10731 iterate_over_lwps instead find_inferior.
10732
10733 2015-08-24 Pedro Alves <palves@redhat.com>
10734
10735 * inferiors.c (get_first_process): New function.
10736 * inferiors.h (get_first_process): New declaration.
10737 * remote-utils.c (read_ptid): Default to the first process in the
10738 list, instead of to the current thread's process.
10739
10740 2015-08-24 Pedro Alves <palves@redhat.com>
10741
10742 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
10743 * event-loop.c: Likewise.
10744 * remote-utils.c: Likewise.
10745 * tracepoint.c: Likewise.
10746
10747 2015-08-24 Pedro Alves <palves@redhat.com>
10748
10749 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
10750 ptid_get_lwp.
10751
10752 2015-08-21 Pedro Alves <palves@redhat.com>
10753
10754 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
10755 instead of literal 1.
10756
10757 2015-08-21 Pedro Alves <palves@redhat.com>
10758
10759 * tdesc.c (default_description): Explicitly zero-initialize.
10760
10761 2015-08-21 Pedro Alves <palves@redhat.com>
10762
10763 PR gdb/18749
10764 * inferiors.c (remove_thread): Discard any pending stop reply for
10765 this thread.
10766 * server.c (remove_all_on_match_pid): Rename to ...
10767 (remove_all_on_match_ptid): ... this. Work with a filter ptid
10768 instead of a pid.
10769 (discard_queued_stop_replies): Change parameter to a ptid. Now
10770 extern.
10771 (handle_v_kill, kill_inferior_callback, captured_main)
10772 (process_serial_event): Adjust.
10773 * server.h (discard_queued_stop_replies): Declare.
10774
10775 2015-08-21 Pedro Alves <palves@redhat.com>
10776
10777 * linux-low.c (wait_for_sigstop): Always switch to no thread
10778 selected if the previously current thread dies.
10779 * lynx-low.c (lynx_request_interrupt): Use the first thread's
10780 process instead of the current thread's.
10781 * remote-utils.c (input_interrupt): Don't check if there's no
10782 current thread.
10783 * server.c (gdb_read_memory, gdb_write_memory): If setting the
10784 current thread to the general thread fails, error out.
10785 (handle_qxfer_auxv, handle_qxfer_libraries)
10786 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
10787 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
10788 (handle_query): Check if there's a thread selected instead of
10789 checking whether there's any thread in the thread list.
10790 (handle_qxfer_threads, handle_qxfer_btrace)
10791 (handle_qxfer_btrace_conf): Don't error out early if there's no
10792 thread in the thread list.
10793 (handle_v_cont, myresume): Don't set the current thread to the
10794 continue thread.
10795 (process_serial_event) <Hg handling>: Also set thread_id if the
10796 previous general thread is still alive.
10797 (process_serial_event) <g/G handling>: If setting the current
10798 thread to the general thread fails, error out.
10799 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
10800 thread's lwp instead of the current thread's.
10801 * target.c (set_desired_thread): If the desired thread was not
10802 found, leave the current thread pointing to NULL. Return an int
10803 (boolean) indicating success.
10804 * target.h (set_desired_thread): Change return type to int.
10805
10806 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
10807
10808 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
10809 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
10810 #includes.
10811 (ps_get_thread_area): New function.
10812
10813 2015-08-19 Gary Benson <gbenson@redhat.com>
10814
10815 * hostio.c (handle_pread): Do not attempt to read more data
10816 than hostio_reply_with_data can fit in a packet.
10817
10818 2015-08-18 Joel Brobecker <brobecker@adacore.com>
10819
10820 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
10821
10822 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
10823
10824 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
10825
10826 2015-08-06 Pedro Alves <palves@redhat.com>
10827
10828 * tracepoint.c (expr_eval_result): Now an int.
10829
10830 2015-08-06 Pedro Alves <palves@redhat.com>
10831
10832 * gdbthread.h (struct regcache): Forward declare.
10833 (struct thread_info) <regcache_data>: Now a struct regcache
10834 pointer.
10835 * inferiors.c (inferior_regcache_data)
10836 (set_inferior_regcache_data): Now work with struct regcache
10837 pointers.
10838 * inferiors.h (struct regcache): Forward declare.
10839 (inferior_regcache_data, set_inferior_regcache_data): Now work
10840 with struct regcache pointers.
10841 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
10842 (free_register_cache_thread): Remove struct regcache pointer
10843 casts.
10844
10845 2015-08-06 Pedro Alves <palves@redhat.com>
10846
10847 * server.c (captured_main): On error, print the exception message
10848 to stderr, and if run_once is set, throw a quit.
10849
10850 2015-08-06 Pedro Alves <palves@redhat.com>
10851
10852 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
10853 the current thread.
10854
10855 2015-08-06 Pedro Alves <palves@redhat.com>
10856
10857 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
10858 reading beyond the passed in buffer length.
10859
10860 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
10861
10862 * tracepoint.c (symbol_list) <required>: Remove.
10863
10864 2015-08-06 Pedro Alves <palves@redhat.com>
10865
10866 * linux-low.c (handle_extended_wait): Set the fork child's suspend
10867 count if stopping and suspending threads.
10868 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
10869 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
10870 (linux_detach): Complete an ongoing step-over.
10871 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
10872 throughout.
10873 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
10874 (linux_wait_1): If passing a signal to the inferior after
10875 finishing a step-over, unsuspend and re-resume all lwps. If we
10876 see a single-step event but the thread should be continuing, don't
10877 pass the trap to gdb.
10878 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
10879 internal_error instead of gdb_assert.
10880 (enqueue_pending_signal): New function.
10881 (check_ptrace_stopped_lwp_gone): Add debug output.
10882 (start_step_over): Use internal_error instead of gdb_assert.
10883 (complete_ongoing_step_over): New function.
10884 (linux_resume_one_thread): Don't resume a suspended thread.
10885 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
10886 it stepping.
10887
10888 2015-08-06 Pedro Alves <palves@redhat.com>
10889
10890 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
10891 (linux_thread_alive): Use lwp_is_marked_dead.
10892 (extended_event_reported): Delete.
10893 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
10894 instead of extended_event_reported.
10895 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
10896 as well.
10897 (lwp_is_marked_dead): New function.
10898 (lwp_running): Use lwp_is_marked_dead.
10899 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
10900 comment.
10901
10902 2015-08-06 Pedro Alves <palves@redhat.com>
10903
10904 * linux-low.c (linux_wait_1): Move fork event output out of the
10905 !report_to_gdb check. Pass event_child->waitstatus to
10906 target_waitstatus_to_string instead of ourstatus.
10907
10908 2015-08-04 Yao Qi <yao.qi@linaro.org>
10909
10910 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
10911 if current_thread is 32 bit.
10912
10913 2015-08-04 Yao Qi <yao.qi@linaro.org>
10914
10915 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
10916 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
10917 * server.c (extended_protocol): Remove "static".
10918 * server.h (extended_protocol): Declare it.
10919
10920 2015-08-04 Yao Qi <yao.qi@linaro.org>
10921
10922 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
10923 both aarch64 and aarch32.
10924 (aarch64_set_pc): Likewise.
10925
10926 2015-08-04 Yao Qi <yao.qi@linaro.org>
10927
10928 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
10929 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
10930 arm-with-neon.xml to srv_xmlfiles.
10931 * linux-aarch64-low.c: Include linux-aarch32-low.h.
10932 (is_64bit_tdesc): New function.
10933 (aarch64_linux_read_description): New function.
10934 (aarch64_arch_setup): Call aarch64_linux_read_description.
10935 (regs_info): Rename to regs_info_aarch64.
10936 (aarch64_regs_info): Return right regs_info.
10937 (initialize_low_arch): Call initialize_low_arch_aarch32.
10938
10939 2015-08-04 Yao Qi <yao.qi@linaro.org>
10940
10941 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
10942 * linux-aarch32-low.c: New file.
10943 * linux-aarch32-low.h: New file.
10944 * linux-arm-low.c (arm_fill_gregset): Move it to
10945 linux-aarch32-low.c.
10946 (arm_store_gregset): Likewise.
10947 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
10948 (arm_store_vfpregset): Call arm_store_vfpregset_num.
10949 (arm_arch_setup): Check if PTRACE_GETREGSET works.
10950 (regs_info): Rename to regs_info_arm.
10951 (arm_regs_info): Return regs_info_aarch32 if
10952 have_ptrace_getregset is 1 and target description is
10953 arm_with_neon or arm_with_vfpv3.
10954 (initialize_low_arch): Don't call init_registers_arm_with_neon.
10955 Call initialize_low_arch_aarch32 instead.
10956
10957 2015-08-04 Yao Qi <yao.qi@linaro.org>
10958
10959 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
10960 * linux-low.c: ... here.
10961 * linux-low.h (have_ptrace_getregset): Declare it.
10962
10963 2015-08-04 Pedro Alves <palves@redhat.com>
10964
10965 * thread-db.c (struct thread_db): Use new typedefs.
10966 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
10967 CHK calls.
10968 (disable_thread_event_reporting): Cast result of dlsym to
10969 destination function pointer type.
10970 (thread_db_mourn): Use td_ta_delete_ftype.
10971
10972 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
10973
10974 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
10975 arch variant.
10976 (CDX_BREAKPOINT): Define for R2.
10977 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
10978 (the_low_target): Add comments.
10979
10980 2015-07-30 Yao Qi <yao.qi@linaro.org>
10981
10982 * linux-arm-low.c (arm_hwcap): Remove it.
10983 (arm_read_description): New local variable arm_hwcap. Don't
10984 set arm_hwcap to zero.
10985
10986 2015-07-30 Yao Qi <yao.qi@linaro.org>
10987
10988 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
10989 Use regcache->tdesc instead.
10990 (arm_store_wmmxregset): Likewise.
10991 (arm_fill_vfpregset): Likewise.
10992 (arm_store_vfpregset): Likewise.
10993
10994 2015-07-30 Yao Qi <yao.qi@linaro.org>
10995
10996 * linux-arm-low.c: Include arch/arm.h.
10997 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
10998 (arm_store_gregset): Likewise.
10999
11000 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
11001
11002 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
11003 ptrace's 4th parameter.
11004
11005 2015-07-27 Yao Qi <yao.qi@linaro.org>
11006
11007 * configure.srv (case aarch64*-*-linux*): Don't set
11008 srv_linux_usrregs.
11009
11010 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
11011
11012 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
11013 sys/ptrace.h.
11014 * linux-arm-low.c: Likewise.
11015 * linux-cris-low.c: Likewise.
11016 * linux-crisv32-low.c: Likewise.
11017 * linux-low.c: Likewise.
11018 * linux-m68k-low.c: Likewise.
11019 * linux-mips-low.c: Likewise.
11020 * linux-nios2-low.c: Likewise.
11021 * linux-s390-low.c: Likewise.
11022 * linux-sparc-low.c: Likewise.
11023 * linux-tic6x-low.c: Likewise.
11024 * linux-tile-low.c: Likewise.
11025 * linux-x86-low.c: Likewise.
11026
11027 2015-07-24 Pedro Alves <palves@redhat.com>
11028
11029 * config.in: Regenerate.
11030 * configure: Regenerate.
11031
11032 2015-07-24 Pedro Alves <palves@redhat.com>
11033
11034 * acinclude.m4: Include ../ptrace.m4.
11035 * configure.ac: Call GDB_AC_PTRACE.
11036 * config.in, configure: Regenerate.
11037
11038 2015-07-24 Yao Qi <yao.qi@linaro.org>
11039
11040 * linux-low.c (linux_create_inferior): Remove setting to
11041 proc->priv->new_inferior.
11042 (linux_attach): Likewise.
11043 (linux_low_filter_event): Likewise.
11044 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
11045
11046 2015-07-24 Yao Qi <yao.qi@linaro.org>
11047
11048 * linux-low.c (linux_arch_setup): New function.
11049 (linux_low_filter_event): If proc->tdesc is NULL and
11050 proc->attached is true, call the_low_target.arch_setup.
11051 Otherwise, keep status pending, and return.
11052 (linux_resume_one_lwp_throw): Don't call get_pc if
11053 thread->while_stepping isn't NULL. Don't call
11054 get_thread_regcache if proc->tdesc is NULL.
11055 (need_step_over_p): Return 0 if proc->tdesc is NULL.
11056 (linux_target_ops): Install arch_setup.
11057 * server.c (start_inferior): Call the_target->arch_setup.
11058 * target.h (struct target_ops) <arch_setup>: New field.
11059 (target_arch_setup): New marco.
11060 * lynx-low.c (lynx_target_ops): Update.
11061 * nto-low.c (nto_target_ops): Update.
11062 * spu-low.c (spu_target_ops): Update.
11063 * win32-low.c (win32_target_ops): Update.
11064
11065 2015-07-24 Yao Qi <yao.qi@linaro.org>
11066
11067 * linux-low.c (linux_add_process): Don't set
11068 proc->priv->new_inferior.
11069 (linux_create_inferior): Set proc->priv->new_inferior to 1.
11070 (linux_attach): Likewise.
11071
11072 2015-07-24 Yao Qi <yao.qi@linaro.org>
11073
11074 * server.c (start_inferior): Code refactor.
11075
11076 2015-07-24 Yao Qi <yao.qi@linaro.org>
11077
11078 * server.c (process_serial_event): Set general_thread.
11079
11080 2015-07-21 Yao Qi <yao.qi@linaro.org>
11081
11082 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
11083 aarch64_linux_get_debug_reg_capacity.
11084
11085 2015-07-17 Yao Qi <yao.qi@linaro.org>
11086
11087 * Makefile.in (aarch64-linux-hw-point.o): New rule.
11088 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
11089 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
11090 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
11091 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
11092 (AARCH64_HWP_ALIGNMENT): Likewise.
11093 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
11094 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
11095 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
11096 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
11097 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
11098 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
11099 (struct aarch64_debug_reg_state): Likewise.
11100 (struct arch_lwp_info): Likewise.
11101 (aarch64_align_watchpoint): Likewise.
11102 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
11103 (aarch64_watchpoint_length): Likewise.
11104 (aarch64_point_encode_ctrl_reg): Likewise
11105 (aarch64_point_is_aligned): Likewise.
11106 (aarch64_align_watchpoint): Likewise.
11107 (aarch64_linux_set_debug_regs):
11108 (aarch64_dr_state_insert_one_point): Likewise.
11109 (aarch64_dr_state_remove_one_point): Likewise.
11110 (aarch64_handle_breakpoint): Likewise.
11111 (aarch64_handle_aligned_watchpoint): Likewise.
11112 (aarch64_handle_unaligned_watchpoint): Likewise.
11113 (aarch64_handle_watchpoint): Likewise.
11114
11115 2015-07-17 Yao Qi <yao.qi@linaro.org>
11116
11117 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
11118 and don't aarch64_get_debug_reg_state. All callers update.
11119 (aarch64_handle_aligned_watchpoint): Likewise.
11120 (aarch64_handle_unaligned_watchpoint): Likewise.
11121 (aarch64_handle_watchpoint): Likewise.
11122 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
11123 (aarch64_remove_point): Likewise.
11124
11125 2015-07-17 Yao Qi <yao.qi@linaro.org>
11126
11127 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
11128 debug_printf.
11129 (aarch64_handle_unaligned_watchpoint): Likewise.
11130
11131 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11132
11133 Revert the previous 3 commits:
11134 Move gdb_regex* to common/
11135 Move linux_find_memory_regions_full & co.
11136 gdbserver build-id attribute generator
11137
11138 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
11139 Jan Kratochvil <jan.kratochvil@redhat.com>
11140
11141 gdbserver build-id attribute generator.
11142 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
11143 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
11144 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
11145 (find_phdr): New.
11146 (get_dynamic): Use find_pdhr to traverse program headers.
11147 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
11148 (compare_mapping_entry_range, struct find_memory_region_callback_data)
11149 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
11150 (get_hex_build_id): New.
11151 (linux_qxfer_libraries_svr4): Add optional build-id attribute
11152 to reply XML document.
11153
11154 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
11155 Jan Kratochvil <jan.kratochvil@redhat.com>
11156
11157 * target.c: Include target/target-utils.h and fcntl.h.
11158 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
11159 (target_fileio_read_stralloc): New functions.
11160
11161 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11162
11163 * Makefile.in (OBS): Add gdb_regex.o.
11164 (gdb_regex.o): New.
11165 * config.in: Rebuilt.
11166 * configure: Rebuilt.
11167
11168 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
11169 Jan Kratochvil <jan.kratochvil@redhat.com>
11170
11171 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
11172 * Makefile.in (OBS): Add target-utils.o.
11173 (linux-maps.o, target-utils.o): New.
11174 * configure.srv (srv_linux_obj): Add linux-maps.o.
11175
11176 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
11177
11178 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
11179 function, return 1.
11180 (the_low_target): Install it.
11181
11182 2015-07-14 Pedro Alves <palves@redhat.com>
11183
11184 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
11185 Instead, ignore ECHILD, and throw an error for other errnos.
11186
11187 2015-07-10 Pedro Alves <palves@redhat.com>
11188
11189 * event-loop.c (struct callback_event) <data>: Change type to
11190 gdb_client_data instance instead of gdb_client_data pointer.
11191 (append_callback_event): Adjust.
11192
11193 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
11194
11195 * linux-aarch64-low.c: Add comments for each linux_target_ops
11196 method. Remove comments already covered in target_ops and
11197 linux_target_ops definitions.
11198 (the_low_target): Add comments for each unimplemented method.
11199
11200 2015-07-09 Yao Qi <yao.qi@linaro.org>
11201
11202 * linux-aarch64-low.c (aarch64_regmap): Remove.
11203 (aarch64_usrregs_info): Remove.
11204 (regs_info): Set field usrregs to NULL.
11205
11206 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
11207
11208 * linux-low.c: Include "rsp-low.h"
11209 (linux_low_encode_pt_config, linux_low_encode_raw): New.
11210 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
11211 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
11212 (handle_btrace_enable_pt): New.
11213 (handle_btrace_general_set): Support "pt".
11214 (handle_btrace_conf_general_set): Support "pt:size".
11215
11216 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
11217
11218 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
11219 Z_PACKET_SW_BP.
11220
11221 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
11222
11223 * linux-aarch64-low.c: Remove comment about endianness.
11224 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
11225 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
11226 memcmp.
11227
11228 2015-06-24 Gary Benson <gbenson@redhat.com>
11229
11230 * linux-i386-ipa.c (stdint.h): Do not include.
11231 * lynx-i386-low.c (stdint.h): Likewise.
11232 * lynx-ppc-low.c (stdint.h): Likewise.
11233 * mem-break.c (stdint.h): Likewise.
11234 * thread-db.c (stdint.h): Likewise.
11235 * tracepoint.c (stdint.h): Likewise.
11236 * win32-low.c (stdint.h): Likewise.
11237
11238 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
11239
11240 * server.c (write_qxfer_response): Update call to
11241 remote_escape_output.
11242
11243 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
11244 Jan Kratochvil <jan.kratochvil@redhat.com>
11245
11246 Merge multiple hex conversions.
11247 * gdbreplay.c (tohex): Rename to 'fromhex'.
11248 (logchar): Use fromhex.
11249
11250 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
11251
11252 * server.c (handle_qxfer_libraries): Set `version' attribute for
11253 <library-list>.
11254
11255 2015-06-10 Gary Benson <gbenson@redhat.com>
11256
11257 * target.h (struct target_ops) <multifs_open>: New field.
11258 <multifs_unlink>: Likewise.
11259 <multifs_readlink>: Likewise.
11260 * linux-low.c (nat/linux-namespaces.h): New include.
11261 (linux_target_ops): Initialize the_target->multifs_open,
11262 the_target->multifs_unlink and the_target->multifs_readlink.
11263 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
11264 * hostio.c (hostio_fs_pid): New static variable.
11265 (hostio_handle_new_gdb_connection): New function.
11266 (handle_setfs): Likewise.
11267 (handle_open): Use the_target->multifs_open as appropriate.
11268 (handle_unlink): Use the_target->multifs_unlink as appropriate.
11269 (handle_readlink): Use the_target->multifs_readlink as
11270 appropriate.
11271 (handle_vFile): Handle vFile:setfs packets.
11272 * server.c (handle_query): Call hostio_handle_new_gdb_connection
11273 after target_handle_new_gdb_connection.
11274
11275 2015-06-10 Gary Benson <gbenson@redhat.com>
11276
11277 * configure.ac (AC_CHECK_FUNCS): Add setns.
11278 * config.in: Regenerate.
11279 * configure: Likewise.
11280 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
11281 (linux-namespaces.o): New rule.
11282 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
11283
11284 2015-06-09 Gary Benson <gbenson@redhat.com>
11285
11286 * hostio.c (handle_open): Process mode argument with
11287 fileio_to_host_mode.
11288
11289 2015-06-01 Yao Qi <yao.qi@linaro.org>
11290
11291 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
11292 * linux-x86-low.c: Likewise.
11293
11294 2015-05-28 Don Breazeal <donb@codesourcery.com>
11295
11296 * linux-low.c (handle_extended_wait): Initialize
11297 thread_info.last_resume_kind for new fork children.
11298
11299 2015-05-15 Pedro Alves <palves@redhat.com>
11300
11301 * target.h (target_handle_new_gdb_connection): Rewrite using if
11302 wrapped in do/while.
11303
11304 2015-05-14 Joel Brobecker <brobecker@adacore.com>
11305
11306 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
11307 * configure, config.in: Regenerate.
11308 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
11309 Declare typedef.
11310
11311 2015-05-12 Don Breazeal <donb@codesourcery.com>
11312
11313 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
11314 PTRACE_EVENT_VFORK_DONE.
11315 (linux_low_ptrace_options, extended_event_reported): Add vfork
11316 events.
11317 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
11318 and "vforkdone" for RSP 'T' Stop Reply Packet.
11319 * server.h (report_vfork_events): Declare
11320 global variable.
11321
11322 2015-05-12 Don Breazeal <donb@codesourcery.com>
11323
11324 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
11325 (the_low_target) <new_fork>: Initialize new member.
11326 * linux-arm-low.c (arm_new_fork): New function.
11327 (the_low_target) <new_fork>: Initialize new member.
11328 * linux-low.c (handle_extended_wait): Call new target function
11329 new_fork.
11330 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
11331 * linux-mips-low.c (mips_add_watchpoint): New function
11332 extracted from mips_insert_point.
11333 (the_low_target) <new_fork>: Initialize new member.
11334 (mips_linux_new_fork): New function.
11335 (mips_insert_point): Call mips_add_watchpoint.
11336 * linux-x86-low.c (x86_linux_new_fork): New function.
11337 (the_low_target) <new_fork>: Initialize new member.
11338
11339 2015-05-12 Don Breazeal <donb@codesourcery.com>
11340
11341 * linux-low.c (handle_extended_wait): Implement return value,
11342 rename argument 'event_child' to 'event_lwp', handle
11343 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
11344 (linux_low_ptrace_options): New function.
11345 (linux_low_filter_event): Call linux_low_ptrace_options,
11346 use different argument fo linux_enable_event_reporting,
11347 use return value from handle_extended_wait.
11348 (extended_event_reported): New function.
11349 (linux_wait_1): Call extended_event_reported and set
11350 status to report fork events.
11351 (linux_write_memory): Add pid to debug message.
11352 (reset_lwp_ptrace_options_callback): New function.
11353 (linux_handle_new_gdb_connection): New function.
11354 (linux_target_ops): Initialize new structure member.
11355 * linux-low.h (struct lwp_info) <waitstatus>: New member.
11356 * lynx-low.c: Initialize new structure member.
11357 * remote-utils.c (prepare_resume_reply): Implement stop reason
11358 "fork" for "T" stop message.
11359 * server.c (handle_query): Call handle_new_gdb_connection.
11360 * server.h (report_fork_events): Declare global flag.
11361 * target.h (struct target_ops) <handle_new_gdb_connection>:
11362 New member.
11363 (target_handle_new_gdb_connection): New macro.
11364 * win32-low.c: Initialize new structure member.
11365
11366 2015-05-12 Don Breazeal <donb@codesourcery.com>
11367
11368 * mem-break.c (APPEND_TO_LIST): Define macro.
11369 (clone_agent_expr): New function.
11370 (clone_one_breakpoint): New function.
11371 (clone_all_breakpoints): New function.
11372 * mem-break.h: Declare new functions.
11373
11374 2015-05-12 Don Breazeal <donb@codesourcery.com>
11375
11376 * linux-low.c (linux_supports_fork_events): New function.
11377 (linux_supports_vfork_events): New function.
11378 (linux_target_ops): Initialize new structure members.
11379 (initialize_low): Call linux_check_ptrace_features.
11380 * lynx-low.c (lynx_target_ops): Initialize new structure
11381 members.
11382 * server.c (report_fork_events, report_vfork_events):
11383 New global flags.
11384 (handle_query): Add new features to qSupported packet and
11385 response.
11386 (captured_main): Initialize new global variables.
11387 * target.h (struct target_ops) <supports_fork_events>:
11388 New member.
11389 <supports_vfork_events>: New member.
11390 (target_supports_fork_events): New macro.
11391 (target_supports_vfork_events): New macro.
11392 * win32-low.c (win32_target_ops): Initialize new structure
11393 members.
11394
11395 2015-05-12 Gary Benson <gbenson@redhat.com>
11396
11397 * server.c (handle_qxfer_exec_file): Use current process
11398 if annex is empty.
11399
11400 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
11401
11402 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
11403 Remove HAVE_PTRACE_GETREGS conditionals.
11404 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
11405 instead of PTRACE_GETREGS and PTRACE_SETREGS.
11406
11407 2015-05-08 Yao Qi <yao.qi@linaro.org>
11408
11409 * linux-low.c (linux_supports_conditional_breakpoints): New
11410 function.
11411 (linux_target_ops): Install new target method.
11412 * lynx-low.c (lynx_target_ops): Install NULL hook for
11413 supports_conditional_breakpoints.
11414 * nto-low.c (nto_target_ops): Likewise.
11415 * spu-low.c (spu_target_ops): Likewise.
11416 * win32-low.c (win32_target_ops): Likewise.
11417 * server.c (handle_query): Check
11418 target_supports_conditional_breakpoints.
11419 * target.h (struct target_ops) <supports_conditional_breakpoints>:
11420 New field.
11421 (target_supports_conditional_breakpoints): New macro.
11422
11423 2015-05-06 Pedro Alves <palves@redhat.com>
11424
11425 PR server/18081
11426 * server.c (start_inferior): If the process exits, mourn it.
11427
11428 2015-04-21 Gary Benson <gbenson@redhat.com>
11429
11430 * hostio.c (fileio_open_flags_to_host): Factored out to
11431 fileio_to_host_openflags in common/fileio.c. Single use
11432 updated.
11433
11434 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
11435
11436 * linux-xtensa-low.c (xtensa_fill_gregset)
11437 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
11438 XCHAL_HAVE_LOOP.
11439
11440 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
11441
11442 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
11443 (regs_info): Replace usrregs pointer with NULL.
11444
11445 2015-04-17 Gary Benson <gbenson@redhat.com>
11446
11447 * target.h (struct target_ops) <pid_to_exec_file>: New field.
11448 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
11449 * server.c (handle_qxfer_exec_file): New function.
11450 (qxfer_packets): Add exec-file entry.
11451 (handle_query): Report qXfer:exec-file:read as supported packet.
11452
11453 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
11454
11455 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
11456
11457 2015-04-09 Gary Benson <gbenson@redhat.com>
11458
11459 * hostio-errno.c (errno_to_fileio_error): Remove function.
11460 Update caller to use remote_fileio_to_fio_error.
11461
11462 2015-04-09 Yao Qi <yao.qi@linaro.org>
11463
11464 * linux-low.c (linux_insert_point): Call
11465 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
11466 (linux_remove_point): Call remove_memory_breakpoint if type is
11467 raw_bkpt_type_sw.
11468 * linux-x86-low.c (x86_insert_point): Don't call
11469 insert_memory_breakpoint.
11470 (x86_remove_point): Don't call remove_memory_breakpoint.
11471
11472 2015-04-01 Pedro Alves <palves@redhat.com>
11473 Cleber Rosa <crosa@redhat.com>
11474
11475 * server.c (gdbserver_usage): Reorganize and extend the usage
11476 message.
11477
11478 2015-03-24 Pedro Alves <palves@redhat.com>
11479
11480 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
11481 output. Also dump TRAP_TRACE.
11482 (linux_low_filter_event): In debug output, distinguish a
11483 resume_stop SIGSTOP from a delayed SIGSTOP.
11484
11485 2015-03-24 Gary Benson <gbenson@redhat.com>
11486
11487 * linux-x86-low.c (x86_linux_new_thread): Moved to
11488 nat/x86-linux.c.
11489 (x86_linux_prepare_to_resume): Likewise.
11490
11491 2015-03-24 Gary Benson <gbenson@redhat.com>
11492
11493 * Makefile.in (x86-linux-dregs.o): New rule.
11494 * configure.srv: Add x86-linux-dregs.o to relevant targets.
11495 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
11496 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
11497 (x86_linux_dr_get): Likewise.
11498 (x86_linux_dr_set): Likewise.
11499 (update_debug_registers_callback): Likewise.
11500 (x86_linux_dr_set_addr): Likewise.
11501 (x86_linux_dr_get_addr): Likewise.
11502 (x86_linux_dr_set_control): Likewise.
11503 (x86_linux_dr_get_control): Likewise.
11504 (x86_linux_dr_get_status): Likewise.
11505 (x86_linux_update_debug_registers): Likewise.
11506
11507 2015-03-24 Gary Benson <gbenson@redhat.com>
11508
11509 * linux-x86-low.c (x86_linux_update_debug_registers):
11510 New function, factored out from...
11511 (x86_linux_prepare_to_resume): ...this.
11512
11513 2015-03-24 Gary Benson <gbenson@redhat.com>
11514
11515 * linux-x86-low.c (x86_linux_dr_get): Update comments.
11516 (x86_linux_dr_set): Likewise.
11517 (update_debug_registers_callback): Likewise.
11518 (x86_linux_dr_set_addr): Likewise.
11519 (x86_linux_dr_get_addr): Likewise.
11520 (x86_linux_dr_set_control): Likewise.
11521 (x86_linux_dr_get_control): Likewise.
11522 (x86_linux_dr_get_status): Likewise.
11523 (x86_linux_prepare_to_resume): Likewise.
11524
11525 2015-03-24 Gary Benson <gbenson@redhat.com>
11526
11527 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
11528 Use perror_with_name. Pass string through gettext.
11529 (x86_linux_dr_set): Likewise.
11530
11531 2015-03-24 Gary Benson <gbenson@redhat.com>
11532
11533 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
11534 (x86_linux_dr_set_addr): ...this.
11535 (x86_dr_low_get_addr): Rename to...
11536 (x86_linux_dr_get_addr): ...this.
11537 (x86_dr_low_set_control): Rename to...
11538 (x86_linux_dr_set_control): ...this.
11539 (x86_dr_low_get_control): Rename to...
11540 (x86_linux_dr_get_control): ...this.
11541 (x86_dr_low_get_status): Rename to...
11542 (x86_linux_dr_get_status): ...this.
11543 (x86_dr_low): Update with new function names.
11544
11545 2015-03-24 Gary Benson <gbenson@redhat.com>
11546
11547 * Makefile.in (x86-linux.o): New rule.
11548 * configure.srv: Add x86-linux.o to relevant targets.
11549 * linux-low.c (lwp_set_arch_private_info): New function.
11550 (lwp_arch_private_info): Likewise.
11551 * linux-x86-low.c: Include nat/x86-linux.h.
11552 (arch_lwp_info): Removed structure.
11553 (update_debug_registers_callback):
11554 Use lwp_set_debug_registers_changed.
11555 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
11556 and lwp_set_debug_registers_changed.
11557 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
11558
11559 2015-03-24 Gary Benson <gbenson@redhat.com>
11560
11561 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
11562 * linux-arm-low.c (arm_new_thread): Likewise.
11563 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
11564 * linux-mips-low.c (mips_linux_new_thread): Likewise.
11565 * linux-x86-low.c (x86_linux_new_thread): Likewise.
11566 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
11567
11568 2015-03-24 Gary Benson <gbenson@redhat.com>
11569
11570 * linux-low.c (ptid_of_lwp): New function.
11571 (lwp_is_stopped): Likewise.
11572 (lwp_stop_reason): Likewise.
11573 * linux-x86-low.c (update_debug_registers_callback):
11574 Use lwp_is_stopped.
11575 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
11576 lwp_stop_reason.
11577
11578 2015-03-24 Gary Benson <gbenson@redhat.com>
11579
11580 * linux-low.h (linux_stop_lwp): Remove declaration.
11581
11582 2015-03-24 Gary Benson <gbenson@redhat.com>
11583
11584 * linux-low.h: Include nat/linux-nat.h.
11585 * linux-low.c (iterate_over_lwps_args): New structure.
11586 (iterate_over_lwps_filter): New function.
11587 (iterate_over_lwps): Likewise.
11588 * linux-x86-low.c (update_debug_registers_callback):
11589 Update signature to what iterate_over_lwps expects.
11590 Remove PID check that iterate_over_lwps now performs.
11591 (x86_dr_low_set_addr): Use iterate_over_lwps.
11592 (x86_dr_low_set_control): Likewise.
11593
11594 2015-03-24 Gary Benson <gbenson@redhat.com>
11595
11596 * linux-x86-low.c (x86_debug_reg_state): New function.
11597 (x86_linux_prepare_to_resume): Use the above.
11598
11599 2015-03-24 Gary Benson <gbenson@redhat.com>
11600
11601 * linux-low.c (current_lwp_ptid): New function.
11602 * linux-x86-low.c: Include nat/linux-nat.h.
11603 (x86_dr_low_get_addr): Use current_lwp_ptid.
11604 (x86_dr_low_get_control): Likewise.
11605 (x86_dr_low_get_status): Likewise.
11606
11607 2015-03-20 Pedro Alves <palves@redhat.com>
11608
11609 * tracepoint.c (cmd_qtstatus): Make "str" const.
11610
11611 2015-03-20 Pedro Alves <palves@redhat.com>
11612
11613 * server.c (handle_general_set): Make "req_str" const.
11614
11615 2015-03-19 Pedro Alves <palves@redhat.com>
11616
11617 * linux-low.c (linux_resume_one_lwp): Rename to ...
11618 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
11619 instead call perror_with_name.
11620 (check_ptrace_stopped_lwp_gone): New function.
11621 (linux_resume_one_lwp): Reimplement as wrapper around
11622 linux_resume_one_lwp_throw that swallows errors if the LWP is
11623 gone.
11624
11625 2015-03-19 Pedro Alves <palves@redhat.com>
11626
11627 * linux-low.c (count_events_callback, select_event_lwp_callback):
11628 No longer check whether the thread has resume_stop as last resume
11629 kind.
11630
11631 2015-03-19 Pedro Alves <palves@redhat.com>
11632
11633 * linux-low.c (count_events_callback, select_event_lwp_callback):
11634 Use the lwp's status_pending_p field, not the thread's.
11635
11636 2015-03-19 Pedro Alves <palves@redhat.com>
11637
11638 * linux-low.c (select_event_lwp_callback): Update comments to
11639 no longer mention SIGTRAP.
11640
11641 2015-03-18 Gary Benson <gbenson@redhat.com>
11642
11643 * server.c (handle_query): Do not report vFile:fstat as supported.
11644
11645 2015-03-11 Gary Benson <gbenson@redhat.com>
11646
11647 * hostio.c (sys/types.h): New include.
11648 (sys/stat.h): Likewise.
11649 (common-remote-fileio.h): Likewise.
11650 (handle_fstat): New function.
11651 (handle_vFile): Handle vFile:fstat packets.
11652
11653 2015-03-11 Gary Benson <gbenson@redhat.com>
11654
11655 * configure.ac (AC_CHECK_MEMBERS): Add checks for
11656 struct stat.st_blocks and struct stat.st_blksize.
11657 * configure: Regenerate.
11658 * config.in: Likewise.
11659 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
11660 (OBS): Add common-remote-fileio.o.
11661 (common-remote-fileio.o): New rule.
11662
11663 2015-03-09 Pedro Alves <palves@redhat.com>
11664
11665 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
11666 'struct sockaddr' pointer in 'accept' call.
11667
11668 2015-03-09 Pedro Alves <palves@redhat.com>
11669
11670 Revert:
11671 2015-03-07 Pedro Alves <palves@redhat.com>
11672 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11673 or <winsock2.h> here. Instead include "gdb_socket.h".
11674 (remote_open): Use union gdb_sockaddr_u.
11675 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11676 or <winsock2.h> here. Instead include "gdb_socket.h".
11677 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11678 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11679 or <sys/un.h>.
11680 (init_named_socket, gdb_agent_helper_thread): Use union
11681 gdb_sockaddr_u.
11682
11683 2015-03-07 Pedro Alves <palves@redhat.com>
11684
11685 * configure.ac (build_warnings): Move
11686 -Wdeclaration-after-statement to the C-specific set.
11687 * configure: Regenerate.
11688
11689 2015-03-07 Pedro Alves <palves@redhat.com>
11690
11691 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11692 or <winsock2.h> here. Instead include "gdb_socket.h".
11693 (remote_open): Use union gdb_sockaddr_u.
11694 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11695 or <winsock2.h> here. Instead include "gdb_socket.h".
11696 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11697 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11698 or <sys/un.h>.
11699 (init_named_socket, gdb_agent_helper_thread): Use union
11700 gdb_sockaddr_u.
11701
11702 2015-03-07 Pedro Alves <palves@redhat.com>
11703
11704 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
11705 instead.
11706
11707 2015-03-06 Yao Qi <yao.qi@linaro.org>
11708
11709 * linux-aarch64-low.c (aarch64_insert_point): Use
11710 show_debug_regs as a boolean.
11711 (aarch64_remove_point): Likewise.
11712
11713 2015-03-05 Pedro Alves <palves@redhat.com>
11714
11715 * lynx-low.c (lynx_target_ops): Install NULL hooks for
11716 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
11717 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
11718 * nto-low.c (nto_target_ops): Likewise.
11719 * spu-low.c (spu_target_ops): Likewise.
11720 * win32-low.c (win32_target_ops): Likewise.
11721
11722 2015-03-04 Pedro Alves <palves@redhat.com>
11723
11724 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
11725 Decide whether a breakpoint triggered based on the SIGTRAP's
11726 siginfo.si_code.
11727 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
11728 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
11729 (linux_low_filter_event): Check for breakpoints before checking
11730 watchpoints.
11731 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
11732 siginfo.si_code.
11733 (linux_stopped_by_sw_breakpoint)
11734 (linux_supports_stopped_by_sw_breakpoint)
11735 (linux_stopped_by_hw_breakpoint)
11736 (linux_supports_stopped_by_hw_breakpoint): New functions.
11737 (linux_target_ops): Install new target methods.
11738
11739 2015-03-04 Pedro Alves <palves@redhat.com>
11740
11741 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
11742 * server.c (swbreak_feature, hwbreak_feature): New globals.
11743 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
11744 (captured_main): Clear swbreak_feature and hwbreak_feature.
11745 * server.h (swbreak_feature, hwbreak_feature): Declare.
11746 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
11747 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
11748 supports_stopped_by_hw_breakpoint>: New fields.
11749 (target_supports_stopped_by_sw_breakpoint)
11750 (target_stopped_by_sw_breakpoint)
11751 (target_supports_stopped_by_hw_breakpoint)
11752 (target_stopped_by_hw_breakpoint): Declare.
11753
11754 2015-03-04 Pedro Alves <palves@redhat.com>
11755
11756 enum lwp_stop_reason -> enum target_stop_reason
11757 * linux-low.c (check_stopped_by_breakpoint): Adjust.
11758 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
11759 (linux_wait_1, stuck_in_jump_pad_callback)
11760 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
11761 (linux_stopped_by_watchpoint):
11762 * linux-low.h (enum lwp_stop_reason): Delete.
11763 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
11764 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11765
11766 2015-03-04 Yao Qi <yao.qi@linaro.org>
11767
11768 * Makefile.in (SFILES): Add linux-aarch64-low.c.
11769
11770 2015-03-03 Gary Benson <gbenson@redhat.com>
11771
11772 * hostio.c (handle_vFile): Fix prefix lengths.
11773
11774 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
11775
11776 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
11777 ptr_bits.
11778
11779 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
11780
11781 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
11782 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
11783 (clean): Add "rm -f" for above C files.
11784 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
11785 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
11786 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
11787 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
11788 * linux-s390-low.c (HWCAP_S390_VX): New macro.
11789 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
11790 (init_registers_s390x_vx_linux64)
11791 (init_registers_s390x_tevx_linux64)
11792 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
11793 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
11794 declarations.
11795 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
11796 (s390_store_vxrs_high): New functions.
11797 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
11798 NT_S390_VXRS_HIGH.
11799 (s390_arch_setup): Add logic for selecting one of the new target
11800 descriptions. Activate the new vector regsets if applicable.
11801 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
11802 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
11803 and init_registers_s390x_tevx_linux64.
11804
11805 2015-03-01 Pedro Alves <palves@redhat.com>
11806
11807 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
11808 parameter.
11809
11810 2015-02-27 Pedro Alves <palves@redhat.com>
11811
11812 * linux-x86-low.c (u_debugreg_offset): New function.
11813 (x86_linux_dr_get, x86_linux_dr_set): Use it.
11814
11815 2015-02-27 Pedro Alves <palves@redhat.com>
11816
11817 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
11818 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
11819 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
11820 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
11821 (ps_lsetfpregs, ps_getpid)
11822 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
11823 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
11824 (ps_lsetxregs, ps_plog): Declare.
11825
11826 2015-02-27 Pedro Alves <palves@redhat.com>
11827
11828 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
11829 IP_AGENT_EXPORT_FUNC.
11830 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
11831 IP_AGENT_EXPORT_FUNC.
11832 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
11833 (IP_AGENT_EXPORT): Delete.
11834 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11835 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11836 (gdb_trampoline_buffer_error, collecting, gdb_collect)
11837 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
11838 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
11839 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
11840 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
11841 (traceframe_read_count, traceframe_write_count)
11842 (traceframes_created, trace_state_variables, get_raw_reg)
11843 (get_trace_state_variable_value, set_trace_state_variable_value)
11844 (ust_loaded, helper_thread_id, cmd_buf): Use
11845 IPA_SYM_EXPORTED_NAME.
11846 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
11847 (tracepoints) Use IP_AGENT_EXPORT_VAR.
11848 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
11849 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11850 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
11851 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
11852 EXTERN_C_PUSH/EXTERN_C_POP.
11853 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
11854 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
11855 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11856 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
11857 (traceframe_write_count, traceframe_read_count)
11858 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
11859 (about_to_request_buffer_space, get_trace_state_variable_value)
11860 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
11861 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
11862 EXTERN_C_PUSH/EXTERN_C_POP.
11863 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
11864 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
11865 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
11866 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11867 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11868 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11869 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
11870 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
11871 Define.
11872 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
11873 (IP_AGENT_EXPORT_VAR_DECL): Define.
11874 (tracing): Declare.
11875 (gdb_agent_get_raw_reg): Declare.
11876
11877 2015-02-27 Tom Tromey <tromey@redhat.com>
11878 Pedro Alves <palves@redhat.com>
11879
11880 Rename symbols whose names are reserved C++ keywords throughout.
11881
11882 2015-02-27 Pedro Alves <palves@redhat.com>
11883
11884 * Makefile.in (COMPILER): New, get it from autoconf.
11885 (CXX): Get from autoconf instead.
11886 (COMPILE.pre): Use COMPILER.
11887 (CC-LD): Rename to ...
11888 (CC_LD): ... this. Use COMPILER.
11889 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
11890 (CXX_FOR_TARGET): Default to g++ instead of gcc.
11891 * acinclude.m4: Include build-with-cxx.m4.
11892 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
11893 Disable -Werror by default if building in C++ mode.
11894 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
11895 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
11896 the C++ compiler. Save/restore CXXFLAGS too.
11897 * configure: Regenerate.
11898
11899 2015-02-27 Pedro Alves <palves@redhat.com>
11900
11901 * acinclude.m4: Include libiberty.m4.
11902 * configure.ac: Call libiberty_INIT.
11903 * config.in, configure: Regenerate.
11904
11905 2015-02-26 Pedro Alves <palves@redhat.com>
11906
11907 * linux-low.c (linux_wait_1): When incrementing the PC past a
11908 program breakpoint always use the_low_target.breakpoint_len as
11909 increment, rather than the maximum between that and
11910 the_low_target.decr_pc_after_break.
11911
11912 2015-02-23 Pedro Alves <palves@redhat.com>
11913
11914 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
11915 thread was doing a step-over; always adjust the PC if
11916 we stepped over a permanent breakpoint.
11917 (linux_wait_1): If we stepped over breakpoint that was on top of a
11918 permanent breakpoint, manually advance the PC past it.
11919
11920 2015-02-23 Pedro Alves <palves@redhat.com>
11921
11922 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
11923 modes.
11924 (x86_fill_gregset, x86_store_gregset): Use it when handling
11925 $orig_eax.
11926
11927 2015-02-20 Pedro Alves <palves@redhat.com>
11928
11929 * thread-db.c: Include "nat/linux-procfs.h".
11930 (thread_db_init): Skip listing new threads if the kernel supports
11931 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
11932
11933 2015-02-20 Pedro Alves <palves@redhat.com>
11934
11935 * linux-low.c (status_pending_p_callback): Use ptid_match.
11936
11937 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
11938
11939 PR breakpoints/16812
11940 * linux-low.c (wstatus_maybe_breakpoint): Remove.
11941 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
11942 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
11943
11944 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
11945
11946 PR breakpoints/15956
11947 * tracepoint.c (cmd_qtinit): Add check for current_thread.
11948
11949 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11950
11951 * linux-low.c (linux_low_btrace_conf): Print size.
11952 * server.c (handle_btrace_conf_general_set): New.
11953 (hanle_general_set): Call handle_btrace_conf_general_set.
11954 (handle_query): Report Qbtrace-conf:bts:size as supported.
11955
11956 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11957
11958 * linux-low.c (linux_low_enable_btrace): Update parameters.
11959 (linux_low_btrace_conf): New.
11960 (linux_target_ops)<to_btrace_conf>: Initialize.
11961 * server.c (current_btrace_conf): New.
11962 (handle_btrace_enable): Rename to ...
11963 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
11964 to target_enable_btrace. Update comment. Update users.
11965 (handle_qxfer_btrace_conf): New.
11966 (qxfer_packets): Add btrace-conf entry.
11967 (handle_query): Report qXfer:btrace-conf:read as supported packet.
11968 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
11969 (target_ops)<read_btrace_conf>: New.
11970 (target_enable_btrace): Update parameters.
11971 (target_read_btrace_conf): New.
11972
11973 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11974
11975 * server.c (handle_btrace_general_set): Remove call to
11976 target_supports_btrace.
11977 (supported_btrace_packets): New.
11978 (handle_query): Call supported_btrace_packets.
11979 * target.h: include btrace-common.h.
11980 (btrace_target_info): Removed.
11981 (supports_btrace, target_supports_btrace): Update parameters.
11982
11983 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11984
11985 * Makefile.in (SFILES): Add common/btrace-common.c.
11986 (OBS): Add common/btrace-common.o.
11987 (btrace-common.o): Add build rules.
11988 * linux-low: Include btrace-common.h.
11989 (linux_low_read_btrace): Use struct btrace_data. Call
11990 btrace_data_init and btrace_data_fini.
11991
11992 2015-02-06 Pedro Alves <palves@redhat.com>
11993
11994 * thread-db.c (find_new_threads_callback): Add debug output.
11995
11996 2015-02-04 Pedro Alves <palves@redhat.com>
11997
11998 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
11999 (resume_stopped_resumed_lwps): New function.
12000 (linux_wait_for_event_filtered): Use it.
12001
12002 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
12003
12004 * Makefile.in (SFILES): Add linux-personality.c.
12005 (linux-personality.o): New rule.
12006 * configure.srv (srv_linux_obj): Add linux-personality.o to the
12007 list of objects to be built.
12008 * linux-low.c: Include nat/linux-personality.h.
12009 (linux_create_inferior): Remove code to disable address space
12010 randomization (moved to ../nat/linux-personality.c). Create
12011 cleanup to disable address space randomization.
12012
12013 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
12014
12015 * Makefile.in (posix-strerror.o): New rule.
12016 (mingw-strerror.o): Likewise.
12017 * configure: Regenerated.
12018 * configure.ac: Source file ../common/common.host. Initialize new
12019 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
12020
12021 2015-01-14 Yao Qi <yao@codesourcery.com>
12022
12023 * Makefile.in (SFILES): Add nat/ppc-linux.c.
12024 (ppc-linux.o): New rule.
12025 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
12026 * configure.ac: AC_CHECK_FUNCS(getauxval).
12027 * config.in: Re-generated.
12028 * configure: Re-generated.
12029 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
12030 ppc64_64bit_inferior_p
12031
12032 2015-01-14 Yao Qi <yao@codesourcery.com>
12033
12034 * linux-ppc-low.c: Include "nat/ppc-linux.h".
12035 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
12036 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
12037 (PT_ORIG_R3, PT_TRAP): Likewise.
12038 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
12039 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
12040 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
12041
12042 2015-01-10 Joel Brobecker <brobecker@adacore.com>
12043
12044 * i387-fp.c (i387_cache_to_xsave): In look over
12045 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
12046 zmmh_low_space field by use of zmmh_high_space.
12047
12048 2015-01-09 Pedro Alves <palves@redhat.com>
12049
12050 * linux-low.c (step_over_bkpt): Move higher up in the file.
12051 (handle_extended_wait): Don't store the stop_pc here.
12052 (get_stop_pc): Adjust comments and rename to ...
12053 (check_stopped_by_breakpoint): ... this. Record whether the LWP
12054 stopped for a software breakpoint or hardware breakpoint.
12055 (thread_still_has_status_pending_p): New function.
12056 (status_pending_p_callback): Use
12057 thread_still_has_status_pending_p. If the event is no longer
12058 interesting, resume the LWP.
12059 (handle_tracepoints): Add assert.
12060 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
12061 (wstatus_maybe_breakpoint): New function.
12062 (cancel_breakpoint): Delete function.
12063 (check_stopped_by_watchpoint): New function, factored out from
12064 linux_low_filter_event.
12065 (lp_status_maybe_breakpoint): Delete function.
12066 (linux_low_filter_event): Remove filter_ptid argument.
12067 Leave thread group exits pending here. Store the LWP's stop PC.
12068 Always leave events pending.
12069 (linux_wait_for_event_filtered): Pull all events out of the
12070 kernel, and leave them all pending.
12071 (count_events_callback, select_event_lwp_callback): Consider all
12072 events.
12073 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
12074 (select_event_lwp): Only give preference to the stepping LWP in
12075 all-stop mode. Adjust comments.
12076 (ignore_event): New function.
12077 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
12078 references to cancel_breakpoints. Adjust to renames. Also give
12079 equal priority to all LWPs that have had events in non-stop mode.
12080 If reporting a software breakpoint event, unadjust the LWP's PC.
12081 (linux_wait): If linux_wait_1 returned an ignored event, retry.
12082 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
12083 Adjust.
12084 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
12085 (resume_status_pending_p): Use thread_still_has_status_pending_p.
12086 (linux_stopped_by_watchpoint): Adjust.
12087 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
12088 * linux-low.h (enum lwp_stop_reason): New.
12089 (struct lwp_info) <stop_pc>: Adjust comment.
12090 <stopped_by_watchpoint>: Delete field.
12091 <stop_reason>: New field.
12092 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
12093 * mem-break.c (software_breakpoint_inserted_here)
12094 (hardware_breakpoint_inserted_here): New function.
12095 * mem-break.h (software_breakpoint_inserted_here)
12096 (hardware_breakpoint_inserted_here): Declare.
12097 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
12098 (cancel_breakpoints): Delete.
12099 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
12100 (upload_fast_traceframes): Remove references to
12101 cancel_breakpoints.
12102
12103 2015-01-09 Pedro Alves <palves@redhat.com>
12104
12105 * thread-db.c (find_new_threads_callback): Ignore thread if the
12106 kernel thread ID is -1.
12107
12108 2015-01-09 Pedro Alves <palves@redhat.com>
12109
12110 * linux-low.c (linux_attach_fail_reason_string): Move to
12111 nat/linux-ptrace.c, and rename.
12112 (linux_attach_lwp): Update comment.
12113 (attach_proc_task_lwp_callback): New function.
12114 (linux_attach): Adjust to rename and use
12115 linux_proc_attach_tgid_threads.
12116 (linux_attach_fail_reason_string): Delete declaration.
12117
12118 2015-01-01 Joel Brobecker <brobecker@adacore.com>
12119
12120 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
12121 * server.c (gdbserver_version): Likewise.
12122
12123 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
12124
12125 * remote-utils.c: Include ctype.h.
12126 (input_interrupt): Explicitly handle the case when the char
12127 received is the NUL byte. Improve the printing of non-ASCII
12128 characters.
12129
12130 2014-12-16 Joel Brobecker <brobecker@adacore.com>
12131
12132 * linux-low.c (linux_low_filter_event): Update call to
12133 linux_enable_event_reporting following the addition of
12134 a new parameter to that function.
12135
12136 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
12137
12138 PR server/17457
12139 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
12140 (AARCH64_FPCR_REGNO): Likewise.
12141 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
12142 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
12143 (aarch64_store_fpregset): Likewise.
12144
12145 2014-12-15 Joel Brobecker <brobecker@adacore.com>
12146
12147 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
12148 Remove FIXME comment about assumption about N.
12149
12150 2014-12-13 Joel Brobecker <brobecker@adacore.com>
12151
12152 * configure.ac: If large-file support is disabled in GDBserver,
12153 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
12154 * configure: Regenerate.
12155
12156 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12157
12158 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
12159 warning upon ENODATA from ptrace.
12160 * linux-s390-low.c (s390_store_tdb): New.
12161 (s390_regsets): Add regset for NT_S390_TDB.
12162
12163 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12164
12165 * linux-low.c (regsets_store_inferior_registers): Skip regsets
12166 without a fill_function.
12167 * linux-s390-low.c (s390_fill_last_break): Remove.
12168 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
12169 (s390_arch_setup): Use regset's size instead of fill_function for
12170 loop end condition.
12171
12172 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12173
12174 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
12175 the regset's store function when ptrace returned an error.
12176 * regcache.c (get_thread_regcache): Invalidate register cache
12177 before fetching inferior's registers.
12178
12179 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12180
12181 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
12182 while-loop as for-loop.
12183 (regsets_store_inferior_registers): Likewise.
12184
12185 2014-11-28 Yao Qi <yao@codesourcery.com>
12186
12187 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
12188 * config.in, configure: Re-generate.
12189 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
12190 is defined.
12191
12192 2014-11-21 Yao Qi <yao@codesourcery.com>
12193
12194 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
12195 (AC_CHECK_HEADERS): Remove malloc.h.
12196 * configure: Re-generated.
12197 * config.in: Re-generated.
12198 * server.h: Don't include alloca.h and malloc.h.
12199 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
12200 Don't include malloc.h.
12201
12202 2014-11-17 Joel Brobecker <brobecker@adacore.com>
12203
12204 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
12205 corresponding ERRNO check in same block.
12206
12207 2014-11-12 Pedro Alves <palves@redhat.com>
12208
12209 * server.c (cont_thread): Update comment.
12210 (start_inferior, attach_inferior): No longer clear cont_thread.
12211 (handle_v_cont): No longer set cont_thread.
12212 (captured_main): Clear cont_thread each time a GDB connects.
12213
12214 2014-11-12 Pedro Alves <palves@redhat.com>
12215
12216 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
12217 thread, and don't resume all threads if the Hc thread has exited.
12218
12219 2014-11-12 Pedro Alves <palves@redhat.com>
12220
12221 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
12222 the process group instead of to a specific LWP.
12223
12224 2014-10-15 Pedro Alves <palves@redhat.com>
12225
12226 PR server/17487
12227 * win32-arm-low.c (arm_set_thread_context): Remove current_event
12228 parameter.
12229 (arm_set_thread_context): Delete.
12230 (the_low_target): Adjust.
12231 * win32-i386-low.c (debug_registers_changed)
12232 (debug_registers_used): Delete.
12233 (update_debug_registers_callback): New function.
12234 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
12235 needing to update their debug registers.
12236 (win32_get_current_dr): New function.
12237 (x86_dr_low_get_addr, x86_dr_low_get_control)
12238 (x86_dr_low_get_status): Fetch the debug register from the thread
12239 record's context.
12240 (i386_initial_stuff): Adjust.
12241 (i386_get_thread_context): Remove current_event parameter. Don't
12242 clear debug_registers_changed nor copy DR values to
12243 debug_reg_state.
12244 (i386_set_thread_context): Delete.
12245 (i386_prepare_to_resume): New function.
12246 (i386_thread_added): Mark the thread as needing to update irs
12247 debug registers.
12248 (the_low_target): Remove i386_set_thread_context and install
12249 i386_prepare_to_resume.
12250 * win32-low.c (win32_get_thread_context): Adjust.
12251 (win32_set_thread_context): Use SetThreadContext
12252 directly.
12253 (win32_prepare_to_resume): New function.
12254 (win32_require_context): New function, factored out from ...
12255 (thread_rec): ... this.
12256 (continue_one_thread): Call win32_prepare_to_resume on each thread
12257 we're about to continue.
12258 (win32_resume): Call win32_prepare_to_resume on the event thread.
12259 * win32-low.h (struct win32_thread_info)
12260 <debug_registers_changed>: New field.
12261 (struct win32_target_ops): Change prototype of set_thread_context,
12262 delete set_thread_context and add prepare_to_resume.
12263 (win32_require_context): New declaration.
12264
12265 2014-10-08 Gary Benson <gbenson@redhat.com>
12266
12267 * server.h: Do not include common-exceptions.h.
12268
12269 2014-10-08 Gary Benson <gbenson@redhat.com>
12270
12271 * server.h: Do not include cleanups.h.
12272
12273 2014-09-30 James Hogan <james.hogan@imgtec.com>
12274
12275 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
12276 mips64-dsp-linux.c.
12277
12278 2014-09-23 Yao Qi <yao@codesourcery.com>
12279
12280 * linux-low.c (lp_status_maybe_breakpoint): New function.
12281 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
12282 (count_events_callback): Likewise.
12283 (select_event_lwp_callback): Likewise.
12284 (cancel_breakpoints_callback): Likewise.
12285
12286 2014-09-19 Don Breazeal <donb@codesourcery.com>
12287
12288 * linux-low.c (handle_extended_wait): Call
12289 linux_ptrace_get_extended_event.
12290 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
12291 linux_is_extended_waitstatus.
12292
12293 2014-09-16 Joel Brobecker <brobecker@adacore.com>
12294
12295 * Makefile.in (CPPFLAGS): Define.
12296 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
12297 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
12298
12299 2014-09-16 Gary Benson <gbenson@redhat.com>
12300
12301 * inferiors.h (current_inferior): Renamed as...
12302 (current_thread): New variable. All uses updated.
12303 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
12304 (maybe_move_out_of_jump_pad): Likewise.
12305 (cancel_breakpoint): Likewise.
12306 (linux_low_filter_event): Likewise.
12307 (wait_for_sigstop): Likewise.
12308 (linux_resume_one_lwp): Likewise.
12309 (need_step_over_p): Likewise.
12310 (start_step_over): Likewise.
12311 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
12312 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
12313 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
12314 and save_inferior as saved_thread.
12315 * regcache.c (get_thread_regcache): Renamed saved_inferior as
12316 saved_thread.
12317 (regcache_invalidate_thread): Likewise.
12318 * remote-utils.c (prepare_resume_reply): Likewise.
12319 * thread-db.c (thread_db_get_tls_address): Likewise.
12320 (disable_thread_event_reporting): Likewise.
12321 (remove_thread_event_breakpoints): Likewise.
12322 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
12323 as saved_thread.
12324 * target.h (set_desired_inferior): Renamed as...
12325 (set_desired_thread): New declaration. All uses updated.
12326 * server.c (myresume): Updated comment to reference thread instead
12327 of inferior.
12328 (handle_serial_event): Likewise.
12329 (handle_target_event): Likewise.
12330
12331 2014-09-12 Tom Tromey <tromey@redhat.com>
12332 Gary Benson <gbenson@redhat.com>
12333
12334 * regcache.h: Include common-regcache.h.
12335 (regcache_read_pc): Don't declare.
12336 * regcache.c (get_thread_regcache_for_ptid): New function.
12337
12338 2014-09-11 Tom Tromey <tromey@redhat.com>
12339 Gary Benson <gbenson@redhat.com>
12340
12341 * symbol.c: New file.
12342 * Makefile.in (SFILES): Add symbol.c.
12343 (OBS): Add symbol.o.
12344
12345 2014-09-11 Gary Benson <gbenson@redhat.com>
12346
12347 * target.c (target_stop_ptid, target_continue_ptid): New
12348 functions.
12349
12350 2014-09-11 Tom Tromey <tromey@redhat.com>
12351 Gary Benson <gbenson@redhat.com>
12352
12353 * target.h: Include target/target.h.
12354 * target.c (target_read_memory, target_read_uint32)
12355 (target_write_memory): New functions.
12356
12357 2014-09-11 Gary Benson <gbenson@redhat.com>
12358
12359 * server.h (debug_hw_points): Don't declare.
12360 * server.c (debug_hw_points): Don't define. Replace all uses
12361 with show_debug_regs.
12362 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
12363 all uses with show_debug_regs.
12364
12365 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
12366
12367 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
12368 endianness into account.
12369 (ppc_supply_ptrace_register): Likewise.
12370
12371 2014-09-03 James Hogan <james.hogan@imgtec.com>
12372
12373 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
12374 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
12375
12376 2014-09-03 Gary Benson <gbenson@redhat.com>
12377
12378 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
12379 ALL_DEBUG_ADDRESS_REGISTERS.
12380
12381 2014-09-02 Gary Benson <gbenson@redhat.com>
12382
12383 * i386-low.h: Renamed as...
12384 * x86-low.h: New file. All type, function and variable name
12385 prefixes changed from "i386_" to "x86_". All references updated.
12386 * i386-low.c: Renamed as...
12387 * x86-low.c: New file. All type, function and variable name
12388 prefixes changed from "i386_" to "x86_". All references updated.
12389
12390 2014-09-02 Gary Benson <gbenson@redhat.com>
12391
12392 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
12393 (x86_linux_new_thread): Likewise.
12394
12395 2014-08-29 Gary Benson <gbenson@redhat.com>
12396
12397 * server.h (setjmp.h): Do not include.
12398 (toplevel): Do not declare.
12399 (common-exceptions.h): Include.
12400 (cleanups.h): Likewise.
12401 * server.c (toplevel): Do not define.
12402 (exit_code): New static global.
12403 (detach_or_kill_for_exit_cleanup): New function.
12404 (main): New function. Original main renamed to...
12405 (captured_main): New function.
12406 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
12407
12408 2014-08-29 Gary Benson <gbenson@redhat.com>
12409
12410 * Makefile.in (SFILES): Add common/common-exceptions.c.
12411 (OBS): Add common-exceptions.o.
12412 (common-exceptions.o): New rule.
12413 * utils.c (prepare_to_throw_exception): New function.
12414
12415 2014-08-29 Gary Benson <gbenson@redhat.com>
12416
12417 * config.in: Regenerate.
12418 * configure: Likewise.
12419
12420 2014-08-29 Gary Benson <gbenson@redhat.com>
12421
12422 * Makefile.in (SFILES): Add common/cleanups.c.
12423 (OBS): cleanups.o.
12424 (cleanups.o): New rule.
12425
12426 2014-08-29 Gary Benson <gbenson@redhat.com>
12427
12428 * utils.c (internal_vwarning): New function.
12429
12430 2014-08-28 Gary Benson <gbenson@redhat.com>
12431
12432 * utils.h (fatal): Remove declaration.
12433 * utils.c (fatal): Remove function.
12434
12435 2014-08-28 Gary Benson <gbenson@redhat.com>
12436
12437 * tracepoint.c (gdb_agent_init): Replace fatal with
12438 perror_with_name.
12439 (initialize_tracepoint): Likewise.
12440
12441 2014-08-28 Gary Benson <gbenson@redhat.com>
12442
12443 * remote-utils.c (remote_prepare): Replace fatal with error.
12444
12445 2014-08-28 Gary Benson <gbenson@redhat.com>
12446
12447 * linux-low.c (linux_async): Replace fatal with warning.
12448 Tidy up and return.
12449 (linux_start_non_stop): Return -1 if linux_async failed.
12450
12451 2014-08-28 Gary Benson <gbenson@redhat.com>
12452
12453 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
12454 gdb_assert.
12455 (i386_dr_low_get_addr): Remove vague comment.
12456 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
12457 gdb_assert.
12458
12459 2014-08-28 Gary Benson <gbenson@redhat.com>
12460
12461 * inferiors.c (get_thread_process): Replace check with gdb_assert.
12462 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
12463 internal_error.
12464 (linux_resume_one_lwp): Likewise.
12465 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
12466 gdb_assert.
12467 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
12468 with internal_error.
12469 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
12470 (init_register_cache): Replace fatal with gdb_assert_not_reached.
12471 (find_register_by_name): Replace fatal with internal_error.
12472 (find_regno): Likewise.
12473 * tdesc.c (init_target_desc): Replace check with gdb_assert.
12474 * thread-db.c (thread_db_create_event): Likewise.
12475 (thread_db_load_search): Likewise.
12476 (try_thread_db_load_1): Likewise.
12477 * tracepoint.c (get_jump_space_head): Replace fatal with
12478 internal_error.
12479 (claim_trampoline_space): Likewise.
12480 (have_fast_tracepoint_trampoline_buffer): Likewise.
12481 (cmd_qtstart): Likewise.
12482 (stop_tracing): Likewise.
12483 (fast_tracepoint_collecting): Likewise.
12484 (target_malloc): Likewise.
12485 (download_tracepoint): Likewise.
12486 (download_trace_state_variables): Replace check with gdb_assert.
12487 (upload_fast_traceframes): Replace fatal with internal_error.
12488
12489 2014-08-19 Tom Tromey <tromey@redhat.com>
12490 Gary Benson <gbenson@redhat.com>
12491
12492 * Makefile.in (SFILES): Add common/common-debug.c.
12493 (OBS): Add common-debug.o.
12494 (common-debug.o): New rule.
12495 * debug.h (debug_printf): Don't declare.
12496 * debug.c (debug_printf): Renamed and rewritten as...
12497 (debug_vprintf): New function.
12498
12499 2014-08-19 Gary Benson <gbenson@redhat.com>
12500
12501 * utils.h: Do not include print-utils.h.
12502
12503 2014-08-19 Tom Tromey <tromey@redhat.com>
12504 Gary Benson <gbenson@redhat.com>
12505
12506 * server.h: Add static assertion.
12507 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
12508
12509 2014-08-19 Tom Tromey <tromey@redhat.com>
12510 Gary Benson <gbenson@redhat.com>
12511
12512 * Makefile.in (SFILES): Add common/errors.c.
12513 (OBS): Add errors.o.
12514 (IPA_OBS): Add errors-ipa.o.
12515 (errors.o): New rule.
12516 (errors-ipa.o): Likewise.
12517 * utils.h (perror_with_name, error, warning): Don't declare.
12518 * utils.c (warning): Renamed and rewritten as...
12519 (vwarning): New function.
12520 (error): Renamed and rewritten as...
12521 (verror): New function.
12522 (internal_error): Renamed and rewritten as...
12523 (internal_verror): New function.
12524
12525 2014-08-07 Gary Benson <gbenson@redhat.com>
12526
12527 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
12528 * configure: Regenerate.
12529 * config.in: Likewise.
12530 * server.h: Do not include errno.h.
12531 * event-loop.c: Likewise.
12532 * hostio-errno.c: Likewise.
12533 * linux-low.c: Likewise.
12534 * remote-utils.c: Likewise.
12535 * spu-low.c: Likewise.
12536 * utils.c: Likewise.
12537 * gdbreplay.c: Unconditionally include errno.h.
12538
12539 2014-08-07 Gary Benson <gbenson@redhat.com>
12540
12541 * server.h: Do not include string.h.
12542 * event-loop.c: Likewise.
12543 * linux-low.c: Likewise.
12544 * regcache.c: Likewise.
12545 * remote-utils.c: Likewise.
12546 * spu-low.c: Likewise.
12547 * utils.c: Likewise.
12548
12549 2014-08-07 Gary Benson <gbenson@redhat.com>
12550
12551 * server.h: Do not include gdb_assert.h.
12552
12553 2014-08-07 Gary Benson <gbenson@redhat.com>
12554
12555 * server.h: Do not include common-utils.h.
12556
12557 2014-08-07 Gary Benson <gbenson@redhat.com>
12558
12559 * server.h: Do not include ptid.h.
12560 * notif.h: Likewise.
12561
12562 2014-08-07 Gary Benson <gbenson@redhat.com>
12563
12564 * server.h: Do not include gdb_locale.h.
12565
12566 2014-08-07 Gary Benson <gbenson@redhat.com>
12567
12568 * server.h: Do not include gdb/signals.h.
12569 * win32-low.c: Likewise.
12570
12571 2014-08-07 Gary Benson <gbenson@redhat.com>
12572
12573 * server.h: Do not include pathmax.h.
12574
12575 2014-08-07 Gary Benson <gbenson@redhat.com>
12576
12577 * server.h: Do not include libiberty.h.
12578 * linux-bfin-low.c: Likewise.
12579
12580 2014-08-07 Gary Benson <gbenson@redhat.com>
12581
12582 * server.h: Do not include ansidecl.h.
12583
12584 2014-08-07 Gary Benson <gbenson@redhat.com>
12585
12586 * linux-x86-low.c: Do not include stddef.h.
12587 * lynx-ppc-low.c: Likewise.
12588 * tracepoint.c: Likewise.
12589
12590 2014-08-07 Gary Benson <gbenson@redhat.com>
12591
12592 * server.h: Do not include stdarg.h.
12593 * nto-low.c: Likewise.
12594
12595 2014-08-07 Gary Benson <gbenson@redhat.com>
12596
12597 * server.h: Do not include stdlib.h.
12598 * inferiors.c: Likewise.
12599 * linux-low.c: Likewise.
12600 * regcache.c: Likewise.
12601 * spu-low.c: Likewise.
12602 * tracepoint.c: Likewise.
12603 * utils.c: Likewise.
12604
12605 2014-08-07 Gary Benson <gbenson@redhat.com>
12606
12607 * server.h: Do not include stdio.h.
12608 * linux-low.c: Likewise.
12609 * remote-utils.c: Likewise.
12610 * spu-low.c: Likewise.
12611 * utils.c: Likewise.
12612 * wincecompat.c: Likewise.
12613
12614 2014-08-06 Gary Benson <gbenson@redhat.com>
12615
12616 * regcache.c (init_register_cache): Move conditionals inside if.
12617
12618 2014-08-06 Gary Benson <gbenson@redhat.com>
12619
12620 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
12621
12622 2014-07-31 Gary Benson <gbenson@redhat.com>
12623
12624 * ax.h: Do not include server.h.
12625 * gdbthread.h: Likewise.
12626 * lynx-low.h: Likewise.
12627 * notif.h: Likewise.
12628
12629 2014-07-30 Gary Benson <gbenson@redhat.com>
12630
12631 * server.h: Include common-defs.h.
12632 Do not include config.h or build-gnulib-gdbserver/config.h.
12633
12634 2014-07-30 Gary Benson <gbenson@redhat.com>
12635
12636 * hostio-errno.c: Move server.h to top of includes list.
12637 * inferiors.c: Likewise.
12638 * linux-x86-low.c: Likewise.
12639 * notif.c: Include server.h.
12640
12641 2014-07-24 Tom Tromey <tromey@redhat.com>
12642 Gary Benson <gbenson@redhat.com>
12643
12644 * server.h (CORE_ADDR): Now unsigned.
12645
12646 2014-07-16 Pedro Alves <palves@redhat.com>
12647
12648 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
12649
12650 2014-07-15 Pedro Alves <palves@redhat.com>
12651
12652 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
12653 copy.
12654
12655 2014-07-11 Pedro Alves <palves@redhat.com>
12656
12657 * linux-low.c (kill_wait_lwp): New function, based on
12658 kill_one_lwp_callback, but use my_waitpid directly.
12659 (kill_one_lwp_callback, linux_kill): Use it.
12660
12661 2014-06-23 Pedro Alves <palves@redhat.com>
12662
12663 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
12664 before setting DR0..DR3.
12665
12666 2014-06-20 Gary Benson <gbenson@redhat.com>
12667
12668 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
12669 * configure: Regenerated.
12670 * config.in: Likewise.
12671
12672 2014-06-20 Gary Benson <gbenson@redhat.com>
12673
12674 * Makefile.in (SFILES): Update locations for files moved
12675 from common to nat.
12676 (object file files): Reordered.
12677
12678 2014-06-20 Gary Benson <gbenson@redhat.com>
12679
12680 * i386-low.h (i386_dr_low_can_set_addr): Removed.
12681 (i386_dr_low_set_addr): Likewise.
12682 (i386_dr_low_get_addr): Likewise.
12683 (i386_dr_low_can_set_control): Likewise.
12684 (i386_dr_low_set_control): Likewise.
12685 (i386_dr_low_get_control): Likewise.
12686 (i386_dr_low_get_status): Likewise.
12687 (i386_get_debug_register_length): Likewise.
12688 * linux-x86-low.c (i386_dr_low_set_addr):
12689 Changed signature. Made static.
12690 (i386_dr_low_get_addr): Likewise.
12691 (i386_dr_low_set_control): Likewise.
12692 (i386_dr_low_get_control): Likewise.
12693 (i386_dr_low_get_status): Likewise.
12694 (i386_dr_low): New global variable.
12695 * win32-i386-low.c (i386_dr_low_set_addr):
12696 Changed signature. Made static.
12697 (i386_dr_low_get_addr): Likewise.
12698 (i386_dr_low_set_control): Likewise.
12699 (i386_dr_low_get_control): Likewise.
12700 (i386_dr_low_get_status): Likewise.
12701 (i386_dr_low): New global variable.
12702
12703 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
12704
12705 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
12706 * Makefile.in (AR, AR_FLAGS): Define.
12707 * configure: Regenerate.
12708
12709 2014-06-19 Gary Benson <gbenson@redhat.com>
12710
12711 * Makefile.in (i386-dregs.o): New rule.
12712 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
12713 * i386-low.c (target.h): Remove include.
12714 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
12715 (DR_CONTROL_SHIFT): Likewise.
12716 (DR_CONTROL_SIZE): Likewise.
12717 (DR_RW_EXECUTE): Likewise.
12718 (DR_RW_WRITE): Likewise.
12719 (DR_RW_READ): Likewise.
12720 (DR_RW_IORW): Likewise.
12721 (DR_LEN_1): Likewise.
12722 (DR_LEN_2): Likewise.
12723 (DR_LEN_4): Likewise.
12724 (DR_LEN_8): Likewise.
12725 (DR_LOCAL_ENABLE_SHIFT): Likewise.
12726 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
12727 (DR_ENABLE_SIZE): Likewise.
12728 (DR_LOCAL_SLOWDOWN): Likewise.
12729 (DR_GLOBAL_SLOWDOWN): Likewise.
12730 (DR_CONTROL_RESERVED): Likewise.
12731 (I386_DR_CONTROL_MASK): Likewise.
12732 (I386_DR_VACANT): Likewise.
12733 (I386_DR_LOCAL_ENABLE): Likewise.
12734 (I386_DR_GLOBAL_ENABLE): Likewise.
12735 (I386_DR_DISABLE): Likewise.
12736 (I386_DR_SET_RW_LEN): Likewise.
12737 (I386_DR_GET_RW_LEN): Likewise.
12738 (I386_DR_WATCH_HIT): Likewise.
12739 (i386_wp_op_t): Likewise.
12740 (i386_show_dr): Likewise.
12741 (i386_length_and_rw_bits): Likewise.
12742 (i386_insert_aligned_watchpoint): Likewise.
12743 (i386_remove_aligned_watchpoint): Likewise.
12744 (i386_handle_nonaligned_watchpoint): Likewise.
12745 i386_update_inferior_debug_regs(): Likewise.
12746 (i386_dr_insert_watchpoint): Likewise.
12747 (i386_dr_remove_watchpoint): Likewise.
12748 (i386_dr_region_ok_for_watchpoint): Likewise.
12749 (i386_dr_stopped_data_address): Likewise.
12750 (i386_dr_stopped_by_watchpoint): Likewise.
12751
12752 2014-06-19 Gary Benson <gbenson@redhat.com>
12753
12754 * i386-low.c (i386_dr_show): Renamed to
12755 i386_show_dr and made static. All uses updated.
12756 (i386_dr_length_and_rw_bits): Renamed to
12757 i386_length_and_rw_bits and made static.
12758 All uses updated.
12759 (i386_dr_insert_aligned_watchpoint): Renamed to
12760 i386_insert_aligned_watchpoint and made static.
12761 All uses updated.
12762 (i386_dr_remove_aligned_watchpoint): Renamed to
12763 i386_remove_aligned_watchpoint and made static.
12764 All uses updated.
12765 (i386_dr_update_inferior_debug_regs): Renamed to
12766 i386_update_inferior_debug_regs and made static.
12767 All uses updated.
12768
12769 2014-06-18 Gary Benson <gbenson@redhat.com>
12770
12771 * i386-low.h (i386_dr_low_can_set_addr): New macro.
12772 (i386_dr_low_can_set_control): Likewise.
12773 (i386_get_debug_register_length): Likewise.
12774 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
12775 (i386_dr_low_can_set_control): Likewise.
12776 (i386_get_debug_register_length): Likewise.
12777
12778 2014-06-17 Gary Benson <gbenson@redhat.com>
12779
12780 * i386-low.h (i386-dregs.h): New include.
12781 (DR_FIRSTADDR): Now in i386-dregs.h.
12782 (DR_LASTADDR): Likewise.
12783 (DR_NADDR): Likewise.
12784 (DR_STATUS): Likewise.
12785 (DR_CONTROL): Likewise.
12786 (i386_debug_reg_state): Likewise.
12787 (i386_dr_insert_watchpoint): Likewise.
12788 (i386_dr_remove_watchpoint): Likewise.
12789 (i386_dr_region_ok_for_watchpoint): Likewise.
12790 (i386_dr_stopped_data_address): Likewise.
12791 (i386_dr_stopped_by_watchpoint): Likewise.
12792 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
12793
12794 2014-06-18 Gary Benson <gbenson@redhat.com>
12795
12796 * i386-low.h (i386_low_insert_watchpoint): Renamed to
12797 i386_dr_insert_watchpoint.
12798 (i386_low_remove_watchpoint): Renamed to
12799 i386_dr_remove_watchpoint.
12800 (i386_low_region_ok_for_watchpoint): Renamed to
12801 i386_dr_region_ok_for_watchpoint.
12802 (i386_low_stopped_data_address): Renamed to
12803 i386_dr_stopped_data_address.
12804 (i386_low_stopped_by_watchpoint): Renamed to
12805 i386_dr_stopped_by_watchpoint.
12806 * i386-low.c (i386_show_dr): Renamed to
12807 i386_dr_show and made nonstatic. All uses updated.
12808 (i386_length_and_rw_bits): Renamed to
12809 i386_dr_length_and_rw_bits and made nonstatic.
12810 All uses updated.
12811 (i386_insert_aligned_watchpoint): Renamed to
12812 i386_dr_insert_aligned_watchpoint and made nonstatic.
12813 All uses updated.
12814 (i386_remove_aligned_watchpoint): Renamed to
12815 i386_dr_remove_aligned_watchpoint and made nonstatic.
12816 All uses updated.
12817 (i386_update_inferior_debug_regs): Renamed to
12818 i386_dr_update_inferior_debug_regs and made nonstatic.
12819 All uses updated.
12820 (i386_low_insert_watchpoint): Renamed to
12821 i386_dr_insert_watchpoint. All uses updated.
12822 (i386_low_remove_watchpoint): Renamed to
12823 i386_dr_remove_watchpoint. All uses updated.
12824 (i386_low_region_ok_for_watchpoint): Renamed to
12825 i386_dr_region_ok_for_watchpoint. All uses updated.
12826 (i386_low_stopped_data_address): Renamed to
12827 i386_dr_stopped_data_address. All uses updated.
12828 (i386_low_stopped_by_watchpoint): Renamed to
12829 i386_dr_stopped_by_watchpoint. All uses updated.
12830
12831 2014-06-18 Gary Benson <gbenson@redhat.com>
12832
12833 * i386-low.c (i386_dr_low_can_set_addr): New macro.
12834 (i386_dr_low_can_set_control): Likewise.
12835 (i386_insert_aligned_watchpoint): New check.
12836
12837 2014-06-18 Gary Benson <gbenson@redhat.com>
12838
12839 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
12840 Renamed to state.
12841
12842 2014-06-18 Gary Benson <gbenson@redhat.com>
12843
12844 * i386-low.c (i386_length_and_rw_bits): Use internal_error
12845 instead of fatal and error.
12846 (i386_handle_nonaligned_watchpoint): Likewise.
12847
12848 2014-06-18 Gary Benson <gbenson@redhat.com>
12849
12850 * i386-low.c (i386_get_debug_register_length): New macro.
12851 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
12852 (i386_show_dr): Use debug_printf instead of fprintf. Use
12853 phex to format values.
12854
12855 2014-06-18 Gary Benson <gbenson@redhat.com>
12856
12857 * i386-low.h: Comment changes.
12858 * i386-low.c: Likewise.
12859
12860 2014-06-18 Gary Benson <gbenson@redhat.com>
12861
12862 * i386-low.c: Whitespace changes.
12863
12864 2014-06-12 Tom Tromey <tromey@redhat.com>
12865
12866 * utils.c (freeargv): Remove.
12867
12868 2014-06-12 Tom Tromey <tromey@redhat.com>
12869
12870 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
12871 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
12872 (parse_debug_format_options): Likewise.
12873 (gdbserver_usage): Likewise.
12874 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
12875 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
12876 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
12877 against libiberty.
12878 ($(LIBGNU)): Depend on libiberty.
12879 (all-lib): Recurse into all subdirs.
12880 (install-only): Invoke "install" target in subdirs.
12881 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
12882 targets.
12883 * configure: Rebuild.
12884 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
12885 for vasprintf, vsnprintf, or gettimeofday.
12886 * configure.srv: Don't add safe-ctype.o or lbasename.o to
12887 srv_tgtobj.
12888
12889 2014-06-05 Joel Brobecker <brobecker@adacore.com>
12890
12891 * development.sh: Delete.
12892 * Makefile.in (config.status): Adjust dependency on development.sh.
12893 * configure.ac: Adjust development.sh source call.
12894 * configure: Regenerate.
12895
12896 2014-06-02 Pedro Alves <palves@redhat.com>
12897
12898 * ax.c (gdb_free_agent_expr): New function.
12899 * ax.h (gdb_free_agent_expr): New declaration.
12900 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
12901 list.
12902 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
12903 static.
12904 (clear_breakpoint_conditions_and_commands): New function.
12905 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
12906 (clear_breakpoint_conditions_and_commands): New declaration.
12907
12908 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12909
12910 * linux-aarch64-low.c (asm/ptrace.h): Include.
12911
12912 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12913
12914 Fix TLS access for -static -pthread.
12915 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
12916 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
12917 (thread_db_load_search, try_thread_db_load_1): Initialize it.
12918
12919 2014-05-20 Pedro Alves <palves@redhat.com>
12920
12921 * linux-aarch64-low.c (aarch64_insert_point)
12922 (aarch64_remove_point): No longer check whether the type is
12923 supported here. Adjust to new interface.
12924 (the_low_target): Install aarch64_supports_z_point_type as
12925 supports_z_point_type method.
12926 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
12927 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
12928 instead of a Z packet char. Adjust.
12929 (arm_supports_z_point_type): New function.
12930 (arm_insert_point, arm_remove_point): Adjust to new interface.
12931 (the_low_target): Install arm_supports_z_point_type.
12932 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
12933 (cris_insert_point, cris_remove_point): Adjust to new interface.
12934 Don't check whether the type is supported here.
12935 (the_low_target): Install cris_supports_z_point_type.
12936 * linux-low.c (linux_supports_z_point_type): New function.
12937 (linux_insert_point, linux_remove_point): Adjust to new interface.
12938 * linux-low.h (struct linux_target_ops) <insert_point,
12939 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
12940 raw_breakpoint pointer parameter.
12941 <supports_z_point_type>: New method.
12942 * linux-mips-low.c (mips_supports_z_point_type): New function.
12943 (mips_insert_point, mips_remove_point): Adjust to new interface.
12944 Use mips_supports_z_point_type.
12945 (the_low_target): Install mips_supports_z_point_type.
12946 * linux-ppc-low.c (the_low_target): Install NULL as
12947 supports_z_point_type method.
12948 * linux-s390-low.c (the_low_target): Install NULL as
12949 supports_z_point_type method.
12950 * linux-sparc-low.c (the_low_target): Install NULL as
12951 supports_z_point_type method.
12952 * linux-x86-low.c (x86_supports_z_point_type): New function.
12953 (x86_insert_point): Adjust to new insert_point interface. Use
12954 insert_memory_breakpoint. Adjust to new
12955 i386_low_insert_watchpoint interface.
12956 (x86_remove_point): Adjust to remove_point interface. Use
12957 remove_memory_breakpoint. Adjust to new
12958 i386_low_remove_watchpoint interface.
12959 (the_low_target): Install x86_supports_z_point_type.
12960 * lynx-low.c (lynx_target_ops): Install NULL as
12961 supports_z_point_type callback.
12962 * nto-low.c (nto_supports_z_point_type): New.
12963 (nto_insert_point, nto_remove_point): Adjust to new interface.
12964 (nto_target_ops): Install nto_supports_z_point_type.
12965 * mem-break.c: Adjust intro comment.
12966 (struct raw_breakpoint) <raw_type, size>: New fields.
12967 <inserted>: Update comment.
12968 <shlib_disabled>: Delete field.
12969 (enum bkpt_type) <gdb_breakpoint>: Delete value.
12970 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
12971 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
12972 (raw_bkpt_type_to_target_hw_bp_type): New function.
12973 (find_enabled_raw_code_breakpoint_at): New function.
12974 (find_raw_breakpoint_at): New type and size parameters. Use them.
12975 (insert_memory_breakpoint): New function, based off
12976 set_raw_breakpoint_at.
12977 (remove_memory_breakpoint): New function.
12978 (set_raw_breakpoint_at): Reimplement.
12979 (set_breakpoint): New, based on set_breakpoint_at.
12980 (set_breakpoint_at): Reimplement.
12981 (delete_raw_breakpoint): Go through the_target->remove_point
12982 instead of assuming memory breakpoints.
12983 (find_gdb_breakpoint_at): Delete.
12984 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
12985 (find_gdb_breakpoint): New function.
12986 (set_gdb_breakpoint_at): Delete.
12987 (z_type_supported): New function.
12988 (set_gdb_breakpoint_1): New function, loosely based off
12989 set_gdb_breakpoint_at.
12990 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
12991 (delete_gdb_breakpoint_at): Delete.
12992 (delete_gdb_breakpoint_1): New function, loosely based off
12993 delete_gdb_breakpoint_at.
12994 (delete_gdb_breakpoint): New function.
12995 (clear_gdb_breakpoint_conditions): Rename to ...
12996 (clear_breakpoint_conditions): ... this. Don't handle a NULL
12997 breakpoint.
12998 (add_condition_to_breakpoint): Make static.
12999 (add_breakpoint_condition): Take a struct breakpoint pointer
13000 instead of an address. Adjust.
13001 (gdb_condition_true_at_breakpoint): Rename to ...
13002 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
13003 z_type parameter.
13004 (gdb_condition_true_at_breakpoint): Reimplement.
13005 (add_breakpoint_commands): Take a struct breakpoint pointer
13006 instead of an address. Adjust.
13007 (gdb_no_commands_at_breakpoint): Rename to ...
13008 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
13009 parameter. Return true if no breakpoint was found. Change debug
13010 output.
13011 (gdb_no_commands_at_breakpoint): Reimplement.
13012 (run_breakpoint_commands): Rename to ...
13013 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
13014 and change return type to boolean.
13015 (run_breakpoint_commands): New function.
13016 (gdb_breakpoint_here): Also check for Z1 breakpoints.
13017 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
13018 breakpoint. Go through the_target->remove_point instead of
13019 assuming memory breakpoint.
13020 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
13021 software and hardware breakpoints.
13022 (reinsert_raw_breakpoint): Go through the_target->insert_point
13023 instead of assuming memory breakpoint.
13024 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
13025 software and hardware breakpoints.
13026 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
13027 Check both software and hardware breakpoints.
13028 (validate_inserted_breakpoint): Assert the breakpoint is a
13029 software breakpoint. Set the inserted flag to -1 instead of
13030 setting shlib_disabled.
13031 (delete_disabled_breakpoints): Adjust.
13032 (validate_breakpoints): Only validate software breakpoints.
13033 Adjust to inserted flag change.
13034 (check_mem_read, check_mem_write): Skip breakpoint types other
13035 than software breakpoints. Adjust to inserted flag change.
13036 * mem-break.h (enum raw_bkpt_type): New enum.
13037 (raw_breakpoint, struct process_info): Forward declare.
13038 (Z_packet_to_target_hw_bp_type): Delete declaration.
13039 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
13040 (set_gdb_breakpoint, delete_gdb_breakpoint)
13041 (clear_breakpoint_conditions): New declarations.
13042 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
13043 (breakpoint_inserted_here): Update comment.
13044 (add_breakpoint_condition, add_breakpoint_commands): Replace
13045 address parameter with a breakpoint pointer parameter.
13046 (gdb_breakpoint_here): Update comment.
13047 (delete_gdb_breakpoint_at): Delete.
13048 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
13049 * server.c (process_point_options): Take a struct breakpoint
13050 pointer instead of an address. Adjust.
13051 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
13052 delete_gdb_breakpoint.
13053 * spu-low.c (spu_target_ops): Install NULL as
13054 supports_z_point_type method.
13055 * target.h: Include mem-break.h.
13056 (struct target_ops) <prepare_to_access_memory>: Update comment.
13057 <supports_z_point_type>: New field.
13058 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
13059 instead of a char. Also take a raw breakpoint pointer.
13060 * win32-arm-low.c (the_low_target): Install NULL as
13061 supports_z_point_type.
13062 * win32-i386-low.c (i386_supports_z_point_type): New function.
13063 (i386_insert_point, i386_remove_point): Adjust to new interface.
13064 (the_low_target): Install i386_supports_z_point_type.
13065 * win32-low.c (win32_supports_z_point_type): New function.
13066 (win32_insert_point, win32_remove_point): Adjust to new interface.
13067 (win32_target_ops): Install win32_supports_z_point_type.
13068 * win32-low.h (struct win32_target_ops):
13069 <supports_z_point_type>: New method.
13070 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
13071 instead of a char. Also take a raw breakpoint pointer.
13072
13073 2014-05-20 Pedro Alves <palves@redhat.com>
13074
13075 * mem-break.h: Include break-common.h.
13076 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
13077 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
13078 (Z_packet_to_target_hw_bp_type): New declaration.
13079 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
13080 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
13081 (Z_PACKET_ACCESS_WP): Delete macros.
13082 (Z_packet_to_hw_type): Delete function.
13083 * i386-low.h: Don't include break-common.h here.
13084 (Z_packet_to_hw_type): Delete declaration.
13085 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
13086 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
13087 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
13088 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
13089 * linux-aarch64-low.c: Don't include break-common.h here.
13090 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
13091 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
13092 (Z_packet_to_target_hw_bp_type): Delete function.
13093 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
13094 function.
13095 (mips_insert_point, mips_remove_point): Use
13096 Z_packet_to_target_hw_bp_type.
13097
13098 2014-05-20 Pedro Alves <palves@redhat.com>
13099
13100 * linux-aarch64-low.c: Include break-common.h.
13101 (enum target_point_type): Delete.
13102 (Z_packet_to_point_type): Rename to ...
13103 (Z_packet_to_target_hw_bp_type): ... this, and return a
13104 target_hw_bp_type instead.
13105 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
13106 instead of an enum target_point_type.
13107 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
13108 breakpoint type.
13109 (aarch64_dr_state_insert_one_point)
13110 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
13111 (aarch64_handle_aligned_watchpoint)
13112 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
13113 Take an enum target_hw_bp_type instead of an enum
13114 target_point_type.
13115 (aarch64_supports_z_point_type): New function.
13116 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
13117 use Z_packet_to_target_hw_bp_type.
13118
13119 2014-05-20 Joel Brobecker <brobecker@adacore.com>
13120
13121 * configure.ac: Only use -Werror by default when DEVELOPMENT
13122 is true.
13123 * configure: Regenerate.
13124
13125 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
13126
13127 Fix gdbserver qGetTLSAddr for x86_64 -m32.
13128 * linux-x86-low.c (X86_64_USER_REGS): New.
13129 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
13130
13131 2014-04-28 Yao Qi <yao@codesourcery.com>
13132
13133 * Makefile.in (i386-avx512.c): Fix the typo of generated file
13134 name.
13135
13136 2014-04-25 Pedro Alves <palves@redhat.com>
13137
13138 PR server/16255
13139 * linux-low.c (linux_attach_fail_reason_string): New function.
13140 (linux_attach_lwp): Delete.
13141 (linux_attach_lwp_1): Rename to ...
13142 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
13143 argument. Remove "initial" parameter. Return int instead of
13144 void. Don't error or warn here.
13145 (linux_attach): Adjust to call linux_attach_lwp. Call error on
13146 failure to attach to the tgid. Call warning when failing to
13147 attach to an lwp.
13148 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
13149 argument. Remove "initial" parameter. Return int instead of
13150 void. Don't error or warn here.
13151 (linux_attach_fail_reason_string): New declaration.
13152 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
13153 interface change. Use linux_attach_fail_reason_string.
13154
13155 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
13156 Walfred Tedeschi <walfred.tedeschi@intel.com>
13157
13158 * Makefile.in: Added rules to handle new files
13159 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
13160 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
13161 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
13162 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
13163 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
13164 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
13165 x32-avx512-linux.o.
13166 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
13167 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
13168 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
13169 i386/x32-avx512.xml.
13170 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
13171 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
13172 i386/x32-avx512-linux.xml.
13173 * i387-fp.c (num_avx512_k_registers): New constant for number
13174 of K registers.
13175 (num_avx512_zmmh_low_registers): New constant for number of
13176 lower ZMM registers (0-15).
13177 (num_avx512_zmmh_high_registers): New constant for number of
13178 higher ZMM registers (16-31).
13179 (num_avx512_ymmh_registers): New contant for number of higher
13180 YMM registers (ymm16-31 added by avx521 on x86_64).
13181 (num_avx512_xmm_registers): New constant for number of higher
13182 XMM registers (xmm16-31 added by AVX512 on x86_64).
13183 (struct i387_xsave): Add space for AVX512 registers.
13184 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
13185 Add code to handle AVX512 registers.
13186 (i387_xsave_to_cache): Add code to handle AVX512 registers.
13187 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
13188 prototypei from generated file.
13189 (tdesc_amd64_avx512_linux): Likewise.
13190 (init_registers_x32_avx512_linux): Likewise.
13191 (tdesc_x32_avx512_linux): Likewise.
13192 (init_registers_i386_avx512_linux): Likewise.
13193 (tdesc_i386_avx512_linux): Likewise.
13194 (x86_64_regmap): Add AVX512 registers.
13195 (x86_linux_read_description): Add code to handle AVX512 XSTATE
13196 mask.
13197 (initialize_low_arch): Add code to initialize AVX512 registers.
13198
13199 2014-04-23 Pedro Alves <palves@redhat.com>
13200
13201 * mem-break.c (find_gdb_breakpoint_at): Make static.
13202 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
13203
13204 2014-04-23 Pedro Alves <palves@redhat.com>
13205
13206 * i386-low.c: Don't include break-common.h here.
13207 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
13208 prototype to take target_hw_bp_type as argument instead of a Z
13209 packet char.
13210 * i386-low.h: Include break-common.h here.
13211 (Z_packet_to_hw_type): Declare.
13212 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
13213 prototypes.
13214 * linux-x86-low.c (x86_insert_point): Convert the packet number to
13215 a target_hw_bp_type before calling i386_low_insert_watchpoint.
13216 (x86_remove_point): Convert the packet number to a
13217 target_hw_bp_type before calling i386_low_remove_watchpoint.
13218 * win32-i386-low.c (i386_insert_point): Convert the packet number
13219 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
13220 (i386_remove_point): Convert the packet number to a
13221 target_hw_bp_type before calling i386_low_remove_watchpoint.
13222
13223 2014-04-23 Pedro Alves <palves@redhat.com>
13224
13225 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
13226
13227 2014-04-10 Pedro Alves <palves@redhat.com>
13228
13229 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
13230 Check if the condition or command is NULL before checking if the
13231 breakpoint is known. On success, return true.
13232 * mem-break.h (add_breakpoint_condition): Document return.
13233 (add_breakpoint_commands): Add describing comment.
13234 * server.c (skip_to_semicolon): New function.
13235 (process_point_options): Use it.
13236
13237 2014-04-09 Pedro Alves <palves@redhat.com>
13238
13239 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
13240 to lwpid_of.
13241
13242 2014-02-27 Pedro Alves <palves@redhat.com>
13243
13244 PR 12702
13245 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
13246 macros.
13247 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
13248 output.
13249 (last_thread_of_process_p): Take a PID argument instead of a
13250 thread pointer.
13251 (linux_wait_for_lwp): Delete.
13252 (num_lwps, check_zombie_leaders, not_stopped_callback): New
13253 functions.
13254 (linux_low_filter_event): New function, party factored out from
13255 linux_wait_for_event.
13256 (linux_wait_for_event): Rename to ...
13257 (linux_wait_for_event_filtered): ... this. Add new filter ptid
13258 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
13259 sigsuspend. Check for zombie leaders.
13260 (linux_wait_for_event): Reimplement as wrapper around
13261 linux_wait_for_event_filtered.
13262 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
13263 a normal or signal exit is seen, it's the whole process exiting.
13264 (wait_for_sigstop): No longer a for_each_inferior callback.
13265 Rewrite on top of linux_wait_for_event_filtered.
13266 (stop_all_lwps): Call wait_for_sigstop directly.
13267 * server.c (resume, handle_target_event): Handle
13268 TARGET_WAITKIND_NO_RESUMED.
13269
13270 2014-02-26 Joel Brobecker <brobecker@adacore.com>
13271
13272 * win32-low.c (psapi_get_dll_name,
13273 * win32_CreateToolhelp32Snapshot): Delete.
13274 (win32_CreateToolhelp32Snapshot, win32_Module32First)
13275 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
13276 Delete.
13277 (handle_load_dll): Add function description.
13278 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
13279
13280 2014-02-26 Joel Brobecker <brobecker@adacore.com>
13281
13282 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
13283 Add comment.
13284 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
13285 base address when calling win32_add_one_solib.
13286 (handle_load_dll): Delete local variable load_addr.
13287 Remove 0x1000 offset applied to DLL base address when calling
13288 win32_add_one_solib.
13289 (handle_unload_dll): Add comment.
13290
13291 2014-02-26 Joel Brobecker <brobecker@adacore.com>
13292
13293 * win32-low.c (win32_add_all_dlls): Renames
13294 win32_ensure_ntdll_loaded. Rewrite function documentation.
13295 Adjust implementation to always load all DLLs.
13296 Add 0x1000 offset to DLL base address when calling
13297 win32_add_one_solib.
13298 (child_initialization_done): New static global.
13299 (do_initial_child_stuff): Set child_initialization_done to
13300 zero during child initialization, and 1 after. Replace call
13301 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
13302 Add comment.
13303 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
13304 (handle_unload_dll): Add function documentation.
13305 (get_child_debug_event): Ignore load and unload DLL events
13306 during child initialization.
13307
13308 2014-02-20 Doug Evans <dje@google.com>
13309
13310 Remove global all_lwps.
13311 * inferiors.h (ptid_of): Move here from linux-low.h.
13312 (pid_of, lwpid_of): Ditto.
13313 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
13314 parameter is a struct thread_info * now.
13315 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
13316 directly. Pass &all_threads to find_inferior instead of &all_lwps.
13317 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
13318 directly.
13319 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
13320 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
13321 * linux-arm-low.c (update_registers_callback): Update, "entry"
13322 parameter is a struct thread_info * now.
13323 Fetch lwpid from current_inferior directly.
13324 (arm_insert_point): Pass &all_threads to find_inferior instead of
13325 &all_lwps.
13326 (arm_remove_point): Ditto.
13327 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
13328 (arm_prepare_to_resume): Fetch pid from thread.
13329 (arm_read_description): Fetch lwpid from current_inferior directly.
13330 * linux-low.c (all_lwps): Delete.
13331 (delete_lwp): Delete call to remove_inferior.
13332 (handle_extended_wait): Fetch lwpid from thread.
13333 (add_lwp): Don't set lwp->entry.id. Remove call to
13334 add_inferior_to_list.
13335 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
13336 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
13337 (kill_one_lwp_callback): Ditto.
13338 (linux_kill): Don't dereference NULL pointer.
13339 Fetch ptid,lwpid from thread.
13340 (get_detach_signal): Fetch ptid from thread.
13341 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
13342 Simplify call to regcache_invalidate_thread.
13343 (delete_lwp_callback): Update, "entry" parameter is a
13344 struct thread_info * now. Fetch pid from thread.
13345 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
13346 (status_pending_p_callback): Update, "entry" parameter is a
13347 struct thread_info * now. Fetch ptid from thread.
13348 (find_lwp_pid): Update, "entry" parameter is a
13349 struct thread_info * now.
13350 (linux_wait_for_lwp): Fetch pid from thread.
13351 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
13352 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
13353 (enqueue_one_deferred_signal): Fetch lwpid from thread.
13354 (dequeue_one_deferred_signal): Ditto.
13355 (cancel_breakpoint): Fetch ptid from current_inferior.
13356 (linux_wait_for_event): Pass &all_threads to find_inferior,
13357 not &all_lwps. Fetch ptid, lwpid from thread.
13358 (count_events_callback): Update, "entry" parameter is a
13359 struct thread_info * now.
13360 (select_singlestep_lwp_callback): Ditto.
13361 (select_event_lwp_callback): Ditto.
13362 (cancel_breakpoints_callback): Ditto.
13363 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
13364 not &all_lwps.
13365 (select_event_lwp): Ditto. Fetch ptid from event_thread.
13366 (unsuspend_one_lwp): Update, "entry" parameter is a
13367 struct thread_info * now.
13368 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
13369 not &all_lwps.
13370 (linux_stabilize_threads): Ditto. And for for_each_inferior.
13371 Fetch lwpid from thread, not lwp.
13372 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
13373 Pass &all_threads to find_inferior, not &all_lwps.
13374 (send_sigstop): Fetch lwpid from thread, not lwp.
13375 (send_sigstop_callback): Update, "entry" parameter is a
13376 struct thread_info * now.
13377 (suspend_and_send_sigstop_callback): Ditto.
13378 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
13379 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
13380 struct thread_info * now.
13381 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
13382 from thread, lwp.
13383 (lwp_running): Update, "entry" parameter is a
13384 struct thread_info * now.
13385 (stop_all_lwps): Fetch ptid from thread.
13386 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
13387 (linux_resume_one_lwp): Fetch lwpid from thread.
13388 (linux_set_resume_request): Update, "entry" parameter is a
13389 struct thread_info * now. Fetch pid, lwpid from thread.
13390 (resume_status_pending_p): Update, "entry" parameter is a
13391 struct thread_info * now.
13392 (need_step_over_p): Ditto. Fetch lwpid from thread.
13393 (start_step_over): Fetch lwpid from thread.
13394 (linux_resume_one_thread): Update, "entry" parameter is a
13395 struct thread_info * now. Fetch lwpid from thread.
13396 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
13397 (proceed_one_lwp): Update, "entry" parameter is a
13398 struct thread_info * now. Fetch lwpid from thread.
13399 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
13400 struct thread_info * now.
13401 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
13402 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
13403 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
13404 directly.
13405 (regsets_store_inferior_registers): Ditto.
13406 (fetch_register, store_register): Ditto.
13407 (linux_read_memory, linux_write_memory): Ditto.
13408 (linux_request_interrupt): Ditto.
13409 (linux_read_auxv): Ditto.
13410 (linux_xfer_siginfo): Ditto.
13411 (linux_qxfer_spu): Ditto.
13412 (linux_qxfer_libraries_svr4): Ditto.
13413 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
13414 moved to inferiors.h.
13415 (get_lwp): Delete.
13416 (get_thread_lwp): Update.
13417 (struct lwp_info): Delete member "entry". Simplify comment for
13418 member "thread".
13419 (all_lwps): Delete.
13420 * linux-mips-low.c (mips_read_description): Fetch lwpid from
13421 current_inferior directly.
13422 (update_watch_registers_callback): Update, "entry" parameter is a
13423 struct thread_info * now. Fetch pid from thread.
13424 (mips_linux_prepare_to_resume): Fetch ptid from thread.
13425 (mips_insert_point): Fetch lwpid from current_inferior.
13426 Pass &all_threads to find_inferior, not &all_lwps.
13427 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
13428 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
13429 directly.
13430 (mips_stopped_data_address): Ditto.
13431 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
13432 directly.
13433 * linux-tile-low.c (tile_arch_setup): Ditto.
13434 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
13435 (update_debug_registers_callback): Update, "entry" parameter is a
13436 struct thread_info * now. Fetch pid from thread.
13437 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
13438 Pass &all_threads to find_inferior, not &all_lwps.
13439 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
13440 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
13441 Pass &all_threads to find_inferior, not &all_lwps.
13442 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
13443 (i386_dr_low_get_status): Ditto.
13444 (x86_linux_prepare_to_resume): Fetch ptid from thread.
13445 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
13446 (x86_linux_read_description): Ditto.
13447 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
13448
13449 2014-02-20 Doug Evans <dje@google.com>
13450
13451 * inferiors.c (get_first_inferior): Fix buglet.
13452
13453 2014-02-19 Doug Evans <dje@google.com>
13454
13455 * gdbthread.h (add_thread): Change result type to struct thread_info *.
13456 * inferiors.c (add_thread): Change result type to struct thread_info *.
13457 All callers updated.
13458 (add_lwp): Call add_thread here instead of in callers.
13459 All callers updated.
13460 * linux-low.h (get_lwp_thread): Rewrite.
13461 (struct lwp_info): New member "thread".
13462
13463 2014-02-19 Doug Evans <dje@google.com>
13464
13465 * linux-low.c (add_lwp): Change result to struct lwp_info *.
13466 All callers updated.
13467
13468 2014-02-19 Doug Evans <dje@google.com>
13469
13470 * inferiors.c (add_thread): Fix whitespace.
13471
13472 2014-02-19 Doug Evans <dje@google.com>
13473
13474 * dll.c (clear_dlls): Replace accessing list implemention details
13475 with API function.
13476 * gdbthread.h (get_first_thread): Declare.
13477 * inferiors.c (for_each_inferior_with_data): New function.
13478 (get_first_thread): New function.
13479 (find_thread_ptid): Simplify.
13480 (get_first_inferior): New function.
13481 (clear_list): Delete.
13482 (one_inferior_p): New function.
13483 (clear_inferior_list): New function.
13484 (clear_inferiors): Update.
13485 * inferiors.h (for_each_inferior_with_data): Declare.
13486 (clear_inferior_list): Declare.
13487 (one_inferior_p): Declare.
13488 (get_first_inferior): Declare.
13489 * linux-low.c (linux_wait_for_event): Replace accessing list
13490 implemention details with API function.
13491 * server.c (target_running): Ditto.
13492 (accumulate_file_name_length): New function.
13493 (emit_dll_description): New function.
13494 (handle_qxfer_libraries): Replace accessing list implemention
13495 details with API function.
13496 (handle_qxfer_threads_worker): New function.
13497 (handle_qxfer_threads_proper): Replace accessing list implemention
13498 details with API function.
13499 (handle_query): Ditto.
13500 (visit_actioned_threads_callback_ftype): New typedef.
13501 (visit_actioned_threads_data): New struct.
13502 (visit_actioned_threads): Rewrite to be find_inferior callback.
13503 (resume): Call find_inferior.
13504 (handle_status): Replace accessing list implemention
13505 details with API function.
13506 (process_serial_event): Replace accessing list implemention details
13507 with API function.
13508 * target.c (set_desired_inferior): Replace accessing list implemention
13509 details with API function.
13510 * tracepoint.c (same_process_p): New function.
13511 (gdb_agent_about_to_close): Replace accessing list implemention
13512 details with API function.
13513 * win32-low.c (child_delete_thread): Replace accessing list
13514 implemention details with API function.
13515 (match_dll_by_basename): New function.
13516 (dll_is_loaded_by_basename): New function.
13517 (win32_ensure_ntdll_loaded): Replace accessing list implemention
13518 details call to dll_is_loaded_by_basename.
13519
13520 2014-02-19 Doug Evans <dje@google.com>
13521
13522 * dll.h (struct dll_info): Add comment.
13523 * gdbthread.h (struct thread_info): Add comment.
13524 (current_ptid): Simplify.
13525 * inferiors.c (add_process): Update.
13526 (remove_process): Update.
13527 * inferiors.h (struct process_info): Rename member "head" to "entry".
13528 * linux-low.c (delete_lwp): Update.
13529 (add_lwp): Update.
13530 (last_thread_of_process_p): Update.
13531 (kill_one_lwp_callback, linux_kill): Update.
13532 (status_pending_p_callback): Update.
13533 (wait_for_sigstop): Update. Simplify read of ptid.
13534 (start_step_over): Update.
13535 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
13536 (get_lwp_thread): Update.
13537 (struct lwp_info): Rename member "head" to "entry".
13538 * regcache.h (inferior_list_entry): Delete.
13539 * server.c (kill_inferior_callback): Update.
13540 (detach_or_kill_inferior_callback): Update.
13541 (print_started_pid): Update.
13542 (print_attached_pid): Update.
13543 (process_serial_event): Simplify read of ptid.
13544 * thread-db.c (thread_db_create_event): Update.
13545 (thread_db_get_tls_address): Update.
13546 * win32-low.c (current_inferior_ptid): Simplify.
13547
13548 2014-02-19 Tom Tromey <tromey@redhat.com>
13549
13550 * target.h (struct target_ops) <supports_btrace>: Add target_ops
13551 argument.
13552 (target_supports_btrace): Update.
13553
13554 2014-02-14 Yao Qi <yao@codesourcery.com>
13555
13556 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
13557 (rsp-low-ipa.o): New target.
13558
13559 2014-02-12 Tom Tromey <tromey@redhat.com>
13560
13561 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
13562 convert_ascii_to_int.
13563 * regcache.c (registers_to_string): Likewise.
13564 * remote-utils.c (decode_M_packet): Likewise.
13565 * server.c (process_serial_event): Likewise.
13566
13567 2014-02-12 Tom Tromey <tromey@redhat.com>
13568
13569 * server.c (handle_query, handle_v_run): Use hex2bin, not
13570 unhexify.
13571 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
13572
13573 2014-02-12 Tom Tromey <tromey@redhat.com>
13574
13575 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
13576 convert_int_to_ascii.
13577 * regcache.c (registers_to_string, collect_register_as_string):
13578 Likewise.
13579 * remote-utils.c (look_up_one_symbol, relocate_instruction):
13580 Likewise.
13581 * server.c (process_serial_event): Likewise.
13582 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
13583 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
13584
13585 2014-02-12 Tom Tromey <tromey@redhat.com>
13586
13587 * remote-utils.c (look_up_one_symbol, monitor_output): Use
13588 bin2hex, not hexify.
13589 * tracepoint.c (cmd_qtstatus): Likewise.
13590
13591 2014-02-12 Tom Tromey <tromey@redhat.com>
13592
13593 * remote-utils.c (monitor_output): Pass explicit length to
13594 hexify.
13595
13596 2014-02-12 Tom Tromey <tromey@redhat.com>
13597
13598 * tracepoint.c: Include rsp-low.h.
13599 * server.c: Include rsp-low.h.
13600 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
13601 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
13602 declare.
13603 * remote-utils.c: Include rsp-low.h.
13604 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
13605 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
13606 (convert_int_to_ascii, convert_ascii_to_int): Move to
13607 common/rsp-low.c.
13608 * regcache.c: Include rsp-low.h.
13609 * ax.c: Include rsp-low.h.
13610 * Makefile.in (SFILES): Add common/rsp-low.c.
13611 (OBS): Add rsp-low.o.
13612 (rsp-low.o): New target.
13613
13614 2014-02-12 Tom Tromey <tromey@redhat.com>
13615
13616 * utils.h (pulongest, plongest, phex_nz): Don't declare.
13617 Include print-utils.h.
13618 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
13619 (plongest, thirty_two, phex_nz): Remove.
13620 * Makefile.in (SFILES): Add common/print-utils.c.
13621 (OBS): Add print-utils.o.
13622 (print-utils-ipa.o): New target.
13623 (print-utils.o): New target.
13624 (IPA_OBJS): Add print-utils-ipa.o.
13625
13626 2014-02-06 Tom Tromey <tromey@redhat.com>
13627
13628 * Makefile.in (SFILES): Fix indentation.
13629
13630 2014-02-05 Doug Evans <dje@google.com>
13631
13632 * linux-low.c (linux_wait_for_event): Improve comment.
13633 (linux_wait_1): Keep current_inferior in sync with event_child.
13634
13635 2014-01-22 Doug Evans <dje@google.com>
13636
13637 * gdbthread.h (gdb_id_to_thread): Delete, unused.
13638
13639 2014-01-22 Doug Evans <dje@google.com>
13640
13641 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
13642 * configure: Regenerate.
13643 * config.in: Regenerate.
13644 * Makefile.in (SFILES): Add debug.c.
13645 (OBS): Add debug.o.
13646 * debug.c: New file.
13647 * debug.h: New file.
13648 * linux-aarch64-low.c (*): Update all debugging printfs to use
13649 debug_printf instead of fprintf.
13650 * linux-arm-low.c (*): Ditto.
13651 * linux-cris-low.c (*): Ditto.
13652 * linux-crisv32-low.c (*): Ditto.
13653 * linux-m32r-low.c (*): Ditto.
13654 * linux-sparc-low.c (*): Ditto.
13655 * linux-x86.c (*): Ditto.
13656 * linux-low.c (*): Ditto.
13657 (linux_wait_1): Add calls to debug_enter, debug_exit.
13658 (linux_wait): Remove redundant debugging printf.
13659 (stop_all_lwps): Add calls to debug_enter, debug_exit.
13660 (linux_resume, unstop_all_lwps): Ditto.
13661 * mem-break.c (*): Update all debugging printfs to use
13662 debug_printf instead of fprintf.
13663 * remote-utils.c (*): Ditto.
13664 * thread-db.c (*): Ditto.
13665 * server.c #include <ctype.h>, "gdb_vecs.h".
13666 (debug_threads): Moved to debug.c.
13667 (*): Update all debugging printfs to use debug_printf instead of
13668 fprintf.
13669 (start_inferior): Replace call to fflush with call to debug_flush.
13670 (monitor_show_help): Mention set debug-format.
13671 (parse_debug_format_options): New function.
13672 (handle_monitor_command): Handle "monitor set debug-format".
13673 (gdbserver_usage): Mention --debug-format.
13674 (main): Parse --debug-format.
13675 * server.h (debug_threads): Declaration moved to debug.h.
13676 #include "debug.h".
13677 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
13678 trace_debug_1 that uses debug_printf.
13679 (tracepoint_look_up_symbols): Update all debugging printfs to use
13680 debug_printf instead of fprintf.
13681
13682 2014-01-20 Baruch Siach <baruch@tkos.co.il>
13683
13684 * linux-xtensa-low.c: Include asm/ptrace.h instead of
13685 sys/ptrace.h.
13686
13687 2014-01-17 Pedro Alves <palves@redhat.com>
13688
13689 PR build/16445
13690 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
13691 defined after including gdb_proc_service.h.
13692
13693 2014-01-16 Doug Evans <dje@google.com>
13694
13695 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
13696 (match_dll): Use it.
13697
13698 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
13699
13700 * target.h (target_ops) <read_btrace>: Change parameters and
13701 return type to allow error reporting.
13702 * server.c (handle_qxfer_btrace): Support delta reads. Pass
13703 trace reading errors on.
13704 * linux-low.c (linux_low_read_btrace): Pass trace reading
13705 errors on.
13706 (linux_low_disable_btrace): New.
13707
13708 2014-01-15 Doug Evans <dje@google.com>
13709
13710 * inferiors.c (thread_id_to_gdb_id): Delete.
13711 * inferiors.h (thread_id_to_gdb_id): Delete.
13712
13713 2014-01-13 Eli Zaretskii <eliz@gnu.org>
13714
13715 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
13716 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
13717 versions.
13718
13719 2014-01-08 Pedro Alves <palves@redhat.com>
13720
13721 * server.c (handle_status): Don't discard previous queued stop
13722 replies or thread's pending status here.
13723 (main) <disconnection>: Do it here instead.
13724
13725 2014-01-08 Pedro Alves <palves@redhat.com>
13726
13727 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
13728 * server.c (visit_actioned_threads, handle_pending_status): New
13729 function.
13730 (handle_v_cont): Factor out parts to ...
13731 (resume): ... this new function. If in all-stop, and a thread
13732 being resumed has a pending status, report it without actually
13733 resuming.
13734 (myresume): Adjust to use the new 'resume' function.
13735 (clear_pending_status_callback, set_pending_status_callback)
13736 (find_status_pending_thread_callback): New functions.
13737 (handle_status): Handle the case of multiple threads having
13738 interesting statuses to report. Report threads' real last signal
13739 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
13740 with an interesting thread to report the status for, instead of
13741 always reporting the status of the first thread.
13742
13743 2014-01-01 Joel Brobecker <brobecker@adacore.com>
13744
13745 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
13746 * gdbreplay.c (gdbreplay_version): Likewise.
13747
13748 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
13749
13750 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
13751 iov.iov_len with the real length in use.
13752
13753 2013-12-13 Joel Brobecker <brobecker@adacore.com>
13754
13755 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
13756 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
13757 for all targets that use win32-low.c.
13758 * win32-low.c (win32_ensure_ntdll_loaded): New function.
13759 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
13760
13761 2013-12-13 Pedro Alves <palves@redhat.com>
13762
13763 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
13764 if equal to TARGET_WAITKIND_LOADED.
13765 * win32-low.c (cached_status): New static global.
13766 (win32_wait): Add declaration.
13767 (do_initial_child_stuff): Flush all initial pending debug events
13768 up to the initial breakpoint.
13769 (win32_wait): If CACHED_STATUS was set, return that instead
13770 of doing a real wait. Remove the code resuming the execution
13771 of the inferior after receiving a TARGET_WAITKIND_LOADED event
13772 during the initial phase. Also remove the code changing
13773 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
13774 TARGET_WAITKIND_STOPPED.
13775
13776 2013-12-11 Yao Qi <yao@codesourcery.com>
13777
13778 * notif.c (handle_notif_ack): Return 0 if no notification
13779 matches.
13780
13781 2013-11-20 Doug Evans <dje@google.com>
13782
13783 * linux-low.c (linux_set_resume_request): Fix comment.
13784
13785 2013-11-20 Doug Evans <dje@google.com>
13786
13787 * linux-low.c (resume_status_pending_p): Tweak comment.
13788
13789 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
13790
13791 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
13792 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
13793 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
13794 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
13795 (srv_amd64_regobj): Add amd64-mpx.o.
13796 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
13797 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
13798 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
13799 * i387-fp.c (num_pl_bnd_register) Added constant.
13800 (num_pl_bnd_cfg_registers) Added constant.
13801 (struct i387_xsave) Added reserved area and MPX fields.
13802 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
13803 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
13804 function.
13805 (tdesc_i386_mpx_linux): Add MPX amd64 target.
13806 (init_registers_amd64_mpx_linux): Declare new function.
13807 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
13808 (x86_64_regmap): Add MPX registers.
13809 (x86_linux_read_description): Add MPX case.
13810 (initialize_low_arch): Initialize MPX targets.
13811
13812 2013-11-18 Tom Tromey <tromey@redhat.com>
13813
13814 * configure: Rebuild.
13815 * configure.ac: Don't check for stdlib.h.
13816 * gdbreplay.c: Unconditionally include stdlib.h.
13817
13818 2013-11-18 Tom Tromey <tromey@redhat.com>
13819
13820 * config.in: Rebuild.
13821 * configure: Rebuild.
13822 * configure.ac: Don't use AC_HEADER_DIRENT.
13823
13824 2013-11-18 Tom Tromey <tromey@redhat.com>
13825
13826 * server.h: Don't check HAVE_STRING_H.
13827 * gdbreplay.c: Don't check HAVE_STRING_H.
13828 * configure: Rebuild.
13829
13830 2013-11-18 Tom Tromey <tromey@redhat.com>
13831
13832 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
13833 LIBGNU.
13834
13835 2013-11-08 Tom Tromey <tromey@redhat.com>
13836
13837 * configure, config.in: Rebuild.
13838 * configure.ac: Remove unused configury.
13839
13840 2013-11-08 Tom Tromey <tromey@redhat.com>
13841
13842 * acinclude.m4: Include common.m4, codeset.m4.
13843 * configure, config.in: Rebuild.
13844 * configure.ac: Use GDB_AC_COMMON.
13845
13846 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
13847
13848 * linux-s390-low.c (HWCAP_S390_TE): New define.
13849 (s390_arch_setup): Consider the TE field in the HWCAP for
13850 determining 'have_regset_tdb'.
13851
13852 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
13853
13854 PR gdb/16014
13855 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
13856 call to sizeof.
13857
13858 2013-10-02 Pedro Alves <palves@redhat.com>
13859
13860 * server.c (process_serial_event): Don't output "GDBserver
13861 exiting" if GDB is connected through stdio.
13862 * target.c (mywait): Likewise, be silent if GDB is connected
13863 through stdio.
13864
13865 2013-10-01 Joel Brobecker <brobecker@adacore.com>
13866
13867 * lynx-low.c (lynx_add_threads_after_attach): New function.
13868 (lynx_attach): Remove call to add_thread. Add call to
13869 lynx_add_threads_after_attach instead.
13870
13871 2013-09-28 Mike Frysinger <vapier@gentoo.org>
13872
13873 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
13874 * config.in, configure: Regenerated.
13875
13876 2013-09-18 Yao Qi <yao@codesourcery.com>
13877
13878 PR server/15959
13879 * server.c (start_inferior): Clear 'resume_info'.
13880
13881 2013-09-16 Jiong Wang <jiwang@tilera.com>
13882
13883 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
13884 for each register.
13885
13886 2013-09-16 Jiong Wang <jiwang@tilera.com>
13887
13888 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
13889 linux-tile-low.o to srv_tgtobj.
13890
13891 2013-09-16 Will Newton <will.newton@linaro.org>
13892
13893 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
13894 out regs.
13895
13896 2013-09-06 Pedro Alves <palves@redhat.com>
13897
13898 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
13899 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
13900 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
13901 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
13902 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
13903 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
13904
13905 2013-09-06 Pedro Alves <palves@redhat.com>
13906
13907 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
13908 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
13909
13910 2013-09-06 Pedro Alves <palves@redhat.com>
13911
13912 * linux-amd64-ipa.c: Include tracepoint.h.
13913 * linux-i386-ipa.c: Include tracepoint.h.
13914
13915 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13916
13917 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
13918 (ps_get_thread_area): New function.
13919
13920 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13921
13922 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
13923 (initialize_low_arch): Call init_registers_crisv32 rather than
13924 init_register_crisv32.
13925
13926 2013-09-05 Pedro Alves <palves@redhat.com>
13927
13928 * server.h (handle_vFile, hostio_last_error_from_errno): Move
13929 to ...
13930 * hostio.h: ... this new file.
13931 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
13932 win32-low.c: Include hostio.h.
13933
13934 2013-09-05 Pedro Alves <palves@redhat.com>
13935
13936 * server.h (gdb_client_data, handler_func, callback_handler_func)
13937 (delete_file_handler, add_file_handler, append_callback_event)
13938 (delete_callback_event, start_event_loop, initialize_event_loop):
13939 Move to event-loop.h and include it.
13940 * event-loop.h: New file.
13941
13942 2013-09-05 Pedro Alves <palves@redhat.com>
13943
13944 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
13945 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
13946 (loaded_dll, unloaded_dll): Move to ...
13947 * dll.h: ... this new file.
13948 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
13949
13950 2013-09-05 Pedro Alves <palves@redhat.com>
13951
13952 * server.h (current_process, get_thread_process, all_processes)
13953 (add_inferior_to_list, for_each_inferior, current_inferior)
13954 (remove_inferior, add_process, remove_process, find_process_pid)
13955 (have_started_inferiors_p, have_attached_inferiors_p)
13956 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
13957 (clear_inferiors, find_inferior, find_inferior_id)
13958 (inferior_target_data, set_inferior_target_data)
13959 (inferior_regcache_data, set_inferior_regcache_data): Move to
13960 inferiors.h, and include it.
13961 * inferiors.h: New file.
13962
13963 2013-09-05 Pedro Alves <palves@redhat.com>
13964
13965 * server.h (struct emit_ops, current_insn_ptr, emit_error):
13966 Move ...
13967 * ax.h: ... here.
13968
13969 2013-09-05 Pedro Alves <palves@redhat.com>
13970
13971 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
13972 tracepoint.h.
13973 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
13974 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
13975 (handle_tracepoint_general_set, handle_tracepoint_query)
13976 (tracepoint_finished_step, tracepoint_was_hit)
13977 (release_while_stepping_state_list, current_traceframe)
13978 (in_readonly_region, traceframe_read_mem)
13979 (fetch_traceframe_registers, traceframe_read_sdata)
13980 (traceframe_read_info, struct fast_tpoint_collect_status)
13981 (fast_tracepoint_collecting, force_unlock_trace_buffer)
13982 (handle_tracepoit_bkpts, initialize_low_tracepoint)
13983 (supply_fast_tracepoint_registers)
13984 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
13985 (ipa_tdesc, claim_trampoline_space)
13986 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
13987 (agent_mem_read, agent_get_trace_state_variable_value)
13988 (agent_set_trace_state_variable_value, agent_tsv_read)
13989 (agent_mem_read_string, get_raw_reg_func_addr)
13990 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
13991 * tracepoint.h: ... this new file.
13992
13993 2013-09-05 Pedro Alves <palves@redhat.com>
13994
13995 * server.h (perror_with_name, error, fatal, warning, paddress)
13996 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
13997 include it.
13998 * utils.h: New file.
13999
14000 2013-09-05 Pedro Alves <palves@redhat.com>
14001
14002 * server.h (remote_debug, noack_mode, transport_is_reliable)
14003 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
14004 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
14005 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
14006 (write_enn, initialize_async_io, enable_async_io)
14007 (disable_async_io, check_remote_input_interrupt_request)
14008 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
14009 (dead_thread_notify, prepare_resume_reply)
14010 (decode_address_to_semicolon, decode_address, decode_m_packet)
14011 (decode_M_packet, decode_X_packet, decode_xfer_write)
14012 (decode_search_memory_packet, unhexify, hexify)
14013 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
14014 (look_up_one_symbol, relocate_instruction)
14015 (monitor_output): Move to remote-utils.h, and include it.
14016 * remote-utils.h: New file.
14017
14018 2013-09-05 Pedro Alves <palves@redhat.com>
14019
14020 * server.h (_): Delete.
14021
14022 2013-09-02 Pedro Alves <palves@redhat.com>
14023
14024 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
14025 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
14026 allocated.
14027 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
14028
14029 2013-09-02 Pierre Muller <muller@sourceware.org>
14030
14031 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
14032 or WriteProcessMemory complete successfully and handle
14033 ERROR_PARTIAL_COPY error.
14034
14035 2013-09-02 Pedro Alves <palves@redhat.com>
14036
14037 * server.c (gdb_read_memory): Return -1 on traceframe memory read
14038 error instead of EIO.
14039
14040 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14041
14042 PR server/15604
14043 * linux-low.c: Include filestuff.h.
14044 (linux_create_inferior) <pid == 0>: Call close_most_fds.
14045 * lynx-low.c: Include filestuff.h.
14046 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
14047 * server.c: Include filestuff.h.
14048 (main): Call notice_open_fds.
14049 * spu-low.c: Include filestuff.h.
14050 (spu_create_inferior) <pid == 0>: Call close_most_fds.
14051
14052 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
14053
14054 * Makefile.in: Explain why ../target and ../nat are not
14055 listed as include file search paths.
14056 (linux-waitpid.o): New object file rule.
14057 * configure.srv (srv_native_linux_obj): New variable.
14058 Replace all occurrences of linux native object files with
14059 $srv_native_linux_obj.
14060 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
14061 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
14062 (linux_enable_event_reporting): Remove declaration.
14063 (my_waitpid): Moved to common/linux-waitpid.c.
14064 (linux_wait_for_event): Pass ptid when calling
14065 linux_enable_event_reporting.
14066 (linux_supports_tracefork_flag): Remove.
14067 (linux_enable_event_reporting): Likewise.
14068 (linux_tracefork_grandchild): Remove.
14069 (STACK_SIZE): Moved to common/linux-ptrace.c.
14070 (linux_tracefork_child): Remove.
14071 (linux_test_for_tracefork): Remove.
14072 (linux_look_up_symbols): Call linux_supports_traceclone.
14073 (initialize_low): Remove call to linux_test_for_tracefork.
14074 * linux-low.h (PTRACE_TYPE_ARG3): Move to
14075 common/linux-ptrace.h.
14076 (PTRACE_TYPE_ARG4): Likewise.
14077 Include linux-ptrace.h.
14078
14079 2013-08-21 Pedro Alves <palves@redhat.com>
14080
14081 * config.in: Renegerate.
14082
14083 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
14084
14085 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
14086 (SFILES): Remove $(srcdir)/common/target-common.c and
14087 add $(srcdir)/target/waitstatus.c.
14088 (OBS): Remove target-common.o and add waitstatus.o.
14089 (server_h): Remove $(srcdir)/../common/target-common.h and
14090 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
14091 and $(srcdir)/../target/waitstatus.h.
14092 (target-common.o): Remove.
14093 (waitstatus.o): New target object file.
14094 * target.h: Do not include target-common.h and
14095 include target/resume.h, target/wait.h and
14096 target/waitstatus.h.
14097
14098 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
14099
14100 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
14101 to PTRACE_TYPE_ARG3.
14102 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
14103 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
14104 PTRACE_TYPE_ARG4.
14105 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
14106 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
14107
14108 2013-07-27 Jie Zhang <jie@codesourcery.com>
14109 Daniel Jacobowitz <dan@codesourcery.com>
14110 Yao Qi <yao@codesourcery.com>
14111
14112 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
14113 (mips-linux-watch.o): New rule.
14114 (mips_linux_watch_h): New variable.
14115 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
14116 srv_tgtobj.
14117 * linux-mips-low.c: Include mips-linux-watch.h.
14118 (struct arch_process_info, struct arch_lwp_info): New.
14119 (update_watch_registers_callback): New function.
14120 (mips_linux_new_process, mips_linux_new_thread) New functions.
14121 (mips_linux_prepare_to_resume, mips_insert_point): New
14122 functions.
14123 (mips_remove_point, mips_stopped_by_watchpoint): New
14124 functions.
14125 (rsp_bp_type_to_target_hw_bp_type): New function.
14126 (mips_stopped_data_address): New function.
14127 (the_low_target): Add watchpoint support functions.
14128
14129 2013-07-27 Yao Qi <yao@codesourcery.com>
14130
14131 * i386-low.c: Include break-common.h.
14132 (enum target_hw_bp_type): Remove.
14133
14134 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
14135
14136 * Makefile.in (SFILES): /common/target-common.c.
14137 (OBS): Add target-common.o.
14138 (server_h): Add $(srcdir)/../common/target-common.h.
14139 (target-common.o): New target.
14140 * server.c (queue_stop_reply_callback): Free
14141 status string after use.
14142 * target.c (target_waitstatus_to_string): Remove.
14143 * target.h: Include target-common.h.
14144 (resume_kind): Likewise.
14145 (target_waitkind): Likewise.
14146 (target_waitstatus): Likewise.
14147 (TARGET_WNOHANG): Likewise.
14148
14149 2013-07-04 Yao Qi <yao@codesourcery.com>
14150
14151 * Makefile.in (host_alias): Use @host_noncanonical@.
14152 (target_alias): Use @target_noncanonical@.
14153 * configure.ac: Use ACX_NONCANONICAL_TARGET and
14154 ACX_NONCANONICAL_HOST.
14155 * configure: Regenerated.
14156
14157 Revert:
14158 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
14159
14160 * configure.ac (version_host, version_target): Set and AC_SUBST them.
14161 * configure: Rebuild.
14162 * Makefile.in (version_host, version_target): Get from configure.
14163 (version.c): Use $(version_host) and $(version_target).
14164
14165 2013-07-03 Pedro Alves <palves@redhat.com>
14166
14167 * Makefile.in (config.status): Depend on development.sh.
14168 * acinclude.m4: Include libmcheck.m4.
14169 * configure: Regenerate.
14170
14171 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
14172
14173 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
14174 attribute inside the parentheses.
14175 (winapi_DebugSetProcessKillOnExit): Ditto.
14176 (winapi_DebugBreakProcess): Ditto.
14177 (winapi_GenerateConsoleCtrlEvent): Ditto.
14178
14179 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
14180
14181 * notif.h (notif_event): Add a dummy member to avoid compiler
14182 errors.
14183
14184 2013-07-01 Pedro Alves <palves@redhat.com>
14185
14186 * hostio.c (HOSTIO_PATH_MAX): Define.
14187 (require_filename, handle_open, handle_unlink, handle_readlink):
14188 Use it.
14189
14190 2013-07-01 Pedro Alves <palves@redhat.com>
14191
14192 * server.h: Include "pathmax.h".
14193 * linux-low.c: Don't include sys/param.h.
14194 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
14195 MAXPATHLEN.
14196 * win32-low.c: Don't include sys/param.h.
14197 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
14198
14199 2013-07-01 Pedro Alves <palves@redhat.com>
14200
14201 * event-loop.c: Don't check HAVE_UNISTD_H before including
14202 <unistd.h>.
14203 * gdbreplay.c: Likewise.
14204 * remote-utils.c: Likewise.
14205 * server.c: Likewise.
14206 * configure.ac: Don't check for unistd.h.
14207 * configure: Regenerate.
14208
14209 2013-06-28 Tom Tromey <tromey@redhat.com>
14210
14211 * Makefile.in (version.c): Use version.in, not
14212 common/version.in.
14213
14214 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
14215
14216 * configure.ac (version_host, version_target): Set and AC_SUBST them.
14217 * configure: Rebuild.
14218 * Makefile.in (version_host, version_target): Get from configure.
14219 (version.c): Use $(version_host) and $(version_target).
14220
14221 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
14222
14223 Fix trace-status to output user name without trailing colon.
14224 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
14225
14226 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
14227
14228 Fix trace-status to output proper start-time and stop-time.
14229 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
14230 output start time and stop time in hex as gdb expects.
14231
14232 2013-06-26 Pedro Alves <pedro@codesourcery.com>
14233
14234 * tracepoint.c (build_traceframe_info_xml): Output trace state
14235 variables present in the trace buffer.
14236
14237 2013-06-24 Tom Tromey <tromey@redhat.com>
14238
14239 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
14240 create-version.sh.
14241 (version.o): Remove.
14242 * gdbreplay.c: Include version.h.
14243 (version, host_name): Don't declare.
14244 * server.h: Include version.h.
14245 (version, host_name): Don't declare.
14246
14247 2013-06-12 Pedro Alves <palves@redhat.com>
14248
14249 * linux-x86-low.c (linux_is_elf64): Delete global.
14250 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
14251 with local linux_pid_exe_is_elf_64_file use.
14252
14253 2013-06-11 Pedro Alves <palves@redhat.com>
14254
14255 * linux-low.c (regset_disabled, disable_regset): New functions.
14256 (regsets_fetch_inferior_registers)
14257 (regsets_store_inferior_registers): Use them.
14258 (initialize_regsets_info); Don't allocate the disabled_regsets
14259 array here.
14260 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
14261 comment.
14262
14263 2013-06-11 Pedro Alves <palves@redhat.com>
14264
14265 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
14266 xmalloc.
14267
14268 2013-06-11 Pedro Alves <palves@redhat.com>
14269
14270 * linux-x86-low.c (initialize_low_arch): Call
14271 init_registers_x32_avx_linux.
14272
14273 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
14274
14275 Fix compatibility with Android Bionic.
14276 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
14277 it is not empty.
14278
14279 2013-06-07 Pedro Alves <palves@redhat.com>
14280
14281 PR server/14823
14282 * Makefile.in (OBS): Add tdesc.o.
14283 (IPA_OBJS): Add tdesc-ipa.o.
14284 (tdesc-ipa.o): New rule.
14285 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
14286 interface.
14287 * linux-low.c (new_inferior): Delete.
14288 (disabled_regsets, num_regsets): Delete.
14289 (linux_add_process): Adjust to set the new per-process
14290 new_inferior flag.
14291 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
14292 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
14293 was a stop. When calling arch_setup, switch the current inferior
14294 to the thread that got an event.
14295 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
14296 (regsets_fetch_inferior_registers)
14297 (regsets_store_inferior_registers): New regsets_info parameter.
14298 Adjust to use it.
14299 (linux_register_in_regsets): New regs_info parameter. Adjust to
14300 use it.
14301 (register_addr, fetch_register, store_register): New usrregs_info
14302 parameter. Adjust to use it.
14303 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
14304 parameter regs_info. Adjust to use it.
14305 (linux_fetch_registers): Get the current inferior's regs_info, and
14306 adjust to use it.
14307 (linux_store_registers): Ditto.
14308 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
14309 (initialize_low): Don't initialize the target_regsets here. Call
14310 initialize_low_arch.
14311 * linux-low.h (target_regsets): Delete declaration.
14312 (struct regsets_info): New.
14313 (struct usrregs_info): New.
14314 (struct regs_info): New.
14315 (struct process_info_private) <new_inferior>: New field.
14316 (struct linux_target_ops): Delete the num_regs, regmap, and
14317 regset_bitmap fields. New field regs_info.
14318 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
14319 * i387-fp.c (num_xmm_registers): Delete.
14320 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
14321 calls to new interface.
14322 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
14323 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
14324 Infer the number of xmm registers from the regcache's target
14325 description.
14326 * i387-fp.h (num_xmm_registers): Delete.
14327 * inferiors.c (add_thread): Don't install the thread's regcache
14328 here.
14329 * proc-service.c (gregset_info): Fetch the current inferior's
14330 regs_info. Adjust to use it.
14331 * regcache.c: Include tdesc.h.
14332 (register_bytes, reg_defs, num_registers)
14333 (gdbserver_expedite_regs): Delete.
14334 (get_thread_regcache): If the thread doesn't have a regcache yet,
14335 create one, instead of aborting gdbserver.
14336 (regcache_invalidate_one): Rename to ...
14337 (regcache_invalidate_thread): ... this.
14338 (regcache_invalidate_one): New.
14339 (regcache_invalidate): Only invalidate registers of the current
14340 process.
14341 (init_register_cache): Add target_desc parameter, and use it.
14342 (new_register_cache): Ditto. Assert the target description has a
14343 non zero registers_size.
14344 (regcache_cpy): Add assertions. Adjust.
14345 (realloc_register_cache, set_register_cache): Delete.
14346 (registers_to_string, registers_from_string): Adjust.
14347 (find_register_by_name, find_regno, find_register_by_number)
14348 (register_cache_size): Add target_desc parameter, and use it.
14349 (free_register_cache_thread, free_register_cache_thread_one)
14350 (regcache_release, register_cache_size): New.
14351 (register_size): Add target_desc parameter, and use it.
14352 (register_data, supply_register, supply_register_zeroed)
14353 (supply_regblock, supply_register_by_name, collect_register)
14354 (collect_register_as_string, collect_register_by_name): Adjust.
14355 * regcache.h (struct target_desc): Forward declare.
14356 (struct regcache) <tdesc>: New field.
14357 (init_register_cache, new_register_cache): Add target_desc
14358 parameter.
14359 (regcache_invalidate_thread): Declare.
14360 (regcache_invalidate_one): Delete declaration.
14361 (regcache_release): Declare.
14362 (find_register_by_number, register_cache_size, register_size)
14363 (find_regno): Add target_desc parameter.
14364 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
14365 declarations.
14366 * remote-utils.c: Include tdesc.h.
14367 (outreg, prepare_resume_reply): Adjust.
14368 * server.c: Include tdesc.h.
14369 (gdbserver_xmltarget): Delete declaration.
14370 (get_features_xml, process_serial_event): Adjust.
14371 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
14372 declare.
14373 (struct process_info) <tdesc>: New field.
14374 (ipa_tdesc): Declare.
14375 * tdesc.c: New file.
14376 * tdesc.h: New file.
14377 * tracepoint.c: Include tdesc.h.
14378 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
14379 (get_context_regcache): Adjust to pass ipa_tdesc down.
14380 (do_action_at_tracepoint): Adjust to get the register cache size
14381 from the context regcache's description.
14382 (traceframe_walk_blocks): Adjust to get the register cache size
14383 from the current trace frame's description.
14384 (traceframe_get_pc): Adjust to get current trace frame's
14385 description and pass it down.
14386 (gdb_collect): Adjust to get the register cache size from the
14387 IPA's description.
14388 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
14389 (gdbserver_xmltarget): Delete.
14390 (initialize_low_tracepoint): Set the ipa's target description.
14391 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
14392 (initialize_low_tracepoint): Set the ipa's target description.
14393 * linux-x86-low.c: Include tdesc.h.
14394 [__x86_64__] (is_64bit_tdesc): New.
14395 (ps_get_thread_area, x86_get_thread_area): Use it.
14396 (i386_cannot_store_register): Rename to ...
14397 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
14398 (i386_cannot_fetch_register): Rename to ...
14399 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
14400 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
14401 to new interface.
14402 (target_regsets): Rename to ...
14403 (x86_regsets): ... this.
14404 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
14405 interface.
14406 (x86_siginfo_fixup): Use is_64bit_tdesc.
14407 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
14408 (tdesc_x32_avx_linux, tdesc_x32_linux)
14409 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
14410 Declare.
14411 (x86_linux_update_xmltarget): Delete.
14412 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
14413 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
14414 (AMD64_LINUX_USER64_CS): New.
14415 (x86_linux_read_description): New, based on
14416 x86_linux_update_xmltarget.
14417 (same_process_callback): New.
14418 (x86_arch_setup_process_callback): New.
14419 (x86_linux_update_xmltarget): New.
14420 (x86_regsets_info): New.
14421 (amd64_linux_regs_info): New.
14422 (i386_linux_usrregs_info): New.
14423 (i386_linux_regs_info): New.
14424 (x86_linux_regs_info): New.
14425 (x86_arch_setup): Reimplement.
14426 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
14427 (x86_emit_ops): Ditto.
14428 (the_low_target): Adjust. Install x86_linux_regs_info,
14429 x86_cannot_fetch_register, and x86_cannot_store_register.
14430 (initialize_low_arch): New.
14431 * linux-ia64-low.c (tdesc_ia64): Declare.
14432 (ia64_fetch_register): Adjust.
14433 (ia64_usrregs_info, regs_info): New globals.
14434 (ia64_regs_info): New function.
14435 (the_low_target): Adjust.
14436 (initialize_low_arch): New function.
14437 * linux-sparc-low.c (tdesc_sparc64): Declare.
14438 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
14439 Adjust.
14440 (sparc_arch_setup): New function.
14441 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
14442 (the_low_target): Adjust.
14443 (initialize_low_arch): New function.
14444 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
14445 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
14446 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
14447 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
14448 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
14449 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
14450 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
14451 (tdesc_powerpc_isa205_vsx64l): Declare.
14452 (ppc_cannot_store_register, ppc_collect_ptrace_register)
14453 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
14454 (ppc_set_pc, ppc_get_hwcap): Adjust.
14455 (ppc_usrregs_info): Forward declare.
14456 (!__powerpc64__) ppc_regmap_adjusted: New global.
14457 (ppc_arch_setup): Adjust to the current process'es target
14458 description.
14459 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
14460 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
14461 (ppc_store_evrregset): Adjust.
14462 (target_regsets): Rename to ...
14463 (ppc_regsets): ... this, and make static.
14464 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
14465 (ppc_regs_info): New function.
14466 (the_low_target): Adjust.
14467 (initialize_low_arch): New function.
14468 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
14469 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
14470 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
14471 (tdesc_s390x_linux64v2): Declare.
14472 (s390_collect_ptrace_register, s390_supply_ptrace_register)
14473 (s390_fill_gregset, s390_store_last_break): Adjust.
14474 (target_regsets): Rename to ...
14475 (s390_regsets): ... this, and make static.
14476 (s390_get_pc, s390_set_pc): Adjust.
14477 (s390_get_hwcap): New target_desc parameter, and use it.
14478 [__s390x__] (have_hwcap_s390_high_gprs): New global.
14479 (s390_arch_setup): Adjust to set the current process'es target
14480 description. Don't adjust the regmap.
14481 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
14482 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
14483 (regs_info_3264): New globals.
14484 (s390_regs_info): New function.
14485 (the_low_target): Adjust.
14486 (initialize_low_arch): New function.
14487 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
14488 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
14489 [__mips64] (init_registers_mips_linux)
14490 (init_registers_mips_dsp_linux): Delete defines.
14491 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
14492 (have_dsp): New global.
14493 (mips_read_description): New, based on mips_arch_setup.
14494 (mips_arch_setup): Reimplement.
14495 (get_usrregs_info): New function.
14496 (mips_cannot_fetch_register, mips_cannot_store_register)
14497 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
14498 (mips_fill_fpregset, mips_store_fpregset): Adjust.
14499 (target_regsets): Rename to ...
14500 (mips_regsets): ... this, and make static.
14501 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
14502 (dsp_regs_info, regs_info): New globals.
14503 (mips_regs_info): New function.
14504 (the_low_target): Adjust.
14505 (initialize_low_arch): New function.
14506 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
14507 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
14508 Declare.
14509 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
14510 (arm_read_description): New, with bits factored from
14511 arm_arch_setup.
14512 (arm_arch_setup): Reimplement.
14513 (target_regsets): Rename to ...
14514 (arm_regsets): ... this, and make static.
14515 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
14516 (arm_regs_info): New function.
14517 (the_low_target): Adjust.
14518 (initialize_low_arch): New function.
14519 * linux-m68k-low.c (tdesc_m68k): Declare.
14520 (target_regsets): Rename to ...
14521 (m68k_regsets): ... this, and make static.
14522 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
14523 (m68k_regs_info): New function.
14524 (m68k_arch_setup): New function.
14525 (the_low_target): Adjust.
14526 (initialize_low_arch): New function.
14527 * linux-sh-low.c (tdesc_sharch): Declare.
14528 (target_regsets): Rename to ...
14529 (sh_regsets): ... this, and make static.
14530 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
14531 (sh_regs_info, sh_arch_setup): New functions.
14532 (the_low_target): Adjust.
14533 (initialize_low_arch): New function.
14534 * linux-bfin-low.c (tdesc_bfin): Declare.
14535 (bfin_arch_setup): New function.
14536 (bfin_usrregs_info, regs_info): New globals.
14537 (bfin_regs_info): New function.
14538 (the_low_target): Adjust.
14539 (initialize_low_arch): New function.
14540 * linux-cris-low.c (tdesc_cris): Declare.
14541 (cris_arch_setup): New function.
14542 (cris_usrregs_info, regs_info): New globals.
14543 (cris_regs_info): New function.
14544 (the_low_target): Adjust.
14545 (initialize_low_arch): New function.
14546 * linux-cris-low.c (tdesc_crisv32): Declare.
14547 (cris_arch_setup): New function.
14548 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
14549 (cris_regs_info): New function.
14550 (the_low_target): Adjust.
14551 (initialize_low_arch): New function.
14552 * linux-m32r-low.c (tdesc_m32r): Declare.
14553 (m32r_arch_setup): New function.
14554 (m32r_usrregs_info, regs_info): New globals.
14555 (m32r_regs_info): Adjust.
14556 (initialize_low_arch): New function.
14557 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
14558 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
14559 (tic6x_usrregs_info): Forward declare.
14560 (tic6x_read_description): New function, based on ...
14561 (tic6x_arch_setup): ... this. Reimplement.
14562 (target_regsets): Rename to ...
14563 (tic6x_regsets): ... this, and make static.
14564 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
14565 (tic6x_regs_info): New function.
14566 (the_low_target): Adjust.
14567 (initialize_low_arch): New function.
14568 * linux-xtensa-low.c (tdesc_xtensa): Declare.
14569 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
14570 (target_regsets): Rename to ...
14571 (xtensa_regsets): ... this, and make static.
14572 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
14573 globals.
14574 (xtensa_arch_setup, xtensa_regs_info): New functions.
14575 (the_low_target): Adjust.
14576 (initialize_low_arch): New function.
14577 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
14578 (nios2_arch_setup): Set the current process'es tdesc.
14579 (target_regsets): Rename to ...
14580 (nios2_regsets): ... this.
14581 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
14582 (nios2_regs_info): New function.
14583 (the_low_target): Adjust.
14584 (initialize_low_arch): New function.
14585 * linux-aarch64-low.c (tdesc_aarch64): Declare.
14586 (aarch64_arch_setup): Set the current process'es tdesc.
14587 (target_regsets): Rename to ...
14588 (aarch64_regsets): ... this.
14589 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
14590 (aarch64_regs_info): New function.
14591 (the_low_target): Adjust.
14592 (initialize_low_arch): New function.
14593 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
14594 globals.
14595 (target_regsets): Rename to ...
14596 (tile_regsets): ... this.
14597 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
14598 (tile_regs_info): New function.
14599 (tile_arch_setup): Set the current process'es tdesc.
14600 (the_low_target): Adjust.
14601 (initialize_low_arch): New function.
14602 * spu-low.c (tdesc_spu): Declare.
14603 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
14604 * win32-arm-low.c (tdesc_arm): Declare.
14605 (arm_arch_setup): New function.
14606 (the_low_target): Install arm_arch_setup instead of
14607 init_registers_arm.
14608 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
14609 (init_windows_x86): Rename to ...
14610 (i386_arch_setup): ... this. Set `win32_tdesc'.
14611 (the_low_target): Adjust.
14612 * win32-low.c (win32_tdesc): New global.
14613 (child_add_thread): Don't create the thread cache here.
14614 (do_initial_child_stuff): Set the new process'es tdesc.
14615 * win32-low.h (struct target_desc): Forward declare.
14616 (win32_tdesc): Declare.
14617 * lynx-i386-low.c (tdesc_i386): Declare global.
14618 (lynx_i386_arch_setup): Set `lynx_tdesc'.
14619 * lynx-low.c (lynx_tdesc): New global.
14620 (lynx_add_process): Set the new process'es tdesc.
14621 * lynx-low.h (struct target_desc): Forward declare.
14622 (lynx_tdesc): Declare global.
14623 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
14624 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
14625 * nto-low.c (nto_tdesc): New global.
14626 (do_attach): Set the new process'es tdesc.
14627 * nto-low.h (struct target_desc): Forward declare.
14628 (nto_tdesc): Declare.
14629 * nto-x86-low.c (tdesc_i386): Declare.
14630 (nto_x86_arch_setup): Set `nto_tdesc'.
14631
14632 2013-06-04 Gary Benson <gbenson@redhat.com>
14633
14634 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
14635 to qSupported response when appropriate.
14636 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
14637 with nonzero-length annex.
14638 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
14639 arguments supplied in annex.
14640
14641 2013-05-31 Doug Evans <dje@google.com>
14642
14643 PR server/15594
14644 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
14645 64 bits in 64-cross-32 environment.
14646
14647 2013-05-28 Pedro Alves <palves@redhat.com>
14648
14649 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
14650 (aarch64-without-fpu.c): Delete rule.
14651 * configure.srv (aarch64*-*-linux*): Remove references to
14652 aarch64-without-fpu.o and aarch64-without-fpu.xml.
14653 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
14654 declaration.
14655
14656 2013-05-24 Pedro Alves <palves@redhat.com>
14657
14658 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
14659 instead of strchr/decode_address. Error if the range isn't split
14660 with a ','. Don't assume there's be a ':' in the action.
14661
14662 2013-05-23 Yao Qi <yao@codesourcery.com>
14663 Pedro Alves <palves@redhat.com>
14664
14665 * linux-low.c (lwp_in_step_range): New function.
14666 (linux_wait_1): If the thread was range stepping and stopped
14667 outside the stepping range, report the stop to GDB. Otherwise,
14668 continue stepping. Add range stepping debug output.
14669 (linux_set_resume_request): Copy the step range from the resume
14670 request to the lwp.
14671 (linux_supports_range_stepping): New.
14672 (linux_target_ops) <supports_range_stepping>: Set to
14673 linux_supports_range_stepping.
14674 * linux-low.h (struct linux_target_ops)
14675 <supports_range_stepping>: New field.
14676 (struct lwp_info) <step_range_start, step_range_end>: New fields.
14677 * linux-x86-low.c (x86_supports_range_stepping): New.
14678 (the_low_target) <supports_range_stepping>: Set to
14679 x86_supports_range_stepping.
14680 * server.c (handle_v_cont): Handle 'r' action.
14681 (handle_v_requests): Append ";r" if the target supports range
14682 stepping.
14683 * target.h (struct thread_resume) <step_range_start,
14684 step_range_end>: New fields.
14685 (struct target_ops) <supports_range_stepping>:
14686 New field.
14687 (target_supports_range_stepping): New macro.
14688
14689 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14690
14691 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
14692 confusion in comment.
14693
14694 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14695
14696 * lynx-low.c (struct process_info_private): New type.
14697 (lynx_add_process): New function.
14698 (lynx_create_inferior, lynx_attach): Replace calls to
14699 add_process by calls to lynx_add_process.
14700 (lynx_resume): If PTID is null, then try using
14701 current_process()->private->last_wait_event_ptid.
14702 Add comments.
14703 (lynx_clear_inferiors): Delete. The contents of that function
14704 has been inlined in lynx_mourn;
14705 (lynx_wait_1): Save the ptid in the process's private data.
14706 (lynx_mourn): Free the process' private data. Replace call
14707 to lynx_clear_inferiors by call to clear_inferiors.
14708
14709 2013-05-17 Yao Qi <yao@codesourcery.com>
14710
14711 * i386-low.c (i386_length_and_rw_bits): Move the comment to
14712 the right place.
14713
14714 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
14715
14716 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
14717 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
14718 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
14719 PT_TEXT_END_ADDR guards. Update comments.
14720 (linux_target_op) <read_offsets>: Conditionally define to
14721 linux_read_offsets if the target is UCLIBC and if it defines
14722 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
14723
14724 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
14725 Andrew Jenner <andrew@codesourcery.com>
14726
14727 * Makefile.in (SFILES): Add linux-nios2-low.c.
14728 (clean): Add action to delete nios2-linux.c.
14729 (nios2-linux.c): New rule.
14730 * configure.srv: Add nios2*-*-linux*.
14731 * linux-nios2-low.c: New.
14732
14733 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
14734
14735 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
14736
14737 2013-04-25 Hui Zhu <hui@codesourcery.com>
14738
14739 PR gdb/15186
14740 * ax.c (ax_printf): Add fflush.
14741
14742 2013-04-22 Tom Tromey <tromey@redhat.com>
14743
14744 * Makefile.in (SFILES): Add filestuff.c.
14745 (OBS): Add filestuff.o.
14746 (filestuff.o): New target.
14747 * config.in, configure: Rebuild.
14748 * configure.ac: Check for fdwalk, pipe2.
14749
14750 2013-04-17 Pedro Alves <palves@redhat.com>
14751
14752 * configure.ac (USE_THREAD_DB): Delete variable.
14753 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
14754 Don't AC_SUBST USE_THREAD_DB.
14755 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
14756 * config.in, configure: Regenerate.
14757
14758 2013-04-16 Pedro Alves <palves@redhat.com>
14759
14760 * linux-low.h (struct lwp_info) <thread_known>: Move under
14761 the USE_THREAD_DB #ifdef.
14762
14763 2013-04-16 Pedro Alves <palves@redhat.com>
14764
14765 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
14766 (linux-low.o): Delete rule.
14767 * linux-low.h: Always include "gdb_thread_db.h" instead of
14768 conditionally including thread_db.h.
14769 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
14770 HAVE_THREAD_DB_H.
14771
14772 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14773
14774 * Makefile.in (install-only): Fix make install regression.
14775
14776 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
14777
14778 Convert man pages to texinfo, new gdbinit.5 texinfo page.
14779 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
14780 installation.
14781 * gdbserver.1: Remove.
14782
14783 2013-03-22 Pedro Alves <palves@redhat.com>
14784
14785 * linux-low.c (handle_extended_wait): Don't call
14786 linux_enable_event_reporting.
14787
14788 2013-03-15 Tony Theodore <tonyt@logyst.com>
14789
14790 PR build/9098:
14791 * Makefile.in (SHELL): Use @SHELL@.
14792
14793 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
14794
14795 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
14796 compiler warning.
14797
14798 2013-03-13 Joel Brobecker <brobecker@adacore.com>
14799
14800 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
14801 Remove extraneous NULL element.
14802
14803 2013-03-13 Yao Qi <yao@codesourcery.com>
14804
14805 * tracepoint.c (traceframe_read_tsv): Look for the last matched
14806 'V' block in trace frame.
14807
14808 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14809
14810 * target.h (struct target_ops): Add btrace ops.
14811 (target_supports_btrace): New macro.
14812 (target_enable_btrace): New macro.
14813 (target_disable_btrace): New macro.
14814 (target_read_btrace): New macro.
14815 * gdbthread.h (struct thread_info): Add btrace field.
14816 * server.c: Include btrace-common.h.
14817 (handle_btrace_general_set): New function.
14818 (handle_btrace_enable): New function.
14819 (handle_btrace_disable): New function.
14820 (handle_general_set): Call handle_btrace_general_set.
14821 (handle_qxfer_btrace): New function.
14822 (struct qxfer qxfer_packets[]): Add btrace entry.
14823 * inferiors.c (remove_thread): Disable btrace.
14824 * linux-low: Include linux-btrace.h.
14825 (linux_low_enable_btrace): New function.
14826 (linux_low_read_btrace): New function.
14827 (linux_target_ops): Add btrace ops.
14828 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
14829 Add srv_linux_btrace=yes.
14830 (x86_64-*-linux*): Add linux-btrace.o.
14831 Add srv_linux_btrace=yes.
14832 * configure.ac: Define HAVE_LINUX_BTRACE.
14833 * config.in: Regenerated.
14834 * configure: Regenerated.
14835
14836 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14837
14838 * server.c (handle_qxfer): Preserve error message if -3 is
14839 returned.
14840 (qxfer): Document the -3 return value.
14841
14842 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14843
14844 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
14845 (linux_btrace_h): New variable.
14846 (linux-btrace.o): New rule.
14847
14848 2013-03-08 Stan Shebs <stan@codesourcery.com>
14849 Hafiz Abid Qadeer <abidh@codesourcery.com>
14850
14851 * tracepoint.c (trace_buffer_size): New global.
14852 (DEFAULT_TRACE_BUFFER_SIZE): New define.
14853 (init_trace_buffer): Change to one-argument function. Allocate
14854 trace buffer memory.
14855 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
14856 handle QTBuffer:size packet.
14857 (cmd_bigqtbuffer_size): New function.
14858 (initialize_tracepoint): Call init_trace_buffer with
14859 DEFAULT_TRACE_BUFFER_SIZE.
14860 * server.c (handle_query): Add QTBuffer:size in the
14861 supported packets.
14862
14863 2013-03-07 Yao Qi <yao@codesourcery.com>
14864
14865 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
14866 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
14867 of -1.
14868 (cmd_qtsp): Adjust condition. Do post increment.
14869 Set cur_action and cur_step_action back to 0.
14870
14871 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
14872
14873 PR server/15236
14874 * linux-low.c (linux_write_memory): Return early success if LEN is
14875 zero.
14876
14877 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
14878
14879 * configure.srv: Add x86_64-*-cygwin* as target.
14880
14881 2013-02-28 Tom Tromey <tromey@redhat.com>
14882
14883 * configure.ac: Invoke AC_SYS_LARGEFILE.
14884 * configure, config.in: Rebuild.
14885
14886 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
14887
14888 * win32-low.c: Throughout, fix format strings and casts of
14889 printf-like functions to avoid type related warnings on all
14890 platforms.
14891 (get_child_debug_event): Print dwDebugEventCode as hex since
14892 that's how it's usually documented.
14893
14894 2013-02-28 Yao Qi <yao@codesourcery.com>
14895
14896 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
14897 pulongest.
14898
14899 2013-02-27 Jiong Wang <jiwang@tilera.com>
14900
14901 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
14902 (reg-tilegx32.c): New rule.
14903 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
14904 * linux-tile-low.c (tile_arch_setup): New function. Invoke
14905 different register info initializer according to elf class.
14906 (init_registers_tilgx32): New function. The tilegx32 register info
14907 initializer.
14908 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
14909 (tile_store_gregset): Likewise.
14910
14911 2013-02-27 Yao Qi <yao@codesourcery.com>
14912
14913 * server.c (process_point_options): Print debug message when
14914 debug_threads is true.
14915
14916 2013-02-26 Yao Qi <yao@codesourcery.com>
14917
14918 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
14919
14920 2013-02-19 Pedro Alves <palves@redhat.com>
14921 Kai Tietz <ktietz@redhat.com>
14922
14923 PR gdb/15161
14924
14925 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
14926 instead of strtoul to extract address from packet.
14927 (process_serial_event) <'z'>: Likewise.
14928
14929 2013-02-18 Yao Qi <yao@codesourcery.com>
14930
14931 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
14932
14933 2013-02-14 Pedro Alves <palves@redhat.com>
14934
14935 Plug memory leak.
14936
14937 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
14938 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
14939
14940 2013-02-14 Pedro Alves <palves@redhat.com>
14941
14942 * tracepoint.c (cmd_qtdpsrc): Use savestring.
14943
14944 2013-02-14 Pedro Alves <palves@redhat.com>
14945
14946 * tracepoint.c (save_string): Delete.
14947 (add_tracepoint_action): Use savestring instead of save_string.
14948
14949 2013-02-12 Pedro Alves <palves@redhat.com>
14950
14951 * linux-xtensa-low.c: Ditto.
14952 * xtensa-xtregs.c: Ditto.
14953
14954 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
14955
14956 * thread-db.c (thread_db_get_tls_address): NULL pointer check
14957 thread_db.
14958
14959 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14960
14961 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
14962 aarch64_num_wp_regs and aarch64_num_bp_regs to
14963 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
14964
14965 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14966
14967 * linux-aarch64-low.c (ps_get_thread_area): Replace
14968 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
14969
14970 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
14971 Marcus Shawcroft <marcus.shawcroft@arm.com>
14972 Nigel Stephens <nigel.stephens@arm.com>
14973 Yufeng Zhang <yufeng.zhang@arm.com>
14974
14975 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
14976 (aarch64.c, aarch64-without-fpu.c): New targets.
14977 * configure.srv (aarch64*-*-linux*): New.
14978 * linux-aarch64-low.c: New file.
14979
14980 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
14981
14982 * linux-low.c (handle_extended_wait, linux_create_inferior)
14983 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
14984 (dequeue_one_deferred_signal, linux_resume_one_thread)
14985 (fetch_register, linux_write_memory, linux_enable_event_reporting)
14986 (linux_tracefork_grandchild, linux_test_for_tracefork)
14987 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
14988 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
14989 where the argument is 0.
14990
14991 2013-01-25 Yao Qi <yao@codesourcery.com>
14992
14993 * event-loop.c: Include "queue.h".
14994 (gdb_event_p): New typedef.
14995 (struct gdb_event) <next_event>: Remove.
14996 (event_queue): Change to QUEUE(gdb_event_p).
14997 (async_queue_event): Remove.
14998 (gdb_event_xfree): New.
14999 (initialize_event_loop): New.
15000 (process_event): Use API from QUEUE.
15001 (wait_for_event): Likewise.
15002 * server.c (main): Call initialize_event_loop.
15003 * server.h (initialize_event_loop): Declare.
15004
15005 2013-01-18 Yao Qi <yao@codesourcery.com>
15006
15007 * ax.h (struct eval_agent_expr_context): New.
15008 (gdb_eval_agent_expr): Update declaration.
15009 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
15010 TFRAME. Add new argument CTX.
15011 * server.h (struct eval_agent_expr_context): Declare.
15012 (agent_mem_read, agent_tsv_read): Update declaration.
15013 (agent_mem_read_string): Likewise.
15014 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
15015 (add_traceframe_block): Add new argument TPOINT.
15016 Increase TPOINT->traceframe_usage.
15017 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
15018 eval_tracepoint_agent_expr.
15019 (condition_true_at_tracepoint): Likewise.
15020 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
15021 (agent_mem_read_string, agent_tsv_read): Likewise.
15022
15023 2013-01-16 Yao Qi <yao@codesourcery.com>
15024
15025 * linux-low.c (linux_resume_one_lwp): Don't check
15026 'lwp->bp_reinsert != 0'.
15027
15028 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15029 Pedro Alves <palves@redhat.com>
15030
15031 * lynx-low.c (ptrace_request_to_str): Define a temporary
15032 macro and use it to simplify this function's implementation.
15033
15034 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15035
15036 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
15037 sets errno.
15038
15039 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15040
15041 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
15042
15043 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15044
15045 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
15046
15047 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15048
15049 * lynx-low.c (lynx_resume): Use the resume_info parameter
15050 to determine the ptid for the lynx_ptrace call, unless
15051 it is equal to minus_one_ptid, in which case we use the
15052 ptid of the current_inferior.
15053 (lynx_wait_1): After having received a thread create/exit
15054 event, resume the inferior's execution using the signaling
15055 thread's ptid, rather than the old ptid.
15056
15057 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15058
15059 * lynx-low.c (lynx_resume): Delete variable ret.
15060
15061 2013-01-01 Joel Brobecker <brobecker@adacore.com>
15062
15063 * gdbreplay.c (gdbreplay_version): Update copyright year.
15064 * server.c (gdbserver_version): Likewise.
15065
15066 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15067
15068 * lynx-low.c (lynx_wait_1): Add debug trace before adding
15069 new thread.
15070
15071 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15072
15073 * lynx-low.c (ptrace_request_to_str): Add handling for
15074 PTRACE_GETTRACESIG.
15075
15076 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15077
15078 * lynx-low.c (lynx_attach): Delete variable new_process.
15079
15080 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15081
15082 * lynx-low.c (lynx_create_inferior): Delete variable
15083 new_process.
15084
15085 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15086
15087 * lynx-low.c (ptrace_request_to_str): Do not handle
15088 PTRACE_GETTHREADLIST if this macro does not exist.
15089
15090 2012-12-15 Yao Qi <yao@codesourcery.com>
15091
15092 * Makefile.in (OBS): Add notif.o.
15093 * notif.c, notif.h: New.
15094 * server.c: Include "notif.h".
15095 (struct vstop_notif) <next>: Remove.
15096 <base>: New field.
15097 (queue_stop_reply): Update.
15098 (push_event, send_next_stop_reply): Remove.
15099 (discard_queued_stop_replies): Update.
15100 (notif_stop): New variable.
15101 (handle_v_stopped): Remove.
15102 (handle_v_requests): Don't call handle_v_stopped. Call
15103 handle_ack_notif instead.
15104 (queue_stop_reply_callback): Call notif_event_enque instead
15105 of queue_stop_reply.
15106 (handle_status): Don't call send_next_stop_reply, call
15107 notif_write_event instead.
15108 (kill_inferior_callback): Likewise.
15109 (detach_or_kill_inferior_callback): Likewise.
15110 (main): Call initialize_notif.
15111 (process_serial_event): Call QUEUE_is_empty.
15112 (handle_target_event): Call notif_push instead of push event.
15113 * server.h (push_event): Remove declaration.
15114
15115 2012-12-10 Tom Tromey <tromey@redhat.com>
15116
15117 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
15118 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
15119 macros.
15120 (.c.o): Rewrite.
15121 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
15122 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
15123 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
15124 (amd64-linux-ipa.o, ax.o): Rewrite.
15125 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
15126 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
15127 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
15128 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
15129 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
15130 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
15131 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
15132 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
15133 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
15134 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
15135 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
15136 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
15137 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
15138 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
15139 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
15140 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
15141 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
15142 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
15143 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
15144 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
15145 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
15146 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
15147 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
15148 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
15149 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
15150 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
15151 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
15152 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
15153 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
15154 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
15155 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
15156 (reg-tilegx.o): Remove.
15157 (all_object_files): New macro.
15158 Include .deps files.
15159 * aclocal.m4, configure: Rebuild.
15160 * acinclude.m4: Include depstand.m4, lead-dot.m4.
15161 * configure.ac: Invoke ZW_CREATE_DEPDIR,
15162 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
15163
15164 2012-12-05 Tom Tromey <tromey@redhat.com>
15165
15166 PR gdb/14917:
15167 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
15168
15169 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
15170
15171 * configure.ac: Check for linux/perf_event.h.
15172 * config.in: Regenerated.
15173 * configure: Regenerated.
15174
15175 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
15176
15177 * hostio.c (handle_readlink): Decrease buffer size
15178 parameter passed to readlink by one byte.
15179
15180 2012-11-26 Yao Qi <yao@codesourcery.com>
15181
15182 * configure.ac (build_warnings): Append '-Wempty-body'.
15183 * configure: Regenerated.
15184 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
15185 body.
15186
15187 2012-11-15 Pierre Muller <muller@sourceware.org>
15188
15189 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
15190 * config.in: Regenerate.
15191 * configure: Regenerate.
15192 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
15193 Use "gdb_wait.h" header instead of <sys/wait.h> header.
15194 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
15195 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
15196 header.
15197 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
15198 instead of <sys/wait.h> header.
15199 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
15200
15201 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
15202
15203 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
15204 (various make rules): Remove -DGDBSERVER
15205
15206 2012-11-09 Yao Qi <yao@codesourcery.com>
15207
15208 * spu-low.c (current_ptid): Move it to ..
15209 * gdbthread.h: ... here. New.
15210 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
15211 * server.c (myresume, process_serial_event): Likewise.
15212 * thread-db.c (thread_db_find_new_threads): Likewise.
15213 * tracepoint.c (run_inferior_command): Likewise.
15214
15215 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
15216
15217 * server.c (handle_search_memory_1): Include access length in
15218 warning message.
15219
15220 2012-09-05 Michael Brandt <michael.brandt@axis.com>
15221
15222 * linux-crisv32-low.c: Fix compile errors.
15223
15224 2012-09-04 Yao Qi <yao@codesourcery.com>
15225
15226 * tracepoint.c (cmd_qtsv): Adjust debug message.
15227 Don't check CUR_TPOINT.
15228
15229 2012-08-28 Yao Qi <yao@codesourcery.com>
15230
15231 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
15232 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
15233 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
15234 Remove declarations of xmalloc, xreallloc, xstrdup and
15235 freeargv.
15236 * Makefile.in (libiberty_h): New.
15237 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
15238 (linux-bfin-low.o): Append dependency 'libiberty.h'.
15239
15240 2012-08-23 Yao Qi <yao@codesourcery.com>
15241
15242 * server.h: Remove declaration of 'xsnprintf'.
15243
15244 2012-08-22 Keith Seitz <keiths@redhat.com>
15245
15246 * server.h: Include build-gnulib-gbserver/config.h.
15247 * gdbreplay.c: Likewise.
15248
15249 2012-08-08 Doug Evans <dje@google.com>
15250
15251 * Makefile.in (SFILES): Add gdb_vecs.c.
15252 (OBS): Add gdb_vecs.o.
15253 (gdb_vecs_h, host_defs_h): New variables.
15254 (thread-db.o): Add $(gdb_vecs_h) dependency.
15255 (gdb_vecs.o): New rule.
15256 * thread-db.c: #include "gdb_vecs.h".
15257 (thread_db_load_search): Use a vector to iterate over path elements.
15258 Handle text appearing after "$pdir".
15259
15260 * configure.ac: Add check for strstr.
15261 * config.in: Regenerate.
15262 * configure: Regenerate.
15263
15264 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
15265
15266 * hostio.c (handle_pread): If pread fails, fall back to attempting
15267 lseek/read.
15268 (handle_pwrite): Likewise for pwrite.
15269
15270 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
15271
15272 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
15273 between unsupported TYPE and unimplementable ADDR/LEN combination.
15274 (arm_insert_point): Act on new return value.
15275
15276 2012-07-31 Pedro Alves <palves@redhat.com>
15277
15278 * server.c (process_point_options): Only skip tokens if we find
15279 one that is unrecognized. Don't treat 'X' specially while
15280 skipping unrecognized tokens.
15281
15282 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
15283
15284 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
15285 to 4-byte-align HW breakpoint addresses for Thumb.
15286
15287 2012-07-27 Yao Qi <yao@codesourcery.com>
15288
15289 PR remote/14161.
15290
15291 * server.h: Declare gdb_agent_about_to_close.
15292 * target.c (kill_inferior): Include "agent.h".
15293 New. Send command 'kill'.
15294 * target.h (kill_inferior): Removed macro.
15295 * tracepoint.c (gdb_agent_about_to_close): New.
15296 (gdb_agent_helper_thread): Handle command 'close'.
15297 Wait endlessly until the inferior stops.
15298 Install gdb_agent_remove_socket to atexit hook.
15299 (agent_socket_name): New static variable.
15300 (gdb_agent_socket_init): Replace local variable 'name' with
15301 'agent_socket_name'.
15302 (gdb_agent_remove_socket): New.
15303
15304 2012-07-27 Yao Qi <yao@codesourcery.com>
15305
15306 * server.c (process_point_options): Stop at 'X' when parsing.
15307
15308 2012-07-19 Michael Eager <eager@eagercon.com>
15309
15310 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
15311 to hw_execute.
15312 * linux-x86-low.c (x86_insert_point, x86_remove_point):
15313 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
15314 hardware breakpoint.
15315
15316 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
15317
15318 * gdbserver/linux-low.c (initialize_low): Call
15319 linux_ptrace_init_warnings.
15320
15321 2012-07-02 Doug Evans <dje@google.com>
15322
15323 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
15324 pointer to int.
15325
15326 2012-07-02 Stan Shebs <stan@codesourcery.com>
15327
15328 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
15329 (ax.o): Add it to build rule.
15330 (ax-ipa.o): Ditto.
15331 (OBS): Add format.o.
15332 (IPA_OBS): Add format.o.
15333 * server.c (handle_query): Claim support for breakpoint commands.
15334 (process_point_options): Add command case.
15335 (process_serial_event): Leave running if there are printfs in
15336 effect.
15337 * mem-break.h (any_persistent_commands): Declare.
15338 (add_breakpoint_commands): Declare.
15339 (gdb_no_commands_at_breakpoint): Declare.
15340 (run_breakpoint_commands): Declare.
15341 * mem-break.c (struct point_command_list): New struct.
15342 (struct breakpoint): New field command_list.
15343 (any_persistent_commands): New function.
15344 (add_commands_to_breakpoint): New function.
15345 (add_breakpoint_commands): New function.
15346 (gdb_no_commands_at_breakpoint): New function.
15347 (run_breakpoint_commands): New function.
15348 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
15349 locally.
15350 * ax.c: Include format.h.
15351 (ax_printf): New function.
15352 (gdb_eval_agent_expr): Add printf opcode.
15353
15354 2012-06-13 Yao Qi <yao@codesourcery.com>
15355
15356 * server.c (start_inferior): Remove duplicated writes to fields
15357 'last_resume_kind' and 'last_status' of 'current_inferior'.
15358
15359 2012-06-12 Yao Qi <yao@codesourcery.com>
15360 Pedro Alves <palves@redhat.com>
15361
15362 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
15363 comment.
15364 * server.c (handle_v_cont): Extend comment.
15365
15366 2012-06-11 Yao Qi <yao@codesourcery.com>
15367
15368 * linux-low.c (linux_attach): Add 'static'.
15369
15370 2012-06-06 Yao Qi <yao@codesourcery.com>
15371
15372 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
15373
15374 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
15375
15376 Fix gcc -flto compilation warning.
15377 * server.c (main): Make variable multi_mode and attach volatile.
15378
15379 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15380
15381 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
15382 if the platform doesn't know about it.
15383
15384 2012-05-30 Jeff Kenton <jkenton@tilera.com>
15385
15386 * Makefile.in (SFILES): Add linux-tile-low.c.
15387 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
15388 * configure.srv: Handle tilegx-*-linux*.
15389 * linux-tile-low.c: New file.
15390
15391 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15392
15393 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
15394
15395 2012-05-24 Pedro Alves <palves@redhat.com>
15396
15397 PR gdb/7205
15398
15399 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
15400
15401 2012-05-24 Pedro Alves <palves@redhat.com>
15402
15403 PR gdb/7205
15404
15405 Replace target_signal with gdb_signal throughout.
15406
15407 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
15408
15409 * linux-low.c (linux_store_registers): Avoid the copying sequence
15410 when no data has been retrieved by ptrace.
15411
15412 2012-05-22 Will Deacon <will.deacon@arm.com>
15413
15414 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
15415 Include asm/ptrace.h.
15416 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
15417 already defined.
15418
15419 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
15420
15421 * linux-low.c (linux_store_registers): Don't re-retrieve data
15422 with ptrace that has already been obtained from /proc. Always
15423 copy any data retrieved with ptrace to the buffer supplied.
15424
15425 2012-05-11 Yao Qi <yao@codesourcery.com>
15426 Pedro Alves <palves@redhat.com>
15427
15428 * linux-low.c (enum stopping_threads_kind): New.
15429 (stopping_threads): Change type to `enum stopping_threads_kind'.
15430 (handle_extended_wait): If stopping and suspending threads, leave
15431 the new_lwp suspended too.
15432 (linux_wait_for_event): Adjust.
15433 (stop_all_lwps): Set `stopping_threads' to
15434 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
15435 whether we're suspending threads or just stopping them. Assert no
15436 recursion happens.
15437
15438 2012-04-29 Yao Qi <yao@codesourcery.com>
15439
15440 * server.h: Move some code to ...
15441 * gdbthread.h: ... here. New.
15442 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
15443 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
15444 (nto-low.o, win32-low.o): Likewise.
15445 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
15446 * regcache.c, remote-utils.c, server.c: Likewise.
15447 * target.c, tracepoint.c, win32-low.c: Likewise.
15448
15449 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15450
15451 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
15452 (PTRACE_ARG4_TYPE): Likewise.
15453 (PTRACE_XFER_TYPE): Likewise.
15454 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
15455 ptrace to PTRACE_ARG3_TYPE.
15456 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
15457 (PTRACE_ARG4_TYPE): Likewise.
15458 (PTRACE_XFER_TYPE): Likewise.
15459 (linux_detach_one_lwp): Cast fourth argument of
15460 ptrace to long then PTRACE_ARG4_TYPE.
15461 (regsets_fetch_inferior_registers): Cast third argument of
15462 ptrace to long then PTRACE_ARG3_TYPE.
15463 (regsets_store_inferior_registers): Likewise.
15464
15465 2012-04-20 Pedro Alves <palves@redhat.com>
15466
15467 * configure: Regenerate.
15468
15469 2012-04-19 Pedro Alves <palves@redhat.com>
15470
15471 * Makefile.in (GNULIB_BUILDDIR): New.
15472 (LIBGNU, INCGNU, GNULIB_H): Adjust.
15473 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
15474 (all, install-only, uninstall, clean-info, all-lib, clean): No
15475 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
15476 (maintainer-clean realclean distclean): Use subdir_do.
15477 (subdir_do): New.
15478 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
15479 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
15480 * acinclude.m4: Include acx_configure_dir.m4.
15481 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
15482 calls. Call AC_PROG_RANLIB. Configure gnulib using
15483 ACX_CONFIGURE_DIR.
15484 (GNULIB): New.
15485 (GNULIB_STDINT_H): Adjust.
15486 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
15487 * gdbreplay.c: Include build-gnulib/config.h.
15488 * server.h: Likewise.
15489 * aclocal.m4: Regenerate.
15490 * config.in: Regenerate.
15491 * configure: Regenerate.
15492
15493 2012-04-19 Pedro Alves <palves@redhat.com>
15494
15495 * Makefile.in (LIBGNU, INCGNU): Adjust.
15496 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
15497 (all, install-only, uninstall, clean-info, all-lib, clean)
15498 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
15499 * configure.ac: Adjust AC_OUTPUT output.
15500 * aclocal.m4: Regenerate.
15501 * configure: Regenerate.
15502
15503 2012-04-19 Pedro Alves <palves@redhat.com>
15504
15505 * Makefile.in (generated_files): New.
15506 (server_h): Remove the explicit dependency on config.h, and depend
15507 on $generated_files.
15508
15509 2012-04-19 Pedro Alves <palves@redhat.com>
15510
15511 * Makefile.in (INCGNU): Add -Ignulib.
15512
15513 2012-04-19 Pedro Alves <palves@redhat.com>
15514
15515 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
15516 (INCGNU): ... this, and spell out -I here.
15517 (GNULIB_LIB): Rename to ...
15518 (LIBGNU): ... this.
15519 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
15520
15521 2012-04-19 Pedro Alves <palves@redhat.com>
15522
15523 * config.in: Regenerate.
15524
15525 2012-04-19 Pedro Alves <palves@redhat.com>
15526
15527 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
15528 * server.h (memmem): Remove declaration.
15529 * config.in: Regenerate.
15530 * configure: Regenerate.
15531
15532 2012-04-19 Yao Qi <yao@codesourcery.com>
15533
15534 * Makefile.in (SFILES): Add common/vec.c.
15535 (OBS): Add vec.o.
15536 (vec.o): New rule.
15537
15538 2012-04-19 Yao Qi <yao@codesourcery.com>
15539
15540 * remote-utils.c (prepare_resume_reply): Replace with macro
15541 target_core_of_thread.
15542 * server.c (handle_qxfer_threads_proper): Likewise.
15543 * target.h (traget_core_of_thread): New macro.
15544
15545 2012-04-18 Pedro Alves <palves@redhat.com>
15546
15547 * aclocal.m4: Regenerate.
15548 * configure: Regenerate.
15549
15550 2012-04-16 Yao Qi <yao@codesourcery.com>
15551
15552 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
15553 duplicated on address.
15554
15555 2012-04-16 Yao Qi <yao@codesourcery.com>
15556
15557 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
15558 (struct tracepoint_action_ops) <send>: New field.
15559 (m_tracepoint_action_send, r_tracepoint_action_send): New.
15560 (agent_expr_send, x_tracepoint_action_send): New.
15561 (l_tracepoint_action_send): New.
15562 (cmd_qtdp): Download and install tracepoint
15563 according to `use_agent'.
15564 (run_inferior_command): Add one more parameter `len'.
15565 Update callers.
15566 (tracepoint_send_agent): New.
15567 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
15568
15569 2012-04-16 Yao Qi <yao@codesourcery.com>
15570
15571 * tracepoint.c (download_tracepoints): Moved to ...
15572 (cmd_qtstart): ... here.
15573
15574 2012-04-14 Yao Qi <yao@codesourcery.com>
15575
15576 * tracepoint.c: Include inttypes.h.
15577 (struct collect_memory_action): Use sized types.
15578 (struct tracepoint): Likewise.
15579 (cmd_qtdp, stop_tracing): Update print specifiers.
15580 (cmd_qtp, response_tracepoint): Likewise.
15581 (collect_data_at_tracepoint): Likewise.
15582 (collect_data_at_step): Likewise.
15583
15584 2012-04-14 Yao Qi <yao@codesourcery.com>
15585
15586 Import gnulib module inttypes.
15587 * aclocal.m4, config.in, configure: Regenerated.
15588
15589 2012-04-14 Yao Qi <yao@codesourcery.com>
15590
15591 * Makefile.in (maintainer-clean, realclean, distclean): Remove
15592 Makefile and config.status at last.
15593
15594 2012-04-13 Yao Qi <yao@codesourcery.com>
15595
15596 * tracepoint.c: Include stdint.h unconditionally.
15597
15598 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15599
15600 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
15601 on BFD_HAVE_SYS_PROCFS_TYPE.
15602 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
15603 * configure: Regenerate.
15604 * config.in: Likewise.
15605
15606 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
15607
15608 * Makefile.in (clean): Also remove x32.c x32-linux.c
15609 x32-avx.c x32-avx-linux.c.
15610 (x32.o): New target.
15611 (x32.c): Likewise.
15612 (x32-linux.o): Likewise.
15613 (x32-linux.c): Likewise.
15614 (x32-avx.o): Likewise.
15615 (x32-avx.c): Likewise.
15616 (x32-avx-linux.o): Likewise.
15617 (x32-avx-linux.c): Likewise.
15618
15619 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
15620 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
15621 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
15622 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
15623 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
15624 i386/x32-avx-linux.xml.
15625
15626 * linux-x86-low.c (init_registers_x32_linux): New prototype.
15627 (init_registers_x32_avx_linux): Likwise.
15628 (x86_linux_update_xmltarget): Call init_registers_x32_linux
15629 or init_registers_x32_avx_linux if linux_is_elf64 is false.
15630
15631 2012-04-13 Pedro Alves <palves@redhat.com>
15632
15633 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
15634 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
15635 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
15636 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
15637 the sub-make.
15638
15639 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15640
15641 * linux-x86-low.c (compat_x32_clock_t): New.
15642 (compat_x32_siginfo_t): Likewise.
15643 (compat_x32_siginfo_from_siginfo): Likewise.
15644 (siginfo_from_compat_x32_siginfo): Likewise.
15645 (linux_is_elf64): Likewise.
15646 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
15647 and siginfo_from_compat_x32_siginfo for x32.
15648 (x86_arch_setup): Set linux_is_elf64.
15649
15650 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15651
15652 PR gdb/13969
15653 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
15654 e_machine field.
15655 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
15656 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
15657 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
15658 compatible with process.
15659
15660 2012-04-12 Yao Qi <yao@codesourcery.com>
15661
15662 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
15663 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
15664 (install-only, install-info, clean): Handle sub dir gnulib.
15665 (all-lib, am--refresh): New targets.
15666 (memmem.o): Remove target.
15667 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
15668 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
15669 (AC_REPLACE_FUNCS): Remove memmem.
15670 Invoke gl_INIT and AM_INIT_AUTOMAKE.
15671 (AC_OUTPUT): Generate Makefile in gnulib/.
15672 * aclocal.m4, config.in, configure: Regenerated.
15673
15674 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
15675
15676 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
15677
15678 2012-04-05 Pedro Alves <palves@redhat.com>
15679
15680 -Werror=strict-aliasing
15681
15682 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
15683 pointer.
15684
15685 2012-04-04 Pedro Alves <palves@redhat.com>
15686
15687 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15688 (sparc_store_gregset_from_stack, sparc_store_gregset)
15689 (sparc_breakpoint_at): Fix formatting.
15690
15691 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15692
15693 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
15694 are available.
15695 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
15696 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
15697 * config.in: Regenerate.
15698 * configure: Likewise.
15699
15700 2012-03-29 Pedro Alves <palves@redhat.com>
15701
15702 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
15703 Correct ptrace arguments.
15704
15705 2012-03-28 Pedro Alves <palves@redhat.com>
15706
15707 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
15708 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
15709 (IA64_FR1_REGNUM): New defines.
15710 (ia64_fetch_register): New.
15711 (the_low_target): Install it.
15712 * linux-low.h (struct linux_target_ops) <fetch_register>: New
15713 field.
15714 * linux-low.c (linux_fetch_registers): Try the
15715 the_low_target.fetch_register hook first.
15716
15717 * linux-arm-low.c (the_low_target): Adjust.
15718 * linux-bfin-low.c (the_low_target): Adjust.
15719 * linux-cris-low.c (the_low_target): Adjust.
15720 * linux-crisv32-low.c (the_low_target): Adjust.
15721 * linux-m32r-low.c (the_low_target): Adjust.
15722 * linux-m68k-low.c (the_low_target): Adjust.
15723 * linux-mips-low.c (the_low_target): Adjust.
15724 * linux-ppc-low.c (the_low_target): Adjust.
15725 * linux-s390-low.c (the_low_target): Adjust.
15726 * linux-sh-low.c (the_low_target): Adjust.
15727 * linux-sparc-low.c (the_low_target): Adjust.
15728 * linux-tic6x-low.c (the_low_target): Adjust.
15729 * linux-x86-low.c (the_low_target): Adjust.
15730 * linux-xtensa-low.c (the_low_target): Adjust.
15731
15732 2012-03-26 Pedro Alves <palves@redhat.com>
15733
15734 * server.c (handle_qxfer_libraries): Don't bail early if
15735 the_target->qxfer_libraries_svr4 is not NULL.
15736
15737 2012-03-26 Pedro Alves <palves@redhat.com>
15738
15739 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
15740
15741 2012-03-23 Pedro Alves <palves@redhat.com>
15742
15743 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
15744 "library-list-svr4" element's start tag when the the DSO list is
15745 empty.
15746
15747 2012-03-23 Pedro Alves <palves@redhat.com>
15748
15749 * linux-low.c (read_one_ptr): Read the inferior's pointer through
15750 a variable whose type size is the same as the inferior's pointer
15751 size.
15752
15753 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
15754
15755 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
15756 struct siginfo.
15757 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
15758 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
15759 * linux-low.h: Include <signal.h>.
15760 (struct siginfo): Remove forward declaration.
15761 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
15762 struct siginfo.
15763
15764 2012-03-21 Mike Frysinger <vapier@gentoo.org>
15765
15766 * .gitignore: Ignore more files.
15767
15768 2012-03-19 Pedro Alves <palves@redhat.com>
15769 Jan Kratochvil <jan.kratochvil@redhat.com>
15770
15771 * server.c (cont_thread, general_thread): Add describing comments.
15772 (start_inferior): Clear `cont_thread'.
15773 (handle_v_cont): Don't set `cont_thread' if resuming all threads
15774 of a process.
15775
15776 2012-03-15 Yao Qi <yao@codesourcery.com>
15777
15778 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
15779 handling to ...
15780 (cmd_qtdp): ... here.
15781
15782 2012-03-15 Yao Qi <yao@codesourcery.com>
15783
15784 * tracepoint.c (struct tracepoint_action_ops): New.
15785 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
15786 (m_tracepoint_action_download): New.
15787 (r_tracepoint_action_download): New.
15788 (x_tracepoint_action_download): New.
15789 (l_tracepoint_action_download): New.
15790 (add_tracepoint_action): Install `action->ops' according type.
15791 (download_tracepoint_1): Move code `download' function pointer
15792 of various tracepoint_action_ops.
15793
15794 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15795
15796 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
15797 linux_ptrace_attach_warnings.
15798
15799 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15800
15801 * Makefile.in (linux-ptrace.o): New.
15802 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
15803 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
15804 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
15805 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
15806 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
15807 of these targets.
15808 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
15809
15810 2012-03-08 Yao Qi <yao@codesourcery.com>
15811 Pedro Alves <palves@redhat.com>
15812
15813 Fix PR server/13392.
15814 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
15815 offset of JMP insn.
15816 * tracepoint.c (remove_tracepoint): New.
15817 (cmd_qtdp): Call remove_tracepoint when failed to install.
15818
15819 2012-03-07 Pedro Alves <palves@redhat.com>
15820
15821 * linux-low.c (get_detach_signal): New.
15822 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
15823 Pass on pending signals to PTRACE_DETACH. Check the result of the
15824 ptrace call.
15825 * server.c (program_signals, program_signals_p): New.
15826 (handle_general_set): Handle QProgramSignals.
15827 * server.h (program_signals, program_signals_p): Declare.
15828
15829 2012-03-05 Pedro Alves <palves@redhat.com>
15830 Jan Kratochvil <jan.kratochvil@redhat.com>
15831
15832 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
15833 New comment why.
15834
15835 2012-03-03 Yao Qi <yao@codesourcery.com>
15836
15837 * tracepoint.c (tracepoint_look_up_symbols): Update call to
15838 agent_look_up_symbols.
15839
15840 2012-03-03 Yao Qi <yao@codesourcery.com>
15841
15842 * Makefile.in (linux-low.o): Keep dependence on agent.h.
15843 (linux-x86-low.o): Likewise.
15844 * server.h: Remove in_process_agent_loaded.
15845 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
15846 common/agent.c.
15847 Update callers.
15848
15849 2012-03-03 Yao Qi <yao@codesourcery.com>
15850
15851 * tracepoint.c (gdb_agent_capability): New global.
15852 (in_process_agent_loaded_ust): Renamed to
15853 `in_process_agent_supports_ust'.
15854 Update callers.
15855 (in_process_agent_supports_ust): Call agent_capability_check.
15856 (clear_installed_tracepoints): Assert that agent supports
15857 agent.
15858
15859 2012-03-03 Yao Qi <yao@codesourcery.com>
15860
15861 * linux-low.c (linux_supports_agent): New.
15862 (linux_target_ops): Initialize field `supports_agent' with
15863 linux_supports_agent.
15864 * target.h (struct target_ops) <supports_agent>: New.
15865 (target_supports_agent): New macro.
15866 * server.c (handle_general_set): Handle packet 'QAgent'.
15867 (handle_query): Send `QAgent+'.
15868 * Makefile.in (server.o): Depends on agent.h.
15869
15870 2012-03-03 Yao Qi <yao@codesourcery.com>
15871
15872 * Makefile.in (OBS): Add agent.o.
15873 Add new rule for agent.o.
15874 Track dependence of tracepoint.c on agent.h.
15875 * tracepoint.c (run_inferior_command_1):
15876 (run_inferior_command): Call agent_run_command.
15877 (gdb_ust_connect_sync_socket): Deleted. Move it to
15878 common/agent.c.
15879 (resume_thread, stop_thread): Likewise.
15880 (gdb_ust_socket_init): Renamed to ...
15881 (gdb_agent_socket_init): ... New.
15882 (gdb_ust_thread): Renamed to ...
15883 (gdb_agent_helper_thread): ... New.
15884 (gdb_ust_init): Move some code to ...
15885 (gdb_agent_init): ... here. New.
15886 [HAVE_UST]: Call gdb_ust_init.
15887 (initialize_tracepoint_ftlib): Call gdb_agent_init.
15888 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
15889 * config.in, configure: Regenerated.
15890
15891 2012-03-02 Pedro Alves <palves@redhat.com>
15892
15893 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
15894 * linux-low.c (struct simple_pid_list): New.
15895 (stopped_pids): New a struct simple_pid_list pointer.
15896 (add_to_pid_list, pull_pid_from_list): New.
15897 (handle_extended_wait): Don't assume the first signal new children
15898 report is SIGSTOP. Adjust call to pull_pid_from_list.
15899 (linux_wait_for_lwp): Adjust.
15900
15901 2012-03-02 Yao Qi <yao@codesourcery.com>
15902
15903 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
15904 debug log.
15905
15906 2012-03-02 Yao Qi <yao@codesourcery.com>
15907
15908 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
15909 `stop_pc' and `tpoint'. Update caller.
15910
15911 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
15912
15913 * linux-low.h (linux_target_ops): Add regset_bitmap member.
15914 * linux-low.c (use_linux_regsets): New macro.
15915 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
15916 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
15917 (linux_register_in_regsets): New function.
15918 (usr_fetch_inferior_registers): Skip registers covered by
15919 regsets.
15920 (usr_store_inferior_registers): Likewise.
15921 (usr_fetch_inferior_registers): New macro.
15922 (usr_store_inferior_registers): Likewise.
15923 (linux_fetch_registers): Handle mixed regset/non-regset targets.
15924 (linux_store_registers): Likewise.
15925 * linux-mips-low.c (init_registers_mips_dsp_linux): New
15926 prototype.
15927 (init_registers_mips64_dsp_linux): Likewise.
15928 (init_registers_mips_linux): New macro.
15929 (init_registers_mips_dsp_linux): Likewise.
15930 (mips_dsp_num_regs): Likewise.
15931 (DSP_BASE, DSP_CONTROL): New fallback macros.
15932 (mips_base_regs): New macro.
15933 (mips_regmap): Use it. Fix the size.
15934 (mips_dsp_regmap): New variable.
15935 (mips_dsp_regset_bitmap): Likewise.
15936 (mips_arch_setup): New function.
15937 (mips_cannot_fetch_register): Use the_low_target.regmap rather
15938 than mips_regmap.
15939 (mips_cannot_store_register): Likewise.
15940 (the_low_target): Update .arch_setup, .num_regs and .regmap
15941 initializers. Add .regset_bitmap initializer.
15942 * linux-arm-low.c (the_low_target): Add .regset_bitmap
15943 initializer.
15944 * linux-bfin-low.c (the_low_target): Likewise.
15945 * linux-cris-low.c (the_low_target): Likewise.
15946 * linux-crisv32-low.c (the_low_target): Likewise.
15947 * linux-ia64-low.c (the_low_target): Likewise.
15948 * linux-m32r-low.c (the_low_target): Likewise.
15949 * linux-m68k-low.c (the_low_target): Likewise.
15950 * linux-ppc-low.c (the_low_target): Likewise.
15951 * linux-s390-low.c (the_low_target): Likewise.
15952 * linux-sh-low.c (the_low_target): Likewise.
15953 * linux-sparc-low.c (the_low_target): Likewise.
15954 * linux-tic6x-low.c (the_low_target): Likewise.
15955 * linux-x86-low.c (the_low_target): Likewise.
15956 * linux-xtensa-low.c (the_low_target): Likewise.
15957 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
15958 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
15959 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
15960 srv_xmlfiles.
15961 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
15962 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
15963
15964 2012-02-29 Yao Qi <yao@codesourcery.com>
15965 Pedro Alves <palves@redhat.com>
15966
15967 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
15968 `step_over_finished' is true.
15969
15970 2012-02-27 Pedro Alves <palves@redhat.com>
15971
15972 * linux-low.c (pid_is_stopped): Delete, moved to common/.
15973 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
15974
15975 2012-02-27 Pedro Alves <palves@redhat.com>
15976
15977 PR server/9684
15978 * linux-low.c (pid_is_stopped): New.
15979 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
15980
15981 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
15982
15983 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
15984 of conditions.
15985
15986 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
15987
15988 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
15989
15990 2012-02-24 Luis Machado <lgustavo@codesourcery>
15991
15992 * server.c (handle_query): Advertise support for target-side
15993 breakpoint condition evaluation.
15994 (process_point_options): New function.
15995 (process_serial_event): When inserting a breakpoint, check for
15996 a target-side condition that should be evaluated.
15997
15998 * mem-break.c: Include regcache.h and ax.h.
15999 (point_cond_list_t): New data structure.
16000 (breakpoint) <cond_list>: New field.
16001 (find_gdb_breakpoint_at): Make non-static.
16002 (delete_gdb_breakpoint_at): Clear any target-side
16003 conditions.
16004 (clear_gdb_breakpoint_conditions): New function.
16005 (add_condition_to_breakpoint): Likewise.
16006 (add_breakpoint_condition): Likewise.
16007 (gdb_condition_true_at_breakpoint): Likewise.
16008 (gdb_breakpoint_here): Return result directly instead
16009 of going through a local variable.
16010
16011 * mem-break.h (find_gdb_breakpoint_at): New prototype.
16012 (clear_gdb_breakpoint_conditions): Likewise.
16013 (add_breakpoint_condition): Likewise.
16014 (gdb_condition_true_at_breakpoint): Likewise.
16015
16016 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
16017 (need_step_over_p): Take target-side breakpoint condition into
16018 consideration.
16019
16020 2012-02-24 Luis Machado <lgustavo@codesourcery>
16021
16022 * server.h: Include tracepoint.h.
16023 (agent_mem_read, agent_get_trace_state_variable_value,
16024 agent_set_trace_state_variable_value,
16025 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
16026 get_set_tsv_func_addr): New prototypes.
16027
16028 * ax.h: New include file.
16029 * ax.c: New source file.
16030
16031 * tracepoint.c: Include ax.h.
16032 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
16033 agent_expr, eval_result_type): Move to ax.h.
16034 (parse_agent_expr): Rename to ...
16035 (gdb_parse_agent_expr): ... this, make it non-static and move
16036 to ax.h.
16037 (unparse_agent_expr) Rename to ...
16038 (gdb_unparse_agent_expr): ... this, make it non-static and move
16039 to ax.h.
16040 (eval_agent_expr): Rename to ...
16041 (eval_tracepoint_agent_expr): ... this.
16042 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
16043 forward declarations.
16044 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
16045 (agent_get_trace_state_variable_value): New function.
16046 (agent_set_trace_state_variable_value): New function.
16047 (cmd_qtdp): Call gdb_parse_agent_expr (...).
16048 (response_tracepoint): Call gdb_unparse_agent_expr (...).
16049 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
16050 (condition_true_at_tracepoint): Likewise.
16051 (parse_agent_expr): Rename to ...
16052 (gdb_parse_agent_expr): ... this and move to ax.c.
16053 (unparse_agent_expr): Rename to ...
16054 (gdb_unparse_agent_expr): ... this and move to ax.c.
16055 (gdb_agent_op_name): Move to ax.c.
16056 (eval_agent_expr): Rename to ...
16057 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
16058 and move to ax.c.
16059 (eval_tracepoint_agent_expr): New function.
16060 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
16061 non-static.
16062 (current_insn_ptr, emit_error, struct bytecode_address): Move to
16063 ax.c.
16064 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
16065 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
16066 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
16067 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
16068 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
16069 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
16070 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
16071 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
16072 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
16073 (compile_bytecodes): Remove forward declaration.
16074 (is_goto_target): Move to ax.c.
16075 (compile_bytecodes): Move to ax.c and call
16076 agent_get_trace_state_variable_value (...) and
16077 agent_set_trace_state_variable_value (...).
16078
16079 * Makefile.in: Update ax.c and IPA dependencies.
16080
16081 2012-02-24 Pedro Alves <palves@redhat.com>
16082
16083 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
16084 (cmd_bigqtbuffer_circular): ... this. Only handle
16085 'QTBuffer:circular:'.
16086 (handle_tracepoint_general_set): Adjust.
16087
16088 2012-02-16 Yao Qi <yao@codesourcery.com>
16089
16090 * inferiors.c: Move code to ...
16091 * dll.c: .... here. New.
16092 * server.h: Declare clear_dlls.
16093 * Makefile.in (SFILES): Add dll.c.
16094 (OBS): Add dll.o
16095 (dll.o): New rule.
16096
16097 2012-02-11 Yao Qi <yao@codesourcery.com>
16098
16099 * server.c: (handle_monitor_command): Add a new parameter
16100 `own_buf'.
16101 (handle_query): Update caller.
16102
16103 2012-02-09 Joel Brobecker <brobecker@adacore.com>
16104
16105 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
16106 * configure, config.in: Regenerate.
16107 * hostio.c: Provide an alternate implementation if HAVE_READLINK
16108 is not defined.
16109
16110 2012-02-02 Pedro Alves <palves@redhat.com>
16111
16112 Try SIGKILL first, then PTRACE_KILL.
16113 * linux-low.c (linux_kill_one_lwp): New.
16114 (linux_kill_one_lwp): Rename to ...
16115 (kill_one_lwp_callback): ... this. Use the new
16116 linux_kill_one_lwp.
16117
16118 2012-02-02 Pedro Alves <palves@redhat.com>
16119
16120 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
16121 inferior.
16122
16123 2012-01-27 Pedro Alves <palves@redhat.com>
16124
16125 * linux-low.c (linux_child_pid_to_exec_file): Delete.
16126 (elf_64_file_p): Make static.
16127 (linux_pid_exe_is_elf_64_file): New.
16128 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
16129 Delete declarations.
16130 (linux_pid_exe_is_elf_64_file): Declare.
16131 * linux-x86-low.c (x86_arch_setup): Use
16132 linux_pid_exe_is_elf_64_file.
16133
16134 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
16135
16136 * linux-low.c (linux_wait_for_event_1): Rename to ...
16137 (linux_wait_for_event): ... here and merge it with former
16138 linux_wait_for_event - new variable wait_ptid, use it.
16139 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
16140
16141 2012-01-23 Pedro Alves <palves@redhat.com>
16142
16143 * server.c (main): Avoid yet another case of infinite loop while
16144 detaching/killing after a longjmp.
16145
16146 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16147
16148 Code cleanup.
16149 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
16150
16151 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
16152
16153 * hostio.c (handle_readlink): New function.
16154 (handle_vFile): Call it to handle "vFile:readlink" packets.
16155
16156 2012-01-20 Pedro Alves <palves@redhat.com>
16157 Ulrich Weigand <ulrich.weigand@linaro.org>
16158
16159 * server.c (handle_v_requests): Only support vAttach and vRun to
16160 start multiple processes when in extended protocol mode.
16161
16162 2012-01-17 Pedro Alves <palves@redhat.com>
16163
16164 * tracepoint.c (initialize_tracepoint): Use mmap instead of
16165 memalign plus mprotect to allocate the scratch buffer.
16166
16167 2012-01-13 Pedro Alves <palves@redhat.com>
16168
16169 * server.c (attach_inferior): Clear `cont_thread'.
16170
16171 2012-01-13 Pedro Alves <palves@redhat.com>
16172
16173 * server.c (main): Avoid infinite loop while detaching/killing
16174 after a longjmp.
16175
16176 2012-01-09 Doug Evans <dje@google.com>
16177
16178 * server.c (start_inferior): Set last_ptid in --wrapper case.
16179
16180 2012-01-06 Yao Qi <yao@codesourcery.com>
16181
16182 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
16183 defined.
16184 [IN_PROCESS_AGENT] (debug_agent): New global variable.
16185
16186 2012-01-04 Yao Qi <yao@codesourcery.com>
16187
16188 * tracepoint.c (cmd_qtdp): Print debug message
16189 for static tracepoint.
16190
16191 2012-01-04 Yao Qi <yao@codesourcery.com>
16192
16193 * tracepoint.c (trace_vdebug): Differentiate debug message
16194 between gdbserver and IPA.
16195
16196 2012-01-03 Yao Qi <yao@codesourcery.com>
16197
16198 * tracepoint.c (tracepoint_was_hit): Don't collect for
16199 static tracepoint.
16200
16201 2012-01-02 Joel Brobecker <brobecker@adacore.com>
16202
16203 * terminal.h: Reformat copyright header.
16204
16205 2012-01-02 Joel Brobecker <brobecker@adacore.com>
16206
16207 * server.c (gdbserver_version): Update copyright year.
16208 * gdbreplay.c (gdbreplay_version): Likewise.
16209
16210 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
16211
16212 * linux-low.c (linux_create_inferior): Put empty if clause for write.
16213
16214 Revert:
16215 2011-12-18 Hui Zhu <teawater@gmail.com>
16216 * linux-low.c (linux_create_inferior): Save return value to ret.
16217
16218 2011-12-18 Hui Zhu <teawater@gmail.com>
16219
16220 * linux-low.c (linux_create_inferior): Save return value to ret.
16221
16222 2011-12-16 Doug Evans <dje@google.com>
16223
16224 * linux-low.c (linux_create_inferior): If stdio connection,
16225 redirect stdin from /dev/null, stdout to stderr.
16226 * remote-utils.c (remote_is_stdio): New static global.
16227 (remote_connection_is_stdio): New function.
16228 (remote_prepare): Handle stdio connection.
16229 (remote_open): Ditto.
16230 (remote_close): Don't close stdin for stdio connections.
16231 (read_prim,write_prim): New functions. Replace all calls to
16232 read/write to these.
16233 * server.c (main): Watch for "-" argument. Move call to
16234 remote_prepare before start_inferior.
16235 * server.h (STDIO_CONNECTION_NAME): New macro.
16236 (remote_connection_is_stdio): Declare.
16237
16238 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
16239 in debugging output.
16240
16241 2011-12-15 Yao Qi <yao@codesourcery.com>
16242
16243 * tracepoint.c: Include sys/syscall.h.
16244 (gdb_ust_thread): Remove preprocessor conditional.
16245
16246 2011-12-14 Pedro Alves <pedro@codesourcery.com>
16247
16248 * linux-low.c (linux_detach_one_lwp): Call
16249 the_low_target.prepare_to_resume before detaching.
16250
16251 2011-12-14 Yao Qi <yao@codesourcery.com>
16252
16253 * tracepoint.c (gdb_ust_thread): Don't ignore return value
16254 of write.
16255
16256 2011-12-14 Yao Qi <yao@codesourcery.com>
16257
16258 * i386-low.c (i386_low_stopped_data_address): Initialize local
16259 variable `control'.
16260
16261 2011-12-13 Pedro Alves <pedro@codesourcery.com>
16262
16263 PR remote/13492
16264
16265 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
16266 DR_CONTROL unless necessary. Extend comments.
16267 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
16268 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
16269
16270 2011-12-13 Yao Qi <yao@codesourcery.com>
16271
16272 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
16273 macros.
16274 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
16275
16276 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
16277
16278 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
16279 Print new debug message for such case.
16280
16281 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
16282
16283 Fix overlapping memcpy.
16284 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
16285 the read_inferior_memory transfer.
16286 (delete_fast_tracepoint_jump): New variable buf. Use it for the
16287 write_inferior_memory transfer.
16288 (set_fast_tracepoint_jump): New variable buf. Use it for the
16289 read_inferior_memory and write_inferior_memory transfers.
16290 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
16291 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
16292 Use it for the write_inferior_memory transfer.
16293 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
16294 buffers.
16295
16296 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
16297
16298 * linux-low.c (fetch_register, store_register): Make code
16299 consistent, fix formatting.
16300
16301 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
16302
16303 * linux-low.c (usr_store_inferior_registers): Factor out code
16304 to handle individual registers into...
16305 (store_register): ... this new function.
16306
16307 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
16308
16309 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
16310 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
16311 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
16312 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
16313 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
16314 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
16315 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
16316 (srv_xmlfiles): Add new XML files.
16317
16318 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
16319 and <sys/uio.h>.
16320 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
16321 (init_registers_s390_linux32v1): Add prototype.
16322 (init_registers_s390_linux32v2): Likewise.
16323 (init_registers_s390_linux64v1): Likewise.
16324 (init_registers_s390_linux64v2): Likewise.
16325 (init_registers_s390x_linux64v1): Likewise.
16326 (init_registers_s390x_linux64v2): Likewise.
16327 (s390_num_regs): Increment to 52.
16328 (s390_regmap): Add orig_r2 register.
16329 (s390_num_regs_3264): Increment to 68.
16330 (s390_regmap_3264): Add orig_r2 register.
16331 (s390_collect_ptrace_register): Handle orig_r2 register.
16332 (s390_supply_ptrace_register): Likewise.
16333 (s390_fill_last_break): New function.
16334 (s390_store_last_break): Likewise.
16335 (s390_fill_system_call): New function.
16336 (s390_store_system_call): Likewise.
16337 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
16338 register sets.
16339 (s390_check_regset): New function.
16340 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
16341 NT_S390_SYSTEM_CALL regsets and use appropriate description.
16342 Update target_regsets for available register sets.
16343
16344 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
16345 Jan Kratochvil <jan.kratochvil@redhat.com>
16346
16347 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
16348 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
16349 New.
16350 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
16351 * linux-low.h (struct process_info_private): New member r_debug.
16352 * server.c (handle_qxfer_libraries): Call
16353 the_target->qxfer_libraries_svr4.
16354 (handle_qxfer_libraries_svr4): New function.
16355 (qxfer_packets): New entry "libraries-svr4".
16356 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
16357 * target.h (struct target_ops): New member qxfer_libraries_svr4.
16358 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
16359 PACKET_qXfer_libraries_svr4.
16360
16361 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
16362
16363 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
16364 PSW address/mask between 8-byte and 16-byte formats.
16365 (s390_supply_ptrace_register): Likewise.
16366 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
16367 basic addressing mode bit.
16368
16369 2011-11-24 Stan Shebs <stan@codesourcery.com>
16370
16371 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
16372
16373 2011-11-17 Stan Shebs <stan@codesourcery.com>
16374
16375 * tracepoint.c (struct tracepoint): New field traceframe_usage.
16376 (tracing_start_time): New global.
16377 (tracing_stop_time): New global.
16378 (tracing_user_name): New global.
16379 (tracing_notes): New global.
16380 (tracing_stop_note): New global.
16381 (cmd_qtstart): Set traceframe_usage, start_time.
16382 (stop_tracing): Set stop_time.
16383 (cmd_qtstatus): Report additional status.
16384 (cmd_qtp): New function.
16385 (handle_tracepoint_query): Call it.
16386 (cmd_qtnotes): New function.
16387 (handle_tracepoint_general_set): Call it.
16388 (get_timestamp): Rename from tsv_get_timestamp.
16389
16390 2011-11-14 Stan Shebs <stan@codesourcery.com>
16391 Kwok Cheung Yeung <kcy@codesourcery.com>
16392
16393 * linux-x86-low.c (small_jump_insn): New.
16394 (i386_install_fast_tracepoint_jump_pad): Add arguments for
16395 trampoline and error message, build a trampoline and issue a small
16396 jump instruction to it.
16397 (x86_install_fast_tracepoint_jump_pad): Add arguments for
16398 trampoline and error message.
16399 (x86_get_min_fast_tracepoint_insn_len): New.
16400 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
16401 * linux-low.h (struct linux_target_ops): Add arguments to
16402 install_fast_tracepoint_jump_pad operation, add new operation.
16403 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
16404 arguments.
16405 (linux_get_min_fast_tracepoint_insn_len): New function.
16406 (linux_target_op): Add new operation.
16407 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
16408 (gdb_trampoline_buffer_end): Ditto.
16409 (gdb_trampoline_buffer_error): Ditto.
16410 (struct ipa_sym_addresses): Add fields for new IPA variables.
16411 (symbol_list): Add entries for new IPA variables.
16412 (struct tracepoint): Add fields to hold the address range of the
16413 trampoline used by the tracepoint.
16414 (trampoline_buffer_head): New static variable.
16415 (trampoline_buffer_tail): Ditto.
16416 (claim_trampoline_space): New function.
16417 (have_fast_tracepoint_trampoline_buffer): New function.
16418 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
16419 structure.
16420 (install_fast_tracepoint): Ditto, also add error buffer argument.
16421 (cmd_qtminftpilen): New function.
16422 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
16423 (fast_tracepoint_from_trampoline_address): New function.
16424 (fast_tracepoint_collecting): Handle trampoline as part of jump
16425 pad space.
16426 (set_trampoline_buffer_space): New function.
16427 (initialize_tracepoint): Initialize new IPA variables.
16428 * target.h (struct target_ops): Add arguments to
16429 install_fast_tracepoint_jump_pad operation, add new
16430 get_min_fast_tracepoint_insn_len operation.
16431 (target_get_min_fast_tracepoint_insn_len): New.
16432 (install_fast_tracepoint_jump_pad): Add arguments.
16433 * server.h (IPA_BUFSIZ): Define.
16434 * linux-i386-ipa.c: Include extra header files.
16435 (initialize_fast_tracepoint_trampoline_buffer): New function.
16436 (initialize_low_tracepoint): Call it.
16437 * server.h (set_trampoline_buffer_space): Declare.
16438 (claim_trampoline_space): Ditto.
16439 (have_fast_tracepoint_trampoline_buffer): Ditto.
16440
16441 2011-11-14 Yao Qi <yao@codesourcery.com>
16442
16443 * server.c (handle_query): Handle InstallInTrace for qSupported.
16444 * tracepoint.c (add_tracepoint): Sort list.
16445 (install_tracepoint, download_tracepoint): New.
16446 (cmd_qtdp): Call them to install and download tracepoints.
16447 (sort_tracepoints): Removed.
16448 (cmd_qtstart): Update.
16449
16450 2011-11-14 Yao Qi <yao@codesourcery.com>
16451
16452 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
16453 * mem-break.h: Declare.
16454 * tracepoint.c (cmd_qtstart): Move some code to ...
16455 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
16456 New.
16457 (download_tracepoints): Move some code to ...
16458 (download_tracepoint_1): ... here. New.
16459
16460 2011-11-08 Yao Qi <yao@codesourcery.com>
16461
16462 * remote-utils.c (relocate_instruction): A comment fix.
16463
16464 2011-11-07 Joel Brobecker <brobecker@adacore.com>
16465
16466 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
16467 (i386_dr_low_get_control, i386_dr_low_get_status): Use
16468 dr_status_mirror and dr_control_mirror from debug_reg_state.
16469 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
16470 (i386_initial_stuff): Remove use of deleted globals.
16471 (i386_get_thread_context, i386_set_thread_context,
16472 i386_thread_added): Use dr_status_mirror and dr_control_mirror
16473 from debug_reg_state.
16474
16475 2011-11-05 Yao Qi <yao@codesourcery.com>
16476
16477 * tracepoint.c (gdb_collect): Loop over tracepoints of same
16478 address as TPOINT's.
16479
16480 2011-11-02 Stan Shebs <stan@codesourcery.com>
16481
16482 * tracepoint.c (agent_mem_read_string): New function.
16483 (eval_agent_expr): Call it for tracenz.
16484 * server.c (handle_query): Report support for tracenz.
16485
16486 2011-11-02 Yao Qi <yao@codesourcery.com>
16487
16488 * tracepoint.c (cmd_qtstart): Remove unused local variables.
16489
16490 2011-11-02 Yao Qi <yao@codesourcery.com>
16491
16492 * target.h: Fix a typo in comment.
16493
16494 2011-10-31 Pedro Alves <pedro@codesourcery.com>
16495
16496 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
16497 clobber the breakpoints' shadows with fast tracepoint jumps.
16498 * mem-break.h (check_mem_write): Add `myaddr' parameter.
16499 * target.c (write_inferior_memory): Also pass MYADDR down to
16500 check_mem_write.
16501
16502 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
16503
16504 * configure.ac: Check support for personality routine.
16505 * configure: Regenerate.
16506 * config.in: Likewise.
16507 * linux-low.c: Include <sys/personality.h>.
16508 Define ADDR_NO_RANDOMIZE if necessary.
16509 (linux_create_inferior): Disable address space randomization when
16510 forking inferior, if requested.
16511 (linux_supports_disable_randomization): New function.
16512 (linux_target_ops): Install it.
16513 * server.h (disable_randomization): Declare.
16514 * server.c (disable_randomization): New global variable.
16515 (handle_general_set): Handle QDisableRandomization.
16516 (handle_query): Likewise for qSupported.
16517 (main): Support --disable-randomization and --no-disable-randomization
16518 command line arguments.
16519 * target.h (struct target_ops): Add supports_disable_randomization.
16520 (target_supports_disable_randomization): New macro.
16521
16522 2011-09-29 Mike Frysinger <vapier@gentoo.org>
16523
16524 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
16525 ifdef check.
16526 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
16527 [!PT_GETDSBT] (target_loadmap): New definition.
16528 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
16529 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
16530 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
16531 and PT_GETDSBT to LINUX_LOADMAP.
16532 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
16533 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
16534
16535 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
16536
16537 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
16538 (arm_linux_hwbp_cap): New static variable.
16539 (arm_linux_get_hwbp_cap): Replace by ...
16540 (arm_linux_init_hwbp_cap): ... this new function.
16541 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
16542 (arm_linux_get_hw_watchpoint_count): Likewise.
16543 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16544 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
16545 (arm_prepare_to_resume): Use perror_with_name instead of error.
16546
16547 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
16548
16549 * linux-arm-low.c: Include <signal.h>.
16550 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
16551 (struct arm_linux_hwbp_cap): New data type.
16552 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
16553 (struct arm_linux_hw_breakpoint): New data type.
16554 (MAX_BPTS, MAX_WPTS): Define.
16555 (struct arch_process_info, struct arch_lwp_info): New data types.
16556 (arm_linux_get_hwbp_cap): New function.
16557 (arm_linux_get_hw_breakpoint_count): Likewise.
16558 (arm_linux_get_hw_watchpoint_count): Likewise.
16559 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16560 (arm_hwbp_control_initialize): Likewise.
16561 (arm_hwbp_control_is_enabled): Likewise.
16562 (arm_hwbp_control_is_initialized): Likewise.
16563 (arm_hwbp_control_disable): Likewise.
16564 (arm_linux_hw_breakpoint_equal): Likewise.
16565 (arm_linux_hw_point_initialize): Likewise.
16566 (struct update_registers_data): New data structure.
16567 (update_registers_callback: New function.
16568 (arm_insert_point): Likewise.
16569 (arm_remove_point): Likewise.
16570 (arm_stopped_by_watchpoint): Likewise.
16571 (arm_stopped_data_address): Likewise.
16572 (arm_new_process): Likewise.
16573 (arm_new_thread): Likewise.
16574 (arm_prepare_to_resume): Likewise.
16575 (the_low_target): Register arm_insert_point, arm_remove_point,
16576 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
16577 arm_new_thread, and arm_prepare_to_resume.
16578
16579 2011-09-15 Stan Shebs <stan@codesourcery.com>
16580
16581 * server.h (struct emit_ops): Add compare-goto fields.
16582 * tracepoint.c (gdb_agent_op_sizes): New table.
16583 (emit_eq_goto): New function.
16584 (emit_ne_goto): New function.
16585 (emit_lt_goto): New function.
16586 (emit_le_goto): New function.
16587 (emit_gt_goto): New function.
16588 (emit_ge_goto): New function.
16589 (is_goto_target): New function.
16590 (compile_bytecodes): Recognize special cases of compare-goto
16591 combinations and call specialized emitters for them.
16592 * linux-x86-low.c (amd64_emit_eq_goto): New function.
16593 (amd64_emit_ne_goto): New function.
16594 (amd64_emit_lt_goto): New function.
16595 (amd64_emit_le_goto): New function.
16596 (amd64_emit_gt_goto): New function.
16597 (amd64_emit_ge_goto): New function.
16598 (amd64_emit_ops): Add the new functions.
16599 (i386_emit_eq_goto): New function.
16600 (i386_emit_ne_goto): New function.
16601 (i386_emit_lt_goto): New function.
16602 (i386_emit_le_goto): New function.
16603 (i386_emit_gt_goto): New function.
16604 (i386_emit_ge_goto): New function.
16605 (i386_emit_ops): Add the new functions.
16606
16607 2011-09-08 Stan Shebs <stan@codesourcery.com>
16608
16609 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
16610 (i386_emit_epilogue): Restore %ebx.
16611
16612 2011-08-31 Jie Zhang <jzhang918@gmail.com>
16613
16614 * server.c (step_thread): Remove definition.
16615 (process_serial_event): Don't handle Hs.
16616 * server.h (step_thread): Remove declaration.
16617 * target.c (set_desired_inferior): Remove use of step_thread.
16618
16619 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16620
16621 * linux-low.c: Include linux-procfs.h.
16622 (linux_attach_lwp_1): Update comments.
16623 (linux_attach): Scan for existing threads when attaching to a
16624 process that is the tgid.
16625 * Makefile.in: Update dependencies.
16626
16627 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16628
16629 * configure.srv: Add linux-procfs.o dependencies.
16630
16631 2011-08-14 Yao Qi <yao@codesourcery.com>
16632
16633 * target.h (struct target_ops): Fix indent.
16634 * win32-low.c (win32_target_ops): Fix comment.
16635
16636 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
16637 Yao Qi <yao@codesourcery.com>
16638
16639 * Makefile.in (clean): Remove tic6x-*.c files.
16640 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
16641 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
16642 (tic6x-c64xp-linux.c): Likewise.
16643 * configure.srv: Add support for tic6x-*-uclinux.
16644 * linux-tic6x-low.c: New.
16645 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
16646
16647 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
16648 Yao Qi <yao@codesourcery.com>
16649
16650 * target.h (struct target_ops): Add read_loadmap.
16651 * linux-low.c (struct target_loadseg): New type.
16652 (struct target_loadmap): New type.
16653 (linux_read_loadmap): New function.
16654 (linux_target_ops): Add linux_read_loadmap.
16655 * server.c (handle_query): Support qXfer:fdpic:read packet.
16656 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
16657 to NULL.
16658
16659 2011-08-05 Eli Zaretskii <eliz@gnu.org>
16660
16661 * win32-low.c: Include <stdint.h>.
16662
16663 2011-07-22 Pedro Alves <pedro@codesourcery.com>
16664
16665 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
16666 to the inferior here.
16667 (i386_remove_aligned_watchpoint): Ditto.
16668 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
16669 fit part of the watchpoint in the debug registers.
16670 (i386_update_inferior_debug_regs): New.
16671 (i386_low_insert_watchpoint): Work on a local mirror of the debug
16672 registers, and only update the inferior on success.
16673 (i386_low_remove_watchpoint): Ditto.
16674
16675 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
16676
16677 * linux-low.c (compare_ints, unique, list_threads, show_process,
16678 linux_core_of_thread): Delete.
16679 (linux_target_ops): Change linux_core_of_thread to
16680 linux_common_core_of_thread.
16681 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
16682 * utils.c (malloc_failure): Change type of argument.
16683 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
16684 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
16685 common/linux-osdata.c, common/ptid.c and common/buffer.c.
16686 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
16687 (IPA_OBJS): Add common-utils-ipa.o.
16688 (ptid_h, linux_osdata_h): New macros.
16689 (server_h): Add common/common-utils.h, common/xml-utils.h,
16690 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
16691 common/ptid.h.
16692 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
16693 ptid.o, buffer.o): New rules.
16694 (linux-low.o): Add common/linux-osdata.h as a dependency.
16695 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
16696 * configure.ac: Add AC_HEADER_DIRENT check.
16697 * config.in: Regenerate.
16698 * configure: Regenerate.
16699 * remote-utils.c (xml_escape_text): Delete.
16700 (buffer_grow, buffer_free, buffer_init, buffer_finish,
16701 buffer_xml_printf): Move to common/buffer.c.
16702 * server.c (main): Remove call to initialize_inferiors.
16703 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
16704 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
16705 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
16706 internal_error, gdb_assert, gdb_assert_fail): Delete.
16707 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
16708 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
16709 common/buffer.h.
16710 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
16711 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
16712 initialize_inferiors): Delete.
16713
16714 2011-07-20 Pedro Alves <pedro@codesourcery.com>
16715
16716 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
16717 symbol error.
16718
16719 2011-05-31 Pedro Alves <pedro@codesourcery.com>
16720
16721 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
16722 assertion.
16723 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
16724
16725 2011-05-26 Yao Qi <yao@codesourcery.com>
16726
16727 * Makefile.in (thread-db.o): Track dependence to
16728 common/gdb_thread_db.h.
16729 * thread-db.c: include gdb_thread_db.h from right place.
16730
16731 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
16732
16733 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
16734 __FILE__ and __LINE__ to internal_error.
16735
16736 2011-05-13 Doug Evans <dje@google.com>
16737
16738 * thread-db.c (try_thread_db_load_from_sdir): New function.
16739 (try_thread_db_load_from_dir): New function.
16740 (thread_db_load_search): Handle $sdir, ignore $pdir.
16741 Remove trying of system directories if search of
16742 libthread-db-search-path fails, that is now done via $sdir.
16743
16744 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
16745
16746 * server.c (handle_query): Add EnableDisableTracepoints to the list
16747 of supported features.
16748 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
16749 tracepoints.
16750 (cmd_qtenable_disable): New.
16751 (cmd_qtstart): Install tracepoints even if disabled.
16752 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
16753 receiving a QTEnable or QTDisable packet.
16754 (gdb_collect): Skip data collection if fast tracepoint is disabled.
16755 (ust_marker_to_static_tracepoint): Do not ignore disabled static
16756 tracepoints.
16757 (gdb_probe): Skip data collection if static tracepoint is disabled.
16758
16759 2011-05-10 Doug Evans <dje@google.com>
16760
16761 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
16762
16763 2011-05-04 Doug Evans <dje@google.com>
16764
16765 * linux-low.c (linux_join): Skip process lookup.
16766 * spu-low.c (spu_join): Ditto.
16767 * server.c (join_inferiors_callback): Delete.
16768 (process_serial_event): For 'D' packet (detach) call join_inferior
16769 directly.
16770
16771 2011-05-04 Joseph Myers <joseph@codesourcery.com>
16772
16773 * README: Don't mention xscale*-*-linux*.
16774 * configure.srv (xscale*-*-linux*): Don't handle target.
16775
16776 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
16777
16778 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
16779 casting pointers.
16780 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
16781 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
16782 (i386_emit_void_call_2): Likewise.
16783
16784 2011-04-26 Yao Qi <yao@codesourcery.com>
16785
16786 * linux-low.c: Move common macros to linux-ptrace.h.
16787 Include linux-ptrace.h.
16788 * Makefile.in (linux_ptrace_h): New.
16789 (linux-low.o): Depends on linux-ptrace.h.
16790
16791 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
16792
16793 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
16794 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
16795 (remote_prepare): New function with most of the TCP code from ...
16796 (remote_open): ... here. Detect PORT here unconditionally. Move also
16797 setting transport_is_reliable.
16798 * server.c (run_once): New variable.
16799 (gdbserver_usage): Document it.
16800 (main): Set run_once for `--once'. Call remote_prepare. Exit after
16801 the first run if RUN_ONCE.
16802 * server.h (run_once, remote_prepare): New declarations.
16803
16804 2011-04-19 Tom Tromey <tromey@redhat.com>
16805
16806 * win32-low.c (handle_load_dll): Remove duplicate "the".
16807
16808 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
16809
16810 Remove support for old Cygwin 1.5 versions.
16811 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
16812 function to avoid warning.
16813 (win32_add_one_solib): Use cygwin_conv_path function to avoid
16814 warning.
16815
16816 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
16817
16818 * gdbserver/server.h (Macro _): Define it if not available.
16819
16820 2011-03-14 Michael Snyder <msnyder@vmware.com>
16821
16822 * hostio.c (handle_close): Remove unnecessary null test.
16823
16824 2011-03-10 Joel Brobecker <brobecker@adacore.com>
16825
16826 * Makefile.in (maintainer-clean realclean distclean): Remove
16827 "make ... subdir_do" command.
16828
16829 2011-03-10 Michael Snyder <msnyder@vmware.com>
16830
16831 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
16832
16833 * server.c (handle_v_run): Free alloced buffer on early return.
16834
16835 2011-03-09 Yao Qi <yao@codesourcery.com>
16836
16837 Revert:
16838 2011-03-04 Yao Qi <yao@codesourcery.com>
16839
16840 * Makefile.in: Remove GNU make feature --directory.
16841
16842 2011-03-05 Yao Qi <yao@codesourcery.com>
16843
16844 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16845 (subdir_do): New make target. Copied from gdb/Makefile.
16846 (maintainer-clean, realclean, distclean, clean): Call corresponding
16847 make targets in common/Makefile.
16848
16849 2011-02-11 Yao Qi <yao@codesourcery.com>
16850
16851 * configure.ac: Call AC_PROG_RANLIB.
16852 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16853 * configure: Regenerate.
16854
16855 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
16856
16857 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
16858
16859 2011-03-06 Yao Qi <yao@codesourcery.com>
16860
16861 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
16862
16863 2011-03-05 Yao Qi <yao@codesourcery.com>
16864
16865 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16866 (subdir_do): New make target. Copied from gdb/Makefile.
16867 (maintainer-clean, realclean, distclean, clean): Call corresponding
16868 make targets in common/Makefile.
16869
16870 2011-03-04 Yao Qi <yao@codesourcery.com>
16871
16872 * Makefile.in: Remove GNU make feature --directory.
16873
16874 2011-03-04 Michael Snyder <msnyder@vmware.com>
16875
16876 * server.c (queue_stop_reply): Call xmalloc not malloc.
16877
16878 2011-03-02 Michael Snyder <msnyder@vmware.com>
16879
16880 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
16881
16882 2011-02-28 Michael Snyder <msnyder@vmware.com>
16883
16884 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
16885 (cmd_qtframe): Ditto.
16886 (cmd_qtbuffer): Ditto.
16887 (cmd_bigqtbuffer): Ditto.
16888
16889 * utils.c (decimal2str): Initialize 'width' to nine, then
16890 don't mess with it.
16891
16892 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16893
16894 * hostio.c (require_data): Free *data, not data.
16895
16896 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16897
16898 * hostio.c (require_data): Use free, not xfree.
16899
16900 2011-02-27 Michael Snyder <msnyder@vmware.com>
16901
16902 * server.c (handle_query): Discard unused value.
16903
16904 * hostio.c (require_data): Free malloc memory before returning
16905 error.
16906
16907 2011-02-26 Michael Snyder <msnyder@vmware.com>
16908
16909 * linux-low.c (list_threads): Call closedir for dirent.
16910
16911 2011-02-27 Michael Snyder <msnyder@vmware.com>
16912
16913 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
16914 a case statement falls through.
16915
16916 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
16917
16918 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
16919 in comparison.
16920
16921 2011-02-26 Michael Snyder <msnyder@vmware.com>
16922
16923 * utils.c (decimal2str): Eliminate dead code and dead param.
16924 (pulongest): Drop dead param from call to decimal2str.
16925 (plongest): Ditto.
16926
16927 2011-02-24 Joel Brobecker <brobecker@adacore.com>
16928
16929 Revert the following patch (not approved yet):
16930 2011-02-21 Hui Zhu <teawater@gmail.com>
16931 * tracepoint.c (tp_printf): New function.
16932 (eval_agent_expr): Handle gdb_agent_op_printf.
16933
16934 2011-02-21 Hui Zhu <teawater@gmail.com>
16935
16936 * tracepoint.c (tp_printf): New function.
16937 (eval_agent_expr): Handle gdb_agent_op_printf.
16938
16939 2011-02-18 Tom Tromey <tromey@redhat.com>
16940
16941 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
16942 (tracepoint.o): Likewise.
16943 * tracepoint.c (enum gdb_agent_op): Use ax.def.
16944 (gdb_agent_op_names): Likewise.
16945
16946 2011-02-18 Tom Tromey <tromey@redhat.com>
16947
16948 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
16949 gdb_agent_op_rot>: New constants.
16950 (gdb_agent_op_names): Add pick and roll.
16951 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
16952 cases.
16953
16954 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
16955
16956 * aclocal.m4: Regenerated with aclocal-1.11.1.
16957
16958 2011-02-14 Pedro Alves <pedro@codesourcery.com>
16959
16960 * server.c (handle_qxfer_traceframe_info): New.
16961 (qxfer_packets): Register "traceframe-info".
16962 (handle_query): Report support for qXfer:traceframe-info:read+.
16963 * tracepoint.c (match_blocktype): New.
16964 (traceframe_find_block_type): Rename to ...
16965 (traceframe_walk_blocks): ... this. Add callback filter argument,
16966 and use it.
16967 (traceframe_find_block_type): New, reimplemented on top of
16968 traceframe_walk_blocks.
16969 (build_traceframe_info_xml): New.
16970 (traceframe_read_info): New.
16971 * server.h (traceframe_read_info): Declare.
16972
16973 2011-02-11 Yao Qi <yao@codesourcery.com>
16974
16975 * configure.ac: Call AC_PROG_RANLIB.
16976 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16977 * configure: Regenerate.
16978
16979 2011-02-07 Pedro Alves <pedro@codesourcery.com>
16980
16981 * server.c (gdb_read_memory): Change return semantics to allow
16982 partial transfers.
16983 (handle_search_memory_1): Adjust.
16984 (process_serial_event) <'m' packet>: Handle partial transfers.
16985 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
16986
16987 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16988
16989 * regcache.c (init_register_cache): Initialize
16990 regcache->register_status.
16991 (free_register_cache): Release regcache->register_status.
16992 (regcache_cpy): Copy register_status.
16993 (registers_to_string): Print 'x's for unavailable registers.
16994 (supply_register): Mark the register's status valid or
16995 unavailable, depending on whether a buffer was passed in or not.
16996 (supply_register_zeroed): New.
16997 (supply_regblock): Mark the registers' status valid or
16998 unavailable, depending on whether a buffer was passed in or not.
16999 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
17000 (struct regcache): New `register_status' field.
17001 (supply_register_zeroed): Declare.
17002 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
17003 supply_register_zeroed, rather than passing a NULL buffer to
17004 supply_register.
17005 * tracepoint.c (fetch_traceframe_registers): Update comment.
17006
17007 2011-01-28 Pedro Alves <pedro@codesourcery.com>
17008
17009 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
17010 buffer explicit.
17011
17012 2011-01-25 Pedro Alves <pedro@codesourcery.com>
17013
17014 * server.h (decode_xfer_write): Change prototype.
17015 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
17016 and don't extract the annex here.
17017 * server.c (decode_xfer_read): Remove `annex' parameter,
17018 and don't extract the annex here.
17019 (decode_xfer): New.
17020 (struct qxfer): New.
17021 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
17022 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
17023 (handle_qxfer_statictrace): New functions, abstracted out from
17024 handle_query, and made to use the struct qxfer interface.
17025 (handle_threads_qxfer_proper): Rename to ...
17026 (handle_qxfer_threads_proper): ... this.
17027 (handle_threads_qxfer): Rename to ...
17028 (handle_qxfer_threads): ... this. Adjust.
17029 (qxfer_packets): New array.
17030 (handle_qxfer): New function.
17031 (handle_query): Use handle_qxfer.
17032
17033 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
17034
17035 * gdbreplay.c: Shorten lines of >= 80 columns.
17036 * linux-low.c: Ditto.
17037 * linux-ppc-low.c: Ditto.
17038 * linux-s390-low.c: Ditto.
17039 * linux-sparc-low.c: Ditto.
17040 * linux-x86-low.c: Ditto.
17041 * linux-xtensa-low.c: Ditto.
17042 * mem-break.c: Ditto.
17043 * nto-low.c: Ditto.
17044 * regcache.h: Ditto.
17045 * remote-utils.c: Ditto.
17046 * server.c: Ditto.
17047 * server.h: Ditto.
17048 * thread-db.c: Ditto.
17049 * tracepoint.c: Ditto.
17050 * utils.c: Ditto.
17051 * win32-low.h: Ditto.
17052
17053 2011-01-05 Joel Brobecker <brobecker@adacore.com>
17054
17055 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
17056 update.
17057
17058 2011-01-01 Joel Brobecker <brobecker@adacore.com>
17059
17060 * server.c (gdbserver_version): Update copyright year in version
17061 output.
17062 * gdbreplay.c (gdbreplay_version): Ditto.
17063
17064 2010-12-29 Jie Zhang <jie.zhang@analog.com>
17065
17066 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
17067 * linux-bfin-low.c: New file.
17068 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
17069 PT_DATA_ADDR for BFIN targets.
17070 * Makefile.in (SFILES): Add linux-bfin-low.c.
17071 (clean): Remove reg-bfin.c.
17072 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
17073 * README: Mention supported Blackfin targets.
17074
17075 2010-12-23 Mike Frysinger <vapier@gentoo.org>
17076
17077 * .gitignore: New file.
17078
17079 2010-11-16 Mike Frysinger <vapier@gentoo.org>
17080
17081 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
17082
17083 2010-10-22 Jie Zhang <jie@codesourcery.com>
17084
17085 * Makefile.in: Add FLAGS_TO_PASS variable.
17086 (install): Remove dependency of install-only and recursively
17087 invoke make for install-only.
17088
17089 2010-10-04 Doug Evans <dje@google.com>
17090
17091 * Makefile.in (uninstall): Use $(DESTDIR).
17092
17093 2010-09-24 Pedro Alves <pedro@codesourcery.com>
17094
17095 PR gdb/11842
17096
17097 * linux-x86-low.c (compat_siginfo_from_siginfo)
17098 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
17099 si_code is < 0. Check for si_code == SI_TIMER before checking for
17100 si_code < 0.
17101
17102 2010-09-13 Joel Brobecker <brobecker@adacore.com>
17103
17104 * lynx-i386-low.c: New file.
17105 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
17106
17107 2010-09-13 Joel Brobecker <brobecker@adacore.com>
17108
17109 * lynx-low.c (ptrace_request_to_str): Remove handling for
17110 request values that have been removed in LynxOS 5.x.
17111
17112 2010-09-13 Joel Brobecker <brobecker@adacore.com>
17113
17114 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
17115 <ptrace.h>
17116
17117 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
17118
17119 * configure.ac: Add --enable-inprocess-agent option.
17120 * configure: Rebuilt.
17121
17122 2010-09-06 Yao Qi <yao@codesourcery.com>
17123
17124 * linux-low.c (linux_kill): Remove unused variable.
17125 (linux_stabilize_threads): Likewise.
17126 * server.c (start_inferior): Likewise.
17127 (queue_stop_reply_callback): Likewise.
17128 * tracepoint.c (do_action_at_tracepoint): Likewise.
17129
17130 2010-09-06 Yao Qi <yao@codesourcery.com>
17131
17132 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
17133 on return.
17134
17135 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
17136
17137 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
17138
17139 2010-09-06 Pedro Alves <pedro@codesourcery.com>
17140
17141 * Makefile.in (install-only): Replace $IPA_DEPFILES with
17142 "$(IPA_DEPFILES)".
17143
17144 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17145
17146 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
17147 gdbserver/lynx-ppc-low.c: New files.
17148 * Makefile.in (lynx_low_h): New variable.
17149 (lynx-low.o, lynx-ppc-low.o): New rules.
17150 * configure.ac: On LynxOS, link with -lnetinet.
17151 * configure.srv: Add handling of powerpc-*-lynxos* targets.
17152 * configure: regenerate.
17153
17154 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17155
17156 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
17157 * configure.ac: Add check for vasprintf and vsnprintf.
17158 * configure, config.in: Regenerate.
17159 * server.h (vasprintf, vsnprintf): Add conditional declarations.
17160
17161 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17162
17163 * gdbreplay.c: Move include of alloca.h up, next to include of
17164 malloc.h.
17165 * server.h: Add include of malloc.h.
17166 * mem-break.c: Remove include of malloc.h.
17167 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
17168
17169 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17170
17171 * Makefile.in (memmem.o): Build with -Wno-error.
17172
17173 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17174
17175 * utils.c (xsnprintf): Make non-static.
17176 * server.h: Add xsnprintf declaration.
17177 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
17178 replace calls to snprintf by calls to xsnprintf throughout.
17179
17180 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17181
17182 * configure.ac: Add configure check for alloca.
17183 * configure, config.in: Regenerate.
17184 * server.h: Include alloca.h if it exists.
17185 * gdbreplay.c: Include alloca.h if it exists.
17186
17187 2010-08-28 Pedro Alves <pedro@codesourcery.com>
17188
17189 * linux-low.c (__SIGRTMIN): Define if not already defined.
17190 (linux_create_inferior): Check for __ANDROID__ rather than
17191 __SIGRTMIN.
17192 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
17193 are already deferred.
17194 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
17195 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
17196 stopped and already has a pending signal to report.
17197 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
17198 a pending signal to report or is moving out of a jump pad.
17199 (linux_init_signals): Check for __ANDROID__ rather than
17200 __SIGRTMIN.
17201
17202 2010-08-28 Pedro Alves <pedro@codesourcery.com>
17203
17204 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
17205 debug_threads check. Avoid a linear search when not doing debug
17206 output.
17207
17208 2010-08-27 Pedro Alves <pedro@codesourcery.com>
17209
17210 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
17211 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
17212 (struct file_handler) <fd>: Change type to gdb_fildes_t.
17213 (process_event): Change local fd's type to gdb_fildes_t.
17214 (create_file_handler): Adjust prototype.
17215 (delete_file_handler): Adjust prototype.
17216 (handle_file_event): Adjust prototype. Use pfildes.
17217 (create_file_event): Adjsut prototype.
17218 * remote-utils.c (remote_desc, listen_desc): Change type to
17219 gdb_fildes_t.
17220 * server.h: New gdb_fildes_t typedef.
17221 [USE_WIN32API]: Include winsock2.h.
17222 (delete_file_handler, add_file_handler): Adjust prototypes.
17223 (pfildes): Declare.
17224 * utils.c (pfildes): New.
17225
17226 2010-08-27 Pedro Alves <pedro@codesourcery.com>
17227
17228 * configure.ac (build_warnings): Add -Wno-char-subscripts.
17229 * configure: Regenerate.
17230
17231 2010-08-27 Pedro Alves <pedro@codesourcery.com>
17232
17233 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
17234 (linux_done_accessing_memory): ... this.
17235 (linux_target_ops): Adjust.
17236 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
17237 * nto-low.c (nto_target_ops): Adjust comment.
17238 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
17239 * spu-low.c (spu_target_ops): Adjust comment.
17240 * target.h (target_ops): Rename unprepare_to_access_memory field
17241 to done_accessing_memory.
17242 (unprepare_to_access_memory): Rename to ...
17243 (done_accessing_memory): ... this.
17244
17245 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17246
17247 * linux-low.c (linux_prepare_to_access_memory): New.
17248 (linux_unprepare_to_access_memory): New.
17249 (linux_target_ops): Install them.
17250 * server.c (read_memory): Rename to ...
17251 (gdb_read_memory): ... this. Use
17252 prepare_to_access_memory/prepare_to_access_memory.
17253 (write_memory): Rename to ...
17254 (gdb_write_memory): ... this. Use
17255 prepare_to_access_memory/prepare_to_access_memory.
17256 (handle_search_memory_1): Adjust.
17257 (process_serial_event): Adjust.
17258 * target.h (struct target_ops): New fields
17259 prepare_to_access_memory and unprepare_to_access_memory.
17260 (prepare_to_access_memory, unprepare_to_access_memory): New.
17261 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
17262 prepare_to_access_memory/prepare_to_access_memory.
17263 * nto-low.c (nto_target_ops): Adjust.
17264 * spu-low.c (spu_target_ops): Adjust.
17265 * win32-low.c (win32_target_ops): Adjust.
17266
17267 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17268
17269 * Makefile.in (WARN_CFLAGS): Get it from configure.
17270 (WERROR_CFLAGS): New.
17271 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
17272 * configure.ac: Introduce --enable-werror, which adds -Werror to
17273 the compiler command line. Enabled by default. Disable with
17274 --disable-werror. Add -Wdeclaration-after-statement
17275 Wpointer-arith and -Wformat-nonliteral to warning flags.
17276 * configure: Regenerate.
17277
17278 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17279
17280 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
17281
17282 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17283
17284 * gdbreplay.c (remote_error): New.
17285 (gdbchar): New.
17286 (expect): Use gdbchar. Check for error reading from GDB.
17287 Clarify sync error output.
17288 (play): Check for errors writing to GDB.
17289 * linux-low.c (sigchld_handler): Really ignore `write' errors.
17290 * remote-utils.c (getpkt): Check for errors writing to the remote
17291 descriptor.
17292
17293 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17294
17295 * linux-low.c (linux_wait_1): Move non-debugging code out of
17296 `debug_threads' control.
17297
17298 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17299
17300 * linux-low.c (linux_wait_1): Don't set last_status here.
17301 * server.c (push_event, queue_stop_reply_callback): Assert we're
17302 not pushing a TARGET_WAITKIND_IGNORE event.
17303 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
17304 (myresume, handle_target_event): Set the thread's last_resume_kind
17305 and last_status from the target returned status.
17306
17307 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17308
17309 PR threads/10729
17310
17311 * linux-x86-low.c (update_debug_registers_callback): New.
17312 (i386_dr_low_set_addr): Use it.
17313 (i386_dr_low_get_addr): New.
17314 (i386_dr_low_set_control): Use update_debug_registers_callback.
17315 (i386_dr_low_get_control): New.
17316 (i386_dr_low_get_status): Adjust.
17317 * linux-low.c (linux_stop_lwp): New.
17318 * linux-low.h (linux_stop_lwp): Declare.
17319
17320 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
17321 argument instead of a i386_debug_reg_state.
17322 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
17323 a i386_debug_reg_state.
17324 (i386_insert_aligned_watchpoint): Adjust.
17325 (i386_remove_aligned_watchpoint): Adjust.
17326 (i386_low_stopped_data_address): Read the debug registers from the
17327 inferior instead of from the mirrors.
17328 * i386-low.h (struct i386_debug_reg_state): Extend comment.
17329 (i386_dr_low_get_addr): Declare.
17330 (i386_dr_low_get_control): Declare.
17331 (i386_dr_low_get_status): Change prototype.
17332
17333 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
17334 (i386_dr_low_get_addr): New.
17335 (i386_dr_low_get_control): New.
17336 (i386_dr_low_get_status): Adjust prototype. Return
17337 dr_status_mirror.
17338 (i386_initial_stuff): Clear dr_status_mirror and
17339 dr_control_mirror.
17340 (i386_get_thread_context): Adjust.
17341 (i386_set_thread_context): Adjust.
17342 (i386_thread_added): Adjust.
17343
17344 2010-08-24 Pedro Alves <pedro@codesourcery.com>
17345
17346 * linux-low.h (linux_thread_area): Delete declaration.
17347
17348 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
17349
17350 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
17351 after its termination.
17352
17353 2010-08-09 Pedro Alves <pedro@codesourcery.com>
17354
17355 * linux-low.c (gdb_wants_lwp_stopped): Delete.
17356 (gdb_wants_all_stopped): Delete.
17357 (linux_wait_1): Don't call them.
17358 * server.c (handle_v_cont): Tag all threads as want-stopped.
17359 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
17360 stopped as "client-wants-stopped".
17361
17362 2010-07-31 Pedro Alves <pedro@codesourcery.com>
17363
17364 * Makefile.in (signals_h): New.
17365 (server_h): Depend on it.
17366 (server.o): Don't depend on $(signals_def).
17367 (signals.o): Depend on $(signals_def).
17368
17369 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
17370
17371 * Makefile.in (signals_def): New.
17372 (server_h): Append include/gdb/signals.h and signals_def.
17373 (server.o): Append signals_def.
17374
17375 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
17376
17377 * server.c (handle_target_event): Use target_signal_to_host for
17378 resume_info.sig initialization.
17379 * target.h (struct thread_resume) <sig>: New comment.
17380
17381 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
17382
17383 * server.c (handle_query): strcpy() the returned string from paddress()
17384 instead of sprintf().
17385 * utils.c (paddress): Return phex_nz().
17386
17387 2010-07-07 Joel Brobecker <brobecker@adacore.com>
17388
17389 * server.c (handle_v_cont): Call mourn_inferior if process
17390 just exited.
17391 (myresume): Likewise.
17392
17393 2010-07-01 Pedro Alves <pedro@codesourcery.com>
17394
17395 Static tracepoints, and integration with UST.
17396
17397 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
17398 * mem-break.c (uninsert_all_breakpoints)
17399 (reinsert_all_breakpoints): New.
17400 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
17401 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
17402 (gdb_agent_ust_loaded, helper_thread_id)
17403 (gdb_agent_helper_thread_id): New macros.
17404 (struct ipa_sym_addresses): Add addr_ust_loaded,
17405 addr_helper_thread_id, addr_cmd_buf.
17406 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
17407 (in_process_agent_loaded_ust): New.
17408 (write_e_ust_not_loaded): New.
17409 (maybe_write_ipa_ust_not_loaded): New.
17410 (struct collect_static_trace_data_action): New.
17411 (enum tracepoint_type) <static_tracepoint>: New.
17412 (struct tracepoint) <handle>: Mention static tracepoints.
17413 (struct static_tracepoint_ctx): New.
17414 (CMD_BUF_SIZE): New.
17415 (add_tracepoint_action): Handle static tracepoint actions.
17416 (unprobe_marker_at): New.
17417 (clear_installed_tracepoints): Handle static tracepoints.
17418 (cmd_qtdp): Handle static tracepoints.
17419 (probe_marker_at): New.
17420 (cmd_qtstart): Handle static tracepoints.
17421 (response_tracepoint): Handle static tracepoints.
17422 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
17423 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
17424 (get_context_regcache): Handle static tracepoints.
17425 (do_action_at_tracepoint): Handle static tracepoint actions.
17426 (traceframe_find_block_type): Handle static trace data blocks.
17427 (traceframe_read_sdata): New.
17428 (download_tracepoints): Download static tracepoint actions.
17429 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
17430 (GDB_PROBE_NAME): New.
17431 (ust_ops): New.
17432 (GET_UST_SYM): New.
17433 (USTF): New.
17434 (dlsym_ust): New.
17435 (ust_marker_to_static_tracepoint): New.
17436 (gdb_probe): New.
17437 (collect_ust_data_at_tracepoint): New.
17438 (gdb_ust_probe): New.
17439 (UNIX_PATH_MAX, SOCK_DIR): New.
17440 (gdb_ust_connect_sync_socket): New.
17441 (resume_thread, stop_thread): New.
17442 (run_inferior_command): New.
17443 (init_named_socket): New.
17444 (gdb_ust_socket_init): New.
17445 (cstr_to_hexstr): New.
17446 (next_st): New.
17447 (first_marker, next_marker): New.
17448 (response_ust_marker): New.
17449 (cmd_qtfstm, cmd_qtsstm): New.
17450 (unprobe_marker_at, probe_marker_at): New.
17451 (cmd_qtstmat, gdb_ust_thread): New.
17452 (gdb_ust_init): New.
17453 (initialize_tracepoint_ftlib): Call gdb_ust_init.
17454 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
17455 (ST_REGENTRY): New.
17456 (x86_64_st_collect_regmap): New.
17457 (X86_64_NUM_ST_COLLECT_GREGS): New.
17458 (AMD64_RIP_REGNUM): New.
17459 (supply_static_tracepoint_registers): New.
17460 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
17461 (ST_REGENTRY): New.
17462 (i386_st_collect_regmap): New.
17463 (i386_NUM_ST_COLLECT_GREGS): New.
17464 (supply_static_tracepoint_registers): New.
17465 * server.c (handle_query): Handle qXfer:statictrace:read.
17466 <qSupported>: Report support for StaticTracepoints, and
17467 qXfer:statictrace:read features.
17468 * server.h (traceframe_read_sdata)
17469 (supply_static_tracepoint_registers): Declare.
17470 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
17471 (unpack_varlen_hex): Include in IPA build.
17472 * Makefile.in (ustlibs, ustinc): New.
17473 (IPA_OBJS): Add remote-utils-ipa.o.
17474 ($(IPA_LIB)): Link -ldl and -lpthread.
17475 (UST_CFLAGS): New.
17476 (IPAGENT_CFLAGS): Add UST_CFLAGS.
17477 * config.in, configure: Regenerate.
17478
17479 2010-06-20 Ian Lance Taylor <iant@google.com>
17480 Pedro Alves <pedro@codesourcery.com>
17481
17482 * linux-x86-low.c (always_true): Delete.
17483 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
17484 trying to fool the compiler with always_true.
17485
17486 2010-06-20 Pedro Alves <pedro@codesourcery.com>
17487
17488 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
17489 conditions in gdbserver.
17490
17491 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
17492
17493 * spu-low.c (spu_read_memory): Wrap around local store limit.
17494 (spu_write_memory): Likewise.
17495
17496 2010-06-15 Pedro Alves <pedro@codesourcery.com>
17497
17498 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
17499 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
17500 LONGEST uses.
17501 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
17502 uses.
17503 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
17504 uses with LONGEST uses.
17505
17506 2010-06-14 Stan Shebs <stan@codesourcery.com>
17507 Pedro Alves <pedro@codesourcery.com>
17508
17509 Bytecode compiler.
17510
17511 * linux-x86-low.c: Include limits.h.
17512 (add_insns): New.
17513 (always_true): New.
17514 (EMIT_ASM): New.
17515 (EMIT_ASM32): New.
17516 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
17517 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
17518 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
17519 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
17520 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
17521 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
17522 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
17523 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
17524 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
17525 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
17526 (amd64_emit_void_call_2): New.
17527 (amd64_emit_ops): New.
17528 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
17529 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
17530 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
17531 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
17532 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
17533 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
17534 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
17535 (i386_emit_call, i386_emit_reg, i386_emit_pop)
17536 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
17537 (i386_emit_stack_adjust, i386_emit_int_call_1)
17538 (i386_emit_void_call_2): New.
17539 (i386_emit_ops): New.
17540 (x86_emit_ops): New.
17541 (the_low_target): Install x86_emit_ops.
17542 * server.h (struct emit_ops): New.
17543 (get_raw_reg_func_addr): Declare.
17544 (current_insn_ptr, emit_error): Declare.
17545 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
17546 (set_trace_state_variable_value): New defines.
17547 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
17548 addr_get_trace_state_variable_value and
17549 addr_set_trace_state_variable_value.
17550 (symbol_list): New fields for get_raw_reg,
17551 get_trace_state_variable_value and set_trace_state_variable_value.
17552 (condfn): New typedef.
17553 (struct tracepoint): New field `compiled_cond'.
17554 (do_action_at_tracepoint): Clear compiled_cond.
17555 (get_trace_state_variable_value, set_trace_state_variable_value):
17556 Export in the IPA.
17557 (condition_true_at_tracepoint): If there's a compiled condition,
17558 run that.
17559 (current_insn_ptr, emit_error): New globals.
17560 (struct bytecode_address): New.
17561 (get_raw_reg_func_addr): New.
17562 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
17563 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
17564 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
17565 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
17566 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
17567 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
17568 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
17569 (compile_tracepoint_condition, compile_bytecodes): New.
17570 * target.h (emit_ops): Forward declare.
17571 (struct target_ops): New field emit_ops.
17572 (target_emit_ops): New.
17573 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
17574 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
17575 * linux-low.c (linux_emit_ops): New.
17576 (linux_target_ops): Install it.
17577 * linux-low.h (struct linux_target_ops): New field emit_ops.
17578
17579 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
17580
17581 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
17582 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
17583
17584 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17585 Stan Shebs <stan@codesourcery.com>
17586
17587 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
17588 (all): Depend on $(extra_libraries).
17589 (install-only): Install the IPA.
17590 (IPA_OBJS, IPA_LIB): New.
17591 (clean): Remove the IPA lib.
17592 (IPAGENT_CFLAGS): New.
17593 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
17594 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
17595 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
17596 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
17597 * configure.ac: Check for atomic builtins support in the compiler.
17598 (IPA_DEPFILES, extra_libraries): Define.
17599 * configure.srv (ipa_obj): Add description.
17600 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
17601 (i[34567]86-*-linux*): Set ipa_obj.
17602 (x86_64-*-linux*): Set ipa_obj.
17603 * linux-low.c (stabilizing_threads): New.
17604 (supports_fast_tracepoints): New.
17605 (linux_detach): Stabilize threads before detaching.
17606 (handle_tracepoints): Handle internal tracing breakpoints. Assert
17607 the lwp is either not stabilizing, or is moving out of a jump pad.
17608 (linux_fast_tracepoint_collecting): New.
17609 (maybe_move_out_of_jump_pad): New.
17610 (enqueue_one_deferred_signal): New.
17611 (dequeue_one_deferred_signal): New.
17612 (linux_wait_for_event_1): If moving out of a jump pad, defer
17613 pending signals to later.
17614 (linux_stabilize_threads): New.
17615 (linux_wait_1): Check if threads need moving out of jump pads, and
17616 do it if so.
17617 (stuck_in_jump_pad_callback): New.
17618 (move_out_of_jump_pad_callback): New.
17619 (lwp_running): New.
17620 (linux_resume_one_lwp): Handle moving out of jump pads.
17621 (linux_set_resume_request): Dequeue deferred signals.
17622 (need_step_over_p): Also step over fast tracepoint jumps.
17623 (start_step_over): Also uninsert fast tracepoint jumps.
17624 (finish_step_over): Also reinsert fast tracepoint jumps.
17625 (linux_install_fast_tracepoint_jump): New.
17626 (linux_target_ops): Install linux_stabilize_threads and
17627 linux_install_fast_tracepoint_jump_pad.
17628 * linux-low.h (linux_target_ops) <get_thread_area,
17629 install_fast_tracepoint_jump_pad>: New fields.
17630 (struct lwp_info) <collecting_fast_tracepoint,
17631 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
17632 (linux_get_thread_area): Declare.
17633 * linux-x86-low.c (jump_insn): New.
17634 (x86_get_thread_area): New.
17635 (append_insns): New.
17636 (push_opcode): New.
17637 (amd64_install_fast_tracepoint_jump_pad): New.
17638 (i386_install_fast_tracepoint_jump_pad): New.
17639 (x86_install_fast_tracepoint_jump_pad): New.
17640 (the_low_target): Install x86_get_thread_area and
17641 x86_install_fast_tracepoint_jump_pad.
17642 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
17643 (struct fast_tracepoint_jump): New.
17644 (fast_tracepoint_jump_insn): New.
17645 (fast_tracepoint_jump_shadow): New.
17646 (find_fast_tracepoint_jump_at): New.
17647 (fast_tracepoint_jump_here): New.
17648 (delete_fast_tracepoint_jump): New.
17649 (set_fast_tracepoint_jump): New.
17650 (uninsert_fast_tracepoint_jumps_at): New.
17651 (reinsert_fast_tracepoint_jumps_at): New.
17652 (set_breakpoint_at): Use write_inferior_memory.
17653 (uninsert_raw_breakpoint): Use write_inferior_memory.
17654 (check_mem_read): Mask out fast tracepoint jumps.
17655 (check_mem_write): Mask out fast tracepoint jumps.
17656 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
17657 (set_fast_tracepoint_jump): Declare.
17658 (delete_fast_tracepoint_jump)
17659 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
17660 (reinsert_fast_tracepoint_jumps_at): Declare.
17661 * regcache.c: Don't compile many functions when building the
17662 in-process agent library.
17663 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
17664 the register buffer in the heap.
17665 (free_register_cache): If the register buffer isn't owned by the
17666 regcache, don't free it.
17667 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
17668 pre-existing register caches.
17669 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
17670 type.
17671 (convert_ascii_to_int): : Constify `from' parameter type.
17672 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
17673 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
17674 the needed buffer in-place.
17675 (relocate_instruction): New.
17676 * server.c (handle_query) <qSymbols>: If the target supports
17677 tracepoints, give it a chance of looking up symbols. Report
17678 support for fast tracepoints.
17679 (handle_status): Stabilize threads.
17680 (process_serial_event): Adjust.
17681 * server.h (struct fast_tracepoint_jump): Forward declare.
17682 (struct process_info) <fast_tracepoint_jumps>: New field.
17683 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
17684 (decode_X_packet, decode_M_packet): Adjust.
17685 (relocate_instruction): Declare.
17686 (in_process_agent_loaded): Declare.
17687 (tracepoint_look_up_symbols): Declare.
17688 (struct fast_tpoint_collect_status): Declare.
17689 (fast_tracepoint_collecting): Declare.
17690 (force_unlock_trace_buffer): Declare.
17691 (handle_tracepoint_bkpts): Declare.
17692 (initialize_low_tracepoint)
17693 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
17694 * target.h (struct target_ops) <stabilize_threads,
17695 install_fast_tracepoint_jump_pad>: New fields.
17696 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
17697 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
17698 [HAVE_STDINT_H]: Include stdint.h.
17699 (trace_debug_1): Rename to ...
17700 (trace_vdebug): ... this.
17701 (trace_debug): Rename to ...
17702 (trace_debug_1): ... this. Add `level' parameter.
17703 (trace_debug): New.
17704 (ATTR_USED, ATTR_NOINLINE): New.
17705 (IP_AGENT_EXPORT): New.
17706 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
17707 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
17708 (about_to_request_buffer_space, trace_buffer_is_full)
17709 (stopping_tracepoint, expr_eval_result, error_tracepoint)
17710 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
17711 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
17712 (traceframe_write_count, traceframes_created)
17713 (trace_state_variables)
17714 New renaming defines.
17715 (struct ipa_sym_addresses): New.
17716 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
17717 (symbol_list): New.
17718 (ipa_sym_addrs): New.
17719 (all_tracepoint_symbols_looked_up): New.
17720 (in_process_agent_loaded): New.
17721 (write_e_ipa_not_loaded): New.
17722 (maybe_write_ipa_not_loaded): New.
17723 (tracepoint_look_up_symbols): New.
17724 (debug_threads) [IN_PROCESS_AGENT]: New.
17725 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
17726 (UNKNOWN_SIDE_EFFECTS): New.
17727 (stop_tracing): New.
17728 (flush_trace_buffer): New.
17729 (stop_tracing_bkpt): New.
17730 (flush_trace_buffer_bkpt): New.
17731 (read_inferior_integer): New.
17732 (read_inferior_uinteger): New.
17733 (read_inferior_data_pointer): New.
17734 (write_inferior_data_pointer): New.
17735 (write_inferior_integer): New.
17736 (write_inferior_uinteger): New.
17737 (struct collect_static_trace_data_action): Delete.
17738 (enum tracepoint_type): New.
17739 (struct tracepoint) <type>: New field `type'.
17740 <actions_str, step_actions, step_actions_str>: Only include in
17741 GDBserver.
17742 <orig_size, obj_addr_on_target, adjusted_insn_addr>
17743 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
17744 (tracepoints): Use IP_AGENT_EXPORT.
17745 (last_tracepoint): Don't include in the IPA.
17746 (stopping_tracepoint): Use IP_AGENT_EXPORT.
17747 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
17748 (alloced_trace_state_variables): New.
17749 (trace_state_variables): Use IP_AGENT_EXPORT.
17750 (traceframe_t): Delete unused variable.
17751 (circular_trace_buffer): Don't include in the IPA.
17752 (trace_buffer_start): Delete.
17753 (struct trace_buffer_control): New.
17754 (trace_buffer_free): Delete.
17755 (struct ipa_trace_buffer_control): New.
17756 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
17757 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
17758 New.
17759 (trace_buffer_ctrl): New.
17760 (TRACE_BUFFER_CTRL_CURR): New.
17761 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
17762 Reimplement as macros.
17763 (trace_buffer_wrap): Delete.
17764 (traceframe_write_count, traceframe_read_count)
17765 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
17766 (struct tracepoint_hit_ctx) <type>: New field.
17767 (struct fast_tracepoint_ctx): New.
17768 (memory_barrier): New.
17769 (cmpxchg): New.
17770 (record_tracepoint_error): Update atomically in the IPA.
17771 (clear_inferior_trace_buffer): New.
17772 (about_to_request_buffer_space): New.
17773 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
17774 updating the same buffer.
17775 (add_tracepoint): Default the tracepoint's type to trap
17776 tracepoint, and orig_size to -1.
17777 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
17778 internal variables.
17779 (create_trace_state_variable): New parameter `gdb'. Handle it.
17780 (clear_installed_tracepoints): Clear fast tracepoint jumps.
17781 (cmd_qtdp): Handle fast tracepoints.
17782 (cmd_qtdv): Adjust.
17783 (max_jump_pad_size): New.
17784 (gdb_jump_pad_head): New.
17785 (get_jump_space_head): New.
17786 (claim_jump_space): New.
17787 (sort_tracepoints): New.
17788 (MAX_JUMP_SIZE): New.
17789 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
17790 IPA.
17791 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
17792 support. Upload fast traceframes, and delete internal IPA
17793 breakpoints.
17794 (stop_tracing_handler): New.
17795 (flush_trace_buffer_handler): New.
17796 (cmd_qtstop): Upload fast tracepoints.
17797 (response_tracepoint): Handle fast tracepoints.
17798 (tracepoint_finished_step): Upload fast traceframes. Set the
17799 tracepoint hit context's tracepoint type.
17800 (handle_tracepoint_bkpts): New.
17801 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
17802 type. Add comment about fast tracepoints.
17803 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
17804 non-existing action_str field.
17805 (get_context_regcache): Handle fast tracepoints.
17806 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
17807 to the regcache.
17808 (fast_tracepoint_from_jump_pad_address): New.
17809 (fast_tracepoint_from_ipa_tpoint_address): New.
17810 (collecting_t): New.
17811 (force_unlock_trace_buffer): New.
17812 (fast_tracepoint_collecting): New.
17813 (collecting): New.
17814 (gdb_collect): New.
17815 (write_inferior_data_ptr): New.
17816 (target_tp_heap): New.
17817 (target_malloc): New.
17818 (download_agent_expr): New.
17819 (UALIGN): New.
17820 (download_tracepoints): New.
17821 (download_trace_state_variables): New.
17822 (upload_fast_traceframes): New.
17823 (IPA_FIRST_TRACEFRAME): New.
17824 (IPA_NEXT_TRACEFRAME_1): New.
17825 (IPA_NEXT_TRACEFRAME): New.
17826 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
17827 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
17828 (gdb_jump_pad_buffer_end): New.
17829 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
17830 (initialize_tracepoint): Adjust.
17831 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
17832 buffer. Initialize the low module.
17833 * utils.c (PREFIX, TOOLNAME): New.
17834 (malloc_failure): Use PREFIX.
17835 (error): In the IPA, an error causes an exit.
17836 (fatal, warning): Use PREFIX.
17837 (internal_error): Use TOOLNAME.
17838 (NUMCELLS): Increase to 10.
17839 * configure, config.in: Regenerate.
17840
17841 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17842
17843 * server.c (handle_query) <qSupported>: Do two passes over the
17844 qSupported string to avoid nesting strtok.
17845
17846 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17847
17848 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
17849 (CDEPS): New.
17850 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
17851 -Wl,--dynamic-list.
17852 * configure: Regenerate.
17853 * proc-service.list: New.
17854
17855 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17856
17857 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
17858 New comment.
17859
17860 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
17861
17862 * gdbreplay.c (remote_open): Check error return from socket() call by
17863 its equality to -1 not by it being negative.
17864 * remote-utils.c (remote_open): Likewise.
17865
17866 2010-05-23 Pedro Alves <pedro@codesourcery.com>
17867
17868 * config.h: Regenerate.
17869
17870 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17871
17872 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
17873 doesn't provide PTRACE_GET_THREAD_AREA.
17874
17875 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17876
17877 * linux-m68k-low.c: Include <asm/ptrace.h>
17878 (ps_get_thread_area): Implement.
17879
17880 2010-05-03 Doug Evans <dje@google.com>
17881
17882 * event-loop.c (struct callback_event): New struct.
17883 (callback_list): New global.
17884 (append_callback_event, delete_callback_event): New functions.
17885 (process_callback): New function.
17886 (start_event_loop): Call it.
17887 * remote-utils.c (NOT_SCHEDULED): Define.
17888 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
17889 moved out of readchar.
17890 (readchar): Rewrite. Call reschedule before returning.
17891 (reset_readchar): New function.
17892 (remote_close): Call it.
17893 (process_remaining, reschedule): New functions.
17894 * server.h (callback_handler_func): New typedef.
17895 (append_callback_event, delete_callback_event): Declare.
17896
17897 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17898
17899 * proc-service.c (ps_pglobal_lookup): Use
17900 thread_db_look_up_one_symbol.
17901 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
17902 parameter. Use it instead of all_symbols_looked_up.
17903 * server.h (struct process_info) <all_symbols_looked_up>: Delete
17904 field.
17905 (all_symbols_looked_up): Don't declare.
17906 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
17907 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
17908 field.
17909 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
17910 Set all_symbols_looked_up here.
17911 (thread_db_look_up_one_symbol): New.
17912 (thread_db_get_tls_address): Adjust.
17913 (thread_db_load_search, try_thread_db_load_1): Always allocate the
17914 thread_db object on the heap, and tentatively set it in the
17915 process structure.
17916 (thread_db_init): Don't set all_symbols_looked_up here.
17917 * linux-low.h (thread_db_look_up_one_symbol): Declare.
17918
17919 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17920
17921 * linux-low.c (linux_kill, linux_detach): Adjust.
17922 (status_pending_p_callback): Remove redundant statement. Check
17923 for !TARGET_WAITIKIND_IGNORE, instead of
17924 TARGET_WAITKIND_STOPPED.
17925 (handle_tracepoints): Make sure LWP is locked. Adjust.
17926 (linux_wait_for_event_1): Adjust.
17927 (linux_cancel_breakpoints): New.
17928 (unsuspend_one_lwp): New.
17929 (unsuspend_all_lwps): New.
17930 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
17931 (send_sigstop_callback): Change return type to int, add new
17932 `except' parameter and handle it.
17933 (suspend_and_send_sigstop_callback): New.
17934 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
17935 pass them down. If SUSPEND, also increment the lwp's suspend
17936 count.
17937 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
17938 (need_step_over_p): Don't consider suspended LWPs.
17939 (start_step_over): Adjust.
17940 (proceed_one_lwp): Change return type to int, add new `except'
17941 parameter and handle it.
17942 (unsuspend_and_proceed_one_lwp): New.
17943 (proceed_all_lwps): Use find_inferior instead of
17944 for_each_inferior.
17945 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
17946 also decrement the suspend count of LWPs. Pass `except' down,
17947 instead of hacking its suspend count.
17948 (linux_pause_all): Add `freeze' parameter. Adjust.
17949 (linux_unpause_all): New.
17950 (linux_target_ops): Install linux_unpause_all.
17951 * server.c (handle_status): Adjust.
17952 * target.h (struct target_ops): New fields `unpause_all' and
17953 `cancel_breakpoints'. Add new parameter to `pause_all'.
17954 (pause_all): Add new `freeze' parameter.
17955 (unpause_all): New.
17956 (cancel_breakpoints): New.
17957 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
17958 cancel breakpoints.
17959 (cmd_qtstart): Pause threads.
17960 (stop_tracing): Pause threads, and cancel breakpoints.
17961 * win32-low.c (win32_target_ops): Adjust.
17962
17963 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17964
17965 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
17966 the inferior right away from here...
17967 (linux_wait_1): ... to here, and adjust to check the thread's
17968 last_resume_kind instead of the lwp's step or stop_expected flags.
17969
17970 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17971
17972 * README: Use consistent `GDB' and `GDBserver' spellings.
17973
17974 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17975
17976 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
17977 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
17978 (linux_detach_one_lwp): Assume the lwp is stopped.
17979 (any_thread_of): Delete.
17980 (linux_detach): Stop all lwps here. Don't blindly delete all
17981 breakpoints.
17982 (delete_lwp_callback): New.
17983 (linux_mourn): Delete all lwps of the process that is gone.
17984 (linux_wait_1): Don't delete the last lwp of the process here.
17985 * mem-break.h (mark_breakpoints_out): Declare.
17986 * mem-break.c (mark_breakpoints_out): New.
17987 (free_all_breakpoints): Use it.
17988 * server.c (handle_target_event): If the process is gone, mark
17989 breakpoints out.
17990 * thread-db.c (struct thread_db) <create_bp>: New field.
17991 (thread_db_enable_reporting): Fix prototype. Store a thread event
17992 breakpoint reference in the thread_db struct.
17993 (thread_db_load_search): Clear the thread_db object.
17994 (try_thread_db_load_1): Ditto.
17995 (switch_to_process): New.
17996 (disable_thread_event_reporting): Use it.
17997 (remove_thread_event_breakpoints): New.
17998 (thread_db_detach, thread_db_mourn): Use it.
17999
18000 2010-05-01 Pedro Alves <pedro@codesourcery.com>
18001
18002 * linux-low.c (linux_enable_event_reporting): New.
18003 (linux_wait_for_event_1, handle_extended_wait): Use it.
18004
18005 2010-04-30 Pedro Alves <pedro@codesourcery.com>
18006
18007 * linux-low.c (linux_kill_one_lwp, linux_kill)
18008 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
18009 (send_sigstop): Take an lwp_info as parameter instead. Queue a
18010 SIGSTOP even if the LWP is stopped.
18011 (send_sigstop_callback): New.
18012 (stop_all_lwps): Use send_sigstop_callback instead.
18013 (linux_resume_one_thread): Adjust.
18014 (proceed_one_lwp): Still proceed an LWP that the client has
18015 requested to stop, if we haven't reported it as stopped yet. Make
18016 sure that LWPs the client want stopped, have a pending SIGSTOP.
18017
18018 2010-04-26 Doug Evans <dje@google.com>
18019
18020 * server.c (handle_general_set): Make static.
18021
18022 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
18023 Print received char after testing for error/eof instead of before.
18024 (input_interrupt): Tweak comment.
18025
18026 2010-04-23 Doug Evans <dje@google.com>
18027
18028 * server.c (start_inferior): Print inferior argv if --debug.
18029
18030 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
18031
18032 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
18033 * nto-x86-low.c: Include server.h
18034
18035 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
18036
18037 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
18038 be consistent with other sources of this directory.
18039 (init_registers_amd64): Correct name of source file of this function
18040 in the comment.
18041
18042 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
18043
18044 * configure.srv (x86_64-*-mingw*): New configuration for Windows
18045 64-bit executables.
18046
18047 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
18048
18049 * win32-i386-low.c: Add 64-bit support.
18050 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
18051 (init_registers_amd64): Declare.
18052 (mappings): Add 64-bit version of array.
18053 (init_windows_x86): New function.
18054 (the_low_target): Change init_arch field to init_windows_x86.
18055
18056 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
18057
18058 * win32-low.c: Adapt to support also 64-bit architecture.
18059 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
18060 (get_image_name): Use SIZE_T type for local variable `done'.
18061 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
18062 (toolhelp_get_dll_name): Idem.
18063 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
18064 Use uintptr_t typecast to avoid warning.
18065 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
18066 (handle_exception): Use phex_nz to avoid warning.
18067 (win32_wait): Remove unused local variable `process'.
18068
18069 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
18070
18071 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
18072 `amd64-avx.o'.
18073
18074 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
18075
18076 * configure.ac: Use `ws2_32' library for srv_mingw.
18077 * configure: Regenerate.
18078 * gdbreplay.c: Include winsock2.h instead of winsock.h.
18079 * remote-utils.c: Likewise.
18080
18081 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
18082
18083 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
18084 if __x86_64__ is defined.
18085
18086 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
18087
18088 * configure: Regenerate.
18089
18090 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
18091
18092 * server.c (handle_query): Handle 'qGetTIBAddr' query.
18093 * target.h (target_ops): New get_tib_address field.
18094 * win32-low.h (win32_thread_info): Add thread_local_base field.
18095 * win32-low.c (child_add_thread): Add tlb argument.
18096 Set thread_local_base field to TLB.
18097 (get_child_debug_event): Adapt to child_add_thread change.
18098 (win32_get_tib_address): New function.
18099 (win32_target_ops): Set get_tib_address field to
18100 win32_get_tib_address.
18101 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
18102
18103 2010-04-12 Pedro Alves <pedro@codesourcery.com>
18104
18105 * linux-low.c (linux_mourn): Also remove the process.
18106 * server.c (handle_target_event): Don't remove the process here.
18107 * nto-low.c (nto_mourn): New.
18108 (nto_target_ops): Install it.
18109 * spu-low.c (spu_mourn): New.
18110 (spu_target_ops): Install it.
18111 * win32-low.c (win32_mourn): New.
18112 (win32_target_ops): Install it.
18113
18114 2010-04-12 Pedro Alves <pedro@codesourcery.com>
18115
18116 * server.h (buffer_xml_printf): Remove redundant `;'.
18117
18118 2010-04-12 Pedro Alves <pedro@codesourcery.com>
18119
18120 * regcache.c (set_register_cache): Invalidate regcaches before
18121 changing the register cache layout.
18122 (regcache_invalidate_one): Allow a NULL regcache.
18123 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
18124 regcaches before changing the register cache layout or the target
18125 regsets.
18126
18127 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
18128
18129 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
18130 variable warning on Linux/x86-64.
18131
18132 2010-04-11 Pedro Alves <pedro@codesourcery.com>
18133
18134 GDBserver disconnected tracing support.
18135
18136 * linux-low.c (linux_remove_process): Delete.
18137 (add_lwp): Don't set last_resume_kind here.
18138 (linux_kill): Use `mourn'.
18139 (linux_detach): Use `thread_db_detach', and `mourn'.
18140 (linux_mourn): New.
18141 (linux_attach_lwp_1): Adjust comment.
18142 (linux_attach): last_resume_kind moved the thread_info; adjust.
18143 (status_pending_p_callback): Adjust.
18144 (linux_wait_for_event_1): Adjust.
18145 (count_events_callback, select_singlestep_lwp_callback)
18146 (select_event_lwp_callback, cancel_breakpoints_callback)
18147 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
18148 (proceed_one_lwp): Adjust.
18149 (linux_async): Add debug output.
18150 (linux_thread_stopped): New.
18151 (linux_pause_all): New.
18152 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
18153 linux_pause_all.
18154 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
18155 (thread_db_free): Delete declaration.
18156 (thread_db_detach, thread_db_mourn): Declare.
18157 * thread-db.c (thread_db_init): Use thread_db_mourn.
18158 (thread_db_free): Delete, split in two.
18159 (disable_thread_event_reporting): New.
18160 (thread_db_detach): New.
18161 (thread_db_mourn): New.
18162
18163 * server.h (struct thread_info) <last_resume_kind>: New field.
18164 <attached>: Add comment.
18165 <gdb_detached>: New field.
18166 (handler_func): Change return type to int.
18167 (handle_serial_event, handle_target_event): Ditto.
18168 (gdb_connected): Declare.
18169 (tracing): Delete.
18170 (disconnected_tracing): Declare.
18171 (stop_tracing): Declare.
18172
18173 * server.c (handle_query) <qSupported>: Report support for
18174 disconnected tracing.
18175 (queue_stop_reply_callback): Account for running threads.
18176 (gdb_wants_thread_stopped): New.
18177 (gdb_wants_all_threads_stopped): New.
18178 (gdb_reattached_process): New.
18179 (handle_status): Clear the `gdb_detached' flag of all processes.
18180 In all-stop, stop all threads.
18181 (main): Be sure to leave tfind mode. Handle disconnected tracing.
18182 (process_serial_event): If the remote connection breaks, or if an
18183 exit was forced with "monitor exit", force an event loop exit.
18184 Handle disconnected tracing on detach.
18185 (handle_serial_event): Adjust.
18186 (handle_target_event): If GDB isn't connected, forward events back
18187 to the inferior, unless the last process exited, in which case,
18188 exit gdbserver. Adjust interface.
18189
18190 * remote-utils.c (remote_open): Don't block in accept. Instead
18191 register an event loop source on the listen socket file
18192 descriptor. Refactor bits into ...
18193 (listen_desc): ... this new global.
18194 (gdb_connected): ... this new function.
18195 (enable_async_notification): ... this new function.
18196 (handle_accept_event): ... this new function.
18197 (remote_close): Clear remote_desc.
18198
18199 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
18200
18201 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
18202 New fields.
18203 (mourn_inferior): Define.
18204 (target_process_qsupported): Avoid the dangling else problem.
18205 (thread_stopped): Define.
18206 (pause_all): Define.
18207 (target_waitstatus_to_string): Declare.
18208 * target.c (target_waitstatus_to_string): New.
18209
18210 * tracepoint.c (tracing): Make extern.
18211 (disconnected_tracing): New.
18212 (stop_tracing): Make extern. Handle tracing stops due to GDB
18213 disconnecting.
18214 (cmd_qtdisconnected): New.
18215 (cmd_qtstatus): Report disconnected tracing status in trace reply.
18216 (handle_tracepoint_general_set): Handle QTDisconnected.
18217
18218 * event-loop.c (event_handler_func): Change return type to int.
18219 (process_event): Bail out if the event handler wants the event
18220 loop to stop.
18221 (handle_file_event): Ditto.
18222 (start_event_loop): Bail out if the event handler wants the event
18223 loop to stop.
18224
18225 * nto-low.c (nto_target_ops): Adjust.
18226 * spu-low.c (spu_wait): Don't remove the process here.
18227 (spu_target_ops): Adjust.
18228 * win32-low.c (win32_wait): Don't remove the process here.
18229 (win32_target_ops): Adjust.
18230
18231 2010-04-11 Pedro Alves <pedro@codesourcery.com>
18232
18233 * regcache.c (realloc_register_cache): Invalidate inferior's
18234 regcache before recreating it.
18235
18236 2010-04-09 Pedro Alves <pedro@codesourcery.com>
18237
18238 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
18239
18240 2010-04-09 Stan Shebs <stan@codesourcery.com>
18241 Pedro Alves <pedro@codesourcery.com>
18242
18243 * server.h (LONGEST): New.
18244 (struct thread_info) <while_stepping>: New field.
18245 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
18246 Declare.
18247 (initialize_tracepoint, handle_tracepoint_general_set)
18248 (handle_tracepoint_query, tracepoint_finished_step)
18249 (tracepoint_was_hit, release_while_stepping_state_list):
18250 (current_traceframe): Declare.
18251 * server.c (handle_general_set): Handle tracepoint packets.
18252 (read_memory): New.
18253 (write_memory): New.
18254 (handle_search_memory_1): Use read_memory.
18255 (handle_query): Report support for conditional tracepoints, trace
18256 state variables, and tracepoint sources. Handle tracepoint
18257 queries.
18258 (main): Initialize the tracepoints module.
18259 (process_serial_event): Handle traceframe reads/writes.
18260
18261 * linux-low.c (handle_tracepoints): New.
18262 (linux_wait_1): Call it.
18263 (linux_resume_one_lwp): Handle while-stepping.
18264 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
18265 (linux_target_ops): Install them.
18266 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
18267 New field.
18268 * linux-x86-low.c (x86_supports_tracepoints): New.
18269 (the_low_target). Install it.
18270
18271 * mem-break.h (delete_breakpoint): Declare.
18272 * mem-break.c (delete_breakpoint): Make external.
18273
18274 * target.h (struct target_ops): Add `supports_tracepoints',
18275 `read_pc', and `write_pc' fields.
18276 (target_supports_tracepoints): Define.
18277 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
18278 (phex_nz): New.
18279
18280 * regcache.h (struct regcache) <registers_owned>: New field.
18281 (init_register_cache, regcache_cpy): Declare.
18282 (regcache_read_pc, regcache_write_pc): Declare.
18283 (register_cache_size): Declare.
18284 (supply_regblock): Declare.
18285 * regcache.c (init_register_cache): New.
18286 (new_register_cache): Use it.
18287 (regcache_cpy): New.
18288 (register_cache_size): New.
18289 (supply_regblock): New.
18290 (regcache_read_pc, regcache_write_pc): New.
18291
18292 * tracepoint.c: New.
18293
18294 * Makefile.in (OBS): Add tracepoint.o.
18295 (tracepoint.o): New rule.
18296
18297 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
18298
18299 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
18300 (i386-mmx.o): New.
18301 (i386-mmx.c): Likewise.
18302 (i386-mmx-linux.o): Likewise.
18303 (i386-mmx-linux.c): Likewise.
18304
18305 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
18306 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
18307 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
18308 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
18309
18310 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
18311 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
18312 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
18313
18314 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
18315
18316 * Makefile.in (clean): Updated.
18317 (i386-avx.o): New.
18318 (i386-avx.c): Likewise.
18319 (i386-avx-linux.o): Likewise.
18320 (i386-avx-linux.c): Likewise.
18321 (amd64-avx.o): Likewise.
18322 (amd64-avx.c): Likewise.
18323 (amd64-avx-linux.o): Likewise.
18324 (amd64-avx-linux.c): Likewise.
18325
18326 * configure.srv (srv_i386_regobj): Add i386-avx.o.
18327 (srv_i386_linux_regobj): Add i386-avx-linux.o.
18328 (srv_amd64_regobj): Add amd64-avx.o.
18329 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
18330 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
18331 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
18332 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
18333 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
18334 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
18335 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
18336
18337 * i387-fp.c: Include "i386-xstate.h".
18338 (i387_xsave): New.
18339 (i387_cache_to_xsave): Likewise.
18340 (i387_xsave_to_cache): Likewise.
18341 (x86_xcr0): Likewise.
18342
18343 * i387-fp.h (i387_cache_to_xsave): Likewise.
18344 (i387_xsave_to_cache): Likewise.
18345 (x86_xcr0): Likewise.
18346
18347 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
18348 * linux-crisv32-low.c (target_regsets): Likewise.
18349 * linux-m68k-low.c (target_regsets): Likewise.
18350 * linux-mips-low.c (target_regsets): Likewise.
18351 * linux-ppc-low.c (target_regsets): Likewise.
18352 * linux-s390-low.c (target_regsets): Likewise.
18353 * linux-sh-low.c (target_regsets): Likewise.
18354 * linux-sparc-low.c (target_regsets): Likewise.
18355 * linux-xtensa-low.c (target_regsets): Likewise.
18356
18357 * linux-low.c: Include <sys/uio.h>.
18358 (regsets_fetch_inferior_registers): Support nt_type.
18359 (regsets_store_inferior_registers): Likewise.
18360 (linux_process_qsupported): New.
18361 (linux_target_ops): Add linux_process_qsupported.
18362
18363 * linux-low.h (regset_info): Add nt_type.
18364 (linux_target_ops): Add process_qsupported.
18365
18366 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
18367 and <sys/uio.h>.
18368 (init_registers_i386_avx_linux): New.
18369 (init_registers_amd64_avx_linux): Likewise.
18370 (xmltarget_i386_linux_no_xml): Likewise.
18371 (xmltarget_amd64_linux_no_xml): Likewise.
18372 (PTRACE_GETREGSET): Likewise.
18373 (PTRACE_SETREGSET): Likewise.
18374 (x86_fill_xstateregset): Likewise.
18375 (x86_store_xstateregset): Likewise.
18376 (use_xml): Likewise.
18377 (x86_linux_update_xmltarget): Likewise.
18378 (x86_linux_process_qsupported): Likewise.
18379 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
18380 (x86_arch_setup): Don't call init_registers_amd64_linux nor
18381 init_registers_i386_linux here. Call
18382 x86_linux_update_xmltarget.
18383 (the_low_target): Add x86_linux_process_qsupported.
18384
18385 * server.c (handle_query): Call target_process_qsupported.
18386
18387 * target.h (target_ops): Add process_qsupported.
18388 (target_process_qsupported): New.
18389
18390 2010-04-03 Pedro Alves <pedro@codesourcery.com>
18391
18392 * inferiors.c (add_thread): Set last_status kind to
18393 TARGET_WAITKIND_IGNORE.
18394 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
18395 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
18396 (linux_wait_1): Move `thread' local definition to block that uses
18397 it. Don't NULL initialize `event_child'.
18398 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
18399 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
18400 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
18401
18402 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18403
18404 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
18405 an extended waitstatus, or by a watchpoint.
18406 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
18407 thread was stepping or has been stopped by a watchpoint.
18408
18409 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18410
18411 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
18412 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
18413 of another, then delete the previous, and validate all
18414 breakpoints.
18415 (validate_inserted_breakpoint): New.
18416 (delete_disabled_breakpoints): New.
18417 (validate_breakpoints): New.
18418 (check_mem_read): Validate breakpoints before trusting their
18419 shadow. Delete disabled breakpoints.
18420 (check_mem_write): Validate breakpoints before trusting they
18421 should be inserted. Delete disabled breakpoints.
18422 * mem-break.h (validate_breakpoints):
18423 * server.c (handle_query): Validate breakpoints when we see a
18424 qSymbol query.
18425
18426 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18427
18428 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
18429 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
18430 if we could tell there's a GDB breakpoint at stop_pc.
18431 (need_step_over_p): Don't do a step over if we find a GDB
18432 breakpoint at the resume PC.
18433
18434 * mem-break.c (struct raw_breakpoint): New.
18435 (enum bkpt_type): New type `gdb_breakpoint'.
18436 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
18437 fields. New field `raw'.
18438 (find_raw_breakpoint_at): New.
18439 (set_raw_breakpoint_at): Handle refcounting. Create a raw
18440 breakpoint instead.
18441 (set_breakpoint_at): Adjust.
18442 (delete_raw_breakpoint): New.
18443 (release_breakpoint): New.
18444 (delete_breakpoint): Rename to...
18445 (delete_breakpoint_1): ... this. Add proc parameter. Use
18446 release_breakpoint. Return ENOENT.
18447 (delete_breakpoint): Reimplement.
18448 (find_breakpoint_at): Delete.
18449 (find_gdb_breakpoint_at): New.
18450 (delete_breakpoint_at): Delete.
18451 (set_gdb_breakpoint_at): New.
18452 (delete_gdb_breakpoint_at): New.
18453 (gdb_breakpoint_here): New.
18454 (set_reinsert_breakpoint): Use release_breakpoint.
18455 (uninsert_breakpoint): Rename to ...
18456 (uninsert_raw_breakpoint): ... this.
18457 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
18458 (reinsert_raw_breakpoint): Change parameter type to
18459 raw_breakpoint.
18460 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
18461 instead.
18462 (check_breakpoints): Adjust. Use release_breakpoint.
18463 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
18464 (breakpoint_inserted_here): Ditto.
18465 (check_mem_read): Adjust to iterate over raw breakpoints instead.
18466 Don't trust the breakpoint's shadow if it is not inserted.
18467 (check_mem_write): Adjust to iterate over raw breakpoints instead.
18468 (delete_all_breakpoints): Adjust.
18469 (free_all_breakpoints): Mark all breakpoints as uninserted, and
18470 use delete_breakpoint_1.
18471
18472 * mem-break.h (breakpoints_supported): Delete declaration.
18473 (set_gdb_breakpoint_at): Declare.
18474 (gdb_breakpoint_here): Declare.
18475 (delete_breakpoint_at): Delete.
18476 (delete_gdb_breakpoint_at): Declare.
18477
18478 * server.h (struct raw_breakpoint): Forward declare.
18479 (struct process_info): New field `raw_breakpoints'.
18480
18481 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
18482 breakpoints.
18483
18484 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18485
18486 * linux-low.c (status_pending_p_callback): Fix comment.
18487 (linux_wait_for_event_1): Move most of the internal breakpoint
18488 handling from here...
18489 (linux_wait_1): ... to here.
18490 (count_events_callback): New.
18491 (select_singlestep_lwp_callback): New.
18492 (select_event_lwp_callback): New.
18493 (cancel_breakpoints_callback): New.
18494 (select_event_lwp): New.
18495 (linux_wait_1): Simplify internal breakpoint handling. Give equal
18496 priority to all LWPs that have had events that should be reported
18497 to the client. Cancel breakpoints when about to reporting the
18498 event to the client, not while stopping lwps. No longer cancel
18499 finished single-steps here.
18500 (cancel_finished_single_step): Delete.
18501 (cancel_finished_single_steps): Delete.
18502
18503 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18504
18505 * mem-break.c (enum bkpt_type): New.
18506 (struct breakpoint): New field `type'.
18507 (set_breakpoint_at): Change return type to struct breakpoint
18508 pointer. Set type to `other_breakpoint' by default.
18509 (delete_breakpoint): Rewrite, supporting more than one breakpoint
18510 in the breakpoint list.
18511 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
18512 (reinsert_breakpoint): Rename to ...
18513 (reinsert_raw_breakpoint): ... this.
18514 (reinsert_breakpoints_at): Adjust.
18515 * mem-break.h (struct breakpoint): Declare.
18516 (set_breakpoint_at): Change return type to struct breakpoint
18517 pointer.
18518
18519 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18520
18521 * server.c (handle_query): Assign, not compare.
18522
18523 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18524
18525 Teach linux gdbserver to step-over-breakpoints.
18526
18527 * linux-low.c (can_hardware_single_step): New.
18528 (supports_breakpoints): New.
18529 (handle_extended_wait): If stopping threads, read the stop pc of
18530 the new cloned LWP.
18531 (get_pc): New.
18532 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
18533 low target doesn't support retrieving the PC.
18534 (add_lwp): Set last_resume_kind to resume_continue.
18535 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
18536 (linux_attach): Don't clear stop_expected. Set the lwp's
18537 last_resume_kind to resume_stop.
18538 (linux_detach_one_lwp): Don't check for removed breakpoints.
18539 (check_removed_breakpoint): Delete.
18540 (status_pending_p): Rename to ...
18541 (status_pending_p_callback): ... this. Don't check for removed
18542 breakpoints. Don't consider threads that are stopped from GDB's
18543 perspective.
18544 (linux_wait_for_lwp): Always read the stop_pc here.
18545 (cancel_breakpoint): New.
18546 (step_over_bkpt): New global.
18547 (linux_wait_for_event_1): Implement stepping over breakpoints.
18548 (gdb_wants_lwp_stopped): New.
18549 (gdb_wants_all_stopped): New.
18550 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
18551 single-step traps here. Store the thread's last reported target
18552 wait status.
18553 (send_sigstop): Don't clear stop_expected. Always set it,
18554 instead.
18555 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
18556 (cancel_finished_single_step): New.
18557 (cancel_finished_single_steps): New.
18558 (wait_for_sigstop): Don't cancel finished single-step traps here.
18559 (linux_resume_one_lwp): Don't check for removed breakpoints.
18560 Don't set `step' on non-hardware step archs.
18561 (linux_set_resume_request): Ignore resume_stop requests if already
18562 stopping or stopped. Set the lwp's last_resume_kind.
18563 (resume_status_pending_p): Don't check for removed breakpoints.
18564 (need_step_over_p): New.
18565 (start_step_over): New.
18566 (finish_step_over): New.
18567 (linux_resume_one_thread): Always queue a sigstop for resume_stop
18568 requests. Clear the thread's last reported target waitstatus.
18569 Don't use the `suspended' flag. Don't consider pending breakpoints.
18570 (linux_resume): Start a step-over if necessary.
18571 (proceed_one_lwp): New.
18572 (proceed_all_lwps): New.
18573 (unstop_all_lwps): New.
18574 * linux-low.h (struct lwp_info): Rewrite comment for the
18575 `suspended' flag. Add the `stop_pc' field. Delete the
18576 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
18577 Add `'last_resume_kind' and `need_step_over' fields.
18578 * inferiors.c (struct thread_info): Delete, moved elsewhere.
18579 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
18580 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
18581 (set_raw_breakpoint_at): New.
18582 (set_breakpoint_at): Rewrite to use it.
18583 (reinsert_breakpoint_handler): Delete.
18584 (set_reinsert_breakpoint): New.
18585 (reinsert_breakpoint_by_bp): Delete.
18586 (delete_reinsert_breakpoints): New.
18587 (uninsert_breakpoint): Rewrite.
18588 (uninsert_breakpoints_at): New.
18589 (reinsert_breakpoint): Rewrite.
18590 (reinsert_breakpoints_at): New.
18591 (check_breakpoints): Rewrite.
18592 (breakpoint_here): New.
18593 (breakpoint_inserted_here): New.
18594 (check_mem_read): Adjust.
18595 * mem-break.h (breakpoints_supported, breakpoint_here)
18596 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
18597 (reinsert_breakpoint_by_bp): Delete declaration.
18598 (delete_reinsert_breakpoints): Declare.
18599 (reinsert_breakpoint): Delete declaration.
18600 (reinsert_breakpoints_at): Declare.
18601 (uninsert_breakpoint): Delete declaration.
18602 (uninsert_breakpoints_at): Declare.
18603 (check_breakpoints): Adjust prototype.
18604 * server.h: Adjust include order.
18605 (struct thread_info): Declare here. Add a `last_status' field.
18606
18607 2010-03-23 Michael Snyder <msnyder@vmware.com>
18608
18609 * server.c (crc32): New function.
18610 (handle_query): Add handling for 'qCRC:' request.
18611
18612 2010-03-23 Pedro Alves <pedro@codesourcery.com>
18613
18614 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
18615 lwp had been stopped by a watchpoint.
18616
18617 2010-03-16 Pedro Alves <pedro@codesourcery.com>
18618
18619 * server.h (internal_error): Declare.
18620 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
18621 * utils.c (internal_error): New function.
18622
18623 2010-03-15 Andreas Schwab <schwab@redhat.com>
18624
18625 * configure.srv: Fix typo setting srv_regobj.
18626
18627 2010-03-15 Pedro Alves <pedro@codesourcery.com>
18628
18629 * linux-low.c (fetch_register): Avoid passing a non string literal
18630 format to `error'.
18631 (usr_store_inferior_registers): Ditto.
18632
18633 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18634
18635 * linux-low.c (linux_write_memory): Bail out early if peeking
18636 memory failed.
18637
18638 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18639
18640 * linux-low.h (struct lwp_info): New fields
18641 `stopped_by_watchpoint' and `stopped_data_address'.
18642 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
18643 here, and cache them in the lwp object.
18644 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
18645 directly.
18646 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
18647 field.
18648 (linux_stopped_by_watchpoint): Rewrite.
18649 (linux_stopped_data_address): Rewrite.
18650
18651 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
18652
18653 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
18654 switching the current inferior, not before.
18655
18656 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
18657
18658 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
18659 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
18660 i386-linux.c and amd64-linux.c.
18661 (reg-i386.o): Removed.
18662 (reg-i386.c): Likewise.
18663 (reg-i386-linux.o): Likewise.
18664 (reg-i386-linux.c): Likewise.
18665 (reg-x86-64.o): Likewise.
18666 (reg-x86-64.c): Likewise.
18667 (reg-x86-64-linux.o): Likewise.
18668 (reg-x86-64-linux.c): Likewise.
18669 (i386.o): New.
18670 (i386.c): Likewise.
18671 (i386-linux.o): Likewise.
18672 (i386-linux.c): Likewise.
18673 (amd64.o): Likewise.
18674 (amd64.c): Likewise.
18675 (amd64-linux.o): Likewise.
18676 (amd64-linux.c): Likewise.
18677
18678 * configure.srv (srv_i386_regobj): New.
18679 (srv_i386_linux_regobj): Likewise.
18680 (srv_amd64_regobj): Likewise.
18681 (srv_amd64_linux_regobj): Likewise.
18682 (srv_i386_32bit_xmlfiles): Likewise.
18683 (srv_i386_64bit_xmlfiles): Likewise.
18684 (srv_i386_xmlfiles): Likewise.
18685 (srv_amd64_xmlfiles): Likewise.
18686 (srv_i386_linux_xmlfiles): Likewise.
18687 (srv_amd64_linux_xmlfiles): Likewise.
18688 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
18689 srv_xmlfiles to $srv_i386_xmlfiles.
18690 (i[34567]86-*-mingw32ce*): Likewise.
18691 (i[34567]86-*-mingw*): Likewise.
18692 (i[34567]86-*-nto*): Likewise.
18693 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
18694 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
18695 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
18696 (x86_64-*-linux*): Likewise.
18697
18698 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
18699 (init_registers_amd64_linux): New.
18700 (x86_arch_setup): Replace init_registers_x86_64_linux with
18701 init_registers_amd64_linux.
18702
18703 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
18704
18705 * configure.ac: Check for libdl. If it is not available link against
18706 static libthread_db.
18707 * configure: Regenerate.
18708
18709 2010-02-22 Pedro Alves <pedro@codesourcery.com>
18710
18711 PR9605
18712
18713 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
18714 handing a read watchpoint.
18715 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
18716
18717 2010-02-12 Doug Evans <dje@google.com>
18718
18719 * linux-low.c (linux_supports_tracefork_flag): Document.
18720 (linux_look_up_symbols): Add comment.
18721
18722 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
18723
18724 * regcache.c (supply_register): Clear regcache if buf is NULL.
18725
18726 2010-02-02 Nicolas Roche <roche@sourceware.org>
18727 Joel Brobecker <brobecker@adacore.com>
18728
18729 * inferiors.c (find_inferior): Add function documentation.
18730 (unloaded_dll): Handle the case where the unloaded dll has not
18731 been previously registered in the dll list.
18732
18733 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18734
18735 * linux-arm-low.c (thumb_breakpoint_len): Delete.
18736 (thumb2_breakpoint): New.
18737 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
18738
18739 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18740
18741 * linux-low.c (get_stop_pc): Check for SIGTRAP.
18742 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
18743 breakpoints.
18744
18745 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18746
18747 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
18748
18749 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
18750
18751 * linux-s390-low.c (s390_collect_ptrace_register)
18752 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
18753
18754 2010-01-21 Doug Evans <dje@google.com>
18755
18756 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
18757 (PTRACE_ARG4_TYPE): New macro.
18758 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
18759 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
18760 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
18761 (usr_store_inferior_registers): Ditto.
18762 (linux_read_memory, linux_write_memory): Ditto.
18763 (linux_test_for_tracefork): Ditto.
18764
18765 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
18766 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
18767
18768 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18769
18770 * proc-service.c (ps_lgetregs): Don't refetch registers from the
18771 target.
18772
18773 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18774
18775 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
18776 prototype to take a regcache. Adjust.
18777
18778 2010-01-20 Pedro Alves <pedro@codesourcery.com>
18779
18780 * regcache.h (struct thread_info): Forward declare.
18781 (struct regcache): New.
18782 (new_register_cache): Adjust prototype.
18783 (get_thread_regcache): Declare.
18784 (free_register_cache): Adjust prototype.
18785 (registers_to_string, registers_from_string): Ditto.
18786 (supply_register, supply_register_by_name, collect_register)
18787 (collect_register_as_string, collect_register_by_name): Ditto.
18788 * regcache.c (struct inferior_regcache_data): Delete.
18789 (get_regcache): Rename to ...
18790 (get_thread_regcache): ... this. Adjust. Switch inferior before
18791 fetching registers.
18792 (regcache_invalidate_one): Adjust.
18793 (regcache_invalidate): Fix prototype.
18794 (new_register_cache): Return the new register cache.
18795 (free_register_cache): Change prototype.
18796 (realloc_register_cache): Adjust.
18797 (registers_to_string): Change prototype to take a regcache. Adjust.
18798 (registers_from_string): Ditto.
18799 (register_data): Ditto.
18800 (supply_register): Ditto.
18801 (supply_register_by_name): Ditto.
18802 (collect_register): Ditto.
18803 (collect_register_as_string): Ditto.
18804 (collect_register_by_name): Ditto.
18805 * server.c (process_serial_event): Adjust.
18806 * linux-low.h (regset_fill_func, regset_store_func): Change
18807 prototype.
18808 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
18809 Change prototype.
18810 * linux-low.c (get_stop_pc): Adjust.
18811 (check_removed_breakpoint): Adjust.
18812 (linux_wait_for_event): Adjust.
18813 (linux_resume_one_lwp): Adjust.
18814 (fetch_register): Add regcache parameter. Adjust.
18815 (usr_store_inferior_registers): Ditto.
18816 (regsets_fetch_inferior_registers): Ditto.
18817 (regsets_store_inferior_registers): Ditto.
18818 (linux_fetch_registers, linux_store_registers): Ditto.
18819 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
18820 regcache. Adjust.
18821 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
18822 Ditto.
18823 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
18824 prototype to take a regcache.
18825 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
18826 * remote-utils.c (convert_ascii_to_int, outreg)
18827 (prepare_resume_reply): Change prototype to take a regcache.
18828 Adjust.
18829 * target.h (struct target_ops) <fetch_registers, store_registers>:
18830 Change prototype to take a regcache.
18831 (fetch_inferior_registers, store_inferior_registers): Change
18832 prototype to take a regcache. Adjust.
18833 * proc-service.c (ps_lgetregs): Adjust.
18834 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
18835 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
18836 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
18837 take a regcache. Adjust.
18838 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
18839 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
18840 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
18841 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
18842 * linux-cris-low.c (cris_get_pc, cris_set_pc)
18843 (cris_cannot_fetch_register):
18844 (cris_breakpoint_at): Change prototype to take a regcache.
18845 Adjust.
18846 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
18847 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
18848 to take a regcache. Adjust.
18849 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
18850 Adjust.
18851 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
18852 take a regcache. Adjust.
18853 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
18854 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
18855 (m68k_set_pc): Change prototype to take a regcache. Adjust.
18856 * linux-mips-low.c (mips_get_pc):
18857 (mips_set_pc): Change prototype to take a regcache. Adjust.
18858 (mips_reinsert_addr): Adjust.
18859 (mips_collect_register): Change prototype to take a regcache.
18860 Adjust.
18861 (mips_supply_register):
18862 (mips_collect_register_32bit, mips_supply_register_32bit)
18863 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18864 (mips_store_fpregset): Ditto.
18865 * linux-ppc-low.c (ppc_supply_ptrace_register)
18866 (ppc_supply_ptrace_register): Ditto.
18867 (parse_spufs_run): Adjust.
18868 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
18869 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
18870 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
18871 take a regcache. Adjust.
18872 * linux-s390-low.c (s390_collect_ptrace_register)
18873 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
18874 (s390_set_pc): Change prototype to take a regcache. Adjust.
18875 (s390_arch_setup): Adjust.
18876 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
18877 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
18878 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
18879 (sparc_fill_gregset, sparc_store_gregset_from_stack)
18880 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
18881 regcache. Adjust.
18882 (sparc_breakpoint_at): Adjust.
18883 * linux-xtensa-low.c (xtensa_fill_gregset):
18884 (xtensa_store_gregset):
18885 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
18886 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
18887 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
18888 prototype to take a regcache. Adjust.
18889 * win32-arm-low.c (arm_fetch_inferior_register)
18890 (arm_store_inferior_register): Change prototype to take a
18891 regcache. Adjust.
18892 * win32-i386-low.c (i386_fetch_inferior_register)
18893 (i386_store_inferior_register): Change prototype to take a
18894 regcache. Adjust.
18895 * win32-low.c (child_fetch_inferior_registers)
18896 (child_store_inferior_registers): Change prototype to take a
18897 regcache. Adjust.
18898 (win32_wait): Adjust.
18899 (win32_fetch_inferior_registers): Change prototype to take a
18900 regcache. Adjust.
18901 (win32_store_inferior_registers): Adjust.
18902 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
18903 store_inferior_register>: Change prototype to take a regcache.
18904
18905 2010-01-20 Doug Evans <dje@google.com>
18906
18907 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
18908 #ifdef.
18909 (linux_wait_for_event1, linux_init_signals): Ditto.
18910 (W_STOPCODE): Provide definition if missing.
18911
18912 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
18913
18914 * linux-low.c (linux_core_of_thread): New.
18915 (compare_ints, show_process, list_threads): New.
18916 (linux_qxfer_osdata): Report threads and cores.
18917 (linux_target_op): Register linux_core_of_thread.
18918 * remote-utils.c (prepare_resume_reply): Report the core.
18919 (buffer_xml_printf): Support %d specifier.
18920 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
18921 New.
18922 (handle_query): Handle qXfer:threads. Announce availability
18923 thereof.
18924 * target.h (struct target_ops): New field core_of_thread.
18925
18926 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
18927
18928 * Makefile.in (clean): Remove new generated files.
18929 (reg-s390.o, reg-s390.c): Remove rules.
18930 (reg-s390x.o, reg-s390x.c): Likewise.
18931 (s390-linux32.o, s390-linux32.c): Add rules.
18932 (s390-linux64.o, s390-linux64.c): Likewise.
18933 (s390x-linux64.o, s390x-linux64.c): Likewise.
18934 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
18935 * linux-s390-low.c: Include <elf.h>.
18936 (HWCAP_S390_HIGH_GPRS): Define if undefined.
18937 (init_registers_s390): Remove prototype.
18938 (init_registers_s390x): Likewise.
18939 (init_registers_s390_linux32): Add prototype.
18940 (init_registers_s390_linux64): Likewise.
18941 (init_registers_s390x_linux64): Likewise.
18942 (s390_num_regs_3264): New define.
18943 (s390_regmap_3264): New global variable.
18944 (s390_cannot_fetch_register): Remove obsolete check.
18945 (s390_cannot_store_register): Likewise.
18946 (s390_collect_ptrace_register): Handle upper/lower register halves.
18947 (s390_supply_ptrace_register): Likewise.
18948 (s390_fill_gregset): Update to register number changes.
18949 (s390_get_hwcap): New routine.
18950 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
18951 Install appropriate regmap and register set.
18952
18953 2010-01-01 Joel Brobecker <brobecker@adacore.com>
18954
18955 * server.c (gdbserver_version): Update copyright year to 2010.
18956 * gdbreplay.c (gdbreplay_version): Likewise.
18957
18958 2009-12-28 Doug Evans <dje@google.com>
18959
18960 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
18961 elf/external.h. Include <elf.h> instead but only if necessary.
18962
18963 2009-12-28 Pedro Alves <pedro@codesourcery.com>
18964
18965 * linux-low.c (linux_remove_process): Remove `detaching'
18966 parameter. Don't release/detach from thread_db here.
18967 (linux_kill): Release/detach from thread_db here, ...
18968 (linux_detach): ... and here, before actually detaching.
18969 (linux_wait_1): ... and here, when a process exits.
18970 * thread-db.c (any_thread_of): New.
18971 (thread_db_free): Switch the current inferior to a thread of the
18972 passed in process.
18973
18974 2009-12-21 Doug Evans <dje@google.com>
18975
18976 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
18977
18978 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
18979 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
18980 warning ifndef __NR_tkill. Move setting of errno there too.
18981 Delete unnecessary resetting of errno after syscall.
18982 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
18983
18984 * configure.ac: Check for dladdr.
18985 * config.in: Regenerate.
18986 * configure: Regenerate.
18987 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
18988 (try_thread_db_load): Update.
18989
18990 * linux-low.c (my_waitpid): Delete unnecessary prototype.
18991
18992 2009-12-18 Doug Evans <dje@google.com>
18993
18994 * event-loop.c: Include unistd.h if it exists.
18995
18996 * linux-low.c (my_waitpid): Move definition away from being in
18997 between linux_tracefork_child/linux_test_for_tracefork.
18998
18999 * gdb_proc_service.h (psaddr_t): Fix type.
19000 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
19001 signature to match glibc.
19002
19003 2009-12-16 Doug Evans <dje@google.com>
19004
19005 * linux-low.c (linux_read_memory): Fix argument to read.
19006
19007 2009-11-26 Pedro Alves <pedro@codesourcery.com>
19008
19009 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
19010 events, don't leave current_inferior pointing at null.
19011
19012 2009-11-26 Pedro Alves <pedro@codesourcery.com>
19013
19014 * win32-low.c (LOG): Delete.
19015 (OUTMSG): Output to stderr.
19016 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
19017 on compile time LOG macro.
19018 (win32_wait): Fix debug output.
19019
19020 2009-11-26 Pedro Alves <pedro@codesourcery.com>
19021
19022 * win32-low.c (win32_add_one_solib): If the dll name is
19023 "ntdll.dll", prepend the system directory to the dll path.
19024
19025 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
19026
19027 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
19028
19029 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
19030 Vladimir Prus <vladimir@codesourcery.com>
19031
19032 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
19033 * configure.ac: Check for __mcoldfire__ and set
19034 gdb_cv_m68k_is_coldfire.
19035 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
19036 reg-cf.o and reg-m68k.o.
19037 * configure: Regenerated.
19038
19039 2009-11-16 Pedro Alves <pedro@codesourcery.com>
19040
19041 * linux-low.c (linux_remove_process): Add `detaching' parameter.
19042 Pass it to thread_db_free.
19043 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
19044 proper `detaching' argument to linux_remove_process.
19045 * linux-low.h (thread_db_free): Add `detaching' parameter.
19046 * thread-db.c (thread_db_init): Pass false as `detaching' argument
19047 to thread_db_free.
19048 (thread_db_free): Add `detaching' parameter. Only
19049 call td_ta_clear_event if detaching from process.
19050
19051 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
19052
19053 * thread-db.c (thread_db_free): Fix typo.
19054
19055 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
19056
19057 PR gdb/10838
19058 * thread-db.c (thread_db_free): Call td_ta_clear_event.
19059
19060 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
19061
19062 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
19063 with an i686 compiler.
19064 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
19065 needed.
19066 * configure: Rebuilt.
19067
19068 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
19069
19070 PR gdb/10783
19071
19072 * server.c (handle_search_memory_1): Correct read_addr initialization
19073 in loop for searching subsequent chunks.
19074
19075 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
19076
19077 * configure.ac: New --with-libthread-db option.
19078 * thread-db.c: Allow direct dependence on libthread_db.
19079 (thread_db_free): Adjust.
19080 * config.in: Regenerate.
19081 * configure: Likewise.
19082
19083 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
19084
19085 PR gdb/10757
19086 * thread-db.c (attach_thread): New function.
19087 (maybe_attach_thread): Return success/failure.
19088 (find_new_threads_callback): Adjust.
19089 (thread_db_find_new_threads): Loop until no new threads.
19090
19091 2009-10-13 Pedro Alves <pedro@codesourcery.com>
19092
19093 * proc-service.c (ps_lgetregs): Formatting.
19094
19095 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
19096
19097 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
19098 * configure.ac: Adjust.
19099 * linux-low.h (struct process_info_private): Move members to struct
19100 thread_db.
19101 (thread_db_free, thread_db_handle_monitor_command): New prototype.
19102 * linux-low.c (linux_remove_process): Adjust.
19103 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
19104 * server.c (handle_query): Move code ...
19105 (handle_monitor_command): ... here. New function.
19106 * target.h (struct target_ops): New member.
19107 * thread-db.c (struct thread_db): New.
19108 (libthread_db_search_path): New variable.
19109 (thread_db_create_event, thread_db_enable_reporting)
19110 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
19111 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
19112 (try_thread_db_load_1, dladdr_to_soname): New functions.
19113 (try_thread_db_load, thread_db_load_search): New functions.
19114 (thread_db_init): Search for libthread_db.
19115 (thread_db_free): New function.
19116 (thread_db_handle_monitor_command): Likewise.
19117 * config.in: Regenerate.
19118 * configure: Regenerate.
19119
19120 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
19121
19122 * spu-low.c (spu_kill): Wait for inferior to terminate.
19123 Call clear_inferiors.
19124 (spu_detach): Call clear_inferiors.
19125
19126 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19127
19128 * aclocal.m4: Regenerate.
19129 * config.in: Likewise.
19130 * configure: Likewise.
19131
19132 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
19133
19134 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
19135 (parse_spufs_run): New function.
19136 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
19137 (ppc_breakpoint_at): Handle SPU breakpoints.
19138
19139 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
19140
19141 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
19142 (SPUFS_MAGIC): Define.
19143 (spu_enumerate_spu_ids): New function.
19144 (linux_qxfer_spu): New function.
19145 (linux_target_ops): Install linux_qxfer_spu.
19146
19147 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
19148
19149 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
19150 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
19151 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
19152 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
19153 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
19154 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
19155 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
19156 (init_registers_powerpc_cell32l): Add prototype.
19157 (init_registers_powerpc_cell64l): Likewise.
19158 (ppc_arch_setup): Detect Cell/B.E. architecture.
19159
19160 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19161
19162 * Makefile.in (datarootdir): New variable.
19163
19164 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
19165
19166 * linux-low.c (linux_write_memory): Update debugging output.
19167 * Makefile.in (clean): Add new descriptions.
19168 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
19169 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
19170 * configure.srv: Add new files for arm*-*-linux*.
19171 * linux-arm-low.c: Add new declarations.
19172 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
19173 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
19174 (HWCAP_VFPv3D16): New.
19175 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
19176 instead of __IWMMXT__.
19177 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
19178 (arm_arch_setup): New.
19179 (target_regsets): Remove #ifdef. Add VFP regset.
19180 (the_low_target): Use arm_arch_setup.
19181
19182 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
19183
19184 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
19185 the main thread again.
19186
19187 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
19188
19189 Adding Neutrino gdbserver.
19190 * configure: Regenerated.
19191 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
19192 * configure.srv (i[34567]86-*-nto*): New target.
19193 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
19194 * remote-utils.c [__QNX__]: Include sys/iomgr.h
19195 (nto_comctrl) [__QNX__]: New function.
19196 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
19197
19198 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
19199
19200 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
19201 srv_tgtobj.
19202
19203 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
19204 Pedro Alves <pedro@codesourcery.com>
19205
19206 * win32-i386-low.c (i386_get_thread_context): Handle systems that
19207 don't support CONTEXT_EXTENDED_REGISTERS.
19208 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
19209 (the_low_target): Install them.
19210 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
19211 failing with ERROR_PIPE_NOT_CONNECTED.
19212
19213 2009-06-30 Doug Evans <dje@google.com>
19214 Pierre Muller <muller@ics.u-strasbg.fr>
19215
19216 Add h/w watchpoint support to x86-linux, win32-i386.
19217 * Makefile.in (SFILES): Add i386-low.c
19218 (i386_low_h): Define.
19219 (i386-low.o): Add dependencies.
19220 (linux-x86-low.o): Add i386-low.h dependency.
19221 (win32-i386-low.o): Ditto.
19222 * i386-low.c: New file.
19223 * i386-low.h: New file.
19224 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
19225 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
19226 * linux-low.c (linux_add_process): Initialize arch_private.
19227 (linux_remove_process): Free arch_private.
19228 (add_lwp): Initialize arch_private.
19229 (delete_lwp): Free arch_private.
19230 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
19231 provided.
19232 * linux-low.h (process_info_private): New member arch_private.
19233 (lwp_info): New member arch_private.
19234 (linux_target_ops): New members new_process, new_thread,
19235 prepare_to_resume.
19236 (ptid_of): New macro.
19237 * linux-x86-low.c: Include stddef.h, i386-low.h.
19238 (arch_process_info): New struct.
19239 (arch_lwp_info): New struct.
19240 (x86_linux_dr_get, x86_linux_dr_set): New functions.
19241 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
19242 (i386_dr_low_get_status): New function.
19243 (x86_insert_point, x86_remove_point): New functions.
19244 (x86_stopped_by_watchpoint): New function.
19245 (x86_stopped_data_address): New function.
19246 (x86_linux_new_process, x86_linux_new_thread): New functions.
19247 (x86_linux_prepare_to_resume): New function.
19248 (the_low_target): Add entries for insert_point, remove_point,
19249 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
19250 prepare_to_resume.
19251 * server.c (debug_hw_points): New global.
19252 (monitor_show_help): Document set debug-hw-points.
19253 (handle_query): Process "set debug-hw-points".
19254 * server.h (debug_hw_points): Declare.
19255 (paddress): Declare.
19256 * utils.c (NUMCELLS, CELLSIZE): New macros.
19257 (get_sell, xsnprintf, paddress): New functions.
19258 * win32-arm-low.c (the_low_target): Add entries for insert_point,
19259 remove_point, stopped_by_watchpoint, stopped_data_address.
19260 * win32-i386-low.c: Include i386-low.h.
19261 (debug_reg_state): Replaces dr.
19262 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
19263 (i386_dr_low_get_status): New function.
19264 (i386_insert_point, i386_remove_point): New functions.
19265 (i386_stopped_by_watchpoint): New function.
19266 (i386_stopped_data_address): New function.
19267 (i386_initial_stuff): Update.
19268 (get_thread_context,set_thread_context,i386_thread_added): Update.
19269 (the_low_target): Add entries for insert_point,
19270 remove_point, stopped_by_watchpoint, stopped_data_address.
19271 * win32-low.c (win32_insert_watchpoint): New function.
19272 (win32_remove_watchpoint): New function.
19273 (win32_stopped_by_watchpoint): New function.
19274 (win32_stopped_data_address): New function.
19275 (win32_target_ops): Add entries for insert_watchpoint,
19276 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
19277 * win32-low.h (win32_target_ops): New members insert_point,
19278 remove_point, stopped_by_watchpoint, stopped_data_address.
19279
19280 2009-06-25 Pedro Alves <pedro@codesourcery.com>
19281
19282 * server.c (process_serial_event): Re-return unsupported, not
19283 error, if the type isn't recognized. Re-allow supporting only
19284 insert or remove packets. Also call require_running for
19285 breakpoints. Add missing break statement to default case. Tidy.
19286 * target.h (struct target_ops): Rename insert_watchpoint to
19287 insert_point, and remove_watchpoint to remove_point.
19288
19289 * linux-low.h (struct linux_target_ops): Likewise.
19290 * linux-low.c (linux_insert_watchpoint): Rename to ...
19291 (linux_insert_point): ... this. Adjust.
19292 (linux_remove_watchpoint): Rename to ...
19293 (linux_remove_point): ... this. Adjust.
19294 (linux_target_ops): Adjust.
19295 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
19296 (cris_insert_point): ... this.
19297 (cris_remove_watchpoint): Rename to ...
19298 (cris_remove_point): ... this.
19299 (the_low_target): Adjust.
19300
19301 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
19302
19303 * server.c (handle_v_kill): Pass signal_pid to
19304 kill_inferior if multi_process is zero.
19305
19306 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
19307
19308 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
19309 * target.h (target_ops): Comment for *_watchpoint to make it clear
19310 the functions can get types '0' and '1'.
19311
19312 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
19313
19314 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
19315 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
19316 * regcache.c (get_regcache): Likewise.
19317 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
19318 * win32-low.c (child_fetch_inferior_registers): Remove check for
19319 regno 0.
19320
19321 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
19322 Pedro Alves <pedro@codesourcery.com>
19323
19324 * target.h (struct target_ops) <supports_multi_process>: New
19325 callback.
19326 (target_supports_multi_process): New.
19327 * server.c (handle_query): Even if GDB reports support, only
19328 enable multi-process if the target also supports it. Report
19329 multi-process support only if the target backend supports it.
19330 * linux-low.c (linux_supports_multi_process): New function.
19331 (linux_target_ops): Install it as target_supports_multi_process
19332 callback.
19333
19334 2009-05-24 Doug Evans <dje@google.com>
19335
19336 Global renaming of find_thread_pid to find_thread_ptid.
19337 * server.h (find_thread_ptid): Renamed from find_thread_pid.
19338 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
19339 All callers updated.
19340
19341 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
19342 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
19343 directly.
19344
19345 * linux-low.c (get_stop_pc): Print pc if debug_threads.
19346 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
19347 (linux_resume_one_lwp): Ditto.
19348
19349 2009-05-23 Doug Evans <dje@google.com>
19350
19351 * linux-low.c (linux_resume_one_lwp): Change type of first arg
19352 from struct inferior_list_entry * to struct lwp_info *.
19353 All callers updated.
19354
19355 2009-05-13 Doug Evans <dje@google.com>
19356
19357 * linux-x86-low.c: Don't include assert.h.
19358 (x86_siginfo_fixup): Use fatal, not assert.
19359 (x86_arch_setup): Fix comment.
19360
19361 2009-05-12 Doug Evans <dje@google.com>
19362
19363 Biarch support for i386/amd64 gdbserver.
19364 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
19365 Add linux-x86-low.c.
19366 (linux-i386-low.o, linux-x86-64-low.o): Delete.
19367 (linux-x86-low.o): Add.
19368 * linux-x86-64-low.c: Delete.
19369 * linux-i386-low.c: Delete.
19370 * linux-x86-low.c: New file.
19371 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
19372 linux-x86-low.o.
19373 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
19374 linux-x86-low.o.
19375 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
19376 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
19377 (linux_child_pid_to_exec_file): New function.
19378 (elf_64_header_p, elf_64_file_p): New functions.
19379 (siginfo_fixup): New function.
19380 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
19381 give target a chance to convert layout.
19382 * linux-low.h (linux_target_ops): New member siginfo_fixup.
19383 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
19384
19385 2009-05-07 Doug Evans <dje@google.com>
19386
19387 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
19388 (regsets_store_inferior_registers): Ditto.
19389
19390 2009-05-06 Pedro Alves <pedro@codesourcery.com>
19391
19392 PR server/10048
19393
19394 * linux-low.c (must_set_ptrace_flags): Delete.
19395 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
19396 of the global.
19397 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
19398 `lwp->must_set_ptrace_flags' instead.
19399 (linux_wait_for_event_1): Set ptrace options here.
19400 (linux_wait_1): ... not here.
19401
19402 2009-04-30 Doug Evans <dje@google.com>
19403
19404 * inferiors.c (started_inferior_callback): New function.
19405 (attached_inferior_callback): New function.
19406 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
19407 * server.c (print_started_pid, print_attached_pid): New functions.
19408 (detach_or_kill_for_exit): New function.
19409 (main): Call it instead of for_each_inferior (kill_inferior_callback).
19410 * server.h (have_started_inferiors_p): Declare.
19411 (have_attached_inferiors_p): Declare.
19412
19413 * inferiors.c (remove_process): Fix memory leak, free process.
19414 * linux-low.c (linux_remove_process): New function.
19415 (linux_kill): Call it instead of remove_process.
19416 (linux_detach, linux_wait_1): Ditto.
19417
19418 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
19419
19420 * configure.srv: Add x86 Windows CE target.
19421
19422 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
19423
19424 * inferiors.c (get_thread_process): Make global.
19425 * server.h (get_thread_process): Add prototype.
19426 * thread-db.c (find_one_thread): Use get_thread_process
19427 instead of current_process.
19428 (thread_db_get_tls_address): Do not crash if called when
19429 thread layer is not yet initialized.
19430
19431 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
19432
19433 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
19434 * spu-low.c (current_tid): Rename to ...
19435 (current_ptid): ... this.
19436 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
19437 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
19438 ptid_get_lwp (current_ptid) instead of current_tid.
19439 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
19440 instead of current_tid. Use find_process_pid to verify pid
19441 argument is valid. Pass proper argument to remove_process.
19442 (spu_thread_alive): Compare current_ptid instead of current_tid.
19443 (spu_resume): Likewise.
19444
19445 2009-04-02 Pedro Alves <pedro@codesourcery.com>
19446
19447 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
19448 variable.
19449
19450 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19451
19452 Implement the multiprocess extensions, and add linux multiprocess
19453 support.
19454
19455 * server.h (ULONGEST): Declare.
19456 (struct ptid, ptid_t): New.
19457 (minus_one_ptid, null_ptid): Declare.
19458 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
19459 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
19460 (struct inferior_list_entry): Change `id' type from unsigned from
19461 to ptid_t.
19462 (struct sym_cache, struct breakpoint, struct
19463 process_info_private): Forward declare.
19464 (struct process_info): Declare.
19465 (current_process): Declare.
19466 (all_processes): Declare.
19467 (initialize_inferiors): Declare.
19468 (add_thread): Adjust to use ptid_t.
19469 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
19470 (add_process, remove_process, find_thread_pid): Declare.
19471 (find_inferior_id): Adjust to use ptid_t.
19472 (cont_thread, general_thread, step_thread): Change type to ptid_t.
19473 (multi_process): Declare.
19474 (push_event): Adjust to use ptid_t.
19475 (read_ptid, write_ptid): Declare.
19476 (prepare_resume_reply): Adjust to use ptid_t.
19477 (clear_symbol_cache): Declare.
19478 * inferiors.c (all_processes): New.
19479 (null_ptid, minus_one_ptid): New.
19480 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
19481 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
19482 (add_thread): Change unsigned long to ptid. Remove gdb_id
19483 parameter. Adjust.
19484 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
19485 (gdb_id_to_thread): Rename to ...
19486 (find_thread_pid): ... this. Change unsigned long to ptid.
19487 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
19488 (loaded_dll, pull_pid_from_list): Adjust.
19489 (add_process, remove_process, find_process_pid)
19490 (get_thread_process, current_process, initialize_inferiors): New.
19491 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
19492 (struct target_waitstatus) <related_pid>: Ditto.
19493 (struct target_ops) <kill, detach>: Add `pid' argument. Change
19494 return type to int.
19495 (struct target_ops) <join>: Add `pid' argument.
19496 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
19497 (struct target_ops) <wait>: Add `ptid' field. Change return type
19498 to ptid.
19499 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
19500 (mywait): Add `ptid' argument. Change return type to ptid_t.
19501 (target_pid_to_str): Declare.
19502 * target.c (set_desired_inferior): Adjust to use ptids.
19503 (mywait): Add new `ptid' argument. Adjust.
19504 (target_pid_to_str): New.
19505 * mem-break.h (free_all_breakpoints): Declare.
19506 * mem-break.c (breakpoints): Delelete.
19507 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
19508 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
19509 to use per-process breakpoint list.
19510 (free_all_breakpoints): New.
19511 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
19512 (symbol_cache, all_symbols_looked_up): Delete.
19513 (hexchars): New.
19514 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
19515 read_ptid): New.
19516 (prepare_resume_reply): Change ptid argument's type from unsigned
19517 long to ptid_t. Adjust. Implement W;process and X;process.
19518 (free_sym_cache, clear_symbol_cache): New.
19519 (look_up_one_symbol): Adjust to per-process symbol cache. *
19520 * server.c (cont_thread, general_thread, step_thread): Change type
19521 to ptid_t.
19522 (attached): Delete.
19523 (multi_process): New.
19524 (last_ptid): Change type to ptid_t.
19525 (struct vstop_notif) <ptid>: Change type to ptid_t.
19526 (queue_stop_reply, push_event): Change `ptid' argument's type to
19527 ptid_t.
19528 (discard_queued_stop_replies): Add `pid' argument.
19529 (start_inferior): Adjust to use ptids. Adjust to mywait interface
19530 changes. Don't reference the `attached' global.
19531 (attach_inferior): Adjust to mywait interface changes.
19532 (handle_query): Adjust to use ptids. Parse GDB's qSupported
19533 features. Handle and report "multiprocess+". Handle
19534 "qAttached:PID".
19535 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
19536 changes.
19537 (handle_v_kill): New.
19538 (handle_v_stopped): Adjust to use target_pid_to_str.
19539 (handle_v_requests): Allow multiple attaches and runs when
19540 multiprocess extensions are in effect. Handle "vKill".
19541 (myresume): Adjust to use ptids.
19542 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
19543 (handle_status): Adjust to discard_queued_stop_replies interface
19544 change.
19545 (first_thread_of, kill_inferior_callback)
19546 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
19547 (main): Call initialize_inferiors. Adjust to use ptids, killing
19548 and detaching from all inferiors. Handle multiprocess packet
19549 variants.
19550 * linux-low.h: Include gdb_proc_service.h.
19551 (struct process_info_private): New.
19552 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
19553 <lwpid_of>: Use ptid_get_lwp.
19554 (get_lwp_thread): Adjust.
19555 (struct lwp_info): Add `dead' member.
19556 (find_lwp_pid): Declare.
19557 * linux-low.c (thread_db_active): Delete.
19558 (new_inferior): Adjust comment.
19559 (inferior_pid): Delete.
19560 (linux_add_process): New.
19561 (handle_extended_wait): Adjust.
19562 (add_lwp): Change unsigned long to ptid.
19563 (linux_create_inferior): Add process to processes table. Adjust
19564 to use ptids. Don't set new_inferior here.
19565 (linux_attach_lwp): Rename to ...
19566 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
19567 it. Adjust to use ptids.
19568 (linux_attach_lwp): New.
19569 (linux_attach): Add process to processes table. Don't set
19570 new_inferior here.
19571 (struct counter): New.
19572 (second_thread_of_pid_p, last_thread_of_process_p): New.
19573 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
19574 multiple processes.
19575 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
19576 processes. Remove process from process table.
19577 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
19578 to multiple processes.
19579 (any_thread_of): New.
19580 (linux_detach): Add `pid' argument, and handle it. Remove process
19581 from processes table.
19582 (linux_join): Add `pid' argument. Handle it.
19583 (linux_thread_alive): Change unsighed long argument to ptid_t.
19584 Consider dead lwps as not being alive.
19585 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
19586 threads we're not interested in.
19587 (same_lwp, find_lwp_pid): New.
19588 (linux_wait_for_lwp): Change `pid' argument's type from int to
19589 ptid_t. Adjust.
19590 (linux_wait_for_event): Rename to ...
19591 (linux_wait_for_event_1): ... this. Change `pid' argument's type
19592 from int to ptid_t. Adjust.
19593 (linux_wait_for_event): New.
19594 (linux_wait_1): Add `ptid' argument. Change return type to
19595 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
19596 that exit from the process table.
19597 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
19598 Adjust.
19599 (mark_lwp_dead): New.
19600 (wait_for_sigstop): Adjust to use ptids. If a process exits while
19601 stopping all threads, mark its main lwp as dead.
19602 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
19603 ptids.
19604 (fetch_register, usr_store_inferior_registers)
19605 (regsets_fetch_inferior_registers)
19606 (regsets_store_inferior_registers, linux_read_memory)
19607 (linux_write_memory): Inline `inferior_pid'.
19608 (linux_look_up_symbols): Adjust to use per-process
19609 `thread_db_active'.
19610 (linux_request_interrupt): Adjust to use ptids.
19611 (linux_read_auxv): Inline `inferior_pid'.
19612 (initialize_low): Don't reference thread_db_active.
19613 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
19614 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
19615 (ps_getpid): Return the pid of the current inferior.
19616 * thread-db.c (proc_handle, thread_agent): Delete.
19617 (thread_db_create_event, thread_db_enable_reporting): Adjust to
19618 per-process data.
19619 (find_one_thread): Change argument type to ptid_t. Adjust to
19620 per-process data.
19621 (maybe_attach_thread): Adjust to per-process data and ptids.
19622 (thread_db_find_new_threads): Ditto.
19623 (thread_db_init): Ditto.
19624 * spu-low.c (spu_create_inferior, spu_attach): Add process to
19625 processes table. Adjust to use ptids.
19626 (spu_kill, spu_detach): Adjust interface. Remove process from
19627 processes table.
19628 (spu_join, spu_thread_alive): Adjust interface.
19629 (spu_wait): Adjust interface. Remove process from processes
19630 table. Adjust to use ptids.
19631 * win32-low.c (current_inferior_tid): Delete.
19632 (current_inferior_ptid): New.
19633 (debug_event_ptid): New.
19634 (thread_rec): Take a ptid. Adjust.
19635 (child_add_thread): Add `pid' argument. Adjust to use ptids.
19636 (child_delete_thread): Ditto.
19637 (do_initial_child_stuff): Add `attached' argument. Add process to
19638 processes table.
19639 (child_fetch_inferior_registers, child_store_inferior_registers):
19640 Adjust.
19641 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
19642 (win32_attach): Pass 1 to do_initial_child_stuff.
19643 (win32_kill): Adjust interface. Remove process from processes
19644 table.
19645 (win32_detach): Ditto.
19646 (win32_join): Adjust interface.
19647 (win32_thread_alive): Take a ptid.
19648 (win32_resume): Adjust to use ptids.
19649 (get_child_debug_event): Ditto.
19650 (win32_wait): Adjust interface. Remove exiting process from
19651 processes table.
19652
19653 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19654
19655 Non-stop mode support.
19656
19657 * server.h (non_stop): Declare.
19658 (gdb_client_data, handler_func): Declare.
19659 (delete_file_handler, add_file_handler, start_event_loop):
19660 Declare.
19661 (handle_serial_event, handle_target_event, push_event)
19662 (putpkt_notif): Declare.
19663 * target.h (enum resume_kind): New.
19664 (struct thread_resume): Replace `step' field by `kind' field.
19665 (TARGET_WNOHANG): Define.
19666 (struct target_ops) <wait>: Add `options' argument.
19667 <supports_non_stop, async, start_non_stop>: New fields.
19668 (target_supports_non_stop, target_async): New.
19669 (start_non_stop): Declare.
19670 (mywait): Add `options' argument.
19671 * target.c (mywait): Add `options' argument. Print child exit
19672 notifications here.
19673 (start_non_stop): New.
19674 * server.c (non_stop, own_buf, mem_buf): New globals.
19675 (struct vstop_notif): New.
19676 (notif_queue): New global.
19677 (queue_stop_reply, push_event, discard_queued_stop_replies)
19678 (send_next_stop_reply): New.
19679 (start_inferior): Adjust to use resume_kind. Adjust to mywait
19680 interface changes.
19681 (attach_inferior): In non-stop mode, don't wait for the target
19682 here.
19683 (handle_general_set): Handle QNonStop.
19684 (handle_query): When handling qC, return the current general
19685 thread, instead of the first thread of the list.
19686 (handle_query): If the backend supports non-stop mode, include
19687 QNonStop+ in the qSupported query response.
19688 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
19689 and non-stop mode.
19690 (handle_v_attach, handle_v_run): Handle non-stop mode.
19691 (handle_v_stopped): New.
19692 (handle_v_requests): Report support for vCont;t. Handle vStopped.
19693 (myresume): Adjust to use resume_kind. Handle non-stop.
19694 (queue_stop_reply_callback): New.
19695 (handle_status): Handle non-stop mode.
19696 (main): Clear non_stop flag on reconnection. Use the event-loop.
19697 Refactor serial protocol handling from here ...
19698 (process_serial_event): ... to this new function. When GDB
19699 selects any thread, select one here. In non-stop mode, wait until
19700 GDB acks all pending events before exiting.
19701 (handle_serial_event, handle_target_event): New.
19702 * remote-utils.c (remote_open): Install remote_desc in the event
19703 loop.
19704 (remote_close): Remove remote_desc from the event loop.
19705 (putpkt_binary): Rename to...
19706 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
19707 (putpkt_binary): New as wrapper around putpkt_binary_1.
19708 (putpkt_notif): New.
19709 (prepare_resume_reply): In non-stop mode, don't change the
19710 general_thread.
19711 * event-loop.c: New.
19712 * Makefile.in (OBJ): Add event-loop.o.
19713 (event-loop.o): New rule.
19714
19715 * linux-low.h (pid_of): Moved here.
19716 (lwpid_of): New.
19717 (get_lwp_thread): Use lwpid_of.
19718 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
19719 * linux-low.c (pid_of): Delete.
19720 (inferior_pid): Use lwpid_of.
19721 (linux_event_pipe): New.
19722 (target_is_async_p): New.
19723 (delete_lwp): New.
19724 (handle_extended_wait): Use lwpid_of.
19725 (add_lwp): Don't set lwpid field.
19726 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
19727 (linux_kill_one_lwp): If killing a running lwp, stop it first.
19728 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
19729 (linux_detach_one_lwp): If detaching from a running lwp, stop it
19730 first. Adjust to linux_wait_for_event interface changes. Use
19731 lwpid_of.
19732 (linux_detach): Don't delete the main lwp here.
19733 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
19734 (status_pending_p): Don't consider explicitly suspended lwps.
19735 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
19736 pointer. Add OPTIONS argument. Change return type to int. Use
19737 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
19738 (linux_wait_for_event): Take an integer pid instead of a lwp_info
19739 pointer. Add status pointer argument. Return a pid instead of a
19740 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
19741 changes. In non-stop mode, don't switch to a random thread.
19742 (linux_wait): Rename to...
19743 (linux_wait_1): ... this. Add target_options argument, and handle
19744 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
19745 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
19746 clean exit and signal exit code. Don't stop all threads in
19747 non-stop mode. In all-stop mode, only stop all threads when
19748 reporting a stop to GDB. Handle explicit thread stop requests.
19749 (async_file_flush, async_file_mark): New.
19750 (linux_wait): New.
19751 (send_sigstop): Use lwpid_of.
19752 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
19753 interface changes. In non-stop mode, don't switch to a random
19754 thread.
19755 (linux_resume_one_lwp): Use lwpid_of.
19756 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
19757 (linux_resume_one_thread): ... this. Handle resume_stop. In
19758 non-stop mode, don't look for pending flag in all threads.
19759 (resume_status_pending_p): Don't consider explicitly suspended
19760 threads.
19761 (my_waitpid): Reimplement. Emulate __WALL.
19762 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19763 Use lwpid_of.
19764 (sigchld_handler, linux_supports_non_stop, linux_async)
19765 (linux_start_non_stop): New.
19766 (linux_target_ops): Register linux_supports_non_stop, linux_async
19767 and linux_start_non_stop.
19768 (initialize_low): Install SIGCHLD handler.
19769 * thread-db.c (thread_db_create_event, find_one_thread)
19770 (thread_db_get_tls_address): Use lwpid_of.
19771 * win32-low.c (win32_detach): Adjust to use resume_kind.
19772 (win32_wait): Add `options' argument.
19773 * spu-low.c (spu_resume): Adjust to use resume_kind.
19774 (spu_wait): Add `options' argument.
19775
19776 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19777
19778 Decouple target code from remote protocol.
19779
19780 * target.h (enum target_waitkind): New.
19781 (struct target_waitstatus): New.
19782 (struct target_ops) <wait>: Return an unsigned long. Take a
19783 target_waitstatus pointer instead of a char pointer.
19784 (mywait): Likewise.
19785 * target.c (mywait): Change prototype to return an unsigned long.
19786 Take a target_waitstatus pointer instead of a char pointer. Adjust.
19787 * server.h (thread_from_wait, old_thread_from_wait): Delete
19788 declarations.
19789 (prepare_resume_reply): Change prototype to take a
19790 target_waitstatus.
19791 * server.c (thread_from_wait, old_thread_from_wait): Delete.
19792 (last_status, last_ptid): New.
19793 (start_inferior): Remove "statusptr" argument. Adjust. Return a
19794 pid instead of a signal.
19795 (attach_inferior): Remove "status" and "signal" parameters.
19796 Adjust.
19797 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
19798 not as an address.
19799 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
19800 (handle_v_requests, myresume): Remove "status" and "signal"
19801 parameters. Adjust.
19802 (handle_status): New.
19803 (main): Delete local `status'. Adjust.
19804 * remote-utils.c: Include target.h.
19805 (prepare_resume_reply): Change prototype to take a
19806 target_waitstatus. Adjust.
19807
19808 * linux-low.c (linux_wait): Adjust to new target_ops->wait
19809 interface.
19810 * spu-low.c (spu_wait): Adjust.
19811 * win32-low.c (enum target_waitkind, struct target_waitstatus):
19812 Delete.
19813 (win32_wait): Adjust.
19814
19815 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19816
19817 * target.h (struct thread_resume): Delete leave_stopped member.
19818 (struct target_ops): Add a `n' argument to the `resume' callback.
19819 * server.c (start_inferior): Adjust.
19820 (handle_v_cont, myresume): Adjust.
19821 * linux-low.c (check_removed_breakpoint): Adjust to resume
19822 interface change, and to removed leave_stopped field.
19823 (resume_ptr): Delete.
19824 (struct thread_resume_array): New.
19825 (linux_set_resume_request): Add new `arg' parameter. Adjust to
19826 resume interface change.
19827 (linux_continue_one_thread, linux_queue_one_thread)
19828 (resume_status_pending_p): Check if the resume field is NULL
19829 instead of checking the leave_stopped member.
19830 (linux_resume): Adjust to the target resume interface change.
19831 * spu-low.c (spu_resume): Adjust to the target resume interface
19832 change.
19833 * win32-low.c (win32_detach, win32_resume): Ditto.
19834
19835 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19836
19837 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
19838 flag.
19839 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
19840 pending.
19841 (linux_continue_one_thread): Only preserve the stepping flag if
19842 there's a pending breakpoint.
19843
19844 2009-03-31 Pedro Alves <pedro@codesourcery.com>
19845
19846 * server.c (main): After the inferior having exited, call
19847 remote_close before exiting gdbserver.
19848
19849 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
19850
19851 Fix size of FPSCR in Power 7 processors.
19852 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
19853 (PPC_FEATURE_HAS_DFP): New #define.
19854 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
19855 size of the FPSCR.
19856
19857 2009-03-23 Pedro Alves <pedro@codesourcery.com>
19858
19859 * server.c (handle_query) Whitespace and formatting.
19860
19861 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19862
19863 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
19864 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
19865 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
19866 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
19867 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
19868 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
19869 Makefile.in, configure.ac: Fix whitespace throughout.
19870 * configure: Regenerate.
19871
19872 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19873
19874 * inferiors.c (find_inferior): Make it safe for the callback
19875 function to delete the currently iterated inferior.
19876
19877 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19878
19879 * Makefile.in (linuw_low_h): Move higher.
19880 (thread-db.o): Depend on $(linux_low_h).
19881
19882 2009-03-17 Pedro Alves <pedro@codesourcery.com>
19883
19884 Rename "process" to "lwp" throughout.
19885
19886 * linux-low.c (all_processes): Rename to...
19887 (all_lwps): ... this.
19888 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
19889 (add_process): Rename to ...
19890 (add_lwp): ... this. Adjust.
19891 (linux_create_inferior): Adjust.
19892 (linux_attach_lwp): Adjust.
19893 (linux_attach): Adjust.
19894 (linux_kill_one_process): Rename to ...
19895 (linux_kill_one_lwp): ... this. Adjust.
19896 (linux_kill): Adjust.
19897 (linux_detach_one_process): Rename to ...
19898 (linux_detach_one_lwp): ... this. Adjust.
19899 (linux_detach): Adjust.
19900 (check_removed_breakpoint): Adjust.
19901 (status_pending_p): Adjust.
19902 (linux_wait_for_process): Rename to ...
19903 (linux_wait_for_lwp): ... this. Adjust.
19904 (linux_wait_for_event): Adjust.
19905 (send_sigstop): Adjust.
19906 (wait_for_sigstop): Adjust.
19907 (stop_all_processes): Rename to ...
19908 (stop_all_lwps): ... this.
19909 (linux_resume_one_process): Rename to ...
19910 (linux_resume_one_lwp): ... this. Adjust.
19911 (linux_set_resume_request, linux_continue_one_thread)
19912 (linux_queue_one_thread, resume_status_pending_p)
19913 (usr_store_inferior_registers, regsets_store_inferior_registers)
19914 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19915 Adjust.
19916 * linux-low.h (get_process): Rename to ...
19917 (get_lwp): ... this. Adjust.
19918 (get_thread_process): Rename to ...
19919 (get_thread_lwp): ... this. Adjust.
19920 (get_process_thread): Rename to ...
19921 (get_lwp_thread): ... this. Adjust.
19922 (struct process_info): Rename to ...
19923 (struct lwp_info): ... this.
19924 (all_processes): Rename to ...
19925 (all_lwps): ... this.
19926 * proc-service.c (ps_lgetregs): Adjust.
19927 * thread-db.c (thread_db_create_event, find_one_thread)
19928 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
19929
19930 2009-03-14 Pedro Alves <pedro@codesourcery.com>
19931
19932 * server.c (handle_query): Handle "qAttached".
19933
19934 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
19935
19936 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
19937 GPLv3, update license URL.
19938
19939 2009-03-01 Doug Evans <dje@google.com>
19940
19941 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
19942 (server_h): Add gdb_signals.h.
19943 (signals.o): Update.
19944 * server.h (target_signal_from_host,target_signal_to_host_p)
19945 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
19946
19947 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
19948
19949 * remote-utils.c (getpkt): Also generate remote-debug
19950 information if noack_mode is set.
19951
19952 2009-02-06 Pedro Alves <pedro@codesourcery.com>
19953
19954 * server.c (handle_query): Report qXfer:siginfo:read and
19955 qXfer:siginfo:write as supported and handle them.
19956 * target.h (struct target_ops) <qxfer_siginfo>: New field.
19957 * linux-low.c (linux_xfer_siginfo): New.
19958 (linux_target_ops): Set it.
19959
19960 2009-01-26 Pedro Alves <pedro@codesourcery.com>
19961
19962 * server.c (gdbserver_usage): Mention --remote-debug.
19963 (main): Accept '--remote-debug' switch.
19964
19965 2009-01-18 Doug Evans <dje@google.com>
19966
19967 * regcache.c (new_register_cache): No need to check result of xcalloc.
19968 * server.c (handle_search_memory): Back out calls to xmalloc,
19969 result is checked and error is returned to user upon failure.
19970 (handle_query): Ditto. Add more checks for result of malloc.
19971 (handle_v_cont): Check result of malloc, report error back to
19972 user upon failure.
19973 (handle_v_run): Ditto. Call freeargv.
19974 * server.h (freeargv): Declare.
19975 * utils.c (freeargv): New fn.
19976
19977 2009-01-15 Doug Evans <dje@google.com>
19978
19979 * gdbreplay.c (perror_with_name): Make arg const char *.
19980 * server.h (target_signal_to_name): Make return type const char *.
19981 * thread-db.c (thread_db_err_str): Make return type const char *.
19982 * utils.c (perror_with_name): Make arg const char *.
19983
19984 2009-01-14 Pedro Alves <pedro@codesourcery.com>
19985
19986 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
19987 when handling a EXIT_PROCESS_DEBUG_EVENT.
19988
19989 2009-01-06 Joel Brobecker <brobecker@adacore.com>
19990
19991 * gdbreplay.c (gdbreplay_version): Update copyright year.
19992 * server.c (gdbserver_version): Likewise.
19993
19994 2009-01-05 Doug Evans <dje@google.com>
19995
19996 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
19997 (handle_extended_wait): Improve comment.
19998
19999 2008-12-13 Doug Evans <dje@google.com>
20000
20001 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
20002 * server.h (ATTR_MALLOC): New macro.
20003 (xmalloc,xcalloc,xstrdup): Declare.
20004 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
20005 * inferiors.c: Ditto.
20006 * linux-low.c: Ditto.
20007 * mem-break.c: Ditto.
20008 * regcache.c: Ditto.
20009 * remote-utils.c: Ditto.
20010 * server.c: Ditto.
20011 * target.c: Ditto.
20012 * win32-low.c: Ditto.
20013
20014 2008-12-12 Doug Evans <dje@google.com>
20015
20016 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
20017 in debugging printf.
20018
20019 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
20020
20021 2008-12-09 Doug Evans <dje@google.com>
20022
20023 * linux-low.h (struct process_info): Delete member tid, unused.
20024 * thread-db.c (find_one_thread): Update.
20025 (maybe_attach_thread): Update.
20026
20027 2008-12-02 Pedro Alves <pedro@codesourcery.com>
20028
20029 * target.h (struct target_ops): Add qxfer_osdata member.
20030 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
20031 and dirent.h.
20032 (linux_qxfer_osdata): New functions.
20033 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
20034 callback.
20035 * server.c (handle_query): Handle "qXfer:osdata:read:".
20036 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
20037 (buffer_xml_printf): New functions.
20038 * server.h (struct buffer): New.
20039 (buffer_grow_str, buffer_grow_str0): New macros.
20040 (buffer_grow, buffer_free, buffer_init, buffer_finish)
20041 (buffer_xml_printf): Declare.
20042
20043 2008-11-24 Doug Evans <dje@google.com>
20044
20045 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
20046
20047 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
20048
20049 * server.c (handle_v_run): Always use the supplied argument list.
20050
20051 2008-11-19 Bob Wilson <bob.wilson@acm.org>
20052
20053 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
20054 (xtensa_regmap_table): Add entry for scompare1.
20055
20056 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
20057
20058 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
20059 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
20060 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
20061 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
20062 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
20063 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
20064 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
20065 XML target descriptions.
20066 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
20067 when inferior is running on an ISA 2.05 or later processor. Add
20068 special case to return offset for full 64-bit slot of FPSCR when
20069 in 32-bits.
20070
20071 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
20072
20073 * Makefile.in (SFILES, clean): Added sparc64 files.
20074 (reg-sparc64.o, reg-sparc64.c): New.
20075 * configure.srv (sparc*-*-linux*): New configuration.
20076 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
20077 syscall arguments for SPARC.
20078 (regsets_store_inferior_registers): Likewise.
20079 * linux-sparc-low.c: New file.
20080
20081 2008-10-21 Doug Evans <dje@google.com>
20082
20083 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
20084 (READLINE_DIR,READLINE_DEP): Delete.
20085 (INTERNAL_CFLAGS): Update.
20086 (LINTFLAGS): Update.
20087
20088 2008-10-10 Pedro Alves <pedro@codesourcery.com>
20089
20090 * server.c (handle_v_run): If GDB didn't specify an argv, use the
20091 whole argv from the last run, not just argv[0].
20092
20093 2008-09-08 Pedro Alves <pedro@codesourcery.com>
20094
20095 * regcache.c (new_register_cache): Return NULL if the register
20096 cache size isn't known yet.
20097 (free_register_cache): Avoid dereferencing a NULL regcache.
20098
20099 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
20100
20101 * configure.srv: Merge MIPS and MIPS64.
20102
20103 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
20104
20105 * Makefile.in (uninstall): Apply $(EXEEXT) too.
20106
20107 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
20108
20109 * Makefile.in: Add required vsx dependencies.
20110
20111 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
20112 Declare init_registers_powerpc_vsx32l.
20113 Declare init_registers_powerpc_vsx64l.
20114 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
20115 (ppc_arch_setup): Check for VSX in hwcap.
20116 (ppc_fill_vsxregset): New function.
20117 (ppc_store_vsxregset): New function.
20118 Add new VSX entry in regset_info target_regsets.
20119
20120 * configure.srv: Add new VSX dependencies.
20121
20122 2008-08-12 Pedro Alves <pedro@codesourcery.com>
20123
20124 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
20125 (remote_open): Set or clear transport_is_reliable.
20126 (putpkt_binary): Don't expect acks in noack mode.
20127 (getpkt): Don't send ack/nac in noack mode.
20128 * server.c (handle_general_set): Handle QStartNoAckMode.
20129 (handle_query): If connected by tcp pass QStartNoAckMode+ in
20130 qSupported.
20131 (main): Reset noack_mode on every connection.
20132 * server.h (noack_mode): Declare.
20133
20134 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
20135
20136 * Makefile.in (GDBREPLAY_OBS): New variable.
20137 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
20138
20139 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
20140 Daniel Jacobowitz <dan@codesourcery.com>
20141
20142 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
20143 (usr_store_inferior_registers): Likewise.
20144 (regsets_store_inferior_registers): Likewise.
20145
20146 2008-07-31 Rolf Jansen <rj@surtec.com>
20147 Pedro Alves <pedro@codesourcery.com>
20148
20149 * configure.ac: Check for memmem declaration.
20150 * server.c [HAVE_MALLOC_H]: Include malloc.h.
20151 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
20152 (disable_packet_qfThreadInfo): Unconditionally compile.
20153 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
20154 * configure, config.in: Regenerate.
20155
20156 2008-07-28 Doug Kwan <dougkwan@google.com>
20157
20158 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
20159 (linux_write_memory): Remove declaration of errno.
20160
20161 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
20162
20163 * linux-low.c (handle_extended_wait): Do not use "status"
20164 variable uninitialized.
20165
20166 2008-07-07 Pedro Alves <pedro@codesourcery.com>
20167
20168 * server.c (handle_v_attach): Inhibit reporting dll changes.
20169
20170 2008-06-27 Pedro Alves <pedro@codesourcery.com>
20171
20172 * remote-utils.c (prepare_resume_reply): If requested, don't
20173 output "thread:TID" in the T stop reply.
20174
20175 * server.c (disable_packet_vCont, disable_packet_Tthread)
20176 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
20177 (handle_query): If requested, disable support for qC, qfThreadInfo
20178 and qsThreadInfo.
20179 (handle_v_requests): If requested, disable support for vCont.
20180 (gdbserver_show_disableable): New.
20181 (main): Handle --disable-packet and --disable-packet=LIST.
20182
20183 * server.h (disable_packet_vCont, disable_packet_Tthread)
20184 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
20185
20186 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
20187
20188 * server.c (gdbserver_usage): Mention --version.
20189
20190 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
20191
20192 * Makefile.in (gdbreplay.o): New rule.
20193
20194 2008-06-06 Joseph Myers <joseph@codesourcery.com>
20195
20196 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
20197 message, not gdbserver.
20198
20199 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
20200 Nathan Sidwell <nathan@codesourcery.com>
20201 Joseph Myers <joseph@codesourcery.com>
20202
20203 * acinclude.m4: Include ../../config/acx.m4.
20204 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
20205 * configure, config.in: Regenerate.
20206 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
20207 * server.c (gdbserver_version): Print PKGVERSION.
20208 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
20209 (main): Adjust gdbserver_usage calls.
20210 * gdbreplay.c (version, host_name): Add declarations.
20211 (gdbreplay_version, gdbreplay_usage): New.
20212 (main): Accept --version and --help options.
20213
20214 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
20215
20216 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
20217 (arm_breakpoint_at): Handle Thumb.
20218 (the_low_target): Add comment.
20219
20220 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
20221
20222 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
20223
20224 2008-05-09 Doug Evans <dje@google.com>
20225
20226 * server.h (decode_search_memory_packet): Declare.
20227 * remote-utils.c (decode_search_memory_packet): New fn.
20228 * server.c (handle_search_memory_1): New fn.
20229 (handle_search_memory): New fn.
20230 (handle_query): Process qSearch:memory packets.
20231
20232 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
20233
20234 * regcache.c (registers_length): Remove.
20235 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
20236 full register packet.
20237 * regcache.h (registers_length): Remove prototype.
20238 * server.h (PBUFSIZ): Define to 16384.
20239
20240 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
20241
20242 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
20243 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
20244 powerpc-64l.o, and powerpc-altivec64l.o.
20245 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
20246 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
20247 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
20248 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
20249 rs6000/power-linux.xml, and rs6000/power64-linux.xml
20250 to srv_xmlfiles.
20251
20252 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
20253 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
20254 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
20255 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
20256 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
20257 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
20258 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
20259 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
20260 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
20261 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
20262 (clean): Update.
20263
20264 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
20265 (init_registers_powerpc_32l): ... this new prototype.
20266 (init_registers_powerpc_32): Remove, replace by ...
20267 (init_registers_powerpc_altivec32l): ... this new prototype.
20268 (init_registers_powerpc_e500): Remove, replace by ...
20269 (init_registers_powerpc_e500l): ... this new prototype.
20270 (init_registers_ppc64): Remove, replace by ...
20271 (init_registers_powerpc_64l): ... this new prototype.
20272 (init_registers_powerpc_64): Remove, replace by ...
20273 (init_registers_powerpc_altivec64l): ... this new prototype.
20274 (ppc_num_regs): Set to 73.
20275 (PT_ORIG_R3, PT_TRAP): Define if necessary.
20276 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
20277 (ppc_cannot_store_register): Handle orig_r3 and trap.
20278 (ppc_arch_setup): Update init_registers_... calls.
20279 (ppc_fill_gregset): Handle orig_r3 and trap.
20280
20281 * inferiors.c (clear_inferiors): Reset current_inferior.
20282
20283 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
20284
20285 * acinclude.m4: Add override.m4.
20286 * configure: Regenerate.
20287
20288 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
20289
20290 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
20291 initial call to init_register_ppc64.
20292
20293 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
20294
20295 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
20296 single powerpc*-*-linux* case.
20297 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
20298
20299 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
20300
20301 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
20302 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
20303 from reg_xmlfiles.
20304 * linux-ppc-low.c: Include <elf.h>.
20305 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
20306 (ppc_hwcap): New global variable.
20307 (ppc_regmap): Remove __SPE__ #ifdef sections.
20308 (ppc_regmap_e500): New global variable.
20309 (ppc_cannot_store_register): Update __SPE__ special case.
20310 (ppc_get_hwcap): New function.
20311 (ppc_arch_setup): Use it to determine whether inferior supports
20312 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
20313 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
20314 Do not access registers if target does not support AltiVec.
20315 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
20316 Do not access registers if target does not support SPE.
20317 (target_regsets): Unconditionally include AltiVec and SPE regsets.
20318
20319 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
20320
20321 * linux-low.c (disabled_regsets, num_regsets): New.
20322 (use_regsets_p): Delete.
20323 (linux_wait_for_process): Clear disabled_regsets.
20324 (regsets_fetch_inferior_registers): Check and set it.
20325 (regsets_store_inferior_registers): Likewise.
20326 (linux_fetch_registers, linux_store_registers): Do not use
20327 use_regsets_p.
20328 (initialize_low): Allocate disabled_regsets.
20329
20330 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
20331
20332 * Makefile.in (LIBOBJS): New.
20333 (OBS): Use LIBOBJS.
20334 (memmem.o): New rule.
20335 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
20336 * configure: Regenerated.
20337
20338 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
20339
20340 * server.c (handle_query): Never return "unsupported" for
20341 qXfer:features:read queries.
20342
20343 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
20344
20345 * server.c (get_features_xml): Fix inverted condition.
20346 (handle_query): Always support qXfer:feature:read.
20347
20348 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
20349
20350 * server.c (wrapper_argv): New.
20351 (start_inferior): Handle wrapper_argv. If set, expect an extra
20352 trap.
20353 (gdbserver_usage): Document --wrapper.
20354 (main): Parse --wrapper.
20355
20356 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20357
20358 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
20359 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
20360 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
20361 (ppc_set_pc): Likewise.
20362 (ppc_arch_setup): New function.
20363 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
20364 of collect_register.
20365 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
20366
20367 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20368
20369 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
20370 instead of linux-ppc64-low.o.
20371 * linux-ppc64-low.c: Remove file.
20372 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
20373 (linux-ppc64-low.o): Remove rule.
20374
20375 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
20376 (init_registers_powerpc_64): Likewise.
20377 (ppc_regmap): Conditionally define depending on __powerpc64__.
20378 (ppc_cannot_store_register): Do not special-case "fpscr" when
20379 compiled on __powerpc64__.
20380 (ppc_collect_ptrace_register): New function.
20381 (ppc_supply_ptrace_register): New function.
20382 (ppc_breakpoint): Change type to "unsigned int".
20383 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
20384 (the_low_target): Conditionally provide initializers for the
20385 arch_setup member depending on __powerpc64__. Install
20386 collect_ptrace_register and supply_ptrace_register members.
20387
20388 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20389
20390 * regcache.h (gdbserver_xmltarget): Add extern declaration.
20391 * server.c (gdbserver_xmltarget): Define.
20392 (get_features_xml): Use it to replace "target.xml" and arch_string.
20393
20394 * configure.srv: Remove srv_xmltarget. Add XML files that were
20395 mentioned there to srv_xmlfiles instead. Remove conditional tests
20396 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
20397 srv_xmlfiles and srv_regobj to include all possible choices.
20398 * configure.ac (srv_xmltarget): Remove.
20399 (srv_xmlfiles): Do not add "target.xml".
20400 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
20401 checks for supplementary target information.
20402 * configure: Regenerate.
20403 * Makefile.in (XML_TARGET): Remove.
20404 (target.xml): Remove rule.
20405 (clean): Do not clean up target.xml.
20406 (.PRECIOUS): Do not mention target.xml.
20407
20408 * target.h (struct target_ops): Remove arch_string member.
20409 * linux-low.c (linux_arch_string): Remove.
20410 (linux_target_ops): Remove arch_string initializer.
20411 * linux-low.h (struct linux_target_ops): Remove arch_string member.
20412 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
20413 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
20414 * spu-low.c (spu_arch_string): Remove.
20415 (spu_target_ops): Remove arch_string initializer.
20416 * win32-low.c (win32_arch_string): Remove.
20417 (win32_target_ops): Remove arch_string initializer.
20418 * win32-low.h (struct win32_target_ops): Remove arch_string member.
20419 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
20420 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
20421
20422 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20423
20424 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
20425 by collect_ptrace_register and supply_ptrace_register hooks.
20426 * linux-low.c (fetch_register): Use supply_ptrace_register callback
20427 instead of checking for the_low_target.left_pad_xfer.
20428 (usr_store_inferior_registers): Use collect_ptrace_register callback
20429 instead of checking for the_low_target.left_pad_xfer.
20430
20431 * linux-s390-low.c (s390_collect_ptrace_register): New function.
20432 (s390_supply_ptrace_register): Likewise.
20433 (s390_fill_gregset): Call s390_collect_ptrace_register.
20434 (the_low_target): Update.
20435
20436 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
20437 (ppc_supply_ptrace_register): Likewise.
20438 (the_low_target): Update.
20439
20440 * linux-i386-low.c (the_low_target): Update.
20441 * linux-x86-64-low.c (the_low_target): Update.
20442
20443 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20444
20445 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
20446 reg-s390.o and reg-s390x.o.
20447
20448 * linux-low.c (new_inferior): New global variable.
20449 (linux_create_inferior, linux_attach): Set it.
20450 (linux_wait_for_process): Call the_low_target.arch_setup after the
20451 target has stopped for the first time.
20452 (initialize_low): Do not call the_low_target.arch_setup.
20453
20454 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
20455 (s390_set_pc): Likewise.
20456 (s390_arch_setup): New function.
20457 (the_low_target): Use s390_arch_setup as arch_setup routine.
20458
20459 * regcache.c (realloc_register_cache): New function.
20460 (set_register_cache): Call it for each existing regcache.
20461
20462 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20463
20464 * server.h (init_registers): Remove prototype.
20465
20466 * linux-low.h (struct linux_target_ops): Add arch_setup field.
20467 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
20468 instead of init_registers ().
20469 * linux-arm-low.c (init_registers_arm): Add prototype.
20470 (init_registers_arm_with_iwmmxt): Likewise.
20471 (the_low_target): Add initializer for arch_setup field.
20472 * linux-cris-low.c (init_registers_cris): Add prototype.
20473 (the_low_target): Add initializer for arch_setup field.
20474 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
20475 (the_low_target): Add initializer for arch_setup field.
20476 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
20477 (the_low_target): Add initializer for arch_setup field.
20478 * linux-ia64-low.c (init_registers_ia64): Add prototype.
20479 (the_low_target): Add initializer for arch_setup field.
20480 * linux-m32r-low.c (init_registers_m32r): Add prototype.
20481 (the_low_target): Add initializer for arch_setup field.
20482 * linux-m68k-low.c (init_registers_m68k): Add prototype.
20483 (the_low_target): Add initializer for arch_setup field.
20484 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
20485 (init_registers_mips64_linux): Likewise.
20486 (the_low_target): Add initializer for arch_setup field.
20487 * linux-ppc-low.c (init_registers_ppc): Add prototype.
20488 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
20489 (the_low_target): Add initializer for arch_setup field.
20490 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
20491 (init_registers_powerpc_64): Likewise.
20492 (the_low_target): Add initializer for arch_setup field.
20493 * linux-s390-low.c (init_registers_s390): Add prototype.
20494 (init_registers_s390x): Likewise.
20495 (the_low_target): Add initializer for arch_setup field.
20496 * linux-sh-low.c (init_registers_sh): Add prototype.
20497 (the_low_target): Add initializer for arch_setup field.
20498 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
20499 (the_low_target): Add initializer for arch_setup field.
20500 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
20501 (the_low_target): Add initializer for arch_setup field.
20502
20503 * win32-low.h (struct win32_target_ops): Add arch_setup field.
20504 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
20505 instead of init_registers ().
20506 * win32-arm-low.c (init_registers_arm): Add prototype.
20507 (the_low_target): Add initializer for arch_setup field.
20508 * win32-i386-low.c (init_registers_i386): Add prototype.
20509 (the_low_target): Add initializer for arch_setup field.
20510
20511 * spu-low.c (init_registers_spu): Add prototype.
20512 (initialize_low): Call initialie_registers_spu () instead of
20513 initialize_registers ().
20514
20515 2008-02-19 Pedro Alves <pedro@codesourcery.com>
20516
20517 * server.c (handle_v_requests): When handling the vRun and vAttach
20518 packets, if already debugging a process, don't kill it. Return an
20519 error instead.
20520
20521 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
20522
20523 * server.c (handle_query): Correct length check.
20524
20525 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
20526
20527 * win32-low.c (do_initial_child_stuff): Add process handle
20528 parameter. Set current_process_handle and current_process_id from the
20529 parameters. Clear globals.
20530 (win32_create_inferior): Don't set current_process_handle and
20531 current_process_id here. Instead pass them on the call to
20532 do_initial_child_stuff.
20533 (win32_attach): Likewise.
20534 (win32_clear_inferiors): New.
20535 (win32_kill): Don't close the current process handle or the
20536 current thread handle here. Instead call win32_clear_inferiors.
20537 (win32_detach): Don't open a new handle to the process. Call
20538 win32_clear_inferiors.
20539 (win32_join): Don't rely on current_process_handle; open a new
20540 handle using the process id.
20541 (win32_wait): Call win32_clear_inferiors when the inferior process
20542 has exited.
20543
20544 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
20545
20546 * server.c (monitor_show_help): Add "exit".
20547
20548 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
20549
20550 * Makefile.in (SFILES): Add linux-xtensa-low.c.
20551 (clean): Add reg-xtensa.c.
20552 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
20553 * configure.srv (xtensa*-*-linux*) New target.
20554 * linux-xtensa-low.c: New.
20555 * xtensa-xtregs.c: New.
20556
20557 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
20558
20559 * hostio.c: Don't include errno.h.
20560 (errno_to_fileio_errno): Move to hostio-errno.
20561 * hostio.c: (hostio_error): Remove the error parameter. Defer the
20562 error number outputting to the target->hostio_last_error callback.
20563 (hostio_packet_error): Use FILEIO_EINVAL directly.
20564 (handle_open, handle_pread, hostio_error, handle_unlink): Update
20565 calls to hostio_error.
20566 * hostio-errno.c: New.
20567 * server.h (hostio_last_error_from_errno): Declare.
20568 * target.h (target_ops): Add hostio_last_error member.
20569 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
20570 as hostio_last_error handler.
20571 * spu-low.c (spu_target_ops): Likewise.
20572 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
20573 (wince_hostio_last_error): New functions.
20574 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
20575 as hostio_last_error handler.
20576 (win32_target_ops) [!_WIN32_WCE]: Register
20577 hostio_last_error_from_errno as hostio_last_error handler.
20578 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
20579 (hostio-errno.o): New rule.
20580 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
20581 * configure.srv (srv_hostio_err_objs): New variable. Default to
20582 hostio-errno.o.
20583 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
20584 * configure: Regenerate.
20585
20586 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
20587
20588 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
20589 (linux_kill, linux_detach): Clean up the process list.
20590 * remote-utils.c (remote_open): Improve port number parsing.
20591 (putpkt_binary, input_interrupt): Only send interrupts if the target
20592 is running.
20593 * server.c (extended_protocol): Make static.
20594 (attached): Define earlier.
20595 (exit_requested, response_needed, program_argv): New variables.
20596 (target_running): New.
20597 (start_inferior): Clear attached here.
20598 (attach_inferior): Set attached here.
20599 (require_running): Define.
20600 (handle_query): Use require_running and target_running. Implement
20601 "monitor exit".
20602 (handle_v_attach, handle_v_run): New.
20603 (handle_v_requests): Use require_running. Handle vAttach and vRun.
20604 (gdbserver_usage): Update.
20605 (main): Redo argument parsing. Handle --debug and --multi. Handle
20606 --attach along with other options or after the port. Save
20607 program_argv. Support no initial program. Resynchronize
20608 communication with GDB after an error. Handle "monitor exit".
20609 Use require_running and target_running. Always allow the extended
20610 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
20611 restart in extended mode.
20612 * README: Refer to the GDB manual. Update --attach usage.
20613
20614 2007-12-20 Andreas Schwab <schwab@suse.de>
20615
20616 * linux-low.c (STACK_SIZE): Define.
20617 (linux_tracefork_child): Use it. Use __clone2 on ia64.
20618 (linux_test_for_tracefork): Likewise.
20619
20620 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
20621
20622 * linux-low.c (linux_wait_for_event): Update messages. Do not
20623 reinsert auto-delete breakpoints.
20624 * mem-break.c (struct breakpoint): Change return type of handler to
20625 int.
20626 (set_breakpoint_at): Update handler type.
20627 (reinsert_breakpoint_handler): Return 1 instead of calling
20628 delete_breakpoint.
20629 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
20630 setting a new one.
20631 (check_breakpoints): Delete auto-delete breakpoints and return 2.
20632 * mem-break.h (set_breakpoint_at): Update handler type.
20633 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
20634 * win32-low.c (auto_delete_breakpoint): New.
20635 (get_child_debug_event): Use it.
20636
20637 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
20638
20639 * configure.ac: Check for pread and pwrite.
20640 * hostio.c (handle_pread): Fall back to lseek and read.
20641 (handle_pwrite): Fall back to lseek and write.
20642 * config.in, configure: Regenerated.
20643
20644 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
20645
20646 * server.c (myresume): Add own_buf argument.
20647 (main): Update calls.
20648
20649 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
20650
20651 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
20652 * remote-utils.c (remote_open): Do not call disable_async_io.
20653 (block_async_io): Delete.
20654 (unblock_async_io): Make static.
20655 (initialize_async_io): New.
20656 * server.c (handle_v_cont): Handle async I/O here.
20657 (myresume): Likewise. Move other common resume tasks here...
20658 (main): ... from here. Call initialize_async_io. Disable async
20659 I/O before the main loop.
20660 * server.h (initialize_async_io): Declare.
20661 (block_async_io, unblock_async_io): Delete prototypes.
20662 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
20663
20664 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
20665
20666 * remote-utils.c (readchar): Allow binary data in received messages.
20667
20668 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20669
20670 * win32-low.c (attaching): New global.
20671 (win32_create_inferior): Clear the `attaching' global.
20672 (win32_attach): Set the `attaching' global.
20673 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
20674 attaching. Only set a breakpoint at the entry point if not
20675 attaching.
20676
20677 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20678
20679 * server.c (main): Don't report dll events on the initial
20680 connection on attaches.
20681
20682 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20683
20684 * server.c (main): Relax numerical bases supported for the pid of
20685 the --attach command line argument.
20686
20687 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20688
20689 * win32-low.c (win32_attach): Call OpenProcess before
20690 DebugActiveProcess, not after. Add last error output to error
20691 call.
20692
20693 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20694
20695 * win32-low.c (win32_get_thread_context)
20696 (win32_set_thread_context): New functions.
20697 (thread_rec): Use win32_get_thread_context.
20698 (continue_one_thread, win32_resume): Use win32_set_thread_context.
20699 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
20700 field.
20701
20702 2007-12-03 Leo Zayas
20703 Pedro Alves <pedro_alves@portugalmail.pt>
20704
20705 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
20706 global variables.
20707 (child_add_thread): Minor cleanup.
20708 (child_continue): Resume artificially suspended threads before
20709 calling ContinueDebugEvent.
20710 (suspend_one_thread): New.
20711 (fake_breakpoint_event): New.
20712 (get_child_debug_event): Change return type to int. Check here if
20713 gdb sent an interrupt request. If a soft interrupt was requested,
20714 fake a breakpoint event. Return 0 if there is no event to handle,
20715 and 1 otherwise.
20716 (win32_wait): Don't check here if gdb sent an interrupt request.
20717 Ensure there is a valid event to handle.
20718 (win32_request_interrupt): Add soft interruption method as last
20719 resort.
20720
20721 2007-12-03 Leo Zayas
20722 Pedro Alves <pedro_alves@portugalmail.pt>
20723
20724 * win32-low.h (win32_thread_info): Add descriptions to the
20725 structure members. Replace `suspend_count' counter by a
20726 `suspended' flag.
20727 * win32-low.c (thread_rec): Update condition of when to get the
20728 context from the inferior. Rely on ContextFlags being set if it
20729 has already been retrieved. Only suspend the inferior thread if
20730 we haven't already. Warn if that fails.
20731 (continue_one_thread): s/suspend_count/suspended/. Only call
20732 ResumeThread once. Warn if that fails.
20733
20734 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20735
20736 * win32-low.c (win32_wait): Don't read from the inferior when it
20737 has already exited.
20738
20739 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20740
20741 * Makefile.in (win32_low_h): New variable.
20742 (win32-low.o): Add dependency on $(win32_low_h).
20743 (win32-arm-low.o, win32-i386-low.o): New rules.
20744
20745 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20746
20747 * hostio.c: Correct copyright year.
20748
20749 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20750
20751 * Makefile.in (OBS): Add hostio.o.
20752 (hostio.o): New rule.
20753 * server.h (handle_vFile): Declare.
20754 * hostio.c: New file.
20755 * server.c (handle_v_requests): Take packet_len and new_packet_len
20756 for binary packets. Call handle_vFile.
20757 (main): Update call to handle_v_requests.
20758
20759 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
20760
20761 * linux-low.c: Include <sched.h>.
20762
20763 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
20764
20765 * linux-low.c (linux_tracefork_grandchild): New.
20766 (linux_tracefork_child): Use clone.
20767 (linux_test_for_tracefork): Use clone; allocate and free a stack.
20768
20769 2007-10-31 Joel Brobecker <brobecker@adacore.com>
20770
20771 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
20772
20773 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
20774
20775 * linux-low.c (handle_extended_wait): Handle unexpected signals.
20776
20777 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
20778
20779 * inferiors.c (change_inferior_id): Delete.
20780 (add_pid_to_list, pull_pid_from_list): New.
20781 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
20782 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
20783 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
20784 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
20785 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
20786 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
20787 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
20788 (using_threads): Always set to 1.
20789 (handle_extended_wait): New.
20790 (add_process): Do not set TID.
20791 (linux_create_inferior): Set must_set_ptrace_flags.
20792 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
20793 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
20794 (linux_thread_alive): Rename TID argument to LWPID.
20795 (linux_wait_for_process): Handle unknown processes. Do not use TID.
20796 (linux_wait_for_event): Do not use TID or check using_threads. Update
20797 call to dead_thread_notify. Call handle_extended_wait.
20798 (linux_create_inferior): Use PTRACE_SETOPTIONS.
20799 (send_sigstop): Delete sigstop_sent.
20800 (wait_for_sigstop): Avoid TID.
20801 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
20802 (linux_test_for_tracefork): New.
20803 (linux_lookup_signals): Use thread_db_active and
20804 linux_supports_tracefork_flag.
20805 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
20806 * linux-low.h (get_process_thread): Avoid TID.
20807 (struct process_ifo): Move thread_known and tid to the end. Remove
20808 sigstop_sent.
20809 (linux_attach_lwp, thread_db_init): Update prototypes.
20810 * server.h (change_inferior_id): Delete prototype.
20811 (add_pid_to_list, pull_pid_from_list): New prototypes.
20812 * thread-db.c (thread_db_use_events): New.
20813 (find_first_thread): Rename to...
20814 (find_one_thread): ...this. Update callers and messages. Do not
20815 call fatal. Check thread_db_use_events. Do not call
20816 change_inferior_id or new_thread_notify.
20817 (maybe_attach_thread): Update. Do not call new_thread_notify.
20818 (thread_db_init): Set thread_db_use_events. Check use_events.
20819 * utils.c (fatal, warning): Correct message prefix.
20820
20821 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
20822
20823 * Makefile.in (clean): Remove new files.
20824 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
20825 (powerpc-64.o, powerpc-64.c): New rules.
20826 * configure.srv: Use alternate register sets for powerpc64-*-linux*
20827 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
20828 with SPE.
20829 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
20830 SPE targets.
20831 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
20832 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
20833 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
20834 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
20835 (target_regsets): Add AltiVec and SPE register sets.
20836 * configure.ac: Check for AltiVec and SPE.
20837 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
20838 (ppc_fill_vrregset, ppc_store_vrregset): New.
20839 (target_regsets): Add AltiVec register set.
20840 * configure: Regenerated.
20841
20842 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
20843
20844 * linux-low.c (O_LARGEFILE): Define.
20845 (linux_read_memory): Use /proc/PID/mem.
20846 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
20847 * configure, config.in: Regenerated.
20848
20849 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
20850
20851 * linux-low.c (linux_wait_for_event): Do not pass signals while
20852 single-stepping.
20853
20854 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20855
20856 * win32-low.c (create_process): New.
20857 (win32_create_inferior): Use create_process instead of
20858 CreateProcess. If create_process failed retry appending an ".exe"
20859 suffix. Store the GetLastError result immediatelly after
20860 create_process calls and use it on the call to error.
20861
20862 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20863
20864 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
20865
20866 2007-08-23 Joel Brobecker <brobecker@adacore.com>
20867
20868 * configure.ac: Switch license to GPLv3.
20869
20870 2007-08-01 Michael Snyder <msnyder@access-company.com>
20871
20872 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
20873
20874 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
20875
20876 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
20877 typedef.
20878 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
20879 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
20880 CloseToolhelp32Snapshot.
20881 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
20882 CloseToolhelp32Snapshot.
20883
20884 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
20885
20886 * server.c (main): Check for inferior exit before main loop.
20887
20888 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
20889
20890 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
20891 instead of on tmp_desc.
20892
20893 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
20894 Daniel Jacobowitz <dan@codesourcery.com>
20895
20896 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
20897 (add_thread): Minor cleanups.
20898 (clear_inferiors): Move lower in the file. Clear the DLL
20899 list.
20900 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
20901 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
20902 (xml_escape_text): New.
20903 * server.c (handle_query): Handle qXfer:libraries:read. Report it
20904 for qSupported.
20905 (handle_v_cont): Report errors.
20906 (gdbserver_version): Update.
20907 (main): Correct size of own_buf. Do not report initial DLL events.
20908 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
20909 (unloaded_dll, xml_escape_text): New.
20910 * win32-low.c (enum target_waitkind): Update comments.
20911 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
20912 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
20913 (win32_EnumProcessModules, win32_GetModuleInformation)
20914 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
20915 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
20916 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
20917 (win32_Module32First, win32_Module32Next, load_toolhelp)
20918 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
20919 (get_child_debug_event): Handle DLL events.
20920 (win32_wait): Likewise.
20921
20922 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
20923
20924 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
20925 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
20926
20927 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20928
20929 * win32-low.c (handle_output_debug_string): Ignore event if not
20930 waiting.
20931
20932 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20933
20934 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
20935
20936 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
20937
20938 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
20939
20940 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
20941
20942 * inferiors.c (change_inferior_id): Add comment.
20943 * linux-low.c (check_removed_breakpoint): Add an early
20944 prototype. Improve debug output.
20945 (linux_attach): Doc update.
20946 (linux_detach_one_process, linux_detach): Clean up before releasing
20947 each process.
20948 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
20949 * linux-low.h (struct process_info): Doc improvement.
20950 * mem-break.c (delete_all_breakpoints): New.
20951 * mem-break.h (delete_all_breakpoints): New prototype.
20952 * thread-db.c (find_first_thread): New.
20953 (thread_db_create_event): Call it instead of
20954 thread_db_find_new_threads. Clean up unused variables.
20955 (maybe_attach_thread): Remove first thread handling.
20956 (thread_db_find_new_threads): Use find_first_thread.
20957 (thread_db_get_tls_address): Likewise.
20958
20959 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
20960
20961 * thread-db.c (thread_db_find_new_threads): Add prototype.
20962 (thread_db_create_event): Check for the main thread before adding
20963 a new thread.
20964 (maybe_attach_thread): Only enable event reporting if TID == 0.
20965 (thread_db_get_tls_address): Check for new threads.
20966
20967 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
20968
20969 * linux-low.c (linux_create_inferior): Try execv before execvp.
20970 * spu-low.c (spu_create_inferior): Likewise.
20971
20972 2007-06-13 Mike Frysinger <vapier@gentoo.org>
20973
20974 * linux-low.c (linux_create_inferior): Change execv to execvp.
20975 * spu-low.c (spu_create_inferior): Likewies.
20976
20977 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
20978
20979 * Makefile.in (clean): Clean new files instead of deleted ones.
20980 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
20981 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
20982 rules.
20983 * configure.srv: Specify XML files and new regformats for MIPS and
20984 MIPS64 GNU/Linux.
20985 * linux-mips-low.c (mips_num_regs): Set to only used registers.
20986 (mips_regmap): Do not fetch $0. Remove unused registers. Add
20987 an entry for the restart register.
20988 (mips_cannot_fetch_register, mips_cannot_store_register)
20989 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
20990 register names to match the XML descriptions.
20991 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
20992 restart register instead of $0.
20993
20994 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20995 Markus Deuling <deuling@de.ibm.com>
20996
20997 * remote-utils.c (decode_xfer_write): New function.
20998 * server.h (decode_xfer_write): Add prototype.
20999 * server.c (handle_query): Add PACKET_LEN argument. Support
21000 qXfer:spu:read and qXfer:spu:write packets.
21001 (main): Pass packet_len to handle_query.
21002 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
21003 * target.h (target_ops): Add qxfer_spu.
21004
21005 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
21006
21007 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
21008 accessing non-seekable spufs files.
21009
21010 2007-05-16 Markus Deuling <deuling@de.ibm.com>
21011
21012 * server.c (handle_query): Add reply for qC packet.
21013
21014 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21015 Leo Zayas <lerele@champenstudios@com>
21016
21017 * server.h (check_remote_input_interrupt_request): New function.
21018 * remote_utils.c (INVALID_DESCRIPTOR): New define.
21019 (remote_desc): Initialize with INVALID_DESCRIPTOR.
21020 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
21021 (check_remote_input_interrupt_request): New function.
21022 * server.h (check_remote_input_interrupt_request): Declare.
21023 * win32-low.c (winapi_DebugBreakProcess,
21024 winapi_GenerateConsoleCtrlEvent): New typedefs.
21025 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
21026 to 250 ms.
21027 (win32_wait): Check for remote interrupt request
21028 with check_remote_input_interrupt_request.
21029 (win32_request_interrupt): New function.
21030 (win32_target_op): Set request_interrupt to win32_request_interrupt.
21031
21032 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21033
21034 * win32-low.c (debug_registers_changed,
21035 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
21036 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
21037 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
21038 (thread_rec): Get context using the low target.
21039 (child_add_thread): Call thread_added on the low target,
21040 which does the same thing.
21041 (regptr): Delete.
21042 (do_initial_child_stuff): Remove debug registers references.
21043 Set context using the low target. Resume threads after
21044 setting the contexts.
21045 (child_continue): Remove dead variable. Remove debug
21046 registers references.
21047 (child_fetch_inferior_registers): Go through the low target.
21048 (do_child_store_inferior_registers): Remove.
21049 (child_store_inferior_registers): Go through the low target.
21050 (win32_resume): Remove debug registers references.
21051 Set context using the low target.
21052 (handle_exception): Change return type to void. Don't record
21053 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
21054 first chance exception.
21055 (get_child_debug_event): Change return type to void. Remove
21056 goto loop. Always return after waiting for debug event.
21057 (win32_wait): Convert to switch statement. Handle spurious
21058 events.
21059
21060 * win32-i386-low.c (debug_registers_changed,
21061 debug_registers_used): New.
21062 (initial_stuff): Rename to ...
21063 (i386_initial_stuff): ... this. Clear debug registers
21064 state variables.
21065 (store_debug_registers): Delete.
21066 (i386_get_thread_context): New.
21067 (load_debug_registers): Delete.
21068 (i386_set_thread_context): New.
21069 (i386_thread_added): New.
21070 (single_step): Rename to ...
21071 (i386_single_step): ... this.
21072 (do_fetch_inferior_registers): Rename to ...
21073 (i386_fetch_inferior_register): ... this.
21074 (i386_store_inferior_register): New.
21075 (the_low_target): Adapt to new interface.
21076
21077 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
21078 (arm_get_thread_context): New.
21079 (arm_set_thread_context): New.
21080 (regptr): New.
21081 (do_fetch_inferior_registers): Rename to ...
21082 (arm_fetch_inferior_register): ... this.
21083 (arm_store_inferior_register): New.
21084 (arm_wince_breakpoint): Reimplement as unsigned long.
21085 (arm_wince_breakpoint_len): Define.
21086 (the_low_target): Adapt to new interface.
21087
21088 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
21089 load_debug_registers. Add get_thread_context, set_thread_context,
21090 thread_added and store_inferior_register. Rename
21091 fetch_inferior_registers to fetch_inferior_register.
21092 (regptr): Remove declaration.
21093
21094 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21095
21096 * linux-low.c (linux_detach): Change return type to int. Return 0.
21097 * spu-low.c (spu_detach): Likewise.
21098
21099 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21100
21101 * target.h (target_ops): Change return type of detach to int.
21102 Add join.
21103 (join_inferior): New.
21104 * server.c (main): Don't skip detach support on mingw32.
21105 If the inferior doesn't support detaching return error.
21106 Call join_inferior instead of using waitpid.
21107 * linux-low.c (linux_join): New.
21108 (linux_target_op): Add linux_join.
21109 * spu-low.c (spu_join): New.
21110 (spu_target_ops): Add spu_join.
21111 * win32-low.c (win32_detach): Adapt to new interface.
21112 Reopen current_process_handle before detaching. Issue a child
21113 resume before detaching.
21114 (win32_join): New.
21115 (win32_target_op): Add win32_join.
21116
21117 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21118
21119 * win32-low.c (win32-attach): Fix return value.
21120 * target.h (target_ops): Describe ATTACH return values.
21121
21122 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21123
21124 * win32-low.c (GETPROCADDRESS): Define.
21125 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
21126 (winapi_DebugSetProcessKillOnExit): Likewise.
21127 (win32_create_inferior): Force usage of ansi CreateProcessA.
21128 (win32_attach): Use GETPROCADDRESS.
21129 (win32_detach): Likewise.
21130
21131 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21132
21133 * win32-low.c (win32_wait): Don't use WSTOPSIG.
21134
21135 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
21136
21137 * win32-low.c: Commit leftover changes from 2007-03-29.
21138
21139 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
21140
21141 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
21142 fields short instead of int. Add explicit padding.
21143 (i387_cache_to_fsave): Remove unnecessary casts.
21144 (i387_fsave_to_cache): Doc fix.
21145 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
21146
21147 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
21148
21149 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
21150 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
21151
21152 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
21153
21154 * configure.srv (arm*-*-mingw32ce*): Move near the other
21155 arm targets.
21156
21157 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
21158
21159 * configure.ac: Add errno checking.
21160 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
21161 sys/file.h and malloc.h.
21162 (AC_CHECK_DECLS): Add perror.
21163 (srv_mingwce): Handle.
21164 * configure.srv (i[34567]86-*-cygwin*): Add
21165 win32-i386-low.o to srv_tgtobj.
21166 (i[34567]86-*-mingw*): Likewise.
21167 (arm*-*-mingw32ce*): Add case.
21168 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
21169 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
21170 [__MINGW32CE__] (strerror): New function.
21171 [__MINGW32CE__] (errno): Define to GetLastError.
21172 [__MINGW32CE__] (COUNTOF): New macro.
21173 (remote_open): Remove extra close call.
21174 * mem-break.c (delete_breakpoint_at): New function.
21175 * mem-break.h (delete_breakpoint_at): Declare.
21176 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
21177 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
21178 [USE_WIN32API] (read, write): Add char* casts.
21179 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
21180 * server.h: Include wincecompat.h on Windows CE.
21181 [HAVE_ERRNO_H]: Check.
21182 (perror): Declare if not declared.
21183 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
21184 (perror_with_name): Remove errno declaration.
21185 * wincecompat.h: New.
21186 * wincecompat.c: New.
21187 * win32-low.h: New.
21188 * win32-arm-low.c: New.
21189 * win32-i386-low.c: New.
21190 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
21191 (OUTMSG2): Make it safe.
21192 (_T): New macro.
21193 (COUNTOF): New macro.
21194 (NUM_REGS): Get it from the low target.
21195 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
21196 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
21197 (thread_rec): Let low target handle debug registers.
21198 (child_add_thread): Likewise.
21199 (child_init_thread_list): Likewise.
21200 (continue_one_thread): Likewise.
21201 (regptr): New.
21202 (do_child_fetch_inferior_registers): Move to ...
21203 * win32-i386-low.c: ... here, and rename to ...
21204 (do_fetch_inferior_registers): ... this.
21205 * win32-low.c (child_fetch_inferior_registers):
21206 Go through the low target.
21207 (do_child_store_inferior_registers): Use regptr.
21208 (strwinerror): New function.
21209 (win32_create_inferior): Handle Windows CE.
21210 Use strwinerror instead of strerror on Windows error
21211 codes. Add program to the error output.
21212 Don't close the main thread handle on Windows CE.
21213 (win32_attach): Use coredll.dll on Windows CE.
21214 (win32_kill): Close current process and current
21215 thread handles.
21216 (win32_detach): Use coredll.dll on Windows CE.
21217 (win32_resume): Let low target handle debug registers, and
21218 step request.
21219 (handle_exception): Add/Remove initial breakpoint. Avoid
21220 non-existant WSTOPSIG on Windows CE.
21221 (win32_read_inferior_memory): Cast to remove warning.
21222 (win32_arch_string): Go through the low target.
21223 (initialize_low): Call set_breakpoint_data with the low
21224 target's breakpoint.
21225 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
21226 FOP_REGNUM, mappings): Move to ...
21227 * win32-i386-low.c: ... here.
21228 * win32-low.c (win32_thread_info): Move to ...
21229 * win32-low.h: ... here.
21230 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
21231 win32-arm-low.c and wincecompat.c.
21232 (all:): Add $EXEEXT.
21233 (install-only:): Likewise.
21234 (gdbserver:): Likewise.
21235 (gdbreplay:): Likewise.
21236 * config.in: Regenerate.
21237 * configure: Regenerate.
21238
21239 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
21240
21241 * win32-low.c: Rename typedef thread_info to
21242 win32_thread_info throughout.
21243
21244 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
21245
21246 * win32-i386-low.c: Rename to ...
21247 * win32-low.c: ... this.
21248 * configure.srv: Replace win32-i386-low.o with win32-low.o.
21249 * Makefile.in: Likewise.
21250
21251 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
21252
21253 * remote-utils.c (monitor_output): Constify msg parameter.
21254 * server.h (monitor_output): Likewise.
21255 * win32-i386-low.c (handle_output_debug_string): New.
21256 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
21257 handle_output_debug_string.
21258 (get_child_debug_event): Likewise.
21259
21260 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
21261
21262 * server.c (main): Correct strtoul check.
21263
21264 2007-03-27 Jon Ringle <jon@ringle.org>
21265
21266 * linux-low.c: Check __ARCH_HAS_MMU__ also.
21267
21268 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
21269
21270 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
21271
21272 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
21273
21274 * terminal.h: Check HAVE_SGTTY_H.
21275
21276 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
21277
21278 * remote-utils.c (remote_open): Print out the assigned port number.
21279
21280 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
21281
21282 * remote-utils.c (monitor_output): New function.
21283 * server.c (debug_threads): Define here.
21284 (monitor_show_help): New function.
21285 (handle_query): Handle qRcmd.
21286 (main): Do not handle 'd' packet.
21287 * server.h (debug_threads, remote_debug, monitor_output): Declare.
21288 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
21289 of debug_threads.
21290
21291 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21292
21293 * Makefile.in (EXEEXT): New.
21294 (clean): Use $(EXEEXT).
21295
21296 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21297
21298 * target.h (target_ops): Rename send_signal to request_interrupt,
21299 and remove enum target_signal parameter.
21300 * linux-low.c (linux_request_interrupt): Rename from
21301 linux_send_signal, and always send SIGINT.
21302 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
21303 and always send SIGINT.
21304 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
21305 of send_signal.
21306 (input_interrupt): Likewise.
21307
21308 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21309
21310 * server.c (get_features_xml): Check if target implemented
21311 arch_string.
21312 * win32-i386-low.c (win32_arch_string): New.
21313 (win32_target_ops): Add win32_arch_string as arch_string member.
21314
21315 2007-02-22 Markus Deuling <deuling@de.ibm.com>
21316
21317 * spu-low.c (spu_arch_string): New.
21318 (spu_target_ops): Add spu_arch_string.
21319
21320 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
21321
21322 * remote-utils.c: Remove HAVE_TERMINAL_H check.
21323 * configure.ac: Do not check for terminal.h.
21324 * configure, config.in: Regenerated.
21325
21326 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
21327
21328 * Makefile.in (OBS): Add $(XML_BUILTIN).
21329 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
21330 (clean): Update.
21331 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
21332 (arm-with-iwmmxt.c): New.
21333 * config.in, configure: Regenerate.
21334 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
21335 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
21336 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
21337 (arm*-*-linux*): Add iWMMXt and regset support.
21338 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
21339 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
21340 (arm_store_wmmxregset, target_regsets): New.
21341 * server.c (get_features_xml): Take annex argument. Check builtin
21342 XML documents.
21343 (handle_query): Handle multiple annexes.
21344
21345 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
21346
21347 * remote-utils.c [USE_WIN32API] (read, write): Define.
21348 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
21349 write.
21350
21351 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
21352
21353 * linux-i386-low.c (the_low_target): Set arch_string.
21354 * linux-x86-64-low.c (the_low_target): Likewise.
21355 * linux-low.c (linux_arch_string): New.
21356 (linux_target_ops): Add it.
21357 * linux-low.h (struct linux_target_ops): Add arch_string.
21358 * server.c (write_qxfer_response): Use const void * for DATA.
21359 (get_features_xml): New.
21360 (handle_query): Handle qXfer:features:read. Report it for qSupported.
21361 * target.h (struct target_ops): Add arch_string method.
21362
21363 2007-01-03 Denis Pilat <denis.pilat@st.com>
21364 Daniel Jacobowitz <dan@codesourcery.com>
21365
21366 * linux-low.c (linux_kill): Handle being called with no threads.
21367 * win32-i386-low.c (win32_kill): Likewise.
21368 (get_child_debug_event): Clear current_process_handle.
21369
21370 2006-12-30 Denis PILAT <denis.pilat@st.com>
21371 Daniel Jacobowitz <dan@codesourcery.com>
21372
21373 * remote-utils.c (remote_open): Check the type of specified
21374 serial port devices before opening them.
21375 * server.c (main): Kill the inferior if an error occurs during
21376 the first remote_open.
21377
21378 2006-12-05 Markus Deuling <deuling@de.ibm.com>
21379
21380 * README: Update supported targets.
21381
21382 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
21383
21384 * Makefile.in (clean): Remove reg-mips64.c.
21385 (reg-mips64.c, reg-mips64.o): New rules.
21386 * configure.srv: Handle mips64. Include regset support for mips.
21387 * linux-mips-low.c (union mips_register): New.
21388 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
21389 (mips_breakpoint, mips_breakpoint_at): Use int.
21390 (mips_collect_register, mips_supply_register)
21391 (mips_collect_register_32bit, mips_supply_register_32bit)
21392 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
21393 (mips_store_fpregset, target_regsets): New.
21394 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
21395
21396 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
21397
21398 * configure.srv: Add target "spu*-*-*".
21399 * Makefile.in (clean): Remove reg-spu.c.
21400 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
21401 * spu-low.c: New file.
21402
21403 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
21404
21405 * configure.ac: Correct td_thr_tls_get_addr test.
21406 * configure: Regenerated.
21407
21408 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
21409
21410 * linux-low.c (linux_wait_for_event): Reformat. Use the
21411 pass_signals array.
21412 * remote-utils.c (decode_address_to_semicolon): New.
21413 * server.c (pass_signals, handle_general_set): New.
21414 (handle_query): Mention QPassSignals for qSupported.
21415 (main): Call handle_general_set.
21416 * server.h (pass_signals, decode_address_to_semicolon): New.
21417
21418 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
21419
21420 * server.c (handle_query): Correct error handling for read_auxv.
21421
21422 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
21423
21424 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
21425 and srv_linux_thread_db to yes.
21426 * linux-s390-low.c (s390_fill_gregset): New function.
21427 (target_regsets): Define data structure.
21428
21429 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
21430
21431 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
21432 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
21433 * config.in, configure: Regenerated.
21434 * inferiors.c (gdb_id_to_thread): New function.
21435 (gdb_id_to_thread_id): Use it.
21436 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
21437 * linux-low.h (struct process_info): Add th member.
21438 (thread_db_get_tls_address): New prototype.
21439 * remote-utils.c (decode_address): Make non-static.
21440 * server.c (handle_query): Handle qGetTLSAddr.
21441 * server.h (gdb_id_to_thread, decode_address): New prototypes.
21442 * target.h (struct target_ops): Add get_tls_address.
21443 * thread-db.c (maybe_attach_thread): Save the thread handle.
21444 (thread_db_get_tls_address): New.
21445
21446 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
21447
21448 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
21449 (linux_resume_one_process): Take a siginfo_t *. Update all
21450 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
21451 (struct pending_signals): Add a siginfo_t.
21452 (linux_wait_for_process): Always set last_status.
21453 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
21454 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
21455 * linux-low.h (struct process_info): Add last_status.
21456
21457 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
21458
21459 * remote-utils.c (try_rle): New function.
21460 (putpkt_binary): Use it.
21461
21462 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
21463
21464 * Makefile.in (clean): Clean reg-x86-64-linux.c.
21465 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
21466 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
21467 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
21468 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
21469 point registers.
21470
21471 2006-08-08 Richard Sandiford <richard@codesourcery.com>
21472
21473 * server.c (terminal_fd): New variable.
21474 (old_foreground_pgrp): Likewise.
21475 (restore_old_foreground_pgrp): New function.
21476 (start_inferior): Record the terminal file descriptor in terminal_fd
21477 and its original foreground group in old_foreground_pgrp. Register
21478 restore_old_foreground_pgrp with atexit().
21479
21480 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
21481
21482 * server.c (handle_query): Correct qPart to qXfer.
21483
21484 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
21485
21486 * configure.ac: Check for more headers which are missing on
21487 Windows. Automatically supply -lwsock32 and USE_WIN32API.
21488 * configure.srv: Add Cygwin and mingw32.
21489 * remote-utils.c: Don't include headers unconditionally which
21490 are missing on mingw32. Include <winsock.h> for mingw32.
21491 (remote_open): Adjust for mingw32 support. Flush
21492 standard error after writing to it.
21493 (remote_close, putpkt_binary, input_interrupt, block_async_io)
21494 (unblock_async_io, enable_async_io, disable_async_io)
21495 (readchar, getpkt): Update for Winsock support.
21496 (prepare_resume_reply): Expect a protocol signal number.
21497 * server.c: Disable <sys/wait.h> on mingw32.
21498 (start_inferior): Adjust for mingw32 support. Flush
21499 standard error after writing to it.
21500 (attach_inferior): Likewise. Use protocol signal
21501 numbers.
21502 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
21503 and names.
21504 * win32-i386-low.c: New file.
21505 * Makefile.in (XM_CLIBS): Set.
21506 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
21507 (win32-i386-low.o): New dependency rule.
21508 * linux-low.c (linux_wait): Use target signal numbers.
21509 * target.h (struct target_ops): Doc fix.
21510 * server.h (target_signal_to_name): New prototype.
21511 * gdbreplay.c: Don't include headers unconditionally which
21512 are missing on mingw32. Include <winsock.h> for mingw32.
21513 (remote_close, remote_open): Adjust for Winsock support.
21514 * configure, config.in: Regenerated.
21515
21516 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
21517
21518 * server.c (decode_xfer_read, write_qxfer_response): New.
21519 (handle_query): Take a packet length argument. Handle
21520 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
21521 the qSupported response.
21522 (main): Update call to handle_query.
21523
21524 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
21525
21526 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
21527 (putpkt_binary): Renamed from putpkt and adjusted for binary
21528 data.
21529 (putpkt): New wrapper for putpkt_binary.
21530 (readchar): Don't mask off the high bit.
21531 (decode_X_packet): New function.
21532 * server.c (main): Call putpkt_binary if a handler sets the packet
21533 length. Save the length of the incoming packet. Handle 'X'.
21534 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
21535
21536 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
21537
21538 * server.c (handle_query): Handle qSupported.
21539
21540 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21541
21542 * remote-utils.c (all_symbols_looked_up): New variable.
21543 (look_up_one_symbol): Check it.
21544 * server.h (look_up_one_symbol): New declaration.
21545 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
21546
21547 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21548
21549 * Makefile.in (linux-arm-low.o): Update dependencies.
21550 * linux-arm-low.c: Include "gdb_proc_service.h".
21551 (PTRACE_GET_THREAD_AREA): Define.
21552 (ps_get_thread_area): New function.
21553
21554 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
21555
21556 * configure.srv (m68k*-*-uclinux*): New target.
21557 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
21558 (linux_resume_one_process): Remove extraneous cast.
21559 (linux_read_offsets): New.
21560 (linux_target_op): Add linux_read_offsets on mmuless systems.
21561 * server.c (handle_query): Add qOffsets logic.
21562 * target.h (struct target_ops): Add read_offsets.
21563
21564 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21565
21566 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
21567 (PTRACE_GET_THREAD_AREA): Define.
21568 (ps_get_thread_area): New function.
21569 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
21570 (linux-x86-64-low.o): Update.
21571
21572 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21573
21574 * configure.ac: Remove checks for prfpregset_t.
21575 * gdb_proc_service.h: New file.
21576 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
21577 new "gdb_proc_service.h".
21578 * proc-service.c: Likewise.
21579 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
21580 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
21581 * Makefile.in (gdb_proc_service_h): Updated.
21582 * configure, config.in: Regenerated.
21583
21584 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21585
21586 * remote-utils.c (prepare_resume_reply): Move declaration
21587 of gdb_id_from_wait to the top of the block.
21588
21589 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
21590
21591 * linux-low.c (regsets_store_inferior_registers): Read the regset
21592 from the target before filling it.
21593
21594 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
21595
21596 * server.c (attach_inferior): Return SIGTRAP for a successful
21597 attach.
21598
21599 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
21600
21601 * Makefile.in (OBS): Add version.o.
21602 (STAGESTUFF): Delete.
21603 (version.o): Add dependencies.
21604 (version.c): Replace rule.
21605 (clean): Remove version.c.
21606 * server.c (gdbserver_version): New.
21607 (gdbserver_usage): Use printf.
21608 (main): Handle --version and --help.
21609 * server.h (version, host_name): Add declarations.
21610
21611 2005-12-23 Eli Zaretskii <eliz@gnu.org>
21612
21613 * linux-arm-low.c:
21614 * linux-arm-low.c:
21615 * inferiors.c:
21616 * i387-fp.h:
21617 * i387-fp.c:
21618 * gdbreplay.c:
21619 * regcache.c:
21620 * proc-service.c:
21621 * mem-break.h:
21622 * mem-break.c:
21623 * linux-x86-64-low.c:
21624 * linux-sh-low.c:
21625 * linux-s390-low.c:
21626 * linux-ppc64-low.c:
21627 * linux-ppc-low.c:
21628 * linux-mips-low.c:
21629 * linux-m68k-low.c:
21630 * linux-m32r-low.c:
21631 * linux-low.h:
21632 * linux-low.c:
21633 * linux-ia64-low.c:
21634 * linux-i386-low.c:
21635 * linux-crisv32-low.c:
21636 * thread-db.c:
21637 * terminal.h:
21638 * target.h:
21639 * target.c:
21640 * server.h:
21641 * server.c:
21642 * remote-utils.c:
21643 * regcache.h:
21644 * utils.c:
21645 * Makefile.in:
21646 * configure.ac:
21647 * gdbserver.1: Add (C) after Copyright. Update the FSF
21648 address.
21649
21650 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
21651
21652 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
21653 (arm_breakpoint_at): Recognize both breakpoints.
21654 (the_low_target): Use the correct breakpoint instruction.
21655
21656 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
21657
21658 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
21659 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
21660 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
21661 (the_low_target): Update.
21662
21663 2005-10-25 Andreas Schwab <schwab@suse.de>
21664
21665 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
21666
21667 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
21668 (ia64_num_regs): Reduce to 462.
21669
21670 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
21671
21672 * acinclude.m4: Correct quoting.
21673 * aclocal.m4: Regenerated.
21674
21675 Suggested by SZOKOVACS Robert <szo@ies.hu>:
21676 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
21677 (thread_db_init): Call thread_db_err_str.
21678 * configure.ac: Check for TD_VERSION.
21679 * config.in, configure: Regenerated.
21680
21681 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21682
21683 * server.h (error, fatal, warning): Add ATTR_FORMAT.
21684
21685 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21686
21687 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
21688 is not available. Define HAVE_PTRACE_GETREGS if it is.
21689 * config.in, configure: Regenerated.
21690 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
21691 * linux-i386-low.c, linux-m68k-low.c: Update to use
21692 HAVE_PTRACE_GETREGS.
21693 * linux-low.c (regsets_fetch_inferior_registers)
21694 (regsets_store_inferior_registers): Only return 0 if we processed
21695 GENERAL_REGS.
21696 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
21697 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
21698
21699 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21700
21701 * inferiors.c (struct thread_info): Add gdb_id.
21702 (add_thread): Add gdb_id argument.
21703 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
21704 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
21705 calls to add_thread.
21706 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
21707 * server.c (handle_query): Use thread_to_gdb_id.
21708 (handle_v_cont, main): Use gdb_id_to_thread_id.
21709 * server.h (add_thread): Update prototype.
21710 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
21711 prototypes.
21712
21713 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21714
21715 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
21716 left-padded registers.
21717 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
21718 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
21719
21720 2005-07-01 Steve Ellcey <sje@cup.hp.com>
21721
21722 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
21723 * configure: Regenerate.
21724 * config.in: Regenerate.
21725 * server.h (NEED_DECLARATION_STRERROR):
21726 Replace with !HAVE_DECL_STRERROR.
21727
21728 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
21729
21730 * linux-low.c (linux_wait, linux_send_signal): Don't test
21731 an unsigned long variable for > 0 if it could be MAX_ULONG.
21732 * server.c (myresume): Likewise.
21733 * target.c (set_desired_inferior): Likewise.
21734
21735 2005-06-13 Mark Kettenis <kettenis@gnu.org>
21736
21737 * configure.ac: Simplify and improve check for socklen_t.
21738 * configure, config.in: Regenerate.
21739
21740 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
21741
21742 * acconfig.h: Remove.
21743 * configure.ac: Add a test for socklen_t. Use three-argument
21744 AC_DEFINE throughout.
21745 * config.in: Regenerated using autoheader 2.59.
21746 * configure: Regenerated.
21747
21748 * gdbreplay.c (socklen_t): Provide a default.
21749 (remote_open): Use socklen_t.
21750 * remote-utils.c (socklen_t): Provide a default.
21751 (remote_open): Use socklen_t.
21752 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
21753 unsigned char.
21754
21755 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
21756 char for buffers.
21757 * linux-low.c (linux_read_memory, linux_write_memory)
21758 (linux_read_auxv): Likewise.
21759 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
21760 (check_mem_write): Likewise.
21761 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
21762 Likewise.
21763 * regcache.c (struct inferior_rgcache_data, registers_to_string)
21764 (registers_from_string, register_data): Likewise.
21765 * server.c (handle_query, main): Likewise.
21766 * server.h (convert_ascii_to_int, convert_int_to_ascii)
21767 (decode_M_packet): Likewise.
21768 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
21769 * target.h (struct target_ops): Update read_memory, write_memory,
21770 and read_auxv.
21771 (read_inferior_memory, write_inferior_memory): Update.
21772 * linux-low.h (struct linux_target_ops): Change type of breakpoint
21773 to unsigned char *.
21774 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
21775 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
21776 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
21777 linux-s390-low.c, linux-sh-low.c: Update for changes in
21778 read_inferior_memory and the_low_target->breakpoint.
21779
21780 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
21781
21782 * Makefile.in (SFILES): Add linux-ppc64-low.c.
21783 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
21784 * configure.srv: Add powerpc64-*-linux*.
21785 * linux-ppc64-low.c: New file.
21786
21787 2005-05-23 Orjan Friberg <orjanf@axis.com>
21788
21789 * linux-cris-low.c: New file with support for CRIS.
21790 * linux-crisv32-low.c: Ditto for CRISv32.
21791 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
21792 (clean): Add reg-cris.c and reg-crisv32.c.
21793 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
21794 reg-crisv32.o, and reg-crisv32.c to make rules.
21795 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
21796 recognized targets.
21797
21798 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
21799
21800 * linux-low.c (fetch_register): Ensure buffer size is a multiple
21801 of sizeof (PTRACE_XFER_TYPE).
21802 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
21803
21804 2005-05-12 Orjan Friberg <orjanf@axis.com>
21805
21806 * target.h (struct target_ops): Add insert_watchpoint,
21807 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
21808 pointers for hardware watchpoint support.
21809 * linux-low.h (struct linux_target_ops): Ditto.
21810 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
21811 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
21812 to linux_target_ops.
21813 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
21814 reply packet.
21815 * server.c (main): Recognize 'Z' and 'z' packets.
21816
21817 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
21818
21819 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
21820 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
21821 (the_low_target): Add new members.
21822
21823 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21824
21825 * proc-service.c (ps_lgetregs): Search all_processes instead of
21826 all_threads.
21827
21828 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21829
21830 * server.c (start_inferior): Change return type to int.
21831 (attach_inferior): Change sigptr to int *.
21832 (handle_v_cont, handle_v_requests): Change signal to int *.
21833 (main): Change signal to int.
21834
21835 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
21836
21837 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
21838 * configure.srv: Add m32r*-*-linux*.
21839 * linux-m32r-low.c: New file.
21840
21841 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
21842
21843 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
21844
21845 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21846
21847 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
21848 Take unsigned long arguments for PIDs.
21849 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
21850 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
21851 (wait_for_sigstop, linux_resume_one_process)
21852 (regsets_fetch_inferior_registers, linux_send_signal)
21853 (linux_read_auxv): Likewise. Update the types of variables holding
21854 PIDs. Update format string specifiers.
21855 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
21856 * remote-utils.c (prepare_resume_reply): Likewise.
21857 * server.c (cont_thread, general_thread, step_thread)
21858 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
21859 unsigned long.
21860 (handle_query): Update format specifiers.
21861 (handle_v_cont, main): Use strtoul for thread IDs.
21862 * server.h (struct inferior_list_entry): Use unsigned long for ID.
21863 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
21864 (general_thread, step_thread, thread_from_wait)
21865 (old_thread_from_wait): Update.
21866 * target.h (struct thread_resume): Use unsigned long for THREAD.
21867 (struct target_ops): Use unsigned long for arguments to attach and
21868 thread_alive.
21869
21870 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
21871
21872 * acinclude.m4: Include bfd/bfd.m4 directly.
21873 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
21874 <agriffis@toolchain.org>.
21875 * aclocal.m4, configure: Regenerated.
21876
21877 2005-01-07 Andrew Cagney <cagney@gnu.org>
21878
21879 * configure.ac: Rename configure.in, require autoconf 2.59.
21880 * configure: Re-generate.
21881
21882 2004-12-08 Daniel Jacobowitz <dan@debian.org>
21883
21884 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
21885 LIBS when finished.
21886 * aclocal.m4: Regenerated.
21887 * configure: Regenerated.
21888
21889 2004-11-21 Andreas Schwab <schwab@suse.de>
21890
21891 * linux-m68k-low.c (m68k_num_gregs): Define.
21892 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
21893 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
21894 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
21895 (m68k_breakpoint_at): New. Add to the_low_target.
21896
21897 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
21898 srv_linux_thread_db to yes.
21899
21900 2004-10-20 Joel Brobecker <brobecker@gnat.com>
21901
21902 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
21903 (ARCH_SET_FS): Likewise.
21904 (ARCH_GET_FS): Likewise.
21905 (ARCH_GET_GS): Likewise.
21906
21907 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21908
21909 * linux-i386-low.c (ps_get_thread_area): New.
21910 * linux-x86-64-low.c (ps_get_thread_area): New.
21911 * linux-low.c: Include <sys/syscall.h>.
21912 (linux_kill_one_process): Don't kill the first thread here.
21913 (linux_kill): Kill the first thread here.
21914 (kill_lwp): New function.
21915 (send_sigstop, linux_send_signal): Use it.
21916 * proc-service.c: Clean up #ifdefs.
21917 (fpregset_info): Delete.
21918 (ps_lgetregs): Update and enable implementation.
21919 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
21920 implementations.
21921 * remote-utils.c (struct sym_cache, symbol_cache): New.
21922 (input_interrupt): Print a clearer message.
21923 (async_io_enabled): New variable.
21924 (enable_async_io, disable_async_io): Use it. Update comments.
21925 (look_up_one_symbol): Use the symbol cache.
21926 * thread-db.c (thread_db_look_up_symbols): New function.
21927 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
21928
21929 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21930
21931 * configure.in: Test for -rdynamic.
21932 * configure: Regenerated.
21933 * Makefile (INTERNAL_LDFLAGS): New.
21934 (gdbserver, gdbreplay): Use it.
21935
21936 2004-09-02 Andrew Cagney <cagney@gnu.org>
21937
21938 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
21939
21940 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
21941
21942 * linux-low.c (linux_wait): Clear all_processes list also.
21943
21944 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21945
21946 * linux-low.c: Include <errno.h>. Remove extern declaration of
21947 errno.
21948
21949 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21950
21951 * gdbreplay.c, server.h, utils.c: Update copyright years.
21952
21953 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21954
21955 * server.c (main): Print child status or termination signal from
21956 variable 'signal', not 'sig'.
21957
21958 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21959
21960 * linux-low.c (linux_read_memory): Change return type to
21961 int. Check for and return error from ptrace().
21962 * target.c (read_inferior_memory): Change return type to int. Pass
21963 back return status from the_target->read_memory().
21964 * target.h (struct target_ops): Adapt *read_memory() prototype.
21965 Update comment.
21966 (read_inferior_memory): Adapt prototype.
21967 * server.c (main): Return an error packet if
21968 read_inferior_memory() returns an error.
21969
21970 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
21971
21972 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
21973 Unify with other clean targets.
21974
21975 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21976
21977 * server.c (handle_v_cont): Call set_desired_inferior.
21978
21979 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21980
21981 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
21982
21983 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21984
21985 * linux-low.c (linux_wait): Unblock async I/O.
21986 (linux_resume): Block and enable async I/O.
21987 * remote-utils.c (block_async_io, unblock_async_io): New functions.
21988 * server.h (block_async_io, unblock_async_io): Add prototypes.
21989
21990 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21991
21992 * remote-utils.c (remote_open): Print a status notice after
21993 opening a TCP port.
21994 * server.c (attach_inferior): Print a status notice after
21995 attaching.
21996
21997 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21998
21999 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
22000
22001 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
22002
22003 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
22004 error packet.
22005 * server.c, target.h: Update copyright years.
22006
22007 2004-02-25 Roland McGrath <roland@redhat.com>
22008
22009 * target.h (struct target_ops): New member `read_auxv'.
22010 * server.c (handle_query): Handle qPart:auxv:read: query using that.
22011 * linux-low.c (linux_read_auxv): New function.
22012 (linux_target_ops): Initialize `read_auxv' member to that.
22013
22014 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
22015
22016 Committed by Jim Blandy <jimb@redhat.com>.
22017
22018 * linux-s390-low.c (s390_num_regs): Update.
22019 (s390_regmap): Remove control registers. Use __s390x__ predefine
22020 instead of GPR_SIZE to distiguish s390 and s390x targets.
22021
22022 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
22023
22024 * linux-low.c: Update copyright year.
22025 (check_removed_breakpoint): Clear pending_is_breakpoint.
22026 (linux_set_resume_request, linux_queue_one_thread)
22027 (resume_status_pending_p): New functions.
22028 (linux_continue_one_thread): Use process->resume.
22029 (linux_resume): Only resume threads if there are no pending events.
22030 * linux-low.h (struct process_info): Add resume request
22031 pointer.
22032
22033 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
22034
22035 * regcache.c (new_register_cache): Clear the allocated register
22036 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
22037
22038 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
22039
22040 * linux-low.c (linux_resume): Take a struct thread_resume *
22041 argument.
22042 (linux_wait): Update call.
22043 (resume_ptr): New static variable.
22044 (linux_continue_one_thread): Renamed from
22045 linux_continue_one_process. Use resume_ptr.
22046 (linux_resume): Use linux_continue_one_thread.
22047 * server.c (handle_v_cont, handle_v_requests): New functions.
22048 (myresume): New function.
22049 (main): Handle 'v' case.
22050 * target.h (struct thread_resume): New type.
22051 (struct target_ops): Change argument of "resume" to struct
22052 thread_resume *.
22053 (myresume): Delete macro.
22054
22055 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
22056
22057 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
22058 (uninstall): Support DESTDIR.
22059
22060 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
22061
22062 * configure.srv: Add xscale*linux copy of arm*linux entry.
22063
22064 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
22065
22066 * linux-arm-low.c (arm_reinsert_addr): New function.
22067 (the_low_target): Add arm_reinsert_addr.
22068
22069 2003-07-08 Mark Kettenis <kettenis@gnu.org>
22070
22071 * mem-break.c: Remove whitespace at end of file.
22072
22073 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
22074
22075 * configure.in: Check whether we need to prototype strerror.
22076 * server.h: Optionally prototype strerror.
22077 * gdbreplay.c (perror_with_name): Use strerror.
22078 * linux-low.c (linux_attach_lwp): Use strerror.
22079 * utils.c (perror_with_name): Use strerror.
22080 * config.in, configure: Regenerated.
22081
22082 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
22083
22084 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
22085 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
22086
22087 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
22088
22089 * Makefile.in (SFILES): Update.
22090 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
22091 low-sun3.c: Remove files.
22092
22093 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
22094
22095 * linux-low.c: Move comment to linux_thread_alive where it belonged.
22096 (linux_detach_one_process, linux_detach): New functions.
22097 (linux_target_ops): Add linux_detach.
22098 * server.c (main): Handle 'D' packet.
22099 * target.h (struct target_ops): Add "detach" member.
22100 (detach_inferior): Define.
22101
22102 2003-06-13 Mark Kettenis <kettenis@gnu.org>
22103
22104 From Kelley Cook <kelleycook@wideopenwest.com>:
22105 * configure.srv: Accept i[34567]86 variants.
22106
22107 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
22108
22109 * linux-low.c (linux_wait_for_event): Correct comment typos.
22110 (linux_resume_one_process): Call check_removed_breakpoint.
22111 (linux_send_signal): New function.
22112 (linux_target_ops): Add linux_send_signal.
22113 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
22114 of kill.
22115 * target.h (struct target_ops): Add send_signal.
22116
22117 2003-05-29 Jim Blandy <jimb@redhat.com>
22118
22119 * linux-low.c (usr_store_inferior_registers): Transfer buf in
22120 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
22121 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
22122 away part of the register's value.
22123
22124 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
22125
22126 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
22127 (linux_wait_for_event, linux_init_signals): Likewise.
22128
22129 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
22130
22131 * configure.in: Check for stdlib.h.
22132 * configure: Regenerated.
22133 * config.in: Regenerated.
22134
22135 2003-01-04 Andreas Schwab <schwab@suse.de>
22136
22137 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
22138
22139 2003-01-02 Andrew Cagney <ac131313@redhat.com>
22140
22141 * Makefile.in: Remove obsolete code.
22142
22143 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
22144
22145 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
22146 defined(PT_FPR0_HI).
22147
22148 2002-11-17 Stuart Hughes <seh@zee2.com>
22149
22150 * linux-arm-low.c (arm_num_regs): Increase.
22151 (arm_regmap): Include status register.
22152
22153 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
22154
22155 * linux-low.c (register_addr): Remove incorrect -1 check.
22156
22157 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
22158
22159 * linux-low.c (linux_create_inferior): Call setpgid. Return
22160 the new PID.
22161 (unstopped_p, linux_signal_pid): Remove.
22162 (linux_target_ops): Remove linux_signal_pid.
22163 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
22164 global instead of target method.
22165 * target.h (struct target_ops): Remove signal_pid. Update comment
22166 for create_inferior.
22167 * server.c (signal_pid): New variable.
22168 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
22169 gdbserver. Set the child to be the foreground process group.
22170 (attach_inferior): Set signal_pid.
22171
22172 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
22173
22174 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
22175
22176 2002-08-20 Jim Blandy <jimb@redhat.com>
22177
22178 * Makefile.in (LDFLAGS): Allow the configure script to establish a
22179 default for this.
22180
22181 2002-08-01 Andrew Cagney <cagney@redhat.com>
22182
22183 * Makefile.in: Make chill references obsolete.
22184
22185 2002-07-24 Kevin Buettner <kevinb@redhat.com>
22186
22187 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
22188 * configure: Regenerate.
22189 * config.in: Regenerate.
22190
22191 2002-07-09 David O'Brien <obrien@FreeBSD.org>
22192
22193 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
22194 (perror_with_name, remote_close, remote_open, expect, play): Static.
22195
22196 2002-07-04 Michal Ludvig <mludvig@suse.cz>
22197
22198 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
22199 byte offsets instead of an array of indexes.
22200 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
22201
22202 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
22203
22204 * regcache.c: Add comment.
22205
22206 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
22207
22208 * thread-db.c: New file.
22209 * proc-service.c: New file.
22210 * acinclude.m4: New file.
22211 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
22212 proc-service.o, and thread-db.o.
22213 (linux-low.o): Add USE_THREAD_DB.
22214 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
22215 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
22216 * aclocal.m4: Regenerated.
22217 * config.in: Regenerated.
22218 * configure: Regenerated.
22219 * configure.in: Check for proc_service.h, sys/procfs.h,
22220 thread_db.h, and linux/elf.h headrs.
22221 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
22222 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
22223 Check for -lthread_db and thread support.
22224 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
22225 PowerPC, and SuperH.
22226 * i387-fp.c: Constify arguments.
22227 * i387-fp.h: Likewise.
22228 * inferiors.c: (struct thread_info): Renamed from
22229 `struct inferior_info'. Remove PID member. Use generic inferior
22230 list header. All uses updated.
22231 (inferiors, signal_pid): Removed.
22232 (all_threads): New variable.
22233 (get_thread): Define.
22234 (add_inferior_to_list): New function.
22235 (for_each_inferior): New function.
22236 (change_inferior_id): New function.
22237 (add_inferior): Removed.
22238 (remove_inferior): New function.
22239 (add_thread): New function.
22240 (free_one_thread): New function.
22241 (remove_thread): New function.
22242 (clear_inferiors): Use for_each_inferior and free_one_thread.
22243 (find_inferior): New function.
22244 (find_inferior_id): New function.
22245 (inferior_target_data): Update argument type.
22246 (set_inferior_target_data): Likewise.
22247 (inferior_regcache_data): Likewise.
22248 (set_inferior_regcache_data): Likewise.
22249 * linux-low.c (linux_bp_reinsert): Remove.
22250 (all_processes, stopping_threads, using_thrads)
22251 (struct pending_signals, debug_threads, pid_of): New.
22252 (inferior_pid): Replace with macro.
22253 (struct inferior_linux_data): Remove.
22254 (get_stop_pc, add_process): New functions.
22255 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
22256 Use add_process and add_thread.
22257 (linux_attach_lwp): New function, based on old linux_attach. Use
22258 add_process and add_thread. Set stop_expected for new threads.
22259 (linux_attach): New function.
22260 (linux_kill_one_process): New function.
22261 (linux_kill): Kill all LWPs.
22262 (linux_thread_alive): Use find_inferior_id.
22263 (check_removed_breakpoints, status_pending_p): New functions.
22264 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
22265 Update. Use WNOHANG. Wait for cloned processes also. Update process
22266 struct for the found process.
22267 (linux_wait_for_event): New function.
22268 (linux_wait): Use it. Support LWPs.
22269 (send_sigstop, wait_for_sigstop, stop_all_processes)
22270 (linux_resume_one_process, linux_continue_one_process): New functions.
22271 (linux_resume): Support LWPs.
22272 (REGISTER_RAW_SIZE): Remove.
22273 (fetch_register): Use register_size instead. Call supply_register.
22274 (usr_store_inferior_registers): Likewise. Call collect_register.
22275 Fix recursive case.
22276 (regsets_fetch_inferior_registers): Improve error message.
22277 (regsets_store_inferior_registers): Add debugging.
22278 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
22279 (unstopped_p, linux_signal_pid): New functions.
22280 (linux_target_ops): Add linux_signal_pid.
22281 (linux_init_signals): New function.
22282 (initialize_low): Call it. Initialize using_threads.
22283 * regcache.c (inferior_regcache_data): Add valid
22284 flag.
22285 (get_regcache): Fetch registers lazily. Add fetch argument
22286 and update all callers.
22287 (regcache_invalidate_one, regcache_invalidate): New
22288 functions.
22289 (new_register_cache): Renamed from create_register_cache.
22290 Return the new regcache.
22291 (free_register_cache): Change argument to a void *.
22292 (registers_to_string, registers_from_string): Call get_regcache
22293 with fetch flag set.
22294 (register_data): Make static. Pass fetch flag to get_regcache.
22295 (supply_register): Call get_regcache with fetch flag clear.
22296 (collect_register): Call get_regcache with fetch flag set.
22297 (collect_register_as_string): New function.
22298 * regcache.h: Update.
22299 * remote-utils.c (putpkt): Flush after debug output and use
22300 stderr.
22301 Handle input interrupts while waiting for an ACK.
22302 (input_interrupt): Use signal_pid method.
22303 (getpkt): Flush after debug output and use stderr.
22304 (outreg): Use collect_register_as_string.
22305 (new_thread_notify, dead_thread_notify): New functions.
22306 (prepare_resume_reply): Check using_threads. Set thread_from_wait
22307 and general_thread.
22308 (look_up_one_symbol): Flush after debug output.
22309 * server.c (step_thread, server_waiting): New variables.
22310 (start_inferior): Don't use signal_pid. Update call to mywait.
22311 (attach_inferior): Update call to mywait.
22312 (handle_query): Handle qfThreadInfo and qsThreadInfo.
22313 (main): Don't fetch/store registers explicitly. Use
22314 set_desired_inferior. Support proposed ``Hs'' packet. Update
22315 calls to mywait.
22316 * server.h: Update.
22317 (struct inferior_list, struct_inferior_list_entry): New.
22318 * target.c (set_desired_inferior): New.
22319 (write_inferior_memory): Constify.
22320 (mywait): New function.
22321 * target.h: Update.
22322 (struct target_ops): New signal_pid method.
22323 (mywait): Removed macro, added prototype.
22324
22325 * linux-low.h (regset_func): Removed.
22326 (regset_fill_func, regset_store_func): New.
22327 (enum regset_type): New.
22328 (struct regset_info): Add type field. Use new operation types.
22329 (struct linux_target_ops): stop_pc renamed to get_pc.
22330 Add decr_pc_after_break and breakpoint_at.
22331 (get_process, get_thread_proess, get_process_thread)
22332 (strut process_info, all_processes, linux_attach_lwp)
22333 (thread_db_init): New.
22334
22335 * linux-arm-low.c (arm_get_pc, arm_set_pc,
22336 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
22337 (the_low_target): Add new members.
22338 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
22339 (i386_store_fpxregset): Constify.
22340 (target_regsets): Add new kind identifier.
22341 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
22342 (i386_set_pc): Add debugging.
22343 (i386_breakpoint_at): New function.
22344 (the_low_target): Add new members.
22345 * linux-mips-low.c (mips_get_pc, mips_set_pc)
22346 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
22347 (mips_breakpoint_at): New.
22348 (the_low_target): Add new members.
22349 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
22350 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
22351 (the_low_target): Add new members.
22352 * linux-sh-low.c (sh_get_pc, sh_set_pc)
22353 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
22354 (the_low_target): Add new members.
22355 * linux-x86-64-low.c (target_regsets): Add new kind
22356 identifier.
22357
22358 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
22359
22360 From Martin Pool <mbp@samba.org>:
22361 * server.c (gdbserver_usage): New function.
22362 (main): Call it.
22363
22364 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
22365
22366 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
22367 stop_at -> stop_pc.
22368
22369 2002-05-04 Andrew Cagney <ac131313@redhat.com>
22370
22371 * Makefile.in: Remove obsolete code.
22372
22373 2002-04-24 Michal Ludvig <mludvig@suse.cz>
22374
22375 * linux-low.c (regsets_fetch_inferior_registers),
22376 (regsets_store_inferior_registers): Removed cast to int from
22377 ptrace() calls.
22378 * regcache.h: Added declaration of struct inferior_info.
22379
22380 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
22381
22382 * inferiors.c (struct inferior_info): Add regcache_data.
22383 (add_inferior): Call create_register_cache.
22384 (clear_inferiors): Call free_register_cache.
22385 (inferior_regcache_data, set_inferior_regcache_data): New functions.
22386 * regcache.c (struct inferior_regcache_data): New.
22387 (registers): Remove.
22388 (get_regcache): New function.
22389 (create_register_cache, free_register_cache): New functions.
22390 (set_register_cache): Don't initialize the register cache here.
22391 (registers_to_string, registers_from_string, register_data): Call
22392 get_regcache.
22393 * regcache.h: Add prototypes.
22394 * server.h: Likewise.
22395
22396 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
22397
22398 * mem-break.c: New file.
22399 * mem-break.h: New file.
22400 * Makefile.in: Add mem-break.o rule; update server.h
22401 dependencies.
22402 * inferiors.c (struct inferior_info): Add target_data
22403 member.
22404 (clear_inferiors): Free target_data member if set.
22405 (inferior_target_data, set_inferior_target_data): New functions.
22406 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
22407 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
22408 * linux-low.c (linux_bp_reinsert): New variable.
22409 (struct inferior_linux_data): New.
22410 (linux_create_inferior): Use set_inferior_target_data.
22411 (linux_attach): Likewise. Call add_inferior.
22412 (linux_wait_for_one_inferior): New function.
22413 (linux_wait): Call it.
22414 (linux_write_memory): Add const.
22415 (initialize_low): Call set_breakpoint_data.
22416 * linux-low.h (struct linux_target_ops): Add breakpoint
22417 handling members.
22418 * server.c (attach_inferior): Remove extra add_inferior
22419 call.
22420 * server.h: Include mem-break.h. Update inferior.c
22421 prototypes.
22422 * target.c (read_inferior_memory)
22423 (write_inferior_memory): New functions.
22424 * target.h (read_inferior_memory)
22425 (write_inferior_memory): Change macros to prototypes.
22426 (struct target_ops): Update comments. Add const to write_memory
22427 definition.
22428
22429 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
22430
22431 * linux-low.c (usr_store_inferior_registers): Support
22432 registers which are allowed to fail to store.
22433 * linux-low.h (linux_target_ops): Likewise.
22434 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
22435 (ppc_cannot_store_register): FPSCR may not be storable.
22436
22437 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22438
22439 * server.h: Include <string.h> if HAVE_STRING_H.
22440 * ChangeLog: Correct paths in last ChangeLog entry.
22441
22442 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22443
22444 * linux-low.h: Remove obsolete prototypes.
22445 (struct linux_target_ops): New.
22446 (extern the_low_target): New.
22447 * linux-low.c (num_regs, regmap): Remove declarations.
22448 (register_addr): Use the_low_target explicitly.
22449 (fetch_register): Likewise.
22450 (usr_fetch_inferior_registers): Likewise.
22451 (usr_store_inferior_registers): Likewise.
22452 * linux-arm-low.c (num_regs): Remove.
22453 (arm_num_regs): Define.
22454 (arm_regmap): Renamed from regmap, made static.
22455 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
22456 made static.
22457 (arm_cannot_store_register): Renamed from cannot_store_register,
22458 made static.
22459 (the_low_target): New.
22460 * linux-i386-low.c (num_regs): Remove.
22461 (i386_num_regs): Define.
22462 (i386_regmap): Renamed from regmap, made static.
22463 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
22464 made static.
22465 (i386_cannot_store_register): Renamed from cannot_store_register,
22466 made static.
22467 (the_low_target): New.
22468 * linux-ia64-low.c (num_regs): Remove.
22469 (ia64_num_regs): Define.
22470 (ia64_regmap): Renamed from regmap, made static.
22471 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
22472 made static.
22473 (ia64_cannot_store_register): Renamed from cannot_store_register,
22474 made static.
22475 (the_low_target): New.
22476 * linux-m68k-low.c (num_regs): Remove.
22477 (m68k_num_regs): Define.
22478 (m68k_regmap): Renamed from regmap, made static.
22479 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
22480 made static.
22481 (m68k_cannot_store_register): Renamed from cannot_store_register,
22482 made static.
22483 (the_low_target): New.
22484 * linux-mips-low.c (num_regs): Remove.
22485 (mips_num_regs): Define.
22486 (mips_regmap): Renamed from regmap, made static.
22487 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
22488 made static.
22489 (mips_cannot_store_register): Renamed from cannot_store_register,
22490 made static.
22491 (the_low_target): New.
22492 * linux-ppc-low.c (num_regs): Remove.
22493 (ppc_num_regs): Define.
22494 (ppc_regmap): Renamed from regmap, made static.
22495 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
22496 made static.
22497 (ppc_cannot_store_register): Renamed from cannot_store_register,
22498 made static.
22499 (the_low_target): New.
22500 * linux-s390-low.c (num_regs): Remove.
22501 (s390_num_regs): Define.
22502 (s390_regmap): Renamed from regmap, made static.
22503 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
22504 made static.
22505 (s390_cannot_store_register): Renamed from cannot_store_register,
22506 made static.
22507 (the_low_target): New.
22508 * linux-sh-low.c (num_regs): Remove.
22509 (sh_num_regs): Define.
22510 (sh_regmap): Renamed from regmap, made static.
22511 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
22512 made static.
22513 (sh_cannot_store_register): Renamed from cannot_store_register,
22514 made static.
22515 (the_low_target): New.
22516 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
22517 (the_low_target): New.
22518
22519 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22520
22521 * Makefile.in: Add stamp-h target.
22522 * configure.in: Create stamp-h.
22523 * configure: Regenerated.
22524
22525 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22526
22527 * inferiors.c: New file.
22528 * target.c: New file.
22529 * target.h: New file.
22530 * Makefile.in: Add target.o and inferiors.o. Update
22531 dependencies.
22532 * linux-low.c (inferior_pid): New static variable,
22533 moved from server.c.
22534 (linux_create_inferior): Renamed from create_inferior.
22535 Call add_inferior. Return 0 on success instead of a PID.
22536 (linux_attach): Renamed from myattach.
22537 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
22538 (linux_thread_alive): Renamed from mythread_alive.
22539 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
22540 child dies.
22541 (linux_resume): Renamed from myresume. Add missing ``return 0''.
22542 (regsets_store_inferior_registers): Correct error message.
22543 Add missing ``return 0''.
22544 (linux_fetch_registers): Renamed from fetch_inferior_registers.
22545 (linux_store_registers): Renamed from store_inferior_registers.
22546 (linux_read_memory): Renamed from read_inferior_memory.
22547 (linux_write_memory): Renamed from write_inferior_memory.
22548 (linux_target_ops): New structure.
22549 (initialize_low): Call set_target_ops ().
22550 * remote-utils.c (unhexify): New function.
22551 (hexify): New function.
22552 (input_interrupt): Send signals to ``signal_pid''.
22553 * server.c (inferior_pid): Remove.
22554 (start_inferior): Update create_inferior call.
22555 (attach_inferior): Call add_inferior.
22556 (handle_query): New function.
22557 (main): Call handle_query for `q' packets.
22558 * server.h: Include "target.h". Remove obsolete prototypes.
22559 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
22560
22561 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22562
22563 * Makefile.in: Add WARN_CFLAGS. Update configury
22564 dependencies.
22565 * configure.in: Check for <string.h>
22566 * configure: Regenerate.
22567 * config.in: Regenerate.
22568 * gdbreplay.c: Include needed system headers.
22569 (remote_open): Remove strchr prototype.
22570 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
22571 * regcache.c (supply_register): Change buf argument to const void *.
22572 (supply_register_by_name): Likewise.
22573 (collect_register): Change buf argument to void *.
22574 (collect_register_by_name): Likewise.
22575 * regcache.h: Add missing prototypes.
22576 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
22577 * server.c (handle_query): New function.
22578 (attached): New static variable, moved out of main.
22579 (main): Quiet longjmp clobber warnings.
22580 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
22581 * utils.c (error): Remove NORETURN.
22582 (fatal): Likewise.