gdb: give names to event loop file handlers
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-10-02 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * linux-low.cc (linux_process_target::async): Pass name to
4 add_file_handler.
5 * remote-utils.cc (handle_accept_event): Likewise.
6 (remote_open): Likewise.
7
8 2020-10-01 Kamil Rytarowski <n54@gmx.com>
9
10 * netbsd-i386-low.cc: Add.
11 * Makefile.in (SFILES): Register "netbsd-i386-low.c".
12 * configure.srv: Add i[34567]86-*-netbsd*.
13
14 2020-10-01 Kamil Rytarowski <n54@gmx.com>
15
16 * netbsd-amd64-low.cc (netbsd_x86_64_arch_setup): Remove.
17 (netbsd_target_regsets): Now const.
18 (the_low_target): Remove.
19 (class netbsd_amd64_target, the_netbsd_amd64_target)
20 (the_netbsd_target): Add.
21 * netbsd-low.cc (netbsd_process_target::post_create_inferior): Call
22 low_arch_setup ().
23 (netbsd_process_target::fetch_registers)
24 (netbsd_process_target::store_registers, initialize_low): Update.
25 (the_netbsd_target): Remove.
26 * netbsd-low.h (netbsd_target_regsets, netbsd_target_ops)
27 (the_low_target, netbsd_tdesc): Remove.
28 (netbsd_process_target::get_regs_info)
29 (netbsd_process_target::low_arch_setup): Add.
30
31 2020-09-23 Hannes Domani <ssbssa@yahoo.de>
32
33 * win32-low.cc: Remove local wow64_process variable.
34 * win32-low.h: Remove local wow64_process variable.
35
36 2020-09-18 Tom Tromey <tromey@adacore.com>
37
38 * netbsd-low.h (class netbsd_process_target) <wait>: Update.
39 * netbsd-low.cc (netbsd_waitpid, netbsd_wait)
40 (netbsd_process_target::wait): Change type of target_options.
41 * win32-low.h (class win32_process_target) <wait>: Update.
42 * win32-low.cc (win32_process_target::wait): Update.
43 * target.h (class process_stratum_target) <wait>: Update.
44 (mywait): Update.
45 * target.cc (mywait, target_wait): Change type of "options".
46 * linux-low.h (class linux_process_target) <wait, wait_1>:
47 Update.
48 * linux-low.cc (linux_process_target::wait)
49 (linux_process_target::wait_1): Update.
50
51 2020-09-15 Tom Tromey <tromey@adacore.com>
52
53 * linux-x86-low.cc (xmltarget_i386_linux_no_xml)
54 (xmltarget_amd64_linux_no_xml): Now arrays.
55
56 2020-09-14 Tom Tromey <tromey@adacore.com>
57
58 * tracepoint.cc (eval_result_names): Now const.
59 * ax.cc (gdb_agent_op_names): Now const.
60
61 2020-09-10 Kamil Rytarowski <n54@gmx.com>
62
63 * netbsd-low.cc: Add.
64 * netbsd-low.h: Likewise.
65 * netbsd-amd64-low.cc: Likewise.
66 * Makefile.in (SFILES): Register "netbsd-low.cc", "netbsd-low.h",
67 "netbsd-amd64-low.cc".
68 * configure.srv: Add x86_64-*-netbsd*.
69
70 2020-08-13 Simon Marchi <simon.marchi@polymtl.ca>
71
72 * server.cc (captured_main): Accept multiple `--selftest=`
73 options. Pass all `--selftest=` arguments to run_tests.
74
75 2020-07-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
76
77 * configure, config.in: Regenerate.
78
79 2020-07-26 Eli Zaretskii <eliz@gnu.org>
80
81 * configure.ac (AC_CHECK_HEADERS): Add ws2tcpip.h.
82 When checking whether socklen_t type is defined, use ws2tcpip.h if
83 it is available and sys/socket.h isn't.
84 * configure: Regenerate.
85 * config.in: Regenerate.
86
87 2020-07-22 Pedro Alves <pedro@palves.net>
88
89 * inferiors.cc (switch_to_process): New, moved here from
90 thread-db.cc, and made extern.
91 * inferiors.h (switch_to_process): Declare.
92 * server.cc: Include "gdbsupport/scoped_restore.h".
93 (handle_qxfer_threads_proper): Now returns bool. Prepare to
94 access memory around target calls.
95 (handle_qxfer_threads): Handle errors.
96 * thread-db.cc (switch_to_process): Moved to inferiors.cc.
97
98 2020-07-21 Simon Marchi <simon.marchi@efficios.com>
99
100 * linux-low.cc (stopped_pids): Make static.
101
102 2020-07-17 Andrew Burgess <andrew.burgess@embecosm.com>
103
104 * tdesc.cc (allocate_target_description): Add header comment.
105 (target_desc_deleter::operator()): New function.
106 * tdesc.h (struct target_desc): Declare as final.
107
108 2020-07-13 Simon Marchi <simon.marchi@polymtl.ca>
109
110 * server.cc (handle_query): Use std::vector of
111 std::string for `qsupported` vector. Use separate
112 vector for unknowns.
113 * target.h (class process_stratum_target) <process_qsupported>:
114 Change parameters to array_view of const char *.
115 (target_process_qsupported): Remove `count` parameter.
116 * target.cc (process_stratum_target::process_qsupported): Change
117 parameters to array_view of const char *.
118 * linux-x86-low.cc (class x86_target) <process_qsupported>:
119 Likewise.
120
121 2020-06-29 Tom de Vries <tdevries@suse.de>
122
123 * ax.h: Include gdbsupport/debug_agent.h.
124
125 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
126
127 * tdesc.cc (struct tdesc_compatible_info): New struct.
128 (tdesc_compatible_info_list): New function.
129 (tdesc_compatible_info_arch_name): New function.
130
131 2020-06-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
132
133 Use std::list to stop pending signal instead of manually-created
134 linked list.
135 * linux-low.h: Include <list>.
136 (struct pending_signal): Move here from linux-low.cc.
137 (struct lwp_info) <pending_signals>
138 <pending_signals_to_report>: Update the type.
139 * linux-low.cc (struct pending_signals): Remove.
140 (linux_process_target::delete_lwp)
141 (linux_process_target::add_lwp)
142 (enqueue_one_deferred_signal)
143 (dequeue_one_deferred_signal)
144 (enqueue_pending_signal)
145 (linux_process_target::resume_one_lwp_throw)
146 (linux_process_target::thread_needs_step_over)
147 (linux_process_target::resume_one_thread)
148 (linux_process_target::proceed_one_lwp): Update the use of pending
149 signal list.
150
151 2020-06-17 Simon Marchi <simon.marchi@efficios.com>
152
153 * Makefile.in (%-generated.cc: ../gdb/regformats/arm/%.dat):
154 Remove.
155
156 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
157
158 * Makefile.in (SFILES): Remove win32-arm-low.cc, wincecompat.cc.
159 * configure.srv: Remove mingw32ce cases.
160 * server.h, win32-low.cc: Remove __MINGW32CE__-guarded code.
161 * win32-low.h (to_back_slashes): Remove.
162 * win32-arm-low.cc, wincecompat.cc, wincecompat.h: Remove.
163
164 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
165
166 * Makefile.in (SFILES): linux-tile-low.cc.
167 * configure.srv: Remove tilegx case.
168 * linux-tile-low.cc: Remove.
169
170 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
171
172 * Makefile.in (SFILES): Remove linux-m32r-low.cc.
173 * configure.srv: Remove m32r case.
174 * linux-m32r-low.cc: Remove.
175
176 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
177
178 * Makefile.in (SFILES): Remove linux-cris-low.c.
179 * configure.srv: Remove cris cases.
180 * linux-cris-low.cc, linux-crisv32-low.cc: Remove.
181
182 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
183
184 * Makefile.in (SFILES): Remove linux-bfin-low.c.
185 * configure.srv: Remove bfin case.
186 * linux-bfin-low.cc: Remove.
187 * linux-low.cc: Remove BFIN-conditional code.
188
189 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
190
191 * configure: Re-generate.
192 * configure.ac: Remove srv_qnx test.
193 * configure.srv: Remove nto case.
194 * nto-low.cc, nto-low.h, nto-x86-low.cc: Remove.
195 * remote-utils.c: Remove __QNX__-guarded code.
196
197 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
198
199 * configure: Re-generate.
200 * configure.ac: Remove srv_lynxos test.
201 * configure.srv: Remove lynxos cases.
202 * lynx-i386-low.cc, lynx-low.cc, lynx-low.h, lynx-ppc-low.c:
203 Remove.
204
205 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
206
207 * README: Fix a few outdated or incoherent things.
208
209 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
210
211 * win32-low.cc (do_initial_child_stuff): Set open_process_used.
212 (win32_clear_inferiors): Use open_process_used.
213 (get_child_debug_event): Likewise.
214
215 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
216
217 PR gdbserver/25893
218 * linux-low.cc (linux_process_target::create_inferior),
219 lynx-low.cc (lynx_process_target::create_inferior),
220 win32-low.cc (win32_process_target::create_inferior): Use
221 construct_inferior_arguments instead of stringify_argv
222 to get string representation which properly escapes
223 special characters.
224 * server.cc (handle_v_run): Just pass empty program arg
225 as such, since any further processing is now handled via
226 construct_inferior_arguments.
227
228 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
229
230 * nto-low.cc (nto_process_target::create_inferior): Pass
231 argv to spawnp function as char **.
232
233 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
234
235 * server.cc (captured_main), (handle_v_run): No longer
236 insert extra NULL element to args vector.
237
238 2020-05-23 Pedro Alves <palves@redhat.com>
239
240 * gdb-safe-ctype.h: New.
241
242 2020-05-16 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
243
244 * linux-ia64-low.cc (ia64_target::sw_breakpoint_from_kind):
245 Fix incorrect 'gdb_assert_no_reached' to 'gdb_assert_not_reached'.
246 (ia64_target::low_breakpoint_at): Ditto.
247
248 2020-05-15 Hannes Domani <ssbssa@yahoo.de>
249
250 * win32-i386-low.cc (i386_supports_z_point_type): Handle
251 Z_PACKET_HW_BP z_type.
252 (i386_insert_point): Handle raw_bkpt_type type.
253 (i386_remove_point): Likewise.
254
255 2020-04-30 Hannes Domani <ssbssa@yahoo.de>
256
257 * configure.srv <x86_64-*-mingw*, x86_64-*-cygwin*> (srv_tgtobj):
258 Add arch/i386.o.
259 * win32-arm-low.cc (arm_num_regs): New function.
260 (struct win32_target_ops): Use arm_num_regs.
261 * win32-i386-low.cc (win32_get_current_dr): Adapt for WOW64
262 processes.
263 (i386_get_thread_context): Likewise.
264 (i386_prepare_to_resume): Likewise.
265 (i386_thread_added): Likewise.
266 (i386_single_step): Likewise.
267 (i386_fetch_inferior_register): Likewise.
268 (i386_store_inferior_register): Likewise.
269 (i386_arch_setup): Likewise.
270 (i386_win32_num_regs): New function.
271 (struct win32_target_ops): Use i386_win32_num_regs.
272 * win32-low.cc (win32_get_thread_context): Adapt for WOW64
273 processes.
274 (win32_require_context): Likewise.
275 (child_add_thread): Likewise.
276 (do_initial_child_stuff): Likewise.
277 (continue_one_thread): Likewise.
278 (win32_process_target::resume): Likewise.
279 (load_psapi): Likewise.
280 (win32_add_all_dlls): Likewise.
281 (maybe_adjust_pc): Likewise.
282 (win32_process_target::qxfer_siginfo): Likewise.
283 (initialize_low): Likewise.
284 * win32-low.h (struct win32_target_ops): Change num_regs to
285 callback function.
286
287 2020-04-27 Simon Marchi <simon.marchi@efficios.com>
288
289 * configure.ac: Remove check for fs_base/gs_base in
290 user_regs_struct.
291 * configure: Re-generate.
292 * config.in: Re-generate.
293 * linux-x86-low.cc (x86_64_regmap, x86_fill_gregset,
294 x86_store_gregset): Adjust.
295
296 2020-04-22 Hannes Domani <ssbssa@yahoo.de>
297
298 * server.cc (handle_search_memory_1): Fix gdb_read_memory return value
299 comparison.
300
301 2020-04-16 Tom Tromey <tromey@adacore.com>
302
303 * win32-low.cc (windows_nat::handle_access_violation): New
304 function.
305
306 2020-04-15 Simon Marchi <simon.marchi@polymtl.ca>
307
308 * win32-low.cc (get_child_debug_event): Fix format string warning.
309
310 2020-04-13 Tom Tromey <tom@tromey.com>
311
312 * server.h (gdb_fildes_t): Remove typedef.
313 * remote-utils.c (remote_desc, list_desc): Now int.
314 (INVALID_DESCRIPTOR): Remove.
315 (gdb_connected, remote_close)
316 (check_remote_input_interrupt_request): Update.
317 * utils.h (pfildes): Don't declare.
318 * utils.c (pfildes): Remove.
319
320 2020-04-13 Tom Tromey <tom@tromey.com>
321
322 * server.h (handle_serial_event, handle_target_event): Update.
323 * server.c: Don't call initialize_event_loop.
324 (keep_processing_events): New global.
325 (handle_serial_event): Return void. Set keep_processing_events.
326 (handle_target_event): Return void.
327 (start_event_loop): Move from event-loop.c. Rewrite.
328 * remote-utils.c (handle_accept_event): Return void.
329 (reset_readchar): Use delete_timer.
330 (process_remaining): Return void.
331 (reschedule): Use create_timer.
332 * event-loop.h: Remove.
333 * event-loop.cc: Remove.
334 * Makefile.in (OBS): Use gdbsupport/event-loop.o, not event-loop.o.
335
336 2020-04-13 Tom Tromey <tom@tromey.com>
337
338 * server.c (invoke_async_signal_handlers)
339 (check_async_event_handlers, flush_streams, gdb_select): New
340 functions.
341
342 2020-04-13 Tom Tromey <tom@tromey.com>
343
344 * configure: Rebuild.
345 * config.in: Rebuild.
346
347 2020-04-08 Tom Tromey <tromey@adacore.com>
348
349 PR gdb/22992
350 * win32-low.c (child_continue): Call matching_pending_stop.
351 (get_child_debug_event): Call fetch_pending_stop. Push pending
352 stop when needed.
353
354 2020-04-08 Tom Tromey <tromey@adacore.com>
355
356 * win32-low.h (win32_process_target::stopped_by_sw_breakpoint)
357 (win32_process_target::supports_stopped_by_sw_breakpoint):
358 Declare.
359 * win32-low.c (win32_supports_z_point_type): Always handle
360 Z_PACKET_SW_BP.
361 (win32_insert_point): Call insert_memory_breakpoint when needed.
362 (win32_remove_point): Call remove_memory_breakpoint when needed.
363 (win32_process_target::stopped_by_sw_breakpoint)
364 (win32_process_target::supports_stopped_by_sw_breakpoint): New
365 methods.
366 (win32_target_ops): Update.
367 (maybe_adjust_pc): New function.
368 (win32_wait): Call maybe_adjust_pc.
369
370 2020-04-08 Tom Tromey <tromey@adacore.com>
371
372 * win32-low.h (struct win32_target_ops) <decr_pc_after_break>: New
373 field.
374 * win32-i386-low.c (the_low_target): Update.
375 * win32-arm-low.c (the_low_target): Update.
376
377 2020-04-08 Tom Tromey <tromey@adacore.com>
378
379 * win32-low.h (win32_process_target::read_pc)
380 (win32_process_target::write_pc): Declare.
381 * win32-low.c (win32_process_target::read_pc)
382 (win32_process_target::write_pc): New methods.
383 * win32-i386-low.c (i386_win32_get_pc, i386_win32_set_pc): New
384 functions.
385 (the_low_target): Update.
386 * win32-arm-low.c (arm_win32_get_pc, arm_win32_set_pc): New
387 functions.
388 (the_low_target): Update.
389
390 2020-04-08 Tom Tromey <tromey@adacore.com>
391
392 * win32-low.c (win32_kill, get_child_debug_event): Use
393 wait_for_debug_event.
394
395 2020-04-08 Tom Tromey <tromey@adacore.com>
396
397 * win32-low.c (child_continue): Call continue_last_debug_event.
398
399 2020-04-08 Tom Tromey <tromey@adacore.com>
400
401 * win32-low.c (handle_exception): Remove.
402 (windows_nat::handle_ms_vc_exception): New function.
403 (get_child_debug_event): Add "continue_status" parameter.
404 Update.
405 (win32_wait): Update.
406
407 2020-04-08 Tom Tromey <tromey@adacore.com>
408
409 * win32-low.c (windows_nat::handle_load_dll): Rename from
410 handle_load_dll. No longer static.
411 (windows_nat::handle_unload_dll): Rename from handle_unload_dll.
412 No longer static.
413
414 2020-04-08 Tom Tromey <tromey@adacore.com>
415
416 * win32-low.c (handle_output_debug_string): Add parameter. Change
417 return type.
418 (win32_kill, get_child_debug_event): Update.
419
420 2020-04-08 Tom Tromey <tromey@adacore.com>
421
422 * win32-low.c (current_process_handle, current_process_id)
423 (main_thread_id, last_sig, current_event, siginfo_er): Move to
424 nat/windows-nat.c.
425
426 2020-04-08 Tom Tromey <tromey@adacore.com>
427
428 * win32-low.c (get_image_name): Remove.
429 (handle_load_dll): Update.
430
431 2020-04-08 Tom Tromey <tromey@adacore.com>
432
433 * win32-low.c (windows_nat::thread_rec): Rename from thread_rec.
434 No longer static. Change parameters.
435 (child_add_thread, child_fetch_inferior_registers)
436 (child_store_inferior_registers, win32_resume)
437 (win32_get_tib_address): Update.
438
439 2020-04-08 Tom Tromey <tromey@adacore.com>
440
441 * win32-low.h (struct win32_target_ops): Use qualified names where
442 needed.
443 * win32-i386-low.c: Add "using namespace".
444 * win32-low.c: Add "using namespace".
445 * win32-arm-low.c: Add "using namespace".
446
447 2020-04-08 Tom Tromey <tromey@adacore.com>
448
449 * win32-low.c (delete_thread_info): Don't call CloseHandle.
450
451 2020-04-08 Tom Tromey <tromey@adacore.com>
452
453 * win32-low.c (win32_require_context, suspend_one_thread): Use
454 windows_thread_info::suspend.
455 (continue_one_thread): Use windows_thread_info::resume.
456 * configure.srv (srv_tgtobj): Add windows-nat.o when needed.
457
458 2020-04-08 Tom Tromey <tromey@adacore.com>
459
460 * win32-i386-low.c (update_debug_registers)
461 (i386_prepare_to_resume, i386_thread_added): Update.
462
463 2020-04-08 Tom Tromey <tromey@adacore.com>
464
465 * win32-low.c (child_add_thread): Use new.
466 (delete_thread_info): Use delete.
467
468 2020-04-08 Tom Tromey <tromey@adacore.com>
469
470 * win32-low.h (struct windows_thread_info): Remove.
471
472 2020-04-08 Tom Tromey <tromey@adacore.com>
473
474 * win32-low.h (struct windows_thread_info): Rename from
475 win32_thread_info. Remove typedef.
476 (struct win32_target_ops, win32_require_context): Update.
477 * win32-low.c (win32_get_thread_context)
478 (win32_set_thread_context, win32_prepare_to_resume)
479 (win32_require_context, thread_rec, child_add_thread)
480 (delete_thread_info, continue_one_thread)
481 (child_fetch_inferior_registers, child_store_inferior_registers)
482 (win32_resume, suspend_one_thread, win32_get_tib_address):
483 Update.
484 * win32-i386-low.c (update_debug_registers)
485 (win32_get_current_dr, i386_get_thread_context)
486 (i386_prepare_to_resume, i386_thread_added, i386_single_step)
487 (i386_fetch_inferior_register, i386_store_inferior_register):
488 Update.
489 * win32-arm-low.c (arm_get_thread_context)
490 (arm_fetch_inferior_register, arm_store_inferior_register):
491 Update.
492
493 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
494
495 * linux-low.h (struct linux_target_ops): Remove.
496 (the_low_target): Remove.
497 * linux-x86-low.cc (the_low_target): Remove.
498 * linux-aarch64-low.cc (the_low_target): Ditto.
499 * linux-arm-low.cc (the_low_target): Ditto.
500 * linux-bfin-low.cc (the_low_target): Ditto.
501 * linux-cris-low.cc (the_low_target): Ditto.
502 * linux-crisv32-low.cc (the_low_target): Ditto.
503 * linux-ia64-low.cc (the_low_target): Ditto.
504 * linux-m32r-low.cc (the_low_target): Ditto.
505 * linux-m68k-low.cc (the_low_target): Ditto.
506 * linux-mips-low.cc (the_low_target): Ditto.
507 * linux-nios2-low.cc (the_low_target): Ditto.
508 * linux-ppc-low.cc (the_low_target): Ditto.
509 * linux-riscv-low.cc (the_low_target): Ditto.
510 * linux-s390-low.cc (the_low_target): Ditto.
511 * linux-sh-low.cc (the_low_target): Ditto.
512 * linux-sparc-low.cc (the_low_target): Ditto.
513 * linux-tic6x-low.cc (the_low_target): Ditto.
514 * linux-tile-low.cc (the_low_target): Ditto.
515 * linux-xtensa-low.cc (the_low_target): Ditto.
516
517 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
518
519 Remove the 'get_ipa_tdesc_idx' linux target op and let a concrete
520 linux target define the op by overriding the declaration in
521 process_stratum_target.
522
523 * linux-low.h (struct linux_target_ops): Remove the op.
524 (class linux_process_target) <get_ipa_tdesc_idx>: Remove.
525 * linux-low.cc (linux_process_target::get_ipa_tdesc_idx): Remove.
526 * linux-x86-low.cc (class x86_target) <get_ipa_tdesc_idx>: Declare.
527 (x86_get_ipa_tdesc_idx): Turn into...
528 (x86_target::get_ipa_tdesc_idx): ...this.
529 (the_low_target): Remove the op field.
530 * linux-ppc-low.cc (class ppc_target) <get_ipa_tdesc_idx>: Declare.
531 (ppc_get_ipa_tdesc_idx): Turn into...
532 (ppc_target::get_ipa_tdesc_idx): ...this.
533 (the_low_target): Remove the op field.
534 * linux-s390-low.cc (class s390_target) <get_ipa_tdesc_idx>: Declare.
535 (s390_get_ipa_tdesc_idx): Turn into...
536 (s390_target::get_ipa_tdesc_idx): ...this.
537 (the_low_target): Remove the op field.
538
539 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
540
541 Turn the 'get_syscall_trapinfo' linux target op into a method
542 of process_stratum_target.
543
544 * linux-low.h (struct linux_target_ops): Remove the op.
545 (class linux_process_target) <get_syscall_trapinfo>
546 <gdb_catch_this_syscall>
547 <low_supports_catch_syscall>
548 <low_get_syscall_trapinfo>: Declare.
549 * linux-low.cc (get_syscall_trapinfo): Turn into...
550 (linux_process_target::get_syscall_trapinfo): ...this.
551 (linux_process_target::low_get_syscall_trapinfo): Define.
552 (gdb_catch_this_syscall_p): Turn into...
553 (linux_process_target::gdb_catch_this_syscall): ...this.
554 (linux_process_target::low_supports_catch_syscall): Define.
555
556 Update the callers below.
557
558 (linux_process_target::wait_1)
559 (linux_process_target::supports_catch_syscall)
560
561 * linux-x86-low.cc (class x86_target) <low_supports_catch_syscall>
562 <low_get_syscall_trapinfo>: Declare.
563 (x86_target::low_supports_catch_syscall): Define.
564 (x86_get_syscall_trapinfo): Turn into...
565 (x86_target::low_get_syscall_trapinfo): ...this.
566 (the_low_target): Remove the op field.
567 * linux-aarch64-low.cc (class aarch64_target)
568 <low_supports_catch_syscall>
569 <low_get_syscall_trapinfo>: Declare.
570 (aarch64_target::low_supports_catch_syscall): Define.
571 (aarch64_get_syscall_trapinfo): Turn into...
572 (aarch64_target::low_get_syscall_trapinfo): ...this.
573 (the_low_target): Remove the op field.
574 * linux-arm-low.cc (class arm_target) <low_supports_catch_syscall>
575 <low_get_syscall_trapinfo>: Declare.
576 (arm_target::low_supports_catch_syscall): Define.
577 (arm_get_syscall_trapinfo): Turn into...
578 (arm_target::low_get_syscall_trapinfo): ...this.
579 (the_low_target): Remove the op field.
580 * linux-ppc-low.cc (the_low_target): Remove the op field.
581 * linux-s390-low.cc (the_low_target): Remove the op field.
582
583 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
584
585 Remove the 'supports_hardware_single_step' linux target op and
586 override the process_stratum_target's op definition in
587 linux_process_target to return true.
588
589 * linux-low.h (struct linux_target_ops): Remove the op.
590 (class linux_process_target) <finish_step_over>
591 <maybe_hw_step>: Declare.
592 * linux-low.cc (can_hardware_single_step): Remove.
593 (maybe_hw_step): Turn into...
594 (linux_process_target::maybe_hw_step): ...this.
595 (finish_step_over): Turn into...
596 (linux_process_target::finish_step_over): ...this.
597 (linux_process_target::supports_hardware_single_step): Update
598 to return true.
599
600 Update the callers below.
601
602 (linux_process_target::single_step)
603 (linux_process_target::resume_one_lwp_throw)
604
605 * linux-arm-low.cc (class arm_target)
606 <supports_hardware_single_step>: Declare.
607 (arm_supports_hardware_single_step): Turn into...
608 (arm_target::supports_hardware_single_step): ...this.
609 (the_low_target): Remove the op field.
610 * linux-x86-low.cc (x86_supports_hardware_single_step): Remove.
611 (the_low_target): Remove the op field.
612 * linux-aarch64-low.cc (aarch64_supports_hardware_single_step):
613 Remove.
614 (the_low_target): Remove the op field.
615 * linux-bfin-low.cc (bfin_supports_hardware_single_step): Remove.
616 (the_low_target): Remove the op field.
617 * linux-crisv32-low.cc (cris_supports_hardware_single_step): Remove.
618 (the_low_target): Remove the op field.
619 * linux-m32r-low.cc (m32r_supports_hardware_single_step): Remove.
620 (the_low_target): Remove the op field.
621 * linux-m68k-low.cc (m68k_supports_hardware_single_step): Remove.
622 (the_low_target): Remove the op field.
623 * linux-ppc-low.cc (ppc_supports_hardware_single_step): Remove.
624 (the_low_target): Remove the op field.
625 * linux-s390-low.cc (s390_supports_hardware_single_step): Remove.
626 (the_low_target): Remove the op field.
627 * linux-sh-low.cc (sh_supports_hardware_single_step): Remove.
628 (the_low_target): Remove the op field.
629 * linux-tic6x-low.cc (tic6x_supports_hardware_single_step): Remove.
630 (the_low_target): Remove the op field.
631 * linux-tile-low.cc (tile_supports_hardware_single_step): Remove.
632 (the_low_target): Remove the op field.
633 * linux-xtensa-low.cc (xtensa_supports_hardware_single_step):
634 Remove.
635 (the_low_target): Remove the op field.
636
637 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
638
639 Turn the 'supports_range_stepping' linux target op into a method
640 of linux_process_target.
641
642 * linux-low.h (struct linux_target_ops): Remove the op.
643 (class linux_process_target) <low_supports_range_stepping>: Declare.
644 * linux-low.cc (linux_process_target::low_supports_range_stepping):
645 Define.
646 (linux_process_target::supports_range_stepping): Update the call
647 site.
648 * linux-x86-low.cc (class x86_target)
649 <low_supports_range_stepping>: Declare.
650 (x86_supports_range_stepping): Turn into...
651 (x86_target::low_supports_range_stepping): ...this.
652 (the_low_target): Remove the op field.
653 * linux-aarch64-low.cc (class aarch64_target)
654 <low_supports_range_stepping>: Declare.
655 (aarch64_supports_range_stepping): Turn into...
656 (aarch64_target::low_supports_range_stepping): ...this.
657 (the_low_target): Remove the op field.
658 * linux-arm-low.cc (the_low_target): Remove the op field.
659 * linux-bfin-low.cc (the_low_target): Ditto.
660 * linux-crisv32-low.cc (the_low_target): Ditto.
661 * linux-m32r-low.cc (the_low_target): Ditto.
662 * linux-m68k-low.cc (the_low_target): Ditto.
663 * linux-ppc-low.cc (the_low_target): Ditto.
664 * linux-s390-low.cc (the_low_target): Ditto.
665 * linux-sh-low.cc (the_low_target): Ditto.
666 * linux-tic6x-low.cc (the_low_target): Ditto.
667 * linux-tile-low.cc (the_low_target): Ditto.
668 * linux-xtensa-low.cc (the_low_target): Ditto.
669
670 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
671
672 Remove the 'emit_ops' linux target ops and let the concrete
673 linux target define the op by overriding the declaration of
674 process_stratum_target.
675
676 * linux-low.h (struct linux_target_ops): Remove the op.
677 (class linux_process_target) <emit_ops>: Remove.
678 * linux-low.cc (linux_process_target::emit_ops): Remove.
679 * linux-x86-low.cc (class x86_target) <emit_ops>: Declare.
680 (x86_emit_ops): Turn into...
681 (x86_target::emit_ops): ...this.
682 (the_low_target): Remove the op field.
683 * linux-aarch64-low.cc (class aarch64_target) <emit_ops>: Declare.
684 (aarch64_emit_ops): Turn into...
685 (aarch64_target::emit_ops): ...this.
686 (the_low_target): Remove the op field.
687 * linux-ppc-low.cc (class ppc_target) <emit_ops>: Declare.
688 (ppc_emit_ops): Turn into...
689 (ppc_target::emit_ops): ...this.
690 (the_low_target): Remove the op field.
691 * linux-s390-low.cc (class s390_target) <emit_ops>: Declare.
692 (s390_emit_ops): Turn into...
693 (s390_target::emit_ops): ...this.
694 (the_low_target): Remove the op field.
695 * linux-arm-low.cc (the_low_target): Remove the op field.
696 * linux-bfin-low.cc (the_low_target): Ditto.
697 * linux-crisv32-low.cc (the_low_target): Ditto.
698 * linux-m32r-low.cc (the_low_target): Ditto.
699 * linux-m68k-low.cc (the_low_target): Ditto.
700 * linux-sh-low.cc (the_low_target): Ditto.
701 * linux-tic6x-low.cc (the_low_target): Ditto.
702 * linux-tile-low.cc (the_low_target): Ditto.
703 * linux-xtensa-low.cc (the_low_target): Ditto.
704
705 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
706
707 Remove the 'install_fast_tracepoint_jump_pad' and
708 'get_min_fast_tracepoint_insn_len' linux target ops to let the
709 concrete linux target define the ops by overriding the declarations
710 of process_stratum_target.
711
712 * linux-low.h (struct linux_target_ops): Remove the ops.
713 (class linux_process_target) <supports_fast_tracepoints>
714 <install_fast_tracepoint_jump_pad>
715 <get_min_fast_tracepoint_insn_len>: Remove.
716 * linux-low.cc (linux_process_target::supports_fast_tracepoints)
717 (linux_process_target::install_fast_tracepoint_jump_pad)
718 (linux_process_target::get_min_fast_tracepoint_insn_len): Remove.
719 * linux-x86-low.cc (class x86_target) <supports_fast_tracepoints>
720 <install_fast_tracepoint_jump_pad>
721 <get_min_fast_tracepoint_insn_len>: Declare.
722 (x86_target::supports_fast_tracepoints): Define.
723 (x86_install_fast_tracepoint_jump_pad): Turn into...
724 (x86_target::install_fast_tracepoint_jump_pad): ...this.
725 (x86_get_min_fast_tracepoint_insn_len): Turn into...
726 (x86_target::get_min_fast_tracepoint_insn_len): ...this.
727 (the_low_target): Remove the op fields.
728 * linux-aarch64-low.cc (class aarch64_target)
729 <supports_fast_tracepoints>
730 <install_fast_tracepoint_jump_pad>
731 <get_min_fast_tracepoint_insn_len>: Declare.
732 (aarch64_target::supports_fast_tracepoints): Define.
733 (aarch64_install_fast_tracepoint_jump_pad): Turn into...
734 (aarch64_target::install_fast_tracepoint_jump_pad): ...this.
735 (aarch64_get_min_fast_tracepoint_insn_len): Turn into...
736 (aarch64_target::get_min_fast_tracepoint_insn_len): ...this.
737 (the_low_target): Remove the op fields.
738 * linux-ppc-low.cc (class ppc_target) <supports_fast_tracepoints>
739 <install_fast_tracepoint_jump_pad>
740 <get_min_fast_tracepoint_insn_len>: Declare.
741 (ppc_target::supports_fast_tracepoints): Define.
742 (ppc_install_fast_tracepoint_jump_pad): Turn into...
743 (ppc_target::install_fast_tracepoint_jump_pad): ...this.
744 (ppc_get_min_fast_tracepoint_insn_len): Turn into...
745 (ppc_target::get_min_fast_tracepoint_insn_len): ...this.
746 (the_low_target): Remove the op fields.
747 * linux-s390-low.cc (class s390_target) <supports_fast_tracepoints>
748 <install_fast_tracepoint_jump_pad>
749 <get_min_fast_tracepoint_insn_len>: Declare.
750 (s390_target::supports_fast_tracepoints): Define.
751 (s390_install_fast_tracepoint_jump_pad): Turn into...
752 (s390_target::install_fast_tracepoint_jump_pad): ...this.
753 (s390_get_min_fast_tracepoint_insn_len): Turn into...
754 (s390_target::get_min_fast_tracepoint_insn_len): ...this.
755 (the_low_target): Remove the op fields.
756 * linux-arm-low.cc (the_low_target): Remove the op fields.
757 * linux-bfin-low.cc (the_low_target): Ditto.
758 * linux-crisv32-low.cc (the_low_target): Ditto.
759 * linux-m32r-low.cc (the_low_target): Ditto.
760 * linux-m68k-low.cc (the_low_target): Ditto.
761 * linux-sh-low.cc (the_low_target): Ditto.
762 * linux-tic6x-low.cc (the_low_target): Ditto.
763 * linux-tile-low.cc (the_low_target): Ditto.
764 * linux-xtensa-low.cc (the_low_target): Ditto.
765
766 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
767
768 Turn the 'get_thread_area' linux target op into a method of
769 process_stratum_target.
770
771 * linux-low.h (struct linux_target_ops): Remove the op.
772 (class linux_process_target) <stuck_in_jump_pad>
773 <linux_fast_tracepoint_collecting>
774 <low_get_thread_area>: Declare.
775 * linux-low.cc (supports_fast_tracepoints): Remove.
776 (linux_fast_tracepoint_collecting): Turn into...
777 (linux_process_target::linux_fast_tracepoint_collecting): ...this.
778 (linux_process_target::low_get_thread_area): Define.
779 (stuck_in_jump_pad_callback): Turn into...
780 (linux_process_target::stuck_in_jump_pad): ...this.
781
782 Update the caller below.
783
784 (linux_process_target::stabilize_threads)
785
786 * linux-x86-low.cc (class x86_target) <low_get_thread_area>:
787 Declare.
788 (x86_get_thread_area): Turn into...
789 (x86_target::low_get_thread_area): ...this.
790 (the_low_target): Remove the op field.
791 * linux-aarch64-low.cc (class aarch64_target) <low_get_thread_area>:
792 Declare.
793 (aarch64_get_thread_area): Turn into...
794 (aarch64_target::low_get_thread_area): ...this.
795 (the_low_target): Remove the op field.
796 * linux-ppc-low.cc (class ppc_target) <low_get_thread_area>:
797 Declare.
798 (ppc_get_thread_area): Turn into...
799 (ppc_target::low_get_thread_area): ...this.
800 (the_low_target): Remove the op field.
801 * linux-s390-low.cc (class s390_target) <low_get_thread_area>:
802 Declare.
803 (s390_get_thread_area): Turn into...
804 (s390_target::low_get_thread_area): ...this.
805 (the_low_target): Remove the op field.
806 * linux-arm-low.cc (the_low_target): Remove the op field.
807 * linux-bfin-low.cc (the_low_target): Ditto.
808 * linux-crisv32-low.cc (the_low_target): Ditto.
809 * linux-m32r-low.cc (the_low_target): Ditto.
810 * linux-m68k-low.cc (the_low_target): Ditto.
811 * linux-sh-low.cc (the_low_target): Ditto.
812 * linux-tic6x-low.cc (the_low_target): Ditto.
813 * linux-tile-low.cc (the_low_target): Ditto.
814 * linux-xtensa-low.cc (the_low_target): Ditto.
815
816 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
817
818 Remote the 'supports_tracepoints' linux target op and let the
819 concrete linux target define it by overriding the op declared in
820 process_stratum_target.
821
822 * linux-low.h (struct linux_target_ops): Remove the op.
823 (class linux_process_target) <supports_tracepoints>: Remove.
824 * linux-low.cc (linux_process_target::supports_tracepoints): Remove.
825 * linux-x86-low.cc (class x86_target) <supports_tracepoints>:
826 Declare.
827 (x86_supports_tracepoints): Turn into...
828 (x86_target::supports_tracepoints): ...this.
829 (the_low_target): Remove the op field.
830 * linux-aarch64-low.cc (class aarch64_target)
831 <supports_tracepoints>: Declare.
832 (aarch64_supports_tracepoints): Turn into...
833 (aarch64_target::supports_tracepoints): ...this.
834 (the_low_target): Remove the op field.
835 * linux-ppc-low.cc (class ppc_target) <supports_tracepoints>:
836 Declare.
837 (ppc_supports_tracepoints): Turn into...
838 (ppc_target::supports_tracepoints): ...this.
839 (the_low_target): Remove the op field.
840 * linux-s390-low.cc (class s390_target) <supports_tracepoints>:
841 Declare.
842 (s390_supports_tracepoints): Turn into...
843 (s390_target::supports_tracepoints): ...this.
844 (the_low_target): Remove the op field.
845 * linux-arm-low.cc (the_low_target): Remove the op field.
846 * linux-bfin-low.cc (the_low_target): Ditto.
847 * linux-crisv32-low.cc (the_low_target): Ditto.
848 * linux-m32r-low.cc (the_low_target): Ditto.
849 * linux-m68k-low.cc (the_low_target): Ditto.
850 * linux-sh-low.cc (the_low_target): Ditto.
851 * linux-tic6x-low.cc (the_low_target): Ditto.
852 * linux-tile-low.cc (the_low_target): Ditto.
853 * linux-xtensa-low.cc (the_low_target): Ditto.
854
855 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
856
857 Remove the 'process_qsupported' linux target op and let a concrete
858 linux target define the op by overriding the op declaration in
859 process_stratum_target.
860
861 * linux-low.h (struct linux_target_ops): Remove the op.
862 (class linux_process_target) <process_qsupported>: Remove.
863 * linux-low.cc (linux_process_target::process_qsupported): Remove.
864 * linux-x86-low.cc (class x86_target) <process_qsupported>: Declare.
865 (x86_linux_process_qsupported): Turn into...
866 (x86_target::process_qsupported): ...this.
867 (the_low_target): Remove the op field.
868 * linux-aarch64-low.cc (the_low_target): Remove the op
869 field.
870 * linux-arm-low.cc (the_low_target): Ditto.
871 * linux-bfin-low.cc (the_low_target): Ditto.
872 * linux-crisv32-low.cc (the_low_target): Ditto.
873 * linux-m32r-low.cc (the_low_target): Ditto.
874 * linux-m68k-low.cc (the_low_target): Ditto.
875 * linux-ppc-low.cc (the_low_target): Ditto.
876 * linux-s390-low.cc (the_low_target): Ditto.
877 * linux-sh-low.cc (the_low_target): Ditto.
878 * linux-tic6x-low.cc (the_low_target): Ditto.
879 * linux-tile-low.cc (the_low_target): Ditto.
880 * linux-xtensa-low.cc (the_low_target): Ditto.
881
882 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
883
884 Turn the 'prepare_to_resume' linux target op into a method of
885 linux_process_target.
886
887 * linux-low.h (struct linux_target_ops): Remove the op.
888 (class linux_process_target) <low_prepare_to_resume>: Declare.
889 * linux-low.cc (linux_process_target::low_prepare_to_resume):
890 Define.
891
892 Update the callers below:
893
894 (linux_process_target::resume_one_lwp_throw)
895 (linux_process_target::low_prepare_to_resume)
896
897 * linux-x86-low.cc (class x86_target) <low_prepare_to_resume>:
898 Declare.
899 (x86_target::low_prepare_to_resume): Define.
900 (the_low_target): Remove the op field.
901 * linux-aarch64-low.cc (class aarch64_target)
902 <low_prepare_to_resume>: Declare.
903 (aarch64_target::low_prepare_to_resume): Define.
904 (the_low_target): Remove the op field.
905 * linux-arm-low.cc (class arm_target) <low_prepare_to_resume>:
906 Declare.
907 (arm_prepare_to_resume): Turn into...
908 (arm_target::low_prepare_to_resume): ...this.
909 (the_low_target): Remove the op field.
910 * linux-mips-low.cc (class mips_target) <low_prepare_to_resume>:
911 Declare.
912 (mips_linux_prepare_to_resume): Turn into...
913 (mips_target::low_prepare_to_resume): ...this.
914 (the_low_target): Remove the op field.
915 * linux-bfin-low.cc (the_low_target): Remove the op field.
916 * linux-crisv32-low.cc (the_low_target): Ditto.
917 * linux-m32r-low.cc (the_low_target): Ditto.
918 * linux-m68k-low.cc (the_low_target): Ditto.
919 * linux-ppc-low.cc (the_low_target): Ditto.
920 * linux-s390-low.cc (the_low_target): Ditto.
921 * linux-sh-low.cc (the_low_target): Ditto.
922 * linux-tic6x-low.cc (the_low_target): Ditto.
923 * linux-tile-low.cc (the_low_target): Ditto.
924 * linux-xtensa-low.cc (the_low_target): Ditto.
925
926 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
927
928 Turn the 'new_process', 'delete_process', 'new_thread',
929 'delete_thread', and 'new_fork' linux target ops into methods
930 of linux_process_target.
931
932 * linux-low.h (struct linux_target_ops): Remove the ops.
933 (class linux_process_target) <add_linux_process>
934 <add_lwp>
935 <delete_lwp>
936 <attach_lwp>
937 <detach_one_lwp>
938 <check_zombie_leaders>
939 <filter_exit_event>
940 <low_new_process>
941 <low_delete_process>
942 <low_new_thread>
943 <low_delete_thread>
944 <low_new_fork>: Declare.
945 * linux-low.cc (delete_lwp): Turn into...
946 (linux_process_target::delete_lwp): ...this.
947 (linux_process_target::low_delete_thread): Define.
948 (linux_add_process): Turn into...
949 (linux_process_target::add_linux_process): ...this.
950 (linux_process_target::low_new_process): Define.
951 (linux_process_target::low_delete_process): Define.
952 (linux_process_target::low_new_fork): Define.
953 (add_lwp): Turn into...
954 (linux_process_target::add_lwp): ...this.
955 (linux_process_target::low_new_thread): Define.
956 (linux_attach_lwp): Turn into...
957 (linux_process_target::attach_lwp): ...this.
958 (linux_detach_one_lwp): Turn into...
959 (linux_process_target::detach_one_lwp): ...this.
960 (linux_detach_lwp_callback): Remove and inline...
961 (linux_process_target::detach): ...here.
962 (check_zombie_leaders): Turn into...
963 (linux_process_target::check_zombie_leaders): ...this.
964 (filter_exit_event): Turn into...
965 (linux_process_target::filter_exit_event): ...this.
966
967 Update the callers below.
968
969 (linux_process_target::handle_extended_wait)
970 (linux_process_target::create_inferior)
971 (attach_proc_task_lwp_callback)
972 (linux_process_target::attach)
973 (linux_process_target::detach)
974 (linux_process_target::mourn)
975 * thread-db.cc (attach_thread)
976
977 * linux-x86-low.cc (class x86_target) <low_new_process>
978 <low_delete_process>
979 <low_new_thread>
980 <low_delete_thread>
981 <low_new_fork>: Declare.
982 (x86_linux_new_process): Turn into...
983 (x86_target::low_new_process): ...this.
984 (x86_linux_delete_process): Turn into...
985 (x86_target::low_delete_process): ...this.
986 (x86_target::low_new_thread): Define.
987 (x86_target::low_delete_thread): Define.
988 (x86_linux_new_fork): Turn into...
989 (x86_target::low_new_fork): ...this.
990 (the_low_target): Remove the op fields.
991 * linux-aarch64-low.cc (class aarch64_target) <low_new_process>
992 <low_delete_process>
993 <low_new_thread>
994 <low_delete_thread>
995 <low_new_fork>: Declare.
996 (aarch64_linux_new_process): Turn into...
997 (aarch64_target::low_new_process): ...this.
998 (aarch64_linux_delete_process): Turn into...
999 (aarch64_target::low_delete_process): ...this.
1000 (aarch64_target::low_new_thread): Define.
1001 (aarch64_target::low_delete_thread): Define.
1002 (aarch64_linux_new_fork): Turn into...
1003 (aarch64_target::low_new_fork): ...this.
1004 (the_low_target): Remove the op fields.
1005 * linux-arm-low.cc (class arm_target) <low_new_process>
1006 <low_delete_process>
1007 <low_new_thread>
1008 <low_delete_thread>
1009 <low_new_fork>: Declare.
1010 (arm_new_process): Turn into...
1011 (arm_target::low_new_process): ...this.
1012 (arm_delete_process): Turn into...
1013 (arm_target::low_delete_process): ...this.
1014 (arm_new_thread): Turn into...
1015 (arm_target::low_new_thread): ...this.
1016 (arm_delete_thread): Turn into...
1017 (arm_target::low_delete_thread): ...this.
1018 (arm_new_fork): Turn into...
1019 (arm_target::low_new_fork): ...this.
1020 (the_low_target): Remove the op fields.
1021 * linux-mips-low.cc (class mips_target) <low_new_process>
1022 <low_delete_process>
1023 <low_new_thread>
1024 <low_delete_thread>
1025 <low_new_fork>: Declare.
1026 (mips_linux_new_process): Turn into...
1027 (mips_target::low_new_process): ...this.
1028 (mips_linux_delete_process): Turn into...
1029 (mips_target::low_delete_process): ...this.
1030 (mips_linux_new_thread): Turn into...
1031 (mips_target::low_new_thread): ...this.
1032 (mips_linux_delete_thread): Turn into...
1033 (mips_target::low_delete_thread): ...this.
1034 (mips_linux_new_fork): Turn into...
1035 (mips_target::low_new_fork): ...this.
1036 (the_low_target): Remove the op fields.
1037 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1038 * linux-crisv32-low.cc (the_low_target): Ditto.
1039 * linux-m32r-low.cc (the_low_target): Ditto.
1040 * linux-m68k-low.cc (the_low_target): Ditto.
1041 * linux-ppc-low.cc (the_low_target): Ditto.
1042 * linux-s390-low.cc (the_low_target): Ditto.
1043 * linux-sh-low.cc (the_low_target): Ditto.
1044 * linux-tic6x-low.cc (the_low_target): Ditto.
1045 * linux-tile-low.cc (the_low_target): Ditto.
1046 * linux-xtensa-low.cc (the_low_target): Ditto.
1047
1048 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1049
1050 Turn the 'siginfo_fixup' linux target op into a method of
1051 linux_process_target.
1052
1053 * linux-low.h (struct linux_target_ops): Remove the op.
1054 (class linux_process_target) <siginfo_fixup>
1055 <low_siginfo_fixup>: Declare.
1056 * linux-low.cc (siginfo_fixup): Turn into...
1057 (linux_process_target::siginfo_fixup): ...this.
1058 (linux_process_target::low_siginfo_fixup): Define.
1059 * linux-x86-low.cc (class x86_target) <low_siginfo_fixup>: Declare.
1060 (x86_siginfo_fixup): Turn into...
1061 (x86_target::low_siginfo_fixup): ...this.
1062 (the_low_target): Remove the op field.
1063 * linux-aarch64-low.cc (class aarch64_target):
1064 <low_siginfo_fixup>: Declare.
1065 (aarch64_linux_siginfo_fixup): Turn into...
1066 (aarch64_target::low_siginfo_fixup): ...this.
1067 (the_low_target): Remove the op field.
1068 * linux-arm-low.cc (the_low_target): Remove the op field.
1069 * linux-bfin-low.cc (the_low_target): Ditto.
1070 * linux-crisv32-low.cc (the_low_target): Ditto.
1071 * linux-m32r-low.cc (the_low_target): Ditto.
1072 * linux-m68k-low.cc (the_low_target): Ditto.
1073 * linux-mips-low.cc (the_low_target): Ditto.
1074 * linux-ppc-low.cc (the_low_target): Ditto.
1075 * linux-s390-low.cc (the_low_target): Ditto.
1076 * linux-sh-low.cc (the_low_target): Ditto.
1077 * linux-tic6x-low.cc (the_low_target): Ditto.
1078 * linux-tile-low.cc (the_low_target): Ditto.
1079 * linux-xtensa-low.cc (the_low_target): Ditto.
1080
1081 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1082
1083 Turn the 'collect_ptrace_register' and 'supply_ptrace_register'
1084 linux target ops into methods of linux_process_target.
1085
1086 * linux-low.h (struct linux_target_ops): Remove the ops.
1087 (class linux_process_target) <low_collect_ptrace_register>
1088 <low_store_ptrace_register>: Declare.
1089 * linux-low.cc (linux_process_target::low_collect_ptrace_register)
1090 (linux_process_target::low_supply_ptrace_register): Define.
1091
1092 Update the callers below.
1093
1094 (linux_process_target::fetch_register)
1095 (linux_process_target::store_register)
1096
1097 * linux-x86-low.cc (the_low_target): Remove the op fields.
1098 * linux-aarch64-low.cc (the_low_target): Ditto.
1099 * linux-arm-low.cc (the_low_target): Ditto.
1100 * linux-bfin-low.cc (the_low_target): Ditto.
1101 * linux-crisv32-low.cc (the_low_target): Ditto.
1102 * linux-m32r-low.cc (the_low_target): Ditto.
1103 * linux-m68k-low.cc (the_low_target): Ditto.
1104 * linux-sh-low.cc (the_low_target): Ditto.
1105 * linux-sparc-low.cc (the_low_target): Ditto.
1106 * linux-tic6x-low.cc (the_low_target): Ditto.
1107 * linux-tile-low.cc (the_low_target): Ditto.
1108 * linux-xtensa-low.cc (the_low_target): Ditto.
1109 * linux-mips-low.cc (class mips_target)
1110 <low_collect_ptrace_register>
1111 <low_supply_ptrace_register>: Declare.
1112 (mips_collect_ptrace_register): Turn into ...
1113 (mips_target::low_collect_ptrace_register): ...this.
1114 (mips_supply_ptrace_register): Turn into...
1115 (mips_target::low_supply_ptrace_register): ...this.
1116 (the_low_target): Remove the op fields.
1117 * linux-ppc-low.cc (class ppc_target)
1118 <low_collect_ptrace_register>
1119 <low_supply_ptrace_register>: Declare.
1120 (ppc_collect_ptrace_register): Turn into ...
1121 (ppc_target::low_collect_ptrace_register): ...this.
1122 (ppc_supply_ptrace_register): Turn into ...
1123 (ppc_target::low_supply_ptrace_register): ...this.
1124 (ppc_fill_gregset): Update for the calls to
1125 low_collect_ptrace_register.
1126 (the_low_target): Remove the op fields.
1127 * linux-s390-low.cc (class s390_target)
1128 <low_collect_ptrace_register>
1129 <low_supply_ptrace_register>: Declare.
1130 (s390_collect_ptrace_register): Turn into ...
1131 (s390_target::low_collect_ptrace_register): ...this.
1132 (s390_supply_ptrace_register): Turn into ...
1133 (s390_target::low_supply_ptrace_register): ...this.
1134 (s390_fill_gregset): Update for the calls to
1135 low_collect_ptrace_register.
1136 (the_low_target): Remove the op fields.
1137
1138 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1139
1140 Turn the 'stopped_by_watchpoint' and 'stopped_data_address' linux
1141 target ops into methods of linux_process_target.
1142
1143 * linux-low.h (struct linux_target_ops): Remove the ops.
1144 (class linux_process_target) <check_stopped_by_watchpoint>
1145 <low_stopped_by_watchpoint>
1146 <low_stopped_data_address>: Declare.
1147 * linux-low.cc (check_stopped_by_watchpoint): Turn into...
1148 (linux_process_target::check_stopped_by_watchpoint): ...this.
1149 (linux_process_target::low_stopped_by_watchpoint): Define.
1150 (linux_process_target::low_stopped_data_address): Define.
1151 * linux-x86-low.cc (class x86_target) <low_stopped_by_watchpoint>
1152 <low_stopped_data_address>: Declare.
1153 (x86_stopped_by_watchpoint): Turn into...
1154 (x86_target::low_stopped_by_watchpoint): ...this.
1155 (x86_stopped_data_address): Turn into...
1156 (x86_target::low_stopped_data_address): ...this.
1157 (the_low_target): Remove the op fields.
1158 * linux-aarch64-low.cc (class aarch64_target)
1159 <low_stopped_by_watchpoint>
1160 <low_stopped_data_address>: Declare.
1161 (aarch64_stopped_by_watchpoint): Turn into...
1162 (aarch64_target::low_stopped_by_watchpoint): ...this.
1163 (aarch64_stopped_data_address): Turn into...
1164 (aarch64_target::low_stopped_data_address): ...this.
1165 (the_low_target): Remove the op fields.
1166 * linux-arm-low.cc (class arm_target) <low_stopped_by_watchpoint>
1167 <low_stopped_data_address>: Declare.
1168 (arm_stopped_by_watchpoint): Turn into...
1169 (arm_target::low_stopped_by_watchpoint): ...this.
1170 (arm_stopped_data_address): Turn into...
1171 (arm_target::low_stopped_data_address): ...this.
1172 (the_low_target): Remove the op fields.
1173 * linux-crisv32-low.cc (class crisv32_target)
1174 <low_stopped_by_watchpoint>
1175 <low_stopped_data_address>: Declare.
1176 (cris_stopped_by_watchpoint): Turn into...
1177 (crisv32_target::low_stopped_by_watchpoint): ...this.
1178 (cris_stopped_data_address): Turn into...
1179 (crisv32_target::low_stopped_data_address): ...this.
1180 (the_low_target): Remove the op fields.
1181 * linux-mips-low.cc (class mips_target) <low_stopped_by_watchpoint>
1182 <low_stopped_data_address>: Declare.
1183 (mips_stopped_by_watchpoint): Turn into...
1184 (mips_target::low_stopped_by_watchpoint): ...this.
1185 (mips_stopped_data_address): Turn into...
1186 (mips_target::low_stopped_data_address): ...this.
1187 (the_low_target): Remove the op fields.
1188 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1189 * linux-m32r-low.cc (the_low_target): Ditto.
1190 * linux-m68k-low.cc (the_low_target): Ditto.
1191 * linux-ppc-low.cc (the_low_target): Ditto.
1192 * linux-s390-low.cc (the_low_target): Ditto.
1193 * linux-sh-low.cc (the_low_target): Ditto.
1194 * linux-sparc-low.cc (the_low_target): Ditto.
1195 * linux-tic6x-low.cc (the_low_target): Ditto.
1196 * linux-tile-low.cc (the_low_target): Ditto.
1197 * linux-xtensa-low.cc (the_low_target): Ditto.
1198
1199 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1200
1201 Turn the 'insert_point' and 'remove_point' linux target ops into
1202 methods of linux_process_target.
1203
1204 * linux-low.h (struct linux_target_ops): Remove the ops.
1205 (class linux_process_target) <low_insert_point>
1206 <low_remove_point>: Declare.
1207 * linux-low.cc (linux_process_target::low_insert_point)
1208 (linux_process_target::low_remove_point): Define.
1209 (linux_process_target::insert_point)
1210 (linux_process_target::remove_point): Update for calls to
1211 low_insert_point and low_remove_point.
1212 * linux-x86-low.cc (class x86_target) <low_insert_point>
1213 <low_remove_point>: Declare.
1214 (x86_insert_point): Turn into...
1215 (x86_target::low_insert_point): ...this.
1216 (x86_remove_point): Turn into...
1217 (x86_target::low_remove_point): ...this.
1218 (the_low_target): Remove the op fields.
1219 * linux-aarch64-low.cc (class aarch64_target) <low_insert_point>
1220 <low_remove_point>: Declare.
1221 (aarch64_insert_point): Turn into...
1222 (aarch64_target::low_insert_point): ...this.
1223 (aarch64_remove_point): Turn into...
1224 (aarch64_target::low_remove_point): ...this.
1225 (the_low_target): Remove the op fields.
1226 * linux-arm-low.cc (class arm_target) <low_insert_point>
1227 <low_remove_point>: Declare.
1228 (arm_insert_point): Turn into...
1229 (arm_target::low_insert_point): ...this.
1230 (arm_remove_point): Turn into...
1231 (arm_target::low_remove_point): ...this.
1232 (the_low_target): Remove the op fields.
1233 * linux-crisv32-low.cc (class crisv32_target) <low_insert_point>
1234 <low_remove_point>: Declare.
1235 (crisv32_insert_point): Turn into...
1236 (crisv32_target::low_insert_point): ...this.
1237 (crisv32_remove_point): Turn into...
1238 (crisv32_target::low_remove_point): ...this.
1239 (the_low_target): Remove the op fields.
1240 * linux-mips-low.cc (class mips_target) <low_insert_point>
1241 <low_remove_point>: Declare.
1242 (mips_insert_point): Turn into...
1243 (mips_target::low_insert_point): ...this.
1244 (mips_remove_point): Turn into...
1245 (mips_target::low_remove_point): ...this.
1246 (the_low_target): Remove the op fields.
1247 * linux-ppc-low.cc (class ppc_target) <low_insert_point>
1248 <low_remove_point>: Declare.
1249 (ppc_insert_point): Turn into...
1250 (ppc_target::low_insert_point): ...this.
1251 (ppc_remove_point): Turn into...
1252 (ppc_target::low_remove_point): ...this.
1253 (the_low_target): Remove the op fields.
1254 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1255 * linux-m32r-low.cc (the_low_target): Ditto.
1256 * linux-m68k-low.cc (the_low_target): Ditto.
1257 * linux-s390-low.cc (the_low_target): Ditto.
1258 * linux-sh-low.cc (the_low_target): Ditto.
1259 * linux-sparc-low.cc (the_low_target): Ditto.
1260 * linux-tic6x-low.cc (the_low_target): Ditto.
1261 * linux-tile-low.cc (the_low_target): Ditto.
1262 * linux-xtensa-low.cc (the_low_target): Ditto.
1263
1264 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1265
1266 Remove the 'supports_z_point_type' linux target op and let the
1267 concrete linux target define it by overriding the op declared in
1268 process_stratum_target.
1269
1270 * linux-low.cc (linux_process_target::supports_z_point_type):
1271 Remove.
1272 * linux-low.h (struct linux_target_ops): Remove the op.
1273 (class linux_process_target) <supports_z_point_type>: Remove.
1274 * linux-x86-low.cc (class x86_target) <supports_z_point_type>:
1275 Declare.
1276 (x86_supports_z_point_type): Turn into...
1277 (x86_target::supports_z_point_type): ...this.
1278 (the_low_target): Remove the op field.
1279 * linux-aarch64-low.cc (class aarch64_target)
1280 <supports_z_point_type>: Declare.
1281 (aarch64_supports_z_point_type): Turn into...
1282 (aarch64_target::supports_z_point_type): ...this.
1283 (the_low_target): Remove the op field.
1284 * linux-arm-low.cc (class arm_target) <supports_z_point_type>:
1285 Declare.
1286 (arm_supports_z_point_type): Turn into...
1287 (arm_target::supports_z_point_type): ...this.
1288 (the_low_target): Remove the op field.
1289 * linux-crisv32-low.cc (class crisv32_target)
1290 <supports_z_point_type>: Declare.
1291 (cris_supports_z_point_type): Turn into...
1292 (crisv32_target::supports_z_point_type): ...this.
1293 (the_low_target): Remove the op field.
1294 * linux-mips-low.cc (class mips_target) <supports_z_point_type>:
1295 Declare.
1296 (mips_supports_z_point_type): Turn into...
1297 (mips_target::supports_z_point_type): ...this.
1298 (the_low_target): Remove the op field.
1299 * linux-ppc-low.cc (class ppc_target) <supports_z_point_type>:
1300 Declare.
1301 (ppc_supports_z_point_type): Turn into...
1302 (ppc_target::supports_z_point_type): ...this.
1303 (the_low_target): Remove the op field.
1304 * linux-s390-low.cc (class s390_target) <supports_z_point_type>:
1305 Declare.
1306 (s390_supports_z_point_type): Turn into...
1307 (s390_target::supports_z_point_type): ...this.
1308 (the_low_target): Remove the op field.
1309 * linux-bfin-low.cc (the_low_target): Remove the op field.
1310 * linux-m32r-low.cc (the_low_target): Ditto.
1311 * linux-m68k-low.cc (the_low_target): Ditto.
1312 * linux-sh-low.cc (the_low_target): Ditto.
1313 * linux-sparc-low.cc (the_low_target): Ditto.
1314 * linux-tic6x-low.cc (the_low_target): Ditto.
1315 * linux-tile-low.cc (the_low_target): Ditto.
1316 * linux-xtensa-low.cc (the_low_target): Ditto.
1317
1318 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1319
1320 Turn the 'breakpoint_at' linux target op into a method of
1321 linux_process_target.
1322
1323 * linux-low.h (struct linux_target_ops): Remove the op.
1324 (class linux_process_target) <low_breakpoint_at>: Declare.
1325
1326 Update the callers below:
1327
1328 * linux-low.cc (linux_process_target::save_stop_reason)
1329 (linux_process_target::thread_still_has_status_pending)
1330 (linux_process_target::wait_1)
1331
1332 * linux-x86-low.cc (class x86_target)
1333 <low_breakpoint_at>: Declare.
1334 (x86_breakpoint_at): Turn into...
1335 (x86_target::low_breakpoint_at): ...this.
1336 (the_low_target): Remove the op field.
1337 * linux-aarch64-low.cc (class aarch64_target)
1338 <low_breakpoint_at>: Declare.
1339 (aarch64_breakpoint_at): Turn into...
1340 (aarch64_target::low_breakpoint_at): ...this.
1341 (the_low_target): Remove the op field.
1342 * linux-arm-low.cc (class arm_target)
1343 <low_breakpoint_at>: Declare.
1344 (arm_target::low_breakpoint_at): Define.
1345 (the_low_target): Remove the op field.
1346 * linux-bfin-low.cc (class bfin_target)
1347 <low_breakpoint_at>: Declare.
1348 (bfin_breakpoint_at): Turn into...
1349 (bfin_target::low_breakpoint_at): ...this.
1350 (the_low_target): Remove the op field.
1351 * linux-cris-low.cc (class cris_target)
1352 <low_breakpoint_at>: Declare.
1353 (cris_breakpoint_at): Turn into...
1354 (cris_target::low_breakpoint_at): ...this.
1355 (the_low_target): Remove the op field.
1356 * linux-crisv32-low.cc (class crisv32_target)
1357 <low_breakpoint_at>: Declare.
1358 (crisv32_breakpoint_at): Turn into...
1359 (crisv32_target::low_breakpoint_at): ...this.
1360 (the_low_target): Remove the op field.
1361 * linux-ia64-low.cc (class ia64_target)
1362 <low_breakpoint_at>: Declare.
1363 (ia64_target::low_breakpoint_at): Define.
1364 * linux-m32r-low.cc (class m32r_target)
1365 <low_breakpoint_at>: Declare.
1366 (m32r_breakpoint_at): Turn into...
1367 (m32r_target::low_breakpoint_at): ...this.
1368 (the_low_target): Remove the op field.
1369 * linux-m68k-low.cc (class m68k_target)
1370 <low_breakpoint_at>: Declare.
1371 (m68k_breakpoint_at): Turn into...
1372 (m68k_target::low_breakpoint_at): ...this.
1373 (the_low_target): Remove the op field.
1374 * linux-mips-low.cc (class mips_target)
1375 <low_breakpoint_at>: Declare.
1376 (mips_breakpoint_at): Turn into...
1377 (mips_target::low_breakpoint_at): ...this.
1378 (the_low_target): Remove the op field.
1379 * linux-nios2-low.cc (class nios2_target)
1380 <low_breakpoint_at>: Declare.
1381 (nios2_breakpoint_at): Turn into...
1382 (nios2_target::low_breakpoint_at): ...this.
1383 (the_low_target): Remove the op field.
1384 * linux-ppc-low.cc (class ppc_target)
1385 <low_breakpoint_at>: Declare.
1386 (ppc_breakpoint_at): Turn into...
1387 (ppc_target::low_breakpoint_at): ...this.
1388 (the_low_target): Remove the op field.
1389 * linux-riscv-low.cc (class riscv_target)
1390 <low_breakpoint_at>: Declare.
1391 (riscv_breakpoint_at): Turn into...
1392 (riscv_target::low_breakpoint_at): ...this.
1393 (the_low_target): Remove the op field.
1394 * linux-s390-low.cc (class s390_target)
1395 <low_breakpoint_at>: Declare.
1396 (s390_breakpoint_at): Turn into...
1397 (s390_target::low_breakpoint_at): ...this.
1398 (the_low_target): Remove the op field.
1399 * linux-sh-low.cc (class sh_target)
1400 <low_breakpoint_at>: Declare.
1401 (sh_breakpoint_at): Turn into...
1402 (sh_target::low_breakpoint_at): ...this.
1403 (the_low_target): Remove the op field.
1404 * linux-sparc-low.cc (class sparc_target)
1405 <low_breakpoint_at>: Declare.
1406 (sparc_breakpoint_at): Turn into...
1407 (sparc_target::low_breakpoint_at): ...this.
1408 (the_low_target): Remove the op field.
1409 * linux-tic6x-low.cc (class tic6x_target)
1410 <low_breakpoint_at>: Declare.
1411 (tic6x_breakpoint_at): Turn into...
1412 (tic6x_target::low_breakpoint_at): ...this.
1413 (the_low_target): Remove the op field.
1414 * linux-tile-low.cc (class tile_target)
1415 <low_breakpoint_at>: Declare.
1416 (tile_breakpoint_at): Turn into...
1417 (tile_target::low_breakpoint_at): ...this.
1418 (the_low_target): Remove the op field.
1419 * linux-xtensa-low.cc (class xtensa_target)
1420 <low_breakpoint_at>: Declare.
1421 (xtensa_breakpoint_at): Turn into...
1422 (xtensa_target::low_breakpoint_at): ...this.
1423 (the_low_target): Remove the op field.
1424
1425 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1426
1427 Turn the 'decr_pc_after_break' linux_target_ops field into
1428 a method of linux_process_target.
1429
1430 * linux-low.h (struct linux_target_ops)
1431 <decr_pc_after_break>: Remove.
1432 (class linux_process_target) <low_decr_pc_after_break>: New method
1433 declaration.
1434 * linux-low.cc (linux_process_target::low_decr_pc_after_break):
1435 New method implementation.
1436
1437 Update the users below.
1438
1439 (linux_process_target::save_stop_reason)
1440 (linux_process_target::wait_1)
1441 * linux-x86-low.cc (class x86_target) <low_decr_pc_after_break>:
1442 New declaration.
1443 (x86_target::low_decr_pc_after_break): New method implementation.
1444 (the_low_target): Remove the field.
1445 * linux-bfin-low.cc (class bfin_target) <low_decr_pc_after_break>:
1446 New declaration.
1447 (bfin_target::low_decr_pc_after_break): New method implementation.
1448 (the_low_target): Remove the field.
1449 * linux-m68k-low.cc (class m68k_target) <low_decr_pc_after_break>:
1450 New declaration.
1451 (m68k_target::low_decr_pc_after_break): New method implementation.
1452 (the_low_target): Remove the field.
1453 * linux-s390-low.cc (class s390_target) <low_decr_pc_after_break>:
1454 New declaration.
1455 (s390_target::low_decr_pc_after_break): New method implementation.
1456 (the_low_target): Remove the field.
1457 * linux-aarch64-low.cc (the_low_target): Remove the field.
1458 * linux-arm-low.cc (the_low_target): Remove the field.
1459 * linux-cris-low.cc (the_low_target): Remove the field.
1460 * linux-crisv32-low.cc (the_low_target): Remove the field.
1461 * linux-m32r-low.cc (the_low_target): Remove the field.
1462 * linux-mips-low.cc (the_low_target): Remove the field.
1463 * linux-nios2-low.cc (the_low_target): Remove the field.
1464 * linux-ppc-low.cc (the_low_target): Remove the field.
1465 * linux-riscv-low.cc (the_low_target): Remove the field.
1466 * linux-sh-low.cc (the_low_target): Remove the field.
1467 * linux-sparc-low.cc (the_low_target): Remove the field.
1468 * linux-tic6x-low.cc (the_low_target): Remove the field.
1469 * linux-tile-low.cc (the_low_target): Remove the field.
1470 * linux-xtensa-low.cc (the_low_target): Remove the field.
1471
1472 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1473
1474 Remove the 'supports_software_single_step' linux target op and let
1475 the concrete linux target define it by overriding the op in
1476 process_stratum_target.
1477 Turn the 'get_next_pcs' linux target op into a method of
1478 linux_process_target.
1479
1480 * linux-low.h (struct linux_target_ops): Remove the ops.
1481 (class linux_process_target) <supports_software_single_step>:
1482 Remove.
1483 <low_get_next_pcs>: Declare.
1484 * linux-low.cc (can_software_single_step): Remove.
1485 (linux_process_target::low_get_next_pcs): Define.
1486 (linux_process_target::supports_software_single_step): Remove.
1487
1488 Update the callers below.
1489
1490 (linux_process_target::handle_extended_wait)
1491 (linux_process_target::wait_1)
1492 (linux_process_target::install_software_single_step_breakpoints)
1493 (linux_process_target::single_step)
1494 (linux_process_target::thread_needs_step_over)
1495 (linux_process_target::proceed_one_lwp)
1496 (linux_process_target::supports_range_stepping)
1497
1498 * linux-x86-low.cc (the_low_target): Remove the op field.
1499 * linux-aarch64-low.cc (the_low_target): Ditto.
1500 * linux-bfin-low.cc (the_low_target): Ditto.
1501 * linux-cris-low.cc (the_low_target): Ditto.
1502 * linux-crisv32-low.cc (the_low_target): Ditto.
1503 * linux-m32r-low.cc (the_low_target): Ditto.
1504 * linux-m68k-low.cc (the_low_target): Ditto.
1505 * linux-mips-low.cc (the_low_target): Ditto.
1506 * linux-nios2-low.cc (the_low_target): Ditto.
1507 * linux-ppc-low.cc (the_low_target): Ditto.
1508 * linux-riscv-low.cc (the_low_target): Ditto.
1509 * linux-s390-low.cc (the_low_target): Ditto.
1510 * linux-sh-low.cc (the_low_target): Ditto.
1511 * linux-sparc-low.cc (the_low_target): Ditto.
1512 * linux-tic6x-low.cc (the_low_target): Ditto.
1513 * linux-tile-low.cc (the_low_target): Ditto.
1514 * linux-xtensa-low.cc (the_low_target): Ditto.
1515 * linux-arm-low.cc (class arm_target) <low_get_next_pcs>
1516 <supports_software_single_step>: Declare.
1517 (arm_target::supports_software_single_step): Define.
1518 (arm_gdbserver_get_next_pcs): Turn into...
1519 (arm_target::low_get_next_pcs): ...this.
1520 (the_low_target): Remove the op field.
1521
1522 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1523
1524 Remove the 'sw_breakpoint_from_kind' linux target op, and let
1525 the concrete linux target define it by overriding the op
1526 in process_stratum_target.
1527
1528 * linux-low.cc (linux_process_target::sw_breakpoint_from_kind):
1529 Remove.
1530 * linux-low.h (struct linux_target_ops): Remove the op.
1531 (class linux_process_target) <sw_breakpoint_from_kind>: Remove.
1532 * linux-x86-low.cc (class x86_target) <sw_breakpoint_from_kind>:
1533 Declare.
1534 (x86_sw_breakpoint_from_kind): Turn into...
1535 (x86_target::sw_breakpoint_from_kind): ...this.
1536 (the_low_target): Remove the op field.
1537 * linux-aarch64-low.cc (class aarch64_target)
1538 <sw_breakpoint_from_kind>: Declare.
1539 (aarch64_sw_breakpoint_from_kind): Turn into...
1540 (aarch64_target::sw_breakpoint_from_kind): ...this.
1541 (the_low_target): Remove the op field.
1542 * linux-arm-low.cc (class arm_target) <sw_breakpoint_from_kind>:
1543 Declare.
1544 (arm_target::sw_breakpoint_from_kind): Define.
1545 (the_low_target): Remove the op field.
1546 * linux-bfin-low.cc (class bfin_target) <sw_breakpoint_from_kind>:
1547 Declare.
1548 (bfin_sw_breakpoint_from_kind): Turn into...
1549 (bfin_target::sw_breakpoint_from_kind): ...this.
1550 (the_low_target): Remove the op field.
1551 * linux-cris-low.cc (class cris_target) <sw_breakpoint_from_kind>:
1552 Declare.
1553 (cris_sw_breakpoint_from_kind): Turn into...
1554 (cris_target::sw_breakpoint_from_kind): ...this.
1555 (the_low_target): Remove the op field.
1556 * linux-crisv32-low.cc (class crisv32_target)
1557 <sw_breakpoint_from_kind>: Declare.
1558 (cris_sw_breakpoint_from_kind): Turn into...
1559 (crisv32_target::sw_breakpoint_from_kind): ...this.
1560 (the_low_target): Remove the op field.
1561 * linux-ia64-low.cc (class ia64_target) <sw_breakpoint_from_kind>:
1562 Declare.
1563 (ia64_target::sw_breakpoint_from_kind): Define.
1564 * linux-m32r-low.cc (class m32r_target) <sw_breakpoint_from_kind>:
1565 Declare.
1566 (m32r_sw_breakpoint_from_kind): Turn into...
1567 (m32r_target::sw_breakpoint_from_kind): ...this.
1568 (the_low_target): Remove the op field.
1569 * linux-m68k-low.cc (class m68k_target) <sw_breakpoint_from_kind>:
1570 Declare.
1571 (m68k_sw_breakpoint_from_kind): Turn into...
1572 (m68k_target::sw_breakpoint_from_kind): ...this.
1573 (the_low_target): Remove the op field.
1574 * linux-mips-low.cc (class mips_target) <sw_breakpoint_from_kind>:
1575 Declare.
1576 (mips_sw_breakpoint_from_kind): Turn into...
1577 (mips_target::sw_breakpoint_from_kind): ...this.
1578 (the_low_target): Remove the op field.
1579 * linux-nios2-low.cc (class nios2_target) <sw_breakpoint_from_kind>:
1580 Declare.
1581 (nios2_sw_breakpoint_from_kind): Turn into...
1582 (nios2_target::sw_breakpoint_from_kind): ...this.
1583 (the_low_target): Remove the op field.
1584 * linux-ppc-low.cc (class ppc_target) <sw_breakpoint_from_kind>:
1585 Declare.
1586 (ppc_sw_breakpoint_from_kind): Turn into...
1587 (ppc_target::sw_breakpoint_from_kind): ...this.
1588 (the_low_target): Remove the op field.
1589 * linux-riscv-low.cc (class riscv_target) <sw_breakpoint_from_kind>:
1590 Declare.
1591 (riscv_sw_breakpoint_from_kind): Turn into...
1592 (riscv_target::sw_breakpoint_from_kind): ...this.
1593 (the_low_target): Remove the op field.
1594 * linux-s390-low.cc (class s390_target) <sw_breakpoint_from_kind>:
1595 Declare.
1596 (s390_sw_breakpoint_from_kind): Turn into...
1597 (s390_target::sw_breakpoint_from_kind): ...this.
1598 (the_low_target): Remove the op field.
1599 * linux-sh-low.cc (class sh_target) <sw_breakpoint_from_kind>:
1600 Declare.
1601 (sh_sw_breakpoint_from_kind): Turn into...
1602 (sh_target::sw_breakpoint_from_kind): ...this.
1603 (the_low_target): Remove the op field.
1604 * linux-sparc-low.cc (class sparc_target) <sw_breakpoint_from_kind>:
1605 Declare.
1606 (sparc_sw_breakpoint_from_kind): Turn into...
1607 (sparc_target::sw_breakpoint_from_kind): ...this.
1608 (the_low_target): Remove the op field.
1609 * linux-tic6x-low.cc (class tic6x_target) <sw_breakpoint_from_kind>:
1610 Declare.
1611 (tic6x_sw_breakpoint_from_kind): Turn into...
1612 (tic6x_target::sw_breakpoint_from_kind): ...this.
1613 (the_low_target): Remove the op field.
1614 * linux-tile-low.cc (class tile_target) <sw_breakpoint_from_kind>:
1615 Declare.
1616 (tile_sw_breakpoint_from_kind): Turn into...
1617 (tile_target::sw_breakpoint_from_kind): ...this.
1618 (the_low_target): Remove the op field.
1619 * linux-xtensa-low.cc (class xtensa_target)
1620 <sw_breakpoint_from_kind>: Declare.
1621 (xtensa_sw_breakpoint_from_kind): Turn into...
1622 (xtensa_target::sw_breakpoint_from_kind): ...this.
1623 (the_low_target): Remove the op field.
1624
1625 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1626
1627 Remove the 'breakpoint_kind_from_pc' and
1628 'breakpoint_kind_from_current_state' linux target ops, and let the
1629 concrete linux target define them by overriding the ops of
1630 process_stratum_target.
1631
1632 * linux-low.cc (linux_process_target::breakpoint_kind_from_pc):
1633 Remove.
1634 (linux_process_target::breakpoint_kind_from_current_state): Remove.
1635 * linux-low.h (struct linux_target_ops): Remove ops.
1636 (class linux_process_target) <breakpoint_kind_from_pc>: Remove.
1637 <breakpoint_kind_from_current_state>: Remove.
1638 * linux-x86-low.cc (the_low_target): Remove the op fields.
1639 * linux-bfin-low.cc (the_low_target): Ditto.
1640 * linux-cris-low.cc (the_low_target): Ditto.
1641 * linux-crisv32-low.cc (the_low_target): Ditto.
1642 * linux-m32r-low.cc (the_low_target): Ditto.
1643 * linux-m68k-low.cc (the_low_target): Ditto.
1644 * linux-mips-low.cc (the_low_target): Ditto.
1645 * linux-nios2-low.cc (the_low_target): Ditto.
1646 * linux-ppc-low.cc (the_low_target): Ditto.
1647 * linux-s390-low.cc (the_low_target): Ditto.
1648 * linux-sh-low.cc (the_low_target): Ditto.
1649 * linux-sparc-low.cc (the_low_target): Ditto.
1650 * linux-tic6x-low.cc (the_low_target): Ditto.
1651 * linux-tile-low.cc (the_low_target): Ditto.
1652 * linux-xtensa-low.cc (the_low_target): Ditto.
1653 * linux-aarch64-low.cc (class aarch64_target)
1654 <breakpoint_kind_from_pc>
1655 <breakpoint_kind_from_current_state>: Declare.
1656 (aarch64_breakpoint_kind_from_pc): Turn into...
1657 (aarch64_target::breakpoint_kind_from_pc): ...this.
1658 (aarch64_breakpoint_kind_from_current_state): Turn into...
1659 (aarch64_target::breakpoint_kind_from_current_state): ...this.
1660 (the_low_target): Remove the op fields.
1661 * linux-arm-low.cc (class arm_target):
1662 <breakpoint_kind_from_pc>
1663 <breakpoint_kind_from_current_state>: Declare.
1664 (arm_target::breakpoint_kind_from_pc): Define.
1665 (arm_target::breakpoint_kind_from_current_state): Define.
1666 (the_low_target): Remove the op fields.
1667 * linux-riscv-low.cc (class riscv_target):
1668 <breakpoint_kind_from_pc>: Declare.
1669 (riscv_breakpoint_kind_from_pc): Turn into...
1670 (riscv_target::breakpoint_kind_from_pc): ...this.
1671 (the_low_target): Remove the op fields.
1672
1673 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1674
1675 Turn the 'get_pc' and 'set_pc' linux target ops into methods
1676 of linux_process_target.
1677
1678 * linux-low.h (struct linux_target_ops): Remove the ops.
1679 (class linux_process_target) <low_supports_breakpoints>
1680 <low_get_pc>
1681 <low_set_pc>: Declare.
1682 * linux-low.cc (supports_breakpoints): Turn into...
1683 (linux_process_target::low_supports_breakpoints): ...this.
1684 (linux_process_target::low_get_pc): Define.
1685 (linux_process_target::low_set_pc): Define.
1686
1687 Update the callers below.
1688
1689 (linux_process_target::get_pc)
1690 (linux_process_target::save_stop_reason)
1691 (linux_process_target::maybe_move_out_of_jump_pad)
1692 (linux_process_target::wait_1)
1693 (linux_process_target::resume_one_lwp_throw)
1694 (linux_process_target::resume)
1695 (linux_process_target::proceed_all_lwps)
1696 (linux_process_target::read_pc)
1697 (linux_process_target::write_pc)
1698
1699 * linux-x86-low.cc (class linux_process_target)
1700 <low_supports_breakpoints>
1701 <low_get_pc>
1702 <low_set_pc>: Declare.
1703 (x86_target::low_supports_breakpoints): Define.
1704 (x86_get_pc): Turn into...
1705 (x86_target::low_get_pc): ...this.
1706 (x86_set_pc): Turn into...
1707 (x86_target::low_set_pc): ...this.
1708 (the_low_target): Remove the op fields.
1709 * linux-arm-low.cc (class arm_target)
1710 <low_supports_breakpoints>
1711 <low_get_pc>
1712 <low_set_pc>: Declare.
1713 (arm_target::low_supports_breakpoints)
1714 (arm_target::low_get_pc)
1715 (arm_target::low_set_pc): Define.
1716 (the_low_target): Remove the op fields.
1717 * linux-bfin-low.cc (class bfin_target)
1718 <low_supports_breakpoints>
1719 <low_get_pc>
1720 <low_set_pc>: Declare.
1721 (bfin_target::low_supports_breakpoints)
1722 (bfin_target::low_get_pc)
1723 (bfin_target::low_set_pc): Define.
1724 (the_low_target): Remove the op fields.
1725 * linux-cris-low.cc (class cris_target)
1726 <low_supports_breakpoints>
1727 <low_get_pc>
1728 <low_set_pc>: Declare.
1729 (cris_target::low_supports_breakpoints)
1730 (cris_target::low_get_pc)
1731 (cris_target::low_set_pc): Define.
1732 (the_low_target): Remove the op fields.
1733 * linux-crisv32-low.cc (class crisv32_target)
1734 <low_supports_breakpoints>
1735 <low_get_pc>
1736 <low_set_pc>: Declare.
1737 (crisv32_target::low_supports_breakpoints)
1738 (crisv32_target::low_get_pc)
1739 (crisv32_target::low_set_pc): Define.
1740 (the_low_target): Remove the op fields.
1741 * linux-m32r-low.cc (class m32r_target)
1742 <low_supports_breakpoints>
1743 <low_get_pc>
1744 <low_set_pc>: Declare.
1745 (m32r_target::low_supports_breakpoints)
1746 (m32r_target::low_get_pc)
1747 (m32r_target::low_set_pc): Define.
1748 (the_low_target): Remove the op fields.
1749 * linux-m68k-low.cc (class m68k_target)
1750 <low_supports_breakpoints>
1751 <low_get_pc>
1752 <low_set_pc>: Declare.
1753 (m68k_target::low_supports_breakpoints)
1754 (m68k_target::low_get_pc)
1755 (m68k_target::low_set_pc): Define.
1756 (the_low_target): Remove the op fields.
1757 * linux-nios2-low.cc (class nios2_target)
1758 <low_supports_breakpoints>
1759 <low_get_pc>
1760 <low_set_pc>: Declare.
1761 (nios2_target::low_supports_breakpoints)
1762 (nios2_target::low_get_pc)
1763 (nios2_target::low_set_pc): Define.
1764 (the_low_target): Remove the op fields.
1765 * linux-sh-low.cc (class sh_target)
1766 <low_supports_breakpoints>
1767 <low_get_pc>
1768 <low_set_pc>: Declare.
1769 (sh_target::low_supports_breakpoints)
1770 (sh_target::low_get_pc)
1771 (sh_target::low_set_pc): Define.
1772 (the_low_target): Remove the op fields.
1773 * linux-xtensa-low.cc (class xtensa_target)
1774 <low_supports_breakpoints>
1775 <low_get_pc>
1776 <low_set_pc>: Declare.
1777 (xtensa_target::low_supports_breakpoints)
1778 (xtensa_target::low_get_pc)
1779 (xtensa_target::low_set_pc): Define.
1780 (the_low_target): Remove the op fields.
1781 * linux-sparc-low.cc (class sparc_target)
1782 <low_supports_breakpoints>
1783 <low_get_pc>: Declare.
1784 (sparc_target::low_supports_breakpoints)
1785 (sparc_target::low_get_pc): Define.
1786 (the_low_target): Remove the op fields.
1787 * linux-tile-low.cc (class tile_target)
1788 <low_supports_breakpoints>
1789 <low_get_pc>
1790 <low_set_pc>: Declare.
1791 (tile_target::low_supports_breakpoints)
1792 (tile_target::low_get_pc)
1793 (tile_target::low_set_pc): Define.
1794 (the_low_target): Remove the op fields.
1795 * linux-aarch64-low.cc (class aarch64_target)
1796 <low_supports_breakpoints>
1797 <low_get_pc>
1798 <low_set_pc>: Declare.
1799 (aarch64_target::low_supports_breakpoints): Define.
1800 (aarch64_get_pc): Turn into...
1801 (aarch64_target::low_get_pc): ...this.
1802 (aarch64_set_pc): Turn into...
1803 (aarch64_target::low_set_pc): ...this.
1804 (the_low_target): Remove the op fields.
1805 * linux-mips-low.cc (class mips_target)
1806 <low_supports_breakpoints>
1807 <low_get_pc>
1808 <low_set_pc>: Declare.
1809 (mips_target::low_supports_breakpoints): Define.
1810 (mips_get_pc): Turn into...
1811 (mips_target::low_get_pc): ...this.
1812 (mips_set_pc): Turn into...
1813 (mips_target::low_set_pc): ...this.
1814 (the_low_target): Remove the op fields.
1815 * linux-ppc-low.cc (class ppc_target)
1816 <low_supports_breakpoints>
1817 <low_get_pc>
1818 <low_set_pc>: Declare.
1819 (ppc_target::low_supports_breakpoints): Define.
1820 (ppc_get_pc): Turn into...
1821 (ppc_target::low_get_pc): ...this.
1822 (ppc_set_pc): Turn into...
1823 (ppc_target::low_set_pc): ...this.
1824 (the_low_target): Remove the op fields.
1825 * linux-riscv-low.cc (class riscv_target)
1826 <low_supports_breakpoints>
1827 <low_get_pc>
1828 <low_set_pc>: Declare.
1829 (riscv_target::low_supports_breakpoints): Define.
1830 (riscv_get_pc): Turn into...
1831 (riscv_target::low_get_pc): ...this.
1832 (riscv_set_pc): Turn into...
1833 (riscv_target::low_set_pc): ...this.
1834 (the_low_target): Remove the op fields.
1835 * linux-s390-low.cc (class s390_target)
1836 <low_supports_breakpoints>
1837 <low_get_pc>
1838 <low_set_pc>: Declare.
1839 (s390_target::low_supports_breakpoints): Define.
1840 (s390_get_pc): Turn into...
1841 (s390_target::low_get_pc): ...this.
1842 (s390_set_pc): Turn into...
1843 (s390_target::low_set_pc): ...this.
1844 (the_low_target): Remove the op fields.
1845 * linux-tic6x-low.cc (class tic6x_target)
1846 <low_supports_breakpoints>
1847 <low_get_pc>
1848 <low_set_pc>: Declare.
1849 (tic6x_target::low_supports_breakpoints): Define.
1850 (tic6x_get_pc): Turn into...
1851 (tic6x_target::low_get_pc): ...this.
1852 (tic6x_set_pc): Turn into...
1853 (tic6x_target::low_set_pc): ...this.
1854 (the_low_target): Remove the op fields.
1855
1856 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1857
1858 Turn some more static methods in linux-low into private methods
1859 of linux_process_target.
1860
1861 * linux-low.cc (get_pc): Turn into...
1862 (linux_process_target::get_pc): ...this.
1863 (save_stop_reason): Turn into...
1864 (linux_process_target::save_stop_reason): ...this.
1865 (thread_still_has_status_pending_p): Turn into...
1866 (linux_process_target::thread_still_has_status_pending): ...this.
1867 (status_pending_p_callback): Turn into...
1868 (linux_process_target::status_pending_p_callback): ...this.
1869 (resume_stopped_resumed_lwps): Turn into...
1870 (linux_process_target::resume_stopped_resumed_lwps): ...this.
1871 (install_software_single_step_breakpoints): Turn into...
1872 (linux_process_target::install_software_single_step_breakpoints):
1873 ...this.
1874 (single_step): Turn into...
1875 (linux_process_target::single_step): ...this.
1876 (linux_resume_one_lwp_throw): Turn into...
1877 (linux_process_target::resume_one_lwp_throw): ...this.
1878 (linux_resume_one_lwp): Turn into...
1879 (linux_process_target::resume_one_lwp): ...this.
1880 (resume_status_pending_p): Turn into...
1881 (linux_process_target::resume_status_pending): ...this.
1882 (need_step_over_p): Turn into...
1883 (linux_process_target::thread_needs_step_over): ...this.
1884 (linux_resume_one_thread): Turn into...
1885 (linux_process_target::resume_one_thread): ...this.
1886 (proceed_one_lwp): Turn into...
1887 (linux_process_target::proceed_one_lwp): ...this.
1888 (unsuspend_and_proceed_one_lwp): Turn into...
1889 (linux_process_target::unsuspend_and_proceed_one_lwp): ...this.
1890
1891 Update the calls/references to the above functions below.
1892
1893 (linux_process_target::handle_extended_wait)
1894 (linux_process_target::filter_event)
1895 (linux_process_target::wait_for_event_filtered)
1896 (linux_process_target::wait_1)
1897 (linux_process_target::move_out_of_jump_pad)
1898 (linux_process_target::start_step_over)
1899 (linux_process_target::resume)
1900 (linux_process_target::proceed_all_lwps)
1901 (regsets_store_inferior_registers)
1902 (linux_process_target::store_register)
1903
1904 * linux-low.h (class linux_process_target)
1905 <get_pc>
1906 <save_stop_reason>
1907 <thread_still_has_status_pending>
1908 <status_pending_p_callback>
1909 <resume_stopped_resumed_lwps>
1910 <install_software_single_step_breakpoints>
1911 <single_step>
1912 <resume_one_lwp_throw>
1913 <resume_one_lwp>
1914 <resume_status_pending>
1915 <thread_needs_step_over>
1916 <resume_one_thread>
1917 <proceed_one_lwp>
1918 <unsuspend_and_proceed_one_lwp>: Declare.
1919
1920 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1921
1922 Turn the 'fetch_register' linux target op into a method of
1923 linux_process_target.
1924
1925 * linux-low.h (struct linux_target_ops) <fetch_register>: Remove.
1926 (class linux_process_target) <low_fetch_register>: Declare.
1927 * linux-x86-low.cc (the_low_target)
1928 * linux-aarch64-low.cc (the_low_target)
1929 * linux-arm-low.cc (the_low_target)
1930 * linux-bfin-low.cc (the_low_target)
1931 * linux-cris-low.cc (the_low_target)
1932 * linux-crisv32-low.cc (the_low_target)
1933 * linux-m32r-low.cc (the_low_target)
1934 * linux-m68k-low.cc (the_low_target)
1935 * linux-nios2-low.cc (the_low_target)
1936 * linux-ppc-low.cc (the_low_target)
1937 * linux-s390-low.cc (the_low_target)
1938 * linux-sh-low.cc (the_low_target)
1939 * linux-sparc-low.cc (the_low_target)
1940 * linux-tic6x-low.cc (the_low_target)
1941 * linux-tile-low.cc (the_low_target)
1942 * linux-xtensa-low.cc (the_low_target): Remove the op field.
1943 * linux-ia64-low.cc (class ia64_target) <low_fetch_register>:
1944 Declare.
1945 (ia64_fetch_register): Turn into...
1946 (ia64_target::low_fetch_register): ...this.
1947 (the_low_target): Remove the op field.
1948 * linux-mips-low.cc (class mips_target) <low_fetch_register>:
1949 Declare.
1950 (mips_fetch_register): Turn into...
1951 (mips_target::low_fetch_register): ...this.
1952 (the_low_target): Remove the op field.
1953 * linux-riscv-low.cc (class riscv_target) <low_fetch_register>:
1954 Declare.
1955 (riscv_fetch_register): Turn into...
1956 (riscv_target::low_fetch_register): ...this.
1957 (the_low_target): Remove the op field.
1958
1959 Update the callers below.
1960
1961 * linux-low.cc (linux_process_target::fetch_registers)
1962 (linux_process_target::low_fetch_register)
1963
1964 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1965
1966 Turn the 'cannot_fetch_register' and 'cannot_store_register'
1967 linux target ops into methods of linux_process_target.
1968
1969 * linux-low.h (struct linux_target_ops): Remove the low target ops.
1970 (class linux_process_target) <fetch_register>
1971 <store_register>
1972 <usr_fetch_inferior_registers>
1973 <usr_store_inferior_registers>
1974 <low_cannot_fetch_register>
1975 <low_cannot_fetch_register> Declare.
1976 * linux-low.cc (fetch_register): Turn into...
1977 (linux_process_target::fetch_register): ...this.
1978 (store_register): Turn into ...
1979 (linux_process_target::store_register): ...this.
1980 (usr_fetch_inferior_registers): Turn into...
1981 (linux_process_target::usr_fetch_inferior_registers): ...this.
1982 (usr_store_inferior_registers): Turn into...
1983 (linux_process_target::usr_store_inferior_registers): ...this.
1984 * linux-x86-low.cc (class x86_target)
1985 <low_cannot_fetch_register>
1986 <low_cannot_store_register>: Declare.
1987 (x86_cannot_store_register): Turn into...
1988 (x86_target::low_cannot_store_register): ...this.
1989 (x86_cannot_fetch_register): Turn into...
1990 (x86_target::low_cannot_fetch_register): ...this.
1991 (the_low_target): Remove the target op fields.
1992 * linux-aarch64-low.cc (class aarch64_target)
1993 <low_cannot_fetch_register>
1994 <low_cannot_store_register>: Declare.
1995 (aarch64_target::low_cannot_fetch_register)
1996 (aarch64_target::low_cannot_store_register): Define.
1997 (the_low_target): Remove the op fields.
1998 * linux-arm-low.cc (class arm_target)
1999 <low_cannot_fetch_register>
2000 <low_cannot_store_register>: Declare.
2001 (arm_cannot_fetch_register): Turn into...
2002 (arm_target::low_cannot_fetch_register): ...this.
2003 (arm_cannot_store_register): Turn into...
2004 (arm_target::low_cannot_store_register): ...this.
2005 (the_low_target): Remove the op fields.
2006 * linux-bfin-low.cc (class bfin_target)
2007 <low_cannot_fetch_register>
2008 <low_cannot_store_register>: Declare.
2009 (bfin_cannot_fetch_register): Turn into...
2010 (bfin_target::low_cannot_fetch_register): ...this.
2011 (bfin_cannot_store_register): Turn into...
2012 (bfin_target::low_cannot_store_register): ...this.
2013 (the_low_target): Remove the op fields.
2014 * linux-cris-low.cc (class cris_target)
2015 <low_cannot_fetch_register>
2016 <low_cannot_store_register>: Declare.
2017 (cris_cannot_fetch_register): Turn into...
2018 (cris_target::low_cannot_fetch_register): ...this.
2019 (cris_cannot_store_register): Turn into...
2020 (cris_target::low_cannot_store_register): ...this.
2021 (the_low_target): Remove the op fields.
2022 * linux-crisv32-low.cc (class crisv32_target)
2023 <low_cannot_fetch_register>
2024 <low_cannot_store_register>: Declare.
2025 (crisv32_target::low_cannot_fetch_register)
2026 (crisv32_target::low_cannot_store_register): Define.
2027 (the_low_target): Remove the op fields.
2028 * linux-ia64-low.cc (class ia64_target)
2029 <low_cannot_fetch_register>
2030 <low_cannot_store_register>: Declare.
2031 (ia64_cannot_fetch_register): Turn into...
2032 (ia64_target::low_cannot_fetch_register): ...this.
2033 (ia64_cannot_store_register): Turn into...
2034 (ia64_target::low_cannot_store_register): ...this.
2035 (the_low_target): Remove the op fields.
2036 * linux-m32r-low.cc (class m32r_target)
2037 <low_cannot_fetch_register>
2038 <low_cannot_store_register>: Declare.
2039 (m32r_cannot_fetch_register): Turn into...
2040 (m32r_target::low_cannot_fetch_register): ...this.
2041 (m32r_cannot_store_register): Turn into...
2042 (m32r_target::low_cannot_store_register): ...this.
2043 (the_low_target): Remove the op fields.
2044 * linux-m68k-low.cc (class m68k_target)
2045 <low_cannot_fetch_register>
2046 <low_cannot_store_register>: Declare.
2047 (m68k_cannot_fetch_register): Turn into...
2048 (m68k_target::low_cannot_fetch_register): ...this.
2049 (m68k_cannot_store_register): Turn into...
2050 (m68k_target::low_cannot_store_register): ...this.
2051 (the_low_target): Remove the op fields.
2052 * linux-mips-low.cc (class mips_target)
2053 <low_cannot_fetch_register>
2054 <low_cannot_store_register>: Declare.
2055 (mips_cannot_fetch_register): Turn into...
2056 (mips_target::low_cannot_fetch_register): ...this.
2057 (mips_cannot_store_register): Turn into...
2058 (mips_target::low_cannot_store_register): ...this.
2059 (get_usrregs_info): Inline at the call sites in
2060 low_cannot_fetch_register and low_cannot_store_register,
2061 and remove.
2062 (the_low_target): Remove the op fields.
2063 * linux-nios2-low.cc (class nios2_target)
2064 <low_cannot_fetch_register>
2065 <low_cannot_store_register>: Declare.
2066 (nios2_cannot_fetch_register): Turn into...
2067 (nios2_target::low_cannot_fetch_register): ...this.
2068 (nios2_cannot_store_register): Turn into...
2069 (nios2_target::low_cannot_store_register): ...this.
2070 (the_low_target): Remove the op fields.
2071 * linux-ppc-low.cc (class ppc_target)
2072 <low_cannot_fetch_register>
2073 <low_cannot_store_register>: Declare.
2074 (ppc_cannot_fetch_register): Turn into...
2075 (ppc_target::low_cannot_fetch_register): ...this.
2076 (ppc_cannot_store_register): Turn into...
2077 (ppc_target::low_cannot_store_register): ...this.
2078 (the_low_target): Remove the op fields.
2079 * linux-riscv-low.cc (class riscv_target)
2080 <low_cannot_fetch_register>
2081 <low_cannot_store_register>: Declare.
2082 (riscv_target::low_cannot_fetch_register)
2083 (riscv_target::low_cannot_store_register): Define.
2084 (the_low_target): Remove the op fields.
2085 * linux-s390-low.cc (class s390_target)
2086 <low_cannot_fetch_register>
2087 <low_cannot_store_register>: Declare.
2088 (s390_cannot_fetch_register): Turn into...
2089 (s390_target::low_cannot_fetch_register): ...this.
2090 (s390_cannot_store_register): Turn into...
2091 (s390_target::low_cannot_store_register): ...this.
2092 (the_low_target): Remove the op fields.
2093 * linux-sh-low.cc (class sh_target)
2094 <low_cannot_fetch_register>
2095 <low_cannot_store_register>: Declare.
2096 (sh_cannot_fetch_register): Turn into...
2097 (sh_target::low_cannot_fetch_register): ...this.
2098 (sh_cannot_store_register): Turn into...
2099 (sh_target::low_cannot_store_register): ...this.
2100 (the_low_target): Remove the op fields.
2101 * linux-sparc-low.cc (class sparc_target)
2102 <low_cannot_fetch_register>
2103 <low_cannot_store_register>: Declare.
2104 (sparc_cannot_fetch_register): Turn into...
2105 (sparc_target::low_cannot_fetch_register): ...this.
2106 (sparc_cannot_store_register): Turn into...
2107 (sparc_target::low_cannot_store_register): ...this.
2108 (the_low_target): Remove the op fields.
2109 * linux-tic6x-low.cc (class tic6x_target)
2110 <low_cannot_fetch_register>
2111 <low_cannot_store_register>: Declare.
2112 (tic6x_cannot_fetch_register): Turn into...
2113 (tic6x_target::low_cannot_fetch_register): ...this.
2114 (tic6x_cannot_store_register): Turn into...
2115 (tic6x_target::low_cannot_store_register): ...this.
2116 (the_low_target): Remove the op fields.
2117 * linux-tile-low.cc (class tile_target)
2118 <low_cannot_fetch_register>
2119 <low_cannot_store_register>: Declare.
2120 (tile_cannot_fetch_register): Turn into...
2121 (tile_target::low_cannot_fetch_register): ...this.
2122 (tile_cannot_store_register): Turn into...
2123 (tile_target::low_cannot_store_register): ...this.
2124 (the_low_target): Remove the op fields.
2125 * linux-xtensa-low.cc (class xtensa_target)
2126 <low_cannot_fetch_register>
2127 <low_cannot_store_register>: Declare.
2128 (xtensa_target::low_cannot_fetch_register)
2129 (xtensa_target::low_cannot_store_register): Define.
2130 (the_low_target): Remove the op fields.
2131
2132 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2133
2134 Turn the 'regs_info' linux target op into a method of
2135 linux_process_target.
2136
2137 * linux-low.h (struct linux_target_ops) <regs_info>: Remove.
2138 (class linux_process_target) <get_regs_info>: Define.
2139
2140 Update the callers below.
2141
2142 * linux-low.cc (linux_process_target::fetch_registers)
2143 (linux_process_target::store_registers)
2144 * proc-service.cc (gregset_info)
2145
2146 * linux-x86-low.cc (class x86_target) <get_regs_info>: Declare.
2147 (x86_linux_regs_info): Turn into ...
2148 (x86_target::get_regs_info): ...this.
2149 (the_low_target): Remove the op field.
2150 * linux-aarch64-low.cc (class aarch64_target) <get_regs_info>:
2151 Declare.
2152 (aarch64_regs_info): Turn into ...
2153 (aarch64_target::get_regs_info): ...this.
2154 (the_low_target): Remove the op field.
2155 * linux-arm-low.cc (class arm_target) <get_regs_info>: Declare.
2156 (arm_regs_info): Turn into ...
2157 (arm_target::get_regs_info): ...this.
2158 (the_low_target): Remove the op field.
2159 * linux-bfin-low.cc (class bfin_target) <get_regs_info>: Declare.
2160 (bfin_regs_info): Turn into ...
2161 (bfin_target::get_regs_info): ...this.
2162 (the_low_target): Remove the op field.
2163 * linux-cris-low.cc (class cris_target) <get_regs_info>: Declare.
2164 (cris_regs_info): Turn into ...
2165 (cris_target::get_regs_info): ...this.
2166 (the_low_target): Remove the op field.
2167 * linux-crisv32-low.cc (class crisv32_target) <get_regs_info>:
2168 Declare.
2169 (crisv32_regs_info): Turn into ...
2170 (crisv32_target::get_regs_info): ...this.
2171 (the_low_target): Remove the op field.
2172 * linux-ia64-low.cc (class ia64_target) <get_regs_info>: Declare.
2173 (ia64_regs_info): Turn into ...
2174 (ia64_target::get_regs_info): ...this.
2175 (the_low_target): Remove the op field.
2176 * linux-m32r-low.cc (class m32r_target) <get_regs_info>: Declare.
2177 (m32r_regs_info): Turn into ...
2178 (m32r_target::get_regs_info): ...this.
2179 (the_low_target): Remove the op field.
2180 * linux-m68k-low.cc (class m68k_target) <get_regs_info>: Declare.
2181 (m68k_regs_info): Turn into ...
2182 (m68k_target::get_regs_info): ...this.
2183 (the_low_target): Remove the op field.
2184 * linux-mips-low.cc (class mips_target) <get_regs_info>: Declare.
2185 (mips_regs_info): Turn into ...
2186 (mips_target::get_regs_info): ...this.
2187 (the_low_target): Remove the op field.
2188 (get_usrregs_info): Update the call to the op.
2189 * linux-nios2-low.cc (class nios2_target) <get_regs_info>: Declare.
2190 (nios2_regs_info): Turn into ...
2191 (nios2_target::get_regs_info): ...this.
2192 (the_low_target): Remove the op field.
2193 * linux-ppc-low.cc (class ppc_target) <get_regs_info>: Declare.
2194 (ppc_regs_info): Turn into ...
2195 (ppc_target::get_regs_info): ...this.
2196 (the_low_target): Remove the op field.
2197 * linux-riscv-low.cc (class riscv_target) <get_regs_info>: Declare.
2198 (riscv_regs_info): Turn into ...
2199 (riscv_target::get_regs_info): ...this.
2200 (the_low_target): Remove the op field.
2201 * linux-s390-low.cc (class s390_target) <get_regs_info>: Declare.
2202 (s390_regs_info): Turn into ...
2203 (s390_target::get_regs_info): ...this.
2204 (the_low_target): Remove the op field.
2205 (s390_collect_ptrace_register)
2206 (s390_supply_ptrace_register)
2207 (s390_fill_gregset): Update the call to the op.
2208 * linux-sh-low.cc (class sh_target) <get_regs_info>: Declare.
2209 (sh_regs_info): Turn into ...
2210 (sh_target::get_regs_info): ...this.
2211 (the_low_target): Remove the op field.
2212 * linux-sparc-low.cc (class sparc_target) <get_regs_info>: Declare.
2213 (sparc_regs_info): Turn into ...
2214 (sparc_target::get_regs_info): ...this.
2215 (the_low_target): Remove the op field.
2216 * linux-tic6x-low.cc (class tic6x_target) <get_regs_info>: Declare.
2217 (tic6x_regs_info): Turn into ...
2218 (tic6x_target::get_regs_info): ...this.
2219 (the_low_target): Remove the op field.
2220 * linux-tile-low.cc (class tile_target) <get_regs_info>: Declare.
2221 (tile_regs_info): Turn into ...
2222 (tile_target::get_regs_info): ...this.
2223 (the_low_target): Remove the op field.
2224 * linux-xtensa-low.cc (class xtensa_target) <get_regs_info>:
2225 Declare.
2226 (xtensa_regs_info): Turn into ...
2227 (xtensa_target::get_regs_info): ...this.
2228 (the_low_target): Remove the op field.
2229
2230 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2231
2232 Turn the 'arch_setup' linux target op into a method of
2233 linux_process_target.
2234
2235 * linux-low.h (struct linux_target_ops) <arch_setup>: Delete.
2236 (class linux_process_target) <arch_setup_thread>
2237 <low_arch_setup>: New declarations.
2238 * linux-low.cc (linux_arch_setup): Delete.
2239 (linux_arch_setup_thread): Turn into...
2240 (linux_process_target::arch_setup_thread): ... this.
2241
2242 Update the callers below.
2243
2244 (linux_process_target::handle_extended_wait)
2245 (linux_process_target::post_create_inferior)
2246 (linux_process_target::filter_event)
2247
2248 * linux-x86-low.cc (class x86_target) <low_arch_setup>: New
2249 declaration.
2250 (x86_linux_update_xmltarget): Turn into...
2251 (x86_target::update_xmltarget): ...this.
2252 (x86_linux_process_qsupported): Update the call to
2253 x86_linux_update_xmltarget.
2254 (x86_arch_setup): Turn into ...
2255 (x86_target::low_arch_setup): ...this.
2256 (the_low_target): Remove the op field.
2257 * linux-aarch64-low.cc (class aarch64_target) <low_arch_setup>: New
2258 declaration.
2259 (aarch64_arch_setup): Turn into ...
2260 (aarch64_target::low_arch_setup): ...this.
2261 (the_low_target): Remove the op field.
2262 * linux-arm-low.cc (class arm_target) <low_arch_setup>: New
2263 declaration.
2264 (arm_arch_setup): Turn into ...
2265 (arm_target::low_arch_setup): ...this.
2266 (the_low_target): Remove the op field.
2267 * linux-bfin-low.cc (class bfin_target) <low_arch_setup>: New
2268 declaration.
2269 (bfin_arch_setup): Turn into ...
2270 (bfin_target::low_arch_setup): ...this.
2271 (the_low_target): Remove the op field.
2272 * linux-cris-low.cc (class cris_target) <low_arch_setup>: New
2273 declaration.
2274 (cris_arch_setup): Turn into ...
2275 (cris_target::low_arch_setup): ...this.
2276 (the_low_target): Remove the op field.
2277 * linux-crisv32-low.cc (class crisv32_target) <low_arch_setup>: New
2278 declaration.
2279 (crisv32_arch_setup): Turn into ...
2280 (crisv32_target::low_arch_setup): ...this.
2281 (the_low_target): Remove the op field.
2282 * linux-ia64-low.cc (class ia64_target) <low_arch_setup>: New
2283 declaration.
2284 (ia64_arch_setup): Turn into ...
2285 (ia64_target::low_arch_setup): ...this.
2286 (the_low_target): Remove the op field.
2287 * linux-m32r-low.cc (class m32r_target) <low_arch_setup>: New
2288 declaration.
2289 (m32r_arch_setup): Turn into ...
2290 (m32r_target::low_arch_setup): ...this.
2291 (the_low_target): Remove the op field.
2292 * linux-m68k-low.cc (class m68k_target) <low_arch_setup>: New
2293 declaration.
2294 (m68k_arch_setup): Turn into ...
2295 (m68k_target::low_arch_setup): ...this.
2296 (the_low_target): Remove the op field.
2297 * linux-mips-low.cc (class mips_target) <low_arch_setup>: New
2298 declaration.
2299 (mips_arch_setup): Turn into ...
2300 (mips_target::low_arch_setup): ...this.
2301 (the_low_target): Remove the op field.
2302 * linux-nios2-low.cc (class nios2_target) <low_arch_setup>: New
2303 declaration.
2304 (nios2_arch_setup): Turn into ...
2305 (nios2_target::low_arch_setup): ...this.
2306 (the_low_target): Remove the op field.
2307 * linux-ppc-low.cc (class ppc_target) <low_arch_setup>: New
2308 declaration.
2309 (ppc_arch_setup): Turn into ...
2310 (ppc_target::low_arch_setup): ...this.
2311 (the_low_target): Remove the op field.
2312 * linux-riscv-low.cc (class riscv_target) <low_arch_setup>: New
2313 declaration.
2314 (riscv_arch_setup): Turn into ...
2315 (riscv_target::low_arch_setup): ...this.
2316 (the_low_target): Remove the op field.
2317 * linux-s390-low.cc (class s390_target) <low_arch_setup>: New
2318 declaration.
2319 (s390_arch_setup): Turn into ...
2320 (s390_target::low_arch_setup): ...this.
2321 (the_low_target): Remove the op field.
2322 * linux-sh-low.cc (class sh_target) <low_arch_setup>: New
2323 declaration.
2324 (sh_arch_setup): Turn into ...
2325 (sh_target::low_arch_setup): ...this.
2326 (the_low_target): Remove the op field.
2327 * linux-sparc-low.cc (class sparc_target) <low_arch_setup>: New
2328 declaration.
2329 (sparc_arch_setup): Turn into ...
2330 (sparc_target::low_arch_setup): ...this.
2331 (the_low_target): Remove the op field.
2332 * linux-tic6x-low.cc (class tic6x_target) <low_arch_setup>: New
2333 declaration.
2334 (tic6x_arch_setup): Turn into ...
2335 (tic6x_target::low_arch_setup): ...this.
2336 (the_low_target): Remove the op field.
2337 * linux-tile-low.cc (class tile_target) <low_arch_setup>: New
2338 declaration.
2339 (tile_arch_setup): Turn into ...
2340 (tile_target::low_arch_setup): ...this.
2341 (the_low_target): Remove the op field.
2342 * linux-xtensa-low.cc (class xtensa_target) <low_arch_setup>: New
2343 declaration.
2344 (xtensa_arch_setup): Turn into ...
2345 (xtensa_target::low_arch_setup): ...this.
2346 (the_low_target): Remove the op field.
2347
2348 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2349
2350 * linux-low.h (the_linux_target): New extern declaration.
2351 * linux-low.cc (initialize_low): Use 'the_linux_target' to set
2352 'the_target'.
2353 (the_linux_target): Remove.
2354 * linux-x86-low.cc (class x86_target): New class.
2355 (the_x86_target): New static object.
2356 (the_linux_target): Define as pointer to the_x86_target.
2357 * linux-aarch64-low.cc (class aarch64_target): New class.
2358 (the_aarch64_target): New static object.
2359 (the_linux_target): Define as pointer to the_aarch64_target.
2360 * linux-arm-low.cc (class arm_target): New class.
2361 (the_arm_target): New static object.
2362 (the_linux_target): Define as pointer to the_arm_target.
2363 * linux-bfin-low.cc (class bfin_target): New class.
2364 (the_bfin_target): New static object.
2365 (the_linux_target): Define as pointer to the_bfin_target.
2366 * linux-cris-low.cc (class cris_target): New class.
2367 (the_cris_target): New static object.
2368 (the_linux_target): Define as pointer to the_cris_target.
2369 * linux-crisv32-low.cc (class crisv32_target): New class.
2370 (the_crisv32_target): New static object.
2371 (the_linux_target): Define as pointer to the_crisv32_target.
2372 * linux-ia64-low.cc (class ia64_target): New class.
2373 (the_ia64_target): New static object.
2374 (the_linux_target): Define as pointer to the_ia64_target.
2375 * linux-m32r-low.cc (class m32r_target): New class.
2376 (the_m32r_target): New static object.
2377 (the_linux_target): Define as pointer to the_m32r_target.
2378 * linux-m68k-low.cc (class m68k_target): New class.
2379 (the_m68k_target): New static object.
2380 (the_linux_target): Define as pointer to the_m68k_target.
2381 * linux-mips-low.cc (class mips_target): New class.
2382 (the_mips_target): New static object.
2383 (the_linux_target): Define as pointer to the_mips_target.
2384 * linux-nios2-low.cc (class nios2_target): New class.
2385 (the_nios2_target): New static object.
2386 (the_linux_target): Define as pointer to the_nios2_target.
2387 * linux-ppc-low.cc (class ppc_target): New class.
2388 (the_ppc_target): New static object.
2389 (the_linux_target): Define as pointer to the_ppc_target.
2390 * linux-riscv-low.cc (class riscv_target): New class.
2391 (the_riscv_target): New static object.
2392 (the_linux_target): Define as pointer to the_riscv_target.
2393 * linux-s390-low.cc (class s390_target): New class.
2394 (the_s390_target): New static object.
2395 (the_linux_target): Define as pointer to the_s390_target.
2396 * linux-sh-low.cc (class sh_target): New class.
2397 (the_sh_target): New static object.
2398 (the_linux_target): Define as pointer to the_sh_target.
2399 * linux-sparc-low.cc (class sparc_target): New class.
2400 (the_sparc_target): New static object.
2401 (the_linux_target): Define as pointer to the_sparc_target.
2402 * linux-tic6x-low.cc (class tic6x_target): New class.
2403 (the_tic6x_target): New static object.
2404 (the_linux_target): Define as pointer to the_tic6x_target.
2405 * linux-tile-low.cc (class tile_target): New class.
2406 (the_tile_target): New static object.
2407 (the_linux_target): Define as pointer to the_tile_target.
2408 * linux-xtensa-low.cc (class xtensa_target): New class.
2409 (the_xtensa_target): New static object.
2410 (the_linux_target): Define as pointer to the_xtensa_target.
2411
2412 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2413
2414 Turn some static functions in linux-low.cc into private methods of
2415 linux_process_target.
2416
2417 * linux-low.cc (handle_extended_wait): Turn into ...
2418 (linux_process_target::handle_extended_wait): ...this. Call
2419 'mourn' on 'this' object instead of 'the_target'.
2420 (maybe_move_out_of_jump_pad): Turn into...
2421 (linux_process_target::maybe_move_out_of_jump_pad): ...this.
2422 (linux_low_filter_event): Turn into...
2423 (linux_process_target::filter_event): ...this.
2424 (linux_wait_for_event_filtered): Turn into...
2425 (linux_process_target::wait_for_event_filtered): ...this.
2426 (linux_wait_for_event): Turn into...
2427 (linux_process_target::wait_for_event): ...this.
2428 (linux_wait_1): Turn into...
2429 (linux_process_target::wait_1): ...this.
2430 (wait_for_sigstop): Turn into...
2431 (linux_process_target::wait_for_sigstop): ...this.
2432 (move_out_of_jump_pad_callback): Turn into...
2433 (linux_process_target::move_out_of_jump_pad): ...this.
2434 (stop_all_lwps): Turn into...
2435 (linux_process_target::stop_all_lwps): ...this.
2436 (start_step_over): Turn into...
2437 (linux_process_target::start_step_over): ...this.
2438 (complete_ongoing_step_over): Turn into...
2439 (linux_process_target::complete_ongoing_step_over): ...this.
2440 (proceed_all_lwps): Turn into...
2441 (linux_process_target::proceed_all_lwps): ...this.
2442 (unstop_all_lwps): Turn into...
2443 (linux_process_target::unstop_all_lwps): ...this.
2444
2445 * linux-low.h (class linux_process_target)
2446 <handle_extended_wait>
2447 <maybe_move_out_of_jump_pad>
2448 filter_event>
2449 <wait_for_event_filtered>
2450 <wait_for_event>
2451 <wait_1>
2452 <wait_for_sigstop>
2453 <move_out_of_jump_pad>
2454 <stop_all_lwps>
2455 <start_step_over>
2456 <complete_ongoing_step_over>
2457 <proceed_all_lwps>
2458 <unstop_all_lwps>: Declare.
2459
2460 Update the callers below.
2461
2462 * linux-low.cc (linux_process_target::attach): Update.
2463 (linux_process_target::stabilize_threads): Ditto.
2464 (linux_process_target::wait): Ditto.
2465
2466 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2467
2468 * linux-low.h (struct linux_target_ops): Update the comment for
2469 'cannot_store_register' to return 0 or 1.
2470 * linux-ppc-low.cc (ppc_cannot_store_register): Return 1 instead
2471 of 2.
2472
2473 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
2474
2475 * config.in: Re-generate.
2476 * configure: Re-generate.
2477
2478 2020-03-17 Kamil Rytarowski <n54@gmx.com>
2479
2480 * regcache.cc (find_register_by_number): Update.
2481 * tdesc.cc (init_target_desc): Likewise.
2482 * tdesc.h (target_desc::reg_defs): Likewise.
2483
2484 2020-03-12 Tom Tromey <tom@tromey.com>
2485
2486 * configure: Rebuild.
2487 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
2488 (WIN32APILIBS): New subst.
2489 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
2490 gdbsupport files.
2491 (gdbsupport/%.o): Remove target.
2492 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
2493 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
2494 (WIN32APILIBS): New variable.
2495 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
2496 (gdbreplay$(EXEEXT)): Likewise.
2497
2498 2020-03-12 Tom Tromey <tom@tromey.com>
2499
2500 * config.in, configure: Rebuild.
2501 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
2502 * acinclude.m4: Include gettext-sister.m4.
2503 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
2504 variables.
2505 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
2506 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
2507
2508 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2509
2510 * acinclude.m4: Update path to selftest.m4.
2511
2512 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2513
2514 * configure.ac: Don't source bfd/development.sh, move
2515 GDB_AC_COMMON higher.
2516 * configure: Re-generate.
2517
2518 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2519
2520 * configure: Re-generate.
2521
2522 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
2523
2524 * configure: Re-generate.
2525
2526 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2527
2528 * .dir-locals.el: New file.
2529
2530 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2531
2532 * .gitattributes: New file.
2533
2534 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
2535
2536 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
2537 reply into an S reply.
2538 * server.cc (disable_packet_T): New global.
2539 (captured_main): Set new global when appropriate.
2540 * server.h (disable_packet_T): Declare.
2541
2542 2020-02-21 Tom Tromey <tom@tromey.com>
2543
2544 * Makefile.in (mostlyclean): New target.
2545
2546 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2547
2548 * target.h (struct process_stratum_target): Remove.
2549 (class process_target): Rename to ...
2550 (class process_stratum_target): ... this.
2551 * linux-low.h (class linux_process_target): Derive from
2552 'process_stratum_target'.
2553 * linux-low.cc (linux_target_ops): Remove.
2554 (initialize_low): Set the_target to the singleton instance of
2555 linux_process_target.
2556 * lynx-low.h (class lynx_process_target): Derive from
2557 'process_stratum_target'.
2558 * lynx-low.cc (lynx_target_ops): Remove.
2559 (initialize_low): Set the_target to the singleton instance of
2560 lynx_process_target.
2561 * nto-low.h (class nto_process_target): Derive from
2562 'process_stratum_target'.
2563 * nto-low.cc (nto_target_ops): Remove.
2564 (initialize_low): Set the_target to the singleton instance of
2565 nto_process_target.
2566 * win32-low.h (class win32_process_target): Derive from
2567 'process_stratum_target'.
2568 * win32-low.cc (win32_target_ops): Remove.
2569 (initialize_low): Set the_target to the singleton instance of
2570 win32_process_target.
2571
2572 Replace 'the_target->pt' with 'the_target' in the uses below.
2573
2574 * hostio.cc (hostio_error)
2575 (handle_setfs)
2576 (handle_open)
2577 (handle_unlink)
2578 (handle_readlink)
2579 * linux-aarch32-low.cc (arm_breakpoint_at)
2580 * linux-aarch64-low.cc (aarch64_breakpoint_at)
2581 * linux-arm-low.cc (arm_sigreturn_next_pc)
2582 (arm_get_hwcap)
2583 (arm_get_syscall_trapinfo)
2584 * linux-cris-low.cc (cris_breakpoint_at)
2585 * linux-crisv32-low.cc (cris_breakpoint_at)
2586 * linux-low.cc (handle_extended_wait)
2587 (linux_wait_1)
2588 (linux_read_memory)
2589 (linux_process_target::breakpoint_kind_from_pc)
2590 (linux_get_auxv)
2591 * linux-m32r-low.cc (m32r_breakpoint_at)
2592 * linux-mips-low.cc (mips_breakpoint_at)
2593 * linux-nios2-low.cc (nios2_breakpoint_at)
2594 * linux-ppc-low.cc (ppc_breakpoint_at)
2595 * linux-s390-low.cc (s390_get_hwcap)
2596 * linux-sh-low.cc (sh_breakpoint_at)
2597 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
2598 (sparc_store_gregset_from_stack)
2599 (sparc_breakpoint_at)
2600 * linux-tic6x-low.cc (tic6x_breakpoint_at)
2601 * linux-tile-low.cc (tile_breakpoint_at)
2602 * linux-x86-low.cc (x86_breakpoint_at)
2603 * linux-xtensa-low.cc (xtensa_breakpoint_at)
2604 * mem-break.cc (bp_size)
2605 (bp_opcode)
2606 (insert_memory_breakpoint)
2607 (set_raw_breakpoint_at)
2608 (delete_raw_breakpoint)
2609 (z_type_supported)
2610 (uninsert_raw_breakpoint)
2611 (reinsert_raw_breakpoint)
2612 (validate_inserted_breakpoint)
2613 * regcache.cc (regcache_read_pc)
2614 (regcache_write_pc)
2615 * remote-utils.cc (putpkt_binary_1)
2616 (input_interrupt)
2617 (getpkt)
2618 (prepare_resume_reply)
2619 * server.cc (handle_general_set)
2620 (handle_detach)
2621 (handle_qxfer_auxv)
2622 (handle_qxfer_exec_file)
2623 (handle_qxfer_libraries_svr4)
2624 (handle_qxfer_osdata)
2625 (handle_qxfer_siginfo)
2626 (handle_qxfer_fdpic)
2627 (handle_query)
2628 (resume)
2629 (handle_v_requests)
2630 (queue_stop_reply_callback)
2631 (captured_main)
2632 * target.cc (prepare_to_access_memory)
2633 (done_accessing_memory)
2634 (read_inferior_memory)
2635 (target_write_memory)
2636 (target_stop_and_wait)
2637 (target_wait)
2638 (target_mourn_inferior)
2639 (target_continue_no_signal)
2640 (target_continue)
2641 (target_supports_multi_process)
2642 (kill_inferior)
2643 * target.h
2644 (target_create_inferior)
2645 (target_post_create_inferior)
2646 (myattach)
2647 (target_supports_fork_events)
2648 (target_supports_vfork_events)
2649 (target_supports_exec_events)
2650 (target_handle_new_gdb_connection)
2651 (detach_inferior)
2652 (mythread_alive)
2653 (fetch_inferior_registers)
2654 (store_inferior_registers)
2655 (join_inferior)
2656 (target_supports_non_stop)
2657 (target_async)
2658 (target_process_qsupported)
2659 (target_supports_catch_syscall)
2660 (target_get_ipa_tdesc_idx)
2661 (target_supports_tracepoints)
2662 (target_supports_fast_tracepoints)
2663 (target_get_min_fast_tracepoint_insn_len)
2664 (target_thread_stopped)
2665 (target_pause_all)
2666 (target_unpause_all)
2667 (target_stabilize_threads)
2668 (target_install_fast_tracepoint_jump_pad)
2669 (target_emit_ops)
2670 (target_supports_disable_randomization)
2671 (target_supports_agent)
2672 (target_enable_btrace)
2673 (target_disable_btrace)
2674 (target_read_btrace)
2675 (target_read_btrace_conf)
2676 (target_supports_range_stepping)
2677 (target_supports_stopped_by_sw_breakpoint)
2678 (target_stopped_by_sw_breakpoint)
2679 (target_supports_stopped_by_hw_breakpoint)
2680 (target_supports_hardware_single_step)
2681 (target_stopped_by_hw_breakpoint)
2682 (target_breakpoint_kind_from_pc)
2683 (target_breakpoint_kind_from_current_state)
2684 (target_supports_software_single_step)
2685 (target_core_of_thread)
2686 (target_thread_name)
2687 (target_thread_handle)
2688 * win32-low.cc (do_initial_child_stuff)
2689
2690 Rename target op default definitions listed below.
2691
2692 * target.cc (process_target::post_create_inferior): Rename as ...
2693 (process_stratum_target::post_create_inferior): ... this.
2694 (process_target::prepare_to_access_memory): Rename as ...
2695 (process_stratum_target::prepare_to_access_memory): ... this.
2696 (process_target::done_accessing_memory): Rename as ...
2697 (process_stratum_target::done_accessing_memory): ... this.
2698 (process_target::look_up_symbols): Rename as ...
2699 (process_stratum_target::look_up_symbols): ... this.
2700 (process_target::supports_read_auxv): Rename as ...
2701 (process_stratum_target::supports_read_auxv): ... this.
2702 (process_target::read_auxv): Rename as ...
2703 (process_stratum_target::read_auxv): ... this.
2704 (process_target::supports_z_point_type): Rename as ...
2705 (process_stratum_target::supports_z_point_type): ... this.
2706 (process_target::insert_point): Rename as ...
2707 (process_stratum_target::insert_point): ... this.
2708 (process_target::remove_point): Rename as ...
2709 (process_stratum_target::remove_point): ... this.
2710 (process_target::stopped_by_sw_breakpoint): Rename as ...
2711 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
2712 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
2713 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
2714 (process_target::stopped_by_hw_breakpoint): Rename as ...
2715 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
2716 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
2717 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
2718 (process_target::supports_hardware_single_step): Rename as ...
2719 (process_stratum_target::supports_hardware_single_step): ... this.
2720 (process_target::stopped_by_watchpoint): Rename as ...
2721 (process_stratum_target::stopped_by_watchpoint): ... this.
2722 (process_target::stopped_data_address): Rename as ...
2723 (process_stratum_target::stopped_data_address): ... this.
2724 (process_target::supports_read_offsets): Rename as ...
2725 (process_stratum_target::supports_read_offsets): ... this.
2726 (process_target::read_offsets): Rename as ...
2727 (process_stratum_target::read_offsets): ... this.
2728 (process_target::supports_get_tls_address): Rename as ...
2729 (process_stratum_target::supports_get_tls_address): ... this.
2730 (process_target::get_tls_address): Rename as ...
2731 (process_stratum_target::get_tls_address): ... this.
2732 (process_target::hostio_last_error): Rename as ...
2733 (process_stratum_target::hostio_last_error): ... this.
2734 (process_target::supports_qxfer_osdata): Rename as ...
2735 (process_stratum_target::supports_qxfer_osdata): ... this.
2736 (process_target::qxfer_osdata): Rename as ...
2737 (process_stratum_target::qxfer_osdata): ... this.
2738 (process_target::supports_qxfer_siginfo): Rename as ...
2739 (process_stratum_target::supports_qxfer_siginfo): ... this.
2740 (process_target::qxfer_siginfo): Rename as ...
2741 (process_stratum_target::qxfer_siginfo): ... this.
2742 (process_target::supports_non_stop): Rename as ...
2743 (process_stratum_target::supports_non_stop): ... this.
2744 (process_target::async): Rename as ...
2745 (process_stratum_target::async): ... this.
2746 (process_target::start_non_stop): Rename as ...
2747 (process_stratum_target::start_non_stop): ... this.
2748 (process_target::supports_multi_process): Rename as ...
2749 (process_stratum_target::supports_multi_process): ... this.
2750 (process_target::supports_fork_events): Rename as ...
2751 (process_stratum_target::supports_fork_events): ... this.
2752 (process_target::supports_vfork_events): Rename as ...
2753 (process_stratum_target::supports_vfork_events): ... this.
2754 (process_target::supports_exec_events): Rename as ...
2755 (process_stratum_target::supports_exec_events): ... this.
2756 (process_target::handle_new_gdb_connection): Rename as ...
2757 (process_stratum_target::handle_new_gdb_connection): ... this.
2758 (process_target::handle_monitor_command): Rename as ...
2759 (process_stratum_target::handle_monitor_command): ... this.
2760 (process_target::core_of_thread): Rename as ...
2761 (process_stratum_target::core_of_thread): ... this.
2762 (process_target::supports_read_loadmap): Rename as ...
2763 (process_stratum_target::supports_read_loadmap): ... this.
2764 (process_target::read_loadmap): Rename as ...
2765 (process_stratum_target::read_loadmap): ... this.
2766 (process_target::process_qsupported): Rename as ...
2767 (process_stratum_target::process_qsupported): ... this.
2768 (process_target::supports_tracepoints): Rename as ...
2769 (process_stratum_target::supports_tracepoints): ... this.
2770 (process_target::read_pc): Rename as ...
2771 (process_stratum_target::read_pc): ... this.
2772 (process_target::write_pc): Rename as ...
2773 (process_stratum_target::write_pc): ... this.
2774 (process_target::supports_thread_stopped): Rename as ...
2775 (process_stratum_target::supports_thread_stopped): ... this.
2776 (process_target::thread_stopped): Rename as ...
2777 (process_stratum_target::thread_stopped): ... this.
2778 (process_target::supports_get_tib_address): Rename as ...
2779 (process_stratum_target::supports_get_tib_address): ... this.
2780 (process_target::get_tib_address): Rename as ...
2781 (process_stratum_target::get_tib_address): ... this.
2782 (process_target::pause_all): Rename as ...
2783 (process_stratum_target::pause_all): ... this.
2784 (process_target::unpause_all): Rename as ...
2785 (process_stratum_target::unpause_all): ... this.
2786 (process_target::stabilize_threads): Rename as ...
2787 (process_stratum_target::stabilize_threads): ... this.
2788 (process_target::supports_fast_tracepoints): Rename as ...
2789 (process_stratum_target::supports_fast_tracepoints): ... this.
2790 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
2791 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
2792 (process_target::emit_ops): Rename as ...
2793 (process_stratum_target::emit_ops): ... this.
2794 (process_target::supports_disable_randomization): Rename as ...
2795 (process_stratum_target::supports_disable_randomization): ... this.
2796 (process_target::supports_qxfer_libraries_svr4): Rename as ...
2797 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
2798 (process_target::qxfer_libraries_svr4): Rename as ...
2799 (process_stratum_target::qxfer_libraries_svr4): ... this.
2800 (process_target::supports_agent): Rename as ...
2801 (process_stratum_target::supports_agent): ... this.
2802 (process_target::enable_btrace): Rename as ...
2803 (process_stratum_target::enable_btrace): ... this.
2804 (process_target::disable_btrace): Rename as ...
2805 (process_stratum_target::disable_btrace): ... this.
2806 (process_target::read_btrace): Rename as ...
2807 (process_stratum_target::read_btrace): ... this.
2808 (process_target::read_btrace_conf): Rename as ...
2809 (process_stratum_target::read_btrace_conf): ... this.
2810 (process_target::supports_range_stepping): Rename as ...
2811 (process_stratum_target::supports_range_stepping): ... this.
2812 (process_target::supports_pid_to_exec_file): Rename as ...
2813 (process_stratum_target::supports_pid_to_exec_file): ... this.
2814 (process_target::pid_to_exec_file): Rename as ...
2815 (process_stratum_target::pid_to_exec_file): ... this.
2816 (process_target::supports_multifs): Rename as ...
2817 (process_stratum_target::supports_multifs): ... this.
2818 (process_target::multifs_open): Rename as ...
2819 (process_stratum_target::multifs_open): ... this.
2820 (process_target::multifs_unlink): Rename as ...
2821 (process_stratum_target::multifs_unlink): ... this.
2822 (process_target::multifs_readlink): Rename as ...
2823 (process_stratum_target::multifs_readlink): ... this.
2824 (process_target::breakpoint_kind_from_pc): Rename as ...
2825 (process_stratum_target::breakpoint_kind_from_pc): ... this.
2826 (process_target::breakpoint_kind_from_current_state): Rename as ...
2827 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
2828 (process_target::thread_name): Rename as ...
2829 (process_stratum_target::thread_name): ... this.
2830 (process_target::thread_handle): Rename as ...
2831 (process_stratum_target::thread_handle): ... this.
2832 (process_target::supports_software_single_step): Rename as ...
2833 (process_stratum_target::supports_software_single_step): ... this.
2834 (process_target::supports_catch_syscall): Rename as ...
2835 (process_stratum_target::supports_catch_syscall): ... this.
2836 (process_target::get_ipa_tdesc_idx): Rename as ...
2837 (process_stratum_target::get_ipa_tdesc_idx): ... this.
2838
2839 2020-02-20 Pedro Alves <palves@redhat.com>
2840
2841 * target.cc (set_target_ops): Simply copy the given target pointer
2842 instead of creating a copy of the pointed object.
2843
2844 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2845
2846 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
2847 of process_target.
2848
2849 * target.h (struct process_stratum_target): Remove the target op.
2850 (class process_target): Add the target op.
2851 (target_get_ipa_tdesc_idx): Update the macro.
2852 * target.cc (process_target::get_ipa_tdesc_idx): Define.
2853
2854 Update the derived classes and callers below.
2855
2856 * linux-low.cc (linux_target_ops): Update.
2857 (linux_get_ipa_tdesc_idx): Turn into ...
2858 (linux_process_target::get_ipa_tdesc_idx): ... this.
2859 * linux-low.h (class linux_process_target): Update.
2860 * lynx-low.cc (lynx_target_ops): Update.
2861 * nto-low.cc (nto_target_ops): Update.
2862 * win32-low.cc (win32_target_ops): Update.
2863
2864 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2865
2866 Turn process_stratum_target's supports_catch_syscall op into a
2867 method of process_target.
2868
2869 * target.h (struct process_stratum_target): Remove the target op.
2870 (class process_target): Add the target op.
2871 (target_supports_catch_syscall): Update the macro.
2872 * target.cc (process_target::supports_catch_syscall): Define.
2873
2874 Update the derived classes and callers below.
2875
2876 * linux-low.cc (linux_target_ops): Update.
2877 (linux_supports_catch_syscall): Turn into ...
2878 (linux_process_target::supports_catch_syscall): ... this.
2879 * linux-low.h (class linux_process_target): Update.
2880 * lynx-low.cc (lynx_target_ops): Update.
2881 * nto-low.cc (nto_target_ops): Update.
2882 * win32-low.cc (win32_target_ops): Update.
2883
2884 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2885
2886 Turn process_stratum_target's supports_software_single_step op
2887 into a method of process_target.
2888
2889 * target.h (struct process_stratum_target): Remove the target op.
2890 (class process_target): Add the target op.
2891 (target_supports_software_single_step): Update the macro.
2892 * target.cc (process_target::supports_software_single_step): Define.
2893
2894 Update the derived classes and callers below.
2895
2896 * linux-low.cc (linux_target_ops): Update.
2897 (linux_supports_software_single_step): Turn into ...
2898 (linux_process_target::supports_software_single_step): ... this.
2899 * linux-low.h (class linux_process_target): Update.
2900 * lynx-low.cc (lynx_target_ops): Update.
2901 * nto-low.cc (nto_target_ops): Update.
2902 * win32-low.cc (win32_target_ops): Update.
2903
2904 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2905
2906 Turn process_stratum_target's thread_name and thread_handle ops
2907 into methods of process_target.
2908
2909 * target.h (struct process_stratum_target): Remove the target ops.
2910 (class process_target): Add the target ops.
2911 (target_thread_name): Update the macro.
2912 (target_thread_handle): Update the macro.
2913 * target.cc (process_target::thread_name): Define.
2914 (process_target::thread_handle): Define.
2915
2916 Update the derived classes and callers below.
2917
2918 * linux-low.cc (linux_target_ops): Update.
2919 (linux_process_target::thread_name): Define.
2920 (linux_process_target::thread_handle): Define.
2921 * linux-low.h (class linux_process_target): Update.
2922 * lynx-low.cc (lynx_target_ops): Update.
2923 * nto-low.cc (nto_target_ops): Update.
2924 * win32-low.cc (win32_target_ops): Update.
2925
2926 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2927
2928 Turn process_stratum_target's breakpoint_kind_from_pc,
2929 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
2930 ops into methods of process_target.
2931
2932 * target.h (struct process_stratum_target): Remove the target op.
2933 (class process_target): Add the target op.
2934 (target_breakpoint_kind_from_pc): Update the macro.
2935 (target_breakpoint_kind_from_current_state): Update the macro.
2936 (default_breakpoint_kind_from_pc): Remove declaration.
2937 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
2938 (process_target::breakpoint_kind_from_pc): ... this.
2939 (process_target::breakpoint_kind_from_current_state): Define.
2940
2941 Update the derived classes and callers below.
2942
2943 * mem-break.cc (bp_size): Update.
2944 (bp_opcode): Update.
2945 * linux-low.cc (linux_target_ops): Update.
2946 (linux_wait_1): Update.
2947 (linux_breakpoint_kind_from_pc): Turn into ...
2948 (linux_process_target::breakpoint_kind_from_pc): ... this.
2949 (linux_sw_breakpoint_from_kind): Turn into ...
2950 (linux_process_target::sw_breakpoint_from_kind): ... this.
2951 (linux_breakpoint_kind_from_current_state): Turn into ...
2952 (linux_process_target::breakpoint_kind_from_current_state): ... this.
2953 * linux-low.h (class linux_process_target): Update.
2954 * lynx-low.cc (lynx_target_ops): Update.
2955 (lynx_process_target::sw_breakpoint_from_kind): Define.
2956 * lynx-low.h (class lynx_process_target): Update.
2957 * nto-low.cc (nto_target_ops): Update.
2958 (nto_sw_breakpoint_from_kind): Turn into ...
2959 (nto_process_target::sw_breakpoint_from_kind): ... this.
2960 * nto-low.h (class nto_process_target): Update.
2961 * win32-low.cc (win32_target_ops): Update.
2962 (win32_sw_breakpoint_from_kind): Turn into ...
2963 (win32_process_target::sw_breakpoint_from_kind): ... this.
2964 * win32-low.h (class win32_process_target): Update.
2965
2966 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2967
2968 Turn process_stratum_target's multifs_open, multifs_readlink,
2969 multifs_unlink ops into methods of process_target.
2970
2971 * target.h (struct process_stratum_target): Remove the target ops.
2972 (class process_target): Add the target ops. Also add
2973 'supports_multifs'.
2974 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
2975 "sys/stat.h".
2976 (process_target::supports_multifs): Define.
2977 (process_target::multifs_open): Define.
2978 (process_target::multifs_readlink): Define.
2979 (process_target::multifs_unlink): Define.
2980
2981 Update the derived classes and callers below.
2982
2983 * hostio.cc (handle_setfs): Update.
2984 (handle_open): Update.
2985 (handle_unlink): Update.
2986 (handle_readlink): Update.
2987 * linux-low.cc (linux_target_ops): Update.
2988 (linux_process_target::supports_multifs): Define.
2989 (linux_process_target::multifs_open): Define.
2990 (linux_process_target::multifs_readlink): Define.
2991 (linux_process_target::multifs_unlink): Define.
2992 * linux-low.h (class linux_process_target): Update.
2993 * lynx-low.cc (lynx_target_ops): Update.
2994 * nto-low.cc (nto_target_ops): Update.
2995 * win32-low.cc (win32_target_ops): Update.
2996
2997 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2998
2999 Turn process_stratum_target's pid_to_exec_file op into a method
3000 of process_target.
3001
3002 * target.h (struct process_stratum_target): Remove the target op.
3003 (class process_target): Add the target op. Also add
3004 'supports_pid_to_exec_file'.
3005 * target.cc (process_target::pid_to_exec_file): Define.
3006 (process_target::supports_pid_to_exec_file): Define.
3007
3008 Update the derived classes and callers below.
3009
3010 * server.cc (handle_qxfer_exec_file): Update.
3011 (handle_query): Update.
3012 * linux-low.cc (linux_target_ops): Update.
3013 (linux_process_target::supports_pid_to_exec_file): Define.
3014 (linux_process_target::pid_to_exec_file): Define.
3015 * linux-low.h (class linux_process_target): Update.
3016 * lynx-low.cc (lynx_target_ops): Update.
3017 * nto-low.cc (nto_target_ops): Update.
3018 * win32-low.cc (win32_target_ops): Update.
3019
3020 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3021
3022 Turn process_stratum_target's supports_range_stepping op into a
3023 method of process_target.
3024
3025 * target.h (struct process_stratum_target): Remove the target op.
3026 (class process_target): Add the target op.
3027 (target_supports_range_stepping): Update the macro.
3028 * target.cc (process_target::supports_range_stepping): Define.
3029
3030 Update the derived classes and callers below.
3031
3032 * linux-low.cc (linux_target_ops): Update.
3033 (linux_supports_range_stepping): Turn into ...
3034 (linux_process_target::supports_range_stepping): ... this.
3035 * linux-low.h (class linux_process_target): Update.
3036 * lynx-low.cc (lynx_target_ops): Update.
3037 * nto-low.cc (nto_target_ops): Update.
3038 * win32-low.cc (win32_target_ops): Update.
3039
3040 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3041
3042 Turn process_stratum_target's btrace-related ops (enable_btrace,
3043 disable_btrace, read_btrace, read_btrace_conf) into methods of
3044 process_target.
3045
3046 * target.h (struct process_stratum_target): Remove the target ops.
3047 (class process_target): Add the target ops.
3048 (target_enable_btrace): Update.
3049 (target_disable_btrace): Update.
3050 (target_read_btrace): Update.
3051 (target_read_btrace_conf): Update.
3052 * target.cc (process_target::enable_btrace): Define.
3053 (process_target::disable_btrace): Define.
3054 (process_target::read_btrace): Define.
3055 (process_target::read_btrace_conf): Define.
3056
3057 Update the derived classes and callers below.
3058
3059 * linux-low.cc (linux_target_ops): Update.
3060 (linux_process_target:enable_btrace): Define as a wrapper around
3061 linux_enable_btrace.
3062 (linux_low_disable_btrace): Turn into ...
3063 (linux_process_target::disable_btrace): ... this.
3064 (linux_low_read_btrace): Turn into ...
3065 (linux_process_target::read_btrace): ... this.
3066 (linux_low_btrace_conf): Turn into ...
3067 (linux_process_target::read_btrace_conf): ... this.
3068 * linux-low.h (class linux_process_target): Update.
3069 * lynx-low.cc (lynx_target_ops): Update.
3070 * nto-low.cc (nto_target_ops): Update.
3071 * win32-low.cc (win32_target_ops): Update.
3072
3073 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3074
3075 Turn process_stratum_target's supports_agent op into a method of
3076 process_target.
3077
3078 * target.h (struct process_stratum_target): Remove the target op.
3079 (class process_target): Add the target op.
3080 (target_supports_agent): Update the macro.
3081 * target.cc (process_target::supports_agent): Define.
3082
3083 Update the derived classes and callers below.
3084
3085 * linux-low.cc (linux_target_ops): Update.
3086 (linux_supports_agent): Turn into ...
3087 (linux_process_target::supports_agent): ... this.
3088 * linux-low.h (class linux_process_target): Update.
3089 * lynx-low.cc (lynx_target_ops): Update.
3090 * nto-low.cc (nto_target_ops): Update.
3091 * win32-low.cc (win32_target_ops): Update.
3092
3093 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3094
3095 Turn process_stratum_target's qxfer_libraries_svr4 op into a
3096 method of process_target.
3097
3098 * target.h (struct process_stratum_target): Remove the target op.
3099 (class process_target): Add the target op. Also add
3100 'supports_qxfer_libraries_svr4'.
3101 * target.cc (process_target::qxfer_libraries_svr4): Define.
3102 (process_target::supports_qxfer_libraries_svr4): Define.
3103
3104 Update the derived classes and callers below.
3105
3106 * server.cc (handle_qxfer_libraries_svr4): Update.
3107 (handle_query): Update.
3108 * linux-low.cc (linux_target_ops): Update.
3109 (linux_process_target::supports_qxfer_libraries_svr4): Define.
3110 (linux_qxfer_libraries_svr4): Turn into ...
3111 (linux_process_target::qxfer_libraries_svr4): ... this.
3112 * linux-low.h (class linux_process_target): Update.
3113 * lynx-low.cc (lynx_target_ops): Update.
3114 * nto-low.cc (nto_target_ops): Update.
3115 * win32-low.cc (win32_target_ops): Update.
3116
3117 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3118
3119 Turn process_stratum_target's supports_disable_randomization op
3120 into a method of process_target.
3121
3122 * target.h (struct process_stratum_target): Remove the target op.
3123 (class process_target): Add the target op.
3124 (target_supports_disable_randomization): Update the macro.
3125 * target.cc (process_target::supports_disable_randomization): Define.
3126
3127 Update the derived classes and callers below.
3128
3129 * linux-low.cc (linux_target_ops): Update.
3130 (linux_supports_disable_randomization): Turn into ...
3131 (linux_process_target::supports_disable_randomization): ... this.
3132 * linux-low.h (class linux_process_target): Update.
3133 * lynx-low.cc (lynx_target_ops): Update.
3134 * nto-low.cc (nto_target_ops): Update.
3135 * win32-low.cc (win32_target_ops): Update.
3136
3137 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3138
3139 Turn process_stratum_target's emit_ops op into a method of
3140 process_target.
3141
3142 * target.h (struct process_stratum_target): Remove the target op.
3143 (class process_target): Add the target op.
3144 (target_emit_ops): Update the macro.
3145 * target.cc (process_target::emit_ops): Define.
3146
3147 Update the derived classes and callers below.
3148
3149 * linux-low.cc (linux_target_ops): Update.
3150 (linux_emit_ops): Turn into ...
3151 (linux_process_target::emit_ops): ... this.
3152 * linux-low.h (class linux_process_target): Update.
3153 * lynx-low.cc (lynx_target_ops): Update.
3154 * nto-low.cc (nto_target_ops): Update.
3155 * win32-low.cc (win32_target_ops): Update.
3156
3157 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3158
3159 Turn process_stratum_target's install_fast_tracepoint_jump_pad
3160 and get_min_fast_tracepoint_insn_len ops into methods of
3161 process_target.
3162
3163 * target.h (struct process_stratum_target): Remove the target ops.
3164 (class process_target): Add the target ops. Also add
3165 'supports_fast_tracepoints'.
3166 (target_supports_fast_tracepoints): Update the macro.
3167 (target_get_min_fast_tracepoint_insn_len): Update the macro.
3168 (install_fast_tracepoint_jump_pad): Update and rename the macro
3169 to ...
3170 (target_install_fast_tracepoint_jump_pad): ... this.
3171 * target.cc (process_target::supports_fast_tracepoints): Define.
3172 (process_target::install_fast_tracepoint_jump_pad): Define.
3173 (process_target::get_min_fast_tracepoint_insn_len): Define.
3174
3175 Update the derived classes and callers below.
3176
3177 * tracepoint.cc (install_fast_tracepoint): Update.
3178 * linux-low.cc (linux_target_ops): Update.
3179 (linux_process_target::supports_fast_tracepoints): Define.
3180 (linux_install_fast_tracepoint_jump_pad): Turn into ...
3181 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
3182 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
3183 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
3184 * linux-low.h (class linux_process_target): Update.
3185 * lynx-low.cc (lynx_target_ops): Update.
3186 * nto-low.cc (nto_target_ops): Update.
3187 * win32-low.cc (win32_target_ops): Update.
3188
3189 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3190
3191 Turn process_stratum_target's stabilize_threads op into a
3192 method of process_target.
3193
3194 * target.h (struct process_stratum_target): Remove the target op.
3195 (class process_target): Add the target op.
3196 (target_stabilize_threads): Update the macro.
3197 * target.cc (process_target::stabilize_threads): Define.
3198
3199 Update the derived classes and callers below.
3200
3201 * server.cc (handle_status): Update.
3202 * tracepoint.cc (cmd_qtdp): Update.
3203 (cmd_qtstart): Update.
3204 * linux-low.cc (linux_target_ops): Update.
3205 (linux_stabilize_threads): Turn into ...
3206 (linux_process_target::stabilize_threads): ... this.
3207 (linux_wait_1): Update.
3208 * linux-low.h (class linux_process_target): Update.
3209 * lynx-low.cc (lynx_target_ops): Update.
3210 * nto-low.cc (nto_target_ops): Update.
3211 * win32-low.cc (win32_target_ops): Update.
3212
3213 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3214
3215 Turn process_stratum_target's pause_all and unpause_all ops
3216 into methods of process_target.
3217
3218 * target.h (struct process_stratum_target): Remove the target ops.
3219 (class process_target): Add the target ops.
3220 (pause_all): Update the macro and rename to...
3221 (target_pause_all): ... this.
3222 (unpause_all): Update the macro and rename to...
3223 (target_unpause_all): ... this.
3224 * target.cc (process_target::pause_all): Define.
3225 (process_target::unpause_all): Define.
3226
3227 Update the derived classes and callers below.
3228
3229 * server.cc (handle_status): Update.
3230 * tracepoint.cc (clear_installed_tracepoints): Update.
3231 (cmd_qtdp): Update.
3232 (cmd_qtstart): Update.
3233 (stop_tracing): Update.
3234 (cmd_qtstatus): Update.
3235 (upload_fast_traceframes): Update.
3236 (run_inferior_command): Update.
3237 * linux-low.cc (linux_target_ops): Update.
3238 (linux_pause_all): Turn into ...
3239 (linux_process_target::pause_all): ... this.
3240 (linux_unpause_all): Turn into ...
3241 (linux_process_target::unpause_all): ... this.
3242 (linux_process_target::prepare_to_access_memory): Update.
3243 (linux_process_target::done_accessing_memory): Update.
3244 * linux-low.h (class linux_process_target): Update.
3245 * lynx-low.cc (lynx_target_ops): Update.
3246 * nto-low.cc (nto_target_ops): Update.
3247 * win32-low.cc (win32_target_ops): Update.
3248
3249 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3250
3251 Turn process_stratum_target's get_tib_address op into a method of
3252 process_target.
3253
3254 * target.h (struct process_stratum_target): Remove the target op.
3255 (class process_target): Add the target op. Also add
3256 'supports_get_tib_address'.
3257 * target.cc (process_target::get_tib_address): Define.
3258 (process_target::supports_get_tib_address): Define.
3259
3260 Update the derived classes and callers below.
3261
3262 * server.cc (handle_query): Update.
3263 * linux-low.cc (win32_target_ops): Update.
3264 * lynx-low.cc (lynx_target_ops): Update.
3265 * nto-low.cc (nto_target_ops): Update.
3266 * win32-low.cc (win32_target_ops): Update.
3267 (win32_process_target::supports_get_tib_address): Define.
3268 (win32_get_tib_address): Turn into ...
3269 (win32_process_target::get_tib_address): ... this.
3270 * win32-low.h (class win32_process_target): Update.
3271
3272 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3273
3274 Turn process_stratum_target's thread_stopped op into a method of
3275 process_target.
3276
3277 * target.h (struct process_stratum_target): Remove the target op.
3278 (class process_target): Add the target op. Also add
3279 'supports_thread_stopped'.
3280 (target_thread_stopped): Update the macro.
3281 * target.cc (process_target::thread_stopped): Define.
3282 (process_target::supports_thread_stopped): Define.
3283 (prepare_to_access_memory): Update.
3284
3285 Update the derived classes and callers below.
3286
3287 * server.cc (queue_stop_reply_callback): Update.
3288 * linux-low.cc (linux_target_ops): Update.
3289 (linux_process_target::supports_thread_stopped): Define.
3290 (linux_thread_stopped): Turn into ...
3291 (linux_process_target::thread_stopped): ... this.
3292 * linux-low.h (class linux_process_target): Update.
3293 * lynx-low.cc (lynx_target_ops): Update.
3294 * nto-low.cc (nto_target_ops): Update.
3295 * win32-low.cc (win32_target_ops): Update.
3296
3297 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3298
3299 Turn process_stratum_target's read_pc and write_pc ops into
3300 methods of process_target.
3301
3302 * target.h (struct process_stratum_target): Remove the target ops.
3303 (class process_target): Add the target ops.
3304 * target.cc (process_target::read_pc): Define.
3305 (process_target::write_pc): Define.
3306
3307 Update the derived classes and callers below.
3308
3309 * regcache.cc (regcache_read_pc): Update.
3310 (regcache_write_pc): Update.
3311 * linux-low.cc (linux_target_ops): Update.
3312 (linux_read_pc): Turn into ...
3313 (linux_process_target::read_pc): ... this.
3314 (linux_write_pc): Turn into ...
3315 (linux_process_target::write_pc): ... this.
3316 * linux-low.h (class linux_process_target): Update.
3317 * lynx-low.cc (lynx_target_ops): Update.
3318 * nto-low.cc (nto_target_ops): Update.
3319 * win32-low.cc (win32_target_ops): Update.
3320
3321 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3322
3323 Turn process_stratum_target's supports_tracepoints op into a
3324 method of process_target.
3325
3326 * target.h (struct process_stratum_target): Remove the target op.
3327 (class process_target): Add the target op.
3328 (target_supports_tracepoints): Update the macro.
3329 * target.cc (process_target::supports_tracepoints): Define.
3330
3331 Update the derived classes and callers below.
3332
3333 * linux-low.cc (linux_target_ops): Update.
3334 (linux_supports_tracepoints): Turn into ...
3335 (linux_process_target::supports_tracepoints): ... this.
3336 * linux-low.h (class linux_process_target): Update.
3337 * lynx-low.cc (lynx_target_ops): Update.
3338 * nto-low.cc (nto_target_ops): Update.
3339 * win32-low.cc (win32_target_ops): Update.
3340
3341 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3342
3343 Turn process_stratum_target's process_qsupported op into a method
3344 of process_target.
3345
3346 * target.h (struct process_stratum_target): Remove the target op.
3347 (class process_target): Add the target op.
3348 (target_process_qsupported): Update the macro.
3349 * target.cc (process_target::process_qsupported): Define.
3350
3351 Update the derived classes and callers below.
3352
3353 * linux-low.cc (linux_target_ops): Update.
3354 (linux_process_qsupported): Turn into ...
3355 (linux_process_target::process_qsupported): ... this.
3356 * linux-low.h (class linux_process_target): Update.
3357 * lynx-low.cc (lynx_target_ops): Update.
3358 * nto-low.cc (nto_target_ops): Update.
3359 * win32-low.cc (win32_target_ops): Update.
3360
3361 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3362
3363 Turn process_stratum_target's read_loadmap op into a method of
3364 process_target.
3365
3366 * target.h (struct process_stratum_target): Remove the target op.
3367 (class process_target): Add the target op. Also add
3368 'supports_read_loadmap'.
3369 * target.cc (process_target::read_loadmap): Define.
3370 (process_target::supports_read_loadmap): Define.
3371
3372 Update the derived classes and callers below.
3373
3374 * server.cc (handle_qxfer_fdpic): Update.
3375 (handle_query): Update.
3376 * linux-low.cc (linux_target_ops): Update.
3377 (linux_process_target::supports_read_loadmap): Define.
3378 (linux_read_loadmap): Turn into ...
3379 (linux_process_target::read_loadmap): ... this.
3380 * linux-low.h (class linux_process_target): Update.
3381 * lynx-low.cc (lynx_target_ops): Update.
3382 * nto-low.cc (nto_target_ops): Update.
3383 * win32-low.cc (win32_target_ops): Update.
3384
3385 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3386
3387 Turn process_stratum_target's core_of_thread op into a method of
3388 process_target.
3389
3390 * target.h (struct process_stratum_target): Remove the target op.
3391 (class process_target): Add the target op.
3392 (target_core_of_thread): Update the macro.
3393 * target.cc (process_target::core_of_thread): Define.
3394
3395 Update the derived classes and callers below.
3396
3397 * linux-low.cc (linux_target_ops): Update.
3398 (linux_process_target::core_of_thread): Define.
3399 * linux-low.h (class linux_process_target): Update.
3400 * lynx-low.cc (lynx_target_ops): Update.
3401 * nto-low.cc (nto_target_ops): Update.
3402 * win32-low.cc (win32_target_ops): Update.
3403
3404 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3405
3406 Turn process_stratum_target's handle_monitor_command op into a
3407 method of process_target.
3408
3409 * target.h (struct process_stratum_target): Remove the target op.
3410 (class process_target): Add the target op.
3411 (target_handle_monitor_command): Update the macro.
3412 * target.cc (process_target::handle_monitor_command): Define.
3413
3414 Update the derived classes and callers below.
3415
3416 * server.cc (handle_query): Update.
3417 * linux-low.cc (linux_target_ops): Update.
3418 (linux_process_target::handle_monitor_command): Define.
3419 * linux-low.h (class linux_process_target): Update.
3420 * lynx-low.cc (lynx_target_ops): Update.
3421 * nto-low.cc (nto_target_ops): Update.
3422 * win32-low.cc (win32_target_ops): Update.
3423
3424 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3425
3426 Turn process_stratum_target's handle_new_gdb_connection op into a
3427 method of process_target.
3428
3429 * target.h (struct process_stratum_target): Remove the target op.
3430 (class process_target): Add the target op.
3431 (target_handle_new_gdb_connection): Update the macro.
3432 * target.cc (process_target::handle_new_gdb_connection): Define.
3433
3434 Update the derived classes and callers below.
3435
3436 * linux-low.cc (linux_target_ops): Update.
3437 (linux_handle_new_gdb_connection): Turn into ...
3438 (linux_process_target::handle_new_gdb_connection): ... this.
3439 * linux-low.h (class linux_process_target): Update.
3440 * lynx-low.cc (lynx_target_ops): Update.
3441 * nto-low.cc (nto_target_ops): Update.
3442 * win32-low.cc (win32_target_ops): Update.
3443
3444 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3445
3446 Turn process_stratum_target's supports_fork_events,
3447 supports_vfork_events, and supports_exec_events ops into methods
3448 of process_target.
3449
3450 * target.h (struct process_stratum_target): Remove the target ops.
3451 (class process_target): Add the target ops.
3452 (target_supports_fork_events): Update the macro.
3453 (target_supports_vfork_events): Update the macro.
3454 (target_supports_exec_events): Update the macro.
3455 * target.cc (process_target::supports_fork_events): Define.
3456 (process_target::supports_vfork_events): Define.
3457 (process_target::supports_exec_events): Define.
3458
3459 Update the derived classes and callers below.
3460
3461 * linux-low.cc (linux_target_ops): Update.
3462 (linux_supports_fork_events): Turn into ...
3463 (linux_process_target::supports_fork_events): ... this.
3464 (linux_supports_vfork_events): Turn into ...
3465 (linux_process_target::supports_vfork_events): ... this.
3466 (linux_supports_exec_events): Turn into ...
3467 (linux_process_target::supports_exec_events): ... this.
3468 * linux-low.h (class linux_process_target): Update.
3469 * lynx-low.cc (lynx_target_ops): Update.
3470 * nto-low.cc (nto_target_ops): Update.
3471 * win32-low.cc (win32_target_ops): Update.
3472
3473 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3474
3475 Turn process_stratum_target's supports_multi_process op into a
3476 method of process_target.
3477
3478 * target.h (struct process_stratum_target): Remove the target op.
3479 (class process_target): Add the target op.
3480 * target.cc (process_target::supports_multi_process): Define.
3481 (target_supports_multi_process): Update.
3482
3483 Update the derived classes and callers below.
3484
3485 * linux-low.cc (linux_target_ops): Update.
3486 (linux_supports_multi_process): Turn into ...
3487 (linux_process_target::supports_multi_process): ... this.
3488 * linux-low.h (class linux_process_target): Update.
3489 * lynx-low.cc (lynx_target_ops): Update.
3490 * nto-low.cc (nto_target_ops): Update.
3491 * win32-low.cc (win32_target_ops): Update.
3492
3493 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3494
3495 Turn process_stratum_target's supports_non_stop, async, and
3496 start_non_stop ops into methods of process_target.
3497
3498 * target.h (struct process_stratum_target): Remove the target ops.
3499 (class process_target): Add the target ops.
3500 (target_supports_non_stop): Update the macro.
3501 (target_async): Update the macro.
3502 (start_non_stop): Remove declaration.
3503 * target.cc (process_target::supports_non_stop): Define.
3504 (process_target::async): Define.
3505 (process_target::start_non_stop): Define.
3506 (start_non_stop): Remove.
3507
3508 Update the derived classes and callers below.
3509
3510 * server.cc (handle_qxfer_siginfo): Update.
3511 (handle_query): Update.
3512 * linux-low.cc (linux_target_ops): Update.
3513 (linux_supports_non_stop): Turn into ...
3514 (linux_process_target::supports_non_stop): ... this.
3515 (linux_async): Turn into ...
3516 (linux_process_target::async): ... this.
3517 (linux_start_non_stop): Turn into ...
3518 (linux_process_target::start_non_stop): ... this.
3519 * linux-low.h (class linux_process_target): Update.
3520 * lynx-low.cc (lynx_target_ops): Update.
3521 * nto-low.cc (nto_target_ops): Update.
3522 (nto_supports_non_stop): Remove; rely on the default behavior
3523 instead.
3524 * win32-low.cc (win32_target_ops): Update.
3525
3526 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3527
3528 Turn process_stratum_target's qxfer_siginfo op into a method of
3529 process_target.
3530
3531 * target.h (struct process_stratum_target): Remove the target op.
3532 (class process_target): Add the target op. Also add
3533 'supports_qxfer_siginfo'.
3534 * target.cc (process_target::qxfer_siginfo): Define.
3535 (process_target::supports_qxfer_siginfo): Define.
3536
3537 Update the derived classes and callers below.
3538
3539 * server.cc (handle_qxfer_siginfo): Update.
3540 (handle_query): Update.
3541 * linux-low.cc (linux_target_ops): Update.
3542 (linux_process_target::supports_qxfer_siginfo): Define.
3543 (linux_xfer_siginfo): Turn into ...
3544 (linux_process_target::qxfer_siginfo): ... this.
3545 * linux-low.h (class linux_process_target): Update.
3546 * lynx-low.cc (lynx_target_ops): Update.
3547 * nto-low.cc (nto_target_ops): Update.
3548 * win32-low.cc (win32_target_ops): Update.
3549
3550 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3551
3552 Turn process_stratum_target's qxfer_osdata op into a method of
3553 process_target.
3554
3555 * target.h (struct process_stratum_target): Remove the target op.
3556 (class process_target): Add the target op. Also add
3557 'supports_qxfer_osdata'.
3558 * target.cc (process_target::qxfer_osdata): Define.
3559 (process_target::supports_qxfer_osdata): Define.
3560
3561 Update the derived classes and callers below.
3562
3563 * server.cc (handle_qxfer_osdata): Update.
3564 (handle_query): Update.
3565 * linux-low.cc (linux_target_ops): Update.
3566 (linux_process_target::supports_qxfer_osdata): Define.
3567 (linux_qxfer_osdata): Turn into ...
3568 (linux_process_target::qxfer_osdata): ... this.
3569 * linux-low.h (class linux_process_target): Update.
3570 * lynx-low.cc (lynx_target_ops): Update.
3571 * nto-low.cc (nto_target_ops): Update.
3572 * win32-low.cc (win32_target_ops): Update.
3573
3574 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3575
3576 Turn process_stratum_target's hostio_last_error op into a
3577 method of process_target.
3578
3579 * target.h (struct process_stratum_target): Remove the target op.
3580 (class process_target): Add the target op.
3581 * target.cc: Add "hostio.h" to includes.
3582 (process_target::hostio_last_error): Define.
3583
3584 Update the derived classes and callers below.
3585
3586 * hostio.cc (hostio_error): Update.
3587 * linux-low.cc: Remove "hostio.h" from includes.
3588 (linux_target_ops): Update.
3589 * lynx-low.cc (lynx_target_ops): Update.
3590 * nto-low.cc (nto_target_ops): Update.
3591 * win32-low.h (class win32_process_target): Update.
3592 * win32-low.cc (win32_target_ops): Update.
3593 (wince_hostio_last_error): Turn into ...
3594 (win32_process_target::hostio_last_error): ... this.
3595
3596 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3597
3598 Turn process_stratum_target's get_tls_address op into a method of
3599 process_target.
3600
3601 * target.h (struct process_stratum_target): Remove the target op.
3602 (class process_target): Add the target op. Also add
3603 'supports_get_tls_address'.
3604 * target.cc (process_target::get_tls_address): Define.
3605 (process_target::supports_get_tls_address): Define.
3606
3607 Update the derived classes and callers below.
3608
3609 * server.cc (handle_query): Update.
3610 * linux-low.cc (linux_target_ops): Update.
3611 (linux_process_target::supports_get_tls_address): Define.
3612 (linux_process_target::get_tls_address): Define.
3613 * linux-low.h (class linux_process_target): Update.
3614 * lynx-low.cc (lynx_target_ops): Update.
3615 * nto-low.cc (nto_target_ops): Update.
3616 * win32-low.cc (win32_target_ops): Update.
3617
3618 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3619
3620 Turn process_stratum_target's read_offsets op into a method of
3621 process_target.
3622
3623 * target.h (struct process_stratum_target): Remove the target op.
3624 (class process_target): Add the target op. Also add
3625 'supports_read_offsets'.
3626 * target.cc (process_target::read_offsets): Define.
3627 (process_target::supports_read_offsets): Define.
3628
3629 Update the derived classes and callers below.
3630
3631 * server.cc (handle_query): Update.
3632 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
3633 (linux_target_ops): Update.
3634 (linux_process_target::supports_read_offsets): Define.
3635 (linux_read_offsets): Turn into ...
3636 (linux_process_target::read_offsets): ... this.
3637 * linux-low.h (class linux_process_target): Update.
3638 * lynx-low.cc (lynx_target_ops): Update.
3639 * nto-low.cc (nto_target_ops): Update.
3640 * win32-low.cc (win32_target_ops): Update.
3641
3642 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3643
3644 Turn process_stratum_target's stopped_by_watchpoint and
3645 stopped_data_address ops into methods of process_target.
3646
3647 * target.h (struct process_stratum_target): Remove the target ops.
3648 (class process_target): Add the target ops.
3649 * target.cc (process_target::stopped_by_watchpoint): Define.
3650 (process_target::stopped_data_address): Define.
3651
3652 Update the derived classes and callers below.
3653
3654 * remote-utils.cc (prepare_resume_reply): Update.
3655 * linux-low.cc (linux_target_ops): Update.
3656 (linux_stopped_by_watchpoint): Turn into ...
3657 (linux_process_target::stopped_by_watchpoint): ... this.
3658 (linux_stopped_data_address): Turn into ...
3659 (linux_process_target::stopped_data_address): ... this.
3660 * linux-low.h (class linux_process_target): Update.
3661 * lynx-low.cc (lynx_target_ops): Update.
3662 * nto-low.cc (nto_target_ops): Update.
3663 (nto_stopped_by_watchpoint): Turn into ...
3664 (nto_process_target::stopped_by_watchpoint): ... this.
3665 (nto_stopped_data_address): Turn into ...
3666 (nto_process_target::stopped_data_address): ... this.
3667 * nto-low.h (class nto_process_target): Update.
3668 * win32-low.cc (win32_target_ops): Update.
3669 (win32_stopped_by_watchpoint): Turn into ...
3670 (win32_process_target::stopped_by_watchpoint): ... this.
3671 (win32_stopped_data_address): Turn into ...
3672 (win32_process_target::stopped_data_address): ... this.
3673 * win32-low.h (class win32_process_target): Update.
3674
3675 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3676
3677 Turn process_stratum_target's supports_hardware_single_step op into
3678 a method of process_target.
3679
3680 * target.h (struct process_stratum_target): Remove the target op.
3681 (class process_target): Add the target op.
3682 (target_supports_hardware_single_step): Update the macro.
3683 (target_can_do_hardware_single_step): Remove declaration.
3684 * target.cc (process_target::supports_hardware_single_step): Define.
3685 (target_can_do_hardware_single_step): Remove.
3686
3687 Update the derived classes and callers below.
3688
3689 * linux-low.h (class linux_process_target): Update.
3690 * linux-low.cc (linux_target_ops): Update.
3691 (linux_supports_hardware_single_step): Turn into ...
3692 (linux_process_target::supports_hardware_single_step): ... this.
3693 * lynx-low.h (class lynx_process_target): Update.
3694 * lynx-low.cc (lynx_target_ops): Update.
3695 (lynx_process_target::supports_hardware_single_step): Define.
3696 * nto-low.h (class nto_process_target): Update.
3697 * nto-low.cc (nto_target_ops): Update.
3698 (nto_process_target::supports_hardware_single_step): Define.
3699 * win32-low.h (class win32_process_target): Update.
3700 * win32-low.cc (win32_target_ops): Update.
3701 (win32_process_target::supports_hardware_single_step): Define.
3702
3703 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3704
3705 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
3706 ops into methods of process_target.
3707
3708 * target.h (struct process_stratum_target): Remove the target ops.
3709 (class process_target): Add the target ops.
3710 (target_stopped_by_hw_breakpoint): Update the macro.
3711 (target_supports_stopped_by_hw_breakpoint): Update the macro.
3712 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
3713 (process_target::supports_stopped_by_hw_breakpoint): Define.
3714
3715 Update the derived classes and callers below.
3716
3717 * linux-low.cc (linux_target_ops): Update.
3718 (linux_stopped_by_hw_breakpoint): Turn into ...
3719 (linux_process_target::stopped_by_hw_breakpoint): ... this.
3720 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
3721 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
3722 * linux-low.h (class linux_process_target): Update.
3723 * lynx-low.cc (lynx_target_ops): Update.
3724 * nto-low.cc (nto_target_ops): Update.
3725 * win32-low.cc (win32_target_ops): Update.
3726
3727 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3728
3729 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
3730 ops into methods of process_target.
3731
3732 * target.h (struct process_stratum_target): Remove the target ops.
3733 (class process_target): Add the target ops.
3734 (target_stopped_by_sw_breakpoint): Update the macro.
3735 (target_supports_stopped_by_sw_breakpoint): Update the macro.
3736 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
3737 (process_target::supports_stopped_by_sw_breakpoint): Define.
3738
3739 Update the derived classes and callers below.
3740
3741 * linux-low.cc (linux_target_ops): Update.
3742 (linux_stopped_by_sw_breakpoint): Turn into ...
3743 (linux_process_target::stopped_by_sw_breakpoint): ... this.
3744 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
3745 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
3746 * linux-low.h (class linux_process_target): Update.
3747 * lynx-low.cc (lynx_target_ops): Update.
3748 * nto-low.cc (nto_target_ops): Update.
3749 * win32-low.cc (win32_target_ops): Update.
3750
3751 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3752
3753 Turn process_stratum_target's insert_point and remove_point ops
3754 into methods of process_target.
3755
3756 * target.h (struct process_stratum_target): Remove the target ops.
3757 (class process_target): Add the target ops.
3758 * target.cc (process_target::insert_point): Define.
3759 (process_target::remove_point): Define.
3760
3761 Update the derived classes and callers below.
3762
3763 * mem-break.cc (set_raw_breakpoint_at): Update.
3764 (delete_raw_breakpoint): Update.
3765 (uninsert_raw_breakpoint): Update.
3766 (reinsert_raw_breakpoint): Update.
3767 * linux-low.cc (linux_target_ops): Update.
3768 (linux_insert_point): Turn into ...
3769 (linux_process_target::insert_point): ... this.
3770 (linux_remove_point): Turn into ...
3771 (linux_process_target::remove_point): ... this.
3772 * linux-low.h (class linux_process_target): Update.
3773 * lynx-low.cc (lynx_target_ops): Update.
3774 * nto-low.cc (nto_target_ops): Update.
3775 (nto_insert_point): Turn into ...
3776 (nto_process_target::insert_point): ... this.
3777 (nto_remove_point): Turn into ...
3778 (nto_process_target::remove_point): ... this.
3779 * nto-low.h (class nto_process_target): Update.
3780 * win32-low.cc (win32_target_ops): Update.
3781 (win32_insert_point): Turn into ...
3782 (win32_process_target::insert_point): ... this.
3783 (win32_remove_point): Turn into ...
3784 (win32_process_target::remove_point): ... this.
3785 * win32-low.h (class win32_process_target): Update.
3786
3787 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3788
3789 Turn process_stratum_target's supports_z_point_type op into a
3790 method of process_target.
3791
3792 * target.h (struct process_stratum_target): Remove the target op.
3793 (class process_target): Add the target op.
3794 * target.cc (process_target::supports_z_point_type): Define.
3795
3796 Update the derived classes and callers below.
3797
3798 * mem-break.cc (z_type_supported): Update.
3799 * linux-low.cc (linux_target_ops): Update.
3800 (linux_supports_z_point_type): Turn into ...
3801 (linux_process_target::supports_z_point_type): ... this.
3802 * linux-low.h (class linux_process_target): Update.
3803 * lynx-low.cc (lynx_target_ops): Update.
3804 * nto-low.cc (nto_target_ops): Update.
3805 (nto_supports_z_point_type): Turn into ...
3806 (nto_process_target::supports_z_point_type): ... this.
3807 * nto-low.h (class nto_process_target): Update.
3808 * win32-low.cc (win32_target_ops): Update.
3809 (win32_supports_z_point_type): Turn into ...
3810 (win32_process_target::supports_z_point_type): ... this.
3811 * win32-low.h (class win32_process_target): Update.
3812
3813 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3814
3815 Turn process_stratum_target's read_auxv op into a method of
3816 process_target.
3817
3818 * target.h (class process_stratum_target): Remove the target op.
3819 (struct process_target): Add the target op. Also add
3820 'supports_read_auxv'.
3821 * target.cc (process_target::read_auxv): Define.
3822 (process_target::supports_read_auxv): Define.
3823
3824 Update the derived classes and callers below.
3825
3826 * server.cc (handle_qxfer_auxv): Update.
3827 (handle_query): Update.
3828 * linux-low.cc (linux_target_ops): Update.
3829 (linux_process_target::supports_read_auxv): Define.
3830 (linux_read_auxv): Turn into ...
3831 (linux_process_target::read_auxv): ... this.
3832 * linux-low.h (class linux_process_target): Update.
3833 * lynx-low.cc (lynx_target_ops): Update.
3834 * nto-low.cc (nto_target_ops): Update.
3835 (nto_process_target::supports_read_auxv): Define.
3836 (nto_read_auxv): Turn into ...
3837 (nto_process_target::read_auxv): ... this.
3838 * nto-low.h (class nto_process_target): Update.
3839 * win32-low.cc (win32_target_ops): Update.
3840
3841 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3842
3843 Turn process_stratum_target's request_interrupt op into a method of
3844 process_target.
3845
3846 * target.h (struct process_stratum_target): Remove the target op.
3847 (class process_target): Add the target op.
3848
3849 Update the derived classes and callers below.
3850
3851 * remote-utils.cc (putpkt_binary_1): Update.
3852 (input_interrupt): Update.
3853 (getpkt): Update.
3854 * server.cc (handle_v_requests): Update.
3855 * linux-low.cc (linux_target_ops): Update.
3856 (linux_request_interrupt): Turn into ...
3857 (linux_process_target::request_interrupt): ... this.
3858 * linux-low.h (class linux_process_target): Update.
3859 * lynx-low.cc (lynx_target_ops): Update.
3860 (lynx_request_interrupt): Turn into ...
3861 (lynx_process_target::request_interrupt): ... this.
3862 * lynx-low.h (class lynx_process_target): Update.
3863 * nto-low.cc (nto_target_ops): Update.
3864 (nto_request_interrupt): Turn into ...
3865 (nto_process_target::request_interrupt): ... this.
3866 * nto-low.h (class nto_process_target): Update.
3867 * win32-low.cc (win32_target_ops): Update.
3868 (win32_request_interrupt): Turn into ...
3869 (win32_process_target::request_interrupt): ... this.
3870 * win32-low.h (class win32_process_target): Update.
3871
3872 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3873
3874 Turn process_stratum_target's look_up_symbols op into a method of
3875 process_target.
3876
3877 * target.h (struct process_stratum_target): Remove the target op.
3878 (class process_target): Add the target op.
3879 * target.cc (process_target::look_up_symbols): Define.
3880
3881 Update the derived classes and callers below.
3882
3883 * server.cc (handle_query): Update.
3884 * linux-low.cc (linux_target_ops): Update.
3885 (linux_look_up_symbols): Turn into ...
3886 (linux_process_target::look_up_symbols): ... this.
3887 * linux-low.h (class linux_process_target): Update.
3888 * lynx-low.cc (lynx_target_ops): Update.
3889 * nto-low.cc (nto_target_ops): Update.
3890 * win32-low.cc (win32_target_ops): Update.
3891
3892 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3893
3894 Turn process_stratum_target's read_memory and write_memory
3895 ops into methods of process_target.
3896
3897 * target.h (struct process_stratum_target): Remove the target ops.
3898 (class process_target): Add the target ops.
3899
3900 Update the derived classes and callers below.
3901
3902 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
3903 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
3904 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
3905 (arm_get_syscall_trapinfo): Update.
3906 * linux-cris-low.cc (cris_breakpoint_at): Update.
3907 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
3908 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
3909 * linux-mips-low.cc (mips_breakpoint_at): Update.
3910 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
3911 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
3912 * linux-sh-low.cc (sh_breakpoint_at): Update.
3913 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
3914 (sparc_store_gregset_from_stack): Update.
3915 (sparc_breakpoint_at): Update.
3916 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
3917 * linux-tile-low.cc (tile_breakpoint_at): Update.
3918 * linux-x86-low.cc (x86_breakpoint_at): Update.
3919 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
3920 * mem-brea.cc (insert_memory_breakpoint): Update.
3921 (validate_inserted_breakpoint): Update.
3922 * target.cc (read_inferior_memory): Update.
3923 (target_write_memory): Update.
3924 * linux-low.cc (linux_target_ops): Update.
3925 (linux_read_memory): Make a wrapper around the read_memory target
3926 op call.
3927 (linux_process_target::read_memory): Rename from linux_read_memory.
3928 (linux_write_memory): Turn into ...
3929 (linux_process_target::write_memory): ... this.
3930 * linux-low.h (class linux_process_target): Update.
3931 * lynx-low.cc (lynx_target_ops): Update.
3932 (lynx_read_memory): Turn into ...
3933 (lynx_process_target::read_memory): ... this.
3934 (lynx_write_memory): Turn into ...
3935 (lynx_process_target::write_memory): ... this.
3936 * lynx-low.h (class lynx_process_target): Update.
3937 * nto-low.cc (nto_target_ops): Update.
3938 (nto_read_memory): Turn into ...
3939 (nto_process_target::read_memory): ... this.
3940 (nto_write_memory): Turn into ...
3941 (nto_process_target::write_memory): ... this.
3942 * nto-low.h (class nto_process_target): Update.
3943 * win32-low.cc (win32_target_ops): Update.
3944 (win32_read_inferior_memory): Turn into ...
3945 (win32_process_target::read_memory): ... this.
3946 (win32_write_inferior_memory): Turn into ...
3947 (win32_process_target::write_memory): ... this.
3948 * win32-low.h (class win32_process_target): Update.
3949
3950 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3951
3952 Turn process_stratum_target's prepare_to_access_memory and
3953 done_accessing_memory ops into methods of process_target.
3954
3955 * target.h (struct process_stratum_target): Remove the target ops.
3956 (class process_target): Add the target ops.
3957 * target.cc (process_target::prepare_to_access_memory): Define.
3958 (process_target::done_accessing_memory): Define.
3959 (prepare_to_access_memory): Update.
3960 (done_accessing_memory): Update.
3961
3962 Update the derived classes and callers below.
3963
3964 * linux-low.cc (linux_target_ops): Update.
3965 (linux_prepare_to_access_memory): Turn into ...
3966 (linux_process_target::prepare_to_access_memory): ... this.
3967 (linux_done_accessing_memory): Turn into ...
3968 (linux_process_target::done_accessing_memory): ... this.
3969 * linux-low.h (class linux_process_target): Update.
3970 * lynx-low.cc (lynx_target_ops): Update.
3971 * nto-low.cc (nto_target_ops): Update.
3972 * win32-low.cc (win32_target_ops): Update.
3973
3974 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3975
3976 Turn process_stratum_target's fetch_registers and store_registers
3977 ops into methods of process_target.
3978
3979 * target.h (struct process_stratum_target): Remove the target ops.
3980 (class process_target): Add the target ops.
3981 (fetch_inferior_registers): Update the macro.
3982 (store_inferior_registers): Update the macro.
3983
3984 Update the derived classes and callers below.
3985
3986 * linux-low.cc (linux_target_ops): Update.
3987 (linux_fetch_registers): Turn into ...
3988 (linux_process_target::fetch_registers): ... this.
3989 (linux_store_registers): Turn into ...
3990 (linux_process_target::store_registers): ... this.
3991 * linux-low.h (class linux_process_target): Update.
3992 * lynx-low.cc (lynx_target_ops): Update.
3993 (lynx_fetch_registers): Turn into ...
3994 (lynx_process_target::fetch_registers): ... this.
3995 (lynx_store_registers): Turn into ...
3996 (lynx_process_target::store_registers): ... this.
3997 * lynx-low.h (class lynx_process_target): Update.
3998 * nto-low.cc (nto_target_ops): Update.
3999 (nto_fetch_registers): Turn into ...
4000 (nto_process_target::fetch_registers): ... this.
4001 (nto_store_registers): Turn into ...
4002 (nto_process_target::store_registers): ... this.
4003 * nto-low.h (class nto_process_target): Update.
4004 * win32-low.cc (win32_target_ops): Update.
4005 (win32_fetch_inferior_registers): Turn into ...
4006 (win32_process_target::fetch_registers): ... this.
4007 (win32_store_inferior_registers): Turn into ...
4008 (win32_process_target::store_registers): ... this.
4009 * win32-low.h (class win32_process_target): Update.
4010
4011 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4012
4013 Turn process_stratum_target's wait op into a method of
4014 process_target.
4015
4016 * target.h (struct process_stratum_target): Remove the target op.
4017 (class process_target): Add the target op.
4018
4019 Update the derived classes and callers below.
4020
4021 * target.cc (target_wait): Update.
4022 * linux-low.cc (linux_target_ops): Update.
4023 (linux_wait): Turn into ...
4024 (linux_process_target::wait): ... this.
4025 * linux-low.h (class linux_process_target): Update.
4026 * lynx-low.cc (lynx_target_ops): Update.
4027 (lynx_wait): Turn into ...
4028 (lynx_process_target::wait): ... this.
4029 * lynx-low.h (class lynx_process_target): Update.
4030 * nto-low.cc (nto_target_ops): Update.
4031 (nto_wait): Turn into ...
4032 (nto_process_target::wait): ... this.
4033 * nto-low.h (class nto_process_target): Update.
4034 * win32-low.cc (win32_target_ops): Update.
4035 (win32_wait): Turn into ...
4036 (win32_process_target::wait): ... this.
4037 (do_initial_child_stuff): Update.
4038 * win32-low.h (class win32_process_target): Update.
4039
4040 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4041
4042 Turn process_stratum_target's resume op into a method of
4043 process_target.
4044
4045 * target.h (struct process_stratum_target): Remove the target op.
4046 (class process_target): Add the target op.
4047
4048 Update the derived classes and callers below.
4049
4050 * server.cc (resume): Update.
4051 * target.cc (target_stop_and_wait): Update.
4052 (target_continue_no_signal): Update.
4053 (target_continue): Update.
4054 * linux-low.cc (linux_target_ops): Update.
4055 (linux_resume): Turn into ...
4056 (linux_process_target::resume): ... this.
4057 * linux-low.h (class linux_process_target): Update.
4058 * lynx-low.cc (lynx_target_ops): Update.
4059 (lynx_resume): Turn into ...
4060 (lynx_process_target::resume): ... this.
4061 * lynx-low.h (class lynx_process_target): Update.
4062 * nto-low.cc (nto_target_ops): Update.
4063 (nto_resume): Turn into ...
4064 (nto_process_target::resume): ... this.
4065 * nto-low.h (class nto_process_target): Update.
4066 * win32-low.cc (win32_target_ops): Update.
4067 (win32_resume): Turn into ...
4068 (win32_process_target::resume): ... this.
4069 (win32_process_target::detach): Update.
4070 (do_initial_child_stuff): Update.
4071 * win32-low.h (class win32_process_target): Update.
4072
4073 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4074
4075 Turn process_stratum_target's thread_alive op into a method of
4076 process_target.
4077
4078 * target.h (struct process_stratum_target): Remove the target op.
4079 (class process_target): Add the target op.
4080 (mythread_alive): Update the macro.
4081
4082 Update the derived classes and callers below.
4083
4084 * linux-low.cc (linux_target_ops): Update.
4085 (linux_thread_alive): Turn into ...
4086 (linux_process_target::thread_alive): ... this.
4087 (wait_for_sigstop): Update.
4088 * linux-low.h (class linux_process_target): Update.
4089 * lynx-low.cc (lynx_target_ops): Update.
4090 (lynx_thread_alive): Turn into ...
4091 (lynx_process_target::thread_alive): ... this.
4092 * lynx-low.h (class lynx_process_target): Update.
4093 * nto-low.cc (nto_target_ops): Update.
4094 (nto_thread_alive): Turn into ...
4095 (nto_process_target::thread_alive): ... this.
4096 * nto-low.h (class nto_process_target): Update.
4097 * win32-low.cc (win32_target_ops): Update.
4098 (win32_thread_alive): Turn into ...
4099 (win32_process_target::thread_alive): ... this.
4100 * win32-low.h (class win32_process_target): Update.
4101
4102 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4103
4104 Turn process_stratum_target's join op into a method of
4105 process_target.
4106
4107 * target.h (struct process_stratum_target): Remove the target op.
4108 (class process_target): Add the target op.
4109 (join_inferior): Update the macro.
4110
4111 Update the derived classes and callers below.
4112
4113 * linux-low.cc (linux_target_ops): Update.
4114 (linux_join): Turn into ...
4115 (linux_process_target::join): ... this.
4116 * linux-low.h (class linux_process_target): Update.
4117 * lynx-low.cc (lynx_target_ops): Update.
4118 (lynx_join): Turn into ...
4119 (lynx_process_target::join): ... this.
4120 * lynx-low.h (class lynx_process_target): Update.
4121 * nto-low.cc (nto_target_ops): Update.
4122 (nto_process_target::join): Define.
4123 * nto-low.h (class nto_process_target): Update.
4124 * win32-low.cc (win32_target_ops): Update.
4125 (win32_join): Turn into ...
4126 (win32_process_target::join): ... this.
4127 * win32-low.h (class win32_process_target): Update.
4128
4129 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4130
4131 Turn process_stratum_target's mourn op into a method of
4132 process_target.
4133
4134 * target.h (struct process_stratum_target): Remove the target op.
4135 (class process_target): Add the target op.
4136
4137 Update the derived classes and callers below.
4138
4139 * target.cc (target_mourn_inferior): Update.
4140 * linux-low.cc (linux_target_ops): Update.
4141 (linux_mourn): Turn into ...
4142 (linux_process_target::mourn): ... this.
4143 (handle_extended_wait): Update.
4144 (linux_process_target::kill): Update.
4145 (linux_process_target::detach): Update.
4146 * linux-low.h (class linux_process_target): Update.
4147 * lynx-low.cc (lynx_target_ops): Update.
4148 (lynx_mourn): Turn into ...
4149 (lynx_process_target::mourn): ... this.
4150 * lynx-low.h (class lynx_process_target): Update.
4151 * nto-low.cc (nto_target_ops): Update.
4152 (nto_mourn): Turn into ...
4153 (nto_process_target::mourn): ... this.
4154 * nto-low.h (class nto_process_target): Update.
4155 * win32-low.cc (win32_target_ops): Update.
4156 (win32_mourn): Turn into ...
4157 (win32_process_target::mourn): ... this.
4158 * win32-low.h (class win32_process_target): Update.
4159
4160 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4161
4162 Turn process_stratum_target's detach op into a method of
4163 process_target.
4164
4165 * target.h (struct process_stratum_target): Remove the target op.
4166 (class process_target): Add the target op.
4167 (detach_inferior): Update the macro.
4168
4169 Update the derived classes and callers below.
4170
4171 * linux-low.cc (linux_target_ops): Update.
4172 (linux_detach): Turn into ...
4173 (linux_process_target::detach): ... this.
4174 * linux-low.h (class linux_process_target): Update.
4175 * lynx-low.cc (lynx_target_ops): Update.
4176 (lynx_detach): Turn into ...
4177 (lynx_process_target::detach): ... this.
4178 * lynx-low.h (class lynx_process_target): Update.
4179 * nto-low.cc (nto_target_ops): Update.
4180 (nto_detach): Turn into ...
4181 (nto_process_target::detach): ... this.
4182 * nto-low.h (class nto_process_target): Update.
4183 * win32-low.cc (win32_target_ops): Update.
4184 (win32_detach): Turn into ...
4185 (win32_process_target::detach): ... this.
4186 * win32-low.h (class win32_process_target): Update.
4187
4188 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4189
4190 Turn process_stratum_target's kill op into a method of
4191 process_target.
4192
4193 * target.h (struct process_stratum_target): Remove the target op.
4194 (class process_target): Add the target op.
4195
4196 Update the derived classes and callers below.
4197
4198 * target.cc (kill_inferior): Update.
4199 * linux-low.cc (linux_target_ops): Update.
4200 (linux_kill): Turn into ...
4201 (linux_process_target::kill): ... this.
4202 * linux-low.h (class linux_process_target): Update.
4203 * lynx-low.cc (lynx_target_ops): Update.
4204 (lynx_kill): Turn into ...
4205 (lynx_process_target::kill): ... this.
4206 * lynx-low.h (class lynx_process_target): Update.
4207 * nto-low.cc (nto_target_ops): Update.
4208 (nto_kill): Turn into ...
4209 (nto_process_target::kill): ... this.
4210 * nto-low.h (class nto_process_target): Update.
4211 * win32-low.cc (win32_target_ops): Update.
4212 (win32_kill): Turn into ...
4213 (win32_process_target::kill): ... this.
4214 * win32-low.h (class win32_process_target): Update.
4215
4216 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4217
4218 Turn process_stratum_target's attach op into a method of
4219 process_target.
4220
4221 * target.h (struct process_stratum_target): Remove the target op.
4222 (class process_target): Add the target op.
4223 (myattach): Update the macro.
4224
4225 Update the derived classes and callers below.
4226
4227 * linux-low.cc (linux_target_ops): Update.
4228 (linux_attach): Turn into ...
4229 (linux_process_target::attach): ... this.
4230 * linux-low.h (class linux_process_target): Update.
4231 * lynx-low.cc (lynx_target_ops): Update.
4232 (lynx_attach): Turn into ...
4233 (lynx_process_target::attach): ... this.
4234 * lynx-low.h (class lynx_process_target): Update.
4235 * nto-low.cc (nto_target_ops): Update.
4236 (nto_attach): Turn into ...
4237 (nto_process_target::attach): ... this.
4238 * nto-low.h (class nto_process_target): Update.
4239 * win32-low.cc (win32_target_ops): Update.
4240 (win32_attach): Turn into ...
4241 (win32_process_target::attach): ... this.
4242 * win32-low.h (class win32_process_target): Update.
4243
4244 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4245
4246 Turn process_stratum_target's post_create_inferior op into a method
4247 of process_target.
4248
4249 * target.h (struct process_stratum_target): Remove the target op.
4250 (class process_target): Add the target op.
4251 (target_post_create_inferior): Update the macro.
4252 * target.cc (process_target::post_create_inferior): Define.
4253
4254 Update the derived classes and callers below.
4255
4256 * linux-low.cc (linux_target_ops): Update.
4257 (linux_post_create_inferior): Turn into ...
4258 (linux_process_target::post_create_inferior): ... this.
4259 * linux-low.h (class linux_process_target): Update.
4260 * lynx-low.cc (lynx_target_ops): Update.
4261 * nto-low.cc (nto_target_ops): Update.
4262 * win32-low.cc (win32_target_ops): Update.
4263
4264 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4265
4266 Turn process_stratum_target's create_inferior op into a method of
4267 process_target.
4268
4269 * target.h (struct process_stratum_target): Remove the target op.
4270 (class process_target): Add the target op.
4271 (create_inferior): Rename the macro to ...
4272 (target_create_inferior): ... this.
4273
4274 Update the derived classes and callers below.
4275
4276 * server.cc (handle_v_run): Update.
4277 (captured_main): Update.
4278 (process_serial_event): Update.
4279 * linux-low.cc (linux_target_ops): Update.
4280 (linux_create_inferior): Turn into ...
4281 (linux_process_target::create_inferior): ... this.
4282 * linux-low.h (class linux_process_target): Update.
4283 * lynx-low.cc (lynx_target_ops): Update.
4284 (lynx_create_inferior): Turn into ...
4285 (lynx_process_target::create_inferior): ... this.
4286 * lynx-low.h (class lynx_process_target): Update.
4287 * nto-low.cc (nto_target_ops): Update.
4288 (nto_create_inferior): Turn into ...
4289 (nto_process_target::create_inferior): ... this.
4290 * nto-low.h (class nto_process_target): Update.
4291 * win32-low.cc (win32_target_ops): Update.
4292 (win32_create_inferior): Turn into ...
4293 (win32_process_target::create_inferior): ... this.
4294 * win32-low.h (class win32_process_target): Update.
4295
4296 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4297
4298 * target.h (class process_target): New class definition.
4299 (struct process_stratum_target) <pt>: New field with type
4300 'process_target*'.
4301 * linux-low.h (class linux_process_target): Define as a derived
4302 class of 'process_target'.
4303 * linux-low.cc (linux_target_ops): Add a linux_process_target*
4304 as the 'pt' field.
4305 * lynx-low.h (class lynx_process_target): Define as a derived
4306 class of 'process_target'.
4307 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
4308 as the 'pt' field.
4309 * nto-low.h (class nto_process_target): Define as a derived
4310 class of 'process_target'.
4311 * nto-low.cc (nto_target_ops): Add an nto_process_target*
4312 as the 'pt' field.
4313 * win32-low.h (class win32_process_target): Define as a derived
4314 class of 'process_target'.
4315 * win32-low.cc (win32_target_ops): Add a win32_process_target*
4316 as the 'pt' field.
4317
4318 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
4319
4320 * configure: Regenerate.
4321
4322 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
4323 Andrew Burgess <andrew.burgess@embecosm.com>
4324
4325 * linux-riscv-low.cc: New file.
4326 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
4327 and nat/riscv-linux-tdesc.c.
4328 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
4329 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
4330 Define.
4331
4332 2020-02-14 Tom Tromey <tom@tromey.com>
4333
4334 * acinclude.m4: Don't include acx_configure_dir.m4.
4335 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
4336 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
4337 (all, install-only, uninstall, clean-info, clean)
4338 (maintainer-clean): Don't recurse.
4339 (subdir_do, all-lib): Remove.
4340 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
4341 (GNULIB_H): Remove.
4342 (generated_files): Update.
4343 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
4344 * configure: Rebuild.
4345 * configure.ac: Don't configure gnulib or libiberty.
4346 (GNULIB): Update.
4347
4348 2020-02-14 Eli Zaretskii <eliz@gnu.org>
4349
4350 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
4351 preparing the command line for CreateProcess.
4352 (win32_create_inferior): Reflect the program name in debugging
4353 output that shows the process and its command line.
4354
4355 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
4356
4357 * Makefile.in: Rename source files from .c to .cc.
4358 * %.c: Rename to %.cc.
4359 * configure.ac: Rename server.c to server.cc.
4360 * configure: Re-generate.
4361
4362 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
4363
4364 * Makefile.in: Rename gdbsupport source files from .c to .cc.
4365
4366 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
4367
4368 * win32-low.c (win32_create_inferior): Set signal_pid.
4369
4370 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
4371 Pedro Alves <palves@redhat.com>
4372
4373 Skip building gdbserver in a cross-configuration.
4374 * configure.srv: Set $gdbserver_host depending on whether $target
4375 is $host. Use $gdbserver_host instead of $host.
4376
4377 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4378
4379 * configure: Re-generate.
4380
4381 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4382
4383 * configure: Re-generate.
4384
4385 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4386
4387 * acinclude.m4: Update warning.m4 path.
4388
4389 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
4390
4391 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
4392 (handle_exception): Set siginfo_er.
4393 (win32_xfer_siginfo): New function.
4394
4395 2020-02-07 Tom Tromey <tom@tromey.com>
4396 Pedro Alves <palves@redhat.com>
4397
4398 * README: Update build documentation.
4399 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
4400 host, not target.
4401 * configure.ac: Update paths.
4402 * configure: Rebuild.
4403 * acinclude.m4: Update paths.
4404 * Makefile.in: Update include paths.
4405 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
4406 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
4407 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
4408 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
4409 (%-generated.c): Update paths.
4410 * Move entire directory from ../gdb/gdbserver.
4411
4412 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
4413
4414 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
4415
4416 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4417
4418 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
4419 assignment instead of srv_linux_obj.
4420
4421 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
4422
4423 * server.c (handle_qxfer_libraries): Write segment-address with
4424 paddress.
4425
4426 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
4427
4428 * Makefile.in (install-strip): New target.
4429 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
4430 * aclocal.m4: Regenerate.
4431 * configure: Regenerate.
4432 * configure.ac: Add AM_PROG_INSTALL_STRIP.
4433
4434 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4435
4436 * Makefile.in (SFILES): Adjust paths to point to real files.
4437 (OBS): Move waitstatus.o to target/waitstatus.o.
4438 (TAGS): Transform paths appropriately.
4439 (%.o): Rename to...
4440 (nat/%.o): ... this pattern rule.
4441 (%.o): Rename to...
4442 (target/%.o): ... this pattern rule.
4443 * configure.srv: Adjust paths throughout to include nat/ prefix
4444 with the revant files.
4445 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
4446 * configure: Regenerate.
4447
4448 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4449
4450 * Makefile.in (TAGS): Remove config files from the recipe.
4451
4452 2020-01-14 Tom Tromey <tom@tromey.com>
4453
4454 * configure: Rebuild.
4455 * configure.ac: Remove any checks that were added to common.m4.
4456 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
4457 lib-link.m4.
4458
4459 2020-01-14 Tom Tromey <tom@tromey.com>
4460
4461 * server.h: Include config.h.
4462 * gdbreplay.c: Include config.h.
4463 * configure: Rebuild.
4464 * configure.ac: Don't source common.host.
4465 * acinclude.m4: Update path.
4466 * Makefile.in (INCSUPPORT): New variable.
4467 (INCLUDE_CFLAGS): Add INCSUPPORT.
4468 (SFILES): Update paths.
4469 (version-generated.c): Update path to create-version.sh.
4470 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
4471
4472 2020-01-14 Tom Tromey <tom@tromey.com>
4473
4474 * configure.ac (LIBS): Use WIN32APILIBS.
4475 (USE_WIN32API): Don't define.
4476 * configure: Rebuild.
4477
4478 2020-01-14 Tom Tromey <tom@tromey.com>
4479
4480 * configure: Rebuild.
4481
4482 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4483
4484 * Makefile.in (%-generated.c): Remove rule for files from
4485 regformats/i386.
4486
4487 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4488
4489 * configure: Re-generate.
4490
4491 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4492
4493 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
4494 Define to static.
4495 * tracepoint.c (stop_tracing, flush_trace_buffer,
4496 about_to_request_buffer_space, get_trace_state_variable_value,
4497 set_trace_state_variable_value, gdb_collect): Add declaration.
4498
4499 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4500
4501 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
4502 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
4503 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
4504 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
4505 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
4506 static.
4507
4508 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4509
4510 * inferiors.c: Include gdbsupport/common-inferior.h.
4511
4512 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4513
4514 * hostio-errno.c: Include hostio.h.
4515
4516 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4517
4518 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
4519 prerequisite.
4520
4521 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4522
4523 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
4524 * linux-arm-tdesc.h: Include arch/arm.h.
4525
4526 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4527
4528 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
4529
4530 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4531
4532 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
4533 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
4534
4535 2020-01-10 Pedro Alves <palves@redhat.com>
4536
4537 * fork-child.c (post_fork_inferior): Pass target down to
4538 startup_inferior.
4539 * inferiors.c (switch_to_thread): Add process_stratum_target
4540 parameter.
4541 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
4542 * nto-low.c (nto_target_ops): Now a process_stratum_target.
4543 * linux-low.c (linux_target_ops): Now a process_stratum_target.
4544 * remote-utils.c (prepare_resume_reply): Pass the target to
4545 switch_to_thread.
4546 * target.c (the_target): Now a process_stratum_target.
4547 (done_accessing_memory): Pass the target to switch_to_thread.
4548 (set_target_ops): Ajust to use process_stratum_target.
4549 * target.h (struct target_ops): Rename to ...
4550 (struct process_stratum_target): ... this.
4551 (the_target, set_target_ops): Adjust.
4552 (prepare_to_access_memory): Adjust comment.
4553 * win32-low.c (child_xfer_memory): Adjust to use
4554 process_stratum_target.
4555 (win32_target_ops): Now a process_stratum_target.
4556
4557 2020-01-06 Eli Zaretskii <eliz@gnu.org>
4558 Pedro Alves <palves@redhat.com>
4559
4560 * win32-low.c (get_child_debug_event): Extract the fatal exception
4561 from the exit status and convert to the equivalent Posix signal
4562 number.
4563 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
4564 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
4565
4566 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
4567
4568 * Makefile.in: Use INSTALL_PROGRAM_ENV.
4569
4570 2020-01-01 Joel Brobecker <brobecker@adacore.com>
4571
4572 * server.c (gdbserver_version): Change copyright year to 2020.
4573 * gdbreplay.c (gdbreplay_version): Likewise.
4574
4575 2019-12-19 Christian Biesinger <cbiesinger@google.com>
4576
4577 * configure: Regenerate.
4578 * configure.ac: Quote variable arguments of test.
4579
4580 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
4581
4582 * Makefile.in: Fix build with GNU Make 3.81
4583
4584 2019-12-16 Tom Tromey <tromey@adacore.com>
4585
4586 * server.c (get_exec_file): Constify result.
4587
4588 2019-12-10 Christian Biesinger <cbiesinger@google.com>
4589
4590 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
4591 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
4592 * config.in: Regenerate.
4593 * configure: Regenerate.
4594 * configure.ac: Don't check for strerror.
4595 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
4596 Call safe_strerror instead of strerror.
4597 * server.h (strerror): Remove this now-unnecessary declaration.
4598 * tracepoint.c (init_named_socket): Call safe_strerror instead of
4599 strerror.
4600 (gdb_agent_helper_thread): Likewise.
4601 * utils.c (perror_with_name): Likewise.
4602
4603 2019-11-26 Tom Tromey <tom@tromey.com>
4604
4605 * configure, config.in: Rebuild.
4606
4607 2019-11-26 Tom Tromey <tom@tromey.com>
4608
4609 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
4610 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
4611 gdb_sigmask.
4612 * configure, config.in: Rebuild.
4613
4614 2019-11-26 Tom Tromey <tom@tromey.com>
4615
4616 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
4617 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
4618 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
4619 * acinclude.m4: Include ax_pthread.m4.
4620 * config.in, configure: Rebuild.
4621
4622 2019-11-26 Christian Biesinger <cbiesinger@google.com>
4623
4624 * debug.c (debug_set_output): Call safe_strerror instead of
4625 strerror.
4626 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
4627 (linux_kill_one_lwp): Likewise.
4628 (linux_detach_one_lwp): Likewise.
4629 (linux_wait_for_event_filtered): Likewise.
4630 (store_register): Likewise.
4631 * lynx-low.c (lynx_attach): Likewise.
4632 * mem-break.c (insert_memory_breakpoint): Likewise.
4633 (remove_memory_breakpoint): Likewise.
4634 (delete_fast_tracepoint_jump): Likewise.
4635 (set_fast_tracepoint_jump): Likewise.
4636 (uninsert_fast_tracepoint_jumps_at): Likewise.
4637 (reinsert_fast_tracepoint_jumps_at): Likewise.
4638 * nto-low.c (nto_xfer_memory): Likewise.
4639 (nto_resume): Likewise.
4640
4641 2019-11-20 Luis Machado <luis.machado@linaro.org>
4642
4643 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
4644 instead of register count.
4645 * tdesc.c (tdesc_contains_feature): New function.
4646 * tdesc.h (tdesc_contains_feature): New prototype.
4647
4648 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4649
4650 * Makefile.in: Add safe-strerror.c.
4651 * configure: Regenerate.
4652 * configure.ac: Don't source common.host.
4653
4654 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4655
4656 * config.in: Regenerate.
4657 * configure: Regenerate.
4658
4659 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
4660
4661 * ax.c (ax_printf): Handle size_t_arg.
4662
4663 2019-11-06 Christian Biesinger <cbiesinger@google.com>
4664
4665 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
4666 * mi/mi-main.c (output_cores): Likewise.
4667 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
4668 (linux_xfer_osdata_modules): Likewise.
4669 * remote.c (register_remote_support_xml): Likewise.
4670 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
4671 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
4672
4673 2019-11-01 Christian Biesinger <cbiesinger@google.com>
4674
4675 * configure: Regenerate.
4676 * configure.ac: Remove check for strerror_r.
4677
4678 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4679
4680 * config.in: Regenerate.
4681 * configure: Regenerate.
4682 * configure.ac: Also check for strerror_r.
4683
4684 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4685
4686 * ax.h (debug_agent): Remove duplicate declaration.
4687
4688 2019-10-26 Tom de Vries <tdevries@suse.de>
4689
4690 * linux-aarch64-low.c: Fix typos in comments.
4691 * linux-arm-low.c: Same.
4692 * linux-low.c: Same.
4693 * linux-ppc-low.c: Same.
4694 * proc-service.c: Same.
4695 * regcache.h: Same.
4696 * server.c: Same.
4697 * tracepoint.c: Same.
4698 * win32-low.c: Same.
4699
4700 2019-10-25 Tom Tromey <tromey@adacore.com>
4701
4702 * utils.c (xstrdup): Remove.
4703
4704 2019-10-23 Tom Tromey <tom@tromey.com>
4705
4706 * configure, config.in: Rebuild.
4707
4708 2019-10-23 Tom Tromey <tom@tromey.com>
4709
4710 * configure: Rebuild.
4711 * acinclude.m4: Use m4_include, not sinclude.
4712
4713 2019-10-17 Tom Tromey <tromey@adacore.com>
4714
4715 * configure: Rebuild.
4716 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
4717 in AC_CONFIG_FILES invocation.
4718 * Makefile.in (stamp-h, Makefile): Use new-style config.status
4719 invocation.
4720
4721 2019-10-16 Christian Biesinger <cbiesinger@google.com>
4722
4723 * server.c: Include xml-builtin.h.
4724 (get_xml_features): Don't declare xml_builtins here.
4725
4726 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4727
4728 * Makefile.in: Remove references to vec-ipa.o.
4729
4730 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4731
4732 * Makefile.in: Remove references to vec.c.
4733
4734 2019-10-02 Christian Biesinger <cbiesinger@google.com>
4735
4736 * server.c (server_waiting): Change to bool.
4737 (extended_protocol): Likewise.
4738 (response_needed): Likewise.
4739 (exit_requested): Likewise.
4740 (run_once): Likewise.
4741 (report_no_resumed): Likewise.
4742 (non_stop): Likewise.
4743 (disable_packet_vCont): Likewise.
4744 (disable_packet_Tthread): Likewise.
4745 (disable_packet_qC): Likewise.
4746 (disable_packet_qfThreadInfo): Likewise.
4747 (handle_general_set): Update.
4748 (handle_detach): Update.
4749 (handle_monitor_command): Update.
4750 (handle_query): Update.
4751 (captured_main): Update.
4752 (process_serial_event): Update.
4753 * server.h (server_waiting): Change to bool.
4754 (disable_packet_vCont): Likewise.
4755 (disable_packet_Tthread): Likewise.
4756 (disable_packet_qC): Likewise.
4757 (disable_packet_qfThreadInfo): Likewise.
4758 (run_once): Likewise.
4759 (non_stop): Likewise.
4760 * target.c (target_stop_and_wait): Update.
4761
4762 2019-10-02 Tom Tromey <tromey@adacore.com>
4763
4764 * Makefile.in (SFILES): Add common-inferior.c.
4765 (OBS): Add common-inferior.o.
4766 * server.c (startup_with_shell): Don't define.
4767
4768 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
4769
4770 * linux-low.c (linux_low_read_btrace): Update for change to
4771 std::vector.
4772
4773 2019-09-20 Christian Biesinger <cbiesinger@google.com>
4774
4775 * debug.c (debug_threads): Remove comment in favor of the header.
4776 * debug.h (using_threads): Add declaration.
4777 (debug_threads): Add comment.
4778 * linux-aarch64-low.c: Include debug.h and remove declaration of
4779 debug_threads.
4780 * nto-low.c: Likewise.
4781 * remote-utils.c: Likewise.
4782 * thread-db.c: Likewise.
4783
4784 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
4785
4786 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
4787 and powerpc-cell64l-ipa.o.
4788 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
4789 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
4790 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
4791 (spu*-*-*): Remove.
4792
4793 * spu-low.c: Remove file.
4794
4795 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
4796 (parse_spufs_run): Remove.
4797 (ppc_get_pc): Remove Cell/B.E. support.
4798 (ppc_set_pc): Likewise.
4799 (ppc_breakpoint_at): Likewise.
4800 (ppc_arch_setup): Likewise.
4801 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
4802 tdesc_powerpc_cell32l.
4803 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
4804 or init_registers_powerpc_cell32l.
4805 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
4806 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
4807 or init_registers_powerpc_cell32l.
4808 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
4809 (init_registers_powerpc_cell32l): Remove prototype.
4810 (init_registers_powerpc_cell64l): Likewise.
4811
4812 * target.h (struct target_ops): Remove qxfer_spu member.
4813 * server.c (handle_qxfer_spu): Remove.
4814 (qxfer_packets): Remove entry for "spu".
4815 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
4816 * linux-low.c (SPUFS_MAGIC): Remove.
4817 (spu_enumerate_spu_ids): Remove.
4818 (linux_qxfer_spu): Remove.
4819 (linux_target_ops): Remove qxfer_spu member.
4820 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
4821 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
4822 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
4823
4824 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
4825
4826 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
4827 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
4828 * config.in: Regenerate.
4829 * configure: Regenerate.
4830
4831 2019-08-15 Tom Tromey <tromey@adacore.com>
4832
4833 * target.c (target_write_memory): Use gdb::byte_vector.
4834
4835 2019-08-15 Tom Tromey <tromey@adacore.com>
4836
4837 * tracepoint.c (write_inferior_data_pointer)
4838 (write_inferior_integer, write_inferior_int8)
4839 (write_inferior_uinteger, m_tracepoint_action_download)
4840 (r_tracepoint_action_download, x_tracepoint_action_download)
4841 (l_tracepoint_action_download, clear_inferior_trace_buffer)
4842 (download_agent_expr, download_tracepoint_1)
4843 (download_trace_state_variables, upload_fast_traceframes): Update.
4844 * server.c (gdb_write_memory): Update.
4845 * remote-utils.c (relocate_instruction): Update.
4846 * proc-service.c (ps_pdwrite): Update.
4847 * mem-break.c (remove_memory_breakpoint)
4848 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
4849 (uninsert_fast_tracepoint_jumps_at)
4850 (reinsert_fast_tracepoint_jumps_at): Update.
4851 * linux-x86-low.c (append_insns)
4852 (i386_install_fast_tracepoint_jump_pad)
4853 (amd64_write_goto_address, i386_write_goto_address): Update.
4854 * linux-s390-low.c (append_insns, s390_write_goto_address):
4855 Update.
4856 * linux-ppc-low.c (ppc_relocate_instruction)
4857 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
4858 (ppc_write_goto_address): Update.
4859 * linux-aarch64-low.c (append_insns): Update.
4860 * target.h (struct target_ops): Update.
4861 (write_inferior_memory): Don't declare.
4862 * target.c (target_write_memory): Rename from
4863 write_inferior_memory. Remove old target_write_memory.
4864
4865 2019-08-15 Tom Tromey <tromey@adacore.com>
4866
4867 * target.c (write_inferior_memory): Use std::vector.
4868
4869 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
4870
4871 PR build/24886
4872 * configure.ac: Drop enable-libmcheck support.
4873 * configure, config.in: Rebuild.
4874 * acinclude.m4: Don't include it.
4875
4876 2019-07-19 Alan Hayward <alan.hayward@arm.com>
4877
4878 * configure.srv: Remove Arm xml files.
4879
4880 2019-07-19 Alan Hayward <alan.hayward@arm.com>
4881
4882 * configure.srv: Add new files. Remove xml generated files.
4883 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
4884 registers.
4885 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
4886 * linux-aarch32-tdesc.c: New file.
4887 * linux-aarch32-tdesc.h: New file.
4888 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
4889 * linux-arm-low.c (init_registers_arm, tdesc_arm)
4890 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
4891 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
4892 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
4893 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4894 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
4895 (arm_read_description): Call arm_linux_read_description.
4896 (initialize_low_arch): Don't init registers.
4897 * linux-arm-tdesc.c: New file.
4898 * linux-arm-tdesc.h: New file.
4899
4900 2019-07-10 Alan Hayward <alan.hayward@arm.com>
4901
4902 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
4903 Move counter inside for.
4904 (arm_read_description): Check ptrace earlier.
4905 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
4906
4907 2019-07-09 Tom Tromey <tom@tromey.com>
4908
4909 * configure: Rebuild.
4910 * configure.ac: Change common to gdbsupport.
4911 * acinclude.m4: Change common to gdbsupport.
4912 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
4913 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
4914 common to gdbsupport.
4915 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
4916 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
4917 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
4918 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
4919 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
4920 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
4921 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
4922 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
4923 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
4924 common to gdbsupport.
4925
4926 2019-07-04 Alan Hayward <alan.hayward@arm.com>
4927
4928 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
4929 defines.
4930 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
4931
4932 2019-07-04 Alan Hayward <alan.hayward@arm.com>
4933
4934 * configure.srv: Remove legacy xml.
4935 * linux-aarch64-low.c (initialize_low_arch): Remove
4936 initialize_low_tdesc call.
4937 * linux-aarch64-tdesc-selftest.c: Remove file.
4938 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
4939 * linux-x86-low.c (initialize_low_arch): Remove
4940 initialize_low_tdesc call.
4941 * linux-x86-tdesc-selftest.c: Remove file.
4942 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
4943
4944 2019-06-20 Tom de Vries <tdevries@suse.de>
4945
4946 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
4947 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
4948
4949 2019-06-19 Tom de Vries <tdevries@suse.de>
4950
4951 * debug.h (debug_write): Change return type to ssize_t.
4952 * debug.c (debug_write): Same.
4953
4954 2019-06-14 Tom Tromey <tom@tromey.com>
4955
4956 * configure.ac: Use new path to gnulib.
4957 * configure: Rebuild.
4958 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
4959 to gnulib.
4960
4961 2019-06-11 Tom Tromey <tom@tromey.com>
4962
4963 * Makefile.in (SFILES): Add alloc.c.
4964 (OBS): Add alloc.o.
4965 (IPA_OBJS): Add alloc-ipa.o.
4966 (alloc-ipa.o): New target.
4967 (%.o: ../%.c): New pattern rule.
4968
4969 2019-06-10 Tom Tromey <tromey@adacore.com>
4970
4971 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
4972 end warning with a newline.
4973 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
4974 newline.
4975 * thread-db.c (attach_thread): Don't end warning with a newline.
4976 (thread_db_notice_clone): Likewise.
4977 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
4978 newline.
4979 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
4980 end warning with a newline.
4981
4982 2019-06-04 Pedro Alves <palves@redhat.com>
4983
4984 * server.c (captured_main): Use make_unique_xstrdup.
4985
4986 2019-06-02 Tom Tromey <tom@tromey.com>
4987
4988 * gdbreplay.c (fromhex): Remove.
4989 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
4990
4991 2019-05-29 Tom Tromey <tromey@adacore.com>
4992
4993 * configure: Rebuild.
4994
4995 2019-05-06 Kevin Buettner <kevinb@redhat.com>
4996
4997 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
4998 sign extension code on 32-bit builds.
4999
5000 2019-05-03 Eli Zaretskii <eliz@gnu.org>
5001
5002 * remote-utils.c:
5003 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
5004
5005 2019-04-19 Tom Tromey <tom@tromey.com>
5006
5007 * server.c (struct vstop_notif): Derive from notif_event.
5008 <base>: Remove.
5009 (queue_stop_reply): Update.
5010 (remove_all_on_match_ptid): Change type. Rewrite.
5011 (discard_queued_stop_replies): Rewrite.
5012 (in_queued_stop_replies_ptid): Change type.
5013 (in_queued_stop_replies): Rewrite.
5014 (notif_stop): Update.
5015 (queue_stop_reply_callback): Update.
5016 (captured_main): Don't call initialize_notif.
5017 (push_stop_notification): Update.
5018 * notif.c (notif_write_event, handle_notif_ack)
5019 (notif_event_enque, notif_push): Update.
5020 (notif_event_xfree, initialize_notif): Remove.
5021 * notif.h (struct notif_event): Include <list>, not
5022 "common/queue.h".
5023 (struct notif_server) <queue>: Now a std::list.
5024 (notif_event_p): Remove typedef.
5025 (initialize_notif): Don't declare.
5026 (struct notif_event): Add virtual destructor.
5027
5028 2019-04-17 Alan Hayward <alan.hayward@arm.com>
5029
5030 * ax.c (ax_vdebug): Call debug_printf.
5031 * debug.c (debug_write): New function.
5032 * debug.h (debug_write): New declaration.
5033 * linux-low.c (sigchld_handler): Call debug_write.
5034
5035 2019-04-17 Alan Hayward <alan.hayward@arm.com>
5036
5037 * debug.c (debug_set_output): New function.
5038 (debug_vprintf): Send output to debug_file.
5039 (debug_flush): Likewise.
5040 * debug.h (debug_set_output): New declaration.
5041 * server.c (handle_monitor_command): Add debug-file option.
5042 (captured_main): Likewise.
5043
5044 2019-04-17 Alan Hayward <alan.hayward@arm.com>
5045
5046 * debug.c (remote_debug): Add definition.
5047 * debug.h (remote_debug): Add declaration.
5048 * hostio.c (remote_debug): Remove declaration.
5049 * remote-utils.c (struct ui_file): Likewise.
5050 (remote_debug): Likewise.
5051 * remote-utils.h (remote_debug): Likewise,
5052 * server.c (remote_debug): Remove definition.
5053
5054 2019-04-10 Kevin Buettner <kevinb@redhat.com>
5055
5056 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
5057 when using a 64-bit gdbserver.
5058
5059 2019-04-09 Tom Tromey <tromey@adacore.com>
5060
5061 * linux-low.c (select_event_lwp): Use find_thread_in_random.
5062
5063 2019-04-08 Tom Tromey <tom@tromey.com>
5064
5065 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
5066 throw.
5067 (linux_resume_one_lwp): Likewise.
5068
5069 2019-04-08 Tom Tromey <tom@tromey.com>
5070
5071 * gdbreplay.c: Update.
5072 * linux-low.c: Update.
5073 * server.c: Update.
5074
5075 2019-04-08 Tom Tromey <tom@tromey.com>
5076
5077 * server.c: Use C++ exception handling.
5078 * linux-low.c: Use C++ exception handling.
5079 * gdbreplay.c: Use C++ exception handling.
5080
5081 2019-04-08 Tom Tromey <tom@tromey.com>
5082
5083 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
5084 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
5085 (captured_main, main): Update.
5086 * gdbreplay.c (main): Update.
5087
5088 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5089
5090 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
5091 value in argument pointer, return 1 if the entry is found and 0
5092 otherwise. Move comment.
5093 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
5094 * linux-low.h (linux_get_auxv): Declare.
5095 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
5096
5097 2019-04-05 Tom Tromey <tromey@adacore.com>
5098
5099 * server.c (gdbserver_usage): Use upper-case for metasyntactic
5100 variables.
5101
5102 2019-03-28 Alan Hayward <alan.hayward@arm.com>
5103
5104 * linux-low.c (AT_HWCAP2): Add define if not already included.
5105
5106 2019-03-26 Alan Hayward <alan.hayward@arm.com>
5107
5108 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
5109 (aarch64_arch_setup): Call linux_get_hwcap.
5110 * linux-arm-low.c (arm_get_hwcap): Remove function.
5111 (arm_read_description): Call linux_get_hwcap.
5112 * linux-low.c (linux_get_auxv): New function.
5113 (linux_get_hwcap): Likewise.
5114 (linux_get_hwcap2): Likewise.
5115 * linux-low.h (linux_get_hwcap): New declaration.
5116 (linux_get_hwcap2): Likewise.
5117 * linux-ppc-low.c (ppc_get_auxv): Remove function.
5118 (ppc_arch_setup): Call linux_get_hwcap.
5119 * linux-s390-low.c (s390_get_hwcap): Remove function.
5120 (s390_arch_setup): Call linux_get_hwcap.
5121
5122 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5123 Jiong Wang <jiong.wang@arm.com>
5124
5125 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
5126 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
5127 to fail.
5128 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
5129
5130 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5131 Jiong Wang <jiong.wang@arm.com>
5132
5133 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
5134 (aarch64_get_hwcap): New function.
5135 (aarch64_arch_setup): Read APIA hwcap.
5136
5137 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5138 Jiong Wang <jiong.wang@arm.com>
5139
5140 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
5141 (initialize_low_tracepoint): Likewise.
5142 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
5143 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
5144 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
5145 (aarch64_linux_read_description): Likewise.
5146 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
5147
5148 2019-03-12 John Baldwin <jhb@FreeBSD.org>
5149
5150 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
5151 i386_create_target_description for 'segments' parameter.
5152 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
5153 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
5154 * win32-i386-low.c (i386_arch_setup): Likewise.
5155
5156 2019-03-12 Tom Tromey <tromey@adacore.com>
5157
5158 * linux-low.c (iterate_over_lwps): Update.
5159
5160 2019-03-06 Tom Tromey <tom@tromey.com>
5161
5162 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
5163 (captured_main): Use SCOPE_EXIT.
5164
5165 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
5166
5167 * configure.srv: Use '$enable_unittest' instead of '$development'
5168 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
5169 case.
5170
5171 2019-02-27 Tom Tromey <tromey@adacore.com>
5172
5173 * gdbreplay.c (logchar): Handle \r\n.
5174
5175 2019-02-07 Alan Hayward <alan.hayward@arm.com>
5176
5177 * linux-low.c (linux_attach): Add process before lwp.
5178 * server.c (attach_inferior): Check if already attached.
5179
5180 2019-02-07 Tom Tromey <tom@tromey.com>
5181
5182 * x86-tdesc.h: Rename include guard.
5183 * x86-low.h: Add include guard.
5184 * wincecompat.h: Rename include guard.
5185 * win32-low.h: Add include guard.
5186 * utils.h: Rename include guard.
5187 * tracepoint.h: Rename include guard.
5188 * tdesc.h: Rename include guard.
5189 * target.h: Rename include guard.
5190 * server.h: Rename include guard.
5191 * remote-utils.h: Rename include guard.
5192 * regcache.h: Rename include guard.
5193 * nto-low.h: Rename include guard.
5194 * notif.h: Add include guard.
5195 * mem-break.h: Rename include guard.
5196 * lynx-low.h: Add include guard.
5197 * linux-x86-tdesc.h: Add include guard.
5198 * linux-s390-tdesc.h: Add include guard.
5199 * linux-ppc-tdesc-init.h: Add include guard.
5200 * linux-low.h: Add include guard.
5201 * linux-aarch64-tdesc.h: Add include guard.
5202 * linux-aarch32-low.h: Add include guard.
5203 * inferiors.h: Rename include guard.
5204 * i387-fp.h: Rename include guard.
5205 * hostio.h: Rename include guard.
5206 * gdbthread.h: Rename include guard.
5207 * gdb_proc_service.h: Rename include guard.
5208 * event-loop.h: Rename include guard.
5209 * dll.h: Rename include guard.
5210 * debug.h: Rename include guard.
5211 * ax.h: Rename include guard.
5212
5213 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
5214
5215 PR gdb/23985
5216 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
5217 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
5218
5219 2019-01-25 Tom Tromey <tom@tromey.com>
5220
5221 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
5222
5223 2019-01-25 Tom Tromey <tom@tromey.com>
5224
5225 * win32-low.c: Fix common/ includes.
5226 * win32-i386-low.c: Fix common/ includes.
5227 * tracepoint.c: Fix common/ includes.
5228 * thread-db.c: Fix common/ includes.
5229 * target.h: Fix common/ includes.
5230 * symbol.c: Fix common/ includes.
5231 * spu-low.c: Fix common/ includes.
5232 * server.h: Fix common/ includes.
5233 * server.c: Fix common/ includes.
5234 * remote-utils.c: Fix common/ includes.
5235 * regcache.h: Fix common/ includes.
5236 * regcache.c: Fix common/ includes.
5237 * nto-x86-low.c: Fix common/ includes.
5238 * notif.h: Fix common/ includes.
5239 * mem-break.h: Fix common/ includes.
5240 * lynx-low.c: Fix common/ includes.
5241 * lynx-i386-low.c: Fix common/ includes.
5242 * linux-x86-tdesc-selftest.c: Fix common/ includes.
5243 * linux-x86-low.c: Fix common/ includes.
5244 * linux-low.c: Fix common/ includes.
5245 * inferiors.h: Fix common/ includes.
5246 * i387-fp.c: Fix common/ includes.
5247 * hostio.c: Fix common/ includes.
5248 * hostio-errno.c: Fix common/ includes.
5249 * gdbthread.h: Fix common/ includes.
5250 * gdbreplay.c: Fix common/ includes.
5251 * fork-child.c: Fix common/ includes.
5252 * event-loop.c: Fix common/ includes.
5253 * ax.c:
5254 (enum gdb_agent_op): Fix common/ includes.
5255
5256 2019-01-21 Tom Tromey <tom@tromey.com>
5257
5258 * tracepoint.c: Fix includes.
5259 * remote-utils.c: Fix includes.
5260 * linux-x86-low.c: Fix includes.
5261
5262 2019-01-01 Joel Brobecker <brobecker@adacore.com>
5263
5264 * gdbreplay.c (gdbreplay_version): Update copyright year in
5265 version message.
5266 * server.c (gdbserver_version): Likewise.
5267
5268 2018-12-05 Alan Hayward <alan.hayward@arm.com>
5269
5270 * linux-low.c (add_lwp): Switch ordering.
5271
5272 2018-11-29 Tom Tromey <tom@tromey.com>
5273
5274 * win32-low.c (win32_join): Take pid, not process.
5275 * target.h (struct target_ops) <join>: Change argument type.
5276 (join_inferior): Change argument name.
5277 * spu-low.c (spu_join): Take pid, not process.
5278 * server.c (handle_detach): Preserve pid before destroying
5279 process.
5280 * lynx-low.c (lynx_join): Take pid, not process.
5281 * linux-low.c (linux_join): Take pid, not process.
5282
5283 2018-11-23 Alan Hayward <alan.hayward@arm.com>
5284
5285 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
5286 (aarch64_cannot_fetch_register): Likewise.
5287 (struct linux_target_ops): Update references.
5288
5289 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5290
5291 * linux-ppc-low.c: Include nat/linux-ptrace.h.
5292
5293 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5294
5295 * configure.srv (ipa_ppc_linux_regobj): Add
5296 powerpc-isa207-htm-vsx32l-ipa.o and
5297 powerpc-isa207-htm-vsx64l-ipa.o.
5298 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
5299 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
5300 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
5301 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
5302 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
5303 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
5304 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
5305 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
5306 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5307 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
5308 (init_registers_powerpc_isa207_htm_vsx32l)
5309 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
5310 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
5311 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
5312 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
5313 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
5314 (ppc_store_tm_ctarregset): New functions.
5315 (ppc_regsets): Add entries for HTM regsets.
5316 (ppc_arch_setup): Set htm in features struct when needed. Set
5317 sizes for the HTM regsets.
5318 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
5319 (initialize_low_arch): Call
5320 init_registers_powerpc_isa207_htm_vsx32l and
5321 init_registers_powerpc_isa207_htm_vsx64l.
5322 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5323 PPC_TDESC_ISA207_HTM_VSX.
5324 (initialize_low_tracepoint): Call
5325 init_registers_powerpc_isa207_htm_vsx32l and
5326 init_registers_powerpc_isa207_htm_vsx64l.
5327
5328 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5329
5330 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
5331 rs6000/power-linux-pmu.xml to srv_xmlfiles.
5332 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
5333 (ppc_store_pmuregset): New functions.
5334 (ppc_regsets): Add entries for ebb and pmu regsets.
5335 (ppc_arch_setup): Set isa207 in features struct if the ebb and
5336 pmu regsets are available. Set sizes for these regsets.
5337
5338 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5339
5340 * configure.srv (ipa_ppc_linux_regobj): Add
5341 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
5342 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
5343 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
5344 rs6000/powerpc-isa207-vsx32l.xml, and
5345 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
5346 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5347 <PPC_TDESC_ISA207_VSX>: New enum value.
5348 (init_registers_powerpc_isa207_vsx32l): Declare.
5349 (init_registers_powerpc_isa207_vsx64l): Declare.
5350 * linux-ppc-low.c (ppc_fill_tarregset): New function.
5351 (ppc_store_tarregset): New function.
5352 (ppc_regsets): Add entry for the TAR regset.
5353 (ppc_arch_setup): Set isa207 in features struct when needed. Set
5354 size for the TAR regsets.
5355 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
5356 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
5357 and init_registers_powerpc_isa207_vsx64l.
5358 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
5359 (initialize_low_tracepoint): Call
5360 init_registers_powerpc_isa207_vsx32l and
5361 init_registers_powerpc_isa207_vsx64l.
5362
5363 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5364 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5365
5366 * configure.srv (ipa_ppc_linux_regobj): Add
5367 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
5368 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
5369 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
5370 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
5371 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
5372 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
5373 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
5374 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5375 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
5376 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
5377 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
5378 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
5379 (ppc_hwcap): Add comment.
5380 (ppc_hwcap2): New global.
5381 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
5382 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
5383 (ppc_regsets): Add entries for the DSCR and PPR regsets.
5384 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
5385 when needed. Set sizes for the the DSCR and PPR regsets.
5386 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
5387 (initialize_low_arch): Call
5388 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5389 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5390 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5391 PPC_TDESC_ISA205_PPR_DSCR_VSX.
5392 (initialize_low_tracepoint): Call
5393 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5394 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5395
5396 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5397
5398 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
5399
5400 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
5401 Simon Marchi <simark@simark.ca>
5402
5403 * acinclude.m4: Include "../selftest.m4".
5404 * configure: Regenerate.
5405 * configure.ac: Use "GDB_AC_SELFTEST".
5406 * configure.srv: Use "$enable_unittests" instead of
5407 "$development" when checking whether unit tests have been
5408 enabled.
5409 * server.c (captured_main): Update message informing that
5410 selftests have been disabled.
5411
5412 2018-10-04 Tom Tromey <tom@tromey.com>
5413
5414 * configure: Rebuild.
5415
5416 2018-10-04 Tom Tromey <tom@tromey.com>
5417
5418 * server.c (handle_status): Rename inner "thread".
5419 (process_serial_event): Declare "res" in 'm' case.
5420 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
5421 (iterate_over_lwps): Rename inner "thread".
5422 (linux_qxfer_libraries_svr4): Rename inner "len".
5423 * gdbthread.h (find_thread_in_random): Rename inner "thread".
5424
5425 2018-10-01 Gary Benson <gbenson@redhat.com>
5426
5427 * gdb_proc_service.h: Moved common code to
5428 common/gdb_proc_service.h.
5429
5430 2018-10-01 Gary Benson <gbenson@redhat.com>
5431
5432 * gdb_proc_service.h: Synchronize comments and whitespace with
5433 GDB's version of this file.
5434
5435 2018-09-25 Tom Tromey <tom@tromey.com>
5436
5437 * configure: Rebuild.
5438 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
5439
5440 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5441
5442 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
5443 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
5444 ($(IPA_LIB)): Sort IPA_OBJS.
5445
5446 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5447
5448 * Makefile.in: Remove references to $(ADD_DEPS).
5449
5450 2018-09-16 Tom Tromey <tom@tromey.com>
5451
5452 * remote-utils.c (remote_open): Use GNU style for metasyntactic
5453 variables.
5454 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
5455 variables.
5456
5457 2018-09-05 Tom Tromey <tom@tromey.com>
5458
5459 * configure: Rebuild.
5460
5461 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
5462
5463 PR build/23399
5464 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
5465
5466 2018-08-27 Tom Tromey <tom@tromey.com>
5467
5468 PR build/23087:
5469 * configure: Rebuild.
5470
5471 2018-08-27 Tom Tromey <tom@tromey.com>
5472
5473 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
5474 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
5475 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
5476 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
5477 (s390x_emit_stack_adjust): Add casts to unsigned char.
5478
5479 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
5480
5481 PR gdb/23374
5482 PR gdb/23375
5483 * server.h (struct client_state) <disable_randomization>:
5484 Initialize to 1.
5485
5486 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
5487
5488 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
5489 variable.
5490 (mips_supply_ptrace_register): Likewise.
5491
5492 2018-07-22 Tom Tromey <tom@tromey.com>
5493
5494 * configure: Rebuild.
5495
5496 2018-07-22 Tom Tromey <tom@tromey.com>
5497
5498 * win32-low.c (win32_create_inferior): Remove unused variables.
5499 * gdbreplay.c (remote_open): Remove unused variable.
5500 * remote-utils.c (remote_prepare): Remove unused variable.
5501 * x86-tdesc.h (X86_TDESC_H): Define.
5502 (amd64_expedite_regs): Define conditionally.
5503 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
5504 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
5505 * remote-utils.c (readchar): Remove unused variable.
5506
5507 2018-07-13 Pedro Alves <palves@redhat.com>
5508
5509 * linux-low.c (linux_kill): Change parameter to process_info
5510 pointer instead of pid. Adjust.
5511 * lynx-low.c (lynx_kill): Likewise.
5512 * nto-low.c (nto_kill): Likewise.
5513 * spu-low.c (spu_kill): Likewise.
5514 * win32-low.c (win32_kill): Likewise.
5515 * server.c (handle_v_kill, kill_inferior_callback)
5516 (detach_or_kill_for_exit): Adjust.
5517 * target.c (kill_inferior): Change parameter to process_info
5518 pointer instead of pid. Adjust.
5519 * target.h (struct target_ops) <kill>: Change parameter to
5520 process_info pointer instead of pid. Adjust all implementations
5521 and callers.
5522 (kill_inferior): Likewise.
5523
5524 2018-07-13 Pedro Alves <palves@redhat.com>
5525
5526 * linux-low.c (linux_detach, linux_join): Change parameter to
5527 process_info pointer instead of pid. Adjust.
5528 * lynx-low.c (lynx_detach, lynx_join): Likewise.
5529 * nto-low.c (nto_detach): Likewise.
5530 * spu-low.c (spu_detach, spu_join): Likewise.
5531 * win32-low.c (win32_detach, win32_join): Likewise.
5532 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
5533 * target.h (struct target_ops) <detach, join>: Change parameter to
5534 process_info pointer instead of pid. Adjust all implementations
5535 and callers.
5536 (detach_inferior, join_inferior): Rename 'pid' parameter to
5537 'proc'.
5538
5539 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5540 Jan Kratochvil <jan.kratochvil@redhat.com>
5541 Paul Fertser <fercerpav@gmail.com>
5542 Tsutomu Seki <sekiriki@gmail.com>
5543
5544 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
5545 (OBS): Add 'common/netstuff.o'.
5546 (GDBREPLAY_OBS): Likewise.
5547 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
5548 (remote_open): Implement support for IPv6
5549 connections.
5550 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
5551 and 'wspiapi.h'.
5552 (handle_accept_event): Accept connections from IPv6 sources.
5553 (remote_prepare): Handle IPv6-style hostnames; implement
5554 support for IPv6 connections.
5555 (remote_open): Implement support for printing connections from
5556 IPv6 sources.
5557
5558 2018-07-11 Pedro Alves <palves@redhat.com>
5559
5560 PR gdb/23377
5561 * mem-break.c (any_persistent_commands): Add process_info
5562 parameter and use it instead of relying on the current process.
5563 Change return type to bool.
5564 * mem-break.h (any_persistent_commands): Add process_info
5565 parameter and change return type to bool.
5566 * server.c (handle_detach): Remove require_running_or_return call.
5567 Look up the process_info for the process we're about to detach.
5568 If not found, return back error to GDB. Adjust
5569 any_persistent_commands call to pass down a process pointer.
5570
5571 2018-07-11 Pedro Alves <palves@redhat.com>
5572
5573 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
5574 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
5575 instead of collect_register_by_name.
5576 * regcache.c (regcache_raw_get_unsigned_by_name): New.
5577 * regcache.h (regcache_raw_get_unsigned_by_name): New.
5578
5579 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
5580 Pedro Alves <palves@redhat.com>
5581
5582 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
5583
5584 2018-07-03 Tom Tromey <tom@tromey.com>
5585
5586 * linux-low.c: Update.
5587 * lynx-low.c: Update.
5588 * mem-break.c: Update.
5589 * nto-low.c: Update.
5590 * remote-utils.c: Update.
5591 * server.c: Update.
5592 * spu-low.c: Update.
5593 * target.c: Update.
5594 * win32-low.c: Update.
5595
5596 2018-07-03 Tom Tromey <tom@tromey.com>
5597
5598 * server.c: Update.
5599
5600 2018-07-03 Tom Tromey <tom@tromey.com>
5601
5602 * linux-low.c: Update.
5603
5604 2018-07-03 Tom Tromey <tom@tromey.com>
5605
5606 * target.c: Update.
5607
5608 2018-07-03 Tom Tromey <tom@tromey.com>
5609
5610 * linux-low.c: Update.
5611 * linux-mips-low.c: Update.
5612 * lynx-low.c: Update.
5613 * nto-low.c: Update.
5614 * remote-utils.c: Update.
5615 * server.c: Update.
5616 * spu-low.c: Update.
5617 * target.c: Update.
5618 * thread-db.c: Update.
5619
5620 2018-07-03 Tom Tromey <tom@tromey.com>
5621
5622 * linux-low.c: Update.
5623 * linux-mips-low.c: Update.
5624 * lynx-low.c: Update.
5625 * mem-break.c: Update.
5626 * nto-low.c: Update.
5627 * remote-utils.c: Update.
5628 * server.c: Update.
5629 * spu-low.c: Update.
5630 * target.c: Update.
5631 * tracepoint.c: Update.
5632
5633 2018-07-03 Tom Tromey <tom@tromey.com>
5634
5635 * linux-low.c: Update.
5636 * linux-ppc-low.c: Update.
5637 * linux-x86-low.c: Update.
5638 * proc-service.c: Update.
5639 * server.c: Update.
5640 * spu-low.c: Update.
5641 * thread-db.c: Update.
5642 * win32-low.c: Update.
5643
5644 2018-07-03 Tom Tromey <tom@tromey.com>
5645
5646 * linux-low.c: Update.
5647 * lynx-low.c: Update.
5648 * nto-low.c: Update.
5649 * remote-utils.c: Update.
5650 * spu-low.c: Update.
5651 * thread-db.c: Update.
5652 * win32-low.c: Update.
5653
5654 2018-06-29 Joel Brobecker <brobecker@adacore.com>
5655
5656 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
5657 parameter in call to 'amd64_create_target_description'.
5658
5659 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5660
5661 * x86-tdesc.h: Remove executable permission flag.
5662
5663 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5664
5665 * configure.ac: Remove AC_PREREQ, add missing quoting.
5666 * configure: Re-generate.
5667 * config.in: Re-generate.
5668 * aclocal.m4: Re-generate.
5669
5670 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
5671
5672 * tracepoint.h (current_traceframe): Remove declaration.
5673
5674 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5675
5676 * linux-aarch64-low.c (is_sve_tdesc): New function.
5677 (aarch64_sve_regs_copy_to_regcache): Likewise.
5678 (aarch64_sve_regs_copy_from_regcache): Likewise.
5679 (aarch64_regs_info): Add SVE checks.
5680 (initialize_low_arch): Initialize SVE.
5681
5682 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5683
5684 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
5685
5686 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5687
5688 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
5689 (initialize_low_tracepoint): Likewise
5690 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
5691 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
5692 param.
5693 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
5694 checks.
5695 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
5696
5697 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5698
5699 * server.h (PBUFSIZ): Increase size
5700
5701 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5702
5703 * regcache.c (regcache::raw_compare): New function.
5704 * regcache.h (regcache::raw_compare): New declaration.
5705
5706 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5707
5708 * regcache.c (new_register_cache): Use new.
5709 (free_register_cache): Use delete.
5710 (register_data): Use const.
5711 (supply_register): Move body inside regcache.
5712 (regcache::raw_supply): New override function.
5713 (collect_register): Move body inside regcache.
5714 (regcache::raw_collect): New override function.
5715 (regcache::get_register_status): New override function.
5716 * regcache.h (struct regcache): Inherit from reg_buffer_common.
5717
5718 2018-06-09 Tom Tromey <tom@tromey.com>
5719
5720 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
5721 declare queue.
5722 (event_queue): Use std::queue.
5723 (gdb_event_xfree): Remove.
5724 (initialize_event_loop, process_event, wait_for_event): Update.
5725
5726 2018-06-08 Stan Cox <scox@redhat.com>
5727
5728 * win32-low.c (win32_create_inferior): last_ptid and last_status
5729 moved to client_state.
5730
5731 2018-06-08 Pedro Alves <palves@redhat.com>
5732
5733 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
5734 common/common-exceptions.o, common/common-utils.o,
5735 common/errors.o, common/print-utils.o and utils.o.
5736 * gdbreplay.c: Include "common-defs.h" instead of the two
5737 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
5738 string.h or alloca.h.
5739 (perror_with_name): Delete.
5740 (remote_open): Use xstrdup instead of strdup.
5741 (main): Rename to ...
5742 (captured_main): ... this.
5743 (main): New.
5744
5745 2018-06-08 Tom Tromey <tom@tromey.com>
5746
5747 * linux-low.c (linux_low_read_btrace): Update.
5748
5749 2018-06-04 Stan Cox <scox@redhat.com>
5750
5751 * server.h (struct client_state): New.
5752 * server.c (cont_thread, general_thread, multi_process)
5753 (report_fork_events, report_vfork_events, report_exec_events)
5754 (report_thread_events, swbreak_feature, hwbreak_feature)
5755 (vCont_supported, disable_randomization, pass_signals)
5756 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
5757 Moved to client_state.
5758 * remote-utils.c (remote_debug, noack_mode)
5759 (transport_is_reliable): Moved to client_state.
5760 * tracepoint.c (current_traceframe): Moved to client_state.
5761
5762 Update all callers.
5763 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
5764 linux-low.c, remote-utils.h, target.c: Use client_state.
5765
5766 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5767
5768 * configure.srv: Add new c/h file.
5769
5770 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5771
5772 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
5773 null VQ.
5774
5775 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5776
5777 * gdb.arch/mips-fpregset-core.exp: New test.
5778 * gdb.arch/mips-fpregset-core.c: New test source.
5779
5780 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
5781
5782 PR server/23198
5783 * hostio.c (require_int): Do not report overflow for integers
5784 between 0xfffffff and 0x7fffffff.
5785
5786 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5787
5788 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
5789 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
5790 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
5791 functions.
5792 (the_low_target): Wire them.
5793
5794 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5795
5796 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
5797 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
5798 mode. Call collect_register_by_name with vscr using
5799 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
5800 (ppc_store_vrregset): Add and set vscr_offset variable as in
5801 ppc_fill_vrregset. Call supply_register_by_name with vscr using
5802 vscr_offset.
5803
5804 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5805
5806 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5807 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
5808 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
5809
5810 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5811
5812 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
5813 (ppc_store_vsxregset): Likewise.
5814 (ppc_fill_vrregset): Likewise.
5815 (ppc_store_vrregset): Likewise.
5816 (ppc_fill_evrregset): Likewise.
5817 (ppc_store_evrregset): Likewise.
5818 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
5819 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
5820 needed.
5821
5822 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5823
5824 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
5825 wordsize of the inferior. Call ppc_linux_target_wordsize.
5826
5827 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5828
5829 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
5830 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
5831 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
5832 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5833 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5834 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5835 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5836 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5837 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5838 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5839 (tdesc_powerpc_e500l): Remove.
5840 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
5841 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
5842 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
5843 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
5844 linux-ppc-tdesc.h.
5845 (ppc_arch_setup): Remove target description matching code. Fill a
5846 ppc_linux_features struct and call ppc_linux_match_description
5847 with it.
5848
5849 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5850
5851 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
5852 width of the requested register exceeds the width of the
5853 `ptrace' data type.
5854 (mips_cannot_store_register): Likewise.
5855
5856 2018-05-21 Maciej W. Rozycki <macro@mips.com>
5857
5858 * linux-mips-low.c (mips_fetch_register): New function. Update
5859 preceding comment.
5860 (mips_store_gregset): Supply 0 rather than $restart for $zero.
5861 (the_low_target): Wire `mips_fetch_register'.
5862
5863 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5864
5865 * lynx-i386-low.c (LYNXOS_178): New macro.
5866 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
5867 the layout on LynxOS-178.
5868 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
5869 handle floating point registers that are not supported by
5870 LynxOS-178.
5871
5872 2018-05-10 Tom Tromey <tom@tromey.com>
5873
5874 * configure: Rebuild.
5875
5876 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5877
5878 PR server/23158:
5879 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
5880 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
5881 Use it to set the expedite_regs field in the given tdesc.
5882 * x86-tdesc.h: New file.
5883 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
5884 Adjust following the addition of the new expedite_regs parameter
5885 to init_target_desc.
5886 * linux-tic6x-low.c (tic6x_read_description): Likewise.
5887 * linux-x86-tdesc.c: #include "x86-tdesc.h".
5888 (i386_linux_read_description, amd64_linux_read_description):
5889 Adjust following the addition of the new expedite_regs parameter
5890 to init_target_desc.
5891 * lynx-i386-low.c: #include "x86-tdesc.h".
5892 (lynx_i386_arch_setup): Adjust following the addition of the new
5893 expedite_regs parameter to init_target_desc.
5894 * nto-x86-low.c: #include "x86-tdesc.h".
5895 (nto_x86_arch_setup): Adjust following the addition of the new
5896 expedite_regs parameter to init_target_desc.
5897 * win32-i386-low.c: #include "x86-tdesc.h".
5898 (i386_arch_setup): Adjust following the addition of the new
5899 expedite_regs parameter to init_target_desc.
5900
5901 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5902
5903 PR server/23158:
5904 * win32-low.c (win32_create_inferior): Add call to my_wait
5905 setting last_status global.
5906
5907 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5908
5909 PR server/23158:
5910 * win32-low.c (create_process): Only call gdb_tilde_expand if
5911 inferior_cwd is not NULL.
5912
5913 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5914
5915 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
5916 registers to the cache if their values have changed.
5917 (i387_xsave_to_cache): Provide default values for x87 control
5918 registers when these features are available, but disabled.
5919 * regcache.c (supply_register_by_name_zeroed): New function.
5920 * regcache.h (supply_register_by_name_zeroed): Declare new
5921 function.
5922
5923 2018-05-07 Tom Tromey <tom@tromey.com>
5924
5925 * configure: Rebuild.
5926
5927 2018-05-04 Tom Tromey <tom@tromey.com>
5928
5929 * configure: Rebuild.
5930
5931 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5932 Pedro Alves <palves@redhat.com>
5933
5934 * linux-aarch64-low.c (aarch64_stopped_data_address):
5935 Likewise.
5936
5937 2018-04-27 Tom Tromey <tom@tromey.com>
5938
5939 * configure: Rebuild.
5940
5941 2018-04-23 Tom Tromey <tom@tromey.com>
5942
5943 * configure: Rebuild.
5944
5945 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
5946
5947 * Makefile.in (depcomp): Add "..".
5948 (all_deps_files): New and use it.
5949
5950 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5951
5952 * configure.srv (aarch64*-*-linux*): Don't include xml.
5953 (i[34567]86-*-cygwin*): Likewise.
5954 (i[34567]86-*-linux*): Likewise.
5955 (i[34567]86-*-lynxos*): Likewise.
5956 (i[34567]86-*-mingw32ce*): Likewise.
5957 (i[34567]86-*-mingw*): Likewise.
5958 (i[34567]86-*-nto*): Likewise.
5959 (tic6x-*-uclinux): Likewise.
5960 (x86_64-*-linux*): Likewise.
5961 (x86_64-*-mingw*): Likewise.
5962 (x86_64-*-cygwin*): Likewise.
5963
5964 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5965
5966 * tdesc.c: Remove xml parameter.
5967
5968 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5969
5970 * server.c (get_features_xml): Remove cast.
5971 * tdesc.c (void target_desc::accept): Fill in function.
5972 (tdesc_get_features_xml): Remove old xml creation.
5973 (print_xml_feature::visit_pre): Add xml vistor.
5974 * tdesc.h (struct target_desc): Make xmltarget mutable.
5975 (tdesc_get_features_xml): Remove declaration.
5976
5977 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5978
5979 * tdesc.c (tdesc_architecture_name): Add new function.
5980 (tdesc_osabi_name): Likewise.
5981 (tdesc_get_features_xml): Use new functions.
5982
5983 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5984
5985 * tdesc.c (tdesc_create_flags): Remove.
5986 (tdesc_add_flag): Likewise.
5987 (tdesc_named_type): Likewise.
5988 (tdesc_create_union): Likewise.
5989 (tdesc_create_struct): Likewise.
5990 (tdesc_create_vector): Likewise.
5991 (tdesc_add_bitfield): Likewise.
5992 (tdesc_add_field): Likewise.
5993 (tdesc_set_struct_size): Likewise.
5994
5995 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5996
5997 * tdesc.c (~target_desc): Remove implictly deleted items.
5998 (init_target_desc): Iterate all features.
5999 (tdesc_get_features_xml): Use vector.
6000 (tdesc_create_feature): Create feature.
6001 * tdesc.h (tdesc_feature) Remove
6002 (target_desc): Add features.
6003
6004 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6005
6006 * Makefile.in: Add common/tdesc.c
6007 * tdesc.c (init_target_desc): init all reg_defs from register
6008 vector.
6009 (tdesc_create_reg): Create tdesc_reg.
6010 * tdesc.h (tdesc_feature): Add register vector.
6011
6012 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6013
6014 * tdesc.h (struct target_desc) <features>: Change type to
6015 std::vector<std::string>.
6016 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
6017 changes.
6018 (tdesc_get_features_xml): Likewise.
6019 (tdesc_create_feature): Likewise.
6020
6021 2018-03-26 Alan Hayward <alan.hayward@arm.com>
6022
6023 * regcache.c (find_register_by_number): Return a ref.
6024 (find_regno): Use references.
6025 (register_size): Likewise.
6026 (register_data): Likewise.
6027 * tdesc.c (target_desc::~target_desc): Remove free calls.
6028 (target_desc::operator==): Use std::vector compare.
6029 (init_target_desc): Use reference.
6030 (tdesc_create_reg): Use reg constructors.
6031 * tdesc.h (struct target_desc): Replace pointer with object.
6032
6033 2018-03-23 Alan Hayward <alan.hayward@arm.com>
6034
6035 * regcache.c (find_register_by_number): Make static.
6036 (find_regno): Use find_register_by_number
6037 * regcache.h (struct reg): Remove declaration.
6038
6039 2018-03-23 Alan Hayward <alan.hayward@arm.com>
6040
6041 * tdesc.c (target_desc::~target_desc): Move to here.
6042 (target_desc::operator==): Likewise.
6043 * tdesc.h (target_desc::~target_desc): Move from here.
6044 (target_desc::operator==): Likewise.
6045
6046 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
6047
6048 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
6049
6050 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6051
6052 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
6053 S390_TDESC_GS.
6054 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
6055 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
6056 and init_registers_s390_gs_linux64.
6057
6058 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6059
6060 * linux-s390-low.c (s390_fill_gs): Remove function.
6061 (s390_fill_gsbc): Remove function.
6062 (s390_regsets): Set fill functions for the guarded storage regsets
6063 to NULL.
6064
6065 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6066
6067 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
6068 the word size. Add comment.
6069 (s390_get_wordsize): New function.
6070 (s390_arch_setup): No longer select a temporary tdesc to fetch the
6071 pswm with it. Instead, use s390_get_wordsize to determine the
6072 word size first and derive the correct tdesc from that directly.
6073
6074 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
6075
6076 * Makefile.in: Include silent-rules.mk.
6077 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
6078 (COMPILE): Add ECHO_CXX.
6079 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
6080 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
6081 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
6082 (version-generated.c): Add ECHO_GEN.
6083 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
6084 (IPAGENT_COMPILE): Add ECHO_CXX.
6085 (%-generated.c): Add ECHO_REGDAT.
6086
6087 2018-03-14 Tom Tromey <tom@tromey.com>
6088
6089 PR cli/14977:
6090 * ax.c (ax_printf): Special case for NULL.
6091
6092 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6093
6094 * linux-low.c (linux_qxfer_libraries_svr4): Use
6095 xml_escape_text_append.
6096
6097 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6098
6099 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
6100
6101 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6102
6103 * server.c (handle_general_set): Remove unnecessary xstrdup.
6104
6105 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6106
6107 * server.c (parse_debug_format_options): Adjust to
6108 delim_string_to_char_ptr_vec changes.
6109 * thread-db.c (thread_db_load_search): Adjust to
6110 dirnames_to_char_ptr_vec changes.
6111
6112 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
6113
6114 * target.h (target_enable_btrace, target_disable_btrace)
6115 (target_read_btrace, target_read_btrace_conf): Turn macro into
6116 inline function. Throw error if target method is not defined.
6117 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
6118 check for btrace target method. Be prepared to handle exceptions
6119 from btrace target methods.
6120
6121 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6122
6123 * server.c (captured_main): Change order of error message printed
6124 when the current working directory cannot be found.
6125
6126 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6127
6128 * server.c: Include "filenames.h" and "pathstuff.h".
6129 (program_name): Delete variable.
6130 (program_path): New anonymous class.
6131 (get_exec_wrapper): Use "program_path" instead of
6132 "program_name".
6133 (handle_v_run): Likewise.
6134 (captured_main): Likewise.
6135 (process_serial_event): Likewise.
6136
6137 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6138
6139 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
6140 (OBJS): Add "pathstuff.o".
6141 * server.c (current_directory): New global variable.
6142 (captured_main): Initialize "current_directory".
6143
6144 2018-02-26 Alan Hayward <alan.hayward@arm.com>
6145
6146 * tdesc.c: Use common/tdesc.h.
6147 * tdesc.h: Likewise.
6148
6149 2018-02-20 Alan Hayward <alan.hayward@arm.com>
6150 Simon Marchi <simon.marchi@ericsson.com>
6151
6152 * Makefile.in: Switch order of make rules.
6153
6154 2018-02-19 Alan Hayward <alan.hayward@arm.com>
6155
6156 * Makefile.in: Add common directory in build.
6157 * configure.ac: Add common reference.
6158 * configure: Regenerate.
6159
6160 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6161
6162 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
6163 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
6164 * spu-low.c (spu_target_ops): Likewise.
6165 * win32-low.c (win32_target_ops): Likewise.
6166 * server.c (supported_btrace_packets): Report packets unconditionally.
6167 * target.h (target_ops) <supports_btrace>: Remove.
6168 (target_supports_btrace): Remove.
6169
6170 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6171
6172 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
6173 (handle_btrace_disable): Change return type to void. Use exceptions
6174 to report errors.
6175 (handle_btrace_general_set): Catch exception and copy message to
6176 return message.
6177
6178 2018-02-08 Tom Tromey <tom@tromey.com>
6179
6180 * linux-low.c (install_software_single_step_breakpoints): Use
6181 make_scoped_restore.
6182 * inferiors.c (make_cleanup_restore_current_thread): Remove.
6183 (do_restore_current_thread_cleanup): Remove.
6184 * gdbthread.h (make_cleanup_restore_current_thread): Don't
6185 declare.
6186
6187 2018-02-08 Tom Tromey <tom@tromey.com>
6188
6189 * mem-break.c (set_raw_breakpoint_at): Use
6190 gdb::unique_xmalloc_ptr.
6191
6192 2018-01-30 Pedro Alves <palves@redhat.com>
6193
6194 PR gdb/13211
6195 * target.c (target_terminal::terminal_state): Rename to ...
6196 (target_terminal::m_terminal_state): ... this.
6197
6198 2018-01-19 James Clarke <jrtc27@jrtc27.com>
6199
6200 * linux-low.c (handle_extended_wait): Surround call to
6201 thread_db_notice_clone with #ifdef USE_THREAD_DB.
6202
6203 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
6204
6205 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
6206 linux_ptrace_attach_fail_reason_string now returning an
6207 std::string.
6208 (linux_attach): Likewise.
6209 * thread-db.c (attach_thread): Likewise.
6210
6211 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
6212
6213 PR gdb/21559
6214 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
6215 checking for fs_base/gs_base fields in struct user_regs_struct.
6216 * configure: Regenerate.
6217
6218 2018-01-16 Yao Qi <yao.qi@linaro.org>
6219
6220 PR gdb/18749
6221 * linux-low.c (fetch_register): Call supply_register instead of
6222 error.
6223
6224 2018-01-08 Yao Qi <yao.qi@linaro.org>
6225 Simon Marchi <simon.marchi@ericsson.com>
6226
6227 * Makefile.in (OBS): Remove selftest.o.
6228 * configure.ac: Set srv_selftest_objs if $development is true.
6229 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
6230 * configure: Re-generated.
6231 * server.c (captured_main): Wrap variable selftest_filter with
6232 GDB_SELF_TEST.
6233
6234 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6235
6236 * server.c (parse_debug_format_options): Return std::string.
6237 (handle_monitor_command, captured_main): Adjust.
6238
6239 2018-01-05 Pedro Alves <palves@redhat.com>
6240
6241 PR gdb/18653
6242 * server.c (captured_main): Pass quiet=false to
6243 save_original_signals_state.
6244
6245 2018-01-01 Joel Brobecker <brobecker@adacore.com>
6246
6247 * gdbreplay.c (gdbreplay_version): Update copyright year in
6248 version message.
6249 * server.c (gdbserver_version): Likewise.
6250
6251 2017-12-08 Tom Tromey <tom@tromey.com>
6252
6253 * ax.c (ax_printf): Update.
6254
6255 2017-12-07 Yao Qi <yao.qi@linaro.org>
6256
6257 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
6258 aarch64_linux_read_description.
6259 * linux-amd64-ipa.c (idx2mask): New array.
6260 (get_ipa_tdesc): Move idx2mask out.
6261 (initialize_low_tracepoint): Initialize target descriptions.
6262 * linux-i386-ipa.c (idx2mask): New array.
6263 (get_ipa_tdesc): Move idx2mask out.
6264 (initialize_low_tracepoint): Initialize target descriptions.
6265
6266 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
6267
6268 * tdesc.c (struct tdesc_type): Change return type.
6269 (tdesc_add_flag): Change parameter type.
6270 (tdesc_add_bitfield): Likewise.
6271 (tdesc_add_field): Likewise.
6272 (tdesc_set_struct_size): Likewise.
6273
6274 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
6275
6276 * regcache.c (registers_to_string): Remove unused variable.
6277
6278 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6279
6280 * inferiors.c (for_each_inferior_with_data): Remove.
6281 * inferiors.h (for_each_inferior_with_data): Remove.
6282 * server.c (handle_qxfer_threads_worker): Change parameter type.
6283 (handle_qxfer_threads_proper): Use for_each_thread.
6284
6285 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6286
6287 * inferiors.c (for_each_inferior): Remove.
6288 (clear_inferiors): Use for_each_thread.
6289 * inferiors.h (for_each_inferior): Remove.
6290 * linux-low.c (linux_wait_for_event_filtered): Use
6291 for_each_thread.
6292 (linux_stabilize_threads): Likewise.
6293 * regcache.c (regcache_release): Likewise.
6294 * server.c (gdb_wants_all_threads_stopped): Likewise.
6295 (clear_pending_status_callback): Remove.
6296 (handle_status): Use for_each_thread.
6297 (captured_main): Likewise.
6298 * win32-low.c (child_init_thread_list): Likewise.
6299 (win32_clear_inferiors): Likewise.
6300 (fake_breakpoint_event): Likewise.
6301
6302 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6303
6304 * inferiors.h (find_inferior): Remove.
6305 * inferiors.c (find_inferior): Remove.
6306
6307 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6308
6309 * linux-low.c (resume_status_pending_p): Update comment.
6310 (need_step_over_p): Update comment.
6311
6312 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6313
6314 * linux-low.c (proceed_one_lwp): Return void, change parameter
6315 type.
6316 (unsuspend_and_proceed_one_lwp): Likewise.
6317 (proceed_all_lwps): Use for_each_thread.
6318 (unstop_all_lwps): Likewise.
6319
6320 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6321
6322 * linux-low.c (linux_resume_one_thread): Return void, take
6323 parameter directly.
6324 (linux_resume): Use for_each_thread.
6325
6326 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6327
6328 * linux-low.c (send_sigstop_callback): Return void, change
6329 parameter type. Rename to...
6330 (send_sigstop): ... this.
6331 (suspend_and_send_sigstop_callback): Return void, change parameter
6332 type. Rename to...
6333 (suspend_and_send_sigstop): ... this.
6334 (stop_all_lwps): Use for_each_thread.
6335
6336 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6337
6338 * linux-low.c (lwp_running): Return bool, remove unused
6339 argument.
6340 (linux_stabilize_threads): Use find_thread.
6341
6342 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6343
6344 * linux-low.c (select_singlestep_lwp_callback): Remove.
6345 (count_events_callback): Remove.
6346 (select_event_lwp_callback): Remove.
6347 (select_event_lwp): Use find_thread/for_each_thread.
6348
6349 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6350
6351 * linux-low.c (not_stopped_callback): Return bool, take filter
6352 argument directly.
6353 (linux_wait_for_event_filtered): Use find_thread.
6354 (linux_wait_1): Likewise.
6355
6356 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6357
6358 * linux-low.c (same_lwp): Remove.
6359 (find_lwp_pid): Use find_thread.
6360
6361 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6362
6363 * linux-low.c (delete_lwp_callback): Remove.
6364 (linux_mourn): Use for_each_thread.
6365
6366 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6367
6368 * linux-low.c (linux_detach_lwp_callback): Return void, remove
6369 args parameter, don't check for pid.
6370 (linux_detach): Use for_each_thread.
6371
6372 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6373
6374 * linux-low.c (struct counter): Remove.
6375 (second_thread_of_pid_p): Remove.
6376 (last_thread_of_process_p): Use find_thread.
6377
6378 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6379
6380 * inferiors.c (find_inferior_in_random): Remove.
6381 * inferiors.h (find_inferior_in_random): Remove.
6382 * linux-low.c (status_pending_p_callback): Return bool, accept
6383 parameter ptid directly.
6384 (linux_wait_for_event_filtered): Use find_thread_in_random.
6385 (linux_wait_1): Likewise.
6386
6387 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6388
6389 * inferiors.c (find_inferior_id): Remove.
6390 (find_thread_ptid): Move implemention from find_inferior_id to
6391 here.
6392 * inferiors.h (find_inferior_id): Remove.
6393 * server.c (handle_status): Use find_thread_ptid.
6394 (process_serial_event): Likewise.
6395 * thread-db.c (find_one_thread): Likewise.
6396 (thread_db_thread_handle): Likewise.
6397 * win32-low.c (thread_rec): Likewise.
6398 (child_delete_thread): Likewise.
6399 (win32_thread_alive): Likewise.
6400 (get_child_debug_event): Likewise.
6401
6402 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6403
6404 * linux-mips-low.c (update_watch_registers_callback): Return
6405 void, remove pid_p parameter, don't check for pid.
6406 (mips_insert_point, mips_remove_point): Use for_each_thread.
6407
6408 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6409
6410 * lynx.low (lynx_delete_thread_callback): Remove.
6411 (lynx_mourn): Use for_each_thread.
6412
6413 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6414
6415 * regcache.c (regcache_invalidate_one): Remove.
6416 (regcache_invalidate_pid): use for_each_thread.
6417
6418 2017-11-26 Tom Tromey <tom@tromey.com>
6419
6420 * linux-low.c (linux_create_inferior): Update.
6421
6422 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
6423
6424 * spu-low.c (spu_create_inferior): Fix typo in argument name.
6425
6426 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6427
6428 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
6429 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6430 * linux-aarch64-tdesc-selftest.c: New file.
6431 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6432
6433 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6434
6435 * configure.srv: Add new file.
6436 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6437 * linux-aarch64-tdesc-selftest.c: New file.
6438 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6439
6440 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6441
6442 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
6443 * linux-aarch64-low.c (initialize_low_arch): Remove init.
6444 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
6445
6446 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6447
6448 * configure.srv: Add new files.
6449 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
6450 aarch64_linux_read_description.
6451 * linux-aarch64-low.c (aarch64_linux_read_description):
6452 Merge with aarch64_arch_setup.
6453 (aarch64_arch_setup): Call aarch64_linux_read_description.
6454 * linux-aarch64-tdesc.c: New file.
6455 * linux-aarch64-tdesc.h: New file.
6456
6457 2017-11-24 Yao Qi <yao.qi@linaro.org>
6458
6459 * configure.srv: Set $srv_regobj for tic6x-linux.
6460 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
6461 (tic6x_read_description): Move some code to tic6x_arch_setup.
6462 (tic6x_tdesc_test): New function.
6463 (initialize_low_arch): Call selftests::register_test.
6464
6465 2017-11-22 Yao Qi <yao.qi@linaro.org>
6466
6467 * remote-utils.c (prepare_resume_reply): Use memcpy.
6468
6469 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6470
6471 * linux-low.c (kill_one_lwp_callback): Return void, take
6472 argument directly, don't filter on pid.
6473 (linux_kill): Use for_each_thread.
6474
6475 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6476
6477 * linux-low.c (need_step_over_p): Return bool, remove dummy
6478 argument.
6479 (linux_resume, proceed_all_lwps): Use find_thread.
6480
6481 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6482
6483 * linux-low.c (resume_status_pending_p): Return bool, remove
6484 flag_p argument.
6485 (linux_resume): Use find_thread.
6486
6487 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6488
6489 * linux-low.c (struct thread_resume_array): Remove.
6490 (linux_set_resume_request): Return void, take arguments
6491 directly.
6492 (linux_resume): Use for_each_thread.
6493
6494 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6495
6496 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
6497 return bool, remove data argument.
6498 (linux_stabilize_threads): Use find_thread.
6499
6500 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6501
6502 * linux-low.c (unsuspend_one_lwp): Remove.
6503 (unsuspend_all_lwps): Use for_each_thread, inline code from
6504 unsuspend_one_lwp.
6505
6506 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6507
6508 * gdbthread.h (find_thread): Add overload with ptid_t filter.
6509 * linux-low.c (struct iterate_over_lwps_args): Remove.
6510 (iterate_over_lwps_filter): Remove.
6511 (iterate_over_lwps): Use find_thread.
6512
6513 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6514
6515 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
6516 (linux_handle_new_gdb_connection): Use for_each_thread, inline
6517 code from reset_lwp_ptrace_options_callback.
6518
6519 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6520
6521 * linux-arm-low.c (struct update_registers_data): Remove.
6522 (update_registers_callback): Return void, take arguments
6523 directly, don't check thread's pid.
6524 (arm_insert_point, arm_remove_point): Use for_each_thread.
6525
6526 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6527
6528 * win32-low.c (continue_one_thread): Return void, take argument
6529 directly.
6530 (child_continue): Use for_each_thread.
6531
6532 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6533
6534 * win32-i386-low.c (update_debug_registers_callback): Rename
6535 to ...
6536 (update_debug_registers): ... this, return void, remove pid_p arg.
6537 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
6538
6539 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6540
6541 * inferiors.h (struct process_info): Add constructor, initialize
6542 fields..
6543 <syscalls_to_catch>: Change type to std::vector<int>.
6544 * inferiors.c (add_process): Allocate process_info with new.
6545 (remove_process): Free process_info with delete.
6546 * linux-low.c (handle_extended_wait): Adjust.
6547 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
6548 * server.c (handle_general_set): Adjust.
6549
6550 2017-11-16 Pedro Alves <palves@redhat.com>
6551
6552 * remote-utils.c (remote_close): Block SIGIO signals instead of
6553 uninstalling the SIGIO handler.
6554
6555 2017-11-16 Alan Hayward <alan.hayward@arm.com>
6556
6557 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
6558
6559 2017-11-16 Yao Qi <yao.qi@linaro.org>
6560
6561 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
6562 (tic6x_store_gregset): Likewise.
6563 (tic6x_usrregs_info): Move it up.
6564
6565 2017-11-15 Alan Hayward <alan.hayward@arm.com>
6566
6567 * Makefile.in: Update arch rules.
6568 * configure.srv: Explicitly mark arch/ files.
6569
6570 2017-11-13 Andreas Schwab <schwab@suse.de>
6571
6572 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
6573 function.
6574 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6575
6576 2017-11-06 Pedro Alves <palves@redhat.com>
6577
6578 * config.in, configure: Regenerate.
6579
6580 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6581
6582 * target.c (struct thread_search): Remove.
6583 (thread_search_callback): Remove.
6584 (prepare_to_access_memory): Use for_each_thread instead of
6585 find_inferior. Inline code from thread_search_callback.
6586
6587 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6588
6589 * server.c (struct visit_actioned_threads_data): Remove.
6590 (visit_actioned_threads): Change prototype to take arguments
6591 directly.
6592 (resume): Use find_thread instead of find_inferior.
6593
6594 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6595
6596 * server.c (queue_stop_reply_callback): Change prototype, return
6597 void.
6598 (find_status_pending_thread_callback): Remove.
6599 (handle_status): Replace find_inferior with find_thread and
6600 for_each_thread.
6601
6602 2017-10-25 Alan Hayward <alan.hayward@arm.com>
6603
6604 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
6605 with REGNO.
6606 (aarch64_store_gregset): Likewise.
6607 (aarch64_fill_fpregset): Likewise.
6608 (aarch64_store_fpregset): Likewise.
6609
6610 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
6611
6612 * gdbthread.h (find_thread, for_each_thread): New functions.
6613 * inferiors.c (thread_of_pid): Remove.
6614 (find_any_thread_of_pid): Use find_thread.
6615 * linux-low.c (num_lwps): Use for_each_thread.
6616
6617 2017-10-17 Yao Qi <yao.qi@linaro.org>
6618
6619 * Makefile.in: Remove one rule.
6620 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
6621
6622 2017-10-17 Yao Qi <yao.qi@linaro.org>
6623
6624 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
6625 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
6626
6627 2017-10-17 Yao Qi <yao.qi@linaro.org>
6628
6629 * configure.srv: Rename arm.o with arch/arm.o.
6630
6631 2017-10-17 Yao Qi <yao.qi@linaro.org>
6632
6633 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
6634 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
6635 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
6636 (arch-i386.o, arch-amd64.o): Remove rules.
6637 (arch/%.o): New rule.
6638 Update POSTCOMPILE and COMPILE.pre.
6639 * configure.ac: Invoke AC_CONFIG_COMMANDS.
6640 * configure: Re-generated.
6641 * configure.srv: Replace arch-i386.o with arch/i386.o.
6642 Replace arch-amd64.o with arch/amd64.o.
6643
6644 2017-10-16 Yao Qi <yao.qi@linaro.org>
6645
6646 * configure: Regenerated.
6647
6648 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6649
6650 * inferiors.h: (struct inferior_list): Remove.
6651 (struct inferior_list_entry); Remove.
6652 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
6653 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
6654 get_first_inferior): Remove.
6655 (for_each_inferior, for_each_inferior_with_data, find_inferior,
6656 find_inferior_id, find_inferior_in_random): Change signature.
6657 * inferiors.c (all_threads): Change type to
6658 std::list<thread_info *>.
6659 (get_thread): Remove macro.
6660 (find_inferior, find_inferior_id): Change signature, implement
6661 using find_thread.
6662 (find_inferior_in_random): Change signature, implement using
6663 find_thread_in_random.
6664 (for_each_inferior, for_each_inferior_with_data): Change
6665 signature, implement using for_each_thread.
6666 (add_inferior_to_list, remove_inferior): Remove.
6667 (add_thread, get_first_thread, thread_of_pid,
6668 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
6669 (get_first_inferior, one_inferior_p, clear_inferior_list):
6670 Remove.
6671 (clear_inferiors, get_thread_process): Update.
6672 * gdbthread.h: Include <list>.
6673 (struct thread_info) <entry>: Remove field.
6674 <id>: New field.
6675 (all_threads): Change type to std::list<thread_info *>.
6676 (get_first_inferior): Add doc.
6677 (find_thread, for_each_thread, find_thread_in_random): New
6678 functions.
6679 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
6680 * linux-arm-low.c (update_registers_callback): Update.
6681 * linux-low.c (second_thread_of_pid_p): Update.
6682 (kill_one_lwp_callback, linux_detach_lwp_callback,
6683 delete_lwp_callback, status_pending_p_callback, same_lwp,
6684 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
6685 iterate_over_lwps, not_stopped_callback,
6686 resume_stopped_resumed_lwps, count_events_callback,
6687 select_singlestep_lwp_callback, select_event_lwp_callback,
6688 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
6689 suspend_and_send_sigstop_callback, wait_for_sigstop,
6690 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
6691 lwp_running, linux_set_resume_request, resume_status_pending_p,
6692 need_step_over_p, start_step_over, linux_resume_one_thread,
6693 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
6694 reset_lwp_ptrace_options_callback): Update.
6695 * linux-mips-low.c (update_watch_registers_callback): Update.
6696 * regcache.c (regcache_invalidate_one, regcache_invalidate):
6697 Update.
6698 (free_register_cache_thread_one): Remove.
6699 (regcache_release): Update.
6700 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
6701 handle_qxfer_threads_worker): Update.
6702 (handle_query): Update, use list iterator.
6703 (visit_actioned_threads, handle_pending_status,
6704 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
6705 clear_pending_status_callback, set_pending_status_callback,
6706 find_status_pending_thread_callback, handle_status,
6707 process_serial_event): Update.
6708 * target.c (thread_search_callback): Update.
6709 * thread-db.c (thread_db_get_tls_address): Update.
6710 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
6711 Update.
6712 * win32-i386-low.c (update_debug_registers_callback): Update.
6713 * win32-low.c (delete_thread_info, child_delete_thread,
6714 continue_one_thread, suspend_one_thread,
6715 get_child_debug_event): Adjust.
6716
6717 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6718
6719 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
6720 * inferiors.h: Include <list>.
6721 (struct process_info) <entry>: Remove field.
6722 <pid>: New field.
6723 (pid_of): Change macro to function.
6724 (ptid_of, lwpid_of): Remove macro.
6725 (all_processes): Change type to std::list<process_info *>.
6726 (ALL_PROCESSES): Remove macro.
6727 (for_each_process, find_process): New function.
6728 * inferiors.c (all_processes): Change type to
6729 std::list<process_info *>.
6730 (find_thread_process): Adjust.
6731 (add_process): Likewise.
6732 (remove_process): Likewise.
6733 (find_process_pid): Likewise.
6734 (get_first_process): Likewise.
6735 (started_inferior_callback): Remove.
6736 (have_started_inferiors_p): Adjust.
6737 (attached_inferior_callback): Remove.
6738 (have_attached_inferiors_p): Adjust.
6739 * linux-low.c (check_zombie_leaders): Likewise.
6740 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
6741 (x86_linux_update_xmltarget): Adjust.
6742 * server.c (handle_query): Likewise.
6743 (gdb_reattached_process): Remove.
6744 (handle_status): Adjust.
6745 (kill_inferior_callback): Likewise.
6746 (detach_or_kill_inferior): Remove.
6747 (print_started_pid): Likewise.
6748 (print_attached_pid): Likewise.
6749 (detach_or_kill_for_exit): Update.
6750 (process_serial_event): Likewise.
6751 * linux-arm-low.c (arm_new_fork): Likewise.
6752
6753 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6754
6755 * dll.h: Include <list>.
6756 (struct dll_info): Add constructor.
6757 <entry>: Remove field.
6758 (all_dlls): Change type to std::list<dll_info>.
6759 * dll.c: Include <algorithm>.
6760 (get_dll): Remove macro.
6761 (all_dlls): Change type to std::list<dll_info *>.
6762 (free_one_dll): Remove.
6763 (match_dll): Likewise.
6764 (loaded_dll): Adjust.
6765 (unloaded_dll): Adjust to all_dlls type change, use
6766 std::find_if. Inline code from match_dll.
6767 (clear_dlls): Adjust to all_dlls type change.
6768 * server.c (emit_dll_description): Remove.
6769 (handle_qxfer_libraries): Adjust to all_dlls type change,
6770 integrate emit_dll_description's functionality.
6771
6772 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6773
6774 * linux-low.h (struct linux_target_ops) <delete_process>: New
6775 field.
6776 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
6777 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
6778 (struct linux_target_ops): Add delete_process callback.
6779 * linux-arm-low.c (arm_delete_process): New.
6780 (struct linux_target_ops): Add delete_process callback.
6781 * linux-bfin-low.c (struct linux_target_ops): Likewise.
6782 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
6783 * linux-m32r-low.c (struct linux_target_ops): Likewise.
6784 * linux-mips-low.c (mips_linux_delete_process): New.
6785 (struct linux_target_ops): Add delete_process callback.
6786 * linux-ppc-low.c (struct linux_target_ops): Likewise.
6787 * linux-s390-low.c (struct linux_target_ops): Likewise.
6788 * linux-sh-low.c (struct linux_target_ops): Likewise.
6789 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
6790 * linux-tile-low.c (struct linux_target_ops): Likewise.
6791 * linux-x86-low.c (x86_linux_delete_process): New.
6792 (struct linux_target_ops): Add delete_process callback.
6793 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
6794
6795 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6796
6797 * linux-aarch64-low.c (the_low_target): Add thread delete
6798 callback.
6799 * linux-arm-low.c (arm_delete_thread): New function.
6800 (the_low_target): Add thread delete callback.
6801 * linux-bfin-low.c (the_low_target): Likewise.
6802 * linux-crisv32-low.c (the_low_target): Likewise.
6803 * linux-low.c (delete_lwp): Invoke delete_thread callback if
6804 set.
6805 * linux-low.h (struct linux_target_ops) <delete_thread>: New
6806 field.
6807 * linux-m32r-low.c (the_low_target): Add thread delete callback.
6808 * linux-mips-low.c (mips_linux_delete_thread): New function.
6809 (the_low_target): Add thread delete callback.
6810 * linux-ppc-low.c (the_low_target): Likewise.
6811 * linux-s390-low.c (the_low_target): Likewise.
6812 * linux-sh-low.c (the_low_target): Likewise.
6813 * linux-tic6x-low.c (the_low_target): Likewise.
6814 * linux-tile-low.c (the_low_target): Likewise.
6815 * linux-x86-low.c (the_low_target): Likewise.
6816 * linux-xtensa-low.c (the_low_target): Likewise.
6817
6818 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
6819
6820 * win32-low.c: Include "common-inferior.h".
6821
6822 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6823
6824 * inferiors.c (set_inferior_cwd): New function.
6825 * server.c (handle_general_set): Handle QSetWorkingDir packet.
6826 (handle_query): Inform that QSetWorkingDir is supported.
6827 * win32-low.c (create_process): Pass the inferior's cwd to
6828 CreateProcess.
6829
6830 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6831
6832 * inferiors.c (current_inferior_cwd): New global variable.
6833 (get_inferior_cwd): New function.
6834 * inferiors.h (struct process_info) <cwd>: New field.
6835
6836 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6837
6838 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
6839 (OBS): Add gdb_tilde_expand.o.
6840
6841 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
6842
6843 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
6844 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
6845
6846 2017-09-29 Pedro Alves <palves@redhat.com>
6847
6848 * ax.c (gdb_parse_agent_expr): Constify.
6849 * ax.h (gdb_parse_agent_expr): Constify.
6850 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6851 Constify.
6852 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
6853 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
6854 * remote-utils.h (read_ptid): Constify.
6855 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
6856 (process_point_options, process_serial_event): Constify.
6857 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
6858 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
6859 (cmd_qtbuffer): Constify.
6860
6861 2017-09-29 Pedro Alves <palves@redhat.com>
6862
6863 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
6864 fails.
6865
6866 2017-09-29 Pedro Alves <palves@redhat.com>
6867
6868 * linux-low.c (handle_extended_wait): Pass parent thread instead
6869 of process to thread_db_notice_clone.
6870 * linux-low.h (thread_db_notice_clone): Replace parent process
6871 parameter with parent thread parameter.
6872 * thread-db.c (find_one_thread): Add comment.
6873 (thread_db_notice_clone): Replace parent process parameter with
6874 parent thread parameter. Temporarily switch to the parent thread.
6875
6876 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
6877
6878 * gdbthread.h: Include "common-gdbthread.h".
6879 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
6880 "if" when validating the ptid.
6881 * remote-utils.c: Include "gdbthread.h".
6882 (prepare_resume_reply): Use "switch_to_thread".
6883 * target.c (done_accessing_memory): Likewise.
6884
6885 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6886
6887 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
6888 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
6889 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
6890 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
6891 s390x-gs-linux64-ipa.o to ipa_obj.
6892 * linux-s390-low.c (HWCAP_S390_GS): New define.
6893 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
6894 New functions.
6895 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
6896 (s390_arch_setup): Check for guarded-storage support and choose
6897 appropriate tdesc.
6898 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
6899 init_registers_s390x_gs_linux64.
6900 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
6901 enum value.
6902 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
6903 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
6904
6905 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
6906
6907 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
6908
6909 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6910
6911 * linux-low.h (struct lwp_info): Add new field, thread_handle.
6912 (thread_db_thread_handle): Declare.
6913 * linux-low.c (linux_target_ops): Initialize thread_handle.
6914 * server.c (handle_qxfer_threads_worker): Add support for
6915 "handle" attribute.
6916 * target.h (struct target_ops): Add new function pointer,
6917 thread_handle.
6918 (target_thread_handle): Define.
6919 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
6920 field in lwp.
6921 (thread_db_thread_handle): New function.
6922
6923 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6924
6925 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
6926 * linux-low.h (thread_db_notice_clone): Declare.
6927 * thread-db.c (thread_db_notice_clone): New function.
6928
6929 2017-09-21 Pedro Alves <palves@redhat.com>
6930
6931 * server.c (gdb_read_memory, handle_status, process_serial_event)
6932 (handle_serial_event, handle_target_event): Adjust to
6933 set_desired_thread prototype change.
6934 * target.c (set_desired_thread): Remove 'use_general' parameter
6935 and adjust.
6936 * target.h (set_desired_thread): Remove 'use_general' parameter.
6937
6938 2017-09-20 Tom Tromey <tom@tromey.com>
6939
6940 * target.c (target_terminal::terminal_state): Define.
6941 (target_terminal::init): Rename from target_terminal_init.
6942 (target_terminal::inferior): Rename from
6943 target_terminal_inferior.
6944 (target_terminal::ours): Rename from target_terminal_ours.
6945 (target_terminal::ours_for_output, target_terminal::info): New.
6946
6947 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6948
6949 * server.c (accumulate_file_name_length): Remove.
6950 (emit_dll_description): Adjust to std::string change.
6951 (handle_qxfer_libraries): Use std::string to hold document.
6952
6953 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6954
6955 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
6956 return type of xml_escape_text.
6957 * server.c (emit_dll_description): Likewise.
6958
6959 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
6960
6961 * server.c (captured_main): Accept argument for --selftest.
6962 Update run_tests call.
6963 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
6964 when registering selftests.
6965
6966 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
6967
6968 * regcache.c (get_thread_regcache): Update code to use "std::vector"
6969 instead of "VEC" for "target_desc.reg_defs".
6970 (regcache_cpy): Likewise.
6971 (registers_to_string): Likewise.
6972 (registers_from_string): Likewise.
6973 (find_regno): Likewise.
6974 (supply_regblock): Likewise.
6975 (regcache_raw_read_unsigned): Likewise.
6976 * tdesc.c (init_target_desc): Likewise.
6977 (tdesc_create_reg): Likewise.
6978 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
6979 (struct target_desc) <reg_defs>: Convert to "std::vector".
6980 (target_desc): Do not initialize "reg_defs".
6981 (~target_desc): Update code to use "std::vector" instead of "VEC"
6982 for "target_desc.reg_defs".
6983 (operator==): Likewise.
6984
6985 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6986
6987 * inferiors.h (thread_to_gdb_id): Remove.
6988 * inferiors.c (thread_to_gdb_id): Remove.
6989 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
6990 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
6991 lynx_store_registers, lynx_read_memory, lynx_write_memory):
6992 Likewise.
6993 * nto-low.c (nto_fetch_registers, nto_store_registers,
6994 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
6995
6996 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
6997
6998 * inferiors.h (gdb_id_to_thread_id): Remove.
6999 * inferiors.c (gdb_id_to_thread_id): Remove.
7000 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
7001 removal. Move pid declaration closer to where it's used.
7002
7003 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7004
7005 * server.c (handle_detach): New function.
7006 (process_serial_event): Move code out, call handle_detach.
7007
7008 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7009
7010 * server.c (require_running): Rename to ...
7011 (require_running_or_return): ... this ...
7012 (require_running_or_break): ... and this.
7013 (handle_query, process_serial_event): Adjust.
7014
7015 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7016
7017 * linux-low.c (linux_set_resume_request): Remove unused
7018 variables.
7019
7020 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7021
7022 * server.c (first_thread_of): Remove.
7023 (process_serial_event): Replace usage of first_thread_of with
7024 find_any_thread_of_pid.
7025 * tracepoint.c (same_process_p): Remove.
7026 (gdb_agent_about_to_close): Replace usage of same_process_p with
7027 find_any_thread_of_pid.
7028 * linux-x86-low.c (same_process_callback): Remove.
7029 (x86_arch_setup_process_callback): Replace usage of
7030 same_process_callback with find_any_thread_of_pid.
7031 * thread-db.c (any_thread_of): Remove.
7032 (switch_to_process): Replace usage of any_thread_of with
7033 find_any_thread_of_pid.
7034 * inferiors.c (thread_pid_matches_callback): Remove.
7035 (find_thread_process): Adjust to use find_any_thread_of_pid.
7036
7037 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
7038
7039 * regcache.c (get_thread_regcache): Guard calls to "memset"
7040 with "!VEC_empty".
7041
7042 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
7043
7044 * linux-low.c (handle_extended_wait): Use
7045 "allocate_target_description" instead of "XNEW".
7046 * linux-x86-low.c (initialize_low_arch): Likewise.
7047
7048 2017-09-05 Yao Qi <yao.qi@linaro.org>
7049
7050 * configure.srv (srv_i386_regobj): Remove.
7051 (srv_amd64_regobj): Remove.
7052 (srv_regobj): Set it to "" for x86 non-linux targets.
7053 * linux-x86-tdesc.c (i386_linux_read_description):
7054 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
7055 (init_registers_i386): Remove the declaration.
7056 (tdesc_i386): Remove the declaration.
7057 (lynx_i386_arch_setup): Call i386_create_target_description.
7058 * nto-x86-low.c: Likewise.
7059 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
7060 [!__x86_64__]: include arch/i386.h.
7061 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
7062
7063 2017-09-05 Yao Qi <yao.qi@linaro.org>
7064
7065 * configure.srv (srv_amd64_linux_xmlfiles): Remove
7066 i386/amd64-XXX-linux from it.
7067
7068 2017-09-05 Yao Qi <yao.qi@linaro.org>
7069
7070 * configure.srv: Empty srv_amd64_linux_regobj if $development is
7071 false.
7072 (ipa_amd64_linux_regobj): Remove.
7073 (ipa_x32_linux_regobj): Remove.
7074
7075 2017-09-05 Yao Qi <yao.qi@linaro.org>
7076
7077 * Makefile.in (arch-amd64.o): New rule.
7078 * configure.srv: Append arch-amd64.o.
7079 * linux-amd64-ipa.c: Include common/x86-xstate.h.
7080 (get_ipa_tdesc): Call amd64_linux_read_description.
7081 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
7082 and init_registers_amd64_XXX.
7083 * linux-x86-low.c (x86_linux_read_description): Call
7084 amd64_linux_read_description.
7085 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
7086 (initialize_low_arch): Don't call init_registers_x32_XXX and
7087 init_registers_amd64_XXX.
7088 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
7089 and tdesc_amd64_XXX.
7090 [__x86_64__] (amd64_tdesc_test): New function.
7091 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
7092 and init_registers_amd64_XXX.
7093 * linux-x86-tdesc.c: Include arch/amd64.h.
7094 (xcr0_to_tdesc_idx): New function.
7095 (i386_linux_read_description): New function.
7096 (amd64_get_ipa_tdesc_idx): New function.
7097 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
7098 (amd64_get_ipa_tdesc): Declare.
7099
7100 2017-09-05 Yao Qi <yao.qi@linaro.org>
7101
7102 * configure.srv (srv_i386_linux_xmlfiles): Remove
7103 i386/i386-XXX-linux.xml from it.
7104
7105 2017-09-05 Yao Qi <yao.qi@linaro.org>
7106
7107 * configure.srv: Set srv_i386_linux_regobj empty if $development
7108 is false.
7109 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
7110 initialize_low_tdesc.
7111 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
7112 with #if initialize_low_tdesc.
7113 * linux-x86-tdesc-selftest.c: New file.
7114 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
7115
7116 2017-09-05 Yao Qi <yao.qi@linaro.org>
7117
7118 * Makefile.in (arch-i386.o): New rule.
7119 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
7120 (x86_64-*-linux*): Likewise.
7121 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
7122 include arch/i386.h.
7123 (i386_linux_read_description): Remove code and call
7124 i386_create_target_description.
7125 * tdesc.c (allocate_target_description): New function.
7126 * tdesc.h (set_tdesc_architecture): Remove declaration.
7127 (set_tdesc_osabi): Likewise.
7128
7129 2017-09-05 Yao Qi <yao.qi@linaro.org>
7130
7131 * linux-x86-tdesc.c: Don't include <inttypes.h>.
7132 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
7133 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
7134 .xmltarget.
7135 * server.c (get_features_xml): Call tdesc_get_features_xml.
7136 * tdesc.c (set_tdesc_architecture): New function.
7137 (set_tdesc_osabi): New function.
7138 (tdesc_get_features_xml): New function.
7139 (tdesc_create_feature): Add an argument.
7140 * tdesc.h (struct target_desc) <features>: New field.
7141 <arch, osabi>: New field.
7142 (~target_desc): xfree features, arch, and osabi.
7143 (target_desc::oerator==): Don't compare .xmltarget.
7144 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
7145 (set_tdesc_osabi): Likewise.
7146 (tdesc_get_features_xml): Likewise.
7147
7148 2017-09-05 Yao Qi <yao.qi@linaro.org>
7149
7150 * linux-x86-tdesc.c: Include selftest.h.
7151 (i386_tdesc_test): New function.
7152 (initialize_low_tdesc): Call selftests::register_test.
7153 * tdesc.h: Include regdef.h.
7154 (target_desc): Override operator == and !=.
7155
7156 2017-09-05 Yao Qi <yao.qi@linaro.org>
7157
7158 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
7159 (ipa_obj): Likewise.
7160 * linux-i386-ipa.c: Include common/x86-xstate.h
7161 (get_ipa_tdesc): Call i386_linux_read_description.
7162 (initialize_low_tracepoint): Don't call init_registers_XXX
7163 functions, call initialize_low_tdesc instead.
7164 * linux-x86-low.c (x86_linux_read_description): Call
7165 i386_linux_read_description.
7166 (initialize_low_arch): Don't call init_registers_i386_XXX
7167 functions, call initialize_low_tdesc.
7168 * linux-x86-tdesc.c: New file.
7169 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
7170 (i386_get_ipa_tdesc_idx): Declare.
7171 (i386_get_ipa_tdesc): Declare.
7172 (initialize_low_tdesc): Declare.
7173
7174 2017-09-05 Yao Qi <yao.qi@linaro.org>
7175
7176 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
7177 instead of 0.
7178
7179 2017-09-05 Yao Qi <yao.qi@linaro.org>
7180
7181 * Makefile.in (IPA_OBJS): Add vec-ipa.o
7182 * regcache.c (get_thread_regcache): Use VEC_length.
7183 (init_register_cache): Likewise.
7184 (regcache_cpy): Likewise.
7185 (registers_to_string): Iterate reg_defs via VEC_iterate.
7186 (find_regno): Likewise.
7187 (find_register_by_number): Use VEC_index.
7188 (register_size): Call find_register_by_number.
7189 (register_data): Call find_register_by_number.
7190 (supply_regblock): Use VEC_length.
7191 (regcache_raw_read_unsigned): Likewise.
7192 * tdesc.c (init_target_desc): Iterate reg_defs via
7193 VEC_iterate.
7194 (default_description): Update initializer.
7195 (copy_target_description): Don't update field num_registers.
7196 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
7197 <num_registers>: Remove.
7198
7199 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7200
7201 * Makefile.in (.SECONDARY): Define target.
7202
7203 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
7204
7205 * linux-low.c (linux_wait_1): Adjust.
7206 * server.c (queue_stop_reply_callback): Adjust.
7207
7208 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7209
7210 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
7211 QEnvironmentUnset and QEnvironmentReset packets.
7212 (handle_query): Inform remote that QEnvironmentHexEncoded,
7213 QEnvironmentUnset and QEnvironmentReset are supported.
7214
7215 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
7216
7217 * inferiors.h (inferior_target_data): Rename to ...
7218 (thread_target_data): ... this.
7219 (inferior_regcache_data): Rename to ...
7220 (thread_regcache_data): ... this.
7221 (set_inferior_regcache_data): Rename to ...
7222 (set_thread_regcache_data): ... this.
7223 * inferiors.c (inferior_target_data): Rename to ...
7224 (thread_target_data): ... this.
7225 (inferior_regcache_data): Rename to ...
7226 (thread_regcache_data): ... this.
7227 (set_inferior_regcache_data): Rename to ...
7228 (set_thread_regcache_data): ... this.
7229 (free_one_thread): Update.
7230 * linux-low.h (get_thread_lwp): Update.
7231 * regcache.c (get_thread_regcache): Update.
7232 (regcache_invalidate_thread): Update.
7233 (free_register_cache_thread): Update.
7234 * win32-i386-low.c (update_debug_registers_callback): Update.
7235 (win32_get_current_dr): Update.
7236 * win32-low.c (thread_rec): Update.
7237 (delete_thread_info): Update.
7238 (continue_one_thread): Update.
7239 (suspend_one_thread): Update.
7240
7241 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
7242
7243 * inferiors.c (set_inferior_target_data): Remove.
7244 * inferiors.h (set_inferior_target_data): Remove.
7245
7246 2017-08-18 Yao Qi <yao.qi@linaro.org>
7247
7248 * Makefile.in (OBS): Add selftest.o.
7249 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
7250 * configure, config.in: Re-generated.
7251 * server.c: Include common/sefltest.h.
7252 (captured_main): Handle option --selftest.
7253
7254 2017-08-09 Yao Qi <yao.qi@linaro.org>
7255
7256 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
7257 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
7258 i386-avx-mpx.o and i386-mmx.o.
7259 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
7260 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
7261 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
7262 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
7263 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
7264 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
7265 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
7266 i386/amd64-avx-mpx.xml.
7267
7268 2017-08-09 Yao Qi <yao.qi@linaro.org>
7269
7270 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
7271 and x32-avx-avx512.o.
7272 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
7273 i386/x32-avx-avx512.xml.
7274
7275 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
7276
7277 * tracepoint.h (enum class fast_tpoint_collect_result): New
7278 enumeration.
7279 (fast_tracepoint_collecting): Change return type to
7280 fast_tpoint_collect_result.
7281 * tracepoint.c (fast_tracepoint_collecting): Likewise.
7282 * linux-low.h: Include tracepoint.h.
7283 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
7284 fast_tpoint_collect_result.
7285 * linux-low.c (handle_tracepoints): Adjust.
7286 (linux_fast_tracepoint_collecting): Change return type to
7287 fast_tpoint_collect_result.
7288 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
7289 linux_wait_1, stuck_in_jump_pad_callback,
7290 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
7291 proceed_one_lwp): Adjust to type change.
7292
7293 2017-07-10 Yao Qi <yao.qi@linaro.org>
7294
7295 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
7296
7297 2017-06-29 Yao Qi <yao.qi@linaro.org>
7298
7299 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
7300 Remove.
7301 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
7302
7303 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
7304
7305 * Makefile.in (IPA_OBJS): Sort and format one item per line.
7306
7307 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
7308
7309 * linux-low.c (linux_create_inferior): Adjust code to access the
7310 environment information via 'gdb_environ' class.
7311 * lynx-low.c (lynx_create_inferior): Likewise.
7312 * server.c (our_environ): Make it an instance of 'gdb_environ'.
7313 (get_environ): Return a pointer to 'our_environ'.
7314 (captured_main): Initialize 'our_environ'.
7315 * server.h (get_environ): Adjust prototype.
7316 * spu-low.c (spu_create_inferior): Adjust code to access the
7317 environment information via 'gdb_environ' class.
7318
7319 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7320
7321 * linux-low.c (linux_read_memory, linux_write_memory): Remove
7322 usage of "register" keyword.
7323
7324 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7325
7326 * configure: Re-generate.
7327
7328 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7329
7330 * configure: Re-generate.
7331
7332 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7333
7334 * Makefile.in (COMPILE.pre): Add "-x c++".
7335
7336 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
7337
7338 * fork-child.c: Conditionally include <signal.h>.
7339
7340 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7341
7342 * server.c (handle_general_set): Handle new packet
7343 "QStartupWithShell".
7344 (handle_query): Add "QStartupWithShell" to the list of supported
7345 packets.
7346 (gdbserver_usage): Add help text explaining the
7347 new "--startup-with-shell" and "--no-startup-with-shell" CLI
7348 options.
7349 (captured_main): Recognize and act upon the presence of the new
7350 CLI options.
7351
7352 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7353 Pedro Alves <palves@redhat.com>
7354
7355 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
7356 * configure: Regenerate.
7357 * configure.srv (srv_linux_obj): Add "fork-child.o" and
7358 "fork-inferior.o".
7359 (i[34567]86-*-lynxos*): Likewise.
7360 (spu*-*-*): Likewise.
7361 * fork-child.c: New file.
7362 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
7363 and "environ.h".
7364 (linux_ptrace_fun): New function.
7365 (linux_create_inferior): Adjust function prototype to reflect
7366 change on "target.h". Adjust function code to use
7367 "fork_inferior".
7368 (linux_request_interrupt): Delete "signal_pid".
7369 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7370 (lynx_ptrace_fun): New function.
7371 (lynx_create_inferior): Adjust function prototype to reflect
7372 change on "target.h". Adjust function code to use
7373 "fork_inferior".
7374 * nto-low.c (nto_create_inferior): Adjust function prototype and
7375 code to reflect change on "target.h". Update comments.
7376 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
7377 "common-terminal.h" and "environ.h".
7378 (terminal_fd): Moved to fork-child.c.
7379 (old_foreground_pgrp): Likewise.
7380 (restore_old_foreground_pgrp): Likewise.
7381 (last_status): Make it global.
7382 (last_ptid): Likewise.
7383 (our_environ): New variable.
7384 (startup_with_shell): Likewise.
7385 (program_name): Likewise.
7386 (program_argv): Rename to...
7387 (program_args): ...this.
7388 (wrapper_argv): New variable.
7389 (start_inferior): Delete function.
7390 (get_exec_wrapper): New function.
7391 (get_exec_file): Likewise.
7392 (get_environ): Likewise.
7393 (prefork_hook): Likewise.
7394 (post_fork_inferior): Likewise.
7395 (postfork_hook): Likewise.
7396 (postfork_child_hook): Likewise.
7397 (handle_v_run): Update code to deal with arguments coming from the
7398 remote host. Update calls from "start_inferior" to
7399 "create_inferior".
7400 (captured_main): Likewise. Initialize environment variable. Call
7401 "have_job_control".
7402 * server.h (post_fork_inferior): New prototype.
7403 (get_environ): Likewise.
7404 (last_status): Declare.
7405 (last_ptid): Likewise.
7406 (signal_pid): Likewise.
7407 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7408 (spu_ptrace_fun): New function.
7409 (spu_create_inferior): Adjust function prototype to reflect change
7410 on "target.h". Adjust function code to use "fork_inferior".
7411 * target.c (target_terminal_init): New function.
7412 (target_terminal_inferior): Likewise.
7413 (target_terminal_ours): Likewise.
7414 * target.h: Include <vector>.
7415 (struct target_ops) <create_inferior>: Update prototype.
7416 (create_inferior): Update macro.
7417 * utils.c (gdb_flush_out_err): New function.
7418 * win32-low.c (win32_create_inferior): Adjust function prototype
7419 and code to reflect change on "target.h".
7420
7421 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7422
7423 * inferiors.c (switch_to_thread): New function.
7424
7425 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7426
7427 * Makefile.in (SFILE): Add "common/job-control.c".
7428 (OBS): Add "job-control.o".
7429
7430 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
7431
7432 * Makefile: Remove "@host_makefile_frag@".
7433
7434 2017-05-05 Pedro Alves <palves@redhat.com>
7435
7436 * configure: Regenerate.
7437
7438 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
7439
7440 * configure: Regenerate.
7441
7442 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7443
7444 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
7445 software_single_step change of return type to
7446 std::vector<CORE_ADDR>.
7447 * linux-low.c (install_software_single_step_breakpoints):
7448 Likewise.
7449 * linux-low.h (install_software_single_step_breakpoints):
7450 Likewise.
7451
7452 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7453
7454 * remote-utils.c: Include "gdb_termios.h" instead of
7455 "terminal.h".
7456 * terminal.h: Delete file.
7457
7458 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7459
7460 * server.c: Include <vector>.
7461 <program_argv, wrapper_argv>: Convert to std::vector.
7462 (start_inferior): Rewrite function to use C++.
7463 (handle_v_run): Likewise. Update code that calculates the argv
7464 based on the vRun packet; use C++.
7465 (captured_main): Likewise.
7466
7467 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7468
7469 * server.c (handle_v_cont): Initialize thread_resume::thread
7470 with null_ptid.
7471
7472 2017-04-05 Pedro Alves <palves@redhat.com>
7473
7474 * configure: Regenerate.
7475
7476 2017-04-05 Pedro Alves <palves@redhat.com>
7477
7478 * gdbreplay.c (sync_error): Constify.
7479 * linux-x86-low.c (push_opcode): Constify.
7480
7481 2017-04-05 Pedro Alves <palves@redhat.com>
7482
7483 * win32-low.c (get_child_debug_event)
7484 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
7485 Report TARGET_WAITKIND_SPURIOUS instead.
7486
7487 2017-04-05 Pedro Alves <palves@redhat.com>
7488
7489 * remote-utils.c (remote_prepare, remote_open): Constify.
7490 * remote-utils.h (remote_prepare, remote_open): Constify.
7491 * server.c (captured_main): Constify 'port' handling.
7492
7493 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
7494
7495 * Makefile.in (clean): Clear .deps.
7496
7497 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
7498
7499 * .gitignore: Remove generated files, replace with wildcard.
7500 * (clean): Replace removal of generated files with wildcard.
7501 (version.c): Replace with...
7502 (version-generated.c): ...this.
7503 (xml-builtin.c): Replace with...
7504 (xml-builtin-generated.c): ...this.
7505 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
7506 (%.c: *regformats*): Replace with...
7507 (%-generated.c: *regformats*): ...this.
7508
7509 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7510
7511 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
7512 (xtensa_fill_gregset): Call collect_register_by_name for
7513 threadptr register.
7514 (xtensa_store_gregset): Call supply_register_by_name for
7515 threadptr register.
7516
7517 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7518
7519 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
7520 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
7521 (xtensa_store_gregset): Call supply_register for all registers in
7522 a0_regnum..a0_regnum + C0_NREGS range.
7523
7524 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7525
7526 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
7527 (ax-ipa.o: ax.c): Remove.
7528 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
7529 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
7530 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
7531 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
7532 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
7533
7534 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7535
7536 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
7537 (print-utils-ipa.o: ../common/print-utils.c): Remove.
7538 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
7539 (errors-ipa.o: ../common/errors.c): Remove.
7540 (format-ipa.o: ../common/format.c): Remove.
7541 (common-utils-ipa.o: ../common/common-utils.c): Remove.
7542
7543 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7544
7545 * Makefile.in (%-ipa.o: %.c): New rule.
7546 (tracepoint-ipa.o: tracepoint.c): Remove.
7547 (utils-ipa.o: utils.c): Remove.
7548 (remote-utils-ipa.o: remote-utils.c): Remove.
7549 (regcache-ipa.o: regcache.c): Remove.
7550 (i386-linux-ipa.o: i386-linux.c): Remove.
7551 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
7552 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
7553 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
7554 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
7555 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
7556 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
7557 (amd64-linux-ipa.o: amd64-linux.c): Remove.
7558 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
7559 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
7560 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
7561 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
7562 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
7563 (aarch64-ipa.o: aarch64.c): Remove.
7564 (s390-linux32-ipa.o: s390-linux32.c): Remove.
7565 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
7566 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
7567 (s390-linux64-ipa.o: s390-linux64.c): Remove.
7568 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
7569 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
7570 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
7571 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
7572 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
7573 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
7574 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
7575 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
7576 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
7577 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
7578 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
7579 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
7580 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
7581 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
7582 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
7583 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
7584 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
7585 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
7586 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
7587 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
7588 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
7589 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
7590 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
7591 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
7592 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
7593 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
7594 (tdesc-ipa.o: tdesc.c): Remove.
7595 (x32-linux-ipa.o: x32-linux.c): Remove.
7596 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
7597 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
7598
7599 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7600
7601 * Makefile.in (%.o: ../arch/%.c): New rule.
7602 (arm.o: ../arch/arm.c): Remove.
7603 (arm-linux.o: ../arch/arm-linux.c): Remove.
7604 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
7605 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
7606
7607 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7608
7609 * Makefile.in (%.o: ../nat/%.c): New rule.
7610 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
7611 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
7612 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
7613 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
7614 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
7615 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
7616 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
7617 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
7618 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
7619 (linux-personality.o: ../nat/linux-personality.c): Remove.
7620 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
7621 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
7622 (x86-linux.o: ../nat/x86-linux.c): Remove.
7623 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
7624 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
7625
7626 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7627
7628 * Makefile.in (%.o: ../common/%.c): New rule.
7629 (signals.o: ../common/signals.c): Remove.
7630 (print-utils.o: ../common/print-utils.c): Remove.
7631 (rsp-low.o: ../common/rsp-low.c): Remove.
7632 (common-utils.o: ../common/common-utils.c): Remove.
7633 (posix-strerror.o: ../common/posix-strerror.c): Remove.
7634 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
7635 (vec.o: ../common/vec.c): Remove.
7636 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
7637 (xml-utils.o: ../common/xml-utils.c): Remove.
7638 (ptid.o: ../common/ptid.c): Remove.
7639 (buffer.o: ../common/buffer.c): Remove.
7640 (format.o: ../common/format.c): Remove.
7641 (filestuff.o: ../common/filestuff.c): Remove.
7642 (agent.o: ../common/agent.c): Remove.
7643 (errors.o: ../common/errors.c): Remove.
7644 (environ.o: ../common/environ.c): Remove.
7645 (common-debug.o: ../common/common-debug.c): Remove.
7646 (cleanups.o: ../common/cleanups.c): Remove.
7647 (common-exceptions.o: ../common/common-exceptions.c): Remove.
7648 (fileio.o: ../common/fileio.c): Remove.
7649 (common-regcache.o: ../common/common-regcache.c): Remove.
7650 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
7651 (new-op.o: ../common/new-op.c): Remove.
7652 (btrace-common.o: ../common/btrace-common.c): Remove.
7653
7654 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7655
7656 * Makefile.in (%.o: ../target/%.c): New rule.
7657 (waitstatus.o: ../target/waitstatus.c): Remove.
7658
7659 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7660
7661 * Makefile.in
7662 (%.c: ../regformats/%.dat,
7663 (%.c: ../regformats/arm/%.dat,
7664 (%.c: ../regformats/i386/%.dat,
7665 (%.c: ../regformats/rs6000/%.dat): New rules.
7666 (aarch64.c): Remove.
7667 (reg-arm.c): Remove.
7668 (arm-with-iwmmxt.c): Remove.
7669 (arm-with-vfpv2.c): Remove.
7670 (arm-with-vfpv3.c): Remove.
7671 (arm-with-neon.c): Remove.
7672 (reg-bfin.c): Remove.
7673 (reg-cris.c): Remove.
7674 (reg-crisv32.c): Remove.
7675 (i386.c): Remove.
7676 (i386-linux.c): Remove.
7677 (i386-avx.c): Remove.
7678 (i386-avx-linux.c): Remove.
7679 (i386-avx-avx512.c): Remove.
7680 (i386-avx-avx512-linux.c): Remove.
7681 (i386-mpx.c): Remove.
7682 (i386-mpx-linux.c): Remove.
7683 (i386-avx-mpx-avx512-pku.c): Remove.
7684 (i386-avx-mpx-avx512-pku-linux.c): Remove.
7685 (i386-avx-mpx.c): Remove.
7686 (i386-avx-mpx-linux.c): Remove.
7687 (i386-mmx.c): Remove.
7688 (i386-mmx-linux.c): Remove.
7689 (reg-ia64.c): Remove.
7690 (reg-m32r.c): Remove.
7691 (reg-m68k.c): Remove.
7692 (reg-cf.c): Remove.
7693 (mips-linux.c): Remove.
7694 (mips-dsp-linux.c): Remove.
7695 (mips64-linux.c): Remove.
7696 (mips64-dsp-linux.c): Remove.
7697 (nios2-linux.c): Remove.
7698 (powerpc-32.c): Remove.
7699 (powerpc-32l.c): Remove.
7700 (powerpc-altivec32l.c): Remove.
7701 (powerpc-cell32l.c): Remove.
7702 (powerpc-vsx32l.c): Remove.
7703 (powerpc-isa205-32l.c): Remove.
7704 (powerpc-isa205-altivec32l.c): Remove.
7705 (powerpc-isa205-vsx32l.c): Remove.
7706 (powerpc-e500l.c): Remove.
7707 (powerpc-64l.c): Remove.
7708 (powerpc-altivec64l.c): Remove.
7709 (powerpc-cell64l.c): Remove.
7710 (powerpc-vsx64l.c): Remove.
7711 (powerpc-isa205-64l.c): Remove.
7712 (powerpc-isa205-altivec64l.c): Remove.
7713 (powerpc-isa205-vsx64l.c): Remove.
7714 (s390-linux32.c): Remove.
7715 (s390-linux32v1.c): Remove.
7716 (s390-linux32v2.c): Remove.
7717 (s390-linux64.c): Remove.
7718 (s390-linux64v1.c): Remove.
7719 (s390-linux64v2.c): Remove.
7720 (s390-te-linux64.c): Remove.
7721 (s390-vx-linux64.c): Remove.
7722 (s390-tevx-linux64.c): Remove.
7723 (s390x-linux64.c): Remove.
7724 (s390x-linux64v1.c): Remove.
7725 (s390x-linux64v2.c): Remove.
7726 (s390x-te-linux64.c): Remove.
7727 (s390x-vx-linux64.c): Remove.
7728 (s390x-tevx-linux64.c): Remove.
7729 (tic6x-c64xp-linux.c): Remove.
7730 (tic6x-c64x-linux.c): Remove.
7731 (tic6x-c62x-linux.c): Remove.
7732 (reg-sh.c): Remove.
7733 (reg-sparc64.c): Remove.
7734 (reg-spu.c): Remove.
7735 (amd64.c): Remove.
7736 (amd64-linux.c): Remove.
7737 (amd64-avx.c): Remove.
7738 (amd64-avx-linux.c): Remove.
7739 (amd64-avx-avx512.c): Remove.
7740 (amd64-avx-avx512-linux.c): Remove.
7741 (amd64-mpx.c): Remove.
7742 (amd64-mpx-linux.c): Remove.
7743 (amd64-avx-mpx-avx512-pku.c): Remove.
7744 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
7745 (amd64-avx-mpx.c): Remove.
7746 (amd64-avx-mpx-linux.c): Remove.
7747 (x32.c): Remove.
7748 (x32-linux.c): Remove.
7749 (x32-avx.c): Remove.
7750 (x32-avx-linux.c): Remove.
7751 (x32-avx-avx512.c): Remove.
7752 (x32-avx-avx512-linux.c): Remove.
7753 (reg-xtensa.c): Remove.
7754 (reg-tilegx.c): Remove.
7755 (reg-tilegx32.c): Remove.
7756
7757 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
7758
7759 * Makefile.in (SFILES): Add "common/environ.c".
7760 (OBJS): Add "common/environ.h".
7761
7762 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
7763
7764 * configure.ac: Check if the fs_base and gs_base members of
7765 `struct user_regs_struct' exist.
7766 * config.in: Regenerated.
7767 * configure: Likewise.
7768
7769 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
7770
7771 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
7772 target_read_memory.
7773 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
7774 (get_next_pcs_syscall_next_pc): Likewise.
7775
7776 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
7777
7778 * win32-i386-low.c: Fix incorrect reference to a couple source files.
7779 * nto-x86-low.c: Likewise.
7780
7781 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
7782
7783 * Makefile.in: Include disable-implicit-rules.mk.
7784
7785 2016-11-23 Pedro Alves <palves@redhat.com>
7786
7787 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
7788 (debug_vprintf): Use std::chrono::steady_clock instead of
7789 gettimeofday. Use '.' instead of ':'.
7790 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
7791 (get_timestamp): Use std::chrono::steady_clock instead of
7792 gettimeofday.
7793
7794 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7795
7796 * Makefile.in: Fix whitespace formatting.
7797
7798 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7799
7800 * Makefile.in (SFILES, OBS): Flatten list and order
7801 alphabetically.
7802
7803 2016-11-23 Pedro Alves <palves@redhat.com>
7804
7805 * event-loop.c (handle_file_event): Use warning.
7806 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
7807 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7808 Use warning.
7809
7810 2016-11-23 Pedro Alves <palves@redhat.com>
7811
7812 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
7813 output.
7814 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
7815 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
7816 debug_printf and debug_flush for debug output.
7817 * server.c (handle_general_set): Likewise.
7818 * thread-db.c (try_thread_db_load): Use debug_printf for debug
7819 output.
7820
7821 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7822
7823 * Makefile.in (.c.o): Replace rule with ...
7824 (%.o: %.c): ... this one.
7825
7826 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7827
7828 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
7829 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
7830 make.
7831 * configure.ac: Remove checks for the make program.
7832 * configure: Re-generate.
7833
7834 2016-10-28 Pedro Alves <palves@redhat.com>
7835
7836 * Makefile.in (CXX_DIALECT): Get from configure.
7837 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
7838 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
7839 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
7840 * config.in: Regenerate.
7841 * configure: Regenerate.
7842
7843 2016-10-27 Yao Qi <yao.qi@linaro.org>
7844
7845 * linux-low.c (linux_supports_range_stepping): Return true if
7846 can_software_single_step return true.
7847
7848 2016-10-27 Yao Qi <yao.qi@linaro.org>
7849
7850 * inferiors.c (find_inferior_in_random): New function.
7851 * inferiors.h (find_inferior_in_random): Declare.
7852 * linux-low.c (linux_wait_for_event_filtered): Call
7853 find_inferior_in_random instead of find_inferior.
7854
7855 2016-10-27 Yao Qi <yao.qi@linaro.org>
7856
7857 * linux-low.c (linux_wait_1): If single-step breakpoints are
7858 inserted, remove them.
7859
7860 2016-10-26 Pedro Alves <palves@redhat.com>
7861
7862 * linux-low.c (handle_extended_wait): Link parent/child fork
7863 threads.
7864 (linux_wait_1): Unlink them.
7865 (linux_set_resume_request): Ignore resume requests for
7866 already-resumed and unhandled fork child threads.
7867 * linux-low.h (struct lwp_info) <fork_relative>: New field.
7868 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
7869 New functions.
7870 (handle_v_requests) <vCont>: Don't call require_running.
7871 * server.h (in_queued_stop_replies): New declaration.
7872
7873 2016-10-24 Yao Qi <yao.qi@linaro.org>
7874
7875 PR server/20733
7876 * linux-aarch64-low.c (append_insns): Cast the return value to
7877 'uint32_t *'.
7878
7879 2016-10-10 Yao Qi <yao.qi@linaro.org>
7880
7881 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
7882
7883 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
7884
7885 * target.c (target_supports_multi_process): New function, moved
7886 from...
7887 * target.h (target_supports_multi_process): ... here. Remove
7888 macro.
7889
7890 2016-10-05 Tom Tromey <tom@tromey.com>
7891
7892 PR remote/20655:
7893 * tracepoint.c (handle_tracepoint_bkpts): Check
7894 ipa_error_tracepoint, not ipa_stopping_tracepoint.
7895
7896 2016-10-05 Yao Qi <yao.qi@linaro.org>
7897
7898 * configure.srv: Update the path of arm-*.xml files.
7899
7900 2016-10-05 Terry Guo <terry.guo@arm.com>
7901 Yao Qi <yao.qi@linaro.org>
7902
7903 * Makefile.in: Adjust the path of rules.
7904 * configure.srv: Update the path of xml files.
7905 * regformats/arm-with-iwmmxt.dat: Regenerated.
7906 * regformats/arm-with-neon.dat: Likewise.
7907 * regformats/arm-with-vfpv2.dat: Likewise.
7908 * regformats/arm-with-vfpv3.dat Likewise.
7909
7910 2016-09-30 Yao Qi <yao.qi@linaro.org>
7911
7912 PR gdbserver/20627
7913 * target.c (target_stop_and_wait): Don't call
7914 target_continue_no_signal, use resume_stop instead.
7915
7916 2016-09-26 Yao Qi <yao.qi@linaro.org>
7917
7918 * linux-low.c (linux_wait_1): Call debug_exit.
7919
7920 2016-09-23 Pedro Alves <palves@redhat.com>
7921
7922 * Makefile.in (SFILES): Add common/new-op.c.
7923 (OBS): Add common/new-op.o.
7924 (new-op.o): New rule.
7925
7926 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
7927
7928 * .gitinore: Ignore more files.
7929
7930 2016-09-21 Yao Qi <yao.qi@linaro.org>
7931
7932 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
7933 23.
7934
7935 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
7936
7937 * server.c (start_inferior): Call target_mourn_inferior instead of
7938 mourn_inferior; pass ptid_t argument to it.
7939 (resume): Likewise.
7940 (handle_target_event): Likewise.
7941 * target.c (target_mourn_inferior): New function.
7942 * target.h (mourn_inferior): Delete macro.
7943
7944 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
7945
7946 * linux-low.c (lwp_is_stepping): New function.
7947
7948 2016-09-06 Carl Love <cel@us.ibm.com>
7949
7950 * server.c (start_inferior): Fixed comment, requested comment change
7951 didn't get updated correctly. Removed reference to ptrace () call as
7952 it is only true on Linux systems.
7953
7954 2016-09-06 Carl Love <cel@us.ibm.com>
7955
7956 * server.c (start_inferior): Do not call
7957 function target_post_create_inferior () if the
7958 inferior process has already exited.
7959
7960 2016-09-05 Pedro Alves <palves@redhat.com>
7961
7962 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
7963 (COMPILE.pre, CC_LD): Use CXX directly.
7964 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
7965 * acinclude.m4: Don't include build-with-cxx.m4.
7966 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
7967 * configure: Regenerate.
7968
7969 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
7970
7971 PR gdb/19495
7972 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
7973 call writing data to own_buf.
7974
7975 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7976
7977 * target.c (mywait): Call target_wait instead of
7978 the_target->wait.
7979 (target_wait): New function.
7980
7981 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
7982
7983 * server.c (start_inferior): New variable 'ptid'. Replace calls
7984 to the_target->resume by target_continue{,_no_signal}, depending
7985 on the case.
7986 * target.c (target_stop_and_wait): Call target_continue_no_signal
7987 instead of the_target->resume.
7988 (target_continue): New function.
7989
7990 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
7991
7992 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
7993
7994 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
7995
7996 PR server/20491
7997 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
7998 ps_prochandle.
7999 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
8000 * linux-arm-low.c (ps_get_thread_area): Likewise.
8001 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
8002 * linux-m68k-low.c (ps_get_thread_area): Likewise.
8003 * linux-mips-low.c (ps_get_thread_area): Likewise.
8004 * linux-nios2-low.c (ps_get_thread_area): Likewise.
8005 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
8006 * linux-x86-low.c (ps_get_thread_area): Likewise.
8007 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
8008
8009 2016-08-19 Pedro Alves <palves@redhat.com>
8010
8011 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
8012
8013 2016-08-19 Pedro Alves <palves@redhat.com>
8014
8015 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
8016 comment. Use memcpy instead of casting through unsigned long.
8017
8018 2016-08-19 Pedro Alves <palves@redhat.com>
8019
8020 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
8021 allocating around 0x80000000.
8022
8023 2016-08-19 Pedro Alves <palves@redhat.com>
8024
8025 PR gdb/20415
8026 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
8027 (x32-avx512-linux-ipa.o): New rules.
8028 * configure.ac (x86_64-*-linux*): New x32 check.
8029 * configure.srv (ipa_x32_linux_regobj): New.
8030 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
8031 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
8032 descriptions.
8033 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
8034 descriptions.
8035 * configure: Regenerate.
8036
8037 2016-08-09 Pedro Alves <palves@redhat.com>
8038
8039 PR gdb/18653
8040 * Makefile.in (OBS): Add signals-state-save-restore.o.
8041 (signals-state-save-restore.o): New rule.
8042 * config.in: Regenerate.
8043 * configure: Regenerate.
8044 * linux-low.c: Include "signals-state-save-restore.h".
8045 (linux_create_inferior): Call
8046 restore_original_signals_state.
8047 * server.c: Include "dispositions-save-restore.h".
8048 (captured_main): Call save_original_signals_state.
8049
8050 2016-08-05 Pedro Alves <palves@redhat.com>
8051
8052 * configure: Regenerate.
8053
8054 2016-08-04 Yao Qi <yao.qi@linaro.org>
8055
8056 * linux-low.c (regsets_fetch_inferior_registers): Check
8057 errno is ESRCH or not.
8058
8059 2016-08-02 Yao Qi <yao.qi@linaro.org>
8060
8061 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
8062 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
8063 (thread_db_load_search): Update.
8064 (try_thread_db_load_1): Don't look for td_ta_event_addr,
8065 td_ta_set_event and td_ta_event_getmsg.
8066
8067 2016-07-26 Pedro Alves <palves@redhat.com>
8068
8069 PR server/20414
8070 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
8071 of unsigned long for 64-bit registers and use uint32_t instead of
8072 unsigned int for 32-bit registers.
8073
8074 2016-07-26 Pedro Alves <palves@redhat.com>
8075
8076 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
8077 to 'ptrace'.
8078
8079 2016-07-21 Tom Tromey <tom@tromey.com>
8080
8081 * configure: Rebuild.
8082
8083 2016-07-21 Yao Qi <yao.qi@linaro.org>
8084
8085 * mem-break.c (find_gdb_breakpoint): Cast bp to
8086 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
8087
8088 2016-07-21 Yao Qi <yao.qi@linaro.org>
8089
8090 * server.c (handle_v_requests): Support s and S actions
8091 if target_supports_software_single_step return true.
8092
8093 2016-07-21 Yao Qi <yao.qi@linaro.org>
8094
8095 * linux-low.c (resume_stopped_resumed_lwps): If resume request
8096 is resume_step, call maybe_hw_step.
8097 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
8098 and unstop them.
8099 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
8100 breakpoints or not.
8101 (proceed_one_lwp): If resume request is resume_step, install
8102 reinsert breakpoints and call maybe_hw_step.
8103
8104 2016-07-21 Yao Qi <yao.qi@linaro.org>
8105
8106 * linux-low.c (proceed_one_lwp): Declare.
8107 (linux_resume_one_thread): Remove local variable 'step'.
8108 Lift code enqueue signal. Call proceed_one_lwp instead of
8109 linux_resume_one_lwp.
8110
8111 2016-07-21 Yao Qi <yao.qi@linaro.org>
8112
8113 * linux-low.c (linux_resume_one_thread): Call
8114 enqueue_pending_signal.
8115
8116 2016-07-21 Yao Qi <yao.qi@linaro.org>
8117
8118 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
8119 * inferiors.c (do_restore_current_thread_cleanup): New function.
8120 (make_cleanup_restore_current_thread): Likewise.
8121 * linux-low.c (install_software_single_step_breakpoints): Call
8122 make_cleanup_restore_current_thread. Switch current_thread to
8123 thread.
8124
8125 2016-07-21 Yao Qi <yao.qi@linaro.org>
8126
8127 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
8128 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
8129 (clone_one_breakpoint): Likewise.
8130 (delete_reinsert_breakpoints): Change parameter to thread.
8131 Callers updated.
8132 (has_reinsert_breakpoints): Likewise.
8133 (uninsert_reinsert_breakpoints): Likewise.
8134 (reinsert_reinsert_breakpoints): Likewise.
8135 * mem-break.h (set_reinsert_breakpoint): Update declaration.
8136 (delete_reinsert_breakpoints): Likewise.
8137 (reinsert_reinsert_breakpoints): Likewise.
8138 (uninsert_reinsert_breakpoints): Likewise.
8139 (has_reinsert_breakpoints): Likewise.
8140
8141 2016-07-21 Yao Qi <yao.qi@linaro.org>
8142
8143 * inferiors.c (get_thread_process): Make parameter const.
8144 * inferiors.h (get_thread_process): Update declaration.
8145 * mem-break.c (clone_all_breakpoints): Remove all parameters.
8146 Add new parameters child_thread and parent_thread. Callers
8147 updated.
8148 * mem-break.h (clone_all_breakpoints): Update declaration.
8149
8150 2016-07-21 Yao Qi <yao.qi@linaro.org>
8151
8152 * mem-break.c (struct breakpoint) <cond_list>: Remove.
8153 <command_list, handler>: Remove.
8154 (struct gdb_breakpoint): New.
8155 (struct other_breakpoint): New.
8156 (struct reinsert_breakpoint): New.
8157 (is_gdb_breakpoint): New function.
8158 (any_persistent_commands): Update command_list if
8159 is_gdb_breakpoint returns true.
8160 (set_breakpoint): Create breakpoints according to their types.
8161 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
8162 (set_gdb_breakpoint_1): Likewise.
8163 (set_gdb_breakpoint): Likewise.
8164 (clear_breakpoint_conditions): Change parameter type to
8165 'struct gdb_breakpoint *'.
8166 (clear_breakpoint_commands): Likewise.
8167 (clear_breakpoint_conditions_and_commands): Likewise.
8168 (add_condition_to_breakpoint): Likewise.
8169 (add_breakpoint_condition): Likewise.
8170 (add_commands_to_breakpoint): Likewise.
8171 (check_breakpoints): Check other_breakpoint.
8172 (clone_one_breakpoint): Clone breakpopint according to its type.
8173 * mem-break.h (struct gdb_breakpoint): Declare.
8174 (set_gdb_breakpoint): Update declaration.
8175 (clear_breakpoint_conditions_and_commands): Likewise.
8176 (add_breakpoint_condition): Likewise.
8177 (add_breakpoint_commands): Likewise.
8178 * server.c (process_point_options): Change parameter type to
8179 'struct gdb_breakpoint *'.
8180
8181 2016-07-21 Yao Qi <yao.qi@linaro.org>
8182
8183 * mem-break.c (set_breakpoint_at): Rename it to ...
8184 (set_breakpoint_type_at): ... it.
8185 (set_breakpoint_at): Call set_breakpoint_type_at.
8186 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
8187 * mem-break.h (set_breakpoint_at): Update comments.
8188
8189 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
8190
8191 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
8192 to buf parameter.
8193 (nios2_store_gregset): Likewise.
8194
8195 2016-07-01 Pedro Alves <palves@redhat.com>
8196 Antoine Tremblay <antoine.tremblay@ericsson.com>
8197
8198 * linux-low.c: Change interface to take the target lwp_info
8199 pointer directly and return void. Handle detaching from a zombie
8200 thread.
8201 (linux_detach_lwp_callback): New function.
8202 (linux_detach): Detach from the leader thread after detaching from
8203 the clone threads.
8204
8205 2016-06-28 Yao Qi <yao.qi@linaro.org>
8206
8207 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
8208 for variable new_offset.
8209 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
8210 (aarch64_ftrace_insn_reloc_cb): Likewise.
8211 (aarch64_ftrace_insn_reloc_tb): Likewise.
8212 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
8213 PRIx64 instead of PRIx32.
8214
8215 2016-06-28 Yao Qi <yao.qi@linaro.org>
8216
8217 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
8218 (the_low_target): Install arm_get_syscall_trapinfo.
8219
8220 2016-06-28 Yao Qi <yao.qi@linaro.org>
8221
8222 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
8223 function.
8224 (the_low_target): Install aarch64_get_syscall_trapinfo.
8225
8226 2016-06-28 Yao Qi <yao.qi@linaro.org>
8227
8228 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
8229 Callers updated.
8230 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
8231 Remove parameter sysno.
8232 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
8233 sysret.
8234
8235 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
8236
8237 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
8238 (s390_emit_ne_goto): Likewise.
8239 (s390_emit_lt_goto): Likewise.
8240 (s390_emit_le_goto): Likewise.
8241 (s390_emit_gt_goto): Likewise.
8242 (s390_emit_ge_goto): Likewise.
8243 (s390x_emit_eq_goto): Likewise.
8244 (s390x_emit_ne_goto): Likewise.
8245 (s390x_emit_lt_goto): Likewise.
8246 (s390x_emit_le_goto): Likewise.
8247 (s390x_emit_gt_goto): Likewise.
8248 (s390x_emit_ge_goto): Likewise.
8249 (s390_emit_ops_impl): Mark variable static.
8250 (s390x_emit_ops): Likewise.
8251
8252 2016-06-17 Yao Qi <yao.qi@linaro.org>
8253
8254 * linux-low.c (handle_extended_wait): Call
8255 uninsert_reinsert_breakpoints for the parent process. Remove
8256 reinsert breakpoints from the child process. Reinsert them to
8257 the parent process when vfork is done.
8258 * mem-break.c (uninsert_reinsert_breakpoints): New function.
8259 (reinsert_reinsert_breakpoints): New function.
8260 * mem-break.h (uninsert_reinsert_breakpoints): Declare
8261 (reinsert_reinsert_breakpoints): Declare.
8262
8263 2016-06-17 Yao Qi <yao.qi@linaro.org>
8264
8265 * linux-low.c (handle_extended_wait): If the parent is doing
8266 step-over, remove the reinsert breakpoints from the forked child.
8267
8268 2016-06-17 Yao Qi <yao.qi@linaro.org>
8269
8270 * linux-low.c (unsuspend_all_lwps): Declare.
8271 (linux_low_filter_event): If thread exited, call finish_step_over.
8272 If step-over is finished, unsuspend other threads.
8273
8274 2016-06-17 Yao Qi <yao.qi@linaro.org>
8275
8276 * linux-low.c (linux_resume_one_lwp_throw): Assert
8277 has_reinsert_breakpoints returns false.
8278 * mem-break.c (delete_disabled_breakpoints): Assert
8279 bp type isn't reinsert_breakpoint.
8280
8281 2016-06-17 Yao Qi <yao.qi@linaro.org>
8282
8283 * linux-low.c (maybe_hw_step): New function.
8284 (linux_resume_one_lwp_throw): Call maybe_hw_step.
8285 (finish_step_over): Switch current_thread to lwp temporarily,
8286 and assert has_reinsert_breakpoints returns true.
8287 (proceed_one_lwp): Call maybe_hw_step.
8288 * mem-break.c (has_reinsert_breakpoints): New function.
8289 * mem-break.h (has_reinsert_breakpoints): Declare.
8290
8291 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
8292
8293 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
8294
8295 2016-05-17 Yao Qi <yao.qi@linaro.org>
8296
8297 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
8298 instead of find_inferior.
8299
8300 2016-05-05 Yao Qi <yao.qi@linaro.org>
8301
8302 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
8303 Initialize res to zero.
8304
8305 2016-05-05 Yao Qi <yao.qi@linaro.org>
8306
8307 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
8308 to uint32_t.
8309
8310 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8311
8312 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
8313 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
8314 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
8315
8316 2016-04-28 Par Olsson <par.olsson@windriver.com>
8317 Simon Marchi <simon.marchi@ericsson.com>
8318
8319 * tracepoint.c (write_inferior_int8): New function.
8320 (cmd_qtenable_disable): Write enable flag using
8321 write_inferior_int8.
8322
8323 2016-04-25 Yao Qi <yao.qi@linaro.org>
8324
8325 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
8326 (need_step_over_p): Return zero if the LWP has pending signals
8327 can be delivered on software single step target.
8328
8329 2016-04-25 Yao Qi <yao.qi@linaro.org>
8330
8331 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
8332 return instead of error.
8333
8334 2016-04-22 Yao Qi <yao.qi@linaro.org>
8335
8336 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
8337 to 23.
8338
8339 2016-04-22 Yao Qi <yao.qi@linaro.org>
8340
8341 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
8342 signal when stepping over breakpoint with software single
8343 step.
8344
8345 2016-04-21 Pedro Alves <palves@redhat.com>
8346
8347 * linux-s390-low.c (s390_collect_ptrace_register)
8348 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
8349 add casts.
8350 (s390_check_regset): Use void * instead of gdb_byte *.
8351
8352 2016-04-20 Pedro Alves <palves@redhat.com>
8353
8354 * configure: Renegerate.
8355
8356 2016-04-20 Yao Qi <yao.qi@linaro.org>
8357
8358 * linux-aarch32-low.c: Include "arch/arm-linux.h".
8359 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
8360 number 16.
8361 (arm_store_gregset): Likewise.
8362
8363 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
8364
8365 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
8366 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
8367 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
8368 (amd64-avx-mpx-linux.c): New rules.
8369 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
8370 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
8371 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
8372 (srv_amd64_regobj): Add amd64-avx-mpx.o.
8373 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
8374 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
8375 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
8376 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
8377 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
8378 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
8379 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
8380 * linux-x86-low.c (x86_linux_read_description): Add case for
8381 X86_XSTATE_AVX_MPX_MASK.
8382 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
8383 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
8384 init_registers_i386_avx_mpx_linux.
8385 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8386 (initialize_low_tracepoint): Call
8387 init_registers_i386_avx_mpx_linux.
8388 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8389 (initialize_low_tracepoint): Call
8390 init_registers_amd64_avx_mpx_linux.
8391 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
8392 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
8393 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
8394 declarations.
8395
8396 2016-04-18 Pedro Alves <palves@redhat.com>
8397
8398 * configure: Regenerate.
8399
8400 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
8401
8402 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
8403 (aarch64_emit_sub): Likewise.
8404
8405 2016-04-12 Pedro Alves <palves@redhat.com>
8406
8407 * utils.c (prepare_to_throw_exception): Delete.
8408
8409 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
8410
8411 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
8412
8413 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
8414
8415 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
8416
8417 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
8418
8419 * linux-aarch64-ipa.c: Add <elf.h> include.
8420 * linux-ppc-ipa.c: Add <elf.h> include.
8421 * linux-s390-ipa.c: Add <elf.h> include.
8422
8423 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8424
8425 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
8426 (get_raw_reg_ptr): Likewise.
8427 (get_trace_state_variable_value_ptr): Likewise.
8428 (set_trace_state_variable_value_ptr): Likewise.
8429 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
8430 char *.
8431
8432 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8433 Marcin Kościelnicki <koriakin@0x04.net>
8434
8435 PR/17221
8436 * linux-ppc-low.c (emit_insns): New function.
8437 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
8438 (ppc_emit_prologue): New function.
8439 (ppc_emit_epilogue): New function.
8440 (ppc_emit_add): New function.
8441 (ppc_emit_sub): New function.
8442 (ppc_emit_mul): New function.
8443 (ppc_emit_lsh): New function.
8444 (ppc_emit_rsh_signed): New function.
8445 (ppc_emit_rsh_unsigned): New function.
8446 (ppc_emit_ext): New function.
8447 (ppc_emit_zero_ext): New function.
8448 (ppc_emit_log_not): New function.
8449 (ppc_emit_bit_and): New function.
8450 (ppc_emit_bit_or): New function.
8451 (ppc_emit_bit_xor): New function.
8452 (ppc_emit_bit_not): New function.
8453 (ppc_emit_equal): New function.
8454 (ppc_emit_less_signed): New function.
8455 (ppc_emit_less_unsigned): New function.
8456 (ppc_emit_ref): New function.
8457 (ppc_emit_const): New function.
8458 (ppc_emit_reg): New function.
8459 (ppc_emit_pop): New function.
8460 (ppc_emit_stack_flush): New function.
8461 (ppc_emit_swap): New function.
8462 (ppc_emit_stack_adjust): New function.
8463 (ppc_emit_call): New function.
8464 (ppc_emit_int_call_1): New function.
8465 (ppc_emit_void_call_2): New function.
8466 (ppc_emit_if_goto): New function.
8467 (ppc_emit_goto): New function.
8468 (ppc_emit_eq_goto): New function.
8469 (ppc_emit_ne_goto): New function.
8470 (ppc_emit_lt_goto): New function.
8471 (ppc_emit_le_goto): New function.
8472 (ppc_emit_gt_goto): New function.
8473 (ppc_emit_ge_goto): New function.
8474 (ppc_write_goto_address): New function.
8475 (ppc_emit_ops_impl): New static variable.
8476 (ppc64v1_emit_prologue): New function.
8477 (ppc64v2_emit_prologue): New function.
8478 (ppc64_emit_epilogue): New function.
8479 (ppc64_emit_add): New function.
8480 (ppc64_emit_sub): New function.
8481 (ppc64_emit_mul): New function.
8482 (ppc64_emit_lsh): New function.
8483 (ppc64_emit_rsh_signed): New function.
8484 (ppc64_emit_rsh_unsigned): New function.
8485 (ppc64_emit_ext): New function.
8486 (ppc64_emit_zero_ext): New function.
8487 (ppc64_emit_log_not): New function.
8488 (ppc64_emit_bit_and): New function.
8489 (ppc64_emit_bit_or): New function.
8490 (ppc64_emit_bit_xor): New function.
8491 (ppc64_emit_bit_not): New function.
8492 (ppc64_emit_equal): New function.
8493 (ppc64_emit_less_signed): New function.
8494 (ppc64_emit_less_unsigned): New function.
8495 (ppc64_emit_ref): New function.
8496 (ppc64_emit_const): New function.
8497 (ppc64v1_emit_reg): New function.
8498 (ppc64v2_emit_reg): New function.
8499 (ppc64_emit_pop): New function.
8500 (ppc64_emit_stack_flush): New function.
8501 (ppc64_emit_swap): New function.
8502 (ppc64v1_emit_call): New function.
8503 (ppc64v2_emit_call): New function.
8504 (ppc64v1_emit_int_call_1): New function.
8505 (ppc64v2_emit_int_call_1): New function.
8506 (ppc64v1_emit_void_call_2): New function.
8507 (ppc64v2_emit_void_call_2): New function.
8508 (ppc64_emit_if_goto): New function.
8509 (ppc64_emit_eq_goto): New function.
8510 (ppc64_emit_ne_goto): New function.
8511 (ppc64_emit_lt_goto): New function.
8512 (ppc64_emit_le_goto): New function.
8513 (ppc64_emit_gt_goto): New function.
8514 (ppc64_emit_ge_goto): New function.
8515 (ppc64v1_emit_ops_impl): New static variable.
8516 (ppc64v2_emit_ops_impl): New static variable.
8517 (ppc_emit_ops): New function.
8518 (linux_low_target): Wire in ppc_emit_ops.
8519
8520 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8521 Marcin Kościelnicki <koriakin@0x04.net>
8522
8523 PR/17221
8524 * Makefile.in: Add powerpc-*-ipa.o
8525 * configure.srv: Add ipa_obj for powerpc*-linux.
8526 * linux-ppc-ipa.c: New file.
8527 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
8528 includes.
8529 (PPC_FIELD): New macro.
8530 (PPC_SEXT): New macro.
8531 (PPC_OP6): New macro.
8532 (PPC_BO): New macro.
8533 (PPC_LI): New macro.
8534 (PPC_BD): New macro.
8535 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
8536 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
8537 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
8538 (ppc_get_thread_area): New function.
8539 (is_elfv2_inferior): New function.
8540 (gen_ds_form): New function.
8541 (GEN_STD): New macro.
8542 (GEN_STDU): New macro.
8543 (GEN_LD): New macro.
8544 (GEN_LDU): New macro.
8545 (gen_d_form): New function.
8546 (GEN_ADDI): New macro.
8547 (GEN_ADDIS): New macro.
8548 (GEN_LI): New macro.
8549 (GEN_LIS): New macro.
8550 (GEN_ORI): New macro.
8551 (GEN_ORIS): New macro.
8552 (GEN_LWZ): New macro.
8553 (GEN_STW): New macro.
8554 (GEN_STWU): New macro.
8555 (gen_xfx_form): New function.
8556 (GEN_MFSPR): New macro.
8557 (GEN_MTSPR): New macro.
8558 (GEN_MFCR): New macro.
8559 (GEN_MTCR): New macro.
8560 (GEN_SYNC): New macro.
8561 (GEN_LWSYNC): New macro.
8562 (gen_x_form): New function.
8563 (GEN_OR): New macro.
8564 (GEN_MR): New macro.
8565 (GEN_LWARX): New macro.
8566 (GEN_STWCX): New macro.
8567 (GEN_CMPW): New macro.
8568 (gen_md_form): New function.
8569 (GEN_RLDICL): New macro.
8570 (GEN_RLDICR): New macro.
8571 (gen_i_form): New function.
8572 (GEN_B): New macro.
8573 (GEN_BL): New macro.
8574 (gen_b_form): New function.
8575 (GEN_BNE): New macro.
8576 (GEN_LOAD): New macro.
8577 (GEN_STORE): New macro.
8578 (gen_limm): New function.
8579 (gen_atomic_xchg): New function.
8580 (gen_call): New function.
8581 (ppc_relocate_instruction): New function.
8582 (ppc_install_fast_tracepoint_jump_pad): New function.
8583 (ppc_get_min_fast_tracepoint_insn_len): New function.
8584 (ppc_get_ipa_tdesc_idx): New function.
8585 (the_low_target): Wire in the new functions.
8586 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
8587 tdescs.
8588 * linux-ppc-tdesc.h: New file.
8589
8590 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8591
8592 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8593 (alloc_jump_pad_buffer): New function.
8594 * linux-amd64-ipa.c: Add <sys/mman.h> include.
8595 (alloc_jump_pad_buffer): New function.
8596 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
8597 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8598 (alloc_jump_pad_buffer): New function.
8599 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
8600 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
8601 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
8602 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
8603
8604 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8605
8606 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
8607 * linux-amd64-ipa.c: Likewise.
8608 * linux-i386-ipa.c: Likewise.
8609 * linux-s390-ipa.c: Likewise.
8610 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
8611 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
8612 set_trace_state_variable_value_ptr.
8613 (struct ipa_sym_addresses): Likewise.
8614 (symbol_list): Likewise.
8615 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
8616 accessing gdb_collect directly.
8617 (gdb_collect_ptr_type): New typedef.
8618 (get_raw_reg_ptr_type): New typedef.
8619 (get_trace_state_variable_value_ptr_type): New typedef.
8620 (set_trace_state_variable_value_ptr_type): New typedef.
8621 (gdb_collect_ptr): New global.
8622 (get_raw_reg_ptr): New global.
8623 (get_trace_state_variable_value_ptr): New global.
8624 (set_trace_state_variable_value_ptr): New global.
8625 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
8626 accessing get_raw_reg directly.
8627 (get_get_tsv_func_addr): Likewise for
8628 get_trace_state_variable_value_ptr.
8629 (get_set_tsv_func_addr): Likewise for
8630 set_trace_state_variable_value_ptr.
8631 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
8632
8633 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
8634
8635 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
8636
8637 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8638
8639 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
8640 packets.
8641 (relocate_instruction): Remove own_buf.
8642 * server.c (own_buf): Make global.
8643 (handle_v_requests): Make global.
8644 * server.h (own_buf): New declaration.
8645 (handle_v_requests): New prototype.
8646
8647 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8648
8649 PR 18377
8650 * linux-s390-low.c (add_insns): New function.
8651 (s390_emit_prologue): New function.
8652 (s390_emit_epilogue): New function.
8653 (s390_emit_add): New function.
8654 (s390_emit_sub): New function.
8655 (s390_emit_mul): New function.
8656 (s390_emit_lsh): New function.
8657 (s390_emit_rsh_signed): New function.
8658 (s390_emit_rsh_unsigned): New function.
8659 (s390_emit_ext): New function.
8660 (s390_emit_log_not): New function.
8661 (s390_emit_bit_and): New function.
8662 (s390_emit_bit_or): New function.
8663 (s390_emit_bit_xor): New function.
8664 (s390_emit_bit_not): New function.
8665 (s390_emit_equal): New function.
8666 (s390_emit_less_signed): New function.
8667 (s390_emit_less_unsigned): New function.
8668 (s390_emit_ref): New function.
8669 (s390_emit_if_goto): New function.
8670 (s390_emit_goto): New function.
8671 (s390_write_goto_address): New function.
8672 (s390_emit_litpool): New function.
8673 (s390_emit_const): New function.
8674 (s390_emit_call): New function.
8675 (s390_emit_reg): New function.
8676 (s390_emit_pop): New function.
8677 (s390_emit_stack_flush): New function.
8678 (s390_emit_zero_ext): New function.
8679 (s390_emit_swap): New function.
8680 (s390_emit_stack_adjust): New function.
8681 (s390_emit_set_r2): New function.
8682 (s390_emit_int_call_1): New function.
8683 (s390_emit_void_call_2): New function.
8684 (s390_emit_eq_goto): New function.
8685 (s390_emit_ne_goto): New function.
8686 (s390_emit_lt_goto): New function.
8687 (s390_emit_le_goto): New function.
8688 (s390_emit_gt_goto): New function.
8689 (s390_emit_ge_goto): New function.
8690 (s390x_emit_prologue): New function.
8691 (s390x_emit_epilogue): New function.
8692 (s390x_emit_add): New function.
8693 (s390x_emit_sub): New function.
8694 (s390x_emit_mul): New function.
8695 (s390x_emit_lsh): New function.
8696 (s390x_emit_rsh_signed): New function.
8697 (s390x_emit_rsh_unsigned): New function.
8698 (s390x_emit_ext): New function.
8699 (s390x_emit_log_not): New function.
8700 (s390x_emit_bit_and): New function.
8701 (s390x_emit_bit_or): New function.
8702 (s390x_emit_bit_xor): New function.
8703 (s390x_emit_bit_not): New function.
8704 (s390x_emit_equal): New function.
8705 (s390x_emit_less_signed): New function.
8706 (s390x_emit_less_unsigned): New function.
8707 (s390x_emit_ref): New function.
8708 (s390x_emit_if_goto): New function.
8709 (s390x_emit_const): New function.
8710 (s390x_emit_call): New function.
8711 (s390x_emit_reg): New function.
8712 (s390x_emit_pop): New function.
8713 (s390x_emit_stack_flush): New function.
8714 (s390x_emit_zero_ext): New function.
8715 (s390x_emit_swap): New function.
8716 (s390x_emit_stack_adjust): New function.
8717 (s390x_emit_int_call_1): New function.
8718 (s390x_emit_void_call_2): New function.
8719 (s390x_emit_eq_goto): New function.
8720 (s390x_emit_ne_goto): New function.
8721 (s390x_emit_lt_goto): New function.
8722 (s390x_emit_le_goto): New function.
8723 (s390x_emit_gt_goto): New function.
8724 (s390x_emit_ge_goto): New function.
8725 (s390_emit_ops): New function.
8726 (struct linux_target_ops): Fill in emit_ops hook.
8727
8728 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8729
8730 PR 18377
8731 * Makefile.in: Add s390 IPA files.
8732 * configure.srv: Build IPA for s390.
8733 * linux-s390-ipa.c: New file.
8734 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
8735 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
8736 (tdesc_s390_linux32): Likewise.
8737 (init_registers_s390_linux32v1): Likewise.
8738 (tdesc_s390_linux32v1): Likewise.
8739 (init_registers_s390_linux32v2): Likewise.
8740 (tdesc_s390_linux32v2): Likewise.
8741 (init_registers_s390_linux64): Likewise.
8742 (tdesc_s390_linux64): Likewise.
8743 (init_registers_s390_linux64v1): Likewise.
8744 (tdesc_s390_linux64v1): Likewise.
8745 (init_registers_s390_linux64v2): Likewise.
8746 (tdesc_s390_linux64v2): Likewise.
8747 (init_registers_s390_te_linux64): Likewise.
8748 (tdesc_s390_te_linux64): Likewise.
8749 (init_registers_s390_vx_linux64): Likewise.
8750 (tdesc_s390_vx_linux64): Likewise.
8751 (init_registers_s390_tevx_linux64): Likewise.
8752 (tdesc_s390_tevx_linux64): Likewise.
8753 (init_registers_s390x_linux64): Likewise.
8754 (tdesc_s390x_linux64): Likewise.
8755 (init_registers_s390x_linux64v1): Likewise.
8756 (tdesc_s390x_linux64v1): Likewise.
8757 (init_registers_s390x_linux64v2): Likewise.
8758 (tdesc_s390x_linux64v2): Likewise.
8759 (init_registers_s390x_te_linux64): Likewise.
8760 (tdesc_s390x_te_linux64): Likewise.
8761 (init_registers_s390x_vx_linux64): Likewise.
8762 (tdesc_s390x_vx_linux64): Likewise.
8763 (init_registers_s390x_tevx_linux64): Likewise.
8764 (tdesc_s390x_tevx_linux64): Likewise.
8765 (have_hwcap_s390_vx): New static variable.
8766 (s390_arch_setup): Fill have_hwcap_s390_vx.
8767 (s390_get_thread_area): New function.
8768 (s390_ft_entry_gpr_esa): New const.
8769 (s390_ft_entry_gpr_zarch): New const.
8770 (s390_ft_entry_misc): New const.
8771 (s390_ft_entry_fr): New const.
8772 (s390_ft_entry_vr): New const.
8773 (s390_ft_main_31): New const.
8774 (s390_ft_main_64): New const.
8775 (s390_ft_exit_fr): New const.
8776 (s390_ft_exit_vr): New const.
8777 (s390_ft_exit_misc): New const.
8778 (s390_ft_exit_gpr_esa): New const.
8779 (s390_ft_exit_gpr_zarch): New const.
8780 (append_insns): New function.
8781 (s390_relocate_instruction): New function.
8782 (s390_install_fast_tracepoint_jump_pad): New function.
8783 (s390_get_min_fast_tracepoint_insn_len): New function.
8784 (s390_get_ipa_tdesc_idx): New function.
8785 (struct linux_target_ops): Wire in the above functions.
8786 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
8787 * linux-s390-tdesc.h: New file.
8788
8789 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8790
8791 * linux-s390-low.c (s390_supports_tracepoints): New function.
8792 (struct linux_target_ops): Fill supports_tracepoints hook.
8793
8794 2016-03-18 Yao Qi <yao.qi@linaro.org>
8795
8796 * linux-low.c (lwp_signal_can_be_delivered): New function.
8797 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
8798
8799 2016-03-18 Yao Qi <yao.qi@linaro.org>
8800
8801 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
8802 0 if signal is enqueued. Remove 'signal' from one debugging
8803 message. Move one debugging message to some lines below.
8804 Remove code setting 'signal' to 0.
8805
8806 2016-03-18 Yao Qi <yao.qi@linaro.org>
8807
8808 * linux-low.c (linux_low_filter_event): Remove redundant
8809 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
8810
8811 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
8812
8813 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
8814 (struct linux_target_ops): Wire in the above.
8815
8816 2016-03-03 Yao Qi <yao.qi@linaro.org>
8817
8818 * linux-low.c: Update comments to start_step_over.
8819
8820 2016-03-03 Yao Qi <yao.qi@linaro.org>
8821
8822 PR server/19736
8823 * linux-low.c (handle_extended_wait): Set child suspended
8824 if event_lwp->bp_reinsert isn't zero.
8825
8826 2016-03-02 Yao Qi <yao.qi@linaro.org>
8827
8828 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
8829 enqueue_pending_signal.
8830
8831 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
8832
8833 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
8834 is actually loaded.
8835
8836 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8837
8838 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
8839 (s390_regmap_3264) [!__s390x__]: New global.
8840 (s390_collect_ptrace_register): Skip map entries containing -1.
8841 (s390_supply_ptrace_register): Ditto.
8842 (s390_fill_gprs_high): New function.
8843 (s390_store_gprs_high): New function.
8844 (s390_regsets): Add NT_S390_HIGH_GPRS.
8845 (s390_get_hwcap): Enable on 31-bit.
8846 (have_hwcap_s390_high_gprs): Enable on 31-bit.
8847 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
8848 Detect NT_S390_HIGH_GPRS.
8849 (s390_usrregs_info_3264): Enable on 31-bit.
8850 (s390_regs_info): Enable regs_info_3264 on 31-bit.
8851 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
8852
8853 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8854
8855 PR gdb/13808
8856 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
8857 * configure.srv: Ditto.
8858 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
8859 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
8860 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
8861 (init_registers_amd64_linux): Remove prototype.
8862 (tdesc_amd64_linux): Remove declaration.
8863 (get_ipa_tdesc): New function.
8864 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8865 initialize remaining tdescs.
8866 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
8867 (init_registers_i386_linux): Remove prototype.
8868 (tdesc_i386_linux): Remove declaration.
8869 (get_ipa_tdesc): New function.
8870 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8871 initialize remaining tdescs.
8872 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
8873 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
8874 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
8875 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
8876 (x86_get_ipa_tdesc_idx): New function.
8877 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
8878 * linux-x86-tdesc.h: New file.
8879 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
8880 (target_get_ipa_tdesc_idx): New macro.
8881 * tracepoint.c (ipa_tdesc_idx): New macro.
8882 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
8883 (symbol_list): Add ipa_tdesc_idx.
8884 (cmd_qtstart): Write ipa_tdesc_idx in the target.
8885 (ipa_tdesc): Remove.
8886 (ipa_tdesc_idx): New variable.
8887 (get_context_regcache): Use get_ipa_tdesc.
8888 (gdb_collect): Ditto.
8889 (gdb_probe): Ditto.
8890 * tracepoint.h (get_ipa_tdesc): New prototype.
8891 (ipa_tdesc): Remove.
8892
8893 2016-02-24 Pedro Alves <palves@redhat.com>
8894
8895 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
8896 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
8897 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
8898 Factor out common code between the USE_SIGTRAP_SIGINFO and
8899 !USE_SIGTRAP_SIGINFO blocks.
8900 (linux_low_filter_event): Call save_stop_reason instead of
8901 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
8902 Update comments.
8903 (linux_wait_1): Update comments.
8904
8905 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
8906
8907 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
8908 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
8909 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
8910 ppc_insert_point, ppc_remove_point.
8911
8912 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
8913
8914 * linux-s390-low.c (s390_supports_z_point_type): New function.
8915 (struct linux_target_ops): Wire s390_supports_z_point_type in.
8916
8917 2016-02-16 Yao Qi <yao.qi@linaro.org>
8918
8919 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
8920 PC. Get pc from regcache_read_pc.
8921
8922 2016-02-12 Yao Qi <yao.qi@linaro.org>
8923
8924 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
8925 or linux_get_pc_32bit.
8926 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
8927
8928 2016-02-12 Yao Qi <yao.qi@linaro.org>
8929
8930 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
8931 arm_linux_get_next_pcs_fixup.
8932
8933 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
8934
8935 * tracepoint.c (x_tracepoint_action_download): Change
8936 write_inferior_data_ptr to write_inferior_data_pointer.
8937 (cmd_qtstart): Likewise.
8938 (write_inferior_data_ptr): Remove.
8939 (download_agent_expr): Change write_inferior_data_ptr to
8940 write_inferior_data_pointer.
8941 (download_tracepoint_1): Likewise.
8942 (download_tracepoint): Likewise.
8943 (download_trace_state_variables): Likewise.
8944
8945 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
8946 Marcin Kościelnicki <koriakin@0x04.net>
8947
8948 * tracepoint.c (struct tracepoint_action_ops): Remove.
8949 (struct tracepoint_action): Remove ops.
8950 (m_tracepoint_action_download, r_tracepoint_action_download)
8951 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
8952 size and offset accordingly.
8953 (m_tracepoint_action_ops, r_tracepoint_action_ops)
8954 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
8955 (tracepoint_action_send, tracepoint_action_download): New functions.
8956 Helpers for trace action handlers.
8957 (add_tracepoint_action): Remove setup actions ops.
8958 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
8959
8960 2016-02-10 Yao Qi <yao.qi@linaro.org>
8961
8962 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
8963
8964 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8965
8966 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
8967 to AC_OUTPUT.
8968 * configure: Regenerate.
8969
8970 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
8971
8972 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
8973 void * to gdb_byte *.
8974 * linux-low.c (siginfo_fixup): Likewise.
8975 (linux_xfer_siginfo): Likewise.
8976 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
8977 Likewise.
8978 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8979
8980 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
8981
8982 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
8983 to srv_tgtobj.
8984 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
8985 to srv_tgtobj.
8986 * linux-x86-low.c [__x86_64__]: Include
8987 "nat/amd64-linux-siginfo.h".
8988 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
8989 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
8990 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
8991 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
8992 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
8993 (cpt_si_fd, si_timerid, si_overrun): Move from
8994 nat/amd64-linux-siginfo.c.
8995 * Makefile.in (amd64-linux-siginfo.o:): New rule.
8996
8997 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
8998
8999 * server.c (skip_to_semicolon): Remove.
9000 (process_point_options): Use strchrnul instead of
9001 skip_to_semicolon.
9002
9003 2016-01-26 Yao Qi <yao.qi@linaro.org>
9004
9005 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
9006 * linux-low.c (install_software_single_step_breakpoints): Don't
9007 call regcache_read_pc.
9008 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
9009 argument pc.
9010
9011 2016-01-26 Yao Qi <yao.qi@linaro.org>
9012
9013 * linux-low.c (install_software_single_step_breakpoints): Call
9014 regcache_read_pc instead of get_pc.
9015
9016 2016-01-26 Yao Qi <yao.qi@linaro.org>
9017
9018 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
9019 (unblock_async_io): Rename to ...
9020 (block_unblock_async_io): ... it. New function.
9021 (enable_async_io): Don't install SIGIO handler. Unblock it
9022 instead.
9023 (disable_async_io): Don't ignore SIGIO. Block it instead.
9024 (initialize_async_io): Install SIGIO handler. Don't call
9025 unblock_async_io.
9026
9027 2016-01-26 Yao Qi <yao.qi@linaro.org>
9028
9029 * remote-utils.c (getpkt): If the buffer isn't empty, and the
9030 first character is '\003', call *the_target->request_interrupt.
9031
9032 2016-01-25 Yao Qi <yao.qi@linaro.org>
9033
9034 * remote-utils.c (new_thread_notify): Remove.
9035 (dead_thread_notify): Likewise.
9036 * remote-utils.h (new_thread_notify): Remove declaration.
9037 (dead_thread_notify): Likewise.
9038
9039 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
9040
9041 * gdb.trace/pending.exp: Fix expected message on continue.
9042
9043 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
9044
9045 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
9046 it works properly on big-endian machines where sizeof (CORE_ADDR)
9047 != sizeof (void *).
9048
9049 2016-01-21 Pedro Alves <palves@redhat.com>
9050
9051 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
9052 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
9053 * configure: Regenerate.
9054
9055 2016-01-21 Yao Qi <yao.qi@linaro.org>
9056
9057 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
9058 is_thumb and set it according to CPSR saved on the stack.
9059 (get_next_pcs_syscall_next_pc): Pass is_thumb to
9060 arm_sigreturn_next_pc.
9061
9062 2016-01-18 Yao Qi <yao.qi@linaro.org>
9063
9064 * linux-low.c (linux_set_pc_64bit): New function.
9065 (linux_get_pc_64bit): New function.
9066 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
9067 Declare.
9068 * linux-sparc-low.c (debug_threads): Remove declaration.
9069 (sparc_get_pc): Remove.
9070 (the_low_target): Use linux_get_pc_64bit instead of
9071 sparc_get_pc.
9072 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
9073 (the_low_target): Use linux_get_pc_64bit and
9074 linux_set_pc_64bit.
9075
9076 2016-01-18 Yao Qi <yao.qi@linaro.org>
9077
9078 * linux-arm-low.c (debug_threads): Remove declaration.
9079 (arm_get_pc, arm_set_pc): Remove.
9080 (the_low_target): Use linux_get_pc_32bit and
9081 linux_set_pc_32bit.
9082 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
9083 (the_low_target): Use linux_get_pc_32bit and
9084 linux_set_pc_32bit.
9085 * linux-cris-low.c (debug_threads): Remove declaration.
9086 (cris_get_pc, cris_set_pc,): Remove.
9087 (the_low_target): Use linux_get_pc_32bit and
9088 linux_set_pc_32bit.
9089 * linux-crisv32-low.c (debug_threads): Remove declaration.
9090 (cris_get_pc, cris_set_pc): Remove.
9091 (the_low_target): Use linux_get_pc_32bit and
9092 linux_set_pc_32bit.
9093 * linux-low.c: Include inttypes.h.
9094 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
9095 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
9096 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
9097 (the_low_target): Use linux_get_pc_32bit and
9098 linux_set_pc_32bit.
9099 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
9100 (the_low_target): Use linux_get_pc_32bit and
9101 linux_set_pc_32bit.
9102 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
9103 (the_low_target): Use linux_get_pc_32bit and
9104 linux_set_pc_32bit.
9105 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
9106 (the_low_target): Use linux_get_pc_32bit and
9107 linux_set_pc_32bit.
9108 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
9109 (the_low_target): Use linux_get_pc_32bit and
9110 linux_set_pc_32bit.
9111
9112 2016-01-18 Gary Benson <gbenson@redhat.com>
9113
9114 * configure.ac (AC_FUNC_FORK): New check.
9115 * config.in: Regenerate.
9116 * configure: Likewise.
9117
9118 2016-01-14 Yao Qi <yao.qi@linaro.org>
9119
9120 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
9121 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
9122 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
9123 arm_get_next_pcs_ctor.
9124
9125 2016-01-12 Josh Stone <jistone@redhat.com>
9126 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9127
9128 * inferiors.h: Include "gdb_vecs.h".
9129 (struct process_info): Add syscalls_to_catch.
9130 * inferiors.c (remove_process): Free syscalls_to_catch.
9131 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
9132 syscall_return stops.
9133 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
9134 * server.c (handle_general_set): Handle QCatchSyscalls.
9135 (handle_query): Report support for QCatchSyscalls.
9136 * target.h (struct target_ops): Add supports_catch_syscall.
9137 (target_supports_catch_syscall): New macro.
9138 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
9139 (struct lwp_info): Add syscall_state.
9140 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
9141 Maintain syscall_state and syscalls_to_catch across exec.
9142 (get_syscall_trapinfo): New function, proxy to the_low_target.
9143 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
9144 (linux_low_filter_event): Toggle syscall_state entry/return for
9145 syscall traps, and set it ignored for all others.
9146 (gdb_catching_syscalls_p): New function.
9147 (gdb_catch_this_syscall_p): New function.
9148 (linux_wait_1): Handle SYSCALL_SIGTRAP.
9149 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
9150 (linux_supports_catch_syscall): New function.
9151 (linux_target_ops): Install it.
9152 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
9153 (the_low_target): Install it.
9154
9155 2016-01-12 Mike Frysinger <vapier@gentoo.org>
9156
9157 * acinclude.m4: Include new ../warning.m4 file.
9158 * configure: Regenerated.
9159 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
9160
9161 2016-01-12 Mike Frysinger <vapier@gentoo.org>
9162
9163 * ax.c (is_goto_target): Mark static.
9164 * linux-low.c (register_addr): Likewise.
9165 (linux_fetch_registers, linux_store_registers): Likewise.
9166 * mem-break.c (any_persistent_commands): Fix old prototype.
9167 (add_commands_to_breakpoint): Mark static.
9168 * regcache.c (find_register_by_name): Delete unused func.
9169 * remote-utils.c (hex_or_minus_one): Mark static.
9170 * server.c (monitor_show_help): Mark static.
9171 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
9172 handle_v_requests): Likewise.
9173
9174 2016-01-12 Pedro Alves <palves@redhat.com>
9175
9176 Remove use of the registered trademark symbol throughout.
9177
9178 2016-01-08 Yao Qi <yao.qi@linaro.org>
9179
9180 * remote-utils.c (getpkt): If c is '\003', call target hook
9181 request_interrupt.
9182
9183 2016-01-06 Yao Qi <yao.qi@linaro.org>
9184
9185 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
9186 linux-aarch32-low.c.
9187 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9188 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
9189 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9190 (thumb2_breakpoint): Declare.
9191 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
9192 linux-aarch32-low.h.
9193 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9194 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
9195 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9196
9197 2016-01-01 Joel Brobecker <brobecker@adacore.com>
9198
9199 * gdbreplay.c (gdbreplay_version): Change copyright year in
9200 version message.
9201 * server.c (gdbserver_version): Likewise.
9202
9203 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
9204
9205 * server.c (crc32_table): Delete.
9206 (crc32): Use libiberty's xcrc32 function.
9207
9208 2015-12-22 Joel Brobecker <brobecker@adacore.com>
9209
9210 * lynx-low.c (lynx_delete_thread_callback): New function.
9211 (lynx_mourn): Properly delete our process and all of its
9212 threads. Remove call to clear_inferiors.
9213
9214 2015-12-22 Joel Brobecker <brobecker@adacore.com>
9215
9216 * target.c (thread_search_callback): Add check that
9217 the thread_stopped target callback is not NULL before
9218 calling it.
9219
9220 2015-12-21 Yao Qi <yao.qi@linaro.org>
9221
9222 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
9223 arm breakpoint.
9224
9225 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9226
9227 * server.c (handle_query): Call target_supports_software_single_step.
9228
9229 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9230
9231 * linux-low.c (single_step): New function.
9232 (linux_resume_one_lwp_throw): Call single_step.
9233 (start_step_over): Likewise.
9234
9235 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9236
9237 * Makefile.in (SFILES): Append arch/arm-linux.c,
9238 arch/arm-get-next-pcs.c.
9239 (arm-linux.o): New rule.
9240 (arm-get-next-pcs.o): New rule.
9241 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
9242 arm-linux.o.
9243 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
9244 to linux-aarch32-low.c.
9245 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9246 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9247 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9248 (thumb2_breakpoint_len): Likewise.
9249 (arm_is_thumb_mode): Make non-static.
9250 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
9251 from linux-aarch32-low.c.
9252 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9253 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9254 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9255 (thumb2_breakpoint_len): Likewise.
9256 (arm_is_thumb_mode): New declaration.
9257 * linux-arm-low.c: Include arch/arm-linux.h
9258 aarch/arm-get-next-pcs.h, sys/syscall.h.
9259 (get_next_pcs_ops): New struct.
9260 (get_next_pcs_addr_bits_remove): New function.
9261 (get_next_pcs_is_thumb): New function.
9262 (get_next_pcs_read_memory_unsigned_integer): Likewise.
9263 (arm_sigreturn_next_pc): Likewise.
9264 (get_next_pcs_syscall_next_pc): Likewise.
9265 (arm_gdbserver_get_next_pcs): Likewise.
9266 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
9267 Initialize.
9268 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
9269 * server.h: Include gdb_vecs.h.
9270
9271 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9272
9273 * Makefile.in (SFILES): Append common/common-regcache.c.
9274 (OBS): Append common-regcache.o.
9275 (common-regcache.o): New rule.
9276 * regcache.c (init_register_cache): Initialize cache to
9277 REG_UNAVAILABLE.
9278 (regcache_raw_read_unsigned): New function.
9279 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
9280 register_status enum.
9281
9282 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9283
9284 * linux-aarch64-low.c (the_low_targets): Rename
9285 breakpoint_reinsert_addr to get_next_pcs.
9286 * linux-arm-low.c (the_low_targets): Likewise.
9287 * linux-bfin-low.c (the_low_targets): Likewise.
9288 * linux-cris-low.c (the_low_targets): Likewise.
9289 * linux-crisv32-low.c (the_low_targets): Likewise.
9290 * linux-low.c (can_software_single_step): Likewise.
9291 (install_software_single_step_breakpoints): New function.
9292 (start_step_over): Use install_software_single_step_breakpoints.
9293 * linux-low.h: New CORE_ADDR vector.
9294 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
9295 get_next_pcs.
9296 * linux-mips-low.c (the_low_targets): Likewise.
9297 * linux-nios2-low.c (the_low_targets): Likewise.
9298 * linux-sparc-low.c (the_low_targets): Likewise.
9299
9300 2015-12-17 Pedro Alves <palves@redhat.com>
9301
9302 * linux-low.c (linux_kill_one_lwp): Remove references to
9303 LinuxThreads.
9304 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
9305 to 'kill'.
9306 (linux_init_signals): Delete.
9307 (initialize_low): Adjust.
9308 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
9309
9310 2015-12-16 Pedro Alves <palves@redhat.com>
9311
9312 * configure.ac (compiler warning flags): When testing a
9313 -Wno-foo option, check whether -Wfoo works instead.
9314 * configure: Regenerate.
9315
9316 2015-12-11 Don Breazeal <donb@codesourcery.com>
9317
9318 * server.c (process_serial_event): Don't exit from gdbserver
9319 in remote mode if there are still active inferiors.
9320
9321 2015-12-11 Yao Qi <yao.qi@linaro.org>
9322
9323 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
9324 arm_breakpoint_at if the process is 32-bit.
9325
9326 2015-12-11 Yao Qi <yao.qi@linaro.org>
9327
9328 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
9329 arm breakpoint.
9330
9331 2015-12-07 Yao Qi <yao.qi@linaro.org>
9332
9333 * configure.srv: Append arm.o to srv_tgtobj for
9334 aarch64*-*-linux* target.
9335 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
9336 from linux-arm-low.c.
9337 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9338 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9339 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9340 (thumb2_breakpoint_len): Likewise.
9341 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
9342 (arm_breakpoint_kinds): Likewise.
9343 (arm_breakpoint_kind_from_pc): Likewise.
9344 (arm_sw_breakpoint_from_kind): Likewise.
9345 (arm_breakpoint_kind_from_current_state): Likewise.
9346 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
9347 (arm_sw_breakpoint_from_kind): Declare.
9348 (arm_breakpoint_kind_from_current_state): Declare.
9349 (arm_breakpoint_at): Declare.
9350 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
9351 arm_sw_breakpoint_from_kind if process is 32-bit.
9352 (aarch64_breakpoint_kind_from_pc): New function.
9353 (aarch64_breakpoint_kind_from_current_state): New function.
9354 (the_low_target): Initialize fields breakpoint_kind_from_pc
9355 and breakpoint_kind_from_current_state.
9356 * linux-arm-low.c (arm_breakpoint_kinds): Move to
9357 linux-aarch32-low.c.
9358 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
9359 (arm_breakpoint, arm_breakpoint_len): Likewise.
9360 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
9361 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9362 (arm_is_thumb_mode): Likewise.
9363 (arm_breakpoint_at): Likewise.
9364 (arm_breakpoint_kind_from_pc): Likewise.
9365 (arm_sw_breakpoint_from_kind): Likewise.
9366 (arm_breakpoint_kind_from_current_state): Likewise.
9367
9368 Revert:
9369 2015-08-04 Yao Qi <yao.qi@linaro.org>
9370
9371 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
9372 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
9373 * server.c (extended_protocol): Remove "static".
9374 * server.h (extended_protocol): Declare it.
9375
9376 2015-12-04 Josh Stone <jistone@redhat.com>
9377
9378 * target.h (struct target_ops) <arch_setup>: Rename to ...
9379 (struct target_ops) <post_create_inferior>: ... this.
9380 (target_arch_setup): Rename to ...
9381 (target_post_create_inferior): ... this, calling post_create_inferior.
9382 * server.c (start_inferior): Update target_arch_setup calls to
9383 target_post_create_inferior.
9384 * linux-low.c (linux_low_ptrace_options): Forward declare.
9385 (linux_arch_setup): Update its comment for general use.
9386 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
9387 (struct linux_target_ops): Use linux_post_create_inferior.
9388 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
9389 to post_create_inferior.
9390 * nto-low.c (struct nto_target_ops): Likewise.
9391 * spu-low.c (struct spu_target_ops): Likewise.
9392 * win32-low.c (struct win32_target_ops): Likewise.
9393
9394 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
9395
9396 * linux-arm-low.c: Remove duplicate arch/arm.h include.
9397
9398 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9399
9400 * linux-arm-low.c (arm_reinsert_addr): Remove function.
9401 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
9402 * linux-cris-low.c (cris_reinsert_addr> Remove function.
9403 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9404 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
9405 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9406 * linux-mips-low.c (mips_reinsert_addr): Remove function.
9407 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9408 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
9409 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9410 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
9411 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9412
9413 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9414
9415 * linux-low.c (linux_look_up_symbols): Don't call
9416 linux_supports_traceclone.
9417 * linux-low.h (thread_db_init): Remove use_events argument.
9418 * thread-db.c (thread_db_use_event): Remove global variable.
9419 (struct thread_db) <td_thr_event_enable_p>: Remove field.
9420 (struct thread_db) <td_create_bp>: Remove field.
9421 (thread_db_create_event): Remove function.
9422 (thread_db_enable_reporting): Likewise.
9423 (find_one_thread): Don't check for thread_db_use_events.
9424 (attach_thread): Likewise.
9425 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
9426 (try_thread_db_load_1): Don't check for thread_db_use_events.
9427 (thread_db_init): Remove use_events argument and thread events
9428 handling.
9429 (remove_thread_event_breakpoints): Remove function.
9430 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
9431
9432 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9433
9434 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
9435 New function.
9436 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9437 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
9438 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9439 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
9440 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
9441 Initialize.
9442 * linux-crisv32-low.c (cris_supports_hardware_single_step):
9443 New function.
9444 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9445 * linux-low.c (can_hardware_single_step): Use
9446 supports_hardware_single_step.
9447 (can_software_single_step): New function.
9448 (start_step_over): Call can_software_single_step.
9449 (linux_supports_hardware_single_step): New function.
9450 (struct target_ops) <supports_software_single_step>: Initialize.
9451 * linux-low.h (struct linux_target_ops)
9452 <supports_hardware_single_step>: Initialize.
9453 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
9454 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9455 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
9456 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
9457 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
9458 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9459 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
9460 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9461 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
9462 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
9463 Initialize.
9464 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
9465 (struct linux_target_ops) <tile_supports_hardware_single_step>:
9466 Initialize.
9467 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
9468 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9469 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
9470 New function.
9471 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9472 * target.h (struct target_ops): <supports_software_single_step>:
9473 New field.
9474 (target_supports_software_single_step): New macro.
9475
9476 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9477
9478 * linux-low.c (linux_wait_1): Fix pc advance condition.
9479 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
9480 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
9481
9482 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9483
9484 * linux-arm-low.c (arm_is_thumb_mode): New function.
9485 (arm_breakpoint_at): Use arm_is_thumb_mode.
9486 (arm_breakpoint_kind_from_current_state): New function.
9487 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
9488 Initialize.
9489 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
9490 (linux_breakpoint_kind_from_current_state): New function.
9491 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
9492 * linux-low.h (struct linux_target_ops)
9493 <breakpoint_kind_from_current_state>: New field.
9494 * target.h (struct target_ops): Likewise.
9495 (target_breakpoint_kind_from_current_state): New macro.
9496
9497 2015-11-30 Pedro Alves <palves@redhat.com>
9498
9499 * linux-low.c (linux_resume): Wake up the event loop before
9500 returning.
9501
9502 2015-11-30 Pedro Alves <palves@redhat.com>
9503
9504 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
9505 check.
9506 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
9507 to -1.
9508 * target.c (struct thread_search): New structure.
9509 (thread_search_callback): New function.
9510 (prev_general_thread): New global.
9511 (prepare_to_access_memory, done_accessing_memory): New functions.
9512 * target.h (prepare_to_access_memory, done_accessing_memory):
9513 Replace macros with function declarations.
9514
9515 2015-11-30 Pedro Alves <palves@redhat.com>
9516
9517 PR 14618
9518 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
9519 report TARGET_WAITKIND_NO_RESUMED.
9520 * remote-utils.c (prepare_resume_reply): Handle
9521 TARGET_WAITKIND_NO_RESUMED.
9522 * server.c (report_no_resumed): New global.
9523 (handle_query) <qSupported>: Handle "no-resumed+". Report
9524 "no-resumed+" support.
9525 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
9526 return error if the client doesn't support no-resumed events.
9527 (push_stop_notification): New function.
9528 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
9529 events if the client supports them.
9530
9531 2015-11-30 Pedro Alves <palves@redhat.com>
9532
9533 * linux-low.c (thread_still_has_status_pending_p): Don't check
9534 vCont;t here.
9535 (lwp_resumed): New function.
9536 (status_pending_p_callback): Return early if the LWP is not
9537 supposed to be resumed.
9538
9539 2015-11-30 Pedro Alves <palves@redhat.com>
9540
9541 * linux-low.c (handle_extended_wait): Assert that the LWP's
9542 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
9543 thread create events, leave the new child's status pending.
9544 (linux_low_filter_event): If GDB wants to hear about thread exit
9545 events, leave the LWP marked dead and don't delete it.
9546 (linux_wait_for_event_filtered): Don't check for thread exit.
9547 (filter_exit_event): New function.
9548 (linux_wait_1): Use it, when returning an exit event.
9549 (linux_resume_one_lwp_throw): Assert that the LWP's
9550 waitstatus is TARGET_WAITKIND_IGNORE.
9551 * remote-utils.c (prepare_resume_reply): Handle
9552 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
9553 * server.c (report_thread_events): New global.
9554 (handle_general_set): Handle QThreadEvents.
9555 (handle_query) <qSupported>: Handle and report QThreadEvents+;
9556 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
9557 TARGET_WAITKIND_THREAD_EXITED.
9558 * server.h (report_thread_events): Declare.
9559
9560 2015-11-30 Pedro Alves <palves@redhat.com>
9561
9562 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
9563 the thread's last_resume_kind was resume_stop.
9564
9565 2015-11-30 Pedro Alves <palves@redhat.com>
9566
9567 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
9568 before returning.
9569
9570 2015-11-30 Pedro Alves <palves@redhat.com>
9571
9572 * server.c (handle_v_requests): Handle vCtrlC.
9573
9574 2015-11-30 Pedro Alves <palves@redhat.com>
9575
9576 * gdbthread.h (find_any_thread_of_pid): Declare.
9577 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
9578 functions.
9579 * server.c (handle_query): If current_thread is NULL, look for
9580 another thread of the selected process.
9581
9582 2015-11-26 Daniel Colascione <dancol@dancol.org>
9583 Simon Marchi <simon.marchi@ericsson.com>
9584
9585 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
9586 * server.c (handle_qxfer_threads_worker): Refactor to include thread
9587 name in reply.
9588 * target.h (struct target_ops) <thread_name>: New field.
9589 (target_thread_name): New macro.
9590
9591 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9592
9593 * regcache.h (regcache_invalidate_pid): Add declaration.
9594 * regcache.c (regcache_invalidate_pid): New function, extracted
9595 from regcache_invalidate.
9596 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
9597 Add trivial documentation comment.
9598 * lynx-low.c: Use regcache_invalidate_pid instead of
9599 regcache_invalidate.
9600
9601 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9602
9603 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
9604 and Elf64_auxv_t if the target is Android.
9605
9606 2015-11-22 Doug Evans <xdje42@gmail.com>
9607
9608 * target.h: #include <sys/types.h>.
9609
9610 2015-11-19 Pedro Alves <palves@redhat.com>
9611
9612 * linux-low.c (linux_process_qsupported): Change prototype.
9613 Adjust.
9614 * linux-low.h (struct linux_target_ops) <process_qsupported>:
9615 Change prototype.
9616 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
9617 and adjust to loop over all features.
9618 * server.c (handle_query) <qSupported>: Adjust to call
9619 target_process_qsupported once, passing it a vector of unprocessed
9620 features.
9621 * target.h (struct target_ops) <process_qsupported>: Change
9622 prototype.
9623 (target_process_qsupported): Adjust.
9624
9625 2015-11-19 Pedro Alves <palves@redhat.com>
9626
9627 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
9628 mode.
9629 * configure: Regenerate.
9630
9631 2015-11-19 Pedro Alves <palves@redhat.com>
9632
9633 * configure: Regenerate.
9634
9635 2015-11-19 Yao Qi <yao.qi@linaro.org>
9636
9637 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
9638 type to uint32_t.
9639
9640 2015-11-19 Yao Qi <yao.qi@linaro.org>
9641
9642 * linux-aarch64-low.c (enum aarch64_operand_type): New.
9643 (struct aarch64_operand): Move enum out.
9644
9645 2015-11-19 Yao Qi <yao.qi@linaro.org>
9646
9647 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
9648 struct user_fpsimd_state *.
9649 (aarch64_store_fpregset): Likewise.
9650
9651 2015-11-19 Yao Qi <yao.qi@linaro.org>
9652
9653 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
9654 struct user_pt_regs *.
9655 (aarch64_store_gregset): Likewise.
9656
9657 2015-11-18 Pedro Alves <palves@redhat.com>
9658
9659 * Makefile.in (all_object_files): Add $IPA_OBJS.
9660
9661 2015-11-17 Pedro Alves <palves@redhat.com>
9662
9663 * win32-low.c (win32_resume): Use gdb_signal_from_host,
9664 GDB_SIGNAL_0 and gdb_signal_to_string.
9665
9666 2015-11-17 Pedro Alves <palves@redhat.com>
9667
9668 * win32-low.c (handle_output_debug_string): Remove parameter.
9669 (win32_kill): Remove our_status local and adjust call to
9670 handle_output_debug_string.
9671 (get_child_debug_event): Adjust call to
9672 handle_output_debug_string.
9673
9674 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9675
9676 * linux-mips-low.c (mips_fill_gregset): Add cast.
9677 (mips_store_gregset): Likewise.
9678 (mips_fill_fpregset): Likewise.
9679 (mips_store_fpregset): Likewise.
9680
9681 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9682
9683 * linux-mips-low.c (mips_add_watchpoint): Rename private to
9684 priv.
9685
9686 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9687
9688 * linux-mips-low.c (mips_linux_new_thread): Change type of
9689 watch_type to enum target_hw_bp_type.
9690
9691 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9692
9693 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
9694 Change return type to arm_hwbp_type.
9695
9696 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9697
9698 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
9699 (arm_store_gregset): Likewise.
9700 * linux-arm-low.c (arm_get_hwcap): Likewise.
9701 (arm_read_description): Likewise.
9702
9703 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9704
9705 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
9706
9707 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9708
9709 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
9710 (ppc_fill_vsxregset): Likewise.
9711 (ppc_store_vsxregset): Likewise.
9712 (ppc_fill_vrregset): Likewise.
9713 (ppc_store_vrregset): Likewise.
9714 (ppc_fill_evrregset): Likewise.
9715 (ppc_store_evrregset): Likewise.
9716
9717 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9718
9719 * linux-ppc-low.c (ppc_usrregs_info): Remove
9720 forward-declaration.
9721 (ppc_arch_setup): Move lower in file.
9722
9723 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
9724
9725 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
9726 (ps_pdwrite): Likewise.
9727
9728 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
9729
9730 * linux-arm-low.c (arm_new_thread): Move pointer dereference
9731 to after assert checks.
9732
9733 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
9734
9735 * proc-service.c (ps_pdread): Add/adjust casts.
9736 (ps_pdwrite): Add/adjust casts.
9737
9738 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9739
9740 * server.c (handle_search_memory_1): Cast return value of
9741 memmem.
9742
9743 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9744
9745 * server.c (write_qxfer_response): Change type of data to
9746 gdb_byte *.
9747
9748 2015-10-29 Pedro Alves <palves@redhat.com>
9749
9750 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
9751
9752 2015-10-29 Pedro Alves <palves@redhat.com>
9753
9754 * tracepoint.c (clear_installed_tracepoints): Add casts.
9755
9756 2015-10-29 Pedro Alves <palves@redhat.com>
9757
9758 * server.c (handle_v_cont, process_serial_event): Add enum
9759 gdb_signal casts to signal parsing code.
9760
9761 2015-10-29 Pedro Alves <palves@redhat.com>
9762
9763 * linux-low.h (NULL_REGSET): Define.
9764 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9765 * linux-arm-low.c (arm_regsets): Likewise.
9766 * linux-crisv32-low.c (cris_regsets): Likewise.
9767 * linux-m68k-low.c (m68k_regsets): Likewise.
9768 * linux-mips-low.c (mips_regsets): Likewise.
9769 * linux-nios2-low.c (nios2_regsets): Likewise.
9770 * linux-ppc-low.c (ppc_regsets): Likewise.
9771 * linux-s390-low.c (s390_regsets): Likewise.
9772 * linux-sh-low.c (sh_regsets): Likewise.
9773 * linux-sparc-low.c (sparc_regsets): Likewise.
9774 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9775 * linux-tile-low.c (tile_regsets): Likewise.
9776 * linux-x86-low.c (x86_regsets): Likewise.
9777 * linux-xtensa-low.c (xtensa_regsets): Likewise.
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-26 Doug Evans <dje@google.com>
9798
9799 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
9800
9801 2015-10-26 Doug Evans <dje@google.com>
9802
9803 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
9804
9805 2015-10-26 Doug Evans <dje@google.com>
9806
9807 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
9808 for debug_printf.
9809 (attach_thread, find_new_threads_callback): Ditto.
9810
9811 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9812
9813 * mem-break.h (set_breakpoint_data): Remove.
9814
9815 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9816
9817 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
9818 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9819 (initialize_low): Remove set_breakpoint_data call.
9820 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
9821 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
9822 (initialize_low): Remove set_breakpoint_data call.
9823 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
9824 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9825 (initialize_low): Remove set_breakpoint_data call.
9826
9827 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9828
9829 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
9830 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
9831 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
9832 * target.h (target_breakpoint_kind_from_pc): New macro.
9833
9834 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
9835
9836 * linux-low.c (default_breakpoint_kind_from_pc): New function.
9837 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
9838 the default breakpoint kind.
9839
9840 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9841
9842 * linux-arm-low.c (arm_supports_z_point_type): Add software
9843 breakpoint support.
9844
9845 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9846
9847 * linux-arm-low.c: Refactor breakpoint definitions.
9848 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
9849 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
9850
9851 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9852
9853 * Makefile.in: Add arm.c/o.
9854 * configure.srv: Likewise.
9855 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
9856 (arm_breakpoint_kind_from_pc): New function.
9857 (arm_sw_breakpoint_from_kind): Return proper kind.
9858 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
9859
9860 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9861
9862 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
9863 removal.
9864 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
9865 (struct raw_breakpoint) <size>: Remove.
9866 (struct raw_breakpoint) <kind>: Add.
9867 (bp_size): New function.
9868 (bp_opcode): Likewise.
9869 (find_raw_breakpoint_at): Adjust for kind.
9870 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
9871 (remove_memory_breakpoint): Adjust for kind call bp_size.
9872 (set_raw_breakpoint_at): Adjust for kind.
9873 (set_breakpoint): Likewise.
9874 (set_breakpoint_at): Call breakpoint_kind_from_pc.
9875 (delete_raw_breakpoint): Adjust for kind.
9876 (delete_breakpoint): Likewise.
9877 (find_gdb_breakpoint): Likewise.
9878 (set_gdb_breakpoint_1): Likewise.
9879 (set_gdb_breakpoint): Likewise.
9880 (delete_gdb_breakpoint_1): Likewise.
9881 (delete_gdb_breakpoint): Likewise.
9882 (uninsert_raw_breakpoint): Likewise.
9883 (reinsert_raw_breakpoint): Likewise.
9884 (set_breakpoint_data): Remove.
9885 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
9886 (check_mem_read): Adjust for kind call bp_size.
9887 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
9888 (clone_one_breakpoint): Adjust for kind.
9889 * mem-break.h (set_gdb_breakpoint): Likewise.
9890 (delete_gdb_breakpoint): Likewise.
9891 * server.c (process_serial_event): Likewise.
9892
9893 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9894
9895 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
9896 (struct linux_target_ops) <breakpoint>: Remove.
9897 (struct linux_target_ops) <breakpoint_len>: Remove.
9898 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9899 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9900 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
9901 (arm_sw_breakpoint_from_kind): New function.
9902 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
9903 (struct linux_target_ops) <breakpoint>: Remove.
9904 (struct linux_target_ops) <breakpoint_len>: Remove.
9905 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9906 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9907 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
9908 (struct linux_target_ops) <breakpoint>: Remove.
9909 (struct linux_target_ops) <breakpoint_len>: Remove.
9910 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9911 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9912 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
9913 (struct linux_target_ops) <breakpoint>: Remove.
9914 (struct linux_target_ops) <breakpoint_len>: Remove.
9915 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9916 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9917 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
9918 and sw_breakpoint_from_kind to increment the pc.
9919 (linux_breakpoint_kind_from_pc): New function.
9920 (linux_sw_breakpoint_from_kind): New function.
9921 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
9922 (initialize_low): Call breakpoint_kind_from_pc and
9923 sw_breakpoint_from_kind to replace breakpoint_data/len.
9924 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
9925 New field.
9926 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
9927 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
9928 (struct linux_target_ops) <breakpoint>: Remove.
9929 (struct linux_target_ops) <breakpoint_len>: Remove.
9930 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9931 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9932 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
9933 (struct linux_target_ops) <breakpoint>: Remove.
9934 (struct linux_target_ops) <breakpoint_len>: Remove.
9935 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9936 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9937 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
9938 (struct linux_target_ops) <breakpoint>: Remove.
9939 (struct linux_target_ops) <breakpoint_len>: Remove.
9940 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9941 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9942 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
9943 (struct linux_target_ops) <breakpoint>: Remove.
9944 (struct linux_target_ops) <breakpoint_len>: Remove.
9945 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9946 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9947 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
9948 (struct linux_target_ops) <breakpoint>: Remove.
9949 (struct linux_target_ops) <breakpoint_len>: Remove.
9950 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9951 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9952 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
9953 (struct linux_target_ops) <breakpoint>: Remove.
9954 (struct linux_target_ops) <breakpoint_len>: Remove.
9955 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9956 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9957 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
9958 (struct linux_target_ops) <breakpoint>: Remove.
9959 (struct linux_target_ops) <breakpoint_len>: Remove.
9960 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9961 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9962 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
9963 (struct linux_target_ops) <breakpoint>: Remove.
9964 (struct linux_target_ops) <breakpoint_len>: Remove.
9965 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9966 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9967 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
9968 (struct linux_target_ops) <breakpoint>: Remove.
9969 (struct linux_target_ops) <breakpoint_len>: Remove.
9970 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9971 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9972 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
9973 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
9974 (struct linux_target_ops) <breakpoint>: Remove.
9975 (struct linux_target_ops) <breakpoint_len>: Remove.
9976 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9977 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9978 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
9979 (struct linux_target_ops) <breakpoint>: Remove.
9980 (struct linux_target_ops) <breakpoint_len>: Remove.
9981 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9982 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9983
9984 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9985
9986 * linux-cris-low.c (cris_get_pc): Remove void arg.
9987
9988 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9989
9990 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
9991 variable name.
9992
9993 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
9994
9995 * inferiors.c (thread_pid_matches_callback): New function.
9996 (find_thread_process): New function.
9997 (remove_thread): Reset current_thread.
9998 (remove_process): Assert threads have been removed first.
9999
10000 2015-10-15 Yao Qi <yao.qi@linaro.org>
10001
10002 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
10003 if it is 3.
10004 (aarch64_remove_point): Likewise.
10005 * regcache.c (regcache_register_size): New function.
10006
10007 2015-10-12 Yao Qi <yao.qi@linaro.org>
10008
10009 * linux-aarch64-low.c: Update all callers as emit_load_store
10010 is renamed to aarch64_emit_load_store.
10011
10012 2015-10-12 Yao Qi <yao.qi@linaro.org>
10013
10014 * linux-aarch64-low.c: Update all callers of function renaming
10015 from emit_insn to aarch64_emit_insn.
10016
10017 2015-10-12 Yao Qi <yao.qi@linaro.org>
10018
10019 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
10020 arch/aarch64-insn.h.
10021 (struct aarch64_memory_operand): Likewise.
10022 (ENCODE): Likewise.
10023 (emit_insn): Move to arch/aarch64-insn.c.
10024 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
10025 (emit_load_store): Move to arch/aarch64-insn.c.
10026 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
10027 (can_encode_int32): Remove.
10028
10029 2015-10-12 Yao Qi <yao.qi@linaro.org>
10030
10031 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
10032 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
10033 (aarch64_relocate_instruction): Likewise.
10034 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
10035 (struct aarch64_insn_visitor): Likewise.
10036
10037 2015-10-12 Yao Qi <yao.qi@linaro.org>
10038
10039 * linux-aarch64-low.c (struct aarch64_insn_data): New.
10040 (struct aarch64_insn_visitor): New.
10041 (struct aarch64_insn_relocation_data): New.
10042 (aarch64_ftrace_insn_reloc_b): New function.
10043 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
10044 (aarch64_ftrace_insn_reloc_cb): Likewise.
10045 (aarch64_ftrace_insn_reloc_tb): Likewise.
10046 (aarch64_ftrace_insn_reloc_adr): Likewise.
10047 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
10048 (aarch64_ftrace_insn_reloc_others): Likewise.
10049 (visitor): New.
10050 (aarch64_relocate_instruction): Use visitor.
10051
10052 2015-10-12 Yao Qi <yao.qi@linaro.org>
10053
10054 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
10055 int. Add argument buf.
10056 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
10057 aarch64_relocate_instruction.
10058
10059 2015-10-12 Yao Qi <yao.qi@linaro.org>
10060
10061 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
10062 argument insn. Remove local variable insn. Don't call
10063 target_read_uint32.
10064 (aarch64_install_fast_tracepoint_jump_pad): Call
10065 target_read_uint32.
10066
10067 2015-09-30 Yao Qi <yao.qi@linaro.org>
10068
10069 * linux-aarch64-low.c (emit_movk): Shorten a long line.
10070 (emit_load_store_pair): Likewise.
10071
10072 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
10073
10074 * dll.c (match_dll): Add cast(s).
10075 (unloaded_dll): Likewise.
10076 * linux-low.c (second_thread_of_pid_p): Likewise.
10077 (delete_lwp_callback): Likewise.
10078 (count_events_callback): Likewise.
10079 (select_event_lwp_callback): Likewise.
10080 (linux_set_resume_request): Likewise.
10081 * server.c (accumulate_file_name_length): Likewise.
10082 (emit_dll_description): Likewise.
10083 (handle_qxfer_threads_worker): Likewise.
10084 (visit_actioned_threads): Likewise.
10085 * thread-db.c (any_thread_of): Likewise.
10086 * tracepoint.c (same_process_p): Likewise.
10087 (match_blocktype): Likewise.
10088 (build_traceframe_info_xml): Likewise.
10089
10090 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
10091
10092 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
10093 assignment.
10094 (gdb_unparse_agent_expr): Likewise.
10095 * hostio.c (require_data): Likewise.
10096 (handle_pread): Likewise.
10097 * linux-low.c (disable_regset): Likewise.
10098 (fetch_register): Likewise.
10099 (store_register): Likewise.
10100 (get_dynamic): Likewise.
10101 (linux_qxfer_libraries_svr4): Likewise.
10102 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
10103 (set_fast_tracepoint_jump): Likewise.
10104 (uninsert_fast_tracepoint_jumps_at): Likewise.
10105 (reinsert_fast_tracepoint_jumps_at): Likewise.
10106 (validate_inserted_breakpoint): Likewise.
10107 (clone_agent_expr): Likewise.
10108 * regcache.c (init_register_cache): Likewise.
10109 * remote-utils.c (putpkt_binary_1): Likewise.
10110 (decode_M_packet): Likewise.
10111 (decode_X_packet): Likewise.
10112 (look_up_one_symbol): Likewise.
10113 (relocate_instruction): Likewise.
10114 (monitor_output): Likewise.
10115 * server.c (handle_search_memory): Likewise.
10116 (handle_qxfer_exec_file): Likewise.
10117 (handle_qxfer_libraries): Likewise.
10118 (handle_qxfer): Likewise.
10119 (handle_query): Likewise.
10120 (handle_v_cont): Likewise.
10121 (handle_v_run): Likewise.
10122 (captured_main): Likewise.
10123 * target.c (write_inferior_memory): Likewise.
10124 * thread-db.c (try_thread_db_load_from_dir): Likewise.
10125 * tracepoint.c (init_trace_buffer): Likewise.
10126 (add_tracepoint_action): Likewise.
10127 (add_traceframe): Likewise.
10128 (add_traceframe_block): Likewise.
10129 (cmd_qtdpsrc): Likewise.
10130 (cmd_qtdv): Likewise.
10131 (cmd_qtstatus): Likewise.
10132 (response_source): Likewise.
10133 (response_tsv): Likewise.
10134 (cmd_qtnotes): Likewise.
10135 (gdb_collect): Likewise.
10136 (initialize_tracepoint): Likewise.
10137
10138 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10139
10140 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
10141 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
10142 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
10143 <NOP>: New.
10144 (enum aarch64_condition_codes): New enum.
10145 (w0): New static global.
10146 (fp): Likewise.
10147 (lr): Likewise.
10148 (struct aarch64_memory_operand) <type>: New
10149 MEMORY_OPERAND_POSTINDEX type.
10150 (postindex_memory_operand): New helper function.
10151 (emit_ret): New function.
10152 (emit_load_store_pair): New function, factored out of emit_stp
10153 with support for MEMORY_OPERAND_POSTINDEX.
10154 (emit_stp): Rewrite using emit_load_store_pair.
10155 (emit_ldp): New function.
10156 (emit_load_store): Likewise.
10157 (emit_ldr): Mention post-index instruction in comment.
10158 (emit_ldrh): New function.
10159 (emit_ldrb): New function.
10160 (emit_ldrsw): Mention post-index instruction in comment.
10161 (emit_str): Likewise.
10162 (emit_subs): New function.
10163 (emit_cmp): Likewise.
10164 (emit_and): Likewise.
10165 (emit_orr): Likewise.
10166 (emit_orn): Likewise.
10167 (emit_eor): Likewise.
10168 (emit_mvn): Likewise.
10169 (emit_lslv): Likewise.
10170 (emit_lsrv): Likewise.
10171 (emit_asrv): Likewise.
10172 (emit_mul): Likewise.
10173 (emit_sbfm): Likewise.
10174 (emit_sbfx): Likewise.
10175 (emit_ubfm): Likewise.
10176 (emit_ubfx): Likewise.
10177 (emit_csinc): Likewise.
10178 (emit_cset): Likewise.
10179 (emit_nop): Likewise.
10180 (emit_ops_insns): New helper function.
10181 (emit_pop): Likewise.
10182 (emit_push): Likewise.
10183 (aarch64_emit_prologue): New function.
10184 (aarch64_emit_epilogue): Likewise.
10185 (aarch64_emit_add): Likewise.
10186 (aarch64_emit_sub): Likewise.
10187 (aarch64_emit_mul): Likewise.
10188 (aarch64_emit_lsh): Likewise.
10189 (aarch64_emit_rsh_signed): Likewise.
10190 (aarch64_emit_rsh_unsigned): Likewise.
10191 (aarch64_emit_ext): Likewise.
10192 (aarch64_emit_log_not): Likewise.
10193 (aarch64_emit_bit_and): Likewise.
10194 (aarch64_emit_bit_or): Likewise.
10195 (aarch64_emit_bit_xor): Likewise.
10196 (aarch64_emit_bit_not): Likewise.
10197 (aarch64_emit_equal): Likewise.
10198 (aarch64_emit_less_signed): Likewise.
10199 (aarch64_emit_less_unsigned): Likewise.
10200 (aarch64_emit_ref): Likewise.
10201 (aarch64_emit_if_goto): Likewise.
10202 (aarch64_emit_goto): Likewise.
10203 (aarch64_write_goto_address): Likewise.
10204 (aarch64_emit_const): Likewise.
10205 (aarch64_emit_call): Likewise.
10206 (aarch64_emit_reg): Likewise.
10207 (aarch64_emit_pop): Likewise.
10208 (aarch64_emit_stack_flush): Likewise.
10209 (aarch64_emit_zero_ext): Likewise.
10210 (aarch64_emit_swap): Likewise.
10211 (aarch64_emit_stack_adjust): Likewise.
10212 (aarch64_emit_int_call_1): Likewise.
10213 (aarch64_emit_void_call_2): Likewise.
10214 (aarch64_emit_eq_goto): Likewise.
10215 (aarch64_emit_ne_goto): Likewise.
10216 (aarch64_emit_lt_goto): Likewise.
10217 (aarch64_emit_le_goto): Likewise.
10218 (aarch64_emit_gt_goto): Likewise.
10219 (aarch64_emit_ge_got): Likewise.
10220 (aarch64_emit_ops_impl): New static global variable.
10221 (aarch64_emit_ops): New target function, return
10222 &aarch64_emit_ops_impl.
10223 (struct linux_target_ops): Install it.
10224
10225 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10226
10227 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
10228 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
10229 aarch64-ipa.o.
10230 * linux-aarch64-ipa.c: New file.
10231 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
10232 and endian.h.
10233 (aarch64_get_thread_area): New target method.
10234 (extract_signed_bitfield): New helper function.
10235 (aarch64_decode_ldr_literal): New function.
10236 (enum aarch64_opcodes): New enum.
10237 (struct aarch64_register): New struct.
10238 (struct aarch64_operand): New struct.
10239 (x0): New static global.
10240 (x1): Likewise.
10241 (x2): Likewise.
10242 (x3): Likewise.
10243 (x4): Likewise.
10244 (w2): Likewise.
10245 (ip0): Likewise.
10246 (sp): Likewise.
10247 (xzr): Likewise.
10248 (aarch64_register): New helper function.
10249 (register_operand): Likewise.
10250 (immediate_operand): Likewise.
10251 (struct aarch64_memory_operand): New struct.
10252 (offset_memory_operand): New helper function.
10253 (preindex_memory_operand): Likewise.
10254 (enum aarch64_system_control_registers): New enum.
10255 (ENCODE): New macro.
10256 (emit_insn): New helper function.
10257 (emit_b): New function.
10258 (emit_bcond): Likewise.
10259 (emit_cb): Likewise.
10260 (emit_tb): Likewise.
10261 (emit_blr): Likewise.
10262 (emit_stp): Likewise.
10263 (emit_ldp_q_offset): Likewise.
10264 (emit_stp_q_offset): Likewise.
10265 (emit_load_store): Likewise.
10266 (emit_ldr): Likewise.
10267 (emit_ldrsw): Likewise.
10268 (emit_str): Likewise.
10269 (emit_ldaxr): Likewise.
10270 (emit_stxr): Likewise.
10271 (emit_stlr): Likewise.
10272 (emit_data_processing_reg): Likewise.
10273 (emit_data_processing): Likewise.
10274 (emit_add): Likewise.
10275 (emit_sub): Likewise.
10276 (emit_mov): Likewise.
10277 (emit_movk): Likewise.
10278 (emit_mov_addr): Likewise.
10279 (emit_mrs): Likewise.
10280 (emit_msr): Likewise.
10281 (emit_sevl): Likewise.
10282 (emit_wfe): Likewise.
10283 (append_insns): Likewise.
10284 (can_encode_int32_in): New helper function.
10285 (aarch64_relocate_instruction): New function.
10286 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
10287 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
10288 (struct linux_target_ops): Install aarch64_get_thread_area,
10289 aarch64_install_fast_tracepoint_jump_pad and
10290 aarch64_get_min_fast_tracepoint_insn_len.
10291
10292 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10293
10294 * Makefile.in (aarch64-insn.o): New rule.
10295 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
10296
10297 2015-09-21 Yao Qi <yao.qi@linaro.org>
10298
10299 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
10300
10301 2015-09-21 Yao Qi <yao.qi@linaro.org>
10302
10303 * tracepoint.c (max_jump_pad_size): Remove.
10304
10305 2015-09-18 Yao Qi <yao.qi@linaro.org>
10306
10307 * linux-aarch64-low.c: Don't include sys/uio.h.
10308 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
10309
10310 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
10311
10312 * tracepoint.c (eval_result_type): Change prototype.
10313 (condition_true_at_tracepoint): Fix argument to compiled_cond.
10314
10315 2015-09-15 Pedro Alves <palves@redhat.com>
10316
10317 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
10318 Check whether to report exec events instead of checking whether
10319 multiprocess is enabled.
10320
10321 2015-09-15 Pedro Alves <palves@redhat.com>
10322
10323 PR remote/18965
10324 * remote-utils.c (prepare_resume_reply): Merge
10325 TARGET_WAITKIND_VFORK_DONE switch case with the
10326 TARGET_WAITKIND_FORKED case.
10327
10328 2015-09-15 Yao Qi <yao.qi@linaro.org>
10329
10330 * server.c (handle_query): Check string comparison using
10331 "else if" instead of "if".
10332
10333 2015-09-15 Yao Qi <yao.qi@linaro.org>
10334
10335 * server.c (vCont_supported): New global variable.
10336 (handle_query): Set vCont_supported to 1 if "vContSupported+"
10337 matches. Append ";vContSupported+" to own_buf.
10338 (handle_v_requests): Append ";s;S" to own_buf if target supports
10339 hardware single step or vCont_supported is false.
10340 (capture_main): Set vCont_supported to zero.
10341
10342 2015-09-15 Yao Qi <yao.qi@linaro.org>
10343
10344 * linux-low.c (linux_supports_conditional_breakpoints): Rename
10345 it to ...
10346 (linux_supports_hardware_single_step): ... New function.
10347 (linux_target_ops): Update.
10348 * lynx-low.c (lynx_target_ops): Set field
10349 supports_hardware_single_step to target_can_do_hardware_single_step.
10350 * nto-low.c (nto_target_ops): Likewise.
10351 * spu-low.c (spu_target_ops): Likewise.
10352 * win32-low.c (win32_target_ops): Likewise.
10353 * target.c (target_can_do_hardware_single_step): New function.
10354 * target.h (struct target_ops) <supports_conditional_breakpoints>:
10355 Remove. <supports_hardware_single_step>: New field.
10356 (target_supports_conditional_breakpoints): Remove.
10357 (target_supports_hardware_single_step): New macro.
10358 (target_can_do_hardware_single_step): Declare.
10359 * server.c (handle_query): Use target_supports_hardware_single_step
10360 instead of target_supports_conditional_breakpoints.
10361
10362 2015-09-15 Yao Qi <yao.qi@linaro.org>
10363
10364 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
10365 function.
10366 (struct linux_target_ops the_low_target): Install
10367 aarch64_linux_siginfo_fixup.
10368
10369 2015-09-11 Don Breazeal <donb@codesourcery.com>
10370 Luis Machado <lgustavo@codesourcery.com>
10371
10372 * linux-low.c (linux_mourn): Static declaration.
10373 (linux_arch_setup): Move in front of
10374 handle_extended_wait.
10375 (linux_arch_setup_thread): New function.
10376 (handle_extended_wait): Handle exec events. Call
10377 linux_arch_setup_thread. Make event_lwp argument a
10378 pointer-to-a-pointer.
10379 (check_zombie_leaders): Do not check stopped threads.
10380 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
10381 (linux_low_filter_event): Add lwp and thread for exec'ing
10382 non-leader thread if leader thread has been deleted.
10383 Refactor code into linux_arch_setup_thread and call it.
10384 Pass child lwp pointer by reference to handle_extended_wait.
10385 (linux_wait_for_event_filtered): Update comment.
10386 (linux_wait_1): Prevent clobbering exec event status.
10387 (linux_supports_exec_events): New function.
10388 (linux_target_ops) <supports_exec_events>: Initialize new member.
10389 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
10390 new member.
10391 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
10392 * server.c (report_exec_events): New global variable.
10393 (handle_query): Handle qSupported query for exec-events feature.
10394 (captured_main): Initialize report_exec_events.
10395 * server.h (report_exec_events): Declare new global variable.
10396 * target.h (struct target_ops) <supports_exec_events>: New
10397 member.
10398 (target_supports_exec_events): New macro.
10399 * win32-low.c (win32_target_ops) <supports_exec_events>:
10400 Initialize new member.
10401
10402 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
10403
10404 * linux-low.c (linux_low_enable_btrace): Remove.
10405 (linux_target_ops): Replace linux_low_enable_btrace with
10406 linux_enable_btrace.
10407
10408 2015-09-03 Yao Qi <yao.qi@linaro.org>
10409
10410 * linux-aarch64-low.c (aarch64_insert_point): Call
10411 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
10412 returns true.
10413
10414 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10415
10416 * linux-low.c (check_stopped_by_breakpoint): Use
10417 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
10418
10419 2015-08-27 Pedro Alves <palves@redhat.com>
10420
10421 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
10422
10423 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
10424
10425 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
10426 the XNEW-family equivalent.
10427 (compile_bytecodes): Likewise.
10428 * dll.c (loaded_dll): Likewise.
10429 * event-loop.c (append_callback_event): Likewise.
10430 (create_file_handler): Likewise.
10431 (create_file_event): Likewise.
10432 * hostio.c (handle_open): Likewise.
10433 * inferiors.c (add_thread): Likewise.
10434 (add_process): Likewise.
10435 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
10436 * linux-arm-low.c (arm_new_process): Likewise.
10437 (arm_new_thread): Likewise.
10438 * linux-low.c (add_to_pid_list): Likewise.
10439 (linux_add_process): Likewise.
10440 (handle_extended_wait): Likewise.
10441 (add_lwp): Likewise.
10442 (enqueue_one_deferred_signal): Likewise.
10443 (enqueue_pending_signal): Likewise.
10444 (linux_resume_one_lwp_throw): Likewise.
10445 (linux_resume_one_thread): Likewise.
10446 (linux_read_memory): Likewise.
10447 (linux_write_memory): Likewise.
10448 * linux-mips-low.c (mips_linux_new_process): Likewise.
10449 (mips_linux_new_thread): Likewise.
10450 (mips_add_watchpoint): Likewise.
10451 * linux-x86-low.c (initialize_low_arch): Likewise.
10452 * lynx-low.c (lynx_add_process): Likewise.
10453 * mem-break.c (set_raw_breakpoint_at): Likewise.
10454 (set_breakpoint): Likewise.
10455 (add_condition_to_breakpoint): Likewise.
10456 (add_commands_to_breakpoint): Likewise.
10457 (clone_agent_expr): Likewise.
10458 (clone_one_breakpoint): Likewise.
10459 * regcache.c (new_register_cache): Likewise.
10460 * remote-utils.c (look_up_one_symbol): Likewise.
10461 * server.c (queue_stop_reply): Likewise.
10462 (start_inferior): Likewise.
10463 (queue_stop_reply_callback): Likewise.
10464 (handle_target_event): Likewise.
10465 * spu-low.c (fetch_ppc_memory): Likewise.
10466 (store_ppc_memory): Likewise.
10467 * target.c (set_target_ops): Likewise.
10468 * thread-db.c (thread_db_load_search): Likewise.
10469 (try_thread_db_load_1): Likewise.
10470 * tracepoint.c (add_tracepoint): Likewise.
10471 (add_tracepoint_action): Likewise.
10472 (create_trace_state_variable): Likewise.
10473 (cmd_qtdpsrc): Likewise.
10474 (cmd_qtro): Likewise.
10475 (add_while_stepping_state): Likewise.
10476 * win32-low.c (child_add_thread): Likewise.
10477 (get_image_name): Likewise.
10478
10479 2015-08-25 Yao Qi <yao.qi@linaro.org>
10480
10481 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
10482
10483 2015-08-25 Yao Qi <yao.qi@linaro.org>
10484
10485 * Makefile.in (aarch64-linux.o): New rule.
10486 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
10487 srv_tgtobj.
10488 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
10489 (aarch64_init_debug_reg_state): Make it extern.
10490 (aarch64_linux_prepare_to_resume): Remove.
10491
10492 2015-08-25 Yao Qi <yao.qi@linaro.org>
10493
10494 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
10495 lwp_arch_private_info and ptid_of_lwp.
10496
10497 2015-08-25 Yao Qi <yao.qi@linaro.org>
10498
10499 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
10500 Find proc_info by find_process_pid. All callers updated.
10501
10502 2015-08-25 Yao Qi <yao.qi@linaro.org>
10503
10504 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
10505 Remove.
10506 (debug_reg_change_callback): Remove.
10507 (aarch64_notify_debug_reg_change): Remove.
10508
10509 2015-08-25 Yao Qi <yao.qi@linaro.org>
10510
10511 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
10512 Call current_lwp_ptid.
10513
10514 2015-08-25 Yao Qi <yao.qi@linaro.org>
10515
10516 * linux-aarch64-low.c (debug_reg_change_callback): Use
10517 debug_printf.
10518
10519 2015-08-25 Yao Qi <yao.qi@linaro.org>
10520
10521 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
10522
10523 2015-08-25 Yao Qi <yao.qi@linaro.org>
10524
10525 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
10526
10527 2015-08-25 Yao Qi <yao.qi@linaro.org>
10528
10529 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
10530 the code.
10531
10532 2015-08-25 Yao Qi <yao.qi@linaro.org>
10533
10534 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
10535 Remove.
10536 (debug_reg_change_callback): Remove argument entry and add argument
10537 lwp. Remove local variable thread. Don't print thread id in the
10538 debugging output. Don't check whether pid of thread equals to pid.
10539 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
10540 iterate_over_lwps instead find_inferior.
10541
10542 2015-08-24 Pedro Alves <palves@redhat.com>
10543
10544 * inferiors.c (get_first_process): New function.
10545 * inferiors.h (get_first_process): New declaration.
10546 * remote-utils.c (read_ptid): Default to the first process in the
10547 list, instead of to the current thread's process.
10548
10549 2015-08-24 Pedro Alves <palves@redhat.com>
10550
10551 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
10552 * event-loop.c: Likewise.
10553 * remote-utils.c: Likewise.
10554 * tracepoint.c: Likewise.
10555
10556 2015-08-24 Pedro Alves <palves@redhat.com>
10557
10558 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
10559 ptid_get_lwp.
10560
10561 2015-08-21 Pedro Alves <palves@redhat.com>
10562
10563 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
10564 instead of literal 1.
10565
10566 2015-08-21 Pedro Alves <palves@redhat.com>
10567
10568 * tdesc.c (default_description): Explicitly zero-initialize.
10569
10570 2015-08-21 Pedro Alves <palves@redhat.com>
10571
10572 PR gdb/18749
10573 * inferiors.c (remove_thread): Discard any pending stop reply for
10574 this thread.
10575 * server.c (remove_all_on_match_pid): Rename to ...
10576 (remove_all_on_match_ptid): ... this. Work with a filter ptid
10577 instead of a pid.
10578 (discard_queued_stop_replies): Change parameter to a ptid. Now
10579 extern.
10580 (handle_v_kill, kill_inferior_callback, captured_main)
10581 (process_serial_event): Adjust.
10582 * server.h (discard_queued_stop_replies): Declare.
10583
10584 2015-08-21 Pedro Alves <palves@redhat.com>
10585
10586 * linux-low.c (wait_for_sigstop): Always switch to no thread
10587 selected if the previously current thread dies.
10588 * lynx-low.c (lynx_request_interrupt): Use the first thread's
10589 process instead of the current thread's.
10590 * remote-utils.c (input_interrupt): Don't check if there's no
10591 current thread.
10592 * server.c (gdb_read_memory, gdb_write_memory): If setting the
10593 current thread to the general thread fails, error out.
10594 (handle_qxfer_auxv, handle_qxfer_libraries)
10595 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
10596 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
10597 (handle_query): Check if there's a thread selected instead of
10598 checking whether there's any thread in the thread list.
10599 (handle_qxfer_threads, handle_qxfer_btrace)
10600 (handle_qxfer_btrace_conf): Don't error out early if there's no
10601 thread in the thread list.
10602 (handle_v_cont, myresume): Don't set the current thread to the
10603 continue thread.
10604 (process_serial_event) <Hg handling>: Also set thread_id if the
10605 previous general thread is still alive.
10606 (process_serial_event) <g/G handling>: If setting the current
10607 thread to the general thread fails, error out.
10608 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
10609 thread's lwp instead of the current thread's.
10610 * target.c (set_desired_thread): If the desired thread was not
10611 found, leave the current thread pointing to NULL. Return an int
10612 (boolean) indicating success.
10613 * target.h (set_desired_thread): Change return type to int.
10614
10615 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
10616
10617 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
10618 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
10619 #includes.
10620 (ps_get_thread_area): New function.
10621
10622 2015-08-19 Gary Benson <gbenson@redhat.com>
10623
10624 * hostio.c (handle_pread): Do not attempt to read more data
10625 than hostio_reply_with_data can fit in a packet.
10626
10627 2015-08-18 Joel Brobecker <brobecker@adacore.com>
10628
10629 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
10630
10631 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
10632
10633 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
10634
10635 2015-08-06 Pedro Alves <palves@redhat.com>
10636
10637 * tracepoint.c (expr_eval_result): Now an int.
10638
10639 2015-08-06 Pedro Alves <palves@redhat.com>
10640
10641 * gdbthread.h (struct regcache): Forward declare.
10642 (struct thread_info) <regcache_data>: Now a struct regcache
10643 pointer.
10644 * inferiors.c (inferior_regcache_data)
10645 (set_inferior_regcache_data): Now work with struct regcache
10646 pointers.
10647 * inferiors.h (struct regcache): Forward declare.
10648 (inferior_regcache_data, set_inferior_regcache_data): Now work
10649 with struct regcache pointers.
10650 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
10651 (free_register_cache_thread): Remove struct regcache pointer
10652 casts.
10653
10654 2015-08-06 Pedro Alves <palves@redhat.com>
10655
10656 * server.c (captured_main): On error, print the exception message
10657 to stderr, and if run_once is set, throw a quit.
10658
10659 2015-08-06 Pedro Alves <palves@redhat.com>
10660
10661 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
10662 the current thread.
10663
10664 2015-08-06 Pedro Alves <palves@redhat.com>
10665
10666 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
10667 reading beyond the passed in buffer length.
10668
10669 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
10670
10671 * tracepoint.c (symbol_list) <required>: Remove.
10672
10673 2015-08-06 Pedro Alves <palves@redhat.com>
10674
10675 * linux-low.c (handle_extended_wait): Set the fork child's suspend
10676 count if stopping and suspending threads.
10677 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
10678 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
10679 (linux_detach): Complete an ongoing step-over.
10680 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
10681 throughout.
10682 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
10683 (linux_wait_1): If passing a signal to the inferior after
10684 finishing a step-over, unsuspend and re-resume all lwps. If we
10685 see a single-step event but the thread should be continuing, don't
10686 pass the trap to gdb.
10687 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
10688 internal_error instead of gdb_assert.
10689 (enqueue_pending_signal): New function.
10690 (check_ptrace_stopped_lwp_gone): Add debug output.
10691 (start_step_over): Use internal_error instead of gdb_assert.
10692 (complete_ongoing_step_over): New function.
10693 (linux_resume_one_thread): Don't resume a suspended thread.
10694 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
10695 it stepping.
10696
10697 2015-08-06 Pedro Alves <palves@redhat.com>
10698
10699 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
10700 (linux_thread_alive): Use lwp_is_marked_dead.
10701 (extended_event_reported): Delete.
10702 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
10703 instead of extended_event_reported.
10704 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
10705 as well.
10706 (lwp_is_marked_dead): New function.
10707 (lwp_running): Use lwp_is_marked_dead.
10708 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
10709 comment.
10710
10711 2015-08-06 Pedro Alves <palves@redhat.com>
10712
10713 * linux-low.c (linux_wait_1): Move fork event output out of the
10714 !report_to_gdb check. Pass event_child->waitstatus to
10715 target_waitstatus_to_string instead of ourstatus.
10716
10717 2015-08-04 Yao Qi <yao.qi@linaro.org>
10718
10719 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
10720 if current_thread is 32 bit.
10721
10722 2015-08-04 Yao Qi <yao.qi@linaro.org>
10723
10724 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
10725 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
10726 * server.c (extended_protocol): Remove "static".
10727 * server.h (extended_protocol): Declare it.
10728
10729 2015-08-04 Yao Qi <yao.qi@linaro.org>
10730
10731 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
10732 both aarch64 and aarch32.
10733 (aarch64_set_pc): Likewise.
10734
10735 2015-08-04 Yao Qi <yao.qi@linaro.org>
10736
10737 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
10738 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
10739 arm-with-neon.xml to srv_xmlfiles.
10740 * linux-aarch64-low.c: Include linux-aarch32-low.h.
10741 (is_64bit_tdesc): New function.
10742 (aarch64_linux_read_description): New function.
10743 (aarch64_arch_setup): Call aarch64_linux_read_description.
10744 (regs_info): Rename to regs_info_aarch64.
10745 (aarch64_regs_info): Return right regs_info.
10746 (initialize_low_arch): Call initialize_low_arch_aarch32.
10747
10748 2015-08-04 Yao Qi <yao.qi@linaro.org>
10749
10750 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
10751 * linux-aarch32-low.c: New file.
10752 * linux-aarch32-low.h: New file.
10753 * linux-arm-low.c (arm_fill_gregset): Move it to
10754 linux-aarch32-low.c.
10755 (arm_store_gregset): Likewise.
10756 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
10757 (arm_store_vfpregset): Call arm_store_vfpregset_num.
10758 (arm_arch_setup): Check if PTRACE_GETREGSET works.
10759 (regs_info): Rename to regs_info_arm.
10760 (arm_regs_info): Return regs_info_aarch32 if
10761 have_ptrace_getregset is 1 and target description is
10762 arm_with_neon or arm_with_vfpv3.
10763 (initialize_low_arch): Don't call init_registers_arm_with_neon.
10764 Call initialize_low_arch_aarch32 instead.
10765
10766 2015-08-04 Yao Qi <yao.qi@linaro.org>
10767
10768 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
10769 * linux-low.c: ... here.
10770 * linux-low.h (have_ptrace_getregset): Declare it.
10771
10772 2015-08-04 Pedro Alves <palves@redhat.com>
10773
10774 * thread-db.c (struct thread_db): Use new typedefs.
10775 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
10776 CHK calls.
10777 (disable_thread_event_reporting): Cast result of dlsym to
10778 destination function pointer type.
10779 (thread_db_mourn): Use td_ta_delete_ftype.
10780
10781 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
10782
10783 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
10784 arch variant.
10785 (CDX_BREAKPOINT): Define for R2.
10786 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
10787 (the_low_target): Add comments.
10788
10789 2015-07-30 Yao Qi <yao.qi@linaro.org>
10790
10791 * linux-arm-low.c (arm_hwcap): Remove it.
10792 (arm_read_description): New local variable arm_hwcap. Don't
10793 set arm_hwcap to zero.
10794
10795 2015-07-30 Yao Qi <yao.qi@linaro.org>
10796
10797 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
10798 Use regcache->tdesc instead.
10799 (arm_store_wmmxregset): Likewise.
10800 (arm_fill_vfpregset): Likewise.
10801 (arm_store_vfpregset): Likewise.
10802
10803 2015-07-30 Yao Qi <yao.qi@linaro.org>
10804
10805 * linux-arm-low.c: Include arch/arm.h.
10806 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
10807 (arm_store_gregset): Likewise.
10808
10809 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
10810
10811 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
10812 ptrace's 4th parameter.
10813
10814 2015-07-27 Yao Qi <yao.qi@linaro.org>
10815
10816 * configure.srv (case aarch64*-*-linux*): Don't set
10817 srv_linux_usrregs.
10818
10819 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
10820
10821 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
10822 sys/ptrace.h.
10823 * linux-arm-low.c: Likewise.
10824 * linux-cris-low.c: Likewise.
10825 * linux-crisv32-low.c: Likewise.
10826 * linux-low.c: Likewise.
10827 * linux-m68k-low.c: Likewise.
10828 * linux-mips-low.c: Likewise.
10829 * linux-nios2-low.c: Likewise.
10830 * linux-s390-low.c: Likewise.
10831 * linux-sparc-low.c: Likewise.
10832 * linux-tic6x-low.c: Likewise.
10833 * linux-tile-low.c: Likewise.
10834 * linux-x86-low.c: Likewise.
10835
10836 2015-07-24 Pedro Alves <palves@redhat.com>
10837
10838 * config.in: Regenerate.
10839 * configure: Regenerate.
10840
10841 2015-07-24 Pedro Alves <palves@redhat.com>
10842
10843 * acinclude.m4: Include ../ptrace.m4.
10844 * configure.ac: Call GDB_AC_PTRACE.
10845 * config.in, configure: Regenerate.
10846
10847 2015-07-24 Yao Qi <yao.qi@linaro.org>
10848
10849 * linux-low.c (linux_create_inferior): Remove setting to
10850 proc->priv->new_inferior.
10851 (linux_attach): Likewise.
10852 (linux_low_filter_event): Likewise.
10853 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
10854
10855 2015-07-24 Yao Qi <yao.qi@linaro.org>
10856
10857 * linux-low.c (linux_arch_setup): New function.
10858 (linux_low_filter_event): If proc->tdesc is NULL and
10859 proc->attached is true, call the_low_target.arch_setup.
10860 Otherwise, keep status pending, and return.
10861 (linux_resume_one_lwp_throw): Don't call get_pc if
10862 thread->while_stepping isn't NULL. Don't call
10863 get_thread_regcache if proc->tdesc is NULL.
10864 (need_step_over_p): Return 0 if proc->tdesc is NULL.
10865 (linux_target_ops): Install arch_setup.
10866 * server.c (start_inferior): Call the_target->arch_setup.
10867 * target.h (struct target_ops) <arch_setup>: New field.
10868 (target_arch_setup): New marco.
10869 * lynx-low.c (lynx_target_ops): Update.
10870 * nto-low.c (nto_target_ops): Update.
10871 * spu-low.c (spu_target_ops): Update.
10872 * win32-low.c (win32_target_ops): Update.
10873
10874 2015-07-24 Yao Qi <yao.qi@linaro.org>
10875
10876 * linux-low.c (linux_add_process): Don't set
10877 proc->priv->new_inferior.
10878 (linux_create_inferior): Set proc->priv->new_inferior to 1.
10879 (linux_attach): Likewise.
10880
10881 2015-07-24 Yao Qi <yao.qi@linaro.org>
10882
10883 * server.c (start_inferior): Code refactor.
10884
10885 2015-07-24 Yao Qi <yao.qi@linaro.org>
10886
10887 * server.c (process_serial_event): Set general_thread.
10888
10889 2015-07-21 Yao Qi <yao.qi@linaro.org>
10890
10891 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
10892 aarch64_linux_get_debug_reg_capacity.
10893
10894 2015-07-17 Yao Qi <yao.qi@linaro.org>
10895
10896 * Makefile.in (aarch64-linux-hw-point.o): New rule.
10897 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
10898 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
10899 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
10900 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
10901 (AARCH64_HWP_ALIGNMENT): Likewise.
10902 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
10903 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
10904 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
10905 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
10906 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
10907 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
10908 (struct aarch64_debug_reg_state): Likewise.
10909 (struct arch_lwp_info): Likewise.
10910 (aarch64_align_watchpoint): Likewise.
10911 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
10912 (aarch64_watchpoint_length): Likewise.
10913 (aarch64_point_encode_ctrl_reg): Likewise
10914 (aarch64_point_is_aligned): Likewise.
10915 (aarch64_align_watchpoint): Likewise.
10916 (aarch64_linux_set_debug_regs):
10917 (aarch64_dr_state_insert_one_point): Likewise.
10918 (aarch64_dr_state_remove_one_point): Likewise.
10919 (aarch64_handle_breakpoint): Likewise.
10920 (aarch64_handle_aligned_watchpoint): Likewise.
10921 (aarch64_handle_unaligned_watchpoint): Likewise.
10922 (aarch64_handle_watchpoint): Likewise.
10923
10924 2015-07-17 Yao Qi <yao.qi@linaro.org>
10925
10926 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
10927 and don't aarch64_get_debug_reg_state. All callers update.
10928 (aarch64_handle_aligned_watchpoint): Likewise.
10929 (aarch64_handle_unaligned_watchpoint): Likewise.
10930 (aarch64_handle_watchpoint): Likewise.
10931 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
10932 (aarch64_remove_point): Likewise.
10933
10934 2015-07-17 Yao Qi <yao.qi@linaro.org>
10935
10936 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
10937 debug_printf.
10938 (aarch64_handle_unaligned_watchpoint): Likewise.
10939
10940 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10941
10942 Revert the previous 3 commits:
10943 Move gdb_regex* to common/
10944 Move linux_find_memory_regions_full & co.
10945 gdbserver build-id attribute generator
10946
10947 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10948 Jan Kratochvil <jan.kratochvil@redhat.com>
10949
10950 gdbserver build-id attribute generator.
10951 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
10952 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
10953 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
10954 (find_phdr): New.
10955 (get_dynamic): Use find_pdhr to traverse program headers.
10956 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
10957 (compare_mapping_entry_range, struct find_memory_region_callback_data)
10958 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
10959 (get_hex_build_id): New.
10960 (linux_qxfer_libraries_svr4): Add optional build-id attribute
10961 to reply XML document.
10962
10963 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10964 Jan Kratochvil <jan.kratochvil@redhat.com>
10965
10966 * target.c: Include target/target-utils.h and fcntl.h.
10967 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
10968 (target_fileio_read_stralloc): New functions.
10969
10970 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10971
10972 * Makefile.in (OBS): Add gdb_regex.o.
10973 (gdb_regex.o): New.
10974 * config.in: Rebuilt.
10975 * configure: Rebuilt.
10976
10977 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
10978 Jan Kratochvil <jan.kratochvil@redhat.com>
10979
10980 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
10981 * Makefile.in (OBS): Add target-utils.o.
10982 (linux-maps.o, target-utils.o): New.
10983 * configure.srv (srv_linux_obj): Add linux-maps.o.
10984
10985 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
10986
10987 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
10988 function, return 1.
10989 (the_low_target): Install it.
10990
10991 2015-07-14 Pedro Alves <palves@redhat.com>
10992
10993 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
10994 Instead, ignore ECHILD, and throw an error for other errnos.
10995
10996 2015-07-10 Pedro Alves <palves@redhat.com>
10997
10998 * event-loop.c (struct callback_event) <data>: Change type to
10999 gdb_client_data instance instead of gdb_client_data pointer.
11000 (append_callback_event): Adjust.
11001
11002 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
11003
11004 * linux-aarch64-low.c: Add comments for each linux_target_ops
11005 method. Remove comments already covered in target_ops and
11006 linux_target_ops definitions.
11007 (the_low_target): Add comments for each unimplemented method.
11008
11009 2015-07-09 Yao Qi <yao.qi@linaro.org>
11010
11011 * linux-aarch64-low.c (aarch64_regmap): Remove.
11012 (aarch64_usrregs_info): Remove.
11013 (regs_info): Set field usrregs to NULL.
11014
11015 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
11016
11017 * linux-low.c: Include "rsp-low.h"
11018 (linux_low_encode_pt_config, linux_low_encode_raw): New.
11019 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
11020 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
11021 (handle_btrace_enable_pt): New.
11022 (handle_btrace_general_set): Support "pt".
11023 (handle_btrace_conf_general_set): Support "pt:size".
11024
11025 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
11026
11027 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
11028 Z_PACKET_SW_BP.
11029
11030 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
11031
11032 * linux-aarch64-low.c: Remove comment about endianness.
11033 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
11034 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
11035 memcmp.
11036
11037 2015-06-24 Gary Benson <gbenson@redhat.com>
11038
11039 * linux-i386-ipa.c (stdint.h): Do not include.
11040 * lynx-i386-low.c (stdint.h): Likewise.
11041 * lynx-ppc-low.c (stdint.h): Likewise.
11042 * mem-break.c (stdint.h): Likewise.
11043 * thread-db.c (stdint.h): Likewise.
11044 * tracepoint.c (stdint.h): Likewise.
11045 * win32-low.c (stdint.h): Likewise.
11046
11047 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
11048
11049 * server.c (write_qxfer_response): Update call to
11050 remote_escape_output.
11051
11052 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
11053 Jan Kratochvil <jan.kratochvil@redhat.com>
11054
11055 Merge multiple hex conversions.
11056 * gdbreplay.c (tohex): Rename to 'fromhex'.
11057 (logchar): Use fromhex.
11058
11059 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
11060
11061 * server.c (handle_qxfer_libraries): Set `version' attribute for
11062 <library-list>.
11063
11064 2015-06-10 Gary Benson <gbenson@redhat.com>
11065
11066 * target.h (struct target_ops) <multifs_open>: New field.
11067 <multifs_unlink>: Likewise.
11068 <multifs_readlink>: Likewise.
11069 * linux-low.c (nat/linux-namespaces.h): New include.
11070 (linux_target_ops): Initialize the_target->multifs_open,
11071 the_target->multifs_unlink and the_target->multifs_readlink.
11072 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
11073 * hostio.c (hostio_fs_pid): New static variable.
11074 (hostio_handle_new_gdb_connection): New function.
11075 (handle_setfs): Likewise.
11076 (handle_open): Use the_target->multifs_open as appropriate.
11077 (handle_unlink): Use the_target->multifs_unlink as appropriate.
11078 (handle_readlink): Use the_target->multifs_readlink as
11079 appropriate.
11080 (handle_vFile): Handle vFile:setfs packets.
11081 * server.c (handle_query): Call hostio_handle_new_gdb_connection
11082 after target_handle_new_gdb_connection.
11083
11084 2015-06-10 Gary Benson <gbenson@redhat.com>
11085
11086 * configure.ac (AC_CHECK_FUNCS): Add setns.
11087 * config.in: Regenerate.
11088 * configure: Likewise.
11089 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
11090 (linux-namespaces.o): New rule.
11091 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
11092
11093 2015-06-09 Gary Benson <gbenson@redhat.com>
11094
11095 * hostio.c (handle_open): Process mode argument with
11096 fileio_to_host_mode.
11097
11098 2015-06-01 Yao Qi <yao.qi@linaro.org>
11099
11100 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
11101 * linux-x86-low.c: Likewise.
11102
11103 2015-05-28 Don Breazeal <donb@codesourcery.com>
11104
11105 * linux-low.c (handle_extended_wait): Initialize
11106 thread_info.last_resume_kind for new fork children.
11107
11108 2015-05-15 Pedro Alves <palves@redhat.com>
11109
11110 * target.h (target_handle_new_gdb_connection): Rewrite using if
11111 wrapped in do/while.
11112
11113 2015-05-14 Joel Brobecker <brobecker@adacore.com>
11114
11115 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
11116 * configure, config.in: Regenerate.
11117 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
11118 Declare typedef.
11119
11120 2015-05-12 Don Breazeal <donb@codesourcery.com>
11121
11122 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
11123 PTRACE_EVENT_VFORK_DONE.
11124 (linux_low_ptrace_options, extended_event_reported): Add vfork
11125 events.
11126 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
11127 and "vforkdone" for RSP 'T' Stop Reply Packet.
11128 * server.h (report_vfork_events): Declare
11129 global variable.
11130
11131 2015-05-12 Don Breazeal <donb@codesourcery.com>
11132
11133 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
11134 (the_low_target) <new_fork>: Initialize new member.
11135 * linux-arm-low.c (arm_new_fork): New function.
11136 (the_low_target) <new_fork>: Initialize new member.
11137 * linux-low.c (handle_extended_wait): Call new target function
11138 new_fork.
11139 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
11140 * linux-mips-low.c (mips_add_watchpoint): New function
11141 extracted from mips_insert_point.
11142 (the_low_target) <new_fork>: Initialize new member.
11143 (mips_linux_new_fork): New function.
11144 (mips_insert_point): Call mips_add_watchpoint.
11145 * linux-x86-low.c (x86_linux_new_fork): New function.
11146 (the_low_target) <new_fork>: Initialize new member.
11147
11148 2015-05-12 Don Breazeal <donb@codesourcery.com>
11149
11150 * linux-low.c (handle_extended_wait): Implement return value,
11151 rename argument 'event_child' to 'event_lwp', handle
11152 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
11153 (linux_low_ptrace_options): New function.
11154 (linux_low_filter_event): Call linux_low_ptrace_options,
11155 use different argument fo linux_enable_event_reporting,
11156 use return value from handle_extended_wait.
11157 (extended_event_reported): New function.
11158 (linux_wait_1): Call extended_event_reported and set
11159 status to report fork events.
11160 (linux_write_memory): Add pid to debug message.
11161 (reset_lwp_ptrace_options_callback): New function.
11162 (linux_handle_new_gdb_connection): New function.
11163 (linux_target_ops): Initialize new structure member.
11164 * linux-low.h (struct lwp_info) <waitstatus>: New member.
11165 * lynx-low.c: Initialize new structure member.
11166 * remote-utils.c (prepare_resume_reply): Implement stop reason
11167 "fork" for "T" stop message.
11168 * server.c (handle_query): Call handle_new_gdb_connection.
11169 * server.h (report_fork_events): Declare global flag.
11170 * target.h (struct target_ops) <handle_new_gdb_connection>:
11171 New member.
11172 (target_handle_new_gdb_connection): New macro.
11173 * win32-low.c: Initialize new structure member.
11174
11175 2015-05-12 Don Breazeal <donb@codesourcery.com>
11176
11177 * mem-break.c (APPEND_TO_LIST): Define macro.
11178 (clone_agent_expr): New function.
11179 (clone_one_breakpoint): New function.
11180 (clone_all_breakpoints): New function.
11181 * mem-break.h: Declare new functions.
11182
11183 2015-05-12 Don Breazeal <donb@codesourcery.com>
11184
11185 * linux-low.c (linux_supports_fork_events): New function.
11186 (linux_supports_vfork_events): New function.
11187 (linux_target_ops): Initialize new structure members.
11188 (initialize_low): Call linux_check_ptrace_features.
11189 * lynx-low.c (lynx_target_ops): Initialize new structure
11190 members.
11191 * server.c (report_fork_events, report_vfork_events):
11192 New global flags.
11193 (handle_query): Add new features to qSupported packet and
11194 response.
11195 (captured_main): Initialize new global variables.
11196 * target.h (struct target_ops) <supports_fork_events>:
11197 New member.
11198 <supports_vfork_events>: New member.
11199 (target_supports_fork_events): New macro.
11200 (target_supports_vfork_events): New macro.
11201 * win32-low.c (win32_target_ops): Initialize new structure
11202 members.
11203
11204 2015-05-12 Gary Benson <gbenson@redhat.com>
11205
11206 * server.c (handle_qxfer_exec_file): Use current process
11207 if annex is empty.
11208
11209 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
11210
11211 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
11212 Remove HAVE_PTRACE_GETREGS conditionals.
11213 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
11214 instead of PTRACE_GETREGS and PTRACE_SETREGS.
11215
11216 2015-05-08 Yao Qi <yao.qi@linaro.org>
11217
11218 * linux-low.c (linux_supports_conditional_breakpoints): New
11219 function.
11220 (linux_target_ops): Install new target method.
11221 * lynx-low.c (lynx_target_ops): Install NULL hook for
11222 supports_conditional_breakpoints.
11223 * nto-low.c (nto_target_ops): Likewise.
11224 * spu-low.c (spu_target_ops): Likewise.
11225 * win32-low.c (win32_target_ops): Likewise.
11226 * server.c (handle_query): Check
11227 target_supports_conditional_breakpoints.
11228 * target.h (struct target_ops) <supports_conditional_breakpoints>:
11229 New field.
11230 (target_supports_conditional_breakpoints): New macro.
11231
11232 2015-05-06 Pedro Alves <palves@redhat.com>
11233
11234 PR server/18081
11235 * server.c (start_inferior): If the process exits, mourn it.
11236
11237 2015-04-21 Gary Benson <gbenson@redhat.com>
11238
11239 * hostio.c (fileio_open_flags_to_host): Factored out to
11240 fileio_to_host_openflags in common/fileio.c. Single use
11241 updated.
11242
11243 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
11244
11245 * linux-xtensa-low.c (xtensa_fill_gregset)
11246 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
11247 XCHAL_HAVE_LOOP.
11248
11249 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
11250
11251 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
11252 (regs_info): Replace usrregs pointer with NULL.
11253
11254 2015-04-17 Gary Benson <gbenson@redhat.com>
11255
11256 * target.h (struct target_ops) <pid_to_exec_file>: New field.
11257 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
11258 * server.c (handle_qxfer_exec_file): New function.
11259 (qxfer_packets): Add exec-file entry.
11260 (handle_query): Report qXfer:exec-file:read as supported packet.
11261
11262 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
11263
11264 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
11265
11266 2015-04-09 Gary Benson <gbenson@redhat.com>
11267
11268 * hostio-errno.c (errno_to_fileio_error): Remove function.
11269 Update caller to use remote_fileio_to_fio_error.
11270
11271 2015-04-09 Yao Qi <yao.qi@linaro.org>
11272
11273 * linux-low.c (linux_insert_point): Call
11274 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
11275 (linux_remove_point): Call remove_memory_breakpoint if type is
11276 raw_bkpt_type_sw.
11277 * linux-x86-low.c (x86_insert_point): Don't call
11278 insert_memory_breakpoint.
11279 (x86_remove_point): Don't call remove_memory_breakpoint.
11280
11281 2015-04-01 Pedro Alves <palves@redhat.com>
11282 Cleber Rosa <crosa@redhat.com>
11283
11284 * server.c (gdbserver_usage): Reorganize and extend the usage
11285 message.
11286
11287 2015-03-24 Pedro Alves <palves@redhat.com>
11288
11289 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
11290 output. Also dump TRAP_TRACE.
11291 (linux_low_filter_event): In debug output, distinguish a
11292 resume_stop SIGSTOP from a delayed SIGSTOP.
11293
11294 2015-03-24 Gary Benson <gbenson@redhat.com>
11295
11296 * linux-x86-low.c (x86_linux_new_thread): Moved to
11297 nat/x86-linux.c.
11298 (x86_linux_prepare_to_resume): Likewise.
11299
11300 2015-03-24 Gary Benson <gbenson@redhat.com>
11301
11302 * Makefile.in (x86-linux-dregs.o): New rule.
11303 * configure.srv: Add x86-linux-dregs.o to relevant targets.
11304 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
11305 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
11306 (x86_linux_dr_get): Likewise.
11307 (x86_linux_dr_set): Likewise.
11308 (update_debug_registers_callback): Likewise.
11309 (x86_linux_dr_set_addr): Likewise.
11310 (x86_linux_dr_get_addr): Likewise.
11311 (x86_linux_dr_set_control): Likewise.
11312 (x86_linux_dr_get_control): Likewise.
11313 (x86_linux_dr_get_status): Likewise.
11314 (x86_linux_update_debug_registers): Likewise.
11315
11316 2015-03-24 Gary Benson <gbenson@redhat.com>
11317
11318 * linux-x86-low.c (x86_linux_update_debug_registers):
11319 New function, factored out from...
11320 (x86_linux_prepare_to_resume): ...this.
11321
11322 2015-03-24 Gary Benson <gbenson@redhat.com>
11323
11324 * linux-x86-low.c (x86_linux_dr_get): Update comments.
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_prepare_to_resume): Likewise.
11333
11334 2015-03-24 Gary Benson <gbenson@redhat.com>
11335
11336 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
11337 Use perror_with_name. Pass string through gettext.
11338 (x86_linux_dr_set): Likewise.
11339
11340 2015-03-24 Gary Benson <gbenson@redhat.com>
11341
11342 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
11343 (x86_linux_dr_set_addr): ...this.
11344 (x86_dr_low_get_addr): Rename to...
11345 (x86_linux_dr_get_addr): ...this.
11346 (x86_dr_low_set_control): Rename to...
11347 (x86_linux_dr_set_control): ...this.
11348 (x86_dr_low_get_control): Rename to...
11349 (x86_linux_dr_get_control): ...this.
11350 (x86_dr_low_get_status): Rename to...
11351 (x86_linux_dr_get_status): ...this.
11352 (x86_dr_low): Update with new function names.
11353
11354 2015-03-24 Gary Benson <gbenson@redhat.com>
11355
11356 * Makefile.in (x86-linux.o): New rule.
11357 * configure.srv: Add x86-linux.o to relevant targets.
11358 * linux-low.c (lwp_set_arch_private_info): New function.
11359 (lwp_arch_private_info): Likewise.
11360 * linux-x86-low.c: Include nat/x86-linux.h.
11361 (arch_lwp_info): Removed structure.
11362 (update_debug_registers_callback):
11363 Use lwp_set_debug_registers_changed.
11364 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
11365 and lwp_set_debug_registers_changed.
11366 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
11367
11368 2015-03-24 Gary Benson <gbenson@redhat.com>
11369
11370 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
11371 * linux-arm-low.c (arm_new_thread): Likewise.
11372 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
11373 * linux-mips-low.c (mips_linux_new_thread): Likewise.
11374 * linux-x86-low.c (x86_linux_new_thread): Likewise.
11375 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
11376
11377 2015-03-24 Gary Benson <gbenson@redhat.com>
11378
11379 * linux-low.c (ptid_of_lwp): New function.
11380 (lwp_is_stopped): Likewise.
11381 (lwp_stop_reason): Likewise.
11382 * linux-x86-low.c (update_debug_registers_callback):
11383 Use lwp_is_stopped.
11384 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
11385 lwp_stop_reason.
11386
11387 2015-03-24 Gary Benson <gbenson@redhat.com>
11388
11389 * linux-low.h (linux_stop_lwp): Remove declaration.
11390
11391 2015-03-24 Gary Benson <gbenson@redhat.com>
11392
11393 * linux-low.h: Include nat/linux-nat.h.
11394 * linux-low.c (iterate_over_lwps_args): New structure.
11395 (iterate_over_lwps_filter): New function.
11396 (iterate_over_lwps): Likewise.
11397 * linux-x86-low.c (update_debug_registers_callback):
11398 Update signature to what iterate_over_lwps expects.
11399 Remove PID check that iterate_over_lwps now performs.
11400 (x86_dr_low_set_addr): Use iterate_over_lwps.
11401 (x86_dr_low_set_control): Likewise.
11402
11403 2015-03-24 Gary Benson <gbenson@redhat.com>
11404
11405 * linux-x86-low.c (x86_debug_reg_state): New function.
11406 (x86_linux_prepare_to_resume): Use the above.
11407
11408 2015-03-24 Gary Benson <gbenson@redhat.com>
11409
11410 * linux-low.c (current_lwp_ptid): New function.
11411 * linux-x86-low.c: Include nat/linux-nat.h.
11412 (x86_dr_low_get_addr): Use current_lwp_ptid.
11413 (x86_dr_low_get_control): Likewise.
11414 (x86_dr_low_get_status): Likewise.
11415
11416 2015-03-20 Pedro Alves <palves@redhat.com>
11417
11418 * tracepoint.c (cmd_qtstatus): Make "str" const.
11419
11420 2015-03-20 Pedro Alves <palves@redhat.com>
11421
11422 * server.c (handle_general_set): Make "req_str" const.
11423
11424 2015-03-19 Pedro Alves <palves@redhat.com>
11425
11426 * linux-low.c (linux_resume_one_lwp): Rename to ...
11427 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
11428 instead call perror_with_name.
11429 (check_ptrace_stopped_lwp_gone): New function.
11430 (linux_resume_one_lwp): Reimplement as wrapper around
11431 linux_resume_one_lwp_throw that swallows errors if the LWP is
11432 gone.
11433
11434 2015-03-19 Pedro Alves <palves@redhat.com>
11435
11436 * linux-low.c (count_events_callback, select_event_lwp_callback):
11437 No longer check whether the thread has resume_stop as last resume
11438 kind.
11439
11440 2015-03-19 Pedro Alves <palves@redhat.com>
11441
11442 * linux-low.c (count_events_callback, select_event_lwp_callback):
11443 Use the lwp's status_pending_p field, not the thread's.
11444
11445 2015-03-19 Pedro Alves <palves@redhat.com>
11446
11447 * linux-low.c (select_event_lwp_callback): Update comments to
11448 no longer mention SIGTRAP.
11449
11450 2015-03-18 Gary Benson <gbenson@redhat.com>
11451
11452 * server.c (handle_query): Do not report vFile:fstat as supported.
11453
11454 2015-03-11 Gary Benson <gbenson@redhat.com>
11455
11456 * hostio.c (sys/types.h): New include.
11457 (sys/stat.h): Likewise.
11458 (common-remote-fileio.h): Likewise.
11459 (handle_fstat): New function.
11460 (handle_vFile): Handle vFile:fstat packets.
11461
11462 2015-03-11 Gary Benson <gbenson@redhat.com>
11463
11464 * configure.ac (AC_CHECK_MEMBERS): Add checks for
11465 struct stat.st_blocks and struct stat.st_blksize.
11466 * configure: Regenerate.
11467 * config.in: Likewise.
11468 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
11469 (OBS): Add common-remote-fileio.o.
11470 (common-remote-fileio.o): New rule.
11471
11472 2015-03-09 Pedro Alves <palves@redhat.com>
11473
11474 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
11475 'struct sockaddr' pointer in 'accept' call.
11476
11477 2015-03-09 Pedro Alves <palves@redhat.com>
11478
11479 Revert:
11480 2015-03-07 Pedro Alves <palves@redhat.com>
11481 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11482 or <winsock2.h> here. Instead include "gdb_socket.h".
11483 (remote_open): Use union gdb_sockaddr_u.
11484 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11485 or <winsock2.h> here. Instead include "gdb_socket.h".
11486 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11487 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11488 or <sys/un.h>.
11489 (init_named_socket, gdb_agent_helper_thread): Use union
11490 gdb_sockaddr_u.
11491
11492 2015-03-07 Pedro Alves <palves@redhat.com>
11493
11494 * configure.ac (build_warnings): Move
11495 -Wdeclaration-after-statement to the C-specific set.
11496 * configure: Regenerate.
11497
11498 2015-03-07 Pedro Alves <palves@redhat.com>
11499
11500 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11501 or <winsock2.h> here. Instead include "gdb_socket.h".
11502 (remote_open): Use union gdb_sockaddr_u.
11503 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11504 or <winsock2.h> here. Instead include "gdb_socket.h".
11505 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11506 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11507 or <sys/un.h>.
11508 (init_named_socket, gdb_agent_helper_thread): Use union
11509 gdb_sockaddr_u.
11510
11511 2015-03-07 Pedro Alves <palves@redhat.com>
11512
11513 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
11514 instead.
11515
11516 2015-03-06 Yao Qi <yao.qi@linaro.org>
11517
11518 * linux-aarch64-low.c (aarch64_insert_point): Use
11519 show_debug_regs as a boolean.
11520 (aarch64_remove_point): Likewise.
11521
11522 2015-03-05 Pedro Alves <palves@redhat.com>
11523
11524 * lynx-low.c (lynx_target_ops): Install NULL hooks for
11525 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
11526 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
11527 * nto-low.c (nto_target_ops): Likewise.
11528 * spu-low.c (spu_target_ops): Likewise.
11529 * win32-low.c (win32_target_ops): Likewise.
11530
11531 2015-03-04 Pedro Alves <palves@redhat.com>
11532
11533 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
11534 Decide whether a breakpoint triggered based on the SIGTRAP's
11535 siginfo.si_code.
11536 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
11537 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
11538 (linux_low_filter_event): Check for breakpoints before checking
11539 watchpoints.
11540 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
11541 siginfo.si_code.
11542 (linux_stopped_by_sw_breakpoint)
11543 (linux_supports_stopped_by_sw_breakpoint)
11544 (linux_stopped_by_hw_breakpoint)
11545 (linux_supports_stopped_by_hw_breakpoint): New functions.
11546 (linux_target_ops): Install new target methods.
11547
11548 2015-03-04 Pedro Alves <palves@redhat.com>
11549
11550 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
11551 * server.c (swbreak_feature, hwbreak_feature): New globals.
11552 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
11553 (captured_main): Clear swbreak_feature and hwbreak_feature.
11554 * server.h (swbreak_feature, hwbreak_feature): Declare.
11555 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
11556 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
11557 supports_stopped_by_hw_breakpoint>: New fields.
11558 (target_supports_stopped_by_sw_breakpoint)
11559 (target_stopped_by_sw_breakpoint)
11560 (target_supports_stopped_by_hw_breakpoint)
11561 (target_stopped_by_hw_breakpoint): Declare.
11562
11563 2015-03-04 Pedro Alves <palves@redhat.com>
11564
11565 enum lwp_stop_reason -> enum target_stop_reason
11566 * linux-low.c (check_stopped_by_breakpoint): Adjust.
11567 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
11568 (linux_wait_1, stuck_in_jump_pad_callback)
11569 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
11570 (linux_stopped_by_watchpoint):
11571 * linux-low.h (enum lwp_stop_reason): Delete.
11572 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
11573 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11574
11575 2015-03-04 Yao Qi <yao.qi@linaro.org>
11576
11577 * Makefile.in (SFILES): Add linux-aarch64-low.c.
11578
11579 2015-03-03 Gary Benson <gbenson@redhat.com>
11580
11581 * hostio.c (handle_vFile): Fix prefix lengths.
11582
11583 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
11584
11585 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
11586 ptr_bits.
11587
11588 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
11589
11590 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
11591 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
11592 (clean): Add "rm -f" for above C files.
11593 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
11594 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
11595 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
11596 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
11597 * linux-s390-low.c (HWCAP_S390_VX): New macro.
11598 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
11599 (init_registers_s390x_vx_linux64)
11600 (init_registers_s390x_tevx_linux64)
11601 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
11602 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
11603 declarations.
11604 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
11605 (s390_store_vxrs_high): New functions.
11606 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
11607 NT_S390_VXRS_HIGH.
11608 (s390_arch_setup): Add logic for selecting one of the new target
11609 descriptions. Activate the new vector regsets if applicable.
11610 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
11611 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
11612 and init_registers_s390x_tevx_linux64.
11613
11614 2015-03-01 Pedro Alves <palves@redhat.com>
11615
11616 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
11617 parameter.
11618
11619 2015-02-27 Pedro Alves <palves@redhat.com>
11620
11621 * linux-x86-low.c (u_debugreg_offset): New function.
11622 (x86_linux_dr_get, x86_linux_dr_set): Use it.
11623
11624 2015-02-27 Pedro Alves <palves@redhat.com>
11625
11626 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
11627 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
11628 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
11629 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
11630 (ps_lsetfpregs, ps_getpid)
11631 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
11632 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
11633 (ps_lsetxregs, ps_plog): Declare.
11634
11635 2015-02-27 Pedro Alves <palves@redhat.com>
11636
11637 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
11638 IP_AGENT_EXPORT_FUNC.
11639 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
11640 IP_AGENT_EXPORT_FUNC.
11641 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
11642 (IP_AGENT_EXPORT): Delete.
11643 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11644 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11645 (gdb_trampoline_buffer_error, collecting, gdb_collect)
11646 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
11647 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
11648 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
11649 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
11650 (traceframe_read_count, traceframe_write_count)
11651 (traceframes_created, trace_state_variables, get_raw_reg)
11652 (get_trace_state_variable_value, set_trace_state_variable_value)
11653 (ust_loaded, helper_thread_id, cmd_buf): Use
11654 IPA_SYM_EXPORTED_NAME.
11655 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
11656 (tracepoints) Use IP_AGENT_EXPORT_VAR.
11657 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
11658 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11659 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
11660 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
11661 EXTERN_C_PUSH/EXTERN_C_POP.
11662 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
11663 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
11664 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11665 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
11666 (traceframe_write_count, traceframe_read_count)
11667 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
11668 (about_to_request_buffer_space, get_trace_state_variable_value)
11669 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
11670 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
11671 EXTERN_C_PUSH/EXTERN_C_POP.
11672 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
11673 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
11674 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
11675 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11676 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11677 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11678 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
11679 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
11680 Define.
11681 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
11682 (IP_AGENT_EXPORT_VAR_DECL): Define.
11683 (tracing): Declare.
11684 (gdb_agent_get_raw_reg): Declare.
11685
11686 2015-02-27 Tom Tromey <tromey@redhat.com>
11687 Pedro Alves <palves@redhat.com>
11688
11689 Rename symbols whose names are reserved C++ keywords throughout.
11690
11691 2015-02-27 Pedro Alves <palves@redhat.com>
11692
11693 * Makefile.in (COMPILER): New, get it from autoconf.
11694 (CXX): Get from autoconf instead.
11695 (COMPILE.pre): Use COMPILER.
11696 (CC-LD): Rename to ...
11697 (CC_LD): ... this. Use COMPILER.
11698 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
11699 (CXX_FOR_TARGET): Default to g++ instead of gcc.
11700 * acinclude.m4: Include build-with-cxx.m4.
11701 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
11702 Disable -Werror by default if building in C++ mode.
11703 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
11704 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
11705 the C++ compiler. Save/restore CXXFLAGS too.
11706 * configure: Regenerate.
11707
11708 2015-02-27 Pedro Alves <palves@redhat.com>
11709
11710 * acinclude.m4: Include libiberty.m4.
11711 * configure.ac: Call libiberty_INIT.
11712 * config.in, configure: Regenerate.
11713
11714 2015-02-26 Pedro Alves <palves@redhat.com>
11715
11716 * linux-low.c (linux_wait_1): When incrementing the PC past a
11717 program breakpoint always use the_low_target.breakpoint_len as
11718 increment, rather than the maximum between that and
11719 the_low_target.decr_pc_after_break.
11720
11721 2015-02-23 Pedro Alves <palves@redhat.com>
11722
11723 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
11724 thread was doing a step-over; always adjust the PC if
11725 we stepped over a permanent breakpoint.
11726 (linux_wait_1): If we stepped over breakpoint that was on top of a
11727 permanent breakpoint, manually advance the PC past it.
11728
11729 2015-02-23 Pedro Alves <palves@redhat.com>
11730
11731 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
11732 modes.
11733 (x86_fill_gregset, x86_store_gregset): Use it when handling
11734 $orig_eax.
11735
11736 2015-02-20 Pedro Alves <palves@redhat.com>
11737
11738 * thread-db.c: Include "nat/linux-procfs.h".
11739 (thread_db_init): Skip listing new threads if the kernel supports
11740 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
11741
11742 2015-02-20 Pedro Alves <palves@redhat.com>
11743
11744 * linux-low.c (status_pending_p_callback): Use ptid_match.
11745
11746 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
11747
11748 PR breakpoints/16812
11749 * linux-low.c (wstatus_maybe_breakpoint): Remove.
11750 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
11751 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
11752
11753 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
11754
11755 PR breakpoints/15956
11756 * tracepoint.c (cmd_qtinit): Add check for current_thread.
11757
11758 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11759
11760 * linux-low.c (linux_low_btrace_conf): Print size.
11761 * server.c (handle_btrace_conf_general_set): New.
11762 (hanle_general_set): Call handle_btrace_conf_general_set.
11763 (handle_query): Report Qbtrace-conf:bts:size as supported.
11764
11765 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11766
11767 * linux-low.c (linux_low_enable_btrace): Update parameters.
11768 (linux_low_btrace_conf): New.
11769 (linux_target_ops)<to_btrace_conf>: Initialize.
11770 * server.c (current_btrace_conf): New.
11771 (handle_btrace_enable): Rename to ...
11772 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
11773 to target_enable_btrace. Update comment. Update users.
11774 (handle_qxfer_btrace_conf): New.
11775 (qxfer_packets): Add btrace-conf entry.
11776 (handle_query): Report qXfer:btrace-conf:read as supported packet.
11777 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
11778 (target_ops)<read_btrace_conf>: New.
11779 (target_enable_btrace): Update parameters.
11780 (target_read_btrace_conf): New.
11781
11782 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11783
11784 * server.c (handle_btrace_general_set): Remove call to
11785 target_supports_btrace.
11786 (supported_btrace_packets): New.
11787 (handle_query): Call supported_btrace_packets.
11788 * target.h: include btrace-common.h.
11789 (btrace_target_info): Removed.
11790 (supports_btrace, target_supports_btrace): Update parameters.
11791
11792 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11793
11794 * Makefile.in (SFILES): Add common/btrace-common.c.
11795 (OBS): Add common/btrace-common.o.
11796 (btrace-common.o): Add build rules.
11797 * linux-low: Include btrace-common.h.
11798 (linux_low_read_btrace): Use struct btrace_data. Call
11799 btrace_data_init and btrace_data_fini.
11800
11801 2015-02-06 Pedro Alves <palves@redhat.com>
11802
11803 * thread-db.c (find_new_threads_callback): Add debug output.
11804
11805 2015-02-04 Pedro Alves <palves@redhat.com>
11806
11807 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
11808 (resume_stopped_resumed_lwps): New function.
11809 (linux_wait_for_event_filtered): Use it.
11810
11811 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11812
11813 * Makefile.in (SFILES): Add linux-personality.c.
11814 (linux-personality.o): New rule.
11815 * configure.srv (srv_linux_obj): Add linux-personality.o to the
11816 list of objects to be built.
11817 * linux-low.c: Include nat/linux-personality.h.
11818 (linux_create_inferior): Remove code to disable address space
11819 randomization (moved to ../nat/linux-personality.c). Create
11820 cleanup to disable address space randomization.
11821
11822 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11823
11824 * Makefile.in (posix-strerror.o): New rule.
11825 (mingw-strerror.o): Likewise.
11826 * configure: Regenerated.
11827 * configure.ac: Source file ../common/common.host. Initialize new
11828 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
11829
11830 2015-01-14 Yao Qi <yao@codesourcery.com>
11831
11832 * Makefile.in (SFILES): Add nat/ppc-linux.c.
11833 (ppc-linux.o): New rule.
11834 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
11835 * configure.ac: AC_CHECK_FUNCS(getauxval).
11836 * config.in: Re-generated.
11837 * configure: Re-generated.
11838 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
11839 ppc64_64bit_inferior_p
11840
11841 2015-01-14 Yao Qi <yao@codesourcery.com>
11842
11843 * linux-ppc-low.c: Include "nat/ppc-linux.h".
11844 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
11845 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
11846 (PT_ORIG_R3, PT_TRAP): Likewise.
11847 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
11848 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
11849 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
11850
11851 2015-01-10 Joel Brobecker <brobecker@adacore.com>
11852
11853 * i387-fp.c (i387_cache_to_xsave): In look over
11854 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
11855 zmmh_low_space field by use of zmmh_high_space.
11856
11857 2015-01-09 Pedro Alves <palves@redhat.com>
11858
11859 * linux-low.c (step_over_bkpt): Move higher up in the file.
11860 (handle_extended_wait): Don't store the stop_pc here.
11861 (get_stop_pc): Adjust comments and rename to ...
11862 (check_stopped_by_breakpoint): ... this. Record whether the LWP
11863 stopped for a software breakpoint or hardware breakpoint.
11864 (thread_still_has_status_pending_p): New function.
11865 (status_pending_p_callback): Use
11866 thread_still_has_status_pending_p. If the event is no longer
11867 interesting, resume the LWP.
11868 (handle_tracepoints): Add assert.
11869 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
11870 (wstatus_maybe_breakpoint): New function.
11871 (cancel_breakpoint): Delete function.
11872 (check_stopped_by_watchpoint): New function, factored out from
11873 linux_low_filter_event.
11874 (lp_status_maybe_breakpoint): Delete function.
11875 (linux_low_filter_event): Remove filter_ptid argument.
11876 Leave thread group exits pending here. Store the LWP's stop PC.
11877 Always leave events pending.
11878 (linux_wait_for_event_filtered): Pull all events out of the
11879 kernel, and leave them all pending.
11880 (count_events_callback, select_event_lwp_callback): Consider all
11881 events.
11882 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
11883 (select_event_lwp): Only give preference to the stepping LWP in
11884 all-stop mode. Adjust comments.
11885 (ignore_event): New function.
11886 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
11887 references to cancel_breakpoints. Adjust to renames. Also give
11888 equal priority to all LWPs that have had events in non-stop mode.
11889 If reporting a software breakpoint event, unadjust the LWP's PC.
11890 (linux_wait): If linux_wait_1 returned an ignored event, retry.
11891 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
11892 Adjust.
11893 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
11894 (resume_status_pending_p): Use thread_still_has_status_pending_p.
11895 (linux_stopped_by_watchpoint): Adjust.
11896 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
11897 * linux-low.h (enum lwp_stop_reason): New.
11898 (struct lwp_info) <stop_pc>: Adjust comment.
11899 <stopped_by_watchpoint>: Delete field.
11900 <stop_reason>: New field.
11901 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11902 * mem-break.c (software_breakpoint_inserted_here)
11903 (hardware_breakpoint_inserted_here): New function.
11904 * mem-break.h (software_breakpoint_inserted_here)
11905 (hardware_breakpoint_inserted_here): Declare.
11906 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
11907 (cancel_breakpoints): Delete.
11908 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
11909 (upload_fast_traceframes): Remove references to
11910 cancel_breakpoints.
11911
11912 2015-01-09 Pedro Alves <palves@redhat.com>
11913
11914 * thread-db.c (find_new_threads_callback): Ignore thread if the
11915 kernel thread ID is -1.
11916
11917 2015-01-09 Pedro Alves <palves@redhat.com>
11918
11919 * linux-low.c (linux_attach_fail_reason_string): Move to
11920 nat/linux-ptrace.c, and rename.
11921 (linux_attach_lwp): Update comment.
11922 (attach_proc_task_lwp_callback): New function.
11923 (linux_attach): Adjust to rename and use
11924 linux_proc_attach_tgid_threads.
11925 (linux_attach_fail_reason_string): Delete declaration.
11926
11927 2015-01-01 Joel Brobecker <brobecker@adacore.com>
11928
11929 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
11930 * server.c (gdbserver_version): Likewise.
11931
11932 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
11933
11934 * remote-utils.c: Include ctype.h.
11935 (input_interrupt): Explicitly handle the case when the char
11936 received is the NUL byte. Improve the printing of non-ASCII
11937 characters.
11938
11939 2014-12-16 Joel Brobecker <brobecker@adacore.com>
11940
11941 * linux-low.c (linux_low_filter_event): Update call to
11942 linux_enable_event_reporting following the addition of
11943 a new parameter to that function.
11944
11945 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
11946
11947 PR server/17457
11948 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
11949 (AARCH64_FPCR_REGNO): Likewise.
11950 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
11951 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
11952 (aarch64_store_fpregset): Likewise.
11953
11954 2014-12-15 Joel Brobecker <brobecker@adacore.com>
11955
11956 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
11957 Remove FIXME comment about assumption about N.
11958
11959 2014-12-13 Joel Brobecker <brobecker@adacore.com>
11960
11961 * configure.ac: If large-file support is disabled in GDBserver,
11962 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
11963 * configure: Regenerate.
11964
11965 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11966
11967 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
11968 warning upon ENODATA from ptrace.
11969 * linux-s390-low.c (s390_store_tdb): New.
11970 (s390_regsets): Add regset for NT_S390_TDB.
11971
11972 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11973
11974 * linux-low.c (regsets_store_inferior_registers): Skip regsets
11975 without a fill_function.
11976 * linux-s390-low.c (s390_fill_last_break): Remove.
11977 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
11978 (s390_arch_setup): Use regset's size instead of fill_function for
11979 loop end condition.
11980
11981 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11982
11983 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
11984 the regset's store function when ptrace returned an error.
11985 * regcache.c (get_thread_regcache): Invalidate register cache
11986 before fetching inferior's registers.
11987
11988 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
11989
11990 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
11991 while-loop as for-loop.
11992 (regsets_store_inferior_registers): Likewise.
11993
11994 2014-11-28 Yao Qi <yao@codesourcery.com>
11995
11996 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
11997 * config.in, configure: Re-generate.
11998 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
11999 is defined.
12000
12001 2014-11-21 Yao Qi <yao@codesourcery.com>
12002
12003 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
12004 (AC_CHECK_HEADERS): Remove malloc.h.
12005 * configure: Re-generated.
12006 * config.in: Re-generated.
12007 * server.h: Don't include alloca.h and malloc.h.
12008 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
12009 Don't include malloc.h.
12010
12011 2014-11-17 Joel Brobecker <brobecker@adacore.com>
12012
12013 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
12014 corresponding ERRNO check in same block.
12015
12016 2014-11-12 Pedro Alves <palves@redhat.com>
12017
12018 * server.c (cont_thread): Update comment.
12019 (start_inferior, attach_inferior): No longer clear cont_thread.
12020 (handle_v_cont): No longer set cont_thread.
12021 (captured_main): Clear cont_thread each time a GDB connects.
12022
12023 2014-11-12 Pedro Alves <palves@redhat.com>
12024
12025 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
12026 thread, and don't resume all threads if the Hc thread has exited.
12027
12028 2014-11-12 Pedro Alves <palves@redhat.com>
12029
12030 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
12031 the process group instead of to a specific LWP.
12032
12033 2014-10-15 Pedro Alves <palves@redhat.com>
12034
12035 PR server/17487
12036 * win32-arm-low.c (arm_set_thread_context): Remove current_event
12037 parameter.
12038 (arm_set_thread_context): Delete.
12039 (the_low_target): Adjust.
12040 * win32-i386-low.c (debug_registers_changed)
12041 (debug_registers_used): Delete.
12042 (update_debug_registers_callback): New function.
12043 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
12044 needing to update their debug registers.
12045 (win32_get_current_dr): New function.
12046 (x86_dr_low_get_addr, x86_dr_low_get_control)
12047 (x86_dr_low_get_status): Fetch the debug register from the thread
12048 record's context.
12049 (i386_initial_stuff): Adjust.
12050 (i386_get_thread_context): Remove current_event parameter. Don't
12051 clear debug_registers_changed nor copy DR values to
12052 debug_reg_state.
12053 (i386_set_thread_context): Delete.
12054 (i386_prepare_to_resume): New function.
12055 (i386_thread_added): Mark the thread as needing to update irs
12056 debug registers.
12057 (the_low_target): Remove i386_set_thread_context and install
12058 i386_prepare_to_resume.
12059 * win32-low.c (win32_get_thread_context): Adjust.
12060 (win32_set_thread_context): Use SetThreadContext
12061 directly.
12062 (win32_prepare_to_resume): New function.
12063 (win32_require_context): New function, factored out from ...
12064 (thread_rec): ... this.
12065 (continue_one_thread): Call win32_prepare_to_resume on each thread
12066 we're about to continue.
12067 (win32_resume): Call win32_prepare_to_resume on the event thread.
12068 * win32-low.h (struct win32_thread_info)
12069 <debug_registers_changed>: New field.
12070 (struct win32_target_ops): Change prototype of set_thread_context,
12071 delete set_thread_context and add prepare_to_resume.
12072 (win32_require_context): New declaration.
12073
12074 2014-10-08 Gary Benson <gbenson@redhat.com>
12075
12076 * server.h: Do not include common-exceptions.h.
12077
12078 2014-10-08 Gary Benson <gbenson@redhat.com>
12079
12080 * server.h: Do not include cleanups.h.
12081
12082 2014-09-30 James Hogan <james.hogan@imgtec.com>
12083
12084 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
12085 mips64-dsp-linux.c.
12086
12087 2014-09-23 Yao Qi <yao@codesourcery.com>
12088
12089 * linux-low.c (lp_status_maybe_breakpoint): New function.
12090 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
12091 (count_events_callback): Likewise.
12092 (select_event_lwp_callback): Likewise.
12093 (cancel_breakpoints_callback): Likewise.
12094
12095 2014-09-19 Don Breazeal <donb@codesourcery.com>
12096
12097 * linux-low.c (handle_extended_wait): Call
12098 linux_ptrace_get_extended_event.
12099 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
12100 linux_is_extended_waitstatus.
12101
12102 2014-09-16 Joel Brobecker <brobecker@adacore.com>
12103
12104 * Makefile.in (CPPFLAGS): Define.
12105 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
12106 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
12107
12108 2014-09-16 Gary Benson <gbenson@redhat.com>
12109
12110 * inferiors.h (current_inferior): Renamed as...
12111 (current_thread): New variable. All uses updated.
12112 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
12113 (maybe_move_out_of_jump_pad): Likewise.
12114 (cancel_breakpoint): Likewise.
12115 (linux_low_filter_event): Likewise.
12116 (wait_for_sigstop): Likewise.
12117 (linux_resume_one_lwp): Likewise.
12118 (need_step_over_p): Likewise.
12119 (start_step_over): Likewise.
12120 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
12121 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
12122 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
12123 and save_inferior as saved_thread.
12124 * regcache.c (get_thread_regcache): Renamed saved_inferior as
12125 saved_thread.
12126 (regcache_invalidate_thread): Likewise.
12127 * remote-utils.c (prepare_resume_reply): Likewise.
12128 * thread-db.c (thread_db_get_tls_address): Likewise.
12129 (disable_thread_event_reporting): Likewise.
12130 (remove_thread_event_breakpoints): Likewise.
12131 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
12132 as saved_thread.
12133 * target.h (set_desired_inferior): Renamed as...
12134 (set_desired_thread): New declaration. All uses updated.
12135 * server.c (myresume): Updated comment to reference thread instead
12136 of inferior.
12137 (handle_serial_event): Likewise.
12138 (handle_target_event): Likewise.
12139
12140 2014-09-12 Tom Tromey <tromey@redhat.com>
12141 Gary Benson <gbenson@redhat.com>
12142
12143 * regcache.h: Include common-regcache.h.
12144 (regcache_read_pc): Don't declare.
12145 * regcache.c (get_thread_regcache_for_ptid): New function.
12146
12147 2014-09-11 Tom Tromey <tromey@redhat.com>
12148 Gary Benson <gbenson@redhat.com>
12149
12150 * symbol.c: New file.
12151 * Makefile.in (SFILES): Add symbol.c.
12152 (OBS): Add symbol.o.
12153
12154 2014-09-11 Gary Benson <gbenson@redhat.com>
12155
12156 * target.c (target_stop_ptid, target_continue_ptid): New
12157 functions.
12158
12159 2014-09-11 Tom Tromey <tromey@redhat.com>
12160 Gary Benson <gbenson@redhat.com>
12161
12162 * target.h: Include target/target.h.
12163 * target.c (target_read_memory, target_read_uint32)
12164 (target_write_memory): New functions.
12165
12166 2014-09-11 Gary Benson <gbenson@redhat.com>
12167
12168 * server.h (debug_hw_points): Don't declare.
12169 * server.c (debug_hw_points): Don't define. Replace all uses
12170 with show_debug_regs.
12171 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
12172 all uses with show_debug_regs.
12173
12174 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
12175
12176 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
12177 endianness into account.
12178 (ppc_supply_ptrace_register): Likewise.
12179
12180 2014-09-03 James Hogan <james.hogan@imgtec.com>
12181
12182 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
12183 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
12184
12185 2014-09-03 Gary Benson <gbenson@redhat.com>
12186
12187 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
12188 ALL_DEBUG_ADDRESS_REGISTERS.
12189
12190 2014-09-02 Gary Benson <gbenson@redhat.com>
12191
12192 * i386-low.h: Renamed as...
12193 * x86-low.h: New file. All type, function and variable name
12194 prefixes changed from "i386_" to "x86_". All references updated.
12195 * i386-low.c: Renamed as...
12196 * x86-low.c: New file. All type, function and variable name
12197 prefixes changed from "i386_" to "x86_". All references updated.
12198
12199 2014-09-02 Gary Benson <gbenson@redhat.com>
12200
12201 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
12202 (x86_linux_new_thread): Likewise.
12203
12204 2014-08-29 Gary Benson <gbenson@redhat.com>
12205
12206 * server.h (setjmp.h): Do not include.
12207 (toplevel): Do not declare.
12208 (common-exceptions.h): Include.
12209 (cleanups.h): Likewise.
12210 * server.c (toplevel): Do not define.
12211 (exit_code): New static global.
12212 (detach_or_kill_for_exit_cleanup): New function.
12213 (main): New function. Original main renamed to...
12214 (captured_main): New function.
12215 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
12216
12217 2014-08-29 Gary Benson <gbenson@redhat.com>
12218
12219 * Makefile.in (SFILES): Add common/common-exceptions.c.
12220 (OBS): Add common-exceptions.o.
12221 (common-exceptions.o): New rule.
12222 * utils.c (prepare_to_throw_exception): New function.
12223
12224 2014-08-29 Gary Benson <gbenson@redhat.com>
12225
12226 * config.in: Regenerate.
12227 * configure: Likewise.
12228
12229 2014-08-29 Gary Benson <gbenson@redhat.com>
12230
12231 * Makefile.in (SFILES): Add common/cleanups.c.
12232 (OBS): cleanups.o.
12233 (cleanups.o): New rule.
12234
12235 2014-08-29 Gary Benson <gbenson@redhat.com>
12236
12237 * utils.c (internal_vwarning): New function.
12238
12239 2014-08-28 Gary Benson <gbenson@redhat.com>
12240
12241 * utils.h (fatal): Remove declaration.
12242 * utils.c (fatal): Remove function.
12243
12244 2014-08-28 Gary Benson <gbenson@redhat.com>
12245
12246 * tracepoint.c (gdb_agent_init): Replace fatal with
12247 perror_with_name.
12248 (initialize_tracepoint): Likewise.
12249
12250 2014-08-28 Gary Benson <gbenson@redhat.com>
12251
12252 * remote-utils.c (remote_prepare): Replace fatal with error.
12253
12254 2014-08-28 Gary Benson <gbenson@redhat.com>
12255
12256 * linux-low.c (linux_async): Replace fatal with warning.
12257 Tidy up and return.
12258 (linux_start_non_stop): Return -1 if linux_async failed.
12259
12260 2014-08-28 Gary Benson <gbenson@redhat.com>
12261
12262 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
12263 gdb_assert.
12264 (i386_dr_low_get_addr): Remove vague comment.
12265 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
12266 gdb_assert.
12267
12268 2014-08-28 Gary Benson <gbenson@redhat.com>
12269
12270 * inferiors.c (get_thread_process): Replace check with gdb_assert.
12271 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
12272 internal_error.
12273 (linux_resume_one_lwp): Likewise.
12274 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
12275 gdb_assert.
12276 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
12277 with internal_error.
12278 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
12279 (init_register_cache): Replace fatal with gdb_assert_not_reached.
12280 (find_register_by_name): Replace fatal with internal_error.
12281 (find_regno): Likewise.
12282 * tdesc.c (init_target_desc): Replace check with gdb_assert.
12283 * thread-db.c (thread_db_create_event): Likewise.
12284 (thread_db_load_search): Likewise.
12285 (try_thread_db_load_1): Likewise.
12286 * tracepoint.c (get_jump_space_head): Replace fatal with
12287 internal_error.
12288 (claim_trampoline_space): Likewise.
12289 (have_fast_tracepoint_trampoline_buffer): Likewise.
12290 (cmd_qtstart): Likewise.
12291 (stop_tracing): Likewise.
12292 (fast_tracepoint_collecting): Likewise.
12293 (target_malloc): Likewise.
12294 (download_tracepoint): Likewise.
12295 (download_trace_state_variables): Replace check with gdb_assert.
12296 (upload_fast_traceframes): Replace fatal with internal_error.
12297
12298 2014-08-19 Tom Tromey <tromey@redhat.com>
12299 Gary Benson <gbenson@redhat.com>
12300
12301 * Makefile.in (SFILES): Add common/common-debug.c.
12302 (OBS): Add common-debug.o.
12303 (common-debug.o): New rule.
12304 * debug.h (debug_printf): Don't declare.
12305 * debug.c (debug_printf): Renamed and rewritten as...
12306 (debug_vprintf): New function.
12307
12308 2014-08-19 Gary Benson <gbenson@redhat.com>
12309
12310 * utils.h: Do not include print-utils.h.
12311
12312 2014-08-19 Tom Tromey <tromey@redhat.com>
12313 Gary Benson <gbenson@redhat.com>
12314
12315 * server.h: Add static assertion.
12316 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
12317
12318 2014-08-19 Tom Tromey <tromey@redhat.com>
12319 Gary Benson <gbenson@redhat.com>
12320
12321 * Makefile.in (SFILES): Add common/errors.c.
12322 (OBS): Add errors.o.
12323 (IPA_OBS): Add errors-ipa.o.
12324 (errors.o): New rule.
12325 (errors-ipa.o): Likewise.
12326 * utils.h (perror_with_name, error, warning): Don't declare.
12327 * utils.c (warning): Renamed and rewritten as...
12328 (vwarning): New function.
12329 (error): Renamed and rewritten as...
12330 (verror): New function.
12331 (internal_error): Renamed and rewritten as...
12332 (internal_verror): New function.
12333
12334 2014-08-07 Gary Benson <gbenson@redhat.com>
12335
12336 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
12337 * configure: Regenerate.
12338 * config.in: Likewise.
12339 * server.h: Do not include errno.h.
12340 * event-loop.c: Likewise.
12341 * hostio-errno.c: Likewise.
12342 * linux-low.c: Likewise.
12343 * remote-utils.c: Likewise.
12344 * spu-low.c: Likewise.
12345 * utils.c: Likewise.
12346 * gdbreplay.c: Unconditionally include errno.h.
12347
12348 2014-08-07 Gary Benson <gbenson@redhat.com>
12349
12350 * server.h: Do not include string.h.
12351 * event-loop.c: Likewise.
12352 * linux-low.c: Likewise.
12353 * regcache.c: Likewise.
12354 * remote-utils.c: Likewise.
12355 * spu-low.c: Likewise.
12356 * utils.c: Likewise.
12357
12358 2014-08-07 Gary Benson <gbenson@redhat.com>
12359
12360 * server.h: Do not include gdb_assert.h.
12361
12362 2014-08-07 Gary Benson <gbenson@redhat.com>
12363
12364 * server.h: Do not include common-utils.h.
12365
12366 2014-08-07 Gary Benson <gbenson@redhat.com>
12367
12368 * server.h: Do not include ptid.h.
12369 * notif.h: Likewise.
12370
12371 2014-08-07 Gary Benson <gbenson@redhat.com>
12372
12373 * server.h: Do not include gdb_locale.h.
12374
12375 2014-08-07 Gary Benson <gbenson@redhat.com>
12376
12377 * server.h: Do not include gdb/signals.h.
12378 * win32-low.c: Likewise.
12379
12380 2014-08-07 Gary Benson <gbenson@redhat.com>
12381
12382 * server.h: Do not include pathmax.h.
12383
12384 2014-08-07 Gary Benson <gbenson@redhat.com>
12385
12386 * server.h: Do not include libiberty.h.
12387 * linux-bfin-low.c: Likewise.
12388
12389 2014-08-07 Gary Benson <gbenson@redhat.com>
12390
12391 * server.h: Do not include ansidecl.h.
12392
12393 2014-08-07 Gary Benson <gbenson@redhat.com>
12394
12395 * linux-x86-low.c: Do not include stddef.h.
12396 * lynx-ppc-low.c: Likewise.
12397 * tracepoint.c: Likewise.
12398
12399 2014-08-07 Gary Benson <gbenson@redhat.com>
12400
12401 * server.h: Do not include stdarg.h.
12402 * nto-low.c: Likewise.
12403
12404 2014-08-07 Gary Benson <gbenson@redhat.com>
12405
12406 * server.h: Do not include stdlib.h.
12407 * inferiors.c: Likewise.
12408 * linux-low.c: Likewise.
12409 * regcache.c: Likewise.
12410 * spu-low.c: Likewise.
12411 * tracepoint.c: Likewise.
12412 * utils.c: Likewise.
12413
12414 2014-08-07 Gary Benson <gbenson@redhat.com>
12415
12416 * server.h: Do not include stdio.h.
12417 * linux-low.c: Likewise.
12418 * remote-utils.c: Likewise.
12419 * spu-low.c: Likewise.
12420 * utils.c: Likewise.
12421 * wincecompat.c: Likewise.
12422
12423 2014-08-06 Gary Benson <gbenson@redhat.com>
12424
12425 * regcache.c (init_register_cache): Move conditionals inside if.
12426
12427 2014-08-06 Gary Benson <gbenson@redhat.com>
12428
12429 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
12430
12431 2014-07-31 Gary Benson <gbenson@redhat.com>
12432
12433 * ax.h: Do not include server.h.
12434 * gdbthread.h: Likewise.
12435 * lynx-low.h: Likewise.
12436 * notif.h: Likewise.
12437
12438 2014-07-30 Gary Benson <gbenson@redhat.com>
12439
12440 * server.h: Include common-defs.h.
12441 Do not include config.h or build-gnulib-gdbserver/config.h.
12442
12443 2014-07-30 Gary Benson <gbenson@redhat.com>
12444
12445 * hostio-errno.c: Move server.h to top of includes list.
12446 * inferiors.c: Likewise.
12447 * linux-x86-low.c: Likewise.
12448 * notif.c: Include server.h.
12449
12450 2014-07-24 Tom Tromey <tromey@redhat.com>
12451 Gary Benson <gbenson@redhat.com>
12452
12453 * server.h (CORE_ADDR): Now unsigned.
12454
12455 2014-07-16 Pedro Alves <palves@redhat.com>
12456
12457 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
12458
12459 2014-07-15 Pedro Alves <palves@redhat.com>
12460
12461 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
12462 copy.
12463
12464 2014-07-11 Pedro Alves <palves@redhat.com>
12465
12466 * linux-low.c (kill_wait_lwp): New function, based on
12467 kill_one_lwp_callback, but use my_waitpid directly.
12468 (kill_one_lwp_callback, linux_kill): Use it.
12469
12470 2014-06-23 Pedro Alves <palves@redhat.com>
12471
12472 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
12473 before setting DR0..DR3.
12474
12475 2014-06-20 Gary Benson <gbenson@redhat.com>
12476
12477 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
12478 * configure: Regenerated.
12479 * config.in: Likewise.
12480
12481 2014-06-20 Gary Benson <gbenson@redhat.com>
12482
12483 * Makefile.in (SFILES): Update locations for files moved
12484 from common to nat.
12485 (object file files): Reordered.
12486
12487 2014-06-20 Gary Benson <gbenson@redhat.com>
12488
12489 * i386-low.h (i386_dr_low_can_set_addr): Removed.
12490 (i386_dr_low_set_addr): Likewise.
12491 (i386_dr_low_get_addr): Likewise.
12492 (i386_dr_low_can_set_control): Likewise.
12493 (i386_dr_low_set_control): Likewise.
12494 (i386_dr_low_get_control): Likewise.
12495 (i386_dr_low_get_status): Likewise.
12496 (i386_get_debug_register_length): Likewise.
12497 * linux-x86-low.c (i386_dr_low_set_addr):
12498 Changed signature. Made static.
12499 (i386_dr_low_get_addr): Likewise.
12500 (i386_dr_low_set_control): Likewise.
12501 (i386_dr_low_get_control): Likewise.
12502 (i386_dr_low_get_status): Likewise.
12503 (i386_dr_low): New global variable.
12504 * win32-i386-low.c (i386_dr_low_set_addr):
12505 Changed signature. Made static.
12506 (i386_dr_low_get_addr): Likewise.
12507 (i386_dr_low_set_control): Likewise.
12508 (i386_dr_low_get_control): Likewise.
12509 (i386_dr_low_get_status): Likewise.
12510 (i386_dr_low): New global variable.
12511
12512 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
12513
12514 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
12515 * Makefile.in (AR, AR_FLAGS): Define.
12516 * configure: Regenerate.
12517
12518 2014-06-19 Gary Benson <gbenson@redhat.com>
12519
12520 * Makefile.in (i386-dregs.o): New rule.
12521 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
12522 * i386-low.c (target.h): Remove include.
12523 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
12524 (DR_CONTROL_SHIFT): Likewise.
12525 (DR_CONTROL_SIZE): Likewise.
12526 (DR_RW_EXECUTE): Likewise.
12527 (DR_RW_WRITE): Likewise.
12528 (DR_RW_READ): Likewise.
12529 (DR_RW_IORW): Likewise.
12530 (DR_LEN_1): Likewise.
12531 (DR_LEN_2): Likewise.
12532 (DR_LEN_4): Likewise.
12533 (DR_LEN_8): Likewise.
12534 (DR_LOCAL_ENABLE_SHIFT): Likewise.
12535 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
12536 (DR_ENABLE_SIZE): Likewise.
12537 (DR_LOCAL_SLOWDOWN): Likewise.
12538 (DR_GLOBAL_SLOWDOWN): Likewise.
12539 (DR_CONTROL_RESERVED): Likewise.
12540 (I386_DR_CONTROL_MASK): Likewise.
12541 (I386_DR_VACANT): Likewise.
12542 (I386_DR_LOCAL_ENABLE): Likewise.
12543 (I386_DR_GLOBAL_ENABLE): Likewise.
12544 (I386_DR_DISABLE): Likewise.
12545 (I386_DR_SET_RW_LEN): Likewise.
12546 (I386_DR_GET_RW_LEN): Likewise.
12547 (I386_DR_WATCH_HIT): Likewise.
12548 (i386_wp_op_t): Likewise.
12549 (i386_show_dr): Likewise.
12550 (i386_length_and_rw_bits): Likewise.
12551 (i386_insert_aligned_watchpoint): Likewise.
12552 (i386_remove_aligned_watchpoint): Likewise.
12553 (i386_handle_nonaligned_watchpoint): Likewise.
12554 i386_update_inferior_debug_regs(): Likewise.
12555 (i386_dr_insert_watchpoint): Likewise.
12556 (i386_dr_remove_watchpoint): Likewise.
12557 (i386_dr_region_ok_for_watchpoint): Likewise.
12558 (i386_dr_stopped_data_address): Likewise.
12559 (i386_dr_stopped_by_watchpoint): Likewise.
12560
12561 2014-06-19 Gary Benson <gbenson@redhat.com>
12562
12563 * i386-low.c (i386_dr_show): Renamed to
12564 i386_show_dr and made static. All uses updated.
12565 (i386_dr_length_and_rw_bits): Renamed to
12566 i386_length_and_rw_bits and made static.
12567 All uses updated.
12568 (i386_dr_insert_aligned_watchpoint): Renamed to
12569 i386_insert_aligned_watchpoint and made static.
12570 All uses updated.
12571 (i386_dr_remove_aligned_watchpoint): Renamed to
12572 i386_remove_aligned_watchpoint and made static.
12573 All uses updated.
12574 (i386_dr_update_inferior_debug_regs): Renamed to
12575 i386_update_inferior_debug_regs and made static.
12576 All uses updated.
12577
12578 2014-06-18 Gary Benson <gbenson@redhat.com>
12579
12580 * i386-low.h (i386_dr_low_can_set_addr): New macro.
12581 (i386_dr_low_can_set_control): Likewise.
12582 (i386_get_debug_register_length): Likewise.
12583 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
12584 (i386_dr_low_can_set_control): Likewise.
12585 (i386_get_debug_register_length): Likewise.
12586
12587 2014-06-17 Gary Benson <gbenson@redhat.com>
12588
12589 * i386-low.h (i386-dregs.h): New include.
12590 (DR_FIRSTADDR): Now in i386-dregs.h.
12591 (DR_LASTADDR): Likewise.
12592 (DR_NADDR): Likewise.
12593 (DR_STATUS): Likewise.
12594 (DR_CONTROL): Likewise.
12595 (i386_debug_reg_state): Likewise.
12596 (i386_dr_insert_watchpoint): Likewise.
12597 (i386_dr_remove_watchpoint): Likewise.
12598 (i386_dr_region_ok_for_watchpoint): Likewise.
12599 (i386_dr_stopped_data_address): Likewise.
12600 (i386_dr_stopped_by_watchpoint): Likewise.
12601 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
12602
12603 2014-06-18 Gary Benson <gbenson@redhat.com>
12604
12605 * i386-low.h (i386_low_insert_watchpoint): Renamed to
12606 i386_dr_insert_watchpoint.
12607 (i386_low_remove_watchpoint): Renamed to
12608 i386_dr_remove_watchpoint.
12609 (i386_low_region_ok_for_watchpoint): Renamed to
12610 i386_dr_region_ok_for_watchpoint.
12611 (i386_low_stopped_data_address): Renamed to
12612 i386_dr_stopped_data_address.
12613 (i386_low_stopped_by_watchpoint): Renamed to
12614 i386_dr_stopped_by_watchpoint.
12615 * i386-low.c (i386_show_dr): Renamed to
12616 i386_dr_show and made nonstatic. All uses updated.
12617 (i386_length_and_rw_bits): Renamed to
12618 i386_dr_length_and_rw_bits and made nonstatic.
12619 All uses updated.
12620 (i386_insert_aligned_watchpoint): Renamed to
12621 i386_dr_insert_aligned_watchpoint and made nonstatic.
12622 All uses updated.
12623 (i386_remove_aligned_watchpoint): Renamed to
12624 i386_dr_remove_aligned_watchpoint and made nonstatic.
12625 All uses updated.
12626 (i386_update_inferior_debug_regs): Renamed to
12627 i386_dr_update_inferior_debug_regs and made nonstatic.
12628 All uses updated.
12629 (i386_low_insert_watchpoint): Renamed to
12630 i386_dr_insert_watchpoint. All uses updated.
12631 (i386_low_remove_watchpoint): Renamed to
12632 i386_dr_remove_watchpoint. All uses updated.
12633 (i386_low_region_ok_for_watchpoint): Renamed to
12634 i386_dr_region_ok_for_watchpoint. All uses updated.
12635 (i386_low_stopped_data_address): Renamed to
12636 i386_dr_stopped_data_address. All uses updated.
12637 (i386_low_stopped_by_watchpoint): Renamed to
12638 i386_dr_stopped_by_watchpoint. All uses updated.
12639
12640 2014-06-18 Gary Benson <gbenson@redhat.com>
12641
12642 * i386-low.c (i386_dr_low_can_set_addr): New macro.
12643 (i386_dr_low_can_set_control): Likewise.
12644 (i386_insert_aligned_watchpoint): New check.
12645
12646 2014-06-18 Gary Benson <gbenson@redhat.com>
12647
12648 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
12649 Renamed to state.
12650
12651 2014-06-18 Gary Benson <gbenson@redhat.com>
12652
12653 * i386-low.c (i386_length_and_rw_bits): Use internal_error
12654 instead of fatal and error.
12655 (i386_handle_nonaligned_watchpoint): Likewise.
12656
12657 2014-06-18 Gary Benson <gbenson@redhat.com>
12658
12659 * i386-low.c (i386_get_debug_register_length): New macro.
12660 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
12661 (i386_show_dr): Use debug_printf instead of fprintf. Use
12662 phex to format values.
12663
12664 2014-06-18 Gary Benson <gbenson@redhat.com>
12665
12666 * i386-low.h: Comment changes.
12667 * i386-low.c: Likewise.
12668
12669 2014-06-18 Gary Benson <gbenson@redhat.com>
12670
12671 * i386-low.c: Whitespace changes.
12672
12673 2014-06-12 Tom Tromey <tromey@redhat.com>
12674
12675 * utils.c (freeargv): Remove.
12676
12677 2014-06-12 Tom Tromey <tromey@redhat.com>
12678
12679 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
12680 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
12681 (parse_debug_format_options): Likewise.
12682 (gdbserver_usage): Likewise.
12683 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
12684 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
12685 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
12686 against libiberty.
12687 ($(LIBGNU)): Depend on libiberty.
12688 (all-lib): Recurse into all subdirs.
12689 (install-only): Invoke "install" target in subdirs.
12690 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
12691 targets.
12692 * configure: Rebuild.
12693 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
12694 for vasprintf, vsnprintf, or gettimeofday.
12695 * configure.srv: Don't add safe-ctype.o or lbasename.o to
12696 srv_tgtobj.
12697
12698 2014-06-05 Joel Brobecker <brobecker@adacore.com>
12699
12700 * development.sh: Delete.
12701 * Makefile.in (config.status): Adjust dependency on development.sh.
12702 * configure.ac: Adjust development.sh source call.
12703 * configure: Regenerate.
12704
12705 2014-06-02 Pedro Alves <palves@redhat.com>
12706
12707 * ax.c (gdb_free_agent_expr): New function.
12708 * ax.h (gdb_free_agent_expr): New declaration.
12709 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
12710 list.
12711 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
12712 static.
12713 (clear_breakpoint_conditions_and_commands): New function.
12714 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
12715 (clear_breakpoint_conditions_and_commands): New declaration.
12716
12717 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12718
12719 * linux-aarch64-low.c (asm/ptrace.h): Include.
12720
12721 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12722
12723 Fix TLS access for -static -pthread.
12724 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
12725 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
12726 (thread_db_load_search, try_thread_db_load_1): Initialize it.
12727
12728 2014-05-20 Pedro Alves <palves@redhat.com>
12729
12730 * linux-aarch64-low.c (aarch64_insert_point)
12731 (aarch64_remove_point): No longer check whether the type is
12732 supported here. Adjust to new interface.
12733 (the_low_target): Install aarch64_supports_z_point_type as
12734 supports_z_point_type method.
12735 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
12736 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
12737 instead of a Z packet char. Adjust.
12738 (arm_supports_z_point_type): New function.
12739 (arm_insert_point, arm_remove_point): Adjust to new interface.
12740 (the_low_target): Install arm_supports_z_point_type.
12741 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
12742 (cris_insert_point, cris_remove_point): Adjust to new interface.
12743 Don't check whether the type is supported here.
12744 (the_low_target): Install cris_supports_z_point_type.
12745 * linux-low.c (linux_supports_z_point_type): New function.
12746 (linux_insert_point, linux_remove_point): Adjust to new interface.
12747 * linux-low.h (struct linux_target_ops) <insert_point,
12748 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
12749 raw_breakpoint pointer parameter.
12750 <supports_z_point_type>: New method.
12751 * linux-mips-low.c (mips_supports_z_point_type): New function.
12752 (mips_insert_point, mips_remove_point): Adjust to new interface.
12753 Use mips_supports_z_point_type.
12754 (the_low_target): Install mips_supports_z_point_type.
12755 * linux-ppc-low.c (the_low_target): Install NULL as
12756 supports_z_point_type method.
12757 * linux-s390-low.c (the_low_target): Install NULL as
12758 supports_z_point_type method.
12759 * linux-sparc-low.c (the_low_target): Install NULL as
12760 supports_z_point_type method.
12761 * linux-x86-low.c (x86_supports_z_point_type): New function.
12762 (x86_insert_point): Adjust to new insert_point interface. Use
12763 insert_memory_breakpoint. Adjust to new
12764 i386_low_insert_watchpoint interface.
12765 (x86_remove_point): Adjust to remove_point interface. Use
12766 remove_memory_breakpoint. Adjust to new
12767 i386_low_remove_watchpoint interface.
12768 (the_low_target): Install x86_supports_z_point_type.
12769 * lynx-low.c (lynx_target_ops): Install NULL as
12770 supports_z_point_type callback.
12771 * nto-low.c (nto_supports_z_point_type): New.
12772 (nto_insert_point, nto_remove_point): Adjust to new interface.
12773 (nto_target_ops): Install nto_supports_z_point_type.
12774 * mem-break.c: Adjust intro comment.
12775 (struct raw_breakpoint) <raw_type, size>: New fields.
12776 <inserted>: Update comment.
12777 <shlib_disabled>: Delete field.
12778 (enum bkpt_type) <gdb_breakpoint>: Delete value.
12779 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
12780 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
12781 (raw_bkpt_type_to_target_hw_bp_type): New function.
12782 (find_enabled_raw_code_breakpoint_at): New function.
12783 (find_raw_breakpoint_at): New type and size parameters. Use them.
12784 (insert_memory_breakpoint): New function, based off
12785 set_raw_breakpoint_at.
12786 (remove_memory_breakpoint): New function.
12787 (set_raw_breakpoint_at): Reimplement.
12788 (set_breakpoint): New, based on set_breakpoint_at.
12789 (set_breakpoint_at): Reimplement.
12790 (delete_raw_breakpoint): Go through the_target->remove_point
12791 instead of assuming memory breakpoints.
12792 (find_gdb_breakpoint_at): Delete.
12793 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
12794 (find_gdb_breakpoint): New function.
12795 (set_gdb_breakpoint_at): Delete.
12796 (z_type_supported): New function.
12797 (set_gdb_breakpoint_1): New function, loosely based off
12798 set_gdb_breakpoint_at.
12799 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
12800 (delete_gdb_breakpoint_at): Delete.
12801 (delete_gdb_breakpoint_1): New function, loosely based off
12802 delete_gdb_breakpoint_at.
12803 (delete_gdb_breakpoint): New function.
12804 (clear_gdb_breakpoint_conditions): Rename to ...
12805 (clear_breakpoint_conditions): ... this. Don't handle a NULL
12806 breakpoint.
12807 (add_condition_to_breakpoint): Make static.
12808 (add_breakpoint_condition): Take a struct breakpoint pointer
12809 instead of an address. Adjust.
12810 (gdb_condition_true_at_breakpoint): Rename to ...
12811 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
12812 z_type parameter.
12813 (gdb_condition_true_at_breakpoint): Reimplement.
12814 (add_breakpoint_commands): Take a struct breakpoint pointer
12815 instead of an address. Adjust.
12816 (gdb_no_commands_at_breakpoint): Rename to ...
12817 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
12818 parameter. Return true if no breakpoint was found. Change debug
12819 output.
12820 (gdb_no_commands_at_breakpoint): Reimplement.
12821 (run_breakpoint_commands): Rename to ...
12822 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
12823 and change return type to boolean.
12824 (run_breakpoint_commands): New function.
12825 (gdb_breakpoint_here): Also check for Z1 breakpoints.
12826 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
12827 breakpoint. Go through the_target->remove_point instead of
12828 assuming memory breakpoint.
12829 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
12830 software and hardware breakpoints.
12831 (reinsert_raw_breakpoint): Go through the_target->insert_point
12832 instead of assuming memory breakpoint.
12833 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
12834 software and hardware breakpoints.
12835 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
12836 Check both software and hardware breakpoints.
12837 (validate_inserted_breakpoint): Assert the breakpoint is a
12838 software breakpoint. Set the inserted flag to -1 instead of
12839 setting shlib_disabled.
12840 (delete_disabled_breakpoints): Adjust.
12841 (validate_breakpoints): Only validate software breakpoints.
12842 Adjust to inserted flag change.
12843 (check_mem_read, check_mem_write): Skip breakpoint types other
12844 than software breakpoints. Adjust to inserted flag change.
12845 * mem-break.h (enum raw_bkpt_type): New enum.
12846 (raw_breakpoint, struct process_info): Forward declare.
12847 (Z_packet_to_target_hw_bp_type): Delete declaration.
12848 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
12849 (set_gdb_breakpoint, delete_gdb_breakpoint)
12850 (clear_breakpoint_conditions): New declarations.
12851 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
12852 (breakpoint_inserted_here): Update comment.
12853 (add_breakpoint_condition, add_breakpoint_commands): Replace
12854 address parameter with a breakpoint pointer parameter.
12855 (gdb_breakpoint_here): Update comment.
12856 (delete_gdb_breakpoint_at): Delete.
12857 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
12858 * server.c (process_point_options): Take a struct breakpoint
12859 pointer instead of an address. Adjust.
12860 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
12861 delete_gdb_breakpoint.
12862 * spu-low.c (spu_target_ops): Install NULL as
12863 supports_z_point_type method.
12864 * target.h: Include mem-break.h.
12865 (struct target_ops) <prepare_to_access_memory>: Update comment.
12866 <supports_z_point_type>: New field.
12867 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12868 instead of a char. Also take a raw breakpoint pointer.
12869 * win32-arm-low.c (the_low_target): Install NULL as
12870 supports_z_point_type.
12871 * win32-i386-low.c (i386_supports_z_point_type): New function.
12872 (i386_insert_point, i386_remove_point): Adjust to new interface.
12873 (the_low_target): Install i386_supports_z_point_type.
12874 * win32-low.c (win32_supports_z_point_type): New function.
12875 (win32_insert_point, win32_remove_point): Adjust to new interface.
12876 (win32_target_ops): Install win32_supports_z_point_type.
12877 * win32-low.h (struct win32_target_ops):
12878 <supports_z_point_type>: New method.
12879 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12880 instead of a char. Also take a raw breakpoint pointer.
12881
12882 2014-05-20 Pedro Alves <palves@redhat.com>
12883
12884 * mem-break.h: Include break-common.h.
12885 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12886 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
12887 (Z_packet_to_target_hw_bp_type): New declaration.
12888 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
12889 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
12890 (Z_PACKET_ACCESS_WP): Delete macros.
12891 (Z_packet_to_hw_type): Delete function.
12892 * i386-low.h: Don't include break-common.h here.
12893 (Z_packet_to_hw_type): Delete declaration.
12894 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
12895 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12896 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
12897 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12898 * linux-aarch64-low.c: Don't include break-common.h here.
12899 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12900 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
12901 (Z_packet_to_target_hw_bp_type): Delete function.
12902 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
12903 function.
12904 (mips_insert_point, mips_remove_point): Use
12905 Z_packet_to_target_hw_bp_type.
12906
12907 2014-05-20 Pedro Alves <palves@redhat.com>
12908
12909 * linux-aarch64-low.c: Include break-common.h.
12910 (enum target_point_type): Delete.
12911 (Z_packet_to_point_type): Rename to ...
12912 (Z_packet_to_target_hw_bp_type): ... this, and return a
12913 target_hw_bp_type instead.
12914 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
12915 instead of an enum target_point_type.
12916 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
12917 breakpoint type.
12918 (aarch64_dr_state_insert_one_point)
12919 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
12920 (aarch64_handle_aligned_watchpoint)
12921 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
12922 Take an enum target_hw_bp_type instead of an enum
12923 target_point_type.
12924 (aarch64_supports_z_point_type): New function.
12925 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
12926 use Z_packet_to_target_hw_bp_type.
12927
12928 2014-05-20 Joel Brobecker <brobecker@adacore.com>
12929
12930 * configure.ac: Only use -Werror by default when DEVELOPMENT
12931 is true.
12932 * configure: Regenerate.
12933
12934 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
12935
12936 Fix gdbserver qGetTLSAddr for x86_64 -m32.
12937 * linux-x86-low.c (X86_64_USER_REGS): New.
12938 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
12939
12940 2014-04-28 Yao Qi <yao@codesourcery.com>
12941
12942 * Makefile.in (i386-avx512.c): Fix the typo of generated file
12943 name.
12944
12945 2014-04-25 Pedro Alves <palves@redhat.com>
12946
12947 PR server/16255
12948 * linux-low.c (linux_attach_fail_reason_string): New function.
12949 (linux_attach_lwp): Delete.
12950 (linux_attach_lwp_1): Rename to ...
12951 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
12952 argument. Remove "initial" parameter. Return int instead of
12953 void. Don't error or warn here.
12954 (linux_attach): Adjust to call linux_attach_lwp. Call error on
12955 failure to attach to the tgid. Call warning when failing to
12956 attach to an lwp.
12957 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
12958 argument. Remove "initial" parameter. Return int instead of
12959 void. Don't error or warn here.
12960 (linux_attach_fail_reason_string): New declaration.
12961 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
12962 interface change. Use linux_attach_fail_reason_string.
12963
12964 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
12965 Walfred Tedeschi <walfred.tedeschi@intel.com>
12966
12967 * Makefile.in: Added rules to handle new files
12968 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
12969 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
12970 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
12971 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
12972 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
12973 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
12974 x32-avx512-linux.o.
12975 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
12976 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
12977 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
12978 i386/x32-avx512.xml.
12979 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
12980 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
12981 i386/x32-avx512-linux.xml.
12982 * i387-fp.c (num_avx512_k_registers): New constant for number
12983 of K registers.
12984 (num_avx512_zmmh_low_registers): New constant for number of
12985 lower ZMM registers (0-15).
12986 (num_avx512_zmmh_high_registers): New constant for number of
12987 higher ZMM registers (16-31).
12988 (num_avx512_ymmh_registers): New contant for number of higher
12989 YMM registers (ymm16-31 added by avx521 on x86_64).
12990 (num_avx512_xmm_registers): New constant for number of higher
12991 XMM registers (xmm16-31 added by AVX512 on x86_64).
12992 (struct i387_xsave): Add space for AVX512 registers.
12993 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
12994 Add code to handle AVX512 registers.
12995 (i387_xsave_to_cache): Add code to handle AVX512 registers.
12996 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
12997 prototypei from generated file.
12998 (tdesc_amd64_avx512_linux): Likewise.
12999 (init_registers_x32_avx512_linux): Likewise.
13000 (tdesc_x32_avx512_linux): Likewise.
13001 (init_registers_i386_avx512_linux): Likewise.
13002 (tdesc_i386_avx512_linux): Likewise.
13003 (x86_64_regmap): Add AVX512 registers.
13004 (x86_linux_read_description): Add code to handle AVX512 XSTATE
13005 mask.
13006 (initialize_low_arch): Add code to initialize AVX512 registers.
13007
13008 2014-04-23 Pedro Alves <palves@redhat.com>
13009
13010 * mem-break.c (find_gdb_breakpoint_at): Make static.
13011 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
13012
13013 2014-04-23 Pedro Alves <palves@redhat.com>
13014
13015 * i386-low.c: Don't include break-common.h here.
13016 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
13017 prototype to take target_hw_bp_type as argument instead of a Z
13018 packet char.
13019 * i386-low.h: Include break-common.h here.
13020 (Z_packet_to_hw_type): Declare.
13021 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
13022 prototypes.
13023 * linux-x86-low.c (x86_insert_point): Convert the packet number to
13024 a target_hw_bp_type before calling i386_low_insert_watchpoint.
13025 (x86_remove_point): Convert the packet number to a
13026 target_hw_bp_type before calling i386_low_remove_watchpoint.
13027 * win32-i386-low.c (i386_insert_point): Convert the packet number
13028 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
13029 (i386_remove_point): Convert the packet number to a
13030 target_hw_bp_type before calling i386_low_remove_watchpoint.
13031
13032 2014-04-23 Pedro Alves <palves@redhat.com>
13033
13034 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
13035
13036 2014-04-10 Pedro Alves <palves@redhat.com>
13037
13038 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
13039 Check if the condition or command is NULL before checking if the
13040 breakpoint is known. On success, return true.
13041 * mem-break.h (add_breakpoint_condition): Document return.
13042 (add_breakpoint_commands): Add describing comment.
13043 * server.c (skip_to_semicolon): New function.
13044 (process_point_options): Use it.
13045
13046 2014-04-09 Pedro Alves <palves@redhat.com>
13047
13048 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
13049 to lwpid_of.
13050
13051 2014-02-27 Pedro Alves <palves@redhat.com>
13052
13053 PR 12702
13054 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
13055 macros.
13056 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
13057 output.
13058 (last_thread_of_process_p): Take a PID argument instead of a
13059 thread pointer.
13060 (linux_wait_for_lwp): Delete.
13061 (num_lwps, check_zombie_leaders, not_stopped_callback): New
13062 functions.
13063 (linux_low_filter_event): New function, party factored out from
13064 linux_wait_for_event.
13065 (linux_wait_for_event): Rename to ...
13066 (linux_wait_for_event_filtered): ... this. Add new filter ptid
13067 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
13068 sigsuspend. Check for zombie leaders.
13069 (linux_wait_for_event): Reimplement as wrapper around
13070 linux_wait_for_event_filtered.
13071 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
13072 a normal or signal exit is seen, it's the whole process exiting.
13073 (wait_for_sigstop): No longer a for_each_inferior callback.
13074 Rewrite on top of linux_wait_for_event_filtered.
13075 (stop_all_lwps): Call wait_for_sigstop directly.
13076 * server.c (resume, handle_target_event): Handle
13077 TARGET_WAITKIND_NO_RESUMED.
13078
13079 2014-02-26 Joel Brobecker <brobecker@adacore.com>
13080
13081 * win32-low.c (psapi_get_dll_name,
13082 * win32_CreateToolhelp32Snapshot): Delete.
13083 (win32_CreateToolhelp32Snapshot, win32_Module32First)
13084 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
13085 Delete.
13086 (handle_load_dll): Add function description.
13087 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
13088
13089 2014-02-26 Joel Brobecker <brobecker@adacore.com>
13090
13091 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
13092 Add comment.
13093 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
13094 base address when calling win32_add_one_solib.
13095 (handle_load_dll): Delete local variable load_addr.
13096 Remove 0x1000 offset applied to DLL base address when calling
13097 win32_add_one_solib.
13098 (handle_unload_dll): Add comment.
13099
13100 2014-02-26 Joel Brobecker <brobecker@adacore.com>
13101
13102 * win32-low.c (win32_add_all_dlls): Renames
13103 win32_ensure_ntdll_loaded. Rewrite function documentation.
13104 Adjust implementation to always load all DLLs.
13105 Add 0x1000 offset to DLL base address when calling
13106 win32_add_one_solib.
13107 (child_initialization_done): New static global.
13108 (do_initial_child_stuff): Set child_initialization_done to
13109 zero during child initialization, and 1 after. Replace call
13110 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
13111 Add comment.
13112 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
13113 (handle_unload_dll): Add function documentation.
13114 (get_child_debug_event): Ignore load and unload DLL events
13115 during child initialization.
13116
13117 2014-02-20 Doug Evans <dje@google.com>
13118
13119 Remove global all_lwps.
13120 * inferiors.h (ptid_of): Move here from linux-low.h.
13121 (pid_of, lwpid_of): Ditto.
13122 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
13123 parameter is a struct thread_info * now.
13124 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
13125 directly. Pass &all_threads to find_inferior instead of &all_lwps.
13126 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
13127 directly.
13128 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
13129 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
13130 * linux-arm-low.c (update_registers_callback): Update, "entry"
13131 parameter is a struct thread_info * now.
13132 Fetch lwpid from current_inferior directly.
13133 (arm_insert_point): Pass &all_threads to find_inferior instead of
13134 &all_lwps.
13135 (arm_remove_point): Ditto.
13136 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
13137 (arm_prepare_to_resume): Fetch pid from thread.
13138 (arm_read_description): Fetch lwpid from current_inferior directly.
13139 * linux-low.c (all_lwps): Delete.
13140 (delete_lwp): Delete call to remove_inferior.
13141 (handle_extended_wait): Fetch lwpid from thread.
13142 (add_lwp): Don't set lwp->entry.id. Remove call to
13143 add_inferior_to_list.
13144 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
13145 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
13146 (kill_one_lwp_callback): Ditto.
13147 (linux_kill): Don't dereference NULL pointer.
13148 Fetch ptid,lwpid from thread.
13149 (get_detach_signal): Fetch ptid from thread.
13150 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
13151 Simplify call to regcache_invalidate_thread.
13152 (delete_lwp_callback): Update, "entry" parameter is a
13153 struct thread_info * now. Fetch pid from thread.
13154 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
13155 (status_pending_p_callback): Update, "entry" parameter is a
13156 struct thread_info * now. Fetch ptid from thread.
13157 (find_lwp_pid): Update, "entry" parameter is a
13158 struct thread_info * now.
13159 (linux_wait_for_lwp): Fetch pid from thread.
13160 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
13161 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
13162 (enqueue_one_deferred_signal): Fetch lwpid from thread.
13163 (dequeue_one_deferred_signal): Ditto.
13164 (cancel_breakpoint): Fetch ptid from current_inferior.
13165 (linux_wait_for_event): Pass &all_threads to find_inferior,
13166 not &all_lwps. Fetch ptid, lwpid from thread.
13167 (count_events_callback): Update, "entry" parameter is a
13168 struct thread_info * now.
13169 (select_singlestep_lwp_callback): Ditto.
13170 (select_event_lwp_callback): Ditto.
13171 (cancel_breakpoints_callback): Ditto.
13172 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
13173 not &all_lwps.
13174 (select_event_lwp): Ditto. Fetch ptid from event_thread.
13175 (unsuspend_one_lwp): Update, "entry" parameter is a
13176 struct thread_info * now.
13177 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
13178 not &all_lwps.
13179 (linux_stabilize_threads): Ditto. And for for_each_inferior.
13180 Fetch lwpid from thread, not lwp.
13181 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
13182 Pass &all_threads to find_inferior, not &all_lwps.
13183 (send_sigstop): Fetch lwpid from thread, not lwp.
13184 (send_sigstop_callback): Update, "entry" parameter is a
13185 struct thread_info * now.
13186 (suspend_and_send_sigstop_callback): Ditto.
13187 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
13188 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
13189 struct thread_info * now.
13190 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
13191 from thread, lwp.
13192 (lwp_running): Update, "entry" parameter is a
13193 struct thread_info * now.
13194 (stop_all_lwps): Fetch ptid from thread.
13195 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
13196 (linux_resume_one_lwp): Fetch lwpid from thread.
13197 (linux_set_resume_request): Update, "entry" parameter is a
13198 struct thread_info * now. Fetch pid, lwpid from thread.
13199 (resume_status_pending_p): Update, "entry" parameter is a
13200 struct thread_info * now.
13201 (need_step_over_p): Ditto. Fetch lwpid from thread.
13202 (start_step_over): Fetch lwpid from thread.
13203 (linux_resume_one_thread): Update, "entry" parameter is a
13204 struct thread_info * now. Fetch lwpid from thread.
13205 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
13206 (proceed_one_lwp): Update, "entry" parameter is a
13207 struct thread_info * now. Fetch lwpid from thread.
13208 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
13209 struct thread_info * now.
13210 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
13211 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
13212 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
13213 directly.
13214 (regsets_store_inferior_registers): Ditto.
13215 (fetch_register, store_register): Ditto.
13216 (linux_read_memory, linux_write_memory): Ditto.
13217 (linux_request_interrupt): Ditto.
13218 (linux_read_auxv): Ditto.
13219 (linux_xfer_siginfo): Ditto.
13220 (linux_qxfer_spu): Ditto.
13221 (linux_qxfer_libraries_svr4): Ditto.
13222 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
13223 moved to inferiors.h.
13224 (get_lwp): Delete.
13225 (get_thread_lwp): Update.
13226 (struct lwp_info): Delete member "entry". Simplify comment for
13227 member "thread".
13228 (all_lwps): Delete.
13229 * linux-mips-low.c (mips_read_description): Fetch lwpid from
13230 current_inferior directly.
13231 (update_watch_registers_callback): Update, "entry" parameter is a
13232 struct thread_info * now. Fetch pid from thread.
13233 (mips_linux_prepare_to_resume): Fetch ptid from thread.
13234 (mips_insert_point): Fetch lwpid from current_inferior.
13235 Pass &all_threads to find_inferior, not &all_lwps.
13236 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
13237 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
13238 directly.
13239 (mips_stopped_data_address): Ditto.
13240 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
13241 directly.
13242 * linux-tile-low.c (tile_arch_setup): Ditto.
13243 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
13244 (update_debug_registers_callback): Update, "entry" parameter is a
13245 struct thread_info * now. Fetch pid from thread.
13246 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
13247 Pass &all_threads to find_inferior, not &all_lwps.
13248 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
13249 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
13250 Pass &all_threads to find_inferior, not &all_lwps.
13251 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
13252 (i386_dr_low_get_status): Ditto.
13253 (x86_linux_prepare_to_resume): Fetch ptid from thread.
13254 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
13255 (x86_linux_read_description): Ditto.
13256 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
13257
13258 2014-02-20 Doug Evans <dje@google.com>
13259
13260 * inferiors.c (get_first_inferior): Fix buglet.
13261
13262 2014-02-19 Doug Evans <dje@google.com>
13263
13264 * gdbthread.h (add_thread): Change result type to struct thread_info *.
13265 * inferiors.c (add_thread): Change result type to struct thread_info *.
13266 All callers updated.
13267 (add_lwp): Call add_thread here instead of in callers.
13268 All callers updated.
13269 * linux-low.h (get_lwp_thread): Rewrite.
13270 (struct lwp_info): New member "thread".
13271
13272 2014-02-19 Doug Evans <dje@google.com>
13273
13274 * linux-low.c (add_lwp): Change result to struct lwp_info *.
13275 All callers updated.
13276
13277 2014-02-19 Doug Evans <dje@google.com>
13278
13279 * inferiors.c (add_thread): Fix whitespace.
13280
13281 2014-02-19 Doug Evans <dje@google.com>
13282
13283 * dll.c (clear_dlls): Replace accessing list implemention details
13284 with API function.
13285 * gdbthread.h (get_first_thread): Declare.
13286 * inferiors.c (for_each_inferior_with_data): New function.
13287 (get_first_thread): New function.
13288 (find_thread_ptid): Simplify.
13289 (get_first_inferior): New function.
13290 (clear_list): Delete.
13291 (one_inferior_p): New function.
13292 (clear_inferior_list): New function.
13293 (clear_inferiors): Update.
13294 * inferiors.h (for_each_inferior_with_data): Declare.
13295 (clear_inferior_list): Declare.
13296 (one_inferior_p): Declare.
13297 (get_first_inferior): Declare.
13298 * linux-low.c (linux_wait_for_event): Replace accessing list
13299 implemention details with API function.
13300 * server.c (target_running): Ditto.
13301 (accumulate_file_name_length): New function.
13302 (emit_dll_description): New function.
13303 (handle_qxfer_libraries): Replace accessing list implemention
13304 details with API function.
13305 (handle_qxfer_threads_worker): New function.
13306 (handle_qxfer_threads_proper): Replace accessing list implemention
13307 details with API function.
13308 (handle_query): Ditto.
13309 (visit_actioned_threads_callback_ftype): New typedef.
13310 (visit_actioned_threads_data): New struct.
13311 (visit_actioned_threads): Rewrite to be find_inferior callback.
13312 (resume): Call find_inferior.
13313 (handle_status): Replace accessing list implemention
13314 details with API function.
13315 (process_serial_event): Replace accessing list implemention details
13316 with API function.
13317 * target.c (set_desired_inferior): Replace accessing list implemention
13318 details with API function.
13319 * tracepoint.c (same_process_p): New function.
13320 (gdb_agent_about_to_close): Replace accessing list implemention
13321 details with API function.
13322 * win32-low.c (child_delete_thread): Replace accessing list
13323 implemention details with API function.
13324 (match_dll_by_basename): New function.
13325 (dll_is_loaded_by_basename): New function.
13326 (win32_ensure_ntdll_loaded): Replace accessing list implemention
13327 details call to dll_is_loaded_by_basename.
13328
13329 2014-02-19 Doug Evans <dje@google.com>
13330
13331 * dll.h (struct dll_info): Add comment.
13332 * gdbthread.h (struct thread_info): Add comment.
13333 (current_ptid): Simplify.
13334 * inferiors.c (add_process): Update.
13335 (remove_process): Update.
13336 * inferiors.h (struct process_info): Rename member "head" to "entry".
13337 * linux-low.c (delete_lwp): Update.
13338 (add_lwp): Update.
13339 (last_thread_of_process_p): Update.
13340 (kill_one_lwp_callback, linux_kill): Update.
13341 (status_pending_p_callback): Update.
13342 (wait_for_sigstop): Update. Simplify read of ptid.
13343 (start_step_over): Update.
13344 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
13345 (get_lwp_thread): Update.
13346 (struct lwp_info): Rename member "head" to "entry".
13347 * regcache.h (inferior_list_entry): Delete.
13348 * server.c (kill_inferior_callback): Update.
13349 (detach_or_kill_inferior_callback): Update.
13350 (print_started_pid): Update.
13351 (print_attached_pid): Update.
13352 (process_serial_event): Simplify read of ptid.
13353 * thread-db.c (thread_db_create_event): Update.
13354 (thread_db_get_tls_address): Update.
13355 * win32-low.c (current_inferior_ptid): Simplify.
13356
13357 2014-02-19 Tom Tromey <tromey@redhat.com>
13358
13359 * target.h (struct target_ops) <supports_btrace>: Add target_ops
13360 argument.
13361 (target_supports_btrace): Update.
13362
13363 2014-02-14 Yao Qi <yao@codesourcery.com>
13364
13365 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
13366 (rsp-low-ipa.o): New target.
13367
13368 2014-02-12 Tom Tromey <tromey@redhat.com>
13369
13370 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
13371 convert_ascii_to_int.
13372 * regcache.c (registers_to_string): Likewise.
13373 * remote-utils.c (decode_M_packet): Likewise.
13374 * server.c (process_serial_event): Likewise.
13375
13376 2014-02-12 Tom Tromey <tromey@redhat.com>
13377
13378 * server.c (handle_query, handle_v_run): Use hex2bin, not
13379 unhexify.
13380 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
13381
13382 2014-02-12 Tom Tromey <tromey@redhat.com>
13383
13384 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
13385 convert_int_to_ascii.
13386 * regcache.c (registers_to_string, collect_register_as_string):
13387 Likewise.
13388 * remote-utils.c (look_up_one_symbol, relocate_instruction):
13389 Likewise.
13390 * server.c (process_serial_event): Likewise.
13391 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
13392 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
13393
13394 2014-02-12 Tom Tromey <tromey@redhat.com>
13395
13396 * remote-utils.c (look_up_one_symbol, monitor_output): Use
13397 bin2hex, not hexify.
13398 * tracepoint.c (cmd_qtstatus): Likewise.
13399
13400 2014-02-12 Tom Tromey <tromey@redhat.com>
13401
13402 * remote-utils.c (monitor_output): Pass explicit length to
13403 hexify.
13404
13405 2014-02-12 Tom Tromey <tromey@redhat.com>
13406
13407 * tracepoint.c: Include rsp-low.h.
13408 * server.c: Include rsp-low.h.
13409 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
13410 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
13411 declare.
13412 * remote-utils.c: Include rsp-low.h.
13413 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
13414 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
13415 (convert_int_to_ascii, convert_ascii_to_int): Move to
13416 common/rsp-low.c.
13417 * regcache.c: Include rsp-low.h.
13418 * ax.c: Include rsp-low.h.
13419 * Makefile.in (SFILES): Add common/rsp-low.c.
13420 (OBS): Add rsp-low.o.
13421 (rsp-low.o): New target.
13422
13423 2014-02-12 Tom Tromey <tromey@redhat.com>
13424
13425 * utils.h (pulongest, plongest, phex_nz): Don't declare.
13426 Include print-utils.h.
13427 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
13428 (plongest, thirty_two, phex_nz): Remove.
13429 * Makefile.in (SFILES): Add common/print-utils.c.
13430 (OBS): Add print-utils.o.
13431 (print-utils-ipa.o): New target.
13432 (print-utils.o): New target.
13433 (IPA_OBJS): Add print-utils-ipa.o.
13434
13435 2014-02-06 Tom Tromey <tromey@redhat.com>
13436
13437 * Makefile.in (SFILES): Fix indentation.
13438
13439 2014-02-05 Doug Evans <dje@google.com>
13440
13441 * linux-low.c (linux_wait_for_event): Improve comment.
13442 (linux_wait_1): Keep current_inferior in sync with event_child.
13443
13444 2014-01-22 Doug Evans <dje@google.com>
13445
13446 * gdbthread.h (gdb_id_to_thread): Delete, unused.
13447
13448 2014-01-22 Doug Evans <dje@google.com>
13449
13450 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
13451 * configure: Regenerate.
13452 * config.in: Regenerate.
13453 * Makefile.in (SFILES): Add debug.c.
13454 (OBS): Add debug.o.
13455 * debug.c: New file.
13456 * debug.h: New file.
13457 * linux-aarch64-low.c (*): Update all debugging printfs to use
13458 debug_printf instead of fprintf.
13459 * linux-arm-low.c (*): Ditto.
13460 * linux-cris-low.c (*): Ditto.
13461 * linux-crisv32-low.c (*): Ditto.
13462 * linux-m32r-low.c (*): Ditto.
13463 * linux-sparc-low.c (*): Ditto.
13464 * linux-x86.c (*): Ditto.
13465 * linux-low.c (*): Ditto.
13466 (linux_wait_1): Add calls to debug_enter, debug_exit.
13467 (linux_wait): Remove redundant debugging printf.
13468 (stop_all_lwps): Add calls to debug_enter, debug_exit.
13469 (linux_resume, unstop_all_lwps): Ditto.
13470 * mem-break.c (*): Update all debugging printfs to use
13471 debug_printf instead of fprintf.
13472 * remote-utils.c (*): Ditto.
13473 * thread-db.c (*): Ditto.
13474 * server.c #include <ctype.h>, "gdb_vecs.h".
13475 (debug_threads): Moved to debug.c.
13476 (*): Update all debugging printfs to use debug_printf instead of
13477 fprintf.
13478 (start_inferior): Replace call to fflush with call to debug_flush.
13479 (monitor_show_help): Mention set debug-format.
13480 (parse_debug_format_options): New function.
13481 (handle_monitor_command): Handle "monitor set debug-format".
13482 (gdbserver_usage): Mention --debug-format.
13483 (main): Parse --debug-format.
13484 * server.h (debug_threads): Declaration moved to debug.h.
13485 #include "debug.h".
13486 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
13487 trace_debug_1 that uses debug_printf.
13488 (tracepoint_look_up_symbols): Update all debugging printfs to use
13489 debug_printf instead of fprintf.
13490
13491 2014-01-20 Baruch Siach <baruch@tkos.co.il>
13492
13493 * linux-xtensa-low.c: Include asm/ptrace.h instead of
13494 sys/ptrace.h.
13495
13496 2014-01-17 Pedro Alves <palves@redhat.com>
13497
13498 PR build/16445
13499 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
13500 defined after including gdb_proc_service.h.
13501
13502 2014-01-16 Doug Evans <dje@google.com>
13503
13504 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
13505 (match_dll): Use it.
13506
13507 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
13508
13509 * target.h (target_ops) <read_btrace>: Change parameters and
13510 return type to allow error reporting.
13511 * server.c (handle_qxfer_btrace): Support delta reads. Pass
13512 trace reading errors on.
13513 * linux-low.c (linux_low_read_btrace): Pass trace reading
13514 errors on.
13515 (linux_low_disable_btrace): New.
13516
13517 2014-01-15 Doug Evans <dje@google.com>
13518
13519 * inferiors.c (thread_id_to_gdb_id): Delete.
13520 * inferiors.h (thread_id_to_gdb_id): Delete.
13521
13522 2014-01-13 Eli Zaretskii <eliz@gnu.org>
13523
13524 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
13525 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
13526 versions.
13527
13528 2014-01-08 Pedro Alves <palves@redhat.com>
13529
13530 * server.c (handle_status): Don't discard previous queued stop
13531 replies or thread's pending status here.
13532 (main) <disconnection>: Do it here instead.
13533
13534 2014-01-08 Pedro Alves <palves@redhat.com>
13535
13536 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
13537 * server.c (visit_actioned_threads, handle_pending_status): New
13538 function.
13539 (handle_v_cont): Factor out parts to ...
13540 (resume): ... this new function. If in all-stop, and a thread
13541 being resumed has a pending status, report it without actually
13542 resuming.
13543 (myresume): Adjust to use the new 'resume' function.
13544 (clear_pending_status_callback, set_pending_status_callback)
13545 (find_status_pending_thread_callback): New functions.
13546 (handle_status): Handle the case of multiple threads having
13547 interesting statuses to report. Report threads' real last signal
13548 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
13549 with an interesting thread to report the status for, instead of
13550 always reporting the status of the first thread.
13551
13552 2014-01-01 Joel Brobecker <brobecker@adacore.com>
13553
13554 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
13555 * gdbreplay.c (gdbreplay_version): Likewise.
13556
13557 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
13558
13559 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
13560 iov.iov_len with the real length in use.
13561
13562 2013-12-13 Joel Brobecker <brobecker@adacore.com>
13563
13564 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
13565 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
13566 for all targets that use win32-low.c.
13567 * win32-low.c (win32_ensure_ntdll_loaded): New function.
13568 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
13569
13570 2013-12-13 Pedro Alves <palves@redhat.com>
13571
13572 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
13573 if equal to TARGET_WAITKIND_LOADED.
13574 * win32-low.c (cached_status): New static global.
13575 (win32_wait): Add declaration.
13576 (do_initial_child_stuff): Flush all initial pending debug events
13577 up to the initial breakpoint.
13578 (win32_wait): If CACHED_STATUS was set, return that instead
13579 of doing a real wait. Remove the code resuming the execution
13580 of the inferior after receiving a TARGET_WAITKIND_LOADED event
13581 during the initial phase. Also remove the code changing
13582 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
13583 TARGET_WAITKIND_STOPPED.
13584
13585 2013-12-11 Yao Qi <yao@codesourcery.com>
13586
13587 * notif.c (handle_notif_ack): Return 0 if no notification
13588 matches.
13589
13590 2013-11-20 Doug Evans <dje@google.com>
13591
13592 * linux-low.c (linux_set_resume_request): Fix comment.
13593
13594 2013-11-20 Doug Evans <dje@google.com>
13595
13596 * linux-low.c (resume_status_pending_p): Tweak comment.
13597
13598 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
13599
13600 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
13601 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
13602 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
13603 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
13604 (srv_amd64_regobj): Add amd64-mpx.o.
13605 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
13606 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
13607 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
13608 * i387-fp.c (num_pl_bnd_register) Added constant.
13609 (num_pl_bnd_cfg_registers) Added constant.
13610 (struct i387_xsave) Added reserved area and MPX fields.
13611 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
13612 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
13613 function.
13614 (tdesc_i386_mpx_linux): Add MPX amd64 target.
13615 (init_registers_amd64_mpx_linux): Declare new function.
13616 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
13617 (x86_64_regmap): Add MPX registers.
13618 (x86_linux_read_description): Add MPX case.
13619 (initialize_low_arch): Initialize MPX targets.
13620
13621 2013-11-18 Tom Tromey <tromey@redhat.com>
13622
13623 * configure: Rebuild.
13624 * configure.ac: Don't check for stdlib.h.
13625 * gdbreplay.c: Unconditionally include stdlib.h.
13626
13627 2013-11-18 Tom Tromey <tromey@redhat.com>
13628
13629 * config.in: Rebuild.
13630 * configure: Rebuild.
13631 * configure.ac: Don't use AC_HEADER_DIRENT.
13632
13633 2013-11-18 Tom Tromey <tromey@redhat.com>
13634
13635 * server.h: Don't check HAVE_STRING_H.
13636 * gdbreplay.c: Don't check HAVE_STRING_H.
13637 * configure: Rebuild.
13638
13639 2013-11-18 Tom Tromey <tromey@redhat.com>
13640
13641 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
13642 LIBGNU.
13643
13644 2013-11-08 Tom Tromey <tromey@redhat.com>
13645
13646 * configure, config.in: Rebuild.
13647 * configure.ac: Remove unused configury.
13648
13649 2013-11-08 Tom Tromey <tromey@redhat.com>
13650
13651 * acinclude.m4: Include common.m4, codeset.m4.
13652 * configure, config.in: Rebuild.
13653 * configure.ac: Use GDB_AC_COMMON.
13654
13655 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
13656
13657 * linux-s390-low.c (HWCAP_S390_TE): New define.
13658 (s390_arch_setup): Consider the TE field in the HWCAP for
13659 determining 'have_regset_tdb'.
13660
13661 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
13662
13663 PR gdb/16014
13664 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
13665 call to sizeof.
13666
13667 2013-10-02 Pedro Alves <palves@redhat.com>
13668
13669 * server.c (process_serial_event): Don't output "GDBserver
13670 exiting" if GDB is connected through stdio.
13671 * target.c (mywait): Likewise, be silent if GDB is connected
13672 through stdio.
13673
13674 2013-10-01 Joel Brobecker <brobecker@adacore.com>
13675
13676 * lynx-low.c (lynx_add_threads_after_attach): New function.
13677 (lynx_attach): Remove call to add_thread. Add call to
13678 lynx_add_threads_after_attach instead.
13679
13680 2013-09-28 Mike Frysinger <vapier@gentoo.org>
13681
13682 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
13683 * config.in, configure: Regenerated.
13684
13685 2013-09-18 Yao Qi <yao@codesourcery.com>
13686
13687 PR server/15959
13688 * server.c (start_inferior): Clear 'resume_info'.
13689
13690 2013-09-16 Jiong Wang <jiwang@tilera.com>
13691
13692 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
13693 for each register.
13694
13695 2013-09-16 Jiong Wang <jiwang@tilera.com>
13696
13697 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
13698 linux-tile-low.o to srv_tgtobj.
13699
13700 2013-09-16 Will Newton <will.newton@linaro.org>
13701
13702 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
13703 out regs.
13704
13705 2013-09-06 Pedro Alves <palves@redhat.com>
13706
13707 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
13708 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
13709 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
13710 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
13711 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
13712 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
13713
13714 2013-09-06 Pedro Alves <palves@redhat.com>
13715
13716 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
13717 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
13718
13719 2013-09-06 Pedro Alves <palves@redhat.com>
13720
13721 * linux-amd64-ipa.c: Include tracepoint.h.
13722 * linux-i386-ipa.c: Include tracepoint.h.
13723
13724 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13725
13726 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
13727 (ps_get_thread_area): New function.
13728
13729 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13730
13731 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
13732 (initialize_low_arch): Call init_registers_crisv32 rather than
13733 init_register_crisv32.
13734
13735 2013-09-05 Pedro Alves <palves@redhat.com>
13736
13737 * server.h (handle_vFile, hostio_last_error_from_errno): Move
13738 to ...
13739 * hostio.h: ... this new file.
13740 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
13741 win32-low.c: Include hostio.h.
13742
13743 2013-09-05 Pedro Alves <palves@redhat.com>
13744
13745 * server.h (gdb_client_data, handler_func, callback_handler_func)
13746 (delete_file_handler, add_file_handler, append_callback_event)
13747 (delete_callback_event, start_event_loop, initialize_event_loop):
13748 Move to event-loop.h and include it.
13749 * event-loop.h: New file.
13750
13751 2013-09-05 Pedro Alves <palves@redhat.com>
13752
13753 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
13754 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
13755 (loaded_dll, unloaded_dll): Move to ...
13756 * dll.h: ... this new file.
13757 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
13758
13759 2013-09-05 Pedro Alves <palves@redhat.com>
13760
13761 * server.h (current_process, get_thread_process, all_processes)
13762 (add_inferior_to_list, for_each_inferior, current_inferior)
13763 (remove_inferior, add_process, remove_process, find_process_pid)
13764 (have_started_inferiors_p, have_attached_inferiors_p)
13765 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
13766 (clear_inferiors, find_inferior, find_inferior_id)
13767 (inferior_target_data, set_inferior_target_data)
13768 (inferior_regcache_data, set_inferior_regcache_data): Move to
13769 inferiors.h, and include it.
13770 * inferiors.h: New file.
13771
13772 2013-09-05 Pedro Alves <palves@redhat.com>
13773
13774 * server.h (struct emit_ops, current_insn_ptr, emit_error):
13775 Move ...
13776 * ax.h: ... here.
13777
13778 2013-09-05 Pedro Alves <palves@redhat.com>
13779
13780 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
13781 tracepoint.h.
13782 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
13783 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
13784 (handle_tracepoint_general_set, handle_tracepoint_query)
13785 (tracepoint_finished_step, tracepoint_was_hit)
13786 (release_while_stepping_state_list, current_traceframe)
13787 (in_readonly_region, traceframe_read_mem)
13788 (fetch_traceframe_registers, traceframe_read_sdata)
13789 (traceframe_read_info, struct fast_tpoint_collect_status)
13790 (fast_tracepoint_collecting, force_unlock_trace_buffer)
13791 (handle_tracepoit_bkpts, initialize_low_tracepoint)
13792 (supply_fast_tracepoint_registers)
13793 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
13794 (ipa_tdesc, claim_trampoline_space)
13795 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
13796 (agent_mem_read, agent_get_trace_state_variable_value)
13797 (agent_set_trace_state_variable_value, agent_tsv_read)
13798 (agent_mem_read_string, get_raw_reg_func_addr)
13799 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
13800 * tracepoint.h: ... this new file.
13801
13802 2013-09-05 Pedro Alves <palves@redhat.com>
13803
13804 * server.h (perror_with_name, error, fatal, warning, paddress)
13805 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
13806 include it.
13807 * utils.h: New file.
13808
13809 2013-09-05 Pedro Alves <palves@redhat.com>
13810
13811 * server.h (remote_debug, noack_mode, transport_is_reliable)
13812 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
13813 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
13814 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
13815 (write_enn, initialize_async_io, enable_async_io)
13816 (disable_async_io, check_remote_input_interrupt_request)
13817 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
13818 (dead_thread_notify, prepare_resume_reply)
13819 (decode_address_to_semicolon, decode_address, decode_m_packet)
13820 (decode_M_packet, decode_X_packet, decode_xfer_write)
13821 (decode_search_memory_packet, unhexify, hexify)
13822 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
13823 (look_up_one_symbol, relocate_instruction)
13824 (monitor_output): Move to remote-utils.h, and include it.
13825 * remote-utils.h: New file.
13826
13827 2013-09-05 Pedro Alves <palves@redhat.com>
13828
13829 * server.h (_): Delete.
13830
13831 2013-09-02 Pedro Alves <palves@redhat.com>
13832
13833 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
13834 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
13835 allocated.
13836 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
13837
13838 2013-09-02 Pierre Muller <muller@sourceware.org>
13839
13840 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
13841 or WriteProcessMemory complete successfully and handle
13842 ERROR_PARTIAL_COPY error.
13843
13844 2013-09-02 Pedro Alves <palves@redhat.com>
13845
13846 * server.c (gdb_read_memory): Return -1 on traceframe memory read
13847 error instead of EIO.
13848
13849 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13850
13851 PR server/15604
13852 * linux-low.c: Include filestuff.h.
13853 (linux_create_inferior) <pid == 0>: Call close_most_fds.
13854 * lynx-low.c: Include filestuff.h.
13855 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
13856 * server.c: Include filestuff.h.
13857 (main): Call notice_open_fds.
13858 * spu-low.c: Include filestuff.h.
13859 (spu_create_inferior) <pid == 0>: Call close_most_fds.
13860
13861 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
13862
13863 * Makefile.in: Explain why ../target and ../nat are not
13864 listed as include file search paths.
13865 (linux-waitpid.o): New object file rule.
13866 * configure.srv (srv_native_linux_obj): New variable.
13867 Replace all occurrences of linux native object files with
13868 $srv_native_linux_obj.
13869 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
13870 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
13871 (linux_enable_event_reporting): Remove declaration.
13872 (my_waitpid): Moved to common/linux-waitpid.c.
13873 (linux_wait_for_event): Pass ptid when calling
13874 linux_enable_event_reporting.
13875 (linux_supports_tracefork_flag): Remove.
13876 (linux_enable_event_reporting): Likewise.
13877 (linux_tracefork_grandchild): Remove.
13878 (STACK_SIZE): Moved to common/linux-ptrace.c.
13879 (linux_tracefork_child): Remove.
13880 (linux_test_for_tracefork): Remove.
13881 (linux_look_up_symbols): Call linux_supports_traceclone.
13882 (initialize_low): Remove call to linux_test_for_tracefork.
13883 * linux-low.h (PTRACE_TYPE_ARG3): Move to
13884 common/linux-ptrace.h.
13885 (PTRACE_TYPE_ARG4): Likewise.
13886 Include linux-ptrace.h.
13887
13888 2013-08-21 Pedro Alves <palves@redhat.com>
13889
13890 * config.in: Renegerate.
13891
13892 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
13893
13894 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
13895 (SFILES): Remove $(srcdir)/common/target-common.c and
13896 add $(srcdir)/target/waitstatus.c.
13897 (OBS): Remove target-common.o and add waitstatus.o.
13898 (server_h): Remove $(srcdir)/../common/target-common.h and
13899 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
13900 and $(srcdir)/../target/waitstatus.h.
13901 (target-common.o): Remove.
13902 (waitstatus.o): New target object file.
13903 * target.h: Do not include target-common.h and
13904 include target/resume.h, target/wait.h and
13905 target/waitstatus.h.
13906
13907 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
13908
13909 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13910 to PTRACE_TYPE_ARG3.
13911 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13912 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
13913 PTRACE_TYPE_ARG4.
13914 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
13915 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
13916
13917 2013-07-27 Jie Zhang <jie@codesourcery.com>
13918 Daniel Jacobowitz <dan@codesourcery.com>
13919 Yao Qi <yao@codesourcery.com>
13920
13921 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
13922 (mips-linux-watch.o): New rule.
13923 (mips_linux_watch_h): New variable.
13924 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
13925 srv_tgtobj.
13926 * linux-mips-low.c: Include mips-linux-watch.h.
13927 (struct arch_process_info, struct arch_lwp_info): New.
13928 (update_watch_registers_callback): New function.
13929 (mips_linux_new_process, mips_linux_new_thread) New functions.
13930 (mips_linux_prepare_to_resume, mips_insert_point): New
13931 functions.
13932 (mips_remove_point, mips_stopped_by_watchpoint): New
13933 functions.
13934 (rsp_bp_type_to_target_hw_bp_type): New function.
13935 (mips_stopped_data_address): New function.
13936 (the_low_target): Add watchpoint support functions.
13937
13938 2013-07-27 Yao Qi <yao@codesourcery.com>
13939
13940 * i386-low.c: Include break-common.h.
13941 (enum target_hw_bp_type): Remove.
13942
13943 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
13944
13945 * Makefile.in (SFILES): /common/target-common.c.
13946 (OBS): Add target-common.o.
13947 (server_h): Add $(srcdir)/../common/target-common.h.
13948 (target-common.o): New target.
13949 * server.c (queue_stop_reply_callback): Free
13950 status string after use.
13951 * target.c (target_waitstatus_to_string): Remove.
13952 * target.h: Include target-common.h.
13953 (resume_kind): Likewise.
13954 (target_waitkind): Likewise.
13955 (target_waitstatus): Likewise.
13956 (TARGET_WNOHANG): Likewise.
13957
13958 2013-07-04 Yao Qi <yao@codesourcery.com>
13959
13960 * Makefile.in (host_alias): Use @host_noncanonical@.
13961 (target_alias): Use @target_noncanonical@.
13962 * configure.ac: Use ACX_NONCANONICAL_TARGET and
13963 ACX_NONCANONICAL_HOST.
13964 * configure: Regenerated.
13965
13966 Revert:
13967 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
13968
13969 * configure.ac (version_host, version_target): Set and AC_SUBST them.
13970 * configure: Rebuild.
13971 * Makefile.in (version_host, version_target): Get from configure.
13972 (version.c): Use $(version_host) and $(version_target).
13973
13974 2013-07-03 Pedro Alves <palves@redhat.com>
13975
13976 * Makefile.in (config.status): Depend on development.sh.
13977 * acinclude.m4: Include libmcheck.m4.
13978 * configure: Regenerate.
13979
13980 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13981
13982 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
13983 attribute inside the parentheses.
13984 (winapi_DebugSetProcessKillOnExit): Ditto.
13985 (winapi_DebugBreakProcess): Ditto.
13986 (winapi_GenerateConsoleCtrlEvent): Ditto.
13987
13988 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
13989
13990 * notif.h (notif_event): Add a dummy member to avoid compiler
13991 errors.
13992
13993 2013-07-01 Pedro Alves <palves@redhat.com>
13994
13995 * hostio.c (HOSTIO_PATH_MAX): Define.
13996 (require_filename, handle_open, handle_unlink, handle_readlink):
13997 Use it.
13998
13999 2013-07-01 Pedro Alves <palves@redhat.com>
14000
14001 * server.h: Include "pathmax.h".
14002 * linux-low.c: Don't include sys/param.h.
14003 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
14004 MAXPATHLEN.
14005 * win32-low.c: Don't include sys/param.h.
14006 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
14007
14008 2013-07-01 Pedro Alves <palves@redhat.com>
14009
14010 * event-loop.c: Don't check HAVE_UNISTD_H before including
14011 <unistd.h>.
14012 * gdbreplay.c: Likewise.
14013 * remote-utils.c: Likewise.
14014 * server.c: Likewise.
14015 * configure.ac: Don't check for unistd.h.
14016 * configure: Regenerate.
14017
14018 2013-06-28 Tom Tromey <tromey@redhat.com>
14019
14020 * Makefile.in (version.c): Use version.in, not
14021 common/version.in.
14022
14023 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
14024
14025 * configure.ac (version_host, version_target): Set and AC_SUBST them.
14026 * configure: Rebuild.
14027 * Makefile.in (version_host, version_target): Get from configure.
14028 (version.c): Use $(version_host) and $(version_target).
14029
14030 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
14031
14032 Fix trace-status to output user name without trailing colon.
14033 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
14034
14035 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
14036
14037 Fix trace-status to output proper start-time and stop-time.
14038 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
14039 output start time and stop time in hex as gdb expects.
14040
14041 2013-06-26 Pedro Alves <pedro@codesourcery.com>
14042
14043 * tracepoint.c (build_traceframe_info_xml): Output trace state
14044 variables present in the trace buffer.
14045
14046 2013-06-24 Tom Tromey <tromey@redhat.com>
14047
14048 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
14049 create-version.sh.
14050 (version.o): Remove.
14051 * gdbreplay.c: Include version.h.
14052 (version, host_name): Don't declare.
14053 * server.h: Include version.h.
14054 (version, host_name): Don't declare.
14055
14056 2013-06-12 Pedro Alves <palves@redhat.com>
14057
14058 * linux-x86-low.c (linux_is_elf64): Delete global.
14059 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
14060 with local linux_pid_exe_is_elf_64_file use.
14061
14062 2013-06-11 Pedro Alves <palves@redhat.com>
14063
14064 * linux-low.c (regset_disabled, disable_regset): New functions.
14065 (regsets_fetch_inferior_registers)
14066 (regsets_store_inferior_registers): Use them.
14067 (initialize_regsets_info); Don't allocate the disabled_regsets
14068 array here.
14069 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
14070 comment.
14071
14072 2013-06-11 Pedro Alves <palves@redhat.com>
14073
14074 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
14075 xmalloc.
14076
14077 2013-06-11 Pedro Alves <palves@redhat.com>
14078
14079 * linux-x86-low.c (initialize_low_arch): Call
14080 init_registers_x32_avx_linux.
14081
14082 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
14083
14084 Fix compatibility with Android Bionic.
14085 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
14086 it is not empty.
14087
14088 2013-06-07 Pedro Alves <palves@redhat.com>
14089
14090 PR server/14823
14091 * Makefile.in (OBS): Add tdesc.o.
14092 (IPA_OBJS): Add tdesc-ipa.o.
14093 (tdesc-ipa.o): New rule.
14094 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
14095 interface.
14096 * linux-low.c (new_inferior): Delete.
14097 (disabled_regsets, num_regsets): Delete.
14098 (linux_add_process): Adjust to set the new per-process
14099 new_inferior flag.
14100 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
14101 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
14102 was a stop. When calling arch_setup, switch the current inferior
14103 to the thread that got an event.
14104 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
14105 (regsets_fetch_inferior_registers)
14106 (regsets_store_inferior_registers): New regsets_info parameter.
14107 Adjust to use it.
14108 (linux_register_in_regsets): New regs_info parameter. Adjust to
14109 use it.
14110 (register_addr, fetch_register, store_register): New usrregs_info
14111 parameter. Adjust to use it.
14112 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
14113 parameter regs_info. Adjust to use it.
14114 (linux_fetch_registers): Get the current inferior's regs_info, and
14115 adjust to use it.
14116 (linux_store_registers): Ditto.
14117 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
14118 (initialize_low): Don't initialize the target_regsets here. Call
14119 initialize_low_arch.
14120 * linux-low.h (target_regsets): Delete declaration.
14121 (struct regsets_info): New.
14122 (struct usrregs_info): New.
14123 (struct regs_info): New.
14124 (struct process_info_private) <new_inferior>: New field.
14125 (struct linux_target_ops): Delete the num_regs, regmap, and
14126 regset_bitmap fields. New field regs_info.
14127 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
14128 * i387-fp.c (num_xmm_registers): Delete.
14129 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
14130 calls to new interface.
14131 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
14132 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
14133 Infer the number of xmm registers from the regcache's target
14134 description.
14135 * i387-fp.h (num_xmm_registers): Delete.
14136 * inferiors.c (add_thread): Don't install the thread's regcache
14137 here.
14138 * proc-service.c (gregset_info): Fetch the current inferior's
14139 regs_info. Adjust to use it.
14140 * regcache.c: Include tdesc.h.
14141 (register_bytes, reg_defs, num_registers)
14142 (gdbserver_expedite_regs): Delete.
14143 (get_thread_regcache): If the thread doesn't have a regcache yet,
14144 create one, instead of aborting gdbserver.
14145 (regcache_invalidate_one): Rename to ...
14146 (regcache_invalidate_thread): ... this.
14147 (regcache_invalidate_one): New.
14148 (regcache_invalidate): Only invalidate registers of the current
14149 process.
14150 (init_register_cache): Add target_desc parameter, and use it.
14151 (new_register_cache): Ditto. Assert the target description has a
14152 non zero registers_size.
14153 (regcache_cpy): Add assertions. Adjust.
14154 (realloc_register_cache, set_register_cache): Delete.
14155 (registers_to_string, registers_from_string): Adjust.
14156 (find_register_by_name, find_regno, find_register_by_number)
14157 (register_cache_size): Add target_desc parameter, and use it.
14158 (free_register_cache_thread, free_register_cache_thread_one)
14159 (regcache_release, register_cache_size): New.
14160 (register_size): Add target_desc parameter, and use it.
14161 (register_data, supply_register, supply_register_zeroed)
14162 (supply_regblock, supply_register_by_name, collect_register)
14163 (collect_register_as_string, collect_register_by_name): Adjust.
14164 * regcache.h (struct target_desc): Forward declare.
14165 (struct regcache) <tdesc>: New field.
14166 (init_register_cache, new_register_cache): Add target_desc
14167 parameter.
14168 (regcache_invalidate_thread): Declare.
14169 (regcache_invalidate_one): Delete declaration.
14170 (regcache_release): Declare.
14171 (find_register_by_number, register_cache_size, register_size)
14172 (find_regno): Add target_desc parameter.
14173 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
14174 declarations.
14175 * remote-utils.c: Include tdesc.h.
14176 (outreg, prepare_resume_reply): Adjust.
14177 * server.c: Include tdesc.h.
14178 (gdbserver_xmltarget): Delete declaration.
14179 (get_features_xml, process_serial_event): Adjust.
14180 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
14181 declare.
14182 (struct process_info) <tdesc>: New field.
14183 (ipa_tdesc): Declare.
14184 * tdesc.c: New file.
14185 * tdesc.h: New file.
14186 * tracepoint.c: Include tdesc.h.
14187 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
14188 (get_context_regcache): Adjust to pass ipa_tdesc down.
14189 (do_action_at_tracepoint): Adjust to get the register cache size
14190 from the context regcache's description.
14191 (traceframe_walk_blocks): Adjust to get the register cache size
14192 from the current trace frame's description.
14193 (traceframe_get_pc): Adjust to get current trace frame's
14194 description and pass it down.
14195 (gdb_collect): Adjust to get the register cache size from the
14196 IPA's description.
14197 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
14198 (gdbserver_xmltarget): Delete.
14199 (initialize_low_tracepoint): Set the ipa's target description.
14200 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
14201 (initialize_low_tracepoint): Set the ipa's target description.
14202 * linux-x86-low.c: Include tdesc.h.
14203 [__x86_64__] (is_64bit_tdesc): New.
14204 (ps_get_thread_area, x86_get_thread_area): Use it.
14205 (i386_cannot_store_register): Rename to ...
14206 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
14207 (i386_cannot_fetch_register): Rename to ...
14208 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
14209 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
14210 to new interface.
14211 (target_regsets): Rename to ...
14212 (x86_regsets): ... this.
14213 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
14214 interface.
14215 (x86_siginfo_fixup): Use is_64bit_tdesc.
14216 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
14217 (tdesc_x32_avx_linux, tdesc_x32_linux)
14218 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
14219 Declare.
14220 (x86_linux_update_xmltarget): Delete.
14221 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
14222 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
14223 (AMD64_LINUX_USER64_CS): New.
14224 (x86_linux_read_description): New, based on
14225 x86_linux_update_xmltarget.
14226 (same_process_callback): New.
14227 (x86_arch_setup_process_callback): New.
14228 (x86_linux_update_xmltarget): New.
14229 (x86_regsets_info): New.
14230 (amd64_linux_regs_info): New.
14231 (i386_linux_usrregs_info): New.
14232 (i386_linux_regs_info): New.
14233 (x86_linux_regs_info): New.
14234 (x86_arch_setup): Reimplement.
14235 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
14236 (x86_emit_ops): Ditto.
14237 (the_low_target): Adjust. Install x86_linux_regs_info,
14238 x86_cannot_fetch_register, and x86_cannot_store_register.
14239 (initialize_low_arch): New.
14240 * linux-ia64-low.c (tdesc_ia64): Declare.
14241 (ia64_fetch_register): Adjust.
14242 (ia64_usrregs_info, regs_info): New globals.
14243 (ia64_regs_info): New function.
14244 (the_low_target): Adjust.
14245 (initialize_low_arch): New function.
14246 * linux-sparc-low.c (tdesc_sparc64): Declare.
14247 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
14248 Adjust.
14249 (sparc_arch_setup): New function.
14250 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
14251 (the_low_target): Adjust.
14252 (initialize_low_arch): New function.
14253 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
14254 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
14255 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
14256 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
14257 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
14258 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
14259 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
14260 (tdesc_powerpc_isa205_vsx64l): Declare.
14261 (ppc_cannot_store_register, ppc_collect_ptrace_register)
14262 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
14263 (ppc_set_pc, ppc_get_hwcap): Adjust.
14264 (ppc_usrregs_info): Forward declare.
14265 (!__powerpc64__) ppc_regmap_adjusted: New global.
14266 (ppc_arch_setup): Adjust to the current process'es target
14267 description.
14268 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
14269 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
14270 (ppc_store_evrregset): Adjust.
14271 (target_regsets): Rename to ...
14272 (ppc_regsets): ... this, and make static.
14273 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
14274 (ppc_regs_info): New function.
14275 (the_low_target): Adjust.
14276 (initialize_low_arch): New function.
14277 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
14278 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
14279 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
14280 (tdesc_s390x_linux64v2): Declare.
14281 (s390_collect_ptrace_register, s390_supply_ptrace_register)
14282 (s390_fill_gregset, s390_store_last_break): Adjust.
14283 (target_regsets): Rename to ...
14284 (s390_regsets): ... this, and make static.
14285 (s390_get_pc, s390_set_pc): Adjust.
14286 (s390_get_hwcap): New target_desc parameter, and use it.
14287 [__s390x__] (have_hwcap_s390_high_gprs): New global.
14288 (s390_arch_setup): Adjust to set the current process'es target
14289 description. Don't adjust the regmap.
14290 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
14291 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
14292 (regs_info_3264): New globals.
14293 (s390_regs_info): New function.
14294 (the_low_target): Adjust.
14295 (initialize_low_arch): New function.
14296 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
14297 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
14298 [__mips64] (init_registers_mips_linux)
14299 (init_registers_mips_dsp_linux): Delete defines.
14300 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
14301 (have_dsp): New global.
14302 (mips_read_description): New, based on mips_arch_setup.
14303 (mips_arch_setup): Reimplement.
14304 (get_usrregs_info): New function.
14305 (mips_cannot_fetch_register, mips_cannot_store_register)
14306 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
14307 (mips_fill_fpregset, mips_store_fpregset): Adjust.
14308 (target_regsets): Rename to ...
14309 (mips_regsets): ... this, and make static.
14310 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
14311 (dsp_regs_info, regs_info): New globals.
14312 (mips_regs_info): New function.
14313 (the_low_target): Adjust.
14314 (initialize_low_arch): New function.
14315 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
14316 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
14317 Declare.
14318 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
14319 (arm_read_description): New, with bits factored from
14320 arm_arch_setup.
14321 (arm_arch_setup): Reimplement.
14322 (target_regsets): Rename to ...
14323 (arm_regsets): ... this, and make static.
14324 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
14325 (arm_regs_info): New function.
14326 (the_low_target): Adjust.
14327 (initialize_low_arch): New function.
14328 * linux-m68k-low.c (tdesc_m68k): Declare.
14329 (target_regsets): Rename to ...
14330 (m68k_regsets): ... this, and make static.
14331 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
14332 (m68k_regs_info): New function.
14333 (m68k_arch_setup): New function.
14334 (the_low_target): Adjust.
14335 (initialize_low_arch): New function.
14336 * linux-sh-low.c (tdesc_sharch): Declare.
14337 (target_regsets): Rename to ...
14338 (sh_regsets): ... this, and make static.
14339 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
14340 (sh_regs_info, sh_arch_setup): New functions.
14341 (the_low_target): Adjust.
14342 (initialize_low_arch): New function.
14343 * linux-bfin-low.c (tdesc_bfin): Declare.
14344 (bfin_arch_setup): New function.
14345 (bfin_usrregs_info, regs_info): New globals.
14346 (bfin_regs_info): New function.
14347 (the_low_target): Adjust.
14348 (initialize_low_arch): New function.
14349 * linux-cris-low.c (tdesc_cris): Declare.
14350 (cris_arch_setup): New function.
14351 (cris_usrregs_info, regs_info): New globals.
14352 (cris_regs_info): New function.
14353 (the_low_target): Adjust.
14354 (initialize_low_arch): New function.
14355 * linux-cris-low.c (tdesc_crisv32): Declare.
14356 (cris_arch_setup): New function.
14357 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
14358 (cris_regs_info): New function.
14359 (the_low_target): Adjust.
14360 (initialize_low_arch): New function.
14361 * linux-m32r-low.c (tdesc_m32r): Declare.
14362 (m32r_arch_setup): New function.
14363 (m32r_usrregs_info, regs_info): New globals.
14364 (m32r_regs_info): Adjust.
14365 (initialize_low_arch): New function.
14366 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
14367 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
14368 (tic6x_usrregs_info): Forward declare.
14369 (tic6x_read_description): New function, based on ...
14370 (tic6x_arch_setup): ... this. Reimplement.
14371 (target_regsets): Rename to ...
14372 (tic6x_regsets): ... this, and make static.
14373 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
14374 (tic6x_regs_info): New function.
14375 (the_low_target): Adjust.
14376 (initialize_low_arch): New function.
14377 * linux-xtensa-low.c (tdesc_xtensa): Declare.
14378 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
14379 (target_regsets): Rename to ...
14380 (xtensa_regsets): ... this, and make static.
14381 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
14382 globals.
14383 (xtensa_arch_setup, xtensa_regs_info): New functions.
14384 (the_low_target): Adjust.
14385 (initialize_low_arch): New function.
14386 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
14387 (nios2_arch_setup): Set the current process'es tdesc.
14388 (target_regsets): Rename to ...
14389 (nios2_regsets): ... this.
14390 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
14391 (nios2_regs_info): New function.
14392 (the_low_target): Adjust.
14393 (initialize_low_arch): New function.
14394 * linux-aarch64-low.c (tdesc_aarch64): Declare.
14395 (aarch64_arch_setup): Set the current process'es tdesc.
14396 (target_regsets): Rename to ...
14397 (aarch64_regsets): ... this.
14398 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
14399 (aarch64_regs_info): New function.
14400 (the_low_target): Adjust.
14401 (initialize_low_arch): New function.
14402 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
14403 globals.
14404 (target_regsets): Rename to ...
14405 (tile_regsets): ... this.
14406 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
14407 (tile_regs_info): New function.
14408 (tile_arch_setup): Set the current process'es tdesc.
14409 (the_low_target): Adjust.
14410 (initialize_low_arch): New function.
14411 * spu-low.c (tdesc_spu): Declare.
14412 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
14413 * win32-arm-low.c (tdesc_arm): Declare.
14414 (arm_arch_setup): New function.
14415 (the_low_target): Install arm_arch_setup instead of
14416 init_registers_arm.
14417 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
14418 (init_windows_x86): Rename to ...
14419 (i386_arch_setup): ... this. Set `win32_tdesc'.
14420 (the_low_target): Adjust.
14421 * win32-low.c (win32_tdesc): New global.
14422 (child_add_thread): Don't create the thread cache here.
14423 (do_initial_child_stuff): Set the new process'es tdesc.
14424 * win32-low.h (struct target_desc): Forward declare.
14425 (win32_tdesc): Declare.
14426 * lynx-i386-low.c (tdesc_i386): Declare global.
14427 (lynx_i386_arch_setup): Set `lynx_tdesc'.
14428 * lynx-low.c (lynx_tdesc): New global.
14429 (lynx_add_process): Set the new process'es tdesc.
14430 * lynx-low.h (struct target_desc): Forward declare.
14431 (lynx_tdesc): Declare global.
14432 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
14433 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
14434 * nto-low.c (nto_tdesc): New global.
14435 (do_attach): Set the new process'es tdesc.
14436 * nto-low.h (struct target_desc): Forward declare.
14437 (nto_tdesc): Declare.
14438 * nto-x86-low.c (tdesc_i386): Declare.
14439 (nto_x86_arch_setup): Set `nto_tdesc'.
14440
14441 2013-06-04 Gary Benson <gbenson@redhat.com>
14442
14443 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
14444 to qSupported response when appropriate.
14445 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
14446 with nonzero-length annex.
14447 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
14448 arguments supplied in annex.
14449
14450 2013-05-31 Doug Evans <dje@google.com>
14451
14452 PR server/15594
14453 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
14454 64 bits in 64-cross-32 environment.
14455
14456 2013-05-28 Pedro Alves <palves@redhat.com>
14457
14458 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
14459 (aarch64-without-fpu.c): Delete rule.
14460 * configure.srv (aarch64*-*-linux*): Remove references to
14461 aarch64-without-fpu.o and aarch64-without-fpu.xml.
14462 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
14463 declaration.
14464
14465 2013-05-24 Pedro Alves <palves@redhat.com>
14466
14467 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
14468 instead of strchr/decode_address. Error if the range isn't split
14469 with a ','. Don't assume there's be a ':' in the action.
14470
14471 2013-05-23 Yao Qi <yao@codesourcery.com>
14472 Pedro Alves <palves@redhat.com>
14473
14474 * linux-low.c (lwp_in_step_range): New function.
14475 (linux_wait_1): If the thread was range stepping and stopped
14476 outside the stepping range, report the stop to GDB. Otherwise,
14477 continue stepping. Add range stepping debug output.
14478 (linux_set_resume_request): Copy the step range from the resume
14479 request to the lwp.
14480 (linux_supports_range_stepping): New.
14481 (linux_target_ops) <supports_range_stepping>: Set to
14482 linux_supports_range_stepping.
14483 * linux-low.h (struct linux_target_ops)
14484 <supports_range_stepping>: New field.
14485 (struct lwp_info) <step_range_start, step_range_end>: New fields.
14486 * linux-x86-low.c (x86_supports_range_stepping): New.
14487 (the_low_target) <supports_range_stepping>: Set to
14488 x86_supports_range_stepping.
14489 * server.c (handle_v_cont): Handle 'r' action.
14490 (handle_v_requests): Append ";r" if the target supports range
14491 stepping.
14492 * target.h (struct thread_resume) <step_range_start,
14493 step_range_end>: New fields.
14494 (struct target_ops) <supports_range_stepping>:
14495 New field.
14496 (target_supports_range_stepping): New macro.
14497
14498 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14499
14500 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
14501 confusion in comment.
14502
14503 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14504
14505 * lynx-low.c (struct process_info_private): New type.
14506 (lynx_add_process): New function.
14507 (lynx_create_inferior, lynx_attach): Replace calls to
14508 add_process by calls to lynx_add_process.
14509 (lynx_resume): If PTID is null, then try using
14510 current_process()->private->last_wait_event_ptid.
14511 Add comments.
14512 (lynx_clear_inferiors): Delete. The contents of that function
14513 has been inlined in lynx_mourn;
14514 (lynx_wait_1): Save the ptid in the process's private data.
14515 (lynx_mourn): Free the process' private data. Replace call
14516 to lynx_clear_inferiors by call to clear_inferiors.
14517
14518 2013-05-17 Yao Qi <yao@codesourcery.com>
14519
14520 * i386-low.c (i386_length_and_rw_bits): Move the comment to
14521 the right place.
14522
14523 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
14524
14525 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
14526 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
14527 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
14528 PT_TEXT_END_ADDR guards. Update comments.
14529 (linux_target_op) <read_offsets>: Conditionally define to
14530 linux_read_offsets if the target is UCLIBC and if it defines
14531 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
14532
14533 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
14534 Andrew Jenner <andrew@codesourcery.com>
14535
14536 * Makefile.in (SFILES): Add linux-nios2-low.c.
14537 (clean): Add action to delete nios2-linux.c.
14538 (nios2-linux.c): New rule.
14539 * configure.srv: Add nios2*-*-linux*.
14540 * linux-nios2-low.c: New.
14541
14542 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
14543
14544 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
14545
14546 2013-04-25 Hui Zhu <hui@codesourcery.com>
14547
14548 PR gdb/15186
14549 * ax.c (ax_printf): Add fflush.
14550
14551 2013-04-22 Tom Tromey <tromey@redhat.com>
14552
14553 * Makefile.in (SFILES): Add filestuff.c.
14554 (OBS): Add filestuff.o.
14555 (filestuff.o): New target.
14556 * config.in, configure: Rebuild.
14557 * configure.ac: Check for fdwalk, pipe2.
14558
14559 2013-04-17 Pedro Alves <palves@redhat.com>
14560
14561 * configure.ac (USE_THREAD_DB): Delete variable.
14562 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
14563 Don't AC_SUBST USE_THREAD_DB.
14564 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
14565 * config.in, configure: Regenerate.
14566
14567 2013-04-16 Pedro Alves <palves@redhat.com>
14568
14569 * linux-low.h (struct lwp_info) <thread_known>: Move under
14570 the USE_THREAD_DB #ifdef.
14571
14572 2013-04-16 Pedro Alves <palves@redhat.com>
14573
14574 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
14575 (linux-low.o): Delete rule.
14576 * linux-low.h: Always include "gdb_thread_db.h" instead of
14577 conditionally including thread_db.h.
14578 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
14579 HAVE_THREAD_DB_H.
14580
14581 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14582
14583 * Makefile.in (install-only): Fix make install regression.
14584
14585 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
14586
14587 Convert man pages to texinfo, new gdbinit.5 texinfo page.
14588 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
14589 installation.
14590 * gdbserver.1: Remove.
14591
14592 2013-03-22 Pedro Alves <palves@redhat.com>
14593
14594 * linux-low.c (handle_extended_wait): Don't call
14595 linux_enable_event_reporting.
14596
14597 2013-03-15 Tony Theodore <tonyt@logyst.com>
14598
14599 PR build/9098:
14600 * Makefile.in (SHELL): Use @SHELL@.
14601
14602 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
14603
14604 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
14605 compiler warning.
14606
14607 2013-03-13 Joel Brobecker <brobecker@adacore.com>
14608
14609 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
14610 Remove extraneous NULL element.
14611
14612 2013-03-13 Yao Qi <yao@codesourcery.com>
14613
14614 * tracepoint.c (traceframe_read_tsv): Look for the last matched
14615 'V' block in trace frame.
14616
14617 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14618
14619 * target.h (struct target_ops): Add btrace ops.
14620 (target_supports_btrace): New macro.
14621 (target_enable_btrace): New macro.
14622 (target_disable_btrace): New macro.
14623 (target_read_btrace): New macro.
14624 * gdbthread.h (struct thread_info): Add btrace field.
14625 * server.c: Include btrace-common.h.
14626 (handle_btrace_general_set): New function.
14627 (handle_btrace_enable): New function.
14628 (handle_btrace_disable): New function.
14629 (handle_general_set): Call handle_btrace_general_set.
14630 (handle_qxfer_btrace): New function.
14631 (struct qxfer qxfer_packets[]): Add btrace entry.
14632 * inferiors.c (remove_thread): Disable btrace.
14633 * linux-low: Include linux-btrace.h.
14634 (linux_low_enable_btrace): New function.
14635 (linux_low_read_btrace): New function.
14636 (linux_target_ops): Add btrace ops.
14637 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
14638 Add srv_linux_btrace=yes.
14639 (x86_64-*-linux*): Add linux-btrace.o.
14640 Add srv_linux_btrace=yes.
14641 * configure.ac: Define HAVE_LINUX_BTRACE.
14642 * config.in: Regenerated.
14643 * configure: Regenerated.
14644
14645 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14646
14647 * server.c (handle_qxfer): Preserve error message if -3 is
14648 returned.
14649 (qxfer): Document the -3 return value.
14650
14651 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14652
14653 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
14654 (linux_btrace_h): New variable.
14655 (linux-btrace.o): New rule.
14656
14657 2013-03-08 Stan Shebs <stan@codesourcery.com>
14658 Hafiz Abid Qadeer <abidh@codesourcery.com>
14659
14660 * tracepoint.c (trace_buffer_size): New global.
14661 (DEFAULT_TRACE_BUFFER_SIZE): New define.
14662 (init_trace_buffer): Change to one-argument function. Allocate
14663 trace buffer memory.
14664 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
14665 handle QTBuffer:size packet.
14666 (cmd_bigqtbuffer_size): New function.
14667 (initialize_tracepoint): Call init_trace_buffer with
14668 DEFAULT_TRACE_BUFFER_SIZE.
14669 * server.c (handle_query): Add QTBuffer:size in the
14670 supported packets.
14671
14672 2013-03-07 Yao Qi <yao@codesourcery.com>
14673
14674 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
14675 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
14676 of -1.
14677 (cmd_qtsp): Adjust condition. Do post increment.
14678 Set cur_action and cur_step_action back to 0.
14679
14680 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
14681
14682 PR server/15236
14683 * linux-low.c (linux_write_memory): Return early success if LEN is
14684 zero.
14685
14686 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
14687
14688 * configure.srv: Add x86_64-*-cygwin* as target.
14689
14690 2013-02-28 Tom Tromey <tromey@redhat.com>
14691
14692 * configure.ac: Invoke AC_SYS_LARGEFILE.
14693 * configure, config.in: Rebuild.
14694
14695 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
14696
14697 * win32-low.c: Throughout, fix format strings and casts of
14698 printf-like functions to avoid type related warnings on all
14699 platforms.
14700 (get_child_debug_event): Print dwDebugEventCode as hex since
14701 that's how it's usually documented.
14702
14703 2013-02-28 Yao Qi <yao@codesourcery.com>
14704
14705 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
14706 pulongest.
14707
14708 2013-02-27 Jiong Wang <jiwang@tilera.com>
14709
14710 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
14711 (reg-tilegx32.c): New rule.
14712 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
14713 * linux-tile-low.c (tile_arch_setup): New function. Invoke
14714 different register info initializer according to elf class.
14715 (init_registers_tilgx32): New function. The tilegx32 register info
14716 initializer.
14717 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
14718 (tile_store_gregset): Likewise.
14719
14720 2013-02-27 Yao Qi <yao@codesourcery.com>
14721
14722 * server.c (process_point_options): Print debug message when
14723 debug_threads is true.
14724
14725 2013-02-26 Yao Qi <yao@codesourcery.com>
14726
14727 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
14728
14729 2013-02-19 Pedro Alves <palves@redhat.com>
14730 Kai Tietz <ktietz@redhat.com>
14731
14732 PR gdb/15161
14733
14734 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
14735 instead of strtoul to extract address from packet.
14736 (process_serial_event) <'z'>: Likewise.
14737
14738 2013-02-18 Yao Qi <yao@codesourcery.com>
14739
14740 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
14741
14742 2013-02-14 Pedro Alves <palves@redhat.com>
14743
14744 Plug memory leak.
14745
14746 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
14747 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
14748
14749 2013-02-14 Pedro Alves <palves@redhat.com>
14750
14751 * tracepoint.c (cmd_qtdpsrc): Use savestring.
14752
14753 2013-02-14 Pedro Alves <palves@redhat.com>
14754
14755 * tracepoint.c (save_string): Delete.
14756 (add_tracepoint_action): Use savestring instead of save_string.
14757
14758 2013-02-12 Pedro Alves <palves@redhat.com>
14759
14760 * linux-xtensa-low.c: Ditto.
14761 * xtensa-xtregs.c: Ditto.
14762
14763 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
14764
14765 * thread-db.c (thread_db_get_tls_address): NULL pointer check
14766 thread_db.
14767
14768 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14769
14770 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
14771 aarch64_num_wp_regs and aarch64_num_bp_regs to
14772 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
14773
14774 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14775
14776 * linux-aarch64-low.c (ps_get_thread_area): Replace
14777 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
14778
14779 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
14780 Marcus Shawcroft <marcus.shawcroft@arm.com>
14781 Nigel Stephens <nigel.stephens@arm.com>
14782 Yufeng Zhang <yufeng.zhang@arm.com>
14783
14784 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
14785 (aarch64.c, aarch64-without-fpu.c): New targets.
14786 * configure.srv (aarch64*-*-linux*): New.
14787 * linux-aarch64-low.c: New file.
14788
14789 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
14790
14791 * linux-low.c (handle_extended_wait, linux_create_inferior)
14792 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
14793 (dequeue_one_deferred_signal, linux_resume_one_thread)
14794 (fetch_register, linux_write_memory, linux_enable_event_reporting)
14795 (linux_tracefork_grandchild, linux_test_for_tracefork)
14796 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
14797 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
14798 where the argument is 0.
14799
14800 2013-01-25 Yao Qi <yao@codesourcery.com>
14801
14802 * event-loop.c: Include "queue.h".
14803 (gdb_event_p): New typedef.
14804 (struct gdb_event) <next_event>: Remove.
14805 (event_queue): Change to QUEUE(gdb_event_p).
14806 (async_queue_event): Remove.
14807 (gdb_event_xfree): New.
14808 (initialize_event_loop): New.
14809 (process_event): Use API from QUEUE.
14810 (wait_for_event): Likewise.
14811 * server.c (main): Call initialize_event_loop.
14812 * server.h (initialize_event_loop): Declare.
14813
14814 2013-01-18 Yao Qi <yao@codesourcery.com>
14815
14816 * ax.h (struct eval_agent_expr_context): New.
14817 (gdb_eval_agent_expr): Update declaration.
14818 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
14819 TFRAME. Add new argument CTX.
14820 * server.h (struct eval_agent_expr_context): Declare.
14821 (agent_mem_read, agent_tsv_read): Update declaration.
14822 (agent_mem_read_string): Likewise.
14823 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
14824 (add_traceframe_block): Add new argument TPOINT.
14825 Increase TPOINT->traceframe_usage.
14826 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
14827 eval_tracepoint_agent_expr.
14828 (condition_true_at_tracepoint): Likewise.
14829 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
14830 (agent_mem_read_string, agent_tsv_read): Likewise.
14831
14832 2013-01-16 Yao Qi <yao@codesourcery.com>
14833
14834 * linux-low.c (linux_resume_one_lwp): Don't check
14835 'lwp->bp_reinsert != 0'.
14836
14837 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14838 Pedro Alves <palves@redhat.com>
14839
14840 * lynx-low.c (ptrace_request_to_str): Define a temporary
14841 macro and use it to simplify this function's implementation.
14842
14843 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14844
14845 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
14846 sets errno.
14847
14848 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14849
14850 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
14851
14852 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14853
14854 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
14855
14856 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14857
14858 * lynx-low.c (lynx_resume): Use the resume_info parameter
14859 to determine the ptid for the lynx_ptrace call, unless
14860 it is equal to minus_one_ptid, in which case we use the
14861 ptid of the current_inferior.
14862 (lynx_wait_1): After having received a thread create/exit
14863 event, resume the inferior's execution using the signaling
14864 thread's ptid, rather than the old ptid.
14865
14866 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14867
14868 * lynx-low.c (lynx_resume): Delete variable ret.
14869
14870 2013-01-01 Joel Brobecker <brobecker@adacore.com>
14871
14872 * gdbreplay.c (gdbreplay_version): Update copyright year.
14873 * server.c (gdbserver_version): Likewise.
14874
14875 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14876
14877 * lynx-low.c (lynx_wait_1): Add debug trace before adding
14878 new thread.
14879
14880 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14881
14882 * lynx-low.c (ptrace_request_to_str): Add handling for
14883 PTRACE_GETTRACESIG.
14884
14885 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14886
14887 * lynx-low.c (lynx_attach): Delete variable new_process.
14888
14889 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14890
14891 * lynx-low.c (lynx_create_inferior): Delete variable
14892 new_process.
14893
14894 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14895
14896 * lynx-low.c (ptrace_request_to_str): Do not handle
14897 PTRACE_GETTHREADLIST if this macro does not exist.
14898
14899 2012-12-15 Yao Qi <yao@codesourcery.com>
14900
14901 * Makefile.in (OBS): Add notif.o.
14902 * notif.c, notif.h: New.
14903 * server.c: Include "notif.h".
14904 (struct vstop_notif) <next>: Remove.
14905 <base>: New field.
14906 (queue_stop_reply): Update.
14907 (push_event, send_next_stop_reply): Remove.
14908 (discard_queued_stop_replies): Update.
14909 (notif_stop): New variable.
14910 (handle_v_stopped): Remove.
14911 (handle_v_requests): Don't call handle_v_stopped. Call
14912 handle_ack_notif instead.
14913 (queue_stop_reply_callback): Call notif_event_enque instead
14914 of queue_stop_reply.
14915 (handle_status): Don't call send_next_stop_reply, call
14916 notif_write_event instead.
14917 (kill_inferior_callback): Likewise.
14918 (detach_or_kill_inferior_callback): Likewise.
14919 (main): Call initialize_notif.
14920 (process_serial_event): Call QUEUE_is_empty.
14921 (handle_target_event): Call notif_push instead of push event.
14922 * server.h (push_event): Remove declaration.
14923
14924 2012-12-10 Tom Tromey <tromey@redhat.com>
14925
14926 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
14927 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
14928 macros.
14929 (.c.o): Rewrite.
14930 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
14931 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
14932 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
14933 (amd64-linux-ipa.o, ax.o): Rewrite.
14934 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
14935 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
14936 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
14937 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
14938 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
14939 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
14940 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
14941 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
14942 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
14943 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
14944 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
14945 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
14946 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
14947 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
14948 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
14949 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
14950 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
14951 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
14952 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
14953 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
14954 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
14955 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
14956 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
14957 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
14958 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
14959 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
14960 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
14961 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
14962 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
14963 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
14964 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
14965 (reg-tilegx.o): Remove.
14966 (all_object_files): New macro.
14967 Include .deps files.
14968 * aclocal.m4, configure: Rebuild.
14969 * acinclude.m4: Include depstand.m4, lead-dot.m4.
14970 * configure.ac: Invoke ZW_CREATE_DEPDIR,
14971 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
14972
14973 2012-12-05 Tom Tromey <tromey@redhat.com>
14974
14975 PR gdb/14917:
14976 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
14977
14978 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
14979
14980 * configure.ac: Check for linux/perf_event.h.
14981 * config.in: Regenerated.
14982 * configure: Regenerated.
14983
14984 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
14985
14986 * hostio.c (handle_readlink): Decrease buffer size
14987 parameter passed to readlink by one byte.
14988
14989 2012-11-26 Yao Qi <yao@codesourcery.com>
14990
14991 * configure.ac (build_warnings): Append '-Wempty-body'.
14992 * configure: Regenerated.
14993 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
14994 body.
14995
14996 2012-11-15 Pierre Muller <muller@sourceware.org>
14997
14998 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
14999 * config.in: Regenerate.
15000 * configure: Regenerate.
15001 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
15002 Use "gdb_wait.h" header instead of <sys/wait.h> header.
15003 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
15004 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
15005 header.
15006 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
15007 instead of <sys/wait.h> header.
15008 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
15009
15010 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
15011
15012 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
15013 (various make rules): Remove -DGDBSERVER
15014
15015 2012-11-09 Yao Qi <yao@codesourcery.com>
15016
15017 * spu-low.c (current_ptid): Move it to ..
15018 * gdbthread.h: ... here. New.
15019 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
15020 * server.c (myresume, process_serial_event): Likewise.
15021 * thread-db.c (thread_db_find_new_threads): Likewise.
15022 * tracepoint.c (run_inferior_command): Likewise.
15023
15024 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
15025
15026 * server.c (handle_search_memory_1): Include access length in
15027 warning message.
15028
15029 2012-09-05 Michael Brandt <michael.brandt@axis.com>
15030
15031 * linux-crisv32-low.c: Fix compile errors.
15032
15033 2012-09-04 Yao Qi <yao@codesourcery.com>
15034
15035 * tracepoint.c (cmd_qtsv): Adjust debug message.
15036 Don't check CUR_TPOINT.
15037
15038 2012-08-28 Yao Qi <yao@codesourcery.com>
15039
15040 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
15041 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
15042 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
15043 Remove declarations of xmalloc, xreallloc, xstrdup and
15044 freeargv.
15045 * Makefile.in (libiberty_h): New.
15046 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
15047 (linux-bfin-low.o): Append dependency 'libiberty.h'.
15048
15049 2012-08-23 Yao Qi <yao@codesourcery.com>
15050
15051 * server.h: Remove declaration of 'xsnprintf'.
15052
15053 2012-08-22 Keith Seitz <keiths@redhat.com>
15054
15055 * server.h: Include build-gnulib-gbserver/config.h.
15056 * gdbreplay.c: Likewise.
15057
15058 2012-08-08 Doug Evans <dje@google.com>
15059
15060 * Makefile.in (SFILES): Add gdb_vecs.c.
15061 (OBS): Add gdb_vecs.o.
15062 (gdb_vecs_h, host_defs_h): New variables.
15063 (thread-db.o): Add $(gdb_vecs_h) dependency.
15064 (gdb_vecs.o): New rule.
15065 * thread-db.c: #include "gdb_vecs.h".
15066 (thread_db_load_search): Use a vector to iterate over path elements.
15067 Handle text appearing after "$pdir".
15068
15069 * configure.ac: Add check for strstr.
15070 * config.in: Regenerate.
15071 * configure: Regenerate.
15072
15073 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
15074
15075 * hostio.c (handle_pread): If pread fails, fall back to attempting
15076 lseek/read.
15077 (handle_pwrite): Likewise for pwrite.
15078
15079 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
15080
15081 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
15082 between unsupported TYPE and unimplementable ADDR/LEN combination.
15083 (arm_insert_point): Act on new return value.
15084
15085 2012-07-31 Pedro Alves <palves@redhat.com>
15086
15087 * server.c (process_point_options): Only skip tokens if we find
15088 one that is unrecognized. Don't treat 'X' specially while
15089 skipping unrecognized tokens.
15090
15091 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
15092
15093 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
15094 to 4-byte-align HW breakpoint addresses for Thumb.
15095
15096 2012-07-27 Yao Qi <yao@codesourcery.com>
15097
15098 PR remote/14161.
15099
15100 * server.h: Declare gdb_agent_about_to_close.
15101 * target.c (kill_inferior): Include "agent.h".
15102 New. Send command 'kill'.
15103 * target.h (kill_inferior): Removed macro.
15104 * tracepoint.c (gdb_agent_about_to_close): New.
15105 (gdb_agent_helper_thread): Handle command 'close'.
15106 Wait endlessly until the inferior stops.
15107 Install gdb_agent_remove_socket to atexit hook.
15108 (agent_socket_name): New static variable.
15109 (gdb_agent_socket_init): Replace local variable 'name' with
15110 'agent_socket_name'.
15111 (gdb_agent_remove_socket): New.
15112
15113 2012-07-27 Yao Qi <yao@codesourcery.com>
15114
15115 * server.c (process_point_options): Stop at 'X' when parsing.
15116
15117 2012-07-19 Michael Eager <eager@eagercon.com>
15118
15119 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
15120 to hw_execute.
15121 * linux-x86-low.c (x86_insert_point, x86_remove_point):
15122 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
15123 hardware breakpoint.
15124
15125 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
15126
15127 * gdbserver/linux-low.c (initialize_low): Call
15128 linux_ptrace_init_warnings.
15129
15130 2012-07-02 Doug Evans <dje@google.com>
15131
15132 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
15133 pointer to int.
15134
15135 2012-07-02 Stan Shebs <stan@codesourcery.com>
15136
15137 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
15138 (ax.o): Add it to build rule.
15139 (ax-ipa.o): Ditto.
15140 (OBS): Add format.o.
15141 (IPA_OBS): Add format.o.
15142 * server.c (handle_query): Claim support for breakpoint commands.
15143 (process_point_options): Add command case.
15144 (process_serial_event): Leave running if there are printfs in
15145 effect.
15146 * mem-break.h (any_persistent_commands): Declare.
15147 (add_breakpoint_commands): Declare.
15148 (gdb_no_commands_at_breakpoint): Declare.
15149 (run_breakpoint_commands): Declare.
15150 * mem-break.c (struct point_command_list): New struct.
15151 (struct breakpoint): New field command_list.
15152 (any_persistent_commands): New function.
15153 (add_commands_to_breakpoint): New function.
15154 (add_breakpoint_commands): New function.
15155 (gdb_no_commands_at_breakpoint): New function.
15156 (run_breakpoint_commands): New function.
15157 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
15158 locally.
15159 * ax.c: Include format.h.
15160 (ax_printf): New function.
15161 (gdb_eval_agent_expr): Add printf opcode.
15162
15163 2012-06-13 Yao Qi <yao@codesourcery.com>
15164
15165 * server.c (start_inferior): Remove duplicated writes to fields
15166 'last_resume_kind' and 'last_status' of 'current_inferior'.
15167
15168 2012-06-12 Yao Qi <yao@codesourcery.com>
15169 Pedro Alves <palves@redhat.com>
15170
15171 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
15172 comment.
15173 * server.c (handle_v_cont): Extend comment.
15174
15175 2012-06-11 Yao Qi <yao@codesourcery.com>
15176
15177 * linux-low.c (linux_attach): Add 'static'.
15178
15179 2012-06-06 Yao Qi <yao@codesourcery.com>
15180
15181 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
15182
15183 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
15184
15185 Fix gcc -flto compilation warning.
15186 * server.c (main): Make variable multi_mode and attach volatile.
15187
15188 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15189
15190 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
15191 if the platform doesn't know about it.
15192
15193 2012-05-30 Jeff Kenton <jkenton@tilera.com>
15194
15195 * Makefile.in (SFILES): Add linux-tile-low.c.
15196 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
15197 * configure.srv: Handle tilegx-*-linux*.
15198 * linux-tile-low.c: New file.
15199
15200 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15201
15202 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
15203
15204 2012-05-24 Pedro Alves <palves@redhat.com>
15205
15206 PR gdb/7205
15207
15208 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
15209
15210 2012-05-24 Pedro Alves <palves@redhat.com>
15211
15212 PR gdb/7205
15213
15214 Replace target_signal with gdb_signal throughout.
15215
15216 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
15217
15218 * linux-low.c (linux_store_registers): Avoid the copying sequence
15219 when no data has been retrieved by ptrace.
15220
15221 2012-05-22 Will Deacon <will.deacon@arm.com>
15222
15223 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
15224 Include asm/ptrace.h.
15225 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
15226 already defined.
15227
15228 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
15229
15230 * linux-low.c (linux_store_registers): Don't re-retrieve data
15231 with ptrace that has already been obtained from /proc. Always
15232 copy any data retrieved with ptrace to the buffer supplied.
15233
15234 2012-05-11 Yao Qi <yao@codesourcery.com>
15235 Pedro Alves <palves@redhat.com>
15236
15237 * linux-low.c (enum stopping_threads_kind): New.
15238 (stopping_threads): Change type to `enum stopping_threads_kind'.
15239 (handle_extended_wait): If stopping and suspending threads, leave
15240 the new_lwp suspended too.
15241 (linux_wait_for_event): Adjust.
15242 (stop_all_lwps): Set `stopping_threads' to
15243 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
15244 whether we're suspending threads or just stopping them. Assert no
15245 recursion happens.
15246
15247 2012-04-29 Yao Qi <yao@codesourcery.com>
15248
15249 * server.h: Move some code to ...
15250 * gdbthread.h: ... here. New.
15251 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
15252 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
15253 (nto-low.o, win32-low.o): Likewise.
15254 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
15255 * regcache.c, remote-utils.c, server.c: Likewise.
15256 * target.c, tracepoint.c, win32-low.c: Likewise.
15257
15258 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15259
15260 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
15261 (PTRACE_ARG4_TYPE): Likewise.
15262 (PTRACE_XFER_TYPE): Likewise.
15263 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
15264 ptrace to PTRACE_ARG3_TYPE.
15265 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
15266 (PTRACE_ARG4_TYPE): Likewise.
15267 (PTRACE_XFER_TYPE): Likewise.
15268 (linux_detach_one_lwp): Cast fourth argument of
15269 ptrace to long then PTRACE_ARG4_TYPE.
15270 (regsets_fetch_inferior_registers): Cast third argument of
15271 ptrace to long then PTRACE_ARG3_TYPE.
15272 (regsets_store_inferior_registers): Likewise.
15273
15274 2012-04-20 Pedro Alves <palves@redhat.com>
15275
15276 * configure: Regenerate.
15277
15278 2012-04-19 Pedro Alves <palves@redhat.com>
15279
15280 * Makefile.in (GNULIB_BUILDDIR): New.
15281 (LIBGNU, INCGNU, GNULIB_H): Adjust.
15282 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
15283 (all, install-only, uninstall, clean-info, all-lib, clean): No
15284 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
15285 (maintainer-clean realclean distclean): Use subdir_do.
15286 (subdir_do): New.
15287 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
15288 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
15289 * acinclude.m4: Include acx_configure_dir.m4.
15290 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
15291 calls. Call AC_PROG_RANLIB. Configure gnulib using
15292 ACX_CONFIGURE_DIR.
15293 (GNULIB): New.
15294 (GNULIB_STDINT_H): Adjust.
15295 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
15296 * gdbreplay.c: Include build-gnulib/config.h.
15297 * server.h: Likewise.
15298 * aclocal.m4: Regenerate.
15299 * config.in: Regenerate.
15300 * configure: Regenerate.
15301
15302 2012-04-19 Pedro Alves <palves@redhat.com>
15303
15304 * Makefile.in (LIBGNU, INCGNU): Adjust.
15305 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
15306 (all, install-only, uninstall, clean-info, all-lib, clean)
15307 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
15308 * configure.ac: Adjust AC_OUTPUT output.
15309 * aclocal.m4: Regenerate.
15310 * configure: Regenerate.
15311
15312 2012-04-19 Pedro Alves <palves@redhat.com>
15313
15314 * Makefile.in (generated_files): New.
15315 (server_h): Remove the explicit dependency on config.h, and depend
15316 on $generated_files.
15317
15318 2012-04-19 Pedro Alves <palves@redhat.com>
15319
15320 * Makefile.in (INCGNU): Add -Ignulib.
15321
15322 2012-04-19 Pedro Alves <palves@redhat.com>
15323
15324 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
15325 (INCGNU): ... this, and spell out -I here.
15326 (GNULIB_LIB): Rename to ...
15327 (LIBGNU): ... this.
15328 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
15329
15330 2012-04-19 Pedro Alves <palves@redhat.com>
15331
15332 * config.in: Regenerate.
15333
15334 2012-04-19 Pedro Alves <palves@redhat.com>
15335
15336 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
15337 * server.h (memmem): Remove declaration.
15338 * config.in: Regenerate.
15339 * configure: Regenerate.
15340
15341 2012-04-19 Yao Qi <yao@codesourcery.com>
15342
15343 * Makefile.in (SFILES): Add common/vec.c.
15344 (OBS): Add vec.o.
15345 (vec.o): New rule.
15346
15347 2012-04-19 Yao Qi <yao@codesourcery.com>
15348
15349 * remote-utils.c (prepare_resume_reply): Replace with macro
15350 target_core_of_thread.
15351 * server.c (handle_qxfer_threads_proper): Likewise.
15352 * target.h (traget_core_of_thread): New macro.
15353
15354 2012-04-18 Pedro Alves <palves@redhat.com>
15355
15356 * aclocal.m4: Regenerate.
15357 * configure: Regenerate.
15358
15359 2012-04-16 Yao Qi <yao@codesourcery.com>
15360
15361 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
15362 duplicated on address.
15363
15364 2012-04-16 Yao Qi <yao@codesourcery.com>
15365
15366 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
15367 (struct tracepoint_action_ops) <send>: New field.
15368 (m_tracepoint_action_send, r_tracepoint_action_send): New.
15369 (agent_expr_send, x_tracepoint_action_send): New.
15370 (l_tracepoint_action_send): New.
15371 (cmd_qtdp): Download and install tracepoint
15372 according to `use_agent'.
15373 (run_inferior_command): Add one more parameter `len'.
15374 Update callers.
15375 (tracepoint_send_agent): New.
15376 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
15377
15378 2012-04-16 Yao Qi <yao@codesourcery.com>
15379
15380 * tracepoint.c (download_tracepoints): Moved to ...
15381 (cmd_qtstart): ... here.
15382
15383 2012-04-14 Yao Qi <yao@codesourcery.com>
15384
15385 * tracepoint.c: Include inttypes.h.
15386 (struct collect_memory_action): Use sized types.
15387 (struct tracepoint): Likewise.
15388 (cmd_qtdp, stop_tracing): Update print specifiers.
15389 (cmd_qtp, response_tracepoint): Likewise.
15390 (collect_data_at_tracepoint): Likewise.
15391 (collect_data_at_step): Likewise.
15392
15393 2012-04-14 Yao Qi <yao@codesourcery.com>
15394
15395 Import gnulib module inttypes.
15396 * aclocal.m4, config.in, configure: Regenerated.
15397
15398 2012-04-14 Yao Qi <yao@codesourcery.com>
15399
15400 * Makefile.in (maintainer-clean, realclean, distclean): Remove
15401 Makefile and config.status at last.
15402
15403 2012-04-13 Yao Qi <yao@codesourcery.com>
15404
15405 * tracepoint.c: Include stdint.h unconditionally.
15406
15407 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15408
15409 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
15410 on BFD_HAVE_SYS_PROCFS_TYPE.
15411 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
15412 * configure: Regenerate.
15413 * config.in: Likewise.
15414
15415 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
15416
15417 * Makefile.in (clean): Also remove x32.c x32-linux.c
15418 x32-avx.c x32-avx-linux.c.
15419 (x32.o): New target.
15420 (x32.c): Likewise.
15421 (x32-linux.o): Likewise.
15422 (x32-linux.c): Likewise.
15423 (x32-avx.o): Likewise.
15424 (x32-avx.c): Likewise.
15425 (x32-avx-linux.o): Likewise.
15426 (x32-avx-linux.c): Likewise.
15427
15428 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
15429 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
15430 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
15431 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
15432 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
15433 i386/x32-avx-linux.xml.
15434
15435 * linux-x86-low.c (init_registers_x32_linux): New prototype.
15436 (init_registers_x32_avx_linux): Likwise.
15437 (x86_linux_update_xmltarget): Call init_registers_x32_linux
15438 or init_registers_x32_avx_linux if linux_is_elf64 is false.
15439
15440 2012-04-13 Pedro Alves <palves@redhat.com>
15441
15442 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
15443 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
15444 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
15445 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
15446 the sub-make.
15447
15448 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15449
15450 * linux-x86-low.c (compat_x32_clock_t): New.
15451 (compat_x32_siginfo_t): Likewise.
15452 (compat_x32_siginfo_from_siginfo): Likewise.
15453 (siginfo_from_compat_x32_siginfo): Likewise.
15454 (linux_is_elf64): Likewise.
15455 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
15456 and siginfo_from_compat_x32_siginfo for x32.
15457 (x86_arch_setup): Set linux_is_elf64.
15458
15459 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15460
15461 PR gdb/13969
15462 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
15463 e_machine field.
15464 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
15465 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
15466 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
15467 compatible with process.
15468
15469 2012-04-12 Yao Qi <yao@codesourcery.com>
15470
15471 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
15472 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
15473 (install-only, install-info, clean): Handle sub dir gnulib.
15474 (all-lib, am--refresh): New targets.
15475 (memmem.o): Remove target.
15476 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
15477 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
15478 (AC_REPLACE_FUNCS): Remove memmem.
15479 Invoke gl_INIT and AM_INIT_AUTOMAKE.
15480 (AC_OUTPUT): Generate Makefile in gnulib/.
15481 * aclocal.m4, config.in, configure: Regenerated.
15482
15483 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
15484
15485 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
15486
15487 2012-04-05 Pedro Alves <palves@redhat.com>
15488
15489 -Werror=strict-aliasing
15490
15491 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
15492 pointer.
15493
15494 2012-04-04 Pedro Alves <palves@redhat.com>
15495
15496 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15497 (sparc_store_gregset_from_stack, sparc_store_gregset)
15498 (sparc_breakpoint_at): Fix formatting.
15499
15500 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15501
15502 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
15503 are available.
15504 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
15505 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
15506 * config.in: Regenerate.
15507 * configure: Likewise.
15508
15509 2012-03-29 Pedro Alves <palves@redhat.com>
15510
15511 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
15512 Correct ptrace arguments.
15513
15514 2012-03-28 Pedro Alves <palves@redhat.com>
15515
15516 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
15517 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
15518 (IA64_FR1_REGNUM): New defines.
15519 (ia64_fetch_register): New.
15520 (the_low_target): Install it.
15521 * linux-low.h (struct linux_target_ops) <fetch_register>: New
15522 field.
15523 * linux-low.c (linux_fetch_registers): Try the
15524 the_low_target.fetch_register hook first.
15525
15526 * linux-arm-low.c (the_low_target): Adjust.
15527 * linux-bfin-low.c (the_low_target): Adjust.
15528 * linux-cris-low.c (the_low_target): Adjust.
15529 * linux-crisv32-low.c (the_low_target): Adjust.
15530 * linux-m32r-low.c (the_low_target): Adjust.
15531 * linux-m68k-low.c (the_low_target): Adjust.
15532 * linux-mips-low.c (the_low_target): Adjust.
15533 * linux-ppc-low.c (the_low_target): Adjust.
15534 * linux-s390-low.c (the_low_target): Adjust.
15535 * linux-sh-low.c (the_low_target): Adjust.
15536 * linux-sparc-low.c (the_low_target): Adjust.
15537 * linux-tic6x-low.c (the_low_target): Adjust.
15538 * linux-x86-low.c (the_low_target): Adjust.
15539 * linux-xtensa-low.c (the_low_target): Adjust.
15540
15541 2012-03-26 Pedro Alves <palves@redhat.com>
15542
15543 * server.c (handle_qxfer_libraries): Don't bail early if
15544 the_target->qxfer_libraries_svr4 is not NULL.
15545
15546 2012-03-26 Pedro Alves <palves@redhat.com>
15547
15548 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
15549
15550 2012-03-23 Pedro Alves <palves@redhat.com>
15551
15552 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
15553 "library-list-svr4" element's start tag when the the DSO list is
15554 empty.
15555
15556 2012-03-23 Pedro Alves <palves@redhat.com>
15557
15558 * linux-low.c (read_one_ptr): Read the inferior's pointer through
15559 a variable whose type size is the same as the inferior's pointer
15560 size.
15561
15562 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
15563
15564 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
15565 struct siginfo.
15566 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
15567 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
15568 * linux-low.h: Include <signal.h>.
15569 (struct siginfo): Remove forward declaration.
15570 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
15571 struct siginfo.
15572
15573 2012-03-21 Mike Frysinger <vapier@gentoo.org>
15574
15575 * .gitignore: Ignore more files.
15576
15577 2012-03-19 Pedro Alves <palves@redhat.com>
15578 Jan Kratochvil <jan.kratochvil@redhat.com>
15579
15580 * server.c (cont_thread, general_thread): Add describing comments.
15581 (start_inferior): Clear `cont_thread'.
15582 (handle_v_cont): Don't set `cont_thread' if resuming all threads
15583 of a process.
15584
15585 2012-03-15 Yao Qi <yao@codesourcery.com>
15586
15587 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
15588 handling to ...
15589 (cmd_qtdp): ... here.
15590
15591 2012-03-15 Yao Qi <yao@codesourcery.com>
15592
15593 * tracepoint.c (struct tracepoint_action_ops): New.
15594 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
15595 (m_tracepoint_action_download): New.
15596 (r_tracepoint_action_download): New.
15597 (x_tracepoint_action_download): New.
15598 (l_tracepoint_action_download): New.
15599 (add_tracepoint_action): Install `action->ops' according type.
15600 (download_tracepoint_1): Move code `download' function pointer
15601 of various tracepoint_action_ops.
15602
15603 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15604
15605 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
15606 linux_ptrace_attach_warnings.
15607
15608 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15609
15610 * Makefile.in (linux-ptrace.o): New.
15611 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
15612 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
15613 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
15614 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
15615 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
15616 of these targets.
15617 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
15618
15619 2012-03-08 Yao Qi <yao@codesourcery.com>
15620 Pedro Alves <palves@redhat.com>
15621
15622 Fix PR server/13392.
15623 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
15624 offset of JMP insn.
15625 * tracepoint.c (remove_tracepoint): New.
15626 (cmd_qtdp): Call remove_tracepoint when failed to install.
15627
15628 2012-03-07 Pedro Alves <palves@redhat.com>
15629
15630 * linux-low.c (get_detach_signal): New.
15631 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
15632 Pass on pending signals to PTRACE_DETACH. Check the result of the
15633 ptrace call.
15634 * server.c (program_signals, program_signals_p): New.
15635 (handle_general_set): Handle QProgramSignals.
15636 * server.h (program_signals, program_signals_p): Declare.
15637
15638 2012-03-05 Pedro Alves <palves@redhat.com>
15639 Jan Kratochvil <jan.kratochvil@redhat.com>
15640
15641 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
15642 New comment why.
15643
15644 2012-03-03 Yao Qi <yao@codesourcery.com>
15645
15646 * tracepoint.c (tracepoint_look_up_symbols): Update call to
15647 agent_look_up_symbols.
15648
15649 2012-03-03 Yao Qi <yao@codesourcery.com>
15650
15651 * Makefile.in (linux-low.o): Keep dependence on agent.h.
15652 (linux-x86-low.o): Likewise.
15653 * server.h: Remove in_process_agent_loaded.
15654 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
15655 common/agent.c.
15656 Update callers.
15657
15658 2012-03-03 Yao Qi <yao@codesourcery.com>
15659
15660 * tracepoint.c (gdb_agent_capability): New global.
15661 (in_process_agent_loaded_ust): Renamed to
15662 `in_process_agent_supports_ust'.
15663 Update callers.
15664 (in_process_agent_supports_ust): Call agent_capability_check.
15665 (clear_installed_tracepoints): Assert that agent supports
15666 agent.
15667
15668 2012-03-03 Yao Qi <yao@codesourcery.com>
15669
15670 * linux-low.c (linux_supports_agent): New.
15671 (linux_target_ops): Initialize field `supports_agent' with
15672 linux_supports_agent.
15673 * target.h (struct target_ops) <supports_agent>: New.
15674 (target_supports_agent): New macro.
15675 * server.c (handle_general_set): Handle packet 'QAgent'.
15676 (handle_query): Send `QAgent+'.
15677 * Makefile.in (server.o): Depends on agent.h.
15678
15679 2012-03-03 Yao Qi <yao@codesourcery.com>
15680
15681 * Makefile.in (OBS): Add agent.o.
15682 Add new rule for agent.o.
15683 Track dependence of tracepoint.c on agent.h.
15684 * tracepoint.c (run_inferior_command_1):
15685 (run_inferior_command): Call agent_run_command.
15686 (gdb_ust_connect_sync_socket): Deleted. Move it to
15687 common/agent.c.
15688 (resume_thread, stop_thread): Likewise.
15689 (gdb_ust_socket_init): Renamed to ...
15690 (gdb_agent_socket_init): ... New.
15691 (gdb_ust_thread): Renamed to ...
15692 (gdb_agent_helper_thread): ... New.
15693 (gdb_ust_init): Move some code to ...
15694 (gdb_agent_init): ... here. New.
15695 [HAVE_UST]: Call gdb_ust_init.
15696 (initialize_tracepoint_ftlib): Call gdb_agent_init.
15697 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
15698 * config.in, configure: Regenerated.
15699
15700 2012-03-02 Pedro Alves <palves@redhat.com>
15701
15702 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
15703 * linux-low.c (struct simple_pid_list): New.
15704 (stopped_pids): New a struct simple_pid_list pointer.
15705 (add_to_pid_list, pull_pid_from_list): New.
15706 (handle_extended_wait): Don't assume the first signal new children
15707 report is SIGSTOP. Adjust call to pull_pid_from_list.
15708 (linux_wait_for_lwp): Adjust.
15709
15710 2012-03-02 Yao Qi <yao@codesourcery.com>
15711
15712 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
15713 debug log.
15714
15715 2012-03-02 Yao Qi <yao@codesourcery.com>
15716
15717 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
15718 `stop_pc' and `tpoint'. Update caller.
15719
15720 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
15721
15722 * linux-low.h (linux_target_ops): Add regset_bitmap member.
15723 * linux-low.c (use_linux_regsets): New macro.
15724 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
15725 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
15726 (linux_register_in_regsets): New function.
15727 (usr_fetch_inferior_registers): Skip registers covered by
15728 regsets.
15729 (usr_store_inferior_registers): Likewise.
15730 (usr_fetch_inferior_registers): New macro.
15731 (usr_store_inferior_registers): Likewise.
15732 (linux_fetch_registers): Handle mixed regset/non-regset targets.
15733 (linux_store_registers): Likewise.
15734 * linux-mips-low.c (init_registers_mips_dsp_linux): New
15735 prototype.
15736 (init_registers_mips64_dsp_linux): Likewise.
15737 (init_registers_mips_linux): New macro.
15738 (init_registers_mips_dsp_linux): Likewise.
15739 (mips_dsp_num_regs): Likewise.
15740 (DSP_BASE, DSP_CONTROL): New fallback macros.
15741 (mips_base_regs): New macro.
15742 (mips_regmap): Use it. Fix the size.
15743 (mips_dsp_regmap): New variable.
15744 (mips_dsp_regset_bitmap): Likewise.
15745 (mips_arch_setup): New function.
15746 (mips_cannot_fetch_register): Use the_low_target.regmap rather
15747 than mips_regmap.
15748 (mips_cannot_store_register): Likewise.
15749 (the_low_target): Update .arch_setup, .num_regs and .regmap
15750 initializers. Add .regset_bitmap initializer.
15751 * linux-arm-low.c (the_low_target): Add .regset_bitmap
15752 initializer.
15753 * linux-bfin-low.c (the_low_target): Likewise.
15754 * linux-cris-low.c (the_low_target): Likewise.
15755 * linux-crisv32-low.c (the_low_target): Likewise.
15756 * linux-ia64-low.c (the_low_target): Likewise.
15757 * linux-m32r-low.c (the_low_target): Likewise.
15758 * linux-m68k-low.c (the_low_target): Likewise.
15759 * linux-ppc-low.c (the_low_target): Likewise.
15760 * linux-s390-low.c (the_low_target): Likewise.
15761 * linux-sh-low.c (the_low_target): Likewise.
15762 * linux-sparc-low.c (the_low_target): Likewise.
15763 * linux-tic6x-low.c (the_low_target): Likewise.
15764 * linux-x86-low.c (the_low_target): Likewise.
15765 * linux-xtensa-low.c (the_low_target): Likewise.
15766 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
15767 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
15768 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
15769 srv_xmlfiles.
15770 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
15771 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
15772
15773 2012-02-29 Yao Qi <yao@codesourcery.com>
15774 Pedro Alves <palves@redhat.com>
15775
15776 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
15777 `step_over_finished' is true.
15778
15779 2012-02-27 Pedro Alves <palves@redhat.com>
15780
15781 * linux-low.c (pid_is_stopped): Delete, moved to common/.
15782 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
15783
15784 2012-02-27 Pedro Alves <palves@redhat.com>
15785
15786 PR server/9684
15787 * linux-low.c (pid_is_stopped): New.
15788 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
15789
15790 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
15791
15792 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
15793 of conditions.
15794
15795 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
15796
15797 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
15798
15799 2012-02-24 Luis Machado <lgustavo@codesourcery>
15800
15801 * server.c (handle_query): Advertise support for target-side
15802 breakpoint condition evaluation.
15803 (process_point_options): New function.
15804 (process_serial_event): When inserting a breakpoint, check for
15805 a target-side condition that should be evaluated.
15806
15807 * mem-break.c: Include regcache.h and ax.h.
15808 (point_cond_list_t): New data structure.
15809 (breakpoint) <cond_list>: New field.
15810 (find_gdb_breakpoint_at): Make non-static.
15811 (delete_gdb_breakpoint_at): Clear any target-side
15812 conditions.
15813 (clear_gdb_breakpoint_conditions): New function.
15814 (add_condition_to_breakpoint): Likewise.
15815 (add_breakpoint_condition): Likewise.
15816 (gdb_condition_true_at_breakpoint): Likewise.
15817 (gdb_breakpoint_here): Return result directly instead
15818 of going through a local variable.
15819
15820 * mem-break.h (find_gdb_breakpoint_at): New prototype.
15821 (clear_gdb_breakpoint_conditions): Likewise.
15822 (add_breakpoint_condition): Likewise.
15823 (gdb_condition_true_at_breakpoint): Likewise.
15824
15825 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
15826 (need_step_over_p): Take target-side breakpoint condition into
15827 consideration.
15828
15829 2012-02-24 Luis Machado <lgustavo@codesourcery>
15830
15831 * server.h: Include tracepoint.h.
15832 (agent_mem_read, agent_get_trace_state_variable_value,
15833 agent_set_trace_state_variable_value,
15834 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
15835 get_set_tsv_func_addr): New prototypes.
15836
15837 * ax.h: New include file.
15838 * ax.c: New source file.
15839
15840 * tracepoint.c: Include ax.h.
15841 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
15842 agent_expr, eval_result_type): Move to ax.h.
15843 (parse_agent_expr): Rename to ...
15844 (gdb_parse_agent_expr): ... this, make it non-static and move
15845 to ax.h.
15846 (unparse_agent_expr) Rename to ...
15847 (gdb_unparse_agent_expr): ... this, make it non-static and move
15848 to ax.h.
15849 (eval_agent_expr): Rename to ...
15850 (eval_tracepoint_agent_expr): ... this.
15851 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
15852 forward declarations.
15853 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
15854 (agent_get_trace_state_variable_value): New function.
15855 (agent_set_trace_state_variable_value): New function.
15856 (cmd_qtdp): Call gdb_parse_agent_expr (...).
15857 (response_tracepoint): Call gdb_unparse_agent_expr (...).
15858 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
15859 (condition_true_at_tracepoint): Likewise.
15860 (parse_agent_expr): Rename to ...
15861 (gdb_parse_agent_expr): ... this and move to ax.c.
15862 (unparse_agent_expr): Rename to ...
15863 (gdb_unparse_agent_expr): ... this and move to ax.c.
15864 (gdb_agent_op_name): Move to ax.c.
15865 (eval_agent_expr): Rename to ...
15866 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
15867 and move to ax.c.
15868 (eval_tracepoint_agent_expr): New function.
15869 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
15870 non-static.
15871 (current_insn_ptr, emit_error, struct bytecode_address): Move to
15872 ax.c.
15873 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
15874 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
15875 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
15876 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
15877 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
15878 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
15879 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
15880 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
15881 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
15882 (compile_bytecodes): Remove forward declaration.
15883 (is_goto_target): Move to ax.c.
15884 (compile_bytecodes): Move to ax.c and call
15885 agent_get_trace_state_variable_value (...) and
15886 agent_set_trace_state_variable_value (...).
15887
15888 * Makefile.in: Update ax.c and IPA dependencies.
15889
15890 2012-02-24 Pedro Alves <palves@redhat.com>
15891
15892 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
15893 (cmd_bigqtbuffer_circular): ... this. Only handle
15894 'QTBuffer:circular:'.
15895 (handle_tracepoint_general_set): Adjust.
15896
15897 2012-02-16 Yao Qi <yao@codesourcery.com>
15898
15899 * inferiors.c: Move code to ...
15900 * dll.c: .... here. New.
15901 * server.h: Declare clear_dlls.
15902 * Makefile.in (SFILES): Add dll.c.
15903 (OBS): Add dll.o
15904 (dll.o): New rule.
15905
15906 2012-02-11 Yao Qi <yao@codesourcery.com>
15907
15908 * server.c: (handle_monitor_command): Add a new parameter
15909 `own_buf'.
15910 (handle_query): Update caller.
15911
15912 2012-02-09 Joel Brobecker <brobecker@adacore.com>
15913
15914 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
15915 * configure, config.in: Regenerate.
15916 * hostio.c: Provide an alternate implementation if HAVE_READLINK
15917 is not defined.
15918
15919 2012-02-02 Pedro Alves <palves@redhat.com>
15920
15921 Try SIGKILL first, then PTRACE_KILL.
15922 * linux-low.c (linux_kill_one_lwp): New.
15923 (linux_kill_one_lwp): Rename to ...
15924 (kill_one_lwp_callback): ... this. Use the new
15925 linux_kill_one_lwp.
15926
15927 2012-02-02 Pedro Alves <palves@redhat.com>
15928
15929 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
15930 inferior.
15931
15932 2012-01-27 Pedro Alves <palves@redhat.com>
15933
15934 * linux-low.c (linux_child_pid_to_exec_file): Delete.
15935 (elf_64_file_p): Make static.
15936 (linux_pid_exe_is_elf_64_file): New.
15937 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
15938 Delete declarations.
15939 (linux_pid_exe_is_elf_64_file): Declare.
15940 * linux-x86-low.c (x86_arch_setup): Use
15941 linux_pid_exe_is_elf_64_file.
15942
15943 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
15944
15945 * linux-low.c (linux_wait_for_event_1): Rename to ...
15946 (linux_wait_for_event): ... here and merge it with former
15947 linux_wait_for_event - new variable wait_ptid, use it.
15948 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
15949
15950 2012-01-23 Pedro Alves <palves@redhat.com>
15951
15952 * server.c (main): Avoid yet another case of infinite loop while
15953 detaching/killing after a longjmp.
15954
15955 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
15956
15957 Code cleanup.
15958 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
15959
15960 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
15961
15962 * hostio.c (handle_readlink): New function.
15963 (handle_vFile): Call it to handle "vFile:readlink" packets.
15964
15965 2012-01-20 Pedro Alves <palves@redhat.com>
15966 Ulrich Weigand <ulrich.weigand@linaro.org>
15967
15968 * server.c (handle_v_requests): Only support vAttach and vRun to
15969 start multiple processes when in extended protocol mode.
15970
15971 2012-01-17 Pedro Alves <palves@redhat.com>
15972
15973 * tracepoint.c (initialize_tracepoint): Use mmap instead of
15974 memalign plus mprotect to allocate the scratch buffer.
15975
15976 2012-01-13 Pedro Alves <palves@redhat.com>
15977
15978 * server.c (attach_inferior): Clear `cont_thread'.
15979
15980 2012-01-13 Pedro Alves <palves@redhat.com>
15981
15982 * server.c (main): Avoid infinite loop while detaching/killing
15983 after a longjmp.
15984
15985 2012-01-09 Doug Evans <dje@google.com>
15986
15987 * server.c (start_inferior): Set last_ptid in --wrapper case.
15988
15989 2012-01-06 Yao Qi <yao@codesourcery.com>
15990
15991 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
15992 defined.
15993 [IN_PROCESS_AGENT] (debug_agent): New global variable.
15994
15995 2012-01-04 Yao Qi <yao@codesourcery.com>
15996
15997 * tracepoint.c (cmd_qtdp): Print debug message
15998 for static tracepoint.
15999
16000 2012-01-04 Yao Qi <yao@codesourcery.com>
16001
16002 * tracepoint.c (trace_vdebug): Differentiate debug message
16003 between gdbserver and IPA.
16004
16005 2012-01-03 Yao Qi <yao@codesourcery.com>
16006
16007 * tracepoint.c (tracepoint_was_hit): Don't collect for
16008 static tracepoint.
16009
16010 2012-01-02 Joel Brobecker <brobecker@adacore.com>
16011
16012 * terminal.h: Reformat copyright header.
16013
16014 2012-01-02 Joel Brobecker <brobecker@adacore.com>
16015
16016 * server.c (gdbserver_version): Update copyright year.
16017 * gdbreplay.c (gdbreplay_version): Likewise.
16018
16019 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
16020
16021 * linux-low.c (linux_create_inferior): Put empty if clause for write.
16022
16023 Revert:
16024 2011-12-18 Hui Zhu <teawater@gmail.com>
16025 * linux-low.c (linux_create_inferior): Save return value to ret.
16026
16027 2011-12-18 Hui Zhu <teawater@gmail.com>
16028
16029 * linux-low.c (linux_create_inferior): Save return value to ret.
16030
16031 2011-12-16 Doug Evans <dje@google.com>
16032
16033 * linux-low.c (linux_create_inferior): If stdio connection,
16034 redirect stdin from /dev/null, stdout to stderr.
16035 * remote-utils.c (remote_is_stdio): New static global.
16036 (remote_connection_is_stdio): New function.
16037 (remote_prepare): Handle stdio connection.
16038 (remote_open): Ditto.
16039 (remote_close): Don't close stdin for stdio connections.
16040 (read_prim,write_prim): New functions. Replace all calls to
16041 read/write to these.
16042 * server.c (main): Watch for "-" argument. Move call to
16043 remote_prepare before start_inferior.
16044 * server.h (STDIO_CONNECTION_NAME): New macro.
16045 (remote_connection_is_stdio): Declare.
16046
16047 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
16048 in debugging output.
16049
16050 2011-12-15 Yao Qi <yao@codesourcery.com>
16051
16052 * tracepoint.c: Include sys/syscall.h.
16053 (gdb_ust_thread): Remove preprocessor conditional.
16054
16055 2011-12-14 Pedro Alves <pedro@codesourcery.com>
16056
16057 * linux-low.c (linux_detach_one_lwp): Call
16058 the_low_target.prepare_to_resume before detaching.
16059
16060 2011-12-14 Yao Qi <yao@codesourcery.com>
16061
16062 * tracepoint.c (gdb_ust_thread): Don't ignore return value
16063 of write.
16064
16065 2011-12-14 Yao Qi <yao@codesourcery.com>
16066
16067 * i386-low.c (i386_low_stopped_data_address): Initialize local
16068 variable `control'.
16069
16070 2011-12-13 Pedro Alves <pedro@codesourcery.com>
16071
16072 PR remote/13492
16073
16074 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
16075 DR_CONTROL unless necessary. Extend comments.
16076 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
16077 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
16078
16079 2011-12-13 Yao Qi <yao@codesourcery.com>
16080
16081 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
16082 macros.
16083 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
16084
16085 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
16086
16087 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
16088 Print new debug message for such case.
16089
16090 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
16091
16092 Fix overlapping memcpy.
16093 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
16094 the read_inferior_memory transfer.
16095 (delete_fast_tracepoint_jump): New variable buf. Use it for the
16096 write_inferior_memory transfer.
16097 (set_fast_tracepoint_jump): New variable buf. Use it for the
16098 read_inferior_memory and write_inferior_memory transfers.
16099 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
16100 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
16101 Use it for the write_inferior_memory transfer.
16102 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
16103 buffers.
16104
16105 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
16106
16107 * linux-low.c (fetch_register, store_register): Make code
16108 consistent, fix formatting.
16109
16110 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
16111
16112 * linux-low.c (usr_store_inferior_registers): Factor out code
16113 to handle individual registers into...
16114 (store_register): ... this new function.
16115
16116 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
16117
16118 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
16119 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
16120 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
16121 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
16122 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
16123 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
16124 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
16125 (srv_xmlfiles): Add new XML files.
16126
16127 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
16128 and <sys/uio.h>.
16129 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
16130 (init_registers_s390_linux32v1): Add prototype.
16131 (init_registers_s390_linux32v2): Likewise.
16132 (init_registers_s390_linux64v1): Likewise.
16133 (init_registers_s390_linux64v2): Likewise.
16134 (init_registers_s390x_linux64v1): Likewise.
16135 (init_registers_s390x_linux64v2): Likewise.
16136 (s390_num_regs): Increment to 52.
16137 (s390_regmap): Add orig_r2 register.
16138 (s390_num_regs_3264): Increment to 68.
16139 (s390_regmap_3264): Add orig_r2 register.
16140 (s390_collect_ptrace_register): Handle orig_r2 register.
16141 (s390_supply_ptrace_register): Likewise.
16142 (s390_fill_last_break): New function.
16143 (s390_store_last_break): Likewise.
16144 (s390_fill_system_call): New function.
16145 (s390_store_system_call): Likewise.
16146 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
16147 register sets.
16148 (s390_check_regset): New function.
16149 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
16150 NT_S390_SYSTEM_CALL regsets and use appropriate description.
16151 Update target_regsets for available register sets.
16152
16153 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
16154 Jan Kratochvil <jan.kratochvil@redhat.com>
16155
16156 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
16157 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
16158 New.
16159 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
16160 * linux-low.h (struct process_info_private): New member r_debug.
16161 * server.c (handle_qxfer_libraries): Call
16162 the_target->qxfer_libraries_svr4.
16163 (handle_qxfer_libraries_svr4): New function.
16164 (qxfer_packets): New entry "libraries-svr4".
16165 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
16166 * target.h (struct target_ops): New member qxfer_libraries_svr4.
16167 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
16168 PACKET_qXfer_libraries_svr4.
16169
16170 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
16171
16172 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
16173 PSW address/mask between 8-byte and 16-byte formats.
16174 (s390_supply_ptrace_register): Likewise.
16175 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
16176 basic addressing mode bit.
16177
16178 2011-11-24 Stan Shebs <stan@codesourcery.com>
16179
16180 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
16181
16182 2011-11-17 Stan Shebs <stan@codesourcery.com>
16183
16184 * tracepoint.c (struct tracepoint): New field traceframe_usage.
16185 (tracing_start_time): New global.
16186 (tracing_stop_time): New global.
16187 (tracing_user_name): New global.
16188 (tracing_notes): New global.
16189 (tracing_stop_note): New global.
16190 (cmd_qtstart): Set traceframe_usage, start_time.
16191 (stop_tracing): Set stop_time.
16192 (cmd_qtstatus): Report additional status.
16193 (cmd_qtp): New function.
16194 (handle_tracepoint_query): Call it.
16195 (cmd_qtnotes): New function.
16196 (handle_tracepoint_general_set): Call it.
16197 (get_timestamp): Rename from tsv_get_timestamp.
16198
16199 2011-11-14 Stan Shebs <stan@codesourcery.com>
16200 Kwok Cheung Yeung <kcy@codesourcery.com>
16201
16202 * linux-x86-low.c (small_jump_insn): New.
16203 (i386_install_fast_tracepoint_jump_pad): Add arguments for
16204 trampoline and error message, build a trampoline and issue a small
16205 jump instruction to it.
16206 (x86_install_fast_tracepoint_jump_pad): Add arguments for
16207 trampoline and error message.
16208 (x86_get_min_fast_tracepoint_insn_len): New.
16209 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
16210 * linux-low.h (struct linux_target_ops): Add arguments to
16211 install_fast_tracepoint_jump_pad operation, add new operation.
16212 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
16213 arguments.
16214 (linux_get_min_fast_tracepoint_insn_len): New function.
16215 (linux_target_op): Add new operation.
16216 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
16217 (gdb_trampoline_buffer_end): Ditto.
16218 (gdb_trampoline_buffer_error): Ditto.
16219 (struct ipa_sym_addresses): Add fields for new IPA variables.
16220 (symbol_list): Add entries for new IPA variables.
16221 (struct tracepoint): Add fields to hold the address range of the
16222 trampoline used by the tracepoint.
16223 (trampoline_buffer_head): New static variable.
16224 (trampoline_buffer_tail): Ditto.
16225 (claim_trampoline_space): New function.
16226 (have_fast_tracepoint_trampoline_buffer): New function.
16227 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
16228 structure.
16229 (install_fast_tracepoint): Ditto, also add error buffer argument.
16230 (cmd_qtminftpilen): New function.
16231 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
16232 (fast_tracepoint_from_trampoline_address): New function.
16233 (fast_tracepoint_collecting): Handle trampoline as part of jump
16234 pad space.
16235 (set_trampoline_buffer_space): New function.
16236 (initialize_tracepoint): Initialize new IPA variables.
16237 * target.h (struct target_ops): Add arguments to
16238 install_fast_tracepoint_jump_pad operation, add new
16239 get_min_fast_tracepoint_insn_len operation.
16240 (target_get_min_fast_tracepoint_insn_len): New.
16241 (install_fast_tracepoint_jump_pad): Add arguments.
16242 * server.h (IPA_BUFSIZ): Define.
16243 * linux-i386-ipa.c: Include extra header files.
16244 (initialize_fast_tracepoint_trampoline_buffer): New function.
16245 (initialize_low_tracepoint): Call it.
16246 * server.h (set_trampoline_buffer_space): Declare.
16247 (claim_trampoline_space): Ditto.
16248 (have_fast_tracepoint_trampoline_buffer): Ditto.
16249
16250 2011-11-14 Yao Qi <yao@codesourcery.com>
16251
16252 * server.c (handle_query): Handle InstallInTrace for qSupported.
16253 * tracepoint.c (add_tracepoint): Sort list.
16254 (install_tracepoint, download_tracepoint): New.
16255 (cmd_qtdp): Call them to install and download tracepoints.
16256 (sort_tracepoints): Removed.
16257 (cmd_qtstart): Update.
16258
16259 2011-11-14 Yao Qi <yao@codesourcery.com>
16260
16261 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
16262 * mem-break.h: Declare.
16263 * tracepoint.c (cmd_qtstart): Move some code to ...
16264 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
16265 New.
16266 (download_tracepoints): Move some code to ...
16267 (download_tracepoint_1): ... here. New.
16268
16269 2011-11-08 Yao Qi <yao@codesourcery.com>
16270
16271 * remote-utils.c (relocate_instruction): A comment fix.
16272
16273 2011-11-07 Joel Brobecker <brobecker@adacore.com>
16274
16275 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
16276 (i386_dr_low_get_control, i386_dr_low_get_status): Use
16277 dr_status_mirror and dr_control_mirror from debug_reg_state.
16278 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
16279 (i386_initial_stuff): Remove use of deleted globals.
16280 (i386_get_thread_context, i386_set_thread_context,
16281 i386_thread_added): Use dr_status_mirror and dr_control_mirror
16282 from debug_reg_state.
16283
16284 2011-11-05 Yao Qi <yao@codesourcery.com>
16285
16286 * tracepoint.c (gdb_collect): Loop over tracepoints of same
16287 address as TPOINT's.
16288
16289 2011-11-02 Stan Shebs <stan@codesourcery.com>
16290
16291 * tracepoint.c (agent_mem_read_string): New function.
16292 (eval_agent_expr): Call it for tracenz.
16293 * server.c (handle_query): Report support for tracenz.
16294
16295 2011-11-02 Yao Qi <yao@codesourcery.com>
16296
16297 * tracepoint.c (cmd_qtstart): Remove unused local variables.
16298
16299 2011-11-02 Yao Qi <yao@codesourcery.com>
16300
16301 * target.h: Fix a typo in comment.
16302
16303 2011-10-31 Pedro Alves <pedro@codesourcery.com>
16304
16305 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
16306 clobber the breakpoints' shadows with fast tracepoint jumps.
16307 * mem-break.h (check_mem_write): Add `myaddr' parameter.
16308 * target.c (write_inferior_memory): Also pass MYADDR down to
16309 check_mem_write.
16310
16311 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
16312
16313 * configure.ac: Check support for personality routine.
16314 * configure: Regenerate.
16315 * config.in: Likewise.
16316 * linux-low.c: Include <sys/personality.h>.
16317 Define ADDR_NO_RANDOMIZE if necessary.
16318 (linux_create_inferior): Disable address space randomization when
16319 forking inferior, if requested.
16320 (linux_supports_disable_randomization): New function.
16321 (linux_target_ops): Install it.
16322 * server.h (disable_randomization): Declare.
16323 * server.c (disable_randomization): New global variable.
16324 (handle_general_set): Handle QDisableRandomization.
16325 (handle_query): Likewise for qSupported.
16326 (main): Support --disable-randomization and --no-disable-randomization
16327 command line arguments.
16328 * target.h (struct target_ops): Add supports_disable_randomization.
16329 (target_supports_disable_randomization): New macro.
16330
16331 2011-09-29 Mike Frysinger <vapier@gentoo.org>
16332
16333 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
16334 ifdef check.
16335 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
16336 [!PT_GETDSBT] (target_loadmap): New definition.
16337 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
16338 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
16339 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
16340 and PT_GETDSBT to LINUX_LOADMAP.
16341 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
16342 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
16343
16344 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
16345
16346 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
16347 (arm_linux_hwbp_cap): New static variable.
16348 (arm_linux_get_hwbp_cap): Replace by ...
16349 (arm_linux_init_hwbp_cap): ... this new function.
16350 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
16351 (arm_linux_get_hw_watchpoint_count): Likewise.
16352 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16353 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
16354 (arm_prepare_to_resume): Use perror_with_name instead of error.
16355
16356 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
16357
16358 * linux-arm-low.c: Include <signal.h>.
16359 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
16360 (struct arm_linux_hwbp_cap): New data type.
16361 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
16362 (struct arm_linux_hw_breakpoint): New data type.
16363 (MAX_BPTS, MAX_WPTS): Define.
16364 (struct arch_process_info, struct arch_lwp_info): New data types.
16365 (arm_linux_get_hwbp_cap): New function.
16366 (arm_linux_get_hw_breakpoint_count): Likewise.
16367 (arm_linux_get_hw_watchpoint_count): Likewise.
16368 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16369 (arm_hwbp_control_initialize): Likewise.
16370 (arm_hwbp_control_is_enabled): Likewise.
16371 (arm_hwbp_control_is_initialized): Likewise.
16372 (arm_hwbp_control_disable): Likewise.
16373 (arm_linux_hw_breakpoint_equal): Likewise.
16374 (arm_linux_hw_point_initialize): Likewise.
16375 (struct update_registers_data): New data structure.
16376 (update_registers_callback: New function.
16377 (arm_insert_point): Likewise.
16378 (arm_remove_point): Likewise.
16379 (arm_stopped_by_watchpoint): Likewise.
16380 (arm_stopped_data_address): Likewise.
16381 (arm_new_process): Likewise.
16382 (arm_new_thread): Likewise.
16383 (arm_prepare_to_resume): Likewise.
16384 (the_low_target): Register arm_insert_point, arm_remove_point,
16385 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
16386 arm_new_thread, and arm_prepare_to_resume.
16387
16388 2011-09-15 Stan Shebs <stan@codesourcery.com>
16389
16390 * server.h (struct emit_ops): Add compare-goto fields.
16391 * tracepoint.c (gdb_agent_op_sizes): New table.
16392 (emit_eq_goto): New function.
16393 (emit_ne_goto): New function.
16394 (emit_lt_goto): New function.
16395 (emit_le_goto): New function.
16396 (emit_gt_goto): New function.
16397 (emit_ge_goto): New function.
16398 (is_goto_target): New function.
16399 (compile_bytecodes): Recognize special cases of compare-goto
16400 combinations and call specialized emitters for them.
16401 * linux-x86-low.c (amd64_emit_eq_goto): New function.
16402 (amd64_emit_ne_goto): New function.
16403 (amd64_emit_lt_goto): New function.
16404 (amd64_emit_le_goto): New function.
16405 (amd64_emit_gt_goto): New function.
16406 (amd64_emit_ge_goto): New function.
16407 (amd64_emit_ops): Add the new functions.
16408 (i386_emit_eq_goto): New function.
16409 (i386_emit_ne_goto): New function.
16410 (i386_emit_lt_goto): New function.
16411 (i386_emit_le_goto): New function.
16412 (i386_emit_gt_goto): New function.
16413 (i386_emit_ge_goto): New function.
16414 (i386_emit_ops): Add the new functions.
16415
16416 2011-09-08 Stan Shebs <stan@codesourcery.com>
16417
16418 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
16419 (i386_emit_epilogue): Restore %ebx.
16420
16421 2011-08-31 Jie Zhang <jzhang918@gmail.com>
16422
16423 * server.c (step_thread): Remove definition.
16424 (process_serial_event): Don't handle Hs.
16425 * server.h (step_thread): Remove declaration.
16426 * target.c (set_desired_inferior): Remove use of step_thread.
16427
16428 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16429
16430 * linux-low.c: Include linux-procfs.h.
16431 (linux_attach_lwp_1): Update comments.
16432 (linux_attach): Scan for existing threads when attaching to a
16433 process that is the tgid.
16434 * Makefile.in: Update dependencies.
16435
16436 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16437
16438 * configure.srv: Add linux-procfs.o dependencies.
16439
16440 2011-08-14 Yao Qi <yao@codesourcery.com>
16441
16442 * target.h (struct target_ops): Fix indent.
16443 * win32-low.c (win32_target_ops): Fix comment.
16444
16445 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
16446 Yao Qi <yao@codesourcery.com>
16447
16448 * Makefile.in (clean): Remove tic6x-*.c files.
16449 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
16450 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
16451 (tic6x-c64xp-linux.c): Likewise.
16452 * configure.srv: Add support for tic6x-*-uclinux.
16453 * linux-tic6x-low.c: New.
16454 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
16455
16456 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
16457 Yao Qi <yao@codesourcery.com>
16458
16459 * target.h (struct target_ops): Add read_loadmap.
16460 * linux-low.c (struct target_loadseg): New type.
16461 (struct target_loadmap): New type.
16462 (linux_read_loadmap): New function.
16463 (linux_target_ops): Add linux_read_loadmap.
16464 * server.c (handle_query): Support qXfer:fdpic:read packet.
16465 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
16466 to NULL.
16467
16468 2011-08-05 Eli Zaretskii <eliz@gnu.org>
16469
16470 * win32-low.c: Include <stdint.h>.
16471
16472 2011-07-22 Pedro Alves <pedro@codesourcery.com>
16473
16474 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
16475 to the inferior here.
16476 (i386_remove_aligned_watchpoint): Ditto.
16477 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
16478 fit part of the watchpoint in the debug registers.
16479 (i386_update_inferior_debug_regs): New.
16480 (i386_low_insert_watchpoint): Work on a local mirror of the debug
16481 registers, and only update the inferior on success.
16482 (i386_low_remove_watchpoint): Ditto.
16483
16484 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
16485
16486 * linux-low.c (compare_ints, unique, list_threads, show_process,
16487 linux_core_of_thread): Delete.
16488 (linux_target_ops): Change linux_core_of_thread to
16489 linux_common_core_of_thread.
16490 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
16491 * utils.c (malloc_failure): Change type of argument.
16492 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
16493 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
16494 common/linux-osdata.c, common/ptid.c and common/buffer.c.
16495 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
16496 (IPA_OBJS): Add common-utils-ipa.o.
16497 (ptid_h, linux_osdata_h): New macros.
16498 (server_h): Add common/common-utils.h, common/xml-utils.h,
16499 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
16500 common/ptid.h.
16501 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
16502 ptid.o, buffer.o): New rules.
16503 (linux-low.o): Add common/linux-osdata.h as a dependency.
16504 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
16505 * configure.ac: Add AC_HEADER_DIRENT check.
16506 * config.in: Regenerate.
16507 * configure: Regenerate.
16508 * remote-utils.c (xml_escape_text): Delete.
16509 (buffer_grow, buffer_free, buffer_init, buffer_finish,
16510 buffer_xml_printf): Move to common/buffer.c.
16511 * server.c (main): Remove call to initialize_inferiors.
16512 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
16513 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
16514 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
16515 internal_error, gdb_assert, gdb_assert_fail): Delete.
16516 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
16517 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
16518 common/buffer.h.
16519 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
16520 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
16521 initialize_inferiors): Delete.
16522
16523 2011-07-20 Pedro Alves <pedro@codesourcery.com>
16524
16525 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
16526 symbol error.
16527
16528 2011-05-31 Pedro Alves <pedro@codesourcery.com>
16529
16530 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
16531 assertion.
16532 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
16533
16534 2011-05-26 Yao Qi <yao@codesourcery.com>
16535
16536 * Makefile.in (thread-db.o): Track dependence to
16537 common/gdb_thread_db.h.
16538 * thread-db.c: include gdb_thread_db.h from right place.
16539
16540 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
16541
16542 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
16543 __FILE__ and __LINE__ to internal_error.
16544
16545 2011-05-13 Doug Evans <dje@google.com>
16546
16547 * thread-db.c (try_thread_db_load_from_sdir): New function.
16548 (try_thread_db_load_from_dir): New function.
16549 (thread_db_load_search): Handle $sdir, ignore $pdir.
16550 Remove trying of system directories if search of
16551 libthread-db-search-path fails, that is now done via $sdir.
16552
16553 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
16554
16555 * server.c (handle_query): Add EnableDisableTracepoints to the list
16556 of supported features.
16557 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
16558 tracepoints.
16559 (cmd_qtenable_disable): New.
16560 (cmd_qtstart): Install tracepoints even if disabled.
16561 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
16562 receiving a QTEnable or QTDisable packet.
16563 (gdb_collect): Skip data collection if fast tracepoint is disabled.
16564 (ust_marker_to_static_tracepoint): Do not ignore disabled static
16565 tracepoints.
16566 (gdb_probe): Skip data collection if static tracepoint is disabled.
16567
16568 2011-05-10 Doug Evans <dje@google.com>
16569
16570 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
16571
16572 2011-05-04 Doug Evans <dje@google.com>
16573
16574 * linux-low.c (linux_join): Skip process lookup.
16575 * spu-low.c (spu_join): Ditto.
16576 * server.c (join_inferiors_callback): Delete.
16577 (process_serial_event): For 'D' packet (detach) call join_inferior
16578 directly.
16579
16580 2011-05-04 Joseph Myers <joseph@codesourcery.com>
16581
16582 * README: Don't mention xscale*-*-linux*.
16583 * configure.srv (xscale*-*-linux*): Don't handle target.
16584
16585 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
16586
16587 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
16588 casting pointers.
16589 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
16590 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
16591 (i386_emit_void_call_2): Likewise.
16592
16593 2011-04-26 Yao Qi <yao@codesourcery.com>
16594
16595 * linux-low.c: Move common macros to linux-ptrace.h.
16596 Include linux-ptrace.h.
16597 * Makefile.in (linux_ptrace_h): New.
16598 (linux-low.o): Depends on linux-ptrace.h.
16599
16600 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
16601
16602 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
16603 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
16604 (remote_prepare): New function with most of the TCP code from ...
16605 (remote_open): ... here. Detect PORT here unconditionally. Move also
16606 setting transport_is_reliable.
16607 * server.c (run_once): New variable.
16608 (gdbserver_usage): Document it.
16609 (main): Set run_once for `--once'. Call remote_prepare. Exit after
16610 the first run if RUN_ONCE.
16611 * server.h (run_once, remote_prepare): New declarations.
16612
16613 2011-04-19 Tom Tromey <tromey@redhat.com>
16614
16615 * win32-low.c (handle_load_dll): Remove duplicate "the".
16616
16617 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
16618
16619 Remove support for old Cygwin 1.5 versions.
16620 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
16621 function to avoid warning.
16622 (win32_add_one_solib): Use cygwin_conv_path function to avoid
16623 warning.
16624
16625 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
16626
16627 * gdbserver/server.h (Macro _): Define it if not available.
16628
16629 2011-03-14 Michael Snyder <msnyder@vmware.com>
16630
16631 * hostio.c (handle_close): Remove unnecessary null test.
16632
16633 2011-03-10 Joel Brobecker <brobecker@adacore.com>
16634
16635 * Makefile.in (maintainer-clean realclean distclean): Remove
16636 "make ... subdir_do" command.
16637
16638 2011-03-10 Michael Snyder <msnyder@vmware.com>
16639
16640 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
16641
16642 * server.c (handle_v_run): Free alloced buffer on early return.
16643
16644 2011-03-09 Yao Qi <yao@codesourcery.com>
16645
16646 Revert:
16647 2011-03-04 Yao Qi <yao@codesourcery.com>
16648
16649 * Makefile.in: Remove GNU make feature --directory.
16650
16651 2011-03-05 Yao Qi <yao@codesourcery.com>
16652
16653 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16654 (subdir_do): New make target. Copied from gdb/Makefile.
16655 (maintainer-clean, realclean, distclean, clean): Call corresponding
16656 make targets in common/Makefile.
16657
16658 2011-02-11 Yao Qi <yao@codesourcery.com>
16659
16660 * configure.ac: Call AC_PROG_RANLIB.
16661 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16662 * configure: Regenerate.
16663
16664 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
16665
16666 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
16667
16668 2011-03-06 Yao Qi <yao@codesourcery.com>
16669
16670 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
16671
16672 2011-03-05 Yao Qi <yao@codesourcery.com>
16673
16674 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16675 (subdir_do): New make target. Copied from gdb/Makefile.
16676 (maintainer-clean, realclean, distclean, clean): Call corresponding
16677 make targets in common/Makefile.
16678
16679 2011-03-04 Yao Qi <yao@codesourcery.com>
16680
16681 * Makefile.in: Remove GNU make feature --directory.
16682
16683 2011-03-04 Michael Snyder <msnyder@vmware.com>
16684
16685 * server.c (queue_stop_reply): Call xmalloc not malloc.
16686
16687 2011-03-02 Michael Snyder <msnyder@vmware.com>
16688
16689 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
16690
16691 2011-02-28 Michael Snyder <msnyder@vmware.com>
16692
16693 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
16694 (cmd_qtframe): Ditto.
16695 (cmd_qtbuffer): Ditto.
16696 (cmd_bigqtbuffer): Ditto.
16697
16698 * utils.c (decimal2str): Initialize 'width' to nine, then
16699 don't mess with it.
16700
16701 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16702
16703 * hostio.c (require_data): Free *data, not data.
16704
16705 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16706
16707 * hostio.c (require_data): Use free, not xfree.
16708
16709 2011-02-27 Michael Snyder <msnyder@vmware.com>
16710
16711 * server.c (handle_query): Discard unused value.
16712
16713 * hostio.c (require_data): Free malloc memory before returning
16714 error.
16715
16716 2011-02-26 Michael Snyder <msnyder@vmware.com>
16717
16718 * linux-low.c (list_threads): Call closedir for dirent.
16719
16720 2011-02-27 Michael Snyder <msnyder@vmware.com>
16721
16722 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
16723 a case statement falls through.
16724
16725 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
16726
16727 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
16728 in comparison.
16729
16730 2011-02-26 Michael Snyder <msnyder@vmware.com>
16731
16732 * utils.c (decimal2str): Eliminate dead code and dead param.
16733 (pulongest): Drop dead param from call to decimal2str.
16734 (plongest): Ditto.
16735
16736 2011-02-24 Joel Brobecker <brobecker@adacore.com>
16737
16738 Revert the following patch (not approved yet):
16739 2011-02-21 Hui Zhu <teawater@gmail.com>
16740 * tracepoint.c (tp_printf): New function.
16741 (eval_agent_expr): Handle gdb_agent_op_printf.
16742
16743 2011-02-21 Hui Zhu <teawater@gmail.com>
16744
16745 * tracepoint.c (tp_printf): New function.
16746 (eval_agent_expr): Handle gdb_agent_op_printf.
16747
16748 2011-02-18 Tom Tromey <tromey@redhat.com>
16749
16750 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
16751 (tracepoint.o): Likewise.
16752 * tracepoint.c (enum gdb_agent_op): Use ax.def.
16753 (gdb_agent_op_names): Likewise.
16754
16755 2011-02-18 Tom Tromey <tromey@redhat.com>
16756
16757 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
16758 gdb_agent_op_rot>: New constants.
16759 (gdb_agent_op_names): Add pick and roll.
16760 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
16761 cases.
16762
16763 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
16764
16765 * aclocal.m4: Regenerated with aclocal-1.11.1.
16766
16767 2011-02-14 Pedro Alves <pedro@codesourcery.com>
16768
16769 * server.c (handle_qxfer_traceframe_info): New.
16770 (qxfer_packets): Register "traceframe-info".
16771 (handle_query): Report support for qXfer:traceframe-info:read+.
16772 * tracepoint.c (match_blocktype): New.
16773 (traceframe_find_block_type): Rename to ...
16774 (traceframe_walk_blocks): ... this. Add callback filter argument,
16775 and use it.
16776 (traceframe_find_block_type): New, reimplemented on top of
16777 traceframe_walk_blocks.
16778 (build_traceframe_info_xml): New.
16779 (traceframe_read_info): New.
16780 * server.h (traceframe_read_info): Declare.
16781
16782 2011-02-11 Yao Qi <yao@codesourcery.com>
16783
16784 * configure.ac: Call AC_PROG_RANLIB.
16785 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16786 * configure: Regenerate.
16787
16788 2011-02-07 Pedro Alves <pedro@codesourcery.com>
16789
16790 * server.c (gdb_read_memory): Change return semantics to allow
16791 partial transfers.
16792 (handle_search_memory_1): Adjust.
16793 (process_serial_event) <'m' packet>: Handle partial transfers.
16794 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
16795
16796 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16797
16798 * regcache.c (init_register_cache): Initialize
16799 regcache->register_status.
16800 (free_register_cache): Release regcache->register_status.
16801 (regcache_cpy): Copy register_status.
16802 (registers_to_string): Print 'x's for unavailable registers.
16803 (supply_register): Mark the register's status valid or
16804 unavailable, depending on whether a buffer was passed in or not.
16805 (supply_register_zeroed): New.
16806 (supply_regblock): Mark the registers' status valid or
16807 unavailable, depending on whether a buffer was passed in or not.
16808 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
16809 (struct regcache): New `register_status' field.
16810 (supply_register_zeroed): Declare.
16811 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
16812 supply_register_zeroed, rather than passing a NULL buffer to
16813 supply_register.
16814 * tracepoint.c (fetch_traceframe_registers): Update comment.
16815
16816 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16817
16818 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
16819 buffer explicit.
16820
16821 2011-01-25 Pedro Alves <pedro@codesourcery.com>
16822
16823 * server.h (decode_xfer_write): Change prototype.
16824 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
16825 and don't extract the annex here.
16826 * server.c (decode_xfer_read): Remove `annex' parameter,
16827 and don't extract the annex here.
16828 (decode_xfer): New.
16829 (struct qxfer): New.
16830 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
16831 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
16832 (handle_qxfer_statictrace): New functions, abstracted out from
16833 handle_query, and made to use the struct qxfer interface.
16834 (handle_threads_qxfer_proper): Rename to ...
16835 (handle_qxfer_threads_proper): ... this.
16836 (handle_threads_qxfer): Rename to ...
16837 (handle_qxfer_threads): ... this. Adjust.
16838 (qxfer_packets): New array.
16839 (handle_qxfer): New function.
16840 (handle_query): Use handle_qxfer.
16841
16842 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
16843
16844 * gdbreplay.c: Shorten lines of >= 80 columns.
16845 * linux-low.c: Ditto.
16846 * linux-ppc-low.c: Ditto.
16847 * linux-s390-low.c: Ditto.
16848 * linux-sparc-low.c: Ditto.
16849 * linux-x86-low.c: Ditto.
16850 * linux-xtensa-low.c: Ditto.
16851 * mem-break.c: Ditto.
16852 * nto-low.c: Ditto.
16853 * regcache.h: Ditto.
16854 * remote-utils.c: Ditto.
16855 * server.c: Ditto.
16856 * server.h: Ditto.
16857 * thread-db.c: Ditto.
16858 * tracepoint.c: Ditto.
16859 * utils.c: Ditto.
16860 * win32-low.h: Ditto.
16861
16862 2011-01-05 Joel Brobecker <brobecker@adacore.com>
16863
16864 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
16865 update.
16866
16867 2011-01-01 Joel Brobecker <brobecker@adacore.com>
16868
16869 * server.c (gdbserver_version): Update copyright year in version
16870 output.
16871 * gdbreplay.c (gdbreplay_version): Ditto.
16872
16873 2010-12-29 Jie Zhang <jie.zhang@analog.com>
16874
16875 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
16876 * linux-bfin-low.c: New file.
16877 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
16878 PT_DATA_ADDR for BFIN targets.
16879 * Makefile.in (SFILES): Add linux-bfin-low.c.
16880 (clean): Remove reg-bfin.c.
16881 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
16882 * README: Mention supported Blackfin targets.
16883
16884 2010-12-23 Mike Frysinger <vapier@gentoo.org>
16885
16886 * .gitignore: New file.
16887
16888 2010-11-16 Mike Frysinger <vapier@gentoo.org>
16889
16890 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
16891
16892 2010-10-22 Jie Zhang <jie@codesourcery.com>
16893
16894 * Makefile.in: Add FLAGS_TO_PASS variable.
16895 (install): Remove dependency of install-only and recursively
16896 invoke make for install-only.
16897
16898 2010-10-04 Doug Evans <dje@google.com>
16899
16900 * Makefile.in (uninstall): Use $(DESTDIR).
16901
16902 2010-09-24 Pedro Alves <pedro@codesourcery.com>
16903
16904 PR gdb/11842
16905
16906 * linux-x86-low.c (compat_siginfo_from_siginfo)
16907 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
16908 si_code is < 0. Check for si_code == SI_TIMER before checking for
16909 si_code < 0.
16910
16911 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16912
16913 * lynx-i386-low.c: New file.
16914 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
16915
16916 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16917
16918 * lynx-low.c (ptrace_request_to_str): Remove handling for
16919 request values that have been removed in LynxOS 5.x.
16920
16921 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16922
16923 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
16924 <ptrace.h>
16925
16926 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
16927
16928 * configure.ac: Add --enable-inprocess-agent option.
16929 * configure: Rebuilt.
16930
16931 2010-09-06 Yao Qi <yao@codesourcery.com>
16932
16933 * linux-low.c (linux_kill): Remove unused variable.
16934 (linux_stabilize_threads): Likewise.
16935 * server.c (start_inferior): Likewise.
16936 (queue_stop_reply_callback): Likewise.
16937 * tracepoint.c (do_action_at_tracepoint): Likewise.
16938
16939 2010-09-06 Yao Qi <yao@codesourcery.com>
16940
16941 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
16942 on return.
16943
16944 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
16945
16946 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
16947
16948 2010-09-06 Pedro Alves <pedro@codesourcery.com>
16949
16950 * Makefile.in (install-only): Replace $IPA_DEPFILES with
16951 "$(IPA_DEPFILES)".
16952
16953 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16954
16955 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
16956 gdbserver/lynx-ppc-low.c: New files.
16957 * Makefile.in (lynx_low_h): New variable.
16958 (lynx-low.o, lynx-ppc-low.o): New rules.
16959 * configure.ac: On LynxOS, link with -lnetinet.
16960 * configure.srv: Add handling of powerpc-*-lynxos* targets.
16961 * configure: regenerate.
16962
16963 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16964
16965 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
16966 * configure.ac: Add check for vasprintf and vsnprintf.
16967 * configure, config.in: Regenerate.
16968 * server.h (vasprintf, vsnprintf): Add conditional declarations.
16969
16970 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16971
16972 * gdbreplay.c: Move include of alloca.h up, next to include of
16973 malloc.h.
16974 * server.h: Add include of malloc.h.
16975 * mem-break.c: Remove include of malloc.h.
16976 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
16977
16978 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16979
16980 * Makefile.in (memmem.o): Build with -Wno-error.
16981
16982 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16983
16984 * utils.c (xsnprintf): Make non-static.
16985 * server.h: Add xsnprintf declaration.
16986 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
16987 replace calls to snprintf by calls to xsnprintf throughout.
16988
16989 2010-09-01 Joel Brobecker <brobecker@adacore.com>
16990
16991 * configure.ac: Add configure check for alloca.
16992 * configure, config.in: Regenerate.
16993 * server.h: Include alloca.h if it exists.
16994 * gdbreplay.c: Include alloca.h if it exists.
16995
16996 2010-08-28 Pedro Alves <pedro@codesourcery.com>
16997
16998 * linux-low.c (__SIGRTMIN): Define if not already defined.
16999 (linux_create_inferior): Check for __ANDROID__ rather than
17000 __SIGRTMIN.
17001 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
17002 are already deferred.
17003 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
17004 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
17005 stopped and already has a pending signal to report.
17006 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
17007 a pending signal to report or is moving out of a jump pad.
17008 (linux_init_signals): Check for __ANDROID__ rather than
17009 __SIGRTMIN.
17010
17011 2010-08-28 Pedro Alves <pedro@codesourcery.com>
17012
17013 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
17014 debug_threads check. Avoid a linear search when not doing debug
17015 output.
17016
17017 2010-08-27 Pedro Alves <pedro@codesourcery.com>
17018
17019 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
17020 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
17021 (struct file_handler) <fd>: Change type to gdb_fildes_t.
17022 (process_event): Change local fd's type to gdb_fildes_t.
17023 (create_file_handler): Adjust prototype.
17024 (delete_file_handler): Adjust prototype.
17025 (handle_file_event): Adjust prototype. Use pfildes.
17026 (create_file_event): Adjsut prototype.
17027 * remote-utils.c (remote_desc, listen_desc): Change type to
17028 gdb_fildes_t.
17029 * server.h: New gdb_fildes_t typedef.
17030 [USE_WIN32API]: Include winsock2.h.
17031 (delete_file_handler, add_file_handler): Adjust prototypes.
17032 (pfildes): Declare.
17033 * utils.c (pfildes): New.
17034
17035 2010-08-27 Pedro Alves <pedro@codesourcery.com>
17036
17037 * configure.ac (build_warnings): Add -Wno-char-subscripts.
17038 * configure: Regenerate.
17039
17040 2010-08-27 Pedro Alves <pedro@codesourcery.com>
17041
17042 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
17043 (linux_done_accessing_memory): ... this.
17044 (linux_target_ops): Adjust.
17045 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
17046 * nto-low.c (nto_target_ops): Adjust comment.
17047 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
17048 * spu-low.c (spu_target_ops): Adjust comment.
17049 * target.h (target_ops): Rename unprepare_to_access_memory field
17050 to done_accessing_memory.
17051 (unprepare_to_access_memory): Rename to ...
17052 (done_accessing_memory): ... this.
17053
17054 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17055
17056 * linux-low.c (linux_prepare_to_access_memory): New.
17057 (linux_unprepare_to_access_memory): New.
17058 (linux_target_ops): Install them.
17059 * server.c (read_memory): Rename to ...
17060 (gdb_read_memory): ... this. Use
17061 prepare_to_access_memory/prepare_to_access_memory.
17062 (write_memory): Rename to ...
17063 (gdb_write_memory): ... this. Use
17064 prepare_to_access_memory/prepare_to_access_memory.
17065 (handle_search_memory_1): Adjust.
17066 (process_serial_event): Adjust.
17067 * target.h (struct target_ops): New fields
17068 prepare_to_access_memory and unprepare_to_access_memory.
17069 (prepare_to_access_memory, unprepare_to_access_memory): New.
17070 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
17071 prepare_to_access_memory/prepare_to_access_memory.
17072 * nto-low.c (nto_target_ops): Adjust.
17073 * spu-low.c (spu_target_ops): Adjust.
17074 * win32-low.c (win32_target_ops): Adjust.
17075
17076 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17077
17078 * Makefile.in (WARN_CFLAGS): Get it from configure.
17079 (WERROR_CFLAGS): New.
17080 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
17081 * configure.ac: Introduce --enable-werror, which adds -Werror to
17082 the compiler command line. Enabled by default. Disable with
17083 --disable-werror. Add -Wdeclaration-after-statement
17084 Wpointer-arith and -Wformat-nonliteral to warning flags.
17085 * configure: Regenerate.
17086
17087 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17088
17089 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
17090
17091 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17092
17093 * gdbreplay.c (remote_error): New.
17094 (gdbchar): New.
17095 (expect): Use gdbchar. Check for error reading from GDB.
17096 Clarify sync error output.
17097 (play): Check for errors writing to GDB.
17098 * linux-low.c (sigchld_handler): Really ignore `write' errors.
17099 * remote-utils.c (getpkt): Check for errors writing to the remote
17100 descriptor.
17101
17102 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17103
17104 * linux-low.c (linux_wait_1): Move non-debugging code out of
17105 `debug_threads' control.
17106
17107 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17108
17109 * linux-low.c (linux_wait_1): Don't set last_status here.
17110 * server.c (push_event, queue_stop_reply_callback): Assert we're
17111 not pushing a TARGET_WAITKIND_IGNORE event.
17112 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
17113 (myresume, handle_target_event): Set the thread's last_resume_kind
17114 and last_status from the target returned status.
17115
17116 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17117
17118 PR threads/10729
17119
17120 * linux-x86-low.c (update_debug_registers_callback): New.
17121 (i386_dr_low_set_addr): Use it.
17122 (i386_dr_low_get_addr): New.
17123 (i386_dr_low_set_control): Use update_debug_registers_callback.
17124 (i386_dr_low_get_control): New.
17125 (i386_dr_low_get_status): Adjust.
17126 * linux-low.c (linux_stop_lwp): New.
17127 * linux-low.h (linux_stop_lwp): Declare.
17128
17129 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
17130 argument instead of a i386_debug_reg_state.
17131 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
17132 a i386_debug_reg_state.
17133 (i386_insert_aligned_watchpoint): Adjust.
17134 (i386_remove_aligned_watchpoint): Adjust.
17135 (i386_low_stopped_data_address): Read the debug registers from the
17136 inferior instead of from the mirrors.
17137 * i386-low.h (struct i386_debug_reg_state): Extend comment.
17138 (i386_dr_low_get_addr): Declare.
17139 (i386_dr_low_get_control): Declare.
17140 (i386_dr_low_get_status): Change prototype.
17141
17142 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
17143 (i386_dr_low_get_addr): New.
17144 (i386_dr_low_get_control): New.
17145 (i386_dr_low_get_status): Adjust prototype. Return
17146 dr_status_mirror.
17147 (i386_initial_stuff): Clear dr_status_mirror and
17148 dr_control_mirror.
17149 (i386_get_thread_context): Adjust.
17150 (i386_set_thread_context): Adjust.
17151 (i386_thread_added): Adjust.
17152
17153 2010-08-24 Pedro Alves <pedro@codesourcery.com>
17154
17155 * linux-low.h (linux_thread_area): Delete declaration.
17156
17157 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
17158
17159 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
17160 after its termination.
17161
17162 2010-08-09 Pedro Alves <pedro@codesourcery.com>
17163
17164 * linux-low.c (gdb_wants_lwp_stopped): Delete.
17165 (gdb_wants_all_stopped): Delete.
17166 (linux_wait_1): Don't call them.
17167 * server.c (handle_v_cont): Tag all threads as want-stopped.
17168 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
17169 stopped as "client-wants-stopped".
17170
17171 2010-07-31 Pedro Alves <pedro@codesourcery.com>
17172
17173 * Makefile.in (signals_h): New.
17174 (server_h): Depend on it.
17175 (server.o): Don't depend on $(signals_def).
17176 (signals.o): Depend on $(signals_def).
17177
17178 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
17179
17180 * Makefile.in (signals_def): New.
17181 (server_h): Append include/gdb/signals.h and signals_def.
17182 (server.o): Append signals_def.
17183
17184 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
17185
17186 * server.c (handle_target_event): Use target_signal_to_host for
17187 resume_info.sig initialization.
17188 * target.h (struct thread_resume) <sig>: New comment.
17189
17190 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
17191
17192 * server.c (handle_query): strcpy() the returned string from paddress()
17193 instead of sprintf().
17194 * utils.c (paddress): Return phex_nz().
17195
17196 2010-07-07 Joel Brobecker <brobecker@adacore.com>
17197
17198 * server.c (handle_v_cont): Call mourn_inferior if process
17199 just exited.
17200 (myresume): Likewise.
17201
17202 2010-07-01 Pedro Alves <pedro@codesourcery.com>
17203
17204 Static tracepoints, and integration with UST.
17205
17206 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
17207 * mem-break.c (uninsert_all_breakpoints)
17208 (reinsert_all_breakpoints): New.
17209 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
17210 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
17211 (gdb_agent_ust_loaded, helper_thread_id)
17212 (gdb_agent_helper_thread_id): New macros.
17213 (struct ipa_sym_addresses): Add addr_ust_loaded,
17214 addr_helper_thread_id, addr_cmd_buf.
17215 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
17216 (in_process_agent_loaded_ust): New.
17217 (write_e_ust_not_loaded): New.
17218 (maybe_write_ipa_ust_not_loaded): New.
17219 (struct collect_static_trace_data_action): New.
17220 (enum tracepoint_type) <static_tracepoint>: New.
17221 (struct tracepoint) <handle>: Mention static tracepoints.
17222 (struct static_tracepoint_ctx): New.
17223 (CMD_BUF_SIZE): New.
17224 (add_tracepoint_action): Handle static tracepoint actions.
17225 (unprobe_marker_at): New.
17226 (clear_installed_tracepoints): Handle static tracepoints.
17227 (cmd_qtdp): Handle static tracepoints.
17228 (probe_marker_at): New.
17229 (cmd_qtstart): Handle static tracepoints.
17230 (response_tracepoint): Handle static tracepoints.
17231 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
17232 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
17233 (get_context_regcache): Handle static tracepoints.
17234 (do_action_at_tracepoint): Handle static tracepoint actions.
17235 (traceframe_find_block_type): Handle static trace data blocks.
17236 (traceframe_read_sdata): New.
17237 (download_tracepoints): Download static tracepoint actions.
17238 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
17239 (GDB_PROBE_NAME): New.
17240 (ust_ops): New.
17241 (GET_UST_SYM): New.
17242 (USTF): New.
17243 (dlsym_ust): New.
17244 (ust_marker_to_static_tracepoint): New.
17245 (gdb_probe): New.
17246 (collect_ust_data_at_tracepoint): New.
17247 (gdb_ust_probe): New.
17248 (UNIX_PATH_MAX, SOCK_DIR): New.
17249 (gdb_ust_connect_sync_socket): New.
17250 (resume_thread, stop_thread): New.
17251 (run_inferior_command): New.
17252 (init_named_socket): New.
17253 (gdb_ust_socket_init): New.
17254 (cstr_to_hexstr): New.
17255 (next_st): New.
17256 (first_marker, next_marker): New.
17257 (response_ust_marker): New.
17258 (cmd_qtfstm, cmd_qtsstm): New.
17259 (unprobe_marker_at, probe_marker_at): New.
17260 (cmd_qtstmat, gdb_ust_thread): New.
17261 (gdb_ust_init): New.
17262 (initialize_tracepoint_ftlib): Call gdb_ust_init.
17263 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
17264 (ST_REGENTRY): New.
17265 (x86_64_st_collect_regmap): New.
17266 (X86_64_NUM_ST_COLLECT_GREGS): New.
17267 (AMD64_RIP_REGNUM): New.
17268 (supply_static_tracepoint_registers): New.
17269 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
17270 (ST_REGENTRY): New.
17271 (i386_st_collect_regmap): New.
17272 (i386_NUM_ST_COLLECT_GREGS): New.
17273 (supply_static_tracepoint_registers): New.
17274 * server.c (handle_query): Handle qXfer:statictrace:read.
17275 <qSupported>: Report support for StaticTracepoints, and
17276 qXfer:statictrace:read features.
17277 * server.h (traceframe_read_sdata)
17278 (supply_static_tracepoint_registers): Declare.
17279 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
17280 (unpack_varlen_hex): Include in IPA build.
17281 * Makefile.in (ustlibs, ustinc): New.
17282 (IPA_OBJS): Add remote-utils-ipa.o.
17283 ($(IPA_LIB)): Link -ldl and -lpthread.
17284 (UST_CFLAGS): New.
17285 (IPAGENT_CFLAGS): Add UST_CFLAGS.
17286 * config.in, configure: Regenerate.
17287
17288 2010-06-20 Ian Lance Taylor <iant@google.com>
17289 Pedro Alves <pedro@codesourcery.com>
17290
17291 * linux-x86-low.c (always_true): Delete.
17292 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
17293 trying to fool the compiler with always_true.
17294
17295 2010-06-20 Pedro Alves <pedro@codesourcery.com>
17296
17297 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
17298 conditions in gdbserver.
17299
17300 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
17301
17302 * spu-low.c (spu_read_memory): Wrap around local store limit.
17303 (spu_write_memory): Likewise.
17304
17305 2010-06-15 Pedro Alves <pedro@codesourcery.com>
17306
17307 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
17308 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
17309 LONGEST uses.
17310 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
17311 uses.
17312 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
17313 uses with LONGEST uses.
17314
17315 2010-06-14 Stan Shebs <stan@codesourcery.com>
17316 Pedro Alves <pedro@codesourcery.com>
17317
17318 Bytecode compiler.
17319
17320 * linux-x86-low.c: Include limits.h.
17321 (add_insns): New.
17322 (always_true): New.
17323 (EMIT_ASM): New.
17324 (EMIT_ASM32): New.
17325 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
17326 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
17327 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
17328 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
17329 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
17330 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
17331 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
17332 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
17333 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
17334 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
17335 (amd64_emit_void_call_2): New.
17336 (amd64_emit_ops): New.
17337 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
17338 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
17339 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
17340 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
17341 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
17342 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
17343 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
17344 (i386_emit_call, i386_emit_reg, i386_emit_pop)
17345 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
17346 (i386_emit_stack_adjust, i386_emit_int_call_1)
17347 (i386_emit_void_call_2): New.
17348 (i386_emit_ops): New.
17349 (x86_emit_ops): New.
17350 (the_low_target): Install x86_emit_ops.
17351 * server.h (struct emit_ops): New.
17352 (get_raw_reg_func_addr): Declare.
17353 (current_insn_ptr, emit_error): Declare.
17354 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
17355 (set_trace_state_variable_value): New defines.
17356 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
17357 addr_get_trace_state_variable_value and
17358 addr_set_trace_state_variable_value.
17359 (symbol_list): New fields for get_raw_reg,
17360 get_trace_state_variable_value and set_trace_state_variable_value.
17361 (condfn): New typedef.
17362 (struct tracepoint): New field `compiled_cond'.
17363 (do_action_at_tracepoint): Clear compiled_cond.
17364 (get_trace_state_variable_value, set_trace_state_variable_value):
17365 Export in the IPA.
17366 (condition_true_at_tracepoint): If there's a compiled condition,
17367 run that.
17368 (current_insn_ptr, emit_error): New globals.
17369 (struct bytecode_address): New.
17370 (get_raw_reg_func_addr): New.
17371 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
17372 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
17373 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
17374 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
17375 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
17376 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
17377 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
17378 (compile_tracepoint_condition, compile_bytecodes): New.
17379 * target.h (emit_ops): Forward declare.
17380 (struct target_ops): New field emit_ops.
17381 (target_emit_ops): New.
17382 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
17383 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
17384 * linux-low.c (linux_emit_ops): New.
17385 (linux_target_ops): Install it.
17386 * linux-low.h (struct linux_target_ops): New field emit_ops.
17387
17388 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
17389
17390 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
17391 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
17392
17393 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17394 Stan Shebs <stan@codesourcery.com>
17395
17396 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
17397 (all): Depend on $(extra_libraries).
17398 (install-only): Install the IPA.
17399 (IPA_OBJS, IPA_LIB): New.
17400 (clean): Remove the IPA lib.
17401 (IPAGENT_CFLAGS): New.
17402 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
17403 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
17404 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
17405 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
17406 * configure.ac: Check for atomic builtins support in the compiler.
17407 (IPA_DEPFILES, extra_libraries): Define.
17408 * configure.srv (ipa_obj): Add description.
17409 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
17410 (i[34567]86-*-linux*): Set ipa_obj.
17411 (x86_64-*-linux*): Set ipa_obj.
17412 * linux-low.c (stabilizing_threads): New.
17413 (supports_fast_tracepoints): New.
17414 (linux_detach): Stabilize threads before detaching.
17415 (handle_tracepoints): Handle internal tracing breakpoints. Assert
17416 the lwp is either not stabilizing, or is moving out of a jump pad.
17417 (linux_fast_tracepoint_collecting): New.
17418 (maybe_move_out_of_jump_pad): New.
17419 (enqueue_one_deferred_signal): New.
17420 (dequeue_one_deferred_signal): New.
17421 (linux_wait_for_event_1): If moving out of a jump pad, defer
17422 pending signals to later.
17423 (linux_stabilize_threads): New.
17424 (linux_wait_1): Check if threads need moving out of jump pads, and
17425 do it if so.
17426 (stuck_in_jump_pad_callback): New.
17427 (move_out_of_jump_pad_callback): New.
17428 (lwp_running): New.
17429 (linux_resume_one_lwp): Handle moving out of jump pads.
17430 (linux_set_resume_request): Dequeue deferred signals.
17431 (need_step_over_p): Also step over fast tracepoint jumps.
17432 (start_step_over): Also uninsert fast tracepoint jumps.
17433 (finish_step_over): Also reinsert fast tracepoint jumps.
17434 (linux_install_fast_tracepoint_jump): New.
17435 (linux_target_ops): Install linux_stabilize_threads and
17436 linux_install_fast_tracepoint_jump_pad.
17437 * linux-low.h (linux_target_ops) <get_thread_area,
17438 install_fast_tracepoint_jump_pad>: New fields.
17439 (struct lwp_info) <collecting_fast_tracepoint,
17440 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
17441 (linux_get_thread_area): Declare.
17442 * linux-x86-low.c (jump_insn): New.
17443 (x86_get_thread_area): New.
17444 (append_insns): New.
17445 (push_opcode): New.
17446 (amd64_install_fast_tracepoint_jump_pad): New.
17447 (i386_install_fast_tracepoint_jump_pad): New.
17448 (x86_install_fast_tracepoint_jump_pad): New.
17449 (the_low_target): Install x86_get_thread_area and
17450 x86_install_fast_tracepoint_jump_pad.
17451 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
17452 (struct fast_tracepoint_jump): New.
17453 (fast_tracepoint_jump_insn): New.
17454 (fast_tracepoint_jump_shadow): New.
17455 (find_fast_tracepoint_jump_at): New.
17456 (fast_tracepoint_jump_here): New.
17457 (delete_fast_tracepoint_jump): New.
17458 (set_fast_tracepoint_jump): New.
17459 (uninsert_fast_tracepoint_jumps_at): New.
17460 (reinsert_fast_tracepoint_jumps_at): New.
17461 (set_breakpoint_at): Use write_inferior_memory.
17462 (uninsert_raw_breakpoint): Use write_inferior_memory.
17463 (check_mem_read): Mask out fast tracepoint jumps.
17464 (check_mem_write): Mask out fast tracepoint jumps.
17465 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
17466 (set_fast_tracepoint_jump): Declare.
17467 (delete_fast_tracepoint_jump)
17468 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
17469 (reinsert_fast_tracepoint_jumps_at): Declare.
17470 * regcache.c: Don't compile many functions when building the
17471 in-process agent library.
17472 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
17473 the register buffer in the heap.
17474 (free_register_cache): If the register buffer isn't owned by the
17475 regcache, don't free it.
17476 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
17477 pre-existing register caches.
17478 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
17479 type.
17480 (convert_ascii_to_int): : Constify `from' parameter type.
17481 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
17482 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
17483 the needed buffer in-place.
17484 (relocate_instruction): New.
17485 * server.c (handle_query) <qSymbols>: If the target supports
17486 tracepoints, give it a chance of looking up symbols. Report
17487 support for fast tracepoints.
17488 (handle_status): Stabilize threads.
17489 (process_serial_event): Adjust.
17490 * server.h (struct fast_tracepoint_jump): Forward declare.
17491 (struct process_info) <fast_tracepoint_jumps>: New field.
17492 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
17493 (decode_X_packet, decode_M_packet): Adjust.
17494 (relocate_instruction): Declare.
17495 (in_process_agent_loaded): Declare.
17496 (tracepoint_look_up_symbols): Declare.
17497 (struct fast_tpoint_collect_status): Declare.
17498 (fast_tracepoint_collecting): Declare.
17499 (force_unlock_trace_buffer): Declare.
17500 (handle_tracepoint_bkpts): Declare.
17501 (initialize_low_tracepoint)
17502 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
17503 * target.h (struct target_ops) <stabilize_threads,
17504 install_fast_tracepoint_jump_pad>: New fields.
17505 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
17506 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
17507 [HAVE_STDINT_H]: Include stdint.h.
17508 (trace_debug_1): Rename to ...
17509 (trace_vdebug): ... this.
17510 (trace_debug): Rename to ...
17511 (trace_debug_1): ... this. Add `level' parameter.
17512 (trace_debug): New.
17513 (ATTR_USED, ATTR_NOINLINE): New.
17514 (IP_AGENT_EXPORT): New.
17515 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
17516 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
17517 (about_to_request_buffer_space, trace_buffer_is_full)
17518 (stopping_tracepoint, expr_eval_result, error_tracepoint)
17519 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
17520 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
17521 (traceframe_write_count, traceframes_created)
17522 (trace_state_variables)
17523 New renaming defines.
17524 (struct ipa_sym_addresses): New.
17525 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
17526 (symbol_list): New.
17527 (ipa_sym_addrs): New.
17528 (all_tracepoint_symbols_looked_up): New.
17529 (in_process_agent_loaded): New.
17530 (write_e_ipa_not_loaded): New.
17531 (maybe_write_ipa_not_loaded): New.
17532 (tracepoint_look_up_symbols): New.
17533 (debug_threads) [IN_PROCESS_AGENT]: New.
17534 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
17535 (UNKNOWN_SIDE_EFFECTS): New.
17536 (stop_tracing): New.
17537 (flush_trace_buffer): New.
17538 (stop_tracing_bkpt): New.
17539 (flush_trace_buffer_bkpt): New.
17540 (read_inferior_integer): New.
17541 (read_inferior_uinteger): New.
17542 (read_inferior_data_pointer): New.
17543 (write_inferior_data_pointer): New.
17544 (write_inferior_integer): New.
17545 (write_inferior_uinteger): New.
17546 (struct collect_static_trace_data_action): Delete.
17547 (enum tracepoint_type): New.
17548 (struct tracepoint) <type>: New field `type'.
17549 <actions_str, step_actions, step_actions_str>: Only include in
17550 GDBserver.
17551 <orig_size, obj_addr_on_target, adjusted_insn_addr>
17552 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
17553 (tracepoints): Use IP_AGENT_EXPORT.
17554 (last_tracepoint): Don't include in the IPA.
17555 (stopping_tracepoint): Use IP_AGENT_EXPORT.
17556 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
17557 (alloced_trace_state_variables): New.
17558 (trace_state_variables): Use IP_AGENT_EXPORT.
17559 (traceframe_t): Delete unused variable.
17560 (circular_trace_buffer): Don't include in the IPA.
17561 (trace_buffer_start): Delete.
17562 (struct trace_buffer_control): New.
17563 (trace_buffer_free): Delete.
17564 (struct ipa_trace_buffer_control): New.
17565 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
17566 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
17567 New.
17568 (trace_buffer_ctrl): New.
17569 (TRACE_BUFFER_CTRL_CURR): New.
17570 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
17571 Reimplement as macros.
17572 (trace_buffer_wrap): Delete.
17573 (traceframe_write_count, traceframe_read_count)
17574 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
17575 (struct tracepoint_hit_ctx) <type>: New field.
17576 (struct fast_tracepoint_ctx): New.
17577 (memory_barrier): New.
17578 (cmpxchg): New.
17579 (record_tracepoint_error): Update atomically in the IPA.
17580 (clear_inferior_trace_buffer): New.
17581 (about_to_request_buffer_space): New.
17582 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
17583 updating the same buffer.
17584 (add_tracepoint): Default the tracepoint's type to trap
17585 tracepoint, and orig_size to -1.
17586 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
17587 internal variables.
17588 (create_trace_state_variable): New parameter `gdb'. Handle it.
17589 (clear_installed_tracepoints): Clear fast tracepoint jumps.
17590 (cmd_qtdp): Handle fast tracepoints.
17591 (cmd_qtdv): Adjust.
17592 (max_jump_pad_size): New.
17593 (gdb_jump_pad_head): New.
17594 (get_jump_space_head): New.
17595 (claim_jump_space): New.
17596 (sort_tracepoints): New.
17597 (MAX_JUMP_SIZE): New.
17598 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
17599 IPA.
17600 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
17601 support. Upload fast traceframes, and delete internal IPA
17602 breakpoints.
17603 (stop_tracing_handler): New.
17604 (flush_trace_buffer_handler): New.
17605 (cmd_qtstop): Upload fast tracepoints.
17606 (response_tracepoint): Handle fast tracepoints.
17607 (tracepoint_finished_step): Upload fast traceframes. Set the
17608 tracepoint hit context's tracepoint type.
17609 (handle_tracepoint_bkpts): New.
17610 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
17611 type. Add comment about fast tracepoints.
17612 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
17613 non-existing action_str field.
17614 (get_context_regcache): Handle fast tracepoints.
17615 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
17616 to the regcache.
17617 (fast_tracepoint_from_jump_pad_address): New.
17618 (fast_tracepoint_from_ipa_tpoint_address): New.
17619 (collecting_t): New.
17620 (force_unlock_trace_buffer): New.
17621 (fast_tracepoint_collecting): New.
17622 (collecting): New.
17623 (gdb_collect): New.
17624 (write_inferior_data_ptr): New.
17625 (target_tp_heap): New.
17626 (target_malloc): New.
17627 (download_agent_expr): New.
17628 (UALIGN): New.
17629 (download_tracepoints): New.
17630 (download_trace_state_variables): New.
17631 (upload_fast_traceframes): New.
17632 (IPA_FIRST_TRACEFRAME): New.
17633 (IPA_NEXT_TRACEFRAME_1): New.
17634 (IPA_NEXT_TRACEFRAME): New.
17635 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
17636 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
17637 (gdb_jump_pad_buffer_end): New.
17638 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
17639 (initialize_tracepoint): Adjust.
17640 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
17641 buffer. Initialize the low module.
17642 * utils.c (PREFIX, TOOLNAME): New.
17643 (malloc_failure): Use PREFIX.
17644 (error): In the IPA, an error causes an exit.
17645 (fatal, warning): Use PREFIX.
17646 (internal_error): Use TOOLNAME.
17647 (NUMCELLS): Increase to 10.
17648 * configure, config.in: Regenerate.
17649
17650 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17651
17652 * server.c (handle_query) <qSupported>: Do two passes over the
17653 qSupported string to avoid nesting strtok.
17654
17655 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17656
17657 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
17658 (CDEPS): New.
17659 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
17660 -Wl,--dynamic-list.
17661 * configure: Regenerate.
17662 * proc-service.list: New.
17663
17664 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17665
17666 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
17667 New comment.
17668
17669 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
17670
17671 * gdbreplay.c (remote_open): Check error return from socket() call by
17672 its equality to -1 not by it being negative.
17673 * remote-utils.c (remote_open): Likewise.
17674
17675 2010-05-23 Pedro Alves <pedro@codesourcery.com>
17676
17677 * config.h: Regenerate.
17678
17679 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17680
17681 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
17682 doesn't provide PTRACE_GET_THREAD_AREA.
17683
17684 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17685
17686 * linux-m68k-low.c: Include <asm/ptrace.h>
17687 (ps_get_thread_area): Implement.
17688
17689 2010-05-03 Doug Evans <dje@google.com>
17690
17691 * event-loop.c (struct callback_event): New struct.
17692 (callback_list): New global.
17693 (append_callback_event, delete_callback_event): New functions.
17694 (process_callback): New function.
17695 (start_event_loop): Call it.
17696 * remote-utils.c (NOT_SCHEDULED): Define.
17697 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
17698 moved out of readchar.
17699 (readchar): Rewrite. Call reschedule before returning.
17700 (reset_readchar): New function.
17701 (remote_close): Call it.
17702 (process_remaining, reschedule): New functions.
17703 * server.h (callback_handler_func): New typedef.
17704 (append_callback_event, delete_callback_event): Declare.
17705
17706 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17707
17708 * proc-service.c (ps_pglobal_lookup): Use
17709 thread_db_look_up_one_symbol.
17710 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
17711 parameter. Use it instead of all_symbols_looked_up.
17712 * server.h (struct process_info) <all_symbols_looked_up>: Delete
17713 field.
17714 (all_symbols_looked_up): Don't declare.
17715 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
17716 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
17717 field.
17718 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
17719 Set all_symbols_looked_up here.
17720 (thread_db_look_up_one_symbol): New.
17721 (thread_db_get_tls_address): Adjust.
17722 (thread_db_load_search, try_thread_db_load_1): Always allocate the
17723 thread_db object on the heap, and tentatively set it in the
17724 process structure.
17725 (thread_db_init): Don't set all_symbols_looked_up here.
17726 * linux-low.h (thread_db_look_up_one_symbol): Declare.
17727
17728 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17729
17730 * linux-low.c (linux_kill, linux_detach): Adjust.
17731 (status_pending_p_callback): Remove redundant statement. Check
17732 for !TARGET_WAITIKIND_IGNORE, instead of
17733 TARGET_WAITKIND_STOPPED.
17734 (handle_tracepoints): Make sure LWP is locked. Adjust.
17735 (linux_wait_for_event_1): Adjust.
17736 (linux_cancel_breakpoints): New.
17737 (unsuspend_one_lwp): New.
17738 (unsuspend_all_lwps): New.
17739 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
17740 (send_sigstop_callback): Change return type to int, add new
17741 `except' parameter and handle it.
17742 (suspend_and_send_sigstop_callback): New.
17743 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
17744 pass them down. If SUSPEND, also increment the lwp's suspend
17745 count.
17746 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
17747 (need_step_over_p): Don't consider suspended LWPs.
17748 (start_step_over): Adjust.
17749 (proceed_one_lwp): Change return type to int, add new `except'
17750 parameter and handle it.
17751 (unsuspend_and_proceed_one_lwp): New.
17752 (proceed_all_lwps): Use find_inferior instead of
17753 for_each_inferior.
17754 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
17755 also decrement the suspend count of LWPs. Pass `except' down,
17756 instead of hacking its suspend count.
17757 (linux_pause_all): Add `freeze' parameter. Adjust.
17758 (linux_unpause_all): New.
17759 (linux_target_ops): Install linux_unpause_all.
17760 * server.c (handle_status): Adjust.
17761 * target.h (struct target_ops): New fields `unpause_all' and
17762 `cancel_breakpoints'. Add new parameter to `pause_all'.
17763 (pause_all): Add new `freeze' parameter.
17764 (unpause_all): New.
17765 (cancel_breakpoints): New.
17766 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
17767 cancel breakpoints.
17768 (cmd_qtstart): Pause threads.
17769 (stop_tracing): Pause threads, and cancel breakpoints.
17770 * win32-low.c (win32_target_ops): Adjust.
17771
17772 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17773
17774 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
17775 the inferior right away from here...
17776 (linux_wait_1): ... to here, and adjust to check the thread's
17777 last_resume_kind instead of the lwp's step or stop_expected flags.
17778
17779 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17780
17781 * README: Use consistent `GDB' and `GDBserver' spellings.
17782
17783 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17784
17785 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
17786 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
17787 (linux_detach_one_lwp): Assume the lwp is stopped.
17788 (any_thread_of): Delete.
17789 (linux_detach): Stop all lwps here. Don't blindly delete all
17790 breakpoints.
17791 (delete_lwp_callback): New.
17792 (linux_mourn): Delete all lwps of the process that is gone.
17793 (linux_wait_1): Don't delete the last lwp of the process here.
17794 * mem-break.h (mark_breakpoints_out): Declare.
17795 * mem-break.c (mark_breakpoints_out): New.
17796 (free_all_breakpoints): Use it.
17797 * server.c (handle_target_event): If the process is gone, mark
17798 breakpoints out.
17799 * thread-db.c (struct thread_db) <create_bp>: New field.
17800 (thread_db_enable_reporting): Fix prototype. Store a thread event
17801 breakpoint reference in the thread_db struct.
17802 (thread_db_load_search): Clear the thread_db object.
17803 (try_thread_db_load_1): Ditto.
17804 (switch_to_process): New.
17805 (disable_thread_event_reporting): Use it.
17806 (remove_thread_event_breakpoints): New.
17807 (thread_db_detach, thread_db_mourn): Use it.
17808
17809 2010-05-01 Pedro Alves <pedro@codesourcery.com>
17810
17811 * linux-low.c (linux_enable_event_reporting): New.
17812 (linux_wait_for_event_1, handle_extended_wait): Use it.
17813
17814 2010-04-30 Pedro Alves <pedro@codesourcery.com>
17815
17816 * linux-low.c (linux_kill_one_lwp, linux_kill)
17817 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
17818 (send_sigstop): Take an lwp_info as parameter instead. Queue a
17819 SIGSTOP even if the LWP is stopped.
17820 (send_sigstop_callback): New.
17821 (stop_all_lwps): Use send_sigstop_callback instead.
17822 (linux_resume_one_thread): Adjust.
17823 (proceed_one_lwp): Still proceed an LWP that the client has
17824 requested to stop, if we haven't reported it as stopped yet. Make
17825 sure that LWPs the client want stopped, have a pending SIGSTOP.
17826
17827 2010-04-26 Doug Evans <dje@google.com>
17828
17829 * server.c (handle_general_set): Make static.
17830
17831 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
17832 Print received char after testing for error/eof instead of before.
17833 (input_interrupt): Tweak comment.
17834
17835 2010-04-23 Doug Evans <dje@google.com>
17836
17837 * server.c (start_inferior): Print inferior argv if --debug.
17838
17839 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
17840
17841 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
17842 * nto-x86-low.c: Include server.h
17843
17844 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
17845
17846 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
17847 be consistent with other sources of this directory.
17848 (init_registers_amd64): Correct name of source file of this function
17849 in the comment.
17850
17851 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17852
17853 * configure.srv (x86_64-*-mingw*): New configuration for Windows
17854 64-bit executables.
17855
17856 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17857
17858 * win32-i386-low.c: Add 64-bit support.
17859 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
17860 (init_registers_amd64): Declare.
17861 (mappings): Add 64-bit version of array.
17862 (init_windows_x86): New function.
17863 (the_low_target): Change init_arch field to init_windows_x86.
17864
17865 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17866
17867 * win32-low.c: Adapt to support also 64-bit architecture.
17868 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
17869 (get_image_name): Use SIZE_T type for local variable `done'.
17870 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
17871 (toolhelp_get_dll_name): Idem.
17872 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
17873 Use uintptr_t typecast to avoid warning.
17874 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
17875 (handle_exception): Use phex_nz to avoid warning.
17876 (win32_wait): Remove unused local variable `process'.
17877
17878 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17879
17880 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
17881 `amd64-avx.o'.
17882
17883 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
17884
17885 * configure.ac: Use `ws2_32' library for srv_mingw.
17886 * configure: Regenerate.
17887 * gdbreplay.c: Include winsock2.h instead of winsock.h.
17888 * remote-utils.c: Likewise.
17889
17890 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
17891
17892 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
17893 if __x86_64__ is defined.
17894
17895 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17896
17897 * configure: Regenerate.
17898
17899 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17900
17901 * server.c (handle_query): Handle 'qGetTIBAddr' query.
17902 * target.h (target_ops): New get_tib_address field.
17903 * win32-low.h (win32_thread_info): Add thread_local_base field.
17904 * win32-low.c (child_add_thread): Add tlb argument.
17905 Set thread_local_base field to TLB.
17906 (get_child_debug_event): Adapt to child_add_thread change.
17907 (win32_get_tib_address): New function.
17908 (win32_target_ops): Set get_tib_address field to
17909 win32_get_tib_address.
17910 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
17911
17912 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17913
17914 * linux-low.c (linux_mourn): Also remove the process.
17915 * server.c (handle_target_event): Don't remove the process here.
17916 * nto-low.c (nto_mourn): New.
17917 (nto_target_ops): Install it.
17918 * spu-low.c (spu_mourn): New.
17919 (spu_target_ops): Install it.
17920 * win32-low.c (win32_mourn): New.
17921 (win32_target_ops): Install it.
17922
17923 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17924
17925 * server.h (buffer_xml_printf): Remove redundant `;'.
17926
17927 2010-04-12 Pedro Alves <pedro@codesourcery.com>
17928
17929 * regcache.c (set_register_cache): Invalidate regcaches before
17930 changing the register cache layout.
17931 (regcache_invalidate_one): Allow a NULL regcache.
17932 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
17933 regcaches before changing the register cache layout or the target
17934 regsets.
17935
17936 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
17937
17938 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
17939 variable warning on Linux/x86-64.
17940
17941 2010-04-11 Pedro Alves <pedro@codesourcery.com>
17942
17943 GDBserver disconnected tracing support.
17944
17945 * linux-low.c (linux_remove_process): Delete.
17946 (add_lwp): Don't set last_resume_kind here.
17947 (linux_kill): Use `mourn'.
17948 (linux_detach): Use `thread_db_detach', and `mourn'.
17949 (linux_mourn): New.
17950 (linux_attach_lwp_1): Adjust comment.
17951 (linux_attach): last_resume_kind moved the thread_info; adjust.
17952 (status_pending_p_callback): Adjust.
17953 (linux_wait_for_event_1): Adjust.
17954 (count_events_callback, select_singlestep_lwp_callback)
17955 (select_event_lwp_callback, cancel_breakpoints_callback)
17956 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
17957 (proceed_one_lwp): Adjust.
17958 (linux_async): Add debug output.
17959 (linux_thread_stopped): New.
17960 (linux_pause_all): New.
17961 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
17962 linux_pause_all.
17963 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
17964 (thread_db_free): Delete declaration.
17965 (thread_db_detach, thread_db_mourn): Declare.
17966 * thread-db.c (thread_db_init): Use thread_db_mourn.
17967 (thread_db_free): Delete, split in two.
17968 (disable_thread_event_reporting): New.
17969 (thread_db_detach): New.
17970 (thread_db_mourn): New.
17971
17972 * server.h (struct thread_info) <last_resume_kind>: New field.
17973 <attached>: Add comment.
17974 <gdb_detached>: New field.
17975 (handler_func): Change return type to int.
17976 (handle_serial_event, handle_target_event): Ditto.
17977 (gdb_connected): Declare.
17978 (tracing): Delete.
17979 (disconnected_tracing): Declare.
17980 (stop_tracing): Declare.
17981
17982 * server.c (handle_query) <qSupported>: Report support for
17983 disconnected tracing.
17984 (queue_stop_reply_callback): Account for running threads.
17985 (gdb_wants_thread_stopped): New.
17986 (gdb_wants_all_threads_stopped): New.
17987 (gdb_reattached_process): New.
17988 (handle_status): Clear the `gdb_detached' flag of all processes.
17989 In all-stop, stop all threads.
17990 (main): Be sure to leave tfind mode. Handle disconnected tracing.
17991 (process_serial_event): If the remote connection breaks, or if an
17992 exit was forced with "monitor exit", force an event loop exit.
17993 Handle disconnected tracing on detach.
17994 (handle_serial_event): Adjust.
17995 (handle_target_event): If GDB isn't connected, forward events back
17996 to the inferior, unless the last process exited, in which case,
17997 exit gdbserver. Adjust interface.
17998
17999 * remote-utils.c (remote_open): Don't block in accept. Instead
18000 register an event loop source on the listen socket file
18001 descriptor. Refactor bits into ...
18002 (listen_desc): ... this new global.
18003 (gdb_connected): ... this new function.
18004 (enable_async_notification): ... this new function.
18005 (handle_accept_event): ... this new function.
18006 (remote_close): Clear remote_desc.
18007
18008 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
18009
18010 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
18011 New fields.
18012 (mourn_inferior): Define.
18013 (target_process_qsupported): Avoid the dangling else problem.
18014 (thread_stopped): Define.
18015 (pause_all): Define.
18016 (target_waitstatus_to_string): Declare.
18017 * target.c (target_waitstatus_to_string): New.
18018
18019 * tracepoint.c (tracing): Make extern.
18020 (disconnected_tracing): New.
18021 (stop_tracing): Make extern. Handle tracing stops due to GDB
18022 disconnecting.
18023 (cmd_qtdisconnected): New.
18024 (cmd_qtstatus): Report disconnected tracing status in trace reply.
18025 (handle_tracepoint_general_set): Handle QTDisconnected.
18026
18027 * event-loop.c (event_handler_func): Change return type to int.
18028 (process_event): Bail out if the event handler wants the event
18029 loop to stop.
18030 (handle_file_event): Ditto.
18031 (start_event_loop): Bail out if the event handler wants the event
18032 loop to stop.
18033
18034 * nto-low.c (nto_target_ops): Adjust.
18035 * spu-low.c (spu_wait): Don't remove the process here.
18036 (spu_target_ops): Adjust.
18037 * win32-low.c (win32_wait): Don't remove the process here.
18038 (win32_target_ops): Adjust.
18039
18040 2010-04-11 Pedro Alves <pedro@codesourcery.com>
18041
18042 * regcache.c (realloc_register_cache): Invalidate inferior's
18043 regcache before recreating it.
18044
18045 2010-04-09 Pedro Alves <pedro@codesourcery.com>
18046
18047 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
18048
18049 2010-04-09 Stan Shebs <stan@codesourcery.com>
18050 Pedro Alves <pedro@codesourcery.com>
18051
18052 * server.h (LONGEST): New.
18053 (struct thread_info) <while_stepping>: New field.
18054 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
18055 Declare.
18056 (initialize_tracepoint, handle_tracepoint_general_set)
18057 (handle_tracepoint_query, tracepoint_finished_step)
18058 (tracepoint_was_hit, release_while_stepping_state_list):
18059 (current_traceframe): Declare.
18060 * server.c (handle_general_set): Handle tracepoint packets.
18061 (read_memory): New.
18062 (write_memory): New.
18063 (handle_search_memory_1): Use read_memory.
18064 (handle_query): Report support for conditional tracepoints, trace
18065 state variables, and tracepoint sources. Handle tracepoint
18066 queries.
18067 (main): Initialize the tracepoints module.
18068 (process_serial_event): Handle traceframe reads/writes.
18069
18070 * linux-low.c (handle_tracepoints): New.
18071 (linux_wait_1): Call it.
18072 (linux_resume_one_lwp): Handle while-stepping.
18073 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
18074 (linux_target_ops): Install them.
18075 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
18076 New field.
18077 * linux-x86-low.c (x86_supports_tracepoints): New.
18078 (the_low_target). Install it.
18079
18080 * mem-break.h (delete_breakpoint): Declare.
18081 * mem-break.c (delete_breakpoint): Make external.
18082
18083 * target.h (struct target_ops): Add `supports_tracepoints',
18084 `read_pc', and `write_pc' fields.
18085 (target_supports_tracepoints): Define.
18086 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
18087 (phex_nz): New.
18088
18089 * regcache.h (struct regcache) <registers_owned>: New field.
18090 (init_register_cache, regcache_cpy): Declare.
18091 (regcache_read_pc, regcache_write_pc): Declare.
18092 (register_cache_size): Declare.
18093 (supply_regblock): Declare.
18094 * regcache.c (init_register_cache): New.
18095 (new_register_cache): Use it.
18096 (regcache_cpy): New.
18097 (register_cache_size): New.
18098 (supply_regblock): New.
18099 (regcache_read_pc, regcache_write_pc): New.
18100
18101 * tracepoint.c: New.
18102
18103 * Makefile.in (OBS): Add tracepoint.o.
18104 (tracepoint.o): New rule.
18105
18106 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
18107
18108 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
18109 (i386-mmx.o): New.
18110 (i386-mmx.c): Likewise.
18111 (i386-mmx-linux.o): Likewise.
18112 (i386-mmx-linux.c): Likewise.
18113
18114 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
18115 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
18116 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
18117 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
18118
18119 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
18120 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
18121 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
18122
18123 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
18124
18125 * Makefile.in (clean): Updated.
18126 (i386-avx.o): New.
18127 (i386-avx.c): Likewise.
18128 (i386-avx-linux.o): Likewise.
18129 (i386-avx-linux.c): Likewise.
18130 (amd64-avx.o): Likewise.
18131 (amd64-avx.c): Likewise.
18132 (amd64-avx-linux.o): Likewise.
18133 (amd64-avx-linux.c): Likewise.
18134
18135 * configure.srv (srv_i386_regobj): Add i386-avx.o.
18136 (srv_i386_linux_regobj): Add i386-avx-linux.o.
18137 (srv_amd64_regobj): Add amd64-avx.o.
18138 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
18139 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
18140 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
18141 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
18142 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
18143 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
18144 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
18145
18146 * i387-fp.c: Include "i386-xstate.h".
18147 (i387_xsave): New.
18148 (i387_cache_to_xsave): Likewise.
18149 (i387_xsave_to_cache): Likewise.
18150 (x86_xcr0): Likewise.
18151
18152 * i387-fp.h (i387_cache_to_xsave): Likewise.
18153 (i387_xsave_to_cache): Likewise.
18154 (x86_xcr0): Likewise.
18155
18156 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
18157 * linux-crisv32-low.c (target_regsets): Likewise.
18158 * linux-m68k-low.c (target_regsets): Likewise.
18159 * linux-mips-low.c (target_regsets): Likewise.
18160 * linux-ppc-low.c (target_regsets): Likewise.
18161 * linux-s390-low.c (target_regsets): Likewise.
18162 * linux-sh-low.c (target_regsets): Likewise.
18163 * linux-sparc-low.c (target_regsets): Likewise.
18164 * linux-xtensa-low.c (target_regsets): Likewise.
18165
18166 * linux-low.c: Include <sys/uio.h>.
18167 (regsets_fetch_inferior_registers): Support nt_type.
18168 (regsets_store_inferior_registers): Likewise.
18169 (linux_process_qsupported): New.
18170 (linux_target_ops): Add linux_process_qsupported.
18171
18172 * linux-low.h (regset_info): Add nt_type.
18173 (linux_target_ops): Add process_qsupported.
18174
18175 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
18176 and <sys/uio.h>.
18177 (init_registers_i386_avx_linux): New.
18178 (init_registers_amd64_avx_linux): Likewise.
18179 (xmltarget_i386_linux_no_xml): Likewise.
18180 (xmltarget_amd64_linux_no_xml): Likewise.
18181 (PTRACE_GETREGSET): Likewise.
18182 (PTRACE_SETREGSET): Likewise.
18183 (x86_fill_xstateregset): Likewise.
18184 (x86_store_xstateregset): Likewise.
18185 (use_xml): Likewise.
18186 (x86_linux_update_xmltarget): Likewise.
18187 (x86_linux_process_qsupported): Likewise.
18188 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
18189 (x86_arch_setup): Don't call init_registers_amd64_linux nor
18190 init_registers_i386_linux here. Call
18191 x86_linux_update_xmltarget.
18192 (the_low_target): Add x86_linux_process_qsupported.
18193
18194 * server.c (handle_query): Call target_process_qsupported.
18195
18196 * target.h (target_ops): Add process_qsupported.
18197 (target_process_qsupported): New.
18198
18199 2010-04-03 Pedro Alves <pedro@codesourcery.com>
18200
18201 * inferiors.c (add_thread): Set last_status kind to
18202 TARGET_WAITKIND_IGNORE.
18203 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
18204 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
18205 (linux_wait_1): Move `thread' local definition to block that uses
18206 it. Don't NULL initialize `event_child'.
18207 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
18208 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
18209 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
18210
18211 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18212
18213 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
18214 an extended waitstatus, or by a watchpoint.
18215 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
18216 thread was stepping or has been stopped by a watchpoint.
18217
18218 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18219
18220 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
18221 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
18222 of another, then delete the previous, and validate all
18223 breakpoints.
18224 (validate_inserted_breakpoint): New.
18225 (delete_disabled_breakpoints): New.
18226 (validate_breakpoints): New.
18227 (check_mem_read): Validate breakpoints before trusting their
18228 shadow. Delete disabled breakpoints.
18229 (check_mem_write): Validate breakpoints before trusting they
18230 should be inserted. Delete disabled breakpoints.
18231 * mem-break.h (validate_breakpoints):
18232 * server.c (handle_query): Validate breakpoints when we see a
18233 qSymbol query.
18234
18235 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18236
18237 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
18238 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
18239 if we could tell there's a GDB breakpoint at stop_pc.
18240 (need_step_over_p): Don't do a step over if we find a GDB
18241 breakpoint at the resume PC.
18242
18243 * mem-break.c (struct raw_breakpoint): New.
18244 (enum bkpt_type): New type `gdb_breakpoint'.
18245 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
18246 fields. New field `raw'.
18247 (find_raw_breakpoint_at): New.
18248 (set_raw_breakpoint_at): Handle refcounting. Create a raw
18249 breakpoint instead.
18250 (set_breakpoint_at): Adjust.
18251 (delete_raw_breakpoint): New.
18252 (release_breakpoint): New.
18253 (delete_breakpoint): Rename to...
18254 (delete_breakpoint_1): ... this. Add proc parameter. Use
18255 release_breakpoint. Return ENOENT.
18256 (delete_breakpoint): Reimplement.
18257 (find_breakpoint_at): Delete.
18258 (find_gdb_breakpoint_at): New.
18259 (delete_breakpoint_at): Delete.
18260 (set_gdb_breakpoint_at): New.
18261 (delete_gdb_breakpoint_at): New.
18262 (gdb_breakpoint_here): New.
18263 (set_reinsert_breakpoint): Use release_breakpoint.
18264 (uninsert_breakpoint): Rename to ...
18265 (uninsert_raw_breakpoint): ... this.
18266 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
18267 (reinsert_raw_breakpoint): Change parameter type to
18268 raw_breakpoint.
18269 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
18270 instead.
18271 (check_breakpoints): Adjust. Use release_breakpoint.
18272 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
18273 (breakpoint_inserted_here): Ditto.
18274 (check_mem_read): Adjust to iterate over raw breakpoints instead.
18275 Don't trust the breakpoint's shadow if it is not inserted.
18276 (check_mem_write): Adjust to iterate over raw breakpoints instead.
18277 (delete_all_breakpoints): Adjust.
18278 (free_all_breakpoints): Mark all breakpoints as uninserted, and
18279 use delete_breakpoint_1.
18280
18281 * mem-break.h (breakpoints_supported): Delete declaration.
18282 (set_gdb_breakpoint_at): Declare.
18283 (gdb_breakpoint_here): Declare.
18284 (delete_breakpoint_at): Delete.
18285 (delete_gdb_breakpoint_at): Declare.
18286
18287 * server.h (struct raw_breakpoint): Forward declare.
18288 (struct process_info): New field `raw_breakpoints'.
18289
18290 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
18291 breakpoints.
18292
18293 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18294
18295 * linux-low.c (status_pending_p_callback): Fix comment.
18296 (linux_wait_for_event_1): Move most of the internal breakpoint
18297 handling from here...
18298 (linux_wait_1): ... to here.
18299 (count_events_callback): New.
18300 (select_singlestep_lwp_callback): New.
18301 (select_event_lwp_callback): New.
18302 (cancel_breakpoints_callback): New.
18303 (select_event_lwp): New.
18304 (linux_wait_1): Simplify internal breakpoint handling. Give equal
18305 priority to all LWPs that have had events that should be reported
18306 to the client. Cancel breakpoints when about to reporting the
18307 event to the client, not while stopping lwps. No longer cancel
18308 finished single-steps here.
18309 (cancel_finished_single_step): Delete.
18310 (cancel_finished_single_steps): Delete.
18311
18312 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18313
18314 * mem-break.c (enum bkpt_type): New.
18315 (struct breakpoint): New field `type'.
18316 (set_breakpoint_at): Change return type to struct breakpoint
18317 pointer. Set type to `other_breakpoint' by default.
18318 (delete_breakpoint): Rewrite, supporting more than one breakpoint
18319 in the breakpoint list.
18320 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
18321 (reinsert_breakpoint): Rename to ...
18322 (reinsert_raw_breakpoint): ... this.
18323 (reinsert_breakpoints_at): Adjust.
18324 * mem-break.h (struct breakpoint): Declare.
18325 (set_breakpoint_at): Change return type to struct breakpoint
18326 pointer.
18327
18328 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18329
18330 * server.c (handle_query): Assign, not compare.
18331
18332 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18333
18334 Teach linux gdbserver to step-over-breakpoints.
18335
18336 * linux-low.c (can_hardware_single_step): New.
18337 (supports_breakpoints): New.
18338 (handle_extended_wait): If stopping threads, read the stop pc of
18339 the new cloned LWP.
18340 (get_pc): New.
18341 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
18342 low target doesn't support retrieving the PC.
18343 (add_lwp): Set last_resume_kind to resume_continue.
18344 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
18345 (linux_attach): Don't clear stop_expected. Set the lwp's
18346 last_resume_kind to resume_stop.
18347 (linux_detach_one_lwp): Don't check for removed breakpoints.
18348 (check_removed_breakpoint): Delete.
18349 (status_pending_p): Rename to ...
18350 (status_pending_p_callback): ... this. Don't check for removed
18351 breakpoints. Don't consider threads that are stopped from GDB's
18352 perspective.
18353 (linux_wait_for_lwp): Always read the stop_pc here.
18354 (cancel_breakpoint): New.
18355 (step_over_bkpt): New global.
18356 (linux_wait_for_event_1): Implement stepping over breakpoints.
18357 (gdb_wants_lwp_stopped): New.
18358 (gdb_wants_all_stopped): New.
18359 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
18360 single-step traps here. Store the thread's last reported target
18361 wait status.
18362 (send_sigstop): Don't clear stop_expected. Always set it,
18363 instead.
18364 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
18365 (cancel_finished_single_step): New.
18366 (cancel_finished_single_steps): New.
18367 (wait_for_sigstop): Don't cancel finished single-step traps here.
18368 (linux_resume_one_lwp): Don't check for removed breakpoints.
18369 Don't set `step' on non-hardware step archs.
18370 (linux_set_resume_request): Ignore resume_stop requests if already
18371 stopping or stopped. Set the lwp's last_resume_kind.
18372 (resume_status_pending_p): Don't check for removed breakpoints.
18373 (need_step_over_p): New.
18374 (start_step_over): New.
18375 (finish_step_over): New.
18376 (linux_resume_one_thread): Always queue a sigstop for resume_stop
18377 requests. Clear the thread's last reported target waitstatus.
18378 Don't use the `suspended' flag. Don't consider pending breakpoints.
18379 (linux_resume): Start a step-over if necessary.
18380 (proceed_one_lwp): New.
18381 (proceed_all_lwps): New.
18382 (unstop_all_lwps): New.
18383 * linux-low.h (struct lwp_info): Rewrite comment for the
18384 `suspended' flag. Add the `stop_pc' field. Delete the
18385 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
18386 Add `'last_resume_kind' and `need_step_over' fields.
18387 * inferiors.c (struct thread_info): Delete, moved elsewhere.
18388 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
18389 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
18390 (set_raw_breakpoint_at): New.
18391 (set_breakpoint_at): Rewrite to use it.
18392 (reinsert_breakpoint_handler): Delete.
18393 (set_reinsert_breakpoint): New.
18394 (reinsert_breakpoint_by_bp): Delete.
18395 (delete_reinsert_breakpoints): New.
18396 (uninsert_breakpoint): Rewrite.
18397 (uninsert_breakpoints_at): New.
18398 (reinsert_breakpoint): Rewrite.
18399 (reinsert_breakpoints_at): New.
18400 (check_breakpoints): Rewrite.
18401 (breakpoint_here): New.
18402 (breakpoint_inserted_here): New.
18403 (check_mem_read): Adjust.
18404 * mem-break.h (breakpoints_supported, breakpoint_here)
18405 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
18406 (reinsert_breakpoint_by_bp): Delete declaration.
18407 (delete_reinsert_breakpoints): Declare.
18408 (reinsert_breakpoint): Delete declaration.
18409 (reinsert_breakpoints_at): Declare.
18410 (uninsert_breakpoint): Delete declaration.
18411 (uninsert_breakpoints_at): Declare.
18412 (check_breakpoints): Adjust prototype.
18413 * server.h: Adjust include order.
18414 (struct thread_info): Declare here. Add a `last_status' field.
18415
18416 2010-03-23 Michael Snyder <msnyder@vmware.com>
18417
18418 * server.c (crc32): New function.
18419 (handle_query): Add handling for 'qCRC:' request.
18420
18421 2010-03-23 Pedro Alves <pedro@codesourcery.com>
18422
18423 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
18424 lwp had been stopped by a watchpoint.
18425
18426 2010-03-16 Pedro Alves <pedro@codesourcery.com>
18427
18428 * server.h (internal_error): Declare.
18429 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
18430 * utils.c (internal_error): New function.
18431
18432 2010-03-15 Andreas Schwab <schwab@redhat.com>
18433
18434 * configure.srv: Fix typo setting srv_regobj.
18435
18436 2010-03-15 Pedro Alves <pedro@codesourcery.com>
18437
18438 * linux-low.c (fetch_register): Avoid passing a non string literal
18439 format to `error'.
18440 (usr_store_inferior_registers): Ditto.
18441
18442 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18443
18444 * linux-low.c (linux_write_memory): Bail out early if peeking
18445 memory failed.
18446
18447 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18448
18449 * linux-low.h (struct lwp_info): New fields
18450 `stopped_by_watchpoint' and `stopped_data_address'.
18451 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
18452 here, and cache them in the lwp object.
18453 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
18454 directly.
18455 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
18456 field.
18457 (linux_stopped_by_watchpoint): Rewrite.
18458 (linux_stopped_data_address): Rewrite.
18459
18460 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
18461
18462 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
18463 switching the current inferior, not before.
18464
18465 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
18466
18467 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
18468 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
18469 i386-linux.c and amd64-linux.c.
18470 (reg-i386.o): Removed.
18471 (reg-i386.c): Likewise.
18472 (reg-i386-linux.o): Likewise.
18473 (reg-i386-linux.c): Likewise.
18474 (reg-x86-64.o): Likewise.
18475 (reg-x86-64.c): Likewise.
18476 (reg-x86-64-linux.o): Likewise.
18477 (reg-x86-64-linux.c): Likewise.
18478 (i386.o): New.
18479 (i386.c): Likewise.
18480 (i386-linux.o): Likewise.
18481 (i386-linux.c): Likewise.
18482 (amd64.o): Likewise.
18483 (amd64.c): Likewise.
18484 (amd64-linux.o): Likewise.
18485 (amd64-linux.c): Likewise.
18486
18487 * configure.srv (srv_i386_regobj): New.
18488 (srv_i386_linux_regobj): Likewise.
18489 (srv_amd64_regobj): Likewise.
18490 (srv_amd64_linux_regobj): Likewise.
18491 (srv_i386_32bit_xmlfiles): Likewise.
18492 (srv_i386_64bit_xmlfiles): Likewise.
18493 (srv_i386_xmlfiles): Likewise.
18494 (srv_amd64_xmlfiles): Likewise.
18495 (srv_i386_linux_xmlfiles): Likewise.
18496 (srv_amd64_linux_xmlfiles): Likewise.
18497 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
18498 srv_xmlfiles to $srv_i386_xmlfiles.
18499 (i[34567]86-*-mingw32ce*): Likewise.
18500 (i[34567]86-*-mingw*): Likewise.
18501 (i[34567]86-*-nto*): Likewise.
18502 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
18503 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
18504 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
18505 (x86_64-*-linux*): Likewise.
18506
18507 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
18508 (init_registers_amd64_linux): New.
18509 (x86_arch_setup): Replace init_registers_x86_64_linux with
18510 init_registers_amd64_linux.
18511
18512 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
18513
18514 * configure.ac: Check for libdl. If it is not available link against
18515 static libthread_db.
18516 * configure: Regenerate.
18517
18518 2010-02-22 Pedro Alves <pedro@codesourcery.com>
18519
18520 PR9605
18521
18522 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
18523 handing a read watchpoint.
18524 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
18525
18526 2010-02-12 Doug Evans <dje@google.com>
18527
18528 * linux-low.c (linux_supports_tracefork_flag): Document.
18529 (linux_look_up_symbols): Add comment.
18530
18531 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
18532
18533 * regcache.c (supply_register): Clear regcache if buf is NULL.
18534
18535 2010-02-02 Nicolas Roche <roche@sourceware.org>
18536 Joel Brobecker <brobecker@adacore.com>
18537
18538 * inferiors.c (find_inferior): Add function documentation.
18539 (unloaded_dll): Handle the case where the unloaded dll has not
18540 been previously registered in the dll list.
18541
18542 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18543
18544 * linux-arm-low.c (thumb_breakpoint_len): Delete.
18545 (thumb2_breakpoint): New.
18546 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
18547
18548 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18549
18550 * linux-low.c (get_stop_pc): Check for SIGTRAP.
18551 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
18552 breakpoints.
18553
18554 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18555
18556 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
18557
18558 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
18559
18560 * linux-s390-low.c (s390_collect_ptrace_register)
18561 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
18562
18563 2010-01-21 Doug Evans <dje@google.com>
18564
18565 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
18566 (PTRACE_ARG4_TYPE): New macro.
18567 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
18568 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
18569 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
18570 (usr_store_inferior_registers): Ditto.
18571 (linux_read_memory, linux_write_memory): Ditto.
18572 (linux_test_for_tracefork): Ditto.
18573
18574 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
18575 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
18576
18577 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18578
18579 * proc-service.c (ps_lgetregs): Don't refetch registers from the
18580 target.
18581
18582 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18583
18584 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
18585 prototype to take a regcache. Adjust.
18586
18587 2010-01-20 Pedro Alves <pedro@codesourcery.com>
18588
18589 * regcache.h (struct thread_info): Forward declare.
18590 (struct regcache): New.
18591 (new_register_cache): Adjust prototype.
18592 (get_thread_regcache): Declare.
18593 (free_register_cache): Adjust prototype.
18594 (registers_to_string, registers_from_string): Ditto.
18595 (supply_register, supply_register_by_name, collect_register)
18596 (collect_register_as_string, collect_register_by_name): Ditto.
18597 * regcache.c (struct inferior_regcache_data): Delete.
18598 (get_regcache): Rename to ...
18599 (get_thread_regcache): ... this. Adjust. Switch inferior before
18600 fetching registers.
18601 (regcache_invalidate_one): Adjust.
18602 (regcache_invalidate): Fix prototype.
18603 (new_register_cache): Return the new register cache.
18604 (free_register_cache): Change prototype.
18605 (realloc_register_cache): Adjust.
18606 (registers_to_string): Change prototype to take a regcache. Adjust.
18607 (registers_from_string): Ditto.
18608 (register_data): Ditto.
18609 (supply_register): Ditto.
18610 (supply_register_by_name): Ditto.
18611 (collect_register): Ditto.
18612 (collect_register_as_string): Ditto.
18613 (collect_register_by_name): Ditto.
18614 * server.c (process_serial_event): Adjust.
18615 * linux-low.h (regset_fill_func, regset_store_func): Change
18616 prototype.
18617 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
18618 Change prototype.
18619 * linux-low.c (get_stop_pc): Adjust.
18620 (check_removed_breakpoint): Adjust.
18621 (linux_wait_for_event): Adjust.
18622 (linux_resume_one_lwp): Adjust.
18623 (fetch_register): Add regcache parameter. Adjust.
18624 (usr_store_inferior_registers): Ditto.
18625 (regsets_fetch_inferior_registers): Ditto.
18626 (regsets_store_inferior_registers): Ditto.
18627 (linux_fetch_registers, linux_store_registers): Ditto.
18628 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
18629 regcache. Adjust.
18630 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
18631 Ditto.
18632 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
18633 prototype to take a regcache.
18634 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
18635 * remote-utils.c (convert_ascii_to_int, outreg)
18636 (prepare_resume_reply): Change prototype to take a regcache.
18637 Adjust.
18638 * target.h (struct target_ops) <fetch_registers, store_registers>:
18639 Change prototype to take a regcache.
18640 (fetch_inferior_registers, store_inferior_registers): Change
18641 prototype to take a regcache. Adjust.
18642 * proc-service.c (ps_lgetregs): Adjust.
18643 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
18644 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
18645 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
18646 take a regcache. Adjust.
18647 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
18648 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
18649 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
18650 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
18651 * linux-cris-low.c (cris_get_pc, cris_set_pc)
18652 (cris_cannot_fetch_register):
18653 (cris_breakpoint_at): Change prototype to take a regcache.
18654 Adjust.
18655 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
18656 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
18657 to take a regcache. Adjust.
18658 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
18659 Adjust.
18660 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
18661 take a regcache. Adjust.
18662 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
18663 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
18664 (m68k_set_pc): Change prototype to take a regcache. Adjust.
18665 * linux-mips-low.c (mips_get_pc):
18666 (mips_set_pc): Change prototype to take a regcache. Adjust.
18667 (mips_reinsert_addr): Adjust.
18668 (mips_collect_register): Change prototype to take a regcache.
18669 Adjust.
18670 (mips_supply_register):
18671 (mips_collect_register_32bit, mips_supply_register_32bit)
18672 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18673 (mips_store_fpregset): Ditto.
18674 * linux-ppc-low.c (ppc_supply_ptrace_register)
18675 (ppc_supply_ptrace_register): Ditto.
18676 (parse_spufs_run): Adjust.
18677 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
18678 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
18679 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
18680 take a regcache. Adjust.
18681 * linux-s390-low.c (s390_collect_ptrace_register)
18682 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
18683 (s390_set_pc): Change prototype to take a regcache. Adjust.
18684 (s390_arch_setup): Adjust.
18685 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
18686 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
18687 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
18688 (sparc_fill_gregset, sparc_store_gregset_from_stack)
18689 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
18690 regcache. Adjust.
18691 (sparc_breakpoint_at): Adjust.
18692 * linux-xtensa-low.c (xtensa_fill_gregset):
18693 (xtensa_store_gregset):
18694 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
18695 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
18696 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
18697 prototype to take a regcache. Adjust.
18698 * win32-arm-low.c (arm_fetch_inferior_register)
18699 (arm_store_inferior_register): Change prototype to take a
18700 regcache. Adjust.
18701 * win32-i386-low.c (i386_fetch_inferior_register)
18702 (i386_store_inferior_register): Change prototype to take a
18703 regcache. Adjust.
18704 * win32-low.c (child_fetch_inferior_registers)
18705 (child_store_inferior_registers): Change prototype to take a
18706 regcache. Adjust.
18707 (win32_wait): Adjust.
18708 (win32_fetch_inferior_registers): Change prototype to take a
18709 regcache. Adjust.
18710 (win32_store_inferior_registers): Adjust.
18711 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
18712 store_inferior_register>: Change prototype to take a regcache.
18713
18714 2010-01-20 Doug Evans <dje@google.com>
18715
18716 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
18717 #ifdef.
18718 (linux_wait_for_event1, linux_init_signals): Ditto.
18719 (W_STOPCODE): Provide definition if missing.
18720
18721 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
18722
18723 * linux-low.c (linux_core_of_thread): New.
18724 (compare_ints, show_process, list_threads): New.
18725 (linux_qxfer_osdata): Report threads and cores.
18726 (linux_target_op): Register linux_core_of_thread.
18727 * remote-utils.c (prepare_resume_reply): Report the core.
18728 (buffer_xml_printf): Support %d specifier.
18729 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
18730 New.
18731 (handle_query): Handle qXfer:threads. Announce availability
18732 thereof.
18733 * target.h (struct target_ops): New field core_of_thread.
18734
18735 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
18736
18737 * Makefile.in (clean): Remove new generated files.
18738 (reg-s390.o, reg-s390.c): Remove rules.
18739 (reg-s390x.o, reg-s390x.c): Likewise.
18740 (s390-linux32.o, s390-linux32.c): Add rules.
18741 (s390-linux64.o, s390-linux64.c): Likewise.
18742 (s390x-linux64.o, s390x-linux64.c): Likewise.
18743 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
18744 * linux-s390-low.c: Include <elf.h>.
18745 (HWCAP_S390_HIGH_GPRS): Define if undefined.
18746 (init_registers_s390): Remove prototype.
18747 (init_registers_s390x): Likewise.
18748 (init_registers_s390_linux32): Add prototype.
18749 (init_registers_s390_linux64): Likewise.
18750 (init_registers_s390x_linux64): Likewise.
18751 (s390_num_regs_3264): New define.
18752 (s390_regmap_3264): New global variable.
18753 (s390_cannot_fetch_register): Remove obsolete check.
18754 (s390_cannot_store_register): Likewise.
18755 (s390_collect_ptrace_register): Handle upper/lower register halves.
18756 (s390_supply_ptrace_register): Likewise.
18757 (s390_fill_gregset): Update to register number changes.
18758 (s390_get_hwcap): New routine.
18759 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
18760 Install appropriate regmap and register set.
18761
18762 2010-01-01 Joel Brobecker <brobecker@adacore.com>
18763
18764 * server.c (gdbserver_version): Update copyright year to 2010.
18765 * gdbreplay.c (gdbreplay_version): Likewise.
18766
18767 2009-12-28 Doug Evans <dje@google.com>
18768
18769 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
18770 elf/external.h. Include <elf.h> instead but only if necessary.
18771
18772 2009-12-28 Pedro Alves <pedro@codesourcery.com>
18773
18774 * linux-low.c (linux_remove_process): Remove `detaching'
18775 parameter. Don't release/detach from thread_db here.
18776 (linux_kill): Release/detach from thread_db here, ...
18777 (linux_detach): ... and here, before actually detaching.
18778 (linux_wait_1): ... and here, when a process exits.
18779 * thread-db.c (any_thread_of): New.
18780 (thread_db_free): Switch the current inferior to a thread of the
18781 passed in process.
18782
18783 2009-12-21 Doug Evans <dje@google.com>
18784
18785 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
18786
18787 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
18788 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
18789 warning ifndef __NR_tkill. Move setting of errno there too.
18790 Delete unnecessary resetting of errno after syscall.
18791 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
18792
18793 * configure.ac: Check for dladdr.
18794 * config.in: Regenerate.
18795 * configure: Regenerate.
18796 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
18797 (try_thread_db_load): Update.
18798
18799 * linux-low.c (my_waitpid): Delete unnecessary prototype.
18800
18801 2009-12-18 Doug Evans <dje@google.com>
18802
18803 * event-loop.c: Include unistd.h if it exists.
18804
18805 * linux-low.c (my_waitpid): Move definition away from being in
18806 between linux_tracefork_child/linux_test_for_tracefork.
18807
18808 * gdb_proc_service.h (psaddr_t): Fix type.
18809 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
18810 signature to match glibc.
18811
18812 2009-12-16 Doug Evans <dje@google.com>
18813
18814 * linux-low.c (linux_read_memory): Fix argument to read.
18815
18816 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18817
18818 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
18819 events, don't leave current_inferior pointing at null.
18820
18821 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18822
18823 * win32-low.c (LOG): Delete.
18824 (OUTMSG): Output to stderr.
18825 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
18826 on compile time LOG macro.
18827 (win32_wait): Fix debug output.
18828
18829 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18830
18831 * win32-low.c (win32_add_one_solib): If the dll name is
18832 "ntdll.dll", prepend the system directory to the dll path.
18833
18834 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
18835
18836 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
18837
18838 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
18839 Vladimir Prus <vladimir@codesourcery.com>
18840
18841 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
18842 * configure.ac: Check for __mcoldfire__ and set
18843 gdb_cv_m68k_is_coldfire.
18844 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
18845 reg-cf.o and reg-m68k.o.
18846 * configure: Regenerated.
18847
18848 2009-11-16 Pedro Alves <pedro@codesourcery.com>
18849
18850 * linux-low.c (linux_remove_process): Add `detaching' parameter.
18851 Pass it to thread_db_free.
18852 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
18853 proper `detaching' argument to linux_remove_process.
18854 * linux-low.h (thread_db_free): Add `detaching' parameter.
18855 * thread-db.c (thread_db_init): Pass false as `detaching' argument
18856 to thread_db_free.
18857 (thread_db_free): Add `detaching' parameter. Only
18858 call td_ta_clear_event if detaching from process.
18859
18860 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
18861
18862 * thread-db.c (thread_db_free): Fix typo.
18863
18864 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
18865
18866 PR gdb/10838
18867 * thread-db.c (thread_db_free): Call td_ta_clear_event.
18868
18869 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
18870
18871 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
18872 with an i686 compiler.
18873 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
18874 needed.
18875 * configure: Rebuilt.
18876
18877 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
18878
18879 PR gdb/10783
18880
18881 * server.c (handle_search_memory_1): Correct read_addr initialization
18882 in loop for searching subsequent chunks.
18883
18884 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
18885
18886 * configure.ac: New --with-libthread-db option.
18887 * thread-db.c: Allow direct dependence on libthread_db.
18888 (thread_db_free): Adjust.
18889 * config.in: Regenerate.
18890 * configure: Likewise.
18891
18892 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
18893
18894 PR gdb/10757
18895 * thread-db.c (attach_thread): New function.
18896 (maybe_attach_thread): Return success/failure.
18897 (find_new_threads_callback): Adjust.
18898 (thread_db_find_new_threads): Loop until no new threads.
18899
18900 2009-10-13 Pedro Alves <pedro@codesourcery.com>
18901
18902 * proc-service.c (ps_lgetregs): Formatting.
18903
18904 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
18905
18906 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
18907 * configure.ac: Adjust.
18908 * linux-low.h (struct process_info_private): Move members to struct
18909 thread_db.
18910 (thread_db_free, thread_db_handle_monitor_command): New prototype.
18911 * linux-low.c (linux_remove_process): Adjust.
18912 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
18913 * server.c (handle_query): Move code ...
18914 (handle_monitor_command): ... here. New function.
18915 * target.h (struct target_ops): New member.
18916 * thread-db.c (struct thread_db): New.
18917 (libthread_db_search_path): New variable.
18918 (thread_db_create_event, thread_db_enable_reporting)
18919 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
18920 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
18921 (try_thread_db_load_1, dladdr_to_soname): New functions.
18922 (try_thread_db_load, thread_db_load_search): New functions.
18923 (thread_db_init): Search for libthread_db.
18924 (thread_db_free): New function.
18925 (thread_db_handle_monitor_command): Likewise.
18926 * config.in: Regenerate.
18927 * configure: Regenerate.
18928
18929 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
18930
18931 * spu-low.c (spu_kill): Wait for inferior to terminate.
18932 Call clear_inferiors.
18933 (spu_detach): Call clear_inferiors.
18934
18935 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18936
18937 * aclocal.m4: Regenerate.
18938 * config.in: Likewise.
18939 * configure: Likewise.
18940
18941 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18942
18943 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
18944 (parse_spufs_run): New function.
18945 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
18946 (ppc_breakpoint_at): Handle SPU breakpoints.
18947
18948 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18949
18950 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
18951 (SPUFS_MAGIC): Define.
18952 (spu_enumerate_spu_ids): New function.
18953 (linux_qxfer_spu): New function.
18954 (linux_target_ops): Install linux_qxfer_spu.
18955
18956 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
18957
18958 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
18959 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
18960 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
18961 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
18962 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
18963 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
18964 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
18965 (init_registers_powerpc_cell32l): Add prototype.
18966 (init_registers_powerpc_cell64l): Likewise.
18967 (ppc_arch_setup): Detect Cell/B.E. architecture.
18968
18969 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
18970
18971 * Makefile.in (datarootdir): New variable.
18972
18973 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18974
18975 * linux-low.c (linux_write_memory): Update debugging output.
18976 * Makefile.in (clean): Add new descriptions.
18977 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
18978 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
18979 * configure.srv: Add new files for arm*-*-linux*.
18980 * linux-arm-low.c: Add new declarations.
18981 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
18982 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
18983 (HWCAP_VFPv3D16): New.
18984 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
18985 instead of __IWMMXT__.
18986 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
18987 (arm_arch_setup): New.
18988 (target_regsets): Remove #ifdef. Add VFP regset.
18989 (the_low_target): Use arm_arch_setup.
18990
18991 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
18992
18993 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
18994 the main thread again.
18995
18996 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
18997
18998 Adding Neutrino gdbserver.
18999 * configure: Regenerated.
19000 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
19001 * configure.srv (i[34567]86-*-nto*): New target.
19002 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
19003 * remote-utils.c [__QNX__]: Include sys/iomgr.h
19004 (nto_comctrl) [__QNX__]: New function.
19005 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
19006
19007 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
19008
19009 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
19010 srv_tgtobj.
19011
19012 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
19013 Pedro Alves <pedro@codesourcery.com>
19014
19015 * win32-i386-low.c (i386_get_thread_context): Handle systems that
19016 don't support CONTEXT_EXTENDED_REGISTERS.
19017 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
19018 (the_low_target): Install them.
19019 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
19020 failing with ERROR_PIPE_NOT_CONNECTED.
19021
19022 2009-06-30 Doug Evans <dje@google.com>
19023 Pierre Muller <muller@ics.u-strasbg.fr>
19024
19025 Add h/w watchpoint support to x86-linux, win32-i386.
19026 * Makefile.in (SFILES): Add i386-low.c
19027 (i386_low_h): Define.
19028 (i386-low.o): Add dependencies.
19029 (linux-x86-low.o): Add i386-low.h dependency.
19030 (win32-i386-low.o): Ditto.
19031 * i386-low.c: New file.
19032 * i386-low.h: New file.
19033 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
19034 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
19035 * linux-low.c (linux_add_process): Initialize arch_private.
19036 (linux_remove_process): Free arch_private.
19037 (add_lwp): Initialize arch_private.
19038 (delete_lwp): Free arch_private.
19039 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
19040 provided.
19041 * linux-low.h (process_info_private): New member arch_private.
19042 (lwp_info): New member arch_private.
19043 (linux_target_ops): New members new_process, new_thread,
19044 prepare_to_resume.
19045 (ptid_of): New macro.
19046 * linux-x86-low.c: Include stddef.h, i386-low.h.
19047 (arch_process_info): New struct.
19048 (arch_lwp_info): New struct.
19049 (x86_linux_dr_get, x86_linux_dr_set): New functions.
19050 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
19051 (i386_dr_low_get_status): New function.
19052 (x86_insert_point, x86_remove_point): New functions.
19053 (x86_stopped_by_watchpoint): New function.
19054 (x86_stopped_data_address): New function.
19055 (x86_linux_new_process, x86_linux_new_thread): New functions.
19056 (x86_linux_prepare_to_resume): New function.
19057 (the_low_target): Add entries for insert_point, remove_point,
19058 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
19059 prepare_to_resume.
19060 * server.c (debug_hw_points): New global.
19061 (monitor_show_help): Document set debug-hw-points.
19062 (handle_query): Process "set debug-hw-points".
19063 * server.h (debug_hw_points): Declare.
19064 (paddress): Declare.
19065 * utils.c (NUMCELLS, CELLSIZE): New macros.
19066 (get_sell, xsnprintf, paddress): New functions.
19067 * win32-arm-low.c (the_low_target): Add entries for insert_point,
19068 remove_point, stopped_by_watchpoint, stopped_data_address.
19069 * win32-i386-low.c: Include i386-low.h.
19070 (debug_reg_state): Replaces dr.
19071 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
19072 (i386_dr_low_get_status): New function.
19073 (i386_insert_point, i386_remove_point): New functions.
19074 (i386_stopped_by_watchpoint): New function.
19075 (i386_stopped_data_address): New function.
19076 (i386_initial_stuff): Update.
19077 (get_thread_context,set_thread_context,i386_thread_added): Update.
19078 (the_low_target): Add entries for insert_point,
19079 remove_point, stopped_by_watchpoint, stopped_data_address.
19080 * win32-low.c (win32_insert_watchpoint): New function.
19081 (win32_remove_watchpoint): New function.
19082 (win32_stopped_by_watchpoint): New function.
19083 (win32_stopped_data_address): New function.
19084 (win32_target_ops): Add entries for insert_watchpoint,
19085 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
19086 * win32-low.h (win32_target_ops): New members insert_point,
19087 remove_point, stopped_by_watchpoint, stopped_data_address.
19088
19089 2009-06-25 Pedro Alves <pedro@codesourcery.com>
19090
19091 * server.c (process_serial_event): Re-return unsupported, not
19092 error, if the type isn't recognized. Re-allow supporting only
19093 insert or remove packets. Also call require_running for
19094 breakpoints. Add missing break statement to default case. Tidy.
19095 * target.h (struct target_ops): Rename insert_watchpoint to
19096 insert_point, and remove_watchpoint to remove_point.
19097
19098 * linux-low.h (struct linux_target_ops): Likewise.
19099 * linux-low.c (linux_insert_watchpoint): Rename to ...
19100 (linux_insert_point): ... this. Adjust.
19101 (linux_remove_watchpoint): Rename to ...
19102 (linux_remove_point): ... this. Adjust.
19103 (linux_target_ops): Adjust.
19104 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
19105 (cris_insert_point): ... this.
19106 (cris_remove_watchpoint): Rename to ...
19107 (cris_remove_point): ... this.
19108 (the_low_target): Adjust.
19109
19110 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
19111
19112 * server.c (handle_v_kill): Pass signal_pid to
19113 kill_inferior if multi_process is zero.
19114
19115 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
19116
19117 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
19118 * target.h (target_ops): Comment for *_watchpoint to make it clear
19119 the functions can get types '0' and '1'.
19120
19121 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
19122
19123 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
19124 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
19125 * regcache.c (get_regcache): Likewise.
19126 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
19127 * win32-low.c (child_fetch_inferior_registers): Remove check for
19128 regno 0.
19129
19130 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
19131 Pedro Alves <pedro@codesourcery.com>
19132
19133 * target.h (struct target_ops) <supports_multi_process>: New
19134 callback.
19135 (target_supports_multi_process): New.
19136 * server.c (handle_query): Even if GDB reports support, only
19137 enable multi-process if the target also supports it. Report
19138 multi-process support only if the target backend supports it.
19139 * linux-low.c (linux_supports_multi_process): New function.
19140 (linux_target_ops): Install it as target_supports_multi_process
19141 callback.
19142
19143 2009-05-24 Doug Evans <dje@google.com>
19144
19145 Global renaming of find_thread_pid to find_thread_ptid.
19146 * server.h (find_thread_ptid): Renamed from find_thread_pid.
19147 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
19148 All callers updated.
19149
19150 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
19151 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
19152 directly.
19153
19154 * linux-low.c (get_stop_pc): Print pc if debug_threads.
19155 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
19156 (linux_resume_one_lwp): Ditto.
19157
19158 2009-05-23 Doug Evans <dje@google.com>
19159
19160 * linux-low.c (linux_resume_one_lwp): Change type of first arg
19161 from struct inferior_list_entry * to struct lwp_info *.
19162 All callers updated.
19163
19164 2009-05-13 Doug Evans <dje@google.com>
19165
19166 * linux-x86-low.c: Don't include assert.h.
19167 (x86_siginfo_fixup): Use fatal, not assert.
19168 (x86_arch_setup): Fix comment.
19169
19170 2009-05-12 Doug Evans <dje@google.com>
19171
19172 Biarch support for i386/amd64 gdbserver.
19173 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
19174 Add linux-x86-low.c.
19175 (linux-i386-low.o, linux-x86-64-low.o): Delete.
19176 (linux-x86-low.o): Add.
19177 * linux-x86-64-low.c: Delete.
19178 * linux-i386-low.c: Delete.
19179 * linux-x86-low.c: New file.
19180 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
19181 linux-x86-low.o.
19182 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
19183 linux-x86-low.o.
19184 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
19185 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
19186 (linux_child_pid_to_exec_file): New function.
19187 (elf_64_header_p, elf_64_file_p): New functions.
19188 (siginfo_fixup): New function.
19189 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
19190 give target a chance to convert layout.
19191 * linux-low.h (linux_target_ops): New member siginfo_fixup.
19192 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
19193
19194 2009-05-07 Doug Evans <dje@google.com>
19195
19196 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
19197 (regsets_store_inferior_registers): Ditto.
19198
19199 2009-05-06 Pedro Alves <pedro@codesourcery.com>
19200
19201 PR server/10048
19202
19203 * linux-low.c (must_set_ptrace_flags): Delete.
19204 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
19205 of the global.
19206 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
19207 `lwp->must_set_ptrace_flags' instead.
19208 (linux_wait_for_event_1): Set ptrace options here.
19209 (linux_wait_1): ... not here.
19210
19211 2009-04-30 Doug Evans <dje@google.com>
19212
19213 * inferiors.c (started_inferior_callback): New function.
19214 (attached_inferior_callback): New function.
19215 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
19216 * server.c (print_started_pid, print_attached_pid): New functions.
19217 (detach_or_kill_for_exit): New function.
19218 (main): Call it instead of for_each_inferior (kill_inferior_callback).
19219 * server.h (have_started_inferiors_p): Declare.
19220 (have_attached_inferiors_p): Declare.
19221
19222 * inferiors.c (remove_process): Fix memory leak, free process.
19223 * linux-low.c (linux_remove_process): New function.
19224 (linux_kill): Call it instead of remove_process.
19225 (linux_detach, linux_wait_1): Ditto.
19226
19227 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
19228
19229 * configure.srv: Add x86 Windows CE target.
19230
19231 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
19232
19233 * inferiors.c (get_thread_process): Make global.
19234 * server.h (get_thread_process): Add prototype.
19235 * thread-db.c (find_one_thread): Use get_thread_process
19236 instead of current_process.
19237 (thread_db_get_tls_address): Do not crash if called when
19238 thread layer is not yet initialized.
19239
19240 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
19241
19242 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
19243 * spu-low.c (current_tid): Rename to ...
19244 (current_ptid): ... this.
19245 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
19246 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
19247 ptid_get_lwp (current_ptid) instead of current_tid.
19248 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
19249 instead of current_tid. Use find_process_pid to verify pid
19250 argument is valid. Pass proper argument to remove_process.
19251 (spu_thread_alive): Compare current_ptid instead of current_tid.
19252 (spu_resume): Likewise.
19253
19254 2009-04-02 Pedro Alves <pedro@codesourcery.com>
19255
19256 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
19257 variable.
19258
19259 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19260
19261 Implement the multiprocess extensions, and add linux multiprocess
19262 support.
19263
19264 * server.h (ULONGEST): Declare.
19265 (struct ptid, ptid_t): New.
19266 (minus_one_ptid, null_ptid): Declare.
19267 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
19268 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
19269 (struct inferior_list_entry): Change `id' type from unsigned from
19270 to ptid_t.
19271 (struct sym_cache, struct breakpoint, struct
19272 process_info_private): Forward declare.
19273 (struct process_info): Declare.
19274 (current_process): Declare.
19275 (all_processes): Declare.
19276 (initialize_inferiors): Declare.
19277 (add_thread): Adjust to use ptid_t.
19278 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
19279 (add_process, remove_process, find_thread_pid): Declare.
19280 (find_inferior_id): Adjust to use ptid_t.
19281 (cont_thread, general_thread, step_thread): Change type to ptid_t.
19282 (multi_process): Declare.
19283 (push_event): Adjust to use ptid_t.
19284 (read_ptid, write_ptid): Declare.
19285 (prepare_resume_reply): Adjust to use ptid_t.
19286 (clear_symbol_cache): Declare.
19287 * inferiors.c (all_processes): New.
19288 (null_ptid, minus_one_ptid): New.
19289 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
19290 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
19291 (add_thread): Change unsigned long to ptid. Remove gdb_id
19292 parameter. Adjust.
19293 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
19294 (gdb_id_to_thread): Rename to ...
19295 (find_thread_pid): ... this. Change unsigned long to ptid.
19296 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
19297 (loaded_dll, pull_pid_from_list): Adjust.
19298 (add_process, remove_process, find_process_pid)
19299 (get_thread_process, current_process, initialize_inferiors): New.
19300 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
19301 (struct target_waitstatus) <related_pid>: Ditto.
19302 (struct target_ops) <kill, detach>: Add `pid' argument. Change
19303 return type to int.
19304 (struct target_ops) <join>: Add `pid' argument.
19305 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
19306 (struct target_ops) <wait>: Add `ptid' field. Change return type
19307 to ptid.
19308 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
19309 (mywait): Add `ptid' argument. Change return type to ptid_t.
19310 (target_pid_to_str): Declare.
19311 * target.c (set_desired_inferior): Adjust to use ptids.
19312 (mywait): Add new `ptid' argument. Adjust.
19313 (target_pid_to_str): New.
19314 * mem-break.h (free_all_breakpoints): Declare.
19315 * mem-break.c (breakpoints): Delelete.
19316 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
19317 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
19318 to use per-process breakpoint list.
19319 (free_all_breakpoints): New.
19320 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
19321 (symbol_cache, all_symbols_looked_up): Delete.
19322 (hexchars): New.
19323 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
19324 read_ptid): New.
19325 (prepare_resume_reply): Change ptid argument's type from unsigned
19326 long to ptid_t. Adjust. Implement W;process and X;process.
19327 (free_sym_cache, clear_symbol_cache): New.
19328 (look_up_one_symbol): Adjust to per-process symbol cache. *
19329 * server.c (cont_thread, general_thread, step_thread): Change type
19330 to ptid_t.
19331 (attached): Delete.
19332 (multi_process): New.
19333 (last_ptid): Change type to ptid_t.
19334 (struct vstop_notif) <ptid>: Change type to ptid_t.
19335 (queue_stop_reply, push_event): Change `ptid' argument's type to
19336 ptid_t.
19337 (discard_queued_stop_replies): Add `pid' argument.
19338 (start_inferior): Adjust to use ptids. Adjust to mywait interface
19339 changes. Don't reference the `attached' global.
19340 (attach_inferior): Adjust to mywait interface changes.
19341 (handle_query): Adjust to use ptids. Parse GDB's qSupported
19342 features. Handle and report "multiprocess+". Handle
19343 "qAttached:PID".
19344 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
19345 changes.
19346 (handle_v_kill): New.
19347 (handle_v_stopped): Adjust to use target_pid_to_str.
19348 (handle_v_requests): Allow multiple attaches and runs when
19349 multiprocess extensions are in effect. Handle "vKill".
19350 (myresume): Adjust to use ptids.
19351 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
19352 (handle_status): Adjust to discard_queued_stop_replies interface
19353 change.
19354 (first_thread_of, kill_inferior_callback)
19355 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
19356 (main): Call initialize_inferiors. Adjust to use ptids, killing
19357 and detaching from all inferiors. Handle multiprocess packet
19358 variants.
19359 * linux-low.h: Include gdb_proc_service.h.
19360 (struct process_info_private): New.
19361 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
19362 <lwpid_of>: Use ptid_get_lwp.
19363 (get_lwp_thread): Adjust.
19364 (struct lwp_info): Add `dead' member.
19365 (find_lwp_pid): Declare.
19366 * linux-low.c (thread_db_active): Delete.
19367 (new_inferior): Adjust comment.
19368 (inferior_pid): Delete.
19369 (linux_add_process): New.
19370 (handle_extended_wait): Adjust.
19371 (add_lwp): Change unsigned long to ptid.
19372 (linux_create_inferior): Add process to processes table. Adjust
19373 to use ptids. Don't set new_inferior here.
19374 (linux_attach_lwp): Rename to ...
19375 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
19376 it. Adjust to use ptids.
19377 (linux_attach_lwp): New.
19378 (linux_attach): Add process to processes table. Don't set
19379 new_inferior here.
19380 (struct counter): New.
19381 (second_thread_of_pid_p, last_thread_of_process_p): New.
19382 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
19383 multiple processes.
19384 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
19385 processes. Remove process from process table.
19386 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
19387 to multiple processes.
19388 (any_thread_of): New.
19389 (linux_detach): Add `pid' argument, and handle it. Remove process
19390 from processes table.
19391 (linux_join): Add `pid' argument. Handle it.
19392 (linux_thread_alive): Change unsighed long argument to ptid_t.
19393 Consider dead lwps as not being alive.
19394 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
19395 threads we're not interested in.
19396 (same_lwp, find_lwp_pid): New.
19397 (linux_wait_for_lwp): Change `pid' argument's type from int to
19398 ptid_t. Adjust.
19399 (linux_wait_for_event): Rename to ...
19400 (linux_wait_for_event_1): ... this. Change `pid' argument's type
19401 from int to ptid_t. Adjust.
19402 (linux_wait_for_event): New.
19403 (linux_wait_1): Add `ptid' argument. Change return type to
19404 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
19405 that exit from the process table.
19406 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
19407 Adjust.
19408 (mark_lwp_dead): New.
19409 (wait_for_sigstop): Adjust to use ptids. If a process exits while
19410 stopping all threads, mark its main lwp as dead.
19411 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
19412 ptids.
19413 (fetch_register, usr_store_inferior_registers)
19414 (regsets_fetch_inferior_registers)
19415 (regsets_store_inferior_registers, linux_read_memory)
19416 (linux_write_memory): Inline `inferior_pid'.
19417 (linux_look_up_symbols): Adjust to use per-process
19418 `thread_db_active'.
19419 (linux_request_interrupt): Adjust to use ptids.
19420 (linux_read_auxv): Inline `inferior_pid'.
19421 (initialize_low): Don't reference thread_db_active.
19422 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
19423 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
19424 (ps_getpid): Return the pid of the current inferior.
19425 * thread-db.c (proc_handle, thread_agent): Delete.
19426 (thread_db_create_event, thread_db_enable_reporting): Adjust to
19427 per-process data.
19428 (find_one_thread): Change argument type to ptid_t. Adjust to
19429 per-process data.
19430 (maybe_attach_thread): Adjust to per-process data and ptids.
19431 (thread_db_find_new_threads): Ditto.
19432 (thread_db_init): Ditto.
19433 * spu-low.c (spu_create_inferior, spu_attach): Add process to
19434 processes table. Adjust to use ptids.
19435 (spu_kill, spu_detach): Adjust interface. Remove process from
19436 processes table.
19437 (spu_join, spu_thread_alive): Adjust interface.
19438 (spu_wait): Adjust interface. Remove process from processes
19439 table. Adjust to use ptids.
19440 * win32-low.c (current_inferior_tid): Delete.
19441 (current_inferior_ptid): New.
19442 (debug_event_ptid): New.
19443 (thread_rec): Take a ptid. Adjust.
19444 (child_add_thread): Add `pid' argument. Adjust to use ptids.
19445 (child_delete_thread): Ditto.
19446 (do_initial_child_stuff): Add `attached' argument. Add process to
19447 processes table.
19448 (child_fetch_inferior_registers, child_store_inferior_registers):
19449 Adjust.
19450 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
19451 (win32_attach): Pass 1 to do_initial_child_stuff.
19452 (win32_kill): Adjust interface. Remove process from processes
19453 table.
19454 (win32_detach): Ditto.
19455 (win32_join): Adjust interface.
19456 (win32_thread_alive): Take a ptid.
19457 (win32_resume): Adjust to use ptids.
19458 (get_child_debug_event): Ditto.
19459 (win32_wait): Adjust interface. Remove exiting process from
19460 processes table.
19461
19462 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19463
19464 Non-stop mode support.
19465
19466 * server.h (non_stop): Declare.
19467 (gdb_client_data, handler_func): Declare.
19468 (delete_file_handler, add_file_handler, start_event_loop):
19469 Declare.
19470 (handle_serial_event, handle_target_event, push_event)
19471 (putpkt_notif): Declare.
19472 * target.h (enum resume_kind): New.
19473 (struct thread_resume): Replace `step' field by `kind' field.
19474 (TARGET_WNOHANG): Define.
19475 (struct target_ops) <wait>: Add `options' argument.
19476 <supports_non_stop, async, start_non_stop>: New fields.
19477 (target_supports_non_stop, target_async): New.
19478 (start_non_stop): Declare.
19479 (mywait): Add `options' argument.
19480 * target.c (mywait): Add `options' argument. Print child exit
19481 notifications here.
19482 (start_non_stop): New.
19483 * server.c (non_stop, own_buf, mem_buf): New globals.
19484 (struct vstop_notif): New.
19485 (notif_queue): New global.
19486 (queue_stop_reply, push_event, discard_queued_stop_replies)
19487 (send_next_stop_reply): New.
19488 (start_inferior): Adjust to use resume_kind. Adjust to mywait
19489 interface changes.
19490 (attach_inferior): In non-stop mode, don't wait for the target
19491 here.
19492 (handle_general_set): Handle QNonStop.
19493 (handle_query): When handling qC, return the current general
19494 thread, instead of the first thread of the list.
19495 (handle_query): If the backend supports non-stop mode, include
19496 QNonStop+ in the qSupported query response.
19497 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
19498 and non-stop mode.
19499 (handle_v_attach, handle_v_run): Handle non-stop mode.
19500 (handle_v_stopped): New.
19501 (handle_v_requests): Report support for vCont;t. Handle vStopped.
19502 (myresume): Adjust to use resume_kind. Handle non-stop.
19503 (queue_stop_reply_callback): New.
19504 (handle_status): Handle non-stop mode.
19505 (main): Clear non_stop flag on reconnection. Use the event-loop.
19506 Refactor serial protocol handling from here ...
19507 (process_serial_event): ... to this new function. When GDB
19508 selects any thread, select one here. In non-stop mode, wait until
19509 GDB acks all pending events before exiting.
19510 (handle_serial_event, handle_target_event): New.
19511 * remote-utils.c (remote_open): Install remote_desc in the event
19512 loop.
19513 (remote_close): Remove remote_desc from the event loop.
19514 (putpkt_binary): Rename to...
19515 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
19516 (putpkt_binary): New as wrapper around putpkt_binary_1.
19517 (putpkt_notif): New.
19518 (prepare_resume_reply): In non-stop mode, don't change the
19519 general_thread.
19520 * event-loop.c: New.
19521 * Makefile.in (OBJ): Add event-loop.o.
19522 (event-loop.o): New rule.
19523
19524 * linux-low.h (pid_of): Moved here.
19525 (lwpid_of): New.
19526 (get_lwp_thread): Use lwpid_of.
19527 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
19528 * linux-low.c (pid_of): Delete.
19529 (inferior_pid): Use lwpid_of.
19530 (linux_event_pipe): New.
19531 (target_is_async_p): New.
19532 (delete_lwp): New.
19533 (handle_extended_wait): Use lwpid_of.
19534 (add_lwp): Don't set lwpid field.
19535 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
19536 (linux_kill_one_lwp): If killing a running lwp, stop it first.
19537 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
19538 (linux_detach_one_lwp): If detaching from a running lwp, stop it
19539 first. Adjust to linux_wait_for_event interface changes. Use
19540 lwpid_of.
19541 (linux_detach): Don't delete the main lwp here.
19542 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
19543 (status_pending_p): Don't consider explicitly suspended lwps.
19544 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
19545 pointer. Add OPTIONS argument. Change return type to int. Use
19546 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
19547 (linux_wait_for_event): Take an integer pid instead of a lwp_info
19548 pointer. Add status pointer argument. Return a pid instead of a
19549 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
19550 changes. In non-stop mode, don't switch to a random thread.
19551 (linux_wait): Rename to...
19552 (linux_wait_1): ... this. Add target_options argument, and handle
19553 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
19554 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
19555 clean exit and signal exit code. Don't stop all threads in
19556 non-stop mode. In all-stop mode, only stop all threads when
19557 reporting a stop to GDB. Handle explicit thread stop requests.
19558 (async_file_flush, async_file_mark): New.
19559 (linux_wait): New.
19560 (send_sigstop): Use lwpid_of.
19561 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
19562 interface changes. In non-stop mode, don't switch to a random
19563 thread.
19564 (linux_resume_one_lwp): Use lwpid_of.
19565 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
19566 (linux_resume_one_thread): ... this. Handle resume_stop. In
19567 non-stop mode, don't look for pending flag in all threads.
19568 (resume_status_pending_p): Don't consider explicitly suspended
19569 threads.
19570 (my_waitpid): Reimplement. Emulate __WALL.
19571 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19572 Use lwpid_of.
19573 (sigchld_handler, linux_supports_non_stop, linux_async)
19574 (linux_start_non_stop): New.
19575 (linux_target_ops): Register linux_supports_non_stop, linux_async
19576 and linux_start_non_stop.
19577 (initialize_low): Install SIGCHLD handler.
19578 * thread-db.c (thread_db_create_event, find_one_thread)
19579 (thread_db_get_tls_address): Use lwpid_of.
19580 * win32-low.c (win32_detach): Adjust to use resume_kind.
19581 (win32_wait): Add `options' argument.
19582 * spu-low.c (spu_resume): Adjust to use resume_kind.
19583 (spu_wait): Add `options' argument.
19584
19585 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19586
19587 Decouple target code from remote protocol.
19588
19589 * target.h (enum target_waitkind): New.
19590 (struct target_waitstatus): New.
19591 (struct target_ops) <wait>: Return an unsigned long. Take a
19592 target_waitstatus pointer instead of a char pointer.
19593 (mywait): Likewise.
19594 * target.c (mywait): Change prototype to return an unsigned long.
19595 Take a target_waitstatus pointer instead of a char pointer. Adjust.
19596 * server.h (thread_from_wait, old_thread_from_wait): Delete
19597 declarations.
19598 (prepare_resume_reply): Change prototype to take a
19599 target_waitstatus.
19600 * server.c (thread_from_wait, old_thread_from_wait): Delete.
19601 (last_status, last_ptid): New.
19602 (start_inferior): Remove "statusptr" argument. Adjust. Return a
19603 pid instead of a signal.
19604 (attach_inferior): Remove "status" and "signal" parameters.
19605 Adjust.
19606 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
19607 not as an address.
19608 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
19609 (handle_v_requests, myresume): Remove "status" and "signal"
19610 parameters. Adjust.
19611 (handle_status): New.
19612 (main): Delete local `status'. Adjust.
19613 * remote-utils.c: Include target.h.
19614 (prepare_resume_reply): Change prototype to take a
19615 target_waitstatus. Adjust.
19616
19617 * linux-low.c (linux_wait): Adjust to new target_ops->wait
19618 interface.
19619 * spu-low.c (spu_wait): Adjust.
19620 * win32-low.c (enum target_waitkind, struct target_waitstatus):
19621 Delete.
19622 (win32_wait): Adjust.
19623
19624 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19625
19626 * target.h (struct thread_resume): Delete leave_stopped member.
19627 (struct target_ops): Add a `n' argument to the `resume' callback.
19628 * server.c (start_inferior): Adjust.
19629 (handle_v_cont, myresume): Adjust.
19630 * linux-low.c (check_removed_breakpoint): Adjust to resume
19631 interface change, and to removed leave_stopped field.
19632 (resume_ptr): Delete.
19633 (struct thread_resume_array): New.
19634 (linux_set_resume_request): Add new `arg' parameter. Adjust to
19635 resume interface change.
19636 (linux_continue_one_thread, linux_queue_one_thread)
19637 (resume_status_pending_p): Check if the resume field is NULL
19638 instead of checking the leave_stopped member.
19639 (linux_resume): Adjust to the target resume interface change.
19640 * spu-low.c (spu_resume): Adjust to the target resume interface
19641 change.
19642 * win32-low.c (win32_detach, win32_resume): Ditto.
19643
19644 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19645
19646 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
19647 flag.
19648 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
19649 pending.
19650 (linux_continue_one_thread): Only preserve the stepping flag if
19651 there's a pending breakpoint.
19652
19653 2009-03-31 Pedro Alves <pedro@codesourcery.com>
19654
19655 * server.c (main): After the inferior having exited, call
19656 remote_close before exiting gdbserver.
19657
19658 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
19659
19660 Fix size of FPSCR in Power 7 processors.
19661 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
19662 (PPC_FEATURE_HAS_DFP): New #define.
19663 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
19664 size of the FPSCR.
19665
19666 2009-03-23 Pedro Alves <pedro@codesourcery.com>
19667
19668 * server.c (handle_query) Whitespace and formatting.
19669
19670 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19671
19672 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
19673 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
19674 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
19675 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
19676 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
19677 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
19678 Makefile.in, configure.ac: Fix whitespace throughout.
19679 * configure: Regenerate.
19680
19681 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19682
19683 * inferiors.c (find_inferior): Make it safe for the callback
19684 function to delete the currently iterated inferior.
19685
19686 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19687
19688 * Makefile.in (linuw_low_h): Move higher.
19689 (thread-db.o): Depend on $(linux_low_h).
19690
19691 2009-03-17 Pedro Alves <pedro@codesourcery.com>
19692
19693 Rename "process" to "lwp" throughout.
19694
19695 * linux-low.c (all_processes): Rename to...
19696 (all_lwps): ... this.
19697 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
19698 (add_process): Rename to ...
19699 (add_lwp): ... this. Adjust.
19700 (linux_create_inferior): Adjust.
19701 (linux_attach_lwp): Adjust.
19702 (linux_attach): Adjust.
19703 (linux_kill_one_process): Rename to ...
19704 (linux_kill_one_lwp): ... this. Adjust.
19705 (linux_kill): Adjust.
19706 (linux_detach_one_process): Rename to ...
19707 (linux_detach_one_lwp): ... this. Adjust.
19708 (linux_detach): Adjust.
19709 (check_removed_breakpoint): Adjust.
19710 (status_pending_p): Adjust.
19711 (linux_wait_for_process): Rename to ...
19712 (linux_wait_for_lwp): ... this. Adjust.
19713 (linux_wait_for_event): Adjust.
19714 (send_sigstop): Adjust.
19715 (wait_for_sigstop): Adjust.
19716 (stop_all_processes): Rename to ...
19717 (stop_all_lwps): ... this.
19718 (linux_resume_one_process): Rename to ...
19719 (linux_resume_one_lwp): ... this. Adjust.
19720 (linux_set_resume_request, linux_continue_one_thread)
19721 (linux_queue_one_thread, resume_status_pending_p)
19722 (usr_store_inferior_registers, regsets_store_inferior_registers)
19723 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19724 Adjust.
19725 * linux-low.h (get_process): Rename to ...
19726 (get_lwp): ... this. Adjust.
19727 (get_thread_process): Rename to ...
19728 (get_thread_lwp): ... this. Adjust.
19729 (get_process_thread): Rename to ...
19730 (get_lwp_thread): ... this. Adjust.
19731 (struct process_info): Rename to ...
19732 (struct lwp_info): ... this.
19733 (all_processes): Rename to ...
19734 (all_lwps): ... this.
19735 * proc-service.c (ps_lgetregs): Adjust.
19736 * thread-db.c (thread_db_create_event, find_one_thread)
19737 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
19738
19739 2009-03-14 Pedro Alves <pedro@codesourcery.com>
19740
19741 * server.c (handle_query): Handle "qAttached".
19742
19743 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
19744
19745 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
19746 GPLv3, update license URL.
19747
19748 2009-03-01 Doug Evans <dje@google.com>
19749
19750 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
19751 (server_h): Add gdb_signals.h.
19752 (signals.o): Update.
19753 * server.h (target_signal_from_host,target_signal_to_host_p)
19754 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
19755
19756 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
19757
19758 * remote-utils.c (getpkt): Also generate remote-debug
19759 information if noack_mode is set.
19760
19761 2009-02-06 Pedro Alves <pedro@codesourcery.com>
19762
19763 * server.c (handle_query): Report qXfer:siginfo:read and
19764 qXfer:siginfo:write as supported and handle them.
19765 * target.h (struct target_ops) <qxfer_siginfo>: New field.
19766 * linux-low.c (linux_xfer_siginfo): New.
19767 (linux_target_ops): Set it.
19768
19769 2009-01-26 Pedro Alves <pedro@codesourcery.com>
19770
19771 * server.c (gdbserver_usage): Mention --remote-debug.
19772 (main): Accept '--remote-debug' switch.
19773
19774 2009-01-18 Doug Evans <dje@google.com>
19775
19776 * regcache.c (new_register_cache): No need to check result of xcalloc.
19777 * server.c (handle_search_memory): Back out calls to xmalloc,
19778 result is checked and error is returned to user upon failure.
19779 (handle_query): Ditto. Add more checks for result of malloc.
19780 (handle_v_cont): Check result of malloc, report error back to
19781 user upon failure.
19782 (handle_v_run): Ditto. Call freeargv.
19783 * server.h (freeargv): Declare.
19784 * utils.c (freeargv): New fn.
19785
19786 2009-01-15 Doug Evans <dje@google.com>
19787
19788 * gdbreplay.c (perror_with_name): Make arg const char *.
19789 * server.h (target_signal_to_name): Make return type const char *.
19790 * thread-db.c (thread_db_err_str): Make return type const char *.
19791 * utils.c (perror_with_name): Make arg const char *.
19792
19793 2009-01-14 Pedro Alves <pedro@codesourcery.com>
19794
19795 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
19796 when handling a EXIT_PROCESS_DEBUG_EVENT.
19797
19798 2009-01-06 Joel Brobecker <brobecker@adacore.com>
19799
19800 * gdbreplay.c (gdbreplay_version): Update copyright year.
19801 * server.c (gdbserver_version): Likewise.
19802
19803 2009-01-05 Doug Evans <dje@google.com>
19804
19805 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
19806 (handle_extended_wait): Improve comment.
19807
19808 2008-12-13 Doug Evans <dje@google.com>
19809
19810 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
19811 * server.h (ATTR_MALLOC): New macro.
19812 (xmalloc,xcalloc,xstrdup): Declare.
19813 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
19814 * inferiors.c: Ditto.
19815 * linux-low.c: Ditto.
19816 * mem-break.c: Ditto.
19817 * regcache.c: Ditto.
19818 * remote-utils.c: Ditto.
19819 * server.c: Ditto.
19820 * target.c: Ditto.
19821 * win32-low.c: Ditto.
19822
19823 2008-12-12 Doug Evans <dje@google.com>
19824
19825 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
19826 in debugging printf.
19827
19828 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
19829
19830 2008-12-09 Doug Evans <dje@google.com>
19831
19832 * linux-low.h (struct process_info): Delete member tid, unused.
19833 * thread-db.c (find_one_thread): Update.
19834 (maybe_attach_thread): Update.
19835
19836 2008-12-02 Pedro Alves <pedro@codesourcery.com>
19837
19838 * target.h (struct target_ops): Add qxfer_osdata member.
19839 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
19840 and dirent.h.
19841 (linux_qxfer_osdata): New functions.
19842 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
19843 callback.
19844 * server.c (handle_query): Handle "qXfer:osdata:read:".
19845 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
19846 (buffer_xml_printf): New functions.
19847 * server.h (struct buffer): New.
19848 (buffer_grow_str, buffer_grow_str0): New macros.
19849 (buffer_grow, buffer_free, buffer_init, buffer_finish)
19850 (buffer_xml_printf): Declare.
19851
19852 2008-11-24 Doug Evans <dje@google.com>
19853
19854 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
19855
19856 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
19857
19858 * server.c (handle_v_run): Always use the supplied argument list.
19859
19860 2008-11-19 Bob Wilson <bob.wilson@acm.org>
19861
19862 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
19863 (xtensa_regmap_table): Add entry for scompare1.
19864
19865 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
19866
19867 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
19868 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
19869 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
19870 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
19871 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
19872 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
19873 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
19874 XML target descriptions.
19875 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
19876 when inferior is running on an ISA 2.05 or later processor. Add
19877 special case to return offset for full 64-bit slot of FPSCR when
19878 in 32-bits.
19879
19880 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
19881
19882 * Makefile.in (SFILES, clean): Added sparc64 files.
19883 (reg-sparc64.o, reg-sparc64.c): New.
19884 * configure.srv (sparc*-*-linux*): New configuration.
19885 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
19886 syscall arguments for SPARC.
19887 (regsets_store_inferior_registers): Likewise.
19888 * linux-sparc-low.c: New file.
19889
19890 2008-10-21 Doug Evans <dje@google.com>
19891
19892 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
19893 (READLINE_DIR,READLINE_DEP): Delete.
19894 (INTERNAL_CFLAGS): Update.
19895 (LINTFLAGS): Update.
19896
19897 2008-10-10 Pedro Alves <pedro@codesourcery.com>
19898
19899 * server.c (handle_v_run): If GDB didn't specify an argv, use the
19900 whole argv from the last run, not just argv[0].
19901
19902 2008-09-08 Pedro Alves <pedro@codesourcery.com>
19903
19904 * regcache.c (new_register_cache): Return NULL if the register
19905 cache size isn't known yet.
19906 (free_register_cache): Avoid dereferencing a NULL regcache.
19907
19908 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
19909
19910 * configure.srv: Merge MIPS and MIPS64.
19911
19912 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
19913
19914 * Makefile.in (uninstall): Apply $(EXEEXT) too.
19915
19916 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
19917
19918 * Makefile.in: Add required vsx dependencies.
19919
19920 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
19921 Declare init_registers_powerpc_vsx32l.
19922 Declare init_registers_powerpc_vsx64l.
19923 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
19924 (ppc_arch_setup): Check for VSX in hwcap.
19925 (ppc_fill_vsxregset): New function.
19926 (ppc_store_vsxregset): New function.
19927 Add new VSX entry in regset_info target_regsets.
19928
19929 * configure.srv: Add new VSX dependencies.
19930
19931 2008-08-12 Pedro Alves <pedro@codesourcery.com>
19932
19933 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
19934 (remote_open): Set or clear transport_is_reliable.
19935 (putpkt_binary): Don't expect acks in noack mode.
19936 (getpkt): Don't send ack/nac in noack mode.
19937 * server.c (handle_general_set): Handle QStartNoAckMode.
19938 (handle_query): If connected by tcp pass QStartNoAckMode+ in
19939 qSupported.
19940 (main): Reset noack_mode on every connection.
19941 * server.h (noack_mode): Declare.
19942
19943 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19944
19945 * Makefile.in (GDBREPLAY_OBS): New variable.
19946 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
19947
19948 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
19949 Daniel Jacobowitz <dan@codesourcery.com>
19950
19951 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
19952 (usr_store_inferior_registers): Likewise.
19953 (regsets_store_inferior_registers): Likewise.
19954
19955 2008-07-31 Rolf Jansen <rj@surtec.com>
19956 Pedro Alves <pedro@codesourcery.com>
19957
19958 * configure.ac: Check for memmem declaration.
19959 * server.c [HAVE_MALLOC_H]: Include malloc.h.
19960 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
19961 (disable_packet_qfThreadInfo): Unconditionally compile.
19962 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
19963 * configure, config.in: Regenerate.
19964
19965 2008-07-28 Doug Kwan <dougkwan@google.com>
19966
19967 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
19968 (linux_write_memory): Remove declaration of errno.
19969
19970 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
19971
19972 * linux-low.c (handle_extended_wait): Do not use "status"
19973 variable uninitialized.
19974
19975 2008-07-07 Pedro Alves <pedro@codesourcery.com>
19976
19977 * server.c (handle_v_attach): Inhibit reporting dll changes.
19978
19979 2008-06-27 Pedro Alves <pedro@codesourcery.com>
19980
19981 * remote-utils.c (prepare_resume_reply): If requested, don't
19982 output "thread:TID" in the T stop reply.
19983
19984 * server.c (disable_packet_vCont, disable_packet_Tthread)
19985 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
19986 (handle_query): If requested, disable support for qC, qfThreadInfo
19987 and qsThreadInfo.
19988 (handle_v_requests): If requested, disable support for vCont.
19989 (gdbserver_show_disableable): New.
19990 (main): Handle --disable-packet and --disable-packet=LIST.
19991
19992 * server.h (disable_packet_vCont, disable_packet_Tthread)
19993 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
19994
19995 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
19996
19997 * server.c (gdbserver_usage): Mention --version.
19998
19999 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
20000
20001 * Makefile.in (gdbreplay.o): New rule.
20002
20003 2008-06-06 Joseph Myers <joseph@codesourcery.com>
20004
20005 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
20006 message, not gdbserver.
20007
20008 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
20009 Nathan Sidwell <nathan@codesourcery.com>
20010 Joseph Myers <joseph@codesourcery.com>
20011
20012 * acinclude.m4: Include ../../config/acx.m4.
20013 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
20014 * configure, config.in: Regenerate.
20015 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
20016 * server.c (gdbserver_version): Print PKGVERSION.
20017 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
20018 (main): Adjust gdbserver_usage calls.
20019 * gdbreplay.c (version, host_name): Add declarations.
20020 (gdbreplay_version, gdbreplay_usage): New.
20021 (main): Accept --version and --help options.
20022
20023 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
20024
20025 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
20026 (arm_breakpoint_at): Handle Thumb.
20027 (the_low_target): Add comment.
20028
20029 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
20030
20031 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
20032
20033 2008-05-09 Doug Evans <dje@google.com>
20034
20035 * server.h (decode_search_memory_packet): Declare.
20036 * remote-utils.c (decode_search_memory_packet): New fn.
20037 * server.c (handle_search_memory_1): New fn.
20038 (handle_search_memory): New fn.
20039 (handle_query): Process qSearch:memory packets.
20040
20041 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
20042
20043 * regcache.c (registers_length): Remove.
20044 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
20045 full register packet.
20046 * regcache.h (registers_length): Remove prototype.
20047 * server.h (PBUFSIZ): Define to 16384.
20048
20049 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
20050
20051 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
20052 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
20053 powerpc-64l.o, and powerpc-altivec64l.o.
20054 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
20055 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
20056 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
20057 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
20058 rs6000/power-linux.xml, and rs6000/power64-linux.xml
20059 to srv_xmlfiles.
20060
20061 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
20062 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
20063 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
20064 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
20065 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
20066 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
20067 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
20068 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
20069 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
20070 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
20071 (clean): Update.
20072
20073 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
20074 (init_registers_powerpc_32l): ... this new prototype.
20075 (init_registers_powerpc_32): Remove, replace by ...
20076 (init_registers_powerpc_altivec32l): ... this new prototype.
20077 (init_registers_powerpc_e500): Remove, replace by ...
20078 (init_registers_powerpc_e500l): ... this new prototype.
20079 (init_registers_ppc64): Remove, replace by ...
20080 (init_registers_powerpc_64l): ... this new prototype.
20081 (init_registers_powerpc_64): Remove, replace by ...
20082 (init_registers_powerpc_altivec64l): ... this new prototype.
20083 (ppc_num_regs): Set to 73.
20084 (PT_ORIG_R3, PT_TRAP): Define if necessary.
20085 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
20086 (ppc_cannot_store_register): Handle orig_r3 and trap.
20087 (ppc_arch_setup): Update init_registers_... calls.
20088 (ppc_fill_gregset): Handle orig_r3 and trap.
20089
20090 * inferiors.c (clear_inferiors): Reset current_inferior.
20091
20092 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
20093
20094 * acinclude.m4: Add override.m4.
20095 * configure: Regenerate.
20096
20097 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
20098
20099 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
20100 initial call to init_register_ppc64.
20101
20102 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
20103
20104 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
20105 single powerpc*-*-linux* case.
20106 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
20107
20108 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
20109
20110 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
20111 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
20112 from reg_xmlfiles.
20113 * linux-ppc-low.c: Include <elf.h>.
20114 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
20115 (ppc_hwcap): New global variable.
20116 (ppc_regmap): Remove __SPE__ #ifdef sections.
20117 (ppc_regmap_e500): New global variable.
20118 (ppc_cannot_store_register): Update __SPE__ special case.
20119 (ppc_get_hwcap): New function.
20120 (ppc_arch_setup): Use it to determine whether inferior supports
20121 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
20122 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
20123 Do not access registers if target does not support AltiVec.
20124 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
20125 Do not access registers if target does not support SPE.
20126 (target_regsets): Unconditionally include AltiVec and SPE regsets.
20127
20128 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
20129
20130 * linux-low.c (disabled_regsets, num_regsets): New.
20131 (use_regsets_p): Delete.
20132 (linux_wait_for_process): Clear disabled_regsets.
20133 (regsets_fetch_inferior_registers): Check and set it.
20134 (regsets_store_inferior_registers): Likewise.
20135 (linux_fetch_registers, linux_store_registers): Do not use
20136 use_regsets_p.
20137 (initialize_low): Allocate disabled_regsets.
20138
20139 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
20140
20141 * Makefile.in (LIBOBJS): New.
20142 (OBS): Use LIBOBJS.
20143 (memmem.o): New rule.
20144 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
20145 * configure: Regenerated.
20146
20147 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
20148
20149 * server.c (handle_query): Never return "unsupported" for
20150 qXfer:features:read queries.
20151
20152 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
20153
20154 * server.c (get_features_xml): Fix inverted condition.
20155 (handle_query): Always support qXfer:feature:read.
20156
20157 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
20158
20159 * server.c (wrapper_argv): New.
20160 (start_inferior): Handle wrapper_argv. If set, expect an extra
20161 trap.
20162 (gdbserver_usage): Document --wrapper.
20163 (main): Parse --wrapper.
20164
20165 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20166
20167 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
20168 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
20169 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
20170 (ppc_set_pc): Likewise.
20171 (ppc_arch_setup): New function.
20172 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
20173 of collect_register.
20174 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
20175
20176 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20177
20178 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
20179 instead of linux-ppc64-low.o.
20180 * linux-ppc64-low.c: Remove file.
20181 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
20182 (linux-ppc64-low.o): Remove rule.
20183
20184 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
20185 (init_registers_powerpc_64): Likewise.
20186 (ppc_regmap): Conditionally define depending on __powerpc64__.
20187 (ppc_cannot_store_register): Do not special-case "fpscr" when
20188 compiled on __powerpc64__.
20189 (ppc_collect_ptrace_register): New function.
20190 (ppc_supply_ptrace_register): New function.
20191 (ppc_breakpoint): Change type to "unsigned int".
20192 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
20193 (the_low_target): Conditionally provide initializers for the
20194 arch_setup member depending on __powerpc64__. Install
20195 collect_ptrace_register and supply_ptrace_register members.
20196
20197 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20198
20199 * regcache.h (gdbserver_xmltarget): Add extern declaration.
20200 * server.c (gdbserver_xmltarget): Define.
20201 (get_features_xml): Use it to replace "target.xml" and arch_string.
20202
20203 * configure.srv: Remove srv_xmltarget. Add XML files that were
20204 mentioned there to srv_xmlfiles instead. Remove conditional tests
20205 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
20206 srv_xmlfiles and srv_regobj to include all possible choices.
20207 * configure.ac (srv_xmltarget): Remove.
20208 (srv_xmlfiles): Do not add "target.xml".
20209 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
20210 checks for supplementary target information.
20211 * configure: Regenerate.
20212 * Makefile.in (XML_TARGET): Remove.
20213 (target.xml): Remove rule.
20214 (clean): Do not clean up target.xml.
20215 (.PRECIOUS): Do not mention target.xml.
20216
20217 * target.h (struct target_ops): Remove arch_string member.
20218 * linux-low.c (linux_arch_string): Remove.
20219 (linux_target_ops): Remove arch_string initializer.
20220 * linux-low.h (struct linux_target_ops): Remove arch_string member.
20221 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
20222 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
20223 * spu-low.c (spu_arch_string): Remove.
20224 (spu_target_ops): Remove arch_string initializer.
20225 * win32-low.c (win32_arch_string): Remove.
20226 (win32_target_ops): Remove arch_string initializer.
20227 * win32-low.h (struct win32_target_ops): Remove arch_string member.
20228 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
20229 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
20230
20231 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20232
20233 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
20234 by collect_ptrace_register and supply_ptrace_register hooks.
20235 * linux-low.c (fetch_register): Use supply_ptrace_register callback
20236 instead of checking for the_low_target.left_pad_xfer.
20237 (usr_store_inferior_registers): Use collect_ptrace_register callback
20238 instead of checking for the_low_target.left_pad_xfer.
20239
20240 * linux-s390-low.c (s390_collect_ptrace_register): New function.
20241 (s390_supply_ptrace_register): Likewise.
20242 (s390_fill_gregset): Call s390_collect_ptrace_register.
20243 (the_low_target): Update.
20244
20245 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
20246 (ppc_supply_ptrace_register): Likewise.
20247 (the_low_target): Update.
20248
20249 * linux-i386-low.c (the_low_target): Update.
20250 * linux-x86-64-low.c (the_low_target): Update.
20251
20252 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20253
20254 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
20255 reg-s390.o and reg-s390x.o.
20256
20257 * linux-low.c (new_inferior): New global variable.
20258 (linux_create_inferior, linux_attach): Set it.
20259 (linux_wait_for_process): Call the_low_target.arch_setup after the
20260 target has stopped for the first time.
20261 (initialize_low): Do not call the_low_target.arch_setup.
20262
20263 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
20264 (s390_set_pc): Likewise.
20265 (s390_arch_setup): New function.
20266 (the_low_target): Use s390_arch_setup as arch_setup routine.
20267
20268 * regcache.c (realloc_register_cache): New function.
20269 (set_register_cache): Call it for each existing regcache.
20270
20271 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20272
20273 * server.h (init_registers): Remove prototype.
20274
20275 * linux-low.h (struct linux_target_ops): Add arch_setup field.
20276 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
20277 instead of init_registers ().
20278 * linux-arm-low.c (init_registers_arm): Add prototype.
20279 (init_registers_arm_with_iwmmxt): Likewise.
20280 (the_low_target): Add initializer for arch_setup field.
20281 * linux-cris-low.c (init_registers_cris): Add prototype.
20282 (the_low_target): Add initializer for arch_setup field.
20283 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
20284 (the_low_target): Add initializer for arch_setup field.
20285 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
20286 (the_low_target): Add initializer for arch_setup field.
20287 * linux-ia64-low.c (init_registers_ia64): Add prototype.
20288 (the_low_target): Add initializer for arch_setup field.
20289 * linux-m32r-low.c (init_registers_m32r): Add prototype.
20290 (the_low_target): Add initializer for arch_setup field.
20291 * linux-m68k-low.c (init_registers_m68k): Add prototype.
20292 (the_low_target): Add initializer for arch_setup field.
20293 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
20294 (init_registers_mips64_linux): Likewise.
20295 (the_low_target): Add initializer for arch_setup field.
20296 * linux-ppc-low.c (init_registers_ppc): Add prototype.
20297 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
20298 (the_low_target): Add initializer for arch_setup field.
20299 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
20300 (init_registers_powerpc_64): Likewise.
20301 (the_low_target): Add initializer for arch_setup field.
20302 * linux-s390-low.c (init_registers_s390): Add prototype.
20303 (init_registers_s390x): Likewise.
20304 (the_low_target): Add initializer for arch_setup field.
20305 * linux-sh-low.c (init_registers_sh): Add prototype.
20306 (the_low_target): Add initializer for arch_setup field.
20307 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
20308 (the_low_target): Add initializer for arch_setup field.
20309 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
20310 (the_low_target): Add initializer for arch_setup field.
20311
20312 * win32-low.h (struct win32_target_ops): Add arch_setup field.
20313 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
20314 instead of init_registers ().
20315 * win32-arm-low.c (init_registers_arm): Add prototype.
20316 (the_low_target): Add initializer for arch_setup field.
20317 * win32-i386-low.c (init_registers_i386): Add prototype.
20318 (the_low_target): Add initializer for arch_setup field.
20319
20320 * spu-low.c (init_registers_spu): Add prototype.
20321 (initialize_low): Call initialie_registers_spu () instead of
20322 initialize_registers ().
20323
20324 2008-02-19 Pedro Alves <pedro@codesourcery.com>
20325
20326 * server.c (handle_v_requests): When handling the vRun and vAttach
20327 packets, if already debugging a process, don't kill it. Return an
20328 error instead.
20329
20330 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
20331
20332 * server.c (handle_query): Correct length check.
20333
20334 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
20335
20336 * win32-low.c (do_initial_child_stuff): Add process handle
20337 parameter. Set current_process_handle and current_process_id from the
20338 parameters. Clear globals.
20339 (win32_create_inferior): Don't set current_process_handle and
20340 current_process_id here. Instead pass them on the call to
20341 do_initial_child_stuff.
20342 (win32_attach): Likewise.
20343 (win32_clear_inferiors): New.
20344 (win32_kill): Don't close the current process handle or the
20345 current thread handle here. Instead call win32_clear_inferiors.
20346 (win32_detach): Don't open a new handle to the process. Call
20347 win32_clear_inferiors.
20348 (win32_join): Don't rely on current_process_handle; open a new
20349 handle using the process id.
20350 (win32_wait): Call win32_clear_inferiors when the inferior process
20351 has exited.
20352
20353 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
20354
20355 * server.c (monitor_show_help): Add "exit".
20356
20357 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
20358
20359 * Makefile.in (SFILES): Add linux-xtensa-low.c.
20360 (clean): Add reg-xtensa.c.
20361 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
20362 * configure.srv (xtensa*-*-linux*) New target.
20363 * linux-xtensa-low.c: New.
20364 * xtensa-xtregs.c: New.
20365
20366 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
20367
20368 * hostio.c: Don't include errno.h.
20369 (errno_to_fileio_errno): Move to hostio-errno.
20370 * hostio.c: (hostio_error): Remove the error parameter. Defer the
20371 error number outputting to the target->hostio_last_error callback.
20372 (hostio_packet_error): Use FILEIO_EINVAL directly.
20373 (handle_open, handle_pread, hostio_error, handle_unlink): Update
20374 calls to hostio_error.
20375 * hostio-errno.c: New.
20376 * server.h (hostio_last_error_from_errno): Declare.
20377 * target.h (target_ops): Add hostio_last_error member.
20378 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
20379 as hostio_last_error handler.
20380 * spu-low.c (spu_target_ops): Likewise.
20381 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
20382 (wince_hostio_last_error): New functions.
20383 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
20384 as hostio_last_error handler.
20385 (win32_target_ops) [!_WIN32_WCE]: Register
20386 hostio_last_error_from_errno as hostio_last_error handler.
20387 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
20388 (hostio-errno.o): New rule.
20389 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
20390 * configure.srv (srv_hostio_err_objs): New variable. Default to
20391 hostio-errno.o.
20392 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
20393 * configure: Regenerate.
20394
20395 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
20396
20397 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
20398 (linux_kill, linux_detach): Clean up the process list.
20399 * remote-utils.c (remote_open): Improve port number parsing.
20400 (putpkt_binary, input_interrupt): Only send interrupts if the target
20401 is running.
20402 * server.c (extended_protocol): Make static.
20403 (attached): Define earlier.
20404 (exit_requested, response_needed, program_argv): New variables.
20405 (target_running): New.
20406 (start_inferior): Clear attached here.
20407 (attach_inferior): Set attached here.
20408 (require_running): Define.
20409 (handle_query): Use require_running and target_running. Implement
20410 "monitor exit".
20411 (handle_v_attach, handle_v_run): New.
20412 (handle_v_requests): Use require_running. Handle vAttach and vRun.
20413 (gdbserver_usage): Update.
20414 (main): Redo argument parsing. Handle --debug and --multi. Handle
20415 --attach along with other options or after the port. Save
20416 program_argv. Support no initial program. Resynchronize
20417 communication with GDB after an error. Handle "monitor exit".
20418 Use require_running and target_running. Always allow the extended
20419 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
20420 restart in extended mode.
20421 * README: Refer to the GDB manual. Update --attach usage.
20422
20423 2007-12-20 Andreas Schwab <schwab@suse.de>
20424
20425 * linux-low.c (STACK_SIZE): Define.
20426 (linux_tracefork_child): Use it. Use __clone2 on ia64.
20427 (linux_test_for_tracefork): Likewise.
20428
20429 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
20430
20431 * linux-low.c (linux_wait_for_event): Update messages. Do not
20432 reinsert auto-delete breakpoints.
20433 * mem-break.c (struct breakpoint): Change return type of handler to
20434 int.
20435 (set_breakpoint_at): Update handler type.
20436 (reinsert_breakpoint_handler): Return 1 instead of calling
20437 delete_breakpoint.
20438 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
20439 setting a new one.
20440 (check_breakpoints): Delete auto-delete breakpoints and return 2.
20441 * mem-break.h (set_breakpoint_at): Update handler type.
20442 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
20443 * win32-low.c (auto_delete_breakpoint): New.
20444 (get_child_debug_event): Use it.
20445
20446 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
20447
20448 * configure.ac: Check for pread and pwrite.
20449 * hostio.c (handle_pread): Fall back to lseek and read.
20450 (handle_pwrite): Fall back to lseek and write.
20451 * config.in, configure: Regenerated.
20452
20453 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
20454
20455 * server.c (myresume): Add own_buf argument.
20456 (main): Update calls.
20457
20458 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
20459
20460 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
20461 * remote-utils.c (remote_open): Do not call disable_async_io.
20462 (block_async_io): Delete.
20463 (unblock_async_io): Make static.
20464 (initialize_async_io): New.
20465 * server.c (handle_v_cont): Handle async I/O here.
20466 (myresume): Likewise. Move other common resume tasks here...
20467 (main): ... from here. Call initialize_async_io. Disable async
20468 I/O before the main loop.
20469 * server.h (initialize_async_io): Declare.
20470 (block_async_io, unblock_async_io): Delete prototypes.
20471 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
20472
20473 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
20474
20475 * remote-utils.c (readchar): Allow binary data in received messages.
20476
20477 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20478
20479 * win32-low.c (attaching): New global.
20480 (win32_create_inferior): Clear the `attaching' global.
20481 (win32_attach): Set the `attaching' global.
20482 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
20483 attaching. Only set a breakpoint at the entry point if not
20484 attaching.
20485
20486 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20487
20488 * server.c (main): Don't report dll events on the initial
20489 connection on attaches.
20490
20491 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20492
20493 * server.c (main): Relax numerical bases supported for the pid of
20494 the --attach command line argument.
20495
20496 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20497
20498 * win32-low.c (win32_attach): Call OpenProcess before
20499 DebugActiveProcess, not after. Add last error output to error
20500 call.
20501
20502 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20503
20504 * win32-low.c (win32_get_thread_context)
20505 (win32_set_thread_context): New functions.
20506 (thread_rec): Use win32_get_thread_context.
20507 (continue_one_thread, win32_resume): Use win32_set_thread_context.
20508 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
20509 field.
20510
20511 2007-12-03 Leo Zayas
20512 Pedro Alves <pedro_alves@portugalmail.pt>
20513
20514 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
20515 global variables.
20516 (child_add_thread): Minor cleanup.
20517 (child_continue): Resume artificially suspended threads before
20518 calling ContinueDebugEvent.
20519 (suspend_one_thread): New.
20520 (fake_breakpoint_event): New.
20521 (get_child_debug_event): Change return type to int. Check here if
20522 gdb sent an interrupt request. If a soft interrupt was requested,
20523 fake a breakpoint event. Return 0 if there is no event to handle,
20524 and 1 otherwise.
20525 (win32_wait): Don't check here if gdb sent an interrupt request.
20526 Ensure there is a valid event to handle.
20527 (win32_request_interrupt): Add soft interruption method as last
20528 resort.
20529
20530 2007-12-03 Leo Zayas
20531 Pedro Alves <pedro_alves@portugalmail.pt>
20532
20533 * win32-low.h (win32_thread_info): Add descriptions to the
20534 structure members. Replace `suspend_count' counter by a
20535 `suspended' flag.
20536 * win32-low.c (thread_rec): Update condition of when to get the
20537 context from the inferior. Rely on ContextFlags being set if it
20538 has already been retrieved. Only suspend the inferior thread if
20539 we haven't already. Warn if that fails.
20540 (continue_one_thread): s/suspend_count/suspended/. Only call
20541 ResumeThread once. Warn if that fails.
20542
20543 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20544
20545 * win32-low.c (win32_wait): Don't read from the inferior when it
20546 has already exited.
20547
20548 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20549
20550 * Makefile.in (win32_low_h): New variable.
20551 (win32-low.o): Add dependency on $(win32_low_h).
20552 (win32-arm-low.o, win32-i386-low.o): New rules.
20553
20554 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20555
20556 * hostio.c: Correct copyright year.
20557
20558 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20559
20560 * Makefile.in (OBS): Add hostio.o.
20561 (hostio.o): New rule.
20562 * server.h (handle_vFile): Declare.
20563 * hostio.c: New file.
20564 * server.c (handle_v_requests): Take packet_len and new_packet_len
20565 for binary packets. Call handle_vFile.
20566 (main): Update call to handle_v_requests.
20567
20568 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
20569
20570 * linux-low.c: Include <sched.h>.
20571
20572 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
20573
20574 * linux-low.c (linux_tracefork_grandchild): New.
20575 (linux_tracefork_child): Use clone.
20576 (linux_test_for_tracefork): Use clone; allocate and free a stack.
20577
20578 2007-10-31 Joel Brobecker <brobecker@adacore.com>
20579
20580 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
20581
20582 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
20583
20584 * linux-low.c (handle_extended_wait): Handle unexpected signals.
20585
20586 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
20587
20588 * inferiors.c (change_inferior_id): Delete.
20589 (add_pid_to_list, pull_pid_from_list): New.
20590 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
20591 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
20592 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
20593 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
20594 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
20595 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
20596 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
20597 (using_threads): Always set to 1.
20598 (handle_extended_wait): New.
20599 (add_process): Do not set TID.
20600 (linux_create_inferior): Set must_set_ptrace_flags.
20601 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
20602 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
20603 (linux_thread_alive): Rename TID argument to LWPID.
20604 (linux_wait_for_process): Handle unknown processes. Do not use TID.
20605 (linux_wait_for_event): Do not use TID or check using_threads. Update
20606 call to dead_thread_notify. Call handle_extended_wait.
20607 (linux_create_inferior): Use PTRACE_SETOPTIONS.
20608 (send_sigstop): Delete sigstop_sent.
20609 (wait_for_sigstop): Avoid TID.
20610 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
20611 (linux_test_for_tracefork): New.
20612 (linux_lookup_signals): Use thread_db_active and
20613 linux_supports_tracefork_flag.
20614 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
20615 * linux-low.h (get_process_thread): Avoid TID.
20616 (struct process_ifo): Move thread_known and tid to the end. Remove
20617 sigstop_sent.
20618 (linux_attach_lwp, thread_db_init): Update prototypes.
20619 * server.h (change_inferior_id): Delete prototype.
20620 (add_pid_to_list, pull_pid_from_list): New prototypes.
20621 * thread-db.c (thread_db_use_events): New.
20622 (find_first_thread): Rename to...
20623 (find_one_thread): ...this. Update callers and messages. Do not
20624 call fatal. Check thread_db_use_events. Do not call
20625 change_inferior_id or new_thread_notify.
20626 (maybe_attach_thread): Update. Do not call new_thread_notify.
20627 (thread_db_init): Set thread_db_use_events. Check use_events.
20628 * utils.c (fatal, warning): Correct message prefix.
20629
20630 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
20631
20632 * Makefile.in (clean): Remove new files.
20633 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
20634 (powerpc-64.o, powerpc-64.c): New rules.
20635 * configure.srv: Use alternate register sets for powerpc64-*-linux*
20636 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
20637 with SPE.
20638 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
20639 SPE targets.
20640 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
20641 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
20642 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
20643 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
20644 (target_regsets): Add AltiVec and SPE register sets.
20645 * configure.ac: Check for AltiVec and SPE.
20646 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
20647 (ppc_fill_vrregset, ppc_store_vrregset): New.
20648 (target_regsets): Add AltiVec register set.
20649 * configure: Regenerated.
20650
20651 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
20652
20653 * linux-low.c (O_LARGEFILE): Define.
20654 (linux_read_memory): Use /proc/PID/mem.
20655 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
20656 * configure, config.in: Regenerated.
20657
20658 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
20659
20660 * linux-low.c (linux_wait_for_event): Do not pass signals while
20661 single-stepping.
20662
20663 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20664
20665 * win32-low.c (create_process): New.
20666 (win32_create_inferior): Use create_process instead of
20667 CreateProcess. If create_process failed retry appending an ".exe"
20668 suffix. Store the GetLastError result immediatelly after
20669 create_process calls and use it on the call to error.
20670
20671 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20672
20673 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
20674
20675 2007-08-23 Joel Brobecker <brobecker@adacore.com>
20676
20677 * configure.ac: Switch license to GPLv3.
20678
20679 2007-08-01 Michael Snyder <msnyder@access-company.com>
20680
20681 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
20682
20683 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
20684
20685 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
20686 typedef.
20687 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
20688 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
20689 CloseToolhelp32Snapshot.
20690 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
20691 CloseToolhelp32Snapshot.
20692
20693 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
20694
20695 * server.c (main): Check for inferior exit before main loop.
20696
20697 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
20698
20699 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
20700 instead of on tmp_desc.
20701
20702 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
20703 Daniel Jacobowitz <dan@codesourcery.com>
20704
20705 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
20706 (add_thread): Minor cleanups.
20707 (clear_inferiors): Move lower in the file. Clear the DLL
20708 list.
20709 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
20710 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
20711 (xml_escape_text): New.
20712 * server.c (handle_query): Handle qXfer:libraries:read. Report it
20713 for qSupported.
20714 (handle_v_cont): Report errors.
20715 (gdbserver_version): Update.
20716 (main): Correct size of own_buf. Do not report initial DLL events.
20717 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
20718 (unloaded_dll, xml_escape_text): New.
20719 * win32-low.c (enum target_waitkind): Update comments.
20720 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
20721 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
20722 (win32_EnumProcessModules, win32_GetModuleInformation)
20723 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
20724 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
20725 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
20726 (win32_Module32First, win32_Module32Next, load_toolhelp)
20727 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
20728 (get_child_debug_event): Handle DLL events.
20729 (win32_wait): Likewise.
20730
20731 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
20732
20733 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
20734 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
20735
20736 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20737
20738 * win32-low.c (handle_output_debug_string): Ignore event if not
20739 waiting.
20740
20741 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20742
20743 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
20744
20745 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
20746
20747 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
20748
20749 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
20750
20751 * inferiors.c (change_inferior_id): Add comment.
20752 * linux-low.c (check_removed_breakpoint): Add an early
20753 prototype. Improve debug output.
20754 (linux_attach): Doc update.
20755 (linux_detach_one_process, linux_detach): Clean up before releasing
20756 each process.
20757 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
20758 * linux-low.h (struct process_info): Doc improvement.
20759 * mem-break.c (delete_all_breakpoints): New.
20760 * mem-break.h (delete_all_breakpoints): New prototype.
20761 * thread-db.c (find_first_thread): New.
20762 (thread_db_create_event): Call it instead of
20763 thread_db_find_new_threads. Clean up unused variables.
20764 (maybe_attach_thread): Remove first thread handling.
20765 (thread_db_find_new_threads): Use find_first_thread.
20766 (thread_db_get_tls_address): Likewise.
20767
20768 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
20769
20770 * thread-db.c (thread_db_find_new_threads): Add prototype.
20771 (thread_db_create_event): Check for the main thread before adding
20772 a new thread.
20773 (maybe_attach_thread): Only enable event reporting if TID == 0.
20774 (thread_db_get_tls_address): Check for new threads.
20775
20776 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
20777
20778 * linux-low.c (linux_create_inferior): Try execv before execvp.
20779 * spu-low.c (spu_create_inferior): Likewise.
20780
20781 2007-06-13 Mike Frysinger <vapier@gentoo.org>
20782
20783 * linux-low.c (linux_create_inferior): Change execv to execvp.
20784 * spu-low.c (spu_create_inferior): Likewies.
20785
20786 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
20787
20788 * Makefile.in (clean): Clean new files instead of deleted ones.
20789 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
20790 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
20791 rules.
20792 * configure.srv: Specify XML files and new regformats for MIPS and
20793 MIPS64 GNU/Linux.
20794 * linux-mips-low.c (mips_num_regs): Set to only used registers.
20795 (mips_regmap): Do not fetch $0. Remove unused registers. Add
20796 an entry for the restart register.
20797 (mips_cannot_fetch_register, mips_cannot_store_register)
20798 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
20799 register names to match the XML descriptions.
20800 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
20801 restart register instead of $0.
20802
20803 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20804 Markus Deuling <deuling@de.ibm.com>
20805
20806 * remote-utils.c (decode_xfer_write): New function.
20807 * server.h (decode_xfer_write): Add prototype.
20808 * server.c (handle_query): Add PACKET_LEN argument. Support
20809 qXfer:spu:read and qXfer:spu:write packets.
20810 (main): Pass packet_len to handle_query.
20811 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
20812 * target.h (target_ops): Add qxfer_spu.
20813
20814 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20815
20816 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
20817 accessing non-seekable spufs files.
20818
20819 2007-05-16 Markus Deuling <deuling@de.ibm.com>
20820
20821 * server.c (handle_query): Add reply for qC packet.
20822
20823 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20824 Leo Zayas <lerele@champenstudios@com>
20825
20826 * server.h (check_remote_input_interrupt_request): New function.
20827 * remote_utils.c (INVALID_DESCRIPTOR): New define.
20828 (remote_desc): Initialize with INVALID_DESCRIPTOR.
20829 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
20830 (check_remote_input_interrupt_request): New function.
20831 * server.h (check_remote_input_interrupt_request): Declare.
20832 * win32-low.c (winapi_DebugBreakProcess,
20833 winapi_GenerateConsoleCtrlEvent): New typedefs.
20834 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
20835 to 250 ms.
20836 (win32_wait): Check for remote interrupt request
20837 with check_remote_input_interrupt_request.
20838 (win32_request_interrupt): New function.
20839 (win32_target_op): Set request_interrupt to win32_request_interrupt.
20840
20841 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20842
20843 * win32-low.c (debug_registers_changed,
20844 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
20845 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
20846 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
20847 (thread_rec): Get context using the low target.
20848 (child_add_thread): Call thread_added on the low target,
20849 which does the same thing.
20850 (regptr): Delete.
20851 (do_initial_child_stuff): Remove debug registers references.
20852 Set context using the low target. Resume threads after
20853 setting the contexts.
20854 (child_continue): Remove dead variable. Remove debug
20855 registers references.
20856 (child_fetch_inferior_registers): Go through the low target.
20857 (do_child_store_inferior_registers): Remove.
20858 (child_store_inferior_registers): Go through the low target.
20859 (win32_resume): Remove debug registers references.
20860 Set context using the low target.
20861 (handle_exception): Change return type to void. Don't record
20862 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
20863 first chance exception.
20864 (get_child_debug_event): Change return type to void. Remove
20865 goto loop. Always return after waiting for debug event.
20866 (win32_wait): Convert to switch statement. Handle spurious
20867 events.
20868
20869 * win32-i386-low.c (debug_registers_changed,
20870 debug_registers_used): New.
20871 (initial_stuff): Rename to ...
20872 (i386_initial_stuff): ... this. Clear debug registers
20873 state variables.
20874 (store_debug_registers): Delete.
20875 (i386_get_thread_context): New.
20876 (load_debug_registers): Delete.
20877 (i386_set_thread_context): New.
20878 (i386_thread_added): New.
20879 (single_step): Rename to ...
20880 (i386_single_step): ... this.
20881 (do_fetch_inferior_registers): Rename to ...
20882 (i386_fetch_inferior_register): ... this.
20883 (i386_store_inferior_register): New.
20884 (the_low_target): Adapt to new interface.
20885
20886 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
20887 (arm_get_thread_context): New.
20888 (arm_set_thread_context): New.
20889 (regptr): New.
20890 (do_fetch_inferior_registers): Rename to ...
20891 (arm_fetch_inferior_register): ... this.
20892 (arm_store_inferior_register): New.
20893 (arm_wince_breakpoint): Reimplement as unsigned long.
20894 (arm_wince_breakpoint_len): Define.
20895 (the_low_target): Adapt to new interface.
20896
20897 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
20898 load_debug_registers. Add get_thread_context, set_thread_context,
20899 thread_added and store_inferior_register. Rename
20900 fetch_inferior_registers to fetch_inferior_register.
20901 (regptr): Remove declaration.
20902
20903 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20904
20905 * linux-low.c (linux_detach): Change return type to int. Return 0.
20906 * spu-low.c (spu_detach): Likewise.
20907
20908 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20909
20910 * target.h (target_ops): Change return type of detach to int.
20911 Add join.
20912 (join_inferior): New.
20913 * server.c (main): Don't skip detach support on mingw32.
20914 If the inferior doesn't support detaching return error.
20915 Call join_inferior instead of using waitpid.
20916 * linux-low.c (linux_join): New.
20917 (linux_target_op): Add linux_join.
20918 * spu-low.c (spu_join): New.
20919 (spu_target_ops): Add spu_join.
20920 * win32-low.c (win32_detach): Adapt to new interface.
20921 Reopen current_process_handle before detaching. Issue a child
20922 resume before detaching.
20923 (win32_join): New.
20924 (win32_target_op): Add win32_join.
20925
20926 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20927
20928 * win32-low.c (win32-attach): Fix return value.
20929 * target.h (target_ops): Describe ATTACH return values.
20930
20931 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20932
20933 * win32-low.c (GETPROCADDRESS): Define.
20934 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
20935 (winapi_DebugSetProcessKillOnExit): Likewise.
20936 (win32_create_inferior): Force usage of ansi CreateProcessA.
20937 (win32_attach): Use GETPROCADDRESS.
20938 (win32_detach): Likewise.
20939
20940 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20941
20942 * win32-low.c (win32_wait): Don't use WSTOPSIG.
20943
20944 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
20945
20946 * win32-low.c: Commit leftover changes from 2007-03-29.
20947
20948 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20949
20950 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
20951 fields short instead of int. Add explicit padding.
20952 (i387_cache_to_fsave): Remove unnecessary casts.
20953 (i387_fsave_to_cache): Doc fix.
20954 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
20955
20956 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
20957
20958 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
20959 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
20960
20961 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20962
20963 * configure.srv (arm*-*-mingw32ce*): Move near the other
20964 arm targets.
20965
20966 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
20967
20968 * configure.ac: Add errno checking.
20969 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
20970 sys/file.h and malloc.h.
20971 (AC_CHECK_DECLS): Add perror.
20972 (srv_mingwce): Handle.
20973 * configure.srv (i[34567]86-*-cygwin*): Add
20974 win32-i386-low.o to srv_tgtobj.
20975 (i[34567]86-*-mingw*): Likewise.
20976 (arm*-*-mingw32ce*): Add case.
20977 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20978 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
20979 [__MINGW32CE__] (strerror): New function.
20980 [__MINGW32CE__] (errno): Define to GetLastError.
20981 [__MINGW32CE__] (COUNTOF): New macro.
20982 (remote_open): Remove extra close call.
20983 * mem-break.c (delete_breakpoint_at): New function.
20984 * mem-break.h (delete_breakpoint_at): Declare.
20985 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
20986 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
20987 [USE_WIN32API] (read, write): Add char* casts.
20988 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
20989 * server.h: Include wincecompat.h on Windows CE.
20990 [HAVE_ERRNO_H]: Check.
20991 (perror): Declare if not declared.
20992 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
20993 (perror_with_name): Remove errno declaration.
20994 * wincecompat.h: New.
20995 * wincecompat.c: New.
20996 * win32-low.h: New.
20997 * win32-arm-low.c: New.
20998 * win32-i386-low.c: New.
20999 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
21000 (OUTMSG2): Make it safe.
21001 (_T): New macro.
21002 (COUNTOF): New macro.
21003 (NUM_REGS): Get it from the low target.
21004 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
21005 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
21006 (thread_rec): Let low target handle debug registers.
21007 (child_add_thread): Likewise.
21008 (child_init_thread_list): Likewise.
21009 (continue_one_thread): Likewise.
21010 (regptr): New.
21011 (do_child_fetch_inferior_registers): Move to ...
21012 * win32-i386-low.c: ... here, and rename to ...
21013 (do_fetch_inferior_registers): ... this.
21014 * win32-low.c (child_fetch_inferior_registers):
21015 Go through the low target.
21016 (do_child_store_inferior_registers): Use regptr.
21017 (strwinerror): New function.
21018 (win32_create_inferior): Handle Windows CE.
21019 Use strwinerror instead of strerror on Windows error
21020 codes. Add program to the error output.
21021 Don't close the main thread handle on Windows CE.
21022 (win32_attach): Use coredll.dll on Windows CE.
21023 (win32_kill): Close current process and current
21024 thread handles.
21025 (win32_detach): Use coredll.dll on Windows CE.
21026 (win32_resume): Let low target handle debug registers, and
21027 step request.
21028 (handle_exception): Add/Remove initial breakpoint. Avoid
21029 non-existant WSTOPSIG on Windows CE.
21030 (win32_read_inferior_memory): Cast to remove warning.
21031 (win32_arch_string): Go through the low target.
21032 (initialize_low): Call set_breakpoint_data with the low
21033 target's breakpoint.
21034 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
21035 FOP_REGNUM, mappings): Move to ...
21036 * win32-i386-low.c: ... here.
21037 * win32-low.c (win32_thread_info): Move to ...
21038 * win32-low.h: ... here.
21039 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
21040 win32-arm-low.c and wincecompat.c.
21041 (all:): Add $EXEEXT.
21042 (install-only:): Likewise.
21043 (gdbserver:): Likewise.
21044 (gdbreplay:): Likewise.
21045 * config.in: Regenerate.
21046 * configure: Regenerate.
21047
21048 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
21049
21050 * win32-low.c: Rename typedef thread_info to
21051 win32_thread_info throughout.
21052
21053 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
21054
21055 * win32-i386-low.c: Rename to ...
21056 * win32-low.c: ... this.
21057 * configure.srv: Replace win32-i386-low.o with win32-low.o.
21058 * Makefile.in: Likewise.
21059
21060 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
21061
21062 * remote-utils.c (monitor_output): Constify msg parameter.
21063 * server.h (monitor_output): Likewise.
21064 * win32-i386-low.c (handle_output_debug_string): New.
21065 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
21066 handle_output_debug_string.
21067 (get_child_debug_event): Likewise.
21068
21069 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
21070
21071 * server.c (main): Correct strtoul check.
21072
21073 2007-03-27 Jon Ringle <jon@ringle.org>
21074
21075 * linux-low.c: Check __ARCH_HAS_MMU__ also.
21076
21077 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
21078
21079 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
21080
21081 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
21082
21083 * terminal.h: Check HAVE_SGTTY_H.
21084
21085 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
21086
21087 * remote-utils.c (remote_open): Print out the assigned port number.
21088
21089 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
21090
21091 * remote-utils.c (monitor_output): New function.
21092 * server.c (debug_threads): Define here.
21093 (monitor_show_help): New function.
21094 (handle_query): Handle qRcmd.
21095 (main): Do not handle 'd' packet.
21096 * server.h (debug_threads, remote_debug, monitor_output): Declare.
21097 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
21098 of debug_threads.
21099
21100 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21101
21102 * Makefile.in (EXEEXT): New.
21103 (clean): Use $(EXEEXT).
21104
21105 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21106
21107 * target.h (target_ops): Rename send_signal to request_interrupt,
21108 and remove enum target_signal parameter.
21109 * linux-low.c (linux_request_interrupt): Rename from
21110 linux_send_signal, and always send SIGINT.
21111 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
21112 and always send SIGINT.
21113 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
21114 of send_signal.
21115 (input_interrupt): Likewise.
21116
21117 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21118
21119 * server.c (get_features_xml): Check if target implemented
21120 arch_string.
21121 * win32-i386-low.c (win32_arch_string): New.
21122 (win32_target_ops): Add win32_arch_string as arch_string member.
21123
21124 2007-02-22 Markus Deuling <deuling@de.ibm.com>
21125
21126 * spu-low.c (spu_arch_string): New.
21127 (spu_target_ops): Add spu_arch_string.
21128
21129 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
21130
21131 * remote-utils.c: Remove HAVE_TERMINAL_H check.
21132 * configure.ac: Do not check for terminal.h.
21133 * configure, config.in: Regenerated.
21134
21135 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
21136
21137 * Makefile.in (OBS): Add $(XML_BUILTIN).
21138 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
21139 (clean): Update.
21140 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
21141 (arm-with-iwmmxt.c): New.
21142 * config.in, configure: Regenerate.
21143 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
21144 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
21145 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
21146 (arm*-*-linux*): Add iWMMXt and regset support.
21147 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
21148 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
21149 (arm_store_wmmxregset, target_regsets): New.
21150 * server.c (get_features_xml): Take annex argument. Check builtin
21151 XML documents.
21152 (handle_query): Handle multiple annexes.
21153
21154 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
21155
21156 * remote-utils.c [USE_WIN32API] (read, write): Define.
21157 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
21158 write.
21159
21160 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
21161
21162 * linux-i386-low.c (the_low_target): Set arch_string.
21163 * linux-x86-64-low.c (the_low_target): Likewise.
21164 * linux-low.c (linux_arch_string): New.
21165 (linux_target_ops): Add it.
21166 * linux-low.h (struct linux_target_ops): Add arch_string.
21167 * server.c (write_qxfer_response): Use const void * for DATA.
21168 (get_features_xml): New.
21169 (handle_query): Handle qXfer:features:read. Report it for qSupported.
21170 * target.h (struct target_ops): Add arch_string method.
21171
21172 2007-01-03 Denis Pilat <denis.pilat@st.com>
21173 Daniel Jacobowitz <dan@codesourcery.com>
21174
21175 * linux-low.c (linux_kill): Handle being called with no threads.
21176 * win32-i386-low.c (win32_kill): Likewise.
21177 (get_child_debug_event): Clear current_process_handle.
21178
21179 2006-12-30 Denis PILAT <denis.pilat@st.com>
21180 Daniel Jacobowitz <dan@codesourcery.com>
21181
21182 * remote-utils.c (remote_open): Check the type of specified
21183 serial port devices before opening them.
21184 * server.c (main): Kill the inferior if an error occurs during
21185 the first remote_open.
21186
21187 2006-12-05 Markus Deuling <deuling@de.ibm.com>
21188
21189 * README: Update supported targets.
21190
21191 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
21192
21193 * Makefile.in (clean): Remove reg-mips64.c.
21194 (reg-mips64.c, reg-mips64.o): New rules.
21195 * configure.srv: Handle mips64. Include regset support for mips.
21196 * linux-mips-low.c (union mips_register): New.
21197 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
21198 (mips_breakpoint, mips_breakpoint_at): Use int.
21199 (mips_collect_register, mips_supply_register)
21200 (mips_collect_register_32bit, mips_supply_register_32bit)
21201 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
21202 (mips_store_fpregset, target_regsets): New.
21203 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
21204
21205 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
21206
21207 * configure.srv: Add target "spu*-*-*".
21208 * Makefile.in (clean): Remove reg-spu.c.
21209 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
21210 * spu-low.c: New file.
21211
21212 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
21213
21214 * configure.ac: Correct td_thr_tls_get_addr test.
21215 * configure: Regenerated.
21216
21217 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
21218
21219 * linux-low.c (linux_wait_for_event): Reformat. Use the
21220 pass_signals array.
21221 * remote-utils.c (decode_address_to_semicolon): New.
21222 * server.c (pass_signals, handle_general_set): New.
21223 (handle_query): Mention QPassSignals for qSupported.
21224 (main): Call handle_general_set.
21225 * server.h (pass_signals, decode_address_to_semicolon): New.
21226
21227 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
21228
21229 * server.c (handle_query): Correct error handling for read_auxv.
21230
21231 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
21232
21233 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
21234 and srv_linux_thread_db to yes.
21235 * linux-s390-low.c (s390_fill_gregset): New function.
21236 (target_regsets): Define data structure.
21237
21238 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
21239
21240 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
21241 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
21242 * config.in, configure: Regenerated.
21243 * inferiors.c (gdb_id_to_thread): New function.
21244 (gdb_id_to_thread_id): Use it.
21245 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
21246 * linux-low.h (struct process_info): Add th member.
21247 (thread_db_get_tls_address): New prototype.
21248 * remote-utils.c (decode_address): Make non-static.
21249 * server.c (handle_query): Handle qGetTLSAddr.
21250 * server.h (gdb_id_to_thread, decode_address): New prototypes.
21251 * target.h (struct target_ops): Add get_tls_address.
21252 * thread-db.c (maybe_attach_thread): Save the thread handle.
21253 (thread_db_get_tls_address): New.
21254
21255 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
21256
21257 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
21258 (linux_resume_one_process): Take a siginfo_t *. Update all
21259 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
21260 (struct pending_signals): Add a siginfo_t.
21261 (linux_wait_for_process): Always set last_status.
21262 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
21263 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
21264 * linux-low.h (struct process_info): Add last_status.
21265
21266 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
21267
21268 * remote-utils.c (try_rle): New function.
21269 (putpkt_binary): Use it.
21270
21271 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
21272
21273 * Makefile.in (clean): Clean reg-x86-64-linux.c.
21274 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
21275 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
21276 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
21277 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
21278 point registers.
21279
21280 2006-08-08 Richard Sandiford <richard@codesourcery.com>
21281
21282 * server.c (terminal_fd): New variable.
21283 (old_foreground_pgrp): Likewise.
21284 (restore_old_foreground_pgrp): New function.
21285 (start_inferior): Record the terminal file descriptor in terminal_fd
21286 and its original foreground group in old_foreground_pgrp. Register
21287 restore_old_foreground_pgrp with atexit().
21288
21289 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
21290
21291 * server.c (handle_query): Correct qPart to qXfer.
21292
21293 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
21294
21295 * configure.ac: Check for more headers which are missing on
21296 Windows. Automatically supply -lwsock32 and USE_WIN32API.
21297 * configure.srv: Add Cygwin and mingw32.
21298 * remote-utils.c: Don't include headers unconditionally which
21299 are missing on mingw32. Include <winsock.h> for mingw32.
21300 (remote_open): Adjust for mingw32 support. Flush
21301 standard error after writing to it.
21302 (remote_close, putpkt_binary, input_interrupt, block_async_io)
21303 (unblock_async_io, enable_async_io, disable_async_io)
21304 (readchar, getpkt): Update for Winsock support.
21305 (prepare_resume_reply): Expect a protocol signal number.
21306 * server.c: Disable <sys/wait.h> on mingw32.
21307 (start_inferior): Adjust for mingw32 support. Flush
21308 standard error after writing to it.
21309 (attach_inferior): Likewise. Use protocol signal
21310 numbers.
21311 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
21312 and names.
21313 * win32-i386-low.c: New file.
21314 * Makefile.in (XM_CLIBS): Set.
21315 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
21316 (win32-i386-low.o): New dependency rule.
21317 * linux-low.c (linux_wait): Use target signal numbers.
21318 * target.h (struct target_ops): Doc fix.
21319 * server.h (target_signal_to_name): New prototype.
21320 * gdbreplay.c: Don't include headers unconditionally which
21321 are missing on mingw32. Include <winsock.h> for mingw32.
21322 (remote_close, remote_open): Adjust for Winsock support.
21323 * configure, config.in: Regenerated.
21324
21325 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
21326
21327 * server.c (decode_xfer_read, write_qxfer_response): New.
21328 (handle_query): Take a packet length argument. Handle
21329 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
21330 the qSupported response.
21331 (main): Update call to handle_query.
21332
21333 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
21334
21335 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
21336 (putpkt_binary): Renamed from putpkt and adjusted for binary
21337 data.
21338 (putpkt): New wrapper for putpkt_binary.
21339 (readchar): Don't mask off the high bit.
21340 (decode_X_packet): New function.
21341 * server.c (main): Call putpkt_binary if a handler sets the packet
21342 length. Save the length of the incoming packet. Handle 'X'.
21343 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
21344
21345 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
21346
21347 * server.c (handle_query): Handle qSupported.
21348
21349 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21350
21351 * remote-utils.c (all_symbols_looked_up): New variable.
21352 (look_up_one_symbol): Check it.
21353 * server.h (look_up_one_symbol): New declaration.
21354 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
21355
21356 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21357
21358 * Makefile.in (linux-arm-low.o): Update dependencies.
21359 * linux-arm-low.c: Include "gdb_proc_service.h".
21360 (PTRACE_GET_THREAD_AREA): Define.
21361 (ps_get_thread_area): New function.
21362
21363 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
21364
21365 * configure.srv (m68k*-*-uclinux*): New target.
21366 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
21367 (linux_resume_one_process): Remove extraneous cast.
21368 (linux_read_offsets): New.
21369 (linux_target_op): Add linux_read_offsets on mmuless systems.
21370 * server.c (handle_query): Add qOffsets logic.
21371 * target.h (struct target_ops): Add read_offsets.
21372
21373 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21374
21375 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
21376 (PTRACE_GET_THREAD_AREA): Define.
21377 (ps_get_thread_area): New function.
21378 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
21379 (linux-x86-64-low.o): Update.
21380
21381 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21382
21383 * configure.ac: Remove checks for prfpregset_t.
21384 * gdb_proc_service.h: New file.
21385 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
21386 new "gdb_proc_service.h".
21387 * proc-service.c: Likewise.
21388 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
21389 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
21390 * Makefile.in (gdb_proc_service_h): Updated.
21391 * configure, config.in: Regenerated.
21392
21393 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21394
21395 * remote-utils.c (prepare_resume_reply): Move declaration
21396 of gdb_id_from_wait to the top of the block.
21397
21398 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
21399
21400 * linux-low.c (regsets_store_inferior_registers): Read the regset
21401 from the target before filling it.
21402
21403 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
21404
21405 * server.c (attach_inferior): Return SIGTRAP for a successful
21406 attach.
21407
21408 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
21409
21410 * Makefile.in (OBS): Add version.o.
21411 (STAGESTUFF): Delete.
21412 (version.o): Add dependencies.
21413 (version.c): Replace rule.
21414 (clean): Remove version.c.
21415 * server.c (gdbserver_version): New.
21416 (gdbserver_usage): Use printf.
21417 (main): Handle --version and --help.
21418 * server.h (version, host_name): Add declarations.
21419
21420 2005-12-23 Eli Zaretskii <eliz@gnu.org>
21421
21422 * linux-arm-low.c:
21423 * linux-arm-low.c:
21424 * inferiors.c:
21425 * i387-fp.h:
21426 * i387-fp.c:
21427 * gdbreplay.c:
21428 * regcache.c:
21429 * proc-service.c:
21430 * mem-break.h:
21431 * mem-break.c:
21432 * linux-x86-64-low.c:
21433 * linux-sh-low.c:
21434 * linux-s390-low.c:
21435 * linux-ppc64-low.c:
21436 * linux-ppc-low.c:
21437 * linux-mips-low.c:
21438 * linux-m68k-low.c:
21439 * linux-m32r-low.c:
21440 * linux-low.h:
21441 * linux-low.c:
21442 * linux-ia64-low.c:
21443 * linux-i386-low.c:
21444 * linux-crisv32-low.c:
21445 * thread-db.c:
21446 * terminal.h:
21447 * target.h:
21448 * target.c:
21449 * server.h:
21450 * server.c:
21451 * remote-utils.c:
21452 * regcache.h:
21453 * utils.c:
21454 * Makefile.in:
21455 * configure.ac:
21456 * gdbserver.1: Add (C) after Copyright. Update the FSF
21457 address.
21458
21459 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
21460
21461 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
21462 (arm_breakpoint_at): Recognize both breakpoints.
21463 (the_low_target): Use the correct breakpoint instruction.
21464
21465 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
21466
21467 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
21468 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
21469 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
21470 (the_low_target): Update.
21471
21472 2005-10-25 Andreas Schwab <schwab@suse.de>
21473
21474 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
21475
21476 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
21477 (ia64_num_regs): Reduce to 462.
21478
21479 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
21480
21481 * acinclude.m4: Correct quoting.
21482 * aclocal.m4: Regenerated.
21483
21484 Suggested by SZOKOVACS Robert <szo@ies.hu>:
21485 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
21486 (thread_db_init): Call thread_db_err_str.
21487 * configure.ac: Check for TD_VERSION.
21488 * config.in, configure: Regenerated.
21489
21490 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21491
21492 * server.h (error, fatal, warning): Add ATTR_FORMAT.
21493
21494 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21495
21496 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
21497 is not available. Define HAVE_PTRACE_GETREGS if it is.
21498 * config.in, configure: Regenerated.
21499 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
21500 * linux-i386-low.c, linux-m68k-low.c: Update to use
21501 HAVE_PTRACE_GETREGS.
21502 * linux-low.c (regsets_fetch_inferior_registers)
21503 (regsets_store_inferior_registers): Only return 0 if we processed
21504 GENERAL_REGS.
21505 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
21506 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
21507
21508 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21509
21510 * inferiors.c (struct thread_info): Add gdb_id.
21511 (add_thread): Add gdb_id argument.
21512 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
21513 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
21514 calls to add_thread.
21515 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
21516 * server.c (handle_query): Use thread_to_gdb_id.
21517 (handle_v_cont, main): Use gdb_id_to_thread_id.
21518 * server.h (add_thread): Update prototype.
21519 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
21520 prototypes.
21521
21522 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21523
21524 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
21525 left-padded registers.
21526 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
21527 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
21528
21529 2005-07-01 Steve Ellcey <sje@cup.hp.com>
21530
21531 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
21532 * configure: Regenerate.
21533 * config.in: Regenerate.
21534 * server.h (NEED_DECLARATION_STRERROR):
21535 Replace with !HAVE_DECL_STRERROR.
21536
21537 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
21538
21539 * linux-low.c (linux_wait, linux_send_signal): Don't test
21540 an unsigned long variable for > 0 if it could be MAX_ULONG.
21541 * server.c (myresume): Likewise.
21542 * target.c (set_desired_inferior): Likewise.
21543
21544 2005-06-13 Mark Kettenis <kettenis@gnu.org>
21545
21546 * configure.ac: Simplify and improve check for socklen_t.
21547 * configure, config.in: Regenerate.
21548
21549 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
21550
21551 * acconfig.h: Remove.
21552 * configure.ac: Add a test for socklen_t. Use three-argument
21553 AC_DEFINE throughout.
21554 * config.in: Regenerated using autoheader 2.59.
21555 * configure: Regenerated.
21556
21557 * gdbreplay.c (socklen_t): Provide a default.
21558 (remote_open): Use socklen_t.
21559 * remote-utils.c (socklen_t): Provide a default.
21560 (remote_open): Use socklen_t.
21561 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
21562 unsigned char.
21563
21564 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
21565 char for buffers.
21566 * linux-low.c (linux_read_memory, linux_write_memory)
21567 (linux_read_auxv): Likewise.
21568 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
21569 (check_mem_write): Likewise.
21570 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
21571 Likewise.
21572 * regcache.c (struct inferior_rgcache_data, registers_to_string)
21573 (registers_from_string, register_data): Likewise.
21574 * server.c (handle_query, main): Likewise.
21575 * server.h (convert_ascii_to_int, convert_int_to_ascii)
21576 (decode_M_packet): Likewise.
21577 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
21578 * target.h (struct target_ops): Update read_memory, write_memory,
21579 and read_auxv.
21580 (read_inferior_memory, write_inferior_memory): Update.
21581 * linux-low.h (struct linux_target_ops): Change type of breakpoint
21582 to unsigned char *.
21583 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
21584 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
21585 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
21586 linux-s390-low.c, linux-sh-low.c: Update for changes in
21587 read_inferior_memory and the_low_target->breakpoint.
21588
21589 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
21590
21591 * Makefile.in (SFILES): Add linux-ppc64-low.c.
21592 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
21593 * configure.srv: Add powerpc64-*-linux*.
21594 * linux-ppc64-low.c: New file.
21595
21596 2005-05-23 Orjan Friberg <orjanf@axis.com>
21597
21598 * linux-cris-low.c: New file with support for CRIS.
21599 * linux-crisv32-low.c: Ditto for CRISv32.
21600 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
21601 (clean): Add reg-cris.c and reg-crisv32.c.
21602 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
21603 reg-crisv32.o, and reg-crisv32.c to make rules.
21604 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
21605 recognized targets.
21606
21607 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
21608
21609 * linux-low.c (fetch_register): Ensure buffer size is a multiple
21610 of sizeof (PTRACE_XFER_TYPE).
21611 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
21612
21613 2005-05-12 Orjan Friberg <orjanf@axis.com>
21614
21615 * target.h (struct target_ops): Add insert_watchpoint,
21616 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
21617 pointers for hardware watchpoint support.
21618 * linux-low.h (struct linux_target_ops): Ditto.
21619 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
21620 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
21621 to linux_target_ops.
21622 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
21623 reply packet.
21624 * server.c (main): Recognize 'Z' and 'z' packets.
21625
21626 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
21627
21628 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
21629 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
21630 (the_low_target): Add new members.
21631
21632 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21633
21634 * proc-service.c (ps_lgetregs): Search all_processes instead of
21635 all_threads.
21636
21637 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21638
21639 * server.c (start_inferior): Change return type to int.
21640 (attach_inferior): Change sigptr to int *.
21641 (handle_v_cont, handle_v_requests): Change signal to int *.
21642 (main): Change signal to int.
21643
21644 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
21645
21646 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
21647 * configure.srv: Add m32r*-*-linux*.
21648 * linux-m32r-low.c: New file.
21649
21650 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
21651
21652 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
21653
21654 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21655
21656 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
21657 Take unsigned long arguments for PIDs.
21658 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
21659 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
21660 (wait_for_sigstop, linux_resume_one_process)
21661 (regsets_fetch_inferior_registers, linux_send_signal)
21662 (linux_read_auxv): Likewise. Update the types of variables holding
21663 PIDs. Update format string specifiers.
21664 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
21665 * remote-utils.c (prepare_resume_reply): Likewise.
21666 * server.c (cont_thread, general_thread, step_thread)
21667 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
21668 unsigned long.
21669 (handle_query): Update format specifiers.
21670 (handle_v_cont, main): Use strtoul for thread IDs.
21671 * server.h (struct inferior_list_entry): Use unsigned long for ID.
21672 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
21673 (general_thread, step_thread, thread_from_wait)
21674 (old_thread_from_wait): Update.
21675 * target.h (struct thread_resume): Use unsigned long for THREAD.
21676 (struct target_ops): Use unsigned long for arguments to attach and
21677 thread_alive.
21678
21679 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
21680
21681 * acinclude.m4: Include bfd/bfd.m4 directly.
21682 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
21683 <agriffis@toolchain.org>.
21684 * aclocal.m4, configure: Regenerated.
21685
21686 2005-01-07 Andrew Cagney <cagney@gnu.org>
21687
21688 * configure.ac: Rename configure.in, require autoconf 2.59.
21689 * configure: Re-generate.
21690
21691 2004-12-08 Daniel Jacobowitz <dan@debian.org>
21692
21693 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
21694 LIBS when finished.
21695 * aclocal.m4: Regenerated.
21696 * configure: Regenerated.
21697
21698 2004-11-21 Andreas Schwab <schwab@suse.de>
21699
21700 * linux-m68k-low.c (m68k_num_gregs): Define.
21701 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
21702 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
21703 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
21704 (m68k_breakpoint_at): New. Add to the_low_target.
21705
21706 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
21707 srv_linux_thread_db to yes.
21708
21709 2004-10-20 Joel Brobecker <brobecker@gnat.com>
21710
21711 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
21712 (ARCH_SET_FS): Likewise.
21713 (ARCH_GET_FS): Likewise.
21714 (ARCH_GET_GS): Likewise.
21715
21716 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21717
21718 * linux-i386-low.c (ps_get_thread_area): New.
21719 * linux-x86-64-low.c (ps_get_thread_area): New.
21720 * linux-low.c: Include <sys/syscall.h>.
21721 (linux_kill_one_process): Don't kill the first thread here.
21722 (linux_kill): Kill the first thread here.
21723 (kill_lwp): New function.
21724 (send_sigstop, linux_send_signal): Use it.
21725 * proc-service.c: Clean up #ifdefs.
21726 (fpregset_info): Delete.
21727 (ps_lgetregs): Update and enable implementation.
21728 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
21729 implementations.
21730 * remote-utils.c (struct sym_cache, symbol_cache): New.
21731 (input_interrupt): Print a clearer message.
21732 (async_io_enabled): New variable.
21733 (enable_async_io, disable_async_io): Use it. Update comments.
21734 (look_up_one_symbol): Use the symbol cache.
21735 * thread-db.c (thread_db_look_up_symbols): New function.
21736 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
21737
21738 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21739
21740 * configure.in: Test for -rdynamic.
21741 * configure: Regenerated.
21742 * Makefile (INTERNAL_LDFLAGS): New.
21743 (gdbserver, gdbreplay): Use it.
21744
21745 2004-09-02 Andrew Cagney <cagney@gnu.org>
21746
21747 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
21748
21749 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
21750
21751 * linux-low.c (linux_wait): Clear all_processes list also.
21752
21753 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21754
21755 * linux-low.c: Include <errno.h>. Remove extern declaration of
21756 errno.
21757
21758 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21759
21760 * gdbreplay.c, server.h, utils.c: Update copyright years.
21761
21762 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21763
21764 * server.c (main): Print child status or termination signal from
21765 variable 'signal', not 'sig'.
21766
21767 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21768
21769 * linux-low.c (linux_read_memory): Change return type to
21770 int. Check for and return error from ptrace().
21771 * target.c (read_inferior_memory): Change return type to int. Pass
21772 back return status from the_target->read_memory().
21773 * target.h (struct target_ops): Adapt *read_memory() prototype.
21774 Update comment.
21775 (read_inferior_memory): Adapt prototype.
21776 * server.c (main): Return an error packet if
21777 read_inferior_memory() returns an error.
21778
21779 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
21780
21781 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
21782 Unify with other clean targets.
21783
21784 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21785
21786 * server.c (handle_v_cont): Call set_desired_inferior.
21787
21788 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21789
21790 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
21791
21792 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21793
21794 * linux-low.c (linux_wait): Unblock async I/O.
21795 (linux_resume): Block and enable async I/O.
21796 * remote-utils.c (block_async_io, unblock_async_io): New functions.
21797 * server.h (block_async_io, unblock_async_io): Add prototypes.
21798
21799 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21800
21801 * remote-utils.c (remote_open): Print a status notice after
21802 opening a TCP port.
21803 * server.c (attach_inferior): Print a status notice after
21804 attaching.
21805
21806 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21807
21808 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
21809
21810 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
21811
21812 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
21813 error packet.
21814 * server.c, target.h: Update copyright years.
21815
21816 2004-02-25 Roland McGrath <roland@redhat.com>
21817
21818 * target.h (struct target_ops): New member `read_auxv'.
21819 * server.c (handle_query): Handle qPart:auxv:read: query using that.
21820 * linux-low.c (linux_read_auxv): New function.
21821 (linux_target_ops): Initialize `read_auxv' member to that.
21822
21823 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
21824
21825 Committed by Jim Blandy <jimb@redhat.com>.
21826
21827 * linux-s390-low.c (s390_num_regs): Update.
21828 (s390_regmap): Remove control registers. Use __s390x__ predefine
21829 instead of GPR_SIZE to distiguish s390 and s390x targets.
21830
21831 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
21832
21833 * linux-low.c: Update copyright year.
21834 (check_removed_breakpoint): Clear pending_is_breakpoint.
21835 (linux_set_resume_request, linux_queue_one_thread)
21836 (resume_status_pending_p): New functions.
21837 (linux_continue_one_thread): Use process->resume.
21838 (linux_resume): Only resume threads if there are no pending events.
21839 * linux-low.h (struct process_info): Add resume request
21840 pointer.
21841
21842 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
21843
21844 * regcache.c (new_register_cache): Clear the allocated register
21845 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
21846
21847 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
21848
21849 * linux-low.c (linux_resume): Take a struct thread_resume *
21850 argument.
21851 (linux_wait): Update call.
21852 (resume_ptr): New static variable.
21853 (linux_continue_one_thread): Renamed from
21854 linux_continue_one_process. Use resume_ptr.
21855 (linux_resume): Use linux_continue_one_thread.
21856 * server.c (handle_v_cont, handle_v_requests): New functions.
21857 (myresume): New function.
21858 (main): Handle 'v' case.
21859 * target.h (struct thread_resume): New type.
21860 (struct target_ops): Change argument of "resume" to struct
21861 thread_resume *.
21862 (myresume): Delete macro.
21863
21864 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
21865
21866 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
21867 (uninstall): Support DESTDIR.
21868
21869 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
21870
21871 * configure.srv: Add xscale*linux copy of arm*linux entry.
21872
21873 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
21874
21875 * linux-arm-low.c (arm_reinsert_addr): New function.
21876 (the_low_target): Add arm_reinsert_addr.
21877
21878 2003-07-08 Mark Kettenis <kettenis@gnu.org>
21879
21880 * mem-break.c: Remove whitespace at end of file.
21881
21882 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
21883
21884 * configure.in: Check whether we need to prototype strerror.
21885 * server.h: Optionally prototype strerror.
21886 * gdbreplay.c (perror_with_name): Use strerror.
21887 * linux-low.c (linux_attach_lwp): Use strerror.
21888 * utils.c (perror_with_name): Use strerror.
21889 * config.in, configure: Regenerated.
21890
21891 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
21892
21893 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
21894 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
21895
21896 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
21897
21898 * Makefile.in (SFILES): Update.
21899 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
21900 low-sun3.c: Remove files.
21901
21902 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
21903
21904 * linux-low.c: Move comment to linux_thread_alive where it belonged.
21905 (linux_detach_one_process, linux_detach): New functions.
21906 (linux_target_ops): Add linux_detach.
21907 * server.c (main): Handle 'D' packet.
21908 * target.h (struct target_ops): Add "detach" member.
21909 (detach_inferior): Define.
21910
21911 2003-06-13 Mark Kettenis <kettenis@gnu.org>
21912
21913 From Kelley Cook <kelleycook@wideopenwest.com>:
21914 * configure.srv: Accept i[34567]86 variants.
21915
21916 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
21917
21918 * linux-low.c (linux_wait_for_event): Correct comment typos.
21919 (linux_resume_one_process): Call check_removed_breakpoint.
21920 (linux_send_signal): New function.
21921 (linux_target_ops): Add linux_send_signal.
21922 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
21923 of kill.
21924 * target.h (struct target_ops): Add send_signal.
21925
21926 2003-05-29 Jim Blandy <jimb@redhat.com>
21927
21928 * linux-low.c (usr_store_inferior_registers): Transfer buf in
21929 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
21930 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
21931 away part of the register's value.
21932
21933 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
21934
21935 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
21936 (linux_wait_for_event, linux_init_signals): Likewise.
21937
21938 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
21939
21940 * configure.in: Check for stdlib.h.
21941 * configure: Regenerated.
21942 * config.in: Regenerated.
21943
21944 2003-01-04 Andreas Schwab <schwab@suse.de>
21945
21946 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
21947
21948 2003-01-02 Andrew Cagney <ac131313@redhat.com>
21949
21950 * Makefile.in: Remove obsolete code.
21951
21952 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
21953
21954 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
21955 defined(PT_FPR0_HI).
21956
21957 2002-11-17 Stuart Hughes <seh@zee2.com>
21958
21959 * linux-arm-low.c (arm_num_regs): Increase.
21960 (arm_regmap): Include status register.
21961
21962 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
21963
21964 * linux-low.c (register_addr): Remove incorrect -1 check.
21965
21966 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
21967
21968 * linux-low.c (linux_create_inferior): Call setpgid. Return
21969 the new PID.
21970 (unstopped_p, linux_signal_pid): Remove.
21971 (linux_target_ops): Remove linux_signal_pid.
21972 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
21973 global instead of target method.
21974 * target.h (struct target_ops): Remove signal_pid. Update comment
21975 for create_inferior.
21976 * server.c (signal_pid): New variable.
21977 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
21978 gdbserver. Set the child to be the foreground process group.
21979 (attach_inferior): Set signal_pid.
21980
21981 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
21982
21983 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
21984
21985 2002-08-20 Jim Blandy <jimb@redhat.com>
21986
21987 * Makefile.in (LDFLAGS): Allow the configure script to establish a
21988 default for this.
21989
21990 2002-08-01 Andrew Cagney <cagney@redhat.com>
21991
21992 * Makefile.in: Make chill references obsolete.
21993
21994 2002-07-24 Kevin Buettner <kevinb@redhat.com>
21995
21996 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
21997 * configure: Regenerate.
21998 * config.in: Regenerate.
21999
22000 2002-07-09 David O'Brien <obrien@FreeBSD.org>
22001
22002 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
22003 (perror_with_name, remote_close, remote_open, expect, play): Static.
22004
22005 2002-07-04 Michal Ludvig <mludvig@suse.cz>
22006
22007 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
22008 byte offsets instead of an array of indexes.
22009 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
22010
22011 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
22012
22013 * regcache.c: Add comment.
22014
22015 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
22016
22017 * thread-db.c: New file.
22018 * proc-service.c: New file.
22019 * acinclude.m4: New file.
22020 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
22021 proc-service.o, and thread-db.o.
22022 (linux-low.o): Add USE_THREAD_DB.
22023 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
22024 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
22025 * aclocal.m4: Regenerated.
22026 * config.in: Regenerated.
22027 * configure: Regenerated.
22028 * configure.in: Check for proc_service.h, sys/procfs.h,
22029 thread_db.h, and linux/elf.h headrs.
22030 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
22031 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
22032 Check for -lthread_db and thread support.
22033 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
22034 PowerPC, and SuperH.
22035 * i387-fp.c: Constify arguments.
22036 * i387-fp.h: Likewise.
22037 * inferiors.c: (struct thread_info): Renamed from
22038 `struct inferior_info'. Remove PID member. Use generic inferior
22039 list header. All uses updated.
22040 (inferiors, signal_pid): Removed.
22041 (all_threads): New variable.
22042 (get_thread): Define.
22043 (add_inferior_to_list): New function.
22044 (for_each_inferior): New function.
22045 (change_inferior_id): New function.
22046 (add_inferior): Removed.
22047 (remove_inferior): New function.
22048 (add_thread): New function.
22049 (free_one_thread): New function.
22050 (remove_thread): New function.
22051 (clear_inferiors): Use for_each_inferior and free_one_thread.
22052 (find_inferior): New function.
22053 (find_inferior_id): New function.
22054 (inferior_target_data): Update argument type.
22055 (set_inferior_target_data): Likewise.
22056 (inferior_regcache_data): Likewise.
22057 (set_inferior_regcache_data): Likewise.
22058 * linux-low.c (linux_bp_reinsert): Remove.
22059 (all_processes, stopping_threads, using_thrads)
22060 (struct pending_signals, debug_threads, pid_of): New.
22061 (inferior_pid): Replace with macro.
22062 (struct inferior_linux_data): Remove.
22063 (get_stop_pc, add_process): New functions.
22064 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
22065 Use add_process and add_thread.
22066 (linux_attach_lwp): New function, based on old linux_attach. Use
22067 add_process and add_thread. Set stop_expected for new threads.
22068 (linux_attach): New function.
22069 (linux_kill_one_process): New function.
22070 (linux_kill): Kill all LWPs.
22071 (linux_thread_alive): Use find_inferior_id.
22072 (check_removed_breakpoints, status_pending_p): New functions.
22073 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
22074 Update. Use WNOHANG. Wait for cloned processes also. Update process
22075 struct for the found process.
22076 (linux_wait_for_event): New function.
22077 (linux_wait): Use it. Support LWPs.
22078 (send_sigstop, wait_for_sigstop, stop_all_processes)
22079 (linux_resume_one_process, linux_continue_one_process): New functions.
22080 (linux_resume): Support LWPs.
22081 (REGISTER_RAW_SIZE): Remove.
22082 (fetch_register): Use register_size instead. Call supply_register.
22083 (usr_store_inferior_registers): Likewise. Call collect_register.
22084 Fix recursive case.
22085 (regsets_fetch_inferior_registers): Improve error message.
22086 (regsets_store_inferior_registers): Add debugging.
22087 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
22088 (unstopped_p, linux_signal_pid): New functions.
22089 (linux_target_ops): Add linux_signal_pid.
22090 (linux_init_signals): New function.
22091 (initialize_low): Call it. Initialize using_threads.
22092 * regcache.c (inferior_regcache_data): Add valid
22093 flag.
22094 (get_regcache): Fetch registers lazily. Add fetch argument
22095 and update all callers.
22096 (regcache_invalidate_one, regcache_invalidate): New
22097 functions.
22098 (new_register_cache): Renamed from create_register_cache.
22099 Return the new regcache.
22100 (free_register_cache): Change argument to a void *.
22101 (registers_to_string, registers_from_string): Call get_regcache
22102 with fetch flag set.
22103 (register_data): Make static. Pass fetch flag to get_regcache.
22104 (supply_register): Call get_regcache with fetch flag clear.
22105 (collect_register): Call get_regcache with fetch flag set.
22106 (collect_register_as_string): New function.
22107 * regcache.h: Update.
22108 * remote-utils.c (putpkt): Flush after debug output and use
22109 stderr.
22110 Handle input interrupts while waiting for an ACK.
22111 (input_interrupt): Use signal_pid method.
22112 (getpkt): Flush after debug output and use stderr.
22113 (outreg): Use collect_register_as_string.
22114 (new_thread_notify, dead_thread_notify): New functions.
22115 (prepare_resume_reply): Check using_threads. Set thread_from_wait
22116 and general_thread.
22117 (look_up_one_symbol): Flush after debug output.
22118 * server.c (step_thread, server_waiting): New variables.
22119 (start_inferior): Don't use signal_pid. Update call to mywait.
22120 (attach_inferior): Update call to mywait.
22121 (handle_query): Handle qfThreadInfo and qsThreadInfo.
22122 (main): Don't fetch/store registers explicitly. Use
22123 set_desired_inferior. Support proposed ``Hs'' packet. Update
22124 calls to mywait.
22125 * server.h: Update.
22126 (struct inferior_list, struct_inferior_list_entry): New.
22127 * target.c (set_desired_inferior): New.
22128 (write_inferior_memory): Constify.
22129 (mywait): New function.
22130 * target.h: Update.
22131 (struct target_ops): New signal_pid method.
22132 (mywait): Removed macro, added prototype.
22133
22134 * linux-low.h (regset_func): Removed.
22135 (regset_fill_func, regset_store_func): New.
22136 (enum regset_type): New.
22137 (struct regset_info): Add type field. Use new operation types.
22138 (struct linux_target_ops): stop_pc renamed to get_pc.
22139 Add decr_pc_after_break and breakpoint_at.
22140 (get_process, get_thread_proess, get_process_thread)
22141 (strut process_info, all_processes, linux_attach_lwp)
22142 (thread_db_init): New.
22143
22144 * linux-arm-low.c (arm_get_pc, arm_set_pc,
22145 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
22146 (the_low_target): Add new members.
22147 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
22148 (i386_store_fpxregset): Constify.
22149 (target_regsets): Add new kind identifier.
22150 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
22151 (i386_set_pc): Add debugging.
22152 (i386_breakpoint_at): New function.
22153 (the_low_target): Add new members.
22154 * linux-mips-low.c (mips_get_pc, mips_set_pc)
22155 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
22156 (mips_breakpoint_at): New.
22157 (the_low_target): Add new members.
22158 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
22159 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
22160 (the_low_target): Add new members.
22161 * linux-sh-low.c (sh_get_pc, sh_set_pc)
22162 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
22163 (the_low_target): Add new members.
22164 * linux-x86-64-low.c (target_regsets): Add new kind
22165 identifier.
22166
22167 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
22168
22169 From Martin Pool <mbp@samba.org>:
22170 * server.c (gdbserver_usage): New function.
22171 (main): Call it.
22172
22173 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
22174
22175 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
22176 stop_at -> stop_pc.
22177
22178 2002-05-04 Andrew Cagney <ac131313@redhat.com>
22179
22180 * Makefile.in: Remove obsolete code.
22181
22182 2002-04-24 Michal Ludvig <mludvig@suse.cz>
22183
22184 * linux-low.c (regsets_fetch_inferior_registers),
22185 (regsets_store_inferior_registers): Removed cast to int from
22186 ptrace() calls.
22187 * regcache.h: Added declaration of struct inferior_info.
22188
22189 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
22190
22191 * inferiors.c (struct inferior_info): Add regcache_data.
22192 (add_inferior): Call create_register_cache.
22193 (clear_inferiors): Call free_register_cache.
22194 (inferior_regcache_data, set_inferior_regcache_data): New functions.
22195 * regcache.c (struct inferior_regcache_data): New.
22196 (registers): Remove.
22197 (get_regcache): New function.
22198 (create_register_cache, free_register_cache): New functions.
22199 (set_register_cache): Don't initialize the register cache here.
22200 (registers_to_string, registers_from_string, register_data): Call
22201 get_regcache.
22202 * regcache.h: Add prototypes.
22203 * server.h: Likewise.
22204
22205 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
22206
22207 * mem-break.c: New file.
22208 * mem-break.h: New file.
22209 * Makefile.in: Add mem-break.o rule; update server.h
22210 dependencies.
22211 * inferiors.c (struct inferior_info): Add target_data
22212 member.
22213 (clear_inferiors): Free target_data member if set.
22214 (inferior_target_data, set_inferior_target_data): New functions.
22215 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
22216 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
22217 * linux-low.c (linux_bp_reinsert): New variable.
22218 (struct inferior_linux_data): New.
22219 (linux_create_inferior): Use set_inferior_target_data.
22220 (linux_attach): Likewise. Call add_inferior.
22221 (linux_wait_for_one_inferior): New function.
22222 (linux_wait): Call it.
22223 (linux_write_memory): Add const.
22224 (initialize_low): Call set_breakpoint_data.
22225 * linux-low.h (struct linux_target_ops): Add breakpoint
22226 handling members.
22227 * server.c (attach_inferior): Remove extra add_inferior
22228 call.
22229 * server.h: Include mem-break.h. Update inferior.c
22230 prototypes.
22231 * target.c (read_inferior_memory)
22232 (write_inferior_memory): New functions.
22233 * target.h (read_inferior_memory)
22234 (write_inferior_memory): Change macros to prototypes.
22235 (struct target_ops): Update comments. Add const to write_memory
22236 definition.
22237
22238 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
22239
22240 * linux-low.c (usr_store_inferior_registers): Support
22241 registers which are allowed to fail to store.
22242 * linux-low.h (linux_target_ops): Likewise.
22243 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
22244 (ppc_cannot_store_register): FPSCR may not be storable.
22245
22246 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22247
22248 * server.h: Include <string.h> if HAVE_STRING_H.
22249 * ChangeLog: Correct paths in last ChangeLog entry.
22250
22251 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22252
22253 * linux-low.h: Remove obsolete prototypes.
22254 (struct linux_target_ops): New.
22255 (extern the_low_target): New.
22256 * linux-low.c (num_regs, regmap): Remove declarations.
22257 (register_addr): Use the_low_target explicitly.
22258 (fetch_register): Likewise.
22259 (usr_fetch_inferior_registers): Likewise.
22260 (usr_store_inferior_registers): Likewise.
22261 * linux-arm-low.c (num_regs): Remove.
22262 (arm_num_regs): Define.
22263 (arm_regmap): Renamed from regmap, made static.
22264 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
22265 made static.
22266 (arm_cannot_store_register): Renamed from cannot_store_register,
22267 made static.
22268 (the_low_target): New.
22269 * linux-i386-low.c (num_regs): Remove.
22270 (i386_num_regs): Define.
22271 (i386_regmap): Renamed from regmap, made static.
22272 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
22273 made static.
22274 (i386_cannot_store_register): Renamed from cannot_store_register,
22275 made static.
22276 (the_low_target): New.
22277 * linux-ia64-low.c (num_regs): Remove.
22278 (ia64_num_regs): Define.
22279 (ia64_regmap): Renamed from regmap, made static.
22280 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
22281 made static.
22282 (ia64_cannot_store_register): Renamed from cannot_store_register,
22283 made static.
22284 (the_low_target): New.
22285 * linux-m68k-low.c (num_regs): Remove.
22286 (m68k_num_regs): Define.
22287 (m68k_regmap): Renamed from regmap, made static.
22288 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
22289 made static.
22290 (m68k_cannot_store_register): Renamed from cannot_store_register,
22291 made static.
22292 (the_low_target): New.
22293 * linux-mips-low.c (num_regs): Remove.
22294 (mips_num_regs): Define.
22295 (mips_regmap): Renamed from regmap, made static.
22296 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
22297 made static.
22298 (mips_cannot_store_register): Renamed from cannot_store_register,
22299 made static.
22300 (the_low_target): New.
22301 * linux-ppc-low.c (num_regs): Remove.
22302 (ppc_num_regs): Define.
22303 (ppc_regmap): Renamed from regmap, made static.
22304 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
22305 made static.
22306 (ppc_cannot_store_register): Renamed from cannot_store_register,
22307 made static.
22308 (the_low_target): New.
22309 * linux-s390-low.c (num_regs): Remove.
22310 (s390_num_regs): Define.
22311 (s390_regmap): Renamed from regmap, made static.
22312 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
22313 made static.
22314 (s390_cannot_store_register): Renamed from cannot_store_register,
22315 made static.
22316 (the_low_target): New.
22317 * linux-sh-low.c (num_regs): Remove.
22318 (sh_num_regs): Define.
22319 (sh_regmap): Renamed from regmap, made static.
22320 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
22321 made static.
22322 (sh_cannot_store_register): Renamed from cannot_store_register,
22323 made static.
22324 (the_low_target): New.
22325 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
22326 (the_low_target): New.
22327
22328 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22329
22330 * Makefile.in: Add stamp-h target.
22331 * configure.in: Create stamp-h.
22332 * configure: Regenerated.
22333
22334 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22335
22336 * inferiors.c: New file.
22337 * target.c: New file.
22338 * target.h: New file.
22339 * Makefile.in: Add target.o and inferiors.o. Update
22340 dependencies.
22341 * linux-low.c (inferior_pid): New static variable,
22342 moved from server.c.
22343 (linux_create_inferior): Renamed from create_inferior.
22344 Call add_inferior. Return 0 on success instead of a PID.
22345 (linux_attach): Renamed from myattach.
22346 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
22347 (linux_thread_alive): Renamed from mythread_alive.
22348 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
22349 child dies.
22350 (linux_resume): Renamed from myresume. Add missing ``return 0''.
22351 (regsets_store_inferior_registers): Correct error message.
22352 Add missing ``return 0''.
22353 (linux_fetch_registers): Renamed from fetch_inferior_registers.
22354 (linux_store_registers): Renamed from store_inferior_registers.
22355 (linux_read_memory): Renamed from read_inferior_memory.
22356 (linux_write_memory): Renamed from write_inferior_memory.
22357 (linux_target_ops): New structure.
22358 (initialize_low): Call set_target_ops ().
22359 * remote-utils.c (unhexify): New function.
22360 (hexify): New function.
22361 (input_interrupt): Send signals to ``signal_pid''.
22362 * server.c (inferior_pid): Remove.
22363 (start_inferior): Update create_inferior call.
22364 (attach_inferior): Call add_inferior.
22365 (handle_query): New function.
22366 (main): Call handle_query for `q' packets.
22367 * server.h: Include "target.h". Remove obsolete prototypes.
22368 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
22369
22370 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22371
22372 * Makefile.in: Add WARN_CFLAGS. Update configury
22373 dependencies.
22374 * configure.in: Check for <string.h>
22375 * configure: Regenerate.
22376 * config.in: Regenerate.
22377 * gdbreplay.c: Include needed system headers.
22378 (remote_open): Remove strchr prototype.
22379 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
22380 * regcache.c (supply_register): Change buf argument to const void *.
22381 (supply_register_by_name): Likewise.
22382 (collect_register): Change buf argument to void *.
22383 (collect_register_by_name): Likewise.
22384 * regcache.h: Add missing prototypes.
22385 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
22386 * server.c (handle_query): New function.
22387 (attached): New static variable, moved out of main.
22388 (main): Quiet longjmp clobber warnings.
22389 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
22390 * utils.c (error): Remove NORETURN.
22391 (fatal): Likewise.
This page took 0.467398 seconds and 5 git commands to generate.