Add ChangeLog for "Add NetBSD/aarch64 gdbserver support"
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-10-07 Kamil Rytarowski <n54@gmx.com>
2
3 * netbsd-aarch64-low.cc: Add.
4 * Makefile.in (SFILES): Register "netbsd-aarch64-low.c".
5 * configure.srv: Add aarch64*-*-netbsd*.
6
7 2020-10-06 Shahab Vahedi <shahab@synopsys.com>
8
9 * regcache.cc (register_data): Remove unused "fetch" argument.
10
11 2020-10-02 Simon Marchi <simon.marchi@polymtl.ca>
12
13 * server.cc (handle_monitor_command): Handle "set
14 debug-event-loop".
15 (captured_main): Handle "--debug-event-loop".
16 (monitor_show_help): Mention new setting.
17 (gdbserver_usage): Mention new flag.
18
19 2020-10-02 Simon Marchi <simon.marchi@polymtl.ca>
20
21 * linux-low.cc (linux_process_target::async): Pass name to
22 add_file_handler.
23 * remote-utils.cc (handle_accept_event): Likewise.
24 (remote_open): Likewise.
25
26 2020-10-01 Kamil Rytarowski <n54@gmx.com>
27
28 * netbsd-i386-low.cc: Add.
29 * Makefile.in (SFILES): Register "netbsd-i386-low.c".
30 * configure.srv: Add i[34567]86-*-netbsd*.
31
32 2020-10-01 Kamil Rytarowski <n54@gmx.com>
33
34 * netbsd-amd64-low.cc (netbsd_x86_64_arch_setup): Remove.
35 (netbsd_target_regsets): Now const.
36 (the_low_target): Remove.
37 (class netbsd_amd64_target, the_netbsd_amd64_target)
38 (the_netbsd_target): Add.
39 * netbsd-low.cc (netbsd_process_target::post_create_inferior): Call
40 low_arch_setup ().
41 (netbsd_process_target::fetch_registers)
42 (netbsd_process_target::store_registers, initialize_low): Update.
43 (the_netbsd_target): Remove.
44 * netbsd-low.h (netbsd_target_regsets, netbsd_target_ops)
45 (the_low_target, netbsd_tdesc): Remove.
46 (netbsd_process_target::get_regs_info)
47 (netbsd_process_target::low_arch_setup): Add.
48
49 2020-09-23 Hannes Domani <ssbssa@yahoo.de>
50
51 * win32-low.cc: Remove local wow64_process variable.
52 * win32-low.h: Remove local wow64_process variable.
53
54 2020-09-18 Tom Tromey <tromey@adacore.com>
55
56 * netbsd-low.h (class netbsd_process_target) <wait>: Update.
57 * netbsd-low.cc (netbsd_waitpid, netbsd_wait)
58 (netbsd_process_target::wait): Change type of target_options.
59 * win32-low.h (class win32_process_target) <wait>: Update.
60 * win32-low.cc (win32_process_target::wait): Update.
61 * target.h (class process_stratum_target) <wait>: Update.
62 (mywait): Update.
63 * target.cc (mywait, target_wait): Change type of "options".
64 * linux-low.h (class linux_process_target) <wait, wait_1>:
65 Update.
66 * linux-low.cc (linux_process_target::wait)
67 (linux_process_target::wait_1): Update.
68
69 2020-09-15 Tom Tromey <tromey@adacore.com>
70
71 * linux-x86-low.cc (xmltarget_i386_linux_no_xml)
72 (xmltarget_amd64_linux_no_xml): Now arrays.
73
74 2020-09-14 Tom Tromey <tromey@adacore.com>
75
76 * tracepoint.cc (eval_result_names): Now const.
77 * ax.cc (gdb_agent_op_names): Now const.
78
79 2020-09-10 Kamil Rytarowski <n54@gmx.com>
80
81 * netbsd-low.cc: Add.
82 * netbsd-low.h: Likewise.
83 * netbsd-amd64-low.cc: Likewise.
84 * Makefile.in (SFILES): Register "netbsd-low.cc", "netbsd-low.h",
85 "netbsd-amd64-low.cc".
86 * configure.srv: Add x86_64-*-netbsd*.
87
88 2020-08-13 Simon Marchi <simon.marchi@polymtl.ca>
89
90 * server.cc (captured_main): Accept multiple `--selftest=`
91 options. Pass all `--selftest=` arguments to run_tests.
92
93 2020-07-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
94
95 * configure, config.in: Regenerate.
96
97 2020-07-26 Eli Zaretskii <eliz@gnu.org>
98
99 * configure.ac (AC_CHECK_HEADERS): Add ws2tcpip.h.
100 When checking whether socklen_t type is defined, use ws2tcpip.h if
101 it is available and sys/socket.h isn't.
102 * configure: Regenerate.
103 * config.in: Regenerate.
104
105 2020-07-22 Pedro Alves <pedro@palves.net>
106
107 * inferiors.cc (switch_to_process): New, moved here from
108 thread-db.cc, and made extern.
109 * inferiors.h (switch_to_process): Declare.
110 * server.cc: Include "gdbsupport/scoped_restore.h".
111 (handle_qxfer_threads_proper): Now returns bool. Prepare to
112 access memory around target calls.
113 (handle_qxfer_threads): Handle errors.
114 * thread-db.cc (switch_to_process): Moved to inferiors.cc.
115
116 2020-07-21 Simon Marchi <simon.marchi@efficios.com>
117
118 * linux-low.cc (stopped_pids): Make static.
119
120 2020-07-17 Andrew Burgess <andrew.burgess@embecosm.com>
121
122 * tdesc.cc (allocate_target_description): Add header comment.
123 (target_desc_deleter::operator()): New function.
124 * tdesc.h (struct target_desc): Declare as final.
125
126 2020-07-13 Simon Marchi <simon.marchi@polymtl.ca>
127
128 * server.cc (handle_query): Use std::vector of
129 std::string for `qsupported` vector. Use separate
130 vector for unknowns.
131 * target.h (class process_stratum_target) <process_qsupported>:
132 Change parameters to array_view of const char *.
133 (target_process_qsupported): Remove `count` parameter.
134 * target.cc (process_stratum_target::process_qsupported): Change
135 parameters to array_view of const char *.
136 * linux-x86-low.cc (class x86_target) <process_qsupported>:
137 Likewise.
138
139 2020-06-29 Tom de Vries <tdevries@suse.de>
140
141 * ax.h: Include gdbsupport/debug_agent.h.
142
143 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
144
145 * tdesc.cc (struct tdesc_compatible_info): New struct.
146 (tdesc_compatible_info_list): New function.
147 (tdesc_compatible_info_arch_name): New function.
148
149 2020-06-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
150
151 Use std::list to stop pending signal instead of manually-created
152 linked list.
153 * linux-low.h: Include <list>.
154 (struct pending_signal): Move here from linux-low.cc.
155 (struct lwp_info) <pending_signals>
156 <pending_signals_to_report>: Update the type.
157 * linux-low.cc (struct pending_signals): Remove.
158 (linux_process_target::delete_lwp)
159 (linux_process_target::add_lwp)
160 (enqueue_one_deferred_signal)
161 (dequeue_one_deferred_signal)
162 (enqueue_pending_signal)
163 (linux_process_target::resume_one_lwp_throw)
164 (linux_process_target::thread_needs_step_over)
165 (linux_process_target::resume_one_thread)
166 (linux_process_target::proceed_one_lwp): Update the use of pending
167 signal list.
168
169 2020-06-17 Simon Marchi <simon.marchi@efficios.com>
170
171 * Makefile.in (%-generated.cc: ../gdb/regformats/arm/%.dat):
172 Remove.
173
174 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
175
176 * Makefile.in (SFILES): Remove win32-arm-low.cc, wincecompat.cc.
177 * configure.srv: Remove mingw32ce cases.
178 * server.h, win32-low.cc: Remove __MINGW32CE__-guarded code.
179 * win32-low.h (to_back_slashes): Remove.
180 * win32-arm-low.cc, wincecompat.cc, wincecompat.h: Remove.
181
182 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
183
184 * Makefile.in (SFILES): linux-tile-low.cc.
185 * configure.srv: Remove tilegx case.
186 * linux-tile-low.cc: Remove.
187
188 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
189
190 * Makefile.in (SFILES): Remove linux-m32r-low.cc.
191 * configure.srv: Remove m32r case.
192 * linux-m32r-low.cc: Remove.
193
194 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
195
196 * Makefile.in (SFILES): Remove linux-cris-low.c.
197 * configure.srv: Remove cris cases.
198 * linux-cris-low.cc, linux-crisv32-low.cc: Remove.
199
200 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
201
202 * Makefile.in (SFILES): Remove linux-bfin-low.c.
203 * configure.srv: Remove bfin case.
204 * linux-bfin-low.cc: Remove.
205 * linux-low.cc: Remove BFIN-conditional code.
206
207 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
208
209 * configure: Re-generate.
210 * configure.ac: Remove srv_qnx test.
211 * configure.srv: Remove nto case.
212 * nto-low.cc, nto-low.h, nto-x86-low.cc: Remove.
213 * remote-utils.c: Remove __QNX__-guarded code.
214
215 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
216
217 * configure: Re-generate.
218 * configure.ac: Remove srv_lynxos test.
219 * configure.srv: Remove lynxos cases.
220 * lynx-i386-low.cc, lynx-low.cc, lynx-low.h, lynx-ppc-low.c:
221 Remove.
222
223 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
224
225 * README: Fix a few outdated or incoherent things.
226
227 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
228
229 * win32-low.cc (do_initial_child_stuff): Set open_process_used.
230 (win32_clear_inferiors): Use open_process_used.
231 (get_child_debug_event): Likewise.
232
233 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
234
235 PR gdbserver/25893
236 * linux-low.cc (linux_process_target::create_inferior),
237 lynx-low.cc (lynx_process_target::create_inferior),
238 win32-low.cc (win32_process_target::create_inferior): Use
239 construct_inferior_arguments instead of stringify_argv
240 to get string representation which properly escapes
241 special characters.
242 * server.cc (handle_v_run): Just pass empty program arg
243 as such, since any further processing is now handled via
244 construct_inferior_arguments.
245
246 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
247
248 * nto-low.cc (nto_process_target::create_inferior): Pass
249 argv to spawnp function as char **.
250
251 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
252
253 * server.cc (captured_main), (handle_v_run): No longer
254 insert extra NULL element to args vector.
255
256 2020-05-23 Pedro Alves <palves@redhat.com>
257
258 * gdb-safe-ctype.h: New.
259
260 2020-05-16 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
261
262 * linux-ia64-low.cc (ia64_target::sw_breakpoint_from_kind):
263 Fix incorrect 'gdb_assert_no_reached' to 'gdb_assert_not_reached'.
264 (ia64_target::low_breakpoint_at): Ditto.
265
266 2020-05-15 Hannes Domani <ssbssa@yahoo.de>
267
268 * win32-i386-low.cc (i386_supports_z_point_type): Handle
269 Z_PACKET_HW_BP z_type.
270 (i386_insert_point): Handle raw_bkpt_type type.
271 (i386_remove_point): Likewise.
272
273 2020-04-30 Hannes Domani <ssbssa@yahoo.de>
274
275 * configure.srv <x86_64-*-mingw*, x86_64-*-cygwin*> (srv_tgtobj):
276 Add arch/i386.o.
277 * win32-arm-low.cc (arm_num_regs): New function.
278 (struct win32_target_ops): Use arm_num_regs.
279 * win32-i386-low.cc (win32_get_current_dr): Adapt for WOW64
280 processes.
281 (i386_get_thread_context): Likewise.
282 (i386_prepare_to_resume): Likewise.
283 (i386_thread_added): Likewise.
284 (i386_single_step): Likewise.
285 (i386_fetch_inferior_register): Likewise.
286 (i386_store_inferior_register): Likewise.
287 (i386_arch_setup): Likewise.
288 (i386_win32_num_regs): New function.
289 (struct win32_target_ops): Use i386_win32_num_regs.
290 * win32-low.cc (win32_get_thread_context): Adapt for WOW64
291 processes.
292 (win32_require_context): Likewise.
293 (child_add_thread): Likewise.
294 (do_initial_child_stuff): Likewise.
295 (continue_one_thread): Likewise.
296 (win32_process_target::resume): Likewise.
297 (load_psapi): Likewise.
298 (win32_add_all_dlls): Likewise.
299 (maybe_adjust_pc): Likewise.
300 (win32_process_target::qxfer_siginfo): Likewise.
301 (initialize_low): Likewise.
302 * win32-low.h (struct win32_target_ops): Change num_regs to
303 callback function.
304
305 2020-04-27 Simon Marchi <simon.marchi@efficios.com>
306
307 * configure.ac: Remove check for fs_base/gs_base in
308 user_regs_struct.
309 * configure: Re-generate.
310 * config.in: Re-generate.
311 * linux-x86-low.cc (x86_64_regmap, x86_fill_gregset,
312 x86_store_gregset): Adjust.
313
314 2020-04-22 Hannes Domani <ssbssa@yahoo.de>
315
316 * server.cc (handle_search_memory_1): Fix gdb_read_memory return value
317 comparison.
318
319 2020-04-16 Tom Tromey <tromey@adacore.com>
320
321 * win32-low.cc (windows_nat::handle_access_violation): New
322 function.
323
324 2020-04-15 Simon Marchi <simon.marchi@polymtl.ca>
325
326 * win32-low.cc (get_child_debug_event): Fix format string warning.
327
328 2020-04-13 Tom Tromey <tom@tromey.com>
329
330 * server.h (gdb_fildes_t): Remove typedef.
331 * remote-utils.c (remote_desc, list_desc): Now int.
332 (INVALID_DESCRIPTOR): Remove.
333 (gdb_connected, remote_close)
334 (check_remote_input_interrupt_request): Update.
335 * utils.h (pfildes): Don't declare.
336 * utils.c (pfildes): Remove.
337
338 2020-04-13 Tom Tromey <tom@tromey.com>
339
340 * server.h (handle_serial_event, handle_target_event): Update.
341 * server.c: Don't call initialize_event_loop.
342 (keep_processing_events): New global.
343 (handle_serial_event): Return void. Set keep_processing_events.
344 (handle_target_event): Return void.
345 (start_event_loop): Move from event-loop.c. Rewrite.
346 * remote-utils.c (handle_accept_event): Return void.
347 (reset_readchar): Use delete_timer.
348 (process_remaining): Return void.
349 (reschedule): Use create_timer.
350 * event-loop.h: Remove.
351 * event-loop.cc: Remove.
352 * Makefile.in (OBS): Use gdbsupport/event-loop.o, not event-loop.o.
353
354 2020-04-13 Tom Tromey <tom@tromey.com>
355
356 * server.c (invoke_async_signal_handlers)
357 (check_async_event_handlers, flush_streams, gdb_select): New
358 functions.
359
360 2020-04-13 Tom Tromey <tom@tromey.com>
361
362 * configure: Rebuild.
363 * config.in: Rebuild.
364
365 2020-04-08 Tom Tromey <tromey@adacore.com>
366
367 PR gdb/22992
368 * win32-low.c (child_continue): Call matching_pending_stop.
369 (get_child_debug_event): Call fetch_pending_stop. Push pending
370 stop when needed.
371
372 2020-04-08 Tom Tromey <tromey@adacore.com>
373
374 * win32-low.h (win32_process_target::stopped_by_sw_breakpoint)
375 (win32_process_target::supports_stopped_by_sw_breakpoint):
376 Declare.
377 * win32-low.c (win32_supports_z_point_type): Always handle
378 Z_PACKET_SW_BP.
379 (win32_insert_point): Call insert_memory_breakpoint when needed.
380 (win32_remove_point): Call remove_memory_breakpoint when needed.
381 (win32_process_target::stopped_by_sw_breakpoint)
382 (win32_process_target::supports_stopped_by_sw_breakpoint): New
383 methods.
384 (win32_target_ops): Update.
385 (maybe_adjust_pc): New function.
386 (win32_wait): Call maybe_adjust_pc.
387
388 2020-04-08 Tom Tromey <tromey@adacore.com>
389
390 * win32-low.h (struct win32_target_ops) <decr_pc_after_break>: New
391 field.
392 * win32-i386-low.c (the_low_target): Update.
393 * win32-arm-low.c (the_low_target): Update.
394
395 2020-04-08 Tom Tromey <tromey@adacore.com>
396
397 * win32-low.h (win32_process_target::read_pc)
398 (win32_process_target::write_pc): Declare.
399 * win32-low.c (win32_process_target::read_pc)
400 (win32_process_target::write_pc): New methods.
401 * win32-i386-low.c (i386_win32_get_pc, i386_win32_set_pc): New
402 functions.
403 (the_low_target): Update.
404 * win32-arm-low.c (arm_win32_get_pc, arm_win32_set_pc): New
405 functions.
406 (the_low_target): Update.
407
408 2020-04-08 Tom Tromey <tromey@adacore.com>
409
410 * win32-low.c (win32_kill, get_child_debug_event): Use
411 wait_for_debug_event.
412
413 2020-04-08 Tom Tromey <tromey@adacore.com>
414
415 * win32-low.c (child_continue): Call continue_last_debug_event.
416
417 2020-04-08 Tom Tromey <tromey@adacore.com>
418
419 * win32-low.c (handle_exception): Remove.
420 (windows_nat::handle_ms_vc_exception): New function.
421 (get_child_debug_event): Add "continue_status" parameter.
422 Update.
423 (win32_wait): Update.
424
425 2020-04-08 Tom Tromey <tromey@adacore.com>
426
427 * win32-low.c (windows_nat::handle_load_dll): Rename from
428 handle_load_dll. No longer static.
429 (windows_nat::handle_unload_dll): Rename from handle_unload_dll.
430 No longer static.
431
432 2020-04-08 Tom Tromey <tromey@adacore.com>
433
434 * win32-low.c (handle_output_debug_string): Add parameter. Change
435 return type.
436 (win32_kill, get_child_debug_event): Update.
437
438 2020-04-08 Tom Tromey <tromey@adacore.com>
439
440 * win32-low.c (current_process_handle, current_process_id)
441 (main_thread_id, last_sig, current_event, siginfo_er): Move to
442 nat/windows-nat.c.
443
444 2020-04-08 Tom Tromey <tromey@adacore.com>
445
446 * win32-low.c (get_image_name): Remove.
447 (handle_load_dll): Update.
448
449 2020-04-08 Tom Tromey <tromey@adacore.com>
450
451 * win32-low.c (windows_nat::thread_rec): Rename from thread_rec.
452 No longer static. Change parameters.
453 (child_add_thread, child_fetch_inferior_registers)
454 (child_store_inferior_registers, win32_resume)
455 (win32_get_tib_address): Update.
456
457 2020-04-08 Tom Tromey <tromey@adacore.com>
458
459 * win32-low.h (struct win32_target_ops): Use qualified names where
460 needed.
461 * win32-i386-low.c: Add "using namespace".
462 * win32-low.c: Add "using namespace".
463 * win32-arm-low.c: Add "using namespace".
464
465 2020-04-08 Tom Tromey <tromey@adacore.com>
466
467 * win32-low.c (delete_thread_info): Don't call CloseHandle.
468
469 2020-04-08 Tom Tromey <tromey@adacore.com>
470
471 * win32-low.c (win32_require_context, suspend_one_thread): Use
472 windows_thread_info::suspend.
473 (continue_one_thread): Use windows_thread_info::resume.
474 * configure.srv (srv_tgtobj): Add windows-nat.o when needed.
475
476 2020-04-08 Tom Tromey <tromey@adacore.com>
477
478 * win32-i386-low.c (update_debug_registers)
479 (i386_prepare_to_resume, i386_thread_added): Update.
480
481 2020-04-08 Tom Tromey <tromey@adacore.com>
482
483 * win32-low.c (child_add_thread): Use new.
484 (delete_thread_info): Use delete.
485
486 2020-04-08 Tom Tromey <tromey@adacore.com>
487
488 * win32-low.h (struct windows_thread_info): Remove.
489
490 2020-04-08 Tom Tromey <tromey@adacore.com>
491
492 * win32-low.h (struct windows_thread_info): Rename from
493 win32_thread_info. Remove typedef.
494 (struct win32_target_ops, win32_require_context): Update.
495 * win32-low.c (win32_get_thread_context)
496 (win32_set_thread_context, win32_prepare_to_resume)
497 (win32_require_context, thread_rec, child_add_thread)
498 (delete_thread_info, continue_one_thread)
499 (child_fetch_inferior_registers, child_store_inferior_registers)
500 (win32_resume, suspend_one_thread, win32_get_tib_address):
501 Update.
502 * win32-i386-low.c (update_debug_registers)
503 (win32_get_current_dr, i386_get_thread_context)
504 (i386_prepare_to_resume, i386_thread_added, i386_single_step)
505 (i386_fetch_inferior_register, i386_store_inferior_register):
506 Update.
507 * win32-arm-low.c (arm_get_thread_context)
508 (arm_fetch_inferior_register, arm_store_inferior_register):
509 Update.
510
511 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
512
513 * linux-low.h (struct linux_target_ops): Remove.
514 (the_low_target): Remove.
515 * linux-x86-low.cc (the_low_target): Remove.
516 * linux-aarch64-low.cc (the_low_target): Ditto.
517 * linux-arm-low.cc (the_low_target): Ditto.
518 * linux-bfin-low.cc (the_low_target): Ditto.
519 * linux-cris-low.cc (the_low_target): Ditto.
520 * linux-crisv32-low.cc (the_low_target): Ditto.
521 * linux-ia64-low.cc (the_low_target): Ditto.
522 * linux-m32r-low.cc (the_low_target): Ditto.
523 * linux-m68k-low.cc (the_low_target): Ditto.
524 * linux-mips-low.cc (the_low_target): Ditto.
525 * linux-nios2-low.cc (the_low_target): Ditto.
526 * linux-ppc-low.cc (the_low_target): Ditto.
527 * linux-riscv-low.cc (the_low_target): Ditto.
528 * linux-s390-low.cc (the_low_target): Ditto.
529 * linux-sh-low.cc (the_low_target): Ditto.
530 * linux-sparc-low.cc (the_low_target): Ditto.
531 * linux-tic6x-low.cc (the_low_target): Ditto.
532 * linux-tile-low.cc (the_low_target): Ditto.
533 * linux-xtensa-low.cc (the_low_target): Ditto.
534
535 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
536
537 Remove the 'get_ipa_tdesc_idx' linux target op and let a concrete
538 linux target define the op by overriding the declaration in
539 process_stratum_target.
540
541 * linux-low.h (struct linux_target_ops): Remove the op.
542 (class linux_process_target) <get_ipa_tdesc_idx>: Remove.
543 * linux-low.cc (linux_process_target::get_ipa_tdesc_idx): Remove.
544 * linux-x86-low.cc (class x86_target) <get_ipa_tdesc_idx>: Declare.
545 (x86_get_ipa_tdesc_idx): Turn into...
546 (x86_target::get_ipa_tdesc_idx): ...this.
547 (the_low_target): Remove the op field.
548 * linux-ppc-low.cc (class ppc_target) <get_ipa_tdesc_idx>: Declare.
549 (ppc_get_ipa_tdesc_idx): Turn into...
550 (ppc_target::get_ipa_tdesc_idx): ...this.
551 (the_low_target): Remove the op field.
552 * linux-s390-low.cc (class s390_target) <get_ipa_tdesc_idx>: Declare.
553 (s390_get_ipa_tdesc_idx): Turn into...
554 (s390_target::get_ipa_tdesc_idx): ...this.
555 (the_low_target): Remove the op field.
556
557 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
558
559 Turn the 'get_syscall_trapinfo' linux target op into a method
560 of process_stratum_target.
561
562 * linux-low.h (struct linux_target_ops): Remove the op.
563 (class linux_process_target) <get_syscall_trapinfo>
564 <gdb_catch_this_syscall>
565 <low_supports_catch_syscall>
566 <low_get_syscall_trapinfo>: Declare.
567 * linux-low.cc (get_syscall_trapinfo): Turn into...
568 (linux_process_target::get_syscall_trapinfo): ...this.
569 (linux_process_target::low_get_syscall_trapinfo): Define.
570 (gdb_catch_this_syscall_p): Turn into...
571 (linux_process_target::gdb_catch_this_syscall): ...this.
572 (linux_process_target::low_supports_catch_syscall): Define.
573
574 Update the callers below.
575
576 (linux_process_target::wait_1)
577 (linux_process_target::supports_catch_syscall)
578
579 * linux-x86-low.cc (class x86_target) <low_supports_catch_syscall>
580 <low_get_syscall_trapinfo>: Declare.
581 (x86_target::low_supports_catch_syscall): Define.
582 (x86_get_syscall_trapinfo): Turn into...
583 (x86_target::low_get_syscall_trapinfo): ...this.
584 (the_low_target): Remove the op field.
585 * linux-aarch64-low.cc (class aarch64_target)
586 <low_supports_catch_syscall>
587 <low_get_syscall_trapinfo>: Declare.
588 (aarch64_target::low_supports_catch_syscall): Define.
589 (aarch64_get_syscall_trapinfo): Turn into...
590 (aarch64_target::low_get_syscall_trapinfo): ...this.
591 (the_low_target): Remove the op field.
592 * linux-arm-low.cc (class arm_target) <low_supports_catch_syscall>
593 <low_get_syscall_trapinfo>: Declare.
594 (arm_target::low_supports_catch_syscall): Define.
595 (arm_get_syscall_trapinfo): Turn into...
596 (arm_target::low_get_syscall_trapinfo): ...this.
597 (the_low_target): Remove the op field.
598 * linux-ppc-low.cc (the_low_target): Remove the op field.
599 * linux-s390-low.cc (the_low_target): Remove the op field.
600
601 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
602
603 Remove the 'supports_hardware_single_step' linux target op and
604 override the process_stratum_target's op definition in
605 linux_process_target to return true.
606
607 * linux-low.h (struct linux_target_ops): Remove the op.
608 (class linux_process_target) <finish_step_over>
609 <maybe_hw_step>: Declare.
610 * linux-low.cc (can_hardware_single_step): Remove.
611 (maybe_hw_step): Turn into...
612 (linux_process_target::maybe_hw_step): ...this.
613 (finish_step_over): Turn into...
614 (linux_process_target::finish_step_over): ...this.
615 (linux_process_target::supports_hardware_single_step): Update
616 to return true.
617
618 Update the callers below.
619
620 (linux_process_target::single_step)
621 (linux_process_target::resume_one_lwp_throw)
622
623 * linux-arm-low.cc (class arm_target)
624 <supports_hardware_single_step>: Declare.
625 (arm_supports_hardware_single_step): Turn into...
626 (arm_target::supports_hardware_single_step): ...this.
627 (the_low_target): Remove the op field.
628 * linux-x86-low.cc (x86_supports_hardware_single_step): Remove.
629 (the_low_target): Remove the op field.
630 * linux-aarch64-low.cc (aarch64_supports_hardware_single_step):
631 Remove.
632 (the_low_target): Remove the op field.
633 * linux-bfin-low.cc (bfin_supports_hardware_single_step): Remove.
634 (the_low_target): Remove the op field.
635 * linux-crisv32-low.cc (cris_supports_hardware_single_step): Remove.
636 (the_low_target): Remove the op field.
637 * linux-m32r-low.cc (m32r_supports_hardware_single_step): Remove.
638 (the_low_target): Remove the op field.
639 * linux-m68k-low.cc (m68k_supports_hardware_single_step): Remove.
640 (the_low_target): Remove the op field.
641 * linux-ppc-low.cc (ppc_supports_hardware_single_step): Remove.
642 (the_low_target): Remove the op field.
643 * linux-s390-low.cc (s390_supports_hardware_single_step): Remove.
644 (the_low_target): Remove the op field.
645 * linux-sh-low.cc (sh_supports_hardware_single_step): Remove.
646 (the_low_target): Remove the op field.
647 * linux-tic6x-low.cc (tic6x_supports_hardware_single_step): Remove.
648 (the_low_target): Remove the op field.
649 * linux-tile-low.cc (tile_supports_hardware_single_step): Remove.
650 (the_low_target): Remove the op field.
651 * linux-xtensa-low.cc (xtensa_supports_hardware_single_step):
652 Remove.
653 (the_low_target): Remove the op field.
654
655 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
656
657 Turn the 'supports_range_stepping' linux target op into a method
658 of linux_process_target.
659
660 * linux-low.h (struct linux_target_ops): Remove the op.
661 (class linux_process_target) <low_supports_range_stepping>: Declare.
662 * linux-low.cc (linux_process_target::low_supports_range_stepping):
663 Define.
664 (linux_process_target::supports_range_stepping): Update the call
665 site.
666 * linux-x86-low.cc (class x86_target)
667 <low_supports_range_stepping>: Declare.
668 (x86_supports_range_stepping): Turn into...
669 (x86_target::low_supports_range_stepping): ...this.
670 (the_low_target): Remove the op field.
671 * linux-aarch64-low.cc (class aarch64_target)
672 <low_supports_range_stepping>: Declare.
673 (aarch64_supports_range_stepping): Turn into...
674 (aarch64_target::low_supports_range_stepping): ...this.
675 (the_low_target): Remove the op field.
676 * linux-arm-low.cc (the_low_target): Remove the op field.
677 * linux-bfin-low.cc (the_low_target): Ditto.
678 * linux-crisv32-low.cc (the_low_target): Ditto.
679 * linux-m32r-low.cc (the_low_target): Ditto.
680 * linux-m68k-low.cc (the_low_target): Ditto.
681 * linux-ppc-low.cc (the_low_target): Ditto.
682 * linux-s390-low.cc (the_low_target): Ditto.
683 * linux-sh-low.cc (the_low_target): Ditto.
684 * linux-tic6x-low.cc (the_low_target): Ditto.
685 * linux-tile-low.cc (the_low_target): Ditto.
686 * linux-xtensa-low.cc (the_low_target): Ditto.
687
688 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
689
690 Remove the 'emit_ops' linux target ops and let the concrete
691 linux target define the op by overriding the declaration of
692 process_stratum_target.
693
694 * linux-low.h (struct linux_target_ops): Remove the op.
695 (class linux_process_target) <emit_ops>: Remove.
696 * linux-low.cc (linux_process_target::emit_ops): Remove.
697 * linux-x86-low.cc (class x86_target) <emit_ops>: Declare.
698 (x86_emit_ops): Turn into...
699 (x86_target::emit_ops): ...this.
700 (the_low_target): Remove the op field.
701 * linux-aarch64-low.cc (class aarch64_target) <emit_ops>: Declare.
702 (aarch64_emit_ops): Turn into...
703 (aarch64_target::emit_ops): ...this.
704 (the_low_target): Remove the op field.
705 * linux-ppc-low.cc (class ppc_target) <emit_ops>: Declare.
706 (ppc_emit_ops): Turn into...
707 (ppc_target::emit_ops): ...this.
708 (the_low_target): Remove the op field.
709 * linux-s390-low.cc (class s390_target) <emit_ops>: Declare.
710 (s390_emit_ops): Turn into...
711 (s390_target::emit_ops): ...this.
712 (the_low_target): Remove the op field.
713 * linux-arm-low.cc (the_low_target): Remove the op field.
714 * linux-bfin-low.cc (the_low_target): Ditto.
715 * linux-crisv32-low.cc (the_low_target): Ditto.
716 * linux-m32r-low.cc (the_low_target): Ditto.
717 * linux-m68k-low.cc (the_low_target): Ditto.
718 * linux-sh-low.cc (the_low_target): Ditto.
719 * linux-tic6x-low.cc (the_low_target): Ditto.
720 * linux-tile-low.cc (the_low_target): Ditto.
721 * linux-xtensa-low.cc (the_low_target): Ditto.
722
723 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
724
725 Remove the 'install_fast_tracepoint_jump_pad' and
726 'get_min_fast_tracepoint_insn_len' linux target ops to let the
727 concrete linux target define the ops by overriding the declarations
728 of process_stratum_target.
729
730 * linux-low.h (struct linux_target_ops): Remove the ops.
731 (class linux_process_target) <supports_fast_tracepoints>
732 <install_fast_tracepoint_jump_pad>
733 <get_min_fast_tracepoint_insn_len>: Remove.
734 * linux-low.cc (linux_process_target::supports_fast_tracepoints)
735 (linux_process_target::install_fast_tracepoint_jump_pad)
736 (linux_process_target::get_min_fast_tracepoint_insn_len): Remove.
737 * linux-x86-low.cc (class x86_target) <supports_fast_tracepoints>
738 <install_fast_tracepoint_jump_pad>
739 <get_min_fast_tracepoint_insn_len>: Declare.
740 (x86_target::supports_fast_tracepoints): Define.
741 (x86_install_fast_tracepoint_jump_pad): Turn into...
742 (x86_target::install_fast_tracepoint_jump_pad): ...this.
743 (x86_get_min_fast_tracepoint_insn_len): Turn into...
744 (x86_target::get_min_fast_tracepoint_insn_len): ...this.
745 (the_low_target): Remove the op fields.
746 * linux-aarch64-low.cc (class aarch64_target)
747 <supports_fast_tracepoints>
748 <install_fast_tracepoint_jump_pad>
749 <get_min_fast_tracepoint_insn_len>: Declare.
750 (aarch64_target::supports_fast_tracepoints): Define.
751 (aarch64_install_fast_tracepoint_jump_pad): Turn into...
752 (aarch64_target::install_fast_tracepoint_jump_pad): ...this.
753 (aarch64_get_min_fast_tracepoint_insn_len): Turn into...
754 (aarch64_target::get_min_fast_tracepoint_insn_len): ...this.
755 (the_low_target): Remove the op fields.
756 * linux-ppc-low.cc (class ppc_target) <supports_fast_tracepoints>
757 <install_fast_tracepoint_jump_pad>
758 <get_min_fast_tracepoint_insn_len>: Declare.
759 (ppc_target::supports_fast_tracepoints): Define.
760 (ppc_install_fast_tracepoint_jump_pad): Turn into...
761 (ppc_target::install_fast_tracepoint_jump_pad): ...this.
762 (ppc_get_min_fast_tracepoint_insn_len): Turn into...
763 (ppc_target::get_min_fast_tracepoint_insn_len): ...this.
764 (the_low_target): Remove the op fields.
765 * linux-s390-low.cc (class s390_target) <supports_fast_tracepoints>
766 <install_fast_tracepoint_jump_pad>
767 <get_min_fast_tracepoint_insn_len>: Declare.
768 (s390_target::supports_fast_tracepoints): Define.
769 (s390_install_fast_tracepoint_jump_pad): Turn into...
770 (s390_target::install_fast_tracepoint_jump_pad): ...this.
771 (s390_get_min_fast_tracepoint_insn_len): Turn into...
772 (s390_target::get_min_fast_tracepoint_insn_len): ...this.
773 (the_low_target): Remove the op fields.
774 * linux-arm-low.cc (the_low_target): Remove the op fields.
775 * linux-bfin-low.cc (the_low_target): Ditto.
776 * linux-crisv32-low.cc (the_low_target): Ditto.
777 * linux-m32r-low.cc (the_low_target): Ditto.
778 * linux-m68k-low.cc (the_low_target): Ditto.
779 * linux-sh-low.cc (the_low_target): Ditto.
780 * linux-tic6x-low.cc (the_low_target): Ditto.
781 * linux-tile-low.cc (the_low_target): Ditto.
782 * linux-xtensa-low.cc (the_low_target): Ditto.
783
784 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
785
786 Turn the 'get_thread_area' linux target op into a method of
787 process_stratum_target.
788
789 * linux-low.h (struct linux_target_ops): Remove the op.
790 (class linux_process_target) <stuck_in_jump_pad>
791 <linux_fast_tracepoint_collecting>
792 <low_get_thread_area>: Declare.
793 * linux-low.cc (supports_fast_tracepoints): Remove.
794 (linux_fast_tracepoint_collecting): Turn into...
795 (linux_process_target::linux_fast_tracepoint_collecting): ...this.
796 (linux_process_target::low_get_thread_area): Define.
797 (stuck_in_jump_pad_callback): Turn into...
798 (linux_process_target::stuck_in_jump_pad): ...this.
799
800 Update the caller below.
801
802 (linux_process_target::stabilize_threads)
803
804 * linux-x86-low.cc (class x86_target) <low_get_thread_area>:
805 Declare.
806 (x86_get_thread_area): Turn into...
807 (x86_target::low_get_thread_area): ...this.
808 (the_low_target): Remove the op field.
809 * linux-aarch64-low.cc (class aarch64_target) <low_get_thread_area>:
810 Declare.
811 (aarch64_get_thread_area): Turn into...
812 (aarch64_target::low_get_thread_area): ...this.
813 (the_low_target): Remove the op field.
814 * linux-ppc-low.cc (class ppc_target) <low_get_thread_area>:
815 Declare.
816 (ppc_get_thread_area): Turn into...
817 (ppc_target::low_get_thread_area): ...this.
818 (the_low_target): Remove the op field.
819 * linux-s390-low.cc (class s390_target) <low_get_thread_area>:
820 Declare.
821 (s390_get_thread_area): Turn into...
822 (s390_target::low_get_thread_area): ...this.
823 (the_low_target): Remove the op field.
824 * linux-arm-low.cc (the_low_target): Remove the op field.
825 * linux-bfin-low.cc (the_low_target): Ditto.
826 * linux-crisv32-low.cc (the_low_target): Ditto.
827 * linux-m32r-low.cc (the_low_target): Ditto.
828 * linux-m68k-low.cc (the_low_target): Ditto.
829 * linux-sh-low.cc (the_low_target): Ditto.
830 * linux-tic6x-low.cc (the_low_target): Ditto.
831 * linux-tile-low.cc (the_low_target): Ditto.
832 * linux-xtensa-low.cc (the_low_target): Ditto.
833
834 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
835
836 Remote the 'supports_tracepoints' linux target op and let the
837 concrete linux target define it by overriding the op declared in
838 process_stratum_target.
839
840 * linux-low.h (struct linux_target_ops): Remove the op.
841 (class linux_process_target) <supports_tracepoints>: Remove.
842 * linux-low.cc (linux_process_target::supports_tracepoints): Remove.
843 * linux-x86-low.cc (class x86_target) <supports_tracepoints>:
844 Declare.
845 (x86_supports_tracepoints): Turn into...
846 (x86_target::supports_tracepoints): ...this.
847 (the_low_target): Remove the op field.
848 * linux-aarch64-low.cc (class aarch64_target)
849 <supports_tracepoints>: Declare.
850 (aarch64_supports_tracepoints): Turn into...
851 (aarch64_target::supports_tracepoints): ...this.
852 (the_low_target): Remove the op field.
853 * linux-ppc-low.cc (class ppc_target) <supports_tracepoints>:
854 Declare.
855 (ppc_supports_tracepoints): Turn into...
856 (ppc_target::supports_tracepoints): ...this.
857 (the_low_target): Remove the op field.
858 * linux-s390-low.cc (class s390_target) <supports_tracepoints>:
859 Declare.
860 (s390_supports_tracepoints): Turn into...
861 (s390_target::supports_tracepoints): ...this.
862 (the_low_target): Remove the op field.
863 * linux-arm-low.cc (the_low_target): Remove the op field.
864 * linux-bfin-low.cc (the_low_target): Ditto.
865 * linux-crisv32-low.cc (the_low_target): Ditto.
866 * linux-m32r-low.cc (the_low_target): Ditto.
867 * linux-m68k-low.cc (the_low_target): Ditto.
868 * linux-sh-low.cc (the_low_target): Ditto.
869 * linux-tic6x-low.cc (the_low_target): Ditto.
870 * linux-tile-low.cc (the_low_target): Ditto.
871 * linux-xtensa-low.cc (the_low_target): Ditto.
872
873 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
874
875 Remove the 'process_qsupported' linux target op and let a concrete
876 linux target define the op by overriding the op declaration in
877 process_stratum_target.
878
879 * linux-low.h (struct linux_target_ops): Remove the op.
880 (class linux_process_target) <process_qsupported>: Remove.
881 * linux-low.cc (linux_process_target::process_qsupported): Remove.
882 * linux-x86-low.cc (class x86_target) <process_qsupported>: Declare.
883 (x86_linux_process_qsupported): Turn into...
884 (x86_target::process_qsupported): ...this.
885 (the_low_target): Remove the op field.
886 * linux-aarch64-low.cc (the_low_target): Remove the op
887 field.
888 * linux-arm-low.cc (the_low_target): Ditto.
889 * linux-bfin-low.cc (the_low_target): Ditto.
890 * linux-crisv32-low.cc (the_low_target): Ditto.
891 * linux-m32r-low.cc (the_low_target): Ditto.
892 * linux-m68k-low.cc (the_low_target): Ditto.
893 * linux-ppc-low.cc (the_low_target): Ditto.
894 * linux-s390-low.cc (the_low_target): Ditto.
895 * linux-sh-low.cc (the_low_target): Ditto.
896 * linux-tic6x-low.cc (the_low_target): Ditto.
897 * linux-tile-low.cc (the_low_target): Ditto.
898 * linux-xtensa-low.cc (the_low_target): Ditto.
899
900 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
901
902 Turn the 'prepare_to_resume' linux target op into a method of
903 linux_process_target.
904
905 * linux-low.h (struct linux_target_ops): Remove the op.
906 (class linux_process_target) <low_prepare_to_resume>: Declare.
907 * linux-low.cc (linux_process_target::low_prepare_to_resume):
908 Define.
909
910 Update the callers below:
911
912 (linux_process_target::resume_one_lwp_throw)
913 (linux_process_target::low_prepare_to_resume)
914
915 * linux-x86-low.cc (class x86_target) <low_prepare_to_resume>:
916 Declare.
917 (x86_target::low_prepare_to_resume): Define.
918 (the_low_target): Remove the op field.
919 * linux-aarch64-low.cc (class aarch64_target)
920 <low_prepare_to_resume>: Declare.
921 (aarch64_target::low_prepare_to_resume): Define.
922 (the_low_target): Remove the op field.
923 * linux-arm-low.cc (class arm_target) <low_prepare_to_resume>:
924 Declare.
925 (arm_prepare_to_resume): Turn into...
926 (arm_target::low_prepare_to_resume): ...this.
927 (the_low_target): Remove the op field.
928 * linux-mips-low.cc (class mips_target) <low_prepare_to_resume>:
929 Declare.
930 (mips_linux_prepare_to_resume): Turn into...
931 (mips_target::low_prepare_to_resume): ...this.
932 (the_low_target): Remove the op field.
933 * linux-bfin-low.cc (the_low_target): Remove the op field.
934 * linux-crisv32-low.cc (the_low_target): Ditto.
935 * linux-m32r-low.cc (the_low_target): Ditto.
936 * linux-m68k-low.cc (the_low_target): Ditto.
937 * linux-ppc-low.cc (the_low_target): Ditto.
938 * linux-s390-low.cc (the_low_target): Ditto.
939 * linux-sh-low.cc (the_low_target): Ditto.
940 * linux-tic6x-low.cc (the_low_target): Ditto.
941 * linux-tile-low.cc (the_low_target): Ditto.
942 * linux-xtensa-low.cc (the_low_target): Ditto.
943
944 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
945
946 Turn the 'new_process', 'delete_process', 'new_thread',
947 'delete_thread', and 'new_fork' linux target ops into methods
948 of linux_process_target.
949
950 * linux-low.h (struct linux_target_ops): Remove the ops.
951 (class linux_process_target) <add_linux_process>
952 <add_lwp>
953 <delete_lwp>
954 <attach_lwp>
955 <detach_one_lwp>
956 <check_zombie_leaders>
957 <filter_exit_event>
958 <low_new_process>
959 <low_delete_process>
960 <low_new_thread>
961 <low_delete_thread>
962 <low_new_fork>: Declare.
963 * linux-low.cc (delete_lwp): Turn into...
964 (linux_process_target::delete_lwp): ...this.
965 (linux_process_target::low_delete_thread): Define.
966 (linux_add_process): Turn into...
967 (linux_process_target::add_linux_process): ...this.
968 (linux_process_target::low_new_process): Define.
969 (linux_process_target::low_delete_process): Define.
970 (linux_process_target::low_new_fork): Define.
971 (add_lwp): Turn into...
972 (linux_process_target::add_lwp): ...this.
973 (linux_process_target::low_new_thread): Define.
974 (linux_attach_lwp): Turn into...
975 (linux_process_target::attach_lwp): ...this.
976 (linux_detach_one_lwp): Turn into...
977 (linux_process_target::detach_one_lwp): ...this.
978 (linux_detach_lwp_callback): Remove and inline...
979 (linux_process_target::detach): ...here.
980 (check_zombie_leaders): Turn into...
981 (linux_process_target::check_zombie_leaders): ...this.
982 (filter_exit_event): Turn into...
983 (linux_process_target::filter_exit_event): ...this.
984
985 Update the callers below.
986
987 (linux_process_target::handle_extended_wait)
988 (linux_process_target::create_inferior)
989 (attach_proc_task_lwp_callback)
990 (linux_process_target::attach)
991 (linux_process_target::detach)
992 (linux_process_target::mourn)
993 * thread-db.cc (attach_thread)
994
995 * linux-x86-low.cc (class x86_target) <low_new_process>
996 <low_delete_process>
997 <low_new_thread>
998 <low_delete_thread>
999 <low_new_fork>: Declare.
1000 (x86_linux_new_process): Turn into...
1001 (x86_target::low_new_process): ...this.
1002 (x86_linux_delete_process): Turn into...
1003 (x86_target::low_delete_process): ...this.
1004 (x86_target::low_new_thread): Define.
1005 (x86_target::low_delete_thread): Define.
1006 (x86_linux_new_fork): Turn into...
1007 (x86_target::low_new_fork): ...this.
1008 (the_low_target): Remove the op fields.
1009 * linux-aarch64-low.cc (class aarch64_target) <low_new_process>
1010 <low_delete_process>
1011 <low_new_thread>
1012 <low_delete_thread>
1013 <low_new_fork>: Declare.
1014 (aarch64_linux_new_process): Turn into...
1015 (aarch64_target::low_new_process): ...this.
1016 (aarch64_linux_delete_process): Turn into...
1017 (aarch64_target::low_delete_process): ...this.
1018 (aarch64_target::low_new_thread): Define.
1019 (aarch64_target::low_delete_thread): Define.
1020 (aarch64_linux_new_fork): Turn into...
1021 (aarch64_target::low_new_fork): ...this.
1022 (the_low_target): Remove the op fields.
1023 * linux-arm-low.cc (class arm_target) <low_new_process>
1024 <low_delete_process>
1025 <low_new_thread>
1026 <low_delete_thread>
1027 <low_new_fork>: Declare.
1028 (arm_new_process): Turn into...
1029 (arm_target::low_new_process): ...this.
1030 (arm_delete_process): Turn into...
1031 (arm_target::low_delete_process): ...this.
1032 (arm_new_thread): Turn into...
1033 (arm_target::low_new_thread): ...this.
1034 (arm_delete_thread): Turn into...
1035 (arm_target::low_delete_thread): ...this.
1036 (arm_new_fork): Turn into...
1037 (arm_target::low_new_fork): ...this.
1038 (the_low_target): Remove the op fields.
1039 * linux-mips-low.cc (class mips_target) <low_new_process>
1040 <low_delete_process>
1041 <low_new_thread>
1042 <low_delete_thread>
1043 <low_new_fork>: Declare.
1044 (mips_linux_new_process): Turn into...
1045 (mips_target::low_new_process): ...this.
1046 (mips_linux_delete_process): Turn into...
1047 (mips_target::low_delete_process): ...this.
1048 (mips_linux_new_thread): Turn into...
1049 (mips_target::low_new_thread): ...this.
1050 (mips_linux_delete_thread): Turn into...
1051 (mips_target::low_delete_thread): ...this.
1052 (mips_linux_new_fork): Turn into...
1053 (mips_target::low_new_fork): ...this.
1054 (the_low_target): Remove the op fields.
1055 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1056 * linux-crisv32-low.cc (the_low_target): Ditto.
1057 * linux-m32r-low.cc (the_low_target): Ditto.
1058 * linux-m68k-low.cc (the_low_target): Ditto.
1059 * linux-ppc-low.cc (the_low_target): Ditto.
1060 * linux-s390-low.cc (the_low_target): Ditto.
1061 * linux-sh-low.cc (the_low_target): Ditto.
1062 * linux-tic6x-low.cc (the_low_target): Ditto.
1063 * linux-tile-low.cc (the_low_target): Ditto.
1064 * linux-xtensa-low.cc (the_low_target): Ditto.
1065
1066 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1067
1068 Turn the 'siginfo_fixup' linux target op into a method of
1069 linux_process_target.
1070
1071 * linux-low.h (struct linux_target_ops): Remove the op.
1072 (class linux_process_target) <siginfo_fixup>
1073 <low_siginfo_fixup>: Declare.
1074 * linux-low.cc (siginfo_fixup): Turn into...
1075 (linux_process_target::siginfo_fixup): ...this.
1076 (linux_process_target::low_siginfo_fixup): Define.
1077 * linux-x86-low.cc (class x86_target) <low_siginfo_fixup>: Declare.
1078 (x86_siginfo_fixup): Turn into...
1079 (x86_target::low_siginfo_fixup): ...this.
1080 (the_low_target): Remove the op field.
1081 * linux-aarch64-low.cc (class aarch64_target):
1082 <low_siginfo_fixup>: Declare.
1083 (aarch64_linux_siginfo_fixup): Turn into...
1084 (aarch64_target::low_siginfo_fixup): ...this.
1085 (the_low_target): Remove the op field.
1086 * linux-arm-low.cc (the_low_target): Remove the op field.
1087 * linux-bfin-low.cc (the_low_target): Ditto.
1088 * linux-crisv32-low.cc (the_low_target): Ditto.
1089 * linux-m32r-low.cc (the_low_target): Ditto.
1090 * linux-m68k-low.cc (the_low_target): Ditto.
1091 * linux-mips-low.cc (the_low_target): Ditto.
1092 * linux-ppc-low.cc (the_low_target): Ditto.
1093 * linux-s390-low.cc (the_low_target): Ditto.
1094 * linux-sh-low.cc (the_low_target): Ditto.
1095 * linux-tic6x-low.cc (the_low_target): Ditto.
1096 * linux-tile-low.cc (the_low_target): Ditto.
1097 * linux-xtensa-low.cc (the_low_target): Ditto.
1098
1099 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1100
1101 Turn the 'collect_ptrace_register' and 'supply_ptrace_register'
1102 linux target ops into methods of linux_process_target.
1103
1104 * linux-low.h (struct linux_target_ops): Remove the ops.
1105 (class linux_process_target) <low_collect_ptrace_register>
1106 <low_store_ptrace_register>: Declare.
1107 * linux-low.cc (linux_process_target::low_collect_ptrace_register)
1108 (linux_process_target::low_supply_ptrace_register): Define.
1109
1110 Update the callers below.
1111
1112 (linux_process_target::fetch_register)
1113 (linux_process_target::store_register)
1114
1115 * linux-x86-low.cc (the_low_target): Remove the op fields.
1116 * linux-aarch64-low.cc (the_low_target): Ditto.
1117 * linux-arm-low.cc (the_low_target): Ditto.
1118 * linux-bfin-low.cc (the_low_target): Ditto.
1119 * linux-crisv32-low.cc (the_low_target): Ditto.
1120 * linux-m32r-low.cc (the_low_target): Ditto.
1121 * linux-m68k-low.cc (the_low_target): Ditto.
1122 * linux-sh-low.cc (the_low_target): Ditto.
1123 * linux-sparc-low.cc (the_low_target): Ditto.
1124 * linux-tic6x-low.cc (the_low_target): Ditto.
1125 * linux-tile-low.cc (the_low_target): Ditto.
1126 * linux-xtensa-low.cc (the_low_target): Ditto.
1127 * linux-mips-low.cc (class mips_target)
1128 <low_collect_ptrace_register>
1129 <low_supply_ptrace_register>: Declare.
1130 (mips_collect_ptrace_register): Turn into ...
1131 (mips_target::low_collect_ptrace_register): ...this.
1132 (mips_supply_ptrace_register): Turn into...
1133 (mips_target::low_supply_ptrace_register): ...this.
1134 (the_low_target): Remove the op fields.
1135 * linux-ppc-low.cc (class ppc_target)
1136 <low_collect_ptrace_register>
1137 <low_supply_ptrace_register>: Declare.
1138 (ppc_collect_ptrace_register): Turn into ...
1139 (ppc_target::low_collect_ptrace_register): ...this.
1140 (ppc_supply_ptrace_register): Turn into ...
1141 (ppc_target::low_supply_ptrace_register): ...this.
1142 (ppc_fill_gregset): Update for the calls to
1143 low_collect_ptrace_register.
1144 (the_low_target): Remove the op fields.
1145 * linux-s390-low.cc (class s390_target)
1146 <low_collect_ptrace_register>
1147 <low_supply_ptrace_register>: Declare.
1148 (s390_collect_ptrace_register): Turn into ...
1149 (s390_target::low_collect_ptrace_register): ...this.
1150 (s390_supply_ptrace_register): Turn into ...
1151 (s390_target::low_supply_ptrace_register): ...this.
1152 (s390_fill_gregset): Update for the calls to
1153 low_collect_ptrace_register.
1154 (the_low_target): Remove the op fields.
1155
1156 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1157
1158 Turn the 'stopped_by_watchpoint' and 'stopped_data_address' linux
1159 target ops into methods of linux_process_target.
1160
1161 * linux-low.h (struct linux_target_ops): Remove the ops.
1162 (class linux_process_target) <check_stopped_by_watchpoint>
1163 <low_stopped_by_watchpoint>
1164 <low_stopped_data_address>: Declare.
1165 * linux-low.cc (check_stopped_by_watchpoint): Turn into...
1166 (linux_process_target::check_stopped_by_watchpoint): ...this.
1167 (linux_process_target::low_stopped_by_watchpoint): Define.
1168 (linux_process_target::low_stopped_data_address): Define.
1169 * linux-x86-low.cc (class x86_target) <low_stopped_by_watchpoint>
1170 <low_stopped_data_address>: Declare.
1171 (x86_stopped_by_watchpoint): Turn into...
1172 (x86_target::low_stopped_by_watchpoint): ...this.
1173 (x86_stopped_data_address): Turn into...
1174 (x86_target::low_stopped_data_address): ...this.
1175 (the_low_target): Remove the op fields.
1176 * linux-aarch64-low.cc (class aarch64_target)
1177 <low_stopped_by_watchpoint>
1178 <low_stopped_data_address>: Declare.
1179 (aarch64_stopped_by_watchpoint): Turn into...
1180 (aarch64_target::low_stopped_by_watchpoint): ...this.
1181 (aarch64_stopped_data_address): Turn into...
1182 (aarch64_target::low_stopped_data_address): ...this.
1183 (the_low_target): Remove the op fields.
1184 * linux-arm-low.cc (class arm_target) <low_stopped_by_watchpoint>
1185 <low_stopped_data_address>: Declare.
1186 (arm_stopped_by_watchpoint): Turn into...
1187 (arm_target::low_stopped_by_watchpoint): ...this.
1188 (arm_stopped_data_address): Turn into...
1189 (arm_target::low_stopped_data_address): ...this.
1190 (the_low_target): Remove the op fields.
1191 * linux-crisv32-low.cc (class crisv32_target)
1192 <low_stopped_by_watchpoint>
1193 <low_stopped_data_address>: Declare.
1194 (cris_stopped_by_watchpoint): Turn into...
1195 (crisv32_target::low_stopped_by_watchpoint): ...this.
1196 (cris_stopped_data_address): Turn into...
1197 (crisv32_target::low_stopped_data_address): ...this.
1198 (the_low_target): Remove the op fields.
1199 * linux-mips-low.cc (class mips_target) <low_stopped_by_watchpoint>
1200 <low_stopped_data_address>: Declare.
1201 (mips_stopped_by_watchpoint): Turn into...
1202 (mips_target::low_stopped_by_watchpoint): ...this.
1203 (mips_stopped_data_address): Turn into...
1204 (mips_target::low_stopped_data_address): ...this.
1205 (the_low_target): Remove the op fields.
1206 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1207 * linux-m32r-low.cc (the_low_target): Ditto.
1208 * linux-m68k-low.cc (the_low_target): Ditto.
1209 * linux-ppc-low.cc (the_low_target): Ditto.
1210 * linux-s390-low.cc (the_low_target): Ditto.
1211 * linux-sh-low.cc (the_low_target): Ditto.
1212 * linux-sparc-low.cc (the_low_target): Ditto.
1213 * linux-tic6x-low.cc (the_low_target): Ditto.
1214 * linux-tile-low.cc (the_low_target): Ditto.
1215 * linux-xtensa-low.cc (the_low_target): Ditto.
1216
1217 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1218
1219 Turn the 'insert_point' and 'remove_point' linux target ops into
1220 methods of linux_process_target.
1221
1222 * linux-low.h (struct linux_target_ops): Remove the ops.
1223 (class linux_process_target) <low_insert_point>
1224 <low_remove_point>: Declare.
1225 * linux-low.cc (linux_process_target::low_insert_point)
1226 (linux_process_target::low_remove_point): Define.
1227 (linux_process_target::insert_point)
1228 (linux_process_target::remove_point): Update for calls to
1229 low_insert_point and low_remove_point.
1230 * linux-x86-low.cc (class x86_target) <low_insert_point>
1231 <low_remove_point>: Declare.
1232 (x86_insert_point): Turn into...
1233 (x86_target::low_insert_point): ...this.
1234 (x86_remove_point): Turn into...
1235 (x86_target::low_remove_point): ...this.
1236 (the_low_target): Remove the op fields.
1237 * linux-aarch64-low.cc (class aarch64_target) <low_insert_point>
1238 <low_remove_point>: Declare.
1239 (aarch64_insert_point): Turn into...
1240 (aarch64_target::low_insert_point): ...this.
1241 (aarch64_remove_point): Turn into...
1242 (aarch64_target::low_remove_point): ...this.
1243 (the_low_target): Remove the op fields.
1244 * linux-arm-low.cc (class arm_target) <low_insert_point>
1245 <low_remove_point>: Declare.
1246 (arm_insert_point): Turn into...
1247 (arm_target::low_insert_point): ...this.
1248 (arm_remove_point): Turn into...
1249 (arm_target::low_remove_point): ...this.
1250 (the_low_target): Remove the op fields.
1251 * linux-crisv32-low.cc (class crisv32_target) <low_insert_point>
1252 <low_remove_point>: Declare.
1253 (crisv32_insert_point): Turn into...
1254 (crisv32_target::low_insert_point): ...this.
1255 (crisv32_remove_point): Turn into...
1256 (crisv32_target::low_remove_point): ...this.
1257 (the_low_target): Remove the op fields.
1258 * linux-mips-low.cc (class mips_target) <low_insert_point>
1259 <low_remove_point>: Declare.
1260 (mips_insert_point): Turn into...
1261 (mips_target::low_insert_point): ...this.
1262 (mips_remove_point): Turn into...
1263 (mips_target::low_remove_point): ...this.
1264 (the_low_target): Remove the op fields.
1265 * linux-ppc-low.cc (class ppc_target) <low_insert_point>
1266 <low_remove_point>: Declare.
1267 (ppc_insert_point): Turn into...
1268 (ppc_target::low_insert_point): ...this.
1269 (ppc_remove_point): Turn into...
1270 (ppc_target::low_remove_point): ...this.
1271 (the_low_target): Remove the op fields.
1272 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1273 * linux-m32r-low.cc (the_low_target): Ditto.
1274 * linux-m68k-low.cc (the_low_target): Ditto.
1275 * linux-s390-low.cc (the_low_target): Ditto.
1276 * linux-sh-low.cc (the_low_target): Ditto.
1277 * linux-sparc-low.cc (the_low_target): Ditto.
1278 * linux-tic6x-low.cc (the_low_target): Ditto.
1279 * linux-tile-low.cc (the_low_target): Ditto.
1280 * linux-xtensa-low.cc (the_low_target): Ditto.
1281
1282 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1283
1284 Remove the 'supports_z_point_type' linux target op and let the
1285 concrete linux target define it by overriding the op declared in
1286 process_stratum_target.
1287
1288 * linux-low.cc (linux_process_target::supports_z_point_type):
1289 Remove.
1290 * linux-low.h (struct linux_target_ops): Remove the op.
1291 (class linux_process_target) <supports_z_point_type>: Remove.
1292 * linux-x86-low.cc (class x86_target) <supports_z_point_type>:
1293 Declare.
1294 (x86_supports_z_point_type): Turn into...
1295 (x86_target::supports_z_point_type): ...this.
1296 (the_low_target): Remove the op field.
1297 * linux-aarch64-low.cc (class aarch64_target)
1298 <supports_z_point_type>: Declare.
1299 (aarch64_supports_z_point_type): Turn into...
1300 (aarch64_target::supports_z_point_type): ...this.
1301 (the_low_target): Remove the op field.
1302 * linux-arm-low.cc (class arm_target) <supports_z_point_type>:
1303 Declare.
1304 (arm_supports_z_point_type): Turn into...
1305 (arm_target::supports_z_point_type): ...this.
1306 (the_low_target): Remove the op field.
1307 * linux-crisv32-low.cc (class crisv32_target)
1308 <supports_z_point_type>: Declare.
1309 (cris_supports_z_point_type): Turn into...
1310 (crisv32_target::supports_z_point_type): ...this.
1311 (the_low_target): Remove the op field.
1312 * linux-mips-low.cc (class mips_target) <supports_z_point_type>:
1313 Declare.
1314 (mips_supports_z_point_type): Turn into...
1315 (mips_target::supports_z_point_type): ...this.
1316 (the_low_target): Remove the op field.
1317 * linux-ppc-low.cc (class ppc_target) <supports_z_point_type>:
1318 Declare.
1319 (ppc_supports_z_point_type): Turn into...
1320 (ppc_target::supports_z_point_type): ...this.
1321 (the_low_target): Remove the op field.
1322 * linux-s390-low.cc (class s390_target) <supports_z_point_type>:
1323 Declare.
1324 (s390_supports_z_point_type): Turn into...
1325 (s390_target::supports_z_point_type): ...this.
1326 (the_low_target): Remove the op field.
1327 * linux-bfin-low.cc (the_low_target): Remove the op field.
1328 * linux-m32r-low.cc (the_low_target): Ditto.
1329 * linux-m68k-low.cc (the_low_target): Ditto.
1330 * linux-sh-low.cc (the_low_target): Ditto.
1331 * linux-sparc-low.cc (the_low_target): Ditto.
1332 * linux-tic6x-low.cc (the_low_target): Ditto.
1333 * linux-tile-low.cc (the_low_target): Ditto.
1334 * linux-xtensa-low.cc (the_low_target): Ditto.
1335
1336 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1337
1338 Turn the 'breakpoint_at' linux target op into a method of
1339 linux_process_target.
1340
1341 * linux-low.h (struct linux_target_ops): Remove the op.
1342 (class linux_process_target) <low_breakpoint_at>: Declare.
1343
1344 Update the callers below:
1345
1346 * linux-low.cc (linux_process_target::save_stop_reason)
1347 (linux_process_target::thread_still_has_status_pending)
1348 (linux_process_target::wait_1)
1349
1350 * linux-x86-low.cc (class x86_target)
1351 <low_breakpoint_at>: Declare.
1352 (x86_breakpoint_at): Turn into...
1353 (x86_target::low_breakpoint_at): ...this.
1354 (the_low_target): Remove the op field.
1355 * linux-aarch64-low.cc (class aarch64_target)
1356 <low_breakpoint_at>: Declare.
1357 (aarch64_breakpoint_at): Turn into...
1358 (aarch64_target::low_breakpoint_at): ...this.
1359 (the_low_target): Remove the op field.
1360 * linux-arm-low.cc (class arm_target)
1361 <low_breakpoint_at>: Declare.
1362 (arm_target::low_breakpoint_at): Define.
1363 (the_low_target): Remove the op field.
1364 * linux-bfin-low.cc (class bfin_target)
1365 <low_breakpoint_at>: Declare.
1366 (bfin_breakpoint_at): Turn into...
1367 (bfin_target::low_breakpoint_at): ...this.
1368 (the_low_target): Remove the op field.
1369 * linux-cris-low.cc (class cris_target)
1370 <low_breakpoint_at>: Declare.
1371 (cris_breakpoint_at): Turn into...
1372 (cris_target::low_breakpoint_at): ...this.
1373 (the_low_target): Remove the op field.
1374 * linux-crisv32-low.cc (class crisv32_target)
1375 <low_breakpoint_at>: Declare.
1376 (crisv32_breakpoint_at): Turn into...
1377 (crisv32_target::low_breakpoint_at): ...this.
1378 (the_low_target): Remove the op field.
1379 * linux-ia64-low.cc (class ia64_target)
1380 <low_breakpoint_at>: Declare.
1381 (ia64_target::low_breakpoint_at): Define.
1382 * linux-m32r-low.cc (class m32r_target)
1383 <low_breakpoint_at>: Declare.
1384 (m32r_breakpoint_at): Turn into...
1385 (m32r_target::low_breakpoint_at): ...this.
1386 (the_low_target): Remove the op field.
1387 * linux-m68k-low.cc (class m68k_target)
1388 <low_breakpoint_at>: Declare.
1389 (m68k_breakpoint_at): Turn into...
1390 (m68k_target::low_breakpoint_at): ...this.
1391 (the_low_target): Remove the op field.
1392 * linux-mips-low.cc (class mips_target)
1393 <low_breakpoint_at>: Declare.
1394 (mips_breakpoint_at): Turn into...
1395 (mips_target::low_breakpoint_at): ...this.
1396 (the_low_target): Remove the op field.
1397 * linux-nios2-low.cc (class nios2_target)
1398 <low_breakpoint_at>: Declare.
1399 (nios2_breakpoint_at): Turn into...
1400 (nios2_target::low_breakpoint_at): ...this.
1401 (the_low_target): Remove the op field.
1402 * linux-ppc-low.cc (class ppc_target)
1403 <low_breakpoint_at>: Declare.
1404 (ppc_breakpoint_at): Turn into...
1405 (ppc_target::low_breakpoint_at): ...this.
1406 (the_low_target): Remove the op field.
1407 * linux-riscv-low.cc (class riscv_target)
1408 <low_breakpoint_at>: Declare.
1409 (riscv_breakpoint_at): Turn into...
1410 (riscv_target::low_breakpoint_at): ...this.
1411 (the_low_target): Remove the op field.
1412 * linux-s390-low.cc (class s390_target)
1413 <low_breakpoint_at>: Declare.
1414 (s390_breakpoint_at): Turn into...
1415 (s390_target::low_breakpoint_at): ...this.
1416 (the_low_target): Remove the op field.
1417 * linux-sh-low.cc (class sh_target)
1418 <low_breakpoint_at>: Declare.
1419 (sh_breakpoint_at): Turn into...
1420 (sh_target::low_breakpoint_at): ...this.
1421 (the_low_target): Remove the op field.
1422 * linux-sparc-low.cc (class sparc_target)
1423 <low_breakpoint_at>: Declare.
1424 (sparc_breakpoint_at): Turn into...
1425 (sparc_target::low_breakpoint_at): ...this.
1426 (the_low_target): Remove the op field.
1427 * linux-tic6x-low.cc (class tic6x_target)
1428 <low_breakpoint_at>: Declare.
1429 (tic6x_breakpoint_at): Turn into...
1430 (tic6x_target::low_breakpoint_at): ...this.
1431 (the_low_target): Remove the op field.
1432 * linux-tile-low.cc (class tile_target)
1433 <low_breakpoint_at>: Declare.
1434 (tile_breakpoint_at): Turn into...
1435 (tile_target::low_breakpoint_at): ...this.
1436 (the_low_target): Remove the op field.
1437 * linux-xtensa-low.cc (class xtensa_target)
1438 <low_breakpoint_at>: Declare.
1439 (xtensa_breakpoint_at): Turn into...
1440 (xtensa_target::low_breakpoint_at): ...this.
1441 (the_low_target): Remove the op field.
1442
1443 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1444
1445 Turn the 'decr_pc_after_break' linux_target_ops field into
1446 a method of linux_process_target.
1447
1448 * linux-low.h (struct linux_target_ops)
1449 <decr_pc_after_break>: Remove.
1450 (class linux_process_target) <low_decr_pc_after_break>: New method
1451 declaration.
1452 * linux-low.cc (linux_process_target::low_decr_pc_after_break):
1453 New method implementation.
1454
1455 Update the users below.
1456
1457 (linux_process_target::save_stop_reason)
1458 (linux_process_target::wait_1)
1459 * linux-x86-low.cc (class x86_target) <low_decr_pc_after_break>:
1460 New declaration.
1461 (x86_target::low_decr_pc_after_break): New method implementation.
1462 (the_low_target): Remove the field.
1463 * linux-bfin-low.cc (class bfin_target) <low_decr_pc_after_break>:
1464 New declaration.
1465 (bfin_target::low_decr_pc_after_break): New method implementation.
1466 (the_low_target): Remove the field.
1467 * linux-m68k-low.cc (class m68k_target) <low_decr_pc_after_break>:
1468 New declaration.
1469 (m68k_target::low_decr_pc_after_break): New method implementation.
1470 (the_low_target): Remove the field.
1471 * linux-s390-low.cc (class s390_target) <low_decr_pc_after_break>:
1472 New declaration.
1473 (s390_target::low_decr_pc_after_break): New method implementation.
1474 (the_low_target): Remove the field.
1475 * linux-aarch64-low.cc (the_low_target): Remove the field.
1476 * linux-arm-low.cc (the_low_target): Remove the field.
1477 * linux-cris-low.cc (the_low_target): Remove the field.
1478 * linux-crisv32-low.cc (the_low_target): Remove the field.
1479 * linux-m32r-low.cc (the_low_target): Remove the field.
1480 * linux-mips-low.cc (the_low_target): Remove the field.
1481 * linux-nios2-low.cc (the_low_target): Remove the field.
1482 * linux-ppc-low.cc (the_low_target): Remove the field.
1483 * linux-riscv-low.cc (the_low_target): Remove the field.
1484 * linux-sh-low.cc (the_low_target): Remove the field.
1485 * linux-sparc-low.cc (the_low_target): Remove the field.
1486 * linux-tic6x-low.cc (the_low_target): Remove the field.
1487 * linux-tile-low.cc (the_low_target): Remove the field.
1488 * linux-xtensa-low.cc (the_low_target): Remove the field.
1489
1490 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1491
1492 Remove the 'supports_software_single_step' linux target op and let
1493 the concrete linux target define it by overriding the op in
1494 process_stratum_target.
1495 Turn the 'get_next_pcs' linux target op into a method of
1496 linux_process_target.
1497
1498 * linux-low.h (struct linux_target_ops): Remove the ops.
1499 (class linux_process_target) <supports_software_single_step>:
1500 Remove.
1501 <low_get_next_pcs>: Declare.
1502 * linux-low.cc (can_software_single_step): Remove.
1503 (linux_process_target::low_get_next_pcs): Define.
1504 (linux_process_target::supports_software_single_step): Remove.
1505
1506 Update the callers below.
1507
1508 (linux_process_target::handle_extended_wait)
1509 (linux_process_target::wait_1)
1510 (linux_process_target::install_software_single_step_breakpoints)
1511 (linux_process_target::single_step)
1512 (linux_process_target::thread_needs_step_over)
1513 (linux_process_target::proceed_one_lwp)
1514 (linux_process_target::supports_range_stepping)
1515
1516 * linux-x86-low.cc (the_low_target): Remove the op field.
1517 * linux-aarch64-low.cc (the_low_target): Ditto.
1518 * linux-bfin-low.cc (the_low_target): Ditto.
1519 * linux-cris-low.cc (the_low_target): Ditto.
1520 * linux-crisv32-low.cc (the_low_target): Ditto.
1521 * linux-m32r-low.cc (the_low_target): Ditto.
1522 * linux-m68k-low.cc (the_low_target): Ditto.
1523 * linux-mips-low.cc (the_low_target): Ditto.
1524 * linux-nios2-low.cc (the_low_target): Ditto.
1525 * linux-ppc-low.cc (the_low_target): Ditto.
1526 * linux-riscv-low.cc (the_low_target): Ditto.
1527 * linux-s390-low.cc (the_low_target): Ditto.
1528 * linux-sh-low.cc (the_low_target): Ditto.
1529 * linux-sparc-low.cc (the_low_target): Ditto.
1530 * linux-tic6x-low.cc (the_low_target): Ditto.
1531 * linux-tile-low.cc (the_low_target): Ditto.
1532 * linux-xtensa-low.cc (the_low_target): Ditto.
1533 * linux-arm-low.cc (class arm_target) <low_get_next_pcs>
1534 <supports_software_single_step>: Declare.
1535 (arm_target::supports_software_single_step): Define.
1536 (arm_gdbserver_get_next_pcs): Turn into...
1537 (arm_target::low_get_next_pcs): ...this.
1538 (the_low_target): Remove the op field.
1539
1540 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1541
1542 Remove the 'sw_breakpoint_from_kind' linux target op, and let
1543 the concrete linux target define it by overriding the op
1544 in process_stratum_target.
1545
1546 * linux-low.cc (linux_process_target::sw_breakpoint_from_kind):
1547 Remove.
1548 * linux-low.h (struct linux_target_ops): Remove the op.
1549 (class linux_process_target) <sw_breakpoint_from_kind>: Remove.
1550 * linux-x86-low.cc (class x86_target) <sw_breakpoint_from_kind>:
1551 Declare.
1552 (x86_sw_breakpoint_from_kind): Turn into...
1553 (x86_target::sw_breakpoint_from_kind): ...this.
1554 (the_low_target): Remove the op field.
1555 * linux-aarch64-low.cc (class aarch64_target)
1556 <sw_breakpoint_from_kind>: Declare.
1557 (aarch64_sw_breakpoint_from_kind): Turn into...
1558 (aarch64_target::sw_breakpoint_from_kind): ...this.
1559 (the_low_target): Remove the op field.
1560 * linux-arm-low.cc (class arm_target) <sw_breakpoint_from_kind>:
1561 Declare.
1562 (arm_target::sw_breakpoint_from_kind): Define.
1563 (the_low_target): Remove the op field.
1564 * linux-bfin-low.cc (class bfin_target) <sw_breakpoint_from_kind>:
1565 Declare.
1566 (bfin_sw_breakpoint_from_kind): Turn into...
1567 (bfin_target::sw_breakpoint_from_kind): ...this.
1568 (the_low_target): Remove the op field.
1569 * linux-cris-low.cc (class cris_target) <sw_breakpoint_from_kind>:
1570 Declare.
1571 (cris_sw_breakpoint_from_kind): Turn into...
1572 (cris_target::sw_breakpoint_from_kind): ...this.
1573 (the_low_target): Remove the op field.
1574 * linux-crisv32-low.cc (class crisv32_target)
1575 <sw_breakpoint_from_kind>: Declare.
1576 (cris_sw_breakpoint_from_kind): Turn into...
1577 (crisv32_target::sw_breakpoint_from_kind): ...this.
1578 (the_low_target): Remove the op field.
1579 * linux-ia64-low.cc (class ia64_target) <sw_breakpoint_from_kind>:
1580 Declare.
1581 (ia64_target::sw_breakpoint_from_kind): Define.
1582 * linux-m32r-low.cc (class m32r_target) <sw_breakpoint_from_kind>:
1583 Declare.
1584 (m32r_sw_breakpoint_from_kind): Turn into...
1585 (m32r_target::sw_breakpoint_from_kind): ...this.
1586 (the_low_target): Remove the op field.
1587 * linux-m68k-low.cc (class m68k_target) <sw_breakpoint_from_kind>:
1588 Declare.
1589 (m68k_sw_breakpoint_from_kind): Turn into...
1590 (m68k_target::sw_breakpoint_from_kind): ...this.
1591 (the_low_target): Remove the op field.
1592 * linux-mips-low.cc (class mips_target) <sw_breakpoint_from_kind>:
1593 Declare.
1594 (mips_sw_breakpoint_from_kind): Turn into...
1595 (mips_target::sw_breakpoint_from_kind): ...this.
1596 (the_low_target): Remove the op field.
1597 * linux-nios2-low.cc (class nios2_target) <sw_breakpoint_from_kind>:
1598 Declare.
1599 (nios2_sw_breakpoint_from_kind): Turn into...
1600 (nios2_target::sw_breakpoint_from_kind): ...this.
1601 (the_low_target): Remove the op field.
1602 * linux-ppc-low.cc (class ppc_target) <sw_breakpoint_from_kind>:
1603 Declare.
1604 (ppc_sw_breakpoint_from_kind): Turn into...
1605 (ppc_target::sw_breakpoint_from_kind): ...this.
1606 (the_low_target): Remove the op field.
1607 * linux-riscv-low.cc (class riscv_target) <sw_breakpoint_from_kind>:
1608 Declare.
1609 (riscv_sw_breakpoint_from_kind): Turn into...
1610 (riscv_target::sw_breakpoint_from_kind): ...this.
1611 (the_low_target): Remove the op field.
1612 * linux-s390-low.cc (class s390_target) <sw_breakpoint_from_kind>:
1613 Declare.
1614 (s390_sw_breakpoint_from_kind): Turn into...
1615 (s390_target::sw_breakpoint_from_kind): ...this.
1616 (the_low_target): Remove the op field.
1617 * linux-sh-low.cc (class sh_target) <sw_breakpoint_from_kind>:
1618 Declare.
1619 (sh_sw_breakpoint_from_kind): Turn into...
1620 (sh_target::sw_breakpoint_from_kind): ...this.
1621 (the_low_target): Remove the op field.
1622 * linux-sparc-low.cc (class sparc_target) <sw_breakpoint_from_kind>:
1623 Declare.
1624 (sparc_sw_breakpoint_from_kind): Turn into...
1625 (sparc_target::sw_breakpoint_from_kind): ...this.
1626 (the_low_target): Remove the op field.
1627 * linux-tic6x-low.cc (class tic6x_target) <sw_breakpoint_from_kind>:
1628 Declare.
1629 (tic6x_sw_breakpoint_from_kind): Turn into...
1630 (tic6x_target::sw_breakpoint_from_kind): ...this.
1631 (the_low_target): Remove the op field.
1632 * linux-tile-low.cc (class tile_target) <sw_breakpoint_from_kind>:
1633 Declare.
1634 (tile_sw_breakpoint_from_kind): Turn into...
1635 (tile_target::sw_breakpoint_from_kind): ...this.
1636 (the_low_target): Remove the op field.
1637 * linux-xtensa-low.cc (class xtensa_target)
1638 <sw_breakpoint_from_kind>: Declare.
1639 (xtensa_sw_breakpoint_from_kind): Turn into...
1640 (xtensa_target::sw_breakpoint_from_kind): ...this.
1641 (the_low_target): Remove the op field.
1642
1643 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1644
1645 Remove the 'breakpoint_kind_from_pc' and
1646 'breakpoint_kind_from_current_state' linux target ops, and let the
1647 concrete linux target define them by overriding the ops of
1648 process_stratum_target.
1649
1650 * linux-low.cc (linux_process_target::breakpoint_kind_from_pc):
1651 Remove.
1652 (linux_process_target::breakpoint_kind_from_current_state): Remove.
1653 * linux-low.h (struct linux_target_ops): Remove ops.
1654 (class linux_process_target) <breakpoint_kind_from_pc>: Remove.
1655 <breakpoint_kind_from_current_state>: Remove.
1656 * linux-x86-low.cc (the_low_target): Remove the op fields.
1657 * linux-bfin-low.cc (the_low_target): Ditto.
1658 * linux-cris-low.cc (the_low_target): Ditto.
1659 * linux-crisv32-low.cc (the_low_target): Ditto.
1660 * linux-m32r-low.cc (the_low_target): Ditto.
1661 * linux-m68k-low.cc (the_low_target): Ditto.
1662 * linux-mips-low.cc (the_low_target): Ditto.
1663 * linux-nios2-low.cc (the_low_target): Ditto.
1664 * linux-ppc-low.cc (the_low_target): Ditto.
1665 * linux-s390-low.cc (the_low_target): Ditto.
1666 * linux-sh-low.cc (the_low_target): Ditto.
1667 * linux-sparc-low.cc (the_low_target): Ditto.
1668 * linux-tic6x-low.cc (the_low_target): Ditto.
1669 * linux-tile-low.cc (the_low_target): Ditto.
1670 * linux-xtensa-low.cc (the_low_target): Ditto.
1671 * linux-aarch64-low.cc (class aarch64_target)
1672 <breakpoint_kind_from_pc>
1673 <breakpoint_kind_from_current_state>: Declare.
1674 (aarch64_breakpoint_kind_from_pc): Turn into...
1675 (aarch64_target::breakpoint_kind_from_pc): ...this.
1676 (aarch64_breakpoint_kind_from_current_state): Turn into...
1677 (aarch64_target::breakpoint_kind_from_current_state): ...this.
1678 (the_low_target): Remove the op fields.
1679 * linux-arm-low.cc (class arm_target):
1680 <breakpoint_kind_from_pc>
1681 <breakpoint_kind_from_current_state>: Declare.
1682 (arm_target::breakpoint_kind_from_pc): Define.
1683 (arm_target::breakpoint_kind_from_current_state): Define.
1684 (the_low_target): Remove the op fields.
1685 * linux-riscv-low.cc (class riscv_target):
1686 <breakpoint_kind_from_pc>: Declare.
1687 (riscv_breakpoint_kind_from_pc): Turn into...
1688 (riscv_target::breakpoint_kind_from_pc): ...this.
1689 (the_low_target): Remove the op fields.
1690
1691 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1692
1693 Turn the 'get_pc' and 'set_pc' linux target ops into methods
1694 of linux_process_target.
1695
1696 * linux-low.h (struct linux_target_ops): Remove the ops.
1697 (class linux_process_target) <low_supports_breakpoints>
1698 <low_get_pc>
1699 <low_set_pc>: Declare.
1700 * linux-low.cc (supports_breakpoints): Turn into...
1701 (linux_process_target::low_supports_breakpoints): ...this.
1702 (linux_process_target::low_get_pc): Define.
1703 (linux_process_target::low_set_pc): Define.
1704
1705 Update the callers below.
1706
1707 (linux_process_target::get_pc)
1708 (linux_process_target::save_stop_reason)
1709 (linux_process_target::maybe_move_out_of_jump_pad)
1710 (linux_process_target::wait_1)
1711 (linux_process_target::resume_one_lwp_throw)
1712 (linux_process_target::resume)
1713 (linux_process_target::proceed_all_lwps)
1714 (linux_process_target::read_pc)
1715 (linux_process_target::write_pc)
1716
1717 * linux-x86-low.cc (class linux_process_target)
1718 <low_supports_breakpoints>
1719 <low_get_pc>
1720 <low_set_pc>: Declare.
1721 (x86_target::low_supports_breakpoints): Define.
1722 (x86_get_pc): Turn into...
1723 (x86_target::low_get_pc): ...this.
1724 (x86_set_pc): Turn into...
1725 (x86_target::low_set_pc): ...this.
1726 (the_low_target): Remove the op fields.
1727 * linux-arm-low.cc (class arm_target)
1728 <low_supports_breakpoints>
1729 <low_get_pc>
1730 <low_set_pc>: Declare.
1731 (arm_target::low_supports_breakpoints)
1732 (arm_target::low_get_pc)
1733 (arm_target::low_set_pc): Define.
1734 (the_low_target): Remove the op fields.
1735 * linux-bfin-low.cc (class bfin_target)
1736 <low_supports_breakpoints>
1737 <low_get_pc>
1738 <low_set_pc>: Declare.
1739 (bfin_target::low_supports_breakpoints)
1740 (bfin_target::low_get_pc)
1741 (bfin_target::low_set_pc): Define.
1742 (the_low_target): Remove the op fields.
1743 * linux-cris-low.cc (class cris_target)
1744 <low_supports_breakpoints>
1745 <low_get_pc>
1746 <low_set_pc>: Declare.
1747 (cris_target::low_supports_breakpoints)
1748 (cris_target::low_get_pc)
1749 (cris_target::low_set_pc): Define.
1750 (the_low_target): Remove the op fields.
1751 * linux-crisv32-low.cc (class crisv32_target)
1752 <low_supports_breakpoints>
1753 <low_get_pc>
1754 <low_set_pc>: Declare.
1755 (crisv32_target::low_supports_breakpoints)
1756 (crisv32_target::low_get_pc)
1757 (crisv32_target::low_set_pc): Define.
1758 (the_low_target): Remove the op fields.
1759 * linux-m32r-low.cc (class m32r_target)
1760 <low_supports_breakpoints>
1761 <low_get_pc>
1762 <low_set_pc>: Declare.
1763 (m32r_target::low_supports_breakpoints)
1764 (m32r_target::low_get_pc)
1765 (m32r_target::low_set_pc): Define.
1766 (the_low_target): Remove the op fields.
1767 * linux-m68k-low.cc (class m68k_target)
1768 <low_supports_breakpoints>
1769 <low_get_pc>
1770 <low_set_pc>: Declare.
1771 (m68k_target::low_supports_breakpoints)
1772 (m68k_target::low_get_pc)
1773 (m68k_target::low_set_pc): Define.
1774 (the_low_target): Remove the op fields.
1775 * linux-nios2-low.cc (class nios2_target)
1776 <low_supports_breakpoints>
1777 <low_get_pc>
1778 <low_set_pc>: Declare.
1779 (nios2_target::low_supports_breakpoints)
1780 (nios2_target::low_get_pc)
1781 (nios2_target::low_set_pc): Define.
1782 (the_low_target): Remove the op fields.
1783 * linux-sh-low.cc (class sh_target)
1784 <low_supports_breakpoints>
1785 <low_get_pc>
1786 <low_set_pc>: Declare.
1787 (sh_target::low_supports_breakpoints)
1788 (sh_target::low_get_pc)
1789 (sh_target::low_set_pc): Define.
1790 (the_low_target): Remove the op fields.
1791 * linux-xtensa-low.cc (class xtensa_target)
1792 <low_supports_breakpoints>
1793 <low_get_pc>
1794 <low_set_pc>: Declare.
1795 (xtensa_target::low_supports_breakpoints)
1796 (xtensa_target::low_get_pc)
1797 (xtensa_target::low_set_pc): Define.
1798 (the_low_target): Remove the op fields.
1799 * linux-sparc-low.cc (class sparc_target)
1800 <low_supports_breakpoints>
1801 <low_get_pc>: Declare.
1802 (sparc_target::low_supports_breakpoints)
1803 (sparc_target::low_get_pc): Define.
1804 (the_low_target): Remove the op fields.
1805 * linux-tile-low.cc (class tile_target)
1806 <low_supports_breakpoints>
1807 <low_get_pc>
1808 <low_set_pc>: Declare.
1809 (tile_target::low_supports_breakpoints)
1810 (tile_target::low_get_pc)
1811 (tile_target::low_set_pc): Define.
1812 (the_low_target): Remove the op fields.
1813 * linux-aarch64-low.cc (class aarch64_target)
1814 <low_supports_breakpoints>
1815 <low_get_pc>
1816 <low_set_pc>: Declare.
1817 (aarch64_target::low_supports_breakpoints): Define.
1818 (aarch64_get_pc): Turn into...
1819 (aarch64_target::low_get_pc): ...this.
1820 (aarch64_set_pc): Turn into...
1821 (aarch64_target::low_set_pc): ...this.
1822 (the_low_target): Remove the op fields.
1823 * linux-mips-low.cc (class mips_target)
1824 <low_supports_breakpoints>
1825 <low_get_pc>
1826 <low_set_pc>: Declare.
1827 (mips_target::low_supports_breakpoints): Define.
1828 (mips_get_pc): Turn into...
1829 (mips_target::low_get_pc): ...this.
1830 (mips_set_pc): Turn into...
1831 (mips_target::low_set_pc): ...this.
1832 (the_low_target): Remove the op fields.
1833 * linux-ppc-low.cc (class ppc_target)
1834 <low_supports_breakpoints>
1835 <low_get_pc>
1836 <low_set_pc>: Declare.
1837 (ppc_target::low_supports_breakpoints): Define.
1838 (ppc_get_pc): Turn into...
1839 (ppc_target::low_get_pc): ...this.
1840 (ppc_set_pc): Turn into...
1841 (ppc_target::low_set_pc): ...this.
1842 (the_low_target): Remove the op fields.
1843 * linux-riscv-low.cc (class riscv_target)
1844 <low_supports_breakpoints>
1845 <low_get_pc>
1846 <low_set_pc>: Declare.
1847 (riscv_target::low_supports_breakpoints): Define.
1848 (riscv_get_pc): Turn into...
1849 (riscv_target::low_get_pc): ...this.
1850 (riscv_set_pc): Turn into...
1851 (riscv_target::low_set_pc): ...this.
1852 (the_low_target): Remove the op fields.
1853 * linux-s390-low.cc (class s390_target)
1854 <low_supports_breakpoints>
1855 <low_get_pc>
1856 <low_set_pc>: Declare.
1857 (s390_target::low_supports_breakpoints): Define.
1858 (s390_get_pc): Turn into...
1859 (s390_target::low_get_pc): ...this.
1860 (s390_set_pc): Turn into...
1861 (s390_target::low_set_pc): ...this.
1862 (the_low_target): Remove the op fields.
1863 * linux-tic6x-low.cc (class tic6x_target)
1864 <low_supports_breakpoints>
1865 <low_get_pc>
1866 <low_set_pc>: Declare.
1867 (tic6x_target::low_supports_breakpoints): Define.
1868 (tic6x_get_pc): Turn into...
1869 (tic6x_target::low_get_pc): ...this.
1870 (tic6x_set_pc): Turn into...
1871 (tic6x_target::low_set_pc): ...this.
1872 (the_low_target): Remove the op fields.
1873
1874 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1875
1876 Turn some more static methods in linux-low into private methods
1877 of linux_process_target.
1878
1879 * linux-low.cc (get_pc): Turn into...
1880 (linux_process_target::get_pc): ...this.
1881 (save_stop_reason): Turn into...
1882 (linux_process_target::save_stop_reason): ...this.
1883 (thread_still_has_status_pending_p): Turn into...
1884 (linux_process_target::thread_still_has_status_pending): ...this.
1885 (status_pending_p_callback): Turn into...
1886 (linux_process_target::status_pending_p_callback): ...this.
1887 (resume_stopped_resumed_lwps): Turn into...
1888 (linux_process_target::resume_stopped_resumed_lwps): ...this.
1889 (install_software_single_step_breakpoints): Turn into...
1890 (linux_process_target::install_software_single_step_breakpoints):
1891 ...this.
1892 (single_step): Turn into...
1893 (linux_process_target::single_step): ...this.
1894 (linux_resume_one_lwp_throw): Turn into...
1895 (linux_process_target::resume_one_lwp_throw): ...this.
1896 (linux_resume_one_lwp): Turn into...
1897 (linux_process_target::resume_one_lwp): ...this.
1898 (resume_status_pending_p): Turn into...
1899 (linux_process_target::resume_status_pending): ...this.
1900 (need_step_over_p): Turn into...
1901 (linux_process_target::thread_needs_step_over): ...this.
1902 (linux_resume_one_thread): Turn into...
1903 (linux_process_target::resume_one_thread): ...this.
1904 (proceed_one_lwp): Turn into...
1905 (linux_process_target::proceed_one_lwp): ...this.
1906 (unsuspend_and_proceed_one_lwp): Turn into...
1907 (linux_process_target::unsuspend_and_proceed_one_lwp): ...this.
1908
1909 Update the calls/references to the above functions below.
1910
1911 (linux_process_target::handle_extended_wait)
1912 (linux_process_target::filter_event)
1913 (linux_process_target::wait_for_event_filtered)
1914 (linux_process_target::wait_1)
1915 (linux_process_target::move_out_of_jump_pad)
1916 (linux_process_target::start_step_over)
1917 (linux_process_target::resume)
1918 (linux_process_target::proceed_all_lwps)
1919 (regsets_store_inferior_registers)
1920 (linux_process_target::store_register)
1921
1922 * linux-low.h (class linux_process_target)
1923 <get_pc>
1924 <save_stop_reason>
1925 <thread_still_has_status_pending>
1926 <status_pending_p_callback>
1927 <resume_stopped_resumed_lwps>
1928 <install_software_single_step_breakpoints>
1929 <single_step>
1930 <resume_one_lwp_throw>
1931 <resume_one_lwp>
1932 <resume_status_pending>
1933 <thread_needs_step_over>
1934 <resume_one_thread>
1935 <proceed_one_lwp>
1936 <unsuspend_and_proceed_one_lwp>: Declare.
1937
1938 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1939
1940 Turn the 'fetch_register' linux target op into a method of
1941 linux_process_target.
1942
1943 * linux-low.h (struct linux_target_ops) <fetch_register>: Remove.
1944 (class linux_process_target) <low_fetch_register>: Declare.
1945 * linux-x86-low.cc (the_low_target)
1946 * linux-aarch64-low.cc (the_low_target)
1947 * linux-arm-low.cc (the_low_target)
1948 * linux-bfin-low.cc (the_low_target)
1949 * linux-cris-low.cc (the_low_target)
1950 * linux-crisv32-low.cc (the_low_target)
1951 * linux-m32r-low.cc (the_low_target)
1952 * linux-m68k-low.cc (the_low_target)
1953 * linux-nios2-low.cc (the_low_target)
1954 * linux-ppc-low.cc (the_low_target)
1955 * linux-s390-low.cc (the_low_target)
1956 * linux-sh-low.cc (the_low_target)
1957 * linux-sparc-low.cc (the_low_target)
1958 * linux-tic6x-low.cc (the_low_target)
1959 * linux-tile-low.cc (the_low_target)
1960 * linux-xtensa-low.cc (the_low_target): Remove the op field.
1961 * linux-ia64-low.cc (class ia64_target) <low_fetch_register>:
1962 Declare.
1963 (ia64_fetch_register): Turn into...
1964 (ia64_target::low_fetch_register): ...this.
1965 (the_low_target): Remove the op field.
1966 * linux-mips-low.cc (class mips_target) <low_fetch_register>:
1967 Declare.
1968 (mips_fetch_register): Turn into...
1969 (mips_target::low_fetch_register): ...this.
1970 (the_low_target): Remove the op field.
1971 * linux-riscv-low.cc (class riscv_target) <low_fetch_register>:
1972 Declare.
1973 (riscv_fetch_register): Turn into...
1974 (riscv_target::low_fetch_register): ...this.
1975 (the_low_target): Remove the op field.
1976
1977 Update the callers below.
1978
1979 * linux-low.cc (linux_process_target::fetch_registers)
1980 (linux_process_target::low_fetch_register)
1981
1982 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1983
1984 Turn the 'cannot_fetch_register' and 'cannot_store_register'
1985 linux target ops into methods of linux_process_target.
1986
1987 * linux-low.h (struct linux_target_ops): Remove the low target ops.
1988 (class linux_process_target) <fetch_register>
1989 <store_register>
1990 <usr_fetch_inferior_registers>
1991 <usr_store_inferior_registers>
1992 <low_cannot_fetch_register>
1993 <low_cannot_fetch_register> Declare.
1994 * linux-low.cc (fetch_register): Turn into...
1995 (linux_process_target::fetch_register): ...this.
1996 (store_register): Turn into ...
1997 (linux_process_target::store_register): ...this.
1998 (usr_fetch_inferior_registers): Turn into...
1999 (linux_process_target::usr_fetch_inferior_registers): ...this.
2000 (usr_store_inferior_registers): Turn into...
2001 (linux_process_target::usr_store_inferior_registers): ...this.
2002 * linux-x86-low.cc (class x86_target)
2003 <low_cannot_fetch_register>
2004 <low_cannot_store_register>: Declare.
2005 (x86_cannot_store_register): Turn into...
2006 (x86_target::low_cannot_store_register): ...this.
2007 (x86_cannot_fetch_register): Turn into...
2008 (x86_target::low_cannot_fetch_register): ...this.
2009 (the_low_target): Remove the target op fields.
2010 * linux-aarch64-low.cc (class aarch64_target)
2011 <low_cannot_fetch_register>
2012 <low_cannot_store_register>: Declare.
2013 (aarch64_target::low_cannot_fetch_register)
2014 (aarch64_target::low_cannot_store_register): Define.
2015 (the_low_target): Remove the op fields.
2016 * linux-arm-low.cc (class arm_target)
2017 <low_cannot_fetch_register>
2018 <low_cannot_store_register>: Declare.
2019 (arm_cannot_fetch_register): Turn into...
2020 (arm_target::low_cannot_fetch_register): ...this.
2021 (arm_cannot_store_register): Turn into...
2022 (arm_target::low_cannot_store_register): ...this.
2023 (the_low_target): Remove the op fields.
2024 * linux-bfin-low.cc (class bfin_target)
2025 <low_cannot_fetch_register>
2026 <low_cannot_store_register>: Declare.
2027 (bfin_cannot_fetch_register): Turn into...
2028 (bfin_target::low_cannot_fetch_register): ...this.
2029 (bfin_cannot_store_register): Turn into...
2030 (bfin_target::low_cannot_store_register): ...this.
2031 (the_low_target): Remove the op fields.
2032 * linux-cris-low.cc (class cris_target)
2033 <low_cannot_fetch_register>
2034 <low_cannot_store_register>: Declare.
2035 (cris_cannot_fetch_register): Turn into...
2036 (cris_target::low_cannot_fetch_register): ...this.
2037 (cris_cannot_store_register): Turn into...
2038 (cris_target::low_cannot_store_register): ...this.
2039 (the_low_target): Remove the op fields.
2040 * linux-crisv32-low.cc (class crisv32_target)
2041 <low_cannot_fetch_register>
2042 <low_cannot_store_register>: Declare.
2043 (crisv32_target::low_cannot_fetch_register)
2044 (crisv32_target::low_cannot_store_register): Define.
2045 (the_low_target): Remove the op fields.
2046 * linux-ia64-low.cc (class ia64_target)
2047 <low_cannot_fetch_register>
2048 <low_cannot_store_register>: Declare.
2049 (ia64_cannot_fetch_register): Turn into...
2050 (ia64_target::low_cannot_fetch_register): ...this.
2051 (ia64_cannot_store_register): Turn into...
2052 (ia64_target::low_cannot_store_register): ...this.
2053 (the_low_target): Remove the op fields.
2054 * linux-m32r-low.cc (class m32r_target)
2055 <low_cannot_fetch_register>
2056 <low_cannot_store_register>: Declare.
2057 (m32r_cannot_fetch_register): Turn into...
2058 (m32r_target::low_cannot_fetch_register): ...this.
2059 (m32r_cannot_store_register): Turn into...
2060 (m32r_target::low_cannot_store_register): ...this.
2061 (the_low_target): Remove the op fields.
2062 * linux-m68k-low.cc (class m68k_target)
2063 <low_cannot_fetch_register>
2064 <low_cannot_store_register>: Declare.
2065 (m68k_cannot_fetch_register): Turn into...
2066 (m68k_target::low_cannot_fetch_register): ...this.
2067 (m68k_cannot_store_register): Turn into...
2068 (m68k_target::low_cannot_store_register): ...this.
2069 (the_low_target): Remove the op fields.
2070 * linux-mips-low.cc (class mips_target)
2071 <low_cannot_fetch_register>
2072 <low_cannot_store_register>: Declare.
2073 (mips_cannot_fetch_register): Turn into...
2074 (mips_target::low_cannot_fetch_register): ...this.
2075 (mips_cannot_store_register): Turn into...
2076 (mips_target::low_cannot_store_register): ...this.
2077 (get_usrregs_info): Inline at the call sites in
2078 low_cannot_fetch_register and low_cannot_store_register,
2079 and remove.
2080 (the_low_target): Remove the op fields.
2081 * linux-nios2-low.cc (class nios2_target)
2082 <low_cannot_fetch_register>
2083 <low_cannot_store_register>: Declare.
2084 (nios2_cannot_fetch_register): Turn into...
2085 (nios2_target::low_cannot_fetch_register): ...this.
2086 (nios2_cannot_store_register): Turn into...
2087 (nios2_target::low_cannot_store_register): ...this.
2088 (the_low_target): Remove the op fields.
2089 * linux-ppc-low.cc (class ppc_target)
2090 <low_cannot_fetch_register>
2091 <low_cannot_store_register>: Declare.
2092 (ppc_cannot_fetch_register): Turn into...
2093 (ppc_target::low_cannot_fetch_register): ...this.
2094 (ppc_cannot_store_register): Turn into...
2095 (ppc_target::low_cannot_store_register): ...this.
2096 (the_low_target): Remove the op fields.
2097 * linux-riscv-low.cc (class riscv_target)
2098 <low_cannot_fetch_register>
2099 <low_cannot_store_register>: Declare.
2100 (riscv_target::low_cannot_fetch_register)
2101 (riscv_target::low_cannot_store_register): Define.
2102 (the_low_target): Remove the op fields.
2103 * linux-s390-low.cc (class s390_target)
2104 <low_cannot_fetch_register>
2105 <low_cannot_store_register>: Declare.
2106 (s390_cannot_fetch_register): Turn into...
2107 (s390_target::low_cannot_fetch_register): ...this.
2108 (s390_cannot_store_register): Turn into...
2109 (s390_target::low_cannot_store_register): ...this.
2110 (the_low_target): Remove the op fields.
2111 * linux-sh-low.cc (class sh_target)
2112 <low_cannot_fetch_register>
2113 <low_cannot_store_register>: Declare.
2114 (sh_cannot_fetch_register): Turn into...
2115 (sh_target::low_cannot_fetch_register): ...this.
2116 (sh_cannot_store_register): Turn into...
2117 (sh_target::low_cannot_store_register): ...this.
2118 (the_low_target): Remove the op fields.
2119 * linux-sparc-low.cc (class sparc_target)
2120 <low_cannot_fetch_register>
2121 <low_cannot_store_register>: Declare.
2122 (sparc_cannot_fetch_register): Turn into...
2123 (sparc_target::low_cannot_fetch_register): ...this.
2124 (sparc_cannot_store_register): Turn into...
2125 (sparc_target::low_cannot_store_register): ...this.
2126 (the_low_target): Remove the op fields.
2127 * linux-tic6x-low.cc (class tic6x_target)
2128 <low_cannot_fetch_register>
2129 <low_cannot_store_register>: Declare.
2130 (tic6x_cannot_fetch_register): Turn into...
2131 (tic6x_target::low_cannot_fetch_register): ...this.
2132 (tic6x_cannot_store_register): Turn into...
2133 (tic6x_target::low_cannot_store_register): ...this.
2134 (the_low_target): Remove the op fields.
2135 * linux-tile-low.cc (class tile_target)
2136 <low_cannot_fetch_register>
2137 <low_cannot_store_register>: Declare.
2138 (tile_cannot_fetch_register): Turn into...
2139 (tile_target::low_cannot_fetch_register): ...this.
2140 (tile_cannot_store_register): Turn into...
2141 (tile_target::low_cannot_store_register): ...this.
2142 (the_low_target): Remove the op fields.
2143 * linux-xtensa-low.cc (class xtensa_target)
2144 <low_cannot_fetch_register>
2145 <low_cannot_store_register>: Declare.
2146 (xtensa_target::low_cannot_fetch_register)
2147 (xtensa_target::low_cannot_store_register): Define.
2148 (the_low_target): Remove the op fields.
2149
2150 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2151
2152 Turn the 'regs_info' linux target op into a method of
2153 linux_process_target.
2154
2155 * linux-low.h (struct linux_target_ops) <regs_info>: Remove.
2156 (class linux_process_target) <get_regs_info>: Define.
2157
2158 Update the callers below.
2159
2160 * linux-low.cc (linux_process_target::fetch_registers)
2161 (linux_process_target::store_registers)
2162 * proc-service.cc (gregset_info)
2163
2164 * linux-x86-low.cc (class x86_target) <get_regs_info>: Declare.
2165 (x86_linux_regs_info): Turn into ...
2166 (x86_target::get_regs_info): ...this.
2167 (the_low_target): Remove the op field.
2168 * linux-aarch64-low.cc (class aarch64_target) <get_regs_info>:
2169 Declare.
2170 (aarch64_regs_info): Turn into ...
2171 (aarch64_target::get_regs_info): ...this.
2172 (the_low_target): Remove the op field.
2173 * linux-arm-low.cc (class arm_target) <get_regs_info>: Declare.
2174 (arm_regs_info): Turn into ...
2175 (arm_target::get_regs_info): ...this.
2176 (the_low_target): Remove the op field.
2177 * linux-bfin-low.cc (class bfin_target) <get_regs_info>: Declare.
2178 (bfin_regs_info): Turn into ...
2179 (bfin_target::get_regs_info): ...this.
2180 (the_low_target): Remove the op field.
2181 * linux-cris-low.cc (class cris_target) <get_regs_info>: Declare.
2182 (cris_regs_info): Turn into ...
2183 (cris_target::get_regs_info): ...this.
2184 (the_low_target): Remove the op field.
2185 * linux-crisv32-low.cc (class crisv32_target) <get_regs_info>:
2186 Declare.
2187 (crisv32_regs_info): Turn into ...
2188 (crisv32_target::get_regs_info): ...this.
2189 (the_low_target): Remove the op field.
2190 * linux-ia64-low.cc (class ia64_target) <get_regs_info>: Declare.
2191 (ia64_regs_info): Turn into ...
2192 (ia64_target::get_regs_info): ...this.
2193 (the_low_target): Remove the op field.
2194 * linux-m32r-low.cc (class m32r_target) <get_regs_info>: Declare.
2195 (m32r_regs_info): Turn into ...
2196 (m32r_target::get_regs_info): ...this.
2197 (the_low_target): Remove the op field.
2198 * linux-m68k-low.cc (class m68k_target) <get_regs_info>: Declare.
2199 (m68k_regs_info): Turn into ...
2200 (m68k_target::get_regs_info): ...this.
2201 (the_low_target): Remove the op field.
2202 * linux-mips-low.cc (class mips_target) <get_regs_info>: Declare.
2203 (mips_regs_info): Turn into ...
2204 (mips_target::get_regs_info): ...this.
2205 (the_low_target): Remove the op field.
2206 (get_usrregs_info): Update the call to the op.
2207 * linux-nios2-low.cc (class nios2_target) <get_regs_info>: Declare.
2208 (nios2_regs_info): Turn into ...
2209 (nios2_target::get_regs_info): ...this.
2210 (the_low_target): Remove the op field.
2211 * linux-ppc-low.cc (class ppc_target) <get_regs_info>: Declare.
2212 (ppc_regs_info): Turn into ...
2213 (ppc_target::get_regs_info): ...this.
2214 (the_low_target): Remove the op field.
2215 * linux-riscv-low.cc (class riscv_target) <get_regs_info>: Declare.
2216 (riscv_regs_info): Turn into ...
2217 (riscv_target::get_regs_info): ...this.
2218 (the_low_target): Remove the op field.
2219 * linux-s390-low.cc (class s390_target) <get_regs_info>: Declare.
2220 (s390_regs_info): Turn into ...
2221 (s390_target::get_regs_info): ...this.
2222 (the_low_target): Remove the op field.
2223 (s390_collect_ptrace_register)
2224 (s390_supply_ptrace_register)
2225 (s390_fill_gregset): Update the call to the op.
2226 * linux-sh-low.cc (class sh_target) <get_regs_info>: Declare.
2227 (sh_regs_info): Turn into ...
2228 (sh_target::get_regs_info): ...this.
2229 (the_low_target): Remove the op field.
2230 * linux-sparc-low.cc (class sparc_target) <get_regs_info>: Declare.
2231 (sparc_regs_info): Turn into ...
2232 (sparc_target::get_regs_info): ...this.
2233 (the_low_target): Remove the op field.
2234 * linux-tic6x-low.cc (class tic6x_target) <get_regs_info>: Declare.
2235 (tic6x_regs_info): Turn into ...
2236 (tic6x_target::get_regs_info): ...this.
2237 (the_low_target): Remove the op field.
2238 * linux-tile-low.cc (class tile_target) <get_regs_info>: Declare.
2239 (tile_regs_info): Turn into ...
2240 (tile_target::get_regs_info): ...this.
2241 (the_low_target): Remove the op field.
2242 * linux-xtensa-low.cc (class xtensa_target) <get_regs_info>:
2243 Declare.
2244 (xtensa_regs_info): Turn into ...
2245 (xtensa_target::get_regs_info): ...this.
2246 (the_low_target): Remove the op field.
2247
2248 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2249
2250 Turn the 'arch_setup' linux target op into a method of
2251 linux_process_target.
2252
2253 * linux-low.h (struct linux_target_ops) <arch_setup>: Delete.
2254 (class linux_process_target) <arch_setup_thread>
2255 <low_arch_setup>: New declarations.
2256 * linux-low.cc (linux_arch_setup): Delete.
2257 (linux_arch_setup_thread): Turn into...
2258 (linux_process_target::arch_setup_thread): ... this.
2259
2260 Update the callers below.
2261
2262 (linux_process_target::handle_extended_wait)
2263 (linux_process_target::post_create_inferior)
2264 (linux_process_target::filter_event)
2265
2266 * linux-x86-low.cc (class x86_target) <low_arch_setup>: New
2267 declaration.
2268 (x86_linux_update_xmltarget): Turn into...
2269 (x86_target::update_xmltarget): ...this.
2270 (x86_linux_process_qsupported): Update the call to
2271 x86_linux_update_xmltarget.
2272 (x86_arch_setup): Turn into ...
2273 (x86_target::low_arch_setup): ...this.
2274 (the_low_target): Remove the op field.
2275 * linux-aarch64-low.cc (class aarch64_target) <low_arch_setup>: New
2276 declaration.
2277 (aarch64_arch_setup): Turn into ...
2278 (aarch64_target::low_arch_setup): ...this.
2279 (the_low_target): Remove the op field.
2280 * linux-arm-low.cc (class arm_target) <low_arch_setup>: New
2281 declaration.
2282 (arm_arch_setup): Turn into ...
2283 (arm_target::low_arch_setup): ...this.
2284 (the_low_target): Remove the op field.
2285 * linux-bfin-low.cc (class bfin_target) <low_arch_setup>: New
2286 declaration.
2287 (bfin_arch_setup): Turn into ...
2288 (bfin_target::low_arch_setup): ...this.
2289 (the_low_target): Remove the op field.
2290 * linux-cris-low.cc (class cris_target) <low_arch_setup>: New
2291 declaration.
2292 (cris_arch_setup): Turn into ...
2293 (cris_target::low_arch_setup): ...this.
2294 (the_low_target): Remove the op field.
2295 * linux-crisv32-low.cc (class crisv32_target) <low_arch_setup>: New
2296 declaration.
2297 (crisv32_arch_setup): Turn into ...
2298 (crisv32_target::low_arch_setup): ...this.
2299 (the_low_target): Remove the op field.
2300 * linux-ia64-low.cc (class ia64_target) <low_arch_setup>: New
2301 declaration.
2302 (ia64_arch_setup): Turn into ...
2303 (ia64_target::low_arch_setup): ...this.
2304 (the_low_target): Remove the op field.
2305 * linux-m32r-low.cc (class m32r_target) <low_arch_setup>: New
2306 declaration.
2307 (m32r_arch_setup): Turn into ...
2308 (m32r_target::low_arch_setup): ...this.
2309 (the_low_target): Remove the op field.
2310 * linux-m68k-low.cc (class m68k_target) <low_arch_setup>: New
2311 declaration.
2312 (m68k_arch_setup): Turn into ...
2313 (m68k_target::low_arch_setup): ...this.
2314 (the_low_target): Remove the op field.
2315 * linux-mips-low.cc (class mips_target) <low_arch_setup>: New
2316 declaration.
2317 (mips_arch_setup): Turn into ...
2318 (mips_target::low_arch_setup): ...this.
2319 (the_low_target): Remove the op field.
2320 * linux-nios2-low.cc (class nios2_target) <low_arch_setup>: New
2321 declaration.
2322 (nios2_arch_setup): Turn into ...
2323 (nios2_target::low_arch_setup): ...this.
2324 (the_low_target): Remove the op field.
2325 * linux-ppc-low.cc (class ppc_target) <low_arch_setup>: New
2326 declaration.
2327 (ppc_arch_setup): Turn into ...
2328 (ppc_target::low_arch_setup): ...this.
2329 (the_low_target): Remove the op field.
2330 * linux-riscv-low.cc (class riscv_target) <low_arch_setup>: New
2331 declaration.
2332 (riscv_arch_setup): Turn into ...
2333 (riscv_target::low_arch_setup): ...this.
2334 (the_low_target): Remove the op field.
2335 * linux-s390-low.cc (class s390_target) <low_arch_setup>: New
2336 declaration.
2337 (s390_arch_setup): Turn into ...
2338 (s390_target::low_arch_setup): ...this.
2339 (the_low_target): Remove the op field.
2340 * linux-sh-low.cc (class sh_target) <low_arch_setup>: New
2341 declaration.
2342 (sh_arch_setup): Turn into ...
2343 (sh_target::low_arch_setup): ...this.
2344 (the_low_target): Remove the op field.
2345 * linux-sparc-low.cc (class sparc_target) <low_arch_setup>: New
2346 declaration.
2347 (sparc_arch_setup): Turn into ...
2348 (sparc_target::low_arch_setup): ...this.
2349 (the_low_target): Remove the op field.
2350 * linux-tic6x-low.cc (class tic6x_target) <low_arch_setup>: New
2351 declaration.
2352 (tic6x_arch_setup): Turn into ...
2353 (tic6x_target::low_arch_setup): ...this.
2354 (the_low_target): Remove the op field.
2355 * linux-tile-low.cc (class tile_target) <low_arch_setup>: New
2356 declaration.
2357 (tile_arch_setup): Turn into ...
2358 (tile_target::low_arch_setup): ...this.
2359 (the_low_target): Remove the op field.
2360 * linux-xtensa-low.cc (class xtensa_target) <low_arch_setup>: New
2361 declaration.
2362 (xtensa_arch_setup): Turn into ...
2363 (xtensa_target::low_arch_setup): ...this.
2364 (the_low_target): Remove the op field.
2365
2366 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2367
2368 * linux-low.h (the_linux_target): New extern declaration.
2369 * linux-low.cc (initialize_low): Use 'the_linux_target' to set
2370 'the_target'.
2371 (the_linux_target): Remove.
2372 * linux-x86-low.cc (class x86_target): New class.
2373 (the_x86_target): New static object.
2374 (the_linux_target): Define as pointer to the_x86_target.
2375 * linux-aarch64-low.cc (class aarch64_target): New class.
2376 (the_aarch64_target): New static object.
2377 (the_linux_target): Define as pointer to the_aarch64_target.
2378 * linux-arm-low.cc (class arm_target): New class.
2379 (the_arm_target): New static object.
2380 (the_linux_target): Define as pointer to the_arm_target.
2381 * linux-bfin-low.cc (class bfin_target): New class.
2382 (the_bfin_target): New static object.
2383 (the_linux_target): Define as pointer to the_bfin_target.
2384 * linux-cris-low.cc (class cris_target): New class.
2385 (the_cris_target): New static object.
2386 (the_linux_target): Define as pointer to the_cris_target.
2387 * linux-crisv32-low.cc (class crisv32_target): New class.
2388 (the_crisv32_target): New static object.
2389 (the_linux_target): Define as pointer to the_crisv32_target.
2390 * linux-ia64-low.cc (class ia64_target): New class.
2391 (the_ia64_target): New static object.
2392 (the_linux_target): Define as pointer to the_ia64_target.
2393 * linux-m32r-low.cc (class m32r_target): New class.
2394 (the_m32r_target): New static object.
2395 (the_linux_target): Define as pointer to the_m32r_target.
2396 * linux-m68k-low.cc (class m68k_target): New class.
2397 (the_m68k_target): New static object.
2398 (the_linux_target): Define as pointer to the_m68k_target.
2399 * linux-mips-low.cc (class mips_target): New class.
2400 (the_mips_target): New static object.
2401 (the_linux_target): Define as pointer to the_mips_target.
2402 * linux-nios2-low.cc (class nios2_target): New class.
2403 (the_nios2_target): New static object.
2404 (the_linux_target): Define as pointer to the_nios2_target.
2405 * linux-ppc-low.cc (class ppc_target): New class.
2406 (the_ppc_target): New static object.
2407 (the_linux_target): Define as pointer to the_ppc_target.
2408 * linux-riscv-low.cc (class riscv_target): New class.
2409 (the_riscv_target): New static object.
2410 (the_linux_target): Define as pointer to the_riscv_target.
2411 * linux-s390-low.cc (class s390_target): New class.
2412 (the_s390_target): New static object.
2413 (the_linux_target): Define as pointer to the_s390_target.
2414 * linux-sh-low.cc (class sh_target): New class.
2415 (the_sh_target): New static object.
2416 (the_linux_target): Define as pointer to the_sh_target.
2417 * linux-sparc-low.cc (class sparc_target): New class.
2418 (the_sparc_target): New static object.
2419 (the_linux_target): Define as pointer to the_sparc_target.
2420 * linux-tic6x-low.cc (class tic6x_target): New class.
2421 (the_tic6x_target): New static object.
2422 (the_linux_target): Define as pointer to the_tic6x_target.
2423 * linux-tile-low.cc (class tile_target): New class.
2424 (the_tile_target): New static object.
2425 (the_linux_target): Define as pointer to the_tile_target.
2426 * linux-xtensa-low.cc (class xtensa_target): New class.
2427 (the_xtensa_target): New static object.
2428 (the_linux_target): Define as pointer to the_xtensa_target.
2429
2430 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2431
2432 Turn some static functions in linux-low.cc into private methods of
2433 linux_process_target.
2434
2435 * linux-low.cc (handle_extended_wait): Turn into ...
2436 (linux_process_target::handle_extended_wait): ...this. Call
2437 'mourn' on 'this' object instead of 'the_target'.
2438 (maybe_move_out_of_jump_pad): Turn into...
2439 (linux_process_target::maybe_move_out_of_jump_pad): ...this.
2440 (linux_low_filter_event): Turn into...
2441 (linux_process_target::filter_event): ...this.
2442 (linux_wait_for_event_filtered): Turn into...
2443 (linux_process_target::wait_for_event_filtered): ...this.
2444 (linux_wait_for_event): Turn into...
2445 (linux_process_target::wait_for_event): ...this.
2446 (linux_wait_1): Turn into...
2447 (linux_process_target::wait_1): ...this.
2448 (wait_for_sigstop): Turn into...
2449 (linux_process_target::wait_for_sigstop): ...this.
2450 (move_out_of_jump_pad_callback): Turn into...
2451 (linux_process_target::move_out_of_jump_pad): ...this.
2452 (stop_all_lwps): Turn into...
2453 (linux_process_target::stop_all_lwps): ...this.
2454 (start_step_over): Turn into...
2455 (linux_process_target::start_step_over): ...this.
2456 (complete_ongoing_step_over): Turn into...
2457 (linux_process_target::complete_ongoing_step_over): ...this.
2458 (proceed_all_lwps): Turn into...
2459 (linux_process_target::proceed_all_lwps): ...this.
2460 (unstop_all_lwps): Turn into...
2461 (linux_process_target::unstop_all_lwps): ...this.
2462
2463 * linux-low.h (class linux_process_target)
2464 <handle_extended_wait>
2465 <maybe_move_out_of_jump_pad>
2466 filter_event>
2467 <wait_for_event_filtered>
2468 <wait_for_event>
2469 <wait_1>
2470 <wait_for_sigstop>
2471 <move_out_of_jump_pad>
2472 <stop_all_lwps>
2473 <start_step_over>
2474 <complete_ongoing_step_over>
2475 <proceed_all_lwps>
2476 <unstop_all_lwps>: Declare.
2477
2478 Update the callers below.
2479
2480 * linux-low.cc (linux_process_target::attach): Update.
2481 (linux_process_target::stabilize_threads): Ditto.
2482 (linux_process_target::wait): Ditto.
2483
2484 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2485
2486 * linux-low.h (struct linux_target_ops): Update the comment for
2487 'cannot_store_register' to return 0 or 1.
2488 * linux-ppc-low.cc (ppc_cannot_store_register): Return 1 instead
2489 of 2.
2490
2491 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
2492
2493 * config.in: Re-generate.
2494 * configure: Re-generate.
2495
2496 2020-03-17 Kamil Rytarowski <n54@gmx.com>
2497
2498 * regcache.cc (find_register_by_number): Update.
2499 * tdesc.cc (init_target_desc): Likewise.
2500 * tdesc.h (target_desc::reg_defs): Likewise.
2501
2502 2020-03-12 Tom Tromey <tom@tromey.com>
2503
2504 * configure: Rebuild.
2505 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
2506 (WIN32APILIBS): New subst.
2507 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
2508 gdbsupport files.
2509 (gdbsupport/%.o): Remove target.
2510 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
2511 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
2512 (WIN32APILIBS): New variable.
2513 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
2514 (gdbreplay$(EXEEXT)): Likewise.
2515
2516 2020-03-12 Tom Tromey <tom@tromey.com>
2517
2518 * config.in, configure: Rebuild.
2519 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
2520 * acinclude.m4: Include gettext-sister.m4.
2521 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
2522 variables.
2523 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
2524 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
2525
2526 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2527
2528 * acinclude.m4: Update path to selftest.m4.
2529
2530 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2531
2532 * configure.ac: Don't source bfd/development.sh, move
2533 GDB_AC_COMMON higher.
2534 * configure: Re-generate.
2535
2536 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2537
2538 * configure: Re-generate.
2539
2540 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
2541
2542 * configure: Re-generate.
2543
2544 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2545
2546 * .dir-locals.el: New file.
2547
2548 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2549
2550 * .gitattributes: New file.
2551
2552 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
2553
2554 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
2555 reply into an S reply.
2556 * server.cc (disable_packet_T): New global.
2557 (captured_main): Set new global when appropriate.
2558 * server.h (disable_packet_T): Declare.
2559
2560 2020-02-21 Tom Tromey <tom@tromey.com>
2561
2562 * Makefile.in (mostlyclean): New target.
2563
2564 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2565
2566 * target.h (struct process_stratum_target): Remove.
2567 (class process_target): Rename to ...
2568 (class process_stratum_target): ... this.
2569 * linux-low.h (class linux_process_target): Derive from
2570 'process_stratum_target'.
2571 * linux-low.cc (linux_target_ops): Remove.
2572 (initialize_low): Set the_target to the singleton instance of
2573 linux_process_target.
2574 * lynx-low.h (class lynx_process_target): Derive from
2575 'process_stratum_target'.
2576 * lynx-low.cc (lynx_target_ops): Remove.
2577 (initialize_low): Set the_target to the singleton instance of
2578 lynx_process_target.
2579 * nto-low.h (class nto_process_target): Derive from
2580 'process_stratum_target'.
2581 * nto-low.cc (nto_target_ops): Remove.
2582 (initialize_low): Set the_target to the singleton instance of
2583 nto_process_target.
2584 * win32-low.h (class win32_process_target): Derive from
2585 'process_stratum_target'.
2586 * win32-low.cc (win32_target_ops): Remove.
2587 (initialize_low): Set the_target to the singleton instance of
2588 win32_process_target.
2589
2590 Replace 'the_target->pt' with 'the_target' in the uses below.
2591
2592 * hostio.cc (hostio_error)
2593 (handle_setfs)
2594 (handle_open)
2595 (handle_unlink)
2596 (handle_readlink)
2597 * linux-aarch32-low.cc (arm_breakpoint_at)
2598 * linux-aarch64-low.cc (aarch64_breakpoint_at)
2599 * linux-arm-low.cc (arm_sigreturn_next_pc)
2600 (arm_get_hwcap)
2601 (arm_get_syscall_trapinfo)
2602 * linux-cris-low.cc (cris_breakpoint_at)
2603 * linux-crisv32-low.cc (cris_breakpoint_at)
2604 * linux-low.cc (handle_extended_wait)
2605 (linux_wait_1)
2606 (linux_read_memory)
2607 (linux_process_target::breakpoint_kind_from_pc)
2608 (linux_get_auxv)
2609 * linux-m32r-low.cc (m32r_breakpoint_at)
2610 * linux-mips-low.cc (mips_breakpoint_at)
2611 * linux-nios2-low.cc (nios2_breakpoint_at)
2612 * linux-ppc-low.cc (ppc_breakpoint_at)
2613 * linux-s390-low.cc (s390_get_hwcap)
2614 * linux-sh-low.cc (sh_breakpoint_at)
2615 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
2616 (sparc_store_gregset_from_stack)
2617 (sparc_breakpoint_at)
2618 * linux-tic6x-low.cc (tic6x_breakpoint_at)
2619 * linux-tile-low.cc (tile_breakpoint_at)
2620 * linux-x86-low.cc (x86_breakpoint_at)
2621 * linux-xtensa-low.cc (xtensa_breakpoint_at)
2622 * mem-break.cc (bp_size)
2623 (bp_opcode)
2624 (insert_memory_breakpoint)
2625 (set_raw_breakpoint_at)
2626 (delete_raw_breakpoint)
2627 (z_type_supported)
2628 (uninsert_raw_breakpoint)
2629 (reinsert_raw_breakpoint)
2630 (validate_inserted_breakpoint)
2631 * regcache.cc (regcache_read_pc)
2632 (regcache_write_pc)
2633 * remote-utils.cc (putpkt_binary_1)
2634 (input_interrupt)
2635 (getpkt)
2636 (prepare_resume_reply)
2637 * server.cc (handle_general_set)
2638 (handle_detach)
2639 (handle_qxfer_auxv)
2640 (handle_qxfer_exec_file)
2641 (handle_qxfer_libraries_svr4)
2642 (handle_qxfer_osdata)
2643 (handle_qxfer_siginfo)
2644 (handle_qxfer_fdpic)
2645 (handle_query)
2646 (resume)
2647 (handle_v_requests)
2648 (queue_stop_reply_callback)
2649 (captured_main)
2650 * target.cc (prepare_to_access_memory)
2651 (done_accessing_memory)
2652 (read_inferior_memory)
2653 (target_write_memory)
2654 (target_stop_and_wait)
2655 (target_wait)
2656 (target_mourn_inferior)
2657 (target_continue_no_signal)
2658 (target_continue)
2659 (target_supports_multi_process)
2660 (kill_inferior)
2661 * target.h
2662 (target_create_inferior)
2663 (target_post_create_inferior)
2664 (myattach)
2665 (target_supports_fork_events)
2666 (target_supports_vfork_events)
2667 (target_supports_exec_events)
2668 (target_handle_new_gdb_connection)
2669 (detach_inferior)
2670 (mythread_alive)
2671 (fetch_inferior_registers)
2672 (store_inferior_registers)
2673 (join_inferior)
2674 (target_supports_non_stop)
2675 (target_async)
2676 (target_process_qsupported)
2677 (target_supports_catch_syscall)
2678 (target_get_ipa_tdesc_idx)
2679 (target_supports_tracepoints)
2680 (target_supports_fast_tracepoints)
2681 (target_get_min_fast_tracepoint_insn_len)
2682 (target_thread_stopped)
2683 (target_pause_all)
2684 (target_unpause_all)
2685 (target_stabilize_threads)
2686 (target_install_fast_tracepoint_jump_pad)
2687 (target_emit_ops)
2688 (target_supports_disable_randomization)
2689 (target_supports_agent)
2690 (target_enable_btrace)
2691 (target_disable_btrace)
2692 (target_read_btrace)
2693 (target_read_btrace_conf)
2694 (target_supports_range_stepping)
2695 (target_supports_stopped_by_sw_breakpoint)
2696 (target_stopped_by_sw_breakpoint)
2697 (target_supports_stopped_by_hw_breakpoint)
2698 (target_supports_hardware_single_step)
2699 (target_stopped_by_hw_breakpoint)
2700 (target_breakpoint_kind_from_pc)
2701 (target_breakpoint_kind_from_current_state)
2702 (target_supports_software_single_step)
2703 (target_core_of_thread)
2704 (target_thread_name)
2705 (target_thread_handle)
2706 * win32-low.cc (do_initial_child_stuff)
2707
2708 Rename target op default definitions listed below.
2709
2710 * target.cc (process_target::post_create_inferior): Rename as ...
2711 (process_stratum_target::post_create_inferior): ... this.
2712 (process_target::prepare_to_access_memory): Rename as ...
2713 (process_stratum_target::prepare_to_access_memory): ... this.
2714 (process_target::done_accessing_memory): Rename as ...
2715 (process_stratum_target::done_accessing_memory): ... this.
2716 (process_target::look_up_symbols): Rename as ...
2717 (process_stratum_target::look_up_symbols): ... this.
2718 (process_target::supports_read_auxv): Rename as ...
2719 (process_stratum_target::supports_read_auxv): ... this.
2720 (process_target::read_auxv): Rename as ...
2721 (process_stratum_target::read_auxv): ... this.
2722 (process_target::supports_z_point_type): Rename as ...
2723 (process_stratum_target::supports_z_point_type): ... this.
2724 (process_target::insert_point): Rename as ...
2725 (process_stratum_target::insert_point): ... this.
2726 (process_target::remove_point): Rename as ...
2727 (process_stratum_target::remove_point): ... this.
2728 (process_target::stopped_by_sw_breakpoint): Rename as ...
2729 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
2730 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
2731 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
2732 (process_target::stopped_by_hw_breakpoint): Rename as ...
2733 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
2734 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
2735 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
2736 (process_target::supports_hardware_single_step): Rename as ...
2737 (process_stratum_target::supports_hardware_single_step): ... this.
2738 (process_target::stopped_by_watchpoint): Rename as ...
2739 (process_stratum_target::stopped_by_watchpoint): ... this.
2740 (process_target::stopped_data_address): Rename as ...
2741 (process_stratum_target::stopped_data_address): ... this.
2742 (process_target::supports_read_offsets): Rename as ...
2743 (process_stratum_target::supports_read_offsets): ... this.
2744 (process_target::read_offsets): Rename as ...
2745 (process_stratum_target::read_offsets): ... this.
2746 (process_target::supports_get_tls_address): Rename as ...
2747 (process_stratum_target::supports_get_tls_address): ... this.
2748 (process_target::get_tls_address): Rename as ...
2749 (process_stratum_target::get_tls_address): ... this.
2750 (process_target::hostio_last_error): Rename as ...
2751 (process_stratum_target::hostio_last_error): ... this.
2752 (process_target::supports_qxfer_osdata): Rename as ...
2753 (process_stratum_target::supports_qxfer_osdata): ... this.
2754 (process_target::qxfer_osdata): Rename as ...
2755 (process_stratum_target::qxfer_osdata): ... this.
2756 (process_target::supports_qxfer_siginfo): Rename as ...
2757 (process_stratum_target::supports_qxfer_siginfo): ... this.
2758 (process_target::qxfer_siginfo): Rename as ...
2759 (process_stratum_target::qxfer_siginfo): ... this.
2760 (process_target::supports_non_stop): Rename as ...
2761 (process_stratum_target::supports_non_stop): ... this.
2762 (process_target::async): Rename as ...
2763 (process_stratum_target::async): ... this.
2764 (process_target::start_non_stop): Rename as ...
2765 (process_stratum_target::start_non_stop): ... this.
2766 (process_target::supports_multi_process): Rename as ...
2767 (process_stratum_target::supports_multi_process): ... this.
2768 (process_target::supports_fork_events): Rename as ...
2769 (process_stratum_target::supports_fork_events): ... this.
2770 (process_target::supports_vfork_events): Rename as ...
2771 (process_stratum_target::supports_vfork_events): ... this.
2772 (process_target::supports_exec_events): Rename as ...
2773 (process_stratum_target::supports_exec_events): ... this.
2774 (process_target::handle_new_gdb_connection): Rename as ...
2775 (process_stratum_target::handle_new_gdb_connection): ... this.
2776 (process_target::handle_monitor_command): Rename as ...
2777 (process_stratum_target::handle_monitor_command): ... this.
2778 (process_target::core_of_thread): Rename as ...
2779 (process_stratum_target::core_of_thread): ... this.
2780 (process_target::supports_read_loadmap): Rename as ...
2781 (process_stratum_target::supports_read_loadmap): ... this.
2782 (process_target::read_loadmap): Rename as ...
2783 (process_stratum_target::read_loadmap): ... this.
2784 (process_target::process_qsupported): Rename as ...
2785 (process_stratum_target::process_qsupported): ... this.
2786 (process_target::supports_tracepoints): Rename as ...
2787 (process_stratum_target::supports_tracepoints): ... this.
2788 (process_target::read_pc): Rename as ...
2789 (process_stratum_target::read_pc): ... this.
2790 (process_target::write_pc): Rename as ...
2791 (process_stratum_target::write_pc): ... this.
2792 (process_target::supports_thread_stopped): Rename as ...
2793 (process_stratum_target::supports_thread_stopped): ... this.
2794 (process_target::thread_stopped): Rename as ...
2795 (process_stratum_target::thread_stopped): ... this.
2796 (process_target::supports_get_tib_address): Rename as ...
2797 (process_stratum_target::supports_get_tib_address): ... this.
2798 (process_target::get_tib_address): Rename as ...
2799 (process_stratum_target::get_tib_address): ... this.
2800 (process_target::pause_all): Rename as ...
2801 (process_stratum_target::pause_all): ... this.
2802 (process_target::unpause_all): Rename as ...
2803 (process_stratum_target::unpause_all): ... this.
2804 (process_target::stabilize_threads): Rename as ...
2805 (process_stratum_target::stabilize_threads): ... this.
2806 (process_target::supports_fast_tracepoints): Rename as ...
2807 (process_stratum_target::supports_fast_tracepoints): ... this.
2808 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
2809 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
2810 (process_target::emit_ops): Rename as ...
2811 (process_stratum_target::emit_ops): ... this.
2812 (process_target::supports_disable_randomization): Rename as ...
2813 (process_stratum_target::supports_disable_randomization): ... this.
2814 (process_target::supports_qxfer_libraries_svr4): Rename as ...
2815 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
2816 (process_target::qxfer_libraries_svr4): Rename as ...
2817 (process_stratum_target::qxfer_libraries_svr4): ... this.
2818 (process_target::supports_agent): Rename as ...
2819 (process_stratum_target::supports_agent): ... this.
2820 (process_target::enable_btrace): Rename as ...
2821 (process_stratum_target::enable_btrace): ... this.
2822 (process_target::disable_btrace): Rename as ...
2823 (process_stratum_target::disable_btrace): ... this.
2824 (process_target::read_btrace): Rename as ...
2825 (process_stratum_target::read_btrace): ... this.
2826 (process_target::read_btrace_conf): Rename as ...
2827 (process_stratum_target::read_btrace_conf): ... this.
2828 (process_target::supports_range_stepping): Rename as ...
2829 (process_stratum_target::supports_range_stepping): ... this.
2830 (process_target::supports_pid_to_exec_file): Rename as ...
2831 (process_stratum_target::supports_pid_to_exec_file): ... this.
2832 (process_target::pid_to_exec_file): Rename as ...
2833 (process_stratum_target::pid_to_exec_file): ... this.
2834 (process_target::supports_multifs): Rename as ...
2835 (process_stratum_target::supports_multifs): ... this.
2836 (process_target::multifs_open): Rename as ...
2837 (process_stratum_target::multifs_open): ... this.
2838 (process_target::multifs_unlink): Rename as ...
2839 (process_stratum_target::multifs_unlink): ... this.
2840 (process_target::multifs_readlink): Rename as ...
2841 (process_stratum_target::multifs_readlink): ... this.
2842 (process_target::breakpoint_kind_from_pc): Rename as ...
2843 (process_stratum_target::breakpoint_kind_from_pc): ... this.
2844 (process_target::breakpoint_kind_from_current_state): Rename as ...
2845 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
2846 (process_target::thread_name): Rename as ...
2847 (process_stratum_target::thread_name): ... this.
2848 (process_target::thread_handle): Rename as ...
2849 (process_stratum_target::thread_handle): ... this.
2850 (process_target::supports_software_single_step): Rename as ...
2851 (process_stratum_target::supports_software_single_step): ... this.
2852 (process_target::supports_catch_syscall): Rename as ...
2853 (process_stratum_target::supports_catch_syscall): ... this.
2854 (process_target::get_ipa_tdesc_idx): Rename as ...
2855 (process_stratum_target::get_ipa_tdesc_idx): ... this.
2856
2857 2020-02-20 Pedro Alves <palves@redhat.com>
2858
2859 * target.cc (set_target_ops): Simply copy the given target pointer
2860 instead of creating a copy of the pointed object.
2861
2862 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2863
2864 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
2865 of process_target.
2866
2867 * target.h (struct process_stratum_target): Remove the target op.
2868 (class process_target): Add the target op.
2869 (target_get_ipa_tdesc_idx): Update the macro.
2870 * target.cc (process_target::get_ipa_tdesc_idx): Define.
2871
2872 Update the derived classes and callers below.
2873
2874 * linux-low.cc (linux_target_ops): Update.
2875 (linux_get_ipa_tdesc_idx): Turn into ...
2876 (linux_process_target::get_ipa_tdesc_idx): ... this.
2877 * linux-low.h (class linux_process_target): Update.
2878 * lynx-low.cc (lynx_target_ops): Update.
2879 * nto-low.cc (nto_target_ops): Update.
2880 * win32-low.cc (win32_target_ops): Update.
2881
2882 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2883
2884 Turn process_stratum_target's supports_catch_syscall op into a
2885 method of process_target.
2886
2887 * target.h (struct process_stratum_target): Remove the target op.
2888 (class process_target): Add the target op.
2889 (target_supports_catch_syscall): Update the macro.
2890 * target.cc (process_target::supports_catch_syscall): Define.
2891
2892 Update the derived classes and callers below.
2893
2894 * linux-low.cc (linux_target_ops): Update.
2895 (linux_supports_catch_syscall): Turn into ...
2896 (linux_process_target::supports_catch_syscall): ... this.
2897 * linux-low.h (class linux_process_target): Update.
2898 * lynx-low.cc (lynx_target_ops): Update.
2899 * nto-low.cc (nto_target_ops): Update.
2900 * win32-low.cc (win32_target_ops): Update.
2901
2902 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2903
2904 Turn process_stratum_target's supports_software_single_step op
2905 into a method of process_target.
2906
2907 * target.h (struct process_stratum_target): Remove the target op.
2908 (class process_target): Add the target op.
2909 (target_supports_software_single_step): Update the macro.
2910 * target.cc (process_target::supports_software_single_step): Define.
2911
2912 Update the derived classes and callers below.
2913
2914 * linux-low.cc (linux_target_ops): Update.
2915 (linux_supports_software_single_step): Turn into ...
2916 (linux_process_target::supports_software_single_step): ... this.
2917 * linux-low.h (class linux_process_target): Update.
2918 * lynx-low.cc (lynx_target_ops): Update.
2919 * nto-low.cc (nto_target_ops): Update.
2920 * win32-low.cc (win32_target_ops): Update.
2921
2922 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2923
2924 Turn process_stratum_target's thread_name and thread_handle ops
2925 into methods of process_target.
2926
2927 * target.h (struct process_stratum_target): Remove the target ops.
2928 (class process_target): Add the target ops.
2929 (target_thread_name): Update the macro.
2930 (target_thread_handle): Update the macro.
2931 * target.cc (process_target::thread_name): Define.
2932 (process_target::thread_handle): Define.
2933
2934 Update the derived classes and callers below.
2935
2936 * linux-low.cc (linux_target_ops): Update.
2937 (linux_process_target::thread_name): Define.
2938 (linux_process_target::thread_handle): Define.
2939 * linux-low.h (class linux_process_target): Update.
2940 * lynx-low.cc (lynx_target_ops): Update.
2941 * nto-low.cc (nto_target_ops): Update.
2942 * win32-low.cc (win32_target_ops): Update.
2943
2944 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2945
2946 Turn process_stratum_target's breakpoint_kind_from_pc,
2947 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
2948 ops into methods of process_target.
2949
2950 * target.h (struct process_stratum_target): Remove the target op.
2951 (class process_target): Add the target op.
2952 (target_breakpoint_kind_from_pc): Update the macro.
2953 (target_breakpoint_kind_from_current_state): Update the macro.
2954 (default_breakpoint_kind_from_pc): Remove declaration.
2955 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
2956 (process_target::breakpoint_kind_from_pc): ... this.
2957 (process_target::breakpoint_kind_from_current_state): Define.
2958
2959 Update the derived classes and callers below.
2960
2961 * mem-break.cc (bp_size): Update.
2962 (bp_opcode): Update.
2963 * linux-low.cc (linux_target_ops): Update.
2964 (linux_wait_1): Update.
2965 (linux_breakpoint_kind_from_pc): Turn into ...
2966 (linux_process_target::breakpoint_kind_from_pc): ... this.
2967 (linux_sw_breakpoint_from_kind): Turn into ...
2968 (linux_process_target::sw_breakpoint_from_kind): ... this.
2969 (linux_breakpoint_kind_from_current_state): Turn into ...
2970 (linux_process_target::breakpoint_kind_from_current_state): ... this.
2971 * linux-low.h (class linux_process_target): Update.
2972 * lynx-low.cc (lynx_target_ops): Update.
2973 (lynx_process_target::sw_breakpoint_from_kind): Define.
2974 * lynx-low.h (class lynx_process_target): Update.
2975 * nto-low.cc (nto_target_ops): Update.
2976 (nto_sw_breakpoint_from_kind): Turn into ...
2977 (nto_process_target::sw_breakpoint_from_kind): ... this.
2978 * nto-low.h (class nto_process_target): Update.
2979 * win32-low.cc (win32_target_ops): Update.
2980 (win32_sw_breakpoint_from_kind): Turn into ...
2981 (win32_process_target::sw_breakpoint_from_kind): ... this.
2982 * win32-low.h (class win32_process_target): Update.
2983
2984 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2985
2986 Turn process_stratum_target's multifs_open, multifs_readlink,
2987 multifs_unlink ops into methods of process_target.
2988
2989 * target.h (struct process_stratum_target): Remove the target ops.
2990 (class process_target): Add the target ops. Also add
2991 'supports_multifs'.
2992 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
2993 "sys/stat.h".
2994 (process_target::supports_multifs): Define.
2995 (process_target::multifs_open): Define.
2996 (process_target::multifs_readlink): Define.
2997 (process_target::multifs_unlink): Define.
2998
2999 Update the derived classes and callers below.
3000
3001 * hostio.cc (handle_setfs): Update.
3002 (handle_open): Update.
3003 (handle_unlink): Update.
3004 (handle_readlink): Update.
3005 * linux-low.cc (linux_target_ops): Update.
3006 (linux_process_target::supports_multifs): Define.
3007 (linux_process_target::multifs_open): Define.
3008 (linux_process_target::multifs_readlink): Define.
3009 (linux_process_target::multifs_unlink): Define.
3010 * linux-low.h (class linux_process_target): Update.
3011 * lynx-low.cc (lynx_target_ops): Update.
3012 * nto-low.cc (nto_target_ops): Update.
3013 * win32-low.cc (win32_target_ops): Update.
3014
3015 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3016
3017 Turn process_stratum_target's pid_to_exec_file op into a method
3018 of process_target.
3019
3020 * target.h (struct process_stratum_target): Remove the target op.
3021 (class process_target): Add the target op. Also add
3022 'supports_pid_to_exec_file'.
3023 * target.cc (process_target::pid_to_exec_file): Define.
3024 (process_target::supports_pid_to_exec_file): Define.
3025
3026 Update the derived classes and callers below.
3027
3028 * server.cc (handle_qxfer_exec_file): Update.
3029 (handle_query): Update.
3030 * linux-low.cc (linux_target_ops): Update.
3031 (linux_process_target::supports_pid_to_exec_file): Define.
3032 (linux_process_target::pid_to_exec_file): Define.
3033 * linux-low.h (class linux_process_target): Update.
3034 * lynx-low.cc (lynx_target_ops): Update.
3035 * nto-low.cc (nto_target_ops): Update.
3036 * win32-low.cc (win32_target_ops): Update.
3037
3038 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3039
3040 Turn process_stratum_target's supports_range_stepping op into a
3041 method of process_target.
3042
3043 * target.h (struct process_stratum_target): Remove the target op.
3044 (class process_target): Add the target op.
3045 (target_supports_range_stepping): Update the macro.
3046 * target.cc (process_target::supports_range_stepping): Define.
3047
3048 Update the derived classes and callers below.
3049
3050 * linux-low.cc (linux_target_ops): Update.
3051 (linux_supports_range_stepping): Turn into ...
3052 (linux_process_target::supports_range_stepping): ... this.
3053 * linux-low.h (class linux_process_target): Update.
3054 * lynx-low.cc (lynx_target_ops): Update.
3055 * nto-low.cc (nto_target_ops): Update.
3056 * win32-low.cc (win32_target_ops): Update.
3057
3058 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3059
3060 Turn process_stratum_target's btrace-related ops (enable_btrace,
3061 disable_btrace, read_btrace, read_btrace_conf) into methods of
3062 process_target.
3063
3064 * target.h (struct process_stratum_target): Remove the target ops.
3065 (class process_target): Add the target ops.
3066 (target_enable_btrace): Update.
3067 (target_disable_btrace): Update.
3068 (target_read_btrace): Update.
3069 (target_read_btrace_conf): Update.
3070 * target.cc (process_target::enable_btrace): Define.
3071 (process_target::disable_btrace): Define.
3072 (process_target::read_btrace): Define.
3073 (process_target::read_btrace_conf): Define.
3074
3075 Update the derived classes and callers below.
3076
3077 * linux-low.cc (linux_target_ops): Update.
3078 (linux_process_target:enable_btrace): Define as a wrapper around
3079 linux_enable_btrace.
3080 (linux_low_disable_btrace): Turn into ...
3081 (linux_process_target::disable_btrace): ... this.
3082 (linux_low_read_btrace): Turn into ...
3083 (linux_process_target::read_btrace): ... this.
3084 (linux_low_btrace_conf): Turn into ...
3085 (linux_process_target::read_btrace_conf): ... this.
3086 * linux-low.h (class linux_process_target): Update.
3087 * lynx-low.cc (lynx_target_ops): Update.
3088 * nto-low.cc (nto_target_ops): Update.
3089 * win32-low.cc (win32_target_ops): Update.
3090
3091 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3092
3093 Turn process_stratum_target's supports_agent op into a method of
3094 process_target.
3095
3096 * target.h (struct process_stratum_target): Remove the target op.
3097 (class process_target): Add the target op.
3098 (target_supports_agent): Update the macro.
3099 * target.cc (process_target::supports_agent): Define.
3100
3101 Update the derived classes and callers below.
3102
3103 * linux-low.cc (linux_target_ops): Update.
3104 (linux_supports_agent): Turn into ...
3105 (linux_process_target::supports_agent): ... this.
3106 * linux-low.h (class linux_process_target): Update.
3107 * lynx-low.cc (lynx_target_ops): Update.
3108 * nto-low.cc (nto_target_ops): Update.
3109 * win32-low.cc (win32_target_ops): Update.
3110
3111 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3112
3113 Turn process_stratum_target's qxfer_libraries_svr4 op into a
3114 method of process_target.
3115
3116 * target.h (struct process_stratum_target): Remove the target op.
3117 (class process_target): Add the target op. Also add
3118 'supports_qxfer_libraries_svr4'.
3119 * target.cc (process_target::qxfer_libraries_svr4): Define.
3120 (process_target::supports_qxfer_libraries_svr4): Define.
3121
3122 Update the derived classes and callers below.
3123
3124 * server.cc (handle_qxfer_libraries_svr4): Update.
3125 (handle_query): Update.
3126 * linux-low.cc (linux_target_ops): Update.
3127 (linux_process_target::supports_qxfer_libraries_svr4): Define.
3128 (linux_qxfer_libraries_svr4): Turn into ...
3129 (linux_process_target::qxfer_libraries_svr4): ... this.
3130 * linux-low.h (class linux_process_target): Update.
3131 * lynx-low.cc (lynx_target_ops): Update.
3132 * nto-low.cc (nto_target_ops): Update.
3133 * win32-low.cc (win32_target_ops): Update.
3134
3135 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3136
3137 Turn process_stratum_target's supports_disable_randomization op
3138 into a method of process_target.
3139
3140 * target.h (struct process_stratum_target): Remove the target op.
3141 (class process_target): Add the target op.
3142 (target_supports_disable_randomization): Update the macro.
3143 * target.cc (process_target::supports_disable_randomization): Define.
3144
3145 Update the derived classes and callers below.
3146
3147 * linux-low.cc (linux_target_ops): Update.
3148 (linux_supports_disable_randomization): Turn into ...
3149 (linux_process_target::supports_disable_randomization): ... this.
3150 * linux-low.h (class linux_process_target): Update.
3151 * lynx-low.cc (lynx_target_ops): Update.
3152 * nto-low.cc (nto_target_ops): Update.
3153 * win32-low.cc (win32_target_ops): Update.
3154
3155 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3156
3157 Turn process_stratum_target's emit_ops op into a method of
3158 process_target.
3159
3160 * target.h (struct process_stratum_target): Remove the target op.
3161 (class process_target): Add the target op.
3162 (target_emit_ops): Update the macro.
3163 * target.cc (process_target::emit_ops): Define.
3164
3165 Update the derived classes and callers below.
3166
3167 * linux-low.cc (linux_target_ops): Update.
3168 (linux_emit_ops): Turn into ...
3169 (linux_process_target::emit_ops): ... this.
3170 * linux-low.h (class linux_process_target): Update.
3171 * lynx-low.cc (lynx_target_ops): Update.
3172 * nto-low.cc (nto_target_ops): Update.
3173 * win32-low.cc (win32_target_ops): Update.
3174
3175 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3176
3177 Turn process_stratum_target's install_fast_tracepoint_jump_pad
3178 and get_min_fast_tracepoint_insn_len ops into methods of
3179 process_target.
3180
3181 * target.h (struct process_stratum_target): Remove the target ops.
3182 (class process_target): Add the target ops. Also add
3183 'supports_fast_tracepoints'.
3184 (target_supports_fast_tracepoints): Update the macro.
3185 (target_get_min_fast_tracepoint_insn_len): Update the macro.
3186 (install_fast_tracepoint_jump_pad): Update and rename the macro
3187 to ...
3188 (target_install_fast_tracepoint_jump_pad): ... this.
3189 * target.cc (process_target::supports_fast_tracepoints): Define.
3190 (process_target::install_fast_tracepoint_jump_pad): Define.
3191 (process_target::get_min_fast_tracepoint_insn_len): Define.
3192
3193 Update the derived classes and callers below.
3194
3195 * tracepoint.cc (install_fast_tracepoint): Update.
3196 * linux-low.cc (linux_target_ops): Update.
3197 (linux_process_target::supports_fast_tracepoints): Define.
3198 (linux_install_fast_tracepoint_jump_pad): Turn into ...
3199 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
3200 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
3201 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
3202 * linux-low.h (class linux_process_target): Update.
3203 * lynx-low.cc (lynx_target_ops): Update.
3204 * nto-low.cc (nto_target_ops): Update.
3205 * win32-low.cc (win32_target_ops): Update.
3206
3207 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3208
3209 Turn process_stratum_target's stabilize_threads op into a
3210 method of process_target.
3211
3212 * target.h (struct process_stratum_target): Remove the target op.
3213 (class process_target): Add the target op.
3214 (target_stabilize_threads): Update the macro.
3215 * target.cc (process_target::stabilize_threads): Define.
3216
3217 Update the derived classes and callers below.
3218
3219 * server.cc (handle_status): Update.
3220 * tracepoint.cc (cmd_qtdp): Update.
3221 (cmd_qtstart): Update.
3222 * linux-low.cc (linux_target_ops): Update.
3223 (linux_stabilize_threads): Turn into ...
3224 (linux_process_target::stabilize_threads): ... this.
3225 (linux_wait_1): Update.
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 pause_all and unpause_all ops
3234 into methods of process_target.
3235
3236 * target.h (struct process_stratum_target): Remove the target ops.
3237 (class process_target): Add the target ops.
3238 (pause_all): Update the macro and rename to...
3239 (target_pause_all): ... this.
3240 (unpause_all): Update the macro and rename to...
3241 (target_unpause_all): ... this.
3242 * target.cc (process_target::pause_all): Define.
3243 (process_target::unpause_all): Define.
3244
3245 Update the derived classes and callers below.
3246
3247 * server.cc (handle_status): Update.
3248 * tracepoint.cc (clear_installed_tracepoints): Update.
3249 (cmd_qtdp): Update.
3250 (cmd_qtstart): Update.
3251 (stop_tracing): Update.
3252 (cmd_qtstatus): Update.
3253 (upload_fast_traceframes): Update.
3254 (run_inferior_command): Update.
3255 * linux-low.cc (linux_target_ops): Update.
3256 (linux_pause_all): Turn into ...
3257 (linux_process_target::pause_all): ... this.
3258 (linux_unpause_all): Turn into ...
3259 (linux_process_target::unpause_all): ... this.
3260 (linux_process_target::prepare_to_access_memory): Update.
3261 (linux_process_target::done_accessing_memory): Update.
3262 * linux-low.h (class linux_process_target): Update.
3263 * lynx-low.cc (lynx_target_ops): Update.
3264 * nto-low.cc (nto_target_ops): Update.
3265 * win32-low.cc (win32_target_ops): Update.
3266
3267 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3268
3269 Turn process_stratum_target's get_tib_address op into a method of
3270 process_target.
3271
3272 * target.h (struct process_stratum_target): Remove the target op.
3273 (class process_target): Add the target op. Also add
3274 'supports_get_tib_address'.
3275 * target.cc (process_target::get_tib_address): Define.
3276 (process_target::supports_get_tib_address): Define.
3277
3278 Update the derived classes and callers below.
3279
3280 * server.cc (handle_query): Update.
3281 * linux-low.cc (win32_target_ops): Update.
3282 * lynx-low.cc (lynx_target_ops): Update.
3283 * nto-low.cc (nto_target_ops): Update.
3284 * win32-low.cc (win32_target_ops): Update.
3285 (win32_process_target::supports_get_tib_address): Define.
3286 (win32_get_tib_address): Turn into ...
3287 (win32_process_target::get_tib_address): ... this.
3288 * win32-low.h (class win32_process_target): Update.
3289
3290 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3291
3292 Turn process_stratum_target's thread_stopped op into a method of
3293 process_target.
3294
3295 * target.h (struct process_stratum_target): Remove the target op.
3296 (class process_target): Add the target op. Also add
3297 'supports_thread_stopped'.
3298 (target_thread_stopped): Update the macro.
3299 * target.cc (process_target::thread_stopped): Define.
3300 (process_target::supports_thread_stopped): Define.
3301 (prepare_to_access_memory): Update.
3302
3303 Update the derived classes and callers below.
3304
3305 * server.cc (queue_stop_reply_callback): Update.
3306 * linux-low.cc (linux_target_ops): Update.
3307 (linux_process_target::supports_thread_stopped): Define.
3308 (linux_thread_stopped): Turn into ...
3309 (linux_process_target::thread_stopped): ... this.
3310 * linux-low.h (class linux_process_target): Update.
3311 * lynx-low.cc (lynx_target_ops): Update.
3312 * nto-low.cc (nto_target_ops): Update.
3313 * win32-low.cc (win32_target_ops): Update.
3314
3315 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3316
3317 Turn process_stratum_target's read_pc and write_pc ops into
3318 methods of process_target.
3319
3320 * target.h (struct process_stratum_target): Remove the target ops.
3321 (class process_target): Add the target ops.
3322 * target.cc (process_target::read_pc): Define.
3323 (process_target::write_pc): Define.
3324
3325 Update the derived classes and callers below.
3326
3327 * regcache.cc (regcache_read_pc): Update.
3328 (regcache_write_pc): Update.
3329 * linux-low.cc (linux_target_ops): Update.
3330 (linux_read_pc): Turn into ...
3331 (linux_process_target::read_pc): ... this.
3332 (linux_write_pc): Turn into ...
3333 (linux_process_target::write_pc): ... this.
3334 * linux-low.h (class linux_process_target): Update.
3335 * lynx-low.cc (lynx_target_ops): Update.
3336 * nto-low.cc (nto_target_ops): Update.
3337 * win32-low.cc (win32_target_ops): Update.
3338
3339 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3340
3341 Turn process_stratum_target's supports_tracepoints op into a
3342 method of process_target.
3343
3344 * target.h (struct process_stratum_target): Remove the target op.
3345 (class process_target): Add the target op.
3346 (target_supports_tracepoints): Update the macro.
3347 * target.cc (process_target::supports_tracepoints): Define.
3348
3349 Update the derived classes and callers below.
3350
3351 * linux-low.cc (linux_target_ops): Update.
3352 (linux_supports_tracepoints): Turn into ...
3353 (linux_process_target::supports_tracepoints): ... this.
3354 * linux-low.h (class linux_process_target): Update.
3355 * lynx-low.cc (lynx_target_ops): Update.
3356 * nto-low.cc (nto_target_ops): Update.
3357 * win32-low.cc (win32_target_ops): Update.
3358
3359 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3360
3361 Turn process_stratum_target's process_qsupported op into a method
3362 of process_target.
3363
3364 * target.h (struct process_stratum_target): Remove the target op.
3365 (class process_target): Add the target op.
3366 (target_process_qsupported): Update the macro.
3367 * target.cc (process_target::process_qsupported): Define.
3368
3369 Update the derived classes and callers below.
3370
3371 * linux-low.cc (linux_target_ops): Update.
3372 (linux_process_qsupported): Turn into ...
3373 (linux_process_target::process_qsupported): ... this.
3374 * linux-low.h (class linux_process_target): Update.
3375 * lynx-low.cc (lynx_target_ops): Update.
3376 * nto-low.cc (nto_target_ops): Update.
3377 * win32-low.cc (win32_target_ops): Update.
3378
3379 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3380
3381 Turn process_stratum_target's read_loadmap op into a method of
3382 process_target.
3383
3384 * target.h (struct process_stratum_target): Remove the target op.
3385 (class process_target): Add the target op. Also add
3386 'supports_read_loadmap'.
3387 * target.cc (process_target::read_loadmap): Define.
3388 (process_target::supports_read_loadmap): Define.
3389
3390 Update the derived classes and callers below.
3391
3392 * server.cc (handle_qxfer_fdpic): Update.
3393 (handle_query): Update.
3394 * linux-low.cc (linux_target_ops): Update.
3395 (linux_process_target::supports_read_loadmap): Define.
3396 (linux_read_loadmap): Turn into ...
3397 (linux_process_target::read_loadmap): ... this.
3398 * linux-low.h (class linux_process_target): Update.
3399 * lynx-low.cc (lynx_target_ops): Update.
3400 * nto-low.cc (nto_target_ops): Update.
3401 * win32-low.cc (win32_target_ops): Update.
3402
3403 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3404
3405 Turn process_stratum_target's core_of_thread op into a method of
3406 process_target.
3407
3408 * target.h (struct process_stratum_target): Remove the target op.
3409 (class process_target): Add the target op.
3410 (target_core_of_thread): Update the macro.
3411 * target.cc (process_target::core_of_thread): Define.
3412
3413 Update the derived classes and callers below.
3414
3415 * linux-low.cc (linux_target_ops): Update.
3416 (linux_process_target::core_of_thread): Define.
3417 * linux-low.h (class linux_process_target): Update.
3418 * lynx-low.cc (lynx_target_ops): Update.
3419 * nto-low.cc (nto_target_ops): Update.
3420 * win32-low.cc (win32_target_ops): Update.
3421
3422 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3423
3424 Turn process_stratum_target's handle_monitor_command op into a
3425 method of process_target.
3426
3427 * target.h (struct process_stratum_target): Remove the target op.
3428 (class process_target): Add the target op.
3429 (target_handle_monitor_command): Update the macro.
3430 * target.cc (process_target::handle_monitor_command): Define.
3431
3432 Update the derived classes and callers below.
3433
3434 * server.cc (handle_query): Update.
3435 * linux-low.cc (linux_target_ops): Update.
3436 (linux_process_target::handle_monitor_command): Define.
3437 * linux-low.h (class linux_process_target): Update.
3438 * lynx-low.cc (lynx_target_ops): Update.
3439 * nto-low.cc (nto_target_ops): Update.
3440 * win32-low.cc (win32_target_ops): Update.
3441
3442 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3443
3444 Turn process_stratum_target's handle_new_gdb_connection op into a
3445 method of process_target.
3446
3447 * target.h (struct process_stratum_target): Remove the target op.
3448 (class process_target): Add the target op.
3449 (target_handle_new_gdb_connection): Update the macro.
3450 * target.cc (process_target::handle_new_gdb_connection): Define.
3451
3452 Update the derived classes and callers below.
3453
3454 * linux-low.cc (linux_target_ops): Update.
3455 (linux_handle_new_gdb_connection): Turn into ...
3456 (linux_process_target::handle_new_gdb_connection): ... this.
3457 * linux-low.h (class linux_process_target): Update.
3458 * lynx-low.cc (lynx_target_ops): Update.
3459 * nto-low.cc (nto_target_ops): Update.
3460 * win32-low.cc (win32_target_ops): Update.
3461
3462 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3463
3464 Turn process_stratum_target's supports_fork_events,
3465 supports_vfork_events, and supports_exec_events ops into methods
3466 of process_target.
3467
3468 * target.h (struct process_stratum_target): Remove the target ops.
3469 (class process_target): Add the target ops.
3470 (target_supports_fork_events): Update the macro.
3471 (target_supports_vfork_events): Update the macro.
3472 (target_supports_exec_events): Update the macro.
3473 * target.cc (process_target::supports_fork_events): Define.
3474 (process_target::supports_vfork_events): Define.
3475 (process_target::supports_exec_events): Define.
3476
3477 Update the derived classes and callers below.
3478
3479 * linux-low.cc (linux_target_ops): Update.
3480 (linux_supports_fork_events): Turn into ...
3481 (linux_process_target::supports_fork_events): ... this.
3482 (linux_supports_vfork_events): Turn into ...
3483 (linux_process_target::supports_vfork_events): ... this.
3484 (linux_supports_exec_events): Turn into ...
3485 (linux_process_target::supports_exec_events): ... this.
3486 * linux-low.h (class linux_process_target): Update.
3487 * lynx-low.cc (lynx_target_ops): Update.
3488 * nto-low.cc (nto_target_ops): Update.
3489 * win32-low.cc (win32_target_ops): Update.
3490
3491 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3492
3493 Turn process_stratum_target's supports_multi_process op into a
3494 method of process_target.
3495
3496 * target.h (struct process_stratum_target): Remove the target op.
3497 (class process_target): Add the target op.
3498 * target.cc (process_target::supports_multi_process): Define.
3499 (target_supports_multi_process): Update.
3500
3501 Update the derived classes and callers below.
3502
3503 * linux-low.cc (linux_target_ops): Update.
3504 (linux_supports_multi_process): Turn into ...
3505 (linux_process_target::supports_multi_process): ... this.
3506 * linux-low.h (class linux_process_target): Update.
3507 * lynx-low.cc (lynx_target_ops): Update.
3508 * nto-low.cc (nto_target_ops): Update.
3509 * win32-low.cc (win32_target_ops): Update.
3510
3511 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3512
3513 Turn process_stratum_target's supports_non_stop, async, and
3514 start_non_stop ops into methods of process_target.
3515
3516 * target.h (struct process_stratum_target): Remove the target ops.
3517 (class process_target): Add the target ops.
3518 (target_supports_non_stop): Update the macro.
3519 (target_async): Update the macro.
3520 (start_non_stop): Remove declaration.
3521 * target.cc (process_target::supports_non_stop): Define.
3522 (process_target::async): Define.
3523 (process_target::start_non_stop): Define.
3524 (start_non_stop): Remove.
3525
3526 Update the derived classes and callers below.
3527
3528 * server.cc (handle_qxfer_siginfo): Update.
3529 (handle_query): Update.
3530 * linux-low.cc (linux_target_ops): Update.
3531 (linux_supports_non_stop): Turn into ...
3532 (linux_process_target::supports_non_stop): ... this.
3533 (linux_async): Turn into ...
3534 (linux_process_target::async): ... this.
3535 (linux_start_non_stop): Turn into ...
3536 (linux_process_target::start_non_stop): ... this.
3537 * linux-low.h (class linux_process_target): Update.
3538 * lynx-low.cc (lynx_target_ops): Update.
3539 * nto-low.cc (nto_target_ops): Update.
3540 (nto_supports_non_stop): Remove; rely on the default behavior
3541 instead.
3542 * win32-low.cc (win32_target_ops): Update.
3543
3544 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3545
3546 Turn process_stratum_target's qxfer_siginfo op into a method of
3547 process_target.
3548
3549 * target.h (struct process_stratum_target): Remove the target op.
3550 (class process_target): Add the target op. Also add
3551 'supports_qxfer_siginfo'.
3552 * target.cc (process_target::qxfer_siginfo): Define.
3553 (process_target::supports_qxfer_siginfo): Define.
3554
3555 Update the derived classes and callers below.
3556
3557 * server.cc (handle_qxfer_siginfo): Update.
3558 (handle_query): Update.
3559 * linux-low.cc (linux_target_ops): Update.
3560 (linux_process_target::supports_qxfer_siginfo): Define.
3561 (linux_xfer_siginfo): Turn into ...
3562 (linux_process_target::qxfer_siginfo): ... this.
3563 * linux-low.h (class linux_process_target): Update.
3564 * lynx-low.cc (lynx_target_ops): Update.
3565 * nto-low.cc (nto_target_ops): Update.
3566 * win32-low.cc (win32_target_ops): Update.
3567
3568 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3569
3570 Turn process_stratum_target's qxfer_osdata op into a method of
3571 process_target.
3572
3573 * target.h (struct process_stratum_target): Remove the target op.
3574 (class process_target): Add the target op. Also add
3575 'supports_qxfer_osdata'.
3576 * target.cc (process_target::qxfer_osdata): Define.
3577 (process_target::supports_qxfer_osdata): Define.
3578
3579 Update the derived classes and callers below.
3580
3581 * server.cc (handle_qxfer_osdata): Update.
3582 (handle_query): Update.
3583 * linux-low.cc (linux_target_ops): Update.
3584 (linux_process_target::supports_qxfer_osdata): Define.
3585 (linux_qxfer_osdata): Turn into ...
3586 (linux_process_target::qxfer_osdata): ... this.
3587 * linux-low.h (class linux_process_target): Update.
3588 * lynx-low.cc (lynx_target_ops): Update.
3589 * nto-low.cc (nto_target_ops): Update.
3590 * win32-low.cc (win32_target_ops): Update.
3591
3592 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3593
3594 Turn process_stratum_target's hostio_last_error op into a
3595 method of process_target.
3596
3597 * target.h (struct process_stratum_target): Remove the target op.
3598 (class process_target): Add the target op.
3599 * target.cc: Add "hostio.h" to includes.
3600 (process_target::hostio_last_error): Define.
3601
3602 Update the derived classes and callers below.
3603
3604 * hostio.cc (hostio_error): Update.
3605 * linux-low.cc: Remove "hostio.h" from includes.
3606 (linux_target_ops): Update.
3607 * lynx-low.cc (lynx_target_ops): Update.
3608 * nto-low.cc (nto_target_ops): Update.
3609 * win32-low.h (class win32_process_target): Update.
3610 * win32-low.cc (win32_target_ops): Update.
3611 (wince_hostio_last_error): Turn into ...
3612 (win32_process_target::hostio_last_error): ... this.
3613
3614 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3615
3616 Turn process_stratum_target's get_tls_address op into a method of
3617 process_target.
3618
3619 * target.h (struct process_stratum_target): Remove the target op.
3620 (class process_target): Add the target op. Also add
3621 'supports_get_tls_address'.
3622 * target.cc (process_target::get_tls_address): Define.
3623 (process_target::supports_get_tls_address): Define.
3624
3625 Update the derived classes and callers below.
3626
3627 * server.cc (handle_query): Update.
3628 * linux-low.cc (linux_target_ops): Update.
3629 (linux_process_target::supports_get_tls_address): Define.
3630 (linux_process_target::get_tls_address): Define.
3631 * linux-low.h (class linux_process_target): Update.
3632 * lynx-low.cc (lynx_target_ops): Update.
3633 * nto-low.cc (nto_target_ops): Update.
3634 * win32-low.cc (win32_target_ops): Update.
3635
3636 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3637
3638 Turn process_stratum_target's read_offsets op into a method of
3639 process_target.
3640
3641 * target.h (struct process_stratum_target): Remove the target op.
3642 (class process_target): Add the target op. Also add
3643 'supports_read_offsets'.
3644 * target.cc (process_target::read_offsets): Define.
3645 (process_target::supports_read_offsets): Define.
3646
3647 Update the derived classes and callers below.
3648
3649 * server.cc (handle_query): Update.
3650 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
3651 (linux_target_ops): Update.
3652 (linux_process_target::supports_read_offsets): Define.
3653 (linux_read_offsets): Turn into ...
3654 (linux_process_target::read_offsets): ... this.
3655 * linux-low.h (class linux_process_target): Update.
3656 * lynx-low.cc (lynx_target_ops): Update.
3657 * nto-low.cc (nto_target_ops): Update.
3658 * win32-low.cc (win32_target_ops): Update.
3659
3660 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3661
3662 Turn process_stratum_target's stopped_by_watchpoint and
3663 stopped_data_address ops into methods of process_target.
3664
3665 * target.h (struct process_stratum_target): Remove the target ops.
3666 (class process_target): Add the target ops.
3667 * target.cc (process_target::stopped_by_watchpoint): Define.
3668 (process_target::stopped_data_address): Define.
3669
3670 Update the derived classes and callers below.
3671
3672 * remote-utils.cc (prepare_resume_reply): Update.
3673 * linux-low.cc (linux_target_ops): Update.
3674 (linux_stopped_by_watchpoint): Turn into ...
3675 (linux_process_target::stopped_by_watchpoint): ... this.
3676 (linux_stopped_data_address): Turn into ...
3677 (linux_process_target::stopped_data_address): ... this.
3678 * linux-low.h (class linux_process_target): Update.
3679 * lynx-low.cc (lynx_target_ops): Update.
3680 * nto-low.cc (nto_target_ops): Update.
3681 (nto_stopped_by_watchpoint): Turn into ...
3682 (nto_process_target::stopped_by_watchpoint): ... this.
3683 (nto_stopped_data_address): Turn into ...
3684 (nto_process_target::stopped_data_address): ... this.
3685 * nto-low.h (class nto_process_target): Update.
3686 * win32-low.cc (win32_target_ops): Update.
3687 (win32_stopped_by_watchpoint): Turn into ...
3688 (win32_process_target::stopped_by_watchpoint): ... this.
3689 (win32_stopped_data_address): Turn into ...
3690 (win32_process_target::stopped_data_address): ... this.
3691 * win32-low.h (class win32_process_target): Update.
3692
3693 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3694
3695 Turn process_stratum_target's supports_hardware_single_step op into
3696 a method of process_target.
3697
3698 * target.h (struct process_stratum_target): Remove the target op.
3699 (class process_target): Add the target op.
3700 (target_supports_hardware_single_step): Update the macro.
3701 (target_can_do_hardware_single_step): Remove declaration.
3702 * target.cc (process_target::supports_hardware_single_step): Define.
3703 (target_can_do_hardware_single_step): Remove.
3704
3705 Update the derived classes and callers below.
3706
3707 * linux-low.h (class linux_process_target): Update.
3708 * linux-low.cc (linux_target_ops): Update.
3709 (linux_supports_hardware_single_step): Turn into ...
3710 (linux_process_target::supports_hardware_single_step): ... this.
3711 * lynx-low.h (class lynx_process_target): Update.
3712 * lynx-low.cc (lynx_target_ops): Update.
3713 (lynx_process_target::supports_hardware_single_step): Define.
3714 * nto-low.h (class nto_process_target): Update.
3715 * nto-low.cc (nto_target_ops): Update.
3716 (nto_process_target::supports_hardware_single_step): Define.
3717 * win32-low.h (class win32_process_target): Update.
3718 * win32-low.cc (win32_target_ops): Update.
3719 (win32_process_target::supports_hardware_single_step): Define.
3720
3721 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3722
3723 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
3724 ops into methods of process_target.
3725
3726 * target.h (struct process_stratum_target): Remove the target ops.
3727 (class process_target): Add the target ops.
3728 (target_stopped_by_hw_breakpoint): Update the macro.
3729 (target_supports_stopped_by_hw_breakpoint): Update the macro.
3730 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
3731 (process_target::supports_stopped_by_hw_breakpoint): Define.
3732
3733 Update the derived classes and callers below.
3734
3735 * linux-low.cc (linux_target_ops): Update.
3736 (linux_stopped_by_hw_breakpoint): Turn into ...
3737 (linux_process_target::stopped_by_hw_breakpoint): ... this.
3738 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
3739 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
3740 * linux-low.h (class linux_process_target): Update.
3741 * lynx-low.cc (lynx_target_ops): Update.
3742 * nto-low.cc (nto_target_ops): Update.
3743 * win32-low.cc (win32_target_ops): Update.
3744
3745 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3746
3747 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
3748 ops into methods of process_target.
3749
3750 * target.h (struct process_stratum_target): Remove the target ops.
3751 (class process_target): Add the target ops.
3752 (target_stopped_by_sw_breakpoint): Update the macro.
3753 (target_supports_stopped_by_sw_breakpoint): Update the macro.
3754 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
3755 (process_target::supports_stopped_by_sw_breakpoint): Define.
3756
3757 Update the derived classes and callers below.
3758
3759 * linux-low.cc (linux_target_ops): Update.
3760 (linux_stopped_by_sw_breakpoint): Turn into ...
3761 (linux_process_target::stopped_by_sw_breakpoint): ... this.
3762 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
3763 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
3764 * linux-low.h (class linux_process_target): Update.
3765 * lynx-low.cc (lynx_target_ops): Update.
3766 * nto-low.cc (nto_target_ops): Update.
3767 * win32-low.cc (win32_target_ops): Update.
3768
3769 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3770
3771 Turn process_stratum_target's insert_point and remove_point ops
3772 into methods of process_target.
3773
3774 * target.h (struct process_stratum_target): Remove the target ops.
3775 (class process_target): Add the target ops.
3776 * target.cc (process_target::insert_point): Define.
3777 (process_target::remove_point): Define.
3778
3779 Update the derived classes and callers below.
3780
3781 * mem-break.cc (set_raw_breakpoint_at): Update.
3782 (delete_raw_breakpoint): Update.
3783 (uninsert_raw_breakpoint): Update.
3784 (reinsert_raw_breakpoint): Update.
3785 * linux-low.cc (linux_target_ops): Update.
3786 (linux_insert_point): Turn into ...
3787 (linux_process_target::insert_point): ... this.
3788 (linux_remove_point): Turn into ...
3789 (linux_process_target::remove_point): ... this.
3790 * linux-low.h (class linux_process_target): Update.
3791 * lynx-low.cc (lynx_target_ops): Update.
3792 * nto-low.cc (nto_target_ops): Update.
3793 (nto_insert_point): Turn into ...
3794 (nto_process_target::insert_point): ... this.
3795 (nto_remove_point): Turn into ...
3796 (nto_process_target::remove_point): ... this.
3797 * nto-low.h (class nto_process_target): Update.
3798 * win32-low.cc (win32_target_ops): Update.
3799 (win32_insert_point): Turn into ...
3800 (win32_process_target::insert_point): ... this.
3801 (win32_remove_point): Turn into ...
3802 (win32_process_target::remove_point): ... this.
3803 * win32-low.h (class win32_process_target): Update.
3804
3805 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3806
3807 Turn process_stratum_target's supports_z_point_type op into a
3808 method of process_target.
3809
3810 * target.h (struct process_stratum_target): Remove the target op.
3811 (class process_target): Add the target op.
3812 * target.cc (process_target::supports_z_point_type): Define.
3813
3814 Update the derived classes and callers below.
3815
3816 * mem-break.cc (z_type_supported): Update.
3817 * linux-low.cc (linux_target_ops): Update.
3818 (linux_supports_z_point_type): Turn into ...
3819 (linux_process_target::supports_z_point_type): ... this.
3820 * linux-low.h (class linux_process_target): Update.
3821 * lynx-low.cc (lynx_target_ops): Update.
3822 * nto-low.cc (nto_target_ops): Update.
3823 (nto_supports_z_point_type): Turn into ...
3824 (nto_process_target::supports_z_point_type): ... this.
3825 * nto-low.h (class nto_process_target): Update.
3826 * win32-low.cc (win32_target_ops): Update.
3827 (win32_supports_z_point_type): Turn into ...
3828 (win32_process_target::supports_z_point_type): ... this.
3829 * win32-low.h (class win32_process_target): Update.
3830
3831 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3832
3833 Turn process_stratum_target's read_auxv op into a method of
3834 process_target.
3835
3836 * target.h (class process_stratum_target): Remove the target op.
3837 (struct process_target): Add the target op. Also add
3838 'supports_read_auxv'.
3839 * target.cc (process_target::read_auxv): Define.
3840 (process_target::supports_read_auxv): Define.
3841
3842 Update the derived classes and callers below.
3843
3844 * server.cc (handle_qxfer_auxv): Update.
3845 (handle_query): Update.
3846 * linux-low.cc (linux_target_ops): Update.
3847 (linux_process_target::supports_read_auxv): Define.
3848 (linux_read_auxv): Turn into ...
3849 (linux_process_target::read_auxv): ... this.
3850 * linux-low.h (class linux_process_target): Update.
3851 * lynx-low.cc (lynx_target_ops): Update.
3852 * nto-low.cc (nto_target_ops): Update.
3853 (nto_process_target::supports_read_auxv): Define.
3854 (nto_read_auxv): Turn into ...
3855 (nto_process_target::read_auxv): ... this.
3856 * nto-low.h (class nto_process_target): Update.
3857 * win32-low.cc (win32_target_ops): Update.
3858
3859 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3860
3861 Turn process_stratum_target's request_interrupt op into a method of
3862 process_target.
3863
3864 * target.h (struct process_stratum_target): Remove the target op.
3865 (class process_target): Add the target op.
3866
3867 Update the derived classes and callers below.
3868
3869 * remote-utils.cc (putpkt_binary_1): Update.
3870 (input_interrupt): Update.
3871 (getpkt): Update.
3872 * server.cc (handle_v_requests): Update.
3873 * linux-low.cc (linux_target_ops): Update.
3874 (linux_request_interrupt): Turn into ...
3875 (linux_process_target::request_interrupt): ... this.
3876 * linux-low.h (class linux_process_target): Update.
3877 * lynx-low.cc (lynx_target_ops): Update.
3878 (lynx_request_interrupt): Turn into ...
3879 (lynx_process_target::request_interrupt): ... this.
3880 * lynx-low.h (class lynx_process_target): Update.
3881 * nto-low.cc (nto_target_ops): Update.
3882 (nto_request_interrupt): Turn into ...
3883 (nto_process_target::request_interrupt): ... this.
3884 * nto-low.h (class nto_process_target): Update.
3885 * win32-low.cc (win32_target_ops): Update.
3886 (win32_request_interrupt): Turn into ...
3887 (win32_process_target::request_interrupt): ... this.
3888 * win32-low.h (class win32_process_target): Update.
3889
3890 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3891
3892 Turn process_stratum_target's look_up_symbols op into a method of
3893 process_target.
3894
3895 * target.h (struct process_stratum_target): Remove the target op.
3896 (class process_target): Add the target op.
3897 * target.cc (process_target::look_up_symbols): Define.
3898
3899 Update the derived classes and callers below.
3900
3901 * server.cc (handle_query): Update.
3902 * linux-low.cc (linux_target_ops): Update.
3903 (linux_look_up_symbols): Turn into ...
3904 (linux_process_target::look_up_symbols): ... this.
3905 * linux-low.h (class linux_process_target): Update.
3906 * lynx-low.cc (lynx_target_ops): Update.
3907 * nto-low.cc (nto_target_ops): Update.
3908 * win32-low.cc (win32_target_ops): Update.
3909
3910 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3911
3912 Turn process_stratum_target's read_memory and write_memory
3913 ops into methods of process_target.
3914
3915 * target.h (struct process_stratum_target): Remove the target ops.
3916 (class process_target): Add the target ops.
3917
3918 Update the derived classes and callers below.
3919
3920 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
3921 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
3922 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
3923 (arm_get_syscall_trapinfo): Update.
3924 * linux-cris-low.cc (cris_breakpoint_at): Update.
3925 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
3926 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
3927 * linux-mips-low.cc (mips_breakpoint_at): Update.
3928 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
3929 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
3930 * linux-sh-low.cc (sh_breakpoint_at): Update.
3931 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
3932 (sparc_store_gregset_from_stack): Update.
3933 (sparc_breakpoint_at): Update.
3934 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
3935 * linux-tile-low.cc (tile_breakpoint_at): Update.
3936 * linux-x86-low.cc (x86_breakpoint_at): Update.
3937 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
3938 * mem-brea.cc (insert_memory_breakpoint): Update.
3939 (validate_inserted_breakpoint): Update.
3940 * target.cc (read_inferior_memory): Update.
3941 (target_write_memory): Update.
3942 * linux-low.cc (linux_target_ops): Update.
3943 (linux_read_memory): Make a wrapper around the read_memory target
3944 op call.
3945 (linux_process_target::read_memory): Rename from linux_read_memory.
3946 (linux_write_memory): Turn into ...
3947 (linux_process_target::write_memory): ... this.
3948 * linux-low.h (class linux_process_target): Update.
3949 * lynx-low.cc (lynx_target_ops): Update.
3950 (lynx_read_memory): Turn into ...
3951 (lynx_process_target::read_memory): ... this.
3952 (lynx_write_memory): Turn into ...
3953 (lynx_process_target::write_memory): ... this.
3954 * lynx-low.h (class lynx_process_target): Update.
3955 * nto-low.cc (nto_target_ops): Update.
3956 (nto_read_memory): Turn into ...
3957 (nto_process_target::read_memory): ... this.
3958 (nto_write_memory): Turn into ...
3959 (nto_process_target::write_memory): ... this.
3960 * nto-low.h (class nto_process_target): Update.
3961 * win32-low.cc (win32_target_ops): Update.
3962 (win32_read_inferior_memory): Turn into ...
3963 (win32_process_target::read_memory): ... this.
3964 (win32_write_inferior_memory): Turn into ...
3965 (win32_process_target::write_memory): ... this.
3966 * win32-low.h (class win32_process_target): Update.
3967
3968 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3969
3970 Turn process_stratum_target's prepare_to_access_memory and
3971 done_accessing_memory ops into methods of process_target.
3972
3973 * target.h (struct process_stratum_target): Remove the target ops.
3974 (class process_target): Add the target ops.
3975 * target.cc (process_target::prepare_to_access_memory): Define.
3976 (process_target::done_accessing_memory): Define.
3977 (prepare_to_access_memory): Update.
3978 (done_accessing_memory): Update.
3979
3980 Update the derived classes and callers below.
3981
3982 * linux-low.cc (linux_target_ops): Update.
3983 (linux_prepare_to_access_memory): Turn into ...
3984 (linux_process_target::prepare_to_access_memory): ... this.
3985 (linux_done_accessing_memory): Turn into ...
3986 (linux_process_target::done_accessing_memory): ... this.
3987 * linux-low.h (class linux_process_target): Update.
3988 * lynx-low.cc (lynx_target_ops): Update.
3989 * nto-low.cc (nto_target_ops): Update.
3990 * win32-low.cc (win32_target_ops): Update.
3991
3992 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3993
3994 Turn process_stratum_target's fetch_registers and store_registers
3995 ops into methods of process_target.
3996
3997 * target.h (struct process_stratum_target): Remove the target ops.
3998 (class process_target): Add the target ops.
3999 (fetch_inferior_registers): Update the macro.
4000 (store_inferior_registers): Update the macro.
4001
4002 Update the derived classes and callers below.
4003
4004 * linux-low.cc (linux_target_ops): Update.
4005 (linux_fetch_registers): Turn into ...
4006 (linux_process_target::fetch_registers): ... this.
4007 (linux_store_registers): Turn into ...
4008 (linux_process_target::store_registers): ... this.
4009 * linux-low.h (class linux_process_target): Update.
4010 * lynx-low.cc (lynx_target_ops): Update.
4011 (lynx_fetch_registers): Turn into ...
4012 (lynx_process_target::fetch_registers): ... this.
4013 (lynx_store_registers): Turn into ...
4014 (lynx_process_target::store_registers): ... this.
4015 * lynx-low.h (class lynx_process_target): Update.
4016 * nto-low.cc (nto_target_ops): Update.
4017 (nto_fetch_registers): Turn into ...
4018 (nto_process_target::fetch_registers): ... this.
4019 (nto_store_registers): Turn into ...
4020 (nto_process_target::store_registers): ... this.
4021 * nto-low.h (class nto_process_target): Update.
4022 * win32-low.cc (win32_target_ops): Update.
4023 (win32_fetch_inferior_registers): Turn into ...
4024 (win32_process_target::fetch_registers): ... this.
4025 (win32_store_inferior_registers): Turn into ...
4026 (win32_process_target::store_registers): ... this.
4027 * win32-low.h (class win32_process_target): Update.
4028
4029 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4030
4031 Turn process_stratum_target's wait op into a method of
4032 process_target.
4033
4034 * target.h (struct process_stratum_target): Remove the target op.
4035 (class process_target): Add the target op.
4036
4037 Update the derived classes and callers below.
4038
4039 * target.cc (target_wait): Update.
4040 * linux-low.cc (linux_target_ops): Update.
4041 (linux_wait): Turn into ...
4042 (linux_process_target::wait): ... this.
4043 * linux-low.h (class linux_process_target): Update.
4044 * lynx-low.cc (lynx_target_ops): Update.
4045 (lynx_wait): Turn into ...
4046 (lynx_process_target::wait): ... this.
4047 * lynx-low.h (class lynx_process_target): Update.
4048 * nto-low.cc (nto_target_ops): Update.
4049 (nto_wait): Turn into ...
4050 (nto_process_target::wait): ... this.
4051 * nto-low.h (class nto_process_target): Update.
4052 * win32-low.cc (win32_target_ops): Update.
4053 (win32_wait): Turn into ...
4054 (win32_process_target::wait): ... this.
4055 (do_initial_child_stuff): Update.
4056 * win32-low.h (class win32_process_target): Update.
4057
4058 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4059
4060 Turn process_stratum_target's resume op into a method of
4061 process_target.
4062
4063 * target.h (struct process_stratum_target): Remove the target op.
4064 (class process_target): Add the target op.
4065
4066 Update the derived classes and callers below.
4067
4068 * server.cc (resume): Update.
4069 * target.cc (target_stop_and_wait): Update.
4070 (target_continue_no_signal): Update.
4071 (target_continue): Update.
4072 * linux-low.cc (linux_target_ops): Update.
4073 (linux_resume): Turn into ...
4074 (linux_process_target::resume): ... this.
4075 * linux-low.h (class linux_process_target): Update.
4076 * lynx-low.cc (lynx_target_ops): Update.
4077 (lynx_resume): Turn into ...
4078 (lynx_process_target::resume): ... this.
4079 * lynx-low.h (class lynx_process_target): Update.
4080 * nto-low.cc (nto_target_ops): Update.
4081 (nto_resume): Turn into ...
4082 (nto_process_target::resume): ... this.
4083 * nto-low.h (class nto_process_target): Update.
4084 * win32-low.cc (win32_target_ops): Update.
4085 (win32_resume): Turn into ...
4086 (win32_process_target::resume): ... this.
4087 (win32_process_target::detach): Update.
4088 (do_initial_child_stuff): Update.
4089 * win32-low.h (class win32_process_target): Update.
4090
4091 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4092
4093 Turn process_stratum_target's thread_alive op into a method of
4094 process_target.
4095
4096 * target.h (struct process_stratum_target): Remove the target op.
4097 (class process_target): Add the target op.
4098 (mythread_alive): Update the macro.
4099
4100 Update the derived classes and callers below.
4101
4102 * linux-low.cc (linux_target_ops): Update.
4103 (linux_thread_alive): Turn into ...
4104 (linux_process_target::thread_alive): ... this.
4105 (wait_for_sigstop): Update.
4106 * linux-low.h (class linux_process_target): Update.
4107 * lynx-low.cc (lynx_target_ops): Update.
4108 (lynx_thread_alive): Turn into ...
4109 (lynx_process_target::thread_alive): ... this.
4110 * lynx-low.h (class lynx_process_target): Update.
4111 * nto-low.cc (nto_target_ops): Update.
4112 (nto_thread_alive): Turn into ...
4113 (nto_process_target::thread_alive): ... this.
4114 * nto-low.h (class nto_process_target): Update.
4115 * win32-low.cc (win32_target_ops): Update.
4116 (win32_thread_alive): Turn into ...
4117 (win32_process_target::thread_alive): ... this.
4118 * win32-low.h (class win32_process_target): Update.
4119
4120 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4121
4122 Turn process_stratum_target's join op into a method of
4123 process_target.
4124
4125 * target.h (struct process_stratum_target): Remove the target op.
4126 (class process_target): Add the target op.
4127 (join_inferior): Update the macro.
4128
4129 Update the derived classes and callers below.
4130
4131 * linux-low.cc (linux_target_ops): Update.
4132 (linux_join): Turn into ...
4133 (linux_process_target::join): ... this.
4134 * linux-low.h (class linux_process_target): Update.
4135 * lynx-low.cc (lynx_target_ops): Update.
4136 (lynx_join): Turn into ...
4137 (lynx_process_target::join): ... this.
4138 * lynx-low.h (class lynx_process_target): Update.
4139 * nto-low.cc (nto_target_ops): Update.
4140 (nto_process_target::join): Define.
4141 * nto-low.h (class nto_process_target): Update.
4142 * win32-low.cc (win32_target_ops): Update.
4143 (win32_join): Turn into ...
4144 (win32_process_target::join): ... this.
4145 * win32-low.h (class win32_process_target): Update.
4146
4147 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4148
4149 Turn process_stratum_target's mourn op into a method of
4150 process_target.
4151
4152 * target.h (struct process_stratum_target): Remove the target op.
4153 (class process_target): Add the target op.
4154
4155 Update the derived classes and callers below.
4156
4157 * target.cc (target_mourn_inferior): Update.
4158 * linux-low.cc (linux_target_ops): Update.
4159 (linux_mourn): Turn into ...
4160 (linux_process_target::mourn): ... this.
4161 (handle_extended_wait): Update.
4162 (linux_process_target::kill): Update.
4163 (linux_process_target::detach): Update.
4164 * linux-low.h (class linux_process_target): Update.
4165 * lynx-low.cc (lynx_target_ops): Update.
4166 (lynx_mourn): Turn into ...
4167 (lynx_process_target::mourn): ... this.
4168 * lynx-low.h (class lynx_process_target): Update.
4169 * nto-low.cc (nto_target_ops): Update.
4170 (nto_mourn): Turn into ...
4171 (nto_process_target::mourn): ... this.
4172 * nto-low.h (class nto_process_target): Update.
4173 * win32-low.cc (win32_target_ops): Update.
4174 (win32_mourn): Turn into ...
4175 (win32_process_target::mourn): ... this.
4176 * win32-low.h (class win32_process_target): Update.
4177
4178 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4179
4180 Turn process_stratum_target's detach op into a method of
4181 process_target.
4182
4183 * target.h (struct process_stratum_target): Remove the target op.
4184 (class process_target): Add the target op.
4185 (detach_inferior): Update the macro.
4186
4187 Update the derived classes and callers below.
4188
4189 * linux-low.cc (linux_target_ops): Update.
4190 (linux_detach): Turn into ...
4191 (linux_process_target::detach): ... this.
4192 * linux-low.h (class linux_process_target): Update.
4193 * lynx-low.cc (lynx_target_ops): Update.
4194 (lynx_detach): Turn into ...
4195 (lynx_process_target::detach): ... this.
4196 * lynx-low.h (class lynx_process_target): Update.
4197 * nto-low.cc (nto_target_ops): Update.
4198 (nto_detach): Turn into ...
4199 (nto_process_target::detach): ... this.
4200 * nto-low.h (class nto_process_target): Update.
4201 * win32-low.cc (win32_target_ops): Update.
4202 (win32_detach): Turn into ...
4203 (win32_process_target::detach): ... this.
4204 * win32-low.h (class win32_process_target): Update.
4205
4206 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4207
4208 Turn process_stratum_target's kill op into a method of
4209 process_target.
4210
4211 * target.h (struct process_stratum_target): Remove the target op.
4212 (class process_target): Add the target op.
4213
4214 Update the derived classes and callers below.
4215
4216 * target.cc (kill_inferior): Update.
4217 * linux-low.cc (linux_target_ops): Update.
4218 (linux_kill): Turn into ...
4219 (linux_process_target::kill): ... this.
4220 * linux-low.h (class linux_process_target): Update.
4221 * lynx-low.cc (lynx_target_ops): Update.
4222 (lynx_kill): Turn into ...
4223 (lynx_process_target::kill): ... this.
4224 * lynx-low.h (class lynx_process_target): Update.
4225 * nto-low.cc (nto_target_ops): Update.
4226 (nto_kill): Turn into ...
4227 (nto_process_target::kill): ... this.
4228 * nto-low.h (class nto_process_target): Update.
4229 * win32-low.cc (win32_target_ops): Update.
4230 (win32_kill): Turn into ...
4231 (win32_process_target::kill): ... this.
4232 * win32-low.h (class win32_process_target): Update.
4233
4234 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4235
4236 Turn process_stratum_target's attach op into a method of
4237 process_target.
4238
4239 * target.h (struct process_stratum_target): Remove the target op.
4240 (class process_target): Add the target op.
4241 (myattach): Update the macro.
4242
4243 Update the derived classes and callers below.
4244
4245 * linux-low.cc (linux_target_ops): Update.
4246 (linux_attach): Turn into ...
4247 (linux_process_target::attach): ... this.
4248 * linux-low.h (class linux_process_target): Update.
4249 * lynx-low.cc (lynx_target_ops): Update.
4250 (lynx_attach): Turn into ...
4251 (lynx_process_target::attach): ... this.
4252 * lynx-low.h (class lynx_process_target): Update.
4253 * nto-low.cc (nto_target_ops): Update.
4254 (nto_attach): Turn into ...
4255 (nto_process_target::attach): ... this.
4256 * nto-low.h (class nto_process_target): Update.
4257 * win32-low.cc (win32_target_ops): Update.
4258 (win32_attach): Turn into ...
4259 (win32_process_target::attach): ... this.
4260 * win32-low.h (class win32_process_target): Update.
4261
4262 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4263
4264 Turn process_stratum_target's post_create_inferior op into a method
4265 of process_target.
4266
4267 * target.h (struct process_stratum_target): Remove the target op.
4268 (class process_target): Add the target op.
4269 (target_post_create_inferior): Update the macro.
4270 * target.cc (process_target::post_create_inferior): Define.
4271
4272 Update the derived classes and callers below.
4273
4274 * linux-low.cc (linux_target_ops): Update.
4275 (linux_post_create_inferior): Turn into ...
4276 (linux_process_target::post_create_inferior): ... this.
4277 * linux-low.h (class linux_process_target): Update.
4278 * lynx-low.cc (lynx_target_ops): Update.
4279 * nto-low.cc (nto_target_ops): Update.
4280 * win32-low.cc (win32_target_ops): Update.
4281
4282 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4283
4284 Turn process_stratum_target's create_inferior op into a method of
4285 process_target.
4286
4287 * target.h (struct process_stratum_target): Remove the target op.
4288 (class process_target): Add the target op.
4289 (create_inferior): Rename the macro to ...
4290 (target_create_inferior): ... this.
4291
4292 Update the derived classes and callers below.
4293
4294 * server.cc (handle_v_run): Update.
4295 (captured_main): Update.
4296 (process_serial_event): Update.
4297 * linux-low.cc (linux_target_ops): Update.
4298 (linux_create_inferior): Turn into ...
4299 (linux_process_target::create_inferior): ... this.
4300 * linux-low.h (class linux_process_target): Update.
4301 * lynx-low.cc (lynx_target_ops): Update.
4302 (lynx_create_inferior): Turn into ...
4303 (lynx_process_target::create_inferior): ... this.
4304 * lynx-low.h (class lynx_process_target): Update.
4305 * nto-low.cc (nto_target_ops): Update.
4306 (nto_create_inferior): Turn into ...
4307 (nto_process_target::create_inferior): ... this.
4308 * nto-low.h (class nto_process_target): Update.
4309 * win32-low.cc (win32_target_ops): Update.
4310 (win32_create_inferior): Turn into ...
4311 (win32_process_target::create_inferior): ... this.
4312 * win32-low.h (class win32_process_target): Update.
4313
4314 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4315
4316 * target.h (class process_target): New class definition.
4317 (struct process_stratum_target) <pt>: New field with type
4318 'process_target*'.
4319 * linux-low.h (class linux_process_target): Define as a derived
4320 class of 'process_target'.
4321 * linux-low.cc (linux_target_ops): Add a linux_process_target*
4322 as the 'pt' field.
4323 * lynx-low.h (class lynx_process_target): Define as a derived
4324 class of 'process_target'.
4325 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
4326 as the 'pt' field.
4327 * nto-low.h (class nto_process_target): Define as a derived
4328 class of 'process_target'.
4329 * nto-low.cc (nto_target_ops): Add an nto_process_target*
4330 as the 'pt' field.
4331 * win32-low.h (class win32_process_target): Define as a derived
4332 class of 'process_target'.
4333 * win32-low.cc (win32_target_ops): Add a win32_process_target*
4334 as the 'pt' field.
4335
4336 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
4337
4338 * configure: Regenerate.
4339
4340 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
4341 Andrew Burgess <andrew.burgess@embecosm.com>
4342
4343 * linux-riscv-low.cc: New file.
4344 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
4345 and nat/riscv-linux-tdesc.c.
4346 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
4347 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
4348 Define.
4349
4350 2020-02-14 Tom Tromey <tom@tromey.com>
4351
4352 * acinclude.m4: Don't include acx_configure_dir.m4.
4353 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
4354 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
4355 (all, install-only, uninstall, clean-info, clean)
4356 (maintainer-clean): Don't recurse.
4357 (subdir_do, all-lib): Remove.
4358 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
4359 (GNULIB_H): Remove.
4360 (generated_files): Update.
4361 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
4362 * configure: Rebuild.
4363 * configure.ac: Don't configure gnulib or libiberty.
4364 (GNULIB): Update.
4365
4366 2020-02-14 Eli Zaretskii <eliz@gnu.org>
4367
4368 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
4369 preparing the command line for CreateProcess.
4370 (win32_create_inferior): Reflect the program name in debugging
4371 output that shows the process and its command line.
4372
4373 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
4374
4375 * Makefile.in: Rename source files from .c to .cc.
4376 * %.c: Rename to %.cc.
4377 * configure.ac: Rename server.c to server.cc.
4378 * configure: Re-generate.
4379
4380 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
4381
4382 * Makefile.in: Rename gdbsupport source files from .c to .cc.
4383
4384 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
4385
4386 * win32-low.c (win32_create_inferior): Set signal_pid.
4387
4388 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
4389 Pedro Alves <palves@redhat.com>
4390
4391 Skip building gdbserver in a cross-configuration.
4392 * configure.srv: Set $gdbserver_host depending on whether $target
4393 is $host. Use $gdbserver_host instead of $host.
4394
4395 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4396
4397 * configure: Re-generate.
4398
4399 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4400
4401 * configure: Re-generate.
4402
4403 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4404
4405 * acinclude.m4: Update warning.m4 path.
4406
4407 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
4408
4409 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
4410 (handle_exception): Set siginfo_er.
4411 (win32_xfer_siginfo): New function.
4412
4413 2020-02-07 Tom Tromey <tom@tromey.com>
4414 Pedro Alves <palves@redhat.com>
4415
4416 * README: Update build documentation.
4417 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
4418 host, not target.
4419 * configure.ac: Update paths.
4420 * configure: Rebuild.
4421 * acinclude.m4: Update paths.
4422 * Makefile.in: Update include paths.
4423 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
4424 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
4425 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
4426 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
4427 (%-generated.c): Update paths.
4428 * Move entire directory from ../gdb/gdbserver.
4429
4430 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
4431
4432 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
4433
4434 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4435
4436 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
4437 assignment instead of srv_linux_obj.
4438
4439 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
4440
4441 * server.c (handle_qxfer_libraries): Write segment-address with
4442 paddress.
4443
4444 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
4445
4446 * Makefile.in (install-strip): New target.
4447 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
4448 * aclocal.m4: Regenerate.
4449 * configure: Regenerate.
4450 * configure.ac: Add AM_PROG_INSTALL_STRIP.
4451
4452 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4453
4454 * Makefile.in (SFILES): Adjust paths to point to real files.
4455 (OBS): Move waitstatus.o to target/waitstatus.o.
4456 (TAGS): Transform paths appropriately.
4457 (%.o): Rename to...
4458 (nat/%.o): ... this pattern rule.
4459 (%.o): Rename to...
4460 (target/%.o): ... this pattern rule.
4461 * configure.srv: Adjust paths throughout to include nat/ prefix
4462 with the revant files.
4463 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
4464 * configure: Regenerate.
4465
4466 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4467
4468 * Makefile.in (TAGS): Remove config files from the recipe.
4469
4470 2020-01-14 Tom Tromey <tom@tromey.com>
4471
4472 * configure: Rebuild.
4473 * configure.ac: Remove any checks that were added to common.m4.
4474 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
4475 lib-link.m4.
4476
4477 2020-01-14 Tom Tromey <tom@tromey.com>
4478
4479 * server.h: Include config.h.
4480 * gdbreplay.c: Include config.h.
4481 * configure: Rebuild.
4482 * configure.ac: Don't source common.host.
4483 * acinclude.m4: Update path.
4484 * Makefile.in (INCSUPPORT): New variable.
4485 (INCLUDE_CFLAGS): Add INCSUPPORT.
4486 (SFILES): Update paths.
4487 (version-generated.c): Update path to create-version.sh.
4488 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
4489
4490 2020-01-14 Tom Tromey <tom@tromey.com>
4491
4492 * configure.ac (LIBS): Use WIN32APILIBS.
4493 (USE_WIN32API): Don't define.
4494 * configure: Rebuild.
4495
4496 2020-01-14 Tom Tromey <tom@tromey.com>
4497
4498 * configure: Rebuild.
4499
4500 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4501
4502 * Makefile.in (%-generated.c): Remove rule for files from
4503 regformats/i386.
4504
4505 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4506
4507 * configure: Re-generate.
4508
4509 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4510
4511 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
4512 Define to static.
4513 * tracepoint.c (stop_tracing, flush_trace_buffer,
4514 about_to_request_buffer_space, get_trace_state_variable_value,
4515 set_trace_state_variable_value, gdb_collect): Add declaration.
4516
4517 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4518
4519 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
4520 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
4521 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
4522 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
4523 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
4524 static.
4525
4526 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4527
4528 * inferiors.c: Include gdbsupport/common-inferior.h.
4529
4530 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4531
4532 * hostio-errno.c: Include hostio.h.
4533
4534 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4535
4536 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
4537 prerequisite.
4538
4539 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4540
4541 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
4542 * linux-arm-tdesc.h: Include arch/arm.h.
4543
4544 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4545
4546 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
4547
4548 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4549
4550 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
4551 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
4552
4553 2020-01-10 Pedro Alves <palves@redhat.com>
4554
4555 * fork-child.c (post_fork_inferior): Pass target down to
4556 startup_inferior.
4557 * inferiors.c (switch_to_thread): Add process_stratum_target
4558 parameter.
4559 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
4560 * nto-low.c (nto_target_ops): Now a process_stratum_target.
4561 * linux-low.c (linux_target_ops): Now a process_stratum_target.
4562 * remote-utils.c (prepare_resume_reply): Pass the target to
4563 switch_to_thread.
4564 * target.c (the_target): Now a process_stratum_target.
4565 (done_accessing_memory): Pass the target to switch_to_thread.
4566 (set_target_ops): Ajust to use process_stratum_target.
4567 * target.h (struct target_ops): Rename to ...
4568 (struct process_stratum_target): ... this.
4569 (the_target, set_target_ops): Adjust.
4570 (prepare_to_access_memory): Adjust comment.
4571 * win32-low.c (child_xfer_memory): Adjust to use
4572 process_stratum_target.
4573 (win32_target_ops): Now a process_stratum_target.
4574
4575 2020-01-06 Eli Zaretskii <eliz@gnu.org>
4576 Pedro Alves <palves@redhat.com>
4577
4578 * win32-low.c (get_child_debug_event): Extract the fatal exception
4579 from the exit status and convert to the equivalent Posix signal
4580 number.
4581 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
4582 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
4583
4584 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
4585
4586 * Makefile.in: Use INSTALL_PROGRAM_ENV.
4587
4588 2020-01-01 Joel Brobecker <brobecker@adacore.com>
4589
4590 * server.c (gdbserver_version): Change copyright year to 2020.
4591 * gdbreplay.c (gdbreplay_version): Likewise.
4592
4593 2019-12-19 Christian Biesinger <cbiesinger@google.com>
4594
4595 * configure: Regenerate.
4596 * configure.ac: Quote variable arguments of test.
4597
4598 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
4599
4600 * Makefile.in: Fix build with GNU Make 3.81
4601
4602 2019-12-16 Tom Tromey <tromey@adacore.com>
4603
4604 * server.c (get_exec_file): Constify result.
4605
4606 2019-12-10 Christian Biesinger <cbiesinger@google.com>
4607
4608 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
4609 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
4610 * config.in: Regenerate.
4611 * configure: Regenerate.
4612 * configure.ac: Don't check for strerror.
4613 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
4614 Call safe_strerror instead of strerror.
4615 * server.h (strerror): Remove this now-unnecessary declaration.
4616 * tracepoint.c (init_named_socket): Call safe_strerror instead of
4617 strerror.
4618 (gdb_agent_helper_thread): Likewise.
4619 * utils.c (perror_with_name): Likewise.
4620
4621 2019-11-26 Tom Tromey <tom@tromey.com>
4622
4623 * configure, config.in: Rebuild.
4624
4625 2019-11-26 Tom Tromey <tom@tromey.com>
4626
4627 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
4628 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
4629 gdb_sigmask.
4630 * configure, config.in: Rebuild.
4631
4632 2019-11-26 Tom Tromey <tom@tromey.com>
4633
4634 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
4635 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
4636 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
4637 * acinclude.m4: Include ax_pthread.m4.
4638 * config.in, configure: Rebuild.
4639
4640 2019-11-26 Christian Biesinger <cbiesinger@google.com>
4641
4642 * debug.c (debug_set_output): Call safe_strerror instead of
4643 strerror.
4644 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
4645 (linux_kill_one_lwp): Likewise.
4646 (linux_detach_one_lwp): Likewise.
4647 (linux_wait_for_event_filtered): Likewise.
4648 (store_register): Likewise.
4649 * lynx-low.c (lynx_attach): Likewise.
4650 * mem-break.c (insert_memory_breakpoint): Likewise.
4651 (remove_memory_breakpoint): Likewise.
4652 (delete_fast_tracepoint_jump): Likewise.
4653 (set_fast_tracepoint_jump): Likewise.
4654 (uninsert_fast_tracepoint_jumps_at): Likewise.
4655 (reinsert_fast_tracepoint_jumps_at): Likewise.
4656 * nto-low.c (nto_xfer_memory): Likewise.
4657 (nto_resume): Likewise.
4658
4659 2019-11-20 Luis Machado <luis.machado@linaro.org>
4660
4661 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
4662 instead of register count.
4663 * tdesc.c (tdesc_contains_feature): New function.
4664 * tdesc.h (tdesc_contains_feature): New prototype.
4665
4666 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4667
4668 * Makefile.in: Add safe-strerror.c.
4669 * configure: Regenerate.
4670 * configure.ac: Don't source common.host.
4671
4672 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4673
4674 * config.in: Regenerate.
4675 * configure: Regenerate.
4676
4677 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
4678
4679 * ax.c (ax_printf): Handle size_t_arg.
4680
4681 2019-11-06 Christian Biesinger <cbiesinger@google.com>
4682
4683 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
4684 * mi/mi-main.c (output_cores): Likewise.
4685 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
4686 (linux_xfer_osdata_modules): Likewise.
4687 * remote.c (register_remote_support_xml): Likewise.
4688 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
4689 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
4690
4691 2019-11-01 Christian Biesinger <cbiesinger@google.com>
4692
4693 * configure: Regenerate.
4694 * configure.ac: Remove check for strerror_r.
4695
4696 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4697
4698 * config.in: Regenerate.
4699 * configure: Regenerate.
4700 * configure.ac: Also check for strerror_r.
4701
4702 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4703
4704 * ax.h (debug_agent): Remove duplicate declaration.
4705
4706 2019-10-26 Tom de Vries <tdevries@suse.de>
4707
4708 * linux-aarch64-low.c: Fix typos in comments.
4709 * linux-arm-low.c: Same.
4710 * linux-low.c: Same.
4711 * linux-ppc-low.c: Same.
4712 * proc-service.c: Same.
4713 * regcache.h: Same.
4714 * server.c: Same.
4715 * tracepoint.c: Same.
4716 * win32-low.c: Same.
4717
4718 2019-10-25 Tom Tromey <tromey@adacore.com>
4719
4720 * utils.c (xstrdup): Remove.
4721
4722 2019-10-23 Tom Tromey <tom@tromey.com>
4723
4724 * configure, config.in: Rebuild.
4725
4726 2019-10-23 Tom Tromey <tom@tromey.com>
4727
4728 * configure: Rebuild.
4729 * acinclude.m4: Use m4_include, not sinclude.
4730
4731 2019-10-17 Tom Tromey <tromey@adacore.com>
4732
4733 * configure: Rebuild.
4734 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
4735 in AC_CONFIG_FILES invocation.
4736 * Makefile.in (stamp-h, Makefile): Use new-style config.status
4737 invocation.
4738
4739 2019-10-16 Christian Biesinger <cbiesinger@google.com>
4740
4741 * server.c: Include xml-builtin.h.
4742 (get_xml_features): Don't declare xml_builtins here.
4743
4744 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4745
4746 * Makefile.in: Remove references to vec-ipa.o.
4747
4748 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4749
4750 * Makefile.in: Remove references to vec.c.
4751
4752 2019-10-02 Christian Biesinger <cbiesinger@google.com>
4753
4754 * server.c (server_waiting): Change to bool.
4755 (extended_protocol): Likewise.
4756 (response_needed): Likewise.
4757 (exit_requested): Likewise.
4758 (run_once): Likewise.
4759 (report_no_resumed): Likewise.
4760 (non_stop): Likewise.
4761 (disable_packet_vCont): Likewise.
4762 (disable_packet_Tthread): Likewise.
4763 (disable_packet_qC): Likewise.
4764 (disable_packet_qfThreadInfo): Likewise.
4765 (handle_general_set): Update.
4766 (handle_detach): Update.
4767 (handle_monitor_command): Update.
4768 (handle_query): Update.
4769 (captured_main): Update.
4770 (process_serial_event): Update.
4771 * server.h (server_waiting): Change to bool.
4772 (disable_packet_vCont): Likewise.
4773 (disable_packet_Tthread): Likewise.
4774 (disable_packet_qC): Likewise.
4775 (disable_packet_qfThreadInfo): Likewise.
4776 (run_once): Likewise.
4777 (non_stop): Likewise.
4778 * target.c (target_stop_and_wait): Update.
4779
4780 2019-10-02 Tom Tromey <tromey@adacore.com>
4781
4782 * Makefile.in (SFILES): Add common-inferior.c.
4783 (OBS): Add common-inferior.o.
4784 * server.c (startup_with_shell): Don't define.
4785
4786 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
4787
4788 * linux-low.c (linux_low_read_btrace): Update for change to
4789 std::vector.
4790
4791 2019-09-20 Christian Biesinger <cbiesinger@google.com>
4792
4793 * debug.c (debug_threads): Remove comment in favor of the header.
4794 * debug.h (using_threads): Add declaration.
4795 (debug_threads): Add comment.
4796 * linux-aarch64-low.c: Include debug.h and remove declaration of
4797 debug_threads.
4798 * nto-low.c: Likewise.
4799 * remote-utils.c: Likewise.
4800 * thread-db.c: Likewise.
4801
4802 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
4803
4804 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
4805 and powerpc-cell64l-ipa.o.
4806 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
4807 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
4808 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
4809 (spu*-*-*): Remove.
4810
4811 * spu-low.c: Remove file.
4812
4813 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
4814 (parse_spufs_run): Remove.
4815 (ppc_get_pc): Remove Cell/B.E. support.
4816 (ppc_set_pc): Likewise.
4817 (ppc_breakpoint_at): Likewise.
4818 (ppc_arch_setup): Likewise.
4819 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
4820 tdesc_powerpc_cell32l.
4821 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
4822 or init_registers_powerpc_cell32l.
4823 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
4824 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
4825 or init_registers_powerpc_cell32l.
4826 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
4827 (init_registers_powerpc_cell32l): Remove prototype.
4828 (init_registers_powerpc_cell64l): Likewise.
4829
4830 * target.h (struct target_ops): Remove qxfer_spu member.
4831 * server.c (handle_qxfer_spu): Remove.
4832 (qxfer_packets): Remove entry for "spu".
4833 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
4834 * linux-low.c (SPUFS_MAGIC): Remove.
4835 (spu_enumerate_spu_ids): Remove.
4836 (linux_qxfer_spu): Remove.
4837 (linux_target_ops): Remove qxfer_spu member.
4838 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
4839 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
4840 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
4841
4842 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
4843
4844 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
4845 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
4846 * config.in: Regenerate.
4847 * configure: Regenerate.
4848
4849 2019-08-15 Tom Tromey <tromey@adacore.com>
4850
4851 * target.c (target_write_memory): Use gdb::byte_vector.
4852
4853 2019-08-15 Tom Tromey <tromey@adacore.com>
4854
4855 * tracepoint.c (write_inferior_data_pointer)
4856 (write_inferior_integer, write_inferior_int8)
4857 (write_inferior_uinteger, m_tracepoint_action_download)
4858 (r_tracepoint_action_download, x_tracepoint_action_download)
4859 (l_tracepoint_action_download, clear_inferior_trace_buffer)
4860 (download_agent_expr, download_tracepoint_1)
4861 (download_trace_state_variables, upload_fast_traceframes): Update.
4862 * server.c (gdb_write_memory): Update.
4863 * remote-utils.c (relocate_instruction): Update.
4864 * proc-service.c (ps_pdwrite): Update.
4865 * mem-break.c (remove_memory_breakpoint)
4866 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
4867 (uninsert_fast_tracepoint_jumps_at)
4868 (reinsert_fast_tracepoint_jumps_at): Update.
4869 * linux-x86-low.c (append_insns)
4870 (i386_install_fast_tracepoint_jump_pad)
4871 (amd64_write_goto_address, i386_write_goto_address): Update.
4872 * linux-s390-low.c (append_insns, s390_write_goto_address):
4873 Update.
4874 * linux-ppc-low.c (ppc_relocate_instruction)
4875 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
4876 (ppc_write_goto_address): Update.
4877 * linux-aarch64-low.c (append_insns): Update.
4878 * target.h (struct target_ops): Update.
4879 (write_inferior_memory): Don't declare.
4880 * target.c (target_write_memory): Rename from
4881 write_inferior_memory. Remove old target_write_memory.
4882
4883 2019-08-15 Tom Tromey <tromey@adacore.com>
4884
4885 * target.c (write_inferior_memory): Use std::vector.
4886
4887 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
4888
4889 PR build/24886
4890 * configure.ac: Drop enable-libmcheck support.
4891 * configure, config.in: Rebuild.
4892 * acinclude.m4: Don't include it.
4893
4894 2019-07-19 Alan Hayward <alan.hayward@arm.com>
4895
4896 * configure.srv: Remove Arm xml files.
4897
4898 2019-07-19 Alan Hayward <alan.hayward@arm.com>
4899
4900 * configure.srv: Add new files. Remove xml generated files.
4901 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
4902 registers.
4903 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
4904 * linux-aarch32-tdesc.c: New file.
4905 * linux-aarch32-tdesc.h: New file.
4906 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
4907 * linux-arm-low.c (init_registers_arm, tdesc_arm)
4908 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
4909 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
4910 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
4911 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4912 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
4913 (arm_read_description): Call arm_linux_read_description.
4914 (initialize_low_arch): Don't init registers.
4915 * linux-arm-tdesc.c: New file.
4916 * linux-arm-tdesc.h: New file.
4917
4918 2019-07-10 Alan Hayward <alan.hayward@arm.com>
4919
4920 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
4921 Move counter inside for.
4922 (arm_read_description): Check ptrace earlier.
4923 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
4924
4925 2019-07-09 Tom Tromey <tom@tromey.com>
4926
4927 * configure: Rebuild.
4928 * configure.ac: Change common to gdbsupport.
4929 * acinclude.m4: Change common to gdbsupport.
4930 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
4931 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
4932 common to gdbsupport.
4933 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
4934 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
4935 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
4936 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
4937 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
4938 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
4939 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
4940 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
4941 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
4942 common to gdbsupport.
4943
4944 2019-07-04 Alan Hayward <alan.hayward@arm.com>
4945
4946 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
4947 defines.
4948 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
4949
4950 2019-07-04 Alan Hayward <alan.hayward@arm.com>
4951
4952 * configure.srv: Remove legacy xml.
4953 * linux-aarch64-low.c (initialize_low_arch): Remove
4954 initialize_low_tdesc call.
4955 * linux-aarch64-tdesc-selftest.c: Remove file.
4956 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
4957 * linux-x86-low.c (initialize_low_arch): Remove
4958 initialize_low_tdesc call.
4959 * linux-x86-tdesc-selftest.c: Remove file.
4960 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
4961
4962 2019-06-20 Tom de Vries <tdevries@suse.de>
4963
4964 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
4965 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
4966
4967 2019-06-19 Tom de Vries <tdevries@suse.de>
4968
4969 * debug.h (debug_write): Change return type to ssize_t.
4970 * debug.c (debug_write): Same.
4971
4972 2019-06-14 Tom Tromey <tom@tromey.com>
4973
4974 * configure.ac: Use new path to gnulib.
4975 * configure: Rebuild.
4976 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
4977 to gnulib.
4978
4979 2019-06-11 Tom Tromey <tom@tromey.com>
4980
4981 * Makefile.in (SFILES): Add alloc.c.
4982 (OBS): Add alloc.o.
4983 (IPA_OBJS): Add alloc-ipa.o.
4984 (alloc-ipa.o): New target.
4985 (%.o: ../%.c): New pattern rule.
4986
4987 2019-06-10 Tom Tromey <tromey@adacore.com>
4988
4989 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
4990 end warning with a newline.
4991 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
4992 newline.
4993 * thread-db.c (attach_thread): Don't end warning with a newline.
4994 (thread_db_notice_clone): Likewise.
4995 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
4996 newline.
4997 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
4998 end warning with a newline.
4999
5000 2019-06-04 Pedro Alves <palves@redhat.com>
5001
5002 * server.c (captured_main): Use make_unique_xstrdup.
5003
5004 2019-06-02 Tom Tromey <tom@tromey.com>
5005
5006 * gdbreplay.c (fromhex): Remove.
5007 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
5008
5009 2019-05-29 Tom Tromey <tromey@adacore.com>
5010
5011 * configure: Rebuild.
5012
5013 2019-05-06 Kevin Buettner <kevinb@redhat.com>
5014
5015 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
5016 sign extension code on 32-bit builds.
5017
5018 2019-05-03 Eli Zaretskii <eliz@gnu.org>
5019
5020 * remote-utils.c:
5021 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
5022
5023 2019-04-19 Tom Tromey <tom@tromey.com>
5024
5025 * server.c (struct vstop_notif): Derive from notif_event.
5026 <base>: Remove.
5027 (queue_stop_reply): Update.
5028 (remove_all_on_match_ptid): Change type. Rewrite.
5029 (discard_queued_stop_replies): Rewrite.
5030 (in_queued_stop_replies_ptid): Change type.
5031 (in_queued_stop_replies): Rewrite.
5032 (notif_stop): Update.
5033 (queue_stop_reply_callback): Update.
5034 (captured_main): Don't call initialize_notif.
5035 (push_stop_notification): Update.
5036 * notif.c (notif_write_event, handle_notif_ack)
5037 (notif_event_enque, notif_push): Update.
5038 (notif_event_xfree, initialize_notif): Remove.
5039 * notif.h (struct notif_event): Include <list>, not
5040 "common/queue.h".
5041 (struct notif_server) <queue>: Now a std::list.
5042 (notif_event_p): Remove typedef.
5043 (initialize_notif): Don't declare.
5044 (struct notif_event): Add virtual destructor.
5045
5046 2019-04-17 Alan Hayward <alan.hayward@arm.com>
5047
5048 * ax.c (ax_vdebug): Call debug_printf.
5049 * debug.c (debug_write): New function.
5050 * debug.h (debug_write): New declaration.
5051 * linux-low.c (sigchld_handler): Call debug_write.
5052
5053 2019-04-17 Alan Hayward <alan.hayward@arm.com>
5054
5055 * debug.c (debug_set_output): New function.
5056 (debug_vprintf): Send output to debug_file.
5057 (debug_flush): Likewise.
5058 * debug.h (debug_set_output): New declaration.
5059 * server.c (handle_monitor_command): Add debug-file option.
5060 (captured_main): Likewise.
5061
5062 2019-04-17 Alan Hayward <alan.hayward@arm.com>
5063
5064 * debug.c (remote_debug): Add definition.
5065 * debug.h (remote_debug): Add declaration.
5066 * hostio.c (remote_debug): Remove declaration.
5067 * remote-utils.c (struct ui_file): Likewise.
5068 (remote_debug): Likewise.
5069 * remote-utils.h (remote_debug): Likewise,
5070 * server.c (remote_debug): Remove definition.
5071
5072 2019-04-10 Kevin Buettner <kevinb@redhat.com>
5073
5074 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
5075 when using a 64-bit gdbserver.
5076
5077 2019-04-09 Tom Tromey <tromey@adacore.com>
5078
5079 * linux-low.c (select_event_lwp): Use find_thread_in_random.
5080
5081 2019-04-08 Tom Tromey <tom@tromey.com>
5082
5083 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
5084 throw.
5085 (linux_resume_one_lwp): Likewise.
5086
5087 2019-04-08 Tom Tromey <tom@tromey.com>
5088
5089 * gdbreplay.c: Update.
5090 * linux-low.c: Update.
5091 * server.c: Update.
5092
5093 2019-04-08 Tom Tromey <tom@tromey.com>
5094
5095 * server.c: Use C++ exception handling.
5096 * linux-low.c: Use C++ exception handling.
5097 * gdbreplay.c: Use C++ exception handling.
5098
5099 2019-04-08 Tom Tromey <tom@tromey.com>
5100
5101 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
5102 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
5103 (captured_main, main): Update.
5104 * gdbreplay.c (main): Update.
5105
5106 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5107
5108 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
5109 value in argument pointer, return 1 if the entry is found and 0
5110 otherwise. Move comment.
5111 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
5112 * linux-low.h (linux_get_auxv): Declare.
5113 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
5114
5115 2019-04-05 Tom Tromey <tromey@adacore.com>
5116
5117 * server.c (gdbserver_usage): Use upper-case for metasyntactic
5118 variables.
5119
5120 2019-03-28 Alan Hayward <alan.hayward@arm.com>
5121
5122 * linux-low.c (AT_HWCAP2): Add define if not already included.
5123
5124 2019-03-26 Alan Hayward <alan.hayward@arm.com>
5125
5126 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
5127 (aarch64_arch_setup): Call linux_get_hwcap.
5128 * linux-arm-low.c (arm_get_hwcap): Remove function.
5129 (arm_read_description): Call linux_get_hwcap.
5130 * linux-low.c (linux_get_auxv): New function.
5131 (linux_get_hwcap): Likewise.
5132 (linux_get_hwcap2): Likewise.
5133 * linux-low.h (linux_get_hwcap): New declaration.
5134 (linux_get_hwcap2): Likewise.
5135 * linux-ppc-low.c (ppc_get_auxv): Remove function.
5136 (ppc_arch_setup): Call linux_get_hwcap.
5137 * linux-s390-low.c (s390_get_hwcap): Remove function.
5138 (s390_arch_setup): Call linux_get_hwcap.
5139
5140 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5141 Jiong Wang <jiong.wang@arm.com>
5142
5143 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
5144 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
5145 to fail.
5146 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
5147
5148 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5149 Jiong Wang <jiong.wang@arm.com>
5150
5151 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
5152 (aarch64_get_hwcap): New function.
5153 (aarch64_arch_setup): Read APIA hwcap.
5154
5155 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5156 Jiong Wang <jiong.wang@arm.com>
5157
5158 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
5159 (initialize_low_tracepoint): Likewise.
5160 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
5161 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
5162 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
5163 (aarch64_linux_read_description): Likewise.
5164 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
5165
5166 2019-03-12 John Baldwin <jhb@FreeBSD.org>
5167
5168 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
5169 i386_create_target_description for 'segments' parameter.
5170 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
5171 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
5172 * win32-i386-low.c (i386_arch_setup): Likewise.
5173
5174 2019-03-12 Tom Tromey <tromey@adacore.com>
5175
5176 * linux-low.c (iterate_over_lwps): Update.
5177
5178 2019-03-06 Tom Tromey <tom@tromey.com>
5179
5180 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
5181 (captured_main): Use SCOPE_EXIT.
5182
5183 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
5184
5185 * configure.srv: Use '$enable_unittest' instead of '$development'
5186 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
5187 case.
5188
5189 2019-02-27 Tom Tromey <tromey@adacore.com>
5190
5191 * gdbreplay.c (logchar): Handle \r\n.
5192
5193 2019-02-07 Alan Hayward <alan.hayward@arm.com>
5194
5195 * linux-low.c (linux_attach): Add process before lwp.
5196 * server.c (attach_inferior): Check if already attached.
5197
5198 2019-02-07 Tom Tromey <tom@tromey.com>
5199
5200 * x86-tdesc.h: Rename include guard.
5201 * x86-low.h: Add include guard.
5202 * wincecompat.h: Rename include guard.
5203 * win32-low.h: Add include guard.
5204 * utils.h: Rename include guard.
5205 * tracepoint.h: Rename include guard.
5206 * tdesc.h: Rename include guard.
5207 * target.h: Rename include guard.
5208 * server.h: Rename include guard.
5209 * remote-utils.h: Rename include guard.
5210 * regcache.h: Rename include guard.
5211 * nto-low.h: Rename include guard.
5212 * notif.h: Add include guard.
5213 * mem-break.h: Rename include guard.
5214 * lynx-low.h: Add include guard.
5215 * linux-x86-tdesc.h: Add include guard.
5216 * linux-s390-tdesc.h: Add include guard.
5217 * linux-ppc-tdesc-init.h: Add include guard.
5218 * linux-low.h: Add include guard.
5219 * linux-aarch64-tdesc.h: Add include guard.
5220 * linux-aarch32-low.h: Add include guard.
5221 * inferiors.h: Rename include guard.
5222 * i387-fp.h: Rename include guard.
5223 * hostio.h: Rename include guard.
5224 * gdbthread.h: Rename include guard.
5225 * gdb_proc_service.h: Rename include guard.
5226 * event-loop.h: Rename include guard.
5227 * dll.h: Rename include guard.
5228 * debug.h: Rename include guard.
5229 * ax.h: Rename include guard.
5230
5231 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
5232
5233 PR gdb/23985
5234 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
5235 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
5236
5237 2019-01-25 Tom Tromey <tom@tromey.com>
5238
5239 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
5240
5241 2019-01-25 Tom Tromey <tom@tromey.com>
5242
5243 * win32-low.c: Fix common/ includes.
5244 * win32-i386-low.c: Fix common/ includes.
5245 * tracepoint.c: Fix common/ includes.
5246 * thread-db.c: Fix common/ includes.
5247 * target.h: Fix common/ includes.
5248 * symbol.c: Fix common/ includes.
5249 * spu-low.c: Fix common/ includes.
5250 * server.h: Fix common/ includes.
5251 * server.c: Fix common/ includes.
5252 * remote-utils.c: Fix common/ includes.
5253 * regcache.h: Fix common/ includes.
5254 * regcache.c: Fix common/ includes.
5255 * nto-x86-low.c: Fix common/ includes.
5256 * notif.h: Fix common/ includes.
5257 * mem-break.h: Fix common/ includes.
5258 * lynx-low.c: Fix common/ includes.
5259 * lynx-i386-low.c: Fix common/ includes.
5260 * linux-x86-tdesc-selftest.c: Fix common/ includes.
5261 * linux-x86-low.c: Fix common/ includes.
5262 * linux-low.c: Fix common/ includes.
5263 * inferiors.h: Fix common/ includes.
5264 * i387-fp.c: Fix common/ includes.
5265 * hostio.c: Fix common/ includes.
5266 * hostio-errno.c: Fix common/ includes.
5267 * gdbthread.h: Fix common/ includes.
5268 * gdbreplay.c: Fix common/ includes.
5269 * fork-child.c: Fix common/ includes.
5270 * event-loop.c: Fix common/ includes.
5271 * ax.c:
5272 (enum gdb_agent_op): Fix common/ includes.
5273
5274 2019-01-21 Tom Tromey <tom@tromey.com>
5275
5276 * tracepoint.c: Fix includes.
5277 * remote-utils.c: Fix includes.
5278 * linux-x86-low.c: Fix includes.
5279
5280 2019-01-01 Joel Brobecker <brobecker@adacore.com>
5281
5282 * gdbreplay.c (gdbreplay_version): Update copyright year in
5283 version message.
5284 * server.c (gdbserver_version): Likewise.
5285
5286 2018-12-05 Alan Hayward <alan.hayward@arm.com>
5287
5288 * linux-low.c (add_lwp): Switch ordering.
5289
5290 2018-11-29 Tom Tromey <tom@tromey.com>
5291
5292 * win32-low.c (win32_join): Take pid, not process.
5293 * target.h (struct target_ops) <join>: Change argument type.
5294 (join_inferior): Change argument name.
5295 * spu-low.c (spu_join): Take pid, not process.
5296 * server.c (handle_detach): Preserve pid before destroying
5297 process.
5298 * lynx-low.c (lynx_join): Take pid, not process.
5299 * linux-low.c (linux_join): Take pid, not process.
5300
5301 2018-11-23 Alan Hayward <alan.hayward@arm.com>
5302
5303 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
5304 (aarch64_cannot_fetch_register): Likewise.
5305 (struct linux_target_ops): Update references.
5306
5307 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5308
5309 * linux-ppc-low.c: Include nat/linux-ptrace.h.
5310
5311 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5312
5313 * configure.srv (ipa_ppc_linux_regobj): Add
5314 powerpc-isa207-htm-vsx32l-ipa.o and
5315 powerpc-isa207-htm-vsx64l-ipa.o.
5316 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
5317 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
5318 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
5319 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
5320 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
5321 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
5322 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
5323 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
5324 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5325 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
5326 (init_registers_powerpc_isa207_htm_vsx32l)
5327 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
5328 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
5329 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
5330 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
5331 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
5332 (ppc_store_tm_ctarregset): New functions.
5333 (ppc_regsets): Add entries for HTM regsets.
5334 (ppc_arch_setup): Set htm in features struct when needed. Set
5335 sizes for the HTM regsets.
5336 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
5337 (initialize_low_arch): Call
5338 init_registers_powerpc_isa207_htm_vsx32l and
5339 init_registers_powerpc_isa207_htm_vsx64l.
5340 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5341 PPC_TDESC_ISA207_HTM_VSX.
5342 (initialize_low_tracepoint): Call
5343 init_registers_powerpc_isa207_htm_vsx32l and
5344 init_registers_powerpc_isa207_htm_vsx64l.
5345
5346 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5347
5348 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
5349 rs6000/power-linux-pmu.xml to srv_xmlfiles.
5350 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
5351 (ppc_store_pmuregset): New functions.
5352 (ppc_regsets): Add entries for ebb and pmu regsets.
5353 (ppc_arch_setup): Set isa207 in features struct if the ebb and
5354 pmu regsets are available. Set sizes for these regsets.
5355
5356 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5357
5358 * configure.srv (ipa_ppc_linux_regobj): Add
5359 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
5360 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
5361 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
5362 rs6000/powerpc-isa207-vsx32l.xml, and
5363 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
5364 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5365 <PPC_TDESC_ISA207_VSX>: New enum value.
5366 (init_registers_powerpc_isa207_vsx32l): Declare.
5367 (init_registers_powerpc_isa207_vsx64l): Declare.
5368 * linux-ppc-low.c (ppc_fill_tarregset): New function.
5369 (ppc_store_tarregset): New function.
5370 (ppc_regsets): Add entry for the TAR regset.
5371 (ppc_arch_setup): Set isa207 in features struct when needed. Set
5372 size for the TAR regsets.
5373 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
5374 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
5375 and init_registers_powerpc_isa207_vsx64l.
5376 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
5377 (initialize_low_tracepoint): Call
5378 init_registers_powerpc_isa207_vsx32l and
5379 init_registers_powerpc_isa207_vsx64l.
5380
5381 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5382 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5383
5384 * configure.srv (ipa_ppc_linux_regobj): Add
5385 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
5386 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
5387 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
5388 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
5389 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
5390 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
5391 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
5392 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5393 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
5394 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
5395 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
5396 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
5397 (ppc_hwcap): Add comment.
5398 (ppc_hwcap2): New global.
5399 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
5400 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
5401 (ppc_regsets): Add entries for the DSCR and PPR regsets.
5402 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
5403 when needed. Set sizes for the the DSCR and PPR regsets.
5404 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
5405 (initialize_low_arch): Call
5406 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5407 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5408 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5409 PPC_TDESC_ISA205_PPR_DSCR_VSX.
5410 (initialize_low_tracepoint): Call
5411 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5412 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5413
5414 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5415
5416 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
5417
5418 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
5419 Simon Marchi <simark@simark.ca>
5420
5421 * acinclude.m4: Include "../selftest.m4".
5422 * configure: Regenerate.
5423 * configure.ac: Use "GDB_AC_SELFTEST".
5424 * configure.srv: Use "$enable_unittests" instead of
5425 "$development" when checking whether unit tests have been
5426 enabled.
5427 * server.c (captured_main): Update message informing that
5428 selftests have been disabled.
5429
5430 2018-10-04 Tom Tromey <tom@tromey.com>
5431
5432 * configure: Rebuild.
5433
5434 2018-10-04 Tom Tromey <tom@tromey.com>
5435
5436 * server.c (handle_status): Rename inner "thread".
5437 (process_serial_event): Declare "res" in 'm' case.
5438 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
5439 (iterate_over_lwps): Rename inner "thread".
5440 (linux_qxfer_libraries_svr4): Rename inner "len".
5441 * gdbthread.h (find_thread_in_random): Rename inner "thread".
5442
5443 2018-10-01 Gary Benson <gbenson@redhat.com>
5444
5445 * gdb_proc_service.h: Moved common code to
5446 common/gdb_proc_service.h.
5447
5448 2018-10-01 Gary Benson <gbenson@redhat.com>
5449
5450 * gdb_proc_service.h: Synchronize comments and whitespace with
5451 GDB's version of this file.
5452
5453 2018-09-25 Tom Tromey <tom@tromey.com>
5454
5455 * configure: Rebuild.
5456 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
5457
5458 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5459
5460 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
5461 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
5462 ($(IPA_LIB)): Sort IPA_OBJS.
5463
5464 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5465
5466 * Makefile.in: Remove references to $(ADD_DEPS).
5467
5468 2018-09-16 Tom Tromey <tom@tromey.com>
5469
5470 * remote-utils.c (remote_open): Use GNU style for metasyntactic
5471 variables.
5472 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
5473 variables.
5474
5475 2018-09-05 Tom Tromey <tom@tromey.com>
5476
5477 * configure: Rebuild.
5478
5479 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
5480
5481 PR build/23399
5482 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
5483
5484 2018-08-27 Tom Tromey <tom@tromey.com>
5485
5486 PR build/23087:
5487 * configure: Rebuild.
5488
5489 2018-08-27 Tom Tromey <tom@tromey.com>
5490
5491 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
5492 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
5493 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
5494 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
5495 (s390x_emit_stack_adjust): Add casts to unsigned char.
5496
5497 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
5498
5499 PR gdb/23374
5500 PR gdb/23375
5501 * server.h (struct client_state) <disable_randomization>:
5502 Initialize to 1.
5503
5504 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
5505
5506 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
5507 variable.
5508 (mips_supply_ptrace_register): Likewise.
5509
5510 2018-07-22 Tom Tromey <tom@tromey.com>
5511
5512 * configure: Rebuild.
5513
5514 2018-07-22 Tom Tromey <tom@tromey.com>
5515
5516 * win32-low.c (win32_create_inferior): Remove unused variables.
5517 * gdbreplay.c (remote_open): Remove unused variable.
5518 * remote-utils.c (remote_prepare): Remove unused variable.
5519 * x86-tdesc.h (X86_TDESC_H): Define.
5520 (amd64_expedite_regs): Define conditionally.
5521 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
5522 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
5523 * remote-utils.c (readchar): Remove unused variable.
5524
5525 2018-07-13 Pedro Alves <palves@redhat.com>
5526
5527 * linux-low.c (linux_kill): Change parameter to process_info
5528 pointer instead of pid. Adjust.
5529 * lynx-low.c (lynx_kill): Likewise.
5530 * nto-low.c (nto_kill): Likewise.
5531 * spu-low.c (spu_kill): Likewise.
5532 * win32-low.c (win32_kill): Likewise.
5533 * server.c (handle_v_kill, kill_inferior_callback)
5534 (detach_or_kill_for_exit): Adjust.
5535 * target.c (kill_inferior): Change parameter to process_info
5536 pointer instead of pid. Adjust.
5537 * target.h (struct target_ops) <kill>: Change parameter to
5538 process_info pointer instead of pid. Adjust all implementations
5539 and callers.
5540 (kill_inferior): Likewise.
5541
5542 2018-07-13 Pedro Alves <palves@redhat.com>
5543
5544 * linux-low.c (linux_detach, linux_join): Change parameter to
5545 process_info pointer instead of pid. Adjust.
5546 * lynx-low.c (lynx_detach, lynx_join): Likewise.
5547 * nto-low.c (nto_detach): Likewise.
5548 * spu-low.c (spu_detach, spu_join): Likewise.
5549 * win32-low.c (win32_detach, win32_join): Likewise.
5550 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
5551 * target.h (struct target_ops) <detach, join>: Change parameter to
5552 process_info pointer instead of pid. Adjust all implementations
5553 and callers.
5554 (detach_inferior, join_inferior): Rename 'pid' parameter to
5555 'proc'.
5556
5557 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5558 Jan Kratochvil <jan.kratochvil@redhat.com>
5559 Paul Fertser <fercerpav@gmail.com>
5560 Tsutomu Seki <sekiriki@gmail.com>
5561
5562 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
5563 (OBS): Add 'common/netstuff.o'.
5564 (GDBREPLAY_OBS): Likewise.
5565 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
5566 (remote_open): Implement support for IPv6
5567 connections.
5568 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
5569 and 'wspiapi.h'.
5570 (handle_accept_event): Accept connections from IPv6 sources.
5571 (remote_prepare): Handle IPv6-style hostnames; implement
5572 support for IPv6 connections.
5573 (remote_open): Implement support for printing connections from
5574 IPv6 sources.
5575
5576 2018-07-11 Pedro Alves <palves@redhat.com>
5577
5578 PR gdb/23377
5579 * mem-break.c (any_persistent_commands): Add process_info
5580 parameter and use it instead of relying on the current process.
5581 Change return type to bool.
5582 * mem-break.h (any_persistent_commands): Add process_info
5583 parameter and change return type to bool.
5584 * server.c (handle_detach): Remove require_running_or_return call.
5585 Look up the process_info for the process we're about to detach.
5586 If not found, return back error to GDB. Adjust
5587 any_persistent_commands call to pass down a process pointer.
5588
5589 2018-07-11 Pedro Alves <palves@redhat.com>
5590
5591 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
5592 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
5593 instead of collect_register_by_name.
5594 * regcache.c (regcache_raw_get_unsigned_by_name): New.
5595 * regcache.h (regcache_raw_get_unsigned_by_name): New.
5596
5597 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
5598 Pedro Alves <palves@redhat.com>
5599
5600 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
5601
5602 2018-07-03 Tom Tromey <tom@tromey.com>
5603
5604 * linux-low.c: Update.
5605 * lynx-low.c: Update.
5606 * mem-break.c: Update.
5607 * nto-low.c: Update.
5608 * remote-utils.c: Update.
5609 * server.c: Update.
5610 * spu-low.c: Update.
5611 * target.c: Update.
5612 * win32-low.c: Update.
5613
5614 2018-07-03 Tom Tromey <tom@tromey.com>
5615
5616 * server.c: Update.
5617
5618 2018-07-03 Tom Tromey <tom@tromey.com>
5619
5620 * linux-low.c: Update.
5621
5622 2018-07-03 Tom Tromey <tom@tromey.com>
5623
5624 * target.c: Update.
5625
5626 2018-07-03 Tom Tromey <tom@tromey.com>
5627
5628 * linux-low.c: Update.
5629 * linux-mips-low.c: Update.
5630 * lynx-low.c: Update.
5631 * nto-low.c: Update.
5632 * remote-utils.c: Update.
5633 * server.c: Update.
5634 * spu-low.c: Update.
5635 * target.c: Update.
5636 * thread-db.c: Update.
5637
5638 2018-07-03 Tom Tromey <tom@tromey.com>
5639
5640 * linux-low.c: Update.
5641 * linux-mips-low.c: Update.
5642 * lynx-low.c: Update.
5643 * mem-break.c: Update.
5644 * nto-low.c: Update.
5645 * remote-utils.c: Update.
5646 * server.c: Update.
5647 * spu-low.c: Update.
5648 * target.c: Update.
5649 * tracepoint.c: Update.
5650
5651 2018-07-03 Tom Tromey <tom@tromey.com>
5652
5653 * linux-low.c: Update.
5654 * linux-ppc-low.c: Update.
5655 * linux-x86-low.c: Update.
5656 * proc-service.c: Update.
5657 * server.c: Update.
5658 * spu-low.c: Update.
5659 * thread-db.c: Update.
5660 * win32-low.c: Update.
5661
5662 2018-07-03 Tom Tromey <tom@tromey.com>
5663
5664 * linux-low.c: Update.
5665 * lynx-low.c: Update.
5666 * nto-low.c: Update.
5667 * remote-utils.c: Update.
5668 * spu-low.c: Update.
5669 * thread-db.c: Update.
5670 * win32-low.c: Update.
5671
5672 2018-06-29 Joel Brobecker <brobecker@adacore.com>
5673
5674 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
5675 parameter in call to 'amd64_create_target_description'.
5676
5677 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5678
5679 * x86-tdesc.h: Remove executable permission flag.
5680
5681 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5682
5683 * configure.ac: Remove AC_PREREQ, add missing quoting.
5684 * configure: Re-generate.
5685 * config.in: Re-generate.
5686 * aclocal.m4: Re-generate.
5687
5688 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
5689
5690 * tracepoint.h (current_traceframe): Remove declaration.
5691
5692 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5693
5694 * linux-aarch64-low.c (is_sve_tdesc): New function.
5695 (aarch64_sve_regs_copy_to_regcache): Likewise.
5696 (aarch64_sve_regs_copy_from_regcache): Likewise.
5697 (aarch64_regs_info): Add SVE checks.
5698 (initialize_low_arch): Initialize SVE.
5699
5700 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5701
5702 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
5703
5704 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5705
5706 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
5707 (initialize_low_tracepoint): Likewise
5708 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
5709 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
5710 param.
5711 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
5712 checks.
5713 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
5714
5715 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5716
5717 * server.h (PBUFSIZ): Increase size
5718
5719 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5720
5721 * regcache.c (regcache::raw_compare): New function.
5722 * regcache.h (regcache::raw_compare): New declaration.
5723
5724 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5725
5726 * regcache.c (new_register_cache): Use new.
5727 (free_register_cache): Use delete.
5728 (register_data): Use const.
5729 (supply_register): Move body inside regcache.
5730 (regcache::raw_supply): New override function.
5731 (collect_register): Move body inside regcache.
5732 (regcache::raw_collect): New override function.
5733 (regcache::get_register_status): New override function.
5734 * regcache.h (struct regcache): Inherit from reg_buffer_common.
5735
5736 2018-06-09 Tom Tromey <tom@tromey.com>
5737
5738 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
5739 declare queue.
5740 (event_queue): Use std::queue.
5741 (gdb_event_xfree): Remove.
5742 (initialize_event_loop, process_event, wait_for_event): Update.
5743
5744 2018-06-08 Stan Cox <scox@redhat.com>
5745
5746 * win32-low.c (win32_create_inferior): last_ptid and last_status
5747 moved to client_state.
5748
5749 2018-06-08 Pedro Alves <palves@redhat.com>
5750
5751 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
5752 common/common-exceptions.o, common/common-utils.o,
5753 common/errors.o, common/print-utils.o and utils.o.
5754 * gdbreplay.c: Include "common-defs.h" instead of the two
5755 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
5756 string.h or alloca.h.
5757 (perror_with_name): Delete.
5758 (remote_open): Use xstrdup instead of strdup.
5759 (main): Rename to ...
5760 (captured_main): ... this.
5761 (main): New.
5762
5763 2018-06-08 Tom Tromey <tom@tromey.com>
5764
5765 * linux-low.c (linux_low_read_btrace): Update.
5766
5767 2018-06-04 Stan Cox <scox@redhat.com>
5768
5769 * server.h (struct client_state): New.
5770 * server.c (cont_thread, general_thread, multi_process)
5771 (report_fork_events, report_vfork_events, report_exec_events)
5772 (report_thread_events, swbreak_feature, hwbreak_feature)
5773 (vCont_supported, disable_randomization, pass_signals)
5774 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
5775 Moved to client_state.
5776 * remote-utils.c (remote_debug, noack_mode)
5777 (transport_is_reliable): Moved to client_state.
5778 * tracepoint.c (current_traceframe): Moved to client_state.
5779
5780 Update all callers.
5781 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
5782 linux-low.c, remote-utils.h, target.c: Use client_state.
5783
5784 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5785
5786 * configure.srv: Add new c/h file.
5787
5788 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5789
5790 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
5791 null VQ.
5792
5793 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5794
5795 * gdb.arch/mips-fpregset-core.exp: New test.
5796 * gdb.arch/mips-fpregset-core.c: New test source.
5797
5798 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
5799
5800 PR server/23198
5801 * hostio.c (require_int): Do not report overflow for integers
5802 between 0xfffffff and 0x7fffffff.
5803
5804 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5805
5806 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
5807 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
5808 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
5809 functions.
5810 (the_low_target): Wire them.
5811
5812 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5813
5814 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
5815 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
5816 mode. Call collect_register_by_name with vscr using
5817 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
5818 (ppc_store_vrregset): Add and set vscr_offset variable as in
5819 ppc_fill_vrregset. Call supply_register_by_name with vscr using
5820 vscr_offset.
5821
5822 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5823
5824 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5825 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
5826 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
5827
5828 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5829
5830 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
5831 (ppc_store_vsxregset): Likewise.
5832 (ppc_fill_vrregset): Likewise.
5833 (ppc_store_vrregset): Likewise.
5834 (ppc_fill_evrregset): Likewise.
5835 (ppc_store_evrregset): Likewise.
5836 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
5837 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
5838 needed.
5839
5840 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5841
5842 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
5843 wordsize of the inferior. Call ppc_linux_target_wordsize.
5844
5845 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5846
5847 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
5848 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
5849 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
5850 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5851 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5852 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5853 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5854 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5855 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5856 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5857 (tdesc_powerpc_e500l): Remove.
5858 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
5859 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
5860 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
5861 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
5862 linux-ppc-tdesc.h.
5863 (ppc_arch_setup): Remove target description matching code. Fill a
5864 ppc_linux_features struct and call ppc_linux_match_description
5865 with it.
5866
5867 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5868
5869 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
5870 width of the requested register exceeds the width of the
5871 `ptrace' data type.
5872 (mips_cannot_store_register): Likewise.
5873
5874 2018-05-21 Maciej W. Rozycki <macro@mips.com>
5875
5876 * linux-mips-low.c (mips_fetch_register): New function. Update
5877 preceding comment.
5878 (mips_store_gregset): Supply 0 rather than $restart for $zero.
5879 (the_low_target): Wire `mips_fetch_register'.
5880
5881 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5882
5883 * lynx-i386-low.c (LYNXOS_178): New macro.
5884 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
5885 the layout on LynxOS-178.
5886 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
5887 handle floating point registers that are not supported by
5888 LynxOS-178.
5889
5890 2018-05-10 Tom Tromey <tom@tromey.com>
5891
5892 * configure: Rebuild.
5893
5894 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5895
5896 PR server/23158:
5897 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
5898 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
5899 Use it to set the expedite_regs field in the given tdesc.
5900 * x86-tdesc.h: New file.
5901 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
5902 Adjust following the addition of the new expedite_regs parameter
5903 to init_target_desc.
5904 * linux-tic6x-low.c (tic6x_read_description): Likewise.
5905 * linux-x86-tdesc.c: #include "x86-tdesc.h".
5906 (i386_linux_read_description, amd64_linux_read_description):
5907 Adjust following the addition of the new expedite_regs parameter
5908 to init_target_desc.
5909 * lynx-i386-low.c: #include "x86-tdesc.h".
5910 (lynx_i386_arch_setup): Adjust following the addition of the new
5911 expedite_regs parameter to init_target_desc.
5912 * nto-x86-low.c: #include "x86-tdesc.h".
5913 (nto_x86_arch_setup): Adjust following the addition of the new
5914 expedite_regs parameter to init_target_desc.
5915 * win32-i386-low.c: #include "x86-tdesc.h".
5916 (i386_arch_setup): Adjust following the addition of the new
5917 expedite_regs parameter to init_target_desc.
5918
5919 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5920
5921 PR server/23158:
5922 * win32-low.c (win32_create_inferior): Add call to my_wait
5923 setting last_status global.
5924
5925 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5926
5927 PR server/23158:
5928 * win32-low.c (create_process): Only call gdb_tilde_expand if
5929 inferior_cwd is not NULL.
5930
5931 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5932
5933 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
5934 registers to the cache if their values have changed.
5935 (i387_xsave_to_cache): Provide default values for x87 control
5936 registers when these features are available, but disabled.
5937 * regcache.c (supply_register_by_name_zeroed): New function.
5938 * regcache.h (supply_register_by_name_zeroed): Declare new
5939 function.
5940
5941 2018-05-07 Tom Tromey <tom@tromey.com>
5942
5943 * configure: Rebuild.
5944
5945 2018-05-04 Tom Tromey <tom@tromey.com>
5946
5947 * configure: Rebuild.
5948
5949 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5950 Pedro Alves <palves@redhat.com>
5951
5952 * linux-aarch64-low.c (aarch64_stopped_data_address):
5953 Likewise.
5954
5955 2018-04-27 Tom Tromey <tom@tromey.com>
5956
5957 * configure: Rebuild.
5958
5959 2018-04-23 Tom Tromey <tom@tromey.com>
5960
5961 * configure: Rebuild.
5962
5963 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
5964
5965 * Makefile.in (depcomp): Add "..".
5966 (all_deps_files): New and use it.
5967
5968 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5969
5970 * configure.srv (aarch64*-*-linux*): Don't include xml.
5971 (i[34567]86-*-cygwin*): Likewise.
5972 (i[34567]86-*-linux*): Likewise.
5973 (i[34567]86-*-lynxos*): Likewise.
5974 (i[34567]86-*-mingw32ce*): Likewise.
5975 (i[34567]86-*-mingw*): Likewise.
5976 (i[34567]86-*-nto*): Likewise.
5977 (tic6x-*-uclinux): Likewise.
5978 (x86_64-*-linux*): Likewise.
5979 (x86_64-*-mingw*): Likewise.
5980 (x86_64-*-cygwin*): Likewise.
5981
5982 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5983
5984 * tdesc.c: Remove xml parameter.
5985
5986 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5987
5988 * server.c (get_features_xml): Remove cast.
5989 * tdesc.c (void target_desc::accept): Fill in function.
5990 (tdesc_get_features_xml): Remove old xml creation.
5991 (print_xml_feature::visit_pre): Add xml vistor.
5992 * tdesc.h (struct target_desc): Make xmltarget mutable.
5993 (tdesc_get_features_xml): Remove declaration.
5994
5995 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5996
5997 * tdesc.c (tdesc_architecture_name): Add new function.
5998 (tdesc_osabi_name): Likewise.
5999 (tdesc_get_features_xml): Use new functions.
6000
6001 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6002
6003 * tdesc.c (tdesc_create_flags): Remove.
6004 (tdesc_add_flag): Likewise.
6005 (tdesc_named_type): Likewise.
6006 (tdesc_create_union): Likewise.
6007 (tdesc_create_struct): Likewise.
6008 (tdesc_create_vector): Likewise.
6009 (tdesc_add_bitfield): Likewise.
6010 (tdesc_add_field): Likewise.
6011 (tdesc_set_struct_size): Likewise.
6012
6013 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6014
6015 * tdesc.c (~target_desc): Remove implictly deleted items.
6016 (init_target_desc): Iterate all features.
6017 (tdesc_get_features_xml): Use vector.
6018 (tdesc_create_feature): Create feature.
6019 * tdesc.h (tdesc_feature) Remove
6020 (target_desc): Add features.
6021
6022 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6023
6024 * Makefile.in: Add common/tdesc.c
6025 * tdesc.c (init_target_desc): init all reg_defs from register
6026 vector.
6027 (tdesc_create_reg): Create tdesc_reg.
6028 * tdesc.h (tdesc_feature): Add register vector.
6029
6030 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6031
6032 * tdesc.h (struct target_desc) <features>: Change type to
6033 std::vector<std::string>.
6034 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
6035 changes.
6036 (tdesc_get_features_xml): Likewise.
6037 (tdesc_create_feature): Likewise.
6038
6039 2018-03-26 Alan Hayward <alan.hayward@arm.com>
6040
6041 * regcache.c (find_register_by_number): Return a ref.
6042 (find_regno): Use references.
6043 (register_size): Likewise.
6044 (register_data): Likewise.
6045 * tdesc.c (target_desc::~target_desc): Remove free calls.
6046 (target_desc::operator==): Use std::vector compare.
6047 (init_target_desc): Use reference.
6048 (tdesc_create_reg): Use reg constructors.
6049 * tdesc.h (struct target_desc): Replace pointer with object.
6050
6051 2018-03-23 Alan Hayward <alan.hayward@arm.com>
6052
6053 * regcache.c (find_register_by_number): Make static.
6054 (find_regno): Use find_register_by_number
6055 * regcache.h (struct reg): Remove declaration.
6056
6057 2018-03-23 Alan Hayward <alan.hayward@arm.com>
6058
6059 * tdesc.c (target_desc::~target_desc): Move to here.
6060 (target_desc::operator==): Likewise.
6061 * tdesc.h (target_desc::~target_desc): Move from here.
6062 (target_desc::operator==): Likewise.
6063
6064 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
6065
6066 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
6067
6068 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6069
6070 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
6071 S390_TDESC_GS.
6072 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
6073 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
6074 and init_registers_s390_gs_linux64.
6075
6076 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6077
6078 * linux-s390-low.c (s390_fill_gs): Remove function.
6079 (s390_fill_gsbc): Remove function.
6080 (s390_regsets): Set fill functions for the guarded storage regsets
6081 to NULL.
6082
6083 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6084
6085 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
6086 the word size. Add comment.
6087 (s390_get_wordsize): New function.
6088 (s390_arch_setup): No longer select a temporary tdesc to fetch the
6089 pswm with it. Instead, use s390_get_wordsize to determine the
6090 word size first and derive the correct tdesc from that directly.
6091
6092 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
6093
6094 * Makefile.in: Include silent-rules.mk.
6095 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
6096 (COMPILE): Add ECHO_CXX.
6097 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
6098 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
6099 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
6100 (version-generated.c): Add ECHO_GEN.
6101 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
6102 (IPAGENT_COMPILE): Add ECHO_CXX.
6103 (%-generated.c): Add ECHO_REGDAT.
6104
6105 2018-03-14 Tom Tromey <tom@tromey.com>
6106
6107 PR cli/14977:
6108 * ax.c (ax_printf): Special case for NULL.
6109
6110 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6111
6112 * linux-low.c (linux_qxfer_libraries_svr4): Use
6113 xml_escape_text_append.
6114
6115 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6116
6117 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
6118
6119 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6120
6121 * server.c (handle_general_set): Remove unnecessary xstrdup.
6122
6123 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6124
6125 * server.c (parse_debug_format_options): Adjust to
6126 delim_string_to_char_ptr_vec changes.
6127 * thread-db.c (thread_db_load_search): Adjust to
6128 dirnames_to_char_ptr_vec changes.
6129
6130 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
6131
6132 * target.h (target_enable_btrace, target_disable_btrace)
6133 (target_read_btrace, target_read_btrace_conf): Turn macro into
6134 inline function. Throw error if target method is not defined.
6135 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
6136 check for btrace target method. Be prepared to handle exceptions
6137 from btrace target methods.
6138
6139 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6140
6141 * server.c (captured_main): Change order of error message printed
6142 when the current working directory cannot be found.
6143
6144 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6145
6146 * server.c: Include "filenames.h" and "pathstuff.h".
6147 (program_name): Delete variable.
6148 (program_path): New anonymous class.
6149 (get_exec_wrapper): Use "program_path" instead of
6150 "program_name".
6151 (handle_v_run): Likewise.
6152 (captured_main): Likewise.
6153 (process_serial_event): Likewise.
6154
6155 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6156
6157 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
6158 (OBJS): Add "pathstuff.o".
6159 * server.c (current_directory): New global variable.
6160 (captured_main): Initialize "current_directory".
6161
6162 2018-02-26 Alan Hayward <alan.hayward@arm.com>
6163
6164 * tdesc.c: Use common/tdesc.h.
6165 * tdesc.h: Likewise.
6166
6167 2018-02-20 Alan Hayward <alan.hayward@arm.com>
6168 Simon Marchi <simon.marchi@ericsson.com>
6169
6170 * Makefile.in: Switch order of make rules.
6171
6172 2018-02-19 Alan Hayward <alan.hayward@arm.com>
6173
6174 * Makefile.in: Add common directory in build.
6175 * configure.ac: Add common reference.
6176 * configure: Regenerate.
6177
6178 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6179
6180 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
6181 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
6182 * spu-low.c (spu_target_ops): Likewise.
6183 * win32-low.c (win32_target_ops): Likewise.
6184 * server.c (supported_btrace_packets): Report packets unconditionally.
6185 * target.h (target_ops) <supports_btrace>: Remove.
6186 (target_supports_btrace): Remove.
6187
6188 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6189
6190 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
6191 (handle_btrace_disable): Change return type to void. Use exceptions
6192 to report errors.
6193 (handle_btrace_general_set): Catch exception and copy message to
6194 return message.
6195
6196 2018-02-08 Tom Tromey <tom@tromey.com>
6197
6198 * linux-low.c (install_software_single_step_breakpoints): Use
6199 make_scoped_restore.
6200 * inferiors.c (make_cleanup_restore_current_thread): Remove.
6201 (do_restore_current_thread_cleanup): Remove.
6202 * gdbthread.h (make_cleanup_restore_current_thread): Don't
6203 declare.
6204
6205 2018-02-08 Tom Tromey <tom@tromey.com>
6206
6207 * mem-break.c (set_raw_breakpoint_at): Use
6208 gdb::unique_xmalloc_ptr.
6209
6210 2018-01-30 Pedro Alves <palves@redhat.com>
6211
6212 PR gdb/13211
6213 * target.c (target_terminal::terminal_state): Rename to ...
6214 (target_terminal::m_terminal_state): ... this.
6215
6216 2018-01-19 James Clarke <jrtc27@jrtc27.com>
6217
6218 * linux-low.c (handle_extended_wait): Surround call to
6219 thread_db_notice_clone with #ifdef USE_THREAD_DB.
6220
6221 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
6222
6223 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
6224 linux_ptrace_attach_fail_reason_string now returning an
6225 std::string.
6226 (linux_attach): Likewise.
6227 * thread-db.c (attach_thread): Likewise.
6228
6229 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
6230
6231 PR gdb/21559
6232 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
6233 checking for fs_base/gs_base fields in struct user_regs_struct.
6234 * configure: Regenerate.
6235
6236 2018-01-16 Yao Qi <yao.qi@linaro.org>
6237
6238 PR gdb/18749
6239 * linux-low.c (fetch_register): Call supply_register instead of
6240 error.
6241
6242 2018-01-08 Yao Qi <yao.qi@linaro.org>
6243 Simon Marchi <simon.marchi@ericsson.com>
6244
6245 * Makefile.in (OBS): Remove selftest.o.
6246 * configure.ac: Set srv_selftest_objs if $development is true.
6247 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
6248 * configure: Re-generated.
6249 * server.c (captured_main): Wrap variable selftest_filter with
6250 GDB_SELF_TEST.
6251
6252 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6253
6254 * server.c (parse_debug_format_options): Return std::string.
6255 (handle_monitor_command, captured_main): Adjust.
6256
6257 2018-01-05 Pedro Alves <palves@redhat.com>
6258
6259 PR gdb/18653
6260 * server.c (captured_main): Pass quiet=false to
6261 save_original_signals_state.
6262
6263 2018-01-01 Joel Brobecker <brobecker@adacore.com>
6264
6265 * gdbreplay.c (gdbreplay_version): Update copyright year in
6266 version message.
6267 * server.c (gdbserver_version): Likewise.
6268
6269 2017-12-08 Tom Tromey <tom@tromey.com>
6270
6271 * ax.c (ax_printf): Update.
6272
6273 2017-12-07 Yao Qi <yao.qi@linaro.org>
6274
6275 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
6276 aarch64_linux_read_description.
6277 * linux-amd64-ipa.c (idx2mask): New array.
6278 (get_ipa_tdesc): Move idx2mask out.
6279 (initialize_low_tracepoint): Initialize target descriptions.
6280 * linux-i386-ipa.c (idx2mask): New array.
6281 (get_ipa_tdesc): Move idx2mask out.
6282 (initialize_low_tracepoint): Initialize target descriptions.
6283
6284 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
6285
6286 * tdesc.c (struct tdesc_type): Change return type.
6287 (tdesc_add_flag): Change parameter type.
6288 (tdesc_add_bitfield): Likewise.
6289 (tdesc_add_field): Likewise.
6290 (tdesc_set_struct_size): Likewise.
6291
6292 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
6293
6294 * regcache.c (registers_to_string): Remove unused variable.
6295
6296 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6297
6298 * inferiors.c (for_each_inferior_with_data): Remove.
6299 * inferiors.h (for_each_inferior_with_data): Remove.
6300 * server.c (handle_qxfer_threads_worker): Change parameter type.
6301 (handle_qxfer_threads_proper): Use for_each_thread.
6302
6303 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6304
6305 * inferiors.c (for_each_inferior): Remove.
6306 (clear_inferiors): Use for_each_thread.
6307 * inferiors.h (for_each_inferior): Remove.
6308 * linux-low.c (linux_wait_for_event_filtered): Use
6309 for_each_thread.
6310 (linux_stabilize_threads): Likewise.
6311 * regcache.c (regcache_release): Likewise.
6312 * server.c (gdb_wants_all_threads_stopped): Likewise.
6313 (clear_pending_status_callback): Remove.
6314 (handle_status): Use for_each_thread.
6315 (captured_main): Likewise.
6316 * win32-low.c (child_init_thread_list): Likewise.
6317 (win32_clear_inferiors): Likewise.
6318 (fake_breakpoint_event): Likewise.
6319
6320 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6321
6322 * inferiors.h (find_inferior): Remove.
6323 * inferiors.c (find_inferior): Remove.
6324
6325 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6326
6327 * linux-low.c (resume_status_pending_p): Update comment.
6328 (need_step_over_p): Update comment.
6329
6330 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6331
6332 * linux-low.c (proceed_one_lwp): Return void, change parameter
6333 type.
6334 (unsuspend_and_proceed_one_lwp): Likewise.
6335 (proceed_all_lwps): Use for_each_thread.
6336 (unstop_all_lwps): Likewise.
6337
6338 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6339
6340 * linux-low.c (linux_resume_one_thread): Return void, take
6341 parameter directly.
6342 (linux_resume): Use for_each_thread.
6343
6344 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6345
6346 * linux-low.c (send_sigstop_callback): Return void, change
6347 parameter type. Rename to...
6348 (send_sigstop): ... this.
6349 (suspend_and_send_sigstop_callback): Return void, change parameter
6350 type. Rename to...
6351 (suspend_and_send_sigstop): ... this.
6352 (stop_all_lwps): Use for_each_thread.
6353
6354 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6355
6356 * linux-low.c (lwp_running): Return bool, remove unused
6357 argument.
6358 (linux_stabilize_threads): Use find_thread.
6359
6360 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6361
6362 * linux-low.c (select_singlestep_lwp_callback): Remove.
6363 (count_events_callback): Remove.
6364 (select_event_lwp_callback): Remove.
6365 (select_event_lwp): Use find_thread/for_each_thread.
6366
6367 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6368
6369 * linux-low.c (not_stopped_callback): Return bool, take filter
6370 argument directly.
6371 (linux_wait_for_event_filtered): Use find_thread.
6372 (linux_wait_1): Likewise.
6373
6374 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6375
6376 * linux-low.c (same_lwp): Remove.
6377 (find_lwp_pid): Use find_thread.
6378
6379 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6380
6381 * linux-low.c (delete_lwp_callback): Remove.
6382 (linux_mourn): Use for_each_thread.
6383
6384 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6385
6386 * linux-low.c (linux_detach_lwp_callback): Return void, remove
6387 args parameter, don't check for pid.
6388 (linux_detach): Use for_each_thread.
6389
6390 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6391
6392 * linux-low.c (struct counter): Remove.
6393 (second_thread_of_pid_p): Remove.
6394 (last_thread_of_process_p): Use find_thread.
6395
6396 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6397
6398 * inferiors.c (find_inferior_in_random): Remove.
6399 * inferiors.h (find_inferior_in_random): Remove.
6400 * linux-low.c (status_pending_p_callback): Return bool, accept
6401 parameter ptid directly.
6402 (linux_wait_for_event_filtered): Use find_thread_in_random.
6403 (linux_wait_1): Likewise.
6404
6405 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6406
6407 * inferiors.c (find_inferior_id): Remove.
6408 (find_thread_ptid): Move implemention from find_inferior_id to
6409 here.
6410 * inferiors.h (find_inferior_id): Remove.
6411 * server.c (handle_status): Use find_thread_ptid.
6412 (process_serial_event): Likewise.
6413 * thread-db.c (find_one_thread): Likewise.
6414 (thread_db_thread_handle): Likewise.
6415 * win32-low.c (thread_rec): Likewise.
6416 (child_delete_thread): Likewise.
6417 (win32_thread_alive): Likewise.
6418 (get_child_debug_event): Likewise.
6419
6420 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6421
6422 * linux-mips-low.c (update_watch_registers_callback): Return
6423 void, remove pid_p parameter, don't check for pid.
6424 (mips_insert_point, mips_remove_point): Use for_each_thread.
6425
6426 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6427
6428 * lynx.low (lynx_delete_thread_callback): Remove.
6429 (lynx_mourn): Use for_each_thread.
6430
6431 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6432
6433 * regcache.c (regcache_invalidate_one): Remove.
6434 (regcache_invalidate_pid): use for_each_thread.
6435
6436 2017-11-26 Tom Tromey <tom@tromey.com>
6437
6438 * linux-low.c (linux_create_inferior): Update.
6439
6440 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
6441
6442 * spu-low.c (spu_create_inferior): Fix typo in argument name.
6443
6444 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6445
6446 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
6447 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6448 * linux-aarch64-tdesc-selftest.c: New file.
6449 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6450
6451 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6452
6453 * configure.srv: Add new file.
6454 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6455 * linux-aarch64-tdesc-selftest.c: New file.
6456 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6457
6458 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6459
6460 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
6461 * linux-aarch64-low.c (initialize_low_arch): Remove init.
6462 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
6463
6464 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6465
6466 * configure.srv: Add new files.
6467 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
6468 aarch64_linux_read_description.
6469 * linux-aarch64-low.c (aarch64_linux_read_description):
6470 Merge with aarch64_arch_setup.
6471 (aarch64_arch_setup): Call aarch64_linux_read_description.
6472 * linux-aarch64-tdesc.c: New file.
6473 * linux-aarch64-tdesc.h: New file.
6474
6475 2017-11-24 Yao Qi <yao.qi@linaro.org>
6476
6477 * configure.srv: Set $srv_regobj for tic6x-linux.
6478 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
6479 (tic6x_read_description): Move some code to tic6x_arch_setup.
6480 (tic6x_tdesc_test): New function.
6481 (initialize_low_arch): Call selftests::register_test.
6482
6483 2017-11-22 Yao Qi <yao.qi@linaro.org>
6484
6485 * remote-utils.c (prepare_resume_reply): Use memcpy.
6486
6487 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6488
6489 * linux-low.c (kill_one_lwp_callback): Return void, take
6490 argument directly, don't filter on pid.
6491 (linux_kill): Use for_each_thread.
6492
6493 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6494
6495 * linux-low.c (need_step_over_p): Return bool, remove dummy
6496 argument.
6497 (linux_resume, proceed_all_lwps): Use find_thread.
6498
6499 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6500
6501 * linux-low.c (resume_status_pending_p): Return bool, remove
6502 flag_p argument.
6503 (linux_resume): Use find_thread.
6504
6505 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6506
6507 * linux-low.c (struct thread_resume_array): Remove.
6508 (linux_set_resume_request): Return void, take arguments
6509 directly.
6510 (linux_resume): Use for_each_thread.
6511
6512 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6513
6514 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
6515 return bool, remove data argument.
6516 (linux_stabilize_threads): Use find_thread.
6517
6518 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6519
6520 * linux-low.c (unsuspend_one_lwp): Remove.
6521 (unsuspend_all_lwps): Use for_each_thread, inline code from
6522 unsuspend_one_lwp.
6523
6524 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6525
6526 * gdbthread.h (find_thread): Add overload with ptid_t filter.
6527 * linux-low.c (struct iterate_over_lwps_args): Remove.
6528 (iterate_over_lwps_filter): Remove.
6529 (iterate_over_lwps): Use find_thread.
6530
6531 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6532
6533 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
6534 (linux_handle_new_gdb_connection): Use for_each_thread, inline
6535 code from reset_lwp_ptrace_options_callback.
6536
6537 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6538
6539 * linux-arm-low.c (struct update_registers_data): Remove.
6540 (update_registers_callback): Return void, take arguments
6541 directly, don't check thread's pid.
6542 (arm_insert_point, arm_remove_point): Use for_each_thread.
6543
6544 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6545
6546 * win32-low.c (continue_one_thread): Return void, take argument
6547 directly.
6548 (child_continue): Use for_each_thread.
6549
6550 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6551
6552 * win32-i386-low.c (update_debug_registers_callback): Rename
6553 to ...
6554 (update_debug_registers): ... this, return void, remove pid_p arg.
6555 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
6556
6557 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6558
6559 * inferiors.h (struct process_info): Add constructor, initialize
6560 fields..
6561 <syscalls_to_catch>: Change type to std::vector<int>.
6562 * inferiors.c (add_process): Allocate process_info with new.
6563 (remove_process): Free process_info with delete.
6564 * linux-low.c (handle_extended_wait): Adjust.
6565 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
6566 * server.c (handle_general_set): Adjust.
6567
6568 2017-11-16 Pedro Alves <palves@redhat.com>
6569
6570 * remote-utils.c (remote_close): Block SIGIO signals instead of
6571 uninstalling the SIGIO handler.
6572
6573 2017-11-16 Alan Hayward <alan.hayward@arm.com>
6574
6575 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
6576
6577 2017-11-16 Yao Qi <yao.qi@linaro.org>
6578
6579 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
6580 (tic6x_store_gregset): Likewise.
6581 (tic6x_usrregs_info): Move it up.
6582
6583 2017-11-15 Alan Hayward <alan.hayward@arm.com>
6584
6585 * Makefile.in: Update arch rules.
6586 * configure.srv: Explicitly mark arch/ files.
6587
6588 2017-11-13 Andreas Schwab <schwab@suse.de>
6589
6590 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
6591 function.
6592 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6593
6594 2017-11-06 Pedro Alves <palves@redhat.com>
6595
6596 * config.in, configure: Regenerate.
6597
6598 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6599
6600 * target.c (struct thread_search): Remove.
6601 (thread_search_callback): Remove.
6602 (prepare_to_access_memory): Use for_each_thread instead of
6603 find_inferior. Inline code from thread_search_callback.
6604
6605 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6606
6607 * server.c (struct visit_actioned_threads_data): Remove.
6608 (visit_actioned_threads): Change prototype to take arguments
6609 directly.
6610 (resume): Use find_thread instead of find_inferior.
6611
6612 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6613
6614 * server.c (queue_stop_reply_callback): Change prototype, return
6615 void.
6616 (find_status_pending_thread_callback): Remove.
6617 (handle_status): Replace find_inferior with find_thread and
6618 for_each_thread.
6619
6620 2017-10-25 Alan Hayward <alan.hayward@arm.com>
6621
6622 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
6623 with REGNO.
6624 (aarch64_store_gregset): Likewise.
6625 (aarch64_fill_fpregset): Likewise.
6626 (aarch64_store_fpregset): Likewise.
6627
6628 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
6629
6630 * gdbthread.h (find_thread, for_each_thread): New functions.
6631 * inferiors.c (thread_of_pid): Remove.
6632 (find_any_thread_of_pid): Use find_thread.
6633 * linux-low.c (num_lwps): Use for_each_thread.
6634
6635 2017-10-17 Yao Qi <yao.qi@linaro.org>
6636
6637 * Makefile.in: Remove one rule.
6638 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
6639
6640 2017-10-17 Yao Qi <yao.qi@linaro.org>
6641
6642 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
6643 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
6644
6645 2017-10-17 Yao Qi <yao.qi@linaro.org>
6646
6647 * configure.srv: Rename arm.o with arch/arm.o.
6648
6649 2017-10-17 Yao Qi <yao.qi@linaro.org>
6650
6651 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
6652 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
6653 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
6654 (arch-i386.o, arch-amd64.o): Remove rules.
6655 (arch/%.o): New rule.
6656 Update POSTCOMPILE and COMPILE.pre.
6657 * configure.ac: Invoke AC_CONFIG_COMMANDS.
6658 * configure: Re-generated.
6659 * configure.srv: Replace arch-i386.o with arch/i386.o.
6660 Replace arch-amd64.o with arch/amd64.o.
6661
6662 2017-10-16 Yao Qi <yao.qi@linaro.org>
6663
6664 * configure: Regenerated.
6665
6666 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6667
6668 * inferiors.h: (struct inferior_list): Remove.
6669 (struct inferior_list_entry); Remove.
6670 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
6671 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
6672 get_first_inferior): Remove.
6673 (for_each_inferior, for_each_inferior_with_data, find_inferior,
6674 find_inferior_id, find_inferior_in_random): Change signature.
6675 * inferiors.c (all_threads): Change type to
6676 std::list<thread_info *>.
6677 (get_thread): Remove macro.
6678 (find_inferior, find_inferior_id): Change signature, implement
6679 using find_thread.
6680 (find_inferior_in_random): Change signature, implement using
6681 find_thread_in_random.
6682 (for_each_inferior, for_each_inferior_with_data): Change
6683 signature, implement using for_each_thread.
6684 (add_inferior_to_list, remove_inferior): Remove.
6685 (add_thread, get_first_thread, thread_of_pid,
6686 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
6687 (get_first_inferior, one_inferior_p, clear_inferior_list):
6688 Remove.
6689 (clear_inferiors, get_thread_process): Update.
6690 * gdbthread.h: Include <list>.
6691 (struct thread_info) <entry>: Remove field.
6692 <id>: New field.
6693 (all_threads): Change type to std::list<thread_info *>.
6694 (get_first_inferior): Add doc.
6695 (find_thread, for_each_thread, find_thread_in_random): New
6696 functions.
6697 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
6698 * linux-arm-low.c (update_registers_callback): Update.
6699 * linux-low.c (second_thread_of_pid_p): Update.
6700 (kill_one_lwp_callback, linux_detach_lwp_callback,
6701 delete_lwp_callback, status_pending_p_callback, same_lwp,
6702 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
6703 iterate_over_lwps, not_stopped_callback,
6704 resume_stopped_resumed_lwps, count_events_callback,
6705 select_singlestep_lwp_callback, select_event_lwp_callback,
6706 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
6707 suspend_and_send_sigstop_callback, wait_for_sigstop,
6708 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
6709 lwp_running, linux_set_resume_request, resume_status_pending_p,
6710 need_step_over_p, start_step_over, linux_resume_one_thread,
6711 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
6712 reset_lwp_ptrace_options_callback): Update.
6713 * linux-mips-low.c (update_watch_registers_callback): Update.
6714 * regcache.c (regcache_invalidate_one, regcache_invalidate):
6715 Update.
6716 (free_register_cache_thread_one): Remove.
6717 (regcache_release): Update.
6718 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
6719 handle_qxfer_threads_worker): Update.
6720 (handle_query): Update, use list iterator.
6721 (visit_actioned_threads, handle_pending_status,
6722 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
6723 clear_pending_status_callback, set_pending_status_callback,
6724 find_status_pending_thread_callback, handle_status,
6725 process_serial_event): Update.
6726 * target.c (thread_search_callback): Update.
6727 * thread-db.c (thread_db_get_tls_address): Update.
6728 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
6729 Update.
6730 * win32-i386-low.c (update_debug_registers_callback): Update.
6731 * win32-low.c (delete_thread_info, child_delete_thread,
6732 continue_one_thread, suspend_one_thread,
6733 get_child_debug_event): Adjust.
6734
6735 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6736
6737 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
6738 * inferiors.h: Include <list>.
6739 (struct process_info) <entry>: Remove field.
6740 <pid>: New field.
6741 (pid_of): Change macro to function.
6742 (ptid_of, lwpid_of): Remove macro.
6743 (all_processes): Change type to std::list<process_info *>.
6744 (ALL_PROCESSES): Remove macro.
6745 (for_each_process, find_process): New function.
6746 * inferiors.c (all_processes): Change type to
6747 std::list<process_info *>.
6748 (find_thread_process): Adjust.
6749 (add_process): Likewise.
6750 (remove_process): Likewise.
6751 (find_process_pid): Likewise.
6752 (get_first_process): Likewise.
6753 (started_inferior_callback): Remove.
6754 (have_started_inferiors_p): Adjust.
6755 (attached_inferior_callback): Remove.
6756 (have_attached_inferiors_p): Adjust.
6757 * linux-low.c (check_zombie_leaders): Likewise.
6758 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
6759 (x86_linux_update_xmltarget): Adjust.
6760 * server.c (handle_query): Likewise.
6761 (gdb_reattached_process): Remove.
6762 (handle_status): Adjust.
6763 (kill_inferior_callback): Likewise.
6764 (detach_or_kill_inferior): Remove.
6765 (print_started_pid): Likewise.
6766 (print_attached_pid): Likewise.
6767 (detach_or_kill_for_exit): Update.
6768 (process_serial_event): Likewise.
6769 * linux-arm-low.c (arm_new_fork): Likewise.
6770
6771 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6772
6773 * dll.h: Include <list>.
6774 (struct dll_info): Add constructor.
6775 <entry>: Remove field.
6776 (all_dlls): Change type to std::list<dll_info>.
6777 * dll.c: Include <algorithm>.
6778 (get_dll): Remove macro.
6779 (all_dlls): Change type to std::list<dll_info *>.
6780 (free_one_dll): Remove.
6781 (match_dll): Likewise.
6782 (loaded_dll): Adjust.
6783 (unloaded_dll): Adjust to all_dlls type change, use
6784 std::find_if. Inline code from match_dll.
6785 (clear_dlls): Adjust to all_dlls type change.
6786 * server.c (emit_dll_description): Remove.
6787 (handle_qxfer_libraries): Adjust to all_dlls type change,
6788 integrate emit_dll_description's functionality.
6789
6790 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6791
6792 * linux-low.h (struct linux_target_ops) <delete_process>: New
6793 field.
6794 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
6795 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
6796 (struct linux_target_ops): Add delete_process callback.
6797 * linux-arm-low.c (arm_delete_process): New.
6798 (struct linux_target_ops): Add delete_process callback.
6799 * linux-bfin-low.c (struct linux_target_ops): Likewise.
6800 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
6801 * linux-m32r-low.c (struct linux_target_ops): Likewise.
6802 * linux-mips-low.c (mips_linux_delete_process): New.
6803 (struct linux_target_ops): Add delete_process callback.
6804 * linux-ppc-low.c (struct linux_target_ops): Likewise.
6805 * linux-s390-low.c (struct linux_target_ops): Likewise.
6806 * linux-sh-low.c (struct linux_target_ops): Likewise.
6807 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
6808 * linux-tile-low.c (struct linux_target_ops): Likewise.
6809 * linux-x86-low.c (x86_linux_delete_process): New.
6810 (struct linux_target_ops): Add delete_process callback.
6811 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
6812
6813 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6814
6815 * linux-aarch64-low.c (the_low_target): Add thread delete
6816 callback.
6817 * linux-arm-low.c (arm_delete_thread): New function.
6818 (the_low_target): Add thread delete callback.
6819 * linux-bfin-low.c (the_low_target): Likewise.
6820 * linux-crisv32-low.c (the_low_target): Likewise.
6821 * linux-low.c (delete_lwp): Invoke delete_thread callback if
6822 set.
6823 * linux-low.h (struct linux_target_ops) <delete_thread>: New
6824 field.
6825 * linux-m32r-low.c (the_low_target): Add thread delete callback.
6826 * linux-mips-low.c (mips_linux_delete_thread): New function.
6827 (the_low_target): Add thread delete callback.
6828 * linux-ppc-low.c (the_low_target): Likewise.
6829 * linux-s390-low.c (the_low_target): Likewise.
6830 * linux-sh-low.c (the_low_target): Likewise.
6831 * linux-tic6x-low.c (the_low_target): Likewise.
6832 * linux-tile-low.c (the_low_target): Likewise.
6833 * linux-x86-low.c (the_low_target): Likewise.
6834 * linux-xtensa-low.c (the_low_target): Likewise.
6835
6836 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
6837
6838 * win32-low.c: Include "common-inferior.h".
6839
6840 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6841
6842 * inferiors.c (set_inferior_cwd): New function.
6843 * server.c (handle_general_set): Handle QSetWorkingDir packet.
6844 (handle_query): Inform that QSetWorkingDir is supported.
6845 * win32-low.c (create_process): Pass the inferior's cwd to
6846 CreateProcess.
6847
6848 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6849
6850 * inferiors.c (current_inferior_cwd): New global variable.
6851 (get_inferior_cwd): New function.
6852 * inferiors.h (struct process_info) <cwd>: New field.
6853
6854 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6855
6856 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
6857 (OBS): Add gdb_tilde_expand.o.
6858
6859 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
6860
6861 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
6862 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
6863
6864 2017-09-29 Pedro Alves <palves@redhat.com>
6865
6866 * ax.c (gdb_parse_agent_expr): Constify.
6867 * ax.h (gdb_parse_agent_expr): Constify.
6868 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6869 Constify.
6870 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
6871 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
6872 * remote-utils.h (read_ptid): Constify.
6873 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
6874 (process_point_options, process_serial_event): Constify.
6875 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
6876 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
6877 (cmd_qtbuffer): Constify.
6878
6879 2017-09-29 Pedro Alves <palves@redhat.com>
6880
6881 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
6882 fails.
6883
6884 2017-09-29 Pedro Alves <palves@redhat.com>
6885
6886 * linux-low.c (handle_extended_wait): Pass parent thread instead
6887 of process to thread_db_notice_clone.
6888 * linux-low.h (thread_db_notice_clone): Replace parent process
6889 parameter with parent thread parameter.
6890 * thread-db.c (find_one_thread): Add comment.
6891 (thread_db_notice_clone): Replace parent process parameter with
6892 parent thread parameter. Temporarily switch to the parent thread.
6893
6894 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
6895
6896 * gdbthread.h: Include "common-gdbthread.h".
6897 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
6898 "if" when validating the ptid.
6899 * remote-utils.c: Include "gdbthread.h".
6900 (prepare_resume_reply): Use "switch_to_thread".
6901 * target.c (done_accessing_memory): Likewise.
6902
6903 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6904
6905 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
6906 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
6907 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
6908 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
6909 s390x-gs-linux64-ipa.o to ipa_obj.
6910 * linux-s390-low.c (HWCAP_S390_GS): New define.
6911 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
6912 New functions.
6913 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
6914 (s390_arch_setup): Check for guarded-storage support and choose
6915 appropriate tdesc.
6916 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
6917 init_registers_s390x_gs_linux64.
6918 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
6919 enum value.
6920 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
6921 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
6922
6923 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
6924
6925 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
6926
6927 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6928
6929 * linux-low.h (struct lwp_info): Add new field, thread_handle.
6930 (thread_db_thread_handle): Declare.
6931 * linux-low.c (linux_target_ops): Initialize thread_handle.
6932 * server.c (handle_qxfer_threads_worker): Add support for
6933 "handle" attribute.
6934 * target.h (struct target_ops): Add new function pointer,
6935 thread_handle.
6936 (target_thread_handle): Define.
6937 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
6938 field in lwp.
6939 (thread_db_thread_handle): New function.
6940
6941 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6942
6943 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
6944 * linux-low.h (thread_db_notice_clone): Declare.
6945 * thread-db.c (thread_db_notice_clone): New function.
6946
6947 2017-09-21 Pedro Alves <palves@redhat.com>
6948
6949 * server.c (gdb_read_memory, handle_status, process_serial_event)
6950 (handle_serial_event, handle_target_event): Adjust to
6951 set_desired_thread prototype change.
6952 * target.c (set_desired_thread): Remove 'use_general' parameter
6953 and adjust.
6954 * target.h (set_desired_thread): Remove 'use_general' parameter.
6955
6956 2017-09-20 Tom Tromey <tom@tromey.com>
6957
6958 * target.c (target_terminal::terminal_state): Define.
6959 (target_terminal::init): Rename from target_terminal_init.
6960 (target_terminal::inferior): Rename from
6961 target_terminal_inferior.
6962 (target_terminal::ours): Rename from target_terminal_ours.
6963 (target_terminal::ours_for_output, target_terminal::info): New.
6964
6965 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6966
6967 * server.c (accumulate_file_name_length): Remove.
6968 (emit_dll_description): Adjust to std::string change.
6969 (handle_qxfer_libraries): Use std::string to hold document.
6970
6971 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6972
6973 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
6974 return type of xml_escape_text.
6975 * server.c (emit_dll_description): Likewise.
6976
6977 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6978
6979 * server.c (captured_main): Accept argument for --selftest.
6980 Update run_tests call.
6981 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
6982 when registering selftests.
6983
6984 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
6985
6986 * regcache.c (get_thread_regcache): Update code to use "std::vector"
6987 instead of "VEC" for "target_desc.reg_defs".
6988 (regcache_cpy): Likewise.
6989 (registers_to_string): Likewise.
6990 (registers_from_string): Likewise.
6991 (find_regno): Likewise.
6992 (supply_regblock): Likewise.
6993 (regcache_raw_read_unsigned): Likewise.
6994 * tdesc.c (init_target_desc): Likewise.
6995 (tdesc_create_reg): Likewise.
6996 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
6997 (struct target_desc) <reg_defs>: Convert to "std::vector".
6998 (target_desc): Do not initialize "reg_defs".
6999 (~target_desc): Update code to use "std::vector" instead of "VEC"
7000 for "target_desc.reg_defs".
7001 (operator==): Likewise.
7002
7003 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7004
7005 * inferiors.h (thread_to_gdb_id): Remove.
7006 * inferiors.c (thread_to_gdb_id): Remove.
7007 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
7008 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
7009 lynx_store_registers, lynx_read_memory, lynx_write_memory):
7010 Likewise.
7011 * nto-low.c (nto_fetch_registers, nto_store_registers,
7012 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
7013
7014 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7015
7016 * inferiors.h (gdb_id_to_thread_id): Remove.
7017 * inferiors.c (gdb_id_to_thread_id): Remove.
7018 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
7019 removal. Move pid declaration closer to where it's used.
7020
7021 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7022
7023 * server.c (handle_detach): New function.
7024 (process_serial_event): Move code out, call handle_detach.
7025
7026 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7027
7028 * server.c (require_running): Rename to ...
7029 (require_running_or_return): ... this ...
7030 (require_running_or_break): ... and this.
7031 (handle_query, process_serial_event): Adjust.
7032
7033 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7034
7035 * linux-low.c (linux_set_resume_request): Remove unused
7036 variables.
7037
7038 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7039
7040 * server.c (first_thread_of): Remove.
7041 (process_serial_event): Replace usage of first_thread_of with
7042 find_any_thread_of_pid.
7043 * tracepoint.c (same_process_p): Remove.
7044 (gdb_agent_about_to_close): Replace usage of same_process_p with
7045 find_any_thread_of_pid.
7046 * linux-x86-low.c (same_process_callback): Remove.
7047 (x86_arch_setup_process_callback): Replace usage of
7048 same_process_callback with find_any_thread_of_pid.
7049 * thread-db.c (any_thread_of): Remove.
7050 (switch_to_process): Replace usage of any_thread_of with
7051 find_any_thread_of_pid.
7052 * inferiors.c (thread_pid_matches_callback): Remove.
7053 (find_thread_process): Adjust to use find_any_thread_of_pid.
7054
7055 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
7056
7057 * regcache.c (get_thread_regcache): Guard calls to "memset"
7058 with "!VEC_empty".
7059
7060 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
7061
7062 * linux-low.c (handle_extended_wait): Use
7063 "allocate_target_description" instead of "XNEW".
7064 * linux-x86-low.c (initialize_low_arch): Likewise.
7065
7066 2017-09-05 Yao Qi <yao.qi@linaro.org>
7067
7068 * configure.srv (srv_i386_regobj): Remove.
7069 (srv_amd64_regobj): Remove.
7070 (srv_regobj): Set it to "" for x86 non-linux targets.
7071 * linux-x86-tdesc.c (i386_linux_read_description):
7072 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
7073 (init_registers_i386): Remove the declaration.
7074 (tdesc_i386): Remove the declaration.
7075 (lynx_i386_arch_setup): Call i386_create_target_description.
7076 * nto-x86-low.c: Likewise.
7077 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
7078 [!__x86_64__]: include arch/i386.h.
7079 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
7080
7081 2017-09-05 Yao Qi <yao.qi@linaro.org>
7082
7083 * configure.srv (srv_amd64_linux_xmlfiles): Remove
7084 i386/amd64-XXX-linux from it.
7085
7086 2017-09-05 Yao Qi <yao.qi@linaro.org>
7087
7088 * configure.srv: Empty srv_amd64_linux_regobj if $development is
7089 false.
7090 (ipa_amd64_linux_regobj): Remove.
7091 (ipa_x32_linux_regobj): Remove.
7092
7093 2017-09-05 Yao Qi <yao.qi@linaro.org>
7094
7095 * Makefile.in (arch-amd64.o): New rule.
7096 * configure.srv: Append arch-amd64.o.
7097 * linux-amd64-ipa.c: Include common/x86-xstate.h.
7098 (get_ipa_tdesc): Call amd64_linux_read_description.
7099 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
7100 and init_registers_amd64_XXX.
7101 * linux-x86-low.c (x86_linux_read_description): Call
7102 amd64_linux_read_description.
7103 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
7104 (initialize_low_arch): Don't call init_registers_x32_XXX and
7105 init_registers_amd64_XXX.
7106 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
7107 and tdesc_amd64_XXX.
7108 [__x86_64__] (amd64_tdesc_test): New function.
7109 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
7110 and init_registers_amd64_XXX.
7111 * linux-x86-tdesc.c: Include arch/amd64.h.
7112 (xcr0_to_tdesc_idx): New function.
7113 (i386_linux_read_description): New function.
7114 (amd64_get_ipa_tdesc_idx): New function.
7115 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
7116 (amd64_get_ipa_tdesc): Declare.
7117
7118 2017-09-05 Yao Qi <yao.qi@linaro.org>
7119
7120 * configure.srv (srv_i386_linux_xmlfiles): Remove
7121 i386/i386-XXX-linux.xml from it.
7122
7123 2017-09-05 Yao Qi <yao.qi@linaro.org>
7124
7125 * configure.srv: Set srv_i386_linux_regobj empty if $development
7126 is false.
7127 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
7128 initialize_low_tdesc.
7129 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
7130 with #if initialize_low_tdesc.
7131 * linux-x86-tdesc-selftest.c: New file.
7132 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
7133
7134 2017-09-05 Yao Qi <yao.qi@linaro.org>
7135
7136 * Makefile.in (arch-i386.o): New rule.
7137 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
7138 (x86_64-*-linux*): Likewise.
7139 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
7140 include arch/i386.h.
7141 (i386_linux_read_description): Remove code and call
7142 i386_create_target_description.
7143 * tdesc.c (allocate_target_description): New function.
7144 * tdesc.h (set_tdesc_architecture): Remove declaration.
7145 (set_tdesc_osabi): Likewise.
7146
7147 2017-09-05 Yao Qi <yao.qi@linaro.org>
7148
7149 * linux-x86-tdesc.c: Don't include <inttypes.h>.
7150 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
7151 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
7152 .xmltarget.
7153 * server.c (get_features_xml): Call tdesc_get_features_xml.
7154 * tdesc.c (set_tdesc_architecture): New function.
7155 (set_tdesc_osabi): New function.
7156 (tdesc_get_features_xml): New function.
7157 (tdesc_create_feature): Add an argument.
7158 * tdesc.h (struct target_desc) <features>: New field.
7159 <arch, osabi>: New field.
7160 (~target_desc): xfree features, arch, and osabi.
7161 (target_desc::oerator==): Don't compare .xmltarget.
7162 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
7163 (set_tdesc_osabi): Likewise.
7164 (tdesc_get_features_xml): Likewise.
7165
7166 2017-09-05 Yao Qi <yao.qi@linaro.org>
7167
7168 * linux-x86-tdesc.c: Include selftest.h.
7169 (i386_tdesc_test): New function.
7170 (initialize_low_tdesc): Call selftests::register_test.
7171 * tdesc.h: Include regdef.h.
7172 (target_desc): Override operator == and !=.
7173
7174 2017-09-05 Yao Qi <yao.qi@linaro.org>
7175
7176 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
7177 (ipa_obj): Likewise.
7178 * linux-i386-ipa.c: Include common/x86-xstate.h
7179 (get_ipa_tdesc): Call i386_linux_read_description.
7180 (initialize_low_tracepoint): Don't call init_registers_XXX
7181 functions, call initialize_low_tdesc instead.
7182 * linux-x86-low.c (x86_linux_read_description): Call
7183 i386_linux_read_description.
7184 (initialize_low_arch): Don't call init_registers_i386_XXX
7185 functions, call initialize_low_tdesc.
7186 * linux-x86-tdesc.c: New file.
7187 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
7188 (i386_get_ipa_tdesc_idx): Declare.
7189 (i386_get_ipa_tdesc): Declare.
7190 (initialize_low_tdesc): Declare.
7191
7192 2017-09-05 Yao Qi <yao.qi@linaro.org>
7193
7194 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
7195 instead of 0.
7196
7197 2017-09-05 Yao Qi <yao.qi@linaro.org>
7198
7199 * Makefile.in (IPA_OBJS): Add vec-ipa.o
7200 * regcache.c (get_thread_regcache): Use VEC_length.
7201 (init_register_cache): Likewise.
7202 (regcache_cpy): Likewise.
7203 (registers_to_string): Iterate reg_defs via VEC_iterate.
7204 (find_regno): Likewise.
7205 (find_register_by_number): Use VEC_index.
7206 (register_size): Call find_register_by_number.
7207 (register_data): Call find_register_by_number.
7208 (supply_regblock): Use VEC_length.
7209 (regcache_raw_read_unsigned): Likewise.
7210 * tdesc.c (init_target_desc): Iterate reg_defs via
7211 VEC_iterate.
7212 (default_description): Update initializer.
7213 (copy_target_description): Don't update field num_registers.
7214 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
7215 <num_registers>: Remove.
7216
7217 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7218
7219 * Makefile.in (.SECONDARY): Define target.
7220
7221 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
7222
7223 * linux-low.c (linux_wait_1): Adjust.
7224 * server.c (queue_stop_reply_callback): Adjust.
7225
7226 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7227
7228 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
7229 QEnvironmentUnset and QEnvironmentReset packets.
7230 (handle_query): Inform remote that QEnvironmentHexEncoded,
7231 QEnvironmentUnset and QEnvironmentReset are supported.
7232
7233 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
7234
7235 * inferiors.h (inferior_target_data): Rename to ...
7236 (thread_target_data): ... this.
7237 (inferior_regcache_data): Rename to ...
7238 (thread_regcache_data): ... this.
7239 (set_inferior_regcache_data): Rename to ...
7240 (set_thread_regcache_data): ... this.
7241 * inferiors.c (inferior_target_data): Rename to ...
7242 (thread_target_data): ... this.
7243 (inferior_regcache_data): Rename to ...
7244 (thread_regcache_data): ... this.
7245 (set_inferior_regcache_data): Rename to ...
7246 (set_thread_regcache_data): ... this.
7247 (free_one_thread): Update.
7248 * linux-low.h (get_thread_lwp): Update.
7249 * regcache.c (get_thread_regcache): Update.
7250 (regcache_invalidate_thread): Update.
7251 (free_register_cache_thread): Update.
7252 * win32-i386-low.c (update_debug_registers_callback): Update.
7253 (win32_get_current_dr): Update.
7254 * win32-low.c (thread_rec): Update.
7255 (delete_thread_info): Update.
7256 (continue_one_thread): Update.
7257 (suspend_one_thread): Update.
7258
7259 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
7260
7261 * inferiors.c (set_inferior_target_data): Remove.
7262 * inferiors.h (set_inferior_target_data): Remove.
7263
7264 2017-08-18 Yao Qi <yao.qi@linaro.org>
7265
7266 * Makefile.in (OBS): Add selftest.o.
7267 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
7268 * configure, config.in: Re-generated.
7269 * server.c: Include common/sefltest.h.
7270 (captured_main): Handle option --selftest.
7271
7272 2017-08-09 Yao Qi <yao.qi@linaro.org>
7273
7274 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
7275 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
7276 i386-avx-mpx.o and i386-mmx.o.
7277 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
7278 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
7279 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
7280 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
7281 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
7282 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
7283 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
7284 i386/amd64-avx-mpx.xml.
7285
7286 2017-08-09 Yao Qi <yao.qi@linaro.org>
7287
7288 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
7289 and x32-avx-avx512.o.
7290 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
7291 i386/x32-avx-avx512.xml.
7292
7293 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
7294
7295 * tracepoint.h (enum class fast_tpoint_collect_result): New
7296 enumeration.
7297 (fast_tracepoint_collecting): Change return type to
7298 fast_tpoint_collect_result.
7299 * tracepoint.c (fast_tracepoint_collecting): Likewise.
7300 * linux-low.h: Include tracepoint.h.
7301 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
7302 fast_tpoint_collect_result.
7303 * linux-low.c (handle_tracepoints): Adjust.
7304 (linux_fast_tracepoint_collecting): Change return type to
7305 fast_tpoint_collect_result.
7306 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
7307 linux_wait_1, stuck_in_jump_pad_callback,
7308 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
7309 proceed_one_lwp): Adjust to type change.
7310
7311 2017-07-10 Yao Qi <yao.qi@linaro.org>
7312
7313 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
7314
7315 2017-06-29 Yao Qi <yao.qi@linaro.org>
7316
7317 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
7318 Remove.
7319 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
7320
7321 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
7322
7323 * Makefile.in (IPA_OBJS): Sort and format one item per line.
7324
7325 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
7326
7327 * linux-low.c (linux_create_inferior): Adjust code to access the
7328 environment information via 'gdb_environ' class.
7329 * lynx-low.c (lynx_create_inferior): Likewise.
7330 * server.c (our_environ): Make it an instance of 'gdb_environ'.
7331 (get_environ): Return a pointer to 'our_environ'.
7332 (captured_main): Initialize 'our_environ'.
7333 * server.h (get_environ): Adjust prototype.
7334 * spu-low.c (spu_create_inferior): Adjust code to access the
7335 environment information via 'gdb_environ' class.
7336
7337 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7338
7339 * linux-low.c (linux_read_memory, linux_write_memory): Remove
7340 usage of "register" keyword.
7341
7342 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7343
7344 * configure: Re-generate.
7345
7346 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7347
7348 * configure: Re-generate.
7349
7350 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7351
7352 * Makefile.in (COMPILE.pre): Add "-x c++".
7353
7354 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
7355
7356 * fork-child.c: Conditionally include <signal.h>.
7357
7358 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7359
7360 * server.c (handle_general_set): Handle new packet
7361 "QStartupWithShell".
7362 (handle_query): Add "QStartupWithShell" to the list of supported
7363 packets.
7364 (gdbserver_usage): Add help text explaining the
7365 new "--startup-with-shell" and "--no-startup-with-shell" CLI
7366 options.
7367 (captured_main): Recognize and act upon the presence of the new
7368 CLI options.
7369
7370 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7371 Pedro Alves <palves@redhat.com>
7372
7373 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
7374 * configure: Regenerate.
7375 * configure.srv (srv_linux_obj): Add "fork-child.o" and
7376 "fork-inferior.o".
7377 (i[34567]86-*-lynxos*): Likewise.
7378 (spu*-*-*): Likewise.
7379 * fork-child.c: New file.
7380 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
7381 and "environ.h".
7382 (linux_ptrace_fun): New function.
7383 (linux_create_inferior): Adjust function prototype to reflect
7384 change on "target.h". Adjust function code to use
7385 "fork_inferior".
7386 (linux_request_interrupt): Delete "signal_pid".
7387 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7388 (lynx_ptrace_fun): New function.
7389 (lynx_create_inferior): Adjust function prototype to reflect
7390 change on "target.h". Adjust function code to use
7391 "fork_inferior".
7392 * nto-low.c (nto_create_inferior): Adjust function prototype and
7393 code to reflect change on "target.h". Update comments.
7394 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
7395 "common-terminal.h" and "environ.h".
7396 (terminal_fd): Moved to fork-child.c.
7397 (old_foreground_pgrp): Likewise.
7398 (restore_old_foreground_pgrp): Likewise.
7399 (last_status): Make it global.
7400 (last_ptid): Likewise.
7401 (our_environ): New variable.
7402 (startup_with_shell): Likewise.
7403 (program_name): Likewise.
7404 (program_argv): Rename to...
7405 (program_args): ...this.
7406 (wrapper_argv): New variable.
7407 (start_inferior): Delete function.
7408 (get_exec_wrapper): New function.
7409 (get_exec_file): Likewise.
7410 (get_environ): Likewise.
7411 (prefork_hook): Likewise.
7412 (post_fork_inferior): Likewise.
7413 (postfork_hook): Likewise.
7414 (postfork_child_hook): Likewise.
7415 (handle_v_run): Update code to deal with arguments coming from the
7416 remote host. Update calls from "start_inferior" to
7417 "create_inferior".
7418 (captured_main): Likewise. Initialize environment variable. Call
7419 "have_job_control".
7420 * server.h (post_fork_inferior): New prototype.
7421 (get_environ): Likewise.
7422 (last_status): Declare.
7423 (last_ptid): Likewise.
7424 (signal_pid): Likewise.
7425 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7426 (spu_ptrace_fun): New function.
7427 (spu_create_inferior): Adjust function prototype to reflect change
7428 on "target.h". Adjust function code to use "fork_inferior".
7429 * target.c (target_terminal_init): New function.
7430 (target_terminal_inferior): Likewise.
7431 (target_terminal_ours): Likewise.
7432 * target.h: Include <vector>.
7433 (struct target_ops) <create_inferior>: Update prototype.
7434 (create_inferior): Update macro.
7435 * utils.c (gdb_flush_out_err): New function.
7436 * win32-low.c (win32_create_inferior): Adjust function prototype
7437 and code to reflect change on "target.h".
7438
7439 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7440
7441 * inferiors.c (switch_to_thread): New function.
7442
7443 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7444
7445 * Makefile.in (SFILE): Add "common/job-control.c".
7446 (OBS): Add "job-control.o".
7447
7448 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
7449
7450 * Makefile: Remove "@host_makefile_frag@".
7451
7452 2017-05-05 Pedro Alves <palves@redhat.com>
7453
7454 * configure: Regenerate.
7455
7456 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
7457
7458 * configure: Regenerate.
7459
7460 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7461
7462 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
7463 software_single_step change of return type to
7464 std::vector<CORE_ADDR>.
7465 * linux-low.c (install_software_single_step_breakpoints):
7466 Likewise.
7467 * linux-low.h (install_software_single_step_breakpoints):
7468 Likewise.
7469
7470 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7471
7472 * remote-utils.c: Include "gdb_termios.h" instead of
7473 "terminal.h".
7474 * terminal.h: Delete file.
7475
7476 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7477
7478 * server.c: Include <vector>.
7479 <program_argv, wrapper_argv>: Convert to std::vector.
7480 (start_inferior): Rewrite function to use C++.
7481 (handle_v_run): Likewise. Update code that calculates the argv
7482 based on the vRun packet; use C++.
7483 (captured_main): Likewise.
7484
7485 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7486
7487 * server.c (handle_v_cont): Initialize thread_resume::thread
7488 with null_ptid.
7489
7490 2017-04-05 Pedro Alves <palves@redhat.com>
7491
7492 * configure: Regenerate.
7493
7494 2017-04-05 Pedro Alves <palves@redhat.com>
7495
7496 * gdbreplay.c (sync_error): Constify.
7497 * linux-x86-low.c (push_opcode): Constify.
7498
7499 2017-04-05 Pedro Alves <palves@redhat.com>
7500
7501 * win32-low.c (get_child_debug_event)
7502 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
7503 Report TARGET_WAITKIND_SPURIOUS instead.
7504
7505 2017-04-05 Pedro Alves <palves@redhat.com>
7506
7507 * remote-utils.c (remote_prepare, remote_open): Constify.
7508 * remote-utils.h (remote_prepare, remote_open): Constify.
7509 * server.c (captured_main): Constify 'port' handling.
7510
7511 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
7512
7513 * Makefile.in (clean): Clear .deps.
7514
7515 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
7516
7517 * .gitignore: Remove generated files, replace with wildcard.
7518 * (clean): Replace removal of generated files with wildcard.
7519 (version.c): Replace with...
7520 (version-generated.c): ...this.
7521 (xml-builtin.c): Replace with...
7522 (xml-builtin-generated.c): ...this.
7523 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
7524 (%.c: *regformats*): Replace with...
7525 (%-generated.c: *regformats*): ...this.
7526
7527 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7528
7529 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
7530 (xtensa_fill_gregset): Call collect_register_by_name for
7531 threadptr register.
7532 (xtensa_store_gregset): Call supply_register_by_name for
7533 threadptr register.
7534
7535 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7536
7537 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
7538 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
7539 (xtensa_store_gregset): Call supply_register for all registers in
7540 a0_regnum..a0_regnum + C0_NREGS range.
7541
7542 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7543
7544 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
7545 (ax-ipa.o: ax.c): Remove.
7546 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
7547 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
7548 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
7549 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
7550 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
7551
7552 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7553
7554 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
7555 (print-utils-ipa.o: ../common/print-utils.c): Remove.
7556 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
7557 (errors-ipa.o: ../common/errors.c): Remove.
7558 (format-ipa.o: ../common/format.c): Remove.
7559 (common-utils-ipa.o: ../common/common-utils.c): Remove.
7560
7561 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7562
7563 * Makefile.in (%-ipa.o: %.c): New rule.
7564 (tracepoint-ipa.o: tracepoint.c): Remove.
7565 (utils-ipa.o: utils.c): Remove.
7566 (remote-utils-ipa.o: remote-utils.c): Remove.
7567 (regcache-ipa.o: regcache.c): Remove.
7568 (i386-linux-ipa.o: i386-linux.c): Remove.
7569 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
7570 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
7571 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
7572 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
7573 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
7574 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
7575 (amd64-linux-ipa.o: amd64-linux.c): Remove.
7576 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
7577 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
7578 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
7579 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
7580 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
7581 (aarch64-ipa.o: aarch64.c): Remove.
7582 (s390-linux32-ipa.o: s390-linux32.c): Remove.
7583 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
7584 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
7585 (s390-linux64-ipa.o: s390-linux64.c): Remove.
7586 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
7587 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
7588 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
7589 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
7590 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
7591 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
7592 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
7593 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
7594 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
7595 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
7596 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
7597 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
7598 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
7599 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
7600 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
7601 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
7602 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
7603 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
7604 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
7605 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
7606 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
7607 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
7608 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
7609 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
7610 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
7611 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
7612 (tdesc-ipa.o: tdesc.c): Remove.
7613 (x32-linux-ipa.o: x32-linux.c): Remove.
7614 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
7615 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
7616
7617 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7618
7619 * Makefile.in (%.o: ../arch/%.c): New rule.
7620 (arm.o: ../arch/arm.c): Remove.
7621 (arm-linux.o: ../arch/arm-linux.c): Remove.
7622 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
7623 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
7624
7625 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7626
7627 * Makefile.in (%.o: ../nat/%.c): New rule.
7628 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
7629 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
7630 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
7631 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
7632 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
7633 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
7634 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
7635 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
7636 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
7637 (linux-personality.o: ../nat/linux-personality.c): Remove.
7638 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
7639 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
7640 (x86-linux.o: ../nat/x86-linux.c): Remove.
7641 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
7642 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
7643
7644 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7645
7646 * Makefile.in (%.o: ../common/%.c): New rule.
7647 (signals.o: ../common/signals.c): Remove.
7648 (print-utils.o: ../common/print-utils.c): Remove.
7649 (rsp-low.o: ../common/rsp-low.c): Remove.
7650 (common-utils.o: ../common/common-utils.c): Remove.
7651 (posix-strerror.o: ../common/posix-strerror.c): Remove.
7652 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
7653 (vec.o: ../common/vec.c): Remove.
7654 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
7655 (xml-utils.o: ../common/xml-utils.c): Remove.
7656 (ptid.o: ../common/ptid.c): Remove.
7657 (buffer.o: ../common/buffer.c): Remove.
7658 (format.o: ../common/format.c): Remove.
7659 (filestuff.o: ../common/filestuff.c): Remove.
7660 (agent.o: ../common/agent.c): Remove.
7661 (errors.o: ../common/errors.c): Remove.
7662 (environ.o: ../common/environ.c): Remove.
7663 (common-debug.o: ../common/common-debug.c): Remove.
7664 (cleanups.o: ../common/cleanups.c): Remove.
7665 (common-exceptions.o: ../common/common-exceptions.c): Remove.
7666 (fileio.o: ../common/fileio.c): Remove.
7667 (common-regcache.o: ../common/common-regcache.c): Remove.
7668 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
7669 (new-op.o: ../common/new-op.c): Remove.
7670 (btrace-common.o: ../common/btrace-common.c): Remove.
7671
7672 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7673
7674 * Makefile.in (%.o: ../target/%.c): New rule.
7675 (waitstatus.o: ../target/waitstatus.c): Remove.
7676
7677 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7678
7679 * Makefile.in
7680 (%.c: ../regformats/%.dat,
7681 (%.c: ../regformats/arm/%.dat,
7682 (%.c: ../regformats/i386/%.dat,
7683 (%.c: ../regformats/rs6000/%.dat): New rules.
7684 (aarch64.c): Remove.
7685 (reg-arm.c): Remove.
7686 (arm-with-iwmmxt.c): Remove.
7687 (arm-with-vfpv2.c): Remove.
7688 (arm-with-vfpv3.c): Remove.
7689 (arm-with-neon.c): Remove.
7690 (reg-bfin.c): Remove.
7691 (reg-cris.c): Remove.
7692 (reg-crisv32.c): Remove.
7693 (i386.c): Remove.
7694 (i386-linux.c): Remove.
7695 (i386-avx.c): Remove.
7696 (i386-avx-linux.c): Remove.
7697 (i386-avx-avx512.c): Remove.
7698 (i386-avx-avx512-linux.c): Remove.
7699 (i386-mpx.c): Remove.
7700 (i386-mpx-linux.c): Remove.
7701 (i386-avx-mpx-avx512-pku.c): Remove.
7702 (i386-avx-mpx-avx512-pku-linux.c): Remove.
7703 (i386-avx-mpx.c): Remove.
7704 (i386-avx-mpx-linux.c): Remove.
7705 (i386-mmx.c): Remove.
7706 (i386-mmx-linux.c): Remove.
7707 (reg-ia64.c): Remove.
7708 (reg-m32r.c): Remove.
7709 (reg-m68k.c): Remove.
7710 (reg-cf.c): Remove.
7711 (mips-linux.c): Remove.
7712 (mips-dsp-linux.c): Remove.
7713 (mips64-linux.c): Remove.
7714 (mips64-dsp-linux.c): Remove.
7715 (nios2-linux.c): Remove.
7716 (powerpc-32.c): Remove.
7717 (powerpc-32l.c): Remove.
7718 (powerpc-altivec32l.c): Remove.
7719 (powerpc-cell32l.c): Remove.
7720 (powerpc-vsx32l.c): Remove.
7721 (powerpc-isa205-32l.c): Remove.
7722 (powerpc-isa205-altivec32l.c): Remove.
7723 (powerpc-isa205-vsx32l.c): Remove.
7724 (powerpc-e500l.c): Remove.
7725 (powerpc-64l.c): Remove.
7726 (powerpc-altivec64l.c): Remove.
7727 (powerpc-cell64l.c): Remove.
7728 (powerpc-vsx64l.c): Remove.
7729 (powerpc-isa205-64l.c): Remove.
7730 (powerpc-isa205-altivec64l.c): Remove.
7731 (powerpc-isa205-vsx64l.c): Remove.
7732 (s390-linux32.c): Remove.
7733 (s390-linux32v1.c): Remove.
7734 (s390-linux32v2.c): Remove.
7735 (s390-linux64.c): Remove.
7736 (s390-linux64v1.c): Remove.
7737 (s390-linux64v2.c): Remove.
7738 (s390-te-linux64.c): Remove.
7739 (s390-vx-linux64.c): Remove.
7740 (s390-tevx-linux64.c): Remove.
7741 (s390x-linux64.c): Remove.
7742 (s390x-linux64v1.c): Remove.
7743 (s390x-linux64v2.c): Remove.
7744 (s390x-te-linux64.c): Remove.
7745 (s390x-vx-linux64.c): Remove.
7746 (s390x-tevx-linux64.c): Remove.
7747 (tic6x-c64xp-linux.c): Remove.
7748 (tic6x-c64x-linux.c): Remove.
7749 (tic6x-c62x-linux.c): Remove.
7750 (reg-sh.c): Remove.
7751 (reg-sparc64.c): Remove.
7752 (reg-spu.c): Remove.
7753 (amd64.c): Remove.
7754 (amd64-linux.c): Remove.
7755 (amd64-avx.c): Remove.
7756 (amd64-avx-linux.c): Remove.
7757 (amd64-avx-avx512.c): Remove.
7758 (amd64-avx-avx512-linux.c): Remove.
7759 (amd64-mpx.c): Remove.
7760 (amd64-mpx-linux.c): Remove.
7761 (amd64-avx-mpx-avx512-pku.c): Remove.
7762 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
7763 (amd64-avx-mpx.c): Remove.
7764 (amd64-avx-mpx-linux.c): Remove.
7765 (x32.c): Remove.
7766 (x32-linux.c): Remove.
7767 (x32-avx.c): Remove.
7768 (x32-avx-linux.c): Remove.
7769 (x32-avx-avx512.c): Remove.
7770 (x32-avx-avx512-linux.c): Remove.
7771 (reg-xtensa.c): Remove.
7772 (reg-tilegx.c): Remove.
7773 (reg-tilegx32.c): Remove.
7774
7775 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
7776
7777 * Makefile.in (SFILES): Add "common/environ.c".
7778 (OBJS): Add "common/environ.h".
7779
7780 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
7781
7782 * configure.ac: Check if the fs_base and gs_base members of
7783 `struct user_regs_struct' exist.
7784 * config.in: Regenerated.
7785 * configure: Likewise.
7786
7787 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
7788
7789 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
7790 target_read_memory.
7791 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
7792 (get_next_pcs_syscall_next_pc): Likewise.
7793
7794 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
7795
7796 * win32-i386-low.c: Fix incorrect reference to a couple source files.
7797 * nto-x86-low.c: Likewise.
7798
7799 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
7800
7801 * Makefile.in: Include disable-implicit-rules.mk.
7802
7803 2016-11-23 Pedro Alves <palves@redhat.com>
7804
7805 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
7806 (debug_vprintf): Use std::chrono::steady_clock instead of
7807 gettimeofday. Use '.' instead of ':'.
7808 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
7809 (get_timestamp): Use std::chrono::steady_clock instead of
7810 gettimeofday.
7811
7812 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7813
7814 * Makefile.in: Fix whitespace formatting.
7815
7816 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7817
7818 * Makefile.in (SFILES, OBS): Flatten list and order
7819 alphabetically.
7820
7821 2016-11-23 Pedro Alves <palves@redhat.com>
7822
7823 * event-loop.c (handle_file_event): Use warning.
7824 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
7825 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7826 Use warning.
7827
7828 2016-11-23 Pedro Alves <palves@redhat.com>
7829
7830 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
7831 output.
7832 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
7833 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
7834 debug_printf and debug_flush for debug output.
7835 * server.c (handle_general_set): Likewise.
7836 * thread-db.c (try_thread_db_load): Use debug_printf for debug
7837 output.
7838
7839 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7840
7841 * Makefile.in (.c.o): Replace rule with ...
7842 (%.o: %.c): ... this one.
7843
7844 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7845
7846 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
7847 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
7848 make.
7849 * configure.ac: Remove checks for the make program.
7850 * configure: Re-generate.
7851
7852 2016-10-28 Pedro Alves <palves@redhat.com>
7853
7854 * Makefile.in (CXX_DIALECT): Get from configure.
7855 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
7856 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
7857 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
7858 * config.in: Regenerate.
7859 * configure: Regenerate.
7860
7861 2016-10-27 Yao Qi <yao.qi@linaro.org>
7862
7863 * linux-low.c (linux_supports_range_stepping): Return true if
7864 can_software_single_step return true.
7865
7866 2016-10-27 Yao Qi <yao.qi@linaro.org>
7867
7868 * inferiors.c (find_inferior_in_random): New function.
7869 * inferiors.h (find_inferior_in_random): Declare.
7870 * linux-low.c (linux_wait_for_event_filtered): Call
7871 find_inferior_in_random instead of find_inferior.
7872
7873 2016-10-27 Yao Qi <yao.qi@linaro.org>
7874
7875 * linux-low.c (linux_wait_1): If single-step breakpoints are
7876 inserted, remove them.
7877
7878 2016-10-26 Pedro Alves <palves@redhat.com>
7879
7880 * linux-low.c (handle_extended_wait): Link parent/child fork
7881 threads.
7882 (linux_wait_1): Unlink them.
7883 (linux_set_resume_request): Ignore resume requests for
7884 already-resumed and unhandled fork child threads.
7885 * linux-low.h (struct lwp_info) <fork_relative>: New field.
7886 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
7887 New functions.
7888 (handle_v_requests) <vCont>: Don't call require_running.
7889 * server.h (in_queued_stop_replies): New declaration.
7890
7891 2016-10-24 Yao Qi <yao.qi@linaro.org>
7892
7893 PR server/20733
7894 * linux-aarch64-low.c (append_insns): Cast the return value to
7895 'uint32_t *'.
7896
7897 2016-10-10 Yao Qi <yao.qi@linaro.org>
7898
7899 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
7900
7901 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
7902
7903 * target.c (target_supports_multi_process): New function, moved
7904 from...
7905 * target.h (target_supports_multi_process): ... here. Remove
7906 macro.
7907
7908 2016-10-05 Tom Tromey <tom@tromey.com>
7909
7910 PR remote/20655:
7911 * tracepoint.c (handle_tracepoint_bkpts): Check
7912 ipa_error_tracepoint, not ipa_stopping_tracepoint.
7913
7914 2016-10-05 Yao Qi <yao.qi@linaro.org>
7915
7916 * configure.srv: Update the path of arm-*.xml files.
7917
7918 2016-10-05 Terry Guo <terry.guo@arm.com>
7919 Yao Qi <yao.qi@linaro.org>
7920
7921 * Makefile.in: Adjust the path of rules.
7922 * configure.srv: Update the path of xml files.
7923 * regformats/arm-with-iwmmxt.dat: Regenerated.
7924 * regformats/arm-with-neon.dat: Likewise.
7925 * regformats/arm-with-vfpv2.dat: Likewise.
7926 * regformats/arm-with-vfpv3.dat Likewise.
7927
7928 2016-09-30 Yao Qi <yao.qi@linaro.org>
7929
7930 PR gdbserver/20627
7931 * target.c (target_stop_and_wait): Don't call
7932 target_continue_no_signal, use resume_stop instead.
7933
7934 2016-09-26 Yao Qi <yao.qi@linaro.org>
7935
7936 * linux-low.c (linux_wait_1): Call debug_exit.
7937
7938 2016-09-23 Pedro Alves <palves@redhat.com>
7939
7940 * Makefile.in (SFILES): Add common/new-op.c.
7941 (OBS): Add common/new-op.o.
7942 (new-op.o): New rule.
7943
7944 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
7945
7946 * .gitinore: Ignore more files.
7947
7948 2016-09-21 Yao Qi <yao.qi@linaro.org>
7949
7950 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
7951 23.
7952
7953 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
7954
7955 * server.c (start_inferior): Call target_mourn_inferior instead of
7956 mourn_inferior; pass ptid_t argument to it.
7957 (resume): Likewise.
7958 (handle_target_event): Likewise.
7959 * target.c (target_mourn_inferior): New function.
7960 * target.h (mourn_inferior): Delete macro.
7961
7962 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
7963
7964 * linux-low.c (lwp_is_stepping): New function.
7965
7966 2016-09-06 Carl Love <cel@us.ibm.com>
7967
7968 * server.c (start_inferior): Fixed comment, requested comment change
7969 didn't get updated correctly. Removed reference to ptrace () call as
7970 it is only true on Linux systems.
7971
7972 2016-09-06 Carl Love <cel@us.ibm.com>
7973
7974 * server.c (start_inferior): Do not call
7975 function target_post_create_inferior () if the
7976 inferior process has already exited.
7977
7978 2016-09-05 Pedro Alves <palves@redhat.com>
7979
7980 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
7981 (COMPILE.pre, CC_LD): Use CXX directly.
7982 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
7983 * acinclude.m4: Don't include build-with-cxx.m4.
7984 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
7985 * configure: Regenerate.
7986
7987 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
7988
7989 PR gdb/19495
7990 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
7991 call writing data to own_buf.
7992
7993 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7994
7995 * target.c (mywait): Call target_wait instead of
7996 the_target->wait.
7997 (target_wait): New function.
7998
7999 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
8000
8001 * server.c (start_inferior): New variable 'ptid'. Replace calls
8002 to the_target->resume by target_continue{,_no_signal}, depending
8003 on the case.
8004 * target.c (target_stop_and_wait): Call target_continue_no_signal
8005 instead of the_target->resume.
8006 (target_continue): New function.
8007
8008 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
8009
8010 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
8011
8012 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
8013
8014 PR server/20491
8015 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
8016 ps_prochandle.
8017 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
8018 * linux-arm-low.c (ps_get_thread_area): Likewise.
8019 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
8020 * linux-m68k-low.c (ps_get_thread_area): Likewise.
8021 * linux-mips-low.c (ps_get_thread_area): Likewise.
8022 * linux-nios2-low.c (ps_get_thread_area): Likewise.
8023 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
8024 * linux-x86-low.c (ps_get_thread_area): Likewise.
8025 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
8026
8027 2016-08-19 Pedro Alves <palves@redhat.com>
8028
8029 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
8030
8031 2016-08-19 Pedro Alves <palves@redhat.com>
8032
8033 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
8034 comment. Use memcpy instead of casting through unsigned long.
8035
8036 2016-08-19 Pedro Alves <palves@redhat.com>
8037
8038 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
8039 allocating around 0x80000000.
8040
8041 2016-08-19 Pedro Alves <palves@redhat.com>
8042
8043 PR gdb/20415
8044 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
8045 (x32-avx512-linux-ipa.o): New rules.
8046 * configure.ac (x86_64-*-linux*): New x32 check.
8047 * configure.srv (ipa_x32_linux_regobj): New.
8048 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
8049 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
8050 descriptions.
8051 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
8052 descriptions.
8053 * configure: Regenerate.
8054
8055 2016-08-09 Pedro Alves <palves@redhat.com>
8056
8057 PR gdb/18653
8058 * Makefile.in (OBS): Add signals-state-save-restore.o.
8059 (signals-state-save-restore.o): New rule.
8060 * config.in: Regenerate.
8061 * configure: Regenerate.
8062 * linux-low.c: Include "signals-state-save-restore.h".
8063 (linux_create_inferior): Call
8064 restore_original_signals_state.
8065 * server.c: Include "dispositions-save-restore.h".
8066 (captured_main): Call save_original_signals_state.
8067
8068 2016-08-05 Pedro Alves <palves@redhat.com>
8069
8070 * configure: Regenerate.
8071
8072 2016-08-04 Yao Qi <yao.qi@linaro.org>
8073
8074 * linux-low.c (regsets_fetch_inferior_registers): Check
8075 errno is ESRCH or not.
8076
8077 2016-08-02 Yao Qi <yao.qi@linaro.org>
8078
8079 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
8080 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
8081 (thread_db_load_search): Update.
8082 (try_thread_db_load_1): Don't look for td_ta_event_addr,
8083 td_ta_set_event and td_ta_event_getmsg.
8084
8085 2016-07-26 Pedro Alves <palves@redhat.com>
8086
8087 PR server/20414
8088 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
8089 of unsigned long for 64-bit registers and use uint32_t instead of
8090 unsigned int for 32-bit registers.
8091
8092 2016-07-26 Pedro Alves <palves@redhat.com>
8093
8094 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
8095 to 'ptrace'.
8096
8097 2016-07-21 Tom Tromey <tom@tromey.com>
8098
8099 * configure: Rebuild.
8100
8101 2016-07-21 Yao Qi <yao.qi@linaro.org>
8102
8103 * mem-break.c (find_gdb_breakpoint): Cast bp to
8104 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
8105
8106 2016-07-21 Yao Qi <yao.qi@linaro.org>
8107
8108 * server.c (handle_v_requests): Support s and S actions
8109 if target_supports_software_single_step return true.
8110
8111 2016-07-21 Yao Qi <yao.qi@linaro.org>
8112
8113 * linux-low.c (resume_stopped_resumed_lwps): If resume request
8114 is resume_step, call maybe_hw_step.
8115 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
8116 and unstop them.
8117 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
8118 breakpoints or not.
8119 (proceed_one_lwp): If resume request is resume_step, install
8120 reinsert breakpoints and call maybe_hw_step.
8121
8122 2016-07-21 Yao Qi <yao.qi@linaro.org>
8123
8124 * linux-low.c (proceed_one_lwp): Declare.
8125 (linux_resume_one_thread): Remove local variable 'step'.
8126 Lift code enqueue signal. Call proceed_one_lwp instead of
8127 linux_resume_one_lwp.
8128
8129 2016-07-21 Yao Qi <yao.qi@linaro.org>
8130
8131 * linux-low.c (linux_resume_one_thread): Call
8132 enqueue_pending_signal.
8133
8134 2016-07-21 Yao Qi <yao.qi@linaro.org>
8135
8136 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
8137 * inferiors.c (do_restore_current_thread_cleanup): New function.
8138 (make_cleanup_restore_current_thread): Likewise.
8139 * linux-low.c (install_software_single_step_breakpoints): Call
8140 make_cleanup_restore_current_thread. Switch current_thread to
8141 thread.
8142
8143 2016-07-21 Yao Qi <yao.qi@linaro.org>
8144
8145 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
8146 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
8147 (clone_one_breakpoint): Likewise.
8148 (delete_reinsert_breakpoints): Change parameter to thread.
8149 Callers updated.
8150 (has_reinsert_breakpoints): Likewise.
8151 (uninsert_reinsert_breakpoints): Likewise.
8152 (reinsert_reinsert_breakpoints): Likewise.
8153 * mem-break.h (set_reinsert_breakpoint): Update declaration.
8154 (delete_reinsert_breakpoints): Likewise.
8155 (reinsert_reinsert_breakpoints): Likewise.
8156 (uninsert_reinsert_breakpoints): Likewise.
8157 (has_reinsert_breakpoints): Likewise.
8158
8159 2016-07-21 Yao Qi <yao.qi@linaro.org>
8160
8161 * inferiors.c (get_thread_process): Make parameter const.
8162 * inferiors.h (get_thread_process): Update declaration.
8163 * mem-break.c (clone_all_breakpoints): Remove all parameters.
8164 Add new parameters child_thread and parent_thread. Callers
8165 updated.
8166 * mem-break.h (clone_all_breakpoints): Update declaration.
8167
8168 2016-07-21 Yao Qi <yao.qi@linaro.org>
8169
8170 * mem-break.c (struct breakpoint) <cond_list>: Remove.
8171 <command_list, handler>: Remove.
8172 (struct gdb_breakpoint): New.
8173 (struct other_breakpoint): New.
8174 (struct reinsert_breakpoint): New.
8175 (is_gdb_breakpoint): New function.
8176 (any_persistent_commands): Update command_list if
8177 is_gdb_breakpoint returns true.
8178 (set_breakpoint): Create breakpoints according to their types.
8179 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
8180 (set_gdb_breakpoint_1): Likewise.
8181 (set_gdb_breakpoint): Likewise.
8182 (clear_breakpoint_conditions): Change parameter type to
8183 'struct gdb_breakpoint *'.
8184 (clear_breakpoint_commands): Likewise.
8185 (clear_breakpoint_conditions_and_commands): Likewise.
8186 (add_condition_to_breakpoint): Likewise.
8187 (add_breakpoint_condition): Likewise.
8188 (add_commands_to_breakpoint): Likewise.
8189 (check_breakpoints): Check other_breakpoint.
8190 (clone_one_breakpoint): Clone breakpopint according to its type.
8191 * mem-break.h (struct gdb_breakpoint): Declare.
8192 (set_gdb_breakpoint): Update declaration.
8193 (clear_breakpoint_conditions_and_commands): Likewise.
8194 (add_breakpoint_condition): Likewise.
8195 (add_breakpoint_commands): Likewise.
8196 * server.c (process_point_options): Change parameter type to
8197 'struct gdb_breakpoint *'.
8198
8199 2016-07-21 Yao Qi <yao.qi@linaro.org>
8200
8201 * mem-break.c (set_breakpoint_at): Rename it to ...
8202 (set_breakpoint_type_at): ... it.
8203 (set_breakpoint_at): Call set_breakpoint_type_at.
8204 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
8205 * mem-break.h (set_breakpoint_at): Update comments.
8206
8207 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
8208
8209 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
8210 to buf parameter.
8211 (nios2_store_gregset): Likewise.
8212
8213 2016-07-01 Pedro Alves <palves@redhat.com>
8214 Antoine Tremblay <antoine.tremblay@ericsson.com>
8215
8216 * linux-low.c: Change interface to take the target lwp_info
8217 pointer directly and return void. Handle detaching from a zombie
8218 thread.
8219 (linux_detach_lwp_callback): New function.
8220 (linux_detach): Detach from the leader thread after detaching from
8221 the clone threads.
8222
8223 2016-06-28 Yao Qi <yao.qi@linaro.org>
8224
8225 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
8226 for variable new_offset.
8227 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
8228 (aarch64_ftrace_insn_reloc_cb): Likewise.
8229 (aarch64_ftrace_insn_reloc_tb): Likewise.
8230 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
8231 PRIx64 instead of PRIx32.
8232
8233 2016-06-28 Yao Qi <yao.qi@linaro.org>
8234
8235 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
8236 (the_low_target): Install arm_get_syscall_trapinfo.
8237
8238 2016-06-28 Yao Qi <yao.qi@linaro.org>
8239
8240 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
8241 function.
8242 (the_low_target): Install aarch64_get_syscall_trapinfo.
8243
8244 2016-06-28 Yao Qi <yao.qi@linaro.org>
8245
8246 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
8247 Callers updated.
8248 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
8249 Remove parameter sysno.
8250 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
8251 sysret.
8252
8253 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
8254
8255 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
8256 (s390_emit_ne_goto): Likewise.
8257 (s390_emit_lt_goto): Likewise.
8258 (s390_emit_le_goto): Likewise.
8259 (s390_emit_gt_goto): Likewise.
8260 (s390_emit_ge_goto): Likewise.
8261 (s390x_emit_eq_goto): Likewise.
8262 (s390x_emit_ne_goto): Likewise.
8263 (s390x_emit_lt_goto): Likewise.
8264 (s390x_emit_le_goto): Likewise.
8265 (s390x_emit_gt_goto): Likewise.
8266 (s390x_emit_ge_goto): Likewise.
8267 (s390_emit_ops_impl): Mark variable static.
8268 (s390x_emit_ops): Likewise.
8269
8270 2016-06-17 Yao Qi <yao.qi@linaro.org>
8271
8272 * linux-low.c (handle_extended_wait): Call
8273 uninsert_reinsert_breakpoints for the parent process. Remove
8274 reinsert breakpoints from the child process. Reinsert them to
8275 the parent process when vfork is done.
8276 * mem-break.c (uninsert_reinsert_breakpoints): New function.
8277 (reinsert_reinsert_breakpoints): New function.
8278 * mem-break.h (uninsert_reinsert_breakpoints): Declare
8279 (reinsert_reinsert_breakpoints): Declare.
8280
8281 2016-06-17 Yao Qi <yao.qi@linaro.org>
8282
8283 * linux-low.c (handle_extended_wait): If the parent is doing
8284 step-over, remove the reinsert breakpoints from the forked child.
8285
8286 2016-06-17 Yao Qi <yao.qi@linaro.org>
8287
8288 * linux-low.c (unsuspend_all_lwps): Declare.
8289 (linux_low_filter_event): If thread exited, call finish_step_over.
8290 If step-over is finished, unsuspend other threads.
8291
8292 2016-06-17 Yao Qi <yao.qi@linaro.org>
8293
8294 * linux-low.c (linux_resume_one_lwp_throw): Assert
8295 has_reinsert_breakpoints returns false.
8296 * mem-break.c (delete_disabled_breakpoints): Assert
8297 bp type isn't reinsert_breakpoint.
8298
8299 2016-06-17 Yao Qi <yao.qi@linaro.org>
8300
8301 * linux-low.c (maybe_hw_step): New function.
8302 (linux_resume_one_lwp_throw): Call maybe_hw_step.
8303 (finish_step_over): Switch current_thread to lwp temporarily,
8304 and assert has_reinsert_breakpoints returns true.
8305 (proceed_one_lwp): Call maybe_hw_step.
8306 * mem-break.c (has_reinsert_breakpoints): New function.
8307 * mem-break.h (has_reinsert_breakpoints): Declare.
8308
8309 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
8310
8311 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
8312
8313 2016-05-17 Yao Qi <yao.qi@linaro.org>
8314
8315 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
8316 instead of find_inferior.
8317
8318 2016-05-05 Yao Qi <yao.qi@linaro.org>
8319
8320 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
8321 Initialize res to zero.
8322
8323 2016-05-05 Yao Qi <yao.qi@linaro.org>
8324
8325 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
8326 to uint32_t.
8327
8328 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8329
8330 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
8331 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
8332 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
8333
8334 2016-04-28 Par Olsson <par.olsson@windriver.com>
8335 Simon Marchi <simon.marchi@ericsson.com>
8336
8337 * tracepoint.c (write_inferior_int8): New function.
8338 (cmd_qtenable_disable): Write enable flag using
8339 write_inferior_int8.
8340
8341 2016-04-25 Yao Qi <yao.qi@linaro.org>
8342
8343 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
8344 (need_step_over_p): Return zero if the LWP has pending signals
8345 can be delivered on software single step target.
8346
8347 2016-04-25 Yao Qi <yao.qi@linaro.org>
8348
8349 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
8350 return instead of error.
8351
8352 2016-04-22 Yao Qi <yao.qi@linaro.org>
8353
8354 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
8355 to 23.
8356
8357 2016-04-22 Yao Qi <yao.qi@linaro.org>
8358
8359 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
8360 signal when stepping over breakpoint with software single
8361 step.
8362
8363 2016-04-21 Pedro Alves <palves@redhat.com>
8364
8365 * linux-s390-low.c (s390_collect_ptrace_register)
8366 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
8367 add casts.
8368 (s390_check_regset): Use void * instead of gdb_byte *.
8369
8370 2016-04-20 Pedro Alves <palves@redhat.com>
8371
8372 * configure: Renegerate.
8373
8374 2016-04-20 Yao Qi <yao.qi@linaro.org>
8375
8376 * linux-aarch32-low.c: Include "arch/arm-linux.h".
8377 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
8378 number 16.
8379 (arm_store_gregset): Likewise.
8380
8381 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
8382
8383 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
8384 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
8385 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
8386 (amd64-avx-mpx-linux.c): New rules.
8387 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
8388 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
8389 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
8390 (srv_amd64_regobj): Add amd64-avx-mpx.o.
8391 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
8392 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
8393 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
8394 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
8395 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
8396 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
8397 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
8398 * linux-x86-low.c (x86_linux_read_description): Add case for
8399 X86_XSTATE_AVX_MPX_MASK.
8400 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
8401 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
8402 init_registers_i386_avx_mpx_linux.
8403 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8404 (initialize_low_tracepoint): Call
8405 init_registers_i386_avx_mpx_linux.
8406 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8407 (initialize_low_tracepoint): Call
8408 init_registers_amd64_avx_mpx_linux.
8409 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
8410 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
8411 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
8412 declarations.
8413
8414 2016-04-18 Pedro Alves <palves@redhat.com>
8415
8416 * configure: Regenerate.
8417
8418 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
8419
8420 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
8421 (aarch64_emit_sub): Likewise.
8422
8423 2016-04-12 Pedro Alves <palves@redhat.com>
8424
8425 * utils.c (prepare_to_throw_exception): Delete.
8426
8427 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
8428
8429 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
8430
8431 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
8432
8433 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
8434
8435 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
8436
8437 * linux-aarch64-ipa.c: Add <elf.h> include.
8438 * linux-ppc-ipa.c: Add <elf.h> include.
8439 * linux-s390-ipa.c: Add <elf.h> include.
8440
8441 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8442
8443 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
8444 (get_raw_reg_ptr): Likewise.
8445 (get_trace_state_variable_value_ptr): Likewise.
8446 (set_trace_state_variable_value_ptr): Likewise.
8447 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
8448 char *.
8449
8450 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8451 Marcin Kościelnicki <koriakin@0x04.net>
8452
8453 PR/17221
8454 * linux-ppc-low.c (emit_insns): New function.
8455 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
8456 (ppc_emit_prologue): New function.
8457 (ppc_emit_epilogue): New function.
8458 (ppc_emit_add): New function.
8459 (ppc_emit_sub): New function.
8460 (ppc_emit_mul): New function.
8461 (ppc_emit_lsh): New function.
8462 (ppc_emit_rsh_signed): New function.
8463 (ppc_emit_rsh_unsigned): New function.
8464 (ppc_emit_ext): New function.
8465 (ppc_emit_zero_ext): New function.
8466 (ppc_emit_log_not): New function.
8467 (ppc_emit_bit_and): New function.
8468 (ppc_emit_bit_or): New function.
8469 (ppc_emit_bit_xor): New function.
8470 (ppc_emit_bit_not): New function.
8471 (ppc_emit_equal): New function.
8472 (ppc_emit_less_signed): New function.
8473 (ppc_emit_less_unsigned): New function.
8474 (ppc_emit_ref): New function.
8475 (ppc_emit_const): New function.
8476 (ppc_emit_reg): New function.
8477 (ppc_emit_pop): New function.
8478 (ppc_emit_stack_flush): New function.
8479 (ppc_emit_swap): New function.
8480 (ppc_emit_stack_adjust): New function.
8481 (ppc_emit_call): New function.
8482 (ppc_emit_int_call_1): New function.
8483 (ppc_emit_void_call_2): New function.
8484 (ppc_emit_if_goto): New function.
8485 (ppc_emit_goto): New function.
8486 (ppc_emit_eq_goto): New function.
8487 (ppc_emit_ne_goto): New function.
8488 (ppc_emit_lt_goto): New function.
8489 (ppc_emit_le_goto): New function.
8490 (ppc_emit_gt_goto): New function.
8491 (ppc_emit_ge_goto): New function.
8492 (ppc_write_goto_address): New function.
8493 (ppc_emit_ops_impl): New static variable.
8494 (ppc64v1_emit_prologue): New function.
8495 (ppc64v2_emit_prologue): New function.
8496 (ppc64_emit_epilogue): New function.
8497 (ppc64_emit_add): New function.
8498 (ppc64_emit_sub): New function.
8499 (ppc64_emit_mul): New function.
8500 (ppc64_emit_lsh): New function.
8501 (ppc64_emit_rsh_signed): New function.
8502 (ppc64_emit_rsh_unsigned): New function.
8503 (ppc64_emit_ext): New function.
8504 (ppc64_emit_zero_ext): New function.
8505 (ppc64_emit_log_not): New function.
8506 (ppc64_emit_bit_and): New function.
8507 (ppc64_emit_bit_or): New function.
8508 (ppc64_emit_bit_xor): New function.
8509 (ppc64_emit_bit_not): New function.
8510 (ppc64_emit_equal): New function.
8511 (ppc64_emit_less_signed): New function.
8512 (ppc64_emit_less_unsigned): New function.
8513 (ppc64_emit_ref): New function.
8514 (ppc64_emit_const): New function.
8515 (ppc64v1_emit_reg): New function.
8516 (ppc64v2_emit_reg): New function.
8517 (ppc64_emit_pop): New function.
8518 (ppc64_emit_stack_flush): New function.
8519 (ppc64_emit_swap): New function.
8520 (ppc64v1_emit_call): New function.
8521 (ppc64v2_emit_call): New function.
8522 (ppc64v1_emit_int_call_1): New function.
8523 (ppc64v2_emit_int_call_1): New function.
8524 (ppc64v1_emit_void_call_2): New function.
8525 (ppc64v2_emit_void_call_2): New function.
8526 (ppc64_emit_if_goto): New function.
8527 (ppc64_emit_eq_goto): New function.
8528 (ppc64_emit_ne_goto): New function.
8529 (ppc64_emit_lt_goto): New function.
8530 (ppc64_emit_le_goto): New function.
8531 (ppc64_emit_gt_goto): New function.
8532 (ppc64_emit_ge_goto): New function.
8533 (ppc64v1_emit_ops_impl): New static variable.
8534 (ppc64v2_emit_ops_impl): New static variable.
8535 (ppc_emit_ops): New function.
8536 (linux_low_target): Wire in ppc_emit_ops.
8537
8538 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8539 Marcin Kościelnicki <koriakin@0x04.net>
8540
8541 PR/17221
8542 * Makefile.in: Add powerpc-*-ipa.o
8543 * configure.srv: Add ipa_obj for powerpc*-linux.
8544 * linux-ppc-ipa.c: New file.
8545 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
8546 includes.
8547 (PPC_FIELD): New macro.
8548 (PPC_SEXT): New macro.
8549 (PPC_OP6): New macro.
8550 (PPC_BO): New macro.
8551 (PPC_LI): New macro.
8552 (PPC_BD): New macro.
8553 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
8554 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
8555 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
8556 (ppc_get_thread_area): New function.
8557 (is_elfv2_inferior): New function.
8558 (gen_ds_form): New function.
8559 (GEN_STD): New macro.
8560 (GEN_STDU): New macro.
8561 (GEN_LD): New macro.
8562 (GEN_LDU): New macro.
8563 (gen_d_form): New function.
8564 (GEN_ADDI): New macro.
8565 (GEN_ADDIS): New macro.
8566 (GEN_LI): New macro.
8567 (GEN_LIS): New macro.
8568 (GEN_ORI): New macro.
8569 (GEN_ORIS): New macro.
8570 (GEN_LWZ): New macro.
8571 (GEN_STW): New macro.
8572 (GEN_STWU): New macro.
8573 (gen_xfx_form): New function.
8574 (GEN_MFSPR): New macro.
8575 (GEN_MTSPR): New macro.
8576 (GEN_MFCR): New macro.
8577 (GEN_MTCR): New macro.
8578 (GEN_SYNC): New macro.
8579 (GEN_LWSYNC): New macro.
8580 (gen_x_form): New function.
8581 (GEN_OR): New macro.
8582 (GEN_MR): New macro.
8583 (GEN_LWARX): New macro.
8584 (GEN_STWCX): New macro.
8585 (GEN_CMPW): New macro.
8586 (gen_md_form): New function.
8587 (GEN_RLDICL): New macro.
8588 (GEN_RLDICR): New macro.
8589 (gen_i_form): New function.
8590 (GEN_B): New macro.
8591 (GEN_BL): New macro.
8592 (gen_b_form): New function.
8593 (GEN_BNE): New macro.
8594 (GEN_LOAD): New macro.
8595 (GEN_STORE): New macro.
8596 (gen_limm): New function.
8597 (gen_atomic_xchg): New function.
8598 (gen_call): New function.
8599 (ppc_relocate_instruction): New function.
8600 (ppc_install_fast_tracepoint_jump_pad): New function.
8601 (ppc_get_min_fast_tracepoint_insn_len): New function.
8602 (ppc_get_ipa_tdesc_idx): New function.
8603 (the_low_target): Wire in the new functions.
8604 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
8605 tdescs.
8606 * linux-ppc-tdesc.h: New file.
8607
8608 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8609
8610 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8611 (alloc_jump_pad_buffer): New function.
8612 * linux-amd64-ipa.c: Add <sys/mman.h> include.
8613 (alloc_jump_pad_buffer): New function.
8614 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
8615 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8616 (alloc_jump_pad_buffer): New function.
8617 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
8618 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
8619 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
8620 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
8621
8622 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8623
8624 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
8625 * linux-amd64-ipa.c: Likewise.
8626 * linux-i386-ipa.c: Likewise.
8627 * linux-s390-ipa.c: Likewise.
8628 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
8629 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
8630 set_trace_state_variable_value_ptr.
8631 (struct ipa_sym_addresses): Likewise.
8632 (symbol_list): Likewise.
8633 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
8634 accessing gdb_collect directly.
8635 (gdb_collect_ptr_type): New typedef.
8636 (get_raw_reg_ptr_type): New typedef.
8637 (get_trace_state_variable_value_ptr_type): New typedef.
8638 (set_trace_state_variable_value_ptr_type): New typedef.
8639 (gdb_collect_ptr): New global.
8640 (get_raw_reg_ptr): New global.
8641 (get_trace_state_variable_value_ptr): New global.
8642 (set_trace_state_variable_value_ptr): New global.
8643 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
8644 accessing get_raw_reg directly.
8645 (get_get_tsv_func_addr): Likewise for
8646 get_trace_state_variable_value_ptr.
8647 (get_set_tsv_func_addr): Likewise for
8648 set_trace_state_variable_value_ptr.
8649 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
8650
8651 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
8652
8653 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
8654
8655 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8656
8657 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
8658 packets.
8659 (relocate_instruction): Remove own_buf.
8660 * server.c (own_buf): Make global.
8661 (handle_v_requests): Make global.
8662 * server.h (own_buf): New declaration.
8663 (handle_v_requests): New prototype.
8664
8665 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8666
8667 PR 18377
8668 * linux-s390-low.c (add_insns): New function.
8669 (s390_emit_prologue): New function.
8670 (s390_emit_epilogue): New function.
8671 (s390_emit_add): New function.
8672 (s390_emit_sub): New function.
8673 (s390_emit_mul): New function.
8674 (s390_emit_lsh): New function.
8675 (s390_emit_rsh_signed): New function.
8676 (s390_emit_rsh_unsigned): New function.
8677 (s390_emit_ext): New function.
8678 (s390_emit_log_not): New function.
8679 (s390_emit_bit_and): New function.
8680 (s390_emit_bit_or): New function.
8681 (s390_emit_bit_xor): New function.
8682 (s390_emit_bit_not): New function.
8683 (s390_emit_equal): New function.
8684 (s390_emit_less_signed): New function.
8685 (s390_emit_less_unsigned): New function.
8686 (s390_emit_ref): New function.
8687 (s390_emit_if_goto): New function.
8688 (s390_emit_goto): New function.
8689 (s390_write_goto_address): New function.
8690 (s390_emit_litpool): New function.
8691 (s390_emit_const): New function.
8692 (s390_emit_call): New function.
8693 (s390_emit_reg): New function.
8694 (s390_emit_pop): New function.
8695 (s390_emit_stack_flush): New function.
8696 (s390_emit_zero_ext): New function.
8697 (s390_emit_swap): New function.
8698 (s390_emit_stack_adjust): New function.
8699 (s390_emit_set_r2): New function.
8700 (s390_emit_int_call_1): New function.
8701 (s390_emit_void_call_2): New function.
8702 (s390_emit_eq_goto): New function.
8703 (s390_emit_ne_goto): New function.
8704 (s390_emit_lt_goto): New function.
8705 (s390_emit_le_goto): New function.
8706 (s390_emit_gt_goto): New function.
8707 (s390_emit_ge_goto): New function.
8708 (s390x_emit_prologue): New function.
8709 (s390x_emit_epilogue): New function.
8710 (s390x_emit_add): New function.
8711 (s390x_emit_sub): New function.
8712 (s390x_emit_mul): New function.
8713 (s390x_emit_lsh): New function.
8714 (s390x_emit_rsh_signed): New function.
8715 (s390x_emit_rsh_unsigned): New function.
8716 (s390x_emit_ext): New function.
8717 (s390x_emit_log_not): New function.
8718 (s390x_emit_bit_and): New function.
8719 (s390x_emit_bit_or): New function.
8720 (s390x_emit_bit_xor): New function.
8721 (s390x_emit_bit_not): New function.
8722 (s390x_emit_equal): New function.
8723 (s390x_emit_less_signed): New function.
8724 (s390x_emit_less_unsigned): New function.
8725 (s390x_emit_ref): New function.
8726 (s390x_emit_if_goto): New function.
8727 (s390x_emit_const): New function.
8728 (s390x_emit_call): New function.
8729 (s390x_emit_reg): New function.
8730 (s390x_emit_pop): New function.
8731 (s390x_emit_stack_flush): New function.
8732 (s390x_emit_zero_ext): New function.
8733 (s390x_emit_swap): New function.
8734 (s390x_emit_stack_adjust): New function.
8735 (s390x_emit_int_call_1): New function.
8736 (s390x_emit_void_call_2): New function.
8737 (s390x_emit_eq_goto): New function.
8738 (s390x_emit_ne_goto): New function.
8739 (s390x_emit_lt_goto): New function.
8740 (s390x_emit_le_goto): New function.
8741 (s390x_emit_gt_goto): New function.
8742 (s390x_emit_ge_goto): New function.
8743 (s390_emit_ops): New function.
8744 (struct linux_target_ops): Fill in emit_ops hook.
8745
8746 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8747
8748 PR 18377
8749 * Makefile.in: Add s390 IPA files.
8750 * configure.srv: Build IPA for s390.
8751 * linux-s390-ipa.c: New file.
8752 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
8753 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
8754 (tdesc_s390_linux32): Likewise.
8755 (init_registers_s390_linux32v1): Likewise.
8756 (tdesc_s390_linux32v1): Likewise.
8757 (init_registers_s390_linux32v2): Likewise.
8758 (tdesc_s390_linux32v2): Likewise.
8759 (init_registers_s390_linux64): Likewise.
8760 (tdesc_s390_linux64): Likewise.
8761 (init_registers_s390_linux64v1): Likewise.
8762 (tdesc_s390_linux64v1): Likewise.
8763 (init_registers_s390_linux64v2): Likewise.
8764 (tdesc_s390_linux64v2): Likewise.
8765 (init_registers_s390_te_linux64): Likewise.
8766 (tdesc_s390_te_linux64): Likewise.
8767 (init_registers_s390_vx_linux64): Likewise.
8768 (tdesc_s390_vx_linux64): Likewise.
8769 (init_registers_s390_tevx_linux64): Likewise.
8770 (tdesc_s390_tevx_linux64): Likewise.
8771 (init_registers_s390x_linux64): Likewise.
8772 (tdesc_s390x_linux64): Likewise.
8773 (init_registers_s390x_linux64v1): Likewise.
8774 (tdesc_s390x_linux64v1): Likewise.
8775 (init_registers_s390x_linux64v2): Likewise.
8776 (tdesc_s390x_linux64v2): Likewise.
8777 (init_registers_s390x_te_linux64): Likewise.
8778 (tdesc_s390x_te_linux64): Likewise.
8779 (init_registers_s390x_vx_linux64): Likewise.
8780 (tdesc_s390x_vx_linux64): Likewise.
8781 (init_registers_s390x_tevx_linux64): Likewise.
8782 (tdesc_s390x_tevx_linux64): Likewise.
8783 (have_hwcap_s390_vx): New static variable.
8784 (s390_arch_setup): Fill have_hwcap_s390_vx.
8785 (s390_get_thread_area): New function.
8786 (s390_ft_entry_gpr_esa): New const.
8787 (s390_ft_entry_gpr_zarch): New const.
8788 (s390_ft_entry_misc): New const.
8789 (s390_ft_entry_fr): New const.
8790 (s390_ft_entry_vr): New const.
8791 (s390_ft_main_31): New const.
8792 (s390_ft_main_64): New const.
8793 (s390_ft_exit_fr): New const.
8794 (s390_ft_exit_vr): New const.
8795 (s390_ft_exit_misc): New const.
8796 (s390_ft_exit_gpr_esa): New const.
8797 (s390_ft_exit_gpr_zarch): New const.
8798 (append_insns): New function.
8799 (s390_relocate_instruction): New function.
8800 (s390_install_fast_tracepoint_jump_pad): New function.
8801 (s390_get_min_fast_tracepoint_insn_len): New function.
8802 (s390_get_ipa_tdesc_idx): New function.
8803 (struct linux_target_ops): Wire in the above functions.
8804 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
8805 * linux-s390-tdesc.h: New file.
8806
8807 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8808
8809 * linux-s390-low.c (s390_supports_tracepoints): New function.
8810 (struct linux_target_ops): Fill supports_tracepoints hook.
8811
8812 2016-03-18 Yao Qi <yao.qi@linaro.org>
8813
8814 * linux-low.c (lwp_signal_can_be_delivered): New function.
8815 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
8816
8817 2016-03-18 Yao Qi <yao.qi@linaro.org>
8818
8819 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
8820 0 if signal is enqueued. Remove 'signal' from one debugging
8821 message. Move one debugging message to some lines below.
8822 Remove code setting 'signal' to 0.
8823
8824 2016-03-18 Yao Qi <yao.qi@linaro.org>
8825
8826 * linux-low.c (linux_low_filter_event): Remove redundant
8827 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
8828
8829 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
8830
8831 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
8832 (struct linux_target_ops): Wire in the above.
8833
8834 2016-03-03 Yao Qi <yao.qi@linaro.org>
8835
8836 * linux-low.c: Update comments to start_step_over.
8837
8838 2016-03-03 Yao Qi <yao.qi@linaro.org>
8839
8840 PR server/19736
8841 * linux-low.c (handle_extended_wait): Set child suspended
8842 if event_lwp->bp_reinsert isn't zero.
8843
8844 2016-03-02 Yao Qi <yao.qi@linaro.org>
8845
8846 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
8847 enqueue_pending_signal.
8848
8849 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
8850
8851 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
8852 is actually loaded.
8853
8854 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8855
8856 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
8857 (s390_regmap_3264) [!__s390x__]: New global.
8858 (s390_collect_ptrace_register): Skip map entries containing -1.
8859 (s390_supply_ptrace_register): Ditto.
8860 (s390_fill_gprs_high): New function.
8861 (s390_store_gprs_high): New function.
8862 (s390_regsets): Add NT_S390_HIGH_GPRS.
8863 (s390_get_hwcap): Enable on 31-bit.
8864 (have_hwcap_s390_high_gprs): Enable on 31-bit.
8865 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
8866 Detect NT_S390_HIGH_GPRS.
8867 (s390_usrregs_info_3264): Enable on 31-bit.
8868 (s390_regs_info): Enable regs_info_3264 on 31-bit.
8869 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
8870
8871 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8872
8873 PR gdb/13808
8874 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
8875 * configure.srv: Ditto.
8876 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
8877 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
8878 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
8879 (init_registers_amd64_linux): Remove prototype.
8880 (tdesc_amd64_linux): Remove declaration.
8881 (get_ipa_tdesc): New function.
8882 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8883 initialize remaining tdescs.
8884 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
8885 (init_registers_i386_linux): Remove prototype.
8886 (tdesc_i386_linux): Remove declaration.
8887 (get_ipa_tdesc): New function.
8888 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8889 initialize remaining tdescs.
8890 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
8891 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
8892 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
8893 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
8894 (x86_get_ipa_tdesc_idx): New function.
8895 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
8896 * linux-x86-tdesc.h: New file.
8897 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
8898 (target_get_ipa_tdesc_idx): New macro.
8899 * tracepoint.c (ipa_tdesc_idx): New macro.
8900 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
8901 (symbol_list): Add ipa_tdesc_idx.
8902 (cmd_qtstart): Write ipa_tdesc_idx in the target.
8903 (ipa_tdesc): Remove.
8904 (ipa_tdesc_idx): New variable.
8905 (get_context_regcache): Use get_ipa_tdesc.
8906 (gdb_collect): Ditto.
8907 (gdb_probe): Ditto.
8908 * tracepoint.h (get_ipa_tdesc): New prototype.
8909 (ipa_tdesc): Remove.
8910
8911 2016-02-24 Pedro Alves <palves@redhat.com>
8912
8913 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
8914 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
8915 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
8916 Factor out common code between the USE_SIGTRAP_SIGINFO and
8917 !USE_SIGTRAP_SIGINFO blocks.
8918 (linux_low_filter_event): Call save_stop_reason instead of
8919 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
8920 Update comments.
8921 (linux_wait_1): Update comments.
8922
8923 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
8924
8925 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
8926 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
8927 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
8928 ppc_insert_point, ppc_remove_point.
8929
8930 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
8931
8932 * linux-s390-low.c (s390_supports_z_point_type): New function.
8933 (struct linux_target_ops): Wire s390_supports_z_point_type in.
8934
8935 2016-02-16 Yao Qi <yao.qi@linaro.org>
8936
8937 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
8938 PC. Get pc from regcache_read_pc.
8939
8940 2016-02-12 Yao Qi <yao.qi@linaro.org>
8941
8942 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
8943 or linux_get_pc_32bit.
8944 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
8945
8946 2016-02-12 Yao Qi <yao.qi@linaro.org>
8947
8948 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
8949 arm_linux_get_next_pcs_fixup.
8950
8951 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
8952
8953 * tracepoint.c (x_tracepoint_action_download): Change
8954 write_inferior_data_ptr to write_inferior_data_pointer.
8955 (cmd_qtstart): Likewise.
8956 (write_inferior_data_ptr): Remove.
8957 (download_agent_expr): Change write_inferior_data_ptr to
8958 write_inferior_data_pointer.
8959 (download_tracepoint_1): Likewise.
8960 (download_tracepoint): Likewise.
8961 (download_trace_state_variables): Likewise.
8962
8963 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
8964 Marcin Kościelnicki <koriakin@0x04.net>
8965
8966 * tracepoint.c (struct tracepoint_action_ops): Remove.
8967 (struct tracepoint_action): Remove ops.
8968 (m_tracepoint_action_download, r_tracepoint_action_download)
8969 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
8970 size and offset accordingly.
8971 (m_tracepoint_action_ops, r_tracepoint_action_ops)
8972 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
8973 (tracepoint_action_send, tracepoint_action_download): New functions.
8974 Helpers for trace action handlers.
8975 (add_tracepoint_action): Remove setup actions ops.
8976 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
8977
8978 2016-02-10 Yao Qi <yao.qi@linaro.org>
8979
8980 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
8981
8982 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8983
8984 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
8985 to AC_OUTPUT.
8986 * configure: Regenerate.
8987
8988 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8989
8990 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
8991 void * to gdb_byte *.
8992 * linux-low.c (siginfo_fixup): Likewise.
8993 (linux_xfer_siginfo): Likewise.
8994 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
8995 Likewise.
8996 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8997
8998 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
8999
9000 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
9001 to srv_tgtobj.
9002 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
9003 to srv_tgtobj.
9004 * linux-x86-low.c [__x86_64__]: Include
9005 "nat/amd64-linux-siginfo.h".
9006 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
9007 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
9008 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
9009 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
9010 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
9011 (cpt_si_fd, si_timerid, si_overrun): Move from
9012 nat/amd64-linux-siginfo.c.
9013 * Makefile.in (amd64-linux-siginfo.o:): New rule.
9014
9015 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
9016
9017 * server.c (skip_to_semicolon): Remove.
9018 (process_point_options): Use strchrnul instead of
9019 skip_to_semicolon.
9020
9021 2016-01-26 Yao Qi <yao.qi@linaro.org>
9022
9023 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
9024 * linux-low.c (install_software_single_step_breakpoints): Don't
9025 call regcache_read_pc.
9026 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
9027 argument pc.
9028
9029 2016-01-26 Yao Qi <yao.qi@linaro.org>
9030
9031 * linux-low.c (install_software_single_step_breakpoints): Call
9032 regcache_read_pc instead of get_pc.
9033
9034 2016-01-26 Yao Qi <yao.qi@linaro.org>
9035
9036 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
9037 (unblock_async_io): Rename to ...
9038 (block_unblock_async_io): ... it. New function.
9039 (enable_async_io): Don't install SIGIO handler. Unblock it
9040 instead.
9041 (disable_async_io): Don't ignore SIGIO. Block it instead.
9042 (initialize_async_io): Install SIGIO handler. Don't call
9043 unblock_async_io.
9044
9045 2016-01-26 Yao Qi <yao.qi@linaro.org>
9046
9047 * remote-utils.c (getpkt): If the buffer isn't empty, and the
9048 first character is '\003', call *the_target->request_interrupt.
9049
9050 2016-01-25 Yao Qi <yao.qi@linaro.org>
9051
9052 * remote-utils.c (new_thread_notify): Remove.
9053 (dead_thread_notify): Likewise.
9054 * remote-utils.h (new_thread_notify): Remove declaration.
9055 (dead_thread_notify): Likewise.
9056
9057 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
9058
9059 * gdb.trace/pending.exp: Fix expected message on continue.
9060
9061 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
9062
9063 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
9064 it works properly on big-endian machines where sizeof (CORE_ADDR)
9065 != sizeof (void *).
9066
9067 2016-01-21 Pedro Alves <palves@redhat.com>
9068
9069 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
9070 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
9071 * configure: Regenerate.
9072
9073 2016-01-21 Yao Qi <yao.qi@linaro.org>
9074
9075 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
9076 is_thumb and set it according to CPSR saved on the stack.
9077 (get_next_pcs_syscall_next_pc): Pass is_thumb to
9078 arm_sigreturn_next_pc.
9079
9080 2016-01-18 Yao Qi <yao.qi@linaro.org>
9081
9082 * linux-low.c (linux_set_pc_64bit): New function.
9083 (linux_get_pc_64bit): New function.
9084 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
9085 Declare.
9086 * linux-sparc-low.c (debug_threads): Remove declaration.
9087 (sparc_get_pc): Remove.
9088 (the_low_target): Use linux_get_pc_64bit instead of
9089 sparc_get_pc.
9090 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
9091 (the_low_target): Use linux_get_pc_64bit and
9092 linux_set_pc_64bit.
9093
9094 2016-01-18 Yao Qi <yao.qi@linaro.org>
9095
9096 * linux-arm-low.c (debug_threads): Remove declaration.
9097 (arm_get_pc, arm_set_pc): Remove.
9098 (the_low_target): Use linux_get_pc_32bit and
9099 linux_set_pc_32bit.
9100 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
9101 (the_low_target): Use linux_get_pc_32bit and
9102 linux_set_pc_32bit.
9103 * linux-cris-low.c (debug_threads): Remove declaration.
9104 (cris_get_pc, cris_set_pc,): Remove.
9105 (the_low_target): Use linux_get_pc_32bit and
9106 linux_set_pc_32bit.
9107 * linux-crisv32-low.c (debug_threads): Remove declaration.
9108 (cris_get_pc, cris_set_pc): Remove.
9109 (the_low_target): Use linux_get_pc_32bit and
9110 linux_set_pc_32bit.
9111 * linux-low.c: Include inttypes.h.
9112 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
9113 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
9114 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
9115 (the_low_target): Use linux_get_pc_32bit and
9116 linux_set_pc_32bit.
9117 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
9118 (the_low_target): Use linux_get_pc_32bit and
9119 linux_set_pc_32bit.
9120 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
9121 (the_low_target): Use linux_get_pc_32bit and
9122 linux_set_pc_32bit.
9123 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
9124 (the_low_target): Use linux_get_pc_32bit and
9125 linux_set_pc_32bit.
9126 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
9127 (the_low_target): Use linux_get_pc_32bit and
9128 linux_set_pc_32bit.
9129
9130 2016-01-18 Gary Benson <gbenson@redhat.com>
9131
9132 * configure.ac (AC_FUNC_FORK): New check.
9133 * config.in: Regenerate.
9134 * configure: Likewise.
9135
9136 2016-01-14 Yao Qi <yao.qi@linaro.org>
9137
9138 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
9139 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
9140 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
9141 arm_get_next_pcs_ctor.
9142
9143 2016-01-12 Josh Stone <jistone@redhat.com>
9144 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9145
9146 * inferiors.h: Include "gdb_vecs.h".
9147 (struct process_info): Add syscalls_to_catch.
9148 * inferiors.c (remove_process): Free syscalls_to_catch.
9149 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
9150 syscall_return stops.
9151 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
9152 * server.c (handle_general_set): Handle QCatchSyscalls.
9153 (handle_query): Report support for QCatchSyscalls.
9154 * target.h (struct target_ops): Add supports_catch_syscall.
9155 (target_supports_catch_syscall): New macro.
9156 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
9157 (struct lwp_info): Add syscall_state.
9158 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
9159 Maintain syscall_state and syscalls_to_catch across exec.
9160 (get_syscall_trapinfo): New function, proxy to the_low_target.
9161 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
9162 (linux_low_filter_event): Toggle syscall_state entry/return for
9163 syscall traps, and set it ignored for all others.
9164 (gdb_catching_syscalls_p): New function.
9165 (gdb_catch_this_syscall_p): New function.
9166 (linux_wait_1): Handle SYSCALL_SIGTRAP.
9167 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
9168 (linux_supports_catch_syscall): New function.
9169 (linux_target_ops): Install it.
9170 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
9171 (the_low_target): Install it.
9172
9173 2016-01-12 Mike Frysinger <vapier@gentoo.org>
9174
9175 * acinclude.m4: Include new ../warning.m4 file.
9176 * configure: Regenerated.
9177 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
9178
9179 2016-01-12 Mike Frysinger <vapier@gentoo.org>
9180
9181 * ax.c (is_goto_target): Mark static.
9182 * linux-low.c (register_addr): Likewise.
9183 (linux_fetch_registers, linux_store_registers): Likewise.
9184 * mem-break.c (any_persistent_commands): Fix old prototype.
9185 (add_commands_to_breakpoint): Mark static.
9186 * regcache.c (find_register_by_name): Delete unused func.
9187 * remote-utils.c (hex_or_minus_one): Mark static.
9188 * server.c (monitor_show_help): Mark static.
9189 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
9190 handle_v_requests): Likewise.
9191
9192 2016-01-12 Pedro Alves <palves@redhat.com>
9193
9194 Remove use of the registered trademark symbol throughout.
9195
9196 2016-01-08 Yao Qi <yao.qi@linaro.org>
9197
9198 * remote-utils.c (getpkt): If c is '\003', call target hook
9199 request_interrupt.
9200
9201 2016-01-06 Yao Qi <yao.qi@linaro.org>
9202
9203 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
9204 linux-aarch32-low.c.
9205 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9206 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
9207 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9208 (thumb2_breakpoint): Declare.
9209 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
9210 linux-aarch32-low.h.
9211 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9212 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
9213 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9214
9215 2016-01-01 Joel Brobecker <brobecker@adacore.com>
9216
9217 * gdbreplay.c (gdbreplay_version): Change copyright year in
9218 version message.
9219 * server.c (gdbserver_version): Likewise.
9220
9221 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
9222
9223 * server.c (crc32_table): Delete.
9224 (crc32): Use libiberty's xcrc32 function.
9225
9226 2015-12-22 Joel Brobecker <brobecker@adacore.com>
9227
9228 * lynx-low.c (lynx_delete_thread_callback): New function.
9229 (lynx_mourn): Properly delete our process and all of its
9230 threads. Remove call to clear_inferiors.
9231
9232 2015-12-22 Joel Brobecker <brobecker@adacore.com>
9233
9234 * target.c (thread_search_callback): Add check that
9235 the thread_stopped target callback is not NULL before
9236 calling it.
9237
9238 2015-12-21 Yao Qi <yao.qi@linaro.org>
9239
9240 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
9241 arm breakpoint.
9242
9243 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9244
9245 * server.c (handle_query): Call target_supports_software_single_step.
9246
9247 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9248
9249 * linux-low.c (single_step): New function.
9250 (linux_resume_one_lwp_throw): Call single_step.
9251 (start_step_over): Likewise.
9252
9253 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9254
9255 * Makefile.in (SFILES): Append arch/arm-linux.c,
9256 arch/arm-get-next-pcs.c.
9257 (arm-linux.o): New rule.
9258 (arm-get-next-pcs.o): New rule.
9259 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
9260 arm-linux.o.
9261 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
9262 to linux-aarch32-low.c.
9263 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9264 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9265 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9266 (thumb2_breakpoint_len): Likewise.
9267 (arm_is_thumb_mode): Make non-static.
9268 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
9269 from linux-aarch32-low.c.
9270 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9271 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9272 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9273 (thumb2_breakpoint_len): Likewise.
9274 (arm_is_thumb_mode): New declaration.
9275 * linux-arm-low.c: Include arch/arm-linux.h
9276 aarch/arm-get-next-pcs.h, sys/syscall.h.
9277 (get_next_pcs_ops): New struct.
9278 (get_next_pcs_addr_bits_remove): New function.
9279 (get_next_pcs_is_thumb): New function.
9280 (get_next_pcs_read_memory_unsigned_integer): Likewise.
9281 (arm_sigreturn_next_pc): Likewise.
9282 (get_next_pcs_syscall_next_pc): Likewise.
9283 (arm_gdbserver_get_next_pcs): Likewise.
9284 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
9285 Initialize.
9286 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
9287 * server.h: Include gdb_vecs.h.
9288
9289 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9290
9291 * Makefile.in (SFILES): Append common/common-regcache.c.
9292 (OBS): Append common-regcache.o.
9293 (common-regcache.o): New rule.
9294 * regcache.c (init_register_cache): Initialize cache to
9295 REG_UNAVAILABLE.
9296 (regcache_raw_read_unsigned): New function.
9297 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
9298 register_status enum.
9299
9300 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9301
9302 * linux-aarch64-low.c (the_low_targets): Rename
9303 breakpoint_reinsert_addr to get_next_pcs.
9304 * linux-arm-low.c (the_low_targets): Likewise.
9305 * linux-bfin-low.c (the_low_targets): Likewise.
9306 * linux-cris-low.c (the_low_targets): Likewise.
9307 * linux-crisv32-low.c (the_low_targets): Likewise.
9308 * linux-low.c (can_software_single_step): Likewise.
9309 (install_software_single_step_breakpoints): New function.
9310 (start_step_over): Use install_software_single_step_breakpoints.
9311 * linux-low.h: New CORE_ADDR vector.
9312 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
9313 get_next_pcs.
9314 * linux-mips-low.c (the_low_targets): Likewise.
9315 * linux-nios2-low.c (the_low_targets): Likewise.
9316 * linux-sparc-low.c (the_low_targets): Likewise.
9317
9318 2015-12-17 Pedro Alves <palves@redhat.com>
9319
9320 * linux-low.c (linux_kill_one_lwp): Remove references to
9321 LinuxThreads.
9322 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
9323 to 'kill'.
9324 (linux_init_signals): Delete.
9325 (initialize_low): Adjust.
9326 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
9327
9328 2015-12-16 Pedro Alves <palves@redhat.com>
9329
9330 * configure.ac (compiler warning flags): When testing a
9331 -Wno-foo option, check whether -Wfoo works instead.
9332 * configure: Regenerate.
9333
9334 2015-12-11 Don Breazeal <donb@codesourcery.com>
9335
9336 * server.c (process_serial_event): Don't exit from gdbserver
9337 in remote mode if there are still active inferiors.
9338
9339 2015-12-11 Yao Qi <yao.qi@linaro.org>
9340
9341 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
9342 arm_breakpoint_at if the process is 32-bit.
9343
9344 2015-12-11 Yao Qi <yao.qi@linaro.org>
9345
9346 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
9347 arm breakpoint.
9348
9349 2015-12-07 Yao Qi <yao.qi@linaro.org>
9350
9351 * configure.srv: Append arm.o to srv_tgtobj for
9352 aarch64*-*-linux* target.
9353 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
9354 from linux-arm-low.c.
9355 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9356 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9357 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9358 (thumb2_breakpoint_len): Likewise.
9359 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
9360 (arm_breakpoint_kinds): Likewise.
9361 (arm_breakpoint_kind_from_pc): Likewise.
9362 (arm_sw_breakpoint_from_kind): Likewise.
9363 (arm_breakpoint_kind_from_current_state): Likewise.
9364 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
9365 (arm_sw_breakpoint_from_kind): Declare.
9366 (arm_breakpoint_kind_from_current_state): Declare.
9367 (arm_breakpoint_at): Declare.
9368 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
9369 arm_sw_breakpoint_from_kind if process is 32-bit.
9370 (aarch64_breakpoint_kind_from_pc): New function.
9371 (aarch64_breakpoint_kind_from_current_state): New function.
9372 (the_low_target): Initialize fields breakpoint_kind_from_pc
9373 and breakpoint_kind_from_current_state.
9374 * linux-arm-low.c (arm_breakpoint_kinds): Move to
9375 linux-aarch32-low.c.
9376 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
9377 (arm_breakpoint, arm_breakpoint_len): Likewise.
9378 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
9379 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9380 (arm_is_thumb_mode): Likewise.
9381 (arm_breakpoint_at): Likewise.
9382 (arm_breakpoint_kind_from_pc): Likewise.
9383 (arm_sw_breakpoint_from_kind): Likewise.
9384 (arm_breakpoint_kind_from_current_state): Likewise.
9385
9386 Revert:
9387 2015-08-04 Yao Qi <yao.qi@linaro.org>
9388
9389 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
9390 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
9391 * server.c (extended_protocol): Remove "static".
9392 * server.h (extended_protocol): Declare it.
9393
9394 2015-12-04 Josh Stone <jistone@redhat.com>
9395
9396 * target.h (struct target_ops) <arch_setup>: Rename to ...
9397 (struct target_ops) <post_create_inferior>: ... this.
9398 (target_arch_setup): Rename to ...
9399 (target_post_create_inferior): ... this, calling post_create_inferior.
9400 * server.c (start_inferior): Update target_arch_setup calls to
9401 target_post_create_inferior.
9402 * linux-low.c (linux_low_ptrace_options): Forward declare.
9403 (linux_arch_setup): Update its comment for general use.
9404 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
9405 (struct linux_target_ops): Use linux_post_create_inferior.
9406 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
9407 to post_create_inferior.
9408 * nto-low.c (struct nto_target_ops): Likewise.
9409 * spu-low.c (struct spu_target_ops): Likewise.
9410 * win32-low.c (struct win32_target_ops): Likewise.
9411
9412 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
9413
9414 * linux-arm-low.c: Remove duplicate arch/arm.h include.
9415
9416 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9417
9418 * linux-arm-low.c (arm_reinsert_addr): Remove function.
9419 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
9420 * linux-cris-low.c (cris_reinsert_addr> Remove function.
9421 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9422 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
9423 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9424 * linux-mips-low.c (mips_reinsert_addr): Remove function.
9425 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9426 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
9427 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9428 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
9429 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9430
9431 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9432
9433 * linux-low.c (linux_look_up_symbols): Don't call
9434 linux_supports_traceclone.
9435 * linux-low.h (thread_db_init): Remove use_events argument.
9436 * thread-db.c (thread_db_use_event): Remove global variable.
9437 (struct thread_db) <td_thr_event_enable_p>: Remove field.
9438 (struct thread_db) <td_create_bp>: Remove field.
9439 (thread_db_create_event): Remove function.
9440 (thread_db_enable_reporting): Likewise.
9441 (find_one_thread): Don't check for thread_db_use_events.
9442 (attach_thread): Likewise.
9443 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
9444 (try_thread_db_load_1): Don't check for thread_db_use_events.
9445 (thread_db_init): Remove use_events argument and thread events
9446 handling.
9447 (remove_thread_event_breakpoints): Remove function.
9448 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
9449
9450 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9451
9452 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
9453 New function.
9454 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9455 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
9456 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9457 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
9458 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
9459 Initialize.
9460 * linux-crisv32-low.c (cris_supports_hardware_single_step):
9461 New function.
9462 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9463 * linux-low.c (can_hardware_single_step): Use
9464 supports_hardware_single_step.
9465 (can_software_single_step): New function.
9466 (start_step_over): Call can_software_single_step.
9467 (linux_supports_hardware_single_step): New function.
9468 (struct target_ops) <supports_software_single_step>: Initialize.
9469 * linux-low.h (struct linux_target_ops)
9470 <supports_hardware_single_step>: Initialize.
9471 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
9472 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9473 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
9474 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
9475 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
9476 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9477 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
9478 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9479 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
9480 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
9481 Initialize.
9482 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
9483 (struct linux_target_ops) <tile_supports_hardware_single_step>:
9484 Initialize.
9485 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
9486 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9487 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
9488 New function.
9489 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9490 * target.h (struct target_ops): <supports_software_single_step>:
9491 New field.
9492 (target_supports_software_single_step): New macro.
9493
9494 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9495
9496 * linux-low.c (linux_wait_1): Fix pc advance condition.
9497 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
9498 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
9499
9500 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9501
9502 * linux-arm-low.c (arm_is_thumb_mode): New function.
9503 (arm_breakpoint_at): Use arm_is_thumb_mode.
9504 (arm_breakpoint_kind_from_current_state): New function.
9505 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
9506 Initialize.
9507 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
9508 (linux_breakpoint_kind_from_current_state): New function.
9509 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
9510 * linux-low.h (struct linux_target_ops)
9511 <breakpoint_kind_from_current_state>: New field.
9512 * target.h (struct target_ops): Likewise.
9513 (target_breakpoint_kind_from_current_state): New macro.
9514
9515 2015-11-30 Pedro Alves <palves@redhat.com>
9516
9517 * linux-low.c (linux_resume): Wake up the event loop before
9518 returning.
9519
9520 2015-11-30 Pedro Alves <palves@redhat.com>
9521
9522 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
9523 check.
9524 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
9525 to -1.
9526 * target.c (struct thread_search): New structure.
9527 (thread_search_callback): New function.
9528 (prev_general_thread): New global.
9529 (prepare_to_access_memory, done_accessing_memory): New functions.
9530 * target.h (prepare_to_access_memory, done_accessing_memory):
9531 Replace macros with function declarations.
9532
9533 2015-11-30 Pedro Alves <palves@redhat.com>
9534
9535 PR 14618
9536 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
9537 report TARGET_WAITKIND_NO_RESUMED.
9538 * remote-utils.c (prepare_resume_reply): Handle
9539 TARGET_WAITKIND_NO_RESUMED.
9540 * server.c (report_no_resumed): New global.
9541 (handle_query) <qSupported>: Handle "no-resumed+". Report
9542 "no-resumed+" support.
9543 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
9544 return error if the client doesn't support no-resumed events.
9545 (push_stop_notification): New function.
9546 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
9547 events if the client supports them.
9548
9549 2015-11-30 Pedro Alves <palves@redhat.com>
9550
9551 * linux-low.c (thread_still_has_status_pending_p): Don't check
9552 vCont;t here.
9553 (lwp_resumed): New function.
9554 (status_pending_p_callback): Return early if the LWP is not
9555 supposed to be resumed.
9556
9557 2015-11-30 Pedro Alves <palves@redhat.com>
9558
9559 * linux-low.c (handle_extended_wait): Assert that the LWP's
9560 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
9561 thread create events, leave the new child's status pending.
9562 (linux_low_filter_event): If GDB wants to hear about thread exit
9563 events, leave the LWP marked dead and don't delete it.
9564 (linux_wait_for_event_filtered): Don't check for thread exit.
9565 (filter_exit_event): New function.
9566 (linux_wait_1): Use it, when returning an exit event.
9567 (linux_resume_one_lwp_throw): Assert that the LWP's
9568 waitstatus is TARGET_WAITKIND_IGNORE.
9569 * remote-utils.c (prepare_resume_reply): Handle
9570 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
9571 * server.c (report_thread_events): New global.
9572 (handle_general_set): Handle QThreadEvents.
9573 (handle_query) <qSupported>: Handle and report QThreadEvents+;
9574 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
9575 TARGET_WAITKIND_THREAD_EXITED.
9576 * server.h (report_thread_events): Declare.
9577
9578 2015-11-30 Pedro Alves <palves@redhat.com>
9579
9580 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
9581 the thread's last_resume_kind was resume_stop.
9582
9583 2015-11-30 Pedro Alves <palves@redhat.com>
9584
9585 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
9586 before returning.
9587
9588 2015-11-30 Pedro Alves <palves@redhat.com>
9589
9590 * server.c (handle_v_requests): Handle vCtrlC.
9591
9592 2015-11-30 Pedro Alves <palves@redhat.com>
9593
9594 * gdbthread.h (find_any_thread_of_pid): Declare.
9595 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
9596 functions.
9597 * server.c (handle_query): If current_thread is NULL, look for
9598 another thread of the selected process.
9599
9600 2015-11-26 Daniel Colascione <dancol@dancol.org>
9601 Simon Marchi <simon.marchi@ericsson.com>
9602
9603 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
9604 * server.c (handle_qxfer_threads_worker): Refactor to include thread
9605 name in reply.
9606 * target.h (struct target_ops) <thread_name>: New field.
9607 (target_thread_name): New macro.
9608
9609 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9610
9611 * regcache.h (regcache_invalidate_pid): Add declaration.
9612 * regcache.c (regcache_invalidate_pid): New function, extracted
9613 from regcache_invalidate.
9614 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
9615 Add trivial documentation comment.
9616 * lynx-low.c: Use regcache_invalidate_pid instead of
9617 regcache_invalidate.
9618
9619 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9620
9621 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
9622 and Elf64_auxv_t if the target is Android.
9623
9624 2015-11-22 Doug Evans <xdje42@gmail.com>
9625
9626 * target.h: #include <sys/types.h>.
9627
9628 2015-11-19 Pedro Alves <palves@redhat.com>
9629
9630 * linux-low.c (linux_process_qsupported): Change prototype.
9631 Adjust.
9632 * linux-low.h (struct linux_target_ops) <process_qsupported>:
9633 Change prototype.
9634 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
9635 and adjust to loop over all features.
9636 * server.c (handle_query) <qSupported>: Adjust to call
9637 target_process_qsupported once, passing it a vector of unprocessed
9638 features.
9639 * target.h (struct target_ops) <process_qsupported>: Change
9640 prototype.
9641 (target_process_qsupported): Adjust.
9642
9643 2015-11-19 Pedro Alves <palves@redhat.com>
9644
9645 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
9646 mode.
9647 * configure: Regenerate.
9648
9649 2015-11-19 Pedro Alves <palves@redhat.com>
9650
9651 * configure: Regenerate.
9652
9653 2015-11-19 Yao Qi <yao.qi@linaro.org>
9654
9655 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
9656 type to uint32_t.
9657
9658 2015-11-19 Yao Qi <yao.qi@linaro.org>
9659
9660 * linux-aarch64-low.c (enum aarch64_operand_type): New.
9661 (struct aarch64_operand): Move enum out.
9662
9663 2015-11-19 Yao Qi <yao.qi@linaro.org>
9664
9665 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
9666 struct user_fpsimd_state *.
9667 (aarch64_store_fpregset): Likewise.
9668
9669 2015-11-19 Yao Qi <yao.qi@linaro.org>
9670
9671 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
9672 struct user_pt_regs *.
9673 (aarch64_store_gregset): Likewise.
9674
9675 2015-11-18 Pedro Alves <palves@redhat.com>
9676
9677 * Makefile.in (all_object_files): Add $IPA_OBJS.
9678
9679 2015-11-17 Pedro Alves <palves@redhat.com>
9680
9681 * win32-low.c (win32_resume): Use gdb_signal_from_host,
9682 GDB_SIGNAL_0 and gdb_signal_to_string.
9683
9684 2015-11-17 Pedro Alves <palves@redhat.com>
9685
9686 * win32-low.c (handle_output_debug_string): Remove parameter.
9687 (win32_kill): Remove our_status local and adjust call to
9688 handle_output_debug_string.
9689 (get_child_debug_event): Adjust call to
9690 handle_output_debug_string.
9691
9692 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9693
9694 * linux-mips-low.c (mips_fill_gregset): Add cast.
9695 (mips_store_gregset): Likewise.
9696 (mips_fill_fpregset): Likewise.
9697 (mips_store_fpregset): Likewise.
9698
9699 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9700
9701 * linux-mips-low.c (mips_add_watchpoint): Rename private to
9702 priv.
9703
9704 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9705
9706 * linux-mips-low.c (mips_linux_new_thread): Change type of
9707 watch_type to enum target_hw_bp_type.
9708
9709 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9710
9711 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
9712 Change return type to arm_hwbp_type.
9713
9714 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9715
9716 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
9717 (arm_store_gregset): Likewise.
9718 * linux-arm-low.c (arm_get_hwcap): Likewise.
9719 (arm_read_description): Likewise.
9720
9721 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9722
9723 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
9724
9725 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9726
9727 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
9728 (ppc_fill_vsxregset): Likewise.
9729 (ppc_store_vsxregset): Likewise.
9730 (ppc_fill_vrregset): Likewise.
9731 (ppc_store_vrregset): Likewise.
9732 (ppc_fill_evrregset): Likewise.
9733 (ppc_store_evrregset): Likewise.
9734
9735 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9736
9737 * linux-ppc-low.c (ppc_usrregs_info): Remove
9738 forward-declaration.
9739 (ppc_arch_setup): Move lower in file.
9740
9741 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
9742
9743 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
9744 (ps_pdwrite): Likewise.
9745
9746 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
9747
9748 * linux-arm-low.c (arm_new_thread): Move pointer dereference
9749 to after assert checks.
9750
9751 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
9752
9753 * proc-service.c (ps_pdread): Add/adjust casts.
9754 (ps_pdwrite): Add/adjust casts.
9755
9756 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9757
9758 * server.c (handle_search_memory_1): Cast return value of
9759 memmem.
9760
9761 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9762
9763 * server.c (write_qxfer_response): Change type of data to
9764 gdb_byte *.
9765
9766 2015-10-29 Pedro Alves <palves@redhat.com>
9767
9768 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
9769
9770 2015-10-29 Pedro Alves <palves@redhat.com>
9771
9772 * tracepoint.c (clear_installed_tracepoints): Add casts.
9773
9774 2015-10-29 Pedro Alves <palves@redhat.com>
9775
9776 * server.c (handle_v_cont, process_serial_event): Add enum
9777 gdb_signal casts to signal parsing code.
9778
9779 2015-10-29 Pedro Alves <palves@redhat.com>
9780
9781 * linux-low.h (NULL_REGSET): Define.
9782 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9783 * linux-arm-low.c (arm_regsets): Likewise.
9784 * linux-crisv32-low.c (cris_regsets): Likewise.
9785 * linux-m68k-low.c (m68k_regsets): Likewise.
9786 * linux-mips-low.c (mips_regsets): Likewise.
9787 * linux-nios2-low.c (nios2_regsets): Likewise.
9788 * linux-ppc-low.c (ppc_regsets): Likewise.
9789 * linux-s390-low.c (s390_regsets): Likewise.
9790 * linux-sh-low.c (sh_regsets): Likewise.
9791 * linux-sparc-low.c (sparc_regsets): Likewise.
9792 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9793 * linux-tile-low.c (tile_regsets): Likewise.
9794 * linux-x86-low.c (x86_regsets): Likewise.
9795 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9796
9797 2015-10-29 Pedro Alves <palves@redhat.com>
9798
9799 * linux-low.h (NULL_REGSET): Define.
9800 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9801 * linux-arm-low.c (arm_regsets): Likewise.
9802 * linux-crisv32-low.c (cris_regsets): Likewise.
9803 * linux-m68k-low.c (m68k_regsets): Likewise.
9804 * linux-mips-low.c (mips_regsets): Likewise.
9805 * linux-nios2-low.c (nios2_regsets): Likewise.
9806 * linux-ppc-low.c (ppc_regsets): Likewise.
9807 * linux-s390-low.c (s390_regsets): Likewise.
9808 * linux-sh-low.c (sh_regsets): Likewise.
9809 * linux-sparc-low.c (sparc_regsets): Likewise.
9810 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9811 * linux-tile-low.c (tile_regsets): Likewise.
9812 * linux-x86-low.c (x86_regsets): Likewise.
9813 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9814
9815 2015-10-26 Doug Evans <dje@google.com>
9816
9817 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
9818
9819 2015-10-26 Doug Evans <dje@google.com>
9820
9821 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
9822
9823 2015-10-26 Doug Evans <dje@google.com>
9824
9825 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
9826 for debug_printf.
9827 (attach_thread, find_new_threads_callback): Ditto.
9828
9829 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9830
9831 * mem-break.h (set_breakpoint_data): Remove.
9832
9833 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9834
9835 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
9836 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9837 (initialize_low): Remove set_breakpoint_data call.
9838 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
9839 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
9840 (initialize_low): Remove set_breakpoint_data call.
9841 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
9842 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9843 (initialize_low): Remove set_breakpoint_data call.
9844
9845 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9846
9847 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
9848 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
9849 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
9850 * target.h (target_breakpoint_kind_from_pc): New macro.
9851
9852 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
9853
9854 * linux-low.c (default_breakpoint_kind_from_pc): New function.
9855 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
9856 the default breakpoint kind.
9857
9858 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9859
9860 * linux-arm-low.c (arm_supports_z_point_type): Add software
9861 breakpoint support.
9862
9863 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9864
9865 * linux-arm-low.c: Refactor breakpoint definitions.
9866 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
9867 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
9868
9869 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9870
9871 * Makefile.in: Add arm.c/o.
9872 * configure.srv: Likewise.
9873 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
9874 (arm_breakpoint_kind_from_pc): New function.
9875 (arm_sw_breakpoint_from_kind): Return proper kind.
9876 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
9877
9878 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9879
9880 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
9881 removal.
9882 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
9883 (struct raw_breakpoint) <size>: Remove.
9884 (struct raw_breakpoint) <kind>: Add.
9885 (bp_size): New function.
9886 (bp_opcode): Likewise.
9887 (find_raw_breakpoint_at): Adjust for kind.
9888 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
9889 (remove_memory_breakpoint): Adjust for kind call bp_size.
9890 (set_raw_breakpoint_at): Adjust for kind.
9891 (set_breakpoint): Likewise.
9892 (set_breakpoint_at): Call breakpoint_kind_from_pc.
9893 (delete_raw_breakpoint): Adjust for kind.
9894 (delete_breakpoint): Likewise.
9895 (find_gdb_breakpoint): Likewise.
9896 (set_gdb_breakpoint_1): Likewise.
9897 (set_gdb_breakpoint): Likewise.
9898 (delete_gdb_breakpoint_1): Likewise.
9899 (delete_gdb_breakpoint): Likewise.
9900 (uninsert_raw_breakpoint): Likewise.
9901 (reinsert_raw_breakpoint): Likewise.
9902 (set_breakpoint_data): Remove.
9903 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
9904 (check_mem_read): Adjust for kind call bp_size.
9905 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
9906 (clone_one_breakpoint): Adjust for kind.
9907 * mem-break.h (set_gdb_breakpoint): Likewise.
9908 (delete_gdb_breakpoint): Likewise.
9909 * server.c (process_serial_event): Likewise.
9910
9911 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9912
9913 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
9914 (struct linux_target_ops) <breakpoint>: Remove.
9915 (struct linux_target_ops) <breakpoint_len>: Remove.
9916 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9917 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9918 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
9919 (arm_sw_breakpoint_from_kind): New function.
9920 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
9921 (struct linux_target_ops) <breakpoint>: Remove.
9922 (struct linux_target_ops) <breakpoint_len>: Remove.
9923 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9924 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9925 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
9926 (struct linux_target_ops) <breakpoint>: Remove.
9927 (struct linux_target_ops) <breakpoint_len>: Remove.
9928 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9929 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9930 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
9931 (struct linux_target_ops) <breakpoint>: Remove.
9932 (struct linux_target_ops) <breakpoint_len>: Remove.
9933 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9934 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9935 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
9936 and sw_breakpoint_from_kind to increment the pc.
9937 (linux_breakpoint_kind_from_pc): New function.
9938 (linux_sw_breakpoint_from_kind): New function.
9939 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
9940 (initialize_low): Call breakpoint_kind_from_pc and
9941 sw_breakpoint_from_kind to replace breakpoint_data/len.
9942 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
9943 New field.
9944 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
9945 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
9946 (struct linux_target_ops) <breakpoint>: Remove.
9947 (struct linux_target_ops) <breakpoint_len>: Remove.
9948 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9949 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9950 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
9951 (struct linux_target_ops) <breakpoint>: Remove.
9952 (struct linux_target_ops) <breakpoint_len>: Remove.
9953 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9954 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9955 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
9956 (struct linux_target_ops) <breakpoint>: Remove.
9957 (struct linux_target_ops) <breakpoint_len>: Remove.
9958 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9959 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9960 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
9961 (struct linux_target_ops) <breakpoint>: Remove.
9962 (struct linux_target_ops) <breakpoint_len>: Remove.
9963 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9964 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9965 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
9966 (struct linux_target_ops) <breakpoint>: Remove.
9967 (struct linux_target_ops) <breakpoint_len>: Remove.
9968 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9969 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9970 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
9971 (struct linux_target_ops) <breakpoint>: Remove.
9972 (struct linux_target_ops) <breakpoint_len>: Remove.
9973 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9974 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9975 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
9976 (struct linux_target_ops) <breakpoint>: Remove.
9977 (struct linux_target_ops) <breakpoint_len>: Remove.
9978 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9979 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9980 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
9981 (struct linux_target_ops) <breakpoint>: Remove.
9982 (struct linux_target_ops) <breakpoint_len>: Remove.
9983 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9984 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9985 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
9986 (struct linux_target_ops) <breakpoint>: Remove.
9987 (struct linux_target_ops) <breakpoint_len>: Remove.
9988 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9989 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9990 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
9991 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
9992 (struct linux_target_ops) <breakpoint>: Remove.
9993 (struct linux_target_ops) <breakpoint_len>: Remove.
9994 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9995 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9996 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
9997 (struct linux_target_ops) <breakpoint>: Remove.
9998 (struct linux_target_ops) <breakpoint_len>: Remove.
9999 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10000 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10001
10002 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10003
10004 * linux-cris-low.c (cris_get_pc): Remove void arg.
10005
10006 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
10007
10008 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
10009 variable name.
10010
10011 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
10012
10013 * inferiors.c (thread_pid_matches_callback): New function.
10014 (find_thread_process): New function.
10015 (remove_thread): Reset current_thread.
10016 (remove_process): Assert threads have been removed first.
10017
10018 2015-10-15 Yao Qi <yao.qi@linaro.org>
10019
10020 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
10021 if it is 3.
10022 (aarch64_remove_point): Likewise.
10023 * regcache.c (regcache_register_size): New function.
10024
10025 2015-10-12 Yao Qi <yao.qi@linaro.org>
10026
10027 * linux-aarch64-low.c: Update all callers as emit_load_store
10028 is renamed to aarch64_emit_load_store.
10029
10030 2015-10-12 Yao Qi <yao.qi@linaro.org>
10031
10032 * linux-aarch64-low.c: Update all callers of function renaming
10033 from emit_insn to aarch64_emit_insn.
10034
10035 2015-10-12 Yao Qi <yao.qi@linaro.org>
10036
10037 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
10038 arch/aarch64-insn.h.
10039 (struct aarch64_memory_operand): Likewise.
10040 (ENCODE): Likewise.
10041 (emit_insn): Move to arch/aarch64-insn.c.
10042 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
10043 (emit_load_store): Move to arch/aarch64-insn.c.
10044 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
10045 (can_encode_int32): Remove.
10046
10047 2015-10-12 Yao Qi <yao.qi@linaro.org>
10048
10049 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
10050 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
10051 (aarch64_relocate_instruction): Likewise.
10052 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
10053 (struct aarch64_insn_visitor): Likewise.
10054
10055 2015-10-12 Yao Qi <yao.qi@linaro.org>
10056
10057 * linux-aarch64-low.c (struct aarch64_insn_data): New.
10058 (struct aarch64_insn_visitor): New.
10059 (struct aarch64_insn_relocation_data): New.
10060 (aarch64_ftrace_insn_reloc_b): New function.
10061 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
10062 (aarch64_ftrace_insn_reloc_cb): Likewise.
10063 (aarch64_ftrace_insn_reloc_tb): Likewise.
10064 (aarch64_ftrace_insn_reloc_adr): Likewise.
10065 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
10066 (aarch64_ftrace_insn_reloc_others): Likewise.
10067 (visitor): New.
10068 (aarch64_relocate_instruction): Use visitor.
10069
10070 2015-10-12 Yao Qi <yao.qi@linaro.org>
10071
10072 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
10073 int. Add argument buf.
10074 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
10075 aarch64_relocate_instruction.
10076
10077 2015-10-12 Yao Qi <yao.qi@linaro.org>
10078
10079 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
10080 argument insn. Remove local variable insn. Don't call
10081 target_read_uint32.
10082 (aarch64_install_fast_tracepoint_jump_pad): Call
10083 target_read_uint32.
10084
10085 2015-09-30 Yao Qi <yao.qi@linaro.org>
10086
10087 * linux-aarch64-low.c (emit_movk): Shorten a long line.
10088 (emit_load_store_pair): Likewise.
10089
10090 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
10091
10092 * dll.c (match_dll): Add cast(s).
10093 (unloaded_dll): Likewise.
10094 * linux-low.c (second_thread_of_pid_p): Likewise.
10095 (delete_lwp_callback): Likewise.
10096 (count_events_callback): Likewise.
10097 (select_event_lwp_callback): Likewise.
10098 (linux_set_resume_request): Likewise.
10099 * server.c (accumulate_file_name_length): Likewise.
10100 (emit_dll_description): Likewise.
10101 (handle_qxfer_threads_worker): Likewise.
10102 (visit_actioned_threads): Likewise.
10103 * thread-db.c (any_thread_of): Likewise.
10104 * tracepoint.c (same_process_p): Likewise.
10105 (match_blocktype): Likewise.
10106 (build_traceframe_info_xml): Likewise.
10107
10108 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
10109
10110 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
10111 assignment.
10112 (gdb_unparse_agent_expr): Likewise.
10113 * hostio.c (require_data): Likewise.
10114 (handle_pread): Likewise.
10115 * linux-low.c (disable_regset): Likewise.
10116 (fetch_register): Likewise.
10117 (store_register): Likewise.
10118 (get_dynamic): Likewise.
10119 (linux_qxfer_libraries_svr4): Likewise.
10120 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
10121 (set_fast_tracepoint_jump): Likewise.
10122 (uninsert_fast_tracepoint_jumps_at): Likewise.
10123 (reinsert_fast_tracepoint_jumps_at): Likewise.
10124 (validate_inserted_breakpoint): Likewise.
10125 (clone_agent_expr): Likewise.
10126 * regcache.c (init_register_cache): Likewise.
10127 * remote-utils.c (putpkt_binary_1): Likewise.
10128 (decode_M_packet): Likewise.
10129 (decode_X_packet): Likewise.
10130 (look_up_one_symbol): Likewise.
10131 (relocate_instruction): Likewise.
10132 (monitor_output): Likewise.
10133 * server.c (handle_search_memory): Likewise.
10134 (handle_qxfer_exec_file): Likewise.
10135 (handle_qxfer_libraries): Likewise.
10136 (handle_qxfer): Likewise.
10137 (handle_query): Likewise.
10138 (handle_v_cont): Likewise.
10139 (handle_v_run): Likewise.
10140 (captured_main): Likewise.
10141 * target.c (write_inferior_memory): Likewise.
10142 * thread-db.c (try_thread_db_load_from_dir): Likewise.
10143 * tracepoint.c (init_trace_buffer): Likewise.
10144 (add_tracepoint_action): Likewise.
10145 (add_traceframe): Likewise.
10146 (add_traceframe_block): Likewise.
10147 (cmd_qtdpsrc): Likewise.
10148 (cmd_qtdv): Likewise.
10149 (cmd_qtstatus): Likewise.
10150 (response_source): Likewise.
10151 (response_tsv): Likewise.
10152 (cmd_qtnotes): Likewise.
10153 (gdb_collect): Likewise.
10154 (initialize_tracepoint): Likewise.
10155
10156 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10157
10158 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
10159 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
10160 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
10161 <NOP>: New.
10162 (enum aarch64_condition_codes): New enum.
10163 (w0): New static global.
10164 (fp): Likewise.
10165 (lr): Likewise.
10166 (struct aarch64_memory_operand) <type>: New
10167 MEMORY_OPERAND_POSTINDEX type.
10168 (postindex_memory_operand): New helper function.
10169 (emit_ret): New function.
10170 (emit_load_store_pair): New function, factored out of emit_stp
10171 with support for MEMORY_OPERAND_POSTINDEX.
10172 (emit_stp): Rewrite using emit_load_store_pair.
10173 (emit_ldp): New function.
10174 (emit_load_store): Likewise.
10175 (emit_ldr): Mention post-index instruction in comment.
10176 (emit_ldrh): New function.
10177 (emit_ldrb): New function.
10178 (emit_ldrsw): Mention post-index instruction in comment.
10179 (emit_str): Likewise.
10180 (emit_subs): New function.
10181 (emit_cmp): Likewise.
10182 (emit_and): Likewise.
10183 (emit_orr): Likewise.
10184 (emit_orn): Likewise.
10185 (emit_eor): Likewise.
10186 (emit_mvn): Likewise.
10187 (emit_lslv): Likewise.
10188 (emit_lsrv): Likewise.
10189 (emit_asrv): Likewise.
10190 (emit_mul): Likewise.
10191 (emit_sbfm): Likewise.
10192 (emit_sbfx): Likewise.
10193 (emit_ubfm): Likewise.
10194 (emit_ubfx): Likewise.
10195 (emit_csinc): Likewise.
10196 (emit_cset): Likewise.
10197 (emit_nop): Likewise.
10198 (emit_ops_insns): New helper function.
10199 (emit_pop): Likewise.
10200 (emit_push): Likewise.
10201 (aarch64_emit_prologue): New function.
10202 (aarch64_emit_epilogue): Likewise.
10203 (aarch64_emit_add): Likewise.
10204 (aarch64_emit_sub): Likewise.
10205 (aarch64_emit_mul): Likewise.
10206 (aarch64_emit_lsh): Likewise.
10207 (aarch64_emit_rsh_signed): Likewise.
10208 (aarch64_emit_rsh_unsigned): Likewise.
10209 (aarch64_emit_ext): Likewise.
10210 (aarch64_emit_log_not): Likewise.
10211 (aarch64_emit_bit_and): Likewise.
10212 (aarch64_emit_bit_or): Likewise.
10213 (aarch64_emit_bit_xor): Likewise.
10214 (aarch64_emit_bit_not): Likewise.
10215 (aarch64_emit_equal): Likewise.
10216 (aarch64_emit_less_signed): Likewise.
10217 (aarch64_emit_less_unsigned): Likewise.
10218 (aarch64_emit_ref): Likewise.
10219 (aarch64_emit_if_goto): Likewise.
10220 (aarch64_emit_goto): Likewise.
10221 (aarch64_write_goto_address): Likewise.
10222 (aarch64_emit_const): Likewise.
10223 (aarch64_emit_call): Likewise.
10224 (aarch64_emit_reg): Likewise.
10225 (aarch64_emit_pop): Likewise.
10226 (aarch64_emit_stack_flush): Likewise.
10227 (aarch64_emit_zero_ext): Likewise.
10228 (aarch64_emit_swap): Likewise.
10229 (aarch64_emit_stack_adjust): Likewise.
10230 (aarch64_emit_int_call_1): Likewise.
10231 (aarch64_emit_void_call_2): Likewise.
10232 (aarch64_emit_eq_goto): Likewise.
10233 (aarch64_emit_ne_goto): Likewise.
10234 (aarch64_emit_lt_goto): Likewise.
10235 (aarch64_emit_le_goto): Likewise.
10236 (aarch64_emit_gt_goto): Likewise.
10237 (aarch64_emit_ge_got): Likewise.
10238 (aarch64_emit_ops_impl): New static global variable.
10239 (aarch64_emit_ops): New target function, return
10240 &aarch64_emit_ops_impl.
10241 (struct linux_target_ops): Install it.
10242
10243 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10244
10245 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
10246 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
10247 aarch64-ipa.o.
10248 * linux-aarch64-ipa.c: New file.
10249 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
10250 and endian.h.
10251 (aarch64_get_thread_area): New target method.
10252 (extract_signed_bitfield): New helper function.
10253 (aarch64_decode_ldr_literal): New function.
10254 (enum aarch64_opcodes): New enum.
10255 (struct aarch64_register): New struct.
10256 (struct aarch64_operand): New struct.
10257 (x0): New static global.
10258 (x1): Likewise.
10259 (x2): Likewise.
10260 (x3): Likewise.
10261 (x4): Likewise.
10262 (w2): Likewise.
10263 (ip0): Likewise.
10264 (sp): Likewise.
10265 (xzr): Likewise.
10266 (aarch64_register): New helper function.
10267 (register_operand): Likewise.
10268 (immediate_operand): Likewise.
10269 (struct aarch64_memory_operand): New struct.
10270 (offset_memory_operand): New helper function.
10271 (preindex_memory_operand): Likewise.
10272 (enum aarch64_system_control_registers): New enum.
10273 (ENCODE): New macro.
10274 (emit_insn): New helper function.
10275 (emit_b): New function.
10276 (emit_bcond): Likewise.
10277 (emit_cb): Likewise.
10278 (emit_tb): Likewise.
10279 (emit_blr): Likewise.
10280 (emit_stp): Likewise.
10281 (emit_ldp_q_offset): Likewise.
10282 (emit_stp_q_offset): Likewise.
10283 (emit_load_store): Likewise.
10284 (emit_ldr): Likewise.
10285 (emit_ldrsw): Likewise.
10286 (emit_str): Likewise.
10287 (emit_ldaxr): Likewise.
10288 (emit_stxr): Likewise.
10289 (emit_stlr): Likewise.
10290 (emit_data_processing_reg): Likewise.
10291 (emit_data_processing): Likewise.
10292 (emit_add): Likewise.
10293 (emit_sub): Likewise.
10294 (emit_mov): Likewise.
10295 (emit_movk): Likewise.
10296 (emit_mov_addr): Likewise.
10297 (emit_mrs): Likewise.
10298 (emit_msr): Likewise.
10299 (emit_sevl): Likewise.
10300 (emit_wfe): Likewise.
10301 (append_insns): Likewise.
10302 (can_encode_int32_in): New helper function.
10303 (aarch64_relocate_instruction): New function.
10304 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
10305 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
10306 (struct linux_target_ops): Install aarch64_get_thread_area,
10307 aarch64_install_fast_tracepoint_jump_pad and
10308 aarch64_get_min_fast_tracepoint_insn_len.
10309
10310 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10311
10312 * Makefile.in (aarch64-insn.o): New rule.
10313 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
10314
10315 2015-09-21 Yao Qi <yao.qi@linaro.org>
10316
10317 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
10318
10319 2015-09-21 Yao Qi <yao.qi@linaro.org>
10320
10321 * tracepoint.c (max_jump_pad_size): Remove.
10322
10323 2015-09-18 Yao Qi <yao.qi@linaro.org>
10324
10325 * linux-aarch64-low.c: Don't include sys/uio.h.
10326 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
10327
10328 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
10329
10330 * tracepoint.c (eval_result_type): Change prototype.
10331 (condition_true_at_tracepoint): Fix argument to compiled_cond.
10332
10333 2015-09-15 Pedro Alves <palves@redhat.com>
10334
10335 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
10336 Check whether to report exec events instead of checking whether
10337 multiprocess is enabled.
10338
10339 2015-09-15 Pedro Alves <palves@redhat.com>
10340
10341 PR remote/18965
10342 * remote-utils.c (prepare_resume_reply): Merge
10343 TARGET_WAITKIND_VFORK_DONE switch case with the
10344 TARGET_WAITKIND_FORKED case.
10345
10346 2015-09-15 Yao Qi <yao.qi@linaro.org>
10347
10348 * server.c (handle_query): Check string comparison using
10349 "else if" instead of "if".
10350
10351 2015-09-15 Yao Qi <yao.qi@linaro.org>
10352
10353 * server.c (vCont_supported): New global variable.
10354 (handle_query): Set vCont_supported to 1 if "vContSupported+"
10355 matches. Append ";vContSupported+" to own_buf.
10356 (handle_v_requests): Append ";s;S" to own_buf if target supports
10357 hardware single step or vCont_supported is false.
10358 (capture_main): Set vCont_supported to zero.
10359
10360 2015-09-15 Yao Qi <yao.qi@linaro.org>
10361
10362 * linux-low.c (linux_supports_conditional_breakpoints): Rename
10363 it to ...
10364 (linux_supports_hardware_single_step): ... New function.
10365 (linux_target_ops): Update.
10366 * lynx-low.c (lynx_target_ops): Set field
10367 supports_hardware_single_step to target_can_do_hardware_single_step.
10368 * nto-low.c (nto_target_ops): Likewise.
10369 * spu-low.c (spu_target_ops): Likewise.
10370 * win32-low.c (win32_target_ops): Likewise.
10371 * target.c (target_can_do_hardware_single_step): New function.
10372 * target.h (struct target_ops) <supports_conditional_breakpoints>:
10373 Remove. <supports_hardware_single_step>: New field.
10374 (target_supports_conditional_breakpoints): Remove.
10375 (target_supports_hardware_single_step): New macro.
10376 (target_can_do_hardware_single_step): Declare.
10377 * server.c (handle_query): Use target_supports_hardware_single_step
10378 instead of target_supports_conditional_breakpoints.
10379
10380 2015-09-15 Yao Qi <yao.qi@linaro.org>
10381
10382 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
10383 function.
10384 (struct linux_target_ops the_low_target): Install
10385 aarch64_linux_siginfo_fixup.
10386
10387 2015-09-11 Don Breazeal <donb@codesourcery.com>
10388 Luis Machado <lgustavo@codesourcery.com>
10389
10390 * linux-low.c (linux_mourn): Static declaration.
10391 (linux_arch_setup): Move in front of
10392 handle_extended_wait.
10393 (linux_arch_setup_thread): New function.
10394 (handle_extended_wait): Handle exec events. Call
10395 linux_arch_setup_thread. Make event_lwp argument a
10396 pointer-to-a-pointer.
10397 (check_zombie_leaders): Do not check stopped threads.
10398 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
10399 (linux_low_filter_event): Add lwp and thread for exec'ing
10400 non-leader thread if leader thread has been deleted.
10401 Refactor code into linux_arch_setup_thread and call it.
10402 Pass child lwp pointer by reference to handle_extended_wait.
10403 (linux_wait_for_event_filtered): Update comment.
10404 (linux_wait_1): Prevent clobbering exec event status.
10405 (linux_supports_exec_events): New function.
10406 (linux_target_ops) <supports_exec_events>: Initialize new member.
10407 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
10408 new member.
10409 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
10410 * server.c (report_exec_events): New global variable.
10411 (handle_query): Handle qSupported query for exec-events feature.
10412 (captured_main): Initialize report_exec_events.
10413 * server.h (report_exec_events): Declare new global variable.
10414 * target.h (struct target_ops) <supports_exec_events>: New
10415 member.
10416 (target_supports_exec_events): New macro.
10417 * win32-low.c (win32_target_ops) <supports_exec_events>:
10418 Initialize new member.
10419
10420 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
10421
10422 * linux-low.c (linux_low_enable_btrace): Remove.
10423 (linux_target_ops): Replace linux_low_enable_btrace with
10424 linux_enable_btrace.
10425
10426 2015-09-03 Yao Qi <yao.qi@linaro.org>
10427
10428 * linux-aarch64-low.c (aarch64_insert_point): Call
10429 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
10430 returns true.
10431
10432 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10433
10434 * linux-low.c (check_stopped_by_breakpoint): Use
10435 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
10436
10437 2015-08-27 Pedro Alves <palves@redhat.com>
10438
10439 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
10440
10441 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
10442
10443 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
10444 the XNEW-family equivalent.
10445 (compile_bytecodes): Likewise.
10446 * dll.c (loaded_dll): Likewise.
10447 * event-loop.c (append_callback_event): Likewise.
10448 (create_file_handler): Likewise.
10449 (create_file_event): Likewise.
10450 * hostio.c (handle_open): Likewise.
10451 * inferiors.c (add_thread): Likewise.
10452 (add_process): Likewise.
10453 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
10454 * linux-arm-low.c (arm_new_process): Likewise.
10455 (arm_new_thread): Likewise.
10456 * linux-low.c (add_to_pid_list): Likewise.
10457 (linux_add_process): Likewise.
10458 (handle_extended_wait): Likewise.
10459 (add_lwp): Likewise.
10460 (enqueue_one_deferred_signal): Likewise.
10461 (enqueue_pending_signal): Likewise.
10462 (linux_resume_one_lwp_throw): Likewise.
10463 (linux_resume_one_thread): Likewise.
10464 (linux_read_memory): Likewise.
10465 (linux_write_memory): Likewise.
10466 * linux-mips-low.c (mips_linux_new_process): Likewise.
10467 (mips_linux_new_thread): Likewise.
10468 (mips_add_watchpoint): Likewise.
10469 * linux-x86-low.c (initialize_low_arch): Likewise.
10470 * lynx-low.c (lynx_add_process): Likewise.
10471 * mem-break.c (set_raw_breakpoint_at): Likewise.
10472 (set_breakpoint): Likewise.
10473 (add_condition_to_breakpoint): Likewise.
10474 (add_commands_to_breakpoint): Likewise.
10475 (clone_agent_expr): Likewise.
10476 (clone_one_breakpoint): Likewise.
10477 * regcache.c (new_register_cache): Likewise.
10478 * remote-utils.c (look_up_one_symbol): Likewise.
10479 * server.c (queue_stop_reply): Likewise.
10480 (start_inferior): Likewise.
10481 (queue_stop_reply_callback): Likewise.
10482 (handle_target_event): Likewise.
10483 * spu-low.c (fetch_ppc_memory): Likewise.
10484 (store_ppc_memory): Likewise.
10485 * target.c (set_target_ops): Likewise.
10486 * thread-db.c (thread_db_load_search): Likewise.
10487 (try_thread_db_load_1): Likewise.
10488 * tracepoint.c (add_tracepoint): Likewise.
10489 (add_tracepoint_action): Likewise.
10490 (create_trace_state_variable): Likewise.
10491 (cmd_qtdpsrc): Likewise.
10492 (cmd_qtro): Likewise.
10493 (add_while_stepping_state): Likewise.
10494 * win32-low.c (child_add_thread): Likewise.
10495 (get_image_name): Likewise.
10496
10497 2015-08-25 Yao Qi <yao.qi@linaro.org>
10498
10499 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
10500
10501 2015-08-25 Yao Qi <yao.qi@linaro.org>
10502
10503 * Makefile.in (aarch64-linux.o): New rule.
10504 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
10505 srv_tgtobj.
10506 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
10507 (aarch64_init_debug_reg_state): Make it extern.
10508 (aarch64_linux_prepare_to_resume): Remove.
10509
10510 2015-08-25 Yao Qi <yao.qi@linaro.org>
10511
10512 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
10513 lwp_arch_private_info and ptid_of_lwp.
10514
10515 2015-08-25 Yao Qi <yao.qi@linaro.org>
10516
10517 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
10518 Find proc_info by find_process_pid. All callers updated.
10519
10520 2015-08-25 Yao Qi <yao.qi@linaro.org>
10521
10522 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
10523 Remove.
10524 (debug_reg_change_callback): Remove.
10525 (aarch64_notify_debug_reg_change): Remove.
10526
10527 2015-08-25 Yao Qi <yao.qi@linaro.org>
10528
10529 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
10530 Call current_lwp_ptid.
10531
10532 2015-08-25 Yao Qi <yao.qi@linaro.org>
10533
10534 * linux-aarch64-low.c (debug_reg_change_callback): Use
10535 debug_printf.
10536
10537 2015-08-25 Yao Qi <yao.qi@linaro.org>
10538
10539 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
10540
10541 2015-08-25 Yao Qi <yao.qi@linaro.org>
10542
10543 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
10544
10545 2015-08-25 Yao Qi <yao.qi@linaro.org>
10546
10547 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
10548 the code.
10549
10550 2015-08-25 Yao Qi <yao.qi@linaro.org>
10551
10552 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
10553 Remove.
10554 (debug_reg_change_callback): Remove argument entry and add argument
10555 lwp. Remove local variable thread. Don't print thread id in the
10556 debugging output. Don't check whether pid of thread equals to pid.
10557 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
10558 iterate_over_lwps instead find_inferior.
10559
10560 2015-08-24 Pedro Alves <palves@redhat.com>
10561
10562 * inferiors.c (get_first_process): New function.
10563 * inferiors.h (get_first_process): New declaration.
10564 * remote-utils.c (read_ptid): Default to the first process in the
10565 list, instead of to the current thread's process.
10566
10567 2015-08-24 Pedro Alves <palves@redhat.com>
10568
10569 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
10570 * event-loop.c: Likewise.
10571 * remote-utils.c: Likewise.
10572 * tracepoint.c: Likewise.
10573
10574 2015-08-24 Pedro Alves <palves@redhat.com>
10575
10576 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
10577 ptid_get_lwp.
10578
10579 2015-08-21 Pedro Alves <palves@redhat.com>
10580
10581 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
10582 instead of literal 1.
10583
10584 2015-08-21 Pedro Alves <palves@redhat.com>
10585
10586 * tdesc.c (default_description): Explicitly zero-initialize.
10587
10588 2015-08-21 Pedro Alves <palves@redhat.com>
10589
10590 PR gdb/18749
10591 * inferiors.c (remove_thread): Discard any pending stop reply for
10592 this thread.
10593 * server.c (remove_all_on_match_pid): Rename to ...
10594 (remove_all_on_match_ptid): ... this. Work with a filter ptid
10595 instead of a pid.
10596 (discard_queued_stop_replies): Change parameter to a ptid. Now
10597 extern.
10598 (handle_v_kill, kill_inferior_callback, captured_main)
10599 (process_serial_event): Adjust.
10600 * server.h (discard_queued_stop_replies): Declare.
10601
10602 2015-08-21 Pedro Alves <palves@redhat.com>
10603
10604 * linux-low.c (wait_for_sigstop): Always switch to no thread
10605 selected if the previously current thread dies.
10606 * lynx-low.c (lynx_request_interrupt): Use the first thread's
10607 process instead of the current thread's.
10608 * remote-utils.c (input_interrupt): Don't check if there's no
10609 current thread.
10610 * server.c (gdb_read_memory, gdb_write_memory): If setting the
10611 current thread to the general thread fails, error out.
10612 (handle_qxfer_auxv, handle_qxfer_libraries)
10613 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
10614 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
10615 (handle_query): Check if there's a thread selected instead of
10616 checking whether there's any thread in the thread list.
10617 (handle_qxfer_threads, handle_qxfer_btrace)
10618 (handle_qxfer_btrace_conf): Don't error out early if there's no
10619 thread in the thread list.
10620 (handle_v_cont, myresume): Don't set the current thread to the
10621 continue thread.
10622 (process_serial_event) <Hg handling>: Also set thread_id if the
10623 previous general thread is still alive.
10624 (process_serial_event) <g/G handling>: If setting the current
10625 thread to the general thread fails, error out.
10626 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
10627 thread's lwp instead of the current thread's.
10628 * target.c (set_desired_thread): If the desired thread was not
10629 found, leave the current thread pointing to NULL. Return an int
10630 (boolean) indicating success.
10631 * target.h (set_desired_thread): Change return type to int.
10632
10633 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
10634
10635 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
10636 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
10637 #includes.
10638 (ps_get_thread_area): New function.
10639
10640 2015-08-19 Gary Benson <gbenson@redhat.com>
10641
10642 * hostio.c (handle_pread): Do not attempt to read more data
10643 than hostio_reply_with_data can fit in a packet.
10644
10645 2015-08-18 Joel Brobecker <brobecker@adacore.com>
10646
10647 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
10648
10649 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
10650
10651 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
10652
10653 2015-08-06 Pedro Alves <palves@redhat.com>
10654
10655 * tracepoint.c (expr_eval_result): Now an int.
10656
10657 2015-08-06 Pedro Alves <palves@redhat.com>
10658
10659 * gdbthread.h (struct regcache): Forward declare.
10660 (struct thread_info) <regcache_data>: Now a struct regcache
10661 pointer.
10662 * inferiors.c (inferior_regcache_data)
10663 (set_inferior_regcache_data): Now work with struct regcache
10664 pointers.
10665 * inferiors.h (struct regcache): Forward declare.
10666 (inferior_regcache_data, set_inferior_regcache_data): Now work
10667 with struct regcache pointers.
10668 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
10669 (free_register_cache_thread): Remove struct regcache pointer
10670 casts.
10671
10672 2015-08-06 Pedro Alves <palves@redhat.com>
10673
10674 * server.c (captured_main): On error, print the exception message
10675 to stderr, and if run_once is set, throw a quit.
10676
10677 2015-08-06 Pedro Alves <palves@redhat.com>
10678
10679 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
10680 the current thread.
10681
10682 2015-08-06 Pedro Alves <palves@redhat.com>
10683
10684 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
10685 reading beyond the passed in buffer length.
10686
10687 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
10688
10689 * tracepoint.c (symbol_list) <required>: Remove.
10690
10691 2015-08-06 Pedro Alves <palves@redhat.com>
10692
10693 * linux-low.c (handle_extended_wait): Set the fork child's suspend
10694 count if stopping and suspending threads.
10695 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
10696 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
10697 (linux_detach): Complete an ongoing step-over.
10698 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
10699 throughout.
10700 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
10701 (linux_wait_1): If passing a signal to the inferior after
10702 finishing a step-over, unsuspend and re-resume all lwps. If we
10703 see a single-step event but the thread should be continuing, don't
10704 pass the trap to gdb.
10705 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
10706 internal_error instead of gdb_assert.
10707 (enqueue_pending_signal): New function.
10708 (check_ptrace_stopped_lwp_gone): Add debug output.
10709 (start_step_over): Use internal_error instead of gdb_assert.
10710 (complete_ongoing_step_over): New function.
10711 (linux_resume_one_thread): Don't resume a suspended thread.
10712 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
10713 it stepping.
10714
10715 2015-08-06 Pedro Alves <palves@redhat.com>
10716
10717 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
10718 (linux_thread_alive): Use lwp_is_marked_dead.
10719 (extended_event_reported): Delete.
10720 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
10721 instead of extended_event_reported.
10722 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
10723 as well.
10724 (lwp_is_marked_dead): New function.
10725 (lwp_running): Use lwp_is_marked_dead.
10726 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
10727 comment.
10728
10729 2015-08-06 Pedro Alves <palves@redhat.com>
10730
10731 * linux-low.c (linux_wait_1): Move fork event output out of the
10732 !report_to_gdb check. Pass event_child->waitstatus to
10733 target_waitstatus_to_string instead of ourstatus.
10734
10735 2015-08-04 Yao Qi <yao.qi@linaro.org>
10736
10737 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
10738 if current_thread is 32 bit.
10739
10740 2015-08-04 Yao Qi <yao.qi@linaro.org>
10741
10742 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
10743 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
10744 * server.c (extended_protocol): Remove "static".
10745 * server.h (extended_protocol): Declare it.
10746
10747 2015-08-04 Yao Qi <yao.qi@linaro.org>
10748
10749 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
10750 both aarch64 and aarch32.
10751 (aarch64_set_pc): Likewise.
10752
10753 2015-08-04 Yao Qi <yao.qi@linaro.org>
10754
10755 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
10756 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
10757 arm-with-neon.xml to srv_xmlfiles.
10758 * linux-aarch64-low.c: Include linux-aarch32-low.h.
10759 (is_64bit_tdesc): New function.
10760 (aarch64_linux_read_description): New function.
10761 (aarch64_arch_setup): Call aarch64_linux_read_description.
10762 (regs_info): Rename to regs_info_aarch64.
10763 (aarch64_regs_info): Return right regs_info.
10764 (initialize_low_arch): Call initialize_low_arch_aarch32.
10765
10766 2015-08-04 Yao Qi <yao.qi@linaro.org>
10767
10768 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
10769 * linux-aarch32-low.c: New file.
10770 * linux-aarch32-low.h: New file.
10771 * linux-arm-low.c (arm_fill_gregset): Move it to
10772 linux-aarch32-low.c.
10773 (arm_store_gregset): Likewise.
10774 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
10775 (arm_store_vfpregset): Call arm_store_vfpregset_num.
10776 (arm_arch_setup): Check if PTRACE_GETREGSET works.
10777 (regs_info): Rename to regs_info_arm.
10778 (arm_regs_info): Return regs_info_aarch32 if
10779 have_ptrace_getregset is 1 and target description is
10780 arm_with_neon or arm_with_vfpv3.
10781 (initialize_low_arch): Don't call init_registers_arm_with_neon.
10782 Call initialize_low_arch_aarch32 instead.
10783
10784 2015-08-04 Yao Qi <yao.qi@linaro.org>
10785
10786 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
10787 * linux-low.c: ... here.
10788 * linux-low.h (have_ptrace_getregset): Declare it.
10789
10790 2015-08-04 Pedro Alves <palves@redhat.com>
10791
10792 * thread-db.c (struct thread_db): Use new typedefs.
10793 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
10794 CHK calls.
10795 (disable_thread_event_reporting): Cast result of dlsym to
10796 destination function pointer type.
10797 (thread_db_mourn): Use td_ta_delete_ftype.
10798
10799 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
10800
10801 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
10802 arch variant.
10803 (CDX_BREAKPOINT): Define for R2.
10804 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
10805 (the_low_target): Add comments.
10806
10807 2015-07-30 Yao Qi <yao.qi@linaro.org>
10808
10809 * linux-arm-low.c (arm_hwcap): Remove it.
10810 (arm_read_description): New local variable arm_hwcap. Don't
10811 set arm_hwcap to zero.
10812
10813 2015-07-30 Yao Qi <yao.qi@linaro.org>
10814
10815 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
10816 Use regcache->tdesc instead.
10817 (arm_store_wmmxregset): Likewise.
10818 (arm_fill_vfpregset): Likewise.
10819 (arm_store_vfpregset): Likewise.
10820
10821 2015-07-30 Yao Qi <yao.qi@linaro.org>
10822
10823 * linux-arm-low.c: Include arch/arm.h.
10824 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
10825 (arm_store_gregset): Likewise.
10826
10827 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
10828
10829 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
10830 ptrace's 4th parameter.
10831
10832 2015-07-27 Yao Qi <yao.qi@linaro.org>
10833
10834 * configure.srv (case aarch64*-*-linux*): Don't set
10835 srv_linux_usrregs.
10836
10837 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
10838
10839 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
10840 sys/ptrace.h.
10841 * linux-arm-low.c: Likewise.
10842 * linux-cris-low.c: Likewise.
10843 * linux-crisv32-low.c: Likewise.
10844 * linux-low.c: Likewise.
10845 * linux-m68k-low.c: Likewise.
10846 * linux-mips-low.c: Likewise.
10847 * linux-nios2-low.c: Likewise.
10848 * linux-s390-low.c: Likewise.
10849 * linux-sparc-low.c: Likewise.
10850 * linux-tic6x-low.c: Likewise.
10851 * linux-tile-low.c: Likewise.
10852 * linux-x86-low.c: Likewise.
10853
10854 2015-07-24 Pedro Alves <palves@redhat.com>
10855
10856 * config.in: Regenerate.
10857 * configure: Regenerate.
10858
10859 2015-07-24 Pedro Alves <palves@redhat.com>
10860
10861 * acinclude.m4: Include ../ptrace.m4.
10862 * configure.ac: Call GDB_AC_PTRACE.
10863 * config.in, configure: Regenerate.
10864
10865 2015-07-24 Yao Qi <yao.qi@linaro.org>
10866
10867 * linux-low.c (linux_create_inferior): Remove setting to
10868 proc->priv->new_inferior.
10869 (linux_attach): Likewise.
10870 (linux_low_filter_event): Likewise.
10871 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
10872
10873 2015-07-24 Yao Qi <yao.qi@linaro.org>
10874
10875 * linux-low.c (linux_arch_setup): New function.
10876 (linux_low_filter_event): If proc->tdesc is NULL and
10877 proc->attached is true, call the_low_target.arch_setup.
10878 Otherwise, keep status pending, and return.
10879 (linux_resume_one_lwp_throw): Don't call get_pc if
10880 thread->while_stepping isn't NULL. Don't call
10881 get_thread_regcache if proc->tdesc is NULL.
10882 (need_step_over_p): Return 0 if proc->tdesc is NULL.
10883 (linux_target_ops): Install arch_setup.
10884 * server.c (start_inferior): Call the_target->arch_setup.
10885 * target.h (struct target_ops) <arch_setup>: New field.
10886 (target_arch_setup): New marco.
10887 * lynx-low.c (lynx_target_ops): Update.
10888 * nto-low.c (nto_target_ops): Update.
10889 * spu-low.c (spu_target_ops): Update.
10890 * win32-low.c (win32_target_ops): Update.
10891
10892 2015-07-24 Yao Qi <yao.qi@linaro.org>
10893
10894 * linux-low.c (linux_add_process): Don't set
10895 proc->priv->new_inferior.
10896 (linux_create_inferior): Set proc->priv->new_inferior to 1.
10897 (linux_attach): Likewise.
10898
10899 2015-07-24 Yao Qi <yao.qi@linaro.org>
10900
10901 * server.c (start_inferior): Code refactor.
10902
10903 2015-07-24 Yao Qi <yao.qi@linaro.org>
10904
10905 * server.c (process_serial_event): Set general_thread.
10906
10907 2015-07-21 Yao Qi <yao.qi@linaro.org>
10908
10909 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
10910 aarch64_linux_get_debug_reg_capacity.
10911
10912 2015-07-17 Yao Qi <yao.qi@linaro.org>
10913
10914 * Makefile.in (aarch64-linux-hw-point.o): New rule.
10915 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
10916 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
10917 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
10918 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
10919 (AARCH64_HWP_ALIGNMENT): Likewise.
10920 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
10921 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
10922 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
10923 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
10924 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
10925 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
10926 (struct aarch64_debug_reg_state): Likewise.
10927 (struct arch_lwp_info): Likewise.
10928 (aarch64_align_watchpoint): Likewise.
10929 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
10930 (aarch64_watchpoint_length): Likewise.
10931 (aarch64_point_encode_ctrl_reg): Likewise
10932 (aarch64_point_is_aligned): Likewise.
10933 (aarch64_align_watchpoint): Likewise.
10934 (aarch64_linux_set_debug_regs):
10935 (aarch64_dr_state_insert_one_point): Likewise.
10936 (aarch64_dr_state_remove_one_point): Likewise.
10937 (aarch64_handle_breakpoint): Likewise.
10938 (aarch64_handle_aligned_watchpoint): Likewise.
10939 (aarch64_handle_unaligned_watchpoint): Likewise.
10940 (aarch64_handle_watchpoint): Likewise.
10941
10942 2015-07-17 Yao Qi <yao.qi@linaro.org>
10943
10944 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
10945 and don't aarch64_get_debug_reg_state. All callers update.
10946 (aarch64_handle_aligned_watchpoint): Likewise.
10947 (aarch64_handle_unaligned_watchpoint): Likewise.
10948 (aarch64_handle_watchpoint): Likewise.
10949 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
10950 (aarch64_remove_point): Likewise.
10951
10952 2015-07-17 Yao Qi <yao.qi@linaro.org>
10953
10954 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
10955 debug_printf.
10956 (aarch64_handle_unaligned_watchpoint): Likewise.
10957
10958 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10959
10960 Revert the previous 3 commits:
10961 Move gdb_regex* to common/
10962 Move linux_find_memory_regions_full & co.
10963 gdbserver build-id attribute generator
10964
10965 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10966 Jan Kratochvil <jan.kratochvil@redhat.com>
10967
10968 gdbserver build-id attribute generator.
10969 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
10970 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
10971 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
10972 (find_phdr): New.
10973 (get_dynamic): Use find_pdhr to traverse program headers.
10974 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
10975 (compare_mapping_entry_range, struct find_memory_region_callback_data)
10976 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
10977 (get_hex_build_id): New.
10978 (linux_qxfer_libraries_svr4): Add optional build-id attribute
10979 to reply XML document.
10980
10981 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10982 Jan Kratochvil <jan.kratochvil@redhat.com>
10983
10984 * target.c: Include target/target-utils.h and fcntl.h.
10985 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
10986 (target_fileio_read_stralloc): New functions.
10987
10988 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10989
10990 * Makefile.in (OBS): Add gdb_regex.o.
10991 (gdb_regex.o): New.
10992 * config.in: Rebuilt.
10993 * configure: Rebuilt.
10994
10995 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10996 Jan Kratochvil <jan.kratochvil@redhat.com>
10997
10998 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
10999 * Makefile.in (OBS): Add target-utils.o.
11000 (linux-maps.o, target-utils.o): New.
11001 * configure.srv (srv_linux_obj): Add linux-maps.o.
11002
11003 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
11004
11005 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
11006 function, return 1.
11007 (the_low_target): Install it.
11008
11009 2015-07-14 Pedro Alves <palves@redhat.com>
11010
11011 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
11012 Instead, ignore ECHILD, and throw an error for other errnos.
11013
11014 2015-07-10 Pedro Alves <palves@redhat.com>
11015
11016 * event-loop.c (struct callback_event) <data>: Change type to
11017 gdb_client_data instance instead of gdb_client_data pointer.
11018 (append_callback_event): Adjust.
11019
11020 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
11021
11022 * linux-aarch64-low.c: Add comments for each linux_target_ops
11023 method. Remove comments already covered in target_ops and
11024 linux_target_ops definitions.
11025 (the_low_target): Add comments for each unimplemented method.
11026
11027 2015-07-09 Yao Qi <yao.qi@linaro.org>
11028
11029 * linux-aarch64-low.c (aarch64_regmap): Remove.
11030 (aarch64_usrregs_info): Remove.
11031 (regs_info): Set field usrregs to NULL.
11032
11033 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
11034
11035 * linux-low.c: Include "rsp-low.h"
11036 (linux_low_encode_pt_config, linux_low_encode_raw): New.
11037 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
11038 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
11039 (handle_btrace_enable_pt): New.
11040 (handle_btrace_general_set): Support "pt".
11041 (handle_btrace_conf_general_set): Support "pt:size".
11042
11043 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
11044
11045 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
11046 Z_PACKET_SW_BP.
11047
11048 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
11049
11050 * linux-aarch64-low.c: Remove comment about endianness.
11051 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
11052 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
11053 memcmp.
11054
11055 2015-06-24 Gary Benson <gbenson@redhat.com>
11056
11057 * linux-i386-ipa.c (stdint.h): Do not include.
11058 * lynx-i386-low.c (stdint.h): Likewise.
11059 * lynx-ppc-low.c (stdint.h): Likewise.
11060 * mem-break.c (stdint.h): Likewise.
11061 * thread-db.c (stdint.h): Likewise.
11062 * tracepoint.c (stdint.h): Likewise.
11063 * win32-low.c (stdint.h): Likewise.
11064
11065 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
11066
11067 * server.c (write_qxfer_response): Update call to
11068 remote_escape_output.
11069
11070 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
11071 Jan Kratochvil <jan.kratochvil@redhat.com>
11072
11073 Merge multiple hex conversions.
11074 * gdbreplay.c (tohex): Rename to 'fromhex'.
11075 (logchar): Use fromhex.
11076
11077 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
11078
11079 * server.c (handle_qxfer_libraries): Set `version' attribute for
11080 <library-list>.
11081
11082 2015-06-10 Gary Benson <gbenson@redhat.com>
11083
11084 * target.h (struct target_ops) <multifs_open>: New field.
11085 <multifs_unlink>: Likewise.
11086 <multifs_readlink>: Likewise.
11087 * linux-low.c (nat/linux-namespaces.h): New include.
11088 (linux_target_ops): Initialize the_target->multifs_open,
11089 the_target->multifs_unlink and the_target->multifs_readlink.
11090 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
11091 * hostio.c (hostio_fs_pid): New static variable.
11092 (hostio_handle_new_gdb_connection): New function.
11093 (handle_setfs): Likewise.
11094 (handle_open): Use the_target->multifs_open as appropriate.
11095 (handle_unlink): Use the_target->multifs_unlink as appropriate.
11096 (handle_readlink): Use the_target->multifs_readlink as
11097 appropriate.
11098 (handle_vFile): Handle vFile:setfs packets.
11099 * server.c (handle_query): Call hostio_handle_new_gdb_connection
11100 after target_handle_new_gdb_connection.
11101
11102 2015-06-10 Gary Benson <gbenson@redhat.com>
11103
11104 * configure.ac (AC_CHECK_FUNCS): Add setns.
11105 * config.in: Regenerate.
11106 * configure: Likewise.
11107 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
11108 (linux-namespaces.o): New rule.
11109 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
11110
11111 2015-06-09 Gary Benson <gbenson@redhat.com>
11112
11113 * hostio.c (handle_open): Process mode argument with
11114 fileio_to_host_mode.
11115
11116 2015-06-01 Yao Qi <yao.qi@linaro.org>
11117
11118 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
11119 * linux-x86-low.c: Likewise.
11120
11121 2015-05-28 Don Breazeal <donb@codesourcery.com>
11122
11123 * linux-low.c (handle_extended_wait): Initialize
11124 thread_info.last_resume_kind for new fork children.
11125
11126 2015-05-15 Pedro Alves <palves@redhat.com>
11127
11128 * target.h (target_handle_new_gdb_connection): Rewrite using if
11129 wrapped in do/while.
11130
11131 2015-05-14 Joel Brobecker <brobecker@adacore.com>
11132
11133 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
11134 * configure, config.in: Regenerate.
11135 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
11136 Declare typedef.
11137
11138 2015-05-12 Don Breazeal <donb@codesourcery.com>
11139
11140 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
11141 PTRACE_EVENT_VFORK_DONE.
11142 (linux_low_ptrace_options, extended_event_reported): Add vfork
11143 events.
11144 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
11145 and "vforkdone" for RSP 'T' Stop Reply Packet.
11146 * server.h (report_vfork_events): Declare
11147 global variable.
11148
11149 2015-05-12 Don Breazeal <donb@codesourcery.com>
11150
11151 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
11152 (the_low_target) <new_fork>: Initialize new member.
11153 * linux-arm-low.c (arm_new_fork): New function.
11154 (the_low_target) <new_fork>: Initialize new member.
11155 * linux-low.c (handle_extended_wait): Call new target function
11156 new_fork.
11157 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
11158 * linux-mips-low.c (mips_add_watchpoint): New function
11159 extracted from mips_insert_point.
11160 (the_low_target) <new_fork>: Initialize new member.
11161 (mips_linux_new_fork): New function.
11162 (mips_insert_point): Call mips_add_watchpoint.
11163 * linux-x86-low.c (x86_linux_new_fork): New function.
11164 (the_low_target) <new_fork>: Initialize new member.
11165
11166 2015-05-12 Don Breazeal <donb@codesourcery.com>
11167
11168 * linux-low.c (handle_extended_wait): Implement return value,
11169 rename argument 'event_child' to 'event_lwp', handle
11170 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
11171 (linux_low_ptrace_options): New function.
11172 (linux_low_filter_event): Call linux_low_ptrace_options,
11173 use different argument fo linux_enable_event_reporting,
11174 use return value from handle_extended_wait.
11175 (extended_event_reported): New function.
11176 (linux_wait_1): Call extended_event_reported and set
11177 status to report fork events.
11178 (linux_write_memory): Add pid to debug message.
11179 (reset_lwp_ptrace_options_callback): New function.
11180 (linux_handle_new_gdb_connection): New function.
11181 (linux_target_ops): Initialize new structure member.
11182 * linux-low.h (struct lwp_info) <waitstatus>: New member.
11183 * lynx-low.c: Initialize new structure member.
11184 * remote-utils.c (prepare_resume_reply): Implement stop reason
11185 "fork" for "T" stop message.
11186 * server.c (handle_query): Call handle_new_gdb_connection.
11187 * server.h (report_fork_events): Declare global flag.
11188 * target.h (struct target_ops) <handle_new_gdb_connection>:
11189 New member.
11190 (target_handle_new_gdb_connection): New macro.
11191 * win32-low.c: Initialize new structure member.
11192
11193 2015-05-12 Don Breazeal <donb@codesourcery.com>
11194
11195 * mem-break.c (APPEND_TO_LIST): Define macro.
11196 (clone_agent_expr): New function.
11197 (clone_one_breakpoint): New function.
11198 (clone_all_breakpoints): New function.
11199 * mem-break.h: Declare new functions.
11200
11201 2015-05-12 Don Breazeal <donb@codesourcery.com>
11202
11203 * linux-low.c (linux_supports_fork_events): New function.
11204 (linux_supports_vfork_events): New function.
11205 (linux_target_ops): Initialize new structure members.
11206 (initialize_low): Call linux_check_ptrace_features.
11207 * lynx-low.c (lynx_target_ops): Initialize new structure
11208 members.
11209 * server.c (report_fork_events, report_vfork_events):
11210 New global flags.
11211 (handle_query): Add new features to qSupported packet and
11212 response.
11213 (captured_main): Initialize new global variables.
11214 * target.h (struct target_ops) <supports_fork_events>:
11215 New member.
11216 <supports_vfork_events>: New member.
11217 (target_supports_fork_events): New macro.
11218 (target_supports_vfork_events): New macro.
11219 * win32-low.c (win32_target_ops): Initialize new structure
11220 members.
11221
11222 2015-05-12 Gary Benson <gbenson@redhat.com>
11223
11224 * server.c (handle_qxfer_exec_file): Use current process
11225 if annex is empty.
11226
11227 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
11228
11229 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
11230 Remove HAVE_PTRACE_GETREGS conditionals.
11231 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
11232 instead of PTRACE_GETREGS and PTRACE_SETREGS.
11233
11234 2015-05-08 Yao Qi <yao.qi@linaro.org>
11235
11236 * linux-low.c (linux_supports_conditional_breakpoints): New
11237 function.
11238 (linux_target_ops): Install new target method.
11239 * lynx-low.c (lynx_target_ops): Install NULL hook for
11240 supports_conditional_breakpoints.
11241 * nto-low.c (nto_target_ops): Likewise.
11242 * spu-low.c (spu_target_ops): Likewise.
11243 * win32-low.c (win32_target_ops): Likewise.
11244 * server.c (handle_query): Check
11245 target_supports_conditional_breakpoints.
11246 * target.h (struct target_ops) <supports_conditional_breakpoints>:
11247 New field.
11248 (target_supports_conditional_breakpoints): New macro.
11249
11250 2015-05-06 Pedro Alves <palves@redhat.com>
11251
11252 PR server/18081
11253 * server.c (start_inferior): If the process exits, mourn it.
11254
11255 2015-04-21 Gary Benson <gbenson@redhat.com>
11256
11257 * hostio.c (fileio_open_flags_to_host): Factored out to
11258 fileio_to_host_openflags in common/fileio.c. Single use
11259 updated.
11260
11261 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
11262
11263 * linux-xtensa-low.c (xtensa_fill_gregset)
11264 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
11265 XCHAL_HAVE_LOOP.
11266
11267 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
11268
11269 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
11270 (regs_info): Replace usrregs pointer with NULL.
11271
11272 2015-04-17 Gary Benson <gbenson@redhat.com>
11273
11274 * target.h (struct target_ops) <pid_to_exec_file>: New field.
11275 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
11276 * server.c (handle_qxfer_exec_file): New function.
11277 (qxfer_packets): Add exec-file entry.
11278 (handle_query): Report qXfer:exec-file:read as supported packet.
11279
11280 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
11281
11282 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
11283
11284 2015-04-09 Gary Benson <gbenson@redhat.com>
11285
11286 * hostio-errno.c (errno_to_fileio_error): Remove function.
11287 Update caller to use remote_fileio_to_fio_error.
11288
11289 2015-04-09 Yao Qi <yao.qi@linaro.org>
11290
11291 * linux-low.c (linux_insert_point): Call
11292 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
11293 (linux_remove_point): Call remove_memory_breakpoint if type is
11294 raw_bkpt_type_sw.
11295 * linux-x86-low.c (x86_insert_point): Don't call
11296 insert_memory_breakpoint.
11297 (x86_remove_point): Don't call remove_memory_breakpoint.
11298
11299 2015-04-01 Pedro Alves <palves@redhat.com>
11300 Cleber Rosa <crosa@redhat.com>
11301
11302 * server.c (gdbserver_usage): Reorganize and extend the usage
11303 message.
11304
11305 2015-03-24 Pedro Alves <palves@redhat.com>
11306
11307 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
11308 output. Also dump TRAP_TRACE.
11309 (linux_low_filter_event): In debug output, distinguish a
11310 resume_stop SIGSTOP from a delayed SIGSTOP.
11311
11312 2015-03-24 Gary Benson <gbenson@redhat.com>
11313
11314 * linux-x86-low.c (x86_linux_new_thread): Moved to
11315 nat/x86-linux.c.
11316 (x86_linux_prepare_to_resume): Likewise.
11317
11318 2015-03-24 Gary Benson <gbenson@redhat.com>
11319
11320 * Makefile.in (x86-linux-dregs.o): New rule.
11321 * configure.srv: Add x86-linux-dregs.o to relevant targets.
11322 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
11323 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
11324 (x86_linux_dr_get): Likewise.
11325 (x86_linux_dr_set): Likewise.
11326 (update_debug_registers_callback): Likewise.
11327 (x86_linux_dr_set_addr): Likewise.
11328 (x86_linux_dr_get_addr): Likewise.
11329 (x86_linux_dr_set_control): Likewise.
11330 (x86_linux_dr_get_control): Likewise.
11331 (x86_linux_dr_get_status): Likewise.
11332 (x86_linux_update_debug_registers): Likewise.
11333
11334 2015-03-24 Gary Benson <gbenson@redhat.com>
11335
11336 * linux-x86-low.c (x86_linux_update_debug_registers):
11337 New function, factored out from...
11338 (x86_linux_prepare_to_resume): ...this.
11339
11340 2015-03-24 Gary Benson <gbenson@redhat.com>
11341
11342 * linux-x86-low.c (x86_linux_dr_get): Update comments.
11343 (x86_linux_dr_set): Likewise.
11344 (update_debug_registers_callback): Likewise.
11345 (x86_linux_dr_set_addr): Likewise.
11346 (x86_linux_dr_get_addr): Likewise.
11347 (x86_linux_dr_set_control): Likewise.
11348 (x86_linux_dr_get_control): Likewise.
11349 (x86_linux_dr_get_status): Likewise.
11350 (x86_linux_prepare_to_resume): Likewise.
11351
11352 2015-03-24 Gary Benson <gbenson@redhat.com>
11353
11354 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
11355 Use perror_with_name. Pass string through gettext.
11356 (x86_linux_dr_set): Likewise.
11357
11358 2015-03-24 Gary Benson <gbenson@redhat.com>
11359
11360 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
11361 (x86_linux_dr_set_addr): ...this.
11362 (x86_dr_low_get_addr): Rename to...
11363 (x86_linux_dr_get_addr): ...this.
11364 (x86_dr_low_set_control): Rename to...
11365 (x86_linux_dr_set_control): ...this.
11366 (x86_dr_low_get_control): Rename to...
11367 (x86_linux_dr_get_control): ...this.
11368 (x86_dr_low_get_status): Rename to...
11369 (x86_linux_dr_get_status): ...this.
11370 (x86_dr_low): Update with new function names.
11371
11372 2015-03-24 Gary Benson <gbenson@redhat.com>
11373
11374 * Makefile.in (x86-linux.o): New rule.
11375 * configure.srv: Add x86-linux.o to relevant targets.
11376 * linux-low.c (lwp_set_arch_private_info): New function.
11377 (lwp_arch_private_info): Likewise.
11378 * linux-x86-low.c: Include nat/x86-linux.h.
11379 (arch_lwp_info): Removed structure.
11380 (update_debug_registers_callback):
11381 Use lwp_set_debug_registers_changed.
11382 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
11383 and lwp_set_debug_registers_changed.
11384 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
11385
11386 2015-03-24 Gary Benson <gbenson@redhat.com>
11387
11388 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
11389 * linux-arm-low.c (arm_new_thread): Likewise.
11390 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
11391 * linux-mips-low.c (mips_linux_new_thread): Likewise.
11392 * linux-x86-low.c (x86_linux_new_thread): Likewise.
11393 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
11394
11395 2015-03-24 Gary Benson <gbenson@redhat.com>
11396
11397 * linux-low.c (ptid_of_lwp): New function.
11398 (lwp_is_stopped): Likewise.
11399 (lwp_stop_reason): Likewise.
11400 * linux-x86-low.c (update_debug_registers_callback):
11401 Use lwp_is_stopped.
11402 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
11403 lwp_stop_reason.
11404
11405 2015-03-24 Gary Benson <gbenson@redhat.com>
11406
11407 * linux-low.h (linux_stop_lwp): Remove declaration.
11408
11409 2015-03-24 Gary Benson <gbenson@redhat.com>
11410
11411 * linux-low.h: Include nat/linux-nat.h.
11412 * linux-low.c (iterate_over_lwps_args): New structure.
11413 (iterate_over_lwps_filter): New function.
11414 (iterate_over_lwps): Likewise.
11415 * linux-x86-low.c (update_debug_registers_callback):
11416 Update signature to what iterate_over_lwps expects.
11417 Remove PID check that iterate_over_lwps now performs.
11418 (x86_dr_low_set_addr): Use iterate_over_lwps.
11419 (x86_dr_low_set_control): Likewise.
11420
11421 2015-03-24 Gary Benson <gbenson@redhat.com>
11422
11423 * linux-x86-low.c (x86_debug_reg_state): New function.
11424 (x86_linux_prepare_to_resume): Use the above.
11425
11426 2015-03-24 Gary Benson <gbenson@redhat.com>
11427
11428 * linux-low.c (current_lwp_ptid): New function.
11429 * linux-x86-low.c: Include nat/linux-nat.h.
11430 (x86_dr_low_get_addr): Use current_lwp_ptid.
11431 (x86_dr_low_get_control): Likewise.
11432 (x86_dr_low_get_status): Likewise.
11433
11434 2015-03-20 Pedro Alves <palves@redhat.com>
11435
11436 * tracepoint.c (cmd_qtstatus): Make "str" const.
11437
11438 2015-03-20 Pedro Alves <palves@redhat.com>
11439
11440 * server.c (handle_general_set): Make "req_str" const.
11441
11442 2015-03-19 Pedro Alves <palves@redhat.com>
11443
11444 * linux-low.c (linux_resume_one_lwp): Rename to ...
11445 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
11446 instead call perror_with_name.
11447 (check_ptrace_stopped_lwp_gone): New function.
11448 (linux_resume_one_lwp): Reimplement as wrapper around
11449 linux_resume_one_lwp_throw that swallows errors if the LWP is
11450 gone.
11451
11452 2015-03-19 Pedro Alves <palves@redhat.com>
11453
11454 * linux-low.c (count_events_callback, select_event_lwp_callback):
11455 No longer check whether the thread has resume_stop as last resume
11456 kind.
11457
11458 2015-03-19 Pedro Alves <palves@redhat.com>
11459
11460 * linux-low.c (count_events_callback, select_event_lwp_callback):
11461 Use the lwp's status_pending_p field, not the thread's.
11462
11463 2015-03-19 Pedro Alves <palves@redhat.com>
11464
11465 * linux-low.c (select_event_lwp_callback): Update comments to
11466 no longer mention SIGTRAP.
11467
11468 2015-03-18 Gary Benson <gbenson@redhat.com>
11469
11470 * server.c (handle_query): Do not report vFile:fstat as supported.
11471
11472 2015-03-11 Gary Benson <gbenson@redhat.com>
11473
11474 * hostio.c (sys/types.h): New include.
11475 (sys/stat.h): Likewise.
11476 (common-remote-fileio.h): Likewise.
11477 (handle_fstat): New function.
11478 (handle_vFile): Handle vFile:fstat packets.
11479
11480 2015-03-11 Gary Benson <gbenson@redhat.com>
11481
11482 * configure.ac (AC_CHECK_MEMBERS): Add checks for
11483 struct stat.st_blocks and struct stat.st_blksize.
11484 * configure: Regenerate.
11485 * config.in: Likewise.
11486 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
11487 (OBS): Add common-remote-fileio.o.
11488 (common-remote-fileio.o): New rule.
11489
11490 2015-03-09 Pedro Alves <palves@redhat.com>
11491
11492 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
11493 'struct sockaddr' pointer in 'accept' call.
11494
11495 2015-03-09 Pedro Alves <palves@redhat.com>
11496
11497 Revert:
11498 2015-03-07 Pedro Alves <palves@redhat.com>
11499 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11500 or <winsock2.h> here. Instead include "gdb_socket.h".
11501 (remote_open): Use union gdb_sockaddr_u.
11502 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11503 or <winsock2.h> here. Instead include "gdb_socket.h".
11504 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11505 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11506 or <sys/un.h>.
11507 (init_named_socket, gdb_agent_helper_thread): Use union
11508 gdb_sockaddr_u.
11509
11510 2015-03-07 Pedro Alves <palves@redhat.com>
11511
11512 * configure.ac (build_warnings): Move
11513 -Wdeclaration-after-statement to the C-specific set.
11514 * configure: Regenerate.
11515
11516 2015-03-07 Pedro Alves <palves@redhat.com>
11517
11518 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11519 or <winsock2.h> here. Instead include "gdb_socket.h".
11520 (remote_open): Use union gdb_sockaddr_u.
11521 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11522 or <winsock2.h> here. Instead include "gdb_socket.h".
11523 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11524 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11525 or <sys/un.h>.
11526 (init_named_socket, gdb_agent_helper_thread): Use union
11527 gdb_sockaddr_u.
11528
11529 2015-03-07 Pedro Alves <palves@redhat.com>
11530
11531 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
11532 instead.
11533
11534 2015-03-06 Yao Qi <yao.qi@linaro.org>
11535
11536 * linux-aarch64-low.c (aarch64_insert_point): Use
11537 show_debug_regs as a boolean.
11538 (aarch64_remove_point): Likewise.
11539
11540 2015-03-05 Pedro Alves <palves@redhat.com>
11541
11542 * lynx-low.c (lynx_target_ops): Install NULL hooks for
11543 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
11544 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
11545 * nto-low.c (nto_target_ops): Likewise.
11546 * spu-low.c (spu_target_ops): Likewise.
11547 * win32-low.c (win32_target_ops): Likewise.
11548
11549 2015-03-04 Pedro Alves <palves@redhat.com>
11550
11551 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
11552 Decide whether a breakpoint triggered based on the SIGTRAP's
11553 siginfo.si_code.
11554 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
11555 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
11556 (linux_low_filter_event): Check for breakpoints before checking
11557 watchpoints.
11558 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
11559 siginfo.si_code.
11560 (linux_stopped_by_sw_breakpoint)
11561 (linux_supports_stopped_by_sw_breakpoint)
11562 (linux_stopped_by_hw_breakpoint)
11563 (linux_supports_stopped_by_hw_breakpoint): New functions.
11564 (linux_target_ops): Install new target methods.
11565
11566 2015-03-04 Pedro Alves <palves@redhat.com>
11567
11568 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
11569 * server.c (swbreak_feature, hwbreak_feature): New globals.
11570 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
11571 (captured_main): Clear swbreak_feature and hwbreak_feature.
11572 * server.h (swbreak_feature, hwbreak_feature): Declare.
11573 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
11574 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
11575 supports_stopped_by_hw_breakpoint>: New fields.
11576 (target_supports_stopped_by_sw_breakpoint)
11577 (target_stopped_by_sw_breakpoint)
11578 (target_supports_stopped_by_hw_breakpoint)
11579 (target_stopped_by_hw_breakpoint): Declare.
11580
11581 2015-03-04 Pedro Alves <palves@redhat.com>
11582
11583 enum lwp_stop_reason -> enum target_stop_reason
11584 * linux-low.c (check_stopped_by_breakpoint): Adjust.
11585 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
11586 (linux_wait_1, stuck_in_jump_pad_callback)
11587 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
11588 (linux_stopped_by_watchpoint):
11589 * linux-low.h (enum lwp_stop_reason): Delete.
11590 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
11591 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11592
11593 2015-03-04 Yao Qi <yao.qi@linaro.org>
11594
11595 * Makefile.in (SFILES): Add linux-aarch64-low.c.
11596
11597 2015-03-03 Gary Benson <gbenson@redhat.com>
11598
11599 * hostio.c (handle_vFile): Fix prefix lengths.
11600
11601 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
11602
11603 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
11604 ptr_bits.
11605
11606 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
11607
11608 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
11609 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
11610 (clean): Add "rm -f" for above C files.
11611 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
11612 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
11613 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
11614 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
11615 * linux-s390-low.c (HWCAP_S390_VX): New macro.
11616 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
11617 (init_registers_s390x_vx_linux64)
11618 (init_registers_s390x_tevx_linux64)
11619 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
11620 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
11621 declarations.
11622 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
11623 (s390_store_vxrs_high): New functions.
11624 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
11625 NT_S390_VXRS_HIGH.
11626 (s390_arch_setup): Add logic for selecting one of the new target
11627 descriptions. Activate the new vector regsets if applicable.
11628 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
11629 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
11630 and init_registers_s390x_tevx_linux64.
11631
11632 2015-03-01 Pedro Alves <palves@redhat.com>
11633
11634 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
11635 parameter.
11636
11637 2015-02-27 Pedro Alves <palves@redhat.com>
11638
11639 * linux-x86-low.c (u_debugreg_offset): New function.
11640 (x86_linux_dr_get, x86_linux_dr_set): Use it.
11641
11642 2015-02-27 Pedro Alves <palves@redhat.com>
11643
11644 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
11645 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
11646 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
11647 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
11648 (ps_lsetfpregs, ps_getpid)
11649 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
11650 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
11651 (ps_lsetxregs, ps_plog): Declare.
11652
11653 2015-02-27 Pedro Alves <palves@redhat.com>
11654
11655 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
11656 IP_AGENT_EXPORT_FUNC.
11657 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
11658 IP_AGENT_EXPORT_FUNC.
11659 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
11660 (IP_AGENT_EXPORT): Delete.
11661 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11662 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11663 (gdb_trampoline_buffer_error, collecting, gdb_collect)
11664 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
11665 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
11666 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
11667 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
11668 (traceframe_read_count, traceframe_write_count)
11669 (traceframes_created, trace_state_variables, get_raw_reg)
11670 (get_trace_state_variable_value, set_trace_state_variable_value)
11671 (ust_loaded, helper_thread_id, cmd_buf): Use
11672 IPA_SYM_EXPORTED_NAME.
11673 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
11674 (tracepoints) Use IP_AGENT_EXPORT_VAR.
11675 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
11676 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11677 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
11678 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
11679 EXTERN_C_PUSH/EXTERN_C_POP.
11680 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
11681 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
11682 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11683 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
11684 (traceframe_write_count, traceframe_read_count)
11685 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
11686 (about_to_request_buffer_space, get_trace_state_variable_value)
11687 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
11688 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
11689 EXTERN_C_PUSH/EXTERN_C_POP.
11690 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
11691 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
11692 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
11693 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11694 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11695 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11696 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
11697 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
11698 Define.
11699 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
11700 (IP_AGENT_EXPORT_VAR_DECL): Define.
11701 (tracing): Declare.
11702 (gdb_agent_get_raw_reg): Declare.
11703
11704 2015-02-27 Tom Tromey <tromey@redhat.com>
11705 Pedro Alves <palves@redhat.com>
11706
11707 Rename symbols whose names are reserved C++ keywords throughout.
11708
11709 2015-02-27 Pedro Alves <palves@redhat.com>
11710
11711 * Makefile.in (COMPILER): New, get it from autoconf.
11712 (CXX): Get from autoconf instead.
11713 (COMPILE.pre): Use COMPILER.
11714 (CC-LD): Rename to ...
11715 (CC_LD): ... this. Use COMPILER.
11716 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
11717 (CXX_FOR_TARGET): Default to g++ instead of gcc.
11718 * acinclude.m4: Include build-with-cxx.m4.
11719 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
11720 Disable -Werror by default if building in C++ mode.
11721 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
11722 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
11723 the C++ compiler. Save/restore CXXFLAGS too.
11724 * configure: Regenerate.
11725
11726 2015-02-27 Pedro Alves <palves@redhat.com>
11727
11728 * acinclude.m4: Include libiberty.m4.
11729 * configure.ac: Call libiberty_INIT.
11730 * config.in, configure: Regenerate.
11731
11732 2015-02-26 Pedro Alves <palves@redhat.com>
11733
11734 * linux-low.c (linux_wait_1): When incrementing the PC past a
11735 program breakpoint always use the_low_target.breakpoint_len as
11736 increment, rather than the maximum between that and
11737 the_low_target.decr_pc_after_break.
11738
11739 2015-02-23 Pedro Alves <palves@redhat.com>
11740
11741 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
11742 thread was doing a step-over; always adjust the PC if
11743 we stepped over a permanent breakpoint.
11744 (linux_wait_1): If we stepped over breakpoint that was on top of a
11745 permanent breakpoint, manually advance the PC past it.
11746
11747 2015-02-23 Pedro Alves <palves@redhat.com>
11748
11749 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
11750 modes.
11751 (x86_fill_gregset, x86_store_gregset): Use it when handling
11752 $orig_eax.
11753
11754 2015-02-20 Pedro Alves <palves@redhat.com>
11755
11756 * thread-db.c: Include "nat/linux-procfs.h".
11757 (thread_db_init): Skip listing new threads if the kernel supports
11758 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
11759
11760 2015-02-20 Pedro Alves <palves@redhat.com>
11761
11762 * linux-low.c (status_pending_p_callback): Use ptid_match.
11763
11764 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
11765
11766 PR breakpoints/16812
11767 * linux-low.c (wstatus_maybe_breakpoint): Remove.
11768 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
11769 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
11770
11771 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
11772
11773 PR breakpoints/15956
11774 * tracepoint.c (cmd_qtinit): Add check for current_thread.
11775
11776 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11777
11778 * linux-low.c (linux_low_btrace_conf): Print size.
11779 * server.c (handle_btrace_conf_general_set): New.
11780 (hanle_general_set): Call handle_btrace_conf_general_set.
11781 (handle_query): Report Qbtrace-conf:bts:size as supported.
11782
11783 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11784
11785 * linux-low.c (linux_low_enable_btrace): Update parameters.
11786 (linux_low_btrace_conf): New.
11787 (linux_target_ops)<to_btrace_conf>: Initialize.
11788 * server.c (current_btrace_conf): New.
11789 (handle_btrace_enable): Rename to ...
11790 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
11791 to target_enable_btrace. Update comment. Update users.
11792 (handle_qxfer_btrace_conf): New.
11793 (qxfer_packets): Add btrace-conf entry.
11794 (handle_query): Report qXfer:btrace-conf:read as supported packet.
11795 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
11796 (target_ops)<read_btrace_conf>: New.
11797 (target_enable_btrace): Update parameters.
11798 (target_read_btrace_conf): New.
11799
11800 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11801
11802 * server.c (handle_btrace_general_set): Remove call to
11803 target_supports_btrace.
11804 (supported_btrace_packets): New.
11805 (handle_query): Call supported_btrace_packets.
11806 * target.h: include btrace-common.h.
11807 (btrace_target_info): Removed.
11808 (supports_btrace, target_supports_btrace): Update parameters.
11809
11810 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11811
11812 * Makefile.in (SFILES): Add common/btrace-common.c.
11813 (OBS): Add common/btrace-common.o.
11814 (btrace-common.o): Add build rules.
11815 * linux-low: Include btrace-common.h.
11816 (linux_low_read_btrace): Use struct btrace_data. Call
11817 btrace_data_init and btrace_data_fini.
11818
11819 2015-02-06 Pedro Alves <palves@redhat.com>
11820
11821 * thread-db.c (find_new_threads_callback): Add debug output.
11822
11823 2015-02-04 Pedro Alves <palves@redhat.com>
11824
11825 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
11826 (resume_stopped_resumed_lwps): New function.
11827 (linux_wait_for_event_filtered): Use it.
11828
11829 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11830
11831 * Makefile.in (SFILES): Add linux-personality.c.
11832 (linux-personality.o): New rule.
11833 * configure.srv (srv_linux_obj): Add linux-personality.o to the
11834 list of objects to be built.
11835 * linux-low.c: Include nat/linux-personality.h.
11836 (linux_create_inferior): Remove code to disable address space
11837 randomization (moved to ../nat/linux-personality.c). Create
11838 cleanup to disable address space randomization.
11839
11840 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11841
11842 * Makefile.in (posix-strerror.o): New rule.
11843 (mingw-strerror.o): Likewise.
11844 * configure: Regenerated.
11845 * configure.ac: Source file ../common/common.host. Initialize new
11846 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
11847
11848 2015-01-14 Yao Qi <yao@codesourcery.com>
11849
11850 * Makefile.in (SFILES): Add nat/ppc-linux.c.
11851 (ppc-linux.o): New rule.
11852 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
11853 * configure.ac: AC_CHECK_FUNCS(getauxval).
11854 * config.in: Re-generated.
11855 * configure: Re-generated.
11856 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
11857 ppc64_64bit_inferior_p
11858
11859 2015-01-14 Yao Qi <yao@codesourcery.com>
11860
11861 * linux-ppc-low.c: Include "nat/ppc-linux.h".
11862 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
11863 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
11864 (PT_ORIG_R3, PT_TRAP): Likewise.
11865 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
11866 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
11867 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
11868
11869 2015-01-10 Joel Brobecker <brobecker@adacore.com>
11870
11871 * i387-fp.c (i387_cache_to_xsave): In look over
11872 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
11873 zmmh_low_space field by use of zmmh_high_space.
11874
11875 2015-01-09 Pedro Alves <palves@redhat.com>
11876
11877 * linux-low.c (step_over_bkpt): Move higher up in the file.
11878 (handle_extended_wait): Don't store the stop_pc here.
11879 (get_stop_pc): Adjust comments and rename to ...
11880 (check_stopped_by_breakpoint): ... this. Record whether the LWP
11881 stopped for a software breakpoint or hardware breakpoint.
11882 (thread_still_has_status_pending_p): New function.
11883 (status_pending_p_callback): Use
11884 thread_still_has_status_pending_p. If the event is no longer
11885 interesting, resume the LWP.
11886 (handle_tracepoints): Add assert.
11887 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
11888 (wstatus_maybe_breakpoint): New function.
11889 (cancel_breakpoint): Delete function.
11890 (check_stopped_by_watchpoint): New function, factored out from
11891 linux_low_filter_event.
11892 (lp_status_maybe_breakpoint): Delete function.
11893 (linux_low_filter_event): Remove filter_ptid argument.
11894 Leave thread group exits pending here. Store the LWP's stop PC.
11895 Always leave events pending.
11896 (linux_wait_for_event_filtered): Pull all events out of the
11897 kernel, and leave them all pending.
11898 (count_events_callback, select_event_lwp_callback): Consider all
11899 events.
11900 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
11901 (select_event_lwp): Only give preference to the stepping LWP in
11902 all-stop mode. Adjust comments.
11903 (ignore_event): New function.
11904 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
11905 references to cancel_breakpoints. Adjust to renames. Also give
11906 equal priority to all LWPs that have had events in non-stop mode.
11907 If reporting a software breakpoint event, unadjust the LWP's PC.
11908 (linux_wait): If linux_wait_1 returned an ignored event, retry.
11909 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
11910 Adjust.
11911 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
11912 (resume_status_pending_p): Use thread_still_has_status_pending_p.
11913 (linux_stopped_by_watchpoint): Adjust.
11914 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
11915 * linux-low.h (enum lwp_stop_reason): New.
11916 (struct lwp_info) <stop_pc>: Adjust comment.
11917 <stopped_by_watchpoint>: Delete field.
11918 <stop_reason>: New field.
11919 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11920 * mem-break.c (software_breakpoint_inserted_here)
11921 (hardware_breakpoint_inserted_here): New function.
11922 * mem-break.h (software_breakpoint_inserted_here)
11923 (hardware_breakpoint_inserted_here): Declare.
11924 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
11925 (cancel_breakpoints): Delete.
11926 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
11927 (upload_fast_traceframes): Remove references to
11928 cancel_breakpoints.
11929
11930 2015-01-09 Pedro Alves <palves@redhat.com>
11931
11932 * thread-db.c (find_new_threads_callback): Ignore thread if the
11933 kernel thread ID is -1.
11934
11935 2015-01-09 Pedro Alves <palves@redhat.com>
11936
11937 * linux-low.c (linux_attach_fail_reason_string): Move to
11938 nat/linux-ptrace.c, and rename.
11939 (linux_attach_lwp): Update comment.
11940 (attach_proc_task_lwp_callback): New function.
11941 (linux_attach): Adjust to rename and use
11942 linux_proc_attach_tgid_threads.
11943 (linux_attach_fail_reason_string): Delete declaration.
11944
11945 2015-01-01 Joel Brobecker <brobecker@adacore.com>
11946
11947 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
11948 * server.c (gdbserver_version): Likewise.
11949
11950 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
11951
11952 * remote-utils.c: Include ctype.h.
11953 (input_interrupt): Explicitly handle the case when the char
11954 received is the NUL byte. Improve the printing of non-ASCII
11955 characters.
11956
11957 2014-12-16 Joel Brobecker <brobecker@adacore.com>
11958
11959 * linux-low.c (linux_low_filter_event): Update call to
11960 linux_enable_event_reporting following the addition of
11961 a new parameter to that function.
11962
11963 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
11964
11965 PR server/17457
11966 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
11967 (AARCH64_FPCR_REGNO): Likewise.
11968 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
11969 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
11970 (aarch64_store_fpregset): Likewise.
11971
11972 2014-12-15 Joel Brobecker <brobecker@adacore.com>
11973
11974 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
11975 Remove FIXME comment about assumption about N.
11976
11977 2014-12-13 Joel Brobecker <brobecker@adacore.com>
11978
11979 * configure.ac: If large-file support is disabled in GDBserver,
11980 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
11981 * configure: Regenerate.
11982
11983 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11984
11985 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
11986 warning upon ENODATA from ptrace.
11987 * linux-s390-low.c (s390_store_tdb): New.
11988 (s390_regsets): Add regset for NT_S390_TDB.
11989
11990 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11991
11992 * linux-low.c (regsets_store_inferior_registers): Skip regsets
11993 without a fill_function.
11994 * linux-s390-low.c (s390_fill_last_break): Remove.
11995 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
11996 (s390_arch_setup): Use regset's size instead of fill_function for
11997 loop end condition.
11998
11999 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12000
12001 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
12002 the regset's store function when ptrace returned an error.
12003 * regcache.c (get_thread_regcache): Invalidate register cache
12004 before fetching inferior's registers.
12005
12006 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12007
12008 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
12009 while-loop as for-loop.
12010 (regsets_store_inferior_registers): Likewise.
12011
12012 2014-11-28 Yao Qi <yao@codesourcery.com>
12013
12014 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
12015 * config.in, configure: Re-generate.
12016 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
12017 is defined.
12018
12019 2014-11-21 Yao Qi <yao@codesourcery.com>
12020
12021 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
12022 (AC_CHECK_HEADERS): Remove malloc.h.
12023 * configure: Re-generated.
12024 * config.in: Re-generated.
12025 * server.h: Don't include alloca.h and malloc.h.
12026 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
12027 Don't include malloc.h.
12028
12029 2014-11-17 Joel Brobecker <brobecker@adacore.com>
12030
12031 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
12032 corresponding ERRNO check in same block.
12033
12034 2014-11-12 Pedro Alves <palves@redhat.com>
12035
12036 * server.c (cont_thread): Update comment.
12037 (start_inferior, attach_inferior): No longer clear cont_thread.
12038 (handle_v_cont): No longer set cont_thread.
12039 (captured_main): Clear cont_thread each time a GDB connects.
12040
12041 2014-11-12 Pedro Alves <palves@redhat.com>
12042
12043 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
12044 thread, and don't resume all threads if the Hc thread has exited.
12045
12046 2014-11-12 Pedro Alves <palves@redhat.com>
12047
12048 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
12049 the process group instead of to a specific LWP.
12050
12051 2014-10-15 Pedro Alves <palves@redhat.com>
12052
12053 PR server/17487
12054 * win32-arm-low.c (arm_set_thread_context): Remove current_event
12055 parameter.
12056 (arm_set_thread_context): Delete.
12057 (the_low_target): Adjust.
12058 * win32-i386-low.c (debug_registers_changed)
12059 (debug_registers_used): Delete.
12060 (update_debug_registers_callback): New function.
12061 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
12062 needing to update their debug registers.
12063 (win32_get_current_dr): New function.
12064 (x86_dr_low_get_addr, x86_dr_low_get_control)
12065 (x86_dr_low_get_status): Fetch the debug register from the thread
12066 record's context.
12067 (i386_initial_stuff): Adjust.
12068 (i386_get_thread_context): Remove current_event parameter. Don't
12069 clear debug_registers_changed nor copy DR values to
12070 debug_reg_state.
12071 (i386_set_thread_context): Delete.
12072 (i386_prepare_to_resume): New function.
12073 (i386_thread_added): Mark the thread as needing to update irs
12074 debug registers.
12075 (the_low_target): Remove i386_set_thread_context and install
12076 i386_prepare_to_resume.
12077 * win32-low.c (win32_get_thread_context): Adjust.
12078 (win32_set_thread_context): Use SetThreadContext
12079 directly.
12080 (win32_prepare_to_resume): New function.
12081 (win32_require_context): New function, factored out from ...
12082 (thread_rec): ... this.
12083 (continue_one_thread): Call win32_prepare_to_resume on each thread
12084 we're about to continue.
12085 (win32_resume): Call win32_prepare_to_resume on the event thread.
12086 * win32-low.h (struct win32_thread_info)
12087 <debug_registers_changed>: New field.
12088 (struct win32_target_ops): Change prototype of set_thread_context,
12089 delete set_thread_context and add prepare_to_resume.
12090 (win32_require_context): New declaration.
12091
12092 2014-10-08 Gary Benson <gbenson@redhat.com>
12093
12094 * server.h: Do not include common-exceptions.h.
12095
12096 2014-10-08 Gary Benson <gbenson@redhat.com>
12097
12098 * server.h: Do not include cleanups.h.
12099
12100 2014-09-30 James Hogan <james.hogan@imgtec.com>
12101
12102 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
12103 mips64-dsp-linux.c.
12104
12105 2014-09-23 Yao Qi <yao@codesourcery.com>
12106
12107 * linux-low.c (lp_status_maybe_breakpoint): New function.
12108 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
12109 (count_events_callback): Likewise.
12110 (select_event_lwp_callback): Likewise.
12111 (cancel_breakpoints_callback): Likewise.
12112
12113 2014-09-19 Don Breazeal <donb@codesourcery.com>
12114
12115 * linux-low.c (handle_extended_wait): Call
12116 linux_ptrace_get_extended_event.
12117 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
12118 linux_is_extended_waitstatus.
12119
12120 2014-09-16 Joel Brobecker <brobecker@adacore.com>
12121
12122 * Makefile.in (CPPFLAGS): Define.
12123 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
12124 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
12125
12126 2014-09-16 Gary Benson <gbenson@redhat.com>
12127
12128 * inferiors.h (current_inferior): Renamed as...
12129 (current_thread): New variable. All uses updated.
12130 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
12131 (maybe_move_out_of_jump_pad): Likewise.
12132 (cancel_breakpoint): Likewise.
12133 (linux_low_filter_event): Likewise.
12134 (wait_for_sigstop): Likewise.
12135 (linux_resume_one_lwp): Likewise.
12136 (need_step_over_p): Likewise.
12137 (start_step_over): Likewise.
12138 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
12139 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
12140 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
12141 and save_inferior as saved_thread.
12142 * regcache.c (get_thread_regcache): Renamed saved_inferior as
12143 saved_thread.
12144 (regcache_invalidate_thread): Likewise.
12145 * remote-utils.c (prepare_resume_reply): Likewise.
12146 * thread-db.c (thread_db_get_tls_address): Likewise.
12147 (disable_thread_event_reporting): Likewise.
12148 (remove_thread_event_breakpoints): Likewise.
12149 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
12150 as saved_thread.
12151 * target.h (set_desired_inferior): Renamed as...
12152 (set_desired_thread): New declaration. All uses updated.
12153 * server.c (myresume): Updated comment to reference thread instead
12154 of inferior.
12155 (handle_serial_event): Likewise.
12156 (handle_target_event): Likewise.
12157
12158 2014-09-12 Tom Tromey <tromey@redhat.com>
12159 Gary Benson <gbenson@redhat.com>
12160
12161 * regcache.h: Include common-regcache.h.
12162 (regcache_read_pc): Don't declare.
12163 * regcache.c (get_thread_regcache_for_ptid): New function.
12164
12165 2014-09-11 Tom Tromey <tromey@redhat.com>
12166 Gary Benson <gbenson@redhat.com>
12167
12168 * symbol.c: New file.
12169 * Makefile.in (SFILES): Add symbol.c.
12170 (OBS): Add symbol.o.
12171
12172 2014-09-11 Gary Benson <gbenson@redhat.com>
12173
12174 * target.c (target_stop_ptid, target_continue_ptid): New
12175 functions.
12176
12177 2014-09-11 Tom Tromey <tromey@redhat.com>
12178 Gary Benson <gbenson@redhat.com>
12179
12180 * target.h: Include target/target.h.
12181 * target.c (target_read_memory, target_read_uint32)
12182 (target_write_memory): New functions.
12183
12184 2014-09-11 Gary Benson <gbenson@redhat.com>
12185
12186 * server.h (debug_hw_points): Don't declare.
12187 * server.c (debug_hw_points): Don't define. Replace all uses
12188 with show_debug_regs.
12189 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
12190 all uses with show_debug_regs.
12191
12192 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
12193
12194 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
12195 endianness into account.
12196 (ppc_supply_ptrace_register): Likewise.
12197
12198 2014-09-03 James Hogan <james.hogan@imgtec.com>
12199
12200 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
12201 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
12202
12203 2014-09-03 Gary Benson <gbenson@redhat.com>
12204
12205 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
12206 ALL_DEBUG_ADDRESS_REGISTERS.
12207
12208 2014-09-02 Gary Benson <gbenson@redhat.com>
12209
12210 * i386-low.h: Renamed as...
12211 * x86-low.h: New file. All type, function and variable name
12212 prefixes changed from "i386_" to "x86_". All references updated.
12213 * i386-low.c: Renamed as...
12214 * x86-low.c: New file. All type, function and variable name
12215 prefixes changed from "i386_" to "x86_". All references updated.
12216
12217 2014-09-02 Gary Benson <gbenson@redhat.com>
12218
12219 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
12220 (x86_linux_new_thread): Likewise.
12221
12222 2014-08-29 Gary Benson <gbenson@redhat.com>
12223
12224 * server.h (setjmp.h): Do not include.
12225 (toplevel): Do not declare.
12226 (common-exceptions.h): Include.
12227 (cleanups.h): Likewise.
12228 * server.c (toplevel): Do not define.
12229 (exit_code): New static global.
12230 (detach_or_kill_for_exit_cleanup): New function.
12231 (main): New function. Original main renamed to...
12232 (captured_main): New function.
12233 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
12234
12235 2014-08-29 Gary Benson <gbenson@redhat.com>
12236
12237 * Makefile.in (SFILES): Add common/common-exceptions.c.
12238 (OBS): Add common-exceptions.o.
12239 (common-exceptions.o): New rule.
12240 * utils.c (prepare_to_throw_exception): New function.
12241
12242 2014-08-29 Gary Benson <gbenson@redhat.com>
12243
12244 * config.in: Regenerate.
12245 * configure: Likewise.
12246
12247 2014-08-29 Gary Benson <gbenson@redhat.com>
12248
12249 * Makefile.in (SFILES): Add common/cleanups.c.
12250 (OBS): cleanups.o.
12251 (cleanups.o): New rule.
12252
12253 2014-08-29 Gary Benson <gbenson@redhat.com>
12254
12255 * utils.c (internal_vwarning): New function.
12256
12257 2014-08-28 Gary Benson <gbenson@redhat.com>
12258
12259 * utils.h (fatal): Remove declaration.
12260 * utils.c (fatal): Remove function.
12261
12262 2014-08-28 Gary Benson <gbenson@redhat.com>
12263
12264 * tracepoint.c (gdb_agent_init): Replace fatal with
12265 perror_with_name.
12266 (initialize_tracepoint): Likewise.
12267
12268 2014-08-28 Gary Benson <gbenson@redhat.com>
12269
12270 * remote-utils.c (remote_prepare): Replace fatal with error.
12271
12272 2014-08-28 Gary Benson <gbenson@redhat.com>
12273
12274 * linux-low.c (linux_async): Replace fatal with warning.
12275 Tidy up and return.
12276 (linux_start_non_stop): Return -1 if linux_async failed.
12277
12278 2014-08-28 Gary Benson <gbenson@redhat.com>
12279
12280 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
12281 gdb_assert.
12282 (i386_dr_low_get_addr): Remove vague comment.
12283 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
12284 gdb_assert.
12285
12286 2014-08-28 Gary Benson <gbenson@redhat.com>
12287
12288 * inferiors.c (get_thread_process): Replace check with gdb_assert.
12289 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
12290 internal_error.
12291 (linux_resume_one_lwp): Likewise.
12292 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
12293 gdb_assert.
12294 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
12295 with internal_error.
12296 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
12297 (init_register_cache): Replace fatal with gdb_assert_not_reached.
12298 (find_register_by_name): Replace fatal with internal_error.
12299 (find_regno): Likewise.
12300 * tdesc.c (init_target_desc): Replace check with gdb_assert.
12301 * thread-db.c (thread_db_create_event): Likewise.
12302 (thread_db_load_search): Likewise.
12303 (try_thread_db_load_1): Likewise.
12304 * tracepoint.c (get_jump_space_head): Replace fatal with
12305 internal_error.
12306 (claim_trampoline_space): Likewise.
12307 (have_fast_tracepoint_trampoline_buffer): Likewise.
12308 (cmd_qtstart): Likewise.
12309 (stop_tracing): Likewise.
12310 (fast_tracepoint_collecting): Likewise.
12311 (target_malloc): Likewise.
12312 (download_tracepoint): Likewise.
12313 (download_trace_state_variables): Replace check with gdb_assert.
12314 (upload_fast_traceframes): Replace fatal with internal_error.
12315
12316 2014-08-19 Tom Tromey <tromey@redhat.com>
12317 Gary Benson <gbenson@redhat.com>
12318
12319 * Makefile.in (SFILES): Add common/common-debug.c.
12320 (OBS): Add common-debug.o.
12321 (common-debug.o): New rule.
12322 * debug.h (debug_printf): Don't declare.
12323 * debug.c (debug_printf): Renamed and rewritten as...
12324 (debug_vprintf): New function.
12325
12326 2014-08-19 Gary Benson <gbenson@redhat.com>
12327
12328 * utils.h: Do not include print-utils.h.
12329
12330 2014-08-19 Tom Tromey <tromey@redhat.com>
12331 Gary Benson <gbenson@redhat.com>
12332
12333 * server.h: Add static assertion.
12334 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
12335
12336 2014-08-19 Tom Tromey <tromey@redhat.com>
12337 Gary Benson <gbenson@redhat.com>
12338
12339 * Makefile.in (SFILES): Add common/errors.c.
12340 (OBS): Add errors.o.
12341 (IPA_OBS): Add errors-ipa.o.
12342 (errors.o): New rule.
12343 (errors-ipa.o): Likewise.
12344 * utils.h (perror_with_name, error, warning): Don't declare.
12345 * utils.c (warning): Renamed and rewritten as...
12346 (vwarning): New function.
12347 (error): Renamed and rewritten as...
12348 (verror): New function.
12349 (internal_error): Renamed and rewritten as...
12350 (internal_verror): New function.
12351
12352 2014-08-07 Gary Benson <gbenson@redhat.com>
12353
12354 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
12355 * configure: Regenerate.
12356 * config.in: Likewise.
12357 * server.h: Do not include errno.h.
12358 * event-loop.c: Likewise.
12359 * hostio-errno.c: Likewise.
12360 * linux-low.c: Likewise.
12361 * remote-utils.c: Likewise.
12362 * spu-low.c: Likewise.
12363 * utils.c: Likewise.
12364 * gdbreplay.c: Unconditionally include errno.h.
12365
12366 2014-08-07 Gary Benson <gbenson@redhat.com>
12367
12368 * server.h: Do not include string.h.
12369 * event-loop.c: Likewise.
12370 * linux-low.c: Likewise.
12371 * regcache.c: Likewise.
12372 * remote-utils.c: Likewise.
12373 * spu-low.c: Likewise.
12374 * utils.c: Likewise.
12375
12376 2014-08-07 Gary Benson <gbenson@redhat.com>
12377
12378 * server.h: Do not include gdb_assert.h.
12379
12380 2014-08-07 Gary Benson <gbenson@redhat.com>
12381
12382 * server.h: Do not include common-utils.h.
12383
12384 2014-08-07 Gary Benson <gbenson@redhat.com>
12385
12386 * server.h: Do not include ptid.h.
12387 * notif.h: Likewise.
12388
12389 2014-08-07 Gary Benson <gbenson@redhat.com>
12390
12391 * server.h: Do not include gdb_locale.h.
12392
12393 2014-08-07 Gary Benson <gbenson@redhat.com>
12394
12395 * server.h: Do not include gdb/signals.h.
12396 * win32-low.c: Likewise.
12397
12398 2014-08-07 Gary Benson <gbenson@redhat.com>
12399
12400 * server.h: Do not include pathmax.h.
12401
12402 2014-08-07 Gary Benson <gbenson@redhat.com>
12403
12404 * server.h: Do not include libiberty.h.
12405 * linux-bfin-low.c: Likewise.
12406
12407 2014-08-07 Gary Benson <gbenson@redhat.com>
12408
12409 * server.h: Do not include ansidecl.h.
12410
12411 2014-08-07 Gary Benson <gbenson@redhat.com>
12412
12413 * linux-x86-low.c: Do not include stddef.h.
12414 * lynx-ppc-low.c: Likewise.
12415 * tracepoint.c: Likewise.
12416
12417 2014-08-07 Gary Benson <gbenson@redhat.com>
12418
12419 * server.h: Do not include stdarg.h.
12420 * nto-low.c: Likewise.
12421
12422 2014-08-07 Gary Benson <gbenson@redhat.com>
12423
12424 * server.h: Do not include stdlib.h.
12425 * inferiors.c: Likewise.
12426 * linux-low.c: Likewise.
12427 * regcache.c: Likewise.
12428 * spu-low.c: Likewise.
12429 * tracepoint.c: Likewise.
12430 * utils.c: Likewise.
12431
12432 2014-08-07 Gary Benson <gbenson@redhat.com>
12433
12434 * server.h: Do not include stdio.h.
12435 * linux-low.c: Likewise.
12436 * remote-utils.c: Likewise.
12437 * spu-low.c: Likewise.
12438 * utils.c: Likewise.
12439 * wincecompat.c: Likewise.
12440
12441 2014-08-06 Gary Benson <gbenson@redhat.com>
12442
12443 * regcache.c (init_register_cache): Move conditionals inside if.
12444
12445 2014-08-06 Gary Benson <gbenson@redhat.com>
12446
12447 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
12448
12449 2014-07-31 Gary Benson <gbenson@redhat.com>
12450
12451 * ax.h: Do not include server.h.
12452 * gdbthread.h: Likewise.
12453 * lynx-low.h: Likewise.
12454 * notif.h: Likewise.
12455
12456 2014-07-30 Gary Benson <gbenson@redhat.com>
12457
12458 * server.h: Include common-defs.h.
12459 Do not include config.h or build-gnulib-gdbserver/config.h.
12460
12461 2014-07-30 Gary Benson <gbenson@redhat.com>
12462
12463 * hostio-errno.c: Move server.h to top of includes list.
12464 * inferiors.c: Likewise.
12465 * linux-x86-low.c: Likewise.
12466 * notif.c: Include server.h.
12467
12468 2014-07-24 Tom Tromey <tromey@redhat.com>
12469 Gary Benson <gbenson@redhat.com>
12470
12471 * server.h (CORE_ADDR): Now unsigned.
12472
12473 2014-07-16 Pedro Alves <palves@redhat.com>
12474
12475 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
12476
12477 2014-07-15 Pedro Alves <palves@redhat.com>
12478
12479 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
12480 copy.
12481
12482 2014-07-11 Pedro Alves <palves@redhat.com>
12483
12484 * linux-low.c (kill_wait_lwp): New function, based on
12485 kill_one_lwp_callback, but use my_waitpid directly.
12486 (kill_one_lwp_callback, linux_kill): Use it.
12487
12488 2014-06-23 Pedro Alves <palves@redhat.com>
12489
12490 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
12491 before setting DR0..DR3.
12492
12493 2014-06-20 Gary Benson <gbenson@redhat.com>
12494
12495 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
12496 * configure: Regenerated.
12497 * config.in: Likewise.
12498
12499 2014-06-20 Gary Benson <gbenson@redhat.com>
12500
12501 * Makefile.in (SFILES): Update locations for files moved
12502 from common to nat.
12503 (object file files): Reordered.
12504
12505 2014-06-20 Gary Benson <gbenson@redhat.com>
12506
12507 * i386-low.h (i386_dr_low_can_set_addr): Removed.
12508 (i386_dr_low_set_addr): Likewise.
12509 (i386_dr_low_get_addr): Likewise.
12510 (i386_dr_low_can_set_control): Likewise.
12511 (i386_dr_low_set_control): Likewise.
12512 (i386_dr_low_get_control): Likewise.
12513 (i386_dr_low_get_status): Likewise.
12514 (i386_get_debug_register_length): Likewise.
12515 * linux-x86-low.c (i386_dr_low_set_addr):
12516 Changed signature. Made static.
12517 (i386_dr_low_get_addr): Likewise.
12518 (i386_dr_low_set_control): Likewise.
12519 (i386_dr_low_get_control): Likewise.
12520 (i386_dr_low_get_status): Likewise.
12521 (i386_dr_low): New global variable.
12522 * win32-i386-low.c (i386_dr_low_set_addr):
12523 Changed signature. Made static.
12524 (i386_dr_low_get_addr): Likewise.
12525 (i386_dr_low_set_control): Likewise.
12526 (i386_dr_low_get_control): Likewise.
12527 (i386_dr_low_get_status): Likewise.
12528 (i386_dr_low): New global variable.
12529
12530 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
12531
12532 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
12533 * Makefile.in (AR, AR_FLAGS): Define.
12534 * configure: Regenerate.
12535
12536 2014-06-19 Gary Benson <gbenson@redhat.com>
12537
12538 * Makefile.in (i386-dregs.o): New rule.
12539 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
12540 * i386-low.c (target.h): Remove include.
12541 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
12542 (DR_CONTROL_SHIFT): Likewise.
12543 (DR_CONTROL_SIZE): Likewise.
12544 (DR_RW_EXECUTE): Likewise.
12545 (DR_RW_WRITE): Likewise.
12546 (DR_RW_READ): Likewise.
12547 (DR_RW_IORW): Likewise.
12548 (DR_LEN_1): Likewise.
12549 (DR_LEN_2): Likewise.
12550 (DR_LEN_4): Likewise.
12551 (DR_LEN_8): Likewise.
12552 (DR_LOCAL_ENABLE_SHIFT): Likewise.
12553 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
12554 (DR_ENABLE_SIZE): Likewise.
12555 (DR_LOCAL_SLOWDOWN): Likewise.
12556 (DR_GLOBAL_SLOWDOWN): Likewise.
12557 (DR_CONTROL_RESERVED): Likewise.
12558 (I386_DR_CONTROL_MASK): Likewise.
12559 (I386_DR_VACANT): Likewise.
12560 (I386_DR_LOCAL_ENABLE): Likewise.
12561 (I386_DR_GLOBAL_ENABLE): Likewise.
12562 (I386_DR_DISABLE): Likewise.
12563 (I386_DR_SET_RW_LEN): Likewise.
12564 (I386_DR_GET_RW_LEN): Likewise.
12565 (I386_DR_WATCH_HIT): Likewise.
12566 (i386_wp_op_t): Likewise.
12567 (i386_show_dr): Likewise.
12568 (i386_length_and_rw_bits): Likewise.
12569 (i386_insert_aligned_watchpoint): Likewise.
12570 (i386_remove_aligned_watchpoint): Likewise.
12571 (i386_handle_nonaligned_watchpoint): Likewise.
12572 i386_update_inferior_debug_regs(): Likewise.
12573 (i386_dr_insert_watchpoint): Likewise.
12574 (i386_dr_remove_watchpoint): Likewise.
12575 (i386_dr_region_ok_for_watchpoint): Likewise.
12576 (i386_dr_stopped_data_address): Likewise.
12577 (i386_dr_stopped_by_watchpoint): Likewise.
12578
12579 2014-06-19 Gary Benson <gbenson@redhat.com>
12580
12581 * i386-low.c (i386_dr_show): Renamed to
12582 i386_show_dr and made static. All uses updated.
12583 (i386_dr_length_and_rw_bits): Renamed to
12584 i386_length_and_rw_bits and made static.
12585 All uses updated.
12586 (i386_dr_insert_aligned_watchpoint): Renamed to
12587 i386_insert_aligned_watchpoint and made static.
12588 All uses updated.
12589 (i386_dr_remove_aligned_watchpoint): Renamed to
12590 i386_remove_aligned_watchpoint and made static.
12591 All uses updated.
12592 (i386_dr_update_inferior_debug_regs): Renamed to
12593 i386_update_inferior_debug_regs and made static.
12594 All uses updated.
12595
12596 2014-06-18 Gary Benson <gbenson@redhat.com>
12597
12598 * i386-low.h (i386_dr_low_can_set_addr): New macro.
12599 (i386_dr_low_can_set_control): Likewise.
12600 (i386_get_debug_register_length): Likewise.
12601 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
12602 (i386_dr_low_can_set_control): Likewise.
12603 (i386_get_debug_register_length): Likewise.
12604
12605 2014-06-17 Gary Benson <gbenson@redhat.com>
12606
12607 * i386-low.h (i386-dregs.h): New include.
12608 (DR_FIRSTADDR): Now in i386-dregs.h.
12609 (DR_LASTADDR): Likewise.
12610 (DR_NADDR): Likewise.
12611 (DR_STATUS): Likewise.
12612 (DR_CONTROL): Likewise.
12613 (i386_debug_reg_state): Likewise.
12614 (i386_dr_insert_watchpoint): Likewise.
12615 (i386_dr_remove_watchpoint): Likewise.
12616 (i386_dr_region_ok_for_watchpoint): Likewise.
12617 (i386_dr_stopped_data_address): Likewise.
12618 (i386_dr_stopped_by_watchpoint): Likewise.
12619 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
12620
12621 2014-06-18 Gary Benson <gbenson@redhat.com>
12622
12623 * i386-low.h (i386_low_insert_watchpoint): Renamed to
12624 i386_dr_insert_watchpoint.
12625 (i386_low_remove_watchpoint): Renamed to
12626 i386_dr_remove_watchpoint.
12627 (i386_low_region_ok_for_watchpoint): Renamed to
12628 i386_dr_region_ok_for_watchpoint.
12629 (i386_low_stopped_data_address): Renamed to
12630 i386_dr_stopped_data_address.
12631 (i386_low_stopped_by_watchpoint): Renamed to
12632 i386_dr_stopped_by_watchpoint.
12633 * i386-low.c (i386_show_dr): Renamed to
12634 i386_dr_show and made nonstatic. All uses updated.
12635 (i386_length_and_rw_bits): Renamed to
12636 i386_dr_length_and_rw_bits and made nonstatic.
12637 All uses updated.
12638 (i386_insert_aligned_watchpoint): Renamed to
12639 i386_dr_insert_aligned_watchpoint and made nonstatic.
12640 All uses updated.
12641 (i386_remove_aligned_watchpoint): Renamed to
12642 i386_dr_remove_aligned_watchpoint and made nonstatic.
12643 All uses updated.
12644 (i386_update_inferior_debug_regs): Renamed to
12645 i386_dr_update_inferior_debug_regs and made nonstatic.
12646 All uses updated.
12647 (i386_low_insert_watchpoint): Renamed to
12648 i386_dr_insert_watchpoint. All uses updated.
12649 (i386_low_remove_watchpoint): Renamed to
12650 i386_dr_remove_watchpoint. All uses updated.
12651 (i386_low_region_ok_for_watchpoint): Renamed to
12652 i386_dr_region_ok_for_watchpoint. All uses updated.
12653 (i386_low_stopped_data_address): Renamed to
12654 i386_dr_stopped_data_address. All uses updated.
12655 (i386_low_stopped_by_watchpoint): Renamed to
12656 i386_dr_stopped_by_watchpoint. All uses updated.
12657
12658 2014-06-18 Gary Benson <gbenson@redhat.com>
12659
12660 * i386-low.c (i386_dr_low_can_set_addr): New macro.
12661 (i386_dr_low_can_set_control): Likewise.
12662 (i386_insert_aligned_watchpoint): New check.
12663
12664 2014-06-18 Gary Benson <gbenson@redhat.com>
12665
12666 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
12667 Renamed to state.
12668
12669 2014-06-18 Gary Benson <gbenson@redhat.com>
12670
12671 * i386-low.c (i386_length_and_rw_bits): Use internal_error
12672 instead of fatal and error.
12673 (i386_handle_nonaligned_watchpoint): Likewise.
12674
12675 2014-06-18 Gary Benson <gbenson@redhat.com>
12676
12677 * i386-low.c (i386_get_debug_register_length): New macro.
12678 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
12679 (i386_show_dr): Use debug_printf instead of fprintf. Use
12680 phex to format values.
12681
12682 2014-06-18 Gary Benson <gbenson@redhat.com>
12683
12684 * i386-low.h: Comment changes.
12685 * i386-low.c: Likewise.
12686
12687 2014-06-18 Gary Benson <gbenson@redhat.com>
12688
12689 * i386-low.c: Whitespace changes.
12690
12691 2014-06-12 Tom Tromey <tromey@redhat.com>
12692
12693 * utils.c (freeargv): Remove.
12694
12695 2014-06-12 Tom Tromey <tromey@redhat.com>
12696
12697 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
12698 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
12699 (parse_debug_format_options): Likewise.
12700 (gdbserver_usage): Likewise.
12701 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
12702 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
12703 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
12704 against libiberty.
12705 ($(LIBGNU)): Depend on libiberty.
12706 (all-lib): Recurse into all subdirs.
12707 (install-only): Invoke "install" target in subdirs.
12708 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
12709 targets.
12710 * configure: Rebuild.
12711 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
12712 for vasprintf, vsnprintf, or gettimeofday.
12713 * configure.srv: Don't add safe-ctype.o or lbasename.o to
12714 srv_tgtobj.
12715
12716 2014-06-05 Joel Brobecker <brobecker@adacore.com>
12717
12718 * development.sh: Delete.
12719 * Makefile.in (config.status): Adjust dependency on development.sh.
12720 * configure.ac: Adjust development.sh source call.
12721 * configure: Regenerate.
12722
12723 2014-06-02 Pedro Alves <palves@redhat.com>
12724
12725 * ax.c (gdb_free_agent_expr): New function.
12726 * ax.h (gdb_free_agent_expr): New declaration.
12727 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
12728 list.
12729 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
12730 static.
12731 (clear_breakpoint_conditions_and_commands): New function.
12732 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
12733 (clear_breakpoint_conditions_and_commands): New declaration.
12734
12735 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12736
12737 * linux-aarch64-low.c (asm/ptrace.h): Include.
12738
12739 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12740
12741 Fix TLS access for -static -pthread.
12742 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
12743 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
12744 (thread_db_load_search, try_thread_db_load_1): Initialize it.
12745
12746 2014-05-20 Pedro Alves <palves@redhat.com>
12747
12748 * linux-aarch64-low.c (aarch64_insert_point)
12749 (aarch64_remove_point): No longer check whether the type is
12750 supported here. Adjust to new interface.
12751 (the_low_target): Install aarch64_supports_z_point_type as
12752 supports_z_point_type method.
12753 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
12754 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
12755 instead of a Z packet char. Adjust.
12756 (arm_supports_z_point_type): New function.
12757 (arm_insert_point, arm_remove_point): Adjust to new interface.
12758 (the_low_target): Install arm_supports_z_point_type.
12759 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
12760 (cris_insert_point, cris_remove_point): Adjust to new interface.
12761 Don't check whether the type is supported here.
12762 (the_low_target): Install cris_supports_z_point_type.
12763 * linux-low.c (linux_supports_z_point_type): New function.
12764 (linux_insert_point, linux_remove_point): Adjust to new interface.
12765 * linux-low.h (struct linux_target_ops) <insert_point,
12766 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
12767 raw_breakpoint pointer parameter.
12768 <supports_z_point_type>: New method.
12769 * linux-mips-low.c (mips_supports_z_point_type): New function.
12770 (mips_insert_point, mips_remove_point): Adjust to new interface.
12771 Use mips_supports_z_point_type.
12772 (the_low_target): Install mips_supports_z_point_type.
12773 * linux-ppc-low.c (the_low_target): Install NULL as
12774 supports_z_point_type method.
12775 * linux-s390-low.c (the_low_target): Install NULL as
12776 supports_z_point_type method.
12777 * linux-sparc-low.c (the_low_target): Install NULL as
12778 supports_z_point_type method.
12779 * linux-x86-low.c (x86_supports_z_point_type): New function.
12780 (x86_insert_point): Adjust to new insert_point interface. Use
12781 insert_memory_breakpoint. Adjust to new
12782 i386_low_insert_watchpoint interface.
12783 (x86_remove_point): Adjust to remove_point interface. Use
12784 remove_memory_breakpoint. Adjust to new
12785 i386_low_remove_watchpoint interface.
12786 (the_low_target): Install x86_supports_z_point_type.
12787 * lynx-low.c (lynx_target_ops): Install NULL as
12788 supports_z_point_type callback.
12789 * nto-low.c (nto_supports_z_point_type): New.
12790 (nto_insert_point, nto_remove_point): Adjust to new interface.
12791 (nto_target_ops): Install nto_supports_z_point_type.
12792 * mem-break.c: Adjust intro comment.
12793 (struct raw_breakpoint) <raw_type, size>: New fields.
12794 <inserted>: Update comment.
12795 <shlib_disabled>: Delete field.
12796 (enum bkpt_type) <gdb_breakpoint>: Delete value.
12797 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
12798 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
12799 (raw_bkpt_type_to_target_hw_bp_type): New function.
12800 (find_enabled_raw_code_breakpoint_at): New function.
12801 (find_raw_breakpoint_at): New type and size parameters. Use them.
12802 (insert_memory_breakpoint): New function, based off
12803 set_raw_breakpoint_at.
12804 (remove_memory_breakpoint): New function.
12805 (set_raw_breakpoint_at): Reimplement.
12806 (set_breakpoint): New, based on set_breakpoint_at.
12807 (set_breakpoint_at): Reimplement.
12808 (delete_raw_breakpoint): Go through the_target->remove_point
12809 instead of assuming memory breakpoints.
12810 (find_gdb_breakpoint_at): Delete.
12811 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
12812 (find_gdb_breakpoint): New function.
12813 (set_gdb_breakpoint_at): Delete.
12814 (z_type_supported): New function.
12815 (set_gdb_breakpoint_1): New function, loosely based off
12816 set_gdb_breakpoint_at.
12817 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
12818 (delete_gdb_breakpoint_at): Delete.
12819 (delete_gdb_breakpoint_1): New function, loosely based off
12820 delete_gdb_breakpoint_at.
12821 (delete_gdb_breakpoint): New function.
12822 (clear_gdb_breakpoint_conditions): Rename to ...
12823 (clear_breakpoint_conditions): ... this. Don't handle a NULL
12824 breakpoint.
12825 (add_condition_to_breakpoint): Make static.
12826 (add_breakpoint_condition): Take a struct breakpoint pointer
12827 instead of an address. Adjust.
12828 (gdb_condition_true_at_breakpoint): Rename to ...
12829 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
12830 z_type parameter.
12831 (gdb_condition_true_at_breakpoint): Reimplement.
12832 (add_breakpoint_commands): Take a struct breakpoint pointer
12833 instead of an address. Adjust.
12834 (gdb_no_commands_at_breakpoint): Rename to ...
12835 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
12836 parameter. Return true if no breakpoint was found. Change debug
12837 output.
12838 (gdb_no_commands_at_breakpoint): Reimplement.
12839 (run_breakpoint_commands): Rename to ...
12840 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
12841 and change return type to boolean.
12842 (run_breakpoint_commands): New function.
12843 (gdb_breakpoint_here): Also check for Z1 breakpoints.
12844 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
12845 breakpoint. Go through the_target->remove_point instead of
12846 assuming memory breakpoint.
12847 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
12848 software and hardware breakpoints.
12849 (reinsert_raw_breakpoint): Go through the_target->insert_point
12850 instead of assuming memory breakpoint.
12851 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
12852 software and hardware breakpoints.
12853 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
12854 Check both software and hardware breakpoints.
12855 (validate_inserted_breakpoint): Assert the breakpoint is a
12856 software breakpoint. Set the inserted flag to -1 instead of
12857 setting shlib_disabled.
12858 (delete_disabled_breakpoints): Adjust.
12859 (validate_breakpoints): Only validate software breakpoints.
12860 Adjust to inserted flag change.
12861 (check_mem_read, check_mem_write): Skip breakpoint types other
12862 than software breakpoints. Adjust to inserted flag change.
12863 * mem-break.h (enum raw_bkpt_type): New enum.
12864 (raw_breakpoint, struct process_info): Forward declare.
12865 (Z_packet_to_target_hw_bp_type): Delete declaration.
12866 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
12867 (set_gdb_breakpoint, delete_gdb_breakpoint)
12868 (clear_breakpoint_conditions): New declarations.
12869 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
12870 (breakpoint_inserted_here): Update comment.
12871 (add_breakpoint_condition, add_breakpoint_commands): Replace
12872 address parameter with a breakpoint pointer parameter.
12873 (gdb_breakpoint_here): Update comment.
12874 (delete_gdb_breakpoint_at): Delete.
12875 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
12876 * server.c (process_point_options): Take a struct breakpoint
12877 pointer instead of an address. Adjust.
12878 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
12879 delete_gdb_breakpoint.
12880 * spu-low.c (spu_target_ops): Install NULL as
12881 supports_z_point_type method.
12882 * target.h: Include mem-break.h.
12883 (struct target_ops) <prepare_to_access_memory>: Update comment.
12884 <supports_z_point_type>: New field.
12885 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12886 instead of a char. Also take a raw breakpoint pointer.
12887 * win32-arm-low.c (the_low_target): Install NULL as
12888 supports_z_point_type.
12889 * win32-i386-low.c (i386_supports_z_point_type): New function.
12890 (i386_insert_point, i386_remove_point): Adjust to new interface.
12891 (the_low_target): Install i386_supports_z_point_type.
12892 * win32-low.c (win32_supports_z_point_type): New function.
12893 (win32_insert_point, win32_remove_point): Adjust to new interface.
12894 (win32_target_ops): Install win32_supports_z_point_type.
12895 * win32-low.h (struct win32_target_ops):
12896 <supports_z_point_type>: New method.
12897 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12898 instead of a char. Also take a raw breakpoint pointer.
12899
12900 2014-05-20 Pedro Alves <palves@redhat.com>
12901
12902 * mem-break.h: Include break-common.h.
12903 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12904 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
12905 (Z_packet_to_target_hw_bp_type): New declaration.
12906 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
12907 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
12908 (Z_PACKET_ACCESS_WP): Delete macros.
12909 (Z_packet_to_hw_type): Delete function.
12910 * i386-low.h: Don't include break-common.h here.
12911 (Z_packet_to_hw_type): Delete declaration.
12912 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
12913 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12914 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
12915 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12916 * linux-aarch64-low.c: Don't include break-common.h here.
12917 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12918 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
12919 (Z_packet_to_target_hw_bp_type): Delete function.
12920 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
12921 function.
12922 (mips_insert_point, mips_remove_point): Use
12923 Z_packet_to_target_hw_bp_type.
12924
12925 2014-05-20 Pedro Alves <palves@redhat.com>
12926
12927 * linux-aarch64-low.c: Include break-common.h.
12928 (enum target_point_type): Delete.
12929 (Z_packet_to_point_type): Rename to ...
12930 (Z_packet_to_target_hw_bp_type): ... this, and return a
12931 target_hw_bp_type instead.
12932 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
12933 instead of an enum target_point_type.
12934 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
12935 breakpoint type.
12936 (aarch64_dr_state_insert_one_point)
12937 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
12938 (aarch64_handle_aligned_watchpoint)
12939 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
12940 Take an enum target_hw_bp_type instead of an enum
12941 target_point_type.
12942 (aarch64_supports_z_point_type): New function.
12943 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
12944 use Z_packet_to_target_hw_bp_type.
12945
12946 2014-05-20 Joel Brobecker <brobecker@adacore.com>
12947
12948 * configure.ac: Only use -Werror by default when DEVELOPMENT
12949 is true.
12950 * configure: Regenerate.
12951
12952 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
12953
12954 Fix gdbserver qGetTLSAddr for x86_64 -m32.
12955 * linux-x86-low.c (X86_64_USER_REGS): New.
12956 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
12957
12958 2014-04-28 Yao Qi <yao@codesourcery.com>
12959
12960 * Makefile.in (i386-avx512.c): Fix the typo of generated file
12961 name.
12962
12963 2014-04-25 Pedro Alves <palves@redhat.com>
12964
12965 PR server/16255
12966 * linux-low.c (linux_attach_fail_reason_string): New function.
12967 (linux_attach_lwp): Delete.
12968 (linux_attach_lwp_1): Rename to ...
12969 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
12970 argument. Remove "initial" parameter. Return int instead of
12971 void. Don't error or warn here.
12972 (linux_attach): Adjust to call linux_attach_lwp. Call error on
12973 failure to attach to the tgid. Call warning when failing to
12974 attach to an lwp.
12975 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
12976 argument. Remove "initial" parameter. Return int instead of
12977 void. Don't error or warn here.
12978 (linux_attach_fail_reason_string): New declaration.
12979 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
12980 interface change. Use linux_attach_fail_reason_string.
12981
12982 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
12983 Walfred Tedeschi <walfred.tedeschi@intel.com>
12984
12985 * Makefile.in: Added rules to handle new files
12986 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
12987 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
12988 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
12989 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
12990 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
12991 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
12992 x32-avx512-linux.o.
12993 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
12994 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
12995 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
12996 i386/x32-avx512.xml.
12997 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
12998 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
12999 i386/x32-avx512-linux.xml.
13000 * i387-fp.c (num_avx512_k_registers): New constant for number
13001 of K registers.
13002 (num_avx512_zmmh_low_registers): New constant for number of
13003 lower ZMM registers (0-15).
13004 (num_avx512_zmmh_high_registers): New constant for number of
13005 higher ZMM registers (16-31).
13006 (num_avx512_ymmh_registers): New contant for number of higher
13007 YMM registers (ymm16-31 added by avx521 on x86_64).
13008 (num_avx512_xmm_registers): New constant for number of higher
13009 XMM registers (xmm16-31 added by AVX512 on x86_64).
13010 (struct i387_xsave): Add space for AVX512 registers.
13011 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
13012 Add code to handle AVX512 registers.
13013 (i387_xsave_to_cache): Add code to handle AVX512 registers.
13014 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
13015 prototypei from generated file.
13016 (tdesc_amd64_avx512_linux): Likewise.
13017 (init_registers_x32_avx512_linux): Likewise.
13018 (tdesc_x32_avx512_linux): Likewise.
13019 (init_registers_i386_avx512_linux): Likewise.
13020 (tdesc_i386_avx512_linux): Likewise.
13021 (x86_64_regmap): Add AVX512 registers.
13022 (x86_linux_read_description): Add code to handle AVX512 XSTATE
13023 mask.
13024 (initialize_low_arch): Add code to initialize AVX512 registers.
13025
13026 2014-04-23 Pedro Alves <palves@redhat.com>
13027
13028 * mem-break.c (find_gdb_breakpoint_at): Make static.
13029 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
13030
13031 2014-04-23 Pedro Alves <palves@redhat.com>
13032
13033 * i386-low.c: Don't include break-common.h here.
13034 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
13035 prototype to take target_hw_bp_type as argument instead of a Z
13036 packet char.
13037 * i386-low.h: Include break-common.h here.
13038 (Z_packet_to_hw_type): Declare.
13039 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
13040 prototypes.
13041 * linux-x86-low.c (x86_insert_point): Convert the packet number to
13042 a target_hw_bp_type before calling i386_low_insert_watchpoint.
13043 (x86_remove_point): Convert the packet number to a
13044 target_hw_bp_type before calling i386_low_remove_watchpoint.
13045 * win32-i386-low.c (i386_insert_point): Convert the packet number
13046 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
13047 (i386_remove_point): Convert the packet number to a
13048 target_hw_bp_type before calling i386_low_remove_watchpoint.
13049
13050 2014-04-23 Pedro Alves <palves@redhat.com>
13051
13052 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
13053
13054 2014-04-10 Pedro Alves <palves@redhat.com>
13055
13056 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
13057 Check if the condition or command is NULL before checking if the
13058 breakpoint is known. On success, return true.
13059 * mem-break.h (add_breakpoint_condition): Document return.
13060 (add_breakpoint_commands): Add describing comment.
13061 * server.c (skip_to_semicolon): New function.
13062 (process_point_options): Use it.
13063
13064 2014-04-09 Pedro Alves <palves@redhat.com>
13065
13066 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
13067 to lwpid_of.
13068
13069 2014-02-27 Pedro Alves <palves@redhat.com>
13070
13071 PR 12702
13072 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
13073 macros.
13074 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
13075 output.
13076 (last_thread_of_process_p): Take a PID argument instead of a
13077 thread pointer.
13078 (linux_wait_for_lwp): Delete.
13079 (num_lwps, check_zombie_leaders, not_stopped_callback): New
13080 functions.
13081 (linux_low_filter_event): New function, party factored out from
13082 linux_wait_for_event.
13083 (linux_wait_for_event): Rename to ...
13084 (linux_wait_for_event_filtered): ... this. Add new filter ptid
13085 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
13086 sigsuspend. Check for zombie leaders.
13087 (linux_wait_for_event): Reimplement as wrapper around
13088 linux_wait_for_event_filtered.
13089 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
13090 a normal or signal exit is seen, it's the whole process exiting.
13091 (wait_for_sigstop): No longer a for_each_inferior callback.
13092 Rewrite on top of linux_wait_for_event_filtered.
13093 (stop_all_lwps): Call wait_for_sigstop directly.
13094 * server.c (resume, handle_target_event): Handle
13095 TARGET_WAITKIND_NO_RESUMED.
13096
13097 2014-02-26 Joel Brobecker <brobecker@adacore.com>
13098
13099 * win32-low.c (psapi_get_dll_name,
13100 * win32_CreateToolhelp32Snapshot): Delete.
13101 (win32_CreateToolhelp32Snapshot, win32_Module32First)
13102 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
13103 Delete.
13104 (handle_load_dll): Add function description.
13105 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
13106
13107 2014-02-26 Joel Brobecker <brobecker@adacore.com>
13108
13109 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
13110 Add comment.
13111 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
13112 base address when calling win32_add_one_solib.
13113 (handle_load_dll): Delete local variable load_addr.
13114 Remove 0x1000 offset applied to DLL base address when calling
13115 win32_add_one_solib.
13116 (handle_unload_dll): Add comment.
13117
13118 2014-02-26 Joel Brobecker <brobecker@adacore.com>
13119
13120 * win32-low.c (win32_add_all_dlls): Renames
13121 win32_ensure_ntdll_loaded. Rewrite function documentation.
13122 Adjust implementation to always load all DLLs.
13123 Add 0x1000 offset to DLL base address when calling
13124 win32_add_one_solib.
13125 (child_initialization_done): New static global.
13126 (do_initial_child_stuff): Set child_initialization_done to
13127 zero during child initialization, and 1 after. Replace call
13128 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
13129 Add comment.
13130 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
13131 (handle_unload_dll): Add function documentation.
13132 (get_child_debug_event): Ignore load and unload DLL events
13133 during child initialization.
13134
13135 2014-02-20 Doug Evans <dje@google.com>
13136
13137 Remove global all_lwps.
13138 * inferiors.h (ptid_of): Move here from linux-low.h.
13139 (pid_of, lwpid_of): Ditto.
13140 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
13141 parameter is a struct thread_info * now.
13142 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
13143 directly. Pass &all_threads to find_inferior instead of &all_lwps.
13144 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
13145 directly.
13146 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
13147 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
13148 * linux-arm-low.c (update_registers_callback): Update, "entry"
13149 parameter is a struct thread_info * now.
13150 Fetch lwpid from current_inferior directly.
13151 (arm_insert_point): Pass &all_threads to find_inferior instead of
13152 &all_lwps.
13153 (arm_remove_point): Ditto.
13154 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
13155 (arm_prepare_to_resume): Fetch pid from thread.
13156 (arm_read_description): Fetch lwpid from current_inferior directly.
13157 * linux-low.c (all_lwps): Delete.
13158 (delete_lwp): Delete call to remove_inferior.
13159 (handle_extended_wait): Fetch lwpid from thread.
13160 (add_lwp): Don't set lwp->entry.id. Remove call to
13161 add_inferior_to_list.
13162 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
13163 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
13164 (kill_one_lwp_callback): Ditto.
13165 (linux_kill): Don't dereference NULL pointer.
13166 Fetch ptid,lwpid from thread.
13167 (get_detach_signal): Fetch ptid from thread.
13168 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
13169 Simplify call to regcache_invalidate_thread.
13170 (delete_lwp_callback): Update, "entry" parameter is a
13171 struct thread_info * now. Fetch pid from thread.
13172 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
13173 (status_pending_p_callback): Update, "entry" parameter is a
13174 struct thread_info * now. Fetch ptid from thread.
13175 (find_lwp_pid): Update, "entry" parameter is a
13176 struct thread_info * now.
13177 (linux_wait_for_lwp): Fetch pid from thread.
13178 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
13179 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
13180 (enqueue_one_deferred_signal): Fetch lwpid from thread.
13181 (dequeue_one_deferred_signal): Ditto.
13182 (cancel_breakpoint): Fetch ptid from current_inferior.
13183 (linux_wait_for_event): Pass &all_threads to find_inferior,
13184 not &all_lwps. Fetch ptid, lwpid from thread.
13185 (count_events_callback): Update, "entry" parameter is a
13186 struct thread_info * now.
13187 (select_singlestep_lwp_callback): Ditto.
13188 (select_event_lwp_callback): Ditto.
13189 (cancel_breakpoints_callback): Ditto.
13190 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
13191 not &all_lwps.
13192 (select_event_lwp): Ditto. Fetch ptid from event_thread.
13193 (unsuspend_one_lwp): Update, "entry" parameter is a
13194 struct thread_info * now.
13195 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
13196 not &all_lwps.
13197 (linux_stabilize_threads): Ditto. And for for_each_inferior.
13198 Fetch lwpid from thread, not lwp.
13199 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
13200 Pass &all_threads to find_inferior, not &all_lwps.
13201 (send_sigstop): Fetch lwpid from thread, not lwp.
13202 (send_sigstop_callback): Update, "entry" parameter is a
13203 struct thread_info * now.
13204 (suspend_and_send_sigstop_callback): Ditto.
13205 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
13206 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
13207 struct thread_info * now.
13208 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
13209 from thread, lwp.
13210 (lwp_running): Update, "entry" parameter is a
13211 struct thread_info * now.
13212 (stop_all_lwps): Fetch ptid from thread.
13213 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
13214 (linux_resume_one_lwp): Fetch lwpid from thread.
13215 (linux_set_resume_request): Update, "entry" parameter is a
13216 struct thread_info * now. Fetch pid, lwpid from thread.
13217 (resume_status_pending_p): Update, "entry" parameter is a
13218 struct thread_info * now.
13219 (need_step_over_p): Ditto. Fetch lwpid from thread.
13220 (start_step_over): Fetch lwpid from thread.
13221 (linux_resume_one_thread): Update, "entry" parameter is a
13222 struct thread_info * now. Fetch lwpid from thread.
13223 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
13224 (proceed_one_lwp): Update, "entry" parameter is a
13225 struct thread_info * now. Fetch lwpid from thread.
13226 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
13227 struct thread_info * now.
13228 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
13229 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
13230 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
13231 directly.
13232 (regsets_store_inferior_registers): Ditto.
13233 (fetch_register, store_register): Ditto.
13234 (linux_read_memory, linux_write_memory): Ditto.
13235 (linux_request_interrupt): Ditto.
13236 (linux_read_auxv): Ditto.
13237 (linux_xfer_siginfo): Ditto.
13238 (linux_qxfer_spu): Ditto.
13239 (linux_qxfer_libraries_svr4): Ditto.
13240 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
13241 moved to inferiors.h.
13242 (get_lwp): Delete.
13243 (get_thread_lwp): Update.
13244 (struct lwp_info): Delete member "entry". Simplify comment for
13245 member "thread".
13246 (all_lwps): Delete.
13247 * linux-mips-low.c (mips_read_description): Fetch lwpid from
13248 current_inferior directly.
13249 (update_watch_registers_callback): Update, "entry" parameter is a
13250 struct thread_info * now. Fetch pid from thread.
13251 (mips_linux_prepare_to_resume): Fetch ptid from thread.
13252 (mips_insert_point): Fetch lwpid from current_inferior.
13253 Pass &all_threads to find_inferior, not &all_lwps.
13254 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
13255 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
13256 directly.
13257 (mips_stopped_data_address): Ditto.
13258 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
13259 directly.
13260 * linux-tile-low.c (tile_arch_setup): Ditto.
13261 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
13262 (update_debug_registers_callback): Update, "entry" parameter is a
13263 struct thread_info * now. Fetch pid from thread.
13264 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
13265 Pass &all_threads to find_inferior, not &all_lwps.
13266 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
13267 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
13268 Pass &all_threads to find_inferior, not &all_lwps.
13269 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
13270 (i386_dr_low_get_status): Ditto.
13271 (x86_linux_prepare_to_resume): Fetch ptid from thread.
13272 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
13273 (x86_linux_read_description): Ditto.
13274 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
13275
13276 2014-02-20 Doug Evans <dje@google.com>
13277
13278 * inferiors.c (get_first_inferior): Fix buglet.
13279
13280 2014-02-19 Doug Evans <dje@google.com>
13281
13282 * gdbthread.h (add_thread): Change result type to struct thread_info *.
13283 * inferiors.c (add_thread): Change result type to struct thread_info *.
13284 All callers updated.
13285 (add_lwp): Call add_thread here instead of in callers.
13286 All callers updated.
13287 * linux-low.h (get_lwp_thread): Rewrite.
13288 (struct lwp_info): New member "thread".
13289
13290 2014-02-19 Doug Evans <dje@google.com>
13291
13292 * linux-low.c (add_lwp): Change result to struct lwp_info *.
13293 All callers updated.
13294
13295 2014-02-19 Doug Evans <dje@google.com>
13296
13297 * inferiors.c (add_thread): Fix whitespace.
13298
13299 2014-02-19 Doug Evans <dje@google.com>
13300
13301 * dll.c (clear_dlls): Replace accessing list implemention details
13302 with API function.
13303 * gdbthread.h (get_first_thread): Declare.
13304 * inferiors.c (for_each_inferior_with_data): New function.
13305 (get_first_thread): New function.
13306 (find_thread_ptid): Simplify.
13307 (get_first_inferior): New function.
13308 (clear_list): Delete.
13309 (one_inferior_p): New function.
13310 (clear_inferior_list): New function.
13311 (clear_inferiors): Update.
13312 * inferiors.h (for_each_inferior_with_data): Declare.
13313 (clear_inferior_list): Declare.
13314 (one_inferior_p): Declare.
13315 (get_first_inferior): Declare.
13316 * linux-low.c (linux_wait_for_event): Replace accessing list
13317 implemention details with API function.
13318 * server.c (target_running): Ditto.
13319 (accumulate_file_name_length): New function.
13320 (emit_dll_description): New function.
13321 (handle_qxfer_libraries): Replace accessing list implemention
13322 details with API function.
13323 (handle_qxfer_threads_worker): New function.
13324 (handle_qxfer_threads_proper): Replace accessing list implemention
13325 details with API function.
13326 (handle_query): Ditto.
13327 (visit_actioned_threads_callback_ftype): New typedef.
13328 (visit_actioned_threads_data): New struct.
13329 (visit_actioned_threads): Rewrite to be find_inferior callback.
13330 (resume): Call find_inferior.
13331 (handle_status): Replace accessing list implemention
13332 details with API function.
13333 (process_serial_event): Replace accessing list implemention details
13334 with API function.
13335 * target.c (set_desired_inferior): Replace accessing list implemention
13336 details with API function.
13337 * tracepoint.c (same_process_p): New function.
13338 (gdb_agent_about_to_close): Replace accessing list implemention
13339 details with API function.
13340 * win32-low.c (child_delete_thread): Replace accessing list
13341 implemention details with API function.
13342 (match_dll_by_basename): New function.
13343 (dll_is_loaded_by_basename): New function.
13344 (win32_ensure_ntdll_loaded): Replace accessing list implemention
13345 details call to dll_is_loaded_by_basename.
13346
13347 2014-02-19 Doug Evans <dje@google.com>
13348
13349 * dll.h (struct dll_info): Add comment.
13350 * gdbthread.h (struct thread_info): Add comment.
13351 (current_ptid): Simplify.
13352 * inferiors.c (add_process): Update.
13353 (remove_process): Update.
13354 * inferiors.h (struct process_info): Rename member "head" to "entry".
13355 * linux-low.c (delete_lwp): Update.
13356 (add_lwp): Update.
13357 (last_thread_of_process_p): Update.
13358 (kill_one_lwp_callback, linux_kill): Update.
13359 (status_pending_p_callback): Update.
13360 (wait_for_sigstop): Update. Simplify read of ptid.
13361 (start_step_over): Update.
13362 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
13363 (get_lwp_thread): Update.
13364 (struct lwp_info): Rename member "head" to "entry".
13365 * regcache.h (inferior_list_entry): Delete.
13366 * server.c (kill_inferior_callback): Update.
13367 (detach_or_kill_inferior_callback): Update.
13368 (print_started_pid): Update.
13369 (print_attached_pid): Update.
13370 (process_serial_event): Simplify read of ptid.
13371 * thread-db.c (thread_db_create_event): Update.
13372 (thread_db_get_tls_address): Update.
13373 * win32-low.c (current_inferior_ptid): Simplify.
13374
13375 2014-02-19 Tom Tromey <tromey@redhat.com>
13376
13377 * target.h (struct target_ops) <supports_btrace>: Add target_ops
13378 argument.
13379 (target_supports_btrace): Update.
13380
13381 2014-02-14 Yao Qi <yao@codesourcery.com>
13382
13383 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
13384 (rsp-low-ipa.o): New target.
13385
13386 2014-02-12 Tom Tromey <tromey@redhat.com>
13387
13388 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
13389 convert_ascii_to_int.
13390 * regcache.c (registers_to_string): Likewise.
13391 * remote-utils.c (decode_M_packet): Likewise.
13392 * server.c (process_serial_event): Likewise.
13393
13394 2014-02-12 Tom Tromey <tromey@redhat.com>
13395
13396 * server.c (handle_query, handle_v_run): Use hex2bin, not
13397 unhexify.
13398 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
13399
13400 2014-02-12 Tom Tromey <tromey@redhat.com>
13401
13402 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
13403 convert_int_to_ascii.
13404 * regcache.c (registers_to_string, collect_register_as_string):
13405 Likewise.
13406 * remote-utils.c (look_up_one_symbol, relocate_instruction):
13407 Likewise.
13408 * server.c (process_serial_event): Likewise.
13409 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
13410 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
13411
13412 2014-02-12 Tom Tromey <tromey@redhat.com>
13413
13414 * remote-utils.c (look_up_one_symbol, monitor_output): Use
13415 bin2hex, not hexify.
13416 * tracepoint.c (cmd_qtstatus): Likewise.
13417
13418 2014-02-12 Tom Tromey <tromey@redhat.com>
13419
13420 * remote-utils.c (monitor_output): Pass explicit length to
13421 hexify.
13422
13423 2014-02-12 Tom Tromey <tromey@redhat.com>
13424
13425 * tracepoint.c: Include rsp-low.h.
13426 * server.c: Include rsp-low.h.
13427 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
13428 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
13429 declare.
13430 * remote-utils.c: Include rsp-low.h.
13431 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
13432 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
13433 (convert_int_to_ascii, convert_ascii_to_int): Move to
13434 common/rsp-low.c.
13435 * regcache.c: Include rsp-low.h.
13436 * ax.c: Include rsp-low.h.
13437 * Makefile.in (SFILES): Add common/rsp-low.c.
13438 (OBS): Add rsp-low.o.
13439 (rsp-low.o): New target.
13440
13441 2014-02-12 Tom Tromey <tromey@redhat.com>
13442
13443 * utils.h (pulongest, plongest, phex_nz): Don't declare.
13444 Include print-utils.h.
13445 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
13446 (plongest, thirty_two, phex_nz): Remove.
13447 * Makefile.in (SFILES): Add common/print-utils.c.
13448 (OBS): Add print-utils.o.
13449 (print-utils-ipa.o): New target.
13450 (print-utils.o): New target.
13451 (IPA_OBJS): Add print-utils-ipa.o.
13452
13453 2014-02-06 Tom Tromey <tromey@redhat.com>
13454
13455 * Makefile.in (SFILES): Fix indentation.
13456
13457 2014-02-05 Doug Evans <dje@google.com>
13458
13459 * linux-low.c (linux_wait_for_event): Improve comment.
13460 (linux_wait_1): Keep current_inferior in sync with event_child.
13461
13462 2014-01-22 Doug Evans <dje@google.com>
13463
13464 * gdbthread.h (gdb_id_to_thread): Delete, unused.
13465
13466 2014-01-22 Doug Evans <dje@google.com>
13467
13468 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
13469 * configure: Regenerate.
13470 * config.in: Regenerate.
13471 * Makefile.in (SFILES): Add debug.c.
13472 (OBS): Add debug.o.
13473 * debug.c: New file.
13474 * debug.h: New file.
13475 * linux-aarch64-low.c (*): Update all debugging printfs to use
13476 debug_printf instead of fprintf.
13477 * linux-arm-low.c (*): Ditto.
13478 * linux-cris-low.c (*): Ditto.
13479 * linux-crisv32-low.c (*): Ditto.
13480 * linux-m32r-low.c (*): Ditto.
13481 * linux-sparc-low.c (*): Ditto.
13482 * linux-x86.c (*): Ditto.
13483 * linux-low.c (*): Ditto.
13484 (linux_wait_1): Add calls to debug_enter, debug_exit.
13485 (linux_wait): Remove redundant debugging printf.
13486 (stop_all_lwps): Add calls to debug_enter, debug_exit.
13487 (linux_resume, unstop_all_lwps): Ditto.
13488 * mem-break.c (*): Update all debugging printfs to use
13489 debug_printf instead of fprintf.
13490 * remote-utils.c (*): Ditto.
13491 * thread-db.c (*): Ditto.
13492 * server.c #include <ctype.h>, "gdb_vecs.h".
13493 (debug_threads): Moved to debug.c.
13494 (*): Update all debugging printfs to use debug_printf instead of
13495 fprintf.
13496 (start_inferior): Replace call to fflush with call to debug_flush.
13497 (monitor_show_help): Mention set debug-format.
13498 (parse_debug_format_options): New function.
13499 (handle_monitor_command): Handle "monitor set debug-format".
13500 (gdbserver_usage): Mention --debug-format.
13501 (main): Parse --debug-format.
13502 * server.h (debug_threads): Declaration moved to debug.h.
13503 #include "debug.h".
13504 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
13505 trace_debug_1 that uses debug_printf.
13506 (tracepoint_look_up_symbols): Update all debugging printfs to use
13507 debug_printf instead of fprintf.
13508
13509 2014-01-20 Baruch Siach <baruch@tkos.co.il>
13510
13511 * linux-xtensa-low.c: Include asm/ptrace.h instead of
13512 sys/ptrace.h.
13513
13514 2014-01-17 Pedro Alves <palves@redhat.com>
13515
13516 PR build/16445
13517 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
13518 defined after including gdb_proc_service.h.
13519
13520 2014-01-16 Doug Evans <dje@google.com>
13521
13522 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
13523 (match_dll): Use it.
13524
13525 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
13526
13527 * target.h (target_ops) <read_btrace>: Change parameters and
13528 return type to allow error reporting.
13529 * server.c (handle_qxfer_btrace): Support delta reads. Pass
13530 trace reading errors on.
13531 * linux-low.c (linux_low_read_btrace): Pass trace reading
13532 errors on.
13533 (linux_low_disable_btrace): New.
13534
13535 2014-01-15 Doug Evans <dje@google.com>
13536
13537 * inferiors.c (thread_id_to_gdb_id): Delete.
13538 * inferiors.h (thread_id_to_gdb_id): Delete.
13539
13540 2014-01-13 Eli Zaretskii <eliz@gnu.org>
13541
13542 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
13543 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
13544 versions.
13545
13546 2014-01-08 Pedro Alves <palves@redhat.com>
13547
13548 * server.c (handle_status): Don't discard previous queued stop
13549 replies or thread's pending status here.
13550 (main) <disconnection>: Do it here instead.
13551
13552 2014-01-08 Pedro Alves <palves@redhat.com>
13553
13554 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
13555 * server.c (visit_actioned_threads, handle_pending_status): New
13556 function.
13557 (handle_v_cont): Factor out parts to ...
13558 (resume): ... this new function. If in all-stop, and a thread
13559 being resumed has a pending status, report it without actually
13560 resuming.
13561 (myresume): Adjust to use the new 'resume' function.
13562 (clear_pending_status_callback, set_pending_status_callback)
13563 (find_status_pending_thread_callback): New functions.
13564 (handle_status): Handle the case of multiple threads having
13565 interesting statuses to report. Report threads' real last signal
13566 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
13567 with an interesting thread to report the status for, instead of
13568 always reporting the status of the first thread.
13569
13570 2014-01-01 Joel Brobecker <brobecker@adacore.com>
13571
13572 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
13573 * gdbreplay.c (gdbreplay_version): Likewise.
13574
13575 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
13576
13577 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
13578 iov.iov_len with the real length in use.
13579
13580 2013-12-13 Joel Brobecker <brobecker@adacore.com>
13581
13582 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
13583 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
13584 for all targets that use win32-low.c.
13585 * win32-low.c (win32_ensure_ntdll_loaded): New function.
13586 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
13587
13588 2013-12-13 Pedro Alves <palves@redhat.com>
13589
13590 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
13591 if equal to TARGET_WAITKIND_LOADED.
13592 * win32-low.c (cached_status): New static global.
13593 (win32_wait): Add declaration.
13594 (do_initial_child_stuff): Flush all initial pending debug events
13595 up to the initial breakpoint.
13596 (win32_wait): If CACHED_STATUS was set, return that instead
13597 of doing a real wait. Remove the code resuming the execution
13598 of the inferior after receiving a TARGET_WAITKIND_LOADED event
13599 during the initial phase. Also remove the code changing
13600 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
13601 TARGET_WAITKIND_STOPPED.
13602
13603 2013-12-11 Yao Qi <yao@codesourcery.com>
13604
13605 * notif.c (handle_notif_ack): Return 0 if no notification
13606 matches.
13607
13608 2013-11-20 Doug Evans <dje@google.com>
13609
13610 * linux-low.c (linux_set_resume_request): Fix comment.
13611
13612 2013-11-20 Doug Evans <dje@google.com>
13613
13614 * linux-low.c (resume_status_pending_p): Tweak comment.
13615
13616 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
13617
13618 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
13619 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
13620 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
13621 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
13622 (srv_amd64_regobj): Add amd64-mpx.o.
13623 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
13624 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
13625 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
13626 * i387-fp.c (num_pl_bnd_register) Added constant.
13627 (num_pl_bnd_cfg_registers) Added constant.
13628 (struct i387_xsave) Added reserved area and MPX fields.
13629 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
13630 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
13631 function.
13632 (tdesc_i386_mpx_linux): Add MPX amd64 target.
13633 (init_registers_amd64_mpx_linux): Declare new function.
13634 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
13635 (x86_64_regmap): Add MPX registers.
13636 (x86_linux_read_description): Add MPX case.
13637 (initialize_low_arch): Initialize MPX targets.
13638
13639 2013-11-18 Tom Tromey <tromey@redhat.com>
13640
13641 * configure: Rebuild.
13642 * configure.ac: Don't check for stdlib.h.
13643 * gdbreplay.c: Unconditionally include stdlib.h.
13644
13645 2013-11-18 Tom Tromey <tromey@redhat.com>
13646
13647 * config.in: Rebuild.
13648 * configure: Rebuild.
13649 * configure.ac: Don't use AC_HEADER_DIRENT.
13650
13651 2013-11-18 Tom Tromey <tromey@redhat.com>
13652
13653 * server.h: Don't check HAVE_STRING_H.
13654 * gdbreplay.c: Don't check HAVE_STRING_H.
13655 * configure: Rebuild.
13656
13657 2013-11-18 Tom Tromey <tromey@redhat.com>
13658
13659 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
13660 LIBGNU.
13661
13662 2013-11-08 Tom Tromey <tromey@redhat.com>
13663
13664 * configure, config.in: Rebuild.
13665 * configure.ac: Remove unused configury.
13666
13667 2013-11-08 Tom Tromey <tromey@redhat.com>
13668
13669 * acinclude.m4: Include common.m4, codeset.m4.
13670 * configure, config.in: Rebuild.
13671 * configure.ac: Use GDB_AC_COMMON.
13672
13673 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
13674
13675 * linux-s390-low.c (HWCAP_S390_TE): New define.
13676 (s390_arch_setup): Consider the TE field in the HWCAP for
13677 determining 'have_regset_tdb'.
13678
13679 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
13680
13681 PR gdb/16014
13682 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
13683 call to sizeof.
13684
13685 2013-10-02 Pedro Alves <palves@redhat.com>
13686
13687 * server.c (process_serial_event): Don't output "GDBserver
13688 exiting" if GDB is connected through stdio.
13689 * target.c (mywait): Likewise, be silent if GDB is connected
13690 through stdio.
13691
13692 2013-10-01 Joel Brobecker <brobecker@adacore.com>
13693
13694 * lynx-low.c (lynx_add_threads_after_attach): New function.
13695 (lynx_attach): Remove call to add_thread. Add call to
13696 lynx_add_threads_after_attach instead.
13697
13698 2013-09-28 Mike Frysinger <vapier@gentoo.org>
13699
13700 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
13701 * config.in, configure: Regenerated.
13702
13703 2013-09-18 Yao Qi <yao@codesourcery.com>
13704
13705 PR server/15959
13706 * server.c (start_inferior): Clear 'resume_info'.
13707
13708 2013-09-16 Jiong Wang <jiwang@tilera.com>
13709
13710 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
13711 for each register.
13712
13713 2013-09-16 Jiong Wang <jiwang@tilera.com>
13714
13715 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
13716 linux-tile-low.o to srv_tgtobj.
13717
13718 2013-09-16 Will Newton <will.newton@linaro.org>
13719
13720 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
13721 out regs.
13722
13723 2013-09-06 Pedro Alves <palves@redhat.com>
13724
13725 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
13726 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
13727 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
13728 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
13729 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
13730 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
13731
13732 2013-09-06 Pedro Alves <palves@redhat.com>
13733
13734 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
13735 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
13736
13737 2013-09-06 Pedro Alves <palves@redhat.com>
13738
13739 * linux-amd64-ipa.c: Include tracepoint.h.
13740 * linux-i386-ipa.c: Include tracepoint.h.
13741
13742 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13743
13744 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
13745 (ps_get_thread_area): New function.
13746
13747 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13748
13749 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
13750 (initialize_low_arch): Call init_registers_crisv32 rather than
13751 init_register_crisv32.
13752
13753 2013-09-05 Pedro Alves <palves@redhat.com>
13754
13755 * server.h (handle_vFile, hostio_last_error_from_errno): Move
13756 to ...
13757 * hostio.h: ... this new file.
13758 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
13759 win32-low.c: Include hostio.h.
13760
13761 2013-09-05 Pedro Alves <palves@redhat.com>
13762
13763 * server.h (gdb_client_data, handler_func, callback_handler_func)
13764 (delete_file_handler, add_file_handler, append_callback_event)
13765 (delete_callback_event, start_event_loop, initialize_event_loop):
13766 Move to event-loop.h and include it.
13767 * event-loop.h: New file.
13768
13769 2013-09-05 Pedro Alves <palves@redhat.com>
13770
13771 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
13772 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
13773 (loaded_dll, unloaded_dll): Move to ...
13774 * dll.h: ... this new file.
13775 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
13776
13777 2013-09-05 Pedro Alves <palves@redhat.com>
13778
13779 * server.h (current_process, get_thread_process, all_processes)
13780 (add_inferior_to_list, for_each_inferior, current_inferior)
13781 (remove_inferior, add_process, remove_process, find_process_pid)
13782 (have_started_inferiors_p, have_attached_inferiors_p)
13783 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
13784 (clear_inferiors, find_inferior, find_inferior_id)
13785 (inferior_target_data, set_inferior_target_data)
13786 (inferior_regcache_data, set_inferior_regcache_data): Move to
13787 inferiors.h, and include it.
13788 * inferiors.h: New file.
13789
13790 2013-09-05 Pedro Alves <palves@redhat.com>
13791
13792 * server.h (struct emit_ops, current_insn_ptr, emit_error):
13793 Move ...
13794 * ax.h: ... here.
13795
13796 2013-09-05 Pedro Alves <palves@redhat.com>
13797
13798 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
13799 tracepoint.h.
13800 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
13801 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
13802 (handle_tracepoint_general_set, handle_tracepoint_query)
13803 (tracepoint_finished_step, tracepoint_was_hit)
13804 (release_while_stepping_state_list, current_traceframe)
13805 (in_readonly_region, traceframe_read_mem)
13806 (fetch_traceframe_registers, traceframe_read_sdata)
13807 (traceframe_read_info, struct fast_tpoint_collect_status)
13808 (fast_tracepoint_collecting, force_unlock_trace_buffer)
13809 (handle_tracepoit_bkpts, initialize_low_tracepoint)
13810 (supply_fast_tracepoint_registers)
13811 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
13812 (ipa_tdesc, claim_trampoline_space)
13813 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
13814 (agent_mem_read, agent_get_trace_state_variable_value)
13815 (agent_set_trace_state_variable_value, agent_tsv_read)
13816 (agent_mem_read_string, get_raw_reg_func_addr)
13817 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
13818 * tracepoint.h: ... this new file.
13819
13820 2013-09-05 Pedro Alves <palves@redhat.com>
13821
13822 * server.h (perror_with_name, error, fatal, warning, paddress)
13823 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
13824 include it.
13825 * utils.h: New file.
13826
13827 2013-09-05 Pedro Alves <palves@redhat.com>
13828
13829 * server.h (remote_debug, noack_mode, transport_is_reliable)
13830 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
13831 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
13832 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
13833 (write_enn, initialize_async_io, enable_async_io)
13834 (disable_async_io, check_remote_input_interrupt_request)
13835 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
13836 (dead_thread_notify, prepare_resume_reply)
13837 (decode_address_to_semicolon, decode_address, decode_m_packet)
13838 (decode_M_packet, decode_X_packet, decode_xfer_write)
13839 (decode_search_memory_packet, unhexify, hexify)
13840 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
13841 (look_up_one_symbol, relocate_instruction)
13842 (monitor_output): Move to remote-utils.h, and include it.
13843 * remote-utils.h: New file.
13844
13845 2013-09-05 Pedro Alves <palves@redhat.com>
13846
13847 * server.h (_): Delete.
13848
13849 2013-09-02 Pedro Alves <palves@redhat.com>
13850
13851 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
13852 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
13853 allocated.
13854 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
13855
13856 2013-09-02 Pierre Muller <muller@sourceware.org>
13857
13858 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
13859 or WriteProcessMemory complete successfully and handle
13860 ERROR_PARTIAL_COPY error.
13861
13862 2013-09-02 Pedro Alves <palves@redhat.com>
13863
13864 * server.c (gdb_read_memory): Return -1 on traceframe memory read
13865 error instead of EIO.
13866
13867 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13868
13869 PR server/15604
13870 * linux-low.c: Include filestuff.h.
13871 (linux_create_inferior) <pid == 0>: Call close_most_fds.
13872 * lynx-low.c: Include filestuff.h.
13873 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
13874 * server.c: Include filestuff.h.
13875 (main): Call notice_open_fds.
13876 * spu-low.c: Include filestuff.h.
13877 (spu_create_inferior) <pid == 0>: Call close_most_fds.
13878
13879 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
13880
13881 * Makefile.in: Explain why ../target and ../nat are not
13882 listed as include file search paths.
13883 (linux-waitpid.o): New object file rule.
13884 * configure.srv (srv_native_linux_obj): New variable.
13885 Replace all occurrences of linux native object files with
13886 $srv_native_linux_obj.
13887 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
13888 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
13889 (linux_enable_event_reporting): Remove declaration.
13890 (my_waitpid): Moved to common/linux-waitpid.c.
13891 (linux_wait_for_event): Pass ptid when calling
13892 linux_enable_event_reporting.
13893 (linux_supports_tracefork_flag): Remove.
13894 (linux_enable_event_reporting): Likewise.
13895 (linux_tracefork_grandchild): Remove.
13896 (STACK_SIZE): Moved to common/linux-ptrace.c.
13897 (linux_tracefork_child): Remove.
13898 (linux_test_for_tracefork): Remove.
13899 (linux_look_up_symbols): Call linux_supports_traceclone.
13900 (initialize_low): Remove call to linux_test_for_tracefork.
13901 * linux-low.h (PTRACE_TYPE_ARG3): Move to
13902 common/linux-ptrace.h.
13903 (PTRACE_TYPE_ARG4): Likewise.
13904 Include linux-ptrace.h.
13905
13906 2013-08-21 Pedro Alves <palves@redhat.com>
13907
13908 * config.in: Renegerate.
13909
13910 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
13911
13912 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
13913 (SFILES): Remove $(srcdir)/common/target-common.c and
13914 add $(srcdir)/target/waitstatus.c.
13915 (OBS): Remove target-common.o and add waitstatus.o.
13916 (server_h): Remove $(srcdir)/../common/target-common.h and
13917 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
13918 and $(srcdir)/../target/waitstatus.h.
13919 (target-common.o): Remove.
13920 (waitstatus.o): New target object file.
13921 * target.h: Do not include target-common.h and
13922 include target/resume.h, target/wait.h and
13923 target/waitstatus.h.
13924
13925 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
13926
13927 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13928 to PTRACE_TYPE_ARG3.
13929 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13930 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
13931 PTRACE_TYPE_ARG4.
13932 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
13933 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
13934
13935 2013-07-27 Jie Zhang <jie@codesourcery.com>
13936 Daniel Jacobowitz <dan@codesourcery.com>
13937 Yao Qi <yao@codesourcery.com>
13938
13939 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
13940 (mips-linux-watch.o): New rule.
13941 (mips_linux_watch_h): New variable.
13942 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
13943 srv_tgtobj.
13944 * linux-mips-low.c: Include mips-linux-watch.h.
13945 (struct arch_process_info, struct arch_lwp_info): New.
13946 (update_watch_registers_callback): New function.
13947 (mips_linux_new_process, mips_linux_new_thread) New functions.
13948 (mips_linux_prepare_to_resume, mips_insert_point): New
13949 functions.
13950 (mips_remove_point, mips_stopped_by_watchpoint): New
13951 functions.
13952 (rsp_bp_type_to_target_hw_bp_type): New function.
13953 (mips_stopped_data_address): New function.
13954 (the_low_target): Add watchpoint support functions.
13955
13956 2013-07-27 Yao Qi <yao@codesourcery.com>
13957
13958 * i386-low.c: Include break-common.h.
13959 (enum target_hw_bp_type): Remove.
13960
13961 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
13962
13963 * Makefile.in (SFILES): /common/target-common.c.
13964 (OBS): Add target-common.o.
13965 (server_h): Add $(srcdir)/../common/target-common.h.
13966 (target-common.o): New target.
13967 * server.c (queue_stop_reply_callback): Free
13968 status string after use.
13969 * target.c (target_waitstatus_to_string): Remove.
13970 * target.h: Include target-common.h.
13971 (resume_kind): Likewise.
13972 (target_waitkind): Likewise.
13973 (target_waitstatus): Likewise.
13974 (TARGET_WNOHANG): Likewise.
13975
13976 2013-07-04 Yao Qi <yao@codesourcery.com>
13977
13978 * Makefile.in (host_alias): Use @host_noncanonical@.
13979 (target_alias): Use @target_noncanonical@.
13980 * configure.ac: Use ACX_NONCANONICAL_TARGET and
13981 ACX_NONCANONICAL_HOST.
13982 * configure: Regenerated.
13983
13984 Revert:
13985 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13986
13987 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13988 * configure: Rebuild.
13989 * Makefile.in (version_host, version_target): Get from configure.
13990 (version.c): Use $(version_host) and $(version_target).
13991
13992 2013-07-03 Pedro Alves <palves@redhat.com>
13993
13994 * Makefile.in (config.status): Depend on development.sh.
13995 * acinclude.m4: Include libmcheck.m4.
13996 * configure: Regenerate.
13997
13998 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13999
14000 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
14001 attribute inside the parentheses.
14002 (winapi_DebugSetProcessKillOnExit): Ditto.
14003 (winapi_DebugBreakProcess): Ditto.
14004 (winapi_GenerateConsoleCtrlEvent): Ditto.
14005
14006 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
14007
14008 * notif.h (notif_event): Add a dummy member to avoid compiler
14009 errors.
14010
14011 2013-07-01 Pedro Alves <palves@redhat.com>
14012
14013 * hostio.c (HOSTIO_PATH_MAX): Define.
14014 (require_filename, handle_open, handle_unlink, handle_readlink):
14015 Use it.
14016
14017 2013-07-01 Pedro Alves <palves@redhat.com>
14018
14019 * server.h: Include "pathmax.h".
14020 * linux-low.c: Don't include sys/param.h.
14021 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
14022 MAXPATHLEN.
14023 * win32-low.c: Don't include sys/param.h.
14024 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
14025
14026 2013-07-01 Pedro Alves <palves@redhat.com>
14027
14028 * event-loop.c: Don't check HAVE_UNISTD_H before including
14029 <unistd.h>.
14030 * gdbreplay.c: Likewise.
14031 * remote-utils.c: Likewise.
14032 * server.c: Likewise.
14033 * configure.ac: Don't check for unistd.h.
14034 * configure: Regenerate.
14035
14036 2013-06-28 Tom Tromey <tromey@redhat.com>
14037
14038 * Makefile.in (version.c): Use version.in, not
14039 common/version.in.
14040
14041 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
14042
14043 * configure.ac (version_host, version_target): Set and AC_SUBST them.
14044 * configure: Rebuild.
14045 * Makefile.in (version_host, version_target): Get from configure.
14046 (version.c): Use $(version_host) and $(version_target).
14047
14048 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
14049
14050 Fix trace-status to output user name without trailing colon.
14051 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
14052
14053 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
14054
14055 Fix trace-status to output proper start-time and stop-time.
14056 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
14057 output start time and stop time in hex as gdb expects.
14058
14059 2013-06-26 Pedro Alves <pedro@codesourcery.com>
14060
14061 * tracepoint.c (build_traceframe_info_xml): Output trace state
14062 variables present in the trace buffer.
14063
14064 2013-06-24 Tom Tromey <tromey@redhat.com>
14065
14066 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
14067 create-version.sh.
14068 (version.o): Remove.
14069 * gdbreplay.c: Include version.h.
14070 (version, host_name): Don't declare.
14071 * server.h: Include version.h.
14072 (version, host_name): Don't declare.
14073
14074 2013-06-12 Pedro Alves <palves@redhat.com>
14075
14076 * linux-x86-low.c (linux_is_elf64): Delete global.
14077 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
14078 with local linux_pid_exe_is_elf_64_file use.
14079
14080 2013-06-11 Pedro Alves <palves@redhat.com>
14081
14082 * linux-low.c (regset_disabled, disable_regset): New functions.
14083 (regsets_fetch_inferior_registers)
14084 (regsets_store_inferior_registers): Use them.
14085 (initialize_regsets_info); Don't allocate the disabled_regsets
14086 array here.
14087 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
14088 comment.
14089
14090 2013-06-11 Pedro Alves <palves@redhat.com>
14091
14092 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
14093 xmalloc.
14094
14095 2013-06-11 Pedro Alves <palves@redhat.com>
14096
14097 * linux-x86-low.c (initialize_low_arch): Call
14098 init_registers_x32_avx_linux.
14099
14100 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
14101
14102 Fix compatibility with Android Bionic.
14103 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
14104 it is not empty.
14105
14106 2013-06-07 Pedro Alves <palves@redhat.com>
14107
14108 PR server/14823
14109 * Makefile.in (OBS): Add tdesc.o.
14110 (IPA_OBJS): Add tdesc-ipa.o.
14111 (tdesc-ipa.o): New rule.
14112 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
14113 interface.
14114 * linux-low.c (new_inferior): Delete.
14115 (disabled_regsets, num_regsets): Delete.
14116 (linux_add_process): Adjust to set the new per-process
14117 new_inferior flag.
14118 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
14119 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
14120 was a stop. When calling arch_setup, switch the current inferior
14121 to the thread that got an event.
14122 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
14123 (regsets_fetch_inferior_registers)
14124 (regsets_store_inferior_registers): New regsets_info parameter.
14125 Adjust to use it.
14126 (linux_register_in_regsets): New regs_info parameter. Adjust to
14127 use it.
14128 (register_addr, fetch_register, store_register): New usrregs_info
14129 parameter. Adjust to use it.
14130 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
14131 parameter regs_info. Adjust to use it.
14132 (linux_fetch_registers): Get the current inferior's regs_info, and
14133 adjust to use it.
14134 (linux_store_registers): Ditto.
14135 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
14136 (initialize_low): Don't initialize the target_regsets here. Call
14137 initialize_low_arch.
14138 * linux-low.h (target_regsets): Delete declaration.
14139 (struct regsets_info): New.
14140 (struct usrregs_info): New.
14141 (struct regs_info): New.
14142 (struct process_info_private) <new_inferior>: New field.
14143 (struct linux_target_ops): Delete the num_regs, regmap, and
14144 regset_bitmap fields. New field regs_info.
14145 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
14146 * i387-fp.c (num_xmm_registers): Delete.
14147 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
14148 calls to new interface.
14149 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
14150 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
14151 Infer the number of xmm registers from the regcache's target
14152 description.
14153 * i387-fp.h (num_xmm_registers): Delete.
14154 * inferiors.c (add_thread): Don't install the thread's regcache
14155 here.
14156 * proc-service.c (gregset_info): Fetch the current inferior's
14157 regs_info. Adjust to use it.
14158 * regcache.c: Include tdesc.h.
14159 (register_bytes, reg_defs, num_registers)
14160 (gdbserver_expedite_regs): Delete.
14161 (get_thread_regcache): If the thread doesn't have a regcache yet,
14162 create one, instead of aborting gdbserver.
14163 (regcache_invalidate_one): Rename to ...
14164 (regcache_invalidate_thread): ... this.
14165 (regcache_invalidate_one): New.
14166 (regcache_invalidate): Only invalidate registers of the current
14167 process.
14168 (init_register_cache): Add target_desc parameter, and use it.
14169 (new_register_cache): Ditto. Assert the target description has a
14170 non zero registers_size.
14171 (regcache_cpy): Add assertions. Adjust.
14172 (realloc_register_cache, set_register_cache): Delete.
14173 (registers_to_string, registers_from_string): Adjust.
14174 (find_register_by_name, find_regno, find_register_by_number)
14175 (register_cache_size): Add target_desc parameter, and use it.
14176 (free_register_cache_thread, free_register_cache_thread_one)
14177 (regcache_release, register_cache_size): New.
14178 (register_size): Add target_desc parameter, and use it.
14179 (register_data, supply_register, supply_register_zeroed)
14180 (supply_regblock, supply_register_by_name, collect_register)
14181 (collect_register_as_string, collect_register_by_name): Adjust.
14182 * regcache.h (struct target_desc): Forward declare.
14183 (struct regcache) <tdesc>: New field.
14184 (init_register_cache, new_register_cache): Add target_desc
14185 parameter.
14186 (regcache_invalidate_thread): Declare.
14187 (regcache_invalidate_one): Delete declaration.
14188 (regcache_release): Declare.
14189 (find_register_by_number, register_cache_size, register_size)
14190 (find_regno): Add target_desc parameter.
14191 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
14192 declarations.
14193 * remote-utils.c: Include tdesc.h.
14194 (outreg, prepare_resume_reply): Adjust.
14195 * server.c: Include tdesc.h.
14196 (gdbserver_xmltarget): Delete declaration.
14197 (get_features_xml, process_serial_event): Adjust.
14198 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
14199 declare.
14200 (struct process_info) <tdesc>: New field.
14201 (ipa_tdesc): Declare.
14202 * tdesc.c: New file.
14203 * tdesc.h: New file.
14204 * tracepoint.c: Include tdesc.h.
14205 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
14206 (get_context_regcache): Adjust to pass ipa_tdesc down.
14207 (do_action_at_tracepoint): Adjust to get the register cache size
14208 from the context regcache's description.
14209 (traceframe_walk_blocks): Adjust to get the register cache size
14210 from the current trace frame's description.
14211 (traceframe_get_pc): Adjust to get current trace frame's
14212 description and pass it down.
14213 (gdb_collect): Adjust to get the register cache size from the
14214 IPA's description.
14215 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
14216 (gdbserver_xmltarget): Delete.
14217 (initialize_low_tracepoint): Set the ipa's target description.
14218 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
14219 (initialize_low_tracepoint): Set the ipa's target description.
14220 * linux-x86-low.c: Include tdesc.h.
14221 [__x86_64__] (is_64bit_tdesc): New.
14222 (ps_get_thread_area, x86_get_thread_area): Use it.
14223 (i386_cannot_store_register): Rename to ...
14224 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
14225 (i386_cannot_fetch_register): Rename to ...
14226 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
14227 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
14228 to new interface.
14229 (target_regsets): Rename to ...
14230 (x86_regsets): ... this.
14231 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
14232 interface.
14233 (x86_siginfo_fixup): Use is_64bit_tdesc.
14234 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
14235 (tdesc_x32_avx_linux, tdesc_x32_linux)
14236 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
14237 Declare.
14238 (x86_linux_update_xmltarget): Delete.
14239 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
14240 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
14241 (AMD64_LINUX_USER64_CS): New.
14242 (x86_linux_read_description): New, based on
14243 x86_linux_update_xmltarget.
14244 (same_process_callback): New.
14245 (x86_arch_setup_process_callback): New.
14246 (x86_linux_update_xmltarget): New.
14247 (x86_regsets_info): New.
14248 (amd64_linux_regs_info): New.
14249 (i386_linux_usrregs_info): New.
14250 (i386_linux_regs_info): New.
14251 (x86_linux_regs_info): New.
14252 (x86_arch_setup): Reimplement.
14253 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
14254 (x86_emit_ops): Ditto.
14255 (the_low_target): Adjust. Install x86_linux_regs_info,
14256 x86_cannot_fetch_register, and x86_cannot_store_register.
14257 (initialize_low_arch): New.
14258 * linux-ia64-low.c (tdesc_ia64): Declare.
14259 (ia64_fetch_register): Adjust.
14260 (ia64_usrregs_info, regs_info): New globals.
14261 (ia64_regs_info): New function.
14262 (the_low_target): Adjust.
14263 (initialize_low_arch): New function.
14264 * linux-sparc-low.c (tdesc_sparc64): Declare.
14265 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
14266 Adjust.
14267 (sparc_arch_setup): New function.
14268 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
14269 (the_low_target): Adjust.
14270 (initialize_low_arch): New function.
14271 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
14272 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
14273 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
14274 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
14275 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
14276 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
14277 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
14278 (tdesc_powerpc_isa205_vsx64l): Declare.
14279 (ppc_cannot_store_register, ppc_collect_ptrace_register)
14280 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
14281 (ppc_set_pc, ppc_get_hwcap): Adjust.
14282 (ppc_usrregs_info): Forward declare.
14283 (!__powerpc64__) ppc_regmap_adjusted: New global.
14284 (ppc_arch_setup): Adjust to the current process'es target
14285 description.
14286 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
14287 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
14288 (ppc_store_evrregset): Adjust.
14289 (target_regsets): Rename to ...
14290 (ppc_regsets): ... this, and make static.
14291 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
14292 (ppc_regs_info): New function.
14293 (the_low_target): Adjust.
14294 (initialize_low_arch): New function.
14295 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
14296 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
14297 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
14298 (tdesc_s390x_linux64v2): Declare.
14299 (s390_collect_ptrace_register, s390_supply_ptrace_register)
14300 (s390_fill_gregset, s390_store_last_break): Adjust.
14301 (target_regsets): Rename to ...
14302 (s390_regsets): ... this, and make static.
14303 (s390_get_pc, s390_set_pc): Adjust.
14304 (s390_get_hwcap): New target_desc parameter, and use it.
14305 [__s390x__] (have_hwcap_s390_high_gprs): New global.
14306 (s390_arch_setup): Adjust to set the current process'es target
14307 description. Don't adjust the regmap.
14308 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
14309 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
14310 (regs_info_3264): New globals.
14311 (s390_regs_info): New function.
14312 (the_low_target): Adjust.
14313 (initialize_low_arch): New function.
14314 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
14315 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
14316 [__mips64] (init_registers_mips_linux)
14317 (init_registers_mips_dsp_linux): Delete defines.
14318 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
14319 (have_dsp): New global.
14320 (mips_read_description): New, based on mips_arch_setup.
14321 (mips_arch_setup): Reimplement.
14322 (get_usrregs_info): New function.
14323 (mips_cannot_fetch_register, mips_cannot_store_register)
14324 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
14325 (mips_fill_fpregset, mips_store_fpregset): Adjust.
14326 (target_regsets): Rename to ...
14327 (mips_regsets): ... this, and make static.
14328 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
14329 (dsp_regs_info, regs_info): New globals.
14330 (mips_regs_info): New function.
14331 (the_low_target): Adjust.
14332 (initialize_low_arch): New function.
14333 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
14334 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
14335 Declare.
14336 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
14337 (arm_read_description): New, with bits factored from
14338 arm_arch_setup.
14339 (arm_arch_setup): Reimplement.
14340 (target_regsets): Rename to ...
14341 (arm_regsets): ... this, and make static.
14342 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
14343 (arm_regs_info): New function.
14344 (the_low_target): Adjust.
14345 (initialize_low_arch): New function.
14346 * linux-m68k-low.c (tdesc_m68k): Declare.
14347 (target_regsets): Rename to ...
14348 (m68k_regsets): ... this, and make static.
14349 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
14350 (m68k_regs_info): New function.
14351 (m68k_arch_setup): New function.
14352 (the_low_target): Adjust.
14353 (initialize_low_arch): New function.
14354 * linux-sh-low.c (tdesc_sharch): Declare.
14355 (target_regsets): Rename to ...
14356 (sh_regsets): ... this, and make static.
14357 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
14358 (sh_regs_info, sh_arch_setup): New functions.
14359 (the_low_target): Adjust.
14360 (initialize_low_arch): New function.
14361 * linux-bfin-low.c (tdesc_bfin): Declare.
14362 (bfin_arch_setup): New function.
14363 (bfin_usrregs_info, regs_info): New globals.
14364 (bfin_regs_info): New function.
14365 (the_low_target): Adjust.
14366 (initialize_low_arch): New function.
14367 * linux-cris-low.c (tdesc_cris): Declare.
14368 (cris_arch_setup): New function.
14369 (cris_usrregs_info, regs_info): New globals.
14370 (cris_regs_info): New function.
14371 (the_low_target): Adjust.
14372 (initialize_low_arch): New function.
14373 * linux-cris-low.c (tdesc_crisv32): Declare.
14374 (cris_arch_setup): New function.
14375 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
14376 (cris_regs_info): New function.
14377 (the_low_target): Adjust.
14378 (initialize_low_arch): New function.
14379 * linux-m32r-low.c (tdesc_m32r): Declare.
14380 (m32r_arch_setup): New function.
14381 (m32r_usrregs_info, regs_info): New globals.
14382 (m32r_regs_info): Adjust.
14383 (initialize_low_arch): New function.
14384 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
14385 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
14386 (tic6x_usrregs_info): Forward declare.
14387 (tic6x_read_description): New function, based on ...
14388 (tic6x_arch_setup): ... this. Reimplement.
14389 (target_regsets): Rename to ...
14390 (tic6x_regsets): ... this, and make static.
14391 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
14392 (tic6x_regs_info): New function.
14393 (the_low_target): Adjust.
14394 (initialize_low_arch): New function.
14395 * linux-xtensa-low.c (tdesc_xtensa): Declare.
14396 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
14397 (target_regsets): Rename to ...
14398 (xtensa_regsets): ... this, and make static.
14399 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
14400 globals.
14401 (xtensa_arch_setup, xtensa_regs_info): New functions.
14402 (the_low_target): Adjust.
14403 (initialize_low_arch): New function.
14404 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
14405 (nios2_arch_setup): Set the current process'es tdesc.
14406 (target_regsets): Rename to ...
14407 (nios2_regsets): ... this.
14408 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
14409 (nios2_regs_info): New function.
14410 (the_low_target): Adjust.
14411 (initialize_low_arch): New function.
14412 * linux-aarch64-low.c (tdesc_aarch64): Declare.
14413 (aarch64_arch_setup): Set the current process'es tdesc.
14414 (target_regsets): Rename to ...
14415 (aarch64_regsets): ... this.
14416 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
14417 (aarch64_regs_info): New function.
14418 (the_low_target): Adjust.
14419 (initialize_low_arch): New function.
14420 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
14421 globals.
14422 (target_regsets): Rename to ...
14423 (tile_regsets): ... this.
14424 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
14425 (tile_regs_info): New function.
14426 (tile_arch_setup): Set the current process'es tdesc.
14427 (the_low_target): Adjust.
14428 (initialize_low_arch): New function.
14429 * spu-low.c (tdesc_spu): Declare.
14430 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
14431 * win32-arm-low.c (tdesc_arm): Declare.
14432 (arm_arch_setup): New function.
14433 (the_low_target): Install arm_arch_setup instead of
14434 init_registers_arm.
14435 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
14436 (init_windows_x86): Rename to ...
14437 (i386_arch_setup): ... this. Set `win32_tdesc'.
14438 (the_low_target): Adjust.
14439 * win32-low.c (win32_tdesc): New global.
14440 (child_add_thread): Don't create the thread cache here.
14441 (do_initial_child_stuff): Set the new process'es tdesc.
14442 * win32-low.h (struct target_desc): Forward declare.
14443 (win32_tdesc): Declare.
14444 * lynx-i386-low.c (tdesc_i386): Declare global.
14445 (lynx_i386_arch_setup): Set `lynx_tdesc'.
14446 * lynx-low.c (lynx_tdesc): New global.
14447 (lynx_add_process): Set the new process'es tdesc.
14448 * lynx-low.h (struct target_desc): Forward declare.
14449 (lynx_tdesc): Declare global.
14450 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
14451 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
14452 * nto-low.c (nto_tdesc): New global.
14453 (do_attach): Set the new process'es tdesc.
14454 * nto-low.h (struct target_desc): Forward declare.
14455 (nto_tdesc): Declare.
14456 * nto-x86-low.c (tdesc_i386): Declare.
14457 (nto_x86_arch_setup): Set `nto_tdesc'.
14458
14459 2013-06-04 Gary Benson <gbenson@redhat.com>
14460
14461 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
14462 to qSupported response when appropriate.
14463 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
14464 with nonzero-length annex.
14465 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
14466 arguments supplied in annex.
14467
14468 2013-05-31 Doug Evans <dje@google.com>
14469
14470 PR server/15594
14471 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
14472 64 bits in 64-cross-32 environment.
14473
14474 2013-05-28 Pedro Alves <palves@redhat.com>
14475
14476 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
14477 (aarch64-without-fpu.c): Delete rule.
14478 * configure.srv (aarch64*-*-linux*): Remove references to
14479 aarch64-without-fpu.o and aarch64-without-fpu.xml.
14480 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
14481 declaration.
14482
14483 2013-05-24 Pedro Alves <palves@redhat.com>
14484
14485 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
14486 instead of strchr/decode_address. Error if the range isn't split
14487 with a ','. Don't assume there's be a ':' in the action.
14488
14489 2013-05-23 Yao Qi <yao@codesourcery.com>
14490 Pedro Alves <palves@redhat.com>
14491
14492 * linux-low.c (lwp_in_step_range): New function.
14493 (linux_wait_1): If the thread was range stepping and stopped
14494 outside the stepping range, report the stop to GDB. Otherwise,
14495 continue stepping. Add range stepping debug output.
14496 (linux_set_resume_request): Copy the step range from the resume
14497 request to the lwp.
14498 (linux_supports_range_stepping): New.
14499 (linux_target_ops) <supports_range_stepping>: Set to
14500 linux_supports_range_stepping.
14501 * linux-low.h (struct linux_target_ops)
14502 <supports_range_stepping>: New field.
14503 (struct lwp_info) <step_range_start, step_range_end>: New fields.
14504 * linux-x86-low.c (x86_supports_range_stepping): New.
14505 (the_low_target) <supports_range_stepping>: Set to
14506 x86_supports_range_stepping.
14507 * server.c (handle_v_cont): Handle 'r' action.
14508 (handle_v_requests): Append ";r" if the target supports range
14509 stepping.
14510 * target.h (struct thread_resume) <step_range_start,
14511 step_range_end>: New fields.
14512 (struct target_ops) <supports_range_stepping>:
14513 New field.
14514 (target_supports_range_stepping): New macro.
14515
14516 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14517
14518 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
14519 confusion in comment.
14520
14521 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14522
14523 * lynx-low.c (struct process_info_private): New type.
14524 (lynx_add_process): New function.
14525 (lynx_create_inferior, lynx_attach): Replace calls to
14526 add_process by calls to lynx_add_process.
14527 (lynx_resume): If PTID is null, then try using
14528 current_process()->private->last_wait_event_ptid.
14529 Add comments.
14530 (lynx_clear_inferiors): Delete. The contents of that function
14531 has been inlined in lynx_mourn;
14532 (lynx_wait_1): Save the ptid in the process's private data.
14533 (lynx_mourn): Free the process' private data. Replace call
14534 to lynx_clear_inferiors by call to clear_inferiors.
14535
14536 2013-05-17 Yao Qi <yao@codesourcery.com>
14537
14538 * i386-low.c (i386_length_and_rw_bits): Move the comment to
14539 the right place.
14540
14541 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
14542
14543 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
14544 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
14545 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
14546 PT_TEXT_END_ADDR guards. Update comments.
14547 (linux_target_op) <read_offsets>: Conditionally define to
14548 linux_read_offsets if the target is UCLIBC and if it defines
14549 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
14550
14551 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
14552 Andrew Jenner <andrew@codesourcery.com>
14553
14554 * Makefile.in (SFILES): Add linux-nios2-low.c.
14555 (clean): Add action to delete nios2-linux.c.
14556 (nios2-linux.c): New rule.
14557 * configure.srv: Add nios2*-*-linux*.
14558 * linux-nios2-low.c: New.
14559
14560 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
14561
14562 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
14563
14564 2013-04-25 Hui Zhu <hui@codesourcery.com>
14565
14566 PR gdb/15186
14567 * ax.c (ax_printf): Add fflush.
14568
14569 2013-04-22 Tom Tromey <tromey@redhat.com>
14570
14571 * Makefile.in (SFILES): Add filestuff.c.
14572 (OBS): Add filestuff.o.
14573 (filestuff.o): New target.
14574 * config.in, configure: Rebuild.
14575 * configure.ac: Check for fdwalk, pipe2.
14576
14577 2013-04-17 Pedro Alves <palves@redhat.com>
14578
14579 * configure.ac (USE_THREAD_DB): Delete variable.
14580 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
14581 Don't AC_SUBST USE_THREAD_DB.
14582 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
14583 * config.in, configure: Regenerate.
14584
14585 2013-04-16 Pedro Alves <palves@redhat.com>
14586
14587 * linux-low.h (struct lwp_info) <thread_known>: Move under
14588 the USE_THREAD_DB #ifdef.
14589
14590 2013-04-16 Pedro Alves <palves@redhat.com>
14591
14592 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
14593 (linux-low.o): Delete rule.
14594 * linux-low.h: Always include "gdb_thread_db.h" instead of
14595 conditionally including thread_db.h.
14596 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
14597 HAVE_THREAD_DB_H.
14598
14599 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14600
14601 * Makefile.in (install-only): Fix make install regression.
14602
14603 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
14604
14605 Convert man pages to texinfo, new gdbinit.5 texinfo page.
14606 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
14607 installation.
14608 * gdbserver.1: Remove.
14609
14610 2013-03-22 Pedro Alves <palves@redhat.com>
14611
14612 * linux-low.c (handle_extended_wait): Don't call
14613 linux_enable_event_reporting.
14614
14615 2013-03-15 Tony Theodore <tonyt@logyst.com>
14616
14617 PR build/9098:
14618 * Makefile.in (SHELL): Use @SHELL@.
14619
14620 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
14621
14622 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
14623 compiler warning.
14624
14625 2013-03-13 Joel Brobecker <brobecker@adacore.com>
14626
14627 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
14628 Remove extraneous NULL element.
14629
14630 2013-03-13 Yao Qi <yao@codesourcery.com>
14631
14632 * tracepoint.c (traceframe_read_tsv): Look for the last matched
14633 'V' block in trace frame.
14634
14635 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14636
14637 * target.h (struct target_ops): Add btrace ops.
14638 (target_supports_btrace): New macro.
14639 (target_enable_btrace): New macro.
14640 (target_disable_btrace): New macro.
14641 (target_read_btrace): New macro.
14642 * gdbthread.h (struct thread_info): Add btrace field.
14643 * server.c: Include btrace-common.h.
14644 (handle_btrace_general_set): New function.
14645 (handle_btrace_enable): New function.
14646 (handle_btrace_disable): New function.
14647 (handle_general_set): Call handle_btrace_general_set.
14648 (handle_qxfer_btrace): New function.
14649 (struct qxfer qxfer_packets[]): Add btrace entry.
14650 * inferiors.c (remove_thread): Disable btrace.
14651 * linux-low: Include linux-btrace.h.
14652 (linux_low_enable_btrace): New function.
14653 (linux_low_read_btrace): New function.
14654 (linux_target_ops): Add btrace ops.
14655 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
14656 Add srv_linux_btrace=yes.
14657 (x86_64-*-linux*): Add linux-btrace.o.
14658 Add srv_linux_btrace=yes.
14659 * configure.ac: Define HAVE_LINUX_BTRACE.
14660 * config.in: Regenerated.
14661 * configure: Regenerated.
14662
14663 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14664
14665 * server.c (handle_qxfer): Preserve error message if -3 is
14666 returned.
14667 (qxfer): Document the -3 return value.
14668
14669 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14670
14671 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
14672 (linux_btrace_h): New variable.
14673 (linux-btrace.o): New rule.
14674
14675 2013-03-08 Stan Shebs <stan@codesourcery.com>
14676 Hafiz Abid Qadeer <abidh@codesourcery.com>
14677
14678 * tracepoint.c (trace_buffer_size): New global.
14679 (DEFAULT_TRACE_BUFFER_SIZE): New define.
14680 (init_trace_buffer): Change to one-argument function. Allocate
14681 trace buffer memory.
14682 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
14683 handle QTBuffer:size packet.
14684 (cmd_bigqtbuffer_size): New function.
14685 (initialize_tracepoint): Call init_trace_buffer with
14686 DEFAULT_TRACE_BUFFER_SIZE.
14687 * server.c (handle_query): Add QTBuffer:size in the
14688 supported packets.
14689
14690 2013-03-07 Yao Qi <yao@codesourcery.com>
14691
14692 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
14693 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
14694 of -1.
14695 (cmd_qtsp): Adjust condition. Do post increment.
14696 Set cur_action and cur_step_action back to 0.
14697
14698 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
14699
14700 PR server/15236
14701 * linux-low.c (linux_write_memory): Return early success if LEN is
14702 zero.
14703
14704 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
14705
14706 * configure.srv: Add x86_64-*-cygwin* as target.
14707
14708 2013-02-28 Tom Tromey <tromey@redhat.com>
14709
14710 * configure.ac: Invoke AC_SYS_LARGEFILE.
14711 * configure, config.in: Rebuild.
14712
14713 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
14714
14715 * win32-low.c: Throughout, fix format strings and casts of
14716 printf-like functions to avoid type related warnings on all
14717 platforms.
14718 (get_child_debug_event): Print dwDebugEventCode as hex since
14719 that's how it's usually documented.
14720
14721 2013-02-28 Yao Qi <yao@codesourcery.com>
14722
14723 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
14724 pulongest.
14725
14726 2013-02-27 Jiong Wang <jiwang@tilera.com>
14727
14728 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
14729 (reg-tilegx32.c): New rule.
14730 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
14731 * linux-tile-low.c (tile_arch_setup): New function. Invoke
14732 different register info initializer according to elf class.
14733 (init_registers_tilgx32): New function. The tilegx32 register info
14734 initializer.
14735 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
14736 (tile_store_gregset): Likewise.
14737
14738 2013-02-27 Yao Qi <yao@codesourcery.com>
14739
14740 * server.c (process_point_options): Print debug message when
14741 debug_threads is true.
14742
14743 2013-02-26 Yao Qi <yao@codesourcery.com>
14744
14745 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
14746
14747 2013-02-19 Pedro Alves <palves@redhat.com>
14748 Kai Tietz <ktietz@redhat.com>
14749
14750 PR gdb/15161
14751
14752 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
14753 instead of strtoul to extract address from packet.
14754 (process_serial_event) <'z'>: Likewise.
14755
14756 2013-02-18 Yao Qi <yao@codesourcery.com>
14757
14758 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
14759
14760 2013-02-14 Pedro Alves <palves@redhat.com>
14761
14762 Plug memory leak.
14763
14764 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
14765 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
14766
14767 2013-02-14 Pedro Alves <palves@redhat.com>
14768
14769 * tracepoint.c (cmd_qtdpsrc): Use savestring.
14770
14771 2013-02-14 Pedro Alves <palves@redhat.com>
14772
14773 * tracepoint.c (save_string): Delete.
14774 (add_tracepoint_action): Use savestring instead of save_string.
14775
14776 2013-02-12 Pedro Alves <palves@redhat.com>
14777
14778 * linux-xtensa-low.c: Ditto.
14779 * xtensa-xtregs.c: Ditto.
14780
14781 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
14782
14783 * thread-db.c (thread_db_get_tls_address): NULL pointer check
14784 thread_db.
14785
14786 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14787
14788 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
14789 aarch64_num_wp_regs and aarch64_num_bp_regs to
14790 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
14791
14792 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14793
14794 * linux-aarch64-low.c (ps_get_thread_area): Replace
14795 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
14796
14797 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
14798 Marcus Shawcroft <marcus.shawcroft@arm.com>
14799 Nigel Stephens <nigel.stephens@arm.com>
14800 Yufeng Zhang <yufeng.zhang@arm.com>
14801
14802 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
14803 (aarch64.c, aarch64-without-fpu.c): New targets.
14804 * configure.srv (aarch64*-*-linux*): New.
14805 * linux-aarch64-low.c: New file.
14806
14807 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
14808
14809 * linux-low.c (handle_extended_wait, linux_create_inferior)
14810 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
14811 (dequeue_one_deferred_signal, linux_resume_one_thread)
14812 (fetch_register, linux_write_memory, linux_enable_event_reporting)
14813 (linux_tracefork_grandchild, linux_test_for_tracefork)
14814 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
14815 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
14816 where the argument is 0.
14817
14818 2013-01-25 Yao Qi <yao@codesourcery.com>
14819
14820 * event-loop.c: Include "queue.h".
14821 (gdb_event_p): New typedef.
14822 (struct gdb_event) <next_event>: Remove.
14823 (event_queue): Change to QUEUE(gdb_event_p).
14824 (async_queue_event): Remove.
14825 (gdb_event_xfree): New.
14826 (initialize_event_loop): New.
14827 (process_event): Use API from QUEUE.
14828 (wait_for_event): Likewise.
14829 * server.c (main): Call initialize_event_loop.
14830 * server.h (initialize_event_loop): Declare.
14831
14832 2013-01-18 Yao Qi <yao@codesourcery.com>
14833
14834 * ax.h (struct eval_agent_expr_context): New.
14835 (gdb_eval_agent_expr): Update declaration.
14836 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
14837 TFRAME. Add new argument CTX.
14838 * server.h (struct eval_agent_expr_context): Declare.
14839 (agent_mem_read, agent_tsv_read): Update declaration.
14840 (agent_mem_read_string): Likewise.
14841 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
14842 (add_traceframe_block): Add new argument TPOINT.
14843 Increase TPOINT->traceframe_usage.
14844 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
14845 eval_tracepoint_agent_expr.
14846 (condition_true_at_tracepoint): Likewise.
14847 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
14848 (agent_mem_read_string, agent_tsv_read): Likewise.
14849
14850 2013-01-16 Yao Qi <yao@codesourcery.com>
14851
14852 * linux-low.c (linux_resume_one_lwp): Don't check
14853 'lwp->bp_reinsert != 0'.
14854
14855 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14856 Pedro Alves <palves@redhat.com>
14857
14858 * lynx-low.c (ptrace_request_to_str): Define a temporary
14859 macro and use it to simplify this function's implementation.
14860
14861 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14862
14863 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
14864 sets errno.
14865
14866 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14867
14868 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
14869
14870 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14871
14872 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
14873
14874 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14875
14876 * lynx-low.c (lynx_resume): Use the resume_info parameter
14877 to determine the ptid for the lynx_ptrace call, unless
14878 it is equal to minus_one_ptid, in which case we use the
14879 ptid of the current_inferior.
14880 (lynx_wait_1): After having received a thread create/exit
14881 event, resume the inferior's execution using the signaling
14882 thread's ptid, rather than the old ptid.
14883
14884 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14885
14886 * lynx-low.c (lynx_resume): Delete variable ret.
14887
14888 2013-01-01 Joel Brobecker <brobecker@adacore.com>
14889
14890 * gdbreplay.c (gdbreplay_version): Update copyright year.
14891 * server.c (gdbserver_version): Likewise.
14892
14893 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14894
14895 * lynx-low.c (lynx_wait_1): Add debug trace before adding
14896 new thread.
14897
14898 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14899
14900 * lynx-low.c (ptrace_request_to_str): Add handling for
14901 PTRACE_GETTRACESIG.
14902
14903 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14904
14905 * lynx-low.c (lynx_attach): Delete variable new_process.
14906
14907 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14908
14909 * lynx-low.c (lynx_create_inferior): Delete variable
14910 new_process.
14911
14912 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14913
14914 * lynx-low.c (ptrace_request_to_str): Do not handle
14915 PTRACE_GETTHREADLIST if this macro does not exist.
14916
14917 2012-12-15 Yao Qi <yao@codesourcery.com>
14918
14919 * Makefile.in (OBS): Add notif.o.
14920 * notif.c, notif.h: New.
14921 * server.c: Include "notif.h".
14922 (struct vstop_notif) <next>: Remove.
14923 <base>: New field.
14924 (queue_stop_reply): Update.
14925 (push_event, send_next_stop_reply): Remove.
14926 (discard_queued_stop_replies): Update.
14927 (notif_stop): New variable.
14928 (handle_v_stopped): Remove.
14929 (handle_v_requests): Don't call handle_v_stopped. Call
14930 handle_ack_notif instead.
14931 (queue_stop_reply_callback): Call notif_event_enque instead
14932 of queue_stop_reply.
14933 (handle_status): Don't call send_next_stop_reply, call
14934 notif_write_event instead.
14935 (kill_inferior_callback): Likewise.
14936 (detach_or_kill_inferior_callback): Likewise.
14937 (main): Call initialize_notif.
14938 (process_serial_event): Call QUEUE_is_empty.
14939 (handle_target_event): Call notif_push instead of push event.
14940 * server.h (push_event): Remove declaration.
14941
14942 2012-12-10 Tom Tromey <tromey@redhat.com>
14943
14944 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
14945 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
14946 macros.
14947 (.c.o): Rewrite.
14948 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
14949 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
14950 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
14951 (amd64-linux-ipa.o, ax.o): Rewrite.
14952 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
14953 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
14954 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
14955 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
14956 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
14957 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
14958 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
14959 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
14960 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
14961 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
14962 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
14963 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
14964 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
14965 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
14966 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
14967 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
14968 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
14969 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
14970 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
14971 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
14972 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
14973 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
14974 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
14975 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
14976 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
14977 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
14978 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
14979 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
14980 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
14981 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
14982 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
14983 (reg-tilegx.o): Remove.
14984 (all_object_files): New macro.
14985 Include .deps files.
14986 * aclocal.m4, configure: Rebuild.
14987 * acinclude.m4: Include depstand.m4, lead-dot.m4.
14988 * configure.ac: Invoke ZW_CREATE_DEPDIR,
14989 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
14990
14991 2012-12-05 Tom Tromey <tromey@redhat.com>
14992
14993 PR gdb/14917:
14994 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
14995
14996 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
14997
14998 * configure.ac: Check for linux/perf_event.h.
14999 * config.in: Regenerated.
15000 * configure: Regenerated.
15001
15002 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
15003
15004 * hostio.c (handle_readlink): Decrease buffer size
15005 parameter passed to readlink by one byte.
15006
15007 2012-11-26 Yao Qi <yao@codesourcery.com>
15008
15009 * configure.ac (build_warnings): Append '-Wempty-body'.
15010 * configure: Regenerated.
15011 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
15012 body.
15013
15014 2012-11-15 Pierre Muller <muller@sourceware.org>
15015
15016 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
15017 * config.in: Regenerate.
15018 * configure: Regenerate.
15019 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
15020 Use "gdb_wait.h" header instead of <sys/wait.h> header.
15021 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
15022 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
15023 header.
15024 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
15025 instead of <sys/wait.h> header.
15026 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
15027
15028 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
15029
15030 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
15031 (various make rules): Remove -DGDBSERVER
15032
15033 2012-11-09 Yao Qi <yao@codesourcery.com>
15034
15035 * spu-low.c (current_ptid): Move it to ..
15036 * gdbthread.h: ... here. New.
15037 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
15038 * server.c (myresume, process_serial_event): Likewise.
15039 * thread-db.c (thread_db_find_new_threads): Likewise.
15040 * tracepoint.c (run_inferior_command): Likewise.
15041
15042 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
15043
15044 * server.c (handle_search_memory_1): Include access length in
15045 warning message.
15046
15047 2012-09-05 Michael Brandt <michael.brandt@axis.com>
15048
15049 * linux-crisv32-low.c: Fix compile errors.
15050
15051 2012-09-04 Yao Qi <yao@codesourcery.com>
15052
15053 * tracepoint.c (cmd_qtsv): Adjust debug message.
15054 Don't check CUR_TPOINT.
15055
15056 2012-08-28 Yao Qi <yao@codesourcery.com>
15057
15058 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
15059 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
15060 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
15061 Remove declarations of xmalloc, xreallloc, xstrdup and
15062 freeargv.
15063 * Makefile.in (libiberty_h): New.
15064 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
15065 (linux-bfin-low.o): Append dependency 'libiberty.h'.
15066
15067 2012-08-23 Yao Qi <yao@codesourcery.com>
15068
15069 * server.h: Remove declaration of 'xsnprintf'.
15070
15071 2012-08-22 Keith Seitz <keiths@redhat.com>
15072
15073 * server.h: Include build-gnulib-gbserver/config.h.
15074 * gdbreplay.c: Likewise.
15075
15076 2012-08-08 Doug Evans <dje@google.com>
15077
15078 * Makefile.in (SFILES): Add gdb_vecs.c.
15079 (OBS): Add gdb_vecs.o.
15080 (gdb_vecs_h, host_defs_h): New variables.
15081 (thread-db.o): Add $(gdb_vecs_h) dependency.
15082 (gdb_vecs.o): New rule.
15083 * thread-db.c: #include "gdb_vecs.h".
15084 (thread_db_load_search): Use a vector to iterate over path elements.
15085 Handle text appearing after "$pdir".
15086
15087 * configure.ac: Add check for strstr.
15088 * config.in: Regenerate.
15089 * configure: Regenerate.
15090
15091 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
15092
15093 * hostio.c (handle_pread): If pread fails, fall back to attempting
15094 lseek/read.
15095 (handle_pwrite): Likewise for pwrite.
15096
15097 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
15098
15099 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
15100 between unsupported TYPE and unimplementable ADDR/LEN combination.
15101 (arm_insert_point): Act on new return value.
15102
15103 2012-07-31 Pedro Alves <palves@redhat.com>
15104
15105 * server.c (process_point_options): Only skip tokens if we find
15106 one that is unrecognized. Don't treat 'X' specially while
15107 skipping unrecognized tokens.
15108
15109 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
15110
15111 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
15112 to 4-byte-align HW breakpoint addresses for Thumb.
15113
15114 2012-07-27 Yao Qi <yao@codesourcery.com>
15115
15116 PR remote/14161.
15117
15118 * server.h: Declare gdb_agent_about_to_close.
15119 * target.c (kill_inferior): Include "agent.h".
15120 New. Send command 'kill'.
15121 * target.h (kill_inferior): Removed macro.
15122 * tracepoint.c (gdb_agent_about_to_close): New.
15123 (gdb_agent_helper_thread): Handle command 'close'.
15124 Wait endlessly until the inferior stops.
15125 Install gdb_agent_remove_socket to atexit hook.
15126 (agent_socket_name): New static variable.
15127 (gdb_agent_socket_init): Replace local variable 'name' with
15128 'agent_socket_name'.
15129 (gdb_agent_remove_socket): New.
15130
15131 2012-07-27 Yao Qi <yao@codesourcery.com>
15132
15133 * server.c (process_point_options): Stop at 'X' when parsing.
15134
15135 2012-07-19 Michael Eager <eager@eagercon.com>
15136
15137 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
15138 to hw_execute.
15139 * linux-x86-low.c (x86_insert_point, x86_remove_point):
15140 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
15141 hardware breakpoint.
15142
15143 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
15144
15145 * gdbserver/linux-low.c (initialize_low): Call
15146 linux_ptrace_init_warnings.
15147
15148 2012-07-02 Doug Evans <dje@google.com>
15149
15150 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
15151 pointer to int.
15152
15153 2012-07-02 Stan Shebs <stan@codesourcery.com>
15154
15155 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
15156 (ax.o): Add it to build rule.
15157 (ax-ipa.o): Ditto.
15158 (OBS): Add format.o.
15159 (IPA_OBS): Add format.o.
15160 * server.c (handle_query): Claim support for breakpoint commands.
15161 (process_point_options): Add command case.
15162 (process_serial_event): Leave running if there are printfs in
15163 effect.
15164 * mem-break.h (any_persistent_commands): Declare.
15165 (add_breakpoint_commands): Declare.
15166 (gdb_no_commands_at_breakpoint): Declare.
15167 (run_breakpoint_commands): Declare.
15168 * mem-break.c (struct point_command_list): New struct.
15169 (struct breakpoint): New field command_list.
15170 (any_persistent_commands): New function.
15171 (add_commands_to_breakpoint): New function.
15172 (add_breakpoint_commands): New function.
15173 (gdb_no_commands_at_breakpoint): New function.
15174 (run_breakpoint_commands): New function.
15175 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
15176 locally.
15177 * ax.c: Include format.h.
15178 (ax_printf): New function.
15179 (gdb_eval_agent_expr): Add printf opcode.
15180
15181 2012-06-13 Yao Qi <yao@codesourcery.com>
15182
15183 * server.c (start_inferior): Remove duplicated writes to fields
15184 'last_resume_kind' and 'last_status' of 'current_inferior'.
15185
15186 2012-06-12 Yao Qi <yao@codesourcery.com>
15187 Pedro Alves <palves@redhat.com>
15188
15189 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
15190 comment.
15191 * server.c (handle_v_cont): Extend comment.
15192
15193 2012-06-11 Yao Qi <yao@codesourcery.com>
15194
15195 * linux-low.c (linux_attach): Add 'static'.
15196
15197 2012-06-06 Yao Qi <yao@codesourcery.com>
15198
15199 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
15200
15201 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
15202
15203 Fix gcc -flto compilation warning.
15204 * server.c (main): Make variable multi_mode and attach volatile.
15205
15206 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15207
15208 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
15209 if the platform doesn't know about it.
15210
15211 2012-05-30 Jeff Kenton <jkenton@tilera.com>
15212
15213 * Makefile.in (SFILES): Add linux-tile-low.c.
15214 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
15215 * configure.srv: Handle tilegx-*-linux*.
15216 * linux-tile-low.c: New file.
15217
15218 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15219
15220 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
15221
15222 2012-05-24 Pedro Alves <palves@redhat.com>
15223
15224 PR gdb/7205
15225
15226 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
15227
15228 2012-05-24 Pedro Alves <palves@redhat.com>
15229
15230 PR gdb/7205
15231
15232 Replace target_signal with gdb_signal throughout.
15233
15234 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
15235
15236 * linux-low.c (linux_store_registers): Avoid the copying sequence
15237 when no data has been retrieved by ptrace.
15238
15239 2012-05-22 Will Deacon <will.deacon@arm.com>
15240
15241 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
15242 Include asm/ptrace.h.
15243 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
15244 already defined.
15245
15246 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
15247
15248 * linux-low.c (linux_store_registers): Don't re-retrieve data
15249 with ptrace that has already been obtained from /proc. Always
15250 copy any data retrieved with ptrace to the buffer supplied.
15251
15252 2012-05-11 Yao Qi <yao@codesourcery.com>
15253 Pedro Alves <palves@redhat.com>
15254
15255 * linux-low.c (enum stopping_threads_kind): New.
15256 (stopping_threads): Change type to `enum stopping_threads_kind'.
15257 (handle_extended_wait): If stopping and suspending threads, leave
15258 the new_lwp suspended too.
15259 (linux_wait_for_event): Adjust.
15260 (stop_all_lwps): Set `stopping_threads' to
15261 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
15262 whether we're suspending threads or just stopping them. Assert no
15263 recursion happens.
15264
15265 2012-04-29 Yao Qi <yao@codesourcery.com>
15266
15267 * server.h: Move some code to ...
15268 * gdbthread.h: ... here. New.
15269 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
15270 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
15271 (nto-low.o, win32-low.o): Likewise.
15272 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
15273 * regcache.c, remote-utils.c, server.c: Likewise.
15274 * target.c, tracepoint.c, win32-low.c: Likewise.
15275
15276 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15277
15278 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
15279 (PTRACE_ARG4_TYPE): Likewise.
15280 (PTRACE_XFER_TYPE): Likewise.
15281 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
15282 ptrace to PTRACE_ARG3_TYPE.
15283 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
15284 (PTRACE_ARG4_TYPE): Likewise.
15285 (PTRACE_XFER_TYPE): Likewise.
15286 (linux_detach_one_lwp): Cast fourth argument of
15287 ptrace to long then PTRACE_ARG4_TYPE.
15288 (regsets_fetch_inferior_registers): Cast third argument of
15289 ptrace to long then PTRACE_ARG3_TYPE.
15290 (regsets_store_inferior_registers): Likewise.
15291
15292 2012-04-20 Pedro Alves <palves@redhat.com>
15293
15294 * configure: Regenerate.
15295
15296 2012-04-19 Pedro Alves <palves@redhat.com>
15297
15298 * Makefile.in (GNULIB_BUILDDIR): New.
15299 (LIBGNU, INCGNU, GNULIB_H): Adjust.
15300 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
15301 (all, install-only, uninstall, clean-info, all-lib, clean): No
15302 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
15303 (maintainer-clean realclean distclean): Use subdir_do.
15304 (subdir_do): New.
15305 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
15306 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
15307 * acinclude.m4: Include acx_configure_dir.m4.
15308 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
15309 calls. Call AC_PROG_RANLIB. Configure gnulib using
15310 ACX_CONFIGURE_DIR.
15311 (GNULIB): New.
15312 (GNULIB_STDINT_H): Adjust.
15313 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
15314 * gdbreplay.c: Include build-gnulib/config.h.
15315 * server.h: Likewise.
15316 * aclocal.m4: Regenerate.
15317 * config.in: Regenerate.
15318 * configure: Regenerate.
15319
15320 2012-04-19 Pedro Alves <palves@redhat.com>
15321
15322 * Makefile.in (LIBGNU, INCGNU): Adjust.
15323 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
15324 (all, install-only, uninstall, clean-info, all-lib, clean)
15325 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
15326 * configure.ac: Adjust AC_OUTPUT output.
15327 * aclocal.m4: Regenerate.
15328 * configure: Regenerate.
15329
15330 2012-04-19 Pedro Alves <palves@redhat.com>
15331
15332 * Makefile.in (generated_files): New.
15333 (server_h): Remove the explicit dependency on config.h, and depend
15334 on $generated_files.
15335
15336 2012-04-19 Pedro Alves <palves@redhat.com>
15337
15338 * Makefile.in (INCGNU): Add -Ignulib.
15339
15340 2012-04-19 Pedro Alves <palves@redhat.com>
15341
15342 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
15343 (INCGNU): ... this, and spell out -I here.
15344 (GNULIB_LIB): Rename to ...
15345 (LIBGNU): ... this.
15346 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
15347
15348 2012-04-19 Pedro Alves <palves@redhat.com>
15349
15350 * config.in: Regenerate.
15351
15352 2012-04-19 Pedro Alves <palves@redhat.com>
15353
15354 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
15355 * server.h (memmem): Remove declaration.
15356 * config.in: Regenerate.
15357 * configure: Regenerate.
15358
15359 2012-04-19 Yao Qi <yao@codesourcery.com>
15360
15361 * Makefile.in (SFILES): Add common/vec.c.
15362 (OBS): Add vec.o.
15363 (vec.o): New rule.
15364
15365 2012-04-19 Yao Qi <yao@codesourcery.com>
15366
15367 * remote-utils.c (prepare_resume_reply): Replace with macro
15368 target_core_of_thread.
15369 * server.c (handle_qxfer_threads_proper): Likewise.
15370 * target.h (traget_core_of_thread): New macro.
15371
15372 2012-04-18 Pedro Alves <palves@redhat.com>
15373
15374 * aclocal.m4: Regenerate.
15375 * configure: Regenerate.
15376
15377 2012-04-16 Yao Qi <yao@codesourcery.com>
15378
15379 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
15380 duplicated on address.
15381
15382 2012-04-16 Yao Qi <yao@codesourcery.com>
15383
15384 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
15385 (struct tracepoint_action_ops) <send>: New field.
15386 (m_tracepoint_action_send, r_tracepoint_action_send): New.
15387 (agent_expr_send, x_tracepoint_action_send): New.
15388 (l_tracepoint_action_send): New.
15389 (cmd_qtdp): Download and install tracepoint
15390 according to `use_agent'.
15391 (run_inferior_command): Add one more parameter `len'.
15392 Update callers.
15393 (tracepoint_send_agent): New.
15394 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
15395
15396 2012-04-16 Yao Qi <yao@codesourcery.com>
15397
15398 * tracepoint.c (download_tracepoints): Moved to ...
15399 (cmd_qtstart): ... here.
15400
15401 2012-04-14 Yao Qi <yao@codesourcery.com>
15402
15403 * tracepoint.c: Include inttypes.h.
15404 (struct collect_memory_action): Use sized types.
15405 (struct tracepoint): Likewise.
15406 (cmd_qtdp, stop_tracing): Update print specifiers.
15407 (cmd_qtp, response_tracepoint): Likewise.
15408 (collect_data_at_tracepoint): Likewise.
15409 (collect_data_at_step): Likewise.
15410
15411 2012-04-14 Yao Qi <yao@codesourcery.com>
15412
15413 Import gnulib module inttypes.
15414 * aclocal.m4, config.in, configure: Regenerated.
15415
15416 2012-04-14 Yao Qi <yao@codesourcery.com>
15417
15418 * Makefile.in (maintainer-clean, realclean, distclean): Remove
15419 Makefile and config.status at last.
15420
15421 2012-04-13 Yao Qi <yao@codesourcery.com>
15422
15423 * tracepoint.c: Include stdint.h unconditionally.
15424
15425 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15426
15427 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
15428 on BFD_HAVE_SYS_PROCFS_TYPE.
15429 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
15430 * configure: Regenerate.
15431 * config.in: Likewise.
15432
15433 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
15434
15435 * Makefile.in (clean): Also remove x32.c x32-linux.c
15436 x32-avx.c x32-avx-linux.c.
15437 (x32.o): New target.
15438 (x32.c): Likewise.
15439 (x32-linux.o): Likewise.
15440 (x32-linux.c): Likewise.
15441 (x32-avx.o): Likewise.
15442 (x32-avx.c): Likewise.
15443 (x32-avx-linux.o): Likewise.
15444 (x32-avx-linux.c): Likewise.
15445
15446 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
15447 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
15448 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
15449 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
15450 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
15451 i386/x32-avx-linux.xml.
15452
15453 * linux-x86-low.c (init_registers_x32_linux): New prototype.
15454 (init_registers_x32_avx_linux): Likwise.
15455 (x86_linux_update_xmltarget): Call init_registers_x32_linux
15456 or init_registers_x32_avx_linux if linux_is_elf64 is false.
15457
15458 2012-04-13 Pedro Alves <palves@redhat.com>
15459
15460 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
15461 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
15462 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
15463 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
15464 the sub-make.
15465
15466 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15467
15468 * linux-x86-low.c (compat_x32_clock_t): New.
15469 (compat_x32_siginfo_t): Likewise.
15470 (compat_x32_siginfo_from_siginfo): Likewise.
15471 (siginfo_from_compat_x32_siginfo): Likewise.
15472 (linux_is_elf64): Likewise.
15473 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
15474 and siginfo_from_compat_x32_siginfo for x32.
15475 (x86_arch_setup): Set linux_is_elf64.
15476
15477 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15478
15479 PR gdb/13969
15480 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
15481 e_machine field.
15482 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
15483 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
15484 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
15485 compatible with process.
15486
15487 2012-04-12 Yao Qi <yao@codesourcery.com>
15488
15489 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
15490 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
15491 (install-only, install-info, clean): Handle sub dir gnulib.
15492 (all-lib, am--refresh): New targets.
15493 (memmem.o): Remove target.
15494 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
15495 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
15496 (AC_REPLACE_FUNCS): Remove memmem.
15497 Invoke gl_INIT and AM_INIT_AUTOMAKE.
15498 (AC_OUTPUT): Generate Makefile in gnulib/.
15499 * aclocal.m4, config.in, configure: Regenerated.
15500
15501 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
15502
15503 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
15504
15505 2012-04-05 Pedro Alves <palves@redhat.com>
15506
15507 -Werror=strict-aliasing
15508
15509 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
15510 pointer.
15511
15512 2012-04-04 Pedro Alves <palves@redhat.com>
15513
15514 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15515 (sparc_store_gregset_from_stack, sparc_store_gregset)
15516 (sparc_breakpoint_at): Fix formatting.
15517
15518 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15519
15520 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
15521 are available.
15522 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
15523 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
15524 * config.in: Regenerate.
15525 * configure: Likewise.
15526
15527 2012-03-29 Pedro Alves <palves@redhat.com>
15528
15529 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
15530 Correct ptrace arguments.
15531
15532 2012-03-28 Pedro Alves <palves@redhat.com>
15533
15534 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
15535 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
15536 (IA64_FR1_REGNUM): New defines.
15537 (ia64_fetch_register): New.
15538 (the_low_target): Install it.
15539 * linux-low.h (struct linux_target_ops) <fetch_register>: New
15540 field.
15541 * linux-low.c (linux_fetch_registers): Try the
15542 the_low_target.fetch_register hook first.
15543
15544 * linux-arm-low.c (the_low_target): Adjust.
15545 * linux-bfin-low.c (the_low_target): Adjust.
15546 * linux-cris-low.c (the_low_target): Adjust.
15547 * linux-crisv32-low.c (the_low_target): Adjust.
15548 * linux-m32r-low.c (the_low_target): Adjust.
15549 * linux-m68k-low.c (the_low_target): Adjust.
15550 * linux-mips-low.c (the_low_target): Adjust.
15551 * linux-ppc-low.c (the_low_target): Adjust.
15552 * linux-s390-low.c (the_low_target): Adjust.
15553 * linux-sh-low.c (the_low_target): Adjust.
15554 * linux-sparc-low.c (the_low_target): Adjust.
15555 * linux-tic6x-low.c (the_low_target): Adjust.
15556 * linux-x86-low.c (the_low_target): Adjust.
15557 * linux-xtensa-low.c (the_low_target): Adjust.
15558
15559 2012-03-26 Pedro Alves <palves@redhat.com>
15560
15561 * server.c (handle_qxfer_libraries): Don't bail early if
15562 the_target->qxfer_libraries_svr4 is not NULL.
15563
15564 2012-03-26 Pedro Alves <palves@redhat.com>
15565
15566 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
15567
15568 2012-03-23 Pedro Alves <palves@redhat.com>
15569
15570 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
15571 "library-list-svr4" element's start tag when the the DSO list is
15572 empty.
15573
15574 2012-03-23 Pedro Alves <palves@redhat.com>
15575
15576 * linux-low.c (read_one_ptr): Read the inferior's pointer through
15577 a variable whose type size is the same as the inferior's pointer
15578 size.
15579
15580 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
15581
15582 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
15583 struct siginfo.
15584 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
15585 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
15586 * linux-low.h: Include <signal.h>.
15587 (struct siginfo): Remove forward declaration.
15588 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
15589 struct siginfo.
15590
15591 2012-03-21 Mike Frysinger <vapier@gentoo.org>
15592
15593 * .gitignore: Ignore more files.
15594
15595 2012-03-19 Pedro Alves <palves@redhat.com>
15596 Jan Kratochvil <jan.kratochvil@redhat.com>
15597
15598 * server.c (cont_thread, general_thread): Add describing comments.
15599 (start_inferior): Clear `cont_thread'.
15600 (handle_v_cont): Don't set `cont_thread' if resuming all threads
15601 of a process.
15602
15603 2012-03-15 Yao Qi <yao@codesourcery.com>
15604
15605 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
15606 handling to ...
15607 (cmd_qtdp): ... here.
15608
15609 2012-03-15 Yao Qi <yao@codesourcery.com>
15610
15611 * tracepoint.c (struct tracepoint_action_ops): New.
15612 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
15613 (m_tracepoint_action_download): New.
15614 (r_tracepoint_action_download): New.
15615 (x_tracepoint_action_download): New.
15616 (l_tracepoint_action_download): New.
15617 (add_tracepoint_action): Install `action->ops' according type.
15618 (download_tracepoint_1): Move code `download' function pointer
15619 of various tracepoint_action_ops.
15620
15621 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15622
15623 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
15624 linux_ptrace_attach_warnings.
15625
15626 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15627
15628 * Makefile.in (linux-ptrace.o): New.
15629 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
15630 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
15631 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
15632 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
15633 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
15634 of these targets.
15635 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
15636
15637 2012-03-08 Yao Qi <yao@codesourcery.com>
15638 Pedro Alves <palves@redhat.com>
15639
15640 Fix PR server/13392.
15641 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
15642 offset of JMP insn.
15643 * tracepoint.c (remove_tracepoint): New.
15644 (cmd_qtdp): Call remove_tracepoint when failed to install.
15645
15646 2012-03-07 Pedro Alves <palves@redhat.com>
15647
15648 * linux-low.c (get_detach_signal): New.
15649 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
15650 Pass on pending signals to PTRACE_DETACH. Check the result of the
15651 ptrace call.
15652 * server.c (program_signals, program_signals_p): New.
15653 (handle_general_set): Handle QProgramSignals.
15654 * server.h (program_signals, program_signals_p): Declare.
15655
15656 2012-03-05 Pedro Alves <palves@redhat.com>
15657 Jan Kratochvil <jan.kratochvil@redhat.com>
15658
15659 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
15660 New comment why.
15661
15662 2012-03-03 Yao Qi <yao@codesourcery.com>
15663
15664 * tracepoint.c (tracepoint_look_up_symbols): Update call to
15665 agent_look_up_symbols.
15666
15667 2012-03-03 Yao Qi <yao@codesourcery.com>
15668
15669 * Makefile.in (linux-low.o): Keep dependence on agent.h.
15670 (linux-x86-low.o): Likewise.
15671 * server.h: Remove in_process_agent_loaded.
15672 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
15673 common/agent.c.
15674 Update callers.
15675
15676 2012-03-03 Yao Qi <yao@codesourcery.com>
15677
15678 * tracepoint.c (gdb_agent_capability): New global.
15679 (in_process_agent_loaded_ust): Renamed to
15680 `in_process_agent_supports_ust'.
15681 Update callers.
15682 (in_process_agent_supports_ust): Call agent_capability_check.
15683 (clear_installed_tracepoints): Assert that agent supports
15684 agent.
15685
15686 2012-03-03 Yao Qi <yao@codesourcery.com>
15687
15688 * linux-low.c (linux_supports_agent): New.
15689 (linux_target_ops): Initialize field `supports_agent' with
15690 linux_supports_agent.
15691 * target.h (struct target_ops) <supports_agent>: New.
15692 (target_supports_agent): New macro.
15693 * server.c (handle_general_set): Handle packet 'QAgent'.
15694 (handle_query): Send `QAgent+'.
15695 * Makefile.in (server.o): Depends on agent.h.
15696
15697 2012-03-03 Yao Qi <yao@codesourcery.com>
15698
15699 * Makefile.in (OBS): Add agent.o.
15700 Add new rule for agent.o.
15701 Track dependence of tracepoint.c on agent.h.
15702 * tracepoint.c (run_inferior_command_1):
15703 (run_inferior_command): Call agent_run_command.
15704 (gdb_ust_connect_sync_socket): Deleted. Move it to
15705 common/agent.c.
15706 (resume_thread, stop_thread): Likewise.
15707 (gdb_ust_socket_init): Renamed to ...
15708 (gdb_agent_socket_init): ... New.
15709 (gdb_ust_thread): Renamed to ...
15710 (gdb_agent_helper_thread): ... New.
15711 (gdb_ust_init): Move some code to ...
15712 (gdb_agent_init): ... here. New.
15713 [HAVE_UST]: Call gdb_ust_init.
15714 (initialize_tracepoint_ftlib): Call gdb_agent_init.
15715 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
15716 * config.in, configure: Regenerated.
15717
15718 2012-03-02 Pedro Alves <palves@redhat.com>
15719
15720 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
15721 * linux-low.c (struct simple_pid_list): New.
15722 (stopped_pids): New a struct simple_pid_list pointer.
15723 (add_to_pid_list, pull_pid_from_list): New.
15724 (handle_extended_wait): Don't assume the first signal new children
15725 report is SIGSTOP. Adjust call to pull_pid_from_list.
15726 (linux_wait_for_lwp): Adjust.
15727
15728 2012-03-02 Yao Qi <yao@codesourcery.com>
15729
15730 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
15731 debug log.
15732
15733 2012-03-02 Yao Qi <yao@codesourcery.com>
15734
15735 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
15736 `stop_pc' and `tpoint'. Update caller.
15737
15738 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
15739
15740 * linux-low.h (linux_target_ops): Add regset_bitmap member.
15741 * linux-low.c (use_linux_regsets): New macro.
15742 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
15743 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
15744 (linux_register_in_regsets): New function.
15745 (usr_fetch_inferior_registers): Skip registers covered by
15746 regsets.
15747 (usr_store_inferior_registers): Likewise.
15748 (usr_fetch_inferior_registers): New macro.
15749 (usr_store_inferior_registers): Likewise.
15750 (linux_fetch_registers): Handle mixed regset/non-regset targets.
15751 (linux_store_registers): Likewise.
15752 * linux-mips-low.c (init_registers_mips_dsp_linux): New
15753 prototype.
15754 (init_registers_mips64_dsp_linux): Likewise.
15755 (init_registers_mips_linux): New macro.
15756 (init_registers_mips_dsp_linux): Likewise.
15757 (mips_dsp_num_regs): Likewise.
15758 (DSP_BASE, DSP_CONTROL): New fallback macros.
15759 (mips_base_regs): New macro.
15760 (mips_regmap): Use it. Fix the size.
15761 (mips_dsp_regmap): New variable.
15762 (mips_dsp_regset_bitmap): Likewise.
15763 (mips_arch_setup): New function.
15764 (mips_cannot_fetch_register): Use the_low_target.regmap rather
15765 than mips_regmap.
15766 (mips_cannot_store_register): Likewise.
15767 (the_low_target): Update .arch_setup, .num_regs and .regmap
15768 initializers. Add .regset_bitmap initializer.
15769 * linux-arm-low.c (the_low_target): Add .regset_bitmap
15770 initializer.
15771 * linux-bfin-low.c (the_low_target): Likewise.
15772 * linux-cris-low.c (the_low_target): Likewise.
15773 * linux-crisv32-low.c (the_low_target): Likewise.
15774 * linux-ia64-low.c (the_low_target): Likewise.
15775 * linux-m32r-low.c (the_low_target): Likewise.
15776 * linux-m68k-low.c (the_low_target): Likewise.
15777 * linux-ppc-low.c (the_low_target): Likewise.
15778 * linux-s390-low.c (the_low_target): Likewise.
15779 * linux-sh-low.c (the_low_target): Likewise.
15780 * linux-sparc-low.c (the_low_target): Likewise.
15781 * linux-tic6x-low.c (the_low_target): Likewise.
15782 * linux-x86-low.c (the_low_target): Likewise.
15783 * linux-xtensa-low.c (the_low_target): Likewise.
15784 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
15785 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
15786 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
15787 srv_xmlfiles.
15788 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
15789 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
15790
15791 2012-02-29 Yao Qi <yao@codesourcery.com>
15792 Pedro Alves <palves@redhat.com>
15793
15794 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
15795 `step_over_finished' is true.
15796
15797 2012-02-27 Pedro Alves <palves@redhat.com>
15798
15799 * linux-low.c (pid_is_stopped): Delete, moved to common/.
15800 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
15801
15802 2012-02-27 Pedro Alves <palves@redhat.com>
15803
15804 PR server/9684
15805 * linux-low.c (pid_is_stopped): New.
15806 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
15807
15808 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
15809
15810 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
15811 of conditions.
15812
15813 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
15814
15815 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
15816
15817 2012-02-24 Luis Machado <lgustavo@codesourcery>
15818
15819 * server.c (handle_query): Advertise support for target-side
15820 breakpoint condition evaluation.
15821 (process_point_options): New function.
15822 (process_serial_event): When inserting a breakpoint, check for
15823 a target-side condition that should be evaluated.
15824
15825 * mem-break.c: Include regcache.h and ax.h.
15826 (point_cond_list_t): New data structure.
15827 (breakpoint) <cond_list>: New field.
15828 (find_gdb_breakpoint_at): Make non-static.
15829 (delete_gdb_breakpoint_at): Clear any target-side
15830 conditions.
15831 (clear_gdb_breakpoint_conditions): New function.
15832 (add_condition_to_breakpoint): Likewise.
15833 (add_breakpoint_condition): Likewise.
15834 (gdb_condition_true_at_breakpoint): Likewise.
15835 (gdb_breakpoint_here): Return result directly instead
15836 of going through a local variable.
15837
15838 * mem-break.h (find_gdb_breakpoint_at): New prototype.
15839 (clear_gdb_breakpoint_conditions): Likewise.
15840 (add_breakpoint_condition): Likewise.
15841 (gdb_condition_true_at_breakpoint): Likewise.
15842
15843 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
15844 (need_step_over_p): Take target-side breakpoint condition into
15845 consideration.
15846
15847 2012-02-24 Luis Machado <lgustavo@codesourcery>
15848
15849 * server.h: Include tracepoint.h.
15850 (agent_mem_read, agent_get_trace_state_variable_value,
15851 agent_set_trace_state_variable_value,
15852 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
15853 get_set_tsv_func_addr): New prototypes.
15854
15855 * ax.h: New include file.
15856 * ax.c: New source file.
15857
15858 * tracepoint.c: Include ax.h.
15859 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
15860 agent_expr, eval_result_type): Move to ax.h.
15861 (parse_agent_expr): Rename to ...
15862 (gdb_parse_agent_expr): ... this, make it non-static and move
15863 to ax.h.
15864 (unparse_agent_expr) Rename to ...
15865 (gdb_unparse_agent_expr): ... this, make it non-static and move
15866 to ax.h.
15867 (eval_agent_expr): Rename to ...
15868 (eval_tracepoint_agent_expr): ... this.
15869 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
15870 forward declarations.
15871 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
15872 (agent_get_trace_state_variable_value): New function.
15873 (agent_set_trace_state_variable_value): New function.
15874 (cmd_qtdp): Call gdb_parse_agent_expr (...).
15875 (response_tracepoint): Call gdb_unparse_agent_expr (...).
15876 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
15877 (condition_true_at_tracepoint): Likewise.
15878 (parse_agent_expr): Rename to ...
15879 (gdb_parse_agent_expr): ... this and move to ax.c.
15880 (unparse_agent_expr): Rename to ...
15881 (gdb_unparse_agent_expr): ... this and move to ax.c.
15882 (gdb_agent_op_name): Move to ax.c.
15883 (eval_agent_expr): Rename to ...
15884 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
15885 and move to ax.c.
15886 (eval_tracepoint_agent_expr): New function.
15887 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
15888 non-static.
15889 (current_insn_ptr, emit_error, struct bytecode_address): Move to
15890 ax.c.
15891 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
15892 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
15893 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
15894 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
15895 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
15896 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
15897 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
15898 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
15899 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
15900 (compile_bytecodes): Remove forward declaration.
15901 (is_goto_target): Move to ax.c.
15902 (compile_bytecodes): Move to ax.c and call
15903 agent_get_trace_state_variable_value (...) and
15904 agent_set_trace_state_variable_value (...).
15905
15906 * Makefile.in: Update ax.c and IPA dependencies.
15907
15908 2012-02-24 Pedro Alves <palves@redhat.com>
15909
15910 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
15911 (cmd_bigqtbuffer_circular): ... this. Only handle
15912 'QTBuffer:circular:'.
15913 (handle_tracepoint_general_set): Adjust.
15914
15915 2012-02-16 Yao Qi <yao@codesourcery.com>
15916
15917 * inferiors.c: Move code to ...
15918 * dll.c: .... here. New.
15919 * server.h: Declare clear_dlls.
15920 * Makefile.in (SFILES): Add dll.c.
15921 (OBS): Add dll.o
15922 (dll.o): New rule.
15923
15924 2012-02-11 Yao Qi <yao@codesourcery.com>
15925
15926 * server.c: (handle_monitor_command): Add a new parameter
15927 `own_buf'.
15928 (handle_query): Update caller.
15929
15930 2012-02-09 Joel Brobecker <brobecker@adacore.com>
15931
15932 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
15933 * configure, config.in: Regenerate.
15934 * hostio.c: Provide an alternate implementation if HAVE_READLINK
15935 is not defined.
15936
15937 2012-02-02 Pedro Alves <palves@redhat.com>
15938
15939 Try SIGKILL first, then PTRACE_KILL.
15940 * linux-low.c (linux_kill_one_lwp): New.
15941 (linux_kill_one_lwp): Rename to ...
15942 (kill_one_lwp_callback): ... this. Use the new
15943 linux_kill_one_lwp.
15944
15945 2012-02-02 Pedro Alves <palves@redhat.com>
15946
15947 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
15948 inferior.
15949
15950 2012-01-27 Pedro Alves <palves@redhat.com>
15951
15952 * linux-low.c (linux_child_pid_to_exec_file): Delete.
15953 (elf_64_file_p): Make static.
15954 (linux_pid_exe_is_elf_64_file): New.
15955 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
15956 Delete declarations.
15957 (linux_pid_exe_is_elf_64_file): Declare.
15958 * linux-x86-low.c (x86_arch_setup): Use
15959 linux_pid_exe_is_elf_64_file.
15960
15961 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
15962
15963 * linux-low.c (linux_wait_for_event_1): Rename to ...
15964 (linux_wait_for_event): ... here and merge it with former
15965 linux_wait_for_event - new variable wait_ptid, use it.
15966 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
15967
15968 2012-01-23 Pedro Alves <palves@redhat.com>
15969
15970 * server.c (main): Avoid yet another case of infinite loop while
15971 detaching/killing after a longjmp.
15972
15973 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15974
15975 Code cleanup.
15976 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
15977
15978 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
15979
15980 * hostio.c (handle_readlink): New function.
15981 (handle_vFile): Call it to handle "vFile:readlink" packets.
15982
15983 2012-01-20 Pedro Alves <palves@redhat.com>
15984 Ulrich Weigand <ulrich.weigand@linaro.org>
15985
15986 * server.c (handle_v_requests): Only support vAttach and vRun to
15987 start multiple processes when in extended protocol mode.
15988
15989 2012-01-17 Pedro Alves <palves@redhat.com>
15990
15991 * tracepoint.c (initialize_tracepoint): Use mmap instead of
15992 memalign plus mprotect to allocate the scratch buffer.
15993
15994 2012-01-13 Pedro Alves <palves@redhat.com>
15995
15996 * server.c (attach_inferior): Clear `cont_thread'.
15997
15998 2012-01-13 Pedro Alves <palves@redhat.com>
15999
16000 * server.c (main): Avoid infinite loop while detaching/killing
16001 after a longjmp.
16002
16003 2012-01-09 Doug Evans <dje@google.com>
16004
16005 * server.c (start_inferior): Set last_ptid in --wrapper case.
16006
16007 2012-01-06 Yao Qi <yao@codesourcery.com>
16008
16009 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
16010 defined.
16011 [IN_PROCESS_AGENT] (debug_agent): New global variable.
16012
16013 2012-01-04 Yao Qi <yao@codesourcery.com>
16014
16015 * tracepoint.c (cmd_qtdp): Print debug message
16016 for static tracepoint.
16017
16018 2012-01-04 Yao Qi <yao@codesourcery.com>
16019
16020 * tracepoint.c (trace_vdebug): Differentiate debug message
16021 between gdbserver and IPA.
16022
16023 2012-01-03 Yao Qi <yao@codesourcery.com>
16024
16025 * tracepoint.c (tracepoint_was_hit): Don't collect for
16026 static tracepoint.
16027
16028 2012-01-02 Joel Brobecker <brobecker@adacore.com>
16029
16030 * terminal.h: Reformat copyright header.
16031
16032 2012-01-02 Joel Brobecker <brobecker@adacore.com>
16033
16034 * server.c (gdbserver_version): Update copyright year.
16035 * gdbreplay.c (gdbreplay_version): Likewise.
16036
16037 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
16038
16039 * linux-low.c (linux_create_inferior): Put empty if clause for write.
16040
16041 Revert:
16042 2011-12-18 Hui Zhu <teawater@gmail.com>
16043 * linux-low.c (linux_create_inferior): Save return value to ret.
16044
16045 2011-12-18 Hui Zhu <teawater@gmail.com>
16046
16047 * linux-low.c (linux_create_inferior): Save return value to ret.
16048
16049 2011-12-16 Doug Evans <dje@google.com>
16050
16051 * linux-low.c (linux_create_inferior): If stdio connection,
16052 redirect stdin from /dev/null, stdout to stderr.
16053 * remote-utils.c (remote_is_stdio): New static global.
16054 (remote_connection_is_stdio): New function.
16055 (remote_prepare): Handle stdio connection.
16056 (remote_open): Ditto.
16057 (remote_close): Don't close stdin for stdio connections.
16058 (read_prim,write_prim): New functions. Replace all calls to
16059 read/write to these.
16060 * server.c (main): Watch for "-" argument. Move call to
16061 remote_prepare before start_inferior.
16062 * server.h (STDIO_CONNECTION_NAME): New macro.
16063 (remote_connection_is_stdio): Declare.
16064
16065 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
16066 in debugging output.
16067
16068 2011-12-15 Yao Qi <yao@codesourcery.com>
16069
16070 * tracepoint.c: Include sys/syscall.h.
16071 (gdb_ust_thread): Remove preprocessor conditional.
16072
16073 2011-12-14 Pedro Alves <pedro@codesourcery.com>
16074
16075 * linux-low.c (linux_detach_one_lwp): Call
16076 the_low_target.prepare_to_resume before detaching.
16077
16078 2011-12-14 Yao Qi <yao@codesourcery.com>
16079
16080 * tracepoint.c (gdb_ust_thread): Don't ignore return value
16081 of write.
16082
16083 2011-12-14 Yao Qi <yao@codesourcery.com>
16084
16085 * i386-low.c (i386_low_stopped_data_address): Initialize local
16086 variable `control'.
16087
16088 2011-12-13 Pedro Alves <pedro@codesourcery.com>
16089
16090 PR remote/13492
16091
16092 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
16093 DR_CONTROL unless necessary. Extend comments.
16094 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
16095 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
16096
16097 2011-12-13 Yao Qi <yao@codesourcery.com>
16098
16099 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
16100 macros.
16101 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
16102
16103 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
16104
16105 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
16106 Print new debug message for such case.
16107
16108 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
16109
16110 Fix overlapping memcpy.
16111 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
16112 the read_inferior_memory transfer.
16113 (delete_fast_tracepoint_jump): New variable buf. Use it for the
16114 write_inferior_memory transfer.
16115 (set_fast_tracepoint_jump): New variable buf. Use it for the
16116 read_inferior_memory and write_inferior_memory transfers.
16117 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
16118 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
16119 Use it for the write_inferior_memory transfer.
16120 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
16121 buffers.
16122
16123 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
16124
16125 * linux-low.c (fetch_register, store_register): Make code
16126 consistent, fix formatting.
16127
16128 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
16129
16130 * linux-low.c (usr_store_inferior_registers): Factor out code
16131 to handle individual registers into...
16132 (store_register): ... this new function.
16133
16134 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
16135
16136 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
16137 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
16138 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
16139 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
16140 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
16141 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
16142 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
16143 (srv_xmlfiles): Add new XML files.
16144
16145 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
16146 and <sys/uio.h>.
16147 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
16148 (init_registers_s390_linux32v1): Add prototype.
16149 (init_registers_s390_linux32v2): Likewise.
16150 (init_registers_s390_linux64v1): Likewise.
16151 (init_registers_s390_linux64v2): Likewise.
16152 (init_registers_s390x_linux64v1): Likewise.
16153 (init_registers_s390x_linux64v2): Likewise.
16154 (s390_num_regs): Increment to 52.
16155 (s390_regmap): Add orig_r2 register.
16156 (s390_num_regs_3264): Increment to 68.
16157 (s390_regmap_3264): Add orig_r2 register.
16158 (s390_collect_ptrace_register): Handle orig_r2 register.
16159 (s390_supply_ptrace_register): Likewise.
16160 (s390_fill_last_break): New function.
16161 (s390_store_last_break): Likewise.
16162 (s390_fill_system_call): New function.
16163 (s390_store_system_call): Likewise.
16164 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
16165 register sets.
16166 (s390_check_regset): New function.
16167 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
16168 NT_S390_SYSTEM_CALL regsets and use appropriate description.
16169 Update target_regsets for available register sets.
16170
16171 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
16172 Jan Kratochvil <jan.kratochvil@redhat.com>
16173
16174 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
16175 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
16176 New.
16177 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
16178 * linux-low.h (struct process_info_private): New member r_debug.
16179 * server.c (handle_qxfer_libraries): Call
16180 the_target->qxfer_libraries_svr4.
16181 (handle_qxfer_libraries_svr4): New function.
16182 (qxfer_packets): New entry "libraries-svr4".
16183 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
16184 * target.h (struct target_ops): New member qxfer_libraries_svr4.
16185 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
16186 PACKET_qXfer_libraries_svr4.
16187
16188 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
16189
16190 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
16191 PSW address/mask between 8-byte and 16-byte formats.
16192 (s390_supply_ptrace_register): Likewise.
16193 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
16194 basic addressing mode bit.
16195
16196 2011-11-24 Stan Shebs <stan@codesourcery.com>
16197
16198 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
16199
16200 2011-11-17 Stan Shebs <stan@codesourcery.com>
16201
16202 * tracepoint.c (struct tracepoint): New field traceframe_usage.
16203 (tracing_start_time): New global.
16204 (tracing_stop_time): New global.
16205 (tracing_user_name): New global.
16206 (tracing_notes): New global.
16207 (tracing_stop_note): New global.
16208 (cmd_qtstart): Set traceframe_usage, start_time.
16209 (stop_tracing): Set stop_time.
16210 (cmd_qtstatus): Report additional status.
16211 (cmd_qtp): New function.
16212 (handle_tracepoint_query): Call it.
16213 (cmd_qtnotes): New function.
16214 (handle_tracepoint_general_set): Call it.
16215 (get_timestamp): Rename from tsv_get_timestamp.
16216
16217 2011-11-14 Stan Shebs <stan@codesourcery.com>
16218 Kwok Cheung Yeung <kcy@codesourcery.com>
16219
16220 * linux-x86-low.c (small_jump_insn): New.
16221 (i386_install_fast_tracepoint_jump_pad): Add arguments for
16222 trampoline and error message, build a trampoline and issue a small
16223 jump instruction to it.
16224 (x86_install_fast_tracepoint_jump_pad): Add arguments for
16225 trampoline and error message.
16226 (x86_get_min_fast_tracepoint_insn_len): New.
16227 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
16228 * linux-low.h (struct linux_target_ops): Add arguments to
16229 install_fast_tracepoint_jump_pad operation, add new operation.
16230 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
16231 arguments.
16232 (linux_get_min_fast_tracepoint_insn_len): New function.
16233 (linux_target_op): Add new operation.
16234 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
16235 (gdb_trampoline_buffer_end): Ditto.
16236 (gdb_trampoline_buffer_error): Ditto.
16237 (struct ipa_sym_addresses): Add fields for new IPA variables.
16238 (symbol_list): Add entries for new IPA variables.
16239 (struct tracepoint): Add fields to hold the address range of the
16240 trampoline used by the tracepoint.
16241 (trampoline_buffer_head): New static variable.
16242 (trampoline_buffer_tail): Ditto.
16243 (claim_trampoline_space): New function.
16244 (have_fast_tracepoint_trampoline_buffer): New function.
16245 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
16246 structure.
16247 (install_fast_tracepoint): Ditto, also add error buffer argument.
16248 (cmd_qtminftpilen): New function.
16249 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
16250 (fast_tracepoint_from_trampoline_address): New function.
16251 (fast_tracepoint_collecting): Handle trampoline as part of jump
16252 pad space.
16253 (set_trampoline_buffer_space): New function.
16254 (initialize_tracepoint): Initialize new IPA variables.
16255 * target.h (struct target_ops): Add arguments to
16256 install_fast_tracepoint_jump_pad operation, add new
16257 get_min_fast_tracepoint_insn_len operation.
16258 (target_get_min_fast_tracepoint_insn_len): New.
16259 (install_fast_tracepoint_jump_pad): Add arguments.
16260 * server.h (IPA_BUFSIZ): Define.
16261 * linux-i386-ipa.c: Include extra header files.
16262 (initialize_fast_tracepoint_trampoline_buffer): New function.
16263 (initialize_low_tracepoint): Call it.
16264 * server.h (set_trampoline_buffer_space): Declare.
16265 (claim_trampoline_space): Ditto.
16266 (have_fast_tracepoint_trampoline_buffer): Ditto.
16267
16268 2011-11-14 Yao Qi <yao@codesourcery.com>
16269
16270 * server.c (handle_query): Handle InstallInTrace for qSupported.
16271 * tracepoint.c (add_tracepoint): Sort list.
16272 (install_tracepoint, download_tracepoint): New.
16273 (cmd_qtdp): Call them to install and download tracepoints.
16274 (sort_tracepoints): Removed.
16275 (cmd_qtstart): Update.
16276
16277 2011-11-14 Yao Qi <yao@codesourcery.com>
16278
16279 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
16280 * mem-break.h: Declare.
16281 * tracepoint.c (cmd_qtstart): Move some code to ...
16282 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
16283 New.
16284 (download_tracepoints): Move some code to ...
16285 (download_tracepoint_1): ... here. New.
16286
16287 2011-11-08 Yao Qi <yao@codesourcery.com>
16288
16289 * remote-utils.c (relocate_instruction): A comment fix.
16290
16291 2011-11-07 Joel Brobecker <brobecker@adacore.com>
16292
16293 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
16294 (i386_dr_low_get_control, i386_dr_low_get_status): Use
16295 dr_status_mirror and dr_control_mirror from debug_reg_state.
16296 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
16297 (i386_initial_stuff): Remove use of deleted globals.
16298 (i386_get_thread_context, i386_set_thread_context,
16299 i386_thread_added): Use dr_status_mirror and dr_control_mirror
16300 from debug_reg_state.
16301
16302 2011-11-05 Yao Qi <yao@codesourcery.com>
16303
16304 * tracepoint.c (gdb_collect): Loop over tracepoints of same
16305 address as TPOINT's.
16306
16307 2011-11-02 Stan Shebs <stan@codesourcery.com>
16308
16309 * tracepoint.c (agent_mem_read_string): New function.
16310 (eval_agent_expr): Call it for tracenz.
16311 * server.c (handle_query): Report support for tracenz.
16312
16313 2011-11-02 Yao Qi <yao@codesourcery.com>
16314
16315 * tracepoint.c (cmd_qtstart): Remove unused local variables.
16316
16317 2011-11-02 Yao Qi <yao@codesourcery.com>
16318
16319 * target.h: Fix a typo in comment.
16320
16321 2011-10-31 Pedro Alves <pedro@codesourcery.com>
16322
16323 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
16324 clobber the breakpoints' shadows with fast tracepoint jumps.
16325 * mem-break.h (check_mem_write): Add `myaddr' parameter.
16326 * target.c (write_inferior_memory): Also pass MYADDR down to
16327 check_mem_write.
16328
16329 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
16330
16331 * configure.ac: Check support for personality routine.
16332 * configure: Regenerate.
16333 * config.in: Likewise.
16334 * linux-low.c: Include <sys/personality.h>.
16335 Define ADDR_NO_RANDOMIZE if necessary.
16336 (linux_create_inferior): Disable address space randomization when
16337 forking inferior, if requested.
16338 (linux_supports_disable_randomization): New function.
16339 (linux_target_ops): Install it.
16340 * server.h (disable_randomization): Declare.
16341 * server.c (disable_randomization): New global variable.
16342 (handle_general_set): Handle QDisableRandomization.
16343 (handle_query): Likewise for qSupported.
16344 (main): Support --disable-randomization and --no-disable-randomization
16345 command line arguments.
16346 * target.h (struct target_ops): Add supports_disable_randomization.
16347 (target_supports_disable_randomization): New macro.
16348
16349 2011-09-29 Mike Frysinger <vapier@gentoo.org>
16350
16351 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
16352 ifdef check.
16353 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
16354 [!PT_GETDSBT] (target_loadmap): New definition.
16355 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
16356 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
16357 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
16358 and PT_GETDSBT to LINUX_LOADMAP.
16359 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
16360 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
16361
16362 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
16363
16364 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
16365 (arm_linux_hwbp_cap): New static variable.
16366 (arm_linux_get_hwbp_cap): Replace by ...
16367 (arm_linux_init_hwbp_cap): ... this new function.
16368 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
16369 (arm_linux_get_hw_watchpoint_count): Likewise.
16370 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16371 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
16372 (arm_prepare_to_resume): Use perror_with_name instead of error.
16373
16374 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
16375
16376 * linux-arm-low.c: Include <signal.h>.
16377 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
16378 (struct arm_linux_hwbp_cap): New data type.
16379 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
16380 (struct arm_linux_hw_breakpoint): New data type.
16381 (MAX_BPTS, MAX_WPTS): Define.
16382 (struct arch_process_info, struct arch_lwp_info): New data types.
16383 (arm_linux_get_hwbp_cap): New function.
16384 (arm_linux_get_hw_breakpoint_count): Likewise.
16385 (arm_linux_get_hw_watchpoint_count): Likewise.
16386 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16387 (arm_hwbp_control_initialize): Likewise.
16388 (arm_hwbp_control_is_enabled): Likewise.
16389 (arm_hwbp_control_is_initialized): Likewise.
16390 (arm_hwbp_control_disable): Likewise.
16391 (arm_linux_hw_breakpoint_equal): Likewise.
16392 (arm_linux_hw_point_initialize): Likewise.
16393 (struct update_registers_data): New data structure.
16394 (update_registers_callback: New function.
16395 (arm_insert_point): Likewise.
16396 (arm_remove_point): Likewise.
16397 (arm_stopped_by_watchpoint): Likewise.
16398 (arm_stopped_data_address): Likewise.
16399 (arm_new_process): Likewise.
16400 (arm_new_thread): Likewise.
16401 (arm_prepare_to_resume): Likewise.
16402 (the_low_target): Register arm_insert_point, arm_remove_point,
16403 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
16404 arm_new_thread, and arm_prepare_to_resume.
16405
16406 2011-09-15 Stan Shebs <stan@codesourcery.com>
16407
16408 * server.h (struct emit_ops): Add compare-goto fields.
16409 * tracepoint.c (gdb_agent_op_sizes): New table.
16410 (emit_eq_goto): New function.
16411 (emit_ne_goto): New function.
16412 (emit_lt_goto): New function.
16413 (emit_le_goto): New function.
16414 (emit_gt_goto): New function.
16415 (emit_ge_goto): New function.
16416 (is_goto_target): New function.
16417 (compile_bytecodes): Recognize special cases of compare-goto
16418 combinations and call specialized emitters for them.
16419 * linux-x86-low.c (amd64_emit_eq_goto): New function.
16420 (amd64_emit_ne_goto): New function.
16421 (amd64_emit_lt_goto): New function.
16422 (amd64_emit_le_goto): New function.
16423 (amd64_emit_gt_goto): New function.
16424 (amd64_emit_ge_goto): New function.
16425 (amd64_emit_ops): Add the new functions.
16426 (i386_emit_eq_goto): New function.
16427 (i386_emit_ne_goto): New function.
16428 (i386_emit_lt_goto): New function.
16429 (i386_emit_le_goto): New function.
16430 (i386_emit_gt_goto): New function.
16431 (i386_emit_ge_goto): New function.
16432 (i386_emit_ops): Add the new functions.
16433
16434 2011-09-08 Stan Shebs <stan@codesourcery.com>
16435
16436 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
16437 (i386_emit_epilogue): Restore %ebx.
16438
16439 2011-08-31 Jie Zhang <jzhang918@gmail.com>
16440
16441 * server.c (step_thread): Remove definition.
16442 (process_serial_event): Don't handle Hs.
16443 * server.h (step_thread): Remove declaration.
16444 * target.c (set_desired_inferior): Remove use of step_thread.
16445
16446 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16447
16448 * linux-low.c: Include linux-procfs.h.
16449 (linux_attach_lwp_1): Update comments.
16450 (linux_attach): Scan for existing threads when attaching to a
16451 process that is the tgid.
16452 * Makefile.in: Update dependencies.
16453
16454 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16455
16456 * configure.srv: Add linux-procfs.o dependencies.
16457
16458 2011-08-14 Yao Qi <yao@codesourcery.com>
16459
16460 * target.h (struct target_ops): Fix indent.
16461 * win32-low.c (win32_target_ops): Fix comment.
16462
16463 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
16464 Yao Qi <yao@codesourcery.com>
16465
16466 * Makefile.in (clean): Remove tic6x-*.c files.
16467 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
16468 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
16469 (tic6x-c64xp-linux.c): Likewise.
16470 * configure.srv: Add support for tic6x-*-uclinux.
16471 * linux-tic6x-low.c: New.
16472 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
16473
16474 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
16475 Yao Qi <yao@codesourcery.com>
16476
16477 * target.h (struct target_ops): Add read_loadmap.
16478 * linux-low.c (struct target_loadseg): New type.
16479 (struct target_loadmap): New type.
16480 (linux_read_loadmap): New function.
16481 (linux_target_ops): Add linux_read_loadmap.
16482 * server.c (handle_query): Support qXfer:fdpic:read packet.
16483 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
16484 to NULL.
16485
16486 2011-08-05 Eli Zaretskii <eliz@gnu.org>
16487
16488 * win32-low.c: Include <stdint.h>.
16489
16490 2011-07-22 Pedro Alves <pedro@codesourcery.com>
16491
16492 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
16493 to the inferior here.
16494 (i386_remove_aligned_watchpoint): Ditto.
16495 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
16496 fit part of the watchpoint in the debug registers.
16497 (i386_update_inferior_debug_regs): New.
16498 (i386_low_insert_watchpoint): Work on a local mirror of the debug
16499 registers, and only update the inferior on success.
16500 (i386_low_remove_watchpoint): Ditto.
16501
16502 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
16503
16504 * linux-low.c (compare_ints, unique, list_threads, show_process,
16505 linux_core_of_thread): Delete.
16506 (linux_target_ops): Change linux_core_of_thread to
16507 linux_common_core_of_thread.
16508 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
16509 * utils.c (malloc_failure): Change type of argument.
16510 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
16511 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
16512 common/linux-osdata.c, common/ptid.c and common/buffer.c.
16513 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
16514 (IPA_OBJS): Add common-utils-ipa.o.
16515 (ptid_h, linux_osdata_h): New macros.
16516 (server_h): Add common/common-utils.h, common/xml-utils.h,
16517 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
16518 common/ptid.h.
16519 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
16520 ptid.o, buffer.o): New rules.
16521 (linux-low.o): Add common/linux-osdata.h as a dependency.
16522 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
16523 * configure.ac: Add AC_HEADER_DIRENT check.
16524 * config.in: Regenerate.
16525 * configure: Regenerate.
16526 * remote-utils.c (xml_escape_text): Delete.
16527 (buffer_grow, buffer_free, buffer_init, buffer_finish,
16528 buffer_xml_printf): Move to common/buffer.c.
16529 * server.c (main): Remove call to initialize_inferiors.
16530 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
16531 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
16532 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
16533 internal_error, gdb_assert, gdb_assert_fail): Delete.
16534 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
16535 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
16536 common/buffer.h.
16537 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
16538 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
16539 initialize_inferiors): Delete.
16540
16541 2011-07-20 Pedro Alves <pedro@codesourcery.com>
16542
16543 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
16544 symbol error.
16545
16546 2011-05-31 Pedro Alves <pedro@codesourcery.com>
16547
16548 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
16549 assertion.
16550 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
16551
16552 2011-05-26 Yao Qi <yao@codesourcery.com>
16553
16554 * Makefile.in (thread-db.o): Track dependence to
16555 common/gdb_thread_db.h.
16556 * thread-db.c: include gdb_thread_db.h from right place.
16557
16558 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
16559
16560 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
16561 __FILE__ and __LINE__ to internal_error.
16562
16563 2011-05-13 Doug Evans <dje@google.com>
16564
16565 * thread-db.c (try_thread_db_load_from_sdir): New function.
16566 (try_thread_db_load_from_dir): New function.
16567 (thread_db_load_search): Handle $sdir, ignore $pdir.
16568 Remove trying of system directories if search of
16569 libthread-db-search-path fails, that is now done via $sdir.
16570
16571 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
16572
16573 * server.c (handle_query): Add EnableDisableTracepoints to the list
16574 of supported features.
16575 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
16576 tracepoints.
16577 (cmd_qtenable_disable): New.
16578 (cmd_qtstart): Install tracepoints even if disabled.
16579 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
16580 receiving a QTEnable or QTDisable packet.
16581 (gdb_collect): Skip data collection if fast tracepoint is disabled.
16582 (ust_marker_to_static_tracepoint): Do not ignore disabled static
16583 tracepoints.
16584 (gdb_probe): Skip data collection if static tracepoint is disabled.
16585
16586 2011-05-10 Doug Evans <dje@google.com>
16587
16588 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
16589
16590 2011-05-04 Doug Evans <dje@google.com>
16591
16592 * linux-low.c (linux_join): Skip process lookup.
16593 * spu-low.c (spu_join): Ditto.
16594 * server.c (join_inferiors_callback): Delete.
16595 (process_serial_event): For 'D' packet (detach) call join_inferior
16596 directly.
16597
16598 2011-05-04 Joseph Myers <joseph@codesourcery.com>
16599
16600 * README: Don't mention xscale*-*-linux*.
16601 * configure.srv (xscale*-*-linux*): Don't handle target.
16602
16603 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
16604
16605 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
16606 casting pointers.
16607 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
16608 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
16609 (i386_emit_void_call_2): Likewise.
16610
16611 2011-04-26 Yao Qi <yao@codesourcery.com>
16612
16613 * linux-low.c: Move common macros to linux-ptrace.h.
16614 Include linux-ptrace.h.
16615 * Makefile.in (linux_ptrace_h): New.
16616 (linux-low.o): Depends on linux-ptrace.h.
16617
16618 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
16619
16620 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
16621 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
16622 (remote_prepare): New function with most of the TCP code from ...
16623 (remote_open): ... here. Detect PORT here unconditionally. Move also
16624 setting transport_is_reliable.
16625 * server.c (run_once): New variable.
16626 (gdbserver_usage): Document it.
16627 (main): Set run_once for `--once'. Call remote_prepare. Exit after
16628 the first run if RUN_ONCE.
16629 * server.h (run_once, remote_prepare): New declarations.
16630
16631 2011-04-19 Tom Tromey <tromey@redhat.com>
16632
16633 * win32-low.c (handle_load_dll): Remove duplicate "the".
16634
16635 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
16636
16637 Remove support for old Cygwin 1.5 versions.
16638 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
16639 function to avoid warning.
16640 (win32_add_one_solib): Use cygwin_conv_path function to avoid
16641 warning.
16642
16643 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
16644
16645 * gdbserver/server.h (Macro _): Define it if not available.
16646
16647 2011-03-14 Michael Snyder <msnyder@vmware.com>
16648
16649 * hostio.c (handle_close): Remove unnecessary null test.
16650
16651 2011-03-10 Joel Brobecker <brobecker@adacore.com>
16652
16653 * Makefile.in (maintainer-clean realclean distclean): Remove
16654 "make ... subdir_do" command.
16655
16656 2011-03-10 Michael Snyder <msnyder@vmware.com>
16657
16658 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
16659
16660 * server.c (handle_v_run): Free alloced buffer on early return.
16661
16662 2011-03-09 Yao Qi <yao@codesourcery.com>
16663
16664 Revert:
16665 2011-03-04 Yao Qi <yao@codesourcery.com>
16666
16667 * Makefile.in: Remove GNU make feature --directory.
16668
16669 2011-03-05 Yao Qi <yao@codesourcery.com>
16670
16671 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16672 (subdir_do): New make target. Copied from gdb/Makefile.
16673 (maintainer-clean, realclean, distclean, clean): Call corresponding
16674 make targets in common/Makefile.
16675
16676 2011-02-11 Yao Qi <yao@codesourcery.com>
16677
16678 * configure.ac: Call AC_PROG_RANLIB.
16679 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16680 * configure: Regenerate.
16681
16682 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
16683
16684 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
16685
16686 2011-03-06 Yao Qi <yao@codesourcery.com>
16687
16688 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
16689
16690 2011-03-05 Yao Qi <yao@codesourcery.com>
16691
16692 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16693 (subdir_do): New make target. Copied from gdb/Makefile.
16694 (maintainer-clean, realclean, distclean, clean): Call corresponding
16695 make targets in common/Makefile.
16696
16697 2011-03-04 Yao Qi <yao@codesourcery.com>
16698
16699 * Makefile.in: Remove GNU make feature --directory.
16700
16701 2011-03-04 Michael Snyder <msnyder@vmware.com>
16702
16703 * server.c (queue_stop_reply): Call xmalloc not malloc.
16704
16705 2011-03-02 Michael Snyder <msnyder@vmware.com>
16706
16707 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
16708
16709 2011-02-28 Michael Snyder <msnyder@vmware.com>
16710
16711 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
16712 (cmd_qtframe): Ditto.
16713 (cmd_qtbuffer): Ditto.
16714 (cmd_bigqtbuffer): Ditto.
16715
16716 * utils.c (decimal2str): Initialize 'width' to nine, then
16717 don't mess with it.
16718
16719 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16720
16721 * hostio.c (require_data): Free *data, not data.
16722
16723 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16724
16725 * hostio.c (require_data): Use free, not xfree.
16726
16727 2011-02-27 Michael Snyder <msnyder@vmware.com>
16728
16729 * server.c (handle_query): Discard unused value.
16730
16731 * hostio.c (require_data): Free malloc memory before returning
16732 error.
16733
16734 2011-02-26 Michael Snyder <msnyder@vmware.com>
16735
16736 * linux-low.c (list_threads): Call closedir for dirent.
16737
16738 2011-02-27 Michael Snyder <msnyder@vmware.com>
16739
16740 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
16741 a case statement falls through.
16742
16743 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
16744
16745 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
16746 in comparison.
16747
16748 2011-02-26 Michael Snyder <msnyder@vmware.com>
16749
16750 * utils.c (decimal2str): Eliminate dead code and dead param.
16751 (pulongest): Drop dead param from call to decimal2str.
16752 (plongest): Ditto.
16753
16754 2011-02-24 Joel Brobecker <brobecker@adacore.com>
16755
16756 Revert the following patch (not approved yet):
16757 2011-02-21 Hui Zhu <teawater@gmail.com>
16758 * tracepoint.c (tp_printf): New function.
16759 (eval_agent_expr): Handle gdb_agent_op_printf.
16760
16761 2011-02-21 Hui Zhu <teawater@gmail.com>
16762
16763 * tracepoint.c (tp_printf): New function.
16764 (eval_agent_expr): Handle gdb_agent_op_printf.
16765
16766 2011-02-18 Tom Tromey <tromey@redhat.com>
16767
16768 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
16769 (tracepoint.o): Likewise.
16770 * tracepoint.c (enum gdb_agent_op): Use ax.def.
16771 (gdb_agent_op_names): Likewise.
16772
16773 2011-02-18 Tom Tromey <tromey@redhat.com>
16774
16775 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
16776 gdb_agent_op_rot>: New constants.
16777 (gdb_agent_op_names): Add pick and roll.
16778 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
16779 cases.
16780
16781 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
16782
16783 * aclocal.m4: Regenerated with aclocal-1.11.1.
16784
16785 2011-02-14 Pedro Alves <pedro@codesourcery.com>
16786
16787 * server.c (handle_qxfer_traceframe_info): New.
16788 (qxfer_packets): Register "traceframe-info".
16789 (handle_query): Report support for qXfer:traceframe-info:read+.
16790 * tracepoint.c (match_blocktype): New.
16791 (traceframe_find_block_type): Rename to ...
16792 (traceframe_walk_blocks): ... this. Add callback filter argument,
16793 and use it.
16794 (traceframe_find_block_type): New, reimplemented on top of
16795 traceframe_walk_blocks.
16796 (build_traceframe_info_xml): New.
16797 (traceframe_read_info): New.
16798 * server.h (traceframe_read_info): Declare.
16799
16800 2011-02-11 Yao Qi <yao@codesourcery.com>
16801
16802 * configure.ac: Call AC_PROG_RANLIB.
16803 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16804 * configure: Regenerate.
16805
16806 2011-02-07 Pedro Alves <pedro@codesourcery.com>
16807
16808 * server.c (gdb_read_memory): Change return semantics to allow
16809 partial transfers.
16810 (handle_search_memory_1): Adjust.
16811 (process_serial_event) <'m' packet>: Handle partial transfers.
16812 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
16813
16814 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16815
16816 * regcache.c (init_register_cache): Initialize
16817 regcache->register_status.
16818 (free_register_cache): Release regcache->register_status.
16819 (regcache_cpy): Copy register_status.
16820 (registers_to_string): Print 'x's for unavailable registers.
16821 (supply_register): Mark the register's status valid or
16822 unavailable, depending on whether a buffer was passed in or not.
16823 (supply_register_zeroed): New.
16824 (supply_regblock): Mark the registers' status valid or
16825 unavailable, depending on whether a buffer was passed in or not.
16826 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
16827 (struct regcache): New `register_status' field.
16828 (supply_register_zeroed): Declare.
16829 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
16830 supply_register_zeroed, rather than passing a NULL buffer to
16831 supply_register.
16832 * tracepoint.c (fetch_traceframe_registers): Update comment.
16833
16834 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16835
16836 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
16837 buffer explicit.
16838
16839 2011-01-25 Pedro Alves <pedro@codesourcery.com>
16840
16841 * server.h (decode_xfer_write): Change prototype.
16842 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
16843 and don't extract the annex here.
16844 * server.c (decode_xfer_read): Remove `annex' parameter,
16845 and don't extract the annex here.
16846 (decode_xfer): New.
16847 (struct qxfer): New.
16848 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
16849 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
16850 (handle_qxfer_statictrace): New functions, abstracted out from
16851 handle_query, and made to use the struct qxfer interface.
16852 (handle_threads_qxfer_proper): Rename to ...
16853 (handle_qxfer_threads_proper): ... this.
16854 (handle_threads_qxfer): Rename to ...
16855 (handle_qxfer_threads): ... this. Adjust.
16856 (qxfer_packets): New array.
16857 (handle_qxfer): New function.
16858 (handle_query): Use handle_qxfer.
16859
16860 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
16861
16862 * gdbreplay.c: Shorten lines of >= 80 columns.
16863 * linux-low.c: Ditto.
16864 * linux-ppc-low.c: Ditto.
16865 * linux-s390-low.c: Ditto.
16866 * linux-sparc-low.c: Ditto.
16867 * linux-x86-low.c: Ditto.
16868 * linux-xtensa-low.c: Ditto.
16869 * mem-break.c: Ditto.
16870 * nto-low.c: Ditto.
16871 * regcache.h: Ditto.
16872 * remote-utils.c: Ditto.
16873 * server.c: Ditto.
16874 * server.h: Ditto.
16875 * thread-db.c: Ditto.
16876 * tracepoint.c: Ditto.
16877 * utils.c: Ditto.
16878 * win32-low.h: Ditto.
16879
16880 2011-01-05 Joel Brobecker <brobecker@adacore.com>
16881
16882 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
16883 update.
16884
16885 2011-01-01 Joel Brobecker <brobecker@adacore.com>
16886
16887 * server.c (gdbserver_version): Update copyright year in version
16888 output.
16889 * gdbreplay.c (gdbreplay_version): Ditto.
16890
16891 2010-12-29 Jie Zhang <jie.zhang@analog.com>
16892
16893 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
16894 * linux-bfin-low.c: New file.
16895 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
16896 PT_DATA_ADDR for BFIN targets.
16897 * Makefile.in (SFILES): Add linux-bfin-low.c.
16898 (clean): Remove reg-bfin.c.
16899 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
16900 * README: Mention supported Blackfin targets.
16901
16902 2010-12-23 Mike Frysinger <vapier@gentoo.org>
16903
16904 * .gitignore: New file.
16905
16906 2010-11-16 Mike Frysinger <vapier@gentoo.org>
16907
16908 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
16909
16910 2010-10-22 Jie Zhang <jie@codesourcery.com>
16911
16912 * Makefile.in: Add FLAGS_TO_PASS variable.
16913 (install): Remove dependency of install-only and recursively
16914 invoke make for install-only.
16915
16916 2010-10-04 Doug Evans <dje@google.com>
16917
16918 * Makefile.in (uninstall): Use $(DESTDIR).
16919
16920 2010-09-24 Pedro Alves <pedro@codesourcery.com>
16921
16922 PR gdb/11842
16923
16924 * linux-x86-low.c (compat_siginfo_from_siginfo)
16925 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
16926 si_code is < 0. Check for si_code == SI_TIMER before checking for
16927 si_code < 0.
16928
16929 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16930
16931 * lynx-i386-low.c: New file.
16932 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
16933
16934 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16935
16936 * lynx-low.c (ptrace_request_to_str): Remove handling for
16937 request values that have been removed in LynxOS 5.x.
16938
16939 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16940
16941 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
16942 <ptrace.h>
16943
16944 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
16945
16946 * configure.ac: Add --enable-inprocess-agent option.
16947 * configure: Rebuilt.
16948
16949 2010-09-06 Yao Qi <yao@codesourcery.com>
16950
16951 * linux-low.c (linux_kill): Remove unused variable.
16952 (linux_stabilize_threads): Likewise.
16953 * server.c (start_inferior): Likewise.
16954 (queue_stop_reply_callback): Likewise.
16955 * tracepoint.c (do_action_at_tracepoint): Likewise.
16956
16957 2010-09-06 Yao Qi <yao@codesourcery.com>
16958
16959 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
16960 on return.
16961
16962 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
16963
16964 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
16965
16966 2010-09-06 Pedro Alves <pedro@codesourcery.com>
16967
16968 * Makefile.in (install-only): Replace $IPA_DEPFILES with
16969 "$(IPA_DEPFILES)".
16970
16971 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16972
16973 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
16974 gdbserver/lynx-ppc-low.c: New files.
16975 * Makefile.in (lynx_low_h): New variable.
16976 (lynx-low.o, lynx-ppc-low.o): New rules.
16977 * configure.ac: On LynxOS, link with -lnetinet.
16978 * configure.srv: Add handling of powerpc-*-lynxos* targets.
16979 * configure: regenerate.
16980
16981 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16982
16983 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
16984 * configure.ac: Add check for vasprintf and vsnprintf.
16985 * configure, config.in: Regenerate.
16986 * server.h (vasprintf, vsnprintf): Add conditional declarations.
16987
16988 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16989
16990 * gdbreplay.c: Move include of alloca.h up, next to include of
16991 malloc.h.
16992 * server.h: Add include of malloc.h.
16993 * mem-break.c: Remove include of malloc.h.
16994 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
16995
16996 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16997
16998 * Makefile.in (memmem.o): Build with -Wno-error.
16999
17000 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17001
17002 * utils.c (xsnprintf): Make non-static.
17003 * server.h: Add xsnprintf declaration.
17004 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
17005 replace calls to snprintf by calls to xsnprintf throughout.
17006
17007 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17008
17009 * configure.ac: Add configure check for alloca.
17010 * configure, config.in: Regenerate.
17011 * server.h: Include alloca.h if it exists.
17012 * gdbreplay.c: Include alloca.h if it exists.
17013
17014 2010-08-28 Pedro Alves <pedro@codesourcery.com>
17015
17016 * linux-low.c (__SIGRTMIN): Define if not already defined.
17017 (linux_create_inferior): Check for __ANDROID__ rather than
17018 __SIGRTMIN.
17019 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
17020 are already deferred.
17021 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
17022 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
17023 stopped and already has a pending signal to report.
17024 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
17025 a pending signal to report or is moving out of a jump pad.
17026 (linux_init_signals): Check for __ANDROID__ rather than
17027 __SIGRTMIN.
17028
17029 2010-08-28 Pedro Alves <pedro@codesourcery.com>
17030
17031 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
17032 debug_threads check. Avoid a linear search when not doing debug
17033 output.
17034
17035 2010-08-27 Pedro Alves <pedro@codesourcery.com>
17036
17037 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
17038 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
17039 (struct file_handler) <fd>: Change type to gdb_fildes_t.
17040 (process_event): Change local fd's type to gdb_fildes_t.
17041 (create_file_handler): Adjust prototype.
17042 (delete_file_handler): Adjust prototype.
17043 (handle_file_event): Adjust prototype. Use pfildes.
17044 (create_file_event): Adjsut prototype.
17045 * remote-utils.c (remote_desc, listen_desc): Change type to
17046 gdb_fildes_t.
17047 * server.h: New gdb_fildes_t typedef.
17048 [USE_WIN32API]: Include winsock2.h.
17049 (delete_file_handler, add_file_handler): Adjust prototypes.
17050 (pfildes): Declare.
17051 * utils.c (pfildes): New.
17052
17053 2010-08-27 Pedro Alves <pedro@codesourcery.com>
17054
17055 * configure.ac (build_warnings): Add -Wno-char-subscripts.
17056 * configure: Regenerate.
17057
17058 2010-08-27 Pedro Alves <pedro@codesourcery.com>
17059
17060 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
17061 (linux_done_accessing_memory): ... this.
17062 (linux_target_ops): Adjust.
17063 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
17064 * nto-low.c (nto_target_ops): Adjust comment.
17065 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
17066 * spu-low.c (spu_target_ops): Adjust comment.
17067 * target.h (target_ops): Rename unprepare_to_access_memory field
17068 to done_accessing_memory.
17069 (unprepare_to_access_memory): Rename to ...
17070 (done_accessing_memory): ... this.
17071
17072 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17073
17074 * linux-low.c (linux_prepare_to_access_memory): New.
17075 (linux_unprepare_to_access_memory): New.
17076 (linux_target_ops): Install them.
17077 * server.c (read_memory): Rename to ...
17078 (gdb_read_memory): ... this. Use
17079 prepare_to_access_memory/prepare_to_access_memory.
17080 (write_memory): Rename to ...
17081 (gdb_write_memory): ... this. Use
17082 prepare_to_access_memory/prepare_to_access_memory.
17083 (handle_search_memory_1): Adjust.
17084 (process_serial_event): Adjust.
17085 * target.h (struct target_ops): New fields
17086 prepare_to_access_memory and unprepare_to_access_memory.
17087 (prepare_to_access_memory, unprepare_to_access_memory): New.
17088 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
17089 prepare_to_access_memory/prepare_to_access_memory.
17090 * nto-low.c (nto_target_ops): Adjust.
17091 * spu-low.c (spu_target_ops): Adjust.
17092 * win32-low.c (win32_target_ops): Adjust.
17093
17094 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17095
17096 * Makefile.in (WARN_CFLAGS): Get it from configure.
17097 (WERROR_CFLAGS): New.
17098 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
17099 * configure.ac: Introduce --enable-werror, which adds -Werror to
17100 the compiler command line. Enabled by default. Disable with
17101 --disable-werror. Add -Wdeclaration-after-statement
17102 Wpointer-arith and -Wformat-nonliteral to warning flags.
17103 * configure: Regenerate.
17104
17105 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17106
17107 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
17108
17109 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17110
17111 * gdbreplay.c (remote_error): New.
17112 (gdbchar): New.
17113 (expect): Use gdbchar. Check for error reading from GDB.
17114 Clarify sync error output.
17115 (play): Check for errors writing to GDB.
17116 * linux-low.c (sigchld_handler): Really ignore `write' errors.
17117 * remote-utils.c (getpkt): Check for errors writing to the remote
17118 descriptor.
17119
17120 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17121
17122 * linux-low.c (linux_wait_1): Move non-debugging code out of
17123 `debug_threads' control.
17124
17125 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17126
17127 * linux-low.c (linux_wait_1): Don't set last_status here.
17128 * server.c (push_event, queue_stop_reply_callback): Assert we're
17129 not pushing a TARGET_WAITKIND_IGNORE event.
17130 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
17131 (myresume, handle_target_event): Set the thread's last_resume_kind
17132 and last_status from the target returned status.
17133
17134 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17135
17136 PR threads/10729
17137
17138 * linux-x86-low.c (update_debug_registers_callback): New.
17139 (i386_dr_low_set_addr): Use it.
17140 (i386_dr_low_get_addr): New.
17141 (i386_dr_low_set_control): Use update_debug_registers_callback.
17142 (i386_dr_low_get_control): New.
17143 (i386_dr_low_get_status): Adjust.
17144 * linux-low.c (linux_stop_lwp): New.
17145 * linux-low.h (linux_stop_lwp): Declare.
17146
17147 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
17148 argument instead of a i386_debug_reg_state.
17149 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
17150 a i386_debug_reg_state.
17151 (i386_insert_aligned_watchpoint): Adjust.
17152 (i386_remove_aligned_watchpoint): Adjust.
17153 (i386_low_stopped_data_address): Read the debug registers from the
17154 inferior instead of from the mirrors.
17155 * i386-low.h (struct i386_debug_reg_state): Extend comment.
17156 (i386_dr_low_get_addr): Declare.
17157 (i386_dr_low_get_control): Declare.
17158 (i386_dr_low_get_status): Change prototype.
17159
17160 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
17161 (i386_dr_low_get_addr): New.
17162 (i386_dr_low_get_control): New.
17163 (i386_dr_low_get_status): Adjust prototype. Return
17164 dr_status_mirror.
17165 (i386_initial_stuff): Clear dr_status_mirror and
17166 dr_control_mirror.
17167 (i386_get_thread_context): Adjust.
17168 (i386_set_thread_context): Adjust.
17169 (i386_thread_added): Adjust.
17170
17171 2010-08-24 Pedro Alves <pedro@codesourcery.com>
17172
17173 * linux-low.h (linux_thread_area): Delete declaration.
17174
17175 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
17176
17177 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
17178 after its termination.
17179
17180 2010-08-09 Pedro Alves <pedro@codesourcery.com>
17181
17182 * linux-low.c (gdb_wants_lwp_stopped): Delete.
17183 (gdb_wants_all_stopped): Delete.
17184 (linux_wait_1): Don't call them.
17185 * server.c (handle_v_cont): Tag all threads as want-stopped.
17186 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
17187 stopped as "client-wants-stopped".
17188
17189 2010-07-31 Pedro Alves <pedro@codesourcery.com>
17190
17191 * Makefile.in (signals_h): New.
17192 (server_h): Depend on it.
17193 (server.o): Don't depend on $(signals_def).
17194 (signals.o): Depend on $(signals_def).
17195
17196 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
17197
17198 * Makefile.in (signals_def): New.
17199 (server_h): Append include/gdb/signals.h and signals_def.
17200 (server.o): Append signals_def.
17201
17202 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
17203
17204 * server.c (handle_target_event): Use target_signal_to_host for
17205 resume_info.sig initialization.
17206 * target.h (struct thread_resume) <sig>: New comment.
17207
17208 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
17209
17210 * server.c (handle_query): strcpy() the returned string from paddress()
17211 instead of sprintf().
17212 * utils.c (paddress): Return phex_nz().
17213
17214 2010-07-07 Joel Brobecker <brobecker@adacore.com>
17215
17216 * server.c (handle_v_cont): Call mourn_inferior if process
17217 just exited.
17218 (myresume): Likewise.
17219
17220 2010-07-01 Pedro Alves <pedro@codesourcery.com>
17221
17222 Static tracepoints, and integration with UST.
17223
17224 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
17225 * mem-break.c (uninsert_all_breakpoints)
17226 (reinsert_all_breakpoints): New.
17227 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
17228 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
17229 (gdb_agent_ust_loaded, helper_thread_id)
17230 (gdb_agent_helper_thread_id): New macros.
17231 (struct ipa_sym_addresses): Add addr_ust_loaded,
17232 addr_helper_thread_id, addr_cmd_buf.
17233 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
17234 (in_process_agent_loaded_ust): New.
17235 (write_e_ust_not_loaded): New.
17236 (maybe_write_ipa_ust_not_loaded): New.
17237 (struct collect_static_trace_data_action): New.
17238 (enum tracepoint_type) <static_tracepoint>: New.
17239 (struct tracepoint) <handle>: Mention static tracepoints.
17240 (struct static_tracepoint_ctx): New.
17241 (CMD_BUF_SIZE): New.
17242 (add_tracepoint_action): Handle static tracepoint actions.
17243 (unprobe_marker_at): New.
17244 (clear_installed_tracepoints): Handle static tracepoints.
17245 (cmd_qtdp): Handle static tracepoints.
17246 (probe_marker_at): New.
17247 (cmd_qtstart): Handle static tracepoints.
17248 (response_tracepoint): Handle static tracepoints.
17249 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
17250 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
17251 (get_context_regcache): Handle static tracepoints.
17252 (do_action_at_tracepoint): Handle static tracepoint actions.
17253 (traceframe_find_block_type): Handle static trace data blocks.
17254 (traceframe_read_sdata): New.
17255 (download_tracepoints): Download static tracepoint actions.
17256 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
17257 (GDB_PROBE_NAME): New.
17258 (ust_ops): New.
17259 (GET_UST_SYM): New.
17260 (USTF): New.
17261 (dlsym_ust): New.
17262 (ust_marker_to_static_tracepoint): New.
17263 (gdb_probe): New.
17264 (collect_ust_data_at_tracepoint): New.
17265 (gdb_ust_probe): New.
17266 (UNIX_PATH_MAX, SOCK_DIR): New.
17267 (gdb_ust_connect_sync_socket): New.
17268 (resume_thread, stop_thread): New.
17269 (run_inferior_command): New.
17270 (init_named_socket): New.
17271 (gdb_ust_socket_init): New.
17272 (cstr_to_hexstr): New.
17273 (next_st): New.
17274 (first_marker, next_marker): New.
17275 (response_ust_marker): New.
17276 (cmd_qtfstm, cmd_qtsstm): New.
17277 (unprobe_marker_at, probe_marker_at): New.
17278 (cmd_qtstmat, gdb_ust_thread): New.
17279 (gdb_ust_init): New.
17280 (initialize_tracepoint_ftlib): Call gdb_ust_init.
17281 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
17282 (ST_REGENTRY): New.
17283 (x86_64_st_collect_regmap): New.
17284 (X86_64_NUM_ST_COLLECT_GREGS): New.
17285 (AMD64_RIP_REGNUM): New.
17286 (supply_static_tracepoint_registers): New.
17287 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
17288 (ST_REGENTRY): New.
17289 (i386_st_collect_regmap): New.
17290 (i386_NUM_ST_COLLECT_GREGS): New.
17291 (supply_static_tracepoint_registers): New.
17292 * server.c (handle_query): Handle qXfer:statictrace:read.
17293 <qSupported>: Report support for StaticTracepoints, and
17294 qXfer:statictrace:read features.
17295 * server.h (traceframe_read_sdata)
17296 (supply_static_tracepoint_registers): Declare.
17297 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
17298 (unpack_varlen_hex): Include in IPA build.
17299 * Makefile.in (ustlibs, ustinc): New.
17300 (IPA_OBJS): Add remote-utils-ipa.o.
17301 ($(IPA_LIB)): Link -ldl and -lpthread.
17302 (UST_CFLAGS): New.
17303 (IPAGENT_CFLAGS): Add UST_CFLAGS.
17304 * config.in, configure: Regenerate.
17305
17306 2010-06-20 Ian Lance Taylor <iant@google.com>
17307 Pedro Alves <pedro@codesourcery.com>
17308
17309 * linux-x86-low.c (always_true): Delete.
17310 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
17311 trying to fool the compiler with always_true.
17312
17313 2010-06-20 Pedro Alves <pedro@codesourcery.com>
17314
17315 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
17316 conditions in gdbserver.
17317
17318 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
17319
17320 * spu-low.c (spu_read_memory): Wrap around local store limit.
17321 (spu_write_memory): Likewise.
17322
17323 2010-06-15 Pedro Alves <pedro@codesourcery.com>
17324
17325 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
17326 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
17327 LONGEST uses.
17328 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
17329 uses.
17330 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
17331 uses with LONGEST uses.
17332
17333 2010-06-14 Stan Shebs <stan@codesourcery.com>
17334 Pedro Alves <pedro@codesourcery.com>
17335
17336 Bytecode compiler.
17337
17338 * linux-x86-low.c: Include limits.h.
17339 (add_insns): New.
17340 (always_true): New.
17341 (EMIT_ASM): New.
17342 (EMIT_ASM32): New.
17343 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
17344 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
17345 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
17346 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
17347 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
17348 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
17349 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
17350 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
17351 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
17352 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
17353 (amd64_emit_void_call_2): New.
17354 (amd64_emit_ops): New.
17355 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
17356 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
17357 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
17358 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
17359 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
17360 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
17361 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
17362 (i386_emit_call, i386_emit_reg, i386_emit_pop)
17363 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
17364 (i386_emit_stack_adjust, i386_emit_int_call_1)
17365 (i386_emit_void_call_2): New.
17366 (i386_emit_ops): New.
17367 (x86_emit_ops): New.
17368 (the_low_target): Install x86_emit_ops.
17369 * server.h (struct emit_ops): New.
17370 (get_raw_reg_func_addr): Declare.
17371 (current_insn_ptr, emit_error): Declare.
17372 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
17373 (set_trace_state_variable_value): New defines.
17374 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
17375 addr_get_trace_state_variable_value and
17376 addr_set_trace_state_variable_value.
17377 (symbol_list): New fields for get_raw_reg,
17378 get_trace_state_variable_value and set_trace_state_variable_value.
17379 (condfn): New typedef.
17380 (struct tracepoint): New field `compiled_cond'.
17381 (do_action_at_tracepoint): Clear compiled_cond.
17382 (get_trace_state_variable_value, set_trace_state_variable_value):
17383 Export in the IPA.
17384 (condition_true_at_tracepoint): If there's a compiled condition,
17385 run that.
17386 (current_insn_ptr, emit_error): New globals.
17387 (struct bytecode_address): New.
17388 (get_raw_reg_func_addr): New.
17389 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
17390 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
17391 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
17392 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
17393 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
17394 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
17395 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
17396 (compile_tracepoint_condition, compile_bytecodes): New.
17397 * target.h (emit_ops): Forward declare.
17398 (struct target_ops): New field emit_ops.
17399 (target_emit_ops): New.
17400 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
17401 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
17402 * linux-low.c (linux_emit_ops): New.
17403 (linux_target_ops): Install it.
17404 * linux-low.h (struct linux_target_ops): New field emit_ops.
17405
17406 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
17407
17408 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
17409 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
17410
17411 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17412 Stan Shebs <stan@codesourcery.com>
17413
17414 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
17415 (all): Depend on $(extra_libraries).
17416 (install-only): Install the IPA.
17417 (IPA_OBJS, IPA_LIB): New.
17418 (clean): Remove the IPA lib.
17419 (IPAGENT_CFLAGS): New.
17420 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
17421 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
17422 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
17423 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
17424 * configure.ac: Check for atomic builtins support in the compiler.
17425 (IPA_DEPFILES, extra_libraries): Define.
17426 * configure.srv (ipa_obj): Add description.
17427 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
17428 (i[34567]86-*-linux*): Set ipa_obj.
17429 (x86_64-*-linux*): Set ipa_obj.
17430 * linux-low.c (stabilizing_threads): New.
17431 (supports_fast_tracepoints): New.
17432 (linux_detach): Stabilize threads before detaching.
17433 (handle_tracepoints): Handle internal tracing breakpoints. Assert
17434 the lwp is either not stabilizing, or is moving out of a jump pad.
17435 (linux_fast_tracepoint_collecting): New.
17436 (maybe_move_out_of_jump_pad): New.
17437 (enqueue_one_deferred_signal): New.
17438 (dequeue_one_deferred_signal): New.
17439 (linux_wait_for_event_1): If moving out of a jump pad, defer
17440 pending signals to later.
17441 (linux_stabilize_threads): New.
17442 (linux_wait_1): Check if threads need moving out of jump pads, and
17443 do it if so.
17444 (stuck_in_jump_pad_callback): New.
17445 (move_out_of_jump_pad_callback): New.
17446 (lwp_running): New.
17447 (linux_resume_one_lwp): Handle moving out of jump pads.
17448 (linux_set_resume_request): Dequeue deferred signals.
17449 (need_step_over_p): Also step over fast tracepoint jumps.
17450 (start_step_over): Also uninsert fast tracepoint jumps.
17451 (finish_step_over): Also reinsert fast tracepoint jumps.
17452 (linux_install_fast_tracepoint_jump): New.
17453 (linux_target_ops): Install linux_stabilize_threads and
17454 linux_install_fast_tracepoint_jump_pad.
17455 * linux-low.h (linux_target_ops) <get_thread_area,
17456 install_fast_tracepoint_jump_pad>: New fields.
17457 (struct lwp_info) <collecting_fast_tracepoint,
17458 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
17459 (linux_get_thread_area): Declare.
17460 * linux-x86-low.c (jump_insn): New.
17461 (x86_get_thread_area): New.
17462 (append_insns): New.
17463 (push_opcode): New.
17464 (amd64_install_fast_tracepoint_jump_pad): New.
17465 (i386_install_fast_tracepoint_jump_pad): New.
17466 (x86_install_fast_tracepoint_jump_pad): New.
17467 (the_low_target): Install x86_get_thread_area and
17468 x86_install_fast_tracepoint_jump_pad.
17469 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
17470 (struct fast_tracepoint_jump): New.
17471 (fast_tracepoint_jump_insn): New.
17472 (fast_tracepoint_jump_shadow): New.
17473 (find_fast_tracepoint_jump_at): New.
17474 (fast_tracepoint_jump_here): New.
17475 (delete_fast_tracepoint_jump): New.
17476 (set_fast_tracepoint_jump): New.
17477 (uninsert_fast_tracepoint_jumps_at): New.
17478 (reinsert_fast_tracepoint_jumps_at): New.
17479 (set_breakpoint_at): Use write_inferior_memory.
17480 (uninsert_raw_breakpoint): Use write_inferior_memory.
17481 (check_mem_read): Mask out fast tracepoint jumps.
17482 (check_mem_write): Mask out fast tracepoint jumps.
17483 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
17484 (set_fast_tracepoint_jump): Declare.
17485 (delete_fast_tracepoint_jump)
17486 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
17487 (reinsert_fast_tracepoint_jumps_at): Declare.
17488 * regcache.c: Don't compile many functions when building the
17489 in-process agent library.
17490 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
17491 the register buffer in the heap.
17492 (free_register_cache): If the register buffer isn't owned by the
17493 regcache, don't free it.
17494 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
17495 pre-existing register caches.
17496 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
17497 type.
17498 (convert_ascii_to_int): : Constify `from' parameter type.
17499 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
17500 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
17501 the needed buffer in-place.
17502 (relocate_instruction): New.
17503 * server.c (handle_query) <qSymbols>: If the target supports
17504 tracepoints, give it a chance of looking up symbols. Report
17505 support for fast tracepoints.
17506 (handle_status): Stabilize threads.
17507 (process_serial_event): Adjust.
17508 * server.h (struct fast_tracepoint_jump): Forward declare.
17509 (struct process_info) <fast_tracepoint_jumps>: New field.
17510 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
17511 (decode_X_packet, decode_M_packet): Adjust.
17512 (relocate_instruction): Declare.
17513 (in_process_agent_loaded): Declare.
17514 (tracepoint_look_up_symbols): Declare.
17515 (struct fast_tpoint_collect_status): Declare.
17516 (fast_tracepoint_collecting): Declare.
17517 (force_unlock_trace_buffer): Declare.
17518 (handle_tracepoint_bkpts): Declare.
17519 (initialize_low_tracepoint)
17520 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
17521 * target.h (struct target_ops) <stabilize_threads,
17522 install_fast_tracepoint_jump_pad>: New fields.
17523 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
17524 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
17525 [HAVE_STDINT_H]: Include stdint.h.
17526 (trace_debug_1): Rename to ...
17527 (trace_vdebug): ... this.
17528 (trace_debug): Rename to ...
17529 (trace_debug_1): ... this. Add `level' parameter.
17530 (trace_debug): New.
17531 (ATTR_USED, ATTR_NOINLINE): New.
17532 (IP_AGENT_EXPORT): New.
17533 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
17534 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
17535 (about_to_request_buffer_space, trace_buffer_is_full)
17536 (stopping_tracepoint, expr_eval_result, error_tracepoint)
17537 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
17538 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
17539 (traceframe_write_count, traceframes_created)
17540 (trace_state_variables)
17541 New renaming defines.
17542 (struct ipa_sym_addresses): New.
17543 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
17544 (symbol_list): New.
17545 (ipa_sym_addrs): New.
17546 (all_tracepoint_symbols_looked_up): New.
17547 (in_process_agent_loaded): New.
17548 (write_e_ipa_not_loaded): New.
17549 (maybe_write_ipa_not_loaded): New.
17550 (tracepoint_look_up_symbols): New.
17551 (debug_threads) [IN_PROCESS_AGENT]: New.
17552 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
17553 (UNKNOWN_SIDE_EFFECTS): New.
17554 (stop_tracing): New.
17555 (flush_trace_buffer): New.
17556 (stop_tracing_bkpt): New.
17557 (flush_trace_buffer_bkpt): New.
17558 (read_inferior_integer): New.
17559 (read_inferior_uinteger): New.
17560 (read_inferior_data_pointer): New.
17561 (write_inferior_data_pointer): New.
17562 (write_inferior_integer): New.
17563 (write_inferior_uinteger): New.
17564 (struct collect_static_trace_data_action): Delete.
17565 (enum tracepoint_type): New.
17566 (struct tracepoint) <type>: New field `type'.
17567 <actions_str, step_actions, step_actions_str>: Only include in
17568 GDBserver.
17569 <orig_size, obj_addr_on_target, adjusted_insn_addr>
17570 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
17571 (tracepoints): Use IP_AGENT_EXPORT.
17572 (last_tracepoint): Don't include in the IPA.
17573 (stopping_tracepoint): Use IP_AGENT_EXPORT.
17574 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
17575 (alloced_trace_state_variables): New.
17576 (trace_state_variables): Use IP_AGENT_EXPORT.
17577 (traceframe_t): Delete unused variable.
17578 (circular_trace_buffer): Don't include in the IPA.
17579 (trace_buffer_start): Delete.
17580 (struct trace_buffer_control): New.
17581 (trace_buffer_free): Delete.
17582 (struct ipa_trace_buffer_control): New.
17583 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
17584 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
17585 New.
17586 (trace_buffer_ctrl): New.
17587 (TRACE_BUFFER_CTRL_CURR): New.
17588 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
17589 Reimplement as macros.
17590 (trace_buffer_wrap): Delete.
17591 (traceframe_write_count, traceframe_read_count)
17592 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
17593 (struct tracepoint_hit_ctx) <type>: New field.
17594 (struct fast_tracepoint_ctx): New.
17595 (memory_barrier): New.
17596 (cmpxchg): New.
17597 (record_tracepoint_error): Update atomically in the IPA.
17598 (clear_inferior_trace_buffer): New.
17599 (about_to_request_buffer_space): New.
17600 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
17601 updating the same buffer.
17602 (add_tracepoint): Default the tracepoint's type to trap
17603 tracepoint, and orig_size to -1.
17604 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
17605 internal variables.
17606 (create_trace_state_variable): New parameter `gdb'. Handle it.
17607 (clear_installed_tracepoints): Clear fast tracepoint jumps.
17608 (cmd_qtdp): Handle fast tracepoints.
17609 (cmd_qtdv): Adjust.
17610 (max_jump_pad_size): New.
17611 (gdb_jump_pad_head): New.
17612 (get_jump_space_head): New.
17613 (claim_jump_space): New.
17614 (sort_tracepoints): New.
17615 (MAX_JUMP_SIZE): New.
17616 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
17617 IPA.
17618 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
17619 support. Upload fast traceframes, and delete internal IPA
17620 breakpoints.
17621 (stop_tracing_handler): New.
17622 (flush_trace_buffer_handler): New.
17623 (cmd_qtstop): Upload fast tracepoints.
17624 (response_tracepoint): Handle fast tracepoints.
17625 (tracepoint_finished_step): Upload fast traceframes. Set the
17626 tracepoint hit context's tracepoint type.
17627 (handle_tracepoint_bkpts): New.
17628 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
17629 type. Add comment about fast tracepoints.
17630 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
17631 non-existing action_str field.
17632 (get_context_regcache): Handle fast tracepoints.
17633 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
17634 to the regcache.
17635 (fast_tracepoint_from_jump_pad_address): New.
17636 (fast_tracepoint_from_ipa_tpoint_address): New.
17637 (collecting_t): New.
17638 (force_unlock_trace_buffer): New.
17639 (fast_tracepoint_collecting): New.
17640 (collecting): New.
17641 (gdb_collect): New.
17642 (write_inferior_data_ptr): New.
17643 (target_tp_heap): New.
17644 (target_malloc): New.
17645 (download_agent_expr): New.
17646 (UALIGN): New.
17647 (download_tracepoints): New.
17648 (download_trace_state_variables): New.
17649 (upload_fast_traceframes): New.
17650 (IPA_FIRST_TRACEFRAME): New.
17651 (IPA_NEXT_TRACEFRAME_1): New.
17652 (IPA_NEXT_TRACEFRAME): New.
17653 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
17654 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
17655 (gdb_jump_pad_buffer_end): New.
17656 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
17657 (initialize_tracepoint): Adjust.
17658 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
17659 buffer. Initialize the low module.
17660 * utils.c (PREFIX, TOOLNAME): New.
17661 (malloc_failure): Use PREFIX.
17662 (error): In the IPA, an error causes an exit.
17663 (fatal, warning): Use PREFIX.
17664 (internal_error): Use TOOLNAME.
17665 (NUMCELLS): Increase to 10.
17666 * configure, config.in: Regenerate.
17667
17668 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17669
17670 * server.c (handle_query) <qSupported>: Do two passes over the
17671 qSupported string to avoid nesting strtok.
17672
17673 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17674
17675 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
17676 (CDEPS): New.
17677 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
17678 -Wl,--dynamic-list.
17679 * configure: Regenerate.
17680 * proc-service.list: New.
17681
17682 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17683
17684 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
17685 New comment.
17686
17687 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
17688
17689 * gdbreplay.c (remote_open): Check error return from socket() call by
17690 its equality to -1 not by it being negative.
17691 * remote-utils.c (remote_open): Likewise.
17692
17693 2010-05-23 Pedro Alves <pedro@codesourcery.com>
17694
17695 * config.h: Regenerate.
17696
17697 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17698
17699 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
17700 doesn't provide PTRACE_GET_THREAD_AREA.
17701
17702 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17703
17704 * linux-m68k-low.c: Include <asm/ptrace.h>
17705 (ps_get_thread_area): Implement.
17706
17707 2010-05-03 Doug Evans <dje@google.com>
17708
17709 * event-loop.c (struct callback_event): New struct.
17710 (callback_list): New global.
17711 (append_callback_event, delete_callback_event): New functions.
17712 (process_callback): New function.
17713 (start_event_loop): Call it.
17714 * remote-utils.c (NOT_SCHEDULED): Define.
17715 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
17716 moved out of readchar.
17717 (readchar): Rewrite. Call reschedule before returning.
17718 (reset_readchar): New function.
17719 (remote_close): Call it.
17720 (process_remaining, reschedule): New functions.
17721 * server.h (callback_handler_func): New typedef.
17722 (append_callback_event, delete_callback_event): Declare.
17723
17724 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17725
17726 * proc-service.c (ps_pglobal_lookup): Use
17727 thread_db_look_up_one_symbol.
17728 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
17729 parameter. Use it instead of all_symbols_looked_up.
17730 * server.h (struct process_info) <all_symbols_looked_up>: Delete
17731 field.
17732 (all_symbols_looked_up): Don't declare.
17733 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
17734 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
17735 field.
17736 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
17737 Set all_symbols_looked_up here.
17738 (thread_db_look_up_one_symbol): New.
17739 (thread_db_get_tls_address): Adjust.
17740 (thread_db_load_search, try_thread_db_load_1): Always allocate the
17741 thread_db object on the heap, and tentatively set it in the
17742 process structure.
17743 (thread_db_init): Don't set all_symbols_looked_up here.
17744 * linux-low.h (thread_db_look_up_one_symbol): Declare.
17745
17746 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17747
17748 * linux-low.c (linux_kill, linux_detach): Adjust.
17749 (status_pending_p_callback): Remove redundant statement. Check
17750 for !TARGET_WAITIKIND_IGNORE, instead of
17751 TARGET_WAITKIND_STOPPED.
17752 (handle_tracepoints): Make sure LWP is locked. Adjust.
17753 (linux_wait_for_event_1): Adjust.
17754 (linux_cancel_breakpoints): New.
17755 (unsuspend_one_lwp): New.
17756 (unsuspend_all_lwps): New.
17757 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
17758 (send_sigstop_callback): Change return type to int, add new
17759 `except' parameter and handle it.
17760 (suspend_and_send_sigstop_callback): New.
17761 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
17762 pass them down. If SUSPEND, also increment the lwp's suspend
17763 count.
17764 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
17765 (need_step_over_p): Don't consider suspended LWPs.
17766 (start_step_over): Adjust.
17767 (proceed_one_lwp): Change return type to int, add new `except'
17768 parameter and handle it.
17769 (unsuspend_and_proceed_one_lwp): New.
17770 (proceed_all_lwps): Use find_inferior instead of
17771 for_each_inferior.
17772 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
17773 also decrement the suspend count of LWPs. Pass `except' down,
17774 instead of hacking its suspend count.
17775 (linux_pause_all): Add `freeze' parameter. Adjust.
17776 (linux_unpause_all): New.
17777 (linux_target_ops): Install linux_unpause_all.
17778 * server.c (handle_status): Adjust.
17779 * target.h (struct target_ops): New fields `unpause_all' and
17780 `cancel_breakpoints'. Add new parameter to `pause_all'.
17781 (pause_all): Add new `freeze' parameter.
17782 (unpause_all): New.
17783 (cancel_breakpoints): New.
17784 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
17785 cancel breakpoints.
17786 (cmd_qtstart): Pause threads.
17787 (stop_tracing): Pause threads, and cancel breakpoints.
17788 * win32-low.c (win32_target_ops): Adjust.
17789
17790 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17791
17792 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
17793 the inferior right away from here...
17794 (linux_wait_1): ... to here, and adjust to check the thread's
17795 last_resume_kind instead of the lwp's step or stop_expected flags.
17796
17797 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17798
17799 * README: Use consistent `GDB' and `GDBserver' spellings.
17800
17801 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17802
17803 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
17804 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
17805 (linux_detach_one_lwp): Assume the lwp is stopped.
17806 (any_thread_of): Delete.
17807 (linux_detach): Stop all lwps here. Don't blindly delete all
17808 breakpoints.
17809 (delete_lwp_callback): New.
17810 (linux_mourn): Delete all lwps of the process that is gone.
17811 (linux_wait_1): Don't delete the last lwp of the process here.
17812 * mem-break.h (mark_breakpoints_out): Declare.
17813 * mem-break.c (mark_breakpoints_out): New.
17814 (free_all_breakpoints): Use it.
17815 * server.c (handle_target_event): If the process is gone, mark
17816 breakpoints out.
17817 * thread-db.c (struct thread_db) <create_bp>: New field.
17818 (thread_db_enable_reporting): Fix prototype. Store a thread event
17819 breakpoint reference in the thread_db struct.
17820 (thread_db_load_search): Clear the thread_db object.
17821 (try_thread_db_load_1): Ditto.
17822 (switch_to_process): New.
17823 (disable_thread_event_reporting): Use it.
17824 (remove_thread_event_breakpoints): New.
17825 (thread_db_detach, thread_db_mourn): Use it.
17826
17827 2010-05-01 Pedro Alves <pedro@codesourcery.com>
17828
17829 * linux-low.c (linux_enable_event_reporting): New.
17830 (linux_wait_for_event_1, handle_extended_wait): Use it.
17831
17832 2010-04-30 Pedro Alves <pedro@codesourcery.com>
17833
17834 * linux-low.c (linux_kill_one_lwp, linux_kill)
17835 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
17836 (send_sigstop): Take an lwp_info as parameter instead. Queue a
17837 SIGSTOP even if the LWP is stopped.
17838 (send_sigstop_callback): New.
17839 (stop_all_lwps): Use send_sigstop_callback instead.
17840 (linux_resume_one_thread): Adjust.
17841 (proceed_one_lwp): Still proceed an LWP that the client has
17842 requested to stop, if we haven't reported it as stopped yet. Make
17843 sure that LWPs the client want stopped, have a pending SIGSTOP.
17844
17845 2010-04-26 Doug Evans <dje@google.com>
17846
17847 * server.c (handle_general_set): Make static.
17848
17849 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
17850 Print received char after testing for error/eof instead of before.
17851 (input_interrupt): Tweak comment.
17852
17853 2010-04-23 Doug Evans <dje@google.com>
17854
17855 * server.c (start_inferior): Print inferior argv if --debug.
17856
17857 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
17858
17859 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
17860 * nto-x86-low.c: Include server.h
17861
17862 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
17863
17864 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
17865 be consistent with other sources of this directory.
17866 (init_registers_amd64): Correct name of source file of this function
17867 in the comment.
17868
17869 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17870
17871 * configure.srv (x86_64-*-mingw*): New configuration for Windows
17872 64-bit executables.
17873
17874 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17875
17876 * win32-i386-low.c: Add 64-bit support.
17877 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
17878 (init_registers_amd64): Declare.
17879 (mappings): Add 64-bit version of array.
17880 (init_windows_x86): New function.
17881 (the_low_target): Change init_arch field to init_windows_x86.
17882
17883 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17884
17885 * win32-low.c: Adapt to support also 64-bit architecture.
17886 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
17887 (get_image_name): Use SIZE_T type for local variable `done'.
17888 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
17889 (toolhelp_get_dll_name): Idem.
17890 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
17891 Use uintptr_t typecast to avoid warning.
17892 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
17893 (handle_exception): Use phex_nz to avoid warning.
17894 (win32_wait): Remove unused local variable `process'.
17895
17896 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17897
17898 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
17899 `amd64-avx.o'.
17900
17901 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
17902
17903 * configure.ac: Use `ws2_32' library for srv_mingw.
17904 * configure: Regenerate.
17905 * gdbreplay.c: Include winsock2.h instead of winsock.h.
17906 * remote-utils.c: Likewise.
17907
17908 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
17909
17910 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
17911 if __x86_64__ is defined.
17912
17913 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17914
17915 * configure: Regenerate.
17916
17917 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17918
17919 * server.c (handle_query): Handle 'qGetTIBAddr' query.
17920 * target.h (target_ops): New get_tib_address field.
17921 * win32-low.h (win32_thread_info): Add thread_local_base field.
17922 * win32-low.c (child_add_thread): Add tlb argument.
17923 Set thread_local_base field to TLB.
17924 (get_child_debug_event): Adapt to child_add_thread change.
17925 (win32_get_tib_address): New function.
17926 (win32_target_ops): Set get_tib_address field to
17927 win32_get_tib_address.
17928 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
17929
17930 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17931
17932 * linux-low.c (linux_mourn): Also remove the process.
17933 * server.c (handle_target_event): Don't remove the process here.
17934 * nto-low.c (nto_mourn): New.
17935 (nto_target_ops): Install it.
17936 * spu-low.c (spu_mourn): New.
17937 (spu_target_ops): Install it.
17938 * win32-low.c (win32_mourn): New.
17939 (win32_target_ops): Install it.
17940
17941 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17942
17943 * server.h (buffer_xml_printf): Remove redundant `;'.
17944
17945 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17946
17947 * regcache.c (set_register_cache): Invalidate regcaches before
17948 changing the register cache layout.
17949 (regcache_invalidate_one): Allow a NULL regcache.
17950 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
17951 regcaches before changing the register cache layout or the target
17952 regsets.
17953
17954 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
17955
17956 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
17957 variable warning on Linux/x86-64.
17958
17959 2010-04-11 Pedro Alves <pedro@codesourcery.com>
17960
17961 GDBserver disconnected tracing support.
17962
17963 * linux-low.c (linux_remove_process): Delete.
17964 (add_lwp): Don't set last_resume_kind here.
17965 (linux_kill): Use `mourn'.
17966 (linux_detach): Use `thread_db_detach', and `mourn'.
17967 (linux_mourn): New.
17968 (linux_attach_lwp_1): Adjust comment.
17969 (linux_attach): last_resume_kind moved the thread_info; adjust.
17970 (status_pending_p_callback): Adjust.
17971 (linux_wait_for_event_1): Adjust.
17972 (count_events_callback, select_singlestep_lwp_callback)
17973 (select_event_lwp_callback, cancel_breakpoints_callback)
17974 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
17975 (proceed_one_lwp): Adjust.
17976 (linux_async): Add debug output.
17977 (linux_thread_stopped): New.
17978 (linux_pause_all): New.
17979 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
17980 linux_pause_all.
17981 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
17982 (thread_db_free): Delete declaration.
17983 (thread_db_detach, thread_db_mourn): Declare.
17984 * thread-db.c (thread_db_init): Use thread_db_mourn.
17985 (thread_db_free): Delete, split in two.
17986 (disable_thread_event_reporting): New.
17987 (thread_db_detach): New.
17988 (thread_db_mourn): New.
17989
17990 * server.h (struct thread_info) <last_resume_kind>: New field.
17991 <attached>: Add comment.
17992 <gdb_detached>: New field.
17993 (handler_func): Change return type to int.
17994 (handle_serial_event, handle_target_event): Ditto.
17995 (gdb_connected): Declare.
17996 (tracing): Delete.
17997 (disconnected_tracing): Declare.
17998 (stop_tracing): Declare.
17999
18000 * server.c (handle_query) <qSupported>: Report support for
18001 disconnected tracing.
18002 (queue_stop_reply_callback): Account for running threads.
18003 (gdb_wants_thread_stopped): New.
18004 (gdb_wants_all_threads_stopped): New.
18005 (gdb_reattached_process): New.
18006 (handle_status): Clear the `gdb_detached' flag of all processes.
18007 In all-stop, stop all threads.
18008 (main): Be sure to leave tfind mode. Handle disconnected tracing.
18009 (process_serial_event): If the remote connection breaks, or if an
18010 exit was forced with "monitor exit", force an event loop exit.
18011 Handle disconnected tracing on detach.
18012 (handle_serial_event): Adjust.
18013 (handle_target_event): If GDB isn't connected, forward events back
18014 to the inferior, unless the last process exited, in which case,
18015 exit gdbserver. Adjust interface.
18016
18017 * remote-utils.c (remote_open): Don't block in accept. Instead
18018 register an event loop source on the listen socket file
18019 descriptor. Refactor bits into ...
18020 (listen_desc): ... this new global.
18021 (gdb_connected): ... this new function.
18022 (enable_async_notification): ... this new function.
18023 (handle_accept_event): ... this new function.
18024 (remote_close): Clear remote_desc.
18025
18026 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
18027
18028 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
18029 New fields.
18030 (mourn_inferior): Define.
18031 (target_process_qsupported): Avoid the dangling else problem.
18032 (thread_stopped): Define.
18033 (pause_all): Define.
18034 (target_waitstatus_to_string): Declare.
18035 * target.c (target_waitstatus_to_string): New.
18036
18037 * tracepoint.c (tracing): Make extern.
18038 (disconnected_tracing): New.
18039 (stop_tracing): Make extern. Handle tracing stops due to GDB
18040 disconnecting.
18041 (cmd_qtdisconnected): New.
18042 (cmd_qtstatus): Report disconnected tracing status in trace reply.
18043 (handle_tracepoint_general_set): Handle QTDisconnected.
18044
18045 * event-loop.c (event_handler_func): Change return type to int.
18046 (process_event): Bail out if the event handler wants the event
18047 loop to stop.
18048 (handle_file_event): Ditto.
18049 (start_event_loop): Bail out if the event handler wants the event
18050 loop to stop.
18051
18052 * nto-low.c (nto_target_ops): Adjust.
18053 * spu-low.c (spu_wait): Don't remove the process here.
18054 (spu_target_ops): Adjust.
18055 * win32-low.c (win32_wait): Don't remove the process here.
18056 (win32_target_ops): Adjust.
18057
18058 2010-04-11 Pedro Alves <pedro@codesourcery.com>
18059
18060 * regcache.c (realloc_register_cache): Invalidate inferior's
18061 regcache before recreating it.
18062
18063 2010-04-09 Pedro Alves <pedro@codesourcery.com>
18064
18065 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
18066
18067 2010-04-09 Stan Shebs <stan@codesourcery.com>
18068 Pedro Alves <pedro@codesourcery.com>
18069
18070 * server.h (LONGEST): New.
18071 (struct thread_info) <while_stepping>: New field.
18072 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
18073 Declare.
18074 (initialize_tracepoint, handle_tracepoint_general_set)
18075 (handle_tracepoint_query, tracepoint_finished_step)
18076 (tracepoint_was_hit, release_while_stepping_state_list):
18077 (current_traceframe): Declare.
18078 * server.c (handle_general_set): Handle tracepoint packets.
18079 (read_memory): New.
18080 (write_memory): New.
18081 (handle_search_memory_1): Use read_memory.
18082 (handle_query): Report support for conditional tracepoints, trace
18083 state variables, and tracepoint sources. Handle tracepoint
18084 queries.
18085 (main): Initialize the tracepoints module.
18086 (process_serial_event): Handle traceframe reads/writes.
18087
18088 * linux-low.c (handle_tracepoints): New.
18089 (linux_wait_1): Call it.
18090 (linux_resume_one_lwp): Handle while-stepping.
18091 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
18092 (linux_target_ops): Install them.
18093 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
18094 New field.
18095 * linux-x86-low.c (x86_supports_tracepoints): New.
18096 (the_low_target). Install it.
18097
18098 * mem-break.h (delete_breakpoint): Declare.
18099 * mem-break.c (delete_breakpoint): Make external.
18100
18101 * target.h (struct target_ops): Add `supports_tracepoints',
18102 `read_pc', and `write_pc' fields.
18103 (target_supports_tracepoints): Define.
18104 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
18105 (phex_nz): New.
18106
18107 * regcache.h (struct regcache) <registers_owned>: New field.
18108 (init_register_cache, regcache_cpy): Declare.
18109 (regcache_read_pc, regcache_write_pc): Declare.
18110 (register_cache_size): Declare.
18111 (supply_regblock): Declare.
18112 * regcache.c (init_register_cache): New.
18113 (new_register_cache): Use it.
18114 (regcache_cpy): New.
18115 (register_cache_size): New.
18116 (supply_regblock): New.
18117 (regcache_read_pc, regcache_write_pc): New.
18118
18119 * tracepoint.c: New.
18120
18121 * Makefile.in (OBS): Add tracepoint.o.
18122 (tracepoint.o): New rule.
18123
18124 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
18125
18126 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
18127 (i386-mmx.o): New.
18128 (i386-mmx.c): Likewise.
18129 (i386-mmx-linux.o): Likewise.
18130 (i386-mmx-linux.c): Likewise.
18131
18132 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
18133 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
18134 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
18135 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
18136
18137 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
18138 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
18139 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
18140
18141 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
18142
18143 * Makefile.in (clean): Updated.
18144 (i386-avx.o): New.
18145 (i386-avx.c): Likewise.
18146 (i386-avx-linux.o): Likewise.
18147 (i386-avx-linux.c): Likewise.
18148 (amd64-avx.o): Likewise.
18149 (amd64-avx.c): Likewise.
18150 (amd64-avx-linux.o): Likewise.
18151 (amd64-avx-linux.c): Likewise.
18152
18153 * configure.srv (srv_i386_regobj): Add i386-avx.o.
18154 (srv_i386_linux_regobj): Add i386-avx-linux.o.
18155 (srv_amd64_regobj): Add amd64-avx.o.
18156 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
18157 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
18158 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
18159 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
18160 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
18161 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
18162 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
18163
18164 * i387-fp.c: Include "i386-xstate.h".
18165 (i387_xsave): New.
18166 (i387_cache_to_xsave): Likewise.
18167 (i387_xsave_to_cache): Likewise.
18168 (x86_xcr0): Likewise.
18169
18170 * i387-fp.h (i387_cache_to_xsave): Likewise.
18171 (i387_xsave_to_cache): Likewise.
18172 (x86_xcr0): Likewise.
18173
18174 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
18175 * linux-crisv32-low.c (target_regsets): Likewise.
18176 * linux-m68k-low.c (target_regsets): Likewise.
18177 * linux-mips-low.c (target_regsets): Likewise.
18178 * linux-ppc-low.c (target_regsets): Likewise.
18179 * linux-s390-low.c (target_regsets): Likewise.
18180 * linux-sh-low.c (target_regsets): Likewise.
18181 * linux-sparc-low.c (target_regsets): Likewise.
18182 * linux-xtensa-low.c (target_regsets): Likewise.
18183
18184 * linux-low.c: Include <sys/uio.h>.
18185 (regsets_fetch_inferior_registers): Support nt_type.
18186 (regsets_store_inferior_registers): Likewise.
18187 (linux_process_qsupported): New.
18188 (linux_target_ops): Add linux_process_qsupported.
18189
18190 * linux-low.h (regset_info): Add nt_type.
18191 (linux_target_ops): Add process_qsupported.
18192
18193 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
18194 and <sys/uio.h>.
18195 (init_registers_i386_avx_linux): New.
18196 (init_registers_amd64_avx_linux): Likewise.
18197 (xmltarget_i386_linux_no_xml): Likewise.
18198 (xmltarget_amd64_linux_no_xml): Likewise.
18199 (PTRACE_GETREGSET): Likewise.
18200 (PTRACE_SETREGSET): Likewise.
18201 (x86_fill_xstateregset): Likewise.
18202 (x86_store_xstateregset): Likewise.
18203 (use_xml): Likewise.
18204 (x86_linux_update_xmltarget): Likewise.
18205 (x86_linux_process_qsupported): Likewise.
18206 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
18207 (x86_arch_setup): Don't call init_registers_amd64_linux nor
18208 init_registers_i386_linux here. Call
18209 x86_linux_update_xmltarget.
18210 (the_low_target): Add x86_linux_process_qsupported.
18211
18212 * server.c (handle_query): Call target_process_qsupported.
18213
18214 * target.h (target_ops): Add process_qsupported.
18215 (target_process_qsupported): New.
18216
18217 2010-04-03 Pedro Alves <pedro@codesourcery.com>
18218
18219 * inferiors.c (add_thread): Set last_status kind to
18220 TARGET_WAITKIND_IGNORE.
18221 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
18222 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
18223 (linux_wait_1): Move `thread' local definition to block that uses
18224 it. Don't NULL initialize `event_child'.
18225 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
18226 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
18227 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
18228
18229 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18230
18231 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
18232 an extended waitstatus, or by a watchpoint.
18233 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
18234 thread was stepping or has been stopped by a watchpoint.
18235
18236 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18237
18238 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
18239 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
18240 of another, then delete the previous, and validate all
18241 breakpoints.
18242 (validate_inserted_breakpoint): New.
18243 (delete_disabled_breakpoints): New.
18244 (validate_breakpoints): New.
18245 (check_mem_read): Validate breakpoints before trusting their
18246 shadow. Delete disabled breakpoints.
18247 (check_mem_write): Validate breakpoints before trusting they
18248 should be inserted. Delete disabled breakpoints.
18249 * mem-break.h (validate_breakpoints):
18250 * server.c (handle_query): Validate breakpoints when we see a
18251 qSymbol query.
18252
18253 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18254
18255 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
18256 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
18257 if we could tell there's a GDB breakpoint at stop_pc.
18258 (need_step_over_p): Don't do a step over if we find a GDB
18259 breakpoint at the resume PC.
18260
18261 * mem-break.c (struct raw_breakpoint): New.
18262 (enum bkpt_type): New type `gdb_breakpoint'.
18263 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
18264 fields. New field `raw'.
18265 (find_raw_breakpoint_at): New.
18266 (set_raw_breakpoint_at): Handle refcounting. Create a raw
18267 breakpoint instead.
18268 (set_breakpoint_at): Adjust.
18269 (delete_raw_breakpoint): New.
18270 (release_breakpoint): New.
18271 (delete_breakpoint): Rename to...
18272 (delete_breakpoint_1): ... this. Add proc parameter. Use
18273 release_breakpoint. Return ENOENT.
18274 (delete_breakpoint): Reimplement.
18275 (find_breakpoint_at): Delete.
18276 (find_gdb_breakpoint_at): New.
18277 (delete_breakpoint_at): Delete.
18278 (set_gdb_breakpoint_at): New.
18279 (delete_gdb_breakpoint_at): New.
18280 (gdb_breakpoint_here): New.
18281 (set_reinsert_breakpoint): Use release_breakpoint.
18282 (uninsert_breakpoint): Rename to ...
18283 (uninsert_raw_breakpoint): ... this.
18284 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
18285 (reinsert_raw_breakpoint): Change parameter type to
18286 raw_breakpoint.
18287 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
18288 instead.
18289 (check_breakpoints): Adjust. Use release_breakpoint.
18290 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
18291 (breakpoint_inserted_here): Ditto.
18292 (check_mem_read): Adjust to iterate over raw breakpoints instead.
18293 Don't trust the breakpoint's shadow if it is not inserted.
18294 (check_mem_write): Adjust to iterate over raw breakpoints instead.
18295 (delete_all_breakpoints): Adjust.
18296 (free_all_breakpoints): Mark all breakpoints as uninserted, and
18297 use delete_breakpoint_1.
18298
18299 * mem-break.h (breakpoints_supported): Delete declaration.
18300 (set_gdb_breakpoint_at): Declare.
18301 (gdb_breakpoint_here): Declare.
18302 (delete_breakpoint_at): Delete.
18303 (delete_gdb_breakpoint_at): Declare.
18304
18305 * server.h (struct raw_breakpoint): Forward declare.
18306 (struct process_info): New field `raw_breakpoints'.
18307
18308 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
18309 breakpoints.
18310
18311 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18312
18313 * linux-low.c (status_pending_p_callback): Fix comment.
18314 (linux_wait_for_event_1): Move most of the internal breakpoint
18315 handling from here...
18316 (linux_wait_1): ... to here.
18317 (count_events_callback): New.
18318 (select_singlestep_lwp_callback): New.
18319 (select_event_lwp_callback): New.
18320 (cancel_breakpoints_callback): New.
18321 (select_event_lwp): New.
18322 (linux_wait_1): Simplify internal breakpoint handling. Give equal
18323 priority to all LWPs that have had events that should be reported
18324 to the client. Cancel breakpoints when about to reporting the
18325 event to the client, not while stopping lwps. No longer cancel
18326 finished single-steps here.
18327 (cancel_finished_single_step): Delete.
18328 (cancel_finished_single_steps): Delete.
18329
18330 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18331
18332 * mem-break.c (enum bkpt_type): New.
18333 (struct breakpoint): New field `type'.
18334 (set_breakpoint_at): Change return type to struct breakpoint
18335 pointer. Set type to `other_breakpoint' by default.
18336 (delete_breakpoint): Rewrite, supporting more than one breakpoint
18337 in the breakpoint list.
18338 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
18339 (reinsert_breakpoint): Rename to ...
18340 (reinsert_raw_breakpoint): ... this.
18341 (reinsert_breakpoints_at): Adjust.
18342 * mem-break.h (struct breakpoint): Declare.
18343 (set_breakpoint_at): Change return type to struct breakpoint
18344 pointer.
18345
18346 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18347
18348 * server.c (handle_query): Assign, not compare.
18349
18350 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18351
18352 Teach linux gdbserver to step-over-breakpoints.
18353
18354 * linux-low.c (can_hardware_single_step): New.
18355 (supports_breakpoints): New.
18356 (handle_extended_wait): If stopping threads, read the stop pc of
18357 the new cloned LWP.
18358 (get_pc): New.
18359 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
18360 low target doesn't support retrieving the PC.
18361 (add_lwp): Set last_resume_kind to resume_continue.
18362 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
18363 (linux_attach): Don't clear stop_expected. Set the lwp's
18364 last_resume_kind to resume_stop.
18365 (linux_detach_one_lwp): Don't check for removed breakpoints.
18366 (check_removed_breakpoint): Delete.
18367 (status_pending_p): Rename to ...
18368 (status_pending_p_callback): ... this. Don't check for removed
18369 breakpoints. Don't consider threads that are stopped from GDB's
18370 perspective.
18371 (linux_wait_for_lwp): Always read the stop_pc here.
18372 (cancel_breakpoint): New.
18373 (step_over_bkpt): New global.
18374 (linux_wait_for_event_1): Implement stepping over breakpoints.
18375 (gdb_wants_lwp_stopped): New.
18376 (gdb_wants_all_stopped): New.
18377 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
18378 single-step traps here. Store the thread's last reported target
18379 wait status.
18380 (send_sigstop): Don't clear stop_expected. Always set it,
18381 instead.
18382 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
18383 (cancel_finished_single_step): New.
18384 (cancel_finished_single_steps): New.
18385 (wait_for_sigstop): Don't cancel finished single-step traps here.
18386 (linux_resume_one_lwp): Don't check for removed breakpoints.
18387 Don't set `step' on non-hardware step archs.
18388 (linux_set_resume_request): Ignore resume_stop requests if already
18389 stopping or stopped. Set the lwp's last_resume_kind.
18390 (resume_status_pending_p): Don't check for removed breakpoints.
18391 (need_step_over_p): New.
18392 (start_step_over): New.
18393 (finish_step_over): New.
18394 (linux_resume_one_thread): Always queue a sigstop for resume_stop
18395 requests. Clear the thread's last reported target waitstatus.
18396 Don't use the `suspended' flag. Don't consider pending breakpoints.
18397 (linux_resume): Start a step-over if necessary.
18398 (proceed_one_lwp): New.
18399 (proceed_all_lwps): New.
18400 (unstop_all_lwps): New.
18401 * linux-low.h (struct lwp_info): Rewrite comment for the
18402 `suspended' flag. Add the `stop_pc' field. Delete the
18403 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
18404 Add `'last_resume_kind' and `need_step_over' fields.
18405 * inferiors.c (struct thread_info): Delete, moved elsewhere.
18406 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
18407 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
18408 (set_raw_breakpoint_at): New.
18409 (set_breakpoint_at): Rewrite to use it.
18410 (reinsert_breakpoint_handler): Delete.
18411 (set_reinsert_breakpoint): New.
18412 (reinsert_breakpoint_by_bp): Delete.
18413 (delete_reinsert_breakpoints): New.
18414 (uninsert_breakpoint): Rewrite.
18415 (uninsert_breakpoints_at): New.
18416 (reinsert_breakpoint): Rewrite.
18417 (reinsert_breakpoints_at): New.
18418 (check_breakpoints): Rewrite.
18419 (breakpoint_here): New.
18420 (breakpoint_inserted_here): New.
18421 (check_mem_read): Adjust.
18422 * mem-break.h (breakpoints_supported, breakpoint_here)
18423 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
18424 (reinsert_breakpoint_by_bp): Delete declaration.
18425 (delete_reinsert_breakpoints): Declare.
18426 (reinsert_breakpoint): Delete declaration.
18427 (reinsert_breakpoints_at): Declare.
18428 (uninsert_breakpoint): Delete declaration.
18429 (uninsert_breakpoints_at): Declare.
18430 (check_breakpoints): Adjust prototype.
18431 * server.h: Adjust include order.
18432 (struct thread_info): Declare here. Add a `last_status' field.
18433
18434 2010-03-23 Michael Snyder <msnyder@vmware.com>
18435
18436 * server.c (crc32): New function.
18437 (handle_query): Add handling for 'qCRC:' request.
18438
18439 2010-03-23 Pedro Alves <pedro@codesourcery.com>
18440
18441 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
18442 lwp had been stopped by a watchpoint.
18443
18444 2010-03-16 Pedro Alves <pedro@codesourcery.com>
18445
18446 * server.h (internal_error): Declare.
18447 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
18448 * utils.c (internal_error): New function.
18449
18450 2010-03-15 Andreas Schwab <schwab@redhat.com>
18451
18452 * configure.srv: Fix typo setting srv_regobj.
18453
18454 2010-03-15 Pedro Alves <pedro@codesourcery.com>
18455
18456 * linux-low.c (fetch_register): Avoid passing a non string literal
18457 format to `error'.
18458 (usr_store_inferior_registers): Ditto.
18459
18460 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18461
18462 * linux-low.c (linux_write_memory): Bail out early if peeking
18463 memory failed.
18464
18465 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18466
18467 * linux-low.h (struct lwp_info): New fields
18468 `stopped_by_watchpoint' and `stopped_data_address'.
18469 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
18470 here, and cache them in the lwp object.
18471 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
18472 directly.
18473 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
18474 field.
18475 (linux_stopped_by_watchpoint): Rewrite.
18476 (linux_stopped_data_address): Rewrite.
18477
18478 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
18479
18480 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
18481 switching the current inferior, not before.
18482
18483 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
18484
18485 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
18486 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
18487 i386-linux.c and amd64-linux.c.
18488 (reg-i386.o): Removed.
18489 (reg-i386.c): Likewise.
18490 (reg-i386-linux.o): Likewise.
18491 (reg-i386-linux.c): Likewise.
18492 (reg-x86-64.o): Likewise.
18493 (reg-x86-64.c): Likewise.
18494 (reg-x86-64-linux.o): Likewise.
18495 (reg-x86-64-linux.c): Likewise.
18496 (i386.o): New.
18497 (i386.c): Likewise.
18498 (i386-linux.o): Likewise.
18499 (i386-linux.c): Likewise.
18500 (amd64.o): Likewise.
18501 (amd64.c): Likewise.
18502 (amd64-linux.o): Likewise.
18503 (amd64-linux.c): Likewise.
18504
18505 * configure.srv (srv_i386_regobj): New.
18506 (srv_i386_linux_regobj): Likewise.
18507 (srv_amd64_regobj): Likewise.
18508 (srv_amd64_linux_regobj): Likewise.
18509 (srv_i386_32bit_xmlfiles): Likewise.
18510 (srv_i386_64bit_xmlfiles): Likewise.
18511 (srv_i386_xmlfiles): Likewise.
18512 (srv_amd64_xmlfiles): Likewise.
18513 (srv_i386_linux_xmlfiles): Likewise.
18514 (srv_amd64_linux_xmlfiles): Likewise.
18515 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
18516 srv_xmlfiles to $srv_i386_xmlfiles.
18517 (i[34567]86-*-mingw32ce*): Likewise.
18518 (i[34567]86-*-mingw*): Likewise.
18519 (i[34567]86-*-nto*): Likewise.
18520 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
18521 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
18522 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
18523 (x86_64-*-linux*): Likewise.
18524
18525 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
18526 (init_registers_amd64_linux): New.
18527 (x86_arch_setup): Replace init_registers_x86_64_linux with
18528 init_registers_amd64_linux.
18529
18530 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
18531
18532 * configure.ac: Check for libdl. If it is not available link against
18533 static libthread_db.
18534 * configure: Regenerate.
18535
18536 2010-02-22 Pedro Alves <pedro@codesourcery.com>
18537
18538 PR9605
18539
18540 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
18541 handing a read watchpoint.
18542 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
18543
18544 2010-02-12 Doug Evans <dje@google.com>
18545
18546 * linux-low.c (linux_supports_tracefork_flag): Document.
18547 (linux_look_up_symbols): Add comment.
18548
18549 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
18550
18551 * regcache.c (supply_register): Clear regcache if buf is NULL.
18552
18553 2010-02-02 Nicolas Roche <roche@sourceware.org>
18554 Joel Brobecker <brobecker@adacore.com>
18555
18556 * inferiors.c (find_inferior): Add function documentation.
18557 (unloaded_dll): Handle the case where the unloaded dll has not
18558 been previously registered in the dll list.
18559
18560 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18561
18562 * linux-arm-low.c (thumb_breakpoint_len): Delete.
18563 (thumb2_breakpoint): New.
18564 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
18565
18566 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18567
18568 * linux-low.c (get_stop_pc): Check for SIGTRAP.
18569 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
18570 breakpoints.
18571
18572 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18573
18574 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
18575
18576 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
18577
18578 * linux-s390-low.c (s390_collect_ptrace_register)
18579 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
18580
18581 2010-01-21 Doug Evans <dje@google.com>
18582
18583 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
18584 (PTRACE_ARG4_TYPE): New macro.
18585 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
18586 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
18587 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
18588 (usr_store_inferior_registers): Ditto.
18589 (linux_read_memory, linux_write_memory): Ditto.
18590 (linux_test_for_tracefork): Ditto.
18591
18592 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
18593 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
18594
18595 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18596
18597 * proc-service.c (ps_lgetregs): Don't refetch registers from the
18598 target.
18599
18600 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18601
18602 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
18603 prototype to take a regcache. Adjust.
18604
18605 2010-01-20 Pedro Alves <pedro@codesourcery.com>
18606
18607 * regcache.h (struct thread_info): Forward declare.
18608 (struct regcache): New.
18609 (new_register_cache): Adjust prototype.
18610 (get_thread_regcache): Declare.
18611 (free_register_cache): Adjust prototype.
18612 (registers_to_string, registers_from_string): Ditto.
18613 (supply_register, supply_register_by_name, collect_register)
18614 (collect_register_as_string, collect_register_by_name): Ditto.
18615 * regcache.c (struct inferior_regcache_data): Delete.
18616 (get_regcache): Rename to ...
18617 (get_thread_regcache): ... this. Adjust. Switch inferior before
18618 fetching registers.
18619 (regcache_invalidate_one): Adjust.
18620 (regcache_invalidate): Fix prototype.
18621 (new_register_cache): Return the new register cache.
18622 (free_register_cache): Change prototype.
18623 (realloc_register_cache): Adjust.
18624 (registers_to_string): Change prototype to take a regcache. Adjust.
18625 (registers_from_string): Ditto.
18626 (register_data): Ditto.
18627 (supply_register): Ditto.
18628 (supply_register_by_name): Ditto.
18629 (collect_register): Ditto.
18630 (collect_register_as_string): Ditto.
18631 (collect_register_by_name): Ditto.
18632 * server.c (process_serial_event): Adjust.
18633 * linux-low.h (regset_fill_func, regset_store_func): Change
18634 prototype.
18635 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
18636 Change prototype.
18637 * linux-low.c (get_stop_pc): Adjust.
18638 (check_removed_breakpoint): Adjust.
18639 (linux_wait_for_event): Adjust.
18640 (linux_resume_one_lwp): Adjust.
18641 (fetch_register): Add regcache parameter. Adjust.
18642 (usr_store_inferior_registers): Ditto.
18643 (regsets_fetch_inferior_registers): Ditto.
18644 (regsets_store_inferior_registers): Ditto.
18645 (linux_fetch_registers, linux_store_registers): Ditto.
18646 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
18647 regcache. Adjust.
18648 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
18649 Ditto.
18650 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
18651 prototype to take a regcache.
18652 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
18653 * remote-utils.c (convert_ascii_to_int, outreg)
18654 (prepare_resume_reply): Change prototype to take a regcache.
18655 Adjust.
18656 * target.h (struct target_ops) <fetch_registers, store_registers>:
18657 Change prototype to take a regcache.
18658 (fetch_inferior_registers, store_inferior_registers): Change
18659 prototype to take a regcache. Adjust.
18660 * proc-service.c (ps_lgetregs): Adjust.
18661 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
18662 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
18663 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
18664 take a regcache. Adjust.
18665 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
18666 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
18667 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
18668 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
18669 * linux-cris-low.c (cris_get_pc, cris_set_pc)
18670 (cris_cannot_fetch_register):
18671 (cris_breakpoint_at): Change prototype to take a regcache.
18672 Adjust.
18673 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
18674 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
18675 to take a regcache. Adjust.
18676 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
18677 Adjust.
18678 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
18679 take a regcache. Adjust.
18680 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
18681 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
18682 (m68k_set_pc): Change prototype to take a regcache. Adjust.
18683 * linux-mips-low.c (mips_get_pc):
18684 (mips_set_pc): Change prototype to take a regcache. Adjust.
18685 (mips_reinsert_addr): Adjust.
18686 (mips_collect_register): Change prototype to take a regcache.
18687 Adjust.
18688 (mips_supply_register):
18689 (mips_collect_register_32bit, mips_supply_register_32bit)
18690 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18691 (mips_store_fpregset): Ditto.
18692 * linux-ppc-low.c (ppc_supply_ptrace_register)
18693 (ppc_supply_ptrace_register): Ditto.
18694 (parse_spufs_run): Adjust.
18695 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
18696 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
18697 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
18698 take a regcache. Adjust.
18699 * linux-s390-low.c (s390_collect_ptrace_register)
18700 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
18701 (s390_set_pc): Change prototype to take a regcache. Adjust.
18702 (s390_arch_setup): Adjust.
18703 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
18704 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
18705 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
18706 (sparc_fill_gregset, sparc_store_gregset_from_stack)
18707 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
18708 regcache. Adjust.
18709 (sparc_breakpoint_at): Adjust.
18710 * linux-xtensa-low.c (xtensa_fill_gregset):
18711 (xtensa_store_gregset):
18712 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
18713 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
18714 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
18715 prototype to take a regcache. Adjust.
18716 * win32-arm-low.c (arm_fetch_inferior_register)
18717 (arm_store_inferior_register): Change prototype to take a
18718 regcache. Adjust.
18719 * win32-i386-low.c (i386_fetch_inferior_register)
18720 (i386_store_inferior_register): Change prototype to take a
18721 regcache. Adjust.
18722 * win32-low.c (child_fetch_inferior_registers)
18723 (child_store_inferior_registers): Change prototype to take a
18724 regcache. Adjust.
18725 (win32_wait): Adjust.
18726 (win32_fetch_inferior_registers): Change prototype to take a
18727 regcache. Adjust.
18728 (win32_store_inferior_registers): Adjust.
18729 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
18730 store_inferior_register>: Change prototype to take a regcache.
18731
18732 2010-01-20 Doug Evans <dje@google.com>
18733
18734 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
18735 #ifdef.
18736 (linux_wait_for_event1, linux_init_signals): Ditto.
18737 (W_STOPCODE): Provide definition if missing.
18738
18739 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
18740
18741 * linux-low.c (linux_core_of_thread): New.
18742 (compare_ints, show_process, list_threads): New.
18743 (linux_qxfer_osdata): Report threads and cores.
18744 (linux_target_op): Register linux_core_of_thread.
18745 * remote-utils.c (prepare_resume_reply): Report the core.
18746 (buffer_xml_printf): Support %d specifier.
18747 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
18748 New.
18749 (handle_query): Handle qXfer:threads. Announce availability
18750 thereof.
18751 * target.h (struct target_ops): New field core_of_thread.
18752
18753 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
18754
18755 * Makefile.in (clean): Remove new generated files.
18756 (reg-s390.o, reg-s390.c): Remove rules.
18757 (reg-s390x.o, reg-s390x.c): Likewise.
18758 (s390-linux32.o, s390-linux32.c): Add rules.
18759 (s390-linux64.o, s390-linux64.c): Likewise.
18760 (s390x-linux64.o, s390x-linux64.c): Likewise.
18761 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
18762 * linux-s390-low.c: Include <elf.h>.
18763 (HWCAP_S390_HIGH_GPRS): Define if undefined.
18764 (init_registers_s390): Remove prototype.
18765 (init_registers_s390x): Likewise.
18766 (init_registers_s390_linux32): Add prototype.
18767 (init_registers_s390_linux64): Likewise.
18768 (init_registers_s390x_linux64): Likewise.
18769 (s390_num_regs_3264): New define.
18770 (s390_regmap_3264): New global variable.
18771 (s390_cannot_fetch_register): Remove obsolete check.
18772 (s390_cannot_store_register): Likewise.
18773 (s390_collect_ptrace_register): Handle upper/lower register halves.
18774 (s390_supply_ptrace_register): Likewise.
18775 (s390_fill_gregset): Update to register number changes.
18776 (s390_get_hwcap): New routine.
18777 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
18778 Install appropriate regmap and register set.
18779
18780 2010-01-01 Joel Brobecker <brobecker@adacore.com>
18781
18782 * server.c (gdbserver_version): Update copyright year to 2010.
18783 * gdbreplay.c (gdbreplay_version): Likewise.
18784
18785 2009-12-28 Doug Evans <dje@google.com>
18786
18787 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
18788 elf/external.h. Include <elf.h> instead but only if necessary.
18789
18790 2009-12-28 Pedro Alves <pedro@codesourcery.com>
18791
18792 * linux-low.c (linux_remove_process): Remove `detaching'
18793 parameter. Don't release/detach from thread_db here.
18794 (linux_kill): Release/detach from thread_db here, ...
18795 (linux_detach): ... and here, before actually detaching.
18796 (linux_wait_1): ... and here, when a process exits.
18797 * thread-db.c (any_thread_of): New.
18798 (thread_db_free): Switch the current inferior to a thread of the
18799 passed in process.
18800
18801 2009-12-21 Doug Evans <dje@google.com>
18802
18803 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
18804
18805 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
18806 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
18807 warning ifndef __NR_tkill. Move setting of errno there too.
18808 Delete unnecessary resetting of errno after syscall.
18809 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
18810
18811 * configure.ac: Check for dladdr.
18812 * config.in: Regenerate.
18813 * configure: Regenerate.
18814 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
18815 (try_thread_db_load): Update.
18816
18817 * linux-low.c (my_waitpid): Delete unnecessary prototype.
18818
18819 2009-12-18 Doug Evans <dje@google.com>
18820
18821 * event-loop.c: Include unistd.h if it exists.
18822
18823 * linux-low.c (my_waitpid): Move definition away from being in
18824 between linux_tracefork_child/linux_test_for_tracefork.
18825
18826 * gdb_proc_service.h (psaddr_t): Fix type.
18827 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
18828 signature to match glibc.
18829
18830 2009-12-16 Doug Evans <dje@google.com>
18831
18832 * linux-low.c (linux_read_memory): Fix argument to read.
18833
18834 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18835
18836 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
18837 events, don't leave current_inferior pointing at null.
18838
18839 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18840
18841 * win32-low.c (LOG): Delete.
18842 (OUTMSG): Output to stderr.
18843 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
18844 on compile time LOG macro.
18845 (win32_wait): Fix debug output.
18846
18847 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18848
18849 * win32-low.c (win32_add_one_solib): If the dll name is
18850 "ntdll.dll", prepend the system directory to the dll path.
18851
18852 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
18853
18854 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
18855
18856 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
18857 Vladimir Prus <vladimir@codesourcery.com>
18858
18859 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
18860 * configure.ac: Check for __mcoldfire__ and set
18861 gdb_cv_m68k_is_coldfire.
18862 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
18863 reg-cf.o and reg-m68k.o.
18864 * configure: Regenerated.
18865
18866 2009-11-16 Pedro Alves <pedro@codesourcery.com>
18867
18868 * linux-low.c (linux_remove_process): Add `detaching' parameter.
18869 Pass it to thread_db_free.
18870 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
18871 proper `detaching' argument to linux_remove_process.
18872 * linux-low.h (thread_db_free): Add `detaching' parameter.
18873 * thread-db.c (thread_db_init): Pass false as `detaching' argument
18874 to thread_db_free.
18875 (thread_db_free): Add `detaching' parameter. Only
18876 call td_ta_clear_event if detaching from process.
18877
18878 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
18879
18880 * thread-db.c (thread_db_free): Fix typo.
18881
18882 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
18883
18884 PR gdb/10838
18885 * thread-db.c (thread_db_free): Call td_ta_clear_event.
18886
18887 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
18888
18889 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
18890 with an i686 compiler.
18891 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
18892 needed.
18893 * configure: Rebuilt.
18894
18895 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
18896
18897 PR gdb/10783
18898
18899 * server.c (handle_search_memory_1): Correct read_addr initialization
18900 in loop for searching subsequent chunks.
18901
18902 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
18903
18904 * configure.ac: New --with-libthread-db option.
18905 * thread-db.c: Allow direct dependence on libthread_db.
18906 (thread_db_free): Adjust.
18907 * config.in: Regenerate.
18908 * configure: Likewise.
18909
18910 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
18911
18912 PR gdb/10757
18913 * thread-db.c (attach_thread): New function.
18914 (maybe_attach_thread): Return success/failure.
18915 (find_new_threads_callback): Adjust.
18916 (thread_db_find_new_threads): Loop until no new threads.
18917
18918 2009-10-13 Pedro Alves <pedro@codesourcery.com>
18919
18920 * proc-service.c (ps_lgetregs): Formatting.
18921
18922 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
18923
18924 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
18925 * configure.ac: Adjust.
18926 * linux-low.h (struct process_info_private): Move members to struct
18927 thread_db.
18928 (thread_db_free, thread_db_handle_monitor_command): New prototype.
18929 * linux-low.c (linux_remove_process): Adjust.
18930 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
18931 * server.c (handle_query): Move code ...
18932 (handle_monitor_command): ... here. New function.
18933 * target.h (struct target_ops): New member.
18934 * thread-db.c (struct thread_db): New.
18935 (libthread_db_search_path): New variable.
18936 (thread_db_create_event, thread_db_enable_reporting)
18937 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
18938 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
18939 (try_thread_db_load_1, dladdr_to_soname): New functions.
18940 (try_thread_db_load, thread_db_load_search): New functions.
18941 (thread_db_init): Search for libthread_db.
18942 (thread_db_free): New function.
18943 (thread_db_handle_monitor_command): Likewise.
18944 * config.in: Regenerate.
18945 * configure: Regenerate.
18946
18947 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
18948
18949 * spu-low.c (spu_kill): Wait for inferior to terminate.
18950 Call clear_inferiors.
18951 (spu_detach): Call clear_inferiors.
18952
18953 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18954
18955 * aclocal.m4: Regenerate.
18956 * config.in: Likewise.
18957 * configure: Likewise.
18958
18959 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18960
18961 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
18962 (parse_spufs_run): New function.
18963 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
18964 (ppc_breakpoint_at): Handle SPU breakpoints.
18965
18966 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18967
18968 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
18969 (SPUFS_MAGIC): Define.
18970 (spu_enumerate_spu_ids): New function.
18971 (linux_qxfer_spu): New function.
18972 (linux_target_ops): Install linux_qxfer_spu.
18973
18974 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18975
18976 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
18977 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
18978 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
18979 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
18980 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
18981 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
18982 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
18983 (init_registers_powerpc_cell32l): Add prototype.
18984 (init_registers_powerpc_cell64l): Likewise.
18985 (ppc_arch_setup): Detect Cell/B.E. architecture.
18986
18987 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18988
18989 * Makefile.in (datarootdir): New variable.
18990
18991 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18992
18993 * linux-low.c (linux_write_memory): Update debugging output.
18994 * Makefile.in (clean): Add new descriptions.
18995 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
18996 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
18997 * configure.srv: Add new files for arm*-*-linux*.
18998 * linux-arm-low.c: Add new declarations.
18999 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
19000 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
19001 (HWCAP_VFPv3D16): New.
19002 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
19003 instead of __IWMMXT__.
19004 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
19005 (arm_arch_setup): New.
19006 (target_regsets): Remove #ifdef. Add VFP regset.
19007 (the_low_target): Use arm_arch_setup.
19008
19009 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
19010
19011 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
19012 the main thread again.
19013
19014 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
19015
19016 Adding Neutrino gdbserver.
19017 * configure: Regenerated.
19018 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
19019 * configure.srv (i[34567]86-*-nto*): New target.
19020 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
19021 * remote-utils.c [__QNX__]: Include sys/iomgr.h
19022 (nto_comctrl) [__QNX__]: New function.
19023 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
19024
19025 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
19026
19027 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
19028 srv_tgtobj.
19029
19030 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
19031 Pedro Alves <pedro@codesourcery.com>
19032
19033 * win32-i386-low.c (i386_get_thread_context): Handle systems that
19034 don't support CONTEXT_EXTENDED_REGISTERS.
19035 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
19036 (the_low_target): Install them.
19037 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
19038 failing with ERROR_PIPE_NOT_CONNECTED.
19039
19040 2009-06-30 Doug Evans <dje@google.com>
19041 Pierre Muller <muller@ics.u-strasbg.fr>
19042
19043 Add h/w watchpoint support to x86-linux, win32-i386.
19044 * Makefile.in (SFILES): Add i386-low.c
19045 (i386_low_h): Define.
19046 (i386-low.o): Add dependencies.
19047 (linux-x86-low.o): Add i386-low.h dependency.
19048 (win32-i386-low.o): Ditto.
19049 * i386-low.c: New file.
19050 * i386-low.h: New file.
19051 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
19052 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
19053 * linux-low.c (linux_add_process): Initialize arch_private.
19054 (linux_remove_process): Free arch_private.
19055 (add_lwp): Initialize arch_private.
19056 (delete_lwp): Free arch_private.
19057 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
19058 provided.
19059 * linux-low.h (process_info_private): New member arch_private.
19060 (lwp_info): New member arch_private.
19061 (linux_target_ops): New members new_process, new_thread,
19062 prepare_to_resume.
19063 (ptid_of): New macro.
19064 * linux-x86-low.c: Include stddef.h, i386-low.h.
19065 (arch_process_info): New struct.
19066 (arch_lwp_info): New struct.
19067 (x86_linux_dr_get, x86_linux_dr_set): New functions.
19068 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
19069 (i386_dr_low_get_status): New function.
19070 (x86_insert_point, x86_remove_point): New functions.
19071 (x86_stopped_by_watchpoint): New function.
19072 (x86_stopped_data_address): New function.
19073 (x86_linux_new_process, x86_linux_new_thread): New functions.
19074 (x86_linux_prepare_to_resume): New function.
19075 (the_low_target): Add entries for insert_point, remove_point,
19076 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
19077 prepare_to_resume.
19078 * server.c (debug_hw_points): New global.
19079 (monitor_show_help): Document set debug-hw-points.
19080 (handle_query): Process "set debug-hw-points".
19081 * server.h (debug_hw_points): Declare.
19082 (paddress): Declare.
19083 * utils.c (NUMCELLS, CELLSIZE): New macros.
19084 (get_sell, xsnprintf, paddress): New functions.
19085 * win32-arm-low.c (the_low_target): Add entries for insert_point,
19086 remove_point, stopped_by_watchpoint, stopped_data_address.
19087 * win32-i386-low.c: Include i386-low.h.
19088 (debug_reg_state): Replaces dr.
19089 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
19090 (i386_dr_low_get_status): New function.
19091 (i386_insert_point, i386_remove_point): New functions.
19092 (i386_stopped_by_watchpoint): New function.
19093 (i386_stopped_data_address): New function.
19094 (i386_initial_stuff): Update.
19095 (get_thread_context,set_thread_context,i386_thread_added): Update.
19096 (the_low_target): Add entries for insert_point,
19097 remove_point, stopped_by_watchpoint, stopped_data_address.
19098 * win32-low.c (win32_insert_watchpoint): New function.
19099 (win32_remove_watchpoint): New function.
19100 (win32_stopped_by_watchpoint): New function.
19101 (win32_stopped_data_address): New function.
19102 (win32_target_ops): Add entries for insert_watchpoint,
19103 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
19104 * win32-low.h (win32_target_ops): New members insert_point,
19105 remove_point, stopped_by_watchpoint, stopped_data_address.
19106
19107 2009-06-25 Pedro Alves <pedro@codesourcery.com>
19108
19109 * server.c (process_serial_event): Re-return unsupported, not
19110 error, if the type isn't recognized. Re-allow supporting only
19111 insert or remove packets. Also call require_running for
19112 breakpoints. Add missing break statement to default case. Tidy.
19113 * target.h (struct target_ops): Rename insert_watchpoint to
19114 insert_point, and remove_watchpoint to remove_point.
19115
19116 * linux-low.h (struct linux_target_ops): Likewise.
19117 * linux-low.c (linux_insert_watchpoint): Rename to ...
19118 (linux_insert_point): ... this. Adjust.
19119 (linux_remove_watchpoint): Rename to ...
19120 (linux_remove_point): ... this. Adjust.
19121 (linux_target_ops): Adjust.
19122 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
19123 (cris_insert_point): ... this.
19124 (cris_remove_watchpoint): Rename to ...
19125 (cris_remove_point): ... this.
19126 (the_low_target): Adjust.
19127
19128 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
19129
19130 * server.c (handle_v_kill): Pass signal_pid to
19131 kill_inferior if multi_process is zero.
19132
19133 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
19134
19135 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
19136 * target.h (target_ops): Comment for *_watchpoint to make it clear
19137 the functions can get types '0' and '1'.
19138
19139 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
19140
19141 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
19142 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
19143 * regcache.c (get_regcache): Likewise.
19144 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
19145 * win32-low.c (child_fetch_inferior_registers): Remove check for
19146 regno 0.
19147
19148 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
19149 Pedro Alves <pedro@codesourcery.com>
19150
19151 * target.h (struct target_ops) <supports_multi_process>: New
19152 callback.
19153 (target_supports_multi_process): New.
19154 * server.c (handle_query): Even if GDB reports support, only
19155 enable multi-process if the target also supports it. Report
19156 multi-process support only if the target backend supports it.
19157 * linux-low.c (linux_supports_multi_process): New function.
19158 (linux_target_ops): Install it as target_supports_multi_process
19159 callback.
19160
19161 2009-05-24 Doug Evans <dje@google.com>
19162
19163 Global renaming of find_thread_pid to find_thread_ptid.
19164 * server.h (find_thread_ptid): Renamed from find_thread_pid.
19165 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
19166 All callers updated.
19167
19168 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
19169 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
19170 directly.
19171
19172 * linux-low.c (get_stop_pc): Print pc if debug_threads.
19173 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
19174 (linux_resume_one_lwp): Ditto.
19175
19176 2009-05-23 Doug Evans <dje@google.com>
19177
19178 * linux-low.c (linux_resume_one_lwp): Change type of first arg
19179 from struct inferior_list_entry * to struct lwp_info *.
19180 All callers updated.
19181
19182 2009-05-13 Doug Evans <dje@google.com>
19183
19184 * linux-x86-low.c: Don't include assert.h.
19185 (x86_siginfo_fixup): Use fatal, not assert.
19186 (x86_arch_setup): Fix comment.
19187
19188 2009-05-12 Doug Evans <dje@google.com>
19189
19190 Biarch support for i386/amd64 gdbserver.
19191 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
19192 Add linux-x86-low.c.
19193 (linux-i386-low.o, linux-x86-64-low.o): Delete.
19194 (linux-x86-low.o): Add.
19195 * linux-x86-64-low.c: Delete.
19196 * linux-i386-low.c: Delete.
19197 * linux-x86-low.c: New file.
19198 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
19199 linux-x86-low.o.
19200 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
19201 linux-x86-low.o.
19202 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
19203 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
19204 (linux_child_pid_to_exec_file): New function.
19205 (elf_64_header_p, elf_64_file_p): New functions.
19206 (siginfo_fixup): New function.
19207 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
19208 give target a chance to convert layout.
19209 * linux-low.h (linux_target_ops): New member siginfo_fixup.
19210 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
19211
19212 2009-05-07 Doug Evans <dje@google.com>
19213
19214 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
19215 (regsets_store_inferior_registers): Ditto.
19216
19217 2009-05-06 Pedro Alves <pedro@codesourcery.com>
19218
19219 PR server/10048
19220
19221 * linux-low.c (must_set_ptrace_flags): Delete.
19222 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
19223 of the global.
19224 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
19225 `lwp->must_set_ptrace_flags' instead.
19226 (linux_wait_for_event_1): Set ptrace options here.
19227 (linux_wait_1): ... not here.
19228
19229 2009-04-30 Doug Evans <dje@google.com>
19230
19231 * inferiors.c (started_inferior_callback): New function.
19232 (attached_inferior_callback): New function.
19233 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
19234 * server.c (print_started_pid, print_attached_pid): New functions.
19235 (detach_or_kill_for_exit): New function.
19236 (main): Call it instead of for_each_inferior (kill_inferior_callback).
19237 * server.h (have_started_inferiors_p): Declare.
19238 (have_attached_inferiors_p): Declare.
19239
19240 * inferiors.c (remove_process): Fix memory leak, free process.
19241 * linux-low.c (linux_remove_process): New function.
19242 (linux_kill): Call it instead of remove_process.
19243 (linux_detach, linux_wait_1): Ditto.
19244
19245 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
19246
19247 * configure.srv: Add x86 Windows CE target.
19248
19249 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
19250
19251 * inferiors.c (get_thread_process): Make global.
19252 * server.h (get_thread_process): Add prototype.
19253 * thread-db.c (find_one_thread): Use get_thread_process
19254 instead of current_process.
19255 (thread_db_get_tls_address): Do not crash if called when
19256 thread layer is not yet initialized.
19257
19258 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
19259
19260 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
19261 * spu-low.c (current_tid): Rename to ...
19262 (current_ptid): ... this.
19263 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
19264 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
19265 ptid_get_lwp (current_ptid) instead of current_tid.
19266 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
19267 instead of current_tid. Use find_process_pid to verify pid
19268 argument is valid. Pass proper argument to remove_process.
19269 (spu_thread_alive): Compare current_ptid instead of current_tid.
19270 (spu_resume): Likewise.
19271
19272 2009-04-02 Pedro Alves <pedro@codesourcery.com>
19273
19274 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
19275 variable.
19276
19277 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19278
19279 Implement the multiprocess extensions, and add linux multiprocess
19280 support.
19281
19282 * server.h (ULONGEST): Declare.
19283 (struct ptid, ptid_t): New.
19284 (minus_one_ptid, null_ptid): Declare.
19285 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
19286 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
19287 (struct inferior_list_entry): Change `id' type from unsigned from
19288 to ptid_t.
19289 (struct sym_cache, struct breakpoint, struct
19290 process_info_private): Forward declare.
19291 (struct process_info): Declare.
19292 (current_process): Declare.
19293 (all_processes): Declare.
19294 (initialize_inferiors): Declare.
19295 (add_thread): Adjust to use ptid_t.
19296 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
19297 (add_process, remove_process, find_thread_pid): Declare.
19298 (find_inferior_id): Adjust to use ptid_t.
19299 (cont_thread, general_thread, step_thread): Change type to ptid_t.
19300 (multi_process): Declare.
19301 (push_event): Adjust to use ptid_t.
19302 (read_ptid, write_ptid): Declare.
19303 (prepare_resume_reply): Adjust to use ptid_t.
19304 (clear_symbol_cache): Declare.
19305 * inferiors.c (all_processes): New.
19306 (null_ptid, minus_one_ptid): New.
19307 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
19308 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
19309 (add_thread): Change unsigned long to ptid. Remove gdb_id
19310 parameter. Adjust.
19311 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
19312 (gdb_id_to_thread): Rename to ...
19313 (find_thread_pid): ... this. Change unsigned long to ptid.
19314 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
19315 (loaded_dll, pull_pid_from_list): Adjust.
19316 (add_process, remove_process, find_process_pid)
19317 (get_thread_process, current_process, initialize_inferiors): New.
19318 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
19319 (struct target_waitstatus) <related_pid>: Ditto.
19320 (struct target_ops) <kill, detach>: Add `pid' argument. Change
19321 return type to int.
19322 (struct target_ops) <join>: Add `pid' argument.
19323 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
19324 (struct target_ops) <wait>: Add `ptid' field. Change return type
19325 to ptid.
19326 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
19327 (mywait): Add `ptid' argument. Change return type to ptid_t.
19328 (target_pid_to_str): Declare.
19329 * target.c (set_desired_inferior): Adjust to use ptids.
19330 (mywait): Add new `ptid' argument. Adjust.
19331 (target_pid_to_str): New.
19332 * mem-break.h (free_all_breakpoints): Declare.
19333 * mem-break.c (breakpoints): Delelete.
19334 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
19335 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
19336 to use per-process breakpoint list.
19337 (free_all_breakpoints): New.
19338 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
19339 (symbol_cache, all_symbols_looked_up): Delete.
19340 (hexchars): New.
19341 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
19342 read_ptid): New.
19343 (prepare_resume_reply): Change ptid argument's type from unsigned
19344 long to ptid_t. Adjust. Implement W;process and X;process.
19345 (free_sym_cache, clear_symbol_cache): New.
19346 (look_up_one_symbol): Adjust to per-process symbol cache. *
19347 * server.c (cont_thread, general_thread, step_thread): Change type
19348 to ptid_t.
19349 (attached): Delete.
19350 (multi_process): New.
19351 (last_ptid): Change type to ptid_t.
19352 (struct vstop_notif) <ptid>: Change type to ptid_t.
19353 (queue_stop_reply, push_event): Change `ptid' argument's type to
19354 ptid_t.
19355 (discard_queued_stop_replies): Add `pid' argument.
19356 (start_inferior): Adjust to use ptids. Adjust to mywait interface
19357 changes. Don't reference the `attached' global.
19358 (attach_inferior): Adjust to mywait interface changes.
19359 (handle_query): Adjust to use ptids. Parse GDB's qSupported
19360 features. Handle and report "multiprocess+". Handle
19361 "qAttached:PID".
19362 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
19363 changes.
19364 (handle_v_kill): New.
19365 (handle_v_stopped): Adjust to use target_pid_to_str.
19366 (handle_v_requests): Allow multiple attaches and runs when
19367 multiprocess extensions are in effect. Handle "vKill".
19368 (myresume): Adjust to use ptids.
19369 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
19370 (handle_status): Adjust to discard_queued_stop_replies interface
19371 change.
19372 (first_thread_of, kill_inferior_callback)
19373 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
19374 (main): Call initialize_inferiors. Adjust to use ptids, killing
19375 and detaching from all inferiors. Handle multiprocess packet
19376 variants.
19377 * linux-low.h: Include gdb_proc_service.h.
19378 (struct process_info_private): New.
19379 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
19380 <lwpid_of>: Use ptid_get_lwp.
19381 (get_lwp_thread): Adjust.
19382 (struct lwp_info): Add `dead' member.
19383 (find_lwp_pid): Declare.
19384 * linux-low.c (thread_db_active): Delete.
19385 (new_inferior): Adjust comment.
19386 (inferior_pid): Delete.
19387 (linux_add_process): New.
19388 (handle_extended_wait): Adjust.
19389 (add_lwp): Change unsigned long to ptid.
19390 (linux_create_inferior): Add process to processes table. Adjust
19391 to use ptids. Don't set new_inferior here.
19392 (linux_attach_lwp): Rename to ...
19393 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
19394 it. Adjust to use ptids.
19395 (linux_attach_lwp): New.
19396 (linux_attach): Add process to processes table. Don't set
19397 new_inferior here.
19398 (struct counter): New.
19399 (second_thread_of_pid_p, last_thread_of_process_p): New.
19400 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
19401 multiple processes.
19402 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
19403 processes. Remove process from process table.
19404 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
19405 to multiple processes.
19406 (any_thread_of): New.
19407 (linux_detach): Add `pid' argument, and handle it. Remove process
19408 from processes table.
19409 (linux_join): Add `pid' argument. Handle it.
19410 (linux_thread_alive): Change unsighed long argument to ptid_t.
19411 Consider dead lwps as not being alive.
19412 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
19413 threads we're not interested in.
19414 (same_lwp, find_lwp_pid): New.
19415 (linux_wait_for_lwp): Change `pid' argument's type from int to
19416 ptid_t. Adjust.
19417 (linux_wait_for_event): Rename to ...
19418 (linux_wait_for_event_1): ... this. Change `pid' argument's type
19419 from int to ptid_t. Adjust.
19420 (linux_wait_for_event): New.
19421 (linux_wait_1): Add `ptid' argument. Change return type to
19422 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
19423 that exit from the process table.
19424 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
19425 Adjust.
19426 (mark_lwp_dead): New.
19427 (wait_for_sigstop): Adjust to use ptids. If a process exits while
19428 stopping all threads, mark its main lwp as dead.
19429 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
19430 ptids.
19431 (fetch_register, usr_store_inferior_registers)
19432 (regsets_fetch_inferior_registers)
19433 (regsets_store_inferior_registers, linux_read_memory)
19434 (linux_write_memory): Inline `inferior_pid'.
19435 (linux_look_up_symbols): Adjust to use per-process
19436 `thread_db_active'.
19437 (linux_request_interrupt): Adjust to use ptids.
19438 (linux_read_auxv): Inline `inferior_pid'.
19439 (initialize_low): Don't reference thread_db_active.
19440 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
19441 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
19442 (ps_getpid): Return the pid of the current inferior.
19443 * thread-db.c (proc_handle, thread_agent): Delete.
19444 (thread_db_create_event, thread_db_enable_reporting): Adjust to
19445 per-process data.
19446 (find_one_thread): Change argument type to ptid_t. Adjust to
19447 per-process data.
19448 (maybe_attach_thread): Adjust to per-process data and ptids.
19449 (thread_db_find_new_threads): Ditto.
19450 (thread_db_init): Ditto.
19451 * spu-low.c (spu_create_inferior, spu_attach): Add process to
19452 processes table. Adjust to use ptids.
19453 (spu_kill, spu_detach): Adjust interface. Remove process from
19454 processes table.
19455 (spu_join, spu_thread_alive): Adjust interface.
19456 (spu_wait): Adjust interface. Remove process from processes
19457 table. Adjust to use ptids.
19458 * win32-low.c (current_inferior_tid): Delete.
19459 (current_inferior_ptid): New.
19460 (debug_event_ptid): New.
19461 (thread_rec): Take a ptid. Adjust.
19462 (child_add_thread): Add `pid' argument. Adjust to use ptids.
19463 (child_delete_thread): Ditto.
19464 (do_initial_child_stuff): Add `attached' argument. Add process to
19465 processes table.
19466 (child_fetch_inferior_registers, child_store_inferior_registers):
19467 Adjust.
19468 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
19469 (win32_attach): Pass 1 to do_initial_child_stuff.
19470 (win32_kill): Adjust interface. Remove process from processes
19471 table.
19472 (win32_detach): Ditto.
19473 (win32_join): Adjust interface.
19474 (win32_thread_alive): Take a ptid.
19475 (win32_resume): Adjust to use ptids.
19476 (get_child_debug_event): Ditto.
19477 (win32_wait): Adjust interface. Remove exiting process from
19478 processes table.
19479
19480 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19481
19482 Non-stop mode support.
19483
19484 * server.h (non_stop): Declare.
19485 (gdb_client_data, handler_func): Declare.
19486 (delete_file_handler, add_file_handler, start_event_loop):
19487 Declare.
19488 (handle_serial_event, handle_target_event, push_event)
19489 (putpkt_notif): Declare.
19490 * target.h (enum resume_kind): New.
19491 (struct thread_resume): Replace `step' field by `kind' field.
19492 (TARGET_WNOHANG): Define.
19493 (struct target_ops) <wait>: Add `options' argument.
19494 <supports_non_stop, async, start_non_stop>: New fields.
19495 (target_supports_non_stop, target_async): New.
19496 (start_non_stop): Declare.
19497 (mywait): Add `options' argument.
19498 * target.c (mywait): Add `options' argument. Print child exit
19499 notifications here.
19500 (start_non_stop): New.
19501 * server.c (non_stop, own_buf, mem_buf): New globals.
19502 (struct vstop_notif): New.
19503 (notif_queue): New global.
19504 (queue_stop_reply, push_event, discard_queued_stop_replies)
19505 (send_next_stop_reply): New.
19506 (start_inferior): Adjust to use resume_kind. Adjust to mywait
19507 interface changes.
19508 (attach_inferior): In non-stop mode, don't wait for the target
19509 here.
19510 (handle_general_set): Handle QNonStop.
19511 (handle_query): When handling qC, return the current general
19512 thread, instead of the first thread of the list.
19513 (handle_query): If the backend supports non-stop mode, include
19514 QNonStop+ in the qSupported query response.
19515 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
19516 and non-stop mode.
19517 (handle_v_attach, handle_v_run): Handle non-stop mode.
19518 (handle_v_stopped): New.
19519 (handle_v_requests): Report support for vCont;t. Handle vStopped.
19520 (myresume): Adjust to use resume_kind. Handle non-stop.
19521 (queue_stop_reply_callback): New.
19522 (handle_status): Handle non-stop mode.
19523 (main): Clear non_stop flag on reconnection. Use the event-loop.
19524 Refactor serial protocol handling from here ...
19525 (process_serial_event): ... to this new function. When GDB
19526 selects any thread, select one here. In non-stop mode, wait until
19527 GDB acks all pending events before exiting.
19528 (handle_serial_event, handle_target_event): New.
19529 * remote-utils.c (remote_open): Install remote_desc in the event
19530 loop.
19531 (remote_close): Remove remote_desc from the event loop.
19532 (putpkt_binary): Rename to...
19533 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
19534 (putpkt_binary): New as wrapper around putpkt_binary_1.
19535 (putpkt_notif): New.
19536 (prepare_resume_reply): In non-stop mode, don't change the
19537 general_thread.
19538 * event-loop.c: New.
19539 * Makefile.in (OBJ): Add event-loop.o.
19540 (event-loop.o): New rule.
19541
19542 * linux-low.h (pid_of): Moved here.
19543 (lwpid_of): New.
19544 (get_lwp_thread): Use lwpid_of.
19545 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
19546 * linux-low.c (pid_of): Delete.
19547 (inferior_pid): Use lwpid_of.
19548 (linux_event_pipe): New.
19549 (target_is_async_p): New.
19550 (delete_lwp): New.
19551 (handle_extended_wait): Use lwpid_of.
19552 (add_lwp): Don't set lwpid field.
19553 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
19554 (linux_kill_one_lwp): If killing a running lwp, stop it first.
19555 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
19556 (linux_detach_one_lwp): If detaching from a running lwp, stop it
19557 first. Adjust to linux_wait_for_event interface changes. Use
19558 lwpid_of.
19559 (linux_detach): Don't delete the main lwp here.
19560 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
19561 (status_pending_p): Don't consider explicitly suspended lwps.
19562 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
19563 pointer. Add OPTIONS argument. Change return type to int. Use
19564 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
19565 (linux_wait_for_event): Take an integer pid instead of a lwp_info
19566 pointer. Add status pointer argument. Return a pid instead of a
19567 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
19568 changes. In non-stop mode, don't switch to a random thread.
19569 (linux_wait): Rename to...
19570 (linux_wait_1): ... this. Add target_options argument, and handle
19571 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
19572 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
19573 clean exit and signal exit code. Don't stop all threads in
19574 non-stop mode. In all-stop mode, only stop all threads when
19575 reporting a stop to GDB. Handle explicit thread stop requests.
19576 (async_file_flush, async_file_mark): New.
19577 (linux_wait): New.
19578 (send_sigstop): Use lwpid_of.
19579 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
19580 interface changes. In non-stop mode, don't switch to a random
19581 thread.
19582 (linux_resume_one_lwp): Use lwpid_of.
19583 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
19584 (linux_resume_one_thread): ... this. Handle resume_stop. In
19585 non-stop mode, don't look for pending flag in all threads.
19586 (resume_status_pending_p): Don't consider explicitly suspended
19587 threads.
19588 (my_waitpid): Reimplement. Emulate __WALL.
19589 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19590 Use lwpid_of.
19591 (sigchld_handler, linux_supports_non_stop, linux_async)
19592 (linux_start_non_stop): New.
19593 (linux_target_ops): Register linux_supports_non_stop, linux_async
19594 and linux_start_non_stop.
19595 (initialize_low): Install SIGCHLD handler.
19596 * thread-db.c (thread_db_create_event, find_one_thread)
19597 (thread_db_get_tls_address): Use lwpid_of.
19598 * win32-low.c (win32_detach): Adjust to use resume_kind.
19599 (win32_wait): Add `options' argument.
19600 * spu-low.c (spu_resume): Adjust to use resume_kind.
19601 (spu_wait): Add `options' argument.
19602
19603 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19604
19605 Decouple target code from remote protocol.
19606
19607 * target.h (enum target_waitkind): New.
19608 (struct target_waitstatus): New.
19609 (struct target_ops) <wait>: Return an unsigned long. Take a
19610 target_waitstatus pointer instead of a char pointer.
19611 (mywait): Likewise.
19612 * target.c (mywait): Change prototype to return an unsigned long.
19613 Take a target_waitstatus pointer instead of a char pointer. Adjust.
19614 * server.h (thread_from_wait, old_thread_from_wait): Delete
19615 declarations.
19616 (prepare_resume_reply): Change prototype to take a
19617 target_waitstatus.
19618 * server.c (thread_from_wait, old_thread_from_wait): Delete.
19619 (last_status, last_ptid): New.
19620 (start_inferior): Remove "statusptr" argument. Adjust. Return a
19621 pid instead of a signal.
19622 (attach_inferior): Remove "status" and "signal" parameters.
19623 Adjust.
19624 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
19625 not as an address.
19626 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
19627 (handle_v_requests, myresume): Remove "status" and "signal"
19628 parameters. Adjust.
19629 (handle_status): New.
19630 (main): Delete local `status'. Adjust.
19631 * remote-utils.c: Include target.h.
19632 (prepare_resume_reply): Change prototype to take a
19633 target_waitstatus. Adjust.
19634
19635 * linux-low.c (linux_wait): Adjust to new target_ops->wait
19636 interface.
19637 * spu-low.c (spu_wait): Adjust.
19638 * win32-low.c (enum target_waitkind, struct target_waitstatus):
19639 Delete.
19640 (win32_wait): Adjust.
19641
19642 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19643
19644 * target.h (struct thread_resume): Delete leave_stopped member.
19645 (struct target_ops): Add a `n' argument to the `resume' callback.
19646 * server.c (start_inferior): Adjust.
19647 (handle_v_cont, myresume): Adjust.
19648 * linux-low.c (check_removed_breakpoint): Adjust to resume
19649 interface change, and to removed leave_stopped field.
19650 (resume_ptr): Delete.
19651 (struct thread_resume_array): New.
19652 (linux_set_resume_request): Add new `arg' parameter. Adjust to
19653 resume interface change.
19654 (linux_continue_one_thread, linux_queue_one_thread)
19655 (resume_status_pending_p): Check if the resume field is NULL
19656 instead of checking the leave_stopped member.
19657 (linux_resume): Adjust to the target resume interface change.
19658 * spu-low.c (spu_resume): Adjust to the target resume interface
19659 change.
19660 * win32-low.c (win32_detach, win32_resume): Ditto.
19661
19662 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19663
19664 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
19665 flag.
19666 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
19667 pending.
19668 (linux_continue_one_thread): Only preserve the stepping flag if
19669 there's a pending breakpoint.
19670
19671 2009-03-31 Pedro Alves <pedro@codesourcery.com>
19672
19673 * server.c (main): After the inferior having exited, call
19674 remote_close before exiting gdbserver.
19675
19676 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
19677
19678 Fix size of FPSCR in Power 7 processors.
19679 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
19680 (PPC_FEATURE_HAS_DFP): New #define.
19681 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
19682 size of the FPSCR.
19683
19684 2009-03-23 Pedro Alves <pedro@codesourcery.com>
19685
19686 * server.c (handle_query) Whitespace and formatting.
19687
19688 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19689
19690 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
19691 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
19692 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
19693 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
19694 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
19695 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
19696 Makefile.in, configure.ac: Fix whitespace throughout.
19697 * configure: Regenerate.
19698
19699 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19700
19701 * inferiors.c (find_inferior): Make it safe for the callback
19702 function to delete the currently iterated inferior.
19703
19704 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19705
19706 * Makefile.in (linuw_low_h): Move higher.
19707 (thread-db.o): Depend on $(linux_low_h).
19708
19709 2009-03-17 Pedro Alves <pedro@codesourcery.com>
19710
19711 Rename "process" to "lwp" throughout.
19712
19713 * linux-low.c (all_processes): Rename to...
19714 (all_lwps): ... this.
19715 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
19716 (add_process): Rename to ...
19717 (add_lwp): ... this. Adjust.
19718 (linux_create_inferior): Adjust.
19719 (linux_attach_lwp): Adjust.
19720 (linux_attach): Adjust.
19721 (linux_kill_one_process): Rename to ...
19722 (linux_kill_one_lwp): ... this. Adjust.
19723 (linux_kill): Adjust.
19724 (linux_detach_one_process): Rename to ...
19725 (linux_detach_one_lwp): ... this. Adjust.
19726 (linux_detach): Adjust.
19727 (check_removed_breakpoint): Adjust.
19728 (status_pending_p): Adjust.
19729 (linux_wait_for_process): Rename to ...
19730 (linux_wait_for_lwp): ... this. Adjust.
19731 (linux_wait_for_event): Adjust.
19732 (send_sigstop): Adjust.
19733 (wait_for_sigstop): Adjust.
19734 (stop_all_processes): Rename to ...
19735 (stop_all_lwps): ... this.
19736 (linux_resume_one_process): Rename to ...
19737 (linux_resume_one_lwp): ... this. Adjust.
19738 (linux_set_resume_request, linux_continue_one_thread)
19739 (linux_queue_one_thread, resume_status_pending_p)
19740 (usr_store_inferior_registers, regsets_store_inferior_registers)
19741 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19742 Adjust.
19743 * linux-low.h (get_process): Rename to ...
19744 (get_lwp): ... this. Adjust.
19745 (get_thread_process): Rename to ...
19746 (get_thread_lwp): ... this. Adjust.
19747 (get_process_thread): Rename to ...
19748 (get_lwp_thread): ... this. Adjust.
19749 (struct process_info): Rename to ...
19750 (struct lwp_info): ... this.
19751 (all_processes): Rename to ...
19752 (all_lwps): ... this.
19753 * proc-service.c (ps_lgetregs): Adjust.
19754 * thread-db.c (thread_db_create_event, find_one_thread)
19755 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
19756
19757 2009-03-14 Pedro Alves <pedro@codesourcery.com>
19758
19759 * server.c (handle_query): Handle "qAttached".
19760
19761 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
19762
19763 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
19764 GPLv3, update license URL.
19765
19766 2009-03-01 Doug Evans <dje@google.com>
19767
19768 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
19769 (server_h): Add gdb_signals.h.
19770 (signals.o): Update.
19771 * server.h (target_signal_from_host,target_signal_to_host_p)
19772 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
19773
19774 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
19775
19776 * remote-utils.c (getpkt): Also generate remote-debug
19777 information if noack_mode is set.
19778
19779 2009-02-06 Pedro Alves <pedro@codesourcery.com>
19780
19781 * server.c (handle_query): Report qXfer:siginfo:read and
19782 qXfer:siginfo:write as supported and handle them.
19783 * target.h (struct target_ops) <qxfer_siginfo>: New field.
19784 * linux-low.c (linux_xfer_siginfo): New.
19785 (linux_target_ops): Set it.
19786
19787 2009-01-26 Pedro Alves <pedro@codesourcery.com>
19788
19789 * server.c (gdbserver_usage): Mention --remote-debug.
19790 (main): Accept '--remote-debug' switch.
19791
19792 2009-01-18 Doug Evans <dje@google.com>
19793
19794 * regcache.c (new_register_cache): No need to check result of xcalloc.
19795 * server.c (handle_search_memory): Back out calls to xmalloc,
19796 result is checked and error is returned to user upon failure.
19797 (handle_query): Ditto. Add more checks for result of malloc.
19798 (handle_v_cont): Check result of malloc, report error back to
19799 user upon failure.
19800 (handle_v_run): Ditto. Call freeargv.
19801 * server.h (freeargv): Declare.
19802 * utils.c (freeargv): New fn.
19803
19804 2009-01-15 Doug Evans <dje@google.com>
19805
19806 * gdbreplay.c (perror_with_name): Make arg const char *.
19807 * server.h (target_signal_to_name): Make return type const char *.
19808 * thread-db.c (thread_db_err_str): Make return type const char *.
19809 * utils.c (perror_with_name): Make arg const char *.
19810
19811 2009-01-14 Pedro Alves <pedro@codesourcery.com>
19812
19813 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
19814 when handling a EXIT_PROCESS_DEBUG_EVENT.
19815
19816 2009-01-06 Joel Brobecker <brobecker@adacore.com>
19817
19818 * gdbreplay.c (gdbreplay_version): Update copyright year.
19819 * server.c (gdbserver_version): Likewise.
19820
19821 2009-01-05 Doug Evans <dje@google.com>
19822
19823 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
19824 (handle_extended_wait): Improve comment.
19825
19826 2008-12-13 Doug Evans <dje@google.com>
19827
19828 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
19829 * server.h (ATTR_MALLOC): New macro.
19830 (xmalloc,xcalloc,xstrdup): Declare.
19831 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
19832 * inferiors.c: Ditto.
19833 * linux-low.c: Ditto.
19834 * mem-break.c: Ditto.
19835 * regcache.c: Ditto.
19836 * remote-utils.c: Ditto.
19837 * server.c: Ditto.
19838 * target.c: Ditto.
19839 * win32-low.c: Ditto.
19840
19841 2008-12-12 Doug Evans <dje@google.com>
19842
19843 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
19844 in debugging printf.
19845
19846 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
19847
19848 2008-12-09 Doug Evans <dje@google.com>
19849
19850 * linux-low.h (struct process_info): Delete member tid, unused.
19851 * thread-db.c (find_one_thread): Update.
19852 (maybe_attach_thread): Update.
19853
19854 2008-12-02 Pedro Alves <pedro@codesourcery.com>
19855
19856 * target.h (struct target_ops): Add qxfer_osdata member.
19857 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
19858 and dirent.h.
19859 (linux_qxfer_osdata): New functions.
19860 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
19861 callback.
19862 * server.c (handle_query): Handle "qXfer:osdata:read:".
19863 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
19864 (buffer_xml_printf): New functions.
19865 * server.h (struct buffer): New.
19866 (buffer_grow_str, buffer_grow_str0): New macros.
19867 (buffer_grow, buffer_free, buffer_init, buffer_finish)
19868 (buffer_xml_printf): Declare.
19869
19870 2008-11-24 Doug Evans <dje@google.com>
19871
19872 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
19873
19874 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
19875
19876 * server.c (handle_v_run): Always use the supplied argument list.
19877
19878 2008-11-19 Bob Wilson <bob.wilson@acm.org>
19879
19880 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
19881 (xtensa_regmap_table): Add entry for scompare1.
19882
19883 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
19884
19885 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
19886 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
19887 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
19888 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
19889 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
19890 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
19891 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
19892 XML target descriptions.
19893 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
19894 when inferior is running on an ISA 2.05 or later processor. Add
19895 special case to return offset for full 64-bit slot of FPSCR when
19896 in 32-bits.
19897
19898 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
19899
19900 * Makefile.in (SFILES, clean): Added sparc64 files.
19901 (reg-sparc64.o, reg-sparc64.c): New.
19902 * configure.srv (sparc*-*-linux*): New configuration.
19903 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
19904 syscall arguments for SPARC.
19905 (regsets_store_inferior_registers): Likewise.
19906 * linux-sparc-low.c: New file.
19907
19908 2008-10-21 Doug Evans <dje@google.com>
19909
19910 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
19911 (READLINE_DIR,READLINE_DEP): Delete.
19912 (INTERNAL_CFLAGS): Update.
19913 (LINTFLAGS): Update.
19914
19915 2008-10-10 Pedro Alves <pedro@codesourcery.com>
19916
19917 * server.c (handle_v_run): If GDB didn't specify an argv, use the
19918 whole argv from the last run, not just argv[0].
19919
19920 2008-09-08 Pedro Alves <pedro@codesourcery.com>
19921
19922 * regcache.c (new_register_cache): Return NULL if the register
19923 cache size isn't known yet.
19924 (free_register_cache): Avoid dereferencing a NULL regcache.
19925
19926 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
19927
19928 * configure.srv: Merge MIPS and MIPS64.
19929
19930 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
19931
19932 * Makefile.in (uninstall): Apply $(EXEEXT) too.
19933
19934 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
19935
19936 * Makefile.in: Add required vsx dependencies.
19937
19938 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
19939 Declare init_registers_powerpc_vsx32l.
19940 Declare init_registers_powerpc_vsx64l.
19941 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
19942 (ppc_arch_setup): Check for VSX in hwcap.
19943 (ppc_fill_vsxregset): New function.
19944 (ppc_store_vsxregset): New function.
19945 Add new VSX entry in regset_info target_regsets.
19946
19947 * configure.srv: Add new VSX dependencies.
19948
19949 2008-08-12 Pedro Alves <pedro@codesourcery.com>
19950
19951 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
19952 (remote_open): Set or clear transport_is_reliable.
19953 (putpkt_binary): Don't expect acks in noack mode.
19954 (getpkt): Don't send ack/nac in noack mode.
19955 * server.c (handle_general_set): Handle QStartNoAckMode.
19956 (handle_query): If connected by tcp pass QStartNoAckMode+ in
19957 qSupported.
19958 (main): Reset noack_mode on every connection.
19959 * server.h (noack_mode): Declare.
19960
19961 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19962
19963 * Makefile.in (GDBREPLAY_OBS): New variable.
19964 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
19965
19966 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
19967 Daniel Jacobowitz <dan@codesourcery.com>
19968
19969 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
19970 (usr_store_inferior_registers): Likewise.
19971 (regsets_store_inferior_registers): Likewise.
19972
19973 2008-07-31 Rolf Jansen <rj@surtec.com>
19974 Pedro Alves <pedro@codesourcery.com>
19975
19976 * configure.ac: Check for memmem declaration.
19977 * server.c [HAVE_MALLOC_H]: Include malloc.h.
19978 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
19979 (disable_packet_qfThreadInfo): Unconditionally compile.
19980 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
19981 * configure, config.in: Regenerate.
19982
19983 2008-07-28 Doug Kwan <dougkwan@google.com>
19984
19985 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
19986 (linux_write_memory): Remove declaration of errno.
19987
19988 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
19989
19990 * linux-low.c (handle_extended_wait): Do not use "status"
19991 variable uninitialized.
19992
19993 2008-07-07 Pedro Alves <pedro@codesourcery.com>
19994
19995 * server.c (handle_v_attach): Inhibit reporting dll changes.
19996
19997 2008-06-27 Pedro Alves <pedro@codesourcery.com>
19998
19999 * remote-utils.c (prepare_resume_reply): If requested, don't
20000 output "thread:TID" in the T stop reply.
20001
20002 * server.c (disable_packet_vCont, disable_packet_Tthread)
20003 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
20004 (handle_query): If requested, disable support for qC, qfThreadInfo
20005 and qsThreadInfo.
20006 (handle_v_requests): If requested, disable support for vCont.
20007 (gdbserver_show_disableable): New.
20008 (main): Handle --disable-packet and --disable-packet=LIST.
20009
20010 * server.h (disable_packet_vCont, disable_packet_Tthread)
20011 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
20012
20013 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
20014
20015 * server.c (gdbserver_usage): Mention --version.
20016
20017 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
20018
20019 * Makefile.in (gdbreplay.o): New rule.
20020
20021 2008-06-06 Joseph Myers <joseph@codesourcery.com>
20022
20023 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
20024 message, not gdbserver.
20025
20026 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
20027 Nathan Sidwell <nathan@codesourcery.com>
20028 Joseph Myers <joseph@codesourcery.com>
20029
20030 * acinclude.m4: Include ../../config/acx.m4.
20031 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
20032 * configure, config.in: Regenerate.
20033 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
20034 * server.c (gdbserver_version): Print PKGVERSION.
20035 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
20036 (main): Adjust gdbserver_usage calls.
20037 * gdbreplay.c (version, host_name): Add declarations.
20038 (gdbreplay_version, gdbreplay_usage): New.
20039 (main): Accept --version and --help options.
20040
20041 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
20042
20043 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
20044 (arm_breakpoint_at): Handle Thumb.
20045 (the_low_target): Add comment.
20046
20047 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
20048
20049 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
20050
20051 2008-05-09 Doug Evans <dje@google.com>
20052
20053 * server.h (decode_search_memory_packet): Declare.
20054 * remote-utils.c (decode_search_memory_packet): New fn.
20055 * server.c (handle_search_memory_1): New fn.
20056 (handle_search_memory): New fn.
20057 (handle_query): Process qSearch:memory packets.
20058
20059 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
20060
20061 * regcache.c (registers_length): Remove.
20062 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
20063 full register packet.
20064 * regcache.h (registers_length): Remove prototype.
20065 * server.h (PBUFSIZ): Define to 16384.
20066
20067 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
20068
20069 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
20070 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
20071 powerpc-64l.o, and powerpc-altivec64l.o.
20072 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
20073 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
20074 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
20075 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
20076 rs6000/power-linux.xml, and rs6000/power64-linux.xml
20077 to srv_xmlfiles.
20078
20079 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
20080 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
20081 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
20082 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
20083 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
20084 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
20085 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
20086 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
20087 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
20088 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
20089 (clean): Update.
20090
20091 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
20092 (init_registers_powerpc_32l): ... this new prototype.
20093 (init_registers_powerpc_32): Remove, replace by ...
20094 (init_registers_powerpc_altivec32l): ... this new prototype.
20095 (init_registers_powerpc_e500): Remove, replace by ...
20096 (init_registers_powerpc_e500l): ... this new prototype.
20097 (init_registers_ppc64): Remove, replace by ...
20098 (init_registers_powerpc_64l): ... this new prototype.
20099 (init_registers_powerpc_64): Remove, replace by ...
20100 (init_registers_powerpc_altivec64l): ... this new prototype.
20101 (ppc_num_regs): Set to 73.
20102 (PT_ORIG_R3, PT_TRAP): Define if necessary.
20103 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
20104 (ppc_cannot_store_register): Handle orig_r3 and trap.
20105 (ppc_arch_setup): Update init_registers_... calls.
20106 (ppc_fill_gregset): Handle orig_r3 and trap.
20107
20108 * inferiors.c (clear_inferiors): Reset current_inferior.
20109
20110 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
20111
20112 * acinclude.m4: Add override.m4.
20113 * configure: Regenerate.
20114
20115 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
20116
20117 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
20118 initial call to init_register_ppc64.
20119
20120 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
20121
20122 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
20123 single powerpc*-*-linux* case.
20124 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
20125
20126 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
20127
20128 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
20129 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
20130 from reg_xmlfiles.
20131 * linux-ppc-low.c: Include <elf.h>.
20132 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
20133 (ppc_hwcap): New global variable.
20134 (ppc_regmap): Remove __SPE__ #ifdef sections.
20135 (ppc_regmap_e500): New global variable.
20136 (ppc_cannot_store_register): Update __SPE__ special case.
20137 (ppc_get_hwcap): New function.
20138 (ppc_arch_setup): Use it to determine whether inferior supports
20139 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
20140 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
20141 Do not access registers if target does not support AltiVec.
20142 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
20143 Do not access registers if target does not support SPE.
20144 (target_regsets): Unconditionally include AltiVec and SPE regsets.
20145
20146 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
20147
20148 * linux-low.c (disabled_regsets, num_regsets): New.
20149 (use_regsets_p): Delete.
20150 (linux_wait_for_process): Clear disabled_regsets.
20151 (regsets_fetch_inferior_registers): Check and set it.
20152 (regsets_store_inferior_registers): Likewise.
20153 (linux_fetch_registers, linux_store_registers): Do not use
20154 use_regsets_p.
20155 (initialize_low): Allocate disabled_regsets.
20156
20157 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
20158
20159 * Makefile.in (LIBOBJS): New.
20160 (OBS): Use LIBOBJS.
20161 (memmem.o): New rule.
20162 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
20163 * configure: Regenerated.
20164
20165 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
20166
20167 * server.c (handle_query): Never return "unsupported" for
20168 qXfer:features:read queries.
20169
20170 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
20171
20172 * server.c (get_features_xml): Fix inverted condition.
20173 (handle_query): Always support qXfer:feature:read.
20174
20175 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
20176
20177 * server.c (wrapper_argv): New.
20178 (start_inferior): Handle wrapper_argv. If set, expect an extra
20179 trap.
20180 (gdbserver_usage): Document --wrapper.
20181 (main): Parse --wrapper.
20182
20183 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20184
20185 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
20186 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
20187 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
20188 (ppc_set_pc): Likewise.
20189 (ppc_arch_setup): New function.
20190 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
20191 of collect_register.
20192 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
20193
20194 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20195
20196 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
20197 instead of linux-ppc64-low.o.
20198 * linux-ppc64-low.c: Remove file.
20199 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
20200 (linux-ppc64-low.o): Remove rule.
20201
20202 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
20203 (init_registers_powerpc_64): Likewise.
20204 (ppc_regmap): Conditionally define depending on __powerpc64__.
20205 (ppc_cannot_store_register): Do not special-case "fpscr" when
20206 compiled on __powerpc64__.
20207 (ppc_collect_ptrace_register): New function.
20208 (ppc_supply_ptrace_register): New function.
20209 (ppc_breakpoint): Change type to "unsigned int".
20210 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
20211 (the_low_target): Conditionally provide initializers for the
20212 arch_setup member depending on __powerpc64__. Install
20213 collect_ptrace_register and supply_ptrace_register members.
20214
20215 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20216
20217 * regcache.h (gdbserver_xmltarget): Add extern declaration.
20218 * server.c (gdbserver_xmltarget): Define.
20219 (get_features_xml): Use it to replace "target.xml" and arch_string.
20220
20221 * configure.srv: Remove srv_xmltarget. Add XML files that were
20222 mentioned there to srv_xmlfiles instead. Remove conditional tests
20223 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
20224 srv_xmlfiles and srv_regobj to include all possible choices.
20225 * configure.ac (srv_xmltarget): Remove.
20226 (srv_xmlfiles): Do not add "target.xml".
20227 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
20228 checks for supplementary target information.
20229 * configure: Regenerate.
20230 * Makefile.in (XML_TARGET): Remove.
20231 (target.xml): Remove rule.
20232 (clean): Do not clean up target.xml.
20233 (.PRECIOUS): Do not mention target.xml.
20234
20235 * target.h (struct target_ops): Remove arch_string member.
20236 * linux-low.c (linux_arch_string): Remove.
20237 (linux_target_ops): Remove arch_string initializer.
20238 * linux-low.h (struct linux_target_ops): Remove arch_string member.
20239 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
20240 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
20241 * spu-low.c (spu_arch_string): Remove.
20242 (spu_target_ops): Remove arch_string initializer.
20243 * win32-low.c (win32_arch_string): Remove.
20244 (win32_target_ops): Remove arch_string initializer.
20245 * win32-low.h (struct win32_target_ops): Remove arch_string member.
20246 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
20247 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
20248
20249 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20250
20251 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
20252 by collect_ptrace_register and supply_ptrace_register hooks.
20253 * linux-low.c (fetch_register): Use supply_ptrace_register callback
20254 instead of checking for the_low_target.left_pad_xfer.
20255 (usr_store_inferior_registers): Use collect_ptrace_register callback
20256 instead of checking for the_low_target.left_pad_xfer.
20257
20258 * linux-s390-low.c (s390_collect_ptrace_register): New function.
20259 (s390_supply_ptrace_register): Likewise.
20260 (s390_fill_gregset): Call s390_collect_ptrace_register.
20261 (the_low_target): Update.
20262
20263 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
20264 (ppc_supply_ptrace_register): Likewise.
20265 (the_low_target): Update.
20266
20267 * linux-i386-low.c (the_low_target): Update.
20268 * linux-x86-64-low.c (the_low_target): Update.
20269
20270 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20271
20272 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
20273 reg-s390.o and reg-s390x.o.
20274
20275 * linux-low.c (new_inferior): New global variable.
20276 (linux_create_inferior, linux_attach): Set it.
20277 (linux_wait_for_process): Call the_low_target.arch_setup after the
20278 target has stopped for the first time.
20279 (initialize_low): Do not call the_low_target.arch_setup.
20280
20281 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
20282 (s390_set_pc): Likewise.
20283 (s390_arch_setup): New function.
20284 (the_low_target): Use s390_arch_setup as arch_setup routine.
20285
20286 * regcache.c (realloc_register_cache): New function.
20287 (set_register_cache): Call it for each existing regcache.
20288
20289 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20290
20291 * server.h (init_registers): Remove prototype.
20292
20293 * linux-low.h (struct linux_target_ops): Add arch_setup field.
20294 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
20295 instead of init_registers ().
20296 * linux-arm-low.c (init_registers_arm): Add prototype.
20297 (init_registers_arm_with_iwmmxt): Likewise.
20298 (the_low_target): Add initializer for arch_setup field.
20299 * linux-cris-low.c (init_registers_cris): Add prototype.
20300 (the_low_target): Add initializer for arch_setup field.
20301 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
20302 (the_low_target): Add initializer for arch_setup field.
20303 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
20304 (the_low_target): Add initializer for arch_setup field.
20305 * linux-ia64-low.c (init_registers_ia64): Add prototype.
20306 (the_low_target): Add initializer for arch_setup field.
20307 * linux-m32r-low.c (init_registers_m32r): Add prototype.
20308 (the_low_target): Add initializer for arch_setup field.
20309 * linux-m68k-low.c (init_registers_m68k): Add prototype.
20310 (the_low_target): Add initializer for arch_setup field.
20311 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
20312 (init_registers_mips64_linux): Likewise.
20313 (the_low_target): Add initializer for arch_setup field.
20314 * linux-ppc-low.c (init_registers_ppc): Add prototype.
20315 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
20316 (the_low_target): Add initializer for arch_setup field.
20317 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
20318 (init_registers_powerpc_64): Likewise.
20319 (the_low_target): Add initializer for arch_setup field.
20320 * linux-s390-low.c (init_registers_s390): Add prototype.
20321 (init_registers_s390x): Likewise.
20322 (the_low_target): Add initializer for arch_setup field.
20323 * linux-sh-low.c (init_registers_sh): Add prototype.
20324 (the_low_target): Add initializer for arch_setup field.
20325 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
20326 (the_low_target): Add initializer for arch_setup field.
20327 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
20328 (the_low_target): Add initializer for arch_setup field.
20329
20330 * win32-low.h (struct win32_target_ops): Add arch_setup field.
20331 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
20332 instead of init_registers ().
20333 * win32-arm-low.c (init_registers_arm): Add prototype.
20334 (the_low_target): Add initializer for arch_setup field.
20335 * win32-i386-low.c (init_registers_i386): Add prototype.
20336 (the_low_target): Add initializer for arch_setup field.
20337
20338 * spu-low.c (init_registers_spu): Add prototype.
20339 (initialize_low): Call initialie_registers_spu () instead of
20340 initialize_registers ().
20341
20342 2008-02-19 Pedro Alves <pedro@codesourcery.com>
20343
20344 * server.c (handle_v_requests): When handling the vRun and vAttach
20345 packets, if already debugging a process, don't kill it. Return an
20346 error instead.
20347
20348 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
20349
20350 * server.c (handle_query): Correct length check.
20351
20352 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
20353
20354 * win32-low.c (do_initial_child_stuff): Add process handle
20355 parameter. Set current_process_handle and current_process_id from the
20356 parameters. Clear globals.
20357 (win32_create_inferior): Don't set current_process_handle and
20358 current_process_id here. Instead pass them on the call to
20359 do_initial_child_stuff.
20360 (win32_attach): Likewise.
20361 (win32_clear_inferiors): New.
20362 (win32_kill): Don't close the current process handle or the
20363 current thread handle here. Instead call win32_clear_inferiors.
20364 (win32_detach): Don't open a new handle to the process. Call
20365 win32_clear_inferiors.
20366 (win32_join): Don't rely on current_process_handle; open a new
20367 handle using the process id.
20368 (win32_wait): Call win32_clear_inferiors when the inferior process
20369 has exited.
20370
20371 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
20372
20373 * server.c (monitor_show_help): Add "exit".
20374
20375 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
20376
20377 * Makefile.in (SFILES): Add linux-xtensa-low.c.
20378 (clean): Add reg-xtensa.c.
20379 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
20380 * configure.srv (xtensa*-*-linux*) New target.
20381 * linux-xtensa-low.c: New.
20382 * xtensa-xtregs.c: New.
20383
20384 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
20385
20386 * hostio.c: Don't include errno.h.
20387 (errno_to_fileio_errno): Move to hostio-errno.
20388 * hostio.c: (hostio_error): Remove the error parameter. Defer the
20389 error number outputting to the target->hostio_last_error callback.
20390 (hostio_packet_error): Use FILEIO_EINVAL directly.
20391 (handle_open, handle_pread, hostio_error, handle_unlink): Update
20392 calls to hostio_error.
20393 * hostio-errno.c: New.
20394 * server.h (hostio_last_error_from_errno): Declare.
20395 * target.h (target_ops): Add hostio_last_error member.
20396 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
20397 as hostio_last_error handler.
20398 * spu-low.c (spu_target_ops): Likewise.
20399 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
20400 (wince_hostio_last_error): New functions.
20401 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
20402 as hostio_last_error handler.
20403 (win32_target_ops) [!_WIN32_WCE]: Register
20404 hostio_last_error_from_errno as hostio_last_error handler.
20405 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
20406 (hostio-errno.o): New rule.
20407 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
20408 * configure.srv (srv_hostio_err_objs): New variable. Default to
20409 hostio-errno.o.
20410 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
20411 * configure: Regenerate.
20412
20413 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
20414
20415 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
20416 (linux_kill, linux_detach): Clean up the process list.
20417 * remote-utils.c (remote_open): Improve port number parsing.
20418 (putpkt_binary, input_interrupt): Only send interrupts if the target
20419 is running.
20420 * server.c (extended_protocol): Make static.
20421 (attached): Define earlier.
20422 (exit_requested, response_needed, program_argv): New variables.
20423 (target_running): New.
20424 (start_inferior): Clear attached here.
20425 (attach_inferior): Set attached here.
20426 (require_running): Define.
20427 (handle_query): Use require_running and target_running. Implement
20428 "monitor exit".
20429 (handle_v_attach, handle_v_run): New.
20430 (handle_v_requests): Use require_running. Handle vAttach and vRun.
20431 (gdbserver_usage): Update.
20432 (main): Redo argument parsing. Handle --debug and --multi. Handle
20433 --attach along with other options or after the port. Save
20434 program_argv. Support no initial program. Resynchronize
20435 communication with GDB after an error. Handle "monitor exit".
20436 Use require_running and target_running. Always allow the extended
20437 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
20438 restart in extended mode.
20439 * README: Refer to the GDB manual. Update --attach usage.
20440
20441 2007-12-20 Andreas Schwab <schwab@suse.de>
20442
20443 * linux-low.c (STACK_SIZE): Define.
20444 (linux_tracefork_child): Use it. Use __clone2 on ia64.
20445 (linux_test_for_tracefork): Likewise.
20446
20447 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
20448
20449 * linux-low.c (linux_wait_for_event): Update messages. Do not
20450 reinsert auto-delete breakpoints.
20451 * mem-break.c (struct breakpoint): Change return type of handler to
20452 int.
20453 (set_breakpoint_at): Update handler type.
20454 (reinsert_breakpoint_handler): Return 1 instead of calling
20455 delete_breakpoint.
20456 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
20457 setting a new one.
20458 (check_breakpoints): Delete auto-delete breakpoints and return 2.
20459 * mem-break.h (set_breakpoint_at): Update handler type.
20460 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
20461 * win32-low.c (auto_delete_breakpoint): New.
20462 (get_child_debug_event): Use it.
20463
20464 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
20465
20466 * configure.ac: Check for pread and pwrite.
20467 * hostio.c (handle_pread): Fall back to lseek and read.
20468 (handle_pwrite): Fall back to lseek and write.
20469 * config.in, configure: Regenerated.
20470
20471 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
20472
20473 * server.c (myresume): Add own_buf argument.
20474 (main): Update calls.
20475
20476 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
20477
20478 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
20479 * remote-utils.c (remote_open): Do not call disable_async_io.
20480 (block_async_io): Delete.
20481 (unblock_async_io): Make static.
20482 (initialize_async_io): New.
20483 * server.c (handle_v_cont): Handle async I/O here.
20484 (myresume): Likewise. Move other common resume tasks here...
20485 (main): ... from here. Call initialize_async_io. Disable async
20486 I/O before the main loop.
20487 * server.h (initialize_async_io): Declare.
20488 (block_async_io, unblock_async_io): Delete prototypes.
20489 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
20490
20491 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
20492
20493 * remote-utils.c (readchar): Allow binary data in received messages.
20494
20495 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20496
20497 * win32-low.c (attaching): New global.
20498 (win32_create_inferior): Clear the `attaching' global.
20499 (win32_attach): Set the `attaching' global.
20500 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
20501 attaching. Only set a breakpoint at the entry point if not
20502 attaching.
20503
20504 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20505
20506 * server.c (main): Don't report dll events on the initial
20507 connection on attaches.
20508
20509 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20510
20511 * server.c (main): Relax numerical bases supported for the pid of
20512 the --attach command line argument.
20513
20514 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20515
20516 * win32-low.c (win32_attach): Call OpenProcess before
20517 DebugActiveProcess, not after. Add last error output to error
20518 call.
20519
20520 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20521
20522 * win32-low.c (win32_get_thread_context)
20523 (win32_set_thread_context): New functions.
20524 (thread_rec): Use win32_get_thread_context.
20525 (continue_one_thread, win32_resume): Use win32_set_thread_context.
20526 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
20527 field.
20528
20529 2007-12-03 Leo Zayas
20530 Pedro Alves <pedro_alves@portugalmail.pt>
20531
20532 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
20533 global variables.
20534 (child_add_thread): Minor cleanup.
20535 (child_continue): Resume artificially suspended threads before
20536 calling ContinueDebugEvent.
20537 (suspend_one_thread): New.
20538 (fake_breakpoint_event): New.
20539 (get_child_debug_event): Change return type to int. Check here if
20540 gdb sent an interrupt request. If a soft interrupt was requested,
20541 fake a breakpoint event. Return 0 if there is no event to handle,
20542 and 1 otherwise.
20543 (win32_wait): Don't check here if gdb sent an interrupt request.
20544 Ensure there is a valid event to handle.
20545 (win32_request_interrupt): Add soft interruption method as last
20546 resort.
20547
20548 2007-12-03 Leo Zayas
20549 Pedro Alves <pedro_alves@portugalmail.pt>
20550
20551 * win32-low.h (win32_thread_info): Add descriptions to the
20552 structure members. Replace `suspend_count' counter by a
20553 `suspended' flag.
20554 * win32-low.c (thread_rec): Update condition of when to get the
20555 context from the inferior. Rely on ContextFlags being set if it
20556 has already been retrieved. Only suspend the inferior thread if
20557 we haven't already. Warn if that fails.
20558 (continue_one_thread): s/suspend_count/suspended/. Only call
20559 ResumeThread once. Warn if that fails.
20560
20561 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20562
20563 * win32-low.c (win32_wait): Don't read from the inferior when it
20564 has already exited.
20565
20566 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20567
20568 * Makefile.in (win32_low_h): New variable.
20569 (win32-low.o): Add dependency on $(win32_low_h).
20570 (win32-arm-low.o, win32-i386-low.o): New rules.
20571
20572 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20573
20574 * hostio.c: Correct copyright year.
20575
20576 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20577
20578 * Makefile.in (OBS): Add hostio.o.
20579 (hostio.o): New rule.
20580 * server.h (handle_vFile): Declare.
20581 * hostio.c: New file.
20582 * server.c (handle_v_requests): Take packet_len and new_packet_len
20583 for binary packets. Call handle_vFile.
20584 (main): Update call to handle_v_requests.
20585
20586 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
20587
20588 * linux-low.c: Include <sched.h>.
20589
20590 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
20591
20592 * linux-low.c (linux_tracefork_grandchild): New.
20593 (linux_tracefork_child): Use clone.
20594 (linux_test_for_tracefork): Use clone; allocate and free a stack.
20595
20596 2007-10-31 Joel Brobecker <brobecker@adacore.com>
20597
20598 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
20599
20600 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
20601
20602 * linux-low.c (handle_extended_wait): Handle unexpected signals.
20603
20604 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
20605
20606 * inferiors.c (change_inferior_id): Delete.
20607 (add_pid_to_list, pull_pid_from_list): New.
20608 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
20609 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
20610 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
20611 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
20612 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
20613 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
20614 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
20615 (using_threads): Always set to 1.
20616 (handle_extended_wait): New.
20617 (add_process): Do not set TID.
20618 (linux_create_inferior): Set must_set_ptrace_flags.
20619 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
20620 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
20621 (linux_thread_alive): Rename TID argument to LWPID.
20622 (linux_wait_for_process): Handle unknown processes. Do not use TID.
20623 (linux_wait_for_event): Do not use TID or check using_threads. Update
20624 call to dead_thread_notify. Call handle_extended_wait.
20625 (linux_create_inferior): Use PTRACE_SETOPTIONS.
20626 (send_sigstop): Delete sigstop_sent.
20627 (wait_for_sigstop): Avoid TID.
20628 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
20629 (linux_test_for_tracefork): New.
20630 (linux_lookup_signals): Use thread_db_active and
20631 linux_supports_tracefork_flag.
20632 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
20633 * linux-low.h (get_process_thread): Avoid TID.
20634 (struct process_ifo): Move thread_known and tid to the end. Remove
20635 sigstop_sent.
20636 (linux_attach_lwp, thread_db_init): Update prototypes.
20637 * server.h (change_inferior_id): Delete prototype.
20638 (add_pid_to_list, pull_pid_from_list): New prototypes.
20639 * thread-db.c (thread_db_use_events): New.
20640 (find_first_thread): Rename to...
20641 (find_one_thread): ...this. Update callers and messages. Do not
20642 call fatal. Check thread_db_use_events. Do not call
20643 change_inferior_id or new_thread_notify.
20644 (maybe_attach_thread): Update. Do not call new_thread_notify.
20645 (thread_db_init): Set thread_db_use_events. Check use_events.
20646 * utils.c (fatal, warning): Correct message prefix.
20647
20648 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
20649
20650 * Makefile.in (clean): Remove new files.
20651 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
20652 (powerpc-64.o, powerpc-64.c): New rules.
20653 * configure.srv: Use alternate register sets for powerpc64-*-linux*
20654 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
20655 with SPE.
20656 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
20657 SPE targets.
20658 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
20659 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
20660 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
20661 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
20662 (target_regsets): Add AltiVec and SPE register sets.
20663 * configure.ac: Check for AltiVec and SPE.
20664 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
20665 (ppc_fill_vrregset, ppc_store_vrregset): New.
20666 (target_regsets): Add AltiVec register set.
20667 * configure: Regenerated.
20668
20669 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
20670
20671 * linux-low.c (O_LARGEFILE): Define.
20672 (linux_read_memory): Use /proc/PID/mem.
20673 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
20674 * configure, config.in: Regenerated.
20675
20676 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
20677
20678 * linux-low.c (linux_wait_for_event): Do not pass signals while
20679 single-stepping.
20680
20681 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20682
20683 * win32-low.c (create_process): New.
20684 (win32_create_inferior): Use create_process instead of
20685 CreateProcess. If create_process failed retry appending an ".exe"
20686 suffix. Store the GetLastError result immediatelly after
20687 create_process calls and use it on the call to error.
20688
20689 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20690
20691 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
20692
20693 2007-08-23 Joel Brobecker <brobecker@adacore.com>
20694
20695 * configure.ac: Switch license to GPLv3.
20696
20697 2007-08-01 Michael Snyder <msnyder@access-company.com>
20698
20699 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
20700
20701 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
20702
20703 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
20704 typedef.
20705 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
20706 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
20707 CloseToolhelp32Snapshot.
20708 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
20709 CloseToolhelp32Snapshot.
20710
20711 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
20712
20713 * server.c (main): Check for inferior exit before main loop.
20714
20715 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
20716
20717 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
20718 instead of on tmp_desc.
20719
20720 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
20721 Daniel Jacobowitz <dan@codesourcery.com>
20722
20723 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
20724 (add_thread): Minor cleanups.
20725 (clear_inferiors): Move lower in the file. Clear the DLL
20726 list.
20727 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
20728 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
20729 (xml_escape_text): New.
20730 * server.c (handle_query): Handle qXfer:libraries:read. Report it
20731 for qSupported.
20732 (handle_v_cont): Report errors.
20733 (gdbserver_version): Update.
20734 (main): Correct size of own_buf. Do not report initial DLL events.
20735 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
20736 (unloaded_dll, xml_escape_text): New.
20737 * win32-low.c (enum target_waitkind): Update comments.
20738 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
20739 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
20740 (win32_EnumProcessModules, win32_GetModuleInformation)
20741 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
20742 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
20743 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
20744 (win32_Module32First, win32_Module32Next, load_toolhelp)
20745 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
20746 (get_child_debug_event): Handle DLL events.
20747 (win32_wait): Likewise.
20748
20749 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
20750
20751 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
20752 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
20753
20754 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20755
20756 * win32-low.c (handle_output_debug_string): Ignore event if not
20757 waiting.
20758
20759 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20760
20761 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
20762
20763 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
20764
20765 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
20766
20767 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
20768
20769 * inferiors.c (change_inferior_id): Add comment.
20770 * linux-low.c (check_removed_breakpoint): Add an early
20771 prototype. Improve debug output.
20772 (linux_attach): Doc update.
20773 (linux_detach_one_process, linux_detach): Clean up before releasing
20774 each process.
20775 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
20776 * linux-low.h (struct process_info): Doc improvement.
20777 * mem-break.c (delete_all_breakpoints): New.
20778 * mem-break.h (delete_all_breakpoints): New prototype.
20779 * thread-db.c (find_first_thread): New.
20780 (thread_db_create_event): Call it instead of
20781 thread_db_find_new_threads. Clean up unused variables.
20782 (maybe_attach_thread): Remove first thread handling.
20783 (thread_db_find_new_threads): Use find_first_thread.
20784 (thread_db_get_tls_address): Likewise.
20785
20786 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
20787
20788 * thread-db.c (thread_db_find_new_threads): Add prototype.
20789 (thread_db_create_event): Check for the main thread before adding
20790 a new thread.
20791 (maybe_attach_thread): Only enable event reporting if TID == 0.
20792 (thread_db_get_tls_address): Check for new threads.
20793
20794 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
20795
20796 * linux-low.c (linux_create_inferior): Try execv before execvp.
20797 * spu-low.c (spu_create_inferior): Likewise.
20798
20799 2007-06-13 Mike Frysinger <vapier@gentoo.org>
20800
20801 * linux-low.c (linux_create_inferior): Change execv to execvp.
20802 * spu-low.c (spu_create_inferior): Likewies.
20803
20804 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
20805
20806 * Makefile.in (clean): Clean new files instead of deleted ones.
20807 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
20808 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
20809 rules.
20810 * configure.srv: Specify XML files and new regformats for MIPS and
20811 MIPS64 GNU/Linux.
20812 * linux-mips-low.c (mips_num_regs): Set to only used registers.
20813 (mips_regmap): Do not fetch $0. Remove unused registers. Add
20814 an entry for the restart register.
20815 (mips_cannot_fetch_register, mips_cannot_store_register)
20816 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
20817 register names to match the XML descriptions.
20818 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
20819 restart register instead of $0.
20820
20821 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20822 Markus Deuling <deuling@de.ibm.com>
20823
20824 * remote-utils.c (decode_xfer_write): New function.
20825 * server.h (decode_xfer_write): Add prototype.
20826 * server.c (handle_query): Add PACKET_LEN argument. Support
20827 qXfer:spu:read and qXfer:spu:write packets.
20828 (main): Pass packet_len to handle_query.
20829 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
20830 * target.h (target_ops): Add qxfer_spu.
20831
20832 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20833
20834 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
20835 accessing non-seekable spufs files.
20836
20837 2007-05-16 Markus Deuling <deuling@de.ibm.com>
20838
20839 * server.c (handle_query): Add reply for qC packet.
20840
20841 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20842 Leo Zayas <lerele@champenstudios@com>
20843
20844 * server.h (check_remote_input_interrupt_request): New function.
20845 * remote_utils.c (INVALID_DESCRIPTOR): New define.
20846 (remote_desc): Initialize with INVALID_DESCRIPTOR.
20847 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
20848 (check_remote_input_interrupt_request): New function.
20849 * server.h (check_remote_input_interrupt_request): Declare.
20850 * win32-low.c (winapi_DebugBreakProcess,
20851 winapi_GenerateConsoleCtrlEvent): New typedefs.
20852 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
20853 to 250 ms.
20854 (win32_wait): Check for remote interrupt request
20855 with check_remote_input_interrupt_request.
20856 (win32_request_interrupt): New function.
20857 (win32_target_op): Set request_interrupt to win32_request_interrupt.
20858
20859 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20860
20861 * win32-low.c (debug_registers_changed,
20862 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
20863 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
20864 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
20865 (thread_rec): Get context using the low target.
20866 (child_add_thread): Call thread_added on the low target,
20867 which does the same thing.
20868 (regptr): Delete.
20869 (do_initial_child_stuff): Remove debug registers references.
20870 Set context using the low target. Resume threads after
20871 setting the contexts.
20872 (child_continue): Remove dead variable. Remove debug
20873 registers references.
20874 (child_fetch_inferior_registers): Go through the low target.
20875 (do_child_store_inferior_registers): Remove.
20876 (child_store_inferior_registers): Go through the low target.
20877 (win32_resume): Remove debug registers references.
20878 Set context using the low target.
20879 (handle_exception): Change return type to void. Don't record
20880 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
20881 first chance exception.
20882 (get_child_debug_event): Change return type to void. Remove
20883 goto loop. Always return after waiting for debug event.
20884 (win32_wait): Convert to switch statement. Handle spurious
20885 events.
20886
20887 * win32-i386-low.c (debug_registers_changed,
20888 debug_registers_used): New.
20889 (initial_stuff): Rename to ...
20890 (i386_initial_stuff): ... this. Clear debug registers
20891 state variables.
20892 (store_debug_registers): Delete.
20893 (i386_get_thread_context): New.
20894 (load_debug_registers): Delete.
20895 (i386_set_thread_context): New.
20896 (i386_thread_added): New.
20897 (single_step): Rename to ...
20898 (i386_single_step): ... this.
20899 (do_fetch_inferior_registers): Rename to ...
20900 (i386_fetch_inferior_register): ... this.
20901 (i386_store_inferior_register): New.
20902 (the_low_target): Adapt to new interface.
20903
20904 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
20905 (arm_get_thread_context): New.
20906 (arm_set_thread_context): New.
20907 (regptr): New.
20908 (do_fetch_inferior_registers): Rename to ...
20909 (arm_fetch_inferior_register): ... this.
20910 (arm_store_inferior_register): New.
20911 (arm_wince_breakpoint): Reimplement as unsigned long.
20912 (arm_wince_breakpoint_len): Define.
20913 (the_low_target): Adapt to new interface.
20914
20915 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
20916 load_debug_registers. Add get_thread_context, set_thread_context,
20917 thread_added and store_inferior_register. Rename
20918 fetch_inferior_registers to fetch_inferior_register.
20919 (regptr): Remove declaration.
20920
20921 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20922
20923 * linux-low.c (linux_detach): Change return type to int. Return 0.
20924 * spu-low.c (spu_detach): Likewise.
20925
20926 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20927
20928 * target.h (target_ops): Change return type of detach to int.
20929 Add join.
20930 (join_inferior): New.
20931 * server.c (main): Don't skip detach support on mingw32.
20932 If the inferior doesn't support detaching return error.
20933 Call join_inferior instead of using waitpid.
20934 * linux-low.c (linux_join): New.
20935 (linux_target_op): Add linux_join.
20936 * spu-low.c (spu_join): New.
20937 (spu_target_ops): Add spu_join.
20938 * win32-low.c (win32_detach): Adapt to new interface.
20939 Reopen current_process_handle before detaching. Issue a child
20940 resume before detaching.
20941 (win32_join): New.
20942 (win32_target_op): Add win32_join.
20943
20944 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20945
20946 * win32-low.c (win32-attach): Fix return value.
20947 * target.h (target_ops): Describe ATTACH return values.
20948
20949 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20950
20951 * win32-low.c (GETPROCADDRESS): Define.
20952 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
20953 (winapi_DebugSetProcessKillOnExit): Likewise.
20954 (win32_create_inferior): Force usage of ansi CreateProcessA.
20955 (win32_attach): Use GETPROCADDRESS.
20956 (win32_detach): Likewise.
20957
20958 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20959
20960 * win32-low.c (win32_wait): Don't use WSTOPSIG.
20961
20962 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
20963
20964 * win32-low.c: Commit leftover changes from 2007-03-29.
20965
20966 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20967
20968 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
20969 fields short instead of int. Add explicit padding.
20970 (i387_cache_to_fsave): Remove unnecessary casts.
20971 (i387_fsave_to_cache): Doc fix.
20972 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
20973
20974 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20975
20976 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
20977 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
20978
20979 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20980
20981 * configure.srv (arm*-*-mingw32ce*): Move near the other
20982 arm targets.
20983
20984 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20985
20986 * configure.ac: Add errno checking.
20987 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
20988 sys/file.h and malloc.h.
20989 (AC_CHECK_DECLS): Add perror.
20990 (srv_mingwce): Handle.
20991 * configure.srv (i[34567]86-*-cygwin*): Add
20992 win32-i386-low.o to srv_tgtobj.
20993 (i[34567]86-*-mingw*): Likewise.
20994 (arm*-*-mingw32ce*): Add case.
20995 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20996 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
20997 [__MINGW32CE__] (strerror): New function.
20998 [__MINGW32CE__] (errno): Define to GetLastError.
20999 [__MINGW32CE__] (COUNTOF): New macro.
21000 (remote_open): Remove extra close call.
21001 * mem-break.c (delete_breakpoint_at): New function.
21002 * mem-break.h (delete_breakpoint_at): Declare.
21003 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
21004 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
21005 [USE_WIN32API] (read, write): Add char* casts.
21006 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
21007 * server.h: Include wincecompat.h on Windows CE.
21008 [HAVE_ERRNO_H]: Check.
21009 (perror): Declare if not declared.
21010 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
21011 (perror_with_name): Remove errno declaration.
21012 * wincecompat.h: New.
21013 * wincecompat.c: New.
21014 * win32-low.h: New.
21015 * win32-arm-low.c: New.
21016 * win32-i386-low.c: New.
21017 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
21018 (OUTMSG2): Make it safe.
21019 (_T): New macro.
21020 (COUNTOF): New macro.
21021 (NUM_REGS): Get it from the low target.
21022 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
21023 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
21024 (thread_rec): Let low target handle debug registers.
21025 (child_add_thread): Likewise.
21026 (child_init_thread_list): Likewise.
21027 (continue_one_thread): Likewise.
21028 (regptr): New.
21029 (do_child_fetch_inferior_registers): Move to ...
21030 * win32-i386-low.c: ... here, and rename to ...
21031 (do_fetch_inferior_registers): ... this.
21032 * win32-low.c (child_fetch_inferior_registers):
21033 Go through the low target.
21034 (do_child_store_inferior_registers): Use regptr.
21035 (strwinerror): New function.
21036 (win32_create_inferior): Handle Windows CE.
21037 Use strwinerror instead of strerror on Windows error
21038 codes. Add program to the error output.
21039 Don't close the main thread handle on Windows CE.
21040 (win32_attach): Use coredll.dll on Windows CE.
21041 (win32_kill): Close current process and current
21042 thread handles.
21043 (win32_detach): Use coredll.dll on Windows CE.
21044 (win32_resume): Let low target handle debug registers, and
21045 step request.
21046 (handle_exception): Add/Remove initial breakpoint. Avoid
21047 non-existant WSTOPSIG on Windows CE.
21048 (win32_read_inferior_memory): Cast to remove warning.
21049 (win32_arch_string): Go through the low target.
21050 (initialize_low): Call set_breakpoint_data with the low
21051 target's breakpoint.
21052 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
21053 FOP_REGNUM, mappings): Move to ...
21054 * win32-i386-low.c: ... here.
21055 * win32-low.c (win32_thread_info): Move to ...
21056 * win32-low.h: ... here.
21057 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
21058 win32-arm-low.c and wincecompat.c.
21059 (all:): Add $EXEEXT.
21060 (install-only:): Likewise.
21061 (gdbserver:): Likewise.
21062 (gdbreplay:): Likewise.
21063 * config.in: Regenerate.
21064 * configure: Regenerate.
21065
21066 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
21067
21068 * win32-low.c: Rename typedef thread_info to
21069 win32_thread_info throughout.
21070
21071 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
21072
21073 * win32-i386-low.c: Rename to ...
21074 * win32-low.c: ... this.
21075 * configure.srv: Replace win32-i386-low.o with win32-low.o.
21076 * Makefile.in: Likewise.
21077
21078 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
21079
21080 * remote-utils.c (monitor_output): Constify msg parameter.
21081 * server.h (monitor_output): Likewise.
21082 * win32-i386-low.c (handle_output_debug_string): New.
21083 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
21084 handle_output_debug_string.
21085 (get_child_debug_event): Likewise.
21086
21087 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
21088
21089 * server.c (main): Correct strtoul check.
21090
21091 2007-03-27 Jon Ringle <jon@ringle.org>
21092
21093 * linux-low.c: Check __ARCH_HAS_MMU__ also.
21094
21095 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
21096
21097 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
21098
21099 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
21100
21101 * terminal.h: Check HAVE_SGTTY_H.
21102
21103 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
21104
21105 * remote-utils.c (remote_open): Print out the assigned port number.
21106
21107 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
21108
21109 * remote-utils.c (monitor_output): New function.
21110 * server.c (debug_threads): Define here.
21111 (monitor_show_help): New function.
21112 (handle_query): Handle qRcmd.
21113 (main): Do not handle 'd' packet.
21114 * server.h (debug_threads, remote_debug, monitor_output): Declare.
21115 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
21116 of debug_threads.
21117
21118 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21119
21120 * Makefile.in (EXEEXT): New.
21121 (clean): Use $(EXEEXT).
21122
21123 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21124
21125 * target.h (target_ops): Rename send_signal to request_interrupt,
21126 and remove enum target_signal parameter.
21127 * linux-low.c (linux_request_interrupt): Rename from
21128 linux_send_signal, and always send SIGINT.
21129 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
21130 and always send SIGINT.
21131 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
21132 of send_signal.
21133 (input_interrupt): Likewise.
21134
21135 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21136
21137 * server.c (get_features_xml): Check if target implemented
21138 arch_string.
21139 * win32-i386-low.c (win32_arch_string): New.
21140 (win32_target_ops): Add win32_arch_string as arch_string member.
21141
21142 2007-02-22 Markus Deuling <deuling@de.ibm.com>
21143
21144 * spu-low.c (spu_arch_string): New.
21145 (spu_target_ops): Add spu_arch_string.
21146
21147 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
21148
21149 * remote-utils.c: Remove HAVE_TERMINAL_H check.
21150 * configure.ac: Do not check for terminal.h.
21151 * configure, config.in: Regenerated.
21152
21153 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
21154
21155 * Makefile.in (OBS): Add $(XML_BUILTIN).
21156 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
21157 (clean): Update.
21158 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
21159 (arm-with-iwmmxt.c): New.
21160 * config.in, configure: Regenerate.
21161 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
21162 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
21163 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
21164 (arm*-*-linux*): Add iWMMXt and regset support.
21165 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
21166 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
21167 (arm_store_wmmxregset, target_regsets): New.
21168 * server.c (get_features_xml): Take annex argument. Check builtin
21169 XML documents.
21170 (handle_query): Handle multiple annexes.
21171
21172 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
21173
21174 * remote-utils.c [USE_WIN32API] (read, write): Define.
21175 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
21176 write.
21177
21178 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
21179
21180 * linux-i386-low.c (the_low_target): Set arch_string.
21181 * linux-x86-64-low.c (the_low_target): Likewise.
21182 * linux-low.c (linux_arch_string): New.
21183 (linux_target_ops): Add it.
21184 * linux-low.h (struct linux_target_ops): Add arch_string.
21185 * server.c (write_qxfer_response): Use const void * for DATA.
21186 (get_features_xml): New.
21187 (handle_query): Handle qXfer:features:read. Report it for qSupported.
21188 * target.h (struct target_ops): Add arch_string method.
21189
21190 2007-01-03 Denis Pilat <denis.pilat@st.com>
21191 Daniel Jacobowitz <dan@codesourcery.com>
21192
21193 * linux-low.c (linux_kill): Handle being called with no threads.
21194 * win32-i386-low.c (win32_kill): Likewise.
21195 (get_child_debug_event): Clear current_process_handle.
21196
21197 2006-12-30 Denis PILAT <denis.pilat@st.com>
21198 Daniel Jacobowitz <dan@codesourcery.com>
21199
21200 * remote-utils.c (remote_open): Check the type of specified
21201 serial port devices before opening them.
21202 * server.c (main): Kill the inferior if an error occurs during
21203 the first remote_open.
21204
21205 2006-12-05 Markus Deuling <deuling@de.ibm.com>
21206
21207 * README: Update supported targets.
21208
21209 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
21210
21211 * Makefile.in (clean): Remove reg-mips64.c.
21212 (reg-mips64.c, reg-mips64.o): New rules.
21213 * configure.srv: Handle mips64. Include regset support for mips.
21214 * linux-mips-low.c (union mips_register): New.
21215 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
21216 (mips_breakpoint, mips_breakpoint_at): Use int.
21217 (mips_collect_register, mips_supply_register)
21218 (mips_collect_register_32bit, mips_supply_register_32bit)
21219 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
21220 (mips_store_fpregset, target_regsets): New.
21221 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
21222
21223 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
21224
21225 * configure.srv: Add target "spu*-*-*".
21226 * Makefile.in (clean): Remove reg-spu.c.
21227 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
21228 * spu-low.c: New file.
21229
21230 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
21231
21232 * configure.ac: Correct td_thr_tls_get_addr test.
21233 * configure: Regenerated.
21234
21235 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
21236
21237 * linux-low.c (linux_wait_for_event): Reformat. Use the
21238 pass_signals array.
21239 * remote-utils.c (decode_address_to_semicolon): New.
21240 * server.c (pass_signals, handle_general_set): New.
21241 (handle_query): Mention QPassSignals for qSupported.
21242 (main): Call handle_general_set.
21243 * server.h (pass_signals, decode_address_to_semicolon): New.
21244
21245 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
21246
21247 * server.c (handle_query): Correct error handling for read_auxv.
21248
21249 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
21250
21251 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
21252 and srv_linux_thread_db to yes.
21253 * linux-s390-low.c (s390_fill_gregset): New function.
21254 (target_regsets): Define data structure.
21255
21256 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
21257
21258 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
21259 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
21260 * config.in, configure: Regenerated.
21261 * inferiors.c (gdb_id_to_thread): New function.
21262 (gdb_id_to_thread_id): Use it.
21263 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
21264 * linux-low.h (struct process_info): Add th member.
21265 (thread_db_get_tls_address): New prototype.
21266 * remote-utils.c (decode_address): Make non-static.
21267 * server.c (handle_query): Handle qGetTLSAddr.
21268 * server.h (gdb_id_to_thread, decode_address): New prototypes.
21269 * target.h (struct target_ops): Add get_tls_address.
21270 * thread-db.c (maybe_attach_thread): Save the thread handle.
21271 (thread_db_get_tls_address): New.
21272
21273 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
21274
21275 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
21276 (linux_resume_one_process): Take a siginfo_t *. Update all
21277 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
21278 (struct pending_signals): Add a siginfo_t.
21279 (linux_wait_for_process): Always set last_status.
21280 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
21281 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
21282 * linux-low.h (struct process_info): Add last_status.
21283
21284 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
21285
21286 * remote-utils.c (try_rle): New function.
21287 (putpkt_binary): Use it.
21288
21289 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
21290
21291 * Makefile.in (clean): Clean reg-x86-64-linux.c.
21292 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
21293 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
21294 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
21295 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
21296 point registers.
21297
21298 2006-08-08 Richard Sandiford <richard@codesourcery.com>
21299
21300 * server.c (terminal_fd): New variable.
21301 (old_foreground_pgrp): Likewise.
21302 (restore_old_foreground_pgrp): New function.
21303 (start_inferior): Record the terminal file descriptor in terminal_fd
21304 and its original foreground group in old_foreground_pgrp. Register
21305 restore_old_foreground_pgrp with atexit().
21306
21307 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
21308
21309 * server.c (handle_query): Correct qPart to qXfer.
21310
21311 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
21312
21313 * configure.ac: Check for more headers which are missing on
21314 Windows. Automatically supply -lwsock32 and USE_WIN32API.
21315 * configure.srv: Add Cygwin and mingw32.
21316 * remote-utils.c: Don't include headers unconditionally which
21317 are missing on mingw32. Include <winsock.h> for mingw32.
21318 (remote_open): Adjust for mingw32 support. Flush
21319 standard error after writing to it.
21320 (remote_close, putpkt_binary, input_interrupt, block_async_io)
21321 (unblock_async_io, enable_async_io, disable_async_io)
21322 (readchar, getpkt): Update for Winsock support.
21323 (prepare_resume_reply): Expect a protocol signal number.
21324 * server.c: Disable <sys/wait.h> on mingw32.
21325 (start_inferior): Adjust for mingw32 support. Flush
21326 standard error after writing to it.
21327 (attach_inferior): Likewise. Use protocol signal
21328 numbers.
21329 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
21330 and names.
21331 * win32-i386-low.c: New file.
21332 * Makefile.in (XM_CLIBS): Set.
21333 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
21334 (win32-i386-low.o): New dependency rule.
21335 * linux-low.c (linux_wait): Use target signal numbers.
21336 * target.h (struct target_ops): Doc fix.
21337 * server.h (target_signal_to_name): New prototype.
21338 * gdbreplay.c: Don't include headers unconditionally which
21339 are missing on mingw32. Include <winsock.h> for mingw32.
21340 (remote_close, remote_open): Adjust for Winsock support.
21341 * configure, config.in: Regenerated.
21342
21343 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
21344
21345 * server.c (decode_xfer_read, write_qxfer_response): New.
21346 (handle_query): Take a packet length argument. Handle
21347 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
21348 the qSupported response.
21349 (main): Update call to handle_query.
21350
21351 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
21352
21353 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
21354 (putpkt_binary): Renamed from putpkt and adjusted for binary
21355 data.
21356 (putpkt): New wrapper for putpkt_binary.
21357 (readchar): Don't mask off the high bit.
21358 (decode_X_packet): New function.
21359 * server.c (main): Call putpkt_binary if a handler sets the packet
21360 length. Save the length of the incoming packet. Handle 'X'.
21361 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
21362
21363 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
21364
21365 * server.c (handle_query): Handle qSupported.
21366
21367 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21368
21369 * remote-utils.c (all_symbols_looked_up): New variable.
21370 (look_up_one_symbol): Check it.
21371 * server.h (look_up_one_symbol): New declaration.
21372 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
21373
21374 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21375
21376 * Makefile.in (linux-arm-low.o): Update dependencies.
21377 * linux-arm-low.c: Include "gdb_proc_service.h".
21378 (PTRACE_GET_THREAD_AREA): Define.
21379 (ps_get_thread_area): New function.
21380
21381 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
21382
21383 * configure.srv (m68k*-*-uclinux*): New target.
21384 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
21385 (linux_resume_one_process): Remove extraneous cast.
21386 (linux_read_offsets): New.
21387 (linux_target_op): Add linux_read_offsets on mmuless systems.
21388 * server.c (handle_query): Add qOffsets logic.
21389 * target.h (struct target_ops): Add read_offsets.
21390
21391 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21392
21393 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
21394 (PTRACE_GET_THREAD_AREA): Define.
21395 (ps_get_thread_area): New function.
21396 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
21397 (linux-x86-64-low.o): Update.
21398
21399 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21400
21401 * configure.ac: Remove checks for prfpregset_t.
21402 * gdb_proc_service.h: New file.
21403 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
21404 new "gdb_proc_service.h".
21405 * proc-service.c: Likewise.
21406 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
21407 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
21408 * Makefile.in (gdb_proc_service_h): Updated.
21409 * configure, config.in: Regenerated.
21410
21411 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21412
21413 * remote-utils.c (prepare_resume_reply): Move declaration
21414 of gdb_id_from_wait to the top of the block.
21415
21416 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
21417
21418 * linux-low.c (regsets_store_inferior_registers): Read the regset
21419 from the target before filling it.
21420
21421 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
21422
21423 * server.c (attach_inferior): Return SIGTRAP for a successful
21424 attach.
21425
21426 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
21427
21428 * Makefile.in (OBS): Add version.o.
21429 (STAGESTUFF): Delete.
21430 (version.o): Add dependencies.
21431 (version.c): Replace rule.
21432 (clean): Remove version.c.
21433 * server.c (gdbserver_version): New.
21434 (gdbserver_usage): Use printf.
21435 (main): Handle --version and --help.
21436 * server.h (version, host_name): Add declarations.
21437
21438 2005-12-23 Eli Zaretskii <eliz@gnu.org>
21439
21440 * linux-arm-low.c:
21441 * linux-arm-low.c:
21442 * inferiors.c:
21443 * i387-fp.h:
21444 * i387-fp.c:
21445 * gdbreplay.c:
21446 * regcache.c:
21447 * proc-service.c:
21448 * mem-break.h:
21449 * mem-break.c:
21450 * linux-x86-64-low.c:
21451 * linux-sh-low.c:
21452 * linux-s390-low.c:
21453 * linux-ppc64-low.c:
21454 * linux-ppc-low.c:
21455 * linux-mips-low.c:
21456 * linux-m68k-low.c:
21457 * linux-m32r-low.c:
21458 * linux-low.h:
21459 * linux-low.c:
21460 * linux-ia64-low.c:
21461 * linux-i386-low.c:
21462 * linux-crisv32-low.c:
21463 * thread-db.c:
21464 * terminal.h:
21465 * target.h:
21466 * target.c:
21467 * server.h:
21468 * server.c:
21469 * remote-utils.c:
21470 * regcache.h:
21471 * utils.c:
21472 * Makefile.in:
21473 * configure.ac:
21474 * gdbserver.1: Add (C) after Copyright. Update the FSF
21475 address.
21476
21477 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
21478
21479 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
21480 (arm_breakpoint_at): Recognize both breakpoints.
21481 (the_low_target): Use the correct breakpoint instruction.
21482
21483 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
21484
21485 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
21486 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
21487 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
21488 (the_low_target): Update.
21489
21490 2005-10-25 Andreas Schwab <schwab@suse.de>
21491
21492 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
21493
21494 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
21495 (ia64_num_regs): Reduce to 462.
21496
21497 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
21498
21499 * acinclude.m4: Correct quoting.
21500 * aclocal.m4: Regenerated.
21501
21502 Suggested by SZOKOVACS Robert <szo@ies.hu>:
21503 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
21504 (thread_db_init): Call thread_db_err_str.
21505 * configure.ac: Check for TD_VERSION.
21506 * config.in, configure: Regenerated.
21507
21508 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21509
21510 * server.h (error, fatal, warning): Add ATTR_FORMAT.
21511
21512 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21513
21514 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
21515 is not available. Define HAVE_PTRACE_GETREGS if it is.
21516 * config.in, configure: Regenerated.
21517 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
21518 * linux-i386-low.c, linux-m68k-low.c: Update to use
21519 HAVE_PTRACE_GETREGS.
21520 * linux-low.c (regsets_fetch_inferior_registers)
21521 (regsets_store_inferior_registers): Only return 0 if we processed
21522 GENERAL_REGS.
21523 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
21524 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
21525
21526 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21527
21528 * inferiors.c (struct thread_info): Add gdb_id.
21529 (add_thread): Add gdb_id argument.
21530 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
21531 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
21532 calls to add_thread.
21533 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
21534 * server.c (handle_query): Use thread_to_gdb_id.
21535 (handle_v_cont, main): Use gdb_id_to_thread_id.
21536 * server.h (add_thread): Update prototype.
21537 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
21538 prototypes.
21539
21540 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21541
21542 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
21543 left-padded registers.
21544 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
21545 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
21546
21547 2005-07-01 Steve Ellcey <sje@cup.hp.com>
21548
21549 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
21550 * configure: Regenerate.
21551 * config.in: Regenerate.
21552 * server.h (NEED_DECLARATION_STRERROR):
21553 Replace with !HAVE_DECL_STRERROR.
21554
21555 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
21556
21557 * linux-low.c (linux_wait, linux_send_signal): Don't test
21558 an unsigned long variable for > 0 if it could be MAX_ULONG.
21559 * server.c (myresume): Likewise.
21560 * target.c (set_desired_inferior): Likewise.
21561
21562 2005-06-13 Mark Kettenis <kettenis@gnu.org>
21563
21564 * configure.ac: Simplify and improve check for socklen_t.
21565 * configure, config.in: Regenerate.
21566
21567 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
21568
21569 * acconfig.h: Remove.
21570 * configure.ac: Add a test for socklen_t. Use three-argument
21571 AC_DEFINE throughout.
21572 * config.in: Regenerated using autoheader 2.59.
21573 * configure: Regenerated.
21574
21575 * gdbreplay.c (socklen_t): Provide a default.
21576 (remote_open): Use socklen_t.
21577 * remote-utils.c (socklen_t): Provide a default.
21578 (remote_open): Use socklen_t.
21579 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
21580 unsigned char.
21581
21582 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
21583 char for buffers.
21584 * linux-low.c (linux_read_memory, linux_write_memory)
21585 (linux_read_auxv): Likewise.
21586 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
21587 (check_mem_write): Likewise.
21588 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
21589 Likewise.
21590 * regcache.c (struct inferior_rgcache_data, registers_to_string)
21591 (registers_from_string, register_data): Likewise.
21592 * server.c (handle_query, main): Likewise.
21593 * server.h (convert_ascii_to_int, convert_int_to_ascii)
21594 (decode_M_packet): Likewise.
21595 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
21596 * target.h (struct target_ops): Update read_memory, write_memory,
21597 and read_auxv.
21598 (read_inferior_memory, write_inferior_memory): Update.
21599 * linux-low.h (struct linux_target_ops): Change type of breakpoint
21600 to unsigned char *.
21601 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
21602 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
21603 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
21604 linux-s390-low.c, linux-sh-low.c: Update for changes in
21605 read_inferior_memory and the_low_target->breakpoint.
21606
21607 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
21608
21609 * Makefile.in (SFILES): Add linux-ppc64-low.c.
21610 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
21611 * configure.srv: Add powerpc64-*-linux*.
21612 * linux-ppc64-low.c: New file.
21613
21614 2005-05-23 Orjan Friberg <orjanf@axis.com>
21615
21616 * linux-cris-low.c: New file with support for CRIS.
21617 * linux-crisv32-low.c: Ditto for CRISv32.
21618 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
21619 (clean): Add reg-cris.c and reg-crisv32.c.
21620 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
21621 reg-crisv32.o, and reg-crisv32.c to make rules.
21622 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
21623 recognized targets.
21624
21625 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
21626
21627 * linux-low.c (fetch_register): Ensure buffer size is a multiple
21628 of sizeof (PTRACE_XFER_TYPE).
21629 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
21630
21631 2005-05-12 Orjan Friberg <orjanf@axis.com>
21632
21633 * target.h (struct target_ops): Add insert_watchpoint,
21634 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
21635 pointers for hardware watchpoint support.
21636 * linux-low.h (struct linux_target_ops): Ditto.
21637 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
21638 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
21639 to linux_target_ops.
21640 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
21641 reply packet.
21642 * server.c (main): Recognize 'Z' and 'z' packets.
21643
21644 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
21645
21646 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
21647 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
21648 (the_low_target): Add new members.
21649
21650 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21651
21652 * proc-service.c (ps_lgetregs): Search all_processes instead of
21653 all_threads.
21654
21655 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21656
21657 * server.c (start_inferior): Change return type to int.
21658 (attach_inferior): Change sigptr to int *.
21659 (handle_v_cont, handle_v_requests): Change signal to int *.
21660 (main): Change signal to int.
21661
21662 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
21663
21664 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
21665 * configure.srv: Add m32r*-*-linux*.
21666 * linux-m32r-low.c: New file.
21667
21668 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
21669
21670 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
21671
21672 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21673
21674 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
21675 Take unsigned long arguments for PIDs.
21676 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
21677 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
21678 (wait_for_sigstop, linux_resume_one_process)
21679 (regsets_fetch_inferior_registers, linux_send_signal)
21680 (linux_read_auxv): Likewise. Update the types of variables holding
21681 PIDs. Update format string specifiers.
21682 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
21683 * remote-utils.c (prepare_resume_reply): Likewise.
21684 * server.c (cont_thread, general_thread, step_thread)
21685 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
21686 unsigned long.
21687 (handle_query): Update format specifiers.
21688 (handle_v_cont, main): Use strtoul for thread IDs.
21689 * server.h (struct inferior_list_entry): Use unsigned long for ID.
21690 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
21691 (general_thread, step_thread, thread_from_wait)
21692 (old_thread_from_wait): Update.
21693 * target.h (struct thread_resume): Use unsigned long for THREAD.
21694 (struct target_ops): Use unsigned long for arguments to attach and
21695 thread_alive.
21696
21697 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
21698
21699 * acinclude.m4: Include bfd/bfd.m4 directly.
21700 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
21701 <agriffis@toolchain.org>.
21702 * aclocal.m4, configure: Regenerated.
21703
21704 2005-01-07 Andrew Cagney <cagney@gnu.org>
21705
21706 * configure.ac: Rename configure.in, require autoconf 2.59.
21707 * configure: Re-generate.
21708
21709 2004-12-08 Daniel Jacobowitz <dan@debian.org>
21710
21711 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
21712 LIBS when finished.
21713 * aclocal.m4: Regenerated.
21714 * configure: Regenerated.
21715
21716 2004-11-21 Andreas Schwab <schwab@suse.de>
21717
21718 * linux-m68k-low.c (m68k_num_gregs): Define.
21719 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
21720 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
21721 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
21722 (m68k_breakpoint_at): New. Add to the_low_target.
21723
21724 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
21725 srv_linux_thread_db to yes.
21726
21727 2004-10-20 Joel Brobecker <brobecker@gnat.com>
21728
21729 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
21730 (ARCH_SET_FS): Likewise.
21731 (ARCH_GET_FS): Likewise.
21732 (ARCH_GET_GS): Likewise.
21733
21734 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21735
21736 * linux-i386-low.c (ps_get_thread_area): New.
21737 * linux-x86-64-low.c (ps_get_thread_area): New.
21738 * linux-low.c: Include <sys/syscall.h>.
21739 (linux_kill_one_process): Don't kill the first thread here.
21740 (linux_kill): Kill the first thread here.
21741 (kill_lwp): New function.
21742 (send_sigstop, linux_send_signal): Use it.
21743 * proc-service.c: Clean up #ifdefs.
21744 (fpregset_info): Delete.
21745 (ps_lgetregs): Update and enable implementation.
21746 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
21747 implementations.
21748 * remote-utils.c (struct sym_cache, symbol_cache): New.
21749 (input_interrupt): Print a clearer message.
21750 (async_io_enabled): New variable.
21751 (enable_async_io, disable_async_io): Use it. Update comments.
21752 (look_up_one_symbol): Use the symbol cache.
21753 * thread-db.c (thread_db_look_up_symbols): New function.
21754 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
21755
21756 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21757
21758 * configure.in: Test for -rdynamic.
21759 * configure: Regenerated.
21760 * Makefile (INTERNAL_LDFLAGS): New.
21761 (gdbserver, gdbreplay): Use it.
21762
21763 2004-09-02 Andrew Cagney <cagney@gnu.org>
21764
21765 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
21766
21767 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
21768
21769 * linux-low.c (linux_wait): Clear all_processes list also.
21770
21771 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21772
21773 * linux-low.c: Include <errno.h>. Remove extern declaration of
21774 errno.
21775
21776 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21777
21778 * gdbreplay.c, server.h, utils.c: Update copyright years.
21779
21780 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21781
21782 * server.c (main): Print child status or termination signal from
21783 variable 'signal', not 'sig'.
21784
21785 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21786
21787 * linux-low.c (linux_read_memory): Change return type to
21788 int. Check for and return error from ptrace().
21789 * target.c (read_inferior_memory): Change return type to int. Pass
21790 back return status from the_target->read_memory().
21791 * target.h (struct target_ops): Adapt *read_memory() prototype.
21792 Update comment.
21793 (read_inferior_memory): Adapt prototype.
21794 * server.c (main): Return an error packet if
21795 read_inferior_memory() returns an error.
21796
21797 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
21798
21799 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
21800 Unify with other clean targets.
21801
21802 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21803
21804 * server.c (handle_v_cont): Call set_desired_inferior.
21805
21806 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21807
21808 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
21809
21810 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21811
21812 * linux-low.c (linux_wait): Unblock async I/O.
21813 (linux_resume): Block and enable async I/O.
21814 * remote-utils.c (block_async_io, unblock_async_io): New functions.
21815 * server.h (block_async_io, unblock_async_io): Add prototypes.
21816
21817 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21818
21819 * remote-utils.c (remote_open): Print a status notice after
21820 opening a TCP port.
21821 * server.c (attach_inferior): Print a status notice after
21822 attaching.
21823
21824 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21825
21826 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
21827
21828 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
21829
21830 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
21831 error packet.
21832 * server.c, target.h: Update copyright years.
21833
21834 2004-02-25 Roland McGrath <roland@redhat.com>
21835
21836 * target.h (struct target_ops): New member `read_auxv'.
21837 * server.c (handle_query): Handle qPart:auxv:read: query using that.
21838 * linux-low.c (linux_read_auxv): New function.
21839 (linux_target_ops): Initialize `read_auxv' member to that.
21840
21841 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
21842
21843 Committed by Jim Blandy <jimb@redhat.com>.
21844
21845 * linux-s390-low.c (s390_num_regs): Update.
21846 (s390_regmap): Remove control registers. Use __s390x__ predefine
21847 instead of GPR_SIZE to distiguish s390 and s390x targets.
21848
21849 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
21850
21851 * linux-low.c: Update copyright year.
21852 (check_removed_breakpoint): Clear pending_is_breakpoint.
21853 (linux_set_resume_request, linux_queue_one_thread)
21854 (resume_status_pending_p): New functions.
21855 (linux_continue_one_thread): Use process->resume.
21856 (linux_resume): Only resume threads if there are no pending events.
21857 * linux-low.h (struct process_info): Add resume request
21858 pointer.
21859
21860 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
21861
21862 * regcache.c (new_register_cache): Clear the allocated register
21863 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
21864
21865 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
21866
21867 * linux-low.c (linux_resume): Take a struct thread_resume *
21868 argument.
21869 (linux_wait): Update call.
21870 (resume_ptr): New static variable.
21871 (linux_continue_one_thread): Renamed from
21872 linux_continue_one_process. Use resume_ptr.
21873 (linux_resume): Use linux_continue_one_thread.
21874 * server.c (handle_v_cont, handle_v_requests): New functions.
21875 (myresume): New function.
21876 (main): Handle 'v' case.
21877 * target.h (struct thread_resume): New type.
21878 (struct target_ops): Change argument of "resume" to struct
21879 thread_resume *.
21880 (myresume): Delete macro.
21881
21882 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
21883
21884 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
21885 (uninstall): Support DESTDIR.
21886
21887 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
21888
21889 * configure.srv: Add xscale*linux copy of arm*linux entry.
21890
21891 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
21892
21893 * linux-arm-low.c (arm_reinsert_addr): New function.
21894 (the_low_target): Add arm_reinsert_addr.
21895
21896 2003-07-08 Mark Kettenis <kettenis@gnu.org>
21897
21898 * mem-break.c: Remove whitespace at end of file.
21899
21900 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
21901
21902 * configure.in: Check whether we need to prototype strerror.
21903 * server.h: Optionally prototype strerror.
21904 * gdbreplay.c (perror_with_name): Use strerror.
21905 * linux-low.c (linux_attach_lwp): Use strerror.
21906 * utils.c (perror_with_name): Use strerror.
21907 * config.in, configure: Regenerated.
21908
21909 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
21910
21911 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
21912 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
21913
21914 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
21915
21916 * Makefile.in (SFILES): Update.
21917 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
21918 low-sun3.c: Remove files.
21919
21920 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
21921
21922 * linux-low.c: Move comment to linux_thread_alive where it belonged.
21923 (linux_detach_one_process, linux_detach): New functions.
21924 (linux_target_ops): Add linux_detach.
21925 * server.c (main): Handle 'D' packet.
21926 * target.h (struct target_ops): Add "detach" member.
21927 (detach_inferior): Define.
21928
21929 2003-06-13 Mark Kettenis <kettenis@gnu.org>
21930
21931 From Kelley Cook <kelleycook@wideopenwest.com>:
21932 * configure.srv: Accept i[34567]86 variants.
21933
21934 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
21935
21936 * linux-low.c (linux_wait_for_event): Correct comment typos.
21937 (linux_resume_one_process): Call check_removed_breakpoint.
21938 (linux_send_signal): New function.
21939 (linux_target_ops): Add linux_send_signal.
21940 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
21941 of kill.
21942 * target.h (struct target_ops): Add send_signal.
21943
21944 2003-05-29 Jim Blandy <jimb@redhat.com>
21945
21946 * linux-low.c (usr_store_inferior_registers): Transfer buf in
21947 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
21948 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
21949 away part of the register's value.
21950
21951 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
21952
21953 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
21954 (linux_wait_for_event, linux_init_signals): Likewise.
21955
21956 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
21957
21958 * configure.in: Check for stdlib.h.
21959 * configure: Regenerated.
21960 * config.in: Regenerated.
21961
21962 2003-01-04 Andreas Schwab <schwab@suse.de>
21963
21964 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
21965
21966 2003-01-02 Andrew Cagney <ac131313@redhat.com>
21967
21968 * Makefile.in: Remove obsolete code.
21969
21970 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
21971
21972 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
21973 defined(PT_FPR0_HI).
21974
21975 2002-11-17 Stuart Hughes <seh@zee2.com>
21976
21977 * linux-arm-low.c (arm_num_regs): Increase.
21978 (arm_regmap): Include status register.
21979
21980 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
21981
21982 * linux-low.c (register_addr): Remove incorrect -1 check.
21983
21984 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
21985
21986 * linux-low.c (linux_create_inferior): Call setpgid. Return
21987 the new PID.
21988 (unstopped_p, linux_signal_pid): Remove.
21989 (linux_target_ops): Remove linux_signal_pid.
21990 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
21991 global instead of target method.
21992 * target.h (struct target_ops): Remove signal_pid. Update comment
21993 for create_inferior.
21994 * server.c (signal_pid): New variable.
21995 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
21996 gdbserver. Set the child to be the foreground process group.
21997 (attach_inferior): Set signal_pid.
21998
21999 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
22000
22001 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
22002
22003 2002-08-20 Jim Blandy <jimb@redhat.com>
22004
22005 * Makefile.in (LDFLAGS): Allow the configure script to establish a
22006 default for this.
22007
22008 2002-08-01 Andrew Cagney <cagney@redhat.com>
22009
22010 * Makefile.in: Make chill references obsolete.
22011
22012 2002-07-24 Kevin Buettner <kevinb@redhat.com>
22013
22014 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
22015 * configure: Regenerate.
22016 * config.in: Regenerate.
22017
22018 2002-07-09 David O'Brien <obrien@FreeBSD.org>
22019
22020 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
22021 (perror_with_name, remote_close, remote_open, expect, play): Static.
22022
22023 2002-07-04 Michal Ludvig <mludvig@suse.cz>
22024
22025 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
22026 byte offsets instead of an array of indexes.
22027 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
22028
22029 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
22030
22031 * regcache.c: Add comment.
22032
22033 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
22034
22035 * thread-db.c: New file.
22036 * proc-service.c: New file.
22037 * acinclude.m4: New file.
22038 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
22039 proc-service.o, and thread-db.o.
22040 (linux-low.o): Add USE_THREAD_DB.
22041 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
22042 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
22043 * aclocal.m4: Regenerated.
22044 * config.in: Regenerated.
22045 * configure: Regenerated.
22046 * configure.in: Check for proc_service.h, sys/procfs.h,
22047 thread_db.h, and linux/elf.h headrs.
22048 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
22049 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
22050 Check for -lthread_db and thread support.
22051 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
22052 PowerPC, and SuperH.
22053 * i387-fp.c: Constify arguments.
22054 * i387-fp.h: Likewise.
22055 * inferiors.c: (struct thread_info): Renamed from
22056 `struct inferior_info'. Remove PID member. Use generic inferior
22057 list header. All uses updated.
22058 (inferiors, signal_pid): Removed.
22059 (all_threads): New variable.
22060 (get_thread): Define.
22061 (add_inferior_to_list): New function.
22062 (for_each_inferior): New function.
22063 (change_inferior_id): New function.
22064 (add_inferior): Removed.
22065 (remove_inferior): New function.
22066 (add_thread): New function.
22067 (free_one_thread): New function.
22068 (remove_thread): New function.
22069 (clear_inferiors): Use for_each_inferior and free_one_thread.
22070 (find_inferior): New function.
22071 (find_inferior_id): New function.
22072 (inferior_target_data): Update argument type.
22073 (set_inferior_target_data): Likewise.
22074 (inferior_regcache_data): Likewise.
22075 (set_inferior_regcache_data): Likewise.
22076 * linux-low.c (linux_bp_reinsert): Remove.
22077 (all_processes, stopping_threads, using_thrads)
22078 (struct pending_signals, debug_threads, pid_of): New.
22079 (inferior_pid): Replace with macro.
22080 (struct inferior_linux_data): Remove.
22081 (get_stop_pc, add_process): New functions.
22082 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
22083 Use add_process and add_thread.
22084 (linux_attach_lwp): New function, based on old linux_attach. Use
22085 add_process and add_thread. Set stop_expected for new threads.
22086 (linux_attach): New function.
22087 (linux_kill_one_process): New function.
22088 (linux_kill): Kill all LWPs.
22089 (linux_thread_alive): Use find_inferior_id.
22090 (check_removed_breakpoints, status_pending_p): New functions.
22091 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
22092 Update. Use WNOHANG. Wait for cloned processes also. Update process
22093 struct for the found process.
22094 (linux_wait_for_event): New function.
22095 (linux_wait): Use it. Support LWPs.
22096 (send_sigstop, wait_for_sigstop, stop_all_processes)
22097 (linux_resume_one_process, linux_continue_one_process): New functions.
22098 (linux_resume): Support LWPs.
22099 (REGISTER_RAW_SIZE): Remove.
22100 (fetch_register): Use register_size instead. Call supply_register.
22101 (usr_store_inferior_registers): Likewise. Call collect_register.
22102 Fix recursive case.
22103 (regsets_fetch_inferior_registers): Improve error message.
22104 (regsets_store_inferior_registers): Add debugging.
22105 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
22106 (unstopped_p, linux_signal_pid): New functions.
22107 (linux_target_ops): Add linux_signal_pid.
22108 (linux_init_signals): New function.
22109 (initialize_low): Call it. Initialize using_threads.
22110 * regcache.c (inferior_regcache_data): Add valid
22111 flag.
22112 (get_regcache): Fetch registers lazily. Add fetch argument
22113 and update all callers.
22114 (regcache_invalidate_one, regcache_invalidate): New
22115 functions.
22116 (new_register_cache): Renamed from create_register_cache.
22117 Return the new regcache.
22118 (free_register_cache): Change argument to a void *.
22119 (registers_to_string, registers_from_string): Call get_regcache
22120 with fetch flag set.
22121 (register_data): Make static. Pass fetch flag to get_regcache.
22122 (supply_register): Call get_regcache with fetch flag clear.
22123 (collect_register): Call get_regcache with fetch flag set.
22124 (collect_register_as_string): New function.
22125 * regcache.h: Update.
22126 * remote-utils.c (putpkt): Flush after debug output and use
22127 stderr.
22128 Handle input interrupts while waiting for an ACK.
22129 (input_interrupt): Use signal_pid method.
22130 (getpkt): Flush after debug output and use stderr.
22131 (outreg): Use collect_register_as_string.
22132 (new_thread_notify, dead_thread_notify): New functions.
22133 (prepare_resume_reply): Check using_threads. Set thread_from_wait
22134 and general_thread.
22135 (look_up_one_symbol): Flush after debug output.
22136 * server.c (step_thread, server_waiting): New variables.
22137 (start_inferior): Don't use signal_pid. Update call to mywait.
22138 (attach_inferior): Update call to mywait.
22139 (handle_query): Handle qfThreadInfo and qsThreadInfo.
22140 (main): Don't fetch/store registers explicitly. Use
22141 set_desired_inferior. Support proposed ``Hs'' packet. Update
22142 calls to mywait.
22143 * server.h: Update.
22144 (struct inferior_list, struct_inferior_list_entry): New.
22145 * target.c (set_desired_inferior): New.
22146 (write_inferior_memory): Constify.
22147 (mywait): New function.
22148 * target.h: Update.
22149 (struct target_ops): New signal_pid method.
22150 (mywait): Removed macro, added prototype.
22151
22152 * linux-low.h (regset_func): Removed.
22153 (regset_fill_func, regset_store_func): New.
22154 (enum regset_type): New.
22155 (struct regset_info): Add type field. Use new operation types.
22156 (struct linux_target_ops): stop_pc renamed to get_pc.
22157 Add decr_pc_after_break and breakpoint_at.
22158 (get_process, get_thread_proess, get_process_thread)
22159 (strut process_info, all_processes, linux_attach_lwp)
22160 (thread_db_init): New.
22161
22162 * linux-arm-low.c (arm_get_pc, arm_set_pc,
22163 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
22164 (the_low_target): Add new members.
22165 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
22166 (i386_store_fpxregset): Constify.
22167 (target_regsets): Add new kind identifier.
22168 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
22169 (i386_set_pc): Add debugging.
22170 (i386_breakpoint_at): New function.
22171 (the_low_target): Add new members.
22172 * linux-mips-low.c (mips_get_pc, mips_set_pc)
22173 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
22174 (mips_breakpoint_at): New.
22175 (the_low_target): Add new members.
22176 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
22177 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
22178 (the_low_target): Add new members.
22179 * linux-sh-low.c (sh_get_pc, sh_set_pc)
22180 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
22181 (the_low_target): Add new members.
22182 * linux-x86-64-low.c (target_regsets): Add new kind
22183 identifier.
22184
22185 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
22186
22187 From Martin Pool <mbp@samba.org>:
22188 * server.c (gdbserver_usage): New function.
22189 (main): Call it.
22190
22191 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
22192
22193 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
22194 stop_at -> stop_pc.
22195
22196 2002-05-04 Andrew Cagney <ac131313@redhat.com>
22197
22198 * Makefile.in: Remove obsolete code.
22199
22200 2002-04-24 Michal Ludvig <mludvig@suse.cz>
22201
22202 * linux-low.c (regsets_fetch_inferior_registers),
22203 (regsets_store_inferior_registers): Removed cast to int from
22204 ptrace() calls.
22205 * regcache.h: Added declaration of struct inferior_info.
22206
22207 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
22208
22209 * inferiors.c (struct inferior_info): Add regcache_data.
22210 (add_inferior): Call create_register_cache.
22211 (clear_inferiors): Call free_register_cache.
22212 (inferior_regcache_data, set_inferior_regcache_data): New functions.
22213 * regcache.c (struct inferior_regcache_data): New.
22214 (registers): Remove.
22215 (get_regcache): New function.
22216 (create_register_cache, free_register_cache): New functions.
22217 (set_register_cache): Don't initialize the register cache here.
22218 (registers_to_string, registers_from_string, register_data): Call
22219 get_regcache.
22220 * regcache.h: Add prototypes.
22221 * server.h: Likewise.
22222
22223 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
22224
22225 * mem-break.c: New file.
22226 * mem-break.h: New file.
22227 * Makefile.in: Add mem-break.o rule; update server.h
22228 dependencies.
22229 * inferiors.c (struct inferior_info): Add target_data
22230 member.
22231 (clear_inferiors): Free target_data member if set.
22232 (inferior_target_data, set_inferior_target_data): New functions.
22233 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
22234 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
22235 * linux-low.c (linux_bp_reinsert): New variable.
22236 (struct inferior_linux_data): New.
22237 (linux_create_inferior): Use set_inferior_target_data.
22238 (linux_attach): Likewise. Call add_inferior.
22239 (linux_wait_for_one_inferior): New function.
22240 (linux_wait): Call it.
22241 (linux_write_memory): Add const.
22242 (initialize_low): Call set_breakpoint_data.
22243 * linux-low.h (struct linux_target_ops): Add breakpoint
22244 handling members.
22245 * server.c (attach_inferior): Remove extra add_inferior
22246 call.
22247 * server.h: Include mem-break.h. Update inferior.c
22248 prototypes.
22249 * target.c (read_inferior_memory)
22250 (write_inferior_memory): New functions.
22251 * target.h (read_inferior_memory)
22252 (write_inferior_memory): Change macros to prototypes.
22253 (struct target_ops): Update comments. Add const to write_memory
22254 definition.
22255
22256 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
22257
22258 * linux-low.c (usr_store_inferior_registers): Support
22259 registers which are allowed to fail to store.
22260 * linux-low.h (linux_target_ops): Likewise.
22261 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
22262 (ppc_cannot_store_register): FPSCR may not be storable.
22263
22264 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22265
22266 * server.h: Include <string.h> if HAVE_STRING_H.
22267 * ChangeLog: Correct paths in last ChangeLog entry.
22268
22269 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22270
22271 * linux-low.h: Remove obsolete prototypes.
22272 (struct linux_target_ops): New.
22273 (extern the_low_target): New.
22274 * linux-low.c (num_regs, regmap): Remove declarations.
22275 (register_addr): Use the_low_target explicitly.
22276 (fetch_register): Likewise.
22277 (usr_fetch_inferior_registers): Likewise.
22278 (usr_store_inferior_registers): Likewise.
22279 * linux-arm-low.c (num_regs): Remove.
22280 (arm_num_regs): Define.
22281 (arm_regmap): Renamed from regmap, made static.
22282 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
22283 made static.
22284 (arm_cannot_store_register): Renamed from cannot_store_register,
22285 made static.
22286 (the_low_target): New.
22287 * linux-i386-low.c (num_regs): Remove.
22288 (i386_num_regs): Define.
22289 (i386_regmap): Renamed from regmap, made static.
22290 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
22291 made static.
22292 (i386_cannot_store_register): Renamed from cannot_store_register,
22293 made static.
22294 (the_low_target): New.
22295 * linux-ia64-low.c (num_regs): Remove.
22296 (ia64_num_regs): Define.
22297 (ia64_regmap): Renamed from regmap, made static.
22298 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
22299 made static.
22300 (ia64_cannot_store_register): Renamed from cannot_store_register,
22301 made static.
22302 (the_low_target): New.
22303 * linux-m68k-low.c (num_regs): Remove.
22304 (m68k_num_regs): Define.
22305 (m68k_regmap): Renamed from regmap, made static.
22306 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
22307 made static.
22308 (m68k_cannot_store_register): Renamed from cannot_store_register,
22309 made static.
22310 (the_low_target): New.
22311 * linux-mips-low.c (num_regs): Remove.
22312 (mips_num_regs): Define.
22313 (mips_regmap): Renamed from regmap, made static.
22314 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
22315 made static.
22316 (mips_cannot_store_register): Renamed from cannot_store_register,
22317 made static.
22318 (the_low_target): New.
22319 * linux-ppc-low.c (num_regs): Remove.
22320 (ppc_num_regs): Define.
22321 (ppc_regmap): Renamed from regmap, made static.
22322 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
22323 made static.
22324 (ppc_cannot_store_register): Renamed from cannot_store_register,
22325 made static.
22326 (the_low_target): New.
22327 * linux-s390-low.c (num_regs): Remove.
22328 (s390_num_regs): Define.
22329 (s390_regmap): Renamed from regmap, made static.
22330 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
22331 made static.
22332 (s390_cannot_store_register): Renamed from cannot_store_register,
22333 made static.
22334 (the_low_target): New.
22335 * linux-sh-low.c (num_regs): Remove.
22336 (sh_num_regs): Define.
22337 (sh_regmap): Renamed from regmap, made static.
22338 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
22339 made static.
22340 (sh_cannot_store_register): Renamed from cannot_store_register,
22341 made static.
22342 (the_low_target): New.
22343 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
22344 (the_low_target): New.
22345
22346 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22347
22348 * Makefile.in: Add stamp-h target.
22349 * configure.in: Create stamp-h.
22350 * configure: Regenerated.
22351
22352 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22353
22354 * inferiors.c: New file.
22355 * target.c: New file.
22356 * target.h: New file.
22357 * Makefile.in: Add target.o and inferiors.o. Update
22358 dependencies.
22359 * linux-low.c (inferior_pid): New static variable,
22360 moved from server.c.
22361 (linux_create_inferior): Renamed from create_inferior.
22362 Call add_inferior. Return 0 on success instead of a PID.
22363 (linux_attach): Renamed from myattach.
22364 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
22365 (linux_thread_alive): Renamed from mythread_alive.
22366 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
22367 child dies.
22368 (linux_resume): Renamed from myresume. Add missing ``return 0''.
22369 (regsets_store_inferior_registers): Correct error message.
22370 Add missing ``return 0''.
22371 (linux_fetch_registers): Renamed from fetch_inferior_registers.
22372 (linux_store_registers): Renamed from store_inferior_registers.
22373 (linux_read_memory): Renamed from read_inferior_memory.
22374 (linux_write_memory): Renamed from write_inferior_memory.
22375 (linux_target_ops): New structure.
22376 (initialize_low): Call set_target_ops ().
22377 * remote-utils.c (unhexify): New function.
22378 (hexify): New function.
22379 (input_interrupt): Send signals to ``signal_pid''.
22380 * server.c (inferior_pid): Remove.
22381 (start_inferior): Update create_inferior call.
22382 (attach_inferior): Call add_inferior.
22383 (handle_query): New function.
22384 (main): Call handle_query for `q' packets.
22385 * server.h: Include "target.h". Remove obsolete prototypes.
22386 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
22387
22388 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22389
22390 * Makefile.in: Add WARN_CFLAGS. Update configury
22391 dependencies.
22392 * configure.in: Check for <string.h>
22393 * configure: Regenerate.
22394 * config.in: Regenerate.
22395 * gdbreplay.c: Include needed system headers.
22396 (remote_open): Remove strchr prototype.
22397 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
22398 * regcache.c (supply_register): Change buf argument to const void *.
22399 (supply_register_by_name): Likewise.
22400 (collect_register): Change buf argument to void *.
22401 (collect_register_by_name): Likewise.
22402 * regcache.h: Add missing prototypes.
22403 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
22404 * server.c (handle_query): New function.
22405 (attached): New static variable, moved out of main.
22406 (main): Quiet longjmp clobber warnings.
22407 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
22408 * utils.c (error): Remove NORETURN.
22409 (fatal): Likewise.
This page took 0.697924 seconds and 5 git commands to generate.