e93e4eab9b5a1ff4a2b5e2d9d508a574664c775b
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-10-13 Kamil Rytarowski <n54@gmx.com>x
2
3 * netbsd-low.cc (netbsd_tdesc): Remove.
4 (netbsd_add_process): Likewise.
5 (netbsd_process_target::create_inferior): Update.
6
7 2020-10-09 Andrew Burgess <andrew.burgess@embecosm.com>
8
9 * linux-arc-low.cc (arc_linux_read_description): Release the
10 unique_ptr returned from arc_create_target_description.
11
12 2020-10-09 Andrew Burgess <andrew.burgess@embecosm.com>
13
14 * Makefile.in: Include Makefile.gnulib.inc. Don't define LIBGNU
15 or INCGNU. Make use of LIBGNU_EXTRA_LIBS when linking.
16
17 2020-10-08 Andrew Burgess <andrew.burgess@embecosm.com>
18
19 * linux-low.cc (linux_process_target::handle_extended_wait):
20 Release the unique_ptr returned from allocate_target_description.
21 * linux-riscv-low.cc (riscv_target::low_arch_setup): Likewise.
22 * linux-x86-low.cc (tdesc_amd64_linux_no_xml): Change type.
23 (tdesc_i386_linux_no_xml): Change type.
24 (x86_linux_read_description): Borrow pointer from unique_ptr
25 object.
26 (x86_target::get_ipa_tdesc_idx): Likewise.
27 (initialize_low_arch): Likewise.
28 * tdesc.cc (allocate_target_description): Update return type.
29
30 2020-10-07 Tom Tromey <tromey@adacore.com>
31
32 * server.cc (handle_search_memory): Remove dead code.
33
34 2020-10-07 Tom Tromey <tromey@adacore.com>
35
36 * server.cc (handle_search_memory_1): Remove.
37 (handle_search_memory): Use simple_search_memory.
38
39 2020-10-07 Simon Marchi <simon.marchi@efficios.com>
40
41 * Makefile.in (COMPILE): Add CXXFLAGS.
42 (INTERNAL_CFLAGS_BASE): Remove CXXFLAGS.
43 (gdbserver$(EXEEXT)): Add CXXFLAGS.
44 (gdbreplay$(EXEEXT)): Add CXXFLAGS.
45 ($(IPA_LIB)): Add CXXFLAGS.
46 (IPAGENT_COMPILE): Add CXXFLAGS.
47
48 2020-10-07 Anton Kolesov <anton.kolesov@synopsys.com>
49
50 * configure.srv: Support ARC architecture.
51 * Makefile.in: Add linux-arc-low.cc and arch/arc.o.
52 * linux-arc-low.cc: New file.
53
54 2020-10-07 Kamil Rytarowski <n54@gmx.com>
55
56 * netbsd-low.cc (get_dynamic, get_r_debug, read_one_ptr)
57 (netbsd_qxfer_libraries_svr4): Remove "target" argument and update.
58 (netbsd_process_target::qxfer_libraries_svr4): Update.
59
60 2020-10-07 Kamil Rytarowski <n54@gmx.com>
61
62 * netbsd-low.cc: Fix whitespace formatting.
63 * netbsd-amd64-low.cc: Likewise.
64
65 2020-10-07 Kamil Rytarowski <n54@gmx.com>
66
67 * netbsd-low.cc (netbsd_process_target::read_memory)
68 (netbsd_process_target::write_memory): Update.
69
70 2020-10-07 Kamil Rytarowski <n54@gmx.com>
71
72 * netbsd-aarch64-low.cc: Add.
73 * Makefile.in (SFILES): Register "netbsd-aarch64-low.c".
74 * configure.srv: Add aarch64*-*-netbsd*.
75
76 2020-10-06 Shahab Vahedi <shahab@synopsys.com>
77
78 * regcache.cc (register_data): Remove unused "fetch" argument.
79
80 2020-10-02 Simon Marchi <simon.marchi@polymtl.ca>
81
82 * server.cc (handle_monitor_command): Handle "set
83 debug-event-loop".
84 (captured_main): Handle "--debug-event-loop".
85 (monitor_show_help): Mention new setting.
86 (gdbserver_usage): Mention new flag.
87
88 2020-10-02 Simon Marchi <simon.marchi@polymtl.ca>
89
90 * linux-low.cc (linux_process_target::async): Pass name to
91 add_file_handler.
92 * remote-utils.cc (handle_accept_event): Likewise.
93 (remote_open): Likewise.
94
95 2020-10-01 Kamil Rytarowski <n54@gmx.com>
96
97 * netbsd-i386-low.cc: Add.
98 * Makefile.in (SFILES): Register "netbsd-i386-low.c".
99 * configure.srv: Add i[34567]86-*-netbsd*.
100
101 2020-10-01 Kamil Rytarowski <n54@gmx.com>
102
103 * netbsd-amd64-low.cc (netbsd_x86_64_arch_setup): Remove.
104 (netbsd_target_regsets): Now const.
105 (the_low_target): Remove.
106 (class netbsd_amd64_target, the_netbsd_amd64_target)
107 (the_netbsd_target): Add.
108 * netbsd-low.cc (netbsd_process_target::post_create_inferior): Call
109 low_arch_setup ().
110 (netbsd_process_target::fetch_registers)
111 (netbsd_process_target::store_registers, initialize_low): Update.
112 (the_netbsd_target): Remove.
113 * netbsd-low.h (netbsd_target_regsets, netbsd_target_ops)
114 (the_low_target, netbsd_tdesc): Remove.
115 (netbsd_process_target::get_regs_info)
116 (netbsd_process_target::low_arch_setup): Add.
117
118 2020-09-23 Hannes Domani <ssbssa@yahoo.de>
119
120 * win32-low.cc: Remove local wow64_process variable.
121 * win32-low.h: Remove local wow64_process variable.
122
123 2020-09-18 Tom Tromey <tromey@adacore.com>
124
125 * netbsd-low.h (class netbsd_process_target) <wait>: Update.
126 * netbsd-low.cc (netbsd_waitpid, netbsd_wait)
127 (netbsd_process_target::wait): Change type of target_options.
128 * win32-low.h (class win32_process_target) <wait>: Update.
129 * win32-low.cc (win32_process_target::wait): Update.
130 * target.h (class process_stratum_target) <wait>: Update.
131 (mywait): Update.
132 * target.cc (mywait, target_wait): Change type of "options".
133 * linux-low.h (class linux_process_target) <wait, wait_1>:
134 Update.
135 * linux-low.cc (linux_process_target::wait)
136 (linux_process_target::wait_1): Update.
137
138 2020-09-15 Tom Tromey <tromey@adacore.com>
139
140 * linux-x86-low.cc (xmltarget_i386_linux_no_xml)
141 (xmltarget_amd64_linux_no_xml): Now arrays.
142
143 2020-09-14 Tom Tromey <tromey@adacore.com>
144
145 * tracepoint.cc (eval_result_names): Now const.
146 * ax.cc (gdb_agent_op_names): Now const.
147
148 2020-09-10 Kamil Rytarowski <n54@gmx.com>
149
150 * netbsd-low.cc: Add.
151 * netbsd-low.h: Likewise.
152 * netbsd-amd64-low.cc: Likewise.
153 * Makefile.in (SFILES): Register "netbsd-low.cc", "netbsd-low.h",
154 "netbsd-amd64-low.cc".
155 * configure.srv: Add x86_64-*-netbsd*.
156
157 2020-08-13 Simon Marchi <simon.marchi@polymtl.ca>
158
159 * server.cc (captured_main): Accept multiple `--selftest=`
160 options. Pass all `--selftest=` arguments to run_tests.
161
162 2020-07-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
163
164 * configure, config.in: Regenerate.
165
166 2020-07-26 Eli Zaretskii <eliz@gnu.org>
167
168 * configure.ac (AC_CHECK_HEADERS): Add ws2tcpip.h.
169 When checking whether socklen_t type is defined, use ws2tcpip.h if
170 it is available and sys/socket.h isn't.
171 * configure: Regenerate.
172 * config.in: Regenerate.
173
174 2020-07-22 Pedro Alves <pedro@palves.net>
175
176 * inferiors.cc (switch_to_process): New, moved here from
177 thread-db.cc, and made extern.
178 * inferiors.h (switch_to_process): Declare.
179 * server.cc: Include "gdbsupport/scoped_restore.h".
180 (handle_qxfer_threads_proper): Now returns bool. Prepare to
181 access memory around target calls.
182 (handle_qxfer_threads): Handle errors.
183 * thread-db.cc (switch_to_process): Moved to inferiors.cc.
184
185 2020-07-21 Simon Marchi <simon.marchi@efficios.com>
186
187 * linux-low.cc (stopped_pids): Make static.
188
189 2020-07-17 Andrew Burgess <andrew.burgess@embecosm.com>
190
191 * tdesc.cc (allocate_target_description): Add header comment.
192 (target_desc_deleter::operator()): New function.
193 * tdesc.h (struct target_desc): Declare as final.
194
195 2020-07-13 Simon Marchi <simon.marchi@polymtl.ca>
196
197 * server.cc (handle_query): Use std::vector of
198 std::string for `qsupported` vector. Use separate
199 vector for unknowns.
200 * target.h (class process_stratum_target) <process_qsupported>:
201 Change parameters to array_view of const char *.
202 (target_process_qsupported): Remove `count` parameter.
203 * target.cc (process_stratum_target::process_qsupported): Change
204 parameters to array_view of const char *.
205 * linux-x86-low.cc (class x86_target) <process_qsupported>:
206 Likewise.
207
208 2020-06-29 Tom de Vries <tdevries@suse.de>
209
210 * ax.h: Include gdbsupport/debug_agent.h.
211
212 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
213
214 * tdesc.cc (struct tdesc_compatible_info): New struct.
215 (tdesc_compatible_info_list): New function.
216 (tdesc_compatible_info_arch_name): New function.
217
218 2020-06-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
219
220 Use std::list to stop pending signal instead of manually-created
221 linked list.
222 * linux-low.h: Include <list>.
223 (struct pending_signal): Move here from linux-low.cc.
224 (struct lwp_info) <pending_signals>
225 <pending_signals_to_report>: Update the type.
226 * linux-low.cc (struct pending_signals): Remove.
227 (linux_process_target::delete_lwp)
228 (linux_process_target::add_lwp)
229 (enqueue_one_deferred_signal)
230 (dequeue_one_deferred_signal)
231 (enqueue_pending_signal)
232 (linux_process_target::resume_one_lwp_throw)
233 (linux_process_target::thread_needs_step_over)
234 (linux_process_target::resume_one_thread)
235 (linux_process_target::proceed_one_lwp): Update the use of pending
236 signal list.
237
238 2020-06-17 Simon Marchi <simon.marchi@efficios.com>
239
240 * Makefile.in (%-generated.cc: ../gdb/regformats/arm/%.dat):
241 Remove.
242
243 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
244
245 * Makefile.in (SFILES): Remove win32-arm-low.cc, wincecompat.cc.
246 * configure.srv: Remove mingw32ce cases.
247 * server.h, win32-low.cc: Remove __MINGW32CE__-guarded code.
248 * win32-low.h (to_back_slashes): Remove.
249 * win32-arm-low.cc, wincecompat.cc, wincecompat.h: Remove.
250
251 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
252
253 * Makefile.in (SFILES): linux-tile-low.cc.
254 * configure.srv: Remove tilegx case.
255 * linux-tile-low.cc: Remove.
256
257 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
258
259 * Makefile.in (SFILES): Remove linux-m32r-low.cc.
260 * configure.srv: Remove m32r case.
261 * linux-m32r-low.cc: Remove.
262
263 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
264
265 * Makefile.in (SFILES): Remove linux-cris-low.c.
266 * configure.srv: Remove cris cases.
267 * linux-cris-low.cc, linux-crisv32-low.cc: Remove.
268
269 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
270
271 * Makefile.in (SFILES): Remove linux-bfin-low.c.
272 * configure.srv: Remove bfin case.
273 * linux-bfin-low.cc: Remove.
274 * linux-low.cc: Remove BFIN-conditional code.
275
276 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
277
278 * configure: Re-generate.
279 * configure.ac: Remove srv_qnx test.
280 * configure.srv: Remove nto case.
281 * nto-low.cc, nto-low.h, nto-x86-low.cc: Remove.
282 * remote-utils.c: Remove __QNX__-guarded code.
283
284 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
285
286 * configure: Re-generate.
287 * configure.ac: Remove srv_lynxos test.
288 * configure.srv: Remove lynxos cases.
289 * lynx-i386-low.cc, lynx-low.cc, lynx-low.h, lynx-ppc-low.c:
290 Remove.
291
292 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
293
294 * README: Fix a few outdated or incoherent things.
295
296 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
297
298 * win32-low.cc (do_initial_child_stuff): Set open_process_used.
299 (win32_clear_inferiors): Use open_process_used.
300 (get_child_debug_event): Likewise.
301
302 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
303
304 PR gdbserver/25893
305 * linux-low.cc (linux_process_target::create_inferior),
306 lynx-low.cc (lynx_process_target::create_inferior),
307 win32-low.cc (win32_process_target::create_inferior): Use
308 construct_inferior_arguments instead of stringify_argv
309 to get string representation which properly escapes
310 special characters.
311 * server.cc (handle_v_run): Just pass empty program arg
312 as such, since any further processing is now handled via
313 construct_inferior_arguments.
314
315 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
316
317 * nto-low.cc (nto_process_target::create_inferior): Pass
318 argv to spawnp function as char **.
319
320 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
321
322 * server.cc (captured_main), (handle_v_run): No longer
323 insert extra NULL element to args vector.
324
325 2020-05-23 Pedro Alves <palves@redhat.com>
326
327 * gdb-safe-ctype.h: New.
328
329 2020-05-16 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
330
331 * linux-ia64-low.cc (ia64_target::sw_breakpoint_from_kind):
332 Fix incorrect 'gdb_assert_no_reached' to 'gdb_assert_not_reached'.
333 (ia64_target::low_breakpoint_at): Ditto.
334
335 2020-05-15 Hannes Domani <ssbssa@yahoo.de>
336
337 * win32-i386-low.cc (i386_supports_z_point_type): Handle
338 Z_PACKET_HW_BP z_type.
339 (i386_insert_point): Handle raw_bkpt_type type.
340 (i386_remove_point): Likewise.
341
342 2020-04-30 Hannes Domani <ssbssa@yahoo.de>
343
344 * configure.srv <x86_64-*-mingw*, x86_64-*-cygwin*> (srv_tgtobj):
345 Add arch/i386.o.
346 * win32-arm-low.cc (arm_num_regs): New function.
347 (struct win32_target_ops): Use arm_num_regs.
348 * win32-i386-low.cc (win32_get_current_dr): Adapt for WOW64
349 processes.
350 (i386_get_thread_context): Likewise.
351 (i386_prepare_to_resume): Likewise.
352 (i386_thread_added): Likewise.
353 (i386_single_step): Likewise.
354 (i386_fetch_inferior_register): Likewise.
355 (i386_store_inferior_register): Likewise.
356 (i386_arch_setup): Likewise.
357 (i386_win32_num_regs): New function.
358 (struct win32_target_ops): Use i386_win32_num_regs.
359 * win32-low.cc (win32_get_thread_context): Adapt for WOW64
360 processes.
361 (win32_require_context): Likewise.
362 (child_add_thread): Likewise.
363 (do_initial_child_stuff): Likewise.
364 (continue_one_thread): Likewise.
365 (win32_process_target::resume): Likewise.
366 (load_psapi): Likewise.
367 (win32_add_all_dlls): Likewise.
368 (maybe_adjust_pc): Likewise.
369 (win32_process_target::qxfer_siginfo): Likewise.
370 (initialize_low): Likewise.
371 * win32-low.h (struct win32_target_ops): Change num_regs to
372 callback function.
373
374 2020-04-27 Simon Marchi <simon.marchi@efficios.com>
375
376 * configure.ac: Remove check for fs_base/gs_base in
377 user_regs_struct.
378 * configure: Re-generate.
379 * config.in: Re-generate.
380 * linux-x86-low.cc (x86_64_regmap, x86_fill_gregset,
381 x86_store_gregset): Adjust.
382
383 2020-04-22 Hannes Domani <ssbssa@yahoo.de>
384
385 * server.cc (handle_search_memory_1): Fix gdb_read_memory return value
386 comparison.
387
388 2020-04-16 Tom Tromey <tromey@adacore.com>
389
390 * win32-low.cc (windows_nat::handle_access_violation): New
391 function.
392
393 2020-04-15 Simon Marchi <simon.marchi@polymtl.ca>
394
395 * win32-low.cc (get_child_debug_event): Fix format string warning.
396
397 2020-04-13 Tom Tromey <tom@tromey.com>
398
399 * server.h (gdb_fildes_t): Remove typedef.
400 * remote-utils.c (remote_desc, list_desc): Now int.
401 (INVALID_DESCRIPTOR): Remove.
402 (gdb_connected, remote_close)
403 (check_remote_input_interrupt_request): Update.
404 * utils.h (pfildes): Don't declare.
405 * utils.c (pfildes): Remove.
406
407 2020-04-13 Tom Tromey <tom@tromey.com>
408
409 * server.h (handle_serial_event, handle_target_event): Update.
410 * server.c: Don't call initialize_event_loop.
411 (keep_processing_events): New global.
412 (handle_serial_event): Return void. Set keep_processing_events.
413 (handle_target_event): Return void.
414 (start_event_loop): Move from event-loop.c. Rewrite.
415 * remote-utils.c (handle_accept_event): Return void.
416 (reset_readchar): Use delete_timer.
417 (process_remaining): Return void.
418 (reschedule): Use create_timer.
419 * event-loop.h: Remove.
420 * event-loop.cc: Remove.
421 * Makefile.in (OBS): Use gdbsupport/event-loop.o, not event-loop.o.
422
423 2020-04-13 Tom Tromey <tom@tromey.com>
424
425 * server.c (invoke_async_signal_handlers)
426 (check_async_event_handlers, flush_streams, gdb_select): New
427 functions.
428
429 2020-04-13 Tom Tromey <tom@tromey.com>
430
431 * configure: Rebuild.
432 * config.in: Rebuild.
433
434 2020-04-08 Tom Tromey <tromey@adacore.com>
435
436 PR gdb/22992
437 * win32-low.c (child_continue): Call matching_pending_stop.
438 (get_child_debug_event): Call fetch_pending_stop. Push pending
439 stop when needed.
440
441 2020-04-08 Tom Tromey <tromey@adacore.com>
442
443 * win32-low.h (win32_process_target::stopped_by_sw_breakpoint)
444 (win32_process_target::supports_stopped_by_sw_breakpoint):
445 Declare.
446 * win32-low.c (win32_supports_z_point_type): Always handle
447 Z_PACKET_SW_BP.
448 (win32_insert_point): Call insert_memory_breakpoint when needed.
449 (win32_remove_point): Call remove_memory_breakpoint when needed.
450 (win32_process_target::stopped_by_sw_breakpoint)
451 (win32_process_target::supports_stopped_by_sw_breakpoint): New
452 methods.
453 (win32_target_ops): Update.
454 (maybe_adjust_pc): New function.
455 (win32_wait): Call maybe_adjust_pc.
456
457 2020-04-08 Tom Tromey <tromey@adacore.com>
458
459 * win32-low.h (struct win32_target_ops) <decr_pc_after_break>: New
460 field.
461 * win32-i386-low.c (the_low_target): Update.
462 * win32-arm-low.c (the_low_target): Update.
463
464 2020-04-08 Tom Tromey <tromey@adacore.com>
465
466 * win32-low.h (win32_process_target::read_pc)
467 (win32_process_target::write_pc): Declare.
468 * win32-low.c (win32_process_target::read_pc)
469 (win32_process_target::write_pc): New methods.
470 * win32-i386-low.c (i386_win32_get_pc, i386_win32_set_pc): New
471 functions.
472 (the_low_target): Update.
473 * win32-arm-low.c (arm_win32_get_pc, arm_win32_set_pc): New
474 functions.
475 (the_low_target): Update.
476
477 2020-04-08 Tom Tromey <tromey@adacore.com>
478
479 * win32-low.c (win32_kill, get_child_debug_event): Use
480 wait_for_debug_event.
481
482 2020-04-08 Tom Tromey <tromey@adacore.com>
483
484 * win32-low.c (child_continue): Call continue_last_debug_event.
485
486 2020-04-08 Tom Tromey <tromey@adacore.com>
487
488 * win32-low.c (handle_exception): Remove.
489 (windows_nat::handle_ms_vc_exception): New function.
490 (get_child_debug_event): Add "continue_status" parameter.
491 Update.
492 (win32_wait): Update.
493
494 2020-04-08 Tom Tromey <tromey@adacore.com>
495
496 * win32-low.c (windows_nat::handle_load_dll): Rename from
497 handle_load_dll. No longer static.
498 (windows_nat::handle_unload_dll): Rename from handle_unload_dll.
499 No longer static.
500
501 2020-04-08 Tom Tromey <tromey@adacore.com>
502
503 * win32-low.c (handle_output_debug_string): Add parameter. Change
504 return type.
505 (win32_kill, get_child_debug_event): Update.
506
507 2020-04-08 Tom Tromey <tromey@adacore.com>
508
509 * win32-low.c (current_process_handle, current_process_id)
510 (main_thread_id, last_sig, current_event, siginfo_er): Move to
511 nat/windows-nat.c.
512
513 2020-04-08 Tom Tromey <tromey@adacore.com>
514
515 * win32-low.c (get_image_name): Remove.
516 (handle_load_dll): Update.
517
518 2020-04-08 Tom Tromey <tromey@adacore.com>
519
520 * win32-low.c (windows_nat::thread_rec): Rename from thread_rec.
521 No longer static. Change parameters.
522 (child_add_thread, child_fetch_inferior_registers)
523 (child_store_inferior_registers, win32_resume)
524 (win32_get_tib_address): Update.
525
526 2020-04-08 Tom Tromey <tromey@adacore.com>
527
528 * win32-low.h (struct win32_target_ops): Use qualified names where
529 needed.
530 * win32-i386-low.c: Add "using namespace".
531 * win32-low.c: Add "using namespace".
532 * win32-arm-low.c: Add "using namespace".
533
534 2020-04-08 Tom Tromey <tromey@adacore.com>
535
536 * win32-low.c (delete_thread_info): Don't call CloseHandle.
537
538 2020-04-08 Tom Tromey <tromey@adacore.com>
539
540 * win32-low.c (win32_require_context, suspend_one_thread): Use
541 windows_thread_info::suspend.
542 (continue_one_thread): Use windows_thread_info::resume.
543 * configure.srv (srv_tgtobj): Add windows-nat.o when needed.
544
545 2020-04-08 Tom Tromey <tromey@adacore.com>
546
547 * win32-i386-low.c (update_debug_registers)
548 (i386_prepare_to_resume, i386_thread_added): Update.
549
550 2020-04-08 Tom Tromey <tromey@adacore.com>
551
552 * win32-low.c (child_add_thread): Use new.
553 (delete_thread_info): Use delete.
554
555 2020-04-08 Tom Tromey <tromey@adacore.com>
556
557 * win32-low.h (struct windows_thread_info): Remove.
558
559 2020-04-08 Tom Tromey <tromey@adacore.com>
560
561 * win32-low.h (struct windows_thread_info): Rename from
562 win32_thread_info. Remove typedef.
563 (struct win32_target_ops, win32_require_context): Update.
564 * win32-low.c (win32_get_thread_context)
565 (win32_set_thread_context, win32_prepare_to_resume)
566 (win32_require_context, thread_rec, child_add_thread)
567 (delete_thread_info, continue_one_thread)
568 (child_fetch_inferior_registers, child_store_inferior_registers)
569 (win32_resume, suspend_one_thread, win32_get_tib_address):
570 Update.
571 * win32-i386-low.c (update_debug_registers)
572 (win32_get_current_dr, i386_get_thread_context)
573 (i386_prepare_to_resume, i386_thread_added, i386_single_step)
574 (i386_fetch_inferior_register, i386_store_inferior_register):
575 Update.
576 * win32-arm-low.c (arm_get_thread_context)
577 (arm_fetch_inferior_register, arm_store_inferior_register):
578 Update.
579
580 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
581
582 * linux-low.h (struct linux_target_ops): Remove.
583 (the_low_target): Remove.
584 * linux-x86-low.cc (the_low_target): Remove.
585 * linux-aarch64-low.cc (the_low_target): Ditto.
586 * linux-arm-low.cc (the_low_target): Ditto.
587 * linux-bfin-low.cc (the_low_target): Ditto.
588 * linux-cris-low.cc (the_low_target): Ditto.
589 * linux-crisv32-low.cc (the_low_target): Ditto.
590 * linux-ia64-low.cc (the_low_target): Ditto.
591 * linux-m32r-low.cc (the_low_target): Ditto.
592 * linux-m68k-low.cc (the_low_target): Ditto.
593 * linux-mips-low.cc (the_low_target): Ditto.
594 * linux-nios2-low.cc (the_low_target): Ditto.
595 * linux-ppc-low.cc (the_low_target): Ditto.
596 * linux-riscv-low.cc (the_low_target): Ditto.
597 * linux-s390-low.cc (the_low_target): Ditto.
598 * linux-sh-low.cc (the_low_target): Ditto.
599 * linux-sparc-low.cc (the_low_target): Ditto.
600 * linux-tic6x-low.cc (the_low_target): Ditto.
601 * linux-tile-low.cc (the_low_target): Ditto.
602 * linux-xtensa-low.cc (the_low_target): Ditto.
603
604 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
605
606 Remove the 'get_ipa_tdesc_idx' linux target op and let a concrete
607 linux target define the op by overriding the declaration in
608 process_stratum_target.
609
610 * linux-low.h (struct linux_target_ops): Remove the op.
611 (class linux_process_target) <get_ipa_tdesc_idx>: Remove.
612 * linux-low.cc (linux_process_target::get_ipa_tdesc_idx): Remove.
613 * linux-x86-low.cc (class x86_target) <get_ipa_tdesc_idx>: Declare.
614 (x86_get_ipa_tdesc_idx): Turn into...
615 (x86_target::get_ipa_tdesc_idx): ...this.
616 (the_low_target): Remove the op field.
617 * linux-ppc-low.cc (class ppc_target) <get_ipa_tdesc_idx>: Declare.
618 (ppc_get_ipa_tdesc_idx): Turn into...
619 (ppc_target::get_ipa_tdesc_idx): ...this.
620 (the_low_target): Remove the op field.
621 * linux-s390-low.cc (class s390_target) <get_ipa_tdesc_idx>: Declare.
622 (s390_get_ipa_tdesc_idx): Turn into...
623 (s390_target::get_ipa_tdesc_idx): ...this.
624 (the_low_target): Remove the op field.
625
626 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
627
628 Turn the 'get_syscall_trapinfo' linux target op into a method
629 of process_stratum_target.
630
631 * linux-low.h (struct linux_target_ops): Remove the op.
632 (class linux_process_target) <get_syscall_trapinfo>
633 <gdb_catch_this_syscall>
634 <low_supports_catch_syscall>
635 <low_get_syscall_trapinfo>: Declare.
636 * linux-low.cc (get_syscall_trapinfo): Turn into...
637 (linux_process_target::get_syscall_trapinfo): ...this.
638 (linux_process_target::low_get_syscall_trapinfo): Define.
639 (gdb_catch_this_syscall_p): Turn into...
640 (linux_process_target::gdb_catch_this_syscall): ...this.
641 (linux_process_target::low_supports_catch_syscall): Define.
642
643 Update the callers below.
644
645 (linux_process_target::wait_1)
646 (linux_process_target::supports_catch_syscall)
647
648 * linux-x86-low.cc (class x86_target) <low_supports_catch_syscall>
649 <low_get_syscall_trapinfo>: Declare.
650 (x86_target::low_supports_catch_syscall): Define.
651 (x86_get_syscall_trapinfo): Turn into...
652 (x86_target::low_get_syscall_trapinfo): ...this.
653 (the_low_target): Remove the op field.
654 * linux-aarch64-low.cc (class aarch64_target)
655 <low_supports_catch_syscall>
656 <low_get_syscall_trapinfo>: Declare.
657 (aarch64_target::low_supports_catch_syscall): Define.
658 (aarch64_get_syscall_trapinfo): Turn into...
659 (aarch64_target::low_get_syscall_trapinfo): ...this.
660 (the_low_target): Remove the op field.
661 * linux-arm-low.cc (class arm_target) <low_supports_catch_syscall>
662 <low_get_syscall_trapinfo>: Declare.
663 (arm_target::low_supports_catch_syscall): Define.
664 (arm_get_syscall_trapinfo): Turn into...
665 (arm_target::low_get_syscall_trapinfo): ...this.
666 (the_low_target): Remove the op field.
667 * linux-ppc-low.cc (the_low_target): Remove the op field.
668 * linux-s390-low.cc (the_low_target): Remove the op field.
669
670 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
671
672 Remove the 'supports_hardware_single_step' linux target op and
673 override the process_stratum_target's op definition in
674 linux_process_target to return true.
675
676 * linux-low.h (struct linux_target_ops): Remove the op.
677 (class linux_process_target) <finish_step_over>
678 <maybe_hw_step>: Declare.
679 * linux-low.cc (can_hardware_single_step): Remove.
680 (maybe_hw_step): Turn into...
681 (linux_process_target::maybe_hw_step): ...this.
682 (finish_step_over): Turn into...
683 (linux_process_target::finish_step_over): ...this.
684 (linux_process_target::supports_hardware_single_step): Update
685 to return true.
686
687 Update the callers below.
688
689 (linux_process_target::single_step)
690 (linux_process_target::resume_one_lwp_throw)
691
692 * linux-arm-low.cc (class arm_target)
693 <supports_hardware_single_step>: Declare.
694 (arm_supports_hardware_single_step): Turn into...
695 (arm_target::supports_hardware_single_step): ...this.
696 (the_low_target): Remove the op field.
697 * linux-x86-low.cc (x86_supports_hardware_single_step): Remove.
698 (the_low_target): Remove the op field.
699 * linux-aarch64-low.cc (aarch64_supports_hardware_single_step):
700 Remove.
701 (the_low_target): Remove the op field.
702 * linux-bfin-low.cc (bfin_supports_hardware_single_step): Remove.
703 (the_low_target): Remove the op field.
704 * linux-crisv32-low.cc (cris_supports_hardware_single_step): Remove.
705 (the_low_target): Remove the op field.
706 * linux-m32r-low.cc (m32r_supports_hardware_single_step): Remove.
707 (the_low_target): Remove the op field.
708 * linux-m68k-low.cc (m68k_supports_hardware_single_step): Remove.
709 (the_low_target): Remove the op field.
710 * linux-ppc-low.cc (ppc_supports_hardware_single_step): Remove.
711 (the_low_target): Remove the op field.
712 * linux-s390-low.cc (s390_supports_hardware_single_step): Remove.
713 (the_low_target): Remove the op field.
714 * linux-sh-low.cc (sh_supports_hardware_single_step): Remove.
715 (the_low_target): Remove the op field.
716 * linux-tic6x-low.cc (tic6x_supports_hardware_single_step): Remove.
717 (the_low_target): Remove the op field.
718 * linux-tile-low.cc (tile_supports_hardware_single_step): Remove.
719 (the_low_target): Remove the op field.
720 * linux-xtensa-low.cc (xtensa_supports_hardware_single_step):
721 Remove.
722 (the_low_target): Remove the op field.
723
724 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
725
726 Turn the 'supports_range_stepping' linux target op into a method
727 of linux_process_target.
728
729 * linux-low.h (struct linux_target_ops): Remove the op.
730 (class linux_process_target) <low_supports_range_stepping>: Declare.
731 * linux-low.cc (linux_process_target::low_supports_range_stepping):
732 Define.
733 (linux_process_target::supports_range_stepping): Update the call
734 site.
735 * linux-x86-low.cc (class x86_target)
736 <low_supports_range_stepping>: Declare.
737 (x86_supports_range_stepping): Turn into...
738 (x86_target::low_supports_range_stepping): ...this.
739 (the_low_target): Remove the op field.
740 * linux-aarch64-low.cc (class aarch64_target)
741 <low_supports_range_stepping>: Declare.
742 (aarch64_supports_range_stepping): Turn into...
743 (aarch64_target::low_supports_range_stepping): ...this.
744 (the_low_target): Remove the op field.
745 * linux-arm-low.cc (the_low_target): Remove the op field.
746 * linux-bfin-low.cc (the_low_target): Ditto.
747 * linux-crisv32-low.cc (the_low_target): Ditto.
748 * linux-m32r-low.cc (the_low_target): Ditto.
749 * linux-m68k-low.cc (the_low_target): Ditto.
750 * linux-ppc-low.cc (the_low_target): Ditto.
751 * linux-s390-low.cc (the_low_target): Ditto.
752 * linux-sh-low.cc (the_low_target): Ditto.
753 * linux-tic6x-low.cc (the_low_target): Ditto.
754 * linux-tile-low.cc (the_low_target): Ditto.
755 * linux-xtensa-low.cc (the_low_target): Ditto.
756
757 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
758
759 Remove the 'emit_ops' linux target ops and let the concrete
760 linux target define the op by overriding the declaration of
761 process_stratum_target.
762
763 * linux-low.h (struct linux_target_ops): Remove the op.
764 (class linux_process_target) <emit_ops>: Remove.
765 * linux-low.cc (linux_process_target::emit_ops): Remove.
766 * linux-x86-low.cc (class x86_target) <emit_ops>: Declare.
767 (x86_emit_ops): Turn into...
768 (x86_target::emit_ops): ...this.
769 (the_low_target): Remove the op field.
770 * linux-aarch64-low.cc (class aarch64_target) <emit_ops>: Declare.
771 (aarch64_emit_ops): Turn into...
772 (aarch64_target::emit_ops): ...this.
773 (the_low_target): Remove the op field.
774 * linux-ppc-low.cc (class ppc_target) <emit_ops>: Declare.
775 (ppc_emit_ops): Turn into...
776 (ppc_target::emit_ops): ...this.
777 (the_low_target): Remove the op field.
778 * linux-s390-low.cc (class s390_target) <emit_ops>: Declare.
779 (s390_emit_ops): Turn into...
780 (s390_target::emit_ops): ...this.
781 (the_low_target): Remove the op field.
782 * linux-arm-low.cc (the_low_target): Remove the op field.
783 * linux-bfin-low.cc (the_low_target): Ditto.
784 * linux-crisv32-low.cc (the_low_target): Ditto.
785 * linux-m32r-low.cc (the_low_target): Ditto.
786 * linux-m68k-low.cc (the_low_target): Ditto.
787 * linux-sh-low.cc (the_low_target): Ditto.
788 * linux-tic6x-low.cc (the_low_target): Ditto.
789 * linux-tile-low.cc (the_low_target): Ditto.
790 * linux-xtensa-low.cc (the_low_target): Ditto.
791
792 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
793
794 Remove the 'install_fast_tracepoint_jump_pad' and
795 'get_min_fast_tracepoint_insn_len' linux target ops to let the
796 concrete linux target define the ops by overriding the declarations
797 of process_stratum_target.
798
799 * linux-low.h (struct linux_target_ops): Remove the ops.
800 (class linux_process_target) <supports_fast_tracepoints>
801 <install_fast_tracepoint_jump_pad>
802 <get_min_fast_tracepoint_insn_len>: Remove.
803 * linux-low.cc (linux_process_target::supports_fast_tracepoints)
804 (linux_process_target::install_fast_tracepoint_jump_pad)
805 (linux_process_target::get_min_fast_tracepoint_insn_len): Remove.
806 * linux-x86-low.cc (class x86_target) <supports_fast_tracepoints>
807 <install_fast_tracepoint_jump_pad>
808 <get_min_fast_tracepoint_insn_len>: Declare.
809 (x86_target::supports_fast_tracepoints): Define.
810 (x86_install_fast_tracepoint_jump_pad): Turn into...
811 (x86_target::install_fast_tracepoint_jump_pad): ...this.
812 (x86_get_min_fast_tracepoint_insn_len): Turn into...
813 (x86_target::get_min_fast_tracepoint_insn_len): ...this.
814 (the_low_target): Remove the op fields.
815 * linux-aarch64-low.cc (class aarch64_target)
816 <supports_fast_tracepoints>
817 <install_fast_tracepoint_jump_pad>
818 <get_min_fast_tracepoint_insn_len>: Declare.
819 (aarch64_target::supports_fast_tracepoints): Define.
820 (aarch64_install_fast_tracepoint_jump_pad): Turn into...
821 (aarch64_target::install_fast_tracepoint_jump_pad): ...this.
822 (aarch64_get_min_fast_tracepoint_insn_len): Turn into...
823 (aarch64_target::get_min_fast_tracepoint_insn_len): ...this.
824 (the_low_target): Remove the op fields.
825 * linux-ppc-low.cc (class ppc_target) <supports_fast_tracepoints>
826 <install_fast_tracepoint_jump_pad>
827 <get_min_fast_tracepoint_insn_len>: Declare.
828 (ppc_target::supports_fast_tracepoints): Define.
829 (ppc_install_fast_tracepoint_jump_pad): Turn into...
830 (ppc_target::install_fast_tracepoint_jump_pad): ...this.
831 (ppc_get_min_fast_tracepoint_insn_len): Turn into...
832 (ppc_target::get_min_fast_tracepoint_insn_len): ...this.
833 (the_low_target): Remove the op fields.
834 * linux-s390-low.cc (class s390_target) <supports_fast_tracepoints>
835 <install_fast_tracepoint_jump_pad>
836 <get_min_fast_tracepoint_insn_len>: Declare.
837 (s390_target::supports_fast_tracepoints): Define.
838 (s390_install_fast_tracepoint_jump_pad): Turn into...
839 (s390_target::install_fast_tracepoint_jump_pad): ...this.
840 (s390_get_min_fast_tracepoint_insn_len): Turn into...
841 (s390_target::get_min_fast_tracepoint_insn_len): ...this.
842 (the_low_target): Remove the op fields.
843 * linux-arm-low.cc (the_low_target): Remove the op fields.
844 * linux-bfin-low.cc (the_low_target): Ditto.
845 * linux-crisv32-low.cc (the_low_target): Ditto.
846 * linux-m32r-low.cc (the_low_target): Ditto.
847 * linux-m68k-low.cc (the_low_target): Ditto.
848 * linux-sh-low.cc (the_low_target): Ditto.
849 * linux-tic6x-low.cc (the_low_target): Ditto.
850 * linux-tile-low.cc (the_low_target): Ditto.
851 * linux-xtensa-low.cc (the_low_target): Ditto.
852
853 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
854
855 Turn the 'get_thread_area' linux target op into a method of
856 process_stratum_target.
857
858 * linux-low.h (struct linux_target_ops): Remove the op.
859 (class linux_process_target) <stuck_in_jump_pad>
860 <linux_fast_tracepoint_collecting>
861 <low_get_thread_area>: Declare.
862 * linux-low.cc (supports_fast_tracepoints): Remove.
863 (linux_fast_tracepoint_collecting): Turn into...
864 (linux_process_target::linux_fast_tracepoint_collecting): ...this.
865 (linux_process_target::low_get_thread_area): Define.
866 (stuck_in_jump_pad_callback): Turn into...
867 (linux_process_target::stuck_in_jump_pad): ...this.
868
869 Update the caller below.
870
871 (linux_process_target::stabilize_threads)
872
873 * linux-x86-low.cc (class x86_target) <low_get_thread_area>:
874 Declare.
875 (x86_get_thread_area): Turn into...
876 (x86_target::low_get_thread_area): ...this.
877 (the_low_target): Remove the op field.
878 * linux-aarch64-low.cc (class aarch64_target) <low_get_thread_area>:
879 Declare.
880 (aarch64_get_thread_area): Turn into...
881 (aarch64_target::low_get_thread_area): ...this.
882 (the_low_target): Remove the op field.
883 * linux-ppc-low.cc (class ppc_target) <low_get_thread_area>:
884 Declare.
885 (ppc_get_thread_area): Turn into...
886 (ppc_target::low_get_thread_area): ...this.
887 (the_low_target): Remove the op field.
888 * linux-s390-low.cc (class s390_target) <low_get_thread_area>:
889 Declare.
890 (s390_get_thread_area): Turn into...
891 (s390_target::low_get_thread_area): ...this.
892 (the_low_target): Remove the op field.
893 * linux-arm-low.cc (the_low_target): Remove the op field.
894 * linux-bfin-low.cc (the_low_target): Ditto.
895 * linux-crisv32-low.cc (the_low_target): Ditto.
896 * linux-m32r-low.cc (the_low_target): Ditto.
897 * linux-m68k-low.cc (the_low_target): Ditto.
898 * linux-sh-low.cc (the_low_target): Ditto.
899 * linux-tic6x-low.cc (the_low_target): Ditto.
900 * linux-tile-low.cc (the_low_target): Ditto.
901 * linux-xtensa-low.cc (the_low_target): Ditto.
902
903 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
904
905 Remote the 'supports_tracepoints' linux target op and let the
906 concrete linux target define it by overriding the op declared in
907 process_stratum_target.
908
909 * linux-low.h (struct linux_target_ops): Remove the op.
910 (class linux_process_target) <supports_tracepoints>: Remove.
911 * linux-low.cc (linux_process_target::supports_tracepoints): Remove.
912 * linux-x86-low.cc (class x86_target) <supports_tracepoints>:
913 Declare.
914 (x86_supports_tracepoints): Turn into...
915 (x86_target::supports_tracepoints): ...this.
916 (the_low_target): Remove the op field.
917 * linux-aarch64-low.cc (class aarch64_target)
918 <supports_tracepoints>: Declare.
919 (aarch64_supports_tracepoints): Turn into...
920 (aarch64_target::supports_tracepoints): ...this.
921 (the_low_target): Remove the op field.
922 * linux-ppc-low.cc (class ppc_target) <supports_tracepoints>:
923 Declare.
924 (ppc_supports_tracepoints): Turn into...
925 (ppc_target::supports_tracepoints): ...this.
926 (the_low_target): Remove the op field.
927 * linux-s390-low.cc (class s390_target) <supports_tracepoints>:
928 Declare.
929 (s390_supports_tracepoints): Turn into...
930 (s390_target::supports_tracepoints): ...this.
931 (the_low_target): Remove the op field.
932 * linux-arm-low.cc (the_low_target): Remove the op field.
933 * linux-bfin-low.cc (the_low_target): Ditto.
934 * linux-crisv32-low.cc (the_low_target): Ditto.
935 * linux-m32r-low.cc (the_low_target): Ditto.
936 * linux-m68k-low.cc (the_low_target): Ditto.
937 * linux-sh-low.cc (the_low_target): Ditto.
938 * linux-tic6x-low.cc (the_low_target): Ditto.
939 * linux-tile-low.cc (the_low_target): Ditto.
940 * linux-xtensa-low.cc (the_low_target): Ditto.
941
942 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
943
944 Remove the 'process_qsupported' linux target op and let a concrete
945 linux target define the op by overriding the op declaration in
946 process_stratum_target.
947
948 * linux-low.h (struct linux_target_ops): Remove the op.
949 (class linux_process_target) <process_qsupported>: Remove.
950 * linux-low.cc (linux_process_target::process_qsupported): Remove.
951 * linux-x86-low.cc (class x86_target) <process_qsupported>: Declare.
952 (x86_linux_process_qsupported): Turn into...
953 (x86_target::process_qsupported): ...this.
954 (the_low_target): Remove the op field.
955 * linux-aarch64-low.cc (the_low_target): Remove the op
956 field.
957 * linux-arm-low.cc (the_low_target): Ditto.
958 * linux-bfin-low.cc (the_low_target): Ditto.
959 * linux-crisv32-low.cc (the_low_target): Ditto.
960 * linux-m32r-low.cc (the_low_target): Ditto.
961 * linux-m68k-low.cc (the_low_target): Ditto.
962 * linux-ppc-low.cc (the_low_target): Ditto.
963 * linux-s390-low.cc (the_low_target): Ditto.
964 * linux-sh-low.cc (the_low_target): Ditto.
965 * linux-tic6x-low.cc (the_low_target): Ditto.
966 * linux-tile-low.cc (the_low_target): Ditto.
967 * linux-xtensa-low.cc (the_low_target): Ditto.
968
969 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
970
971 Turn the 'prepare_to_resume' linux target op into a method of
972 linux_process_target.
973
974 * linux-low.h (struct linux_target_ops): Remove the op.
975 (class linux_process_target) <low_prepare_to_resume>: Declare.
976 * linux-low.cc (linux_process_target::low_prepare_to_resume):
977 Define.
978
979 Update the callers below:
980
981 (linux_process_target::resume_one_lwp_throw)
982 (linux_process_target::low_prepare_to_resume)
983
984 * linux-x86-low.cc (class x86_target) <low_prepare_to_resume>:
985 Declare.
986 (x86_target::low_prepare_to_resume): Define.
987 (the_low_target): Remove the op field.
988 * linux-aarch64-low.cc (class aarch64_target)
989 <low_prepare_to_resume>: Declare.
990 (aarch64_target::low_prepare_to_resume): Define.
991 (the_low_target): Remove the op field.
992 * linux-arm-low.cc (class arm_target) <low_prepare_to_resume>:
993 Declare.
994 (arm_prepare_to_resume): Turn into...
995 (arm_target::low_prepare_to_resume): ...this.
996 (the_low_target): Remove the op field.
997 * linux-mips-low.cc (class mips_target) <low_prepare_to_resume>:
998 Declare.
999 (mips_linux_prepare_to_resume): Turn into...
1000 (mips_target::low_prepare_to_resume): ...this.
1001 (the_low_target): Remove the op field.
1002 * linux-bfin-low.cc (the_low_target): Remove the op field.
1003 * linux-crisv32-low.cc (the_low_target): Ditto.
1004 * linux-m32r-low.cc (the_low_target): Ditto.
1005 * linux-m68k-low.cc (the_low_target): Ditto.
1006 * linux-ppc-low.cc (the_low_target): Ditto.
1007 * linux-s390-low.cc (the_low_target): Ditto.
1008 * linux-sh-low.cc (the_low_target): Ditto.
1009 * linux-tic6x-low.cc (the_low_target): Ditto.
1010 * linux-tile-low.cc (the_low_target): Ditto.
1011 * linux-xtensa-low.cc (the_low_target): Ditto.
1012
1013 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1014
1015 Turn the 'new_process', 'delete_process', 'new_thread',
1016 'delete_thread', and 'new_fork' linux target ops into methods
1017 of linux_process_target.
1018
1019 * linux-low.h (struct linux_target_ops): Remove the ops.
1020 (class linux_process_target) <add_linux_process>
1021 <add_lwp>
1022 <delete_lwp>
1023 <attach_lwp>
1024 <detach_one_lwp>
1025 <check_zombie_leaders>
1026 <filter_exit_event>
1027 <low_new_process>
1028 <low_delete_process>
1029 <low_new_thread>
1030 <low_delete_thread>
1031 <low_new_fork>: Declare.
1032 * linux-low.cc (delete_lwp): Turn into...
1033 (linux_process_target::delete_lwp): ...this.
1034 (linux_process_target::low_delete_thread): Define.
1035 (linux_add_process): Turn into...
1036 (linux_process_target::add_linux_process): ...this.
1037 (linux_process_target::low_new_process): Define.
1038 (linux_process_target::low_delete_process): Define.
1039 (linux_process_target::low_new_fork): Define.
1040 (add_lwp): Turn into...
1041 (linux_process_target::add_lwp): ...this.
1042 (linux_process_target::low_new_thread): Define.
1043 (linux_attach_lwp): Turn into...
1044 (linux_process_target::attach_lwp): ...this.
1045 (linux_detach_one_lwp): Turn into...
1046 (linux_process_target::detach_one_lwp): ...this.
1047 (linux_detach_lwp_callback): Remove and inline...
1048 (linux_process_target::detach): ...here.
1049 (check_zombie_leaders): Turn into...
1050 (linux_process_target::check_zombie_leaders): ...this.
1051 (filter_exit_event): Turn into...
1052 (linux_process_target::filter_exit_event): ...this.
1053
1054 Update the callers below.
1055
1056 (linux_process_target::handle_extended_wait)
1057 (linux_process_target::create_inferior)
1058 (attach_proc_task_lwp_callback)
1059 (linux_process_target::attach)
1060 (linux_process_target::detach)
1061 (linux_process_target::mourn)
1062 * thread-db.cc (attach_thread)
1063
1064 * linux-x86-low.cc (class x86_target) <low_new_process>
1065 <low_delete_process>
1066 <low_new_thread>
1067 <low_delete_thread>
1068 <low_new_fork>: Declare.
1069 (x86_linux_new_process): Turn into...
1070 (x86_target::low_new_process): ...this.
1071 (x86_linux_delete_process): Turn into...
1072 (x86_target::low_delete_process): ...this.
1073 (x86_target::low_new_thread): Define.
1074 (x86_target::low_delete_thread): Define.
1075 (x86_linux_new_fork): Turn into...
1076 (x86_target::low_new_fork): ...this.
1077 (the_low_target): Remove the op fields.
1078 * linux-aarch64-low.cc (class aarch64_target) <low_new_process>
1079 <low_delete_process>
1080 <low_new_thread>
1081 <low_delete_thread>
1082 <low_new_fork>: Declare.
1083 (aarch64_linux_new_process): Turn into...
1084 (aarch64_target::low_new_process): ...this.
1085 (aarch64_linux_delete_process): Turn into...
1086 (aarch64_target::low_delete_process): ...this.
1087 (aarch64_target::low_new_thread): Define.
1088 (aarch64_target::low_delete_thread): Define.
1089 (aarch64_linux_new_fork): Turn into...
1090 (aarch64_target::low_new_fork): ...this.
1091 (the_low_target): Remove the op fields.
1092 * linux-arm-low.cc (class arm_target) <low_new_process>
1093 <low_delete_process>
1094 <low_new_thread>
1095 <low_delete_thread>
1096 <low_new_fork>: Declare.
1097 (arm_new_process): Turn into...
1098 (arm_target::low_new_process): ...this.
1099 (arm_delete_process): Turn into...
1100 (arm_target::low_delete_process): ...this.
1101 (arm_new_thread): Turn into...
1102 (arm_target::low_new_thread): ...this.
1103 (arm_delete_thread): Turn into...
1104 (arm_target::low_delete_thread): ...this.
1105 (arm_new_fork): Turn into...
1106 (arm_target::low_new_fork): ...this.
1107 (the_low_target): Remove the op fields.
1108 * linux-mips-low.cc (class mips_target) <low_new_process>
1109 <low_delete_process>
1110 <low_new_thread>
1111 <low_delete_thread>
1112 <low_new_fork>: Declare.
1113 (mips_linux_new_process): Turn into...
1114 (mips_target::low_new_process): ...this.
1115 (mips_linux_delete_process): Turn into...
1116 (mips_target::low_delete_process): ...this.
1117 (mips_linux_new_thread): Turn into...
1118 (mips_target::low_new_thread): ...this.
1119 (mips_linux_delete_thread): Turn into...
1120 (mips_target::low_delete_thread): ...this.
1121 (mips_linux_new_fork): Turn into...
1122 (mips_target::low_new_fork): ...this.
1123 (the_low_target): Remove the op fields.
1124 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1125 * linux-crisv32-low.cc (the_low_target): Ditto.
1126 * linux-m32r-low.cc (the_low_target): Ditto.
1127 * linux-m68k-low.cc (the_low_target): Ditto.
1128 * linux-ppc-low.cc (the_low_target): Ditto.
1129 * linux-s390-low.cc (the_low_target): Ditto.
1130 * linux-sh-low.cc (the_low_target): Ditto.
1131 * linux-tic6x-low.cc (the_low_target): Ditto.
1132 * linux-tile-low.cc (the_low_target): Ditto.
1133 * linux-xtensa-low.cc (the_low_target): Ditto.
1134
1135 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1136
1137 Turn the 'siginfo_fixup' linux target op into a method of
1138 linux_process_target.
1139
1140 * linux-low.h (struct linux_target_ops): Remove the op.
1141 (class linux_process_target) <siginfo_fixup>
1142 <low_siginfo_fixup>: Declare.
1143 * linux-low.cc (siginfo_fixup): Turn into...
1144 (linux_process_target::siginfo_fixup): ...this.
1145 (linux_process_target::low_siginfo_fixup): Define.
1146 * linux-x86-low.cc (class x86_target) <low_siginfo_fixup>: Declare.
1147 (x86_siginfo_fixup): Turn into...
1148 (x86_target::low_siginfo_fixup): ...this.
1149 (the_low_target): Remove the op field.
1150 * linux-aarch64-low.cc (class aarch64_target):
1151 <low_siginfo_fixup>: Declare.
1152 (aarch64_linux_siginfo_fixup): Turn into...
1153 (aarch64_target::low_siginfo_fixup): ...this.
1154 (the_low_target): Remove the op field.
1155 * linux-arm-low.cc (the_low_target): Remove the op field.
1156 * linux-bfin-low.cc (the_low_target): Ditto.
1157 * linux-crisv32-low.cc (the_low_target): Ditto.
1158 * linux-m32r-low.cc (the_low_target): Ditto.
1159 * linux-m68k-low.cc (the_low_target): Ditto.
1160 * linux-mips-low.cc (the_low_target): Ditto.
1161 * linux-ppc-low.cc (the_low_target): Ditto.
1162 * linux-s390-low.cc (the_low_target): Ditto.
1163 * linux-sh-low.cc (the_low_target): Ditto.
1164 * linux-tic6x-low.cc (the_low_target): Ditto.
1165 * linux-tile-low.cc (the_low_target): Ditto.
1166 * linux-xtensa-low.cc (the_low_target): Ditto.
1167
1168 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1169
1170 Turn the 'collect_ptrace_register' and 'supply_ptrace_register'
1171 linux target ops into methods of linux_process_target.
1172
1173 * linux-low.h (struct linux_target_ops): Remove the ops.
1174 (class linux_process_target) <low_collect_ptrace_register>
1175 <low_store_ptrace_register>: Declare.
1176 * linux-low.cc (linux_process_target::low_collect_ptrace_register)
1177 (linux_process_target::low_supply_ptrace_register): Define.
1178
1179 Update the callers below.
1180
1181 (linux_process_target::fetch_register)
1182 (linux_process_target::store_register)
1183
1184 * linux-x86-low.cc (the_low_target): Remove the op fields.
1185 * linux-aarch64-low.cc (the_low_target): Ditto.
1186 * linux-arm-low.cc (the_low_target): Ditto.
1187 * linux-bfin-low.cc (the_low_target): Ditto.
1188 * linux-crisv32-low.cc (the_low_target): Ditto.
1189 * linux-m32r-low.cc (the_low_target): Ditto.
1190 * linux-m68k-low.cc (the_low_target): Ditto.
1191 * linux-sh-low.cc (the_low_target): Ditto.
1192 * linux-sparc-low.cc (the_low_target): Ditto.
1193 * linux-tic6x-low.cc (the_low_target): Ditto.
1194 * linux-tile-low.cc (the_low_target): Ditto.
1195 * linux-xtensa-low.cc (the_low_target): Ditto.
1196 * linux-mips-low.cc (class mips_target)
1197 <low_collect_ptrace_register>
1198 <low_supply_ptrace_register>: Declare.
1199 (mips_collect_ptrace_register): Turn into ...
1200 (mips_target::low_collect_ptrace_register): ...this.
1201 (mips_supply_ptrace_register): Turn into...
1202 (mips_target::low_supply_ptrace_register): ...this.
1203 (the_low_target): Remove the op fields.
1204 * linux-ppc-low.cc (class ppc_target)
1205 <low_collect_ptrace_register>
1206 <low_supply_ptrace_register>: Declare.
1207 (ppc_collect_ptrace_register): Turn into ...
1208 (ppc_target::low_collect_ptrace_register): ...this.
1209 (ppc_supply_ptrace_register): Turn into ...
1210 (ppc_target::low_supply_ptrace_register): ...this.
1211 (ppc_fill_gregset): Update for the calls to
1212 low_collect_ptrace_register.
1213 (the_low_target): Remove the op fields.
1214 * linux-s390-low.cc (class s390_target)
1215 <low_collect_ptrace_register>
1216 <low_supply_ptrace_register>: Declare.
1217 (s390_collect_ptrace_register): Turn into ...
1218 (s390_target::low_collect_ptrace_register): ...this.
1219 (s390_supply_ptrace_register): Turn into ...
1220 (s390_target::low_supply_ptrace_register): ...this.
1221 (s390_fill_gregset): Update for the calls to
1222 low_collect_ptrace_register.
1223 (the_low_target): Remove the op fields.
1224
1225 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1226
1227 Turn the 'stopped_by_watchpoint' and 'stopped_data_address' linux
1228 target ops into methods of linux_process_target.
1229
1230 * linux-low.h (struct linux_target_ops): Remove the ops.
1231 (class linux_process_target) <check_stopped_by_watchpoint>
1232 <low_stopped_by_watchpoint>
1233 <low_stopped_data_address>: Declare.
1234 * linux-low.cc (check_stopped_by_watchpoint): Turn into...
1235 (linux_process_target::check_stopped_by_watchpoint): ...this.
1236 (linux_process_target::low_stopped_by_watchpoint): Define.
1237 (linux_process_target::low_stopped_data_address): Define.
1238 * linux-x86-low.cc (class x86_target) <low_stopped_by_watchpoint>
1239 <low_stopped_data_address>: Declare.
1240 (x86_stopped_by_watchpoint): Turn into...
1241 (x86_target::low_stopped_by_watchpoint): ...this.
1242 (x86_stopped_data_address): Turn into...
1243 (x86_target::low_stopped_data_address): ...this.
1244 (the_low_target): Remove the op fields.
1245 * linux-aarch64-low.cc (class aarch64_target)
1246 <low_stopped_by_watchpoint>
1247 <low_stopped_data_address>: Declare.
1248 (aarch64_stopped_by_watchpoint): Turn into...
1249 (aarch64_target::low_stopped_by_watchpoint): ...this.
1250 (aarch64_stopped_data_address): Turn into...
1251 (aarch64_target::low_stopped_data_address): ...this.
1252 (the_low_target): Remove the op fields.
1253 * linux-arm-low.cc (class arm_target) <low_stopped_by_watchpoint>
1254 <low_stopped_data_address>: Declare.
1255 (arm_stopped_by_watchpoint): Turn into...
1256 (arm_target::low_stopped_by_watchpoint): ...this.
1257 (arm_stopped_data_address): Turn into...
1258 (arm_target::low_stopped_data_address): ...this.
1259 (the_low_target): Remove the op fields.
1260 * linux-crisv32-low.cc (class crisv32_target)
1261 <low_stopped_by_watchpoint>
1262 <low_stopped_data_address>: Declare.
1263 (cris_stopped_by_watchpoint): Turn into...
1264 (crisv32_target::low_stopped_by_watchpoint): ...this.
1265 (cris_stopped_data_address): Turn into...
1266 (crisv32_target::low_stopped_data_address): ...this.
1267 (the_low_target): Remove the op fields.
1268 * linux-mips-low.cc (class mips_target) <low_stopped_by_watchpoint>
1269 <low_stopped_data_address>: Declare.
1270 (mips_stopped_by_watchpoint): Turn into...
1271 (mips_target::low_stopped_by_watchpoint): ...this.
1272 (mips_stopped_data_address): Turn into...
1273 (mips_target::low_stopped_data_address): ...this.
1274 (the_low_target): Remove the op fields.
1275 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1276 * linux-m32r-low.cc (the_low_target): Ditto.
1277 * linux-m68k-low.cc (the_low_target): Ditto.
1278 * linux-ppc-low.cc (the_low_target): Ditto.
1279 * linux-s390-low.cc (the_low_target): Ditto.
1280 * linux-sh-low.cc (the_low_target): Ditto.
1281 * linux-sparc-low.cc (the_low_target): Ditto.
1282 * linux-tic6x-low.cc (the_low_target): Ditto.
1283 * linux-tile-low.cc (the_low_target): Ditto.
1284 * linux-xtensa-low.cc (the_low_target): Ditto.
1285
1286 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1287
1288 Turn the 'insert_point' and 'remove_point' linux target ops into
1289 methods of linux_process_target.
1290
1291 * linux-low.h (struct linux_target_ops): Remove the ops.
1292 (class linux_process_target) <low_insert_point>
1293 <low_remove_point>: Declare.
1294 * linux-low.cc (linux_process_target::low_insert_point)
1295 (linux_process_target::low_remove_point): Define.
1296 (linux_process_target::insert_point)
1297 (linux_process_target::remove_point): Update for calls to
1298 low_insert_point and low_remove_point.
1299 * linux-x86-low.cc (class x86_target) <low_insert_point>
1300 <low_remove_point>: Declare.
1301 (x86_insert_point): Turn into...
1302 (x86_target::low_insert_point): ...this.
1303 (x86_remove_point): Turn into...
1304 (x86_target::low_remove_point): ...this.
1305 (the_low_target): Remove the op fields.
1306 * linux-aarch64-low.cc (class aarch64_target) <low_insert_point>
1307 <low_remove_point>: Declare.
1308 (aarch64_insert_point): Turn into...
1309 (aarch64_target::low_insert_point): ...this.
1310 (aarch64_remove_point): Turn into...
1311 (aarch64_target::low_remove_point): ...this.
1312 (the_low_target): Remove the op fields.
1313 * linux-arm-low.cc (class arm_target) <low_insert_point>
1314 <low_remove_point>: Declare.
1315 (arm_insert_point): Turn into...
1316 (arm_target::low_insert_point): ...this.
1317 (arm_remove_point): Turn into...
1318 (arm_target::low_remove_point): ...this.
1319 (the_low_target): Remove the op fields.
1320 * linux-crisv32-low.cc (class crisv32_target) <low_insert_point>
1321 <low_remove_point>: Declare.
1322 (crisv32_insert_point): Turn into...
1323 (crisv32_target::low_insert_point): ...this.
1324 (crisv32_remove_point): Turn into...
1325 (crisv32_target::low_remove_point): ...this.
1326 (the_low_target): Remove the op fields.
1327 * linux-mips-low.cc (class mips_target) <low_insert_point>
1328 <low_remove_point>: Declare.
1329 (mips_insert_point): Turn into...
1330 (mips_target::low_insert_point): ...this.
1331 (mips_remove_point): Turn into...
1332 (mips_target::low_remove_point): ...this.
1333 (the_low_target): Remove the op fields.
1334 * linux-ppc-low.cc (class ppc_target) <low_insert_point>
1335 <low_remove_point>: Declare.
1336 (ppc_insert_point): Turn into...
1337 (ppc_target::low_insert_point): ...this.
1338 (ppc_remove_point): Turn into...
1339 (ppc_target::low_remove_point): ...this.
1340 (the_low_target): Remove the op fields.
1341 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1342 * linux-m32r-low.cc (the_low_target): Ditto.
1343 * linux-m68k-low.cc (the_low_target): Ditto.
1344 * linux-s390-low.cc (the_low_target): Ditto.
1345 * linux-sh-low.cc (the_low_target): Ditto.
1346 * linux-sparc-low.cc (the_low_target): Ditto.
1347 * linux-tic6x-low.cc (the_low_target): Ditto.
1348 * linux-tile-low.cc (the_low_target): Ditto.
1349 * linux-xtensa-low.cc (the_low_target): Ditto.
1350
1351 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1352
1353 Remove the 'supports_z_point_type' linux target op and let the
1354 concrete linux target define it by overriding the op declared in
1355 process_stratum_target.
1356
1357 * linux-low.cc (linux_process_target::supports_z_point_type):
1358 Remove.
1359 * linux-low.h (struct linux_target_ops): Remove the op.
1360 (class linux_process_target) <supports_z_point_type>: Remove.
1361 * linux-x86-low.cc (class x86_target) <supports_z_point_type>:
1362 Declare.
1363 (x86_supports_z_point_type): Turn into...
1364 (x86_target::supports_z_point_type): ...this.
1365 (the_low_target): Remove the op field.
1366 * linux-aarch64-low.cc (class aarch64_target)
1367 <supports_z_point_type>: Declare.
1368 (aarch64_supports_z_point_type): Turn into...
1369 (aarch64_target::supports_z_point_type): ...this.
1370 (the_low_target): Remove the op field.
1371 * linux-arm-low.cc (class arm_target) <supports_z_point_type>:
1372 Declare.
1373 (arm_supports_z_point_type): Turn into...
1374 (arm_target::supports_z_point_type): ...this.
1375 (the_low_target): Remove the op field.
1376 * linux-crisv32-low.cc (class crisv32_target)
1377 <supports_z_point_type>: Declare.
1378 (cris_supports_z_point_type): Turn into...
1379 (crisv32_target::supports_z_point_type): ...this.
1380 (the_low_target): Remove the op field.
1381 * linux-mips-low.cc (class mips_target) <supports_z_point_type>:
1382 Declare.
1383 (mips_supports_z_point_type): Turn into...
1384 (mips_target::supports_z_point_type): ...this.
1385 (the_low_target): Remove the op field.
1386 * linux-ppc-low.cc (class ppc_target) <supports_z_point_type>:
1387 Declare.
1388 (ppc_supports_z_point_type): Turn into...
1389 (ppc_target::supports_z_point_type): ...this.
1390 (the_low_target): Remove the op field.
1391 * linux-s390-low.cc (class s390_target) <supports_z_point_type>:
1392 Declare.
1393 (s390_supports_z_point_type): Turn into...
1394 (s390_target::supports_z_point_type): ...this.
1395 (the_low_target): Remove the op field.
1396 * linux-bfin-low.cc (the_low_target): Remove the op field.
1397 * linux-m32r-low.cc (the_low_target): Ditto.
1398 * linux-m68k-low.cc (the_low_target): Ditto.
1399 * linux-sh-low.cc (the_low_target): Ditto.
1400 * linux-sparc-low.cc (the_low_target): Ditto.
1401 * linux-tic6x-low.cc (the_low_target): Ditto.
1402 * linux-tile-low.cc (the_low_target): Ditto.
1403 * linux-xtensa-low.cc (the_low_target): Ditto.
1404
1405 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1406
1407 Turn the 'breakpoint_at' linux target op into a method of
1408 linux_process_target.
1409
1410 * linux-low.h (struct linux_target_ops): Remove the op.
1411 (class linux_process_target) <low_breakpoint_at>: Declare.
1412
1413 Update the callers below:
1414
1415 * linux-low.cc (linux_process_target::save_stop_reason)
1416 (linux_process_target::thread_still_has_status_pending)
1417 (linux_process_target::wait_1)
1418
1419 * linux-x86-low.cc (class x86_target)
1420 <low_breakpoint_at>: Declare.
1421 (x86_breakpoint_at): Turn into...
1422 (x86_target::low_breakpoint_at): ...this.
1423 (the_low_target): Remove the op field.
1424 * linux-aarch64-low.cc (class aarch64_target)
1425 <low_breakpoint_at>: Declare.
1426 (aarch64_breakpoint_at): Turn into...
1427 (aarch64_target::low_breakpoint_at): ...this.
1428 (the_low_target): Remove the op field.
1429 * linux-arm-low.cc (class arm_target)
1430 <low_breakpoint_at>: Declare.
1431 (arm_target::low_breakpoint_at): Define.
1432 (the_low_target): Remove the op field.
1433 * linux-bfin-low.cc (class bfin_target)
1434 <low_breakpoint_at>: Declare.
1435 (bfin_breakpoint_at): Turn into...
1436 (bfin_target::low_breakpoint_at): ...this.
1437 (the_low_target): Remove the op field.
1438 * linux-cris-low.cc (class cris_target)
1439 <low_breakpoint_at>: Declare.
1440 (cris_breakpoint_at): Turn into...
1441 (cris_target::low_breakpoint_at): ...this.
1442 (the_low_target): Remove the op field.
1443 * linux-crisv32-low.cc (class crisv32_target)
1444 <low_breakpoint_at>: Declare.
1445 (crisv32_breakpoint_at): Turn into...
1446 (crisv32_target::low_breakpoint_at): ...this.
1447 (the_low_target): Remove the op field.
1448 * linux-ia64-low.cc (class ia64_target)
1449 <low_breakpoint_at>: Declare.
1450 (ia64_target::low_breakpoint_at): Define.
1451 * linux-m32r-low.cc (class m32r_target)
1452 <low_breakpoint_at>: Declare.
1453 (m32r_breakpoint_at): Turn into...
1454 (m32r_target::low_breakpoint_at): ...this.
1455 (the_low_target): Remove the op field.
1456 * linux-m68k-low.cc (class m68k_target)
1457 <low_breakpoint_at>: Declare.
1458 (m68k_breakpoint_at): Turn into...
1459 (m68k_target::low_breakpoint_at): ...this.
1460 (the_low_target): Remove the op field.
1461 * linux-mips-low.cc (class mips_target)
1462 <low_breakpoint_at>: Declare.
1463 (mips_breakpoint_at): Turn into...
1464 (mips_target::low_breakpoint_at): ...this.
1465 (the_low_target): Remove the op field.
1466 * linux-nios2-low.cc (class nios2_target)
1467 <low_breakpoint_at>: Declare.
1468 (nios2_breakpoint_at): Turn into...
1469 (nios2_target::low_breakpoint_at): ...this.
1470 (the_low_target): Remove the op field.
1471 * linux-ppc-low.cc (class ppc_target)
1472 <low_breakpoint_at>: Declare.
1473 (ppc_breakpoint_at): Turn into...
1474 (ppc_target::low_breakpoint_at): ...this.
1475 (the_low_target): Remove the op field.
1476 * linux-riscv-low.cc (class riscv_target)
1477 <low_breakpoint_at>: Declare.
1478 (riscv_breakpoint_at): Turn into...
1479 (riscv_target::low_breakpoint_at): ...this.
1480 (the_low_target): Remove the op field.
1481 * linux-s390-low.cc (class s390_target)
1482 <low_breakpoint_at>: Declare.
1483 (s390_breakpoint_at): Turn into...
1484 (s390_target::low_breakpoint_at): ...this.
1485 (the_low_target): Remove the op field.
1486 * linux-sh-low.cc (class sh_target)
1487 <low_breakpoint_at>: Declare.
1488 (sh_breakpoint_at): Turn into...
1489 (sh_target::low_breakpoint_at): ...this.
1490 (the_low_target): Remove the op field.
1491 * linux-sparc-low.cc (class sparc_target)
1492 <low_breakpoint_at>: Declare.
1493 (sparc_breakpoint_at): Turn into...
1494 (sparc_target::low_breakpoint_at): ...this.
1495 (the_low_target): Remove the op field.
1496 * linux-tic6x-low.cc (class tic6x_target)
1497 <low_breakpoint_at>: Declare.
1498 (tic6x_breakpoint_at): Turn into...
1499 (tic6x_target::low_breakpoint_at): ...this.
1500 (the_low_target): Remove the op field.
1501 * linux-tile-low.cc (class tile_target)
1502 <low_breakpoint_at>: Declare.
1503 (tile_breakpoint_at): Turn into...
1504 (tile_target::low_breakpoint_at): ...this.
1505 (the_low_target): Remove the op field.
1506 * linux-xtensa-low.cc (class xtensa_target)
1507 <low_breakpoint_at>: Declare.
1508 (xtensa_breakpoint_at): Turn into...
1509 (xtensa_target::low_breakpoint_at): ...this.
1510 (the_low_target): Remove the op field.
1511
1512 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1513
1514 Turn the 'decr_pc_after_break' linux_target_ops field into
1515 a method of linux_process_target.
1516
1517 * linux-low.h (struct linux_target_ops)
1518 <decr_pc_after_break>: Remove.
1519 (class linux_process_target) <low_decr_pc_after_break>: New method
1520 declaration.
1521 * linux-low.cc (linux_process_target::low_decr_pc_after_break):
1522 New method implementation.
1523
1524 Update the users below.
1525
1526 (linux_process_target::save_stop_reason)
1527 (linux_process_target::wait_1)
1528 * linux-x86-low.cc (class x86_target) <low_decr_pc_after_break>:
1529 New declaration.
1530 (x86_target::low_decr_pc_after_break): New method implementation.
1531 (the_low_target): Remove the field.
1532 * linux-bfin-low.cc (class bfin_target) <low_decr_pc_after_break>:
1533 New declaration.
1534 (bfin_target::low_decr_pc_after_break): New method implementation.
1535 (the_low_target): Remove the field.
1536 * linux-m68k-low.cc (class m68k_target) <low_decr_pc_after_break>:
1537 New declaration.
1538 (m68k_target::low_decr_pc_after_break): New method implementation.
1539 (the_low_target): Remove the field.
1540 * linux-s390-low.cc (class s390_target) <low_decr_pc_after_break>:
1541 New declaration.
1542 (s390_target::low_decr_pc_after_break): New method implementation.
1543 (the_low_target): Remove the field.
1544 * linux-aarch64-low.cc (the_low_target): Remove the field.
1545 * linux-arm-low.cc (the_low_target): Remove the field.
1546 * linux-cris-low.cc (the_low_target): Remove the field.
1547 * linux-crisv32-low.cc (the_low_target): Remove the field.
1548 * linux-m32r-low.cc (the_low_target): Remove the field.
1549 * linux-mips-low.cc (the_low_target): Remove the field.
1550 * linux-nios2-low.cc (the_low_target): Remove the field.
1551 * linux-ppc-low.cc (the_low_target): Remove the field.
1552 * linux-riscv-low.cc (the_low_target): Remove the field.
1553 * linux-sh-low.cc (the_low_target): Remove the field.
1554 * linux-sparc-low.cc (the_low_target): Remove the field.
1555 * linux-tic6x-low.cc (the_low_target): Remove the field.
1556 * linux-tile-low.cc (the_low_target): Remove the field.
1557 * linux-xtensa-low.cc (the_low_target): Remove the field.
1558
1559 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1560
1561 Remove the 'supports_software_single_step' linux target op and let
1562 the concrete linux target define it by overriding the op in
1563 process_stratum_target.
1564 Turn the 'get_next_pcs' linux target op into a method of
1565 linux_process_target.
1566
1567 * linux-low.h (struct linux_target_ops): Remove the ops.
1568 (class linux_process_target) <supports_software_single_step>:
1569 Remove.
1570 <low_get_next_pcs>: Declare.
1571 * linux-low.cc (can_software_single_step): Remove.
1572 (linux_process_target::low_get_next_pcs): Define.
1573 (linux_process_target::supports_software_single_step): Remove.
1574
1575 Update the callers below.
1576
1577 (linux_process_target::handle_extended_wait)
1578 (linux_process_target::wait_1)
1579 (linux_process_target::install_software_single_step_breakpoints)
1580 (linux_process_target::single_step)
1581 (linux_process_target::thread_needs_step_over)
1582 (linux_process_target::proceed_one_lwp)
1583 (linux_process_target::supports_range_stepping)
1584
1585 * linux-x86-low.cc (the_low_target): Remove the op field.
1586 * linux-aarch64-low.cc (the_low_target): Ditto.
1587 * linux-bfin-low.cc (the_low_target): Ditto.
1588 * linux-cris-low.cc (the_low_target): Ditto.
1589 * linux-crisv32-low.cc (the_low_target): Ditto.
1590 * linux-m32r-low.cc (the_low_target): Ditto.
1591 * linux-m68k-low.cc (the_low_target): Ditto.
1592 * linux-mips-low.cc (the_low_target): Ditto.
1593 * linux-nios2-low.cc (the_low_target): Ditto.
1594 * linux-ppc-low.cc (the_low_target): Ditto.
1595 * linux-riscv-low.cc (the_low_target): Ditto.
1596 * linux-s390-low.cc (the_low_target): Ditto.
1597 * linux-sh-low.cc (the_low_target): Ditto.
1598 * linux-sparc-low.cc (the_low_target): Ditto.
1599 * linux-tic6x-low.cc (the_low_target): Ditto.
1600 * linux-tile-low.cc (the_low_target): Ditto.
1601 * linux-xtensa-low.cc (the_low_target): Ditto.
1602 * linux-arm-low.cc (class arm_target) <low_get_next_pcs>
1603 <supports_software_single_step>: Declare.
1604 (arm_target::supports_software_single_step): Define.
1605 (arm_gdbserver_get_next_pcs): Turn into...
1606 (arm_target::low_get_next_pcs): ...this.
1607 (the_low_target): Remove the op field.
1608
1609 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1610
1611 Remove the 'sw_breakpoint_from_kind' linux target op, and let
1612 the concrete linux target define it by overriding the op
1613 in process_stratum_target.
1614
1615 * linux-low.cc (linux_process_target::sw_breakpoint_from_kind):
1616 Remove.
1617 * linux-low.h (struct linux_target_ops): Remove the op.
1618 (class linux_process_target) <sw_breakpoint_from_kind>: Remove.
1619 * linux-x86-low.cc (class x86_target) <sw_breakpoint_from_kind>:
1620 Declare.
1621 (x86_sw_breakpoint_from_kind): Turn into...
1622 (x86_target::sw_breakpoint_from_kind): ...this.
1623 (the_low_target): Remove the op field.
1624 * linux-aarch64-low.cc (class aarch64_target)
1625 <sw_breakpoint_from_kind>: Declare.
1626 (aarch64_sw_breakpoint_from_kind): Turn into...
1627 (aarch64_target::sw_breakpoint_from_kind): ...this.
1628 (the_low_target): Remove the op field.
1629 * linux-arm-low.cc (class arm_target) <sw_breakpoint_from_kind>:
1630 Declare.
1631 (arm_target::sw_breakpoint_from_kind): Define.
1632 (the_low_target): Remove the op field.
1633 * linux-bfin-low.cc (class bfin_target) <sw_breakpoint_from_kind>:
1634 Declare.
1635 (bfin_sw_breakpoint_from_kind): Turn into...
1636 (bfin_target::sw_breakpoint_from_kind): ...this.
1637 (the_low_target): Remove the op field.
1638 * linux-cris-low.cc (class cris_target) <sw_breakpoint_from_kind>:
1639 Declare.
1640 (cris_sw_breakpoint_from_kind): Turn into...
1641 (cris_target::sw_breakpoint_from_kind): ...this.
1642 (the_low_target): Remove the op field.
1643 * linux-crisv32-low.cc (class crisv32_target)
1644 <sw_breakpoint_from_kind>: Declare.
1645 (cris_sw_breakpoint_from_kind): Turn into...
1646 (crisv32_target::sw_breakpoint_from_kind): ...this.
1647 (the_low_target): Remove the op field.
1648 * linux-ia64-low.cc (class ia64_target) <sw_breakpoint_from_kind>:
1649 Declare.
1650 (ia64_target::sw_breakpoint_from_kind): Define.
1651 * linux-m32r-low.cc (class m32r_target) <sw_breakpoint_from_kind>:
1652 Declare.
1653 (m32r_sw_breakpoint_from_kind): Turn into...
1654 (m32r_target::sw_breakpoint_from_kind): ...this.
1655 (the_low_target): Remove the op field.
1656 * linux-m68k-low.cc (class m68k_target) <sw_breakpoint_from_kind>:
1657 Declare.
1658 (m68k_sw_breakpoint_from_kind): Turn into...
1659 (m68k_target::sw_breakpoint_from_kind): ...this.
1660 (the_low_target): Remove the op field.
1661 * linux-mips-low.cc (class mips_target) <sw_breakpoint_from_kind>:
1662 Declare.
1663 (mips_sw_breakpoint_from_kind): Turn into...
1664 (mips_target::sw_breakpoint_from_kind): ...this.
1665 (the_low_target): Remove the op field.
1666 * linux-nios2-low.cc (class nios2_target) <sw_breakpoint_from_kind>:
1667 Declare.
1668 (nios2_sw_breakpoint_from_kind): Turn into...
1669 (nios2_target::sw_breakpoint_from_kind): ...this.
1670 (the_low_target): Remove the op field.
1671 * linux-ppc-low.cc (class ppc_target) <sw_breakpoint_from_kind>:
1672 Declare.
1673 (ppc_sw_breakpoint_from_kind): Turn into...
1674 (ppc_target::sw_breakpoint_from_kind): ...this.
1675 (the_low_target): Remove the op field.
1676 * linux-riscv-low.cc (class riscv_target) <sw_breakpoint_from_kind>:
1677 Declare.
1678 (riscv_sw_breakpoint_from_kind): Turn into...
1679 (riscv_target::sw_breakpoint_from_kind): ...this.
1680 (the_low_target): Remove the op field.
1681 * linux-s390-low.cc (class s390_target) <sw_breakpoint_from_kind>:
1682 Declare.
1683 (s390_sw_breakpoint_from_kind): Turn into...
1684 (s390_target::sw_breakpoint_from_kind): ...this.
1685 (the_low_target): Remove the op field.
1686 * linux-sh-low.cc (class sh_target) <sw_breakpoint_from_kind>:
1687 Declare.
1688 (sh_sw_breakpoint_from_kind): Turn into...
1689 (sh_target::sw_breakpoint_from_kind): ...this.
1690 (the_low_target): Remove the op field.
1691 * linux-sparc-low.cc (class sparc_target) <sw_breakpoint_from_kind>:
1692 Declare.
1693 (sparc_sw_breakpoint_from_kind): Turn into...
1694 (sparc_target::sw_breakpoint_from_kind): ...this.
1695 (the_low_target): Remove the op field.
1696 * linux-tic6x-low.cc (class tic6x_target) <sw_breakpoint_from_kind>:
1697 Declare.
1698 (tic6x_sw_breakpoint_from_kind): Turn into...
1699 (tic6x_target::sw_breakpoint_from_kind): ...this.
1700 (the_low_target): Remove the op field.
1701 * linux-tile-low.cc (class tile_target) <sw_breakpoint_from_kind>:
1702 Declare.
1703 (tile_sw_breakpoint_from_kind): Turn into...
1704 (tile_target::sw_breakpoint_from_kind): ...this.
1705 (the_low_target): Remove the op field.
1706 * linux-xtensa-low.cc (class xtensa_target)
1707 <sw_breakpoint_from_kind>: Declare.
1708 (xtensa_sw_breakpoint_from_kind): Turn into...
1709 (xtensa_target::sw_breakpoint_from_kind): ...this.
1710 (the_low_target): Remove the op field.
1711
1712 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1713
1714 Remove the 'breakpoint_kind_from_pc' and
1715 'breakpoint_kind_from_current_state' linux target ops, and let the
1716 concrete linux target define them by overriding the ops of
1717 process_stratum_target.
1718
1719 * linux-low.cc (linux_process_target::breakpoint_kind_from_pc):
1720 Remove.
1721 (linux_process_target::breakpoint_kind_from_current_state): Remove.
1722 * linux-low.h (struct linux_target_ops): Remove ops.
1723 (class linux_process_target) <breakpoint_kind_from_pc>: Remove.
1724 <breakpoint_kind_from_current_state>: Remove.
1725 * linux-x86-low.cc (the_low_target): Remove the op fields.
1726 * linux-bfin-low.cc (the_low_target): Ditto.
1727 * linux-cris-low.cc (the_low_target): Ditto.
1728 * linux-crisv32-low.cc (the_low_target): Ditto.
1729 * linux-m32r-low.cc (the_low_target): Ditto.
1730 * linux-m68k-low.cc (the_low_target): Ditto.
1731 * linux-mips-low.cc (the_low_target): Ditto.
1732 * linux-nios2-low.cc (the_low_target): Ditto.
1733 * linux-ppc-low.cc (the_low_target): Ditto.
1734 * linux-s390-low.cc (the_low_target): Ditto.
1735 * linux-sh-low.cc (the_low_target): Ditto.
1736 * linux-sparc-low.cc (the_low_target): Ditto.
1737 * linux-tic6x-low.cc (the_low_target): Ditto.
1738 * linux-tile-low.cc (the_low_target): Ditto.
1739 * linux-xtensa-low.cc (the_low_target): Ditto.
1740 * linux-aarch64-low.cc (class aarch64_target)
1741 <breakpoint_kind_from_pc>
1742 <breakpoint_kind_from_current_state>: Declare.
1743 (aarch64_breakpoint_kind_from_pc): Turn into...
1744 (aarch64_target::breakpoint_kind_from_pc): ...this.
1745 (aarch64_breakpoint_kind_from_current_state): Turn into...
1746 (aarch64_target::breakpoint_kind_from_current_state): ...this.
1747 (the_low_target): Remove the op fields.
1748 * linux-arm-low.cc (class arm_target):
1749 <breakpoint_kind_from_pc>
1750 <breakpoint_kind_from_current_state>: Declare.
1751 (arm_target::breakpoint_kind_from_pc): Define.
1752 (arm_target::breakpoint_kind_from_current_state): Define.
1753 (the_low_target): Remove the op fields.
1754 * linux-riscv-low.cc (class riscv_target):
1755 <breakpoint_kind_from_pc>: Declare.
1756 (riscv_breakpoint_kind_from_pc): Turn into...
1757 (riscv_target::breakpoint_kind_from_pc): ...this.
1758 (the_low_target): Remove the op fields.
1759
1760 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1761
1762 Turn the 'get_pc' and 'set_pc' linux target ops into methods
1763 of linux_process_target.
1764
1765 * linux-low.h (struct linux_target_ops): Remove the ops.
1766 (class linux_process_target) <low_supports_breakpoints>
1767 <low_get_pc>
1768 <low_set_pc>: Declare.
1769 * linux-low.cc (supports_breakpoints): Turn into...
1770 (linux_process_target::low_supports_breakpoints): ...this.
1771 (linux_process_target::low_get_pc): Define.
1772 (linux_process_target::low_set_pc): Define.
1773
1774 Update the callers below.
1775
1776 (linux_process_target::get_pc)
1777 (linux_process_target::save_stop_reason)
1778 (linux_process_target::maybe_move_out_of_jump_pad)
1779 (linux_process_target::wait_1)
1780 (linux_process_target::resume_one_lwp_throw)
1781 (linux_process_target::resume)
1782 (linux_process_target::proceed_all_lwps)
1783 (linux_process_target::read_pc)
1784 (linux_process_target::write_pc)
1785
1786 * linux-x86-low.cc (class linux_process_target)
1787 <low_supports_breakpoints>
1788 <low_get_pc>
1789 <low_set_pc>: Declare.
1790 (x86_target::low_supports_breakpoints): Define.
1791 (x86_get_pc): Turn into...
1792 (x86_target::low_get_pc): ...this.
1793 (x86_set_pc): Turn into...
1794 (x86_target::low_set_pc): ...this.
1795 (the_low_target): Remove the op fields.
1796 * linux-arm-low.cc (class arm_target)
1797 <low_supports_breakpoints>
1798 <low_get_pc>
1799 <low_set_pc>: Declare.
1800 (arm_target::low_supports_breakpoints)
1801 (arm_target::low_get_pc)
1802 (arm_target::low_set_pc): Define.
1803 (the_low_target): Remove the op fields.
1804 * linux-bfin-low.cc (class bfin_target)
1805 <low_supports_breakpoints>
1806 <low_get_pc>
1807 <low_set_pc>: Declare.
1808 (bfin_target::low_supports_breakpoints)
1809 (bfin_target::low_get_pc)
1810 (bfin_target::low_set_pc): Define.
1811 (the_low_target): Remove the op fields.
1812 * linux-cris-low.cc (class cris_target)
1813 <low_supports_breakpoints>
1814 <low_get_pc>
1815 <low_set_pc>: Declare.
1816 (cris_target::low_supports_breakpoints)
1817 (cris_target::low_get_pc)
1818 (cris_target::low_set_pc): Define.
1819 (the_low_target): Remove the op fields.
1820 * linux-crisv32-low.cc (class crisv32_target)
1821 <low_supports_breakpoints>
1822 <low_get_pc>
1823 <low_set_pc>: Declare.
1824 (crisv32_target::low_supports_breakpoints)
1825 (crisv32_target::low_get_pc)
1826 (crisv32_target::low_set_pc): Define.
1827 (the_low_target): Remove the op fields.
1828 * linux-m32r-low.cc (class m32r_target)
1829 <low_supports_breakpoints>
1830 <low_get_pc>
1831 <low_set_pc>: Declare.
1832 (m32r_target::low_supports_breakpoints)
1833 (m32r_target::low_get_pc)
1834 (m32r_target::low_set_pc): Define.
1835 (the_low_target): Remove the op fields.
1836 * linux-m68k-low.cc (class m68k_target)
1837 <low_supports_breakpoints>
1838 <low_get_pc>
1839 <low_set_pc>: Declare.
1840 (m68k_target::low_supports_breakpoints)
1841 (m68k_target::low_get_pc)
1842 (m68k_target::low_set_pc): Define.
1843 (the_low_target): Remove the op fields.
1844 * linux-nios2-low.cc (class nios2_target)
1845 <low_supports_breakpoints>
1846 <low_get_pc>
1847 <low_set_pc>: Declare.
1848 (nios2_target::low_supports_breakpoints)
1849 (nios2_target::low_get_pc)
1850 (nios2_target::low_set_pc): Define.
1851 (the_low_target): Remove the op fields.
1852 * linux-sh-low.cc (class sh_target)
1853 <low_supports_breakpoints>
1854 <low_get_pc>
1855 <low_set_pc>: Declare.
1856 (sh_target::low_supports_breakpoints)
1857 (sh_target::low_get_pc)
1858 (sh_target::low_set_pc): Define.
1859 (the_low_target): Remove the op fields.
1860 * linux-xtensa-low.cc (class xtensa_target)
1861 <low_supports_breakpoints>
1862 <low_get_pc>
1863 <low_set_pc>: Declare.
1864 (xtensa_target::low_supports_breakpoints)
1865 (xtensa_target::low_get_pc)
1866 (xtensa_target::low_set_pc): Define.
1867 (the_low_target): Remove the op fields.
1868 * linux-sparc-low.cc (class sparc_target)
1869 <low_supports_breakpoints>
1870 <low_get_pc>: Declare.
1871 (sparc_target::low_supports_breakpoints)
1872 (sparc_target::low_get_pc): Define.
1873 (the_low_target): Remove the op fields.
1874 * linux-tile-low.cc (class tile_target)
1875 <low_supports_breakpoints>
1876 <low_get_pc>
1877 <low_set_pc>: Declare.
1878 (tile_target::low_supports_breakpoints)
1879 (tile_target::low_get_pc)
1880 (tile_target::low_set_pc): Define.
1881 (the_low_target): Remove the op fields.
1882 * linux-aarch64-low.cc (class aarch64_target)
1883 <low_supports_breakpoints>
1884 <low_get_pc>
1885 <low_set_pc>: Declare.
1886 (aarch64_target::low_supports_breakpoints): Define.
1887 (aarch64_get_pc): Turn into...
1888 (aarch64_target::low_get_pc): ...this.
1889 (aarch64_set_pc): Turn into...
1890 (aarch64_target::low_set_pc): ...this.
1891 (the_low_target): Remove the op fields.
1892 * linux-mips-low.cc (class mips_target)
1893 <low_supports_breakpoints>
1894 <low_get_pc>
1895 <low_set_pc>: Declare.
1896 (mips_target::low_supports_breakpoints): Define.
1897 (mips_get_pc): Turn into...
1898 (mips_target::low_get_pc): ...this.
1899 (mips_set_pc): Turn into...
1900 (mips_target::low_set_pc): ...this.
1901 (the_low_target): Remove the op fields.
1902 * linux-ppc-low.cc (class ppc_target)
1903 <low_supports_breakpoints>
1904 <low_get_pc>
1905 <low_set_pc>: Declare.
1906 (ppc_target::low_supports_breakpoints): Define.
1907 (ppc_get_pc): Turn into...
1908 (ppc_target::low_get_pc): ...this.
1909 (ppc_set_pc): Turn into...
1910 (ppc_target::low_set_pc): ...this.
1911 (the_low_target): Remove the op fields.
1912 * linux-riscv-low.cc (class riscv_target)
1913 <low_supports_breakpoints>
1914 <low_get_pc>
1915 <low_set_pc>: Declare.
1916 (riscv_target::low_supports_breakpoints): Define.
1917 (riscv_get_pc): Turn into...
1918 (riscv_target::low_get_pc): ...this.
1919 (riscv_set_pc): Turn into...
1920 (riscv_target::low_set_pc): ...this.
1921 (the_low_target): Remove the op fields.
1922 * linux-s390-low.cc (class s390_target)
1923 <low_supports_breakpoints>
1924 <low_get_pc>
1925 <low_set_pc>: Declare.
1926 (s390_target::low_supports_breakpoints): Define.
1927 (s390_get_pc): Turn into...
1928 (s390_target::low_get_pc): ...this.
1929 (s390_set_pc): Turn into...
1930 (s390_target::low_set_pc): ...this.
1931 (the_low_target): Remove the op fields.
1932 * linux-tic6x-low.cc (class tic6x_target)
1933 <low_supports_breakpoints>
1934 <low_get_pc>
1935 <low_set_pc>: Declare.
1936 (tic6x_target::low_supports_breakpoints): Define.
1937 (tic6x_get_pc): Turn into...
1938 (tic6x_target::low_get_pc): ...this.
1939 (tic6x_set_pc): Turn into...
1940 (tic6x_target::low_set_pc): ...this.
1941 (the_low_target): Remove the op fields.
1942
1943 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1944
1945 Turn some more static methods in linux-low into private methods
1946 of linux_process_target.
1947
1948 * linux-low.cc (get_pc): Turn into...
1949 (linux_process_target::get_pc): ...this.
1950 (save_stop_reason): Turn into...
1951 (linux_process_target::save_stop_reason): ...this.
1952 (thread_still_has_status_pending_p): Turn into...
1953 (linux_process_target::thread_still_has_status_pending): ...this.
1954 (status_pending_p_callback): Turn into...
1955 (linux_process_target::status_pending_p_callback): ...this.
1956 (resume_stopped_resumed_lwps): Turn into...
1957 (linux_process_target::resume_stopped_resumed_lwps): ...this.
1958 (install_software_single_step_breakpoints): Turn into...
1959 (linux_process_target::install_software_single_step_breakpoints):
1960 ...this.
1961 (single_step): Turn into...
1962 (linux_process_target::single_step): ...this.
1963 (linux_resume_one_lwp_throw): Turn into...
1964 (linux_process_target::resume_one_lwp_throw): ...this.
1965 (linux_resume_one_lwp): Turn into...
1966 (linux_process_target::resume_one_lwp): ...this.
1967 (resume_status_pending_p): Turn into...
1968 (linux_process_target::resume_status_pending): ...this.
1969 (need_step_over_p): Turn into...
1970 (linux_process_target::thread_needs_step_over): ...this.
1971 (linux_resume_one_thread): Turn into...
1972 (linux_process_target::resume_one_thread): ...this.
1973 (proceed_one_lwp): Turn into...
1974 (linux_process_target::proceed_one_lwp): ...this.
1975 (unsuspend_and_proceed_one_lwp): Turn into...
1976 (linux_process_target::unsuspend_and_proceed_one_lwp): ...this.
1977
1978 Update the calls/references to the above functions below.
1979
1980 (linux_process_target::handle_extended_wait)
1981 (linux_process_target::filter_event)
1982 (linux_process_target::wait_for_event_filtered)
1983 (linux_process_target::wait_1)
1984 (linux_process_target::move_out_of_jump_pad)
1985 (linux_process_target::start_step_over)
1986 (linux_process_target::resume)
1987 (linux_process_target::proceed_all_lwps)
1988 (regsets_store_inferior_registers)
1989 (linux_process_target::store_register)
1990
1991 * linux-low.h (class linux_process_target)
1992 <get_pc>
1993 <save_stop_reason>
1994 <thread_still_has_status_pending>
1995 <status_pending_p_callback>
1996 <resume_stopped_resumed_lwps>
1997 <install_software_single_step_breakpoints>
1998 <single_step>
1999 <resume_one_lwp_throw>
2000 <resume_one_lwp>
2001 <resume_status_pending>
2002 <thread_needs_step_over>
2003 <resume_one_thread>
2004 <proceed_one_lwp>
2005 <unsuspend_and_proceed_one_lwp>: Declare.
2006
2007 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2008
2009 Turn the 'fetch_register' linux target op into a method of
2010 linux_process_target.
2011
2012 * linux-low.h (struct linux_target_ops) <fetch_register>: Remove.
2013 (class linux_process_target) <low_fetch_register>: Declare.
2014 * linux-x86-low.cc (the_low_target)
2015 * linux-aarch64-low.cc (the_low_target)
2016 * linux-arm-low.cc (the_low_target)
2017 * linux-bfin-low.cc (the_low_target)
2018 * linux-cris-low.cc (the_low_target)
2019 * linux-crisv32-low.cc (the_low_target)
2020 * linux-m32r-low.cc (the_low_target)
2021 * linux-m68k-low.cc (the_low_target)
2022 * linux-nios2-low.cc (the_low_target)
2023 * linux-ppc-low.cc (the_low_target)
2024 * linux-s390-low.cc (the_low_target)
2025 * linux-sh-low.cc (the_low_target)
2026 * linux-sparc-low.cc (the_low_target)
2027 * linux-tic6x-low.cc (the_low_target)
2028 * linux-tile-low.cc (the_low_target)
2029 * linux-xtensa-low.cc (the_low_target): Remove the op field.
2030 * linux-ia64-low.cc (class ia64_target) <low_fetch_register>:
2031 Declare.
2032 (ia64_fetch_register): Turn into...
2033 (ia64_target::low_fetch_register): ...this.
2034 (the_low_target): Remove the op field.
2035 * linux-mips-low.cc (class mips_target) <low_fetch_register>:
2036 Declare.
2037 (mips_fetch_register): Turn into...
2038 (mips_target::low_fetch_register): ...this.
2039 (the_low_target): Remove the op field.
2040 * linux-riscv-low.cc (class riscv_target) <low_fetch_register>:
2041 Declare.
2042 (riscv_fetch_register): Turn into...
2043 (riscv_target::low_fetch_register): ...this.
2044 (the_low_target): Remove the op field.
2045
2046 Update the callers below.
2047
2048 * linux-low.cc (linux_process_target::fetch_registers)
2049 (linux_process_target::low_fetch_register)
2050
2051 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2052
2053 Turn the 'cannot_fetch_register' and 'cannot_store_register'
2054 linux target ops into methods of linux_process_target.
2055
2056 * linux-low.h (struct linux_target_ops): Remove the low target ops.
2057 (class linux_process_target) <fetch_register>
2058 <store_register>
2059 <usr_fetch_inferior_registers>
2060 <usr_store_inferior_registers>
2061 <low_cannot_fetch_register>
2062 <low_cannot_fetch_register> Declare.
2063 * linux-low.cc (fetch_register): Turn into...
2064 (linux_process_target::fetch_register): ...this.
2065 (store_register): Turn into ...
2066 (linux_process_target::store_register): ...this.
2067 (usr_fetch_inferior_registers): Turn into...
2068 (linux_process_target::usr_fetch_inferior_registers): ...this.
2069 (usr_store_inferior_registers): Turn into...
2070 (linux_process_target::usr_store_inferior_registers): ...this.
2071 * linux-x86-low.cc (class x86_target)
2072 <low_cannot_fetch_register>
2073 <low_cannot_store_register>: Declare.
2074 (x86_cannot_store_register): Turn into...
2075 (x86_target::low_cannot_store_register): ...this.
2076 (x86_cannot_fetch_register): Turn into...
2077 (x86_target::low_cannot_fetch_register): ...this.
2078 (the_low_target): Remove the target op fields.
2079 * linux-aarch64-low.cc (class aarch64_target)
2080 <low_cannot_fetch_register>
2081 <low_cannot_store_register>: Declare.
2082 (aarch64_target::low_cannot_fetch_register)
2083 (aarch64_target::low_cannot_store_register): Define.
2084 (the_low_target): Remove the op fields.
2085 * linux-arm-low.cc (class arm_target)
2086 <low_cannot_fetch_register>
2087 <low_cannot_store_register>: Declare.
2088 (arm_cannot_fetch_register): Turn into...
2089 (arm_target::low_cannot_fetch_register): ...this.
2090 (arm_cannot_store_register): Turn into...
2091 (arm_target::low_cannot_store_register): ...this.
2092 (the_low_target): Remove the op fields.
2093 * linux-bfin-low.cc (class bfin_target)
2094 <low_cannot_fetch_register>
2095 <low_cannot_store_register>: Declare.
2096 (bfin_cannot_fetch_register): Turn into...
2097 (bfin_target::low_cannot_fetch_register): ...this.
2098 (bfin_cannot_store_register): Turn into...
2099 (bfin_target::low_cannot_store_register): ...this.
2100 (the_low_target): Remove the op fields.
2101 * linux-cris-low.cc (class cris_target)
2102 <low_cannot_fetch_register>
2103 <low_cannot_store_register>: Declare.
2104 (cris_cannot_fetch_register): Turn into...
2105 (cris_target::low_cannot_fetch_register): ...this.
2106 (cris_cannot_store_register): Turn into...
2107 (cris_target::low_cannot_store_register): ...this.
2108 (the_low_target): Remove the op fields.
2109 * linux-crisv32-low.cc (class crisv32_target)
2110 <low_cannot_fetch_register>
2111 <low_cannot_store_register>: Declare.
2112 (crisv32_target::low_cannot_fetch_register)
2113 (crisv32_target::low_cannot_store_register): Define.
2114 (the_low_target): Remove the op fields.
2115 * linux-ia64-low.cc (class ia64_target)
2116 <low_cannot_fetch_register>
2117 <low_cannot_store_register>: Declare.
2118 (ia64_cannot_fetch_register): Turn into...
2119 (ia64_target::low_cannot_fetch_register): ...this.
2120 (ia64_cannot_store_register): Turn into...
2121 (ia64_target::low_cannot_store_register): ...this.
2122 (the_low_target): Remove the op fields.
2123 * linux-m32r-low.cc (class m32r_target)
2124 <low_cannot_fetch_register>
2125 <low_cannot_store_register>: Declare.
2126 (m32r_cannot_fetch_register): Turn into...
2127 (m32r_target::low_cannot_fetch_register): ...this.
2128 (m32r_cannot_store_register): Turn into...
2129 (m32r_target::low_cannot_store_register): ...this.
2130 (the_low_target): Remove the op fields.
2131 * linux-m68k-low.cc (class m68k_target)
2132 <low_cannot_fetch_register>
2133 <low_cannot_store_register>: Declare.
2134 (m68k_cannot_fetch_register): Turn into...
2135 (m68k_target::low_cannot_fetch_register): ...this.
2136 (m68k_cannot_store_register): Turn into...
2137 (m68k_target::low_cannot_store_register): ...this.
2138 (the_low_target): Remove the op fields.
2139 * linux-mips-low.cc (class mips_target)
2140 <low_cannot_fetch_register>
2141 <low_cannot_store_register>: Declare.
2142 (mips_cannot_fetch_register): Turn into...
2143 (mips_target::low_cannot_fetch_register): ...this.
2144 (mips_cannot_store_register): Turn into...
2145 (mips_target::low_cannot_store_register): ...this.
2146 (get_usrregs_info): Inline at the call sites in
2147 low_cannot_fetch_register and low_cannot_store_register,
2148 and remove.
2149 (the_low_target): Remove the op fields.
2150 * linux-nios2-low.cc (class nios2_target)
2151 <low_cannot_fetch_register>
2152 <low_cannot_store_register>: Declare.
2153 (nios2_cannot_fetch_register): Turn into...
2154 (nios2_target::low_cannot_fetch_register): ...this.
2155 (nios2_cannot_store_register): Turn into...
2156 (nios2_target::low_cannot_store_register): ...this.
2157 (the_low_target): Remove the op fields.
2158 * linux-ppc-low.cc (class ppc_target)
2159 <low_cannot_fetch_register>
2160 <low_cannot_store_register>: Declare.
2161 (ppc_cannot_fetch_register): Turn into...
2162 (ppc_target::low_cannot_fetch_register): ...this.
2163 (ppc_cannot_store_register): Turn into...
2164 (ppc_target::low_cannot_store_register): ...this.
2165 (the_low_target): Remove the op fields.
2166 * linux-riscv-low.cc (class riscv_target)
2167 <low_cannot_fetch_register>
2168 <low_cannot_store_register>: Declare.
2169 (riscv_target::low_cannot_fetch_register)
2170 (riscv_target::low_cannot_store_register): Define.
2171 (the_low_target): Remove the op fields.
2172 * linux-s390-low.cc (class s390_target)
2173 <low_cannot_fetch_register>
2174 <low_cannot_store_register>: Declare.
2175 (s390_cannot_fetch_register): Turn into...
2176 (s390_target::low_cannot_fetch_register): ...this.
2177 (s390_cannot_store_register): Turn into...
2178 (s390_target::low_cannot_store_register): ...this.
2179 (the_low_target): Remove the op fields.
2180 * linux-sh-low.cc (class sh_target)
2181 <low_cannot_fetch_register>
2182 <low_cannot_store_register>: Declare.
2183 (sh_cannot_fetch_register): Turn into...
2184 (sh_target::low_cannot_fetch_register): ...this.
2185 (sh_cannot_store_register): Turn into...
2186 (sh_target::low_cannot_store_register): ...this.
2187 (the_low_target): Remove the op fields.
2188 * linux-sparc-low.cc (class sparc_target)
2189 <low_cannot_fetch_register>
2190 <low_cannot_store_register>: Declare.
2191 (sparc_cannot_fetch_register): Turn into...
2192 (sparc_target::low_cannot_fetch_register): ...this.
2193 (sparc_cannot_store_register): Turn into...
2194 (sparc_target::low_cannot_store_register): ...this.
2195 (the_low_target): Remove the op fields.
2196 * linux-tic6x-low.cc (class tic6x_target)
2197 <low_cannot_fetch_register>
2198 <low_cannot_store_register>: Declare.
2199 (tic6x_cannot_fetch_register): Turn into...
2200 (tic6x_target::low_cannot_fetch_register): ...this.
2201 (tic6x_cannot_store_register): Turn into...
2202 (tic6x_target::low_cannot_store_register): ...this.
2203 (the_low_target): Remove the op fields.
2204 * linux-tile-low.cc (class tile_target)
2205 <low_cannot_fetch_register>
2206 <low_cannot_store_register>: Declare.
2207 (tile_cannot_fetch_register): Turn into...
2208 (tile_target::low_cannot_fetch_register): ...this.
2209 (tile_cannot_store_register): Turn into...
2210 (tile_target::low_cannot_store_register): ...this.
2211 (the_low_target): Remove the op fields.
2212 * linux-xtensa-low.cc (class xtensa_target)
2213 <low_cannot_fetch_register>
2214 <low_cannot_store_register>: Declare.
2215 (xtensa_target::low_cannot_fetch_register)
2216 (xtensa_target::low_cannot_store_register): Define.
2217 (the_low_target): Remove the op fields.
2218
2219 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2220
2221 Turn the 'regs_info' linux target op into a method of
2222 linux_process_target.
2223
2224 * linux-low.h (struct linux_target_ops) <regs_info>: Remove.
2225 (class linux_process_target) <get_regs_info>: Define.
2226
2227 Update the callers below.
2228
2229 * linux-low.cc (linux_process_target::fetch_registers)
2230 (linux_process_target::store_registers)
2231 * proc-service.cc (gregset_info)
2232
2233 * linux-x86-low.cc (class x86_target) <get_regs_info>: Declare.
2234 (x86_linux_regs_info): Turn into ...
2235 (x86_target::get_regs_info): ...this.
2236 (the_low_target): Remove the op field.
2237 * linux-aarch64-low.cc (class aarch64_target) <get_regs_info>:
2238 Declare.
2239 (aarch64_regs_info): Turn into ...
2240 (aarch64_target::get_regs_info): ...this.
2241 (the_low_target): Remove the op field.
2242 * linux-arm-low.cc (class arm_target) <get_regs_info>: Declare.
2243 (arm_regs_info): Turn into ...
2244 (arm_target::get_regs_info): ...this.
2245 (the_low_target): Remove the op field.
2246 * linux-bfin-low.cc (class bfin_target) <get_regs_info>: Declare.
2247 (bfin_regs_info): Turn into ...
2248 (bfin_target::get_regs_info): ...this.
2249 (the_low_target): Remove the op field.
2250 * linux-cris-low.cc (class cris_target) <get_regs_info>: Declare.
2251 (cris_regs_info): Turn into ...
2252 (cris_target::get_regs_info): ...this.
2253 (the_low_target): Remove the op field.
2254 * linux-crisv32-low.cc (class crisv32_target) <get_regs_info>:
2255 Declare.
2256 (crisv32_regs_info): Turn into ...
2257 (crisv32_target::get_regs_info): ...this.
2258 (the_low_target): Remove the op field.
2259 * linux-ia64-low.cc (class ia64_target) <get_regs_info>: Declare.
2260 (ia64_regs_info): Turn into ...
2261 (ia64_target::get_regs_info): ...this.
2262 (the_low_target): Remove the op field.
2263 * linux-m32r-low.cc (class m32r_target) <get_regs_info>: Declare.
2264 (m32r_regs_info): Turn into ...
2265 (m32r_target::get_regs_info): ...this.
2266 (the_low_target): Remove the op field.
2267 * linux-m68k-low.cc (class m68k_target) <get_regs_info>: Declare.
2268 (m68k_regs_info): Turn into ...
2269 (m68k_target::get_regs_info): ...this.
2270 (the_low_target): Remove the op field.
2271 * linux-mips-low.cc (class mips_target) <get_regs_info>: Declare.
2272 (mips_regs_info): Turn into ...
2273 (mips_target::get_regs_info): ...this.
2274 (the_low_target): Remove the op field.
2275 (get_usrregs_info): Update the call to the op.
2276 * linux-nios2-low.cc (class nios2_target) <get_regs_info>: Declare.
2277 (nios2_regs_info): Turn into ...
2278 (nios2_target::get_regs_info): ...this.
2279 (the_low_target): Remove the op field.
2280 * linux-ppc-low.cc (class ppc_target) <get_regs_info>: Declare.
2281 (ppc_regs_info): Turn into ...
2282 (ppc_target::get_regs_info): ...this.
2283 (the_low_target): Remove the op field.
2284 * linux-riscv-low.cc (class riscv_target) <get_regs_info>: Declare.
2285 (riscv_regs_info): Turn into ...
2286 (riscv_target::get_regs_info): ...this.
2287 (the_low_target): Remove the op field.
2288 * linux-s390-low.cc (class s390_target) <get_regs_info>: Declare.
2289 (s390_regs_info): Turn into ...
2290 (s390_target::get_regs_info): ...this.
2291 (the_low_target): Remove the op field.
2292 (s390_collect_ptrace_register)
2293 (s390_supply_ptrace_register)
2294 (s390_fill_gregset): Update the call to the op.
2295 * linux-sh-low.cc (class sh_target) <get_regs_info>: Declare.
2296 (sh_regs_info): Turn into ...
2297 (sh_target::get_regs_info): ...this.
2298 (the_low_target): Remove the op field.
2299 * linux-sparc-low.cc (class sparc_target) <get_regs_info>: Declare.
2300 (sparc_regs_info): Turn into ...
2301 (sparc_target::get_regs_info): ...this.
2302 (the_low_target): Remove the op field.
2303 * linux-tic6x-low.cc (class tic6x_target) <get_regs_info>: Declare.
2304 (tic6x_regs_info): Turn into ...
2305 (tic6x_target::get_regs_info): ...this.
2306 (the_low_target): Remove the op field.
2307 * linux-tile-low.cc (class tile_target) <get_regs_info>: Declare.
2308 (tile_regs_info): Turn into ...
2309 (tile_target::get_regs_info): ...this.
2310 (the_low_target): Remove the op field.
2311 * linux-xtensa-low.cc (class xtensa_target) <get_regs_info>:
2312 Declare.
2313 (xtensa_regs_info): Turn into ...
2314 (xtensa_target::get_regs_info): ...this.
2315 (the_low_target): Remove the op field.
2316
2317 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2318
2319 Turn the 'arch_setup' linux target op into a method of
2320 linux_process_target.
2321
2322 * linux-low.h (struct linux_target_ops) <arch_setup>: Delete.
2323 (class linux_process_target) <arch_setup_thread>
2324 <low_arch_setup>: New declarations.
2325 * linux-low.cc (linux_arch_setup): Delete.
2326 (linux_arch_setup_thread): Turn into...
2327 (linux_process_target::arch_setup_thread): ... this.
2328
2329 Update the callers below.
2330
2331 (linux_process_target::handle_extended_wait)
2332 (linux_process_target::post_create_inferior)
2333 (linux_process_target::filter_event)
2334
2335 * linux-x86-low.cc (class x86_target) <low_arch_setup>: New
2336 declaration.
2337 (x86_linux_update_xmltarget): Turn into...
2338 (x86_target::update_xmltarget): ...this.
2339 (x86_linux_process_qsupported): Update the call to
2340 x86_linux_update_xmltarget.
2341 (x86_arch_setup): Turn into ...
2342 (x86_target::low_arch_setup): ...this.
2343 (the_low_target): Remove the op field.
2344 * linux-aarch64-low.cc (class aarch64_target) <low_arch_setup>: New
2345 declaration.
2346 (aarch64_arch_setup): Turn into ...
2347 (aarch64_target::low_arch_setup): ...this.
2348 (the_low_target): Remove the op field.
2349 * linux-arm-low.cc (class arm_target) <low_arch_setup>: New
2350 declaration.
2351 (arm_arch_setup): Turn into ...
2352 (arm_target::low_arch_setup): ...this.
2353 (the_low_target): Remove the op field.
2354 * linux-bfin-low.cc (class bfin_target) <low_arch_setup>: New
2355 declaration.
2356 (bfin_arch_setup): Turn into ...
2357 (bfin_target::low_arch_setup): ...this.
2358 (the_low_target): Remove the op field.
2359 * linux-cris-low.cc (class cris_target) <low_arch_setup>: New
2360 declaration.
2361 (cris_arch_setup): Turn into ...
2362 (cris_target::low_arch_setup): ...this.
2363 (the_low_target): Remove the op field.
2364 * linux-crisv32-low.cc (class crisv32_target) <low_arch_setup>: New
2365 declaration.
2366 (crisv32_arch_setup): Turn into ...
2367 (crisv32_target::low_arch_setup): ...this.
2368 (the_low_target): Remove the op field.
2369 * linux-ia64-low.cc (class ia64_target) <low_arch_setup>: New
2370 declaration.
2371 (ia64_arch_setup): Turn into ...
2372 (ia64_target::low_arch_setup): ...this.
2373 (the_low_target): Remove the op field.
2374 * linux-m32r-low.cc (class m32r_target) <low_arch_setup>: New
2375 declaration.
2376 (m32r_arch_setup): Turn into ...
2377 (m32r_target::low_arch_setup): ...this.
2378 (the_low_target): Remove the op field.
2379 * linux-m68k-low.cc (class m68k_target) <low_arch_setup>: New
2380 declaration.
2381 (m68k_arch_setup): Turn into ...
2382 (m68k_target::low_arch_setup): ...this.
2383 (the_low_target): Remove the op field.
2384 * linux-mips-low.cc (class mips_target) <low_arch_setup>: New
2385 declaration.
2386 (mips_arch_setup): Turn into ...
2387 (mips_target::low_arch_setup): ...this.
2388 (the_low_target): Remove the op field.
2389 * linux-nios2-low.cc (class nios2_target) <low_arch_setup>: New
2390 declaration.
2391 (nios2_arch_setup): Turn into ...
2392 (nios2_target::low_arch_setup): ...this.
2393 (the_low_target): Remove the op field.
2394 * linux-ppc-low.cc (class ppc_target) <low_arch_setup>: New
2395 declaration.
2396 (ppc_arch_setup): Turn into ...
2397 (ppc_target::low_arch_setup): ...this.
2398 (the_low_target): Remove the op field.
2399 * linux-riscv-low.cc (class riscv_target) <low_arch_setup>: New
2400 declaration.
2401 (riscv_arch_setup): Turn into ...
2402 (riscv_target::low_arch_setup): ...this.
2403 (the_low_target): Remove the op field.
2404 * linux-s390-low.cc (class s390_target) <low_arch_setup>: New
2405 declaration.
2406 (s390_arch_setup): Turn into ...
2407 (s390_target::low_arch_setup): ...this.
2408 (the_low_target): Remove the op field.
2409 * linux-sh-low.cc (class sh_target) <low_arch_setup>: New
2410 declaration.
2411 (sh_arch_setup): Turn into ...
2412 (sh_target::low_arch_setup): ...this.
2413 (the_low_target): Remove the op field.
2414 * linux-sparc-low.cc (class sparc_target) <low_arch_setup>: New
2415 declaration.
2416 (sparc_arch_setup): Turn into ...
2417 (sparc_target::low_arch_setup): ...this.
2418 (the_low_target): Remove the op field.
2419 * linux-tic6x-low.cc (class tic6x_target) <low_arch_setup>: New
2420 declaration.
2421 (tic6x_arch_setup): Turn into ...
2422 (tic6x_target::low_arch_setup): ...this.
2423 (the_low_target): Remove the op field.
2424 * linux-tile-low.cc (class tile_target) <low_arch_setup>: New
2425 declaration.
2426 (tile_arch_setup): Turn into ...
2427 (tile_target::low_arch_setup): ...this.
2428 (the_low_target): Remove the op field.
2429 * linux-xtensa-low.cc (class xtensa_target) <low_arch_setup>: New
2430 declaration.
2431 (xtensa_arch_setup): Turn into ...
2432 (xtensa_target::low_arch_setup): ...this.
2433 (the_low_target): Remove the op field.
2434
2435 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2436
2437 * linux-low.h (the_linux_target): New extern declaration.
2438 * linux-low.cc (initialize_low): Use 'the_linux_target' to set
2439 'the_target'.
2440 (the_linux_target): Remove.
2441 * linux-x86-low.cc (class x86_target): New class.
2442 (the_x86_target): New static object.
2443 (the_linux_target): Define as pointer to the_x86_target.
2444 * linux-aarch64-low.cc (class aarch64_target): New class.
2445 (the_aarch64_target): New static object.
2446 (the_linux_target): Define as pointer to the_aarch64_target.
2447 * linux-arm-low.cc (class arm_target): New class.
2448 (the_arm_target): New static object.
2449 (the_linux_target): Define as pointer to the_arm_target.
2450 * linux-bfin-low.cc (class bfin_target): New class.
2451 (the_bfin_target): New static object.
2452 (the_linux_target): Define as pointer to the_bfin_target.
2453 * linux-cris-low.cc (class cris_target): New class.
2454 (the_cris_target): New static object.
2455 (the_linux_target): Define as pointer to the_cris_target.
2456 * linux-crisv32-low.cc (class crisv32_target): New class.
2457 (the_crisv32_target): New static object.
2458 (the_linux_target): Define as pointer to the_crisv32_target.
2459 * linux-ia64-low.cc (class ia64_target): New class.
2460 (the_ia64_target): New static object.
2461 (the_linux_target): Define as pointer to the_ia64_target.
2462 * linux-m32r-low.cc (class m32r_target): New class.
2463 (the_m32r_target): New static object.
2464 (the_linux_target): Define as pointer to the_m32r_target.
2465 * linux-m68k-low.cc (class m68k_target): New class.
2466 (the_m68k_target): New static object.
2467 (the_linux_target): Define as pointer to the_m68k_target.
2468 * linux-mips-low.cc (class mips_target): New class.
2469 (the_mips_target): New static object.
2470 (the_linux_target): Define as pointer to the_mips_target.
2471 * linux-nios2-low.cc (class nios2_target): New class.
2472 (the_nios2_target): New static object.
2473 (the_linux_target): Define as pointer to the_nios2_target.
2474 * linux-ppc-low.cc (class ppc_target): New class.
2475 (the_ppc_target): New static object.
2476 (the_linux_target): Define as pointer to the_ppc_target.
2477 * linux-riscv-low.cc (class riscv_target): New class.
2478 (the_riscv_target): New static object.
2479 (the_linux_target): Define as pointer to the_riscv_target.
2480 * linux-s390-low.cc (class s390_target): New class.
2481 (the_s390_target): New static object.
2482 (the_linux_target): Define as pointer to the_s390_target.
2483 * linux-sh-low.cc (class sh_target): New class.
2484 (the_sh_target): New static object.
2485 (the_linux_target): Define as pointer to the_sh_target.
2486 * linux-sparc-low.cc (class sparc_target): New class.
2487 (the_sparc_target): New static object.
2488 (the_linux_target): Define as pointer to the_sparc_target.
2489 * linux-tic6x-low.cc (class tic6x_target): New class.
2490 (the_tic6x_target): New static object.
2491 (the_linux_target): Define as pointer to the_tic6x_target.
2492 * linux-tile-low.cc (class tile_target): New class.
2493 (the_tile_target): New static object.
2494 (the_linux_target): Define as pointer to the_tile_target.
2495 * linux-xtensa-low.cc (class xtensa_target): New class.
2496 (the_xtensa_target): New static object.
2497 (the_linux_target): Define as pointer to the_xtensa_target.
2498
2499 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2500
2501 Turn some static functions in linux-low.cc into private methods of
2502 linux_process_target.
2503
2504 * linux-low.cc (handle_extended_wait): Turn into ...
2505 (linux_process_target::handle_extended_wait): ...this. Call
2506 'mourn' on 'this' object instead of 'the_target'.
2507 (maybe_move_out_of_jump_pad): Turn into...
2508 (linux_process_target::maybe_move_out_of_jump_pad): ...this.
2509 (linux_low_filter_event): Turn into...
2510 (linux_process_target::filter_event): ...this.
2511 (linux_wait_for_event_filtered): Turn into...
2512 (linux_process_target::wait_for_event_filtered): ...this.
2513 (linux_wait_for_event): Turn into...
2514 (linux_process_target::wait_for_event): ...this.
2515 (linux_wait_1): Turn into...
2516 (linux_process_target::wait_1): ...this.
2517 (wait_for_sigstop): Turn into...
2518 (linux_process_target::wait_for_sigstop): ...this.
2519 (move_out_of_jump_pad_callback): Turn into...
2520 (linux_process_target::move_out_of_jump_pad): ...this.
2521 (stop_all_lwps): Turn into...
2522 (linux_process_target::stop_all_lwps): ...this.
2523 (start_step_over): Turn into...
2524 (linux_process_target::start_step_over): ...this.
2525 (complete_ongoing_step_over): Turn into...
2526 (linux_process_target::complete_ongoing_step_over): ...this.
2527 (proceed_all_lwps): Turn into...
2528 (linux_process_target::proceed_all_lwps): ...this.
2529 (unstop_all_lwps): Turn into...
2530 (linux_process_target::unstop_all_lwps): ...this.
2531
2532 * linux-low.h (class linux_process_target)
2533 <handle_extended_wait>
2534 <maybe_move_out_of_jump_pad>
2535 filter_event>
2536 <wait_for_event_filtered>
2537 <wait_for_event>
2538 <wait_1>
2539 <wait_for_sigstop>
2540 <move_out_of_jump_pad>
2541 <stop_all_lwps>
2542 <start_step_over>
2543 <complete_ongoing_step_over>
2544 <proceed_all_lwps>
2545 <unstop_all_lwps>: Declare.
2546
2547 Update the callers below.
2548
2549 * linux-low.cc (linux_process_target::attach): Update.
2550 (linux_process_target::stabilize_threads): Ditto.
2551 (linux_process_target::wait): Ditto.
2552
2553 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2554
2555 * linux-low.h (struct linux_target_ops): Update the comment for
2556 'cannot_store_register' to return 0 or 1.
2557 * linux-ppc-low.cc (ppc_cannot_store_register): Return 1 instead
2558 of 2.
2559
2560 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
2561
2562 * config.in: Re-generate.
2563 * configure: Re-generate.
2564
2565 2020-03-17 Kamil Rytarowski <n54@gmx.com>
2566
2567 * regcache.cc (find_register_by_number): Update.
2568 * tdesc.cc (init_target_desc): Likewise.
2569 * tdesc.h (target_desc::reg_defs): Likewise.
2570
2571 2020-03-12 Tom Tromey <tom@tromey.com>
2572
2573 * configure: Rebuild.
2574 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
2575 (WIN32APILIBS): New subst.
2576 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
2577 gdbsupport files.
2578 (gdbsupport/%.o): Remove target.
2579 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
2580 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
2581 (WIN32APILIBS): New variable.
2582 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
2583 (gdbreplay$(EXEEXT)): Likewise.
2584
2585 2020-03-12 Tom Tromey <tom@tromey.com>
2586
2587 * config.in, configure: Rebuild.
2588 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
2589 * acinclude.m4: Include gettext-sister.m4.
2590 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
2591 variables.
2592 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
2593 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
2594
2595 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2596
2597 * acinclude.m4: Update path to selftest.m4.
2598
2599 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2600
2601 * configure.ac: Don't source bfd/development.sh, move
2602 GDB_AC_COMMON higher.
2603 * configure: Re-generate.
2604
2605 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2606
2607 * configure: Re-generate.
2608
2609 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
2610
2611 * configure: Re-generate.
2612
2613 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2614
2615 * .dir-locals.el: New file.
2616
2617 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2618
2619 * .gitattributes: New file.
2620
2621 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
2622
2623 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
2624 reply into an S reply.
2625 * server.cc (disable_packet_T): New global.
2626 (captured_main): Set new global when appropriate.
2627 * server.h (disable_packet_T): Declare.
2628
2629 2020-02-21 Tom Tromey <tom@tromey.com>
2630
2631 * Makefile.in (mostlyclean): New target.
2632
2633 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2634
2635 * target.h (struct process_stratum_target): Remove.
2636 (class process_target): Rename to ...
2637 (class process_stratum_target): ... this.
2638 * linux-low.h (class linux_process_target): Derive from
2639 'process_stratum_target'.
2640 * linux-low.cc (linux_target_ops): Remove.
2641 (initialize_low): Set the_target to the singleton instance of
2642 linux_process_target.
2643 * lynx-low.h (class lynx_process_target): Derive from
2644 'process_stratum_target'.
2645 * lynx-low.cc (lynx_target_ops): Remove.
2646 (initialize_low): Set the_target to the singleton instance of
2647 lynx_process_target.
2648 * nto-low.h (class nto_process_target): Derive from
2649 'process_stratum_target'.
2650 * nto-low.cc (nto_target_ops): Remove.
2651 (initialize_low): Set the_target to the singleton instance of
2652 nto_process_target.
2653 * win32-low.h (class win32_process_target): Derive from
2654 'process_stratum_target'.
2655 * win32-low.cc (win32_target_ops): Remove.
2656 (initialize_low): Set the_target to the singleton instance of
2657 win32_process_target.
2658
2659 Replace 'the_target->pt' with 'the_target' in the uses below.
2660
2661 * hostio.cc (hostio_error)
2662 (handle_setfs)
2663 (handle_open)
2664 (handle_unlink)
2665 (handle_readlink)
2666 * linux-aarch32-low.cc (arm_breakpoint_at)
2667 * linux-aarch64-low.cc (aarch64_breakpoint_at)
2668 * linux-arm-low.cc (arm_sigreturn_next_pc)
2669 (arm_get_hwcap)
2670 (arm_get_syscall_trapinfo)
2671 * linux-cris-low.cc (cris_breakpoint_at)
2672 * linux-crisv32-low.cc (cris_breakpoint_at)
2673 * linux-low.cc (handle_extended_wait)
2674 (linux_wait_1)
2675 (linux_read_memory)
2676 (linux_process_target::breakpoint_kind_from_pc)
2677 (linux_get_auxv)
2678 * linux-m32r-low.cc (m32r_breakpoint_at)
2679 * linux-mips-low.cc (mips_breakpoint_at)
2680 * linux-nios2-low.cc (nios2_breakpoint_at)
2681 * linux-ppc-low.cc (ppc_breakpoint_at)
2682 * linux-s390-low.cc (s390_get_hwcap)
2683 * linux-sh-low.cc (sh_breakpoint_at)
2684 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
2685 (sparc_store_gregset_from_stack)
2686 (sparc_breakpoint_at)
2687 * linux-tic6x-low.cc (tic6x_breakpoint_at)
2688 * linux-tile-low.cc (tile_breakpoint_at)
2689 * linux-x86-low.cc (x86_breakpoint_at)
2690 * linux-xtensa-low.cc (xtensa_breakpoint_at)
2691 * mem-break.cc (bp_size)
2692 (bp_opcode)
2693 (insert_memory_breakpoint)
2694 (set_raw_breakpoint_at)
2695 (delete_raw_breakpoint)
2696 (z_type_supported)
2697 (uninsert_raw_breakpoint)
2698 (reinsert_raw_breakpoint)
2699 (validate_inserted_breakpoint)
2700 * regcache.cc (regcache_read_pc)
2701 (regcache_write_pc)
2702 * remote-utils.cc (putpkt_binary_1)
2703 (input_interrupt)
2704 (getpkt)
2705 (prepare_resume_reply)
2706 * server.cc (handle_general_set)
2707 (handle_detach)
2708 (handle_qxfer_auxv)
2709 (handle_qxfer_exec_file)
2710 (handle_qxfer_libraries_svr4)
2711 (handle_qxfer_osdata)
2712 (handle_qxfer_siginfo)
2713 (handle_qxfer_fdpic)
2714 (handle_query)
2715 (resume)
2716 (handle_v_requests)
2717 (queue_stop_reply_callback)
2718 (captured_main)
2719 * target.cc (prepare_to_access_memory)
2720 (done_accessing_memory)
2721 (read_inferior_memory)
2722 (target_write_memory)
2723 (target_stop_and_wait)
2724 (target_wait)
2725 (target_mourn_inferior)
2726 (target_continue_no_signal)
2727 (target_continue)
2728 (target_supports_multi_process)
2729 (kill_inferior)
2730 * target.h
2731 (target_create_inferior)
2732 (target_post_create_inferior)
2733 (myattach)
2734 (target_supports_fork_events)
2735 (target_supports_vfork_events)
2736 (target_supports_exec_events)
2737 (target_handle_new_gdb_connection)
2738 (detach_inferior)
2739 (mythread_alive)
2740 (fetch_inferior_registers)
2741 (store_inferior_registers)
2742 (join_inferior)
2743 (target_supports_non_stop)
2744 (target_async)
2745 (target_process_qsupported)
2746 (target_supports_catch_syscall)
2747 (target_get_ipa_tdesc_idx)
2748 (target_supports_tracepoints)
2749 (target_supports_fast_tracepoints)
2750 (target_get_min_fast_tracepoint_insn_len)
2751 (target_thread_stopped)
2752 (target_pause_all)
2753 (target_unpause_all)
2754 (target_stabilize_threads)
2755 (target_install_fast_tracepoint_jump_pad)
2756 (target_emit_ops)
2757 (target_supports_disable_randomization)
2758 (target_supports_agent)
2759 (target_enable_btrace)
2760 (target_disable_btrace)
2761 (target_read_btrace)
2762 (target_read_btrace_conf)
2763 (target_supports_range_stepping)
2764 (target_supports_stopped_by_sw_breakpoint)
2765 (target_stopped_by_sw_breakpoint)
2766 (target_supports_stopped_by_hw_breakpoint)
2767 (target_supports_hardware_single_step)
2768 (target_stopped_by_hw_breakpoint)
2769 (target_breakpoint_kind_from_pc)
2770 (target_breakpoint_kind_from_current_state)
2771 (target_supports_software_single_step)
2772 (target_core_of_thread)
2773 (target_thread_name)
2774 (target_thread_handle)
2775 * win32-low.cc (do_initial_child_stuff)
2776
2777 Rename target op default definitions listed below.
2778
2779 * target.cc (process_target::post_create_inferior): Rename as ...
2780 (process_stratum_target::post_create_inferior): ... this.
2781 (process_target::prepare_to_access_memory): Rename as ...
2782 (process_stratum_target::prepare_to_access_memory): ... this.
2783 (process_target::done_accessing_memory): Rename as ...
2784 (process_stratum_target::done_accessing_memory): ... this.
2785 (process_target::look_up_symbols): Rename as ...
2786 (process_stratum_target::look_up_symbols): ... this.
2787 (process_target::supports_read_auxv): Rename as ...
2788 (process_stratum_target::supports_read_auxv): ... this.
2789 (process_target::read_auxv): Rename as ...
2790 (process_stratum_target::read_auxv): ... this.
2791 (process_target::supports_z_point_type): Rename as ...
2792 (process_stratum_target::supports_z_point_type): ... this.
2793 (process_target::insert_point): Rename as ...
2794 (process_stratum_target::insert_point): ... this.
2795 (process_target::remove_point): Rename as ...
2796 (process_stratum_target::remove_point): ... this.
2797 (process_target::stopped_by_sw_breakpoint): Rename as ...
2798 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
2799 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
2800 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
2801 (process_target::stopped_by_hw_breakpoint): Rename as ...
2802 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
2803 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
2804 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
2805 (process_target::supports_hardware_single_step): Rename as ...
2806 (process_stratum_target::supports_hardware_single_step): ... this.
2807 (process_target::stopped_by_watchpoint): Rename as ...
2808 (process_stratum_target::stopped_by_watchpoint): ... this.
2809 (process_target::stopped_data_address): Rename as ...
2810 (process_stratum_target::stopped_data_address): ... this.
2811 (process_target::supports_read_offsets): Rename as ...
2812 (process_stratum_target::supports_read_offsets): ... this.
2813 (process_target::read_offsets): Rename as ...
2814 (process_stratum_target::read_offsets): ... this.
2815 (process_target::supports_get_tls_address): Rename as ...
2816 (process_stratum_target::supports_get_tls_address): ... this.
2817 (process_target::get_tls_address): Rename as ...
2818 (process_stratum_target::get_tls_address): ... this.
2819 (process_target::hostio_last_error): Rename as ...
2820 (process_stratum_target::hostio_last_error): ... this.
2821 (process_target::supports_qxfer_osdata): Rename as ...
2822 (process_stratum_target::supports_qxfer_osdata): ... this.
2823 (process_target::qxfer_osdata): Rename as ...
2824 (process_stratum_target::qxfer_osdata): ... this.
2825 (process_target::supports_qxfer_siginfo): Rename as ...
2826 (process_stratum_target::supports_qxfer_siginfo): ... this.
2827 (process_target::qxfer_siginfo): Rename as ...
2828 (process_stratum_target::qxfer_siginfo): ... this.
2829 (process_target::supports_non_stop): Rename as ...
2830 (process_stratum_target::supports_non_stop): ... this.
2831 (process_target::async): Rename as ...
2832 (process_stratum_target::async): ... this.
2833 (process_target::start_non_stop): Rename as ...
2834 (process_stratum_target::start_non_stop): ... this.
2835 (process_target::supports_multi_process): Rename as ...
2836 (process_stratum_target::supports_multi_process): ... this.
2837 (process_target::supports_fork_events): Rename as ...
2838 (process_stratum_target::supports_fork_events): ... this.
2839 (process_target::supports_vfork_events): Rename as ...
2840 (process_stratum_target::supports_vfork_events): ... this.
2841 (process_target::supports_exec_events): Rename as ...
2842 (process_stratum_target::supports_exec_events): ... this.
2843 (process_target::handle_new_gdb_connection): Rename as ...
2844 (process_stratum_target::handle_new_gdb_connection): ... this.
2845 (process_target::handle_monitor_command): Rename as ...
2846 (process_stratum_target::handle_monitor_command): ... this.
2847 (process_target::core_of_thread): Rename as ...
2848 (process_stratum_target::core_of_thread): ... this.
2849 (process_target::supports_read_loadmap): Rename as ...
2850 (process_stratum_target::supports_read_loadmap): ... this.
2851 (process_target::read_loadmap): Rename as ...
2852 (process_stratum_target::read_loadmap): ... this.
2853 (process_target::process_qsupported): Rename as ...
2854 (process_stratum_target::process_qsupported): ... this.
2855 (process_target::supports_tracepoints): Rename as ...
2856 (process_stratum_target::supports_tracepoints): ... this.
2857 (process_target::read_pc): Rename as ...
2858 (process_stratum_target::read_pc): ... this.
2859 (process_target::write_pc): Rename as ...
2860 (process_stratum_target::write_pc): ... this.
2861 (process_target::supports_thread_stopped): Rename as ...
2862 (process_stratum_target::supports_thread_stopped): ... this.
2863 (process_target::thread_stopped): Rename as ...
2864 (process_stratum_target::thread_stopped): ... this.
2865 (process_target::supports_get_tib_address): Rename as ...
2866 (process_stratum_target::supports_get_tib_address): ... this.
2867 (process_target::get_tib_address): Rename as ...
2868 (process_stratum_target::get_tib_address): ... this.
2869 (process_target::pause_all): Rename as ...
2870 (process_stratum_target::pause_all): ... this.
2871 (process_target::unpause_all): Rename as ...
2872 (process_stratum_target::unpause_all): ... this.
2873 (process_target::stabilize_threads): Rename as ...
2874 (process_stratum_target::stabilize_threads): ... this.
2875 (process_target::supports_fast_tracepoints): Rename as ...
2876 (process_stratum_target::supports_fast_tracepoints): ... this.
2877 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
2878 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
2879 (process_target::emit_ops): Rename as ...
2880 (process_stratum_target::emit_ops): ... this.
2881 (process_target::supports_disable_randomization): Rename as ...
2882 (process_stratum_target::supports_disable_randomization): ... this.
2883 (process_target::supports_qxfer_libraries_svr4): Rename as ...
2884 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
2885 (process_target::qxfer_libraries_svr4): Rename as ...
2886 (process_stratum_target::qxfer_libraries_svr4): ... this.
2887 (process_target::supports_agent): Rename as ...
2888 (process_stratum_target::supports_agent): ... this.
2889 (process_target::enable_btrace): Rename as ...
2890 (process_stratum_target::enable_btrace): ... this.
2891 (process_target::disable_btrace): Rename as ...
2892 (process_stratum_target::disable_btrace): ... this.
2893 (process_target::read_btrace): Rename as ...
2894 (process_stratum_target::read_btrace): ... this.
2895 (process_target::read_btrace_conf): Rename as ...
2896 (process_stratum_target::read_btrace_conf): ... this.
2897 (process_target::supports_range_stepping): Rename as ...
2898 (process_stratum_target::supports_range_stepping): ... this.
2899 (process_target::supports_pid_to_exec_file): Rename as ...
2900 (process_stratum_target::supports_pid_to_exec_file): ... this.
2901 (process_target::pid_to_exec_file): Rename as ...
2902 (process_stratum_target::pid_to_exec_file): ... this.
2903 (process_target::supports_multifs): Rename as ...
2904 (process_stratum_target::supports_multifs): ... this.
2905 (process_target::multifs_open): Rename as ...
2906 (process_stratum_target::multifs_open): ... this.
2907 (process_target::multifs_unlink): Rename as ...
2908 (process_stratum_target::multifs_unlink): ... this.
2909 (process_target::multifs_readlink): Rename as ...
2910 (process_stratum_target::multifs_readlink): ... this.
2911 (process_target::breakpoint_kind_from_pc): Rename as ...
2912 (process_stratum_target::breakpoint_kind_from_pc): ... this.
2913 (process_target::breakpoint_kind_from_current_state): Rename as ...
2914 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
2915 (process_target::thread_name): Rename as ...
2916 (process_stratum_target::thread_name): ... this.
2917 (process_target::thread_handle): Rename as ...
2918 (process_stratum_target::thread_handle): ... this.
2919 (process_target::supports_software_single_step): Rename as ...
2920 (process_stratum_target::supports_software_single_step): ... this.
2921 (process_target::supports_catch_syscall): Rename as ...
2922 (process_stratum_target::supports_catch_syscall): ... this.
2923 (process_target::get_ipa_tdesc_idx): Rename as ...
2924 (process_stratum_target::get_ipa_tdesc_idx): ... this.
2925
2926 2020-02-20 Pedro Alves <palves@redhat.com>
2927
2928 * target.cc (set_target_ops): Simply copy the given target pointer
2929 instead of creating a copy of the pointed object.
2930
2931 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2932
2933 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
2934 of process_target.
2935
2936 * target.h (struct process_stratum_target): Remove the target op.
2937 (class process_target): Add the target op.
2938 (target_get_ipa_tdesc_idx): Update the macro.
2939 * target.cc (process_target::get_ipa_tdesc_idx): Define.
2940
2941 Update the derived classes and callers below.
2942
2943 * linux-low.cc (linux_target_ops): Update.
2944 (linux_get_ipa_tdesc_idx): Turn into ...
2945 (linux_process_target::get_ipa_tdesc_idx): ... this.
2946 * linux-low.h (class linux_process_target): Update.
2947 * lynx-low.cc (lynx_target_ops): Update.
2948 * nto-low.cc (nto_target_ops): Update.
2949 * win32-low.cc (win32_target_ops): Update.
2950
2951 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2952
2953 Turn process_stratum_target's supports_catch_syscall op into a
2954 method of process_target.
2955
2956 * target.h (struct process_stratum_target): Remove the target op.
2957 (class process_target): Add the target op.
2958 (target_supports_catch_syscall): Update the macro.
2959 * target.cc (process_target::supports_catch_syscall): Define.
2960
2961 Update the derived classes and callers below.
2962
2963 * linux-low.cc (linux_target_ops): Update.
2964 (linux_supports_catch_syscall): Turn into ...
2965 (linux_process_target::supports_catch_syscall): ... this.
2966 * linux-low.h (class linux_process_target): Update.
2967 * lynx-low.cc (lynx_target_ops): Update.
2968 * nto-low.cc (nto_target_ops): Update.
2969 * win32-low.cc (win32_target_ops): Update.
2970
2971 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2972
2973 Turn process_stratum_target's supports_software_single_step op
2974 into a method of process_target.
2975
2976 * target.h (struct process_stratum_target): Remove the target op.
2977 (class process_target): Add the target op.
2978 (target_supports_software_single_step): Update the macro.
2979 * target.cc (process_target::supports_software_single_step): Define.
2980
2981 Update the derived classes and callers below.
2982
2983 * linux-low.cc (linux_target_ops): Update.
2984 (linux_supports_software_single_step): Turn into ...
2985 (linux_process_target::supports_software_single_step): ... this.
2986 * linux-low.h (class linux_process_target): Update.
2987 * lynx-low.cc (lynx_target_ops): Update.
2988 * nto-low.cc (nto_target_ops): Update.
2989 * win32-low.cc (win32_target_ops): Update.
2990
2991 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2992
2993 Turn process_stratum_target's thread_name and thread_handle ops
2994 into methods of process_target.
2995
2996 * target.h (struct process_stratum_target): Remove the target ops.
2997 (class process_target): Add the target ops.
2998 (target_thread_name): Update the macro.
2999 (target_thread_handle): Update the macro.
3000 * target.cc (process_target::thread_name): Define.
3001 (process_target::thread_handle): Define.
3002
3003 Update the derived classes and callers below.
3004
3005 * linux-low.cc (linux_target_ops): Update.
3006 (linux_process_target::thread_name): Define.
3007 (linux_process_target::thread_handle): Define.
3008 * linux-low.h (class linux_process_target): Update.
3009 * lynx-low.cc (lynx_target_ops): Update.
3010 * nto-low.cc (nto_target_ops): Update.
3011 * win32-low.cc (win32_target_ops): Update.
3012
3013 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3014
3015 Turn process_stratum_target's breakpoint_kind_from_pc,
3016 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
3017 ops into methods of process_target.
3018
3019 * target.h (struct process_stratum_target): Remove the target op.
3020 (class process_target): Add the target op.
3021 (target_breakpoint_kind_from_pc): Update the macro.
3022 (target_breakpoint_kind_from_current_state): Update the macro.
3023 (default_breakpoint_kind_from_pc): Remove declaration.
3024 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
3025 (process_target::breakpoint_kind_from_pc): ... this.
3026 (process_target::breakpoint_kind_from_current_state): Define.
3027
3028 Update the derived classes and callers below.
3029
3030 * mem-break.cc (bp_size): Update.
3031 (bp_opcode): Update.
3032 * linux-low.cc (linux_target_ops): Update.
3033 (linux_wait_1): Update.
3034 (linux_breakpoint_kind_from_pc): Turn into ...
3035 (linux_process_target::breakpoint_kind_from_pc): ... this.
3036 (linux_sw_breakpoint_from_kind): Turn into ...
3037 (linux_process_target::sw_breakpoint_from_kind): ... this.
3038 (linux_breakpoint_kind_from_current_state): Turn into ...
3039 (linux_process_target::breakpoint_kind_from_current_state): ... this.
3040 * linux-low.h (class linux_process_target): Update.
3041 * lynx-low.cc (lynx_target_ops): Update.
3042 (lynx_process_target::sw_breakpoint_from_kind): Define.
3043 * lynx-low.h (class lynx_process_target): Update.
3044 * nto-low.cc (nto_target_ops): Update.
3045 (nto_sw_breakpoint_from_kind): Turn into ...
3046 (nto_process_target::sw_breakpoint_from_kind): ... this.
3047 * nto-low.h (class nto_process_target): Update.
3048 * win32-low.cc (win32_target_ops): Update.
3049 (win32_sw_breakpoint_from_kind): Turn into ...
3050 (win32_process_target::sw_breakpoint_from_kind): ... this.
3051 * win32-low.h (class win32_process_target): Update.
3052
3053 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3054
3055 Turn process_stratum_target's multifs_open, multifs_readlink,
3056 multifs_unlink ops into methods of process_target.
3057
3058 * target.h (struct process_stratum_target): Remove the target ops.
3059 (class process_target): Add the target ops. Also add
3060 'supports_multifs'.
3061 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
3062 "sys/stat.h".
3063 (process_target::supports_multifs): Define.
3064 (process_target::multifs_open): Define.
3065 (process_target::multifs_readlink): Define.
3066 (process_target::multifs_unlink): Define.
3067
3068 Update the derived classes and callers below.
3069
3070 * hostio.cc (handle_setfs): Update.
3071 (handle_open): Update.
3072 (handle_unlink): Update.
3073 (handle_readlink): Update.
3074 * linux-low.cc (linux_target_ops): Update.
3075 (linux_process_target::supports_multifs): Define.
3076 (linux_process_target::multifs_open): Define.
3077 (linux_process_target::multifs_readlink): Define.
3078 (linux_process_target::multifs_unlink): Define.
3079 * linux-low.h (class linux_process_target): Update.
3080 * lynx-low.cc (lynx_target_ops): Update.
3081 * nto-low.cc (nto_target_ops): Update.
3082 * win32-low.cc (win32_target_ops): Update.
3083
3084 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3085
3086 Turn process_stratum_target's pid_to_exec_file op into a method
3087 of process_target.
3088
3089 * target.h (struct process_stratum_target): Remove the target op.
3090 (class process_target): Add the target op. Also add
3091 'supports_pid_to_exec_file'.
3092 * target.cc (process_target::pid_to_exec_file): Define.
3093 (process_target::supports_pid_to_exec_file): Define.
3094
3095 Update the derived classes and callers below.
3096
3097 * server.cc (handle_qxfer_exec_file): Update.
3098 (handle_query): Update.
3099 * linux-low.cc (linux_target_ops): Update.
3100 (linux_process_target::supports_pid_to_exec_file): Define.
3101 (linux_process_target::pid_to_exec_file): Define.
3102 * linux-low.h (class linux_process_target): Update.
3103 * lynx-low.cc (lynx_target_ops): Update.
3104 * nto-low.cc (nto_target_ops): Update.
3105 * win32-low.cc (win32_target_ops): Update.
3106
3107 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3108
3109 Turn process_stratum_target's supports_range_stepping op into a
3110 method of process_target.
3111
3112 * target.h (struct process_stratum_target): Remove the target op.
3113 (class process_target): Add the target op.
3114 (target_supports_range_stepping): Update the macro.
3115 * target.cc (process_target::supports_range_stepping): Define.
3116
3117 Update the derived classes and callers below.
3118
3119 * linux-low.cc (linux_target_ops): Update.
3120 (linux_supports_range_stepping): Turn into ...
3121 (linux_process_target::supports_range_stepping): ... this.
3122 * linux-low.h (class linux_process_target): Update.
3123 * lynx-low.cc (lynx_target_ops): Update.
3124 * nto-low.cc (nto_target_ops): Update.
3125 * win32-low.cc (win32_target_ops): Update.
3126
3127 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3128
3129 Turn process_stratum_target's btrace-related ops (enable_btrace,
3130 disable_btrace, read_btrace, read_btrace_conf) into methods of
3131 process_target.
3132
3133 * target.h (struct process_stratum_target): Remove the target ops.
3134 (class process_target): Add the target ops.
3135 (target_enable_btrace): Update.
3136 (target_disable_btrace): Update.
3137 (target_read_btrace): Update.
3138 (target_read_btrace_conf): Update.
3139 * target.cc (process_target::enable_btrace): Define.
3140 (process_target::disable_btrace): Define.
3141 (process_target::read_btrace): Define.
3142 (process_target::read_btrace_conf): Define.
3143
3144 Update the derived classes and callers below.
3145
3146 * linux-low.cc (linux_target_ops): Update.
3147 (linux_process_target:enable_btrace): Define as a wrapper around
3148 linux_enable_btrace.
3149 (linux_low_disable_btrace): Turn into ...
3150 (linux_process_target::disable_btrace): ... this.
3151 (linux_low_read_btrace): Turn into ...
3152 (linux_process_target::read_btrace): ... this.
3153 (linux_low_btrace_conf): Turn into ...
3154 (linux_process_target::read_btrace_conf): ... this.
3155 * linux-low.h (class linux_process_target): Update.
3156 * lynx-low.cc (lynx_target_ops): Update.
3157 * nto-low.cc (nto_target_ops): Update.
3158 * win32-low.cc (win32_target_ops): Update.
3159
3160 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3161
3162 Turn process_stratum_target's supports_agent op into a method of
3163 process_target.
3164
3165 * target.h (struct process_stratum_target): Remove the target op.
3166 (class process_target): Add the target op.
3167 (target_supports_agent): Update the macro.
3168 * target.cc (process_target::supports_agent): Define.
3169
3170 Update the derived classes and callers below.
3171
3172 * linux-low.cc (linux_target_ops): Update.
3173 (linux_supports_agent): Turn into ...
3174 (linux_process_target::supports_agent): ... this.
3175 * linux-low.h (class linux_process_target): Update.
3176 * lynx-low.cc (lynx_target_ops): Update.
3177 * nto-low.cc (nto_target_ops): Update.
3178 * win32-low.cc (win32_target_ops): Update.
3179
3180 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3181
3182 Turn process_stratum_target's qxfer_libraries_svr4 op into a
3183 method of process_target.
3184
3185 * target.h (struct process_stratum_target): Remove the target op.
3186 (class process_target): Add the target op. Also add
3187 'supports_qxfer_libraries_svr4'.
3188 * target.cc (process_target::qxfer_libraries_svr4): Define.
3189 (process_target::supports_qxfer_libraries_svr4): Define.
3190
3191 Update the derived classes and callers below.
3192
3193 * server.cc (handle_qxfer_libraries_svr4): Update.
3194 (handle_query): Update.
3195 * linux-low.cc (linux_target_ops): Update.
3196 (linux_process_target::supports_qxfer_libraries_svr4): Define.
3197 (linux_qxfer_libraries_svr4): Turn into ...
3198 (linux_process_target::qxfer_libraries_svr4): ... this.
3199 * linux-low.h (class linux_process_target): Update.
3200 * lynx-low.cc (lynx_target_ops): Update.
3201 * nto-low.cc (nto_target_ops): Update.
3202 * win32-low.cc (win32_target_ops): Update.
3203
3204 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3205
3206 Turn process_stratum_target's supports_disable_randomization op
3207 into a method of process_target.
3208
3209 * target.h (struct process_stratum_target): Remove the target op.
3210 (class process_target): Add the target op.
3211 (target_supports_disable_randomization): Update the macro.
3212 * target.cc (process_target::supports_disable_randomization): Define.
3213
3214 Update the derived classes and callers below.
3215
3216 * linux-low.cc (linux_target_ops): Update.
3217 (linux_supports_disable_randomization): Turn into ...
3218 (linux_process_target::supports_disable_randomization): ... this.
3219 * linux-low.h (class linux_process_target): Update.
3220 * lynx-low.cc (lynx_target_ops): Update.
3221 * nto-low.cc (nto_target_ops): Update.
3222 * win32-low.cc (win32_target_ops): Update.
3223
3224 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3225
3226 Turn process_stratum_target's emit_ops op into a method of
3227 process_target.
3228
3229 * target.h (struct process_stratum_target): Remove the target op.
3230 (class process_target): Add the target op.
3231 (target_emit_ops): Update the macro.
3232 * target.cc (process_target::emit_ops): Define.
3233
3234 Update the derived classes and callers below.
3235
3236 * linux-low.cc (linux_target_ops): Update.
3237 (linux_emit_ops): Turn into ...
3238 (linux_process_target::emit_ops): ... this.
3239 * linux-low.h (class linux_process_target): Update.
3240 * lynx-low.cc (lynx_target_ops): Update.
3241 * nto-low.cc (nto_target_ops): Update.
3242 * win32-low.cc (win32_target_ops): Update.
3243
3244 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3245
3246 Turn process_stratum_target's install_fast_tracepoint_jump_pad
3247 and get_min_fast_tracepoint_insn_len ops into methods of
3248 process_target.
3249
3250 * target.h (struct process_stratum_target): Remove the target ops.
3251 (class process_target): Add the target ops. Also add
3252 'supports_fast_tracepoints'.
3253 (target_supports_fast_tracepoints): Update the macro.
3254 (target_get_min_fast_tracepoint_insn_len): Update the macro.
3255 (install_fast_tracepoint_jump_pad): Update and rename the macro
3256 to ...
3257 (target_install_fast_tracepoint_jump_pad): ... this.
3258 * target.cc (process_target::supports_fast_tracepoints): Define.
3259 (process_target::install_fast_tracepoint_jump_pad): Define.
3260 (process_target::get_min_fast_tracepoint_insn_len): Define.
3261
3262 Update the derived classes and callers below.
3263
3264 * tracepoint.cc (install_fast_tracepoint): Update.
3265 * linux-low.cc (linux_target_ops): Update.
3266 (linux_process_target::supports_fast_tracepoints): Define.
3267 (linux_install_fast_tracepoint_jump_pad): Turn into ...
3268 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
3269 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
3270 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
3271 * linux-low.h (class linux_process_target): Update.
3272 * lynx-low.cc (lynx_target_ops): Update.
3273 * nto-low.cc (nto_target_ops): Update.
3274 * win32-low.cc (win32_target_ops): Update.
3275
3276 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3277
3278 Turn process_stratum_target's stabilize_threads op into a
3279 method of process_target.
3280
3281 * target.h (struct process_stratum_target): Remove the target op.
3282 (class process_target): Add the target op.
3283 (target_stabilize_threads): Update the macro.
3284 * target.cc (process_target::stabilize_threads): Define.
3285
3286 Update the derived classes and callers below.
3287
3288 * server.cc (handle_status): Update.
3289 * tracepoint.cc (cmd_qtdp): Update.
3290 (cmd_qtstart): Update.
3291 * linux-low.cc (linux_target_ops): Update.
3292 (linux_stabilize_threads): Turn into ...
3293 (linux_process_target::stabilize_threads): ... this.
3294 (linux_wait_1): Update.
3295 * linux-low.h (class linux_process_target): Update.
3296 * lynx-low.cc (lynx_target_ops): Update.
3297 * nto-low.cc (nto_target_ops): Update.
3298 * win32-low.cc (win32_target_ops): Update.
3299
3300 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3301
3302 Turn process_stratum_target's pause_all and unpause_all ops
3303 into methods of process_target.
3304
3305 * target.h (struct process_stratum_target): Remove the target ops.
3306 (class process_target): Add the target ops.
3307 (pause_all): Update the macro and rename to...
3308 (target_pause_all): ... this.
3309 (unpause_all): Update the macro and rename to...
3310 (target_unpause_all): ... this.
3311 * target.cc (process_target::pause_all): Define.
3312 (process_target::unpause_all): Define.
3313
3314 Update the derived classes and callers below.
3315
3316 * server.cc (handle_status): Update.
3317 * tracepoint.cc (clear_installed_tracepoints): Update.
3318 (cmd_qtdp): Update.
3319 (cmd_qtstart): Update.
3320 (stop_tracing): Update.
3321 (cmd_qtstatus): Update.
3322 (upload_fast_traceframes): Update.
3323 (run_inferior_command): Update.
3324 * linux-low.cc (linux_target_ops): Update.
3325 (linux_pause_all): Turn into ...
3326 (linux_process_target::pause_all): ... this.
3327 (linux_unpause_all): Turn into ...
3328 (linux_process_target::unpause_all): ... this.
3329 (linux_process_target::prepare_to_access_memory): Update.
3330 (linux_process_target::done_accessing_memory): Update.
3331 * linux-low.h (class linux_process_target): Update.
3332 * lynx-low.cc (lynx_target_ops): Update.
3333 * nto-low.cc (nto_target_ops): Update.
3334 * win32-low.cc (win32_target_ops): Update.
3335
3336 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3337
3338 Turn process_stratum_target's get_tib_address op into a method of
3339 process_target.
3340
3341 * target.h (struct process_stratum_target): Remove the target op.
3342 (class process_target): Add the target op. Also add
3343 'supports_get_tib_address'.
3344 * target.cc (process_target::get_tib_address): Define.
3345 (process_target::supports_get_tib_address): Define.
3346
3347 Update the derived classes and callers below.
3348
3349 * server.cc (handle_query): Update.
3350 * linux-low.cc (win32_target_ops): Update.
3351 * lynx-low.cc (lynx_target_ops): Update.
3352 * nto-low.cc (nto_target_ops): Update.
3353 * win32-low.cc (win32_target_ops): Update.
3354 (win32_process_target::supports_get_tib_address): Define.
3355 (win32_get_tib_address): Turn into ...
3356 (win32_process_target::get_tib_address): ... this.
3357 * win32-low.h (class win32_process_target): Update.
3358
3359 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3360
3361 Turn process_stratum_target's thread_stopped op into a method of
3362 process_target.
3363
3364 * target.h (struct process_stratum_target): Remove the target op.
3365 (class process_target): Add the target op. Also add
3366 'supports_thread_stopped'.
3367 (target_thread_stopped): Update the macro.
3368 * target.cc (process_target::thread_stopped): Define.
3369 (process_target::supports_thread_stopped): Define.
3370 (prepare_to_access_memory): Update.
3371
3372 Update the derived classes and callers below.
3373
3374 * server.cc (queue_stop_reply_callback): Update.
3375 * linux-low.cc (linux_target_ops): Update.
3376 (linux_process_target::supports_thread_stopped): Define.
3377 (linux_thread_stopped): Turn into ...
3378 (linux_process_target::thread_stopped): ... this.
3379 * linux-low.h (class linux_process_target): Update.
3380 * lynx-low.cc (lynx_target_ops): Update.
3381 * nto-low.cc (nto_target_ops): Update.
3382 * win32-low.cc (win32_target_ops): Update.
3383
3384 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3385
3386 Turn process_stratum_target's read_pc and write_pc ops into
3387 methods of process_target.
3388
3389 * target.h (struct process_stratum_target): Remove the target ops.
3390 (class process_target): Add the target ops.
3391 * target.cc (process_target::read_pc): Define.
3392 (process_target::write_pc): Define.
3393
3394 Update the derived classes and callers below.
3395
3396 * regcache.cc (regcache_read_pc): Update.
3397 (regcache_write_pc): Update.
3398 * linux-low.cc (linux_target_ops): Update.
3399 (linux_read_pc): Turn into ...
3400 (linux_process_target::read_pc): ... this.
3401 (linux_write_pc): Turn into ...
3402 (linux_process_target::write_pc): ... this.
3403 * linux-low.h (class linux_process_target): Update.
3404 * lynx-low.cc (lynx_target_ops): Update.
3405 * nto-low.cc (nto_target_ops): Update.
3406 * win32-low.cc (win32_target_ops): Update.
3407
3408 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3409
3410 Turn process_stratum_target's supports_tracepoints op into a
3411 method of process_target.
3412
3413 * target.h (struct process_stratum_target): Remove the target op.
3414 (class process_target): Add the target op.
3415 (target_supports_tracepoints): Update the macro.
3416 * target.cc (process_target::supports_tracepoints): Define.
3417
3418 Update the derived classes and callers below.
3419
3420 * linux-low.cc (linux_target_ops): Update.
3421 (linux_supports_tracepoints): Turn into ...
3422 (linux_process_target::supports_tracepoints): ... this.
3423 * linux-low.h (class linux_process_target): Update.
3424 * lynx-low.cc (lynx_target_ops): Update.
3425 * nto-low.cc (nto_target_ops): Update.
3426 * win32-low.cc (win32_target_ops): Update.
3427
3428 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3429
3430 Turn process_stratum_target's process_qsupported op into a method
3431 of process_target.
3432
3433 * target.h (struct process_stratum_target): Remove the target op.
3434 (class process_target): Add the target op.
3435 (target_process_qsupported): Update the macro.
3436 * target.cc (process_target::process_qsupported): Define.
3437
3438 Update the derived classes and callers below.
3439
3440 * linux-low.cc (linux_target_ops): Update.
3441 (linux_process_qsupported): Turn into ...
3442 (linux_process_target::process_qsupported): ... this.
3443 * linux-low.h (class linux_process_target): Update.
3444 * lynx-low.cc (lynx_target_ops): Update.
3445 * nto-low.cc (nto_target_ops): Update.
3446 * win32-low.cc (win32_target_ops): Update.
3447
3448 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3449
3450 Turn process_stratum_target's read_loadmap op into a method of
3451 process_target.
3452
3453 * target.h (struct process_stratum_target): Remove the target op.
3454 (class process_target): Add the target op. Also add
3455 'supports_read_loadmap'.
3456 * target.cc (process_target::read_loadmap): Define.
3457 (process_target::supports_read_loadmap): Define.
3458
3459 Update the derived classes and callers below.
3460
3461 * server.cc (handle_qxfer_fdpic): Update.
3462 (handle_query): Update.
3463 * linux-low.cc (linux_target_ops): Update.
3464 (linux_process_target::supports_read_loadmap): Define.
3465 (linux_read_loadmap): Turn into ...
3466 (linux_process_target::read_loadmap): ... this.
3467 * linux-low.h (class linux_process_target): Update.
3468 * lynx-low.cc (lynx_target_ops): Update.
3469 * nto-low.cc (nto_target_ops): Update.
3470 * win32-low.cc (win32_target_ops): Update.
3471
3472 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3473
3474 Turn process_stratum_target's core_of_thread op into a method of
3475 process_target.
3476
3477 * target.h (struct process_stratum_target): Remove the target op.
3478 (class process_target): Add the target op.
3479 (target_core_of_thread): Update the macro.
3480 * target.cc (process_target::core_of_thread): Define.
3481
3482 Update the derived classes and callers below.
3483
3484 * linux-low.cc (linux_target_ops): Update.
3485 (linux_process_target::core_of_thread): Define.
3486 * linux-low.h (class linux_process_target): Update.
3487 * lynx-low.cc (lynx_target_ops): Update.
3488 * nto-low.cc (nto_target_ops): Update.
3489 * win32-low.cc (win32_target_ops): Update.
3490
3491 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3492
3493 Turn process_stratum_target's handle_monitor_command op into a
3494 method of process_target.
3495
3496 * target.h (struct process_stratum_target): Remove the target op.
3497 (class process_target): Add the target op.
3498 (target_handle_monitor_command): Update the macro.
3499 * target.cc (process_target::handle_monitor_command): Define.
3500
3501 Update the derived classes and callers below.
3502
3503 * server.cc (handle_query): Update.
3504 * linux-low.cc (linux_target_ops): Update.
3505 (linux_process_target::handle_monitor_command): Define.
3506 * linux-low.h (class linux_process_target): Update.
3507 * lynx-low.cc (lynx_target_ops): Update.
3508 * nto-low.cc (nto_target_ops): Update.
3509 * win32-low.cc (win32_target_ops): Update.
3510
3511 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3512
3513 Turn process_stratum_target's handle_new_gdb_connection op into a
3514 method of process_target.
3515
3516 * target.h (struct process_stratum_target): Remove the target op.
3517 (class process_target): Add the target op.
3518 (target_handle_new_gdb_connection): Update the macro.
3519 * target.cc (process_target::handle_new_gdb_connection): Define.
3520
3521 Update the derived classes and callers below.
3522
3523 * linux-low.cc (linux_target_ops): Update.
3524 (linux_handle_new_gdb_connection): Turn into ...
3525 (linux_process_target::handle_new_gdb_connection): ... this.
3526 * linux-low.h (class linux_process_target): Update.
3527 * lynx-low.cc (lynx_target_ops): Update.
3528 * nto-low.cc (nto_target_ops): Update.
3529 * win32-low.cc (win32_target_ops): Update.
3530
3531 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3532
3533 Turn process_stratum_target's supports_fork_events,
3534 supports_vfork_events, and supports_exec_events ops into methods
3535 of process_target.
3536
3537 * target.h (struct process_stratum_target): Remove the target ops.
3538 (class process_target): Add the target ops.
3539 (target_supports_fork_events): Update the macro.
3540 (target_supports_vfork_events): Update the macro.
3541 (target_supports_exec_events): Update the macro.
3542 * target.cc (process_target::supports_fork_events): Define.
3543 (process_target::supports_vfork_events): Define.
3544 (process_target::supports_exec_events): Define.
3545
3546 Update the derived classes and callers below.
3547
3548 * linux-low.cc (linux_target_ops): Update.
3549 (linux_supports_fork_events): Turn into ...
3550 (linux_process_target::supports_fork_events): ... this.
3551 (linux_supports_vfork_events): Turn into ...
3552 (linux_process_target::supports_vfork_events): ... this.
3553 (linux_supports_exec_events): Turn into ...
3554 (linux_process_target::supports_exec_events): ... this.
3555 * linux-low.h (class linux_process_target): Update.
3556 * lynx-low.cc (lynx_target_ops): Update.
3557 * nto-low.cc (nto_target_ops): Update.
3558 * win32-low.cc (win32_target_ops): Update.
3559
3560 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3561
3562 Turn process_stratum_target's supports_multi_process op into a
3563 method of process_target.
3564
3565 * target.h (struct process_stratum_target): Remove the target op.
3566 (class process_target): Add the target op.
3567 * target.cc (process_target::supports_multi_process): Define.
3568 (target_supports_multi_process): Update.
3569
3570 Update the derived classes and callers below.
3571
3572 * linux-low.cc (linux_target_ops): Update.
3573 (linux_supports_multi_process): Turn into ...
3574 (linux_process_target::supports_multi_process): ... this.
3575 * linux-low.h (class linux_process_target): Update.
3576 * lynx-low.cc (lynx_target_ops): Update.
3577 * nto-low.cc (nto_target_ops): Update.
3578 * win32-low.cc (win32_target_ops): Update.
3579
3580 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3581
3582 Turn process_stratum_target's supports_non_stop, async, and
3583 start_non_stop ops into methods of process_target.
3584
3585 * target.h (struct process_stratum_target): Remove the target ops.
3586 (class process_target): Add the target ops.
3587 (target_supports_non_stop): Update the macro.
3588 (target_async): Update the macro.
3589 (start_non_stop): Remove declaration.
3590 * target.cc (process_target::supports_non_stop): Define.
3591 (process_target::async): Define.
3592 (process_target::start_non_stop): Define.
3593 (start_non_stop): Remove.
3594
3595 Update the derived classes and callers below.
3596
3597 * server.cc (handle_qxfer_siginfo): Update.
3598 (handle_query): Update.
3599 * linux-low.cc (linux_target_ops): Update.
3600 (linux_supports_non_stop): Turn into ...
3601 (linux_process_target::supports_non_stop): ... this.
3602 (linux_async): Turn into ...
3603 (linux_process_target::async): ... this.
3604 (linux_start_non_stop): Turn into ...
3605 (linux_process_target::start_non_stop): ... this.
3606 * linux-low.h (class linux_process_target): Update.
3607 * lynx-low.cc (lynx_target_ops): Update.
3608 * nto-low.cc (nto_target_ops): Update.
3609 (nto_supports_non_stop): Remove; rely on the default behavior
3610 instead.
3611 * win32-low.cc (win32_target_ops): Update.
3612
3613 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3614
3615 Turn process_stratum_target's qxfer_siginfo op into a method of
3616 process_target.
3617
3618 * target.h (struct process_stratum_target): Remove the target op.
3619 (class process_target): Add the target op. Also add
3620 'supports_qxfer_siginfo'.
3621 * target.cc (process_target::qxfer_siginfo): Define.
3622 (process_target::supports_qxfer_siginfo): Define.
3623
3624 Update the derived classes and callers below.
3625
3626 * server.cc (handle_qxfer_siginfo): Update.
3627 (handle_query): Update.
3628 * linux-low.cc (linux_target_ops): Update.
3629 (linux_process_target::supports_qxfer_siginfo): Define.
3630 (linux_xfer_siginfo): Turn into ...
3631 (linux_process_target::qxfer_siginfo): ... this.
3632 * linux-low.h (class linux_process_target): Update.
3633 * lynx-low.cc (lynx_target_ops): Update.
3634 * nto-low.cc (nto_target_ops): Update.
3635 * win32-low.cc (win32_target_ops): Update.
3636
3637 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3638
3639 Turn process_stratum_target's qxfer_osdata op into a method of
3640 process_target.
3641
3642 * target.h (struct process_stratum_target): Remove the target op.
3643 (class process_target): Add the target op. Also add
3644 'supports_qxfer_osdata'.
3645 * target.cc (process_target::qxfer_osdata): Define.
3646 (process_target::supports_qxfer_osdata): Define.
3647
3648 Update the derived classes and callers below.
3649
3650 * server.cc (handle_qxfer_osdata): Update.
3651 (handle_query): Update.
3652 * linux-low.cc (linux_target_ops): Update.
3653 (linux_process_target::supports_qxfer_osdata): Define.
3654 (linux_qxfer_osdata): Turn into ...
3655 (linux_process_target::qxfer_osdata): ... this.
3656 * linux-low.h (class linux_process_target): Update.
3657 * lynx-low.cc (lynx_target_ops): Update.
3658 * nto-low.cc (nto_target_ops): Update.
3659 * win32-low.cc (win32_target_ops): Update.
3660
3661 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3662
3663 Turn process_stratum_target's hostio_last_error op into a
3664 method of process_target.
3665
3666 * target.h (struct process_stratum_target): Remove the target op.
3667 (class process_target): Add the target op.
3668 * target.cc: Add "hostio.h" to includes.
3669 (process_target::hostio_last_error): Define.
3670
3671 Update the derived classes and callers below.
3672
3673 * hostio.cc (hostio_error): Update.
3674 * linux-low.cc: Remove "hostio.h" from includes.
3675 (linux_target_ops): Update.
3676 * lynx-low.cc (lynx_target_ops): Update.
3677 * nto-low.cc (nto_target_ops): Update.
3678 * win32-low.h (class win32_process_target): Update.
3679 * win32-low.cc (win32_target_ops): Update.
3680 (wince_hostio_last_error): Turn into ...
3681 (win32_process_target::hostio_last_error): ... this.
3682
3683 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3684
3685 Turn process_stratum_target's get_tls_address op into a method of
3686 process_target.
3687
3688 * target.h (struct process_stratum_target): Remove the target op.
3689 (class process_target): Add the target op. Also add
3690 'supports_get_tls_address'.
3691 * target.cc (process_target::get_tls_address): Define.
3692 (process_target::supports_get_tls_address): Define.
3693
3694 Update the derived classes and callers below.
3695
3696 * server.cc (handle_query): Update.
3697 * linux-low.cc (linux_target_ops): Update.
3698 (linux_process_target::supports_get_tls_address): Define.
3699 (linux_process_target::get_tls_address): Define.
3700 * linux-low.h (class linux_process_target): Update.
3701 * lynx-low.cc (lynx_target_ops): Update.
3702 * nto-low.cc (nto_target_ops): Update.
3703 * win32-low.cc (win32_target_ops): Update.
3704
3705 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3706
3707 Turn process_stratum_target's read_offsets op into a method of
3708 process_target.
3709
3710 * target.h (struct process_stratum_target): Remove the target op.
3711 (class process_target): Add the target op. Also add
3712 'supports_read_offsets'.
3713 * target.cc (process_target::read_offsets): Define.
3714 (process_target::supports_read_offsets): Define.
3715
3716 Update the derived classes and callers below.
3717
3718 * server.cc (handle_query): Update.
3719 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
3720 (linux_target_ops): Update.
3721 (linux_process_target::supports_read_offsets): Define.
3722 (linux_read_offsets): Turn into ...
3723 (linux_process_target::read_offsets): ... this.
3724 * linux-low.h (class linux_process_target): Update.
3725 * lynx-low.cc (lynx_target_ops): Update.
3726 * nto-low.cc (nto_target_ops): Update.
3727 * win32-low.cc (win32_target_ops): Update.
3728
3729 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3730
3731 Turn process_stratum_target's stopped_by_watchpoint and
3732 stopped_data_address ops into methods of process_target.
3733
3734 * target.h (struct process_stratum_target): Remove the target ops.
3735 (class process_target): Add the target ops.
3736 * target.cc (process_target::stopped_by_watchpoint): Define.
3737 (process_target::stopped_data_address): Define.
3738
3739 Update the derived classes and callers below.
3740
3741 * remote-utils.cc (prepare_resume_reply): Update.
3742 * linux-low.cc (linux_target_ops): Update.
3743 (linux_stopped_by_watchpoint): Turn into ...
3744 (linux_process_target::stopped_by_watchpoint): ... this.
3745 (linux_stopped_data_address): Turn into ...
3746 (linux_process_target::stopped_data_address): ... this.
3747 * linux-low.h (class linux_process_target): Update.
3748 * lynx-low.cc (lynx_target_ops): Update.
3749 * nto-low.cc (nto_target_ops): Update.
3750 (nto_stopped_by_watchpoint): Turn into ...
3751 (nto_process_target::stopped_by_watchpoint): ... this.
3752 (nto_stopped_data_address): Turn into ...
3753 (nto_process_target::stopped_data_address): ... this.
3754 * nto-low.h (class nto_process_target): Update.
3755 * win32-low.cc (win32_target_ops): Update.
3756 (win32_stopped_by_watchpoint): Turn into ...
3757 (win32_process_target::stopped_by_watchpoint): ... this.
3758 (win32_stopped_data_address): Turn into ...
3759 (win32_process_target::stopped_data_address): ... this.
3760 * win32-low.h (class win32_process_target): Update.
3761
3762 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3763
3764 Turn process_stratum_target's supports_hardware_single_step op into
3765 a method of process_target.
3766
3767 * target.h (struct process_stratum_target): Remove the target op.
3768 (class process_target): Add the target op.
3769 (target_supports_hardware_single_step): Update the macro.
3770 (target_can_do_hardware_single_step): Remove declaration.
3771 * target.cc (process_target::supports_hardware_single_step): Define.
3772 (target_can_do_hardware_single_step): Remove.
3773
3774 Update the derived classes and callers below.
3775
3776 * linux-low.h (class linux_process_target): Update.
3777 * linux-low.cc (linux_target_ops): Update.
3778 (linux_supports_hardware_single_step): Turn into ...
3779 (linux_process_target::supports_hardware_single_step): ... this.
3780 * lynx-low.h (class lynx_process_target): Update.
3781 * lynx-low.cc (lynx_target_ops): Update.
3782 (lynx_process_target::supports_hardware_single_step): Define.
3783 * nto-low.h (class nto_process_target): Update.
3784 * nto-low.cc (nto_target_ops): Update.
3785 (nto_process_target::supports_hardware_single_step): Define.
3786 * win32-low.h (class win32_process_target): Update.
3787 * win32-low.cc (win32_target_ops): Update.
3788 (win32_process_target::supports_hardware_single_step): Define.
3789
3790 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3791
3792 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
3793 ops into methods of process_target.
3794
3795 * target.h (struct process_stratum_target): Remove the target ops.
3796 (class process_target): Add the target ops.
3797 (target_stopped_by_hw_breakpoint): Update the macro.
3798 (target_supports_stopped_by_hw_breakpoint): Update the macro.
3799 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
3800 (process_target::supports_stopped_by_hw_breakpoint): Define.
3801
3802 Update the derived classes and callers below.
3803
3804 * linux-low.cc (linux_target_ops): Update.
3805 (linux_stopped_by_hw_breakpoint): Turn into ...
3806 (linux_process_target::stopped_by_hw_breakpoint): ... this.
3807 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
3808 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
3809 * linux-low.h (class linux_process_target): Update.
3810 * lynx-low.cc (lynx_target_ops): Update.
3811 * nto-low.cc (nto_target_ops): Update.
3812 * win32-low.cc (win32_target_ops): Update.
3813
3814 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3815
3816 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
3817 ops into methods of process_target.
3818
3819 * target.h (struct process_stratum_target): Remove the target ops.
3820 (class process_target): Add the target ops.
3821 (target_stopped_by_sw_breakpoint): Update the macro.
3822 (target_supports_stopped_by_sw_breakpoint): Update the macro.
3823 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
3824 (process_target::supports_stopped_by_sw_breakpoint): Define.
3825
3826 Update the derived classes and callers below.
3827
3828 * linux-low.cc (linux_target_ops): Update.
3829 (linux_stopped_by_sw_breakpoint): Turn into ...
3830 (linux_process_target::stopped_by_sw_breakpoint): ... this.
3831 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
3832 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
3833 * linux-low.h (class linux_process_target): Update.
3834 * lynx-low.cc (lynx_target_ops): Update.
3835 * nto-low.cc (nto_target_ops): Update.
3836 * win32-low.cc (win32_target_ops): Update.
3837
3838 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3839
3840 Turn process_stratum_target's insert_point and remove_point ops
3841 into methods of process_target.
3842
3843 * target.h (struct process_stratum_target): Remove the target ops.
3844 (class process_target): Add the target ops.
3845 * target.cc (process_target::insert_point): Define.
3846 (process_target::remove_point): Define.
3847
3848 Update the derived classes and callers below.
3849
3850 * mem-break.cc (set_raw_breakpoint_at): Update.
3851 (delete_raw_breakpoint): Update.
3852 (uninsert_raw_breakpoint): Update.
3853 (reinsert_raw_breakpoint): Update.
3854 * linux-low.cc (linux_target_ops): Update.
3855 (linux_insert_point): Turn into ...
3856 (linux_process_target::insert_point): ... this.
3857 (linux_remove_point): Turn into ...
3858 (linux_process_target::remove_point): ... this.
3859 * linux-low.h (class linux_process_target): Update.
3860 * lynx-low.cc (lynx_target_ops): Update.
3861 * nto-low.cc (nto_target_ops): Update.
3862 (nto_insert_point): Turn into ...
3863 (nto_process_target::insert_point): ... this.
3864 (nto_remove_point): Turn into ...
3865 (nto_process_target::remove_point): ... this.
3866 * nto-low.h (class nto_process_target): Update.
3867 * win32-low.cc (win32_target_ops): Update.
3868 (win32_insert_point): Turn into ...
3869 (win32_process_target::insert_point): ... this.
3870 (win32_remove_point): Turn into ...
3871 (win32_process_target::remove_point): ... this.
3872 * win32-low.h (class win32_process_target): Update.
3873
3874 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3875
3876 Turn process_stratum_target's supports_z_point_type op into a
3877 method of process_target.
3878
3879 * target.h (struct process_stratum_target): Remove the target op.
3880 (class process_target): Add the target op.
3881 * target.cc (process_target::supports_z_point_type): Define.
3882
3883 Update the derived classes and callers below.
3884
3885 * mem-break.cc (z_type_supported): Update.
3886 * linux-low.cc (linux_target_ops): Update.
3887 (linux_supports_z_point_type): Turn into ...
3888 (linux_process_target::supports_z_point_type): ... this.
3889 * linux-low.h (class linux_process_target): Update.
3890 * lynx-low.cc (lynx_target_ops): Update.
3891 * nto-low.cc (nto_target_ops): Update.
3892 (nto_supports_z_point_type): Turn into ...
3893 (nto_process_target::supports_z_point_type): ... this.
3894 * nto-low.h (class nto_process_target): Update.
3895 * win32-low.cc (win32_target_ops): Update.
3896 (win32_supports_z_point_type): Turn into ...
3897 (win32_process_target::supports_z_point_type): ... this.
3898 * win32-low.h (class win32_process_target): Update.
3899
3900 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3901
3902 Turn process_stratum_target's read_auxv op into a method of
3903 process_target.
3904
3905 * target.h (class process_stratum_target): Remove the target op.
3906 (struct process_target): Add the target op. Also add
3907 'supports_read_auxv'.
3908 * target.cc (process_target::read_auxv): Define.
3909 (process_target::supports_read_auxv): Define.
3910
3911 Update the derived classes and callers below.
3912
3913 * server.cc (handle_qxfer_auxv): Update.
3914 (handle_query): Update.
3915 * linux-low.cc (linux_target_ops): Update.
3916 (linux_process_target::supports_read_auxv): Define.
3917 (linux_read_auxv): Turn into ...
3918 (linux_process_target::read_auxv): ... this.
3919 * linux-low.h (class linux_process_target): Update.
3920 * lynx-low.cc (lynx_target_ops): Update.
3921 * nto-low.cc (nto_target_ops): Update.
3922 (nto_process_target::supports_read_auxv): Define.
3923 (nto_read_auxv): Turn into ...
3924 (nto_process_target::read_auxv): ... this.
3925 * nto-low.h (class nto_process_target): Update.
3926 * win32-low.cc (win32_target_ops): Update.
3927
3928 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3929
3930 Turn process_stratum_target's request_interrupt op into a method of
3931 process_target.
3932
3933 * target.h (struct process_stratum_target): Remove the target op.
3934 (class process_target): Add the target op.
3935
3936 Update the derived classes and callers below.
3937
3938 * remote-utils.cc (putpkt_binary_1): Update.
3939 (input_interrupt): Update.
3940 (getpkt): Update.
3941 * server.cc (handle_v_requests): Update.
3942 * linux-low.cc (linux_target_ops): Update.
3943 (linux_request_interrupt): Turn into ...
3944 (linux_process_target::request_interrupt): ... this.
3945 * linux-low.h (class linux_process_target): Update.
3946 * lynx-low.cc (lynx_target_ops): Update.
3947 (lynx_request_interrupt): Turn into ...
3948 (lynx_process_target::request_interrupt): ... this.
3949 * lynx-low.h (class lynx_process_target): Update.
3950 * nto-low.cc (nto_target_ops): Update.
3951 (nto_request_interrupt): Turn into ...
3952 (nto_process_target::request_interrupt): ... this.
3953 * nto-low.h (class nto_process_target): Update.
3954 * win32-low.cc (win32_target_ops): Update.
3955 (win32_request_interrupt): Turn into ...
3956 (win32_process_target::request_interrupt): ... this.
3957 * win32-low.h (class win32_process_target): Update.
3958
3959 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3960
3961 Turn process_stratum_target's look_up_symbols op into a method of
3962 process_target.
3963
3964 * target.h (struct process_stratum_target): Remove the target op.
3965 (class process_target): Add the target op.
3966 * target.cc (process_target::look_up_symbols): Define.
3967
3968 Update the derived classes and callers below.
3969
3970 * server.cc (handle_query): Update.
3971 * linux-low.cc (linux_target_ops): Update.
3972 (linux_look_up_symbols): Turn into ...
3973 (linux_process_target::look_up_symbols): ... this.
3974 * linux-low.h (class linux_process_target): Update.
3975 * lynx-low.cc (lynx_target_ops): Update.
3976 * nto-low.cc (nto_target_ops): Update.
3977 * win32-low.cc (win32_target_ops): Update.
3978
3979 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3980
3981 Turn process_stratum_target's read_memory and write_memory
3982 ops into methods of process_target.
3983
3984 * target.h (struct process_stratum_target): Remove the target ops.
3985 (class process_target): Add the target ops.
3986
3987 Update the derived classes and callers below.
3988
3989 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
3990 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
3991 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
3992 (arm_get_syscall_trapinfo): Update.
3993 * linux-cris-low.cc (cris_breakpoint_at): Update.
3994 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
3995 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
3996 * linux-mips-low.cc (mips_breakpoint_at): Update.
3997 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
3998 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
3999 * linux-sh-low.cc (sh_breakpoint_at): Update.
4000 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
4001 (sparc_store_gregset_from_stack): Update.
4002 (sparc_breakpoint_at): Update.
4003 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
4004 * linux-tile-low.cc (tile_breakpoint_at): Update.
4005 * linux-x86-low.cc (x86_breakpoint_at): Update.
4006 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
4007 * mem-brea.cc (insert_memory_breakpoint): Update.
4008 (validate_inserted_breakpoint): Update.
4009 * target.cc (read_inferior_memory): Update.
4010 (target_write_memory): Update.
4011 * linux-low.cc (linux_target_ops): Update.
4012 (linux_read_memory): Make a wrapper around the read_memory target
4013 op call.
4014 (linux_process_target::read_memory): Rename from linux_read_memory.
4015 (linux_write_memory): Turn into ...
4016 (linux_process_target::write_memory): ... this.
4017 * linux-low.h (class linux_process_target): Update.
4018 * lynx-low.cc (lynx_target_ops): Update.
4019 (lynx_read_memory): Turn into ...
4020 (lynx_process_target::read_memory): ... this.
4021 (lynx_write_memory): Turn into ...
4022 (lynx_process_target::write_memory): ... this.
4023 * lynx-low.h (class lynx_process_target): Update.
4024 * nto-low.cc (nto_target_ops): Update.
4025 (nto_read_memory): Turn into ...
4026 (nto_process_target::read_memory): ... this.
4027 (nto_write_memory): Turn into ...
4028 (nto_process_target::write_memory): ... this.
4029 * nto-low.h (class nto_process_target): Update.
4030 * win32-low.cc (win32_target_ops): Update.
4031 (win32_read_inferior_memory): Turn into ...
4032 (win32_process_target::read_memory): ... this.
4033 (win32_write_inferior_memory): Turn into ...
4034 (win32_process_target::write_memory): ... this.
4035 * win32-low.h (class win32_process_target): Update.
4036
4037 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4038
4039 Turn process_stratum_target's prepare_to_access_memory and
4040 done_accessing_memory ops into methods of process_target.
4041
4042 * target.h (struct process_stratum_target): Remove the target ops.
4043 (class process_target): Add the target ops.
4044 * target.cc (process_target::prepare_to_access_memory): Define.
4045 (process_target::done_accessing_memory): Define.
4046 (prepare_to_access_memory): Update.
4047 (done_accessing_memory): Update.
4048
4049 Update the derived classes and callers below.
4050
4051 * linux-low.cc (linux_target_ops): Update.
4052 (linux_prepare_to_access_memory): Turn into ...
4053 (linux_process_target::prepare_to_access_memory): ... this.
4054 (linux_done_accessing_memory): Turn into ...
4055 (linux_process_target::done_accessing_memory): ... this.
4056 * linux-low.h (class linux_process_target): Update.
4057 * lynx-low.cc (lynx_target_ops): Update.
4058 * nto-low.cc (nto_target_ops): Update.
4059 * win32-low.cc (win32_target_ops): Update.
4060
4061 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4062
4063 Turn process_stratum_target's fetch_registers and store_registers
4064 ops into methods of process_target.
4065
4066 * target.h (struct process_stratum_target): Remove the target ops.
4067 (class process_target): Add the target ops.
4068 (fetch_inferior_registers): Update the macro.
4069 (store_inferior_registers): Update the macro.
4070
4071 Update the derived classes and callers below.
4072
4073 * linux-low.cc (linux_target_ops): Update.
4074 (linux_fetch_registers): Turn into ...
4075 (linux_process_target::fetch_registers): ... this.
4076 (linux_store_registers): Turn into ...
4077 (linux_process_target::store_registers): ... this.
4078 * linux-low.h (class linux_process_target): Update.
4079 * lynx-low.cc (lynx_target_ops): Update.
4080 (lynx_fetch_registers): Turn into ...
4081 (lynx_process_target::fetch_registers): ... this.
4082 (lynx_store_registers): Turn into ...
4083 (lynx_process_target::store_registers): ... this.
4084 * lynx-low.h (class lynx_process_target): Update.
4085 * nto-low.cc (nto_target_ops): Update.
4086 (nto_fetch_registers): Turn into ...
4087 (nto_process_target::fetch_registers): ... this.
4088 (nto_store_registers): Turn into ...
4089 (nto_process_target::store_registers): ... this.
4090 * nto-low.h (class nto_process_target): Update.
4091 * win32-low.cc (win32_target_ops): Update.
4092 (win32_fetch_inferior_registers): Turn into ...
4093 (win32_process_target::fetch_registers): ... this.
4094 (win32_store_inferior_registers): Turn into ...
4095 (win32_process_target::store_registers): ... this.
4096 * win32-low.h (class win32_process_target): Update.
4097
4098 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4099
4100 Turn process_stratum_target's wait op into a method of
4101 process_target.
4102
4103 * target.h (struct process_stratum_target): Remove the target op.
4104 (class process_target): Add the target op.
4105
4106 Update the derived classes and callers below.
4107
4108 * target.cc (target_wait): Update.
4109 * linux-low.cc (linux_target_ops): Update.
4110 (linux_wait): Turn into ...
4111 (linux_process_target::wait): ... this.
4112 * linux-low.h (class linux_process_target): Update.
4113 * lynx-low.cc (lynx_target_ops): Update.
4114 (lynx_wait): Turn into ...
4115 (lynx_process_target::wait): ... this.
4116 * lynx-low.h (class lynx_process_target): Update.
4117 * nto-low.cc (nto_target_ops): Update.
4118 (nto_wait): Turn into ...
4119 (nto_process_target::wait): ... this.
4120 * nto-low.h (class nto_process_target): Update.
4121 * win32-low.cc (win32_target_ops): Update.
4122 (win32_wait): Turn into ...
4123 (win32_process_target::wait): ... this.
4124 (do_initial_child_stuff): Update.
4125 * win32-low.h (class win32_process_target): Update.
4126
4127 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4128
4129 Turn process_stratum_target's resume op into a method of
4130 process_target.
4131
4132 * target.h (struct process_stratum_target): Remove the target op.
4133 (class process_target): Add the target op.
4134
4135 Update the derived classes and callers below.
4136
4137 * server.cc (resume): Update.
4138 * target.cc (target_stop_and_wait): Update.
4139 (target_continue_no_signal): Update.
4140 (target_continue): Update.
4141 * linux-low.cc (linux_target_ops): Update.
4142 (linux_resume): Turn into ...
4143 (linux_process_target::resume): ... this.
4144 * linux-low.h (class linux_process_target): Update.
4145 * lynx-low.cc (lynx_target_ops): Update.
4146 (lynx_resume): Turn into ...
4147 (lynx_process_target::resume): ... this.
4148 * lynx-low.h (class lynx_process_target): Update.
4149 * nto-low.cc (nto_target_ops): Update.
4150 (nto_resume): Turn into ...
4151 (nto_process_target::resume): ... this.
4152 * nto-low.h (class nto_process_target): Update.
4153 * win32-low.cc (win32_target_ops): Update.
4154 (win32_resume): Turn into ...
4155 (win32_process_target::resume): ... this.
4156 (win32_process_target::detach): Update.
4157 (do_initial_child_stuff): Update.
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 thread_alive 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 (mythread_alive): Update the macro.
4168
4169 Update the derived classes and callers below.
4170
4171 * linux-low.cc (linux_target_ops): Update.
4172 (linux_thread_alive): Turn into ...
4173 (linux_process_target::thread_alive): ... this.
4174 (wait_for_sigstop): Update.
4175 * linux-low.h (class linux_process_target): Update.
4176 * lynx-low.cc (lynx_target_ops): Update.
4177 (lynx_thread_alive): Turn into ...
4178 (lynx_process_target::thread_alive): ... this.
4179 * lynx-low.h (class lynx_process_target): Update.
4180 * nto-low.cc (nto_target_ops): Update.
4181 (nto_thread_alive): Turn into ...
4182 (nto_process_target::thread_alive): ... this.
4183 * nto-low.h (class nto_process_target): Update.
4184 * win32-low.cc (win32_target_ops): Update.
4185 (win32_thread_alive): Turn into ...
4186 (win32_process_target::thread_alive): ... this.
4187 * win32-low.h (class win32_process_target): Update.
4188
4189 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4190
4191 Turn process_stratum_target's join op into a method of
4192 process_target.
4193
4194 * target.h (struct process_stratum_target): Remove the target op.
4195 (class process_target): Add the target op.
4196 (join_inferior): Update the macro.
4197
4198 Update the derived classes and callers below.
4199
4200 * linux-low.cc (linux_target_ops): Update.
4201 (linux_join): Turn into ...
4202 (linux_process_target::join): ... this.
4203 * linux-low.h (class linux_process_target): Update.
4204 * lynx-low.cc (lynx_target_ops): Update.
4205 (lynx_join): Turn into ...
4206 (lynx_process_target::join): ... this.
4207 * lynx-low.h (class lynx_process_target): Update.
4208 * nto-low.cc (nto_target_ops): Update.
4209 (nto_process_target::join): Define.
4210 * nto-low.h (class nto_process_target): Update.
4211 * win32-low.cc (win32_target_ops): Update.
4212 (win32_join): Turn into ...
4213 (win32_process_target::join): ... 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 mourn 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
4224 Update the derived classes and callers below.
4225
4226 * target.cc (target_mourn_inferior): Update.
4227 * linux-low.cc (linux_target_ops): Update.
4228 (linux_mourn): Turn into ...
4229 (linux_process_target::mourn): ... this.
4230 (handle_extended_wait): Update.
4231 (linux_process_target::kill): Update.
4232 (linux_process_target::detach): Update.
4233 * linux-low.h (class linux_process_target): Update.
4234 * lynx-low.cc (lynx_target_ops): Update.
4235 (lynx_mourn): Turn into ...
4236 (lynx_process_target::mourn): ... this.
4237 * lynx-low.h (class lynx_process_target): Update.
4238 * nto-low.cc (nto_target_ops): Update.
4239 (nto_mourn): Turn into ...
4240 (nto_process_target::mourn): ... this.
4241 * nto-low.h (class nto_process_target): Update.
4242 * win32-low.cc (win32_target_ops): Update.
4243 (win32_mourn): Turn into ...
4244 (win32_process_target::mourn): ... this.
4245 * win32-low.h (class win32_process_target): Update.
4246
4247 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4248
4249 Turn process_stratum_target's detach op into a method of
4250 process_target.
4251
4252 * target.h (struct process_stratum_target): Remove the target op.
4253 (class process_target): Add the target op.
4254 (detach_inferior): Update the macro.
4255
4256 Update the derived classes and callers below.
4257
4258 * linux-low.cc (linux_target_ops): Update.
4259 (linux_detach): Turn into ...
4260 (linux_process_target::detach): ... this.
4261 * linux-low.h (class linux_process_target): Update.
4262 * lynx-low.cc (lynx_target_ops): Update.
4263 (lynx_detach): Turn into ...
4264 (lynx_process_target::detach): ... this.
4265 * lynx-low.h (class lynx_process_target): Update.
4266 * nto-low.cc (nto_target_ops): Update.
4267 (nto_detach): Turn into ...
4268 (nto_process_target::detach): ... this.
4269 * nto-low.h (class nto_process_target): Update.
4270 * win32-low.cc (win32_target_ops): Update.
4271 (win32_detach): Turn into ...
4272 (win32_process_target::detach): ... this.
4273 * win32-low.h (class win32_process_target): Update.
4274
4275 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4276
4277 Turn process_stratum_target's kill op into a method of
4278 process_target.
4279
4280 * target.h (struct process_stratum_target): Remove the target op.
4281 (class process_target): Add the target op.
4282
4283 Update the derived classes and callers below.
4284
4285 * target.cc (kill_inferior): Update.
4286 * linux-low.cc (linux_target_ops): Update.
4287 (linux_kill): Turn into ...
4288 (linux_process_target::kill): ... this.
4289 * linux-low.h (class linux_process_target): Update.
4290 * lynx-low.cc (lynx_target_ops): Update.
4291 (lynx_kill): Turn into ...
4292 (lynx_process_target::kill): ... this.
4293 * lynx-low.h (class lynx_process_target): Update.
4294 * nto-low.cc (nto_target_ops): Update.
4295 (nto_kill): Turn into ...
4296 (nto_process_target::kill): ... this.
4297 * nto-low.h (class nto_process_target): Update.
4298 * win32-low.cc (win32_target_ops): Update.
4299 (win32_kill): Turn into ...
4300 (win32_process_target::kill): ... this.
4301 * win32-low.h (class win32_process_target): Update.
4302
4303 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4304
4305 Turn process_stratum_target's attach op into a method of
4306 process_target.
4307
4308 * target.h (struct process_stratum_target): Remove the target op.
4309 (class process_target): Add the target op.
4310 (myattach): Update the macro.
4311
4312 Update the derived classes and callers below.
4313
4314 * linux-low.cc (linux_target_ops): Update.
4315 (linux_attach): Turn into ...
4316 (linux_process_target::attach): ... this.
4317 * linux-low.h (class linux_process_target): Update.
4318 * lynx-low.cc (lynx_target_ops): Update.
4319 (lynx_attach): Turn into ...
4320 (lynx_process_target::attach): ... this.
4321 * lynx-low.h (class lynx_process_target): Update.
4322 * nto-low.cc (nto_target_ops): Update.
4323 (nto_attach): Turn into ...
4324 (nto_process_target::attach): ... this.
4325 * nto-low.h (class nto_process_target): Update.
4326 * win32-low.cc (win32_target_ops): Update.
4327 (win32_attach): Turn into ...
4328 (win32_process_target::attach): ... this.
4329 * win32-low.h (class win32_process_target): Update.
4330
4331 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4332
4333 Turn process_stratum_target's post_create_inferior op into a method
4334 of process_target.
4335
4336 * target.h (struct process_stratum_target): Remove the target op.
4337 (class process_target): Add the target op.
4338 (target_post_create_inferior): Update the macro.
4339 * target.cc (process_target::post_create_inferior): Define.
4340
4341 Update the derived classes and callers below.
4342
4343 * linux-low.cc (linux_target_ops): Update.
4344 (linux_post_create_inferior): Turn into ...
4345 (linux_process_target::post_create_inferior): ... this.
4346 * linux-low.h (class linux_process_target): Update.
4347 * lynx-low.cc (lynx_target_ops): Update.
4348 * nto-low.cc (nto_target_ops): Update.
4349 * win32-low.cc (win32_target_ops): Update.
4350
4351 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4352
4353 Turn process_stratum_target's create_inferior op into a method of
4354 process_target.
4355
4356 * target.h (struct process_stratum_target): Remove the target op.
4357 (class process_target): Add the target op.
4358 (create_inferior): Rename the macro to ...
4359 (target_create_inferior): ... this.
4360
4361 Update the derived classes and callers below.
4362
4363 * server.cc (handle_v_run): Update.
4364 (captured_main): Update.
4365 (process_serial_event): Update.
4366 * linux-low.cc (linux_target_ops): Update.
4367 (linux_create_inferior): Turn into ...
4368 (linux_process_target::create_inferior): ... this.
4369 * linux-low.h (class linux_process_target): Update.
4370 * lynx-low.cc (lynx_target_ops): Update.
4371 (lynx_create_inferior): Turn into ...
4372 (lynx_process_target::create_inferior): ... this.
4373 * lynx-low.h (class lynx_process_target): Update.
4374 * nto-low.cc (nto_target_ops): Update.
4375 (nto_create_inferior): Turn into ...
4376 (nto_process_target::create_inferior): ... this.
4377 * nto-low.h (class nto_process_target): Update.
4378 * win32-low.cc (win32_target_ops): Update.
4379 (win32_create_inferior): Turn into ...
4380 (win32_process_target::create_inferior): ... this.
4381 * win32-low.h (class win32_process_target): Update.
4382
4383 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4384
4385 * target.h (class process_target): New class definition.
4386 (struct process_stratum_target) <pt>: New field with type
4387 'process_target*'.
4388 * linux-low.h (class linux_process_target): Define as a derived
4389 class of 'process_target'.
4390 * linux-low.cc (linux_target_ops): Add a linux_process_target*
4391 as the 'pt' field.
4392 * lynx-low.h (class lynx_process_target): Define as a derived
4393 class of 'process_target'.
4394 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
4395 as the 'pt' field.
4396 * nto-low.h (class nto_process_target): Define as a derived
4397 class of 'process_target'.
4398 * nto-low.cc (nto_target_ops): Add an nto_process_target*
4399 as the 'pt' field.
4400 * win32-low.h (class win32_process_target): Define as a derived
4401 class of 'process_target'.
4402 * win32-low.cc (win32_target_ops): Add a win32_process_target*
4403 as the 'pt' field.
4404
4405 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
4406
4407 * configure: Regenerate.
4408
4409 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
4410 Andrew Burgess <andrew.burgess@embecosm.com>
4411
4412 * linux-riscv-low.cc: New file.
4413 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
4414 and nat/riscv-linux-tdesc.c.
4415 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
4416 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
4417 Define.
4418
4419 2020-02-14 Tom Tromey <tom@tromey.com>
4420
4421 * acinclude.m4: Don't include acx_configure_dir.m4.
4422 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
4423 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
4424 (all, install-only, uninstall, clean-info, clean)
4425 (maintainer-clean): Don't recurse.
4426 (subdir_do, all-lib): Remove.
4427 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
4428 (GNULIB_H): Remove.
4429 (generated_files): Update.
4430 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
4431 * configure: Rebuild.
4432 * configure.ac: Don't configure gnulib or libiberty.
4433 (GNULIB): Update.
4434
4435 2020-02-14 Eli Zaretskii <eliz@gnu.org>
4436
4437 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
4438 preparing the command line for CreateProcess.
4439 (win32_create_inferior): Reflect the program name in debugging
4440 output that shows the process and its command line.
4441
4442 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
4443
4444 * Makefile.in: Rename source files from .c to .cc.
4445 * %.c: Rename to %.cc.
4446 * configure.ac: Rename server.c to server.cc.
4447 * configure: Re-generate.
4448
4449 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
4450
4451 * Makefile.in: Rename gdbsupport source files from .c to .cc.
4452
4453 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
4454
4455 * win32-low.c (win32_create_inferior): Set signal_pid.
4456
4457 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
4458 Pedro Alves <palves@redhat.com>
4459
4460 Skip building gdbserver in a cross-configuration.
4461 * configure.srv: Set $gdbserver_host depending on whether $target
4462 is $host. Use $gdbserver_host instead of $host.
4463
4464 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4465
4466 * configure: Re-generate.
4467
4468 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4469
4470 * configure: Re-generate.
4471
4472 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4473
4474 * acinclude.m4: Update warning.m4 path.
4475
4476 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
4477
4478 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
4479 (handle_exception): Set siginfo_er.
4480 (win32_xfer_siginfo): New function.
4481
4482 2020-02-07 Tom Tromey <tom@tromey.com>
4483 Pedro Alves <palves@redhat.com>
4484
4485 * README: Update build documentation.
4486 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
4487 host, not target.
4488 * configure.ac: Update paths.
4489 * configure: Rebuild.
4490 * acinclude.m4: Update paths.
4491 * Makefile.in: Update include paths.
4492 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
4493 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
4494 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
4495 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
4496 (%-generated.c): Update paths.
4497 * Move entire directory from ../gdb/gdbserver.
4498
4499 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
4500
4501 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
4502
4503 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4504
4505 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
4506 assignment instead of srv_linux_obj.
4507
4508 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
4509
4510 * server.c (handle_qxfer_libraries): Write segment-address with
4511 paddress.
4512
4513 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
4514
4515 * Makefile.in (install-strip): New target.
4516 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
4517 * aclocal.m4: Regenerate.
4518 * configure: Regenerate.
4519 * configure.ac: Add AM_PROG_INSTALL_STRIP.
4520
4521 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4522
4523 * Makefile.in (SFILES): Adjust paths to point to real files.
4524 (OBS): Move waitstatus.o to target/waitstatus.o.
4525 (TAGS): Transform paths appropriately.
4526 (%.o): Rename to...
4527 (nat/%.o): ... this pattern rule.
4528 (%.o): Rename to...
4529 (target/%.o): ... this pattern rule.
4530 * configure.srv: Adjust paths throughout to include nat/ prefix
4531 with the revant files.
4532 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
4533 * configure: Regenerate.
4534
4535 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4536
4537 * Makefile.in (TAGS): Remove config files from the recipe.
4538
4539 2020-01-14 Tom Tromey <tom@tromey.com>
4540
4541 * configure: Rebuild.
4542 * configure.ac: Remove any checks that were added to common.m4.
4543 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
4544 lib-link.m4.
4545
4546 2020-01-14 Tom Tromey <tom@tromey.com>
4547
4548 * server.h: Include config.h.
4549 * gdbreplay.c: Include config.h.
4550 * configure: Rebuild.
4551 * configure.ac: Don't source common.host.
4552 * acinclude.m4: Update path.
4553 * Makefile.in (INCSUPPORT): New variable.
4554 (INCLUDE_CFLAGS): Add INCSUPPORT.
4555 (SFILES): Update paths.
4556 (version-generated.c): Update path to create-version.sh.
4557 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
4558
4559 2020-01-14 Tom Tromey <tom@tromey.com>
4560
4561 * configure.ac (LIBS): Use WIN32APILIBS.
4562 (USE_WIN32API): Don't define.
4563 * configure: Rebuild.
4564
4565 2020-01-14 Tom Tromey <tom@tromey.com>
4566
4567 * configure: Rebuild.
4568
4569 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4570
4571 * Makefile.in (%-generated.c): Remove rule for files from
4572 regformats/i386.
4573
4574 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4575
4576 * configure: Re-generate.
4577
4578 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4579
4580 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
4581 Define to static.
4582 * tracepoint.c (stop_tracing, flush_trace_buffer,
4583 about_to_request_buffer_space, get_trace_state_variable_value,
4584 set_trace_state_variable_value, gdb_collect): Add declaration.
4585
4586 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4587
4588 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
4589 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
4590 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
4591 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
4592 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
4593 static.
4594
4595 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4596
4597 * inferiors.c: Include gdbsupport/common-inferior.h.
4598
4599 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4600
4601 * hostio-errno.c: Include hostio.h.
4602
4603 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4604
4605 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
4606 prerequisite.
4607
4608 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4609
4610 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
4611 * linux-arm-tdesc.h: Include arch/arm.h.
4612
4613 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4614
4615 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
4616
4617 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4618
4619 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
4620 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
4621
4622 2020-01-10 Pedro Alves <palves@redhat.com>
4623
4624 * fork-child.c (post_fork_inferior): Pass target down to
4625 startup_inferior.
4626 * inferiors.c (switch_to_thread): Add process_stratum_target
4627 parameter.
4628 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
4629 * nto-low.c (nto_target_ops): Now a process_stratum_target.
4630 * linux-low.c (linux_target_ops): Now a process_stratum_target.
4631 * remote-utils.c (prepare_resume_reply): Pass the target to
4632 switch_to_thread.
4633 * target.c (the_target): Now a process_stratum_target.
4634 (done_accessing_memory): Pass the target to switch_to_thread.
4635 (set_target_ops): Ajust to use process_stratum_target.
4636 * target.h (struct target_ops): Rename to ...
4637 (struct process_stratum_target): ... this.
4638 (the_target, set_target_ops): Adjust.
4639 (prepare_to_access_memory): Adjust comment.
4640 * win32-low.c (child_xfer_memory): Adjust to use
4641 process_stratum_target.
4642 (win32_target_ops): Now a process_stratum_target.
4643
4644 2020-01-06 Eli Zaretskii <eliz@gnu.org>
4645 Pedro Alves <palves@redhat.com>
4646
4647 * win32-low.c (get_child_debug_event): Extract the fatal exception
4648 from the exit status and convert to the equivalent Posix signal
4649 number.
4650 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
4651 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
4652
4653 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
4654
4655 * Makefile.in: Use INSTALL_PROGRAM_ENV.
4656
4657 2020-01-01 Joel Brobecker <brobecker@adacore.com>
4658
4659 * server.c (gdbserver_version): Change copyright year to 2020.
4660 * gdbreplay.c (gdbreplay_version): Likewise.
4661
4662 2019-12-19 Christian Biesinger <cbiesinger@google.com>
4663
4664 * configure: Regenerate.
4665 * configure.ac: Quote variable arguments of test.
4666
4667 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
4668
4669 * Makefile.in: Fix build with GNU Make 3.81
4670
4671 2019-12-16 Tom Tromey <tromey@adacore.com>
4672
4673 * server.c (get_exec_file): Constify result.
4674
4675 2019-12-10 Christian Biesinger <cbiesinger@google.com>
4676
4677 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
4678 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
4679 * config.in: Regenerate.
4680 * configure: Regenerate.
4681 * configure.ac: Don't check for strerror.
4682 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
4683 Call safe_strerror instead of strerror.
4684 * server.h (strerror): Remove this now-unnecessary declaration.
4685 * tracepoint.c (init_named_socket): Call safe_strerror instead of
4686 strerror.
4687 (gdb_agent_helper_thread): Likewise.
4688 * utils.c (perror_with_name): Likewise.
4689
4690 2019-11-26 Tom Tromey <tom@tromey.com>
4691
4692 * configure, config.in: Rebuild.
4693
4694 2019-11-26 Tom Tromey <tom@tromey.com>
4695
4696 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
4697 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
4698 gdb_sigmask.
4699 * configure, config.in: Rebuild.
4700
4701 2019-11-26 Tom Tromey <tom@tromey.com>
4702
4703 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
4704 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
4705 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
4706 * acinclude.m4: Include ax_pthread.m4.
4707 * config.in, configure: Rebuild.
4708
4709 2019-11-26 Christian Biesinger <cbiesinger@google.com>
4710
4711 * debug.c (debug_set_output): Call safe_strerror instead of
4712 strerror.
4713 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
4714 (linux_kill_one_lwp): Likewise.
4715 (linux_detach_one_lwp): Likewise.
4716 (linux_wait_for_event_filtered): Likewise.
4717 (store_register): Likewise.
4718 * lynx-low.c (lynx_attach): Likewise.
4719 * mem-break.c (insert_memory_breakpoint): Likewise.
4720 (remove_memory_breakpoint): Likewise.
4721 (delete_fast_tracepoint_jump): Likewise.
4722 (set_fast_tracepoint_jump): Likewise.
4723 (uninsert_fast_tracepoint_jumps_at): Likewise.
4724 (reinsert_fast_tracepoint_jumps_at): Likewise.
4725 * nto-low.c (nto_xfer_memory): Likewise.
4726 (nto_resume): Likewise.
4727
4728 2019-11-20 Luis Machado <luis.machado@linaro.org>
4729
4730 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
4731 instead of register count.
4732 * tdesc.c (tdesc_contains_feature): New function.
4733 * tdesc.h (tdesc_contains_feature): New prototype.
4734
4735 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4736
4737 * Makefile.in: Add safe-strerror.c.
4738 * configure: Regenerate.
4739 * configure.ac: Don't source common.host.
4740
4741 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4742
4743 * config.in: Regenerate.
4744 * configure: Regenerate.
4745
4746 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
4747
4748 * ax.c (ax_printf): Handle size_t_arg.
4749
4750 2019-11-06 Christian Biesinger <cbiesinger@google.com>
4751
4752 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
4753 * mi/mi-main.c (output_cores): Likewise.
4754 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
4755 (linux_xfer_osdata_modules): Likewise.
4756 * remote.c (register_remote_support_xml): Likewise.
4757 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
4758 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
4759
4760 2019-11-01 Christian Biesinger <cbiesinger@google.com>
4761
4762 * configure: Regenerate.
4763 * configure.ac: Remove check for strerror_r.
4764
4765 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4766
4767 * config.in: Regenerate.
4768 * configure: Regenerate.
4769 * configure.ac: Also check for strerror_r.
4770
4771 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4772
4773 * ax.h (debug_agent): Remove duplicate declaration.
4774
4775 2019-10-26 Tom de Vries <tdevries@suse.de>
4776
4777 * linux-aarch64-low.c: Fix typos in comments.
4778 * linux-arm-low.c: Same.
4779 * linux-low.c: Same.
4780 * linux-ppc-low.c: Same.
4781 * proc-service.c: Same.
4782 * regcache.h: Same.
4783 * server.c: Same.
4784 * tracepoint.c: Same.
4785 * win32-low.c: Same.
4786
4787 2019-10-25 Tom Tromey <tromey@adacore.com>
4788
4789 * utils.c (xstrdup): Remove.
4790
4791 2019-10-23 Tom Tromey <tom@tromey.com>
4792
4793 * configure, config.in: Rebuild.
4794
4795 2019-10-23 Tom Tromey <tom@tromey.com>
4796
4797 * configure: Rebuild.
4798 * acinclude.m4: Use m4_include, not sinclude.
4799
4800 2019-10-17 Tom Tromey <tromey@adacore.com>
4801
4802 * configure: Rebuild.
4803 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
4804 in AC_CONFIG_FILES invocation.
4805 * Makefile.in (stamp-h, Makefile): Use new-style config.status
4806 invocation.
4807
4808 2019-10-16 Christian Biesinger <cbiesinger@google.com>
4809
4810 * server.c: Include xml-builtin.h.
4811 (get_xml_features): Don't declare xml_builtins here.
4812
4813 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4814
4815 * Makefile.in: Remove references to vec-ipa.o.
4816
4817 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4818
4819 * Makefile.in: Remove references to vec.c.
4820
4821 2019-10-02 Christian Biesinger <cbiesinger@google.com>
4822
4823 * server.c (server_waiting): Change to bool.
4824 (extended_protocol): Likewise.
4825 (response_needed): Likewise.
4826 (exit_requested): Likewise.
4827 (run_once): Likewise.
4828 (report_no_resumed): Likewise.
4829 (non_stop): Likewise.
4830 (disable_packet_vCont): Likewise.
4831 (disable_packet_Tthread): Likewise.
4832 (disable_packet_qC): Likewise.
4833 (disable_packet_qfThreadInfo): Likewise.
4834 (handle_general_set): Update.
4835 (handle_detach): Update.
4836 (handle_monitor_command): Update.
4837 (handle_query): Update.
4838 (captured_main): Update.
4839 (process_serial_event): Update.
4840 * server.h (server_waiting): Change to bool.
4841 (disable_packet_vCont): Likewise.
4842 (disable_packet_Tthread): Likewise.
4843 (disable_packet_qC): Likewise.
4844 (disable_packet_qfThreadInfo): Likewise.
4845 (run_once): Likewise.
4846 (non_stop): Likewise.
4847 * target.c (target_stop_and_wait): Update.
4848
4849 2019-10-02 Tom Tromey <tromey@adacore.com>
4850
4851 * Makefile.in (SFILES): Add common-inferior.c.
4852 (OBS): Add common-inferior.o.
4853 * server.c (startup_with_shell): Don't define.
4854
4855 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
4856
4857 * linux-low.c (linux_low_read_btrace): Update for change to
4858 std::vector.
4859
4860 2019-09-20 Christian Biesinger <cbiesinger@google.com>
4861
4862 * debug.c (debug_threads): Remove comment in favor of the header.
4863 * debug.h (using_threads): Add declaration.
4864 (debug_threads): Add comment.
4865 * linux-aarch64-low.c: Include debug.h and remove declaration of
4866 debug_threads.
4867 * nto-low.c: Likewise.
4868 * remote-utils.c: Likewise.
4869 * thread-db.c: Likewise.
4870
4871 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
4872
4873 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
4874 and powerpc-cell64l-ipa.o.
4875 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
4876 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
4877 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
4878 (spu*-*-*): Remove.
4879
4880 * spu-low.c: Remove file.
4881
4882 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
4883 (parse_spufs_run): Remove.
4884 (ppc_get_pc): Remove Cell/B.E. support.
4885 (ppc_set_pc): Likewise.
4886 (ppc_breakpoint_at): Likewise.
4887 (ppc_arch_setup): Likewise.
4888 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
4889 tdesc_powerpc_cell32l.
4890 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
4891 or init_registers_powerpc_cell32l.
4892 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
4893 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
4894 or init_registers_powerpc_cell32l.
4895 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
4896 (init_registers_powerpc_cell32l): Remove prototype.
4897 (init_registers_powerpc_cell64l): Likewise.
4898
4899 * target.h (struct target_ops): Remove qxfer_spu member.
4900 * server.c (handle_qxfer_spu): Remove.
4901 (qxfer_packets): Remove entry for "spu".
4902 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
4903 * linux-low.c (SPUFS_MAGIC): Remove.
4904 (spu_enumerate_spu_ids): Remove.
4905 (linux_qxfer_spu): Remove.
4906 (linux_target_ops): Remove qxfer_spu member.
4907 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
4908 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
4909 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
4910
4911 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
4912
4913 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
4914 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
4915 * config.in: Regenerate.
4916 * configure: Regenerate.
4917
4918 2019-08-15 Tom Tromey <tromey@adacore.com>
4919
4920 * target.c (target_write_memory): Use gdb::byte_vector.
4921
4922 2019-08-15 Tom Tromey <tromey@adacore.com>
4923
4924 * tracepoint.c (write_inferior_data_pointer)
4925 (write_inferior_integer, write_inferior_int8)
4926 (write_inferior_uinteger, m_tracepoint_action_download)
4927 (r_tracepoint_action_download, x_tracepoint_action_download)
4928 (l_tracepoint_action_download, clear_inferior_trace_buffer)
4929 (download_agent_expr, download_tracepoint_1)
4930 (download_trace_state_variables, upload_fast_traceframes): Update.
4931 * server.c (gdb_write_memory): Update.
4932 * remote-utils.c (relocate_instruction): Update.
4933 * proc-service.c (ps_pdwrite): Update.
4934 * mem-break.c (remove_memory_breakpoint)
4935 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
4936 (uninsert_fast_tracepoint_jumps_at)
4937 (reinsert_fast_tracepoint_jumps_at): Update.
4938 * linux-x86-low.c (append_insns)
4939 (i386_install_fast_tracepoint_jump_pad)
4940 (amd64_write_goto_address, i386_write_goto_address): Update.
4941 * linux-s390-low.c (append_insns, s390_write_goto_address):
4942 Update.
4943 * linux-ppc-low.c (ppc_relocate_instruction)
4944 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
4945 (ppc_write_goto_address): Update.
4946 * linux-aarch64-low.c (append_insns): Update.
4947 * target.h (struct target_ops): Update.
4948 (write_inferior_memory): Don't declare.
4949 * target.c (target_write_memory): Rename from
4950 write_inferior_memory. Remove old target_write_memory.
4951
4952 2019-08-15 Tom Tromey <tromey@adacore.com>
4953
4954 * target.c (write_inferior_memory): Use std::vector.
4955
4956 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
4957
4958 PR build/24886
4959 * configure.ac: Drop enable-libmcheck support.
4960 * configure, config.in: Rebuild.
4961 * acinclude.m4: Don't include it.
4962
4963 2019-07-19 Alan Hayward <alan.hayward@arm.com>
4964
4965 * configure.srv: Remove Arm xml files.
4966
4967 2019-07-19 Alan Hayward <alan.hayward@arm.com>
4968
4969 * configure.srv: Add new files. Remove xml generated files.
4970 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
4971 registers.
4972 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
4973 * linux-aarch32-tdesc.c: New file.
4974 * linux-aarch32-tdesc.h: New file.
4975 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
4976 * linux-arm-low.c (init_registers_arm, tdesc_arm)
4977 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
4978 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
4979 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
4980 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
4981 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
4982 (arm_read_description): Call arm_linux_read_description.
4983 (initialize_low_arch): Don't init registers.
4984 * linux-arm-tdesc.c: New file.
4985 * linux-arm-tdesc.h: New file.
4986
4987 2019-07-10 Alan Hayward <alan.hayward@arm.com>
4988
4989 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
4990 Move counter inside for.
4991 (arm_read_description): Check ptrace earlier.
4992 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
4993
4994 2019-07-09 Tom Tromey <tom@tromey.com>
4995
4996 * configure: Rebuild.
4997 * configure.ac: Change common to gdbsupport.
4998 * acinclude.m4: Change common to gdbsupport.
4999 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
5000 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
5001 common to gdbsupport.
5002 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
5003 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
5004 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
5005 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
5006 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
5007 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
5008 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
5009 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
5010 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
5011 common to gdbsupport.
5012
5013 2019-07-04 Alan Hayward <alan.hayward@arm.com>
5014
5015 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
5016 defines.
5017 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
5018
5019 2019-07-04 Alan Hayward <alan.hayward@arm.com>
5020
5021 * configure.srv: Remove legacy xml.
5022 * linux-aarch64-low.c (initialize_low_arch): Remove
5023 initialize_low_tdesc call.
5024 * linux-aarch64-tdesc-selftest.c: Remove file.
5025 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
5026 * linux-x86-low.c (initialize_low_arch): Remove
5027 initialize_low_tdesc call.
5028 * linux-x86-tdesc-selftest.c: Remove file.
5029 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
5030
5031 2019-06-20 Tom de Vries <tdevries@suse.de>
5032
5033 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
5034 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
5035
5036 2019-06-19 Tom de Vries <tdevries@suse.de>
5037
5038 * debug.h (debug_write): Change return type to ssize_t.
5039 * debug.c (debug_write): Same.
5040
5041 2019-06-14 Tom Tromey <tom@tromey.com>
5042
5043 * configure.ac: Use new path to gnulib.
5044 * configure: Rebuild.
5045 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
5046 to gnulib.
5047
5048 2019-06-11 Tom Tromey <tom@tromey.com>
5049
5050 * Makefile.in (SFILES): Add alloc.c.
5051 (OBS): Add alloc.o.
5052 (IPA_OBJS): Add alloc-ipa.o.
5053 (alloc-ipa.o): New target.
5054 (%.o: ../%.c): New pattern rule.
5055
5056 2019-06-10 Tom Tromey <tromey@adacore.com>
5057
5058 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
5059 end warning with a newline.
5060 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
5061 newline.
5062 * thread-db.c (attach_thread): Don't end warning with a newline.
5063 (thread_db_notice_clone): Likewise.
5064 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
5065 newline.
5066 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
5067 end warning with a newline.
5068
5069 2019-06-04 Pedro Alves <palves@redhat.com>
5070
5071 * server.c (captured_main): Use make_unique_xstrdup.
5072
5073 2019-06-02 Tom Tromey <tom@tromey.com>
5074
5075 * gdbreplay.c (fromhex): Remove.
5076 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
5077
5078 2019-05-29 Tom Tromey <tromey@adacore.com>
5079
5080 * configure: Rebuild.
5081
5082 2019-05-06 Kevin Buettner <kevinb@redhat.com>
5083
5084 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
5085 sign extension code on 32-bit builds.
5086
5087 2019-05-03 Eli Zaretskii <eliz@gnu.org>
5088
5089 * remote-utils.c:
5090 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
5091
5092 2019-04-19 Tom Tromey <tom@tromey.com>
5093
5094 * server.c (struct vstop_notif): Derive from notif_event.
5095 <base>: Remove.
5096 (queue_stop_reply): Update.
5097 (remove_all_on_match_ptid): Change type. Rewrite.
5098 (discard_queued_stop_replies): Rewrite.
5099 (in_queued_stop_replies_ptid): Change type.
5100 (in_queued_stop_replies): Rewrite.
5101 (notif_stop): Update.
5102 (queue_stop_reply_callback): Update.
5103 (captured_main): Don't call initialize_notif.
5104 (push_stop_notification): Update.
5105 * notif.c (notif_write_event, handle_notif_ack)
5106 (notif_event_enque, notif_push): Update.
5107 (notif_event_xfree, initialize_notif): Remove.
5108 * notif.h (struct notif_event): Include <list>, not
5109 "common/queue.h".
5110 (struct notif_server) <queue>: Now a std::list.
5111 (notif_event_p): Remove typedef.
5112 (initialize_notif): Don't declare.
5113 (struct notif_event): Add virtual destructor.
5114
5115 2019-04-17 Alan Hayward <alan.hayward@arm.com>
5116
5117 * ax.c (ax_vdebug): Call debug_printf.
5118 * debug.c (debug_write): New function.
5119 * debug.h (debug_write): New declaration.
5120 * linux-low.c (sigchld_handler): Call debug_write.
5121
5122 2019-04-17 Alan Hayward <alan.hayward@arm.com>
5123
5124 * debug.c (debug_set_output): New function.
5125 (debug_vprintf): Send output to debug_file.
5126 (debug_flush): Likewise.
5127 * debug.h (debug_set_output): New declaration.
5128 * server.c (handle_monitor_command): Add debug-file option.
5129 (captured_main): Likewise.
5130
5131 2019-04-17 Alan Hayward <alan.hayward@arm.com>
5132
5133 * debug.c (remote_debug): Add definition.
5134 * debug.h (remote_debug): Add declaration.
5135 * hostio.c (remote_debug): Remove declaration.
5136 * remote-utils.c (struct ui_file): Likewise.
5137 (remote_debug): Likewise.
5138 * remote-utils.h (remote_debug): Likewise,
5139 * server.c (remote_debug): Remove definition.
5140
5141 2019-04-10 Kevin Buettner <kevinb@redhat.com>
5142
5143 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
5144 when using a 64-bit gdbserver.
5145
5146 2019-04-09 Tom Tromey <tromey@adacore.com>
5147
5148 * linux-low.c (select_event_lwp): Use find_thread_in_random.
5149
5150 2019-04-08 Tom Tromey <tom@tromey.com>
5151
5152 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
5153 throw.
5154 (linux_resume_one_lwp): Likewise.
5155
5156 2019-04-08 Tom Tromey <tom@tromey.com>
5157
5158 * gdbreplay.c: Update.
5159 * linux-low.c: Update.
5160 * server.c: Update.
5161
5162 2019-04-08 Tom Tromey <tom@tromey.com>
5163
5164 * server.c: Use C++ exception handling.
5165 * linux-low.c: Use C++ exception handling.
5166 * gdbreplay.c: Use C++ exception handling.
5167
5168 2019-04-08 Tom Tromey <tom@tromey.com>
5169
5170 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
5171 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
5172 (captured_main, main): Update.
5173 * gdbreplay.c (main): Update.
5174
5175 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5176
5177 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
5178 value in argument pointer, return 1 if the entry is found and 0
5179 otherwise. Move comment.
5180 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
5181 * linux-low.h (linux_get_auxv): Declare.
5182 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
5183
5184 2019-04-05 Tom Tromey <tromey@adacore.com>
5185
5186 * server.c (gdbserver_usage): Use upper-case for metasyntactic
5187 variables.
5188
5189 2019-03-28 Alan Hayward <alan.hayward@arm.com>
5190
5191 * linux-low.c (AT_HWCAP2): Add define if not already included.
5192
5193 2019-03-26 Alan Hayward <alan.hayward@arm.com>
5194
5195 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
5196 (aarch64_arch_setup): Call linux_get_hwcap.
5197 * linux-arm-low.c (arm_get_hwcap): Remove function.
5198 (arm_read_description): Call linux_get_hwcap.
5199 * linux-low.c (linux_get_auxv): New function.
5200 (linux_get_hwcap): Likewise.
5201 (linux_get_hwcap2): Likewise.
5202 * linux-low.h (linux_get_hwcap): New declaration.
5203 (linux_get_hwcap2): Likewise.
5204 * linux-ppc-low.c (ppc_get_auxv): Remove function.
5205 (ppc_arch_setup): Call linux_get_hwcap.
5206 * linux-s390-low.c (s390_get_hwcap): Remove function.
5207 (s390_arch_setup): Call linux_get_hwcap.
5208
5209 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5210 Jiong Wang <jiong.wang@arm.com>
5211
5212 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
5213 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
5214 to fail.
5215 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
5216
5217 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5218 Jiong Wang <jiong.wang@arm.com>
5219
5220 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
5221 (aarch64_get_hwcap): New function.
5222 (aarch64_arch_setup): Read APIA hwcap.
5223
5224 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5225 Jiong Wang <jiong.wang@arm.com>
5226
5227 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
5228 (initialize_low_tracepoint): Likewise.
5229 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
5230 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
5231 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
5232 (aarch64_linux_read_description): Likewise.
5233 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
5234
5235 2019-03-12 John Baldwin <jhb@FreeBSD.org>
5236
5237 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
5238 i386_create_target_description for 'segments' parameter.
5239 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
5240 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
5241 * win32-i386-low.c (i386_arch_setup): Likewise.
5242
5243 2019-03-12 Tom Tromey <tromey@adacore.com>
5244
5245 * linux-low.c (iterate_over_lwps): Update.
5246
5247 2019-03-06 Tom Tromey <tom@tromey.com>
5248
5249 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
5250 (captured_main): Use SCOPE_EXIT.
5251
5252 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
5253
5254 * configure.srv: Use '$enable_unittest' instead of '$development'
5255 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
5256 case.
5257
5258 2019-02-27 Tom Tromey <tromey@adacore.com>
5259
5260 * gdbreplay.c (logchar): Handle \r\n.
5261
5262 2019-02-07 Alan Hayward <alan.hayward@arm.com>
5263
5264 * linux-low.c (linux_attach): Add process before lwp.
5265 * server.c (attach_inferior): Check if already attached.
5266
5267 2019-02-07 Tom Tromey <tom@tromey.com>
5268
5269 * x86-tdesc.h: Rename include guard.
5270 * x86-low.h: Add include guard.
5271 * wincecompat.h: Rename include guard.
5272 * win32-low.h: Add include guard.
5273 * utils.h: Rename include guard.
5274 * tracepoint.h: Rename include guard.
5275 * tdesc.h: Rename include guard.
5276 * target.h: Rename include guard.
5277 * server.h: Rename include guard.
5278 * remote-utils.h: Rename include guard.
5279 * regcache.h: Rename include guard.
5280 * nto-low.h: Rename include guard.
5281 * notif.h: Add include guard.
5282 * mem-break.h: Rename include guard.
5283 * lynx-low.h: Add include guard.
5284 * linux-x86-tdesc.h: Add include guard.
5285 * linux-s390-tdesc.h: Add include guard.
5286 * linux-ppc-tdesc-init.h: Add include guard.
5287 * linux-low.h: Add include guard.
5288 * linux-aarch64-tdesc.h: Add include guard.
5289 * linux-aarch32-low.h: Add include guard.
5290 * inferiors.h: Rename include guard.
5291 * i387-fp.h: Rename include guard.
5292 * hostio.h: Rename include guard.
5293 * gdbthread.h: Rename include guard.
5294 * gdb_proc_service.h: Rename include guard.
5295 * event-loop.h: Rename include guard.
5296 * dll.h: Rename include guard.
5297 * debug.h: Rename include guard.
5298 * ax.h: Rename include guard.
5299
5300 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
5301
5302 PR gdb/23985
5303 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
5304 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
5305
5306 2019-01-25 Tom Tromey <tom@tromey.com>
5307
5308 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
5309
5310 2019-01-25 Tom Tromey <tom@tromey.com>
5311
5312 * win32-low.c: Fix common/ includes.
5313 * win32-i386-low.c: Fix common/ includes.
5314 * tracepoint.c: Fix common/ includes.
5315 * thread-db.c: Fix common/ includes.
5316 * target.h: Fix common/ includes.
5317 * symbol.c: Fix common/ includes.
5318 * spu-low.c: Fix common/ includes.
5319 * server.h: Fix common/ includes.
5320 * server.c: Fix common/ includes.
5321 * remote-utils.c: Fix common/ includes.
5322 * regcache.h: Fix common/ includes.
5323 * regcache.c: Fix common/ includes.
5324 * nto-x86-low.c: Fix common/ includes.
5325 * notif.h: Fix common/ includes.
5326 * mem-break.h: Fix common/ includes.
5327 * lynx-low.c: Fix common/ includes.
5328 * lynx-i386-low.c: Fix common/ includes.
5329 * linux-x86-tdesc-selftest.c: Fix common/ includes.
5330 * linux-x86-low.c: Fix common/ includes.
5331 * linux-low.c: Fix common/ includes.
5332 * inferiors.h: Fix common/ includes.
5333 * i387-fp.c: Fix common/ includes.
5334 * hostio.c: Fix common/ includes.
5335 * hostio-errno.c: Fix common/ includes.
5336 * gdbthread.h: Fix common/ includes.
5337 * gdbreplay.c: Fix common/ includes.
5338 * fork-child.c: Fix common/ includes.
5339 * event-loop.c: Fix common/ includes.
5340 * ax.c:
5341 (enum gdb_agent_op): Fix common/ includes.
5342
5343 2019-01-21 Tom Tromey <tom@tromey.com>
5344
5345 * tracepoint.c: Fix includes.
5346 * remote-utils.c: Fix includes.
5347 * linux-x86-low.c: Fix includes.
5348
5349 2019-01-01 Joel Brobecker <brobecker@adacore.com>
5350
5351 * gdbreplay.c (gdbreplay_version): Update copyright year in
5352 version message.
5353 * server.c (gdbserver_version): Likewise.
5354
5355 2018-12-05 Alan Hayward <alan.hayward@arm.com>
5356
5357 * linux-low.c (add_lwp): Switch ordering.
5358
5359 2018-11-29 Tom Tromey <tom@tromey.com>
5360
5361 * win32-low.c (win32_join): Take pid, not process.
5362 * target.h (struct target_ops) <join>: Change argument type.
5363 (join_inferior): Change argument name.
5364 * spu-low.c (spu_join): Take pid, not process.
5365 * server.c (handle_detach): Preserve pid before destroying
5366 process.
5367 * lynx-low.c (lynx_join): Take pid, not process.
5368 * linux-low.c (linux_join): Take pid, not process.
5369
5370 2018-11-23 Alan Hayward <alan.hayward@arm.com>
5371
5372 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
5373 (aarch64_cannot_fetch_register): Likewise.
5374 (struct linux_target_ops): Update references.
5375
5376 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5377
5378 * linux-ppc-low.c: Include nat/linux-ptrace.h.
5379
5380 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5381
5382 * configure.srv (ipa_ppc_linux_regobj): Add
5383 powerpc-isa207-htm-vsx32l-ipa.o and
5384 powerpc-isa207-htm-vsx64l-ipa.o.
5385 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
5386 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
5387 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
5388 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
5389 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
5390 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
5391 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
5392 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
5393 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5394 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
5395 (init_registers_powerpc_isa207_htm_vsx32l)
5396 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
5397 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
5398 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
5399 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
5400 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
5401 (ppc_store_tm_ctarregset): New functions.
5402 (ppc_regsets): Add entries for HTM regsets.
5403 (ppc_arch_setup): Set htm in features struct when needed. Set
5404 sizes for the HTM regsets.
5405 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
5406 (initialize_low_arch): Call
5407 init_registers_powerpc_isa207_htm_vsx32l and
5408 init_registers_powerpc_isa207_htm_vsx64l.
5409 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5410 PPC_TDESC_ISA207_HTM_VSX.
5411 (initialize_low_tracepoint): Call
5412 init_registers_powerpc_isa207_htm_vsx32l and
5413 init_registers_powerpc_isa207_htm_vsx64l.
5414
5415 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5416
5417 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
5418 rs6000/power-linux-pmu.xml to srv_xmlfiles.
5419 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
5420 (ppc_store_pmuregset): New functions.
5421 (ppc_regsets): Add entries for ebb and pmu regsets.
5422 (ppc_arch_setup): Set isa207 in features struct if the ebb and
5423 pmu regsets are available. Set sizes for these regsets.
5424
5425 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5426
5427 * configure.srv (ipa_ppc_linux_regobj): Add
5428 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
5429 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
5430 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
5431 rs6000/powerpc-isa207-vsx32l.xml, and
5432 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
5433 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5434 <PPC_TDESC_ISA207_VSX>: New enum value.
5435 (init_registers_powerpc_isa207_vsx32l): Declare.
5436 (init_registers_powerpc_isa207_vsx64l): Declare.
5437 * linux-ppc-low.c (ppc_fill_tarregset): New function.
5438 (ppc_store_tarregset): New function.
5439 (ppc_regsets): Add entry for the TAR regset.
5440 (ppc_arch_setup): Set isa207 in features struct when needed. Set
5441 size for the TAR regsets.
5442 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
5443 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
5444 and init_registers_powerpc_isa207_vsx64l.
5445 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
5446 (initialize_low_tracepoint): Call
5447 init_registers_powerpc_isa207_vsx32l and
5448 init_registers_powerpc_isa207_vsx64l.
5449
5450 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5451 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5452
5453 * configure.srv (ipa_ppc_linux_regobj): Add
5454 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
5455 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
5456 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
5457 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
5458 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
5459 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
5460 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
5461 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5462 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
5463 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
5464 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
5465 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
5466 (ppc_hwcap): Add comment.
5467 (ppc_hwcap2): New global.
5468 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
5469 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
5470 (ppc_regsets): Add entries for the DSCR and PPR regsets.
5471 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
5472 when needed. Set sizes for the the DSCR and PPR regsets.
5473 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
5474 (initialize_low_arch): Call
5475 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5476 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5477 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5478 PPC_TDESC_ISA205_PPR_DSCR_VSX.
5479 (initialize_low_tracepoint): Call
5480 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5481 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5482
5483 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5484
5485 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
5486
5487 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
5488 Simon Marchi <simark@simark.ca>
5489
5490 * acinclude.m4: Include "../selftest.m4".
5491 * configure: Regenerate.
5492 * configure.ac: Use "GDB_AC_SELFTEST".
5493 * configure.srv: Use "$enable_unittests" instead of
5494 "$development" when checking whether unit tests have been
5495 enabled.
5496 * server.c (captured_main): Update message informing that
5497 selftests have been disabled.
5498
5499 2018-10-04 Tom Tromey <tom@tromey.com>
5500
5501 * configure: Rebuild.
5502
5503 2018-10-04 Tom Tromey <tom@tromey.com>
5504
5505 * server.c (handle_status): Rename inner "thread".
5506 (process_serial_event): Declare "res" in 'm' case.
5507 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
5508 (iterate_over_lwps): Rename inner "thread".
5509 (linux_qxfer_libraries_svr4): Rename inner "len".
5510 * gdbthread.h (find_thread_in_random): Rename inner "thread".
5511
5512 2018-10-01 Gary Benson <gbenson@redhat.com>
5513
5514 * gdb_proc_service.h: Moved common code to
5515 common/gdb_proc_service.h.
5516
5517 2018-10-01 Gary Benson <gbenson@redhat.com>
5518
5519 * gdb_proc_service.h: Synchronize comments and whitespace with
5520 GDB's version of this file.
5521
5522 2018-09-25 Tom Tromey <tom@tromey.com>
5523
5524 * configure: Rebuild.
5525 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
5526
5527 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5528
5529 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
5530 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
5531 ($(IPA_LIB)): Sort IPA_OBJS.
5532
5533 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5534
5535 * Makefile.in: Remove references to $(ADD_DEPS).
5536
5537 2018-09-16 Tom Tromey <tom@tromey.com>
5538
5539 * remote-utils.c (remote_open): Use GNU style for metasyntactic
5540 variables.
5541 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
5542 variables.
5543
5544 2018-09-05 Tom Tromey <tom@tromey.com>
5545
5546 * configure: Rebuild.
5547
5548 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
5549
5550 PR build/23399
5551 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
5552
5553 2018-08-27 Tom Tromey <tom@tromey.com>
5554
5555 PR build/23087:
5556 * configure: Rebuild.
5557
5558 2018-08-27 Tom Tromey <tom@tromey.com>
5559
5560 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
5561 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
5562 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
5563 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
5564 (s390x_emit_stack_adjust): Add casts to unsigned char.
5565
5566 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
5567
5568 PR gdb/23374
5569 PR gdb/23375
5570 * server.h (struct client_state) <disable_randomization>:
5571 Initialize to 1.
5572
5573 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
5574
5575 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
5576 variable.
5577 (mips_supply_ptrace_register): Likewise.
5578
5579 2018-07-22 Tom Tromey <tom@tromey.com>
5580
5581 * configure: Rebuild.
5582
5583 2018-07-22 Tom Tromey <tom@tromey.com>
5584
5585 * win32-low.c (win32_create_inferior): Remove unused variables.
5586 * gdbreplay.c (remote_open): Remove unused variable.
5587 * remote-utils.c (remote_prepare): Remove unused variable.
5588 * x86-tdesc.h (X86_TDESC_H): Define.
5589 (amd64_expedite_regs): Define conditionally.
5590 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
5591 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
5592 * remote-utils.c (readchar): Remove unused variable.
5593
5594 2018-07-13 Pedro Alves <palves@redhat.com>
5595
5596 * linux-low.c (linux_kill): Change parameter to process_info
5597 pointer instead of pid. Adjust.
5598 * lynx-low.c (lynx_kill): Likewise.
5599 * nto-low.c (nto_kill): Likewise.
5600 * spu-low.c (spu_kill): Likewise.
5601 * win32-low.c (win32_kill): Likewise.
5602 * server.c (handle_v_kill, kill_inferior_callback)
5603 (detach_or_kill_for_exit): Adjust.
5604 * target.c (kill_inferior): Change parameter to process_info
5605 pointer instead of pid. Adjust.
5606 * target.h (struct target_ops) <kill>: Change parameter to
5607 process_info pointer instead of pid. Adjust all implementations
5608 and callers.
5609 (kill_inferior): Likewise.
5610
5611 2018-07-13 Pedro Alves <palves@redhat.com>
5612
5613 * linux-low.c (linux_detach, linux_join): Change parameter to
5614 process_info pointer instead of pid. Adjust.
5615 * lynx-low.c (lynx_detach, lynx_join): Likewise.
5616 * nto-low.c (nto_detach): Likewise.
5617 * spu-low.c (spu_detach, spu_join): Likewise.
5618 * win32-low.c (win32_detach, win32_join): Likewise.
5619 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
5620 * target.h (struct target_ops) <detach, join>: Change parameter to
5621 process_info pointer instead of pid. Adjust all implementations
5622 and callers.
5623 (detach_inferior, join_inferior): Rename 'pid' parameter to
5624 'proc'.
5625
5626 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5627 Jan Kratochvil <jan.kratochvil@redhat.com>
5628 Paul Fertser <fercerpav@gmail.com>
5629 Tsutomu Seki <sekiriki@gmail.com>
5630
5631 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
5632 (OBS): Add 'common/netstuff.o'.
5633 (GDBREPLAY_OBS): Likewise.
5634 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
5635 (remote_open): Implement support for IPv6
5636 connections.
5637 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
5638 and 'wspiapi.h'.
5639 (handle_accept_event): Accept connections from IPv6 sources.
5640 (remote_prepare): Handle IPv6-style hostnames; implement
5641 support for IPv6 connections.
5642 (remote_open): Implement support for printing connections from
5643 IPv6 sources.
5644
5645 2018-07-11 Pedro Alves <palves@redhat.com>
5646
5647 PR gdb/23377
5648 * mem-break.c (any_persistent_commands): Add process_info
5649 parameter and use it instead of relying on the current process.
5650 Change return type to bool.
5651 * mem-break.h (any_persistent_commands): Add process_info
5652 parameter and change return type to bool.
5653 * server.c (handle_detach): Remove require_running_or_return call.
5654 Look up the process_info for the process we're about to detach.
5655 If not found, return back error to GDB. Adjust
5656 any_persistent_commands call to pass down a process pointer.
5657
5658 2018-07-11 Pedro Alves <palves@redhat.com>
5659
5660 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
5661 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
5662 instead of collect_register_by_name.
5663 * regcache.c (regcache_raw_get_unsigned_by_name): New.
5664 * regcache.h (regcache_raw_get_unsigned_by_name): New.
5665
5666 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
5667 Pedro Alves <palves@redhat.com>
5668
5669 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
5670
5671 2018-07-03 Tom Tromey <tom@tromey.com>
5672
5673 * linux-low.c: Update.
5674 * lynx-low.c: Update.
5675 * mem-break.c: Update.
5676 * nto-low.c: Update.
5677 * remote-utils.c: Update.
5678 * server.c: Update.
5679 * spu-low.c: Update.
5680 * target.c: Update.
5681 * win32-low.c: Update.
5682
5683 2018-07-03 Tom Tromey <tom@tromey.com>
5684
5685 * server.c: Update.
5686
5687 2018-07-03 Tom Tromey <tom@tromey.com>
5688
5689 * linux-low.c: Update.
5690
5691 2018-07-03 Tom Tromey <tom@tromey.com>
5692
5693 * target.c: Update.
5694
5695 2018-07-03 Tom Tromey <tom@tromey.com>
5696
5697 * linux-low.c: Update.
5698 * linux-mips-low.c: Update.
5699 * lynx-low.c: Update.
5700 * nto-low.c: Update.
5701 * remote-utils.c: Update.
5702 * server.c: Update.
5703 * spu-low.c: Update.
5704 * target.c: Update.
5705 * thread-db.c: Update.
5706
5707 2018-07-03 Tom Tromey <tom@tromey.com>
5708
5709 * linux-low.c: Update.
5710 * linux-mips-low.c: Update.
5711 * lynx-low.c: Update.
5712 * mem-break.c: Update.
5713 * nto-low.c: Update.
5714 * remote-utils.c: Update.
5715 * server.c: Update.
5716 * spu-low.c: Update.
5717 * target.c: Update.
5718 * tracepoint.c: Update.
5719
5720 2018-07-03 Tom Tromey <tom@tromey.com>
5721
5722 * linux-low.c: Update.
5723 * linux-ppc-low.c: Update.
5724 * linux-x86-low.c: Update.
5725 * proc-service.c: Update.
5726 * server.c: Update.
5727 * spu-low.c: Update.
5728 * thread-db.c: Update.
5729 * win32-low.c: Update.
5730
5731 2018-07-03 Tom Tromey <tom@tromey.com>
5732
5733 * linux-low.c: Update.
5734 * lynx-low.c: Update.
5735 * nto-low.c: Update.
5736 * remote-utils.c: Update.
5737 * spu-low.c: Update.
5738 * thread-db.c: Update.
5739 * win32-low.c: Update.
5740
5741 2018-06-29 Joel Brobecker <brobecker@adacore.com>
5742
5743 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
5744 parameter in call to 'amd64_create_target_description'.
5745
5746 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5747
5748 * x86-tdesc.h: Remove executable permission flag.
5749
5750 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5751
5752 * configure.ac: Remove AC_PREREQ, add missing quoting.
5753 * configure: Re-generate.
5754 * config.in: Re-generate.
5755 * aclocal.m4: Re-generate.
5756
5757 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
5758
5759 * tracepoint.h (current_traceframe): Remove declaration.
5760
5761 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5762
5763 * linux-aarch64-low.c (is_sve_tdesc): New function.
5764 (aarch64_sve_regs_copy_to_regcache): Likewise.
5765 (aarch64_sve_regs_copy_from_regcache): Likewise.
5766 (aarch64_regs_info): Add SVE checks.
5767 (initialize_low_arch): Initialize SVE.
5768
5769 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5770
5771 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
5772
5773 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5774
5775 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
5776 (initialize_low_tracepoint): Likewise
5777 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
5778 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
5779 param.
5780 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
5781 checks.
5782 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
5783
5784 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5785
5786 * server.h (PBUFSIZ): Increase size
5787
5788 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5789
5790 * regcache.c (regcache::raw_compare): New function.
5791 * regcache.h (regcache::raw_compare): New declaration.
5792
5793 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5794
5795 * regcache.c (new_register_cache): Use new.
5796 (free_register_cache): Use delete.
5797 (register_data): Use const.
5798 (supply_register): Move body inside regcache.
5799 (regcache::raw_supply): New override function.
5800 (collect_register): Move body inside regcache.
5801 (regcache::raw_collect): New override function.
5802 (regcache::get_register_status): New override function.
5803 * regcache.h (struct regcache): Inherit from reg_buffer_common.
5804
5805 2018-06-09 Tom Tromey <tom@tromey.com>
5806
5807 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
5808 declare queue.
5809 (event_queue): Use std::queue.
5810 (gdb_event_xfree): Remove.
5811 (initialize_event_loop, process_event, wait_for_event): Update.
5812
5813 2018-06-08 Stan Cox <scox@redhat.com>
5814
5815 * win32-low.c (win32_create_inferior): last_ptid and last_status
5816 moved to client_state.
5817
5818 2018-06-08 Pedro Alves <palves@redhat.com>
5819
5820 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
5821 common/common-exceptions.o, common/common-utils.o,
5822 common/errors.o, common/print-utils.o and utils.o.
5823 * gdbreplay.c: Include "common-defs.h" instead of the two
5824 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
5825 string.h or alloca.h.
5826 (perror_with_name): Delete.
5827 (remote_open): Use xstrdup instead of strdup.
5828 (main): Rename to ...
5829 (captured_main): ... this.
5830 (main): New.
5831
5832 2018-06-08 Tom Tromey <tom@tromey.com>
5833
5834 * linux-low.c (linux_low_read_btrace): Update.
5835
5836 2018-06-04 Stan Cox <scox@redhat.com>
5837
5838 * server.h (struct client_state): New.
5839 * server.c (cont_thread, general_thread, multi_process)
5840 (report_fork_events, report_vfork_events, report_exec_events)
5841 (report_thread_events, swbreak_feature, hwbreak_feature)
5842 (vCont_supported, disable_randomization, pass_signals)
5843 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
5844 Moved to client_state.
5845 * remote-utils.c (remote_debug, noack_mode)
5846 (transport_is_reliable): Moved to client_state.
5847 * tracepoint.c (current_traceframe): Moved to client_state.
5848
5849 Update all callers.
5850 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
5851 linux-low.c, remote-utils.h, target.c: Use client_state.
5852
5853 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5854
5855 * configure.srv: Add new c/h file.
5856
5857 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5858
5859 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
5860 null VQ.
5861
5862 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5863
5864 * gdb.arch/mips-fpregset-core.exp: New test.
5865 * gdb.arch/mips-fpregset-core.c: New test source.
5866
5867 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
5868
5869 PR server/23198
5870 * hostio.c (require_int): Do not report overflow for integers
5871 between 0xfffffff and 0x7fffffff.
5872
5873 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5874
5875 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
5876 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
5877 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
5878 functions.
5879 (the_low_target): Wire them.
5880
5881 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5882
5883 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
5884 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
5885 mode. Call collect_register_by_name with vscr using
5886 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
5887 (ppc_store_vrregset): Add and set vscr_offset variable as in
5888 ppc_fill_vrregset. Call supply_register_by_name with vscr using
5889 vscr_offset.
5890
5891 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5892
5893 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5894 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
5895 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
5896
5897 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5898
5899 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
5900 (ppc_store_vsxregset): Likewise.
5901 (ppc_fill_vrregset): Likewise.
5902 (ppc_store_vrregset): Likewise.
5903 (ppc_fill_evrregset): Likewise.
5904 (ppc_store_evrregset): Likewise.
5905 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
5906 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
5907 needed.
5908
5909 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5910
5911 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
5912 wordsize of the inferior. Call ppc_linux_target_wordsize.
5913
5914 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5915
5916 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
5917 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
5918 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
5919 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5920 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5921 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5922 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5923 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5924 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5925 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5926 (tdesc_powerpc_e500l): Remove.
5927 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
5928 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
5929 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
5930 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
5931 linux-ppc-tdesc.h.
5932 (ppc_arch_setup): Remove target description matching code. Fill a
5933 ppc_linux_features struct and call ppc_linux_match_description
5934 with it.
5935
5936 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5937
5938 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
5939 width of the requested register exceeds the width of the
5940 `ptrace' data type.
5941 (mips_cannot_store_register): Likewise.
5942
5943 2018-05-21 Maciej W. Rozycki <macro@mips.com>
5944
5945 * linux-mips-low.c (mips_fetch_register): New function. Update
5946 preceding comment.
5947 (mips_store_gregset): Supply 0 rather than $restart for $zero.
5948 (the_low_target): Wire `mips_fetch_register'.
5949
5950 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5951
5952 * lynx-i386-low.c (LYNXOS_178): New macro.
5953 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
5954 the layout on LynxOS-178.
5955 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
5956 handle floating point registers that are not supported by
5957 LynxOS-178.
5958
5959 2018-05-10 Tom Tromey <tom@tromey.com>
5960
5961 * configure: Rebuild.
5962
5963 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5964
5965 PR server/23158:
5966 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
5967 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
5968 Use it to set the expedite_regs field in the given tdesc.
5969 * x86-tdesc.h: New file.
5970 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
5971 Adjust following the addition of the new expedite_regs parameter
5972 to init_target_desc.
5973 * linux-tic6x-low.c (tic6x_read_description): Likewise.
5974 * linux-x86-tdesc.c: #include "x86-tdesc.h".
5975 (i386_linux_read_description, amd64_linux_read_description):
5976 Adjust following the addition of the new expedite_regs parameter
5977 to init_target_desc.
5978 * lynx-i386-low.c: #include "x86-tdesc.h".
5979 (lynx_i386_arch_setup): Adjust following the addition of the new
5980 expedite_regs parameter to init_target_desc.
5981 * nto-x86-low.c: #include "x86-tdesc.h".
5982 (nto_x86_arch_setup): Adjust following the addition of the new
5983 expedite_regs parameter to init_target_desc.
5984 * win32-i386-low.c: #include "x86-tdesc.h".
5985 (i386_arch_setup): Adjust following the addition of the new
5986 expedite_regs parameter to init_target_desc.
5987
5988 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5989
5990 PR server/23158:
5991 * win32-low.c (win32_create_inferior): Add call to my_wait
5992 setting last_status global.
5993
5994 2018-05-10 Joel Brobecker <brobecker@adacore.com>
5995
5996 PR server/23158:
5997 * win32-low.c (create_process): Only call gdb_tilde_expand if
5998 inferior_cwd is not NULL.
5999
6000 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
6001
6002 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
6003 registers to the cache if their values have changed.
6004 (i387_xsave_to_cache): Provide default values for x87 control
6005 registers when these features are available, but disabled.
6006 * regcache.c (supply_register_by_name_zeroed): New function.
6007 * regcache.h (supply_register_by_name_zeroed): Declare new
6008 function.
6009
6010 2018-05-07 Tom Tromey <tom@tromey.com>
6011
6012 * configure: Rebuild.
6013
6014 2018-05-04 Tom Tromey <tom@tromey.com>
6015
6016 * configure: Rebuild.
6017
6018 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
6019 Pedro Alves <palves@redhat.com>
6020
6021 * linux-aarch64-low.c (aarch64_stopped_data_address):
6022 Likewise.
6023
6024 2018-04-27 Tom Tromey <tom@tromey.com>
6025
6026 * configure: Rebuild.
6027
6028 2018-04-23 Tom Tromey <tom@tromey.com>
6029
6030 * configure: Rebuild.
6031
6032 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
6033
6034 * Makefile.in (depcomp): Add "..".
6035 (all_deps_files): New and use it.
6036
6037 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6038
6039 * configure.srv (aarch64*-*-linux*): Don't include xml.
6040 (i[34567]86-*-cygwin*): Likewise.
6041 (i[34567]86-*-linux*): Likewise.
6042 (i[34567]86-*-lynxos*): Likewise.
6043 (i[34567]86-*-mingw32ce*): Likewise.
6044 (i[34567]86-*-mingw*): Likewise.
6045 (i[34567]86-*-nto*): Likewise.
6046 (tic6x-*-uclinux): Likewise.
6047 (x86_64-*-linux*): Likewise.
6048 (x86_64-*-mingw*): Likewise.
6049 (x86_64-*-cygwin*): Likewise.
6050
6051 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6052
6053 * tdesc.c: Remove xml parameter.
6054
6055 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6056
6057 * server.c (get_features_xml): Remove cast.
6058 * tdesc.c (void target_desc::accept): Fill in function.
6059 (tdesc_get_features_xml): Remove old xml creation.
6060 (print_xml_feature::visit_pre): Add xml vistor.
6061 * tdesc.h (struct target_desc): Make xmltarget mutable.
6062 (tdesc_get_features_xml): Remove declaration.
6063
6064 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6065
6066 * tdesc.c (tdesc_architecture_name): Add new function.
6067 (tdesc_osabi_name): Likewise.
6068 (tdesc_get_features_xml): Use new functions.
6069
6070 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6071
6072 * tdesc.c (tdesc_create_flags): Remove.
6073 (tdesc_add_flag): Likewise.
6074 (tdesc_named_type): Likewise.
6075 (tdesc_create_union): Likewise.
6076 (tdesc_create_struct): Likewise.
6077 (tdesc_create_vector): Likewise.
6078 (tdesc_add_bitfield): Likewise.
6079 (tdesc_add_field): Likewise.
6080 (tdesc_set_struct_size): Likewise.
6081
6082 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6083
6084 * tdesc.c (~target_desc): Remove implictly deleted items.
6085 (init_target_desc): Iterate all features.
6086 (tdesc_get_features_xml): Use vector.
6087 (tdesc_create_feature): Create feature.
6088 * tdesc.h (tdesc_feature) Remove
6089 (target_desc): Add features.
6090
6091 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6092
6093 * Makefile.in: Add common/tdesc.c
6094 * tdesc.c (init_target_desc): init all reg_defs from register
6095 vector.
6096 (tdesc_create_reg): Create tdesc_reg.
6097 * tdesc.h (tdesc_feature): Add register vector.
6098
6099 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6100
6101 * tdesc.h (struct target_desc) <features>: Change type to
6102 std::vector<std::string>.
6103 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
6104 changes.
6105 (tdesc_get_features_xml): Likewise.
6106 (tdesc_create_feature): Likewise.
6107
6108 2018-03-26 Alan Hayward <alan.hayward@arm.com>
6109
6110 * regcache.c (find_register_by_number): Return a ref.
6111 (find_regno): Use references.
6112 (register_size): Likewise.
6113 (register_data): Likewise.
6114 * tdesc.c (target_desc::~target_desc): Remove free calls.
6115 (target_desc::operator==): Use std::vector compare.
6116 (init_target_desc): Use reference.
6117 (tdesc_create_reg): Use reg constructors.
6118 * tdesc.h (struct target_desc): Replace pointer with object.
6119
6120 2018-03-23 Alan Hayward <alan.hayward@arm.com>
6121
6122 * regcache.c (find_register_by_number): Make static.
6123 (find_regno): Use find_register_by_number
6124 * regcache.h (struct reg): Remove declaration.
6125
6126 2018-03-23 Alan Hayward <alan.hayward@arm.com>
6127
6128 * tdesc.c (target_desc::~target_desc): Move to here.
6129 (target_desc::operator==): Likewise.
6130 * tdesc.h (target_desc::~target_desc): Move from here.
6131 (target_desc::operator==): Likewise.
6132
6133 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
6134
6135 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
6136
6137 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6138
6139 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
6140 S390_TDESC_GS.
6141 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
6142 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
6143 and init_registers_s390_gs_linux64.
6144
6145 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6146
6147 * linux-s390-low.c (s390_fill_gs): Remove function.
6148 (s390_fill_gsbc): Remove function.
6149 (s390_regsets): Set fill functions for the guarded storage regsets
6150 to NULL.
6151
6152 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6153
6154 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
6155 the word size. Add comment.
6156 (s390_get_wordsize): New function.
6157 (s390_arch_setup): No longer select a temporary tdesc to fetch the
6158 pswm with it. Instead, use s390_get_wordsize to determine the
6159 word size first and derive the correct tdesc from that directly.
6160
6161 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
6162
6163 * Makefile.in: Include silent-rules.mk.
6164 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
6165 (COMPILE): Add ECHO_CXX.
6166 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
6167 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
6168 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
6169 (version-generated.c): Add ECHO_GEN.
6170 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
6171 (IPAGENT_COMPILE): Add ECHO_CXX.
6172 (%-generated.c): Add ECHO_REGDAT.
6173
6174 2018-03-14 Tom Tromey <tom@tromey.com>
6175
6176 PR cli/14977:
6177 * ax.c (ax_printf): Special case for NULL.
6178
6179 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6180
6181 * linux-low.c (linux_qxfer_libraries_svr4): Use
6182 xml_escape_text_append.
6183
6184 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6185
6186 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
6187
6188 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6189
6190 * server.c (handle_general_set): Remove unnecessary xstrdup.
6191
6192 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6193
6194 * server.c (parse_debug_format_options): Adjust to
6195 delim_string_to_char_ptr_vec changes.
6196 * thread-db.c (thread_db_load_search): Adjust to
6197 dirnames_to_char_ptr_vec changes.
6198
6199 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
6200
6201 * target.h (target_enable_btrace, target_disable_btrace)
6202 (target_read_btrace, target_read_btrace_conf): Turn macro into
6203 inline function. Throw error if target method is not defined.
6204 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
6205 check for btrace target method. Be prepared to handle exceptions
6206 from btrace target methods.
6207
6208 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6209
6210 * server.c (captured_main): Change order of error message printed
6211 when the current working directory cannot be found.
6212
6213 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6214
6215 * server.c: Include "filenames.h" and "pathstuff.h".
6216 (program_name): Delete variable.
6217 (program_path): New anonymous class.
6218 (get_exec_wrapper): Use "program_path" instead of
6219 "program_name".
6220 (handle_v_run): Likewise.
6221 (captured_main): Likewise.
6222 (process_serial_event): Likewise.
6223
6224 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6225
6226 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
6227 (OBJS): Add "pathstuff.o".
6228 * server.c (current_directory): New global variable.
6229 (captured_main): Initialize "current_directory".
6230
6231 2018-02-26 Alan Hayward <alan.hayward@arm.com>
6232
6233 * tdesc.c: Use common/tdesc.h.
6234 * tdesc.h: Likewise.
6235
6236 2018-02-20 Alan Hayward <alan.hayward@arm.com>
6237 Simon Marchi <simon.marchi@ericsson.com>
6238
6239 * Makefile.in: Switch order of make rules.
6240
6241 2018-02-19 Alan Hayward <alan.hayward@arm.com>
6242
6243 * Makefile.in: Add common directory in build.
6244 * configure.ac: Add common reference.
6245 * configure: Regenerate.
6246
6247 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6248
6249 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
6250 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
6251 * spu-low.c (spu_target_ops): Likewise.
6252 * win32-low.c (win32_target_ops): Likewise.
6253 * server.c (supported_btrace_packets): Report packets unconditionally.
6254 * target.h (target_ops) <supports_btrace>: Remove.
6255 (target_supports_btrace): Remove.
6256
6257 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6258
6259 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
6260 (handle_btrace_disable): Change return type to void. Use exceptions
6261 to report errors.
6262 (handle_btrace_general_set): Catch exception and copy message to
6263 return message.
6264
6265 2018-02-08 Tom Tromey <tom@tromey.com>
6266
6267 * linux-low.c (install_software_single_step_breakpoints): Use
6268 make_scoped_restore.
6269 * inferiors.c (make_cleanup_restore_current_thread): Remove.
6270 (do_restore_current_thread_cleanup): Remove.
6271 * gdbthread.h (make_cleanup_restore_current_thread): Don't
6272 declare.
6273
6274 2018-02-08 Tom Tromey <tom@tromey.com>
6275
6276 * mem-break.c (set_raw_breakpoint_at): Use
6277 gdb::unique_xmalloc_ptr.
6278
6279 2018-01-30 Pedro Alves <palves@redhat.com>
6280
6281 PR gdb/13211
6282 * target.c (target_terminal::terminal_state): Rename to ...
6283 (target_terminal::m_terminal_state): ... this.
6284
6285 2018-01-19 James Clarke <jrtc27@jrtc27.com>
6286
6287 * linux-low.c (handle_extended_wait): Surround call to
6288 thread_db_notice_clone with #ifdef USE_THREAD_DB.
6289
6290 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
6291
6292 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
6293 linux_ptrace_attach_fail_reason_string now returning an
6294 std::string.
6295 (linux_attach): Likewise.
6296 * thread-db.c (attach_thread): Likewise.
6297
6298 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
6299
6300 PR gdb/21559
6301 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
6302 checking for fs_base/gs_base fields in struct user_regs_struct.
6303 * configure: Regenerate.
6304
6305 2018-01-16 Yao Qi <yao.qi@linaro.org>
6306
6307 PR gdb/18749
6308 * linux-low.c (fetch_register): Call supply_register instead of
6309 error.
6310
6311 2018-01-08 Yao Qi <yao.qi@linaro.org>
6312 Simon Marchi <simon.marchi@ericsson.com>
6313
6314 * Makefile.in (OBS): Remove selftest.o.
6315 * configure.ac: Set srv_selftest_objs if $development is true.
6316 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
6317 * configure: Re-generated.
6318 * server.c (captured_main): Wrap variable selftest_filter with
6319 GDB_SELF_TEST.
6320
6321 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6322
6323 * server.c (parse_debug_format_options): Return std::string.
6324 (handle_monitor_command, captured_main): Adjust.
6325
6326 2018-01-05 Pedro Alves <palves@redhat.com>
6327
6328 PR gdb/18653
6329 * server.c (captured_main): Pass quiet=false to
6330 save_original_signals_state.
6331
6332 2018-01-01 Joel Brobecker <brobecker@adacore.com>
6333
6334 * gdbreplay.c (gdbreplay_version): Update copyright year in
6335 version message.
6336 * server.c (gdbserver_version): Likewise.
6337
6338 2017-12-08 Tom Tromey <tom@tromey.com>
6339
6340 * ax.c (ax_printf): Update.
6341
6342 2017-12-07 Yao Qi <yao.qi@linaro.org>
6343
6344 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
6345 aarch64_linux_read_description.
6346 * linux-amd64-ipa.c (idx2mask): New array.
6347 (get_ipa_tdesc): Move idx2mask out.
6348 (initialize_low_tracepoint): Initialize target descriptions.
6349 * linux-i386-ipa.c (idx2mask): New array.
6350 (get_ipa_tdesc): Move idx2mask out.
6351 (initialize_low_tracepoint): Initialize target descriptions.
6352
6353 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
6354
6355 * tdesc.c (struct tdesc_type): Change return type.
6356 (tdesc_add_flag): Change parameter type.
6357 (tdesc_add_bitfield): Likewise.
6358 (tdesc_add_field): Likewise.
6359 (tdesc_set_struct_size): Likewise.
6360
6361 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
6362
6363 * regcache.c (registers_to_string): Remove unused variable.
6364
6365 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6366
6367 * inferiors.c (for_each_inferior_with_data): Remove.
6368 * inferiors.h (for_each_inferior_with_data): Remove.
6369 * server.c (handle_qxfer_threads_worker): Change parameter type.
6370 (handle_qxfer_threads_proper): Use for_each_thread.
6371
6372 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6373
6374 * inferiors.c (for_each_inferior): Remove.
6375 (clear_inferiors): Use for_each_thread.
6376 * inferiors.h (for_each_inferior): Remove.
6377 * linux-low.c (linux_wait_for_event_filtered): Use
6378 for_each_thread.
6379 (linux_stabilize_threads): Likewise.
6380 * regcache.c (regcache_release): Likewise.
6381 * server.c (gdb_wants_all_threads_stopped): Likewise.
6382 (clear_pending_status_callback): Remove.
6383 (handle_status): Use for_each_thread.
6384 (captured_main): Likewise.
6385 * win32-low.c (child_init_thread_list): Likewise.
6386 (win32_clear_inferiors): Likewise.
6387 (fake_breakpoint_event): Likewise.
6388
6389 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6390
6391 * inferiors.h (find_inferior): Remove.
6392 * inferiors.c (find_inferior): Remove.
6393
6394 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6395
6396 * linux-low.c (resume_status_pending_p): Update comment.
6397 (need_step_over_p): Update comment.
6398
6399 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6400
6401 * linux-low.c (proceed_one_lwp): Return void, change parameter
6402 type.
6403 (unsuspend_and_proceed_one_lwp): Likewise.
6404 (proceed_all_lwps): Use for_each_thread.
6405 (unstop_all_lwps): Likewise.
6406
6407 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6408
6409 * linux-low.c (linux_resume_one_thread): Return void, take
6410 parameter directly.
6411 (linux_resume): Use for_each_thread.
6412
6413 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6414
6415 * linux-low.c (send_sigstop_callback): Return void, change
6416 parameter type. Rename to...
6417 (send_sigstop): ... this.
6418 (suspend_and_send_sigstop_callback): Return void, change parameter
6419 type. Rename to...
6420 (suspend_and_send_sigstop): ... this.
6421 (stop_all_lwps): Use for_each_thread.
6422
6423 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6424
6425 * linux-low.c (lwp_running): Return bool, remove unused
6426 argument.
6427 (linux_stabilize_threads): Use find_thread.
6428
6429 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6430
6431 * linux-low.c (select_singlestep_lwp_callback): Remove.
6432 (count_events_callback): Remove.
6433 (select_event_lwp_callback): Remove.
6434 (select_event_lwp): Use find_thread/for_each_thread.
6435
6436 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6437
6438 * linux-low.c (not_stopped_callback): Return bool, take filter
6439 argument directly.
6440 (linux_wait_for_event_filtered): Use find_thread.
6441 (linux_wait_1): Likewise.
6442
6443 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6444
6445 * linux-low.c (same_lwp): Remove.
6446 (find_lwp_pid): Use find_thread.
6447
6448 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6449
6450 * linux-low.c (delete_lwp_callback): Remove.
6451 (linux_mourn): Use for_each_thread.
6452
6453 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6454
6455 * linux-low.c (linux_detach_lwp_callback): Return void, remove
6456 args parameter, don't check for pid.
6457 (linux_detach): Use for_each_thread.
6458
6459 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6460
6461 * linux-low.c (struct counter): Remove.
6462 (second_thread_of_pid_p): Remove.
6463 (last_thread_of_process_p): Use find_thread.
6464
6465 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6466
6467 * inferiors.c (find_inferior_in_random): Remove.
6468 * inferiors.h (find_inferior_in_random): Remove.
6469 * linux-low.c (status_pending_p_callback): Return bool, accept
6470 parameter ptid directly.
6471 (linux_wait_for_event_filtered): Use find_thread_in_random.
6472 (linux_wait_1): Likewise.
6473
6474 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6475
6476 * inferiors.c (find_inferior_id): Remove.
6477 (find_thread_ptid): Move implemention from find_inferior_id to
6478 here.
6479 * inferiors.h (find_inferior_id): Remove.
6480 * server.c (handle_status): Use find_thread_ptid.
6481 (process_serial_event): Likewise.
6482 * thread-db.c (find_one_thread): Likewise.
6483 (thread_db_thread_handle): Likewise.
6484 * win32-low.c (thread_rec): Likewise.
6485 (child_delete_thread): Likewise.
6486 (win32_thread_alive): Likewise.
6487 (get_child_debug_event): Likewise.
6488
6489 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6490
6491 * linux-mips-low.c (update_watch_registers_callback): Return
6492 void, remove pid_p parameter, don't check for pid.
6493 (mips_insert_point, mips_remove_point): Use for_each_thread.
6494
6495 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6496
6497 * lynx.low (lynx_delete_thread_callback): Remove.
6498 (lynx_mourn): Use for_each_thread.
6499
6500 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6501
6502 * regcache.c (regcache_invalidate_one): Remove.
6503 (regcache_invalidate_pid): use for_each_thread.
6504
6505 2017-11-26 Tom Tromey <tom@tromey.com>
6506
6507 * linux-low.c (linux_create_inferior): Update.
6508
6509 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
6510
6511 * spu-low.c (spu_create_inferior): Fix typo in argument name.
6512
6513 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6514
6515 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
6516 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6517 * linux-aarch64-tdesc-selftest.c: New file.
6518 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6519
6520 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6521
6522 * configure.srv: Add new file.
6523 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6524 * linux-aarch64-tdesc-selftest.c: New file.
6525 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6526
6527 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6528
6529 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
6530 * linux-aarch64-low.c (initialize_low_arch): Remove init.
6531 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
6532
6533 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6534
6535 * configure.srv: Add new files.
6536 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
6537 aarch64_linux_read_description.
6538 * linux-aarch64-low.c (aarch64_linux_read_description):
6539 Merge with aarch64_arch_setup.
6540 (aarch64_arch_setup): Call aarch64_linux_read_description.
6541 * linux-aarch64-tdesc.c: New file.
6542 * linux-aarch64-tdesc.h: New file.
6543
6544 2017-11-24 Yao Qi <yao.qi@linaro.org>
6545
6546 * configure.srv: Set $srv_regobj for tic6x-linux.
6547 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
6548 (tic6x_read_description): Move some code to tic6x_arch_setup.
6549 (tic6x_tdesc_test): New function.
6550 (initialize_low_arch): Call selftests::register_test.
6551
6552 2017-11-22 Yao Qi <yao.qi@linaro.org>
6553
6554 * remote-utils.c (prepare_resume_reply): Use memcpy.
6555
6556 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6557
6558 * linux-low.c (kill_one_lwp_callback): Return void, take
6559 argument directly, don't filter on pid.
6560 (linux_kill): Use for_each_thread.
6561
6562 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6563
6564 * linux-low.c (need_step_over_p): Return bool, remove dummy
6565 argument.
6566 (linux_resume, proceed_all_lwps): Use find_thread.
6567
6568 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6569
6570 * linux-low.c (resume_status_pending_p): Return bool, remove
6571 flag_p argument.
6572 (linux_resume): Use find_thread.
6573
6574 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6575
6576 * linux-low.c (struct thread_resume_array): Remove.
6577 (linux_set_resume_request): Return void, take arguments
6578 directly.
6579 (linux_resume): Use for_each_thread.
6580
6581 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6582
6583 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
6584 return bool, remove data argument.
6585 (linux_stabilize_threads): Use find_thread.
6586
6587 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6588
6589 * linux-low.c (unsuspend_one_lwp): Remove.
6590 (unsuspend_all_lwps): Use for_each_thread, inline code from
6591 unsuspend_one_lwp.
6592
6593 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6594
6595 * gdbthread.h (find_thread): Add overload with ptid_t filter.
6596 * linux-low.c (struct iterate_over_lwps_args): Remove.
6597 (iterate_over_lwps_filter): Remove.
6598 (iterate_over_lwps): Use find_thread.
6599
6600 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6601
6602 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
6603 (linux_handle_new_gdb_connection): Use for_each_thread, inline
6604 code from reset_lwp_ptrace_options_callback.
6605
6606 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6607
6608 * linux-arm-low.c (struct update_registers_data): Remove.
6609 (update_registers_callback): Return void, take arguments
6610 directly, don't check thread's pid.
6611 (arm_insert_point, arm_remove_point): Use for_each_thread.
6612
6613 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6614
6615 * win32-low.c (continue_one_thread): Return void, take argument
6616 directly.
6617 (child_continue): Use for_each_thread.
6618
6619 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6620
6621 * win32-i386-low.c (update_debug_registers_callback): Rename
6622 to ...
6623 (update_debug_registers): ... this, return void, remove pid_p arg.
6624 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
6625
6626 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6627
6628 * inferiors.h (struct process_info): Add constructor, initialize
6629 fields..
6630 <syscalls_to_catch>: Change type to std::vector<int>.
6631 * inferiors.c (add_process): Allocate process_info with new.
6632 (remove_process): Free process_info with delete.
6633 * linux-low.c (handle_extended_wait): Adjust.
6634 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
6635 * server.c (handle_general_set): Adjust.
6636
6637 2017-11-16 Pedro Alves <palves@redhat.com>
6638
6639 * remote-utils.c (remote_close): Block SIGIO signals instead of
6640 uninstalling the SIGIO handler.
6641
6642 2017-11-16 Alan Hayward <alan.hayward@arm.com>
6643
6644 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
6645
6646 2017-11-16 Yao Qi <yao.qi@linaro.org>
6647
6648 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
6649 (tic6x_store_gregset): Likewise.
6650 (tic6x_usrregs_info): Move it up.
6651
6652 2017-11-15 Alan Hayward <alan.hayward@arm.com>
6653
6654 * Makefile.in: Update arch rules.
6655 * configure.srv: Explicitly mark arch/ files.
6656
6657 2017-11-13 Andreas Schwab <schwab@suse.de>
6658
6659 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
6660 function.
6661 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6662
6663 2017-11-06 Pedro Alves <palves@redhat.com>
6664
6665 * config.in, configure: Regenerate.
6666
6667 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6668
6669 * target.c (struct thread_search): Remove.
6670 (thread_search_callback): Remove.
6671 (prepare_to_access_memory): Use for_each_thread instead of
6672 find_inferior. Inline code from thread_search_callback.
6673
6674 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6675
6676 * server.c (struct visit_actioned_threads_data): Remove.
6677 (visit_actioned_threads): Change prototype to take arguments
6678 directly.
6679 (resume): Use find_thread instead of find_inferior.
6680
6681 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6682
6683 * server.c (queue_stop_reply_callback): Change prototype, return
6684 void.
6685 (find_status_pending_thread_callback): Remove.
6686 (handle_status): Replace find_inferior with find_thread and
6687 for_each_thread.
6688
6689 2017-10-25 Alan Hayward <alan.hayward@arm.com>
6690
6691 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
6692 with REGNO.
6693 (aarch64_store_gregset): Likewise.
6694 (aarch64_fill_fpregset): Likewise.
6695 (aarch64_store_fpregset): Likewise.
6696
6697 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
6698
6699 * gdbthread.h (find_thread, for_each_thread): New functions.
6700 * inferiors.c (thread_of_pid): Remove.
6701 (find_any_thread_of_pid): Use find_thread.
6702 * linux-low.c (num_lwps): Use for_each_thread.
6703
6704 2017-10-17 Yao Qi <yao.qi@linaro.org>
6705
6706 * Makefile.in: Remove one rule.
6707 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
6708
6709 2017-10-17 Yao Qi <yao.qi@linaro.org>
6710
6711 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
6712 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
6713
6714 2017-10-17 Yao Qi <yao.qi@linaro.org>
6715
6716 * configure.srv: Rename arm.o with arch/arm.o.
6717
6718 2017-10-17 Yao Qi <yao.qi@linaro.org>
6719
6720 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
6721 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
6722 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
6723 (arch-i386.o, arch-amd64.o): Remove rules.
6724 (arch/%.o): New rule.
6725 Update POSTCOMPILE and COMPILE.pre.
6726 * configure.ac: Invoke AC_CONFIG_COMMANDS.
6727 * configure: Re-generated.
6728 * configure.srv: Replace arch-i386.o with arch/i386.o.
6729 Replace arch-amd64.o with arch/amd64.o.
6730
6731 2017-10-16 Yao Qi <yao.qi@linaro.org>
6732
6733 * configure: Regenerated.
6734
6735 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6736
6737 * inferiors.h: (struct inferior_list): Remove.
6738 (struct inferior_list_entry); Remove.
6739 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
6740 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
6741 get_first_inferior): Remove.
6742 (for_each_inferior, for_each_inferior_with_data, find_inferior,
6743 find_inferior_id, find_inferior_in_random): Change signature.
6744 * inferiors.c (all_threads): Change type to
6745 std::list<thread_info *>.
6746 (get_thread): Remove macro.
6747 (find_inferior, find_inferior_id): Change signature, implement
6748 using find_thread.
6749 (find_inferior_in_random): Change signature, implement using
6750 find_thread_in_random.
6751 (for_each_inferior, for_each_inferior_with_data): Change
6752 signature, implement using for_each_thread.
6753 (add_inferior_to_list, remove_inferior): Remove.
6754 (add_thread, get_first_thread, thread_of_pid,
6755 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
6756 (get_first_inferior, one_inferior_p, clear_inferior_list):
6757 Remove.
6758 (clear_inferiors, get_thread_process): Update.
6759 * gdbthread.h: Include <list>.
6760 (struct thread_info) <entry>: Remove field.
6761 <id>: New field.
6762 (all_threads): Change type to std::list<thread_info *>.
6763 (get_first_inferior): Add doc.
6764 (find_thread, for_each_thread, find_thread_in_random): New
6765 functions.
6766 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
6767 * linux-arm-low.c (update_registers_callback): Update.
6768 * linux-low.c (second_thread_of_pid_p): Update.
6769 (kill_one_lwp_callback, linux_detach_lwp_callback,
6770 delete_lwp_callback, status_pending_p_callback, same_lwp,
6771 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
6772 iterate_over_lwps, not_stopped_callback,
6773 resume_stopped_resumed_lwps, count_events_callback,
6774 select_singlestep_lwp_callback, select_event_lwp_callback,
6775 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
6776 suspend_and_send_sigstop_callback, wait_for_sigstop,
6777 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
6778 lwp_running, linux_set_resume_request, resume_status_pending_p,
6779 need_step_over_p, start_step_over, linux_resume_one_thread,
6780 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
6781 reset_lwp_ptrace_options_callback): Update.
6782 * linux-mips-low.c (update_watch_registers_callback): Update.
6783 * regcache.c (regcache_invalidate_one, regcache_invalidate):
6784 Update.
6785 (free_register_cache_thread_one): Remove.
6786 (regcache_release): Update.
6787 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
6788 handle_qxfer_threads_worker): Update.
6789 (handle_query): Update, use list iterator.
6790 (visit_actioned_threads, handle_pending_status,
6791 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
6792 clear_pending_status_callback, set_pending_status_callback,
6793 find_status_pending_thread_callback, handle_status,
6794 process_serial_event): Update.
6795 * target.c (thread_search_callback): Update.
6796 * thread-db.c (thread_db_get_tls_address): Update.
6797 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
6798 Update.
6799 * win32-i386-low.c (update_debug_registers_callback): Update.
6800 * win32-low.c (delete_thread_info, child_delete_thread,
6801 continue_one_thread, suspend_one_thread,
6802 get_child_debug_event): Adjust.
6803
6804 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6805
6806 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
6807 * inferiors.h: Include <list>.
6808 (struct process_info) <entry>: Remove field.
6809 <pid>: New field.
6810 (pid_of): Change macro to function.
6811 (ptid_of, lwpid_of): Remove macro.
6812 (all_processes): Change type to std::list<process_info *>.
6813 (ALL_PROCESSES): Remove macro.
6814 (for_each_process, find_process): New function.
6815 * inferiors.c (all_processes): Change type to
6816 std::list<process_info *>.
6817 (find_thread_process): Adjust.
6818 (add_process): Likewise.
6819 (remove_process): Likewise.
6820 (find_process_pid): Likewise.
6821 (get_first_process): Likewise.
6822 (started_inferior_callback): Remove.
6823 (have_started_inferiors_p): Adjust.
6824 (attached_inferior_callback): Remove.
6825 (have_attached_inferiors_p): Adjust.
6826 * linux-low.c (check_zombie_leaders): Likewise.
6827 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
6828 (x86_linux_update_xmltarget): Adjust.
6829 * server.c (handle_query): Likewise.
6830 (gdb_reattached_process): Remove.
6831 (handle_status): Adjust.
6832 (kill_inferior_callback): Likewise.
6833 (detach_or_kill_inferior): Remove.
6834 (print_started_pid): Likewise.
6835 (print_attached_pid): Likewise.
6836 (detach_or_kill_for_exit): Update.
6837 (process_serial_event): Likewise.
6838 * linux-arm-low.c (arm_new_fork): Likewise.
6839
6840 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6841
6842 * dll.h: Include <list>.
6843 (struct dll_info): Add constructor.
6844 <entry>: Remove field.
6845 (all_dlls): Change type to std::list<dll_info>.
6846 * dll.c: Include <algorithm>.
6847 (get_dll): Remove macro.
6848 (all_dlls): Change type to std::list<dll_info *>.
6849 (free_one_dll): Remove.
6850 (match_dll): Likewise.
6851 (loaded_dll): Adjust.
6852 (unloaded_dll): Adjust to all_dlls type change, use
6853 std::find_if. Inline code from match_dll.
6854 (clear_dlls): Adjust to all_dlls type change.
6855 * server.c (emit_dll_description): Remove.
6856 (handle_qxfer_libraries): Adjust to all_dlls type change,
6857 integrate emit_dll_description's functionality.
6858
6859 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6860
6861 * linux-low.h (struct linux_target_ops) <delete_process>: New
6862 field.
6863 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
6864 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
6865 (struct linux_target_ops): Add delete_process callback.
6866 * linux-arm-low.c (arm_delete_process): New.
6867 (struct linux_target_ops): Add delete_process callback.
6868 * linux-bfin-low.c (struct linux_target_ops): Likewise.
6869 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
6870 * linux-m32r-low.c (struct linux_target_ops): Likewise.
6871 * linux-mips-low.c (mips_linux_delete_process): New.
6872 (struct linux_target_ops): Add delete_process callback.
6873 * linux-ppc-low.c (struct linux_target_ops): Likewise.
6874 * linux-s390-low.c (struct linux_target_ops): Likewise.
6875 * linux-sh-low.c (struct linux_target_ops): Likewise.
6876 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
6877 * linux-tile-low.c (struct linux_target_ops): Likewise.
6878 * linux-x86-low.c (x86_linux_delete_process): New.
6879 (struct linux_target_ops): Add delete_process callback.
6880 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
6881
6882 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6883
6884 * linux-aarch64-low.c (the_low_target): Add thread delete
6885 callback.
6886 * linux-arm-low.c (arm_delete_thread): New function.
6887 (the_low_target): Add thread delete callback.
6888 * linux-bfin-low.c (the_low_target): Likewise.
6889 * linux-crisv32-low.c (the_low_target): Likewise.
6890 * linux-low.c (delete_lwp): Invoke delete_thread callback if
6891 set.
6892 * linux-low.h (struct linux_target_ops) <delete_thread>: New
6893 field.
6894 * linux-m32r-low.c (the_low_target): Add thread delete callback.
6895 * linux-mips-low.c (mips_linux_delete_thread): New function.
6896 (the_low_target): Add thread delete callback.
6897 * linux-ppc-low.c (the_low_target): Likewise.
6898 * linux-s390-low.c (the_low_target): Likewise.
6899 * linux-sh-low.c (the_low_target): Likewise.
6900 * linux-tic6x-low.c (the_low_target): Likewise.
6901 * linux-tile-low.c (the_low_target): Likewise.
6902 * linux-x86-low.c (the_low_target): Likewise.
6903 * linux-xtensa-low.c (the_low_target): Likewise.
6904
6905 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
6906
6907 * win32-low.c: Include "common-inferior.h".
6908
6909 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6910
6911 * inferiors.c (set_inferior_cwd): New function.
6912 * server.c (handle_general_set): Handle QSetWorkingDir packet.
6913 (handle_query): Inform that QSetWorkingDir is supported.
6914 * win32-low.c (create_process): Pass the inferior's cwd to
6915 CreateProcess.
6916
6917 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6918
6919 * inferiors.c (current_inferior_cwd): New global variable.
6920 (get_inferior_cwd): New function.
6921 * inferiors.h (struct process_info) <cwd>: New field.
6922
6923 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6924
6925 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
6926 (OBS): Add gdb_tilde_expand.o.
6927
6928 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
6929
6930 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
6931 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
6932
6933 2017-09-29 Pedro Alves <palves@redhat.com>
6934
6935 * ax.c (gdb_parse_agent_expr): Constify.
6936 * ax.h (gdb_parse_agent_expr): Constify.
6937 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6938 Constify.
6939 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
6940 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
6941 * remote-utils.h (read_ptid): Constify.
6942 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
6943 (process_point_options, process_serial_event): Constify.
6944 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
6945 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
6946 (cmd_qtbuffer): Constify.
6947
6948 2017-09-29 Pedro Alves <palves@redhat.com>
6949
6950 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
6951 fails.
6952
6953 2017-09-29 Pedro Alves <palves@redhat.com>
6954
6955 * linux-low.c (handle_extended_wait): Pass parent thread instead
6956 of process to thread_db_notice_clone.
6957 * linux-low.h (thread_db_notice_clone): Replace parent process
6958 parameter with parent thread parameter.
6959 * thread-db.c (find_one_thread): Add comment.
6960 (thread_db_notice_clone): Replace parent process parameter with
6961 parent thread parameter. Temporarily switch to the parent thread.
6962
6963 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
6964
6965 * gdbthread.h: Include "common-gdbthread.h".
6966 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
6967 "if" when validating the ptid.
6968 * remote-utils.c: Include "gdbthread.h".
6969 (prepare_resume_reply): Use "switch_to_thread".
6970 * target.c (done_accessing_memory): Likewise.
6971
6972 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6973
6974 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
6975 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
6976 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
6977 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
6978 s390x-gs-linux64-ipa.o to ipa_obj.
6979 * linux-s390-low.c (HWCAP_S390_GS): New define.
6980 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
6981 New functions.
6982 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
6983 (s390_arch_setup): Check for guarded-storage support and choose
6984 appropriate tdesc.
6985 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
6986 init_registers_s390x_gs_linux64.
6987 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
6988 enum value.
6989 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
6990 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
6991
6992 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
6993
6994 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
6995
6996 2017-09-21 Kevin Buettner <kevinb@redhat.com>
6997
6998 * linux-low.h (struct lwp_info): Add new field, thread_handle.
6999 (thread_db_thread_handle): Declare.
7000 * linux-low.c (linux_target_ops): Initialize thread_handle.
7001 * server.c (handle_qxfer_threads_worker): Add support for
7002 "handle" attribute.
7003 * target.h (struct target_ops): Add new function pointer,
7004 thread_handle.
7005 (target_thread_handle): Define.
7006 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
7007 field in lwp.
7008 (thread_db_thread_handle): New function.
7009
7010 2017-09-21 Kevin Buettner <kevinb@redhat.com>
7011
7012 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
7013 * linux-low.h (thread_db_notice_clone): Declare.
7014 * thread-db.c (thread_db_notice_clone): New function.
7015
7016 2017-09-21 Pedro Alves <palves@redhat.com>
7017
7018 * server.c (gdb_read_memory, handle_status, process_serial_event)
7019 (handle_serial_event, handle_target_event): Adjust to
7020 set_desired_thread prototype change.
7021 * target.c (set_desired_thread): Remove 'use_general' parameter
7022 and adjust.
7023 * target.h (set_desired_thread): Remove 'use_general' parameter.
7024
7025 2017-09-20 Tom Tromey <tom@tromey.com>
7026
7027 * target.c (target_terminal::terminal_state): Define.
7028 (target_terminal::init): Rename from target_terminal_init.
7029 (target_terminal::inferior): Rename from
7030 target_terminal_inferior.
7031 (target_terminal::ours): Rename from target_terminal_ours.
7032 (target_terminal::ours_for_output, target_terminal::info): New.
7033
7034 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7035
7036 * server.c (accumulate_file_name_length): Remove.
7037 (emit_dll_description): Adjust to std::string change.
7038 (handle_qxfer_libraries): Use std::string to hold document.
7039
7040 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7041
7042 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
7043 return type of xml_escape_text.
7044 * server.c (emit_dll_description): Likewise.
7045
7046 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7047
7048 * server.c (captured_main): Accept argument for --selftest.
7049 Update run_tests call.
7050 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
7051 when registering selftests.
7052
7053 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
7054
7055 * regcache.c (get_thread_regcache): Update code to use "std::vector"
7056 instead of "VEC" for "target_desc.reg_defs".
7057 (regcache_cpy): Likewise.
7058 (registers_to_string): Likewise.
7059 (registers_from_string): Likewise.
7060 (find_regno): Likewise.
7061 (supply_regblock): Likewise.
7062 (regcache_raw_read_unsigned): Likewise.
7063 * tdesc.c (init_target_desc): Likewise.
7064 (tdesc_create_reg): Likewise.
7065 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
7066 (struct target_desc) <reg_defs>: Convert to "std::vector".
7067 (target_desc): Do not initialize "reg_defs".
7068 (~target_desc): Update code to use "std::vector" instead of "VEC"
7069 for "target_desc.reg_defs".
7070 (operator==): Likewise.
7071
7072 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7073
7074 * inferiors.h (thread_to_gdb_id): Remove.
7075 * inferiors.c (thread_to_gdb_id): Remove.
7076 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
7077 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
7078 lynx_store_registers, lynx_read_memory, lynx_write_memory):
7079 Likewise.
7080 * nto-low.c (nto_fetch_registers, nto_store_registers,
7081 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
7082
7083 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7084
7085 * inferiors.h (gdb_id_to_thread_id): Remove.
7086 * inferiors.c (gdb_id_to_thread_id): Remove.
7087 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
7088 removal. Move pid declaration closer to where it's used.
7089
7090 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7091
7092 * server.c (handle_detach): New function.
7093 (process_serial_event): Move code out, call handle_detach.
7094
7095 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7096
7097 * server.c (require_running): Rename to ...
7098 (require_running_or_return): ... this ...
7099 (require_running_or_break): ... and this.
7100 (handle_query, process_serial_event): Adjust.
7101
7102 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7103
7104 * linux-low.c (linux_set_resume_request): Remove unused
7105 variables.
7106
7107 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7108
7109 * server.c (first_thread_of): Remove.
7110 (process_serial_event): Replace usage of first_thread_of with
7111 find_any_thread_of_pid.
7112 * tracepoint.c (same_process_p): Remove.
7113 (gdb_agent_about_to_close): Replace usage of same_process_p with
7114 find_any_thread_of_pid.
7115 * linux-x86-low.c (same_process_callback): Remove.
7116 (x86_arch_setup_process_callback): Replace usage of
7117 same_process_callback with find_any_thread_of_pid.
7118 * thread-db.c (any_thread_of): Remove.
7119 (switch_to_process): Replace usage of any_thread_of with
7120 find_any_thread_of_pid.
7121 * inferiors.c (thread_pid_matches_callback): Remove.
7122 (find_thread_process): Adjust to use find_any_thread_of_pid.
7123
7124 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
7125
7126 * regcache.c (get_thread_regcache): Guard calls to "memset"
7127 with "!VEC_empty".
7128
7129 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
7130
7131 * linux-low.c (handle_extended_wait): Use
7132 "allocate_target_description" instead of "XNEW".
7133 * linux-x86-low.c (initialize_low_arch): Likewise.
7134
7135 2017-09-05 Yao Qi <yao.qi@linaro.org>
7136
7137 * configure.srv (srv_i386_regobj): Remove.
7138 (srv_amd64_regobj): Remove.
7139 (srv_regobj): Set it to "" for x86 non-linux targets.
7140 * linux-x86-tdesc.c (i386_linux_read_description):
7141 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
7142 (init_registers_i386): Remove the declaration.
7143 (tdesc_i386): Remove the declaration.
7144 (lynx_i386_arch_setup): Call i386_create_target_description.
7145 * nto-x86-low.c: Likewise.
7146 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
7147 [!__x86_64__]: include arch/i386.h.
7148 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
7149
7150 2017-09-05 Yao Qi <yao.qi@linaro.org>
7151
7152 * configure.srv (srv_amd64_linux_xmlfiles): Remove
7153 i386/amd64-XXX-linux from it.
7154
7155 2017-09-05 Yao Qi <yao.qi@linaro.org>
7156
7157 * configure.srv: Empty srv_amd64_linux_regobj if $development is
7158 false.
7159 (ipa_amd64_linux_regobj): Remove.
7160 (ipa_x32_linux_regobj): Remove.
7161
7162 2017-09-05 Yao Qi <yao.qi@linaro.org>
7163
7164 * Makefile.in (arch-amd64.o): New rule.
7165 * configure.srv: Append arch-amd64.o.
7166 * linux-amd64-ipa.c: Include common/x86-xstate.h.
7167 (get_ipa_tdesc): Call amd64_linux_read_description.
7168 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
7169 and init_registers_amd64_XXX.
7170 * linux-x86-low.c (x86_linux_read_description): Call
7171 amd64_linux_read_description.
7172 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
7173 (initialize_low_arch): Don't call init_registers_x32_XXX and
7174 init_registers_amd64_XXX.
7175 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
7176 and tdesc_amd64_XXX.
7177 [__x86_64__] (amd64_tdesc_test): New function.
7178 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
7179 and init_registers_amd64_XXX.
7180 * linux-x86-tdesc.c: Include arch/amd64.h.
7181 (xcr0_to_tdesc_idx): New function.
7182 (i386_linux_read_description): New function.
7183 (amd64_get_ipa_tdesc_idx): New function.
7184 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
7185 (amd64_get_ipa_tdesc): Declare.
7186
7187 2017-09-05 Yao Qi <yao.qi@linaro.org>
7188
7189 * configure.srv (srv_i386_linux_xmlfiles): Remove
7190 i386/i386-XXX-linux.xml from it.
7191
7192 2017-09-05 Yao Qi <yao.qi@linaro.org>
7193
7194 * configure.srv: Set srv_i386_linux_regobj empty if $development
7195 is false.
7196 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
7197 initialize_low_tdesc.
7198 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
7199 with #if initialize_low_tdesc.
7200 * linux-x86-tdesc-selftest.c: New file.
7201 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
7202
7203 2017-09-05 Yao Qi <yao.qi@linaro.org>
7204
7205 * Makefile.in (arch-i386.o): New rule.
7206 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
7207 (x86_64-*-linux*): Likewise.
7208 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
7209 include arch/i386.h.
7210 (i386_linux_read_description): Remove code and call
7211 i386_create_target_description.
7212 * tdesc.c (allocate_target_description): New function.
7213 * tdesc.h (set_tdesc_architecture): Remove declaration.
7214 (set_tdesc_osabi): Likewise.
7215
7216 2017-09-05 Yao Qi <yao.qi@linaro.org>
7217
7218 * linux-x86-tdesc.c: Don't include <inttypes.h>.
7219 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
7220 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
7221 .xmltarget.
7222 * server.c (get_features_xml): Call tdesc_get_features_xml.
7223 * tdesc.c (set_tdesc_architecture): New function.
7224 (set_tdesc_osabi): New function.
7225 (tdesc_get_features_xml): New function.
7226 (tdesc_create_feature): Add an argument.
7227 * tdesc.h (struct target_desc) <features>: New field.
7228 <arch, osabi>: New field.
7229 (~target_desc): xfree features, arch, and osabi.
7230 (target_desc::oerator==): Don't compare .xmltarget.
7231 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
7232 (set_tdesc_osabi): Likewise.
7233 (tdesc_get_features_xml): Likewise.
7234
7235 2017-09-05 Yao Qi <yao.qi@linaro.org>
7236
7237 * linux-x86-tdesc.c: Include selftest.h.
7238 (i386_tdesc_test): New function.
7239 (initialize_low_tdesc): Call selftests::register_test.
7240 * tdesc.h: Include regdef.h.
7241 (target_desc): Override operator == and !=.
7242
7243 2017-09-05 Yao Qi <yao.qi@linaro.org>
7244
7245 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
7246 (ipa_obj): Likewise.
7247 * linux-i386-ipa.c: Include common/x86-xstate.h
7248 (get_ipa_tdesc): Call i386_linux_read_description.
7249 (initialize_low_tracepoint): Don't call init_registers_XXX
7250 functions, call initialize_low_tdesc instead.
7251 * linux-x86-low.c (x86_linux_read_description): Call
7252 i386_linux_read_description.
7253 (initialize_low_arch): Don't call init_registers_i386_XXX
7254 functions, call initialize_low_tdesc.
7255 * linux-x86-tdesc.c: New file.
7256 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
7257 (i386_get_ipa_tdesc_idx): Declare.
7258 (i386_get_ipa_tdesc): Declare.
7259 (initialize_low_tdesc): Declare.
7260
7261 2017-09-05 Yao Qi <yao.qi@linaro.org>
7262
7263 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
7264 instead of 0.
7265
7266 2017-09-05 Yao Qi <yao.qi@linaro.org>
7267
7268 * Makefile.in (IPA_OBJS): Add vec-ipa.o
7269 * regcache.c (get_thread_regcache): Use VEC_length.
7270 (init_register_cache): Likewise.
7271 (regcache_cpy): Likewise.
7272 (registers_to_string): Iterate reg_defs via VEC_iterate.
7273 (find_regno): Likewise.
7274 (find_register_by_number): Use VEC_index.
7275 (register_size): Call find_register_by_number.
7276 (register_data): Call find_register_by_number.
7277 (supply_regblock): Use VEC_length.
7278 (regcache_raw_read_unsigned): Likewise.
7279 * tdesc.c (init_target_desc): Iterate reg_defs via
7280 VEC_iterate.
7281 (default_description): Update initializer.
7282 (copy_target_description): Don't update field num_registers.
7283 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
7284 <num_registers>: Remove.
7285
7286 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7287
7288 * Makefile.in (.SECONDARY): Define target.
7289
7290 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
7291
7292 * linux-low.c (linux_wait_1): Adjust.
7293 * server.c (queue_stop_reply_callback): Adjust.
7294
7295 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7296
7297 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
7298 QEnvironmentUnset and QEnvironmentReset packets.
7299 (handle_query): Inform remote that QEnvironmentHexEncoded,
7300 QEnvironmentUnset and QEnvironmentReset are supported.
7301
7302 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
7303
7304 * inferiors.h (inferior_target_data): Rename to ...
7305 (thread_target_data): ... this.
7306 (inferior_regcache_data): Rename to ...
7307 (thread_regcache_data): ... this.
7308 (set_inferior_regcache_data): Rename to ...
7309 (set_thread_regcache_data): ... this.
7310 * inferiors.c (inferior_target_data): Rename to ...
7311 (thread_target_data): ... this.
7312 (inferior_regcache_data): Rename to ...
7313 (thread_regcache_data): ... this.
7314 (set_inferior_regcache_data): Rename to ...
7315 (set_thread_regcache_data): ... this.
7316 (free_one_thread): Update.
7317 * linux-low.h (get_thread_lwp): Update.
7318 * regcache.c (get_thread_regcache): Update.
7319 (regcache_invalidate_thread): Update.
7320 (free_register_cache_thread): Update.
7321 * win32-i386-low.c (update_debug_registers_callback): Update.
7322 (win32_get_current_dr): Update.
7323 * win32-low.c (thread_rec): Update.
7324 (delete_thread_info): Update.
7325 (continue_one_thread): Update.
7326 (suspend_one_thread): Update.
7327
7328 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
7329
7330 * inferiors.c (set_inferior_target_data): Remove.
7331 * inferiors.h (set_inferior_target_data): Remove.
7332
7333 2017-08-18 Yao Qi <yao.qi@linaro.org>
7334
7335 * Makefile.in (OBS): Add selftest.o.
7336 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
7337 * configure, config.in: Re-generated.
7338 * server.c: Include common/sefltest.h.
7339 (captured_main): Handle option --selftest.
7340
7341 2017-08-09 Yao Qi <yao.qi@linaro.org>
7342
7343 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
7344 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
7345 i386-avx-mpx.o and i386-mmx.o.
7346 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
7347 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
7348 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
7349 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
7350 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
7351 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
7352 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
7353 i386/amd64-avx-mpx.xml.
7354
7355 2017-08-09 Yao Qi <yao.qi@linaro.org>
7356
7357 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
7358 and x32-avx-avx512.o.
7359 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
7360 i386/x32-avx-avx512.xml.
7361
7362 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
7363
7364 * tracepoint.h (enum class fast_tpoint_collect_result): New
7365 enumeration.
7366 (fast_tracepoint_collecting): Change return type to
7367 fast_tpoint_collect_result.
7368 * tracepoint.c (fast_tracepoint_collecting): Likewise.
7369 * linux-low.h: Include tracepoint.h.
7370 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
7371 fast_tpoint_collect_result.
7372 * linux-low.c (handle_tracepoints): Adjust.
7373 (linux_fast_tracepoint_collecting): Change return type to
7374 fast_tpoint_collect_result.
7375 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
7376 linux_wait_1, stuck_in_jump_pad_callback,
7377 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
7378 proceed_one_lwp): Adjust to type change.
7379
7380 2017-07-10 Yao Qi <yao.qi@linaro.org>
7381
7382 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
7383
7384 2017-06-29 Yao Qi <yao.qi@linaro.org>
7385
7386 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
7387 Remove.
7388 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
7389
7390 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
7391
7392 * Makefile.in (IPA_OBJS): Sort and format one item per line.
7393
7394 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
7395
7396 * linux-low.c (linux_create_inferior): Adjust code to access the
7397 environment information via 'gdb_environ' class.
7398 * lynx-low.c (lynx_create_inferior): Likewise.
7399 * server.c (our_environ): Make it an instance of 'gdb_environ'.
7400 (get_environ): Return a pointer to 'our_environ'.
7401 (captured_main): Initialize 'our_environ'.
7402 * server.h (get_environ): Adjust prototype.
7403 * spu-low.c (spu_create_inferior): Adjust code to access the
7404 environment information via 'gdb_environ' class.
7405
7406 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7407
7408 * linux-low.c (linux_read_memory, linux_write_memory): Remove
7409 usage of "register" keyword.
7410
7411 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7412
7413 * configure: Re-generate.
7414
7415 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7416
7417 * configure: Re-generate.
7418
7419 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7420
7421 * Makefile.in (COMPILE.pre): Add "-x c++".
7422
7423 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
7424
7425 * fork-child.c: Conditionally include <signal.h>.
7426
7427 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7428
7429 * server.c (handle_general_set): Handle new packet
7430 "QStartupWithShell".
7431 (handle_query): Add "QStartupWithShell" to the list of supported
7432 packets.
7433 (gdbserver_usage): Add help text explaining the
7434 new "--startup-with-shell" and "--no-startup-with-shell" CLI
7435 options.
7436 (captured_main): Recognize and act upon the presence of the new
7437 CLI options.
7438
7439 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7440 Pedro Alves <palves@redhat.com>
7441
7442 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
7443 * configure: Regenerate.
7444 * configure.srv (srv_linux_obj): Add "fork-child.o" and
7445 "fork-inferior.o".
7446 (i[34567]86-*-lynxos*): Likewise.
7447 (spu*-*-*): Likewise.
7448 * fork-child.c: New file.
7449 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
7450 and "environ.h".
7451 (linux_ptrace_fun): New function.
7452 (linux_create_inferior): Adjust function prototype to reflect
7453 change on "target.h". Adjust function code to use
7454 "fork_inferior".
7455 (linux_request_interrupt): Delete "signal_pid".
7456 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7457 (lynx_ptrace_fun): New function.
7458 (lynx_create_inferior): Adjust function prototype to reflect
7459 change on "target.h". Adjust function code to use
7460 "fork_inferior".
7461 * nto-low.c (nto_create_inferior): Adjust function prototype and
7462 code to reflect change on "target.h". Update comments.
7463 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
7464 "common-terminal.h" and "environ.h".
7465 (terminal_fd): Moved to fork-child.c.
7466 (old_foreground_pgrp): Likewise.
7467 (restore_old_foreground_pgrp): Likewise.
7468 (last_status): Make it global.
7469 (last_ptid): Likewise.
7470 (our_environ): New variable.
7471 (startup_with_shell): Likewise.
7472 (program_name): Likewise.
7473 (program_argv): Rename to...
7474 (program_args): ...this.
7475 (wrapper_argv): New variable.
7476 (start_inferior): Delete function.
7477 (get_exec_wrapper): New function.
7478 (get_exec_file): Likewise.
7479 (get_environ): Likewise.
7480 (prefork_hook): Likewise.
7481 (post_fork_inferior): Likewise.
7482 (postfork_hook): Likewise.
7483 (postfork_child_hook): Likewise.
7484 (handle_v_run): Update code to deal with arguments coming from the
7485 remote host. Update calls from "start_inferior" to
7486 "create_inferior".
7487 (captured_main): Likewise. Initialize environment variable. Call
7488 "have_job_control".
7489 * server.h (post_fork_inferior): New prototype.
7490 (get_environ): Likewise.
7491 (last_status): Declare.
7492 (last_ptid): Likewise.
7493 (signal_pid): Likewise.
7494 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7495 (spu_ptrace_fun): New function.
7496 (spu_create_inferior): Adjust function prototype to reflect change
7497 on "target.h". Adjust function code to use "fork_inferior".
7498 * target.c (target_terminal_init): New function.
7499 (target_terminal_inferior): Likewise.
7500 (target_terminal_ours): Likewise.
7501 * target.h: Include <vector>.
7502 (struct target_ops) <create_inferior>: Update prototype.
7503 (create_inferior): Update macro.
7504 * utils.c (gdb_flush_out_err): New function.
7505 * win32-low.c (win32_create_inferior): Adjust function prototype
7506 and code to reflect change on "target.h".
7507
7508 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7509
7510 * inferiors.c (switch_to_thread): New function.
7511
7512 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7513
7514 * Makefile.in (SFILE): Add "common/job-control.c".
7515 (OBS): Add "job-control.o".
7516
7517 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
7518
7519 * Makefile: Remove "@host_makefile_frag@".
7520
7521 2017-05-05 Pedro Alves <palves@redhat.com>
7522
7523 * configure: Regenerate.
7524
7525 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
7526
7527 * configure: Regenerate.
7528
7529 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7530
7531 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
7532 software_single_step change of return type to
7533 std::vector<CORE_ADDR>.
7534 * linux-low.c (install_software_single_step_breakpoints):
7535 Likewise.
7536 * linux-low.h (install_software_single_step_breakpoints):
7537 Likewise.
7538
7539 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7540
7541 * remote-utils.c: Include "gdb_termios.h" instead of
7542 "terminal.h".
7543 * terminal.h: Delete file.
7544
7545 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7546
7547 * server.c: Include <vector>.
7548 <program_argv, wrapper_argv>: Convert to std::vector.
7549 (start_inferior): Rewrite function to use C++.
7550 (handle_v_run): Likewise. Update code that calculates the argv
7551 based on the vRun packet; use C++.
7552 (captured_main): Likewise.
7553
7554 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7555
7556 * server.c (handle_v_cont): Initialize thread_resume::thread
7557 with null_ptid.
7558
7559 2017-04-05 Pedro Alves <palves@redhat.com>
7560
7561 * configure: Regenerate.
7562
7563 2017-04-05 Pedro Alves <palves@redhat.com>
7564
7565 * gdbreplay.c (sync_error): Constify.
7566 * linux-x86-low.c (push_opcode): Constify.
7567
7568 2017-04-05 Pedro Alves <palves@redhat.com>
7569
7570 * win32-low.c (get_child_debug_event)
7571 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
7572 Report TARGET_WAITKIND_SPURIOUS instead.
7573
7574 2017-04-05 Pedro Alves <palves@redhat.com>
7575
7576 * remote-utils.c (remote_prepare, remote_open): Constify.
7577 * remote-utils.h (remote_prepare, remote_open): Constify.
7578 * server.c (captured_main): Constify 'port' handling.
7579
7580 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
7581
7582 * Makefile.in (clean): Clear .deps.
7583
7584 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
7585
7586 * .gitignore: Remove generated files, replace with wildcard.
7587 * (clean): Replace removal of generated files with wildcard.
7588 (version.c): Replace with...
7589 (version-generated.c): ...this.
7590 (xml-builtin.c): Replace with...
7591 (xml-builtin-generated.c): ...this.
7592 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
7593 (%.c: *regformats*): Replace with...
7594 (%-generated.c: *regformats*): ...this.
7595
7596 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7597
7598 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
7599 (xtensa_fill_gregset): Call collect_register_by_name for
7600 threadptr register.
7601 (xtensa_store_gregset): Call supply_register_by_name for
7602 threadptr register.
7603
7604 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7605
7606 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
7607 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
7608 (xtensa_store_gregset): Call supply_register for all registers in
7609 a0_regnum..a0_regnum + C0_NREGS range.
7610
7611 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7612
7613 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
7614 (ax-ipa.o: ax.c): Remove.
7615 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
7616 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
7617 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
7618 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
7619 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
7620
7621 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7622
7623 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
7624 (print-utils-ipa.o: ../common/print-utils.c): Remove.
7625 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
7626 (errors-ipa.o: ../common/errors.c): Remove.
7627 (format-ipa.o: ../common/format.c): Remove.
7628 (common-utils-ipa.o: ../common/common-utils.c): Remove.
7629
7630 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7631
7632 * Makefile.in (%-ipa.o: %.c): New rule.
7633 (tracepoint-ipa.o: tracepoint.c): Remove.
7634 (utils-ipa.o: utils.c): Remove.
7635 (remote-utils-ipa.o: remote-utils.c): Remove.
7636 (regcache-ipa.o: regcache.c): Remove.
7637 (i386-linux-ipa.o: i386-linux.c): Remove.
7638 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
7639 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
7640 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
7641 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
7642 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
7643 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
7644 (amd64-linux-ipa.o: amd64-linux.c): Remove.
7645 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
7646 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
7647 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
7648 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
7649 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
7650 (aarch64-ipa.o: aarch64.c): Remove.
7651 (s390-linux32-ipa.o: s390-linux32.c): Remove.
7652 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
7653 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
7654 (s390-linux64-ipa.o: s390-linux64.c): Remove.
7655 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
7656 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
7657 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
7658 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
7659 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
7660 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
7661 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
7662 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
7663 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
7664 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
7665 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
7666 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
7667 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
7668 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
7669 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
7670 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
7671 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
7672 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
7673 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
7674 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
7675 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
7676 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
7677 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
7678 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
7679 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
7680 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
7681 (tdesc-ipa.o: tdesc.c): Remove.
7682 (x32-linux-ipa.o: x32-linux.c): Remove.
7683 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
7684 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
7685
7686 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7687
7688 * Makefile.in (%.o: ../arch/%.c): New rule.
7689 (arm.o: ../arch/arm.c): Remove.
7690 (arm-linux.o: ../arch/arm-linux.c): Remove.
7691 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
7692 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
7693
7694 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7695
7696 * Makefile.in (%.o: ../nat/%.c): New rule.
7697 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
7698 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
7699 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
7700 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
7701 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
7702 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
7703 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
7704 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
7705 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
7706 (linux-personality.o: ../nat/linux-personality.c): Remove.
7707 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
7708 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
7709 (x86-linux.o: ../nat/x86-linux.c): Remove.
7710 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
7711 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
7712
7713 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7714
7715 * Makefile.in (%.o: ../common/%.c): New rule.
7716 (signals.o: ../common/signals.c): Remove.
7717 (print-utils.o: ../common/print-utils.c): Remove.
7718 (rsp-low.o: ../common/rsp-low.c): Remove.
7719 (common-utils.o: ../common/common-utils.c): Remove.
7720 (posix-strerror.o: ../common/posix-strerror.c): Remove.
7721 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
7722 (vec.o: ../common/vec.c): Remove.
7723 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
7724 (xml-utils.o: ../common/xml-utils.c): Remove.
7725 (ptid.o: ../common/ptid.c): Remove.
7726 (buffer.o: ../common/buffer.c): Remove.
7727 (format.o: ../common/format.c): Remove.
7728 (filestuff.o: ../common/filestuff.c): Remove.
7729 (agent.o: ../common/agent.c): Remove.
7730 (errors.o: ../common/errors.c): Remove.
7731 (environ.o: ../common/environ.c): Remove.
7732 (common-debug.o: ../common/common-debug.c): Remove.
7733 (cleanups.o: ../common/cleanups.c): Remove.
7734 (common-exceptions.o: ../common/common-exceptions.c): Remove.
7735 (fileio.o: ../common/fileio.c): Remove.
7736 (common-regcache.o: ../common/common-regcache.c): Remove.
7737 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
7738 (new-op.o: ../common/new-op.c): Remove.
7739 (btrace-common.o: ../common/btrace-common.c): Remove.
7740
7741 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7742
7743 * Makefile.in (%.o: ../target/%.c): New rule.
7744 (waitstatus.o: ../target/waitstatus.c): Remove.
7745
7746 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7747
7748 * Makefile.in
7749 (%.c: ../regformats/%.dat,
7750 (%.c: ../regformats/arm/%.dat,
7751 (%.c: ../regformats/i386/%.dat,
7752 (%.c: ../regformats/rs6000/%.dat): New rules.
7753 (aarch64.c): Remove.
7754 (reg-arm.c): Remove.
7755 (arm-with-iwmmxt.c): Remove.
7756 (arm-with-vfpv2.c): Remove.
7757 (arm-with-vfpv3.c): Remove.
7758 (arm-with-neon.c): Remove.
7759 (reg-bfin.c): Remove.
7760 (reg-cris.c): Remove.
7761 (reg-crisv32.c): Remove.
7762 (i386.c): Remove.
7763 (i386-linux.c): Remove.
7764 (i386-avx.c): Remove.
7765 (i386-avx-linux.c): Remove.
7766 (i386-avx-avx512.c): Remove.
7767 (i386-avx-avx512-linux.c): Remove.
7768 (i386-mpx.c): Remove.
7769 (i386-mpx-linux.c): Remove.
7770 (i386-avx-mpx-avx512-pku.c): Remove.
7771 (i386-avx-mpx-avx512-pku-linux.c): Remove.
7772 (i386-avx-mpx.c): Remove.
7773 (i386-avx-mpx-linux.c): Remove.
7774 (i386-mmx.c): Remove.
7775 (i386-mmx-linux.c): Remove.
7776 (reg-ia64.c): Remove.
7777 (reg-m32r.c): Remove.
7778 (reg-m68k.c): Remove.
7779 (reg-cf.c): Remove.
7780 (mips-linux.c): Remove.
7781 (mips-dsp-linux.c): Remove.
7782 (mips64-linux.c): Remove.
7783 (mips64-dsp-linux.c): Remove.
7784 (nios2-linux.c): Remove.
7785 (powerpc-32.c): Remove.
7786 (powerpc-32l.c): Remove.
7787 (powerpc-altivec32l.c): Remove.
7788 (powerpc-cell32l.c): Remove.
7789 (powerpc-vsx32l.c): Remove.
7790 (powerpc-isa205-32l.c): Remove.
7791 (powerpc-isa205-altivec32l.c): Remove.
7792 (powerpc-isa205-vsx32l.c): Remove.
7793 (powerpc-e500l.c): Remove.
7794 (powerpc-64l.c): Remove.
7795 (powerpc-altivec64l.c): Remove.
7796 (powerpc-cell64l.c): Remove.
7797 (powerpc-vsx64l.c): Remove.
7798 (powerpc-isa205-64l.c): Remove.
7799 (powerpc-isa205-altivec64l.c): Remove.
7800 (powerpc-isa205-vsx64l.c): Remove.
7801 (s390-linux32.c): Remove.
7802 (s390-linux32v1.c): Remove.
7803 (s390-linux32v2.c): Remove.
7804 (s390-linux64.c): Remove.
7805 (s390-linux64v1.c): Remove.
7806 (s390-linux64v2.c): Remove.
7807 (s390-te-linux64.c): Remove.
7808 (s390-vx-linux64.c): Remove.
7809 (s390-tevx-linux64.c): Remove.
7810 (s390x-linux64.c): Remove.
7811 (s390x-linux64v1.c): Remove.
7812 (s390x-linux64v2.c): Remove.
7813 (s390x-te-linux64.c): Remove.
7814 (s390x-vx-linux64.c): Remove.
7815 (s390x-tevx-linux64.c): Remove.
7816 (tic6x-c64xp-linux.c): Remove.
7817 (tic6x-c64x-linux.c): Remove.
7818 (tic6x-c62x-linux.c): Remove.
7819 (reg-sh.c): Remove.
7820 (reg-sparc64.c): Remove.
7821 (reg-spu.c): Remove.
7822 (amd64.c): Remove.
7823 (amd64-linux.c): Remove.
7824 (amd64-avx.c): Remove.
7825 (amd64-avx-linux.c): Remove.
7826 (amd64-avx-avx512.c): Remove.
7827 (amd64-avx-avx512-linux.c): Remove.
7828 (amd64-mpx.c): Remove.
7829 (amd64-mpx-linux.c): Remove.
7830 (amd64-avx-mpx-avx512-pku.c): Remove.
7831 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
7832 (amd64-avx-mpx.c): Remove.
7833 (amd64-avx-mpx-linux.c): Remove.
7834 (x32.c): Remove.
7835 (x32-linux.c): Remove.
7836 (x32-avx.c): Remove.
7837 (x32-avx-linux.c): Remove.
7838 (x32-avx-avx512.c): Remove.
7839 (x32-avx-avx512-linux.c): Remove.
7840 (reg-xtensa.c): Remove.
7841 (reg-tilegx.c): Remove.
7842 (reg-tilegx32.c): Remove.
7843
7844 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
7845
7846 * Makefile.in (SFILES): Add "common/environ.c".
7847 (OBJS): Add "common/environ.h".
7848
7849 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
7850
7851 * configure.ac: Check if the fs_base and gs_base members of
7852 `struct user_regs_struct' exist.
7853 * config.in: Regenerated.
7854 * configure: Likewise.
7855
7856 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
7857
7858 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
7859 target_read_memory.
7860 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
7861 (get_next_pcs_syscall_next_pc): Likewise.
7862
7863 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
7864
7865 * win32-i386-low.c: Fix incorrect reference to a couple source files.
7866 * nto-x86-low.c: Likewise.
7867
7868 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
7869
7870 * Makefile.in: Include disable-implicit-rules.mk.
7871
7872 2016-11-23 Pedro Alves <palves@redhat.com>
7873
7874 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
7875 (debug_vprintf): Use std::chrono::steady_clock instead of
7876 gettimeofday. Use '.' instead of ':'.
7877 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
7878 (get_timestamp): Use std::chrono::steady_clock instead of
7879 gettimeofday.
7880
7881 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7882
7883 * Makefile.in: Fix whitespace formatting.
7884
7885 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7886
7887 * Makefile.in (SFILES, OBS): Flatten list and order
7888 alphabetically.
7889
7890 2016-11-23 Pedro Alves <palves@redhat.com>
7891
7892 * event-loop.c (handle_file_event): Use warning.
7893 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
7894 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7895 Use warning.
7896
7897 2016-11-23 Pedro Alves <palves@redhat.com>
7898
7899 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
7900 output.
7901 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
7902 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
7903 debug_printf and debug_flush for debug output.
7904 * server.c (handle_general_set): Likewise.
7905 * thread-db.c (try_thread_db_load): Use debug_printf for debug
7906 output.
7907
7908 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7909
7910 * Makefile.in (.c.o): Replace rule with ...
7911 (%.o: %.c): ... this one.
7912
7913 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7914
7915 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
7916 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
7917 make.
7918 * configure.ac: Remove checks for the make program.
7919 * configure: Re-generate.
7920
7921 2016-10-28 Pedro Alves <palves@redhat.com>
7922
7923 * Makefile.in (CXX_DIALECT): Get from configure.
7924 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
7925 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
7926 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
7927 * config.in: Regenerate.
7928 * configure: Regenerate.
7929
7930 2016-10-27 Yao Qi <yao.qi@linaro.org>
7931
7932 * linux-low.c (linux_supports_range_stepping): Return true if
7933 can_software_single_step return true.
7934
7935 2016-10-27 Yao Qi <yao.qi@linaro.org>
7936
7937 * inferiors.c (find_inferior_in_random): New function.
7938 * inferiors.h (find_inferior_in_random): Declare.
7939 * linux-low.c (linux_wait_for_event_filtered): Call
7940 find_inferior_in_random instead of find_inferior.
7941
7942 2016-10-27 Yao Qi <yao.qi@linaro.org>
7943
7944 * linux-low.c (linux_wait_1): If single-step breakpoints are
7945 inserted, remove them.
7946
7947 2016-10-26 Pedro Alves <palves@redhat.com>
7948
7949 * linux-low.c (handle_extended_wait): Link parent/child fork
7950 threads.
7951 (linux_wait_1): Unlink them.
7952 (linux_set_resume_request): Ignore resume requests for
7953 already-resumed and unhandled fork child threads.
7954 * linux-low.h (struct lwp_info) <fork_relative>: New field.
7955 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
7956 New functions.
7957 (handle_v_requests) <vCont>: Don't call require_running.
7958 * server.h (in_queued_stop_replies): New declaration.
7959
7960 2016-10-24 Yao Qi <yao.qi@linaro.org>
7961
7962 PR server/20733
7963 * linux-aarch64-low.c (append_insns): Cast the return value to
7964 'uint32_t *'.
7965
7966 2016-10-10 Yao Qi <yao.qi@linaro.org>
7967
7968 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
7969
7970 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
7971
7972 * target.c (target_supports_multi_process): New function, moved
7973 from...
7974 * target.h (target_supports_multi_process): ... here. Remove
7975 macro.
7976
7977 2016-10-05 Tom Tromey <tom@tromey.com>
7978
7979 PR remote/20655:
7980 * tracepoint.c (handle_tracepoint_bkpts): Check
7981 ipa_error_tracepoint, not ipa_stopping_tracepoint.
7982
7983 2016-10-05 Yao Qi <yao.qi@linaro.org>
7984
7985 * configure.srv: Update the path of arm-*.xml files.
7986
7987 2016-10-05 Terry Guo <terry.guo@arm.com>
7988 Yao Qi <yao.qi@linaro.org>
7989
7990 * Makefile.in: Adjust the path of rules.
7991 * configure.srv: Update the path of xml files.
7992 * regformats/arm-with-iwmmxt.dat: Regenerated.
7993 * regformats/arm-with-neon.dat: Likewise.
7994 * regformats/arm-with-vfpv2.dat: Likewise.
7995 * regformats/arm-with-vfpv3.dat Likewise.
7996
7997 2016-09-30 Yao Qi <yao.qi@linaro.org>
7998
7999 PR gdbserver/20627
8000 * target.c (target_stop_and_wait): Don't call
8001 target_continue_no_signal, use resume_stop instead.
8002
8003 2016-09-26 Yao Qi <yao.qi@linaro.org>
8004
8005 * linux-low.c (linux_wait_1): Call debug_exit.
8006
8007 2016-09-23 Pedro Alves <palves@redhat.com>
8008
8009 * Makefile.in (SFILES): Add common/new-op.c.
8010 (OBS): Add common/new-op.o.
8011 (new-op.o): New rule.
8012
8013 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
8014
8015 * .gitinore: Ignore more files.
8016
8017 2016-09-21 Yao Qi <yao.qi@linaro.org>
8018
8019 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
8020 23.
8021
8022 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
8023
8024 * server.c (start_inferior): Call target_mourn_inferior instead of
8025 mourn_inferior; pass ptid_t argument to it.
8026 (resume): Likewise.
8027 (handle_target_event): Likewise.
8028 * target.c (target_mourn_inferior): New function.
8029 * target.h (mourn_inferior): Delete macro.
8030
8031 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
8032
8033 * linux-low.c (lwp_is_stepping): New function.
8034
8035 2016-09-06 Carl Love <cel@us.ibm.com>
8036
8037 * server.c (start_inferior): Fixed comment, requested comment change
8038 didn't get updated correctly. Removed reference to ptrace () call as
8039 it is only true on Linux systems.
8040
8041 2016-09-06 Carl Love <cel@us.ibm.com>
8042
8043 * server.c (start_inferior): Do not call
8044 function target_post_create_inferior () if the
8045 inferior process has already exited.
8046
8047 2016-09-05 Pedro Alves <palves@redhat.com>
8048
8049 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
8050 (COMPILE.pre, CC_LD): Use CXX directly.
8051 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
8052 * acinclude.m4: Don't include build-with-cxx.m4.
8053 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
8054 * configure: Regenerate.
8055
8056 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
8057
8058 PR gdb/19495
8059 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
8060 call writing data to own_buf.
8061
8062 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
8063
8064 * target.c (mywait): Call target_wait instead of
8065 the_target->wait.
8066 (target_wait): New function.
8067
8068 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
8069
8070 * server.c (start_inferior): New variable 'ptid'. Replace calls
8071 to the_target->resume by target_continue{,_no_signal}, depending
8072 on the case.
8073 * target.c (target_stop_and_wait): Call target_continue_no_signal
8074 instead of the_target->resume.
8075 (target_continue): New function.
8076
8077 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
8078
8079 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
8080
8081 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
8082
8083 PR server/20491
8084 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
8085 ps_prochandle.
8086 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
8087 * linux-arm-low.c (ps_get_thread_area): Likewise.
8088 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
8089 * linux-m68k-low.c (ps_get_thread_area): Likewise.
8090 * linux-mips-low.c (ps_get_thread_area): Likewise.
8091 * linux-nios2-low.c (ps_get_thread_area): Likewise.
8092 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
8093 * linux-x86-low.c (ps_get_thread_area): Likewise.
8094 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
8095
8096 2016-08-19 Pedro Alves <palves@redhat.com>
8097
8098 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
8099
8100 2016-08-19 Pedro Alves <palves@redhat.com>
8101
8102 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
8103 comment. Use memcpy instead of casting through unsigned long.
8104
8105 2016-08-19 Pedro Alves <palves@redhat.com>
8106
8107 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
8108 allocating around 0x80000000.
8109
8110 2016-08-19 Pedro Alves <palves@redhat.com>
8111
8112 PR gdb/20415
8113 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
8114 (x32-avx512-linux-ipa.o): New rules.
8115 * configure.ac (x86_64-*-linux*): New x32 check.
8116 * configure.srv (ipa_x32_linux_regobj): New.
8117 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
8118 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
8119 descriptions.
8120 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
8121 descriptions.
8122 * configure: Regenerate.
8123
8124 2016-08-09 Pedro Alves <palves@redhat.com>
8125
8126 PR gdb/18653
8127 * Makefile.in (OBS): Add signals-state-save-restore.o.
8128 (signals-state-save-restore.o): New rule.
8129 * config.in: Regenerate.
8130 * configure: Regenerate.
8131 * linux-low.c: Include "signals-state-save-restore.h".
8132 (linux_create_inferior): Call
8133 restore_original_signals_state.
8134 * server.c: Include "dispositions-save-restore.h".
8135 (captured_main): Call save_original_signals_state.
8136
8137 2016-08-05 Pedro Alves <palves@redhat.com>
8138
8139 * configure: Regenerate.
8140
8141 2016-08-04 Yao Qi <yao.qi@linaro.org>
8142
8143 * linux-low.c (regsets_fetch_inferior_registers): Check
8144 errno is ESRCH or not.
8145
8146 2016-08-02 Yao Qi <yao.qi@linaro.org>
8147
8148 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
8149 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
8150 (thread_db_load_search): Update.
8151 (try_thread_db_load_1): Don't look for td_ta_event_addr,
8152 td_ta_set_event and td_ta_event_getmsg.
8153
8154 2016-07-26 Pedro Alves <palves@redhat.com>
8155
8156 PR server/20414
8157 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
8158 of unsigned long for 64-bit registers and use uint32_t instead of
8159 unsigned int for 32-bit registers.
8160
8161 2016-07-26 Pedro Alves <palves@redhat.com>
8162
8163 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
8164 to 'ptrace'.
8165
8166 2016-07-21 Tom Tromey <tom@tromey.com>
8167
8168 * configure: Rebuild.
8169
8170 2016-07-21 Yao Qi <yao.qi@linaro.org>
8171
8172 * mem-break.c (find_gdb_breakpoint): Cast bp to
8173 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
8174
8175 2016-07-21 Yao Qi <yao.qi@linaro.org>
8176
8177 * server.c (handle_v_requests): Support s and S actions
8178 if target_supports_software_single_step return true.
8179
8180 2016-07-21 Yao Qi <yao.qi@linaro.org>
8181
8182 * linux-low.c (resume_stopped_resumed_lwps): If resume request
8183 is resume_step, call maybe_hw_step.
8184 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
8185 and unstop them.
8186 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
8187 breakpoints or not.
8188 (proceed_one_lwp): If resume request is resume_step, install
8189 reinsert breakpoints and call maybe_hw_step.
8190
8191 2016-07-21 Yao Qi <yao.qi@linaro.org>
8192
8193 * linux-low.c (proceed_one_lwp): Declare.
8194 (linux_resume_one_thread): Remove local variable 'step'.
8195 Lift code enqueue signal. Call proceed_one_lwp instead of
8196 linux_resume_one_lwp.
8197
8198 2016-07-21 Yao Qi <yao.qi@linaro.org>
8199
8200 * linux-low.c (linux_resume_one_thread): Call
8201 enqueue_pending_signal.
8202
8203 2016-07-21 Yao Qi <yao.qi@linaro.org>
8204
8205 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
8206 * inferiors.c (do_restore_current_thread_cleanup): New function.
8207 (make_cleanup_restore_current_thread): Likewise.
8208 * linux-low.c (install_software_single_step_breakpoints): Call
8209 make_cleanup_restore_current_thread. Switch current_thread to
8210 thread.
8211
8212 2016-07-21 Yao Qi <yao.qi@linaro.org>
8213
8214 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
8215 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
8216 (clone_one_breakpoint): Likewise.
8217 (delete_reinsert_breakpoints): Change parameter to thread.
8218 Callers updated.
8219 (has_reinsert_breakpoints): Likewise.
8220 (uninsert_reinsert_breakpoints): Likewise.
8221 (reinsert_reinsert_breakpoints): Likewise.
8222 * mem-break.h (set_reinsert_breakpoint): Update declaration.
8223 (delete_reinsert_breakpoints): Likewise.
8224 (reinsert_reinsert_breakpoints): Likewise.
8225 (uninsert_reinsert_breakpoints): Likewise.
8226 (has_reinsert_breakpoints): Likewise.
8227
8228 2016-07-21 Yao Qi <yao.qi@linaro.org>
8229
8230 * inferiors.c (get_thread_process): Make parameter const.
8231 * inferiors.h (get_thread_process): Update declaration.
8232 * mem-break.c (clone_all_breakpoints): Remove all parameters.
8233 Add new parameters child_thread and parent_thread. Callers
8234 updated.
8235 * mem-break.h (clone_all_breakpoints): Update declaration.
8236
8237 2016-07-21 Yao Qi <yao.qi@linaro.org>
8238
8239 * mem-break.c (struct breakpoint) <cond_list>: Remove.
8240 <command_list, handler>: Remove.
8241 (struct gdb_breakpoint): New.
8242 (struct other_breakpoint): New.
8243 (struct reinsert_breakpoint): New.
8244 (is_gdb_breakpoint): New function.
8245 (any_persistent_commands): Update command_list if
8246 is_gdb_breakpoint returns true.
8247 (set_breakpoint): Create breakpoints according to their types.
8248 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
8249 (set_gdb_breakpoint_1): Likewise.
8250 (set_gdb_breakpoint): Likewise.
8251 (clear_breakpoint_conditions): Change parameter type to
8252 'struct gdb_breakpoint *'.
8253 (clear_breakpoint_commands): Likewise.
8254 (clear_breakpoint_conditions_and_commands): Likewise.
8255 (add_condition_to_breakpoint): Likewise.
8256 (add_breakpoint_condition): Likewise.
8257 (add_commands_to_breakpoint): Likewise.
8258 (check_breakpoints): Check other_breakpoint.
8259 (clone_one_breakpoint): Clone breakpopint according to its type.
8260 * mem-break.h (struct gdb_breakpoint): Declare.
8261 (set_gdb_breakpoint): Update declaration.
8262 (clear_breakpoint_conditions_and_commands): Likewise.
8263 (add_breakpoint_condition): Likewise.
8264 (add_breakpoint_commands): Likewise.
8265 * server.c (process_point_options): Change parameter type to
8266 'struct gdb_breakpoint *'.
8267
8268 2016-07-21 Yao Qi <yao.qi@linaro.org>
8269
8270 * mem-break.c (set_breakpoint_at): Rename it to ...
8271 (set_breakpoint_type_at): ... it.
8272 (set_breakpoint_at): Call set_breakpoint_type_at.
8273 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
8274 * mem-break.h (set_breakpoint_at): Update comments.
8275
8276 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
8277
8278 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
8279 to buf parameter.
8280 (nios2_store_gregset): Likewise.
8281
8282 2016-07-01 Pedro Alves <palves@redhat.com>
8283 Antoine Tremblay <antoine.tremblay@ericsson.com>
8284
8285 * linux-low.c: Change interface to take the target lwp_info
8286 pointer directly and return void. Handle detaching from a zombie
8287 thread.
8288 (linux_detach_lwp_callback): New function.
8289 (linux_detach): Detach from the leader thread after detaching from
8290 the clone threads.
8291
8292 2016-06-28 Yao Qi <yao.qi@linaro.org>
8293
8294 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
8295 for variable new_offset.
8296 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
8297 (aarch64_ftrace_insn_reloc_cb): Likewise.
8298 (aarch64_ftrace_insn_reloc_tb): Likewise.
8299 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
8300 PRIx64 instead of PRIx32.
8301
8302 2016-06-28 Yao Qi <yao.qi@linaro.org>
8303
8304 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
8305 (the_low_target): Install arm_get_syscall_trapinfo.
8306
8307 2016-06-28 Yao Qi <yao.qi@linaro.org>
8308
8309 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
8310 function.
8311 (the_low_target): Install aarch64_get_syscall_trapinfo.
8312
8313 2016-06-28 Yao Qi <yao.qi@linaro.org>
8314
8315 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
8316 Callers updated.
8317 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
8318 Remove parameter sysno.
8319 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
8320 sysret.
8321
8322 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
8323
8324 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
8325 (s390_emit_ne_goto): Likewise.
8326 (s390_emit_lt_goto): Likewise.
8327 (s390_emit_le_goto): Likewise.
8328 (s390_emit_gt_goto): Likewise.
8329 (s390_emit_ge_goto): Likewise.
8330 (s390x_emit_eq_goto): Likewise.
8331 (s390x_emit_ne_goto): Likewise.
8332 (s390x_emit_lt_goto): Likewise.
8333 (s390x_emit_le_goto): Likewise.
8334 (s390x_emit_gt_goto): Likewise.
8335 (s390x_emit_ge_goto): Likewise.
8336 (s390_emit_ops_impl): Mark variable static.
8337 (s390x_emit_ops): Likewise.
8338
8339 2016-06-17 Yao Qi <yao.qi@linaro.org>
8340
8341 * linux-low.c (handle_extended_wait): Call
8342 uninsert_reinsert_breakpoints for the parent process. Remove
8343 reinsert breakpoints from the child process. Reinsert them to
8344 the parent process when vfork is done.
8345 * mem-break.c (uninsert_reinsert_breakpoints): New function.
8346 (reinsert_reinsert_breakpoints): New function.
8347 * mem-break.h (uninsert_reinsert_breakpoints): Declare
8348 (reinsert_reinsert_breakpoints): Declare.
8349
8350 2016-06-17 Yao Qi <yao.qi@linaro.org>
8351
8352 * linux-low.c (handle_extended_wait): If the parent is doing
8353 step-over, remove the reinsert breakpoints from the forked child.
8354
8355 2016-06-17 Yao Qi <yao.qi@linaro.org>
8356
8357 * linux-low.c (unsuspend_all_lwps): Declare.
8358 (linux_low_filter_event): If thread exited, call finish_step_over.
8359 If step-over is finished, unsuspend other threads.
8360
8361 2016-06-17 Yao Qi <yao.qi@linaro.org>
8362
8363 * linux-low.c (linux_resume_one_lwp_throw): Assert
8364 has_reinsert_breakpoints returns false.
8365 * mem-break.c (delete_disabled_breakpoints): Assert
8366 bp type isn't reinsert_breakpoint.
8367
8368 2016-06-17 Yao Qi <yao.qi@linaro.org>
8369
8370 * linux-low.c (maybe_hw_step): New function.
8371 (linux_resume_one_lwp_throw): Call maybe_hw_step.
8372 (finish_step_over): Switch current_thread to lwp temporarily,
8373 and assert has_reinsert_breakpoints returns true.
8374 (proceed_one_lwp): Call maybe_hw_step.
8375 * mem-break.c (has_reinsert_breakpoints): New function.
8376 * mem-break.h (has_reinsert_breakpoints): Declare.
8377
8378 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
8379
8380 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
8381
8382 2016-05-17 Yao Qi <yao.qi@linaro.org>
8383
8384 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
8385 instead of find_inferior.
8386
8387 2016-05-05 Yao Qi <yao.qi@linaro.org>
8388
8389 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
8390 Initialize res to zero.
8391
8392 2016-05-05 Yao Qi <yao.qi@linaro.org>
8393
8394 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
8395 to uint32_t.
8396
8397 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8398
8399 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
8400 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
8401 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
8402
8403 2016-04-28 Par Olsson <par.olsson@windriver.com>
8404 Simon Marchi <simon.marchi@ericsson.com>
8405
8406 * tracepoint.c (write_inferior_int8): New function.
8407 (cmd_qtenable_disable): Write enable flag using
8408 write_inferior_int8.
8409
8410 2016-04-25 Yao Qi <yao.qi@linaro.org>
8411
8412 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
8413 (need_step_over_p): Return zero if the LWP has pending signals
8414 can be delivered on software single step target.
8415
8416 2016-04-25 Yao Qi <yao.qi@linaro.org>
8417
8418 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
8419 return instead of error.
8420
8421 2016-04-22 Yao Qi <yao.qi@linaro.org>
8422
8423 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
8424 to 23.
8425
8426 2016-04-22 Yao Qi <yao.qi@linaro.org>
8427
8428 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
8429 signal when stepping over breakpoint with software single
8430 step.
8431
8432 2016-04-21 Pedro Alves <palves@redhat.com>
8433
8434 * linux-s390-low.c (s390_collect_ptrace_register)
8435 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
8436 add casts.
8437 (s390_check_regset): Use void * instead of gdb_byte *.
8438
8439 2016-04-20 Pedro Alves <palves@redhat.com>
8440
8441 * configure: Renegerate.
8442
8443 2016-04-20 Yao Qi <yao.qi@linaro.org>
8444
8445 * linux-aarch32-low.c: Include "arch/arm-linux.h".
8446 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
8447 number 16.
8448 (arm_store_gregset): Likewise.
8449
8450 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
8451
8452 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
8453 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
8454 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
8455 (amd64-avx-mpx-linux.c): New rules.
8456 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
8457 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
8458 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
8459 (srv_amd64_regobj): Add amd64-avx-mpx.o.
8460 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
8461 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
8462 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
8463 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
8464 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
8465 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
8466 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
8467 * linux-x86-low.c (x86_linux_read_description): Add case for
8468 X86_XSTATE_AVX_MPX_MASK.
8469 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
8470 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
8471 init_registers_i386_avx_mpx_linux.
8472 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8473 (initialize_low_tracepoint): Call
8474 init_registers_i386_avx_mpx_linux.
8475 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8476 (initialize_low_tracepoint): Call
8477 init_registers_amd64_avx_mpx_linux.
8478 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
8479 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
8480 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
8481 declarations.
8482
8483 2016-04-18 Pedro Alves <palves@redhat.com>
8484
8485 * configure: Regenerate.
8486
8487 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
8488
8489 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
8490 (aarch64_emit_sub): Likewise.
8491
8492 2016-04-12 Pedro Alves <palves@redhat.com>
8493
8494 * utils.c (prepare_to_throw_exception): Delete.
8495
8496 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
8497
8498 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
8499
8500 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
8501
8502 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
8503
8504 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
8505
8506 * linux-aarch64-ipa.c: Add <elf.h> include.
8507 * linux-ppc-ipa.c: Add <elf.h> include.
8508 * linux-s390-ipa.c: Add <elf.h> include.
8509
8510 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8511
8512 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
8513 (get_raw_reg_ptr): Likewise.
8514 (get_trace_state_variable_value_ptr): Likewise.
8515 (set_trace_state_variable_value_ptr): Likewise.
8516 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
8517 char *.
8518
8519 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8520 Marcin Kościelnicki <koriakin@0x04.net>
8521
8522 PR/17221
8523 * linux-ppc-low.c (emit_insns): New function.
8524 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
8525 (ppc_emit_prologue): New function.
8526 (ppc_emit_epilogue): New function.
8527 (ppc_emit_add): New function.
8528 (ppc_emit_sub): New function.
8529 (ppc_emit_mul): New function.
8530 (ppc_emit_lsh): New function.
8531 (ppc_emit_rsh_signed): New function.
8532 (ppc_emit_rsh_unsigned): New function.
8533 (ppc_emit_ext): New function.
8534 (ppc_emit_zero_ext): New function.
8535 (ppc_emit_log_not): New function.
8536 (ppc_emit_bit_and): New function.
8537 (ppc_emit_bit_or): New function.
8538 (ppc_emit_bit_xor): New function.
8539 (ppc_emit_bit_not): New function.
8540 (ppc_emit_equal): New function.
8541 (ppc_emit_less_signed): New function.
8542 (ppc_emit_less_unsigned): New function.
8543 (ppc_emit_ref): New function.
8544 (ppc_emit_const): New function.
8545 (ppc_emit_reg): New function.
8546 (ppc_emit_pop): New function.
8547 (ppc_emit_stack_flush): New function.
8548 (ppc_emit_swap): New function.
8549 (ppc_emit_stack_adjust): New function.
8550 (ppc_emit_call): New function.
8551 (ppc_emit_int_call_1): New function.
8552 (ppc_emit_void_call_2): New function.
8553 (ppc_emit_if_goto): New function.
8554 (ppc_emit_goto): New function.
8555 (ppc_emit_eq_goto): New function.
8556 (ppc_emit_ne_goto): New function.
8557 (ppc_emit_lt_goto): New function.
8558 (ppc_emit_le_goto): New function.
8559 (ppc_emit_gt_goto): New function.
8560 (ppc_emit_ge_goto): New function.
8561 (ppc_write_goto_address): New function.
8562 (ppc_emit_ops_impl): New static variable.
8563 (ppc64v1_emit_prologue): New function.
8564 (ppc64v2_emit_prologue): New function.
8565 (ppc64_emit_epilogue): New function.
8566 (ppc64_emit_add): New function.
8567 (ppc64_emit_sub): New function.
8568 (ppc64_emit_mul): New function.
8569 (ppc64_emit_lsh): New function.
8570 (ppc64_emit_rsh_signed): New function.
8571 (ppc64_emit_rsh_unsigned): New function.
8572 (ppc64_emit_ext): New function.
8573 (ppc64_emit_zero_ext): New function.
8574 (ppc64_emit_log_not): New function.
8575 (ppc64_emit_bit_and): New function.
8576 (ppc64_emit_bit_or): New function.
8577 (ppc64_emit_bit_xor): New function.
8578 (ppc64_emit_bit_not): New function.
8579 (ppc64_emit_equal): New function.
8580 (ppc64_emit_less_signed): New function.
8581 (ppc64_emit_less_unsigned): New function.
8582 (ppc64_emit_ref): New function.
8583 (ppc64_emit_const): New function.
8584 (ppc64v1_emit_reg): New function.
8585 (ppc64v2_emit_reg): New function.
8586 (ppc64_emit_pop): New function.
8587 (ppc64_emit_stack_flush): New function.
8588 (ppc64_emit_swap): New function.
8589 (ppc64v1_emit_call): New function.
8590 (ppc64v2_emit_call): New function.
8591 (ppc64v1_emit_int_call_1): New function.
8592 (ppc64v2_emit_int_call_1): New function.
8593 (ppc64v1_emit_void_call_2): New function.
8594 (ppc64v2_emit_void_call_2): New function.
8595 (ppc64_emit_if_goto): New function.
8596 (ppc64_emit_eq_goto): New function.
8597 (ppc64_emit_ne_goto): New function.
8598 (ppc64_emit_lt_goto): New function.
8599 (ppc64_emit_le_goto): New function.
8600 (ppc64_emit_gt_goto): New function.
8601 (ppc64_emit_ge_goto): New function.
8602 (ppc64v1_emit_ops_impl): New static variable.
8603 (ppc64v2_emit_ops_impl): New static variable.
8604 (ppc_emit_ops): New function.
8605 (linux_low_target): Wire in ppc_emit_ops.
8606
8607 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8608 Marcin Kościelnicki <koriakin@0x04.net>
8609
8610 PR/17221
8611 * Makefile.in: Add powerpc-*-ipa.o
8612 * configure.srv: Add ipa_obj for powerpc*-linux.
8613 * linux-ppc-ipa.c: New file.
8614 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
8615 includes.
8616 (PPC_FIELD): New macro.
8617 (PPC_SEXT): New macro.
8618 (PPC_OP6): New macro.
8619 (PPC_BO): New macro.
8620 (PPC_LI): New macro.
8621 (PPC_BD): New macro.
8622 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
8623 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
8624 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
8625 (ppc_get_thread_area): New function.
8626 (is_elfv2_inferior): New function.
8627 (gen_ds_form): New function.
8628 (GEN_STD): New macro.
8629 (GEN_STDU): New macro.
8630 (GEN_LD): New macro.
8631 (GEN_LDU): New macro.
8632 (gen_d_form): New function.
8633 (GEN_ADDI): New macro.
8634 (GEN_ADDIS): New macro.
8635 (GEN_LI): New macro.
8636 (GEN_LIS): New macro.
8637 (GEN_ORI): New macro.
8638 (GEN_ORIS): New macro.
8639 (GEN_LWZ): New macro.
8640 (GEN_STW): New macro.
8641 (GEN_STWU): New macro.
8642 (gen_xfx_form): New function.
8643 (GEN_MFSPR): New macro.
8644 (GEN_MTSPR): New macro.
8645 (GEN_MFCR): New macro.
8646 (GEN_MTCR): New macro.
8647 (GEN_SYNC): New macro.
8648 (GEN_LWSYNC): New macro.
8649 (gen_x_form): New function.
8650 (GEN_OR): New macro.
8651 (GEN_MR): New macro.
8652 (GEN_LWARX): New macro.
8653 (GEN_STWCX): New macro.
8654 (GEN_CMPW): New macro.
8655 (gen_md_form): New function.
8656 (GEN_RLDICL): New macro.
8657 (GEN_RLDICR): New macro.
8658 (gen_i_form): New function.
8659 (GEN_B): New macro.
8660 (GEN_BL): New macro.
8661 (gen_b_form): New function.
8662 (GEN_BNE): New macro.
8663 (GEN_LOAD): New macro.
8664 (GEN_STORE): New macro.
8665 (gen_limm): New function.
8666 (gen_atomic_xchg): New function.
8667 (gen_call): New function.
8668 (ppc_relocate_instruction): New function.
8669 (ppc_install_fast_tracepoint_jump_pad): New function.
8670 (ppc_get_min_fast_tracepoint_insn_len): New function.
8671 (ppc_get_ipa_tdesc_idx): New function.
8672 (the_low_target): Wire in the new functions.
8673 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
8674 tdescs.
8675 * linux-ppc-tdesc.h: New file.
8676
8677 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8678
8679 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8680 (alloc_jump_pad_buffer): New function.
8681 * linux-amd64-ipa.c: Add <sys/mman.h> include.
8682 (alloc_jump_pad_buffer): New function.
8683 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
8684 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8685 (alloc_jump_pad_buffer): New function.
8686 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
8687 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
8688 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
8689 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
8690
8691 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8692
8693 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
8694 * linux-amd64-ipa.c: Likewise.
8695 * linux-i386-ipa.c: Likewise.
8696 * linux-s390-ipa.c: Likewise.
8697 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
8698 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
8699 set_trace_state_variable_value_ptr.
8700 (struct ipa_sym_addresses): Likewise.
8701 (symbol_list): Likewise.
8702 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
8703 accessing gdb_collect directly.
8704 (gdb_collect_ptr_type): New typedef.
8705 (get_raw_reg_ptr_type): New typedef.
8706 (get_trace_state_variable_value_ptr_type): New typedef.
8707 (set_trace_state_variable_value_ptr_type): New typedef.
8708 (gdb_collect_ptr): New global.
8709 (get_raw_reg_ptr): New global.
8710 (get_trace_state_variable_value_ptr): New global.
8711 (set_trace_state_variable_value_ptr): New global.
8712 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
8713 accessing get_raw_reg directly.
8714 (get_get_tsv_func_addr): Likewise for
8715 get_trace_state_variable_value_ptr.
8716 (get_set_tsv_func_addr): Likewise for
8717 set_trace_state_variable_value_ptr.
8718 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
8719
8720 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
8721
8722 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
8723
8724 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8725
8726 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
8727 packets.
8728 (relocate_instruction): Remove own_buf.
8729 * server.c (own_buf): Make global.
8730 (handle_v_requests): Make global.
8731 * server.h (own_buf): New declaration.
8732 (handle_v_requests): New prototype.
8733
8734 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8735
8736 PR 18377
8737 * linux-s390-low.c (add_insns): New function.
8738 (s390_emit_prologue): New function.
8739 (s390_emit_epilogue): New function.
8740 (s390_emit_add): New function.
8741 (s390_emit_sub): New function.
8742 (s390_emit_mul): New function.
8743 (s390_emit_lsh): New function.
8744 (s390_emit_rsh_signed): New function.
8745 (s390_emit_rsh_unsigned): New function.
8746 (s390_emit_ext): New function.
8747 (s390_emit_log_not): New function.
8748 (s390_emit_bit_and): New function.
8749 (s390_emit_bit_or): New function.
8750 (s390_emit_bit_xor): New function.
8751 (s390_emit_bit_not): New function.
8752 (s390_emit_equal): New function.
8753 (s390_emit_less_signed): New function.
8754 (s390_emit_less_unsigned): New function.
8755 (s390_emit_ref): New function.
8756 (s390_emit_if_goto): New function.
8757 (s390_emit_goto): New function.
8758 (s390_write_goto_address): New function.
8759 (s390_emit_litpool): New function.
8760 (s390_emit_const): New function.
8761 (s390_emit_call): New function.
8762 (s390_emit_reg): New function.
8763 (s390_emit_pop): New function.
8764 (s390_emit_stack_flush): New function.
8765 (s390_emit_zero_ext): New function.
8766 (s390_emit_swap): New function.
8767 (s390_emit_stack_adjust): New function.
8768 (s390_emit_set_r2): New function.
8769 (s390_emit_int_call_1): New function.
8770 (s390_emit_void_call_2): New function.
8771 (s390_emit_eq_goto): New function.
8772 (s390_emit_ne_goto): New function.
8773 (s390_emit_lt_goto): New function.
8774 (s390_emit_le_goto): New function.
8775 (s390_emit_gt_goto): New function.
8776 (s390_emit_ge_goto): New function.
8777 (s390x_emit_prologue): New function.
8778 (s390x_emit_epilogue): New function.
8779 (s390x_emit_add): New function.
8780 (s390x_emit_sub): New function.
8781 (s390x_emit_mul): New function.
8782 (s390x_emit_lsh): New function.
8783 (s390x_emit_rsh_signed): New function.
8784 (s390x_emit_rsh_unsigned): New function.
8785 (s390x_emit_ext): New function.
8786 (s390x_emit_log_not): New function.
8787 (s390x_emit_bit_and): New function.
8788 (s390x_emit_bit_or): New function.
8789 (s390x_emit_bit_xor): New function.
8790 (s390x_emit_bit_not): New function.
8791 (s390x_emit_equal): New function.
8792 (s390x_emit_less_signed): New function.
8793 (s390x_emit_less_unsigned): New function.
8794 (s390x_emit_ref): New function.
8795 (s390x_emit_if_goto): New function.
8796 (s390x_emit_const): New function.
8797 (s390x_emit_call): New function.
8798 (s390x_emit_reg): New function.
8799 (s390x_emit_pop): New function.
8800 (s390x_emit_stack_flush): New function.
8801 (s390x_emit_zero_ext): New function.
8802 (s390x_emit_swap): New function.
8803 (s390x_emit_stack_adjust): New function.
8804 (s390x_emit_int_call_1): New function.
8805 (s390x_emit_void_call_2): New function.
8806 (s390x_emit_eq_goto): New function.
8807 (s390x_emit_ne_goto): New function.
8808 (s390x_emit_lt_goto): New function.
8809 (s390x_emit_le_goto): New function.
8810 (s390x_emit_gt_goto): New function.
8811 (s390x_emit_ge_goto): New function.
8812 (s390_emit_ops): New function.
8813 (struct linux_target_ops): Fill in emit_ops hook.
8814
8815 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8816
8817 PR 18377
8818 * Makefile.in: Add s390 IPA files.
8819 * configure.srv: Build IPA for s390.
8820 * linux-s390-ipa.c: New file.
8821 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
8822 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
8823 (tdesc_s390_linux32): Likewise.
8824 (init_registers_s390_linux32v1): Likewise.
8825 (tdesc_s390_linux32v1): Likewise.
8826 (init_registers_s390_linux32v2): Likewise.
8827 (tdesc_s390_linux32v2): Likewise.
8828 (init_registers_s390_linux64): Likewise.
8829 (tdesc_s390_linux64): Likewise.
8830 (init_registers_s390_linux64v1): Likewise.
8831 (tdesc_s390_linux64v1): Likewise.
8832 (init_registers_s390_linux64v2): Likewise.
8833 (tdesc_s390_linux64v2): Likewise.
8834 (init_registers_s390_te_linux64): Likewise.
8835 (tdesc_s390_te_linux64): Likewise.
8836 (init_registers_s390_vx_linux64): Likewise.
8837 (tdesc_s390_vx_linux64): Likewise.
8838 (init_registers_s390_tevx_linux64): Likewise.
8839 (tdesc_s390_tevx_linux64): Likewise.
8840 (init_registers_s390x_linux64): Likewise.
8841 (tdesc_s390x_linux64): Likewise.
8842 (init_registers_s390x_linux64v1): Likewise.
8843 (tdesc_s390x_linux64v1): Likewise.
8844 (init_registers_s390x_linux64v2): Likewise.
8845 (tdesc_s390x_linux64v2): Likewise.
8846 (init_registers_s390x_te_linux64): Likewise.
8847 (tdesc_s390x_te_linux64): Likewise.
8848 (init_registers_s390x_vx_linux64): Likewise.
8849 (tdesc_s390x_vx_linux64): Likewise.
8850 (init_registers_s390x_tevx_linux64): Likewise.
8851 (tdesc_s390x_tevx_linux64): Likewise.
8852 (have_hwcap_s390_vx): New static variable.
8853 (s390_arch_setup): Fill have_hwcap_s390_vx.
8854 (s390_get_thread_area): New function.
8855 (s390_ft_entry_gpr_esa): New const.
8856 (s390_ft_entry_gpr_zarch): New const.
8857 (s390_ft_entry_misc): New const.
8858 (s390_ft_entry_fr): New const.
8859 (s390_ft_entry_vr): New const.
8860 (s390_ft_main_31): New const.
8861 (s390_ft_main_64): New const.
8862 (s390_ft_exit_fr): New const.
8863 (s390_ft_exit_vr): New const.
8864 (s390_ft_exit_misc): New const.
8865 (s390_ft_exit_gpr_esa): New const.
8866 (s390_ft_exit_gpr_zarch): New const.
8867 (append_insns): New function.
8868 (s390_relocate_instruction): New function.
8869 (s390_install_fast_tracepoint_jump_pad): New function.
8870 (s390_get_min_fast_tracepoint_insn_len): New function.
8871 (s390_get_ipa_tdesc_idx): New function.
8872 (struct linux_target_ops): Wire in the above functions.
8873 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
8874 * linux-s390-tdesc.h: New file.
8875
8876 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8877
8878 * linux-s390-low.c (s390_supports_tracepoints): New function.
8879 (struct linux_target_ops): Fill supports_tracepoints hook.
8880
8881 2016-03-18 Yao Qi <yao.qi@linaro.org>
8882
8883 * linux-low.c (lwp_signal_can_be_delivered): New function.
8884 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
8885
8886 2016-03-18 Yao Qi <yao.qi@linaro.org>
8887
8888 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
8889 0 if signal is enqueued. Remove 'signal' from one debugging
8890 message. Move one debugging message to some lines below.
8891 Remove code setting 'signal' to 0.
8892
8893 2016-03-18 Yao Qi <yao.qi@linaro.org>
8894
8895 * linux-low.c (linux_low_filter_event): Remove redundant
8896 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
8897
8898 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
8899
8900 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
8901 (struct linux_target_ops): Wire in the above.
8902
8903 2016-03-03 Yao Qi <yao.qi@linaro.org>
8904
8905 * linux-low.c: Update comments to start_step_over.
8906
8907 2016-03-03 Yao Qi <yao.qi@linaro.org>
8908
8909 PR server/19736
8910 * linux-low.c (handle_extended_wait): Set child suspended
8911 if event_lwp->bp_reinsert isn't zero.
8912
8913 2016-03-02 Yao Qi <yao.qi@linaro.org>
8914
8915 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
8916 enqueue_pending_signal.
8917
8918 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
8919
8920 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
8921 is actually loaded.
8922
8923 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8924
8925 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
8926 (s390_regmap_3264) [!__s390x__]: New global.
8927 (s390_collect_ptrace_register): Skip map entries containing -1.
8928 (s390_supply_ptrace_register): Ditto.
8929 (s390_fill_gprs_high): New function.
8930 (s390_store_gprs_high): New function.
8931 (s390_regsets): Add NT_S390_HIGH_GPRS.
8932 (s390_get_hwcap): Enable on 31-bit.
8933 (have_hwcap_s390_high_gprs): Enable on 31-bit.
8934 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
8935 Detect NT_S390_HIGH_GPRS.
8936 (s390_usrregs_info_3264): Enable on 31-bit.
8937 (s390_regs_info): Enable regs_info_3264 on 31-bit.
8938 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
8939
8940 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
8941
8942 PR gdb/13808
8943 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
8944 * configure.srv: Ditto.
8945 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
8946 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
8947 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
8948 (init_registers_amd64_linux): Remove prototype.
8949 (tdesc_amd64_linux): Remove declaration.
8950 (get_ipa_tdesc): New function.
8951 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8952 initialize remaining tdescs.
8953 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
8954 (init_registers_i386_linux): Remove prototype.
8955 (tdesc_i386_linux): Remove declaration.
8956 (get_ipa_tdesc): New function.
8957 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
8958 initialize remaining tdescs.
8959 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
8960 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
8961 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
8962 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
8963 (x86_get_ipa_tdesc_idx): New function.
8964 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
8965 * linux-x86-tdesc.h: New file.
8966 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
8967 (target_get_ipa_tdesc_idx): New macro.
8968 * tracepoint.c (ipa_tdesc_idx): New macro.
8969 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
8970 (symbol_list): Add ipa_tdesc_idx.
8971 (cmd_qtstart): Write ipa_tdesc_idx in the target.
8972 (ipa_tdesc): Remove.
8973 (ipa_tdesc_idx): New variable.
8974 (get_context_regcache): Use get_ipa_tdesc.
8975 (gdb_collect): Ditto.
8976 (gdb_probe): Ditto.
8977 * tracepoint.h (get_ipa_tdesc): New prototype.
8978 (ipa_tdesc): Remove.
8979
8980 2016-02-24 Pedro Alves <palves@redhat.com>
8981
8982 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
8983 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
8984 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
8985 Factor out common code between the USE_SIGTRAP_SIGINFO and
8986 !USE_SIGTRAP_SIGINFO blocks.
8987 (linux_low_filter_event): Call save_stop_reason instead of
8988 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
8989 Update comments.
8990 (linux_wait_1): Update comments.
8991
8992 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
8993
8994 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
8995 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
8996 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
8997 ppc_insert_point, ppc_remove_point.
8998
8999 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
9000
9001 * linux-s390-low.c (s390_supports_z_point_type): New function.
9002 (struct linux_target_ops): Wire s390_supports_z_point_type in.
9003
9004 2016-02-16 Yao Qi <yao.qi@linaro.org>
9005
9006 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
9007 PC. Get pc from regcache_read_pc.
9008
9009 2016-02-12 Yao Qi <yao.qi@linaro.org>
9010
9011 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
9012 or linux_get_pc_32bit.
9013 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
9014
9015 2016-02-12 Yao Qi <yao.qi@linaro.org>
9016
9017 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
9018 arm_linux_get_next_pcs_fixup.
9019
9020 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
9021
9022 * tracepoint.c (x_tracepoint_action_download): Change
9023 write_inferior_data_ptr to write_inferior_data_pointer.
9024 (cmd_qtstart): Likewise.
9025 (write_inferior_data_ptr): Remove.
9026 (download_agent_expr): Change write_inferior_data_ptr to
9027 write_inferior_data_pointer.
9028 (download_tracepoint_1): Likewise.
9029 (download_tracepoint): Likewise.
9030 (download_trace_state_variables): Likewise.
9031
9032 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
9033 Marcin Kościelnicki <koriakin@0x04.net>
9034
9035 * tracepoint.c (struct tracepoint_action_ops): Remove.
9036 (struct tracepoint_action): Remove ops.
9037 (m_tracepoint_action_download, r_tracepoint_action_download)
9038 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
9039 size and offset accordingly.
9040 (m_tracepoint_action_ops, r_tracepoint_action_ops)
9041 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
9042 (tracepoint_action_send, tracepoint_action_download): New functions.
9043 Helpers for trace action handlers.
9044 (add_tracepoint_action): Remove setup actions ops.
9045 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
9046
9047 2016-02-10 Yao Qi <yao.qi@linaro.org>
9048
9049 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
9050
9051 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
9052
9053 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
9054 to AC_OUTPUT.
9055 * configure: Regenerate.
9056
9057 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
9058
9059 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
9060 void * to gdb_byte *.
9061 * linux-low.c (siginfo_fixup): Likewise.
9062 (linux_xfer_siginfo): Likewise.
9063 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
9064 Likewise.
9065 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9066
9067 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
9068
9069 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
9070 to srv_tgtobj.
9071 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
9072 to srv_tgtobj.
9073 * linux-x86-low.c [__x86_64__]: Include
9074 "nat/amd64-linux-siginfo.h".
9075 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
9076 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
9077 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
9078 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
9079 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
9080 (cpt_si_fd, si_timerid, si_overrun): Move from
9081 nat/amd64-linux-siginfo.c.
9082 * Makefile.in (amd64-linux-siginfo.o:): New rule.
9083
9084 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
9085
9086 * server.c (skip_to_semicolon): Remove.
9087 (process_point_options): Use strchrnul instead of
9088 skip_to_semicolon.
9089
9090 2016-01-26 Yao Qi <yao.qi@linaro.org>
9091
9092 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
9093 * linux-low.c (install_software_single_step_breakpoints): Don't
9094 call regcache_read_pc.
9095 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
9096 argument pc.
9097
9098 2016-01-26 Yao Qi <yao.qi@linaro.org>
9099
9100 * linux-low.c (install_software_single_step_breakpoints): Call
9101 regcache_read_pc instead of get_pc.
9102
9103 2016-01-26 Yao Qi <yao.qi@linaro.org>
9104
9105 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
9106 (unblock_async_io): Rename to ...
9107 (block_unblock_async_io): ... it. New function.
9108 (enable_async_io): Don't install SIGIO handler. Unblock it
9109 instead.
9110 (disable_async_io): Don't ignore SIGIO. Block it instead.
9111 (initialize_async_io): Install SIGIO handler. Don't call
9112 unblock_async_io.
9113
9114 2016-01-26 Yao Qi <yao.qi@linaro.org>
9115
9116 * remote-utils.c (getpkt): If the buffer isn't empty, and the
9117 first character is '\003', call *the_target->request_interrupt.
9118
9119 2016-01-25 Yao Qi <yao.qi@linaro.org>
9120
9121 * remote-utils.c (new_thread_notify): Remove.
9122 (dead_thread_notify): Likewise.
9123 * remote-utils.h (new_thread_notify): Remove declaration.
9124 (dead_thread_notify): Likewise.
9125
9126 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
9127
9128 * gdb.trace/pending.exp: Fix expected message on continue.
9129
9130 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
9131
9132 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
9133 it works properly on big-endian machines where sizeof (CORE_ADDR)
9134 != sizeof (void *).
9135
9136 2016-01-21 Pedro Alves <palves@redhat.com>
9137
9138 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
9139 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
9140 * configure: Regenerate.
9141
9142 2016-01-21 Yao Qi <yao.qi@linaro.org>
9143
9144 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
9145 is_thumb and set it according to CPSR saved on the stack.
9146 (get_next_pcs_syscall_next_pc): Pass is_thumb to
9147 arm_sigreturn_next_pc.
9148
9149 2016-01-18 Yao Qi <yao.qi@linaro.org>
9150
9151 * linux-low.c (linux_set_pc_64bit): New function.
9152 (linux_get_pc_64bit): New function.
9153 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
9154 Declare.
9155 * linux-sparc-low.c (debug_threads): Remove declaration.
9156 (sparc_get_pc): Remove.
9157 (the_low_target): Use linux_get_pc_64bit instead of
9158 sparc_get_pc.
9159 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
9160 (the_low_target): Use linux_get_pc_64bit and
9161 linux_set_pc_64bit.
9162
9163 2016-01-18 Yao Qi <yao.qi@linaro.org>
9164
9165 * linux-arm-low.c (debug_threads): Remove declaration.
9166 (arm_get_pc, arm_set_pc): Remove.
9167 (the_low_target): Use linux_get_pc_32bit and
9168 linux_set_pc_32bit.
9169 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
9170 (the_low_target): Use linux_get_pc_32bit and
9171 linux_set_pc_32bit.
9172 * linux-cris-low.c (debug_threads): Remove declaration.
9173 (cris_get_pc, cris_set_pc,): Remove.
9174 (the_low_target): Use linux_get_pc_32bit and
9175 linux_set_pc_32bit.
9176 * linux-crisv32-low.c (debug_threads): Remove declaration.
9177 (cris_get_pc, cris_set_pc): Remove.
9178 (the_low_target): Use linux_get_pc_32bit and
9179 linux_set_pc_32bit.
9180 * linux-low.c: Include inttypes.h.
9181 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
9182 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
9183 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
9184 (the_low_target): Use linux_get_pc_32bit and
9185 linux_set_pc_32bit.
9186 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
9187 (the_low_target): Use linux_get_pc_32bit and
9188 linux_set_pc_32bit.
9189 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
9190 (the_low_target): Use linux_get_pc_32bit and
9191 linux_set_pc_32bit.
9192 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
9193 (the_low_target): Use linux_get_pc_32bit and
9194 linux_set_pc_32bit.
9195 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
9196 (the_low_target): Use linux_get_pc_32bit and
9197 linux_set_pc_32bit.
9198
9199 2016-01-18 Gary Benson <gbenson@redhat.com>
9200
9201 * configure.ac (AC_FUNC_FORK): New check.
9202 * config.in: Regenerate.
9203 * configure: Likewise.
9204
9205 2016-01-14 Yao Qi <yao.qi@linaro.org>
9206
9207 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
9208 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
9209 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
9210 arm_get_next_pcs_ctor.
9211
9212 2016-01-12 Josh Stone <jistone@redhat.com>
9213 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9214
9215 * inferiors.h: Include "gdb_vecs.h".
9216 (struct process_info): Add syscalls_to_catch.
9217 * inferiors.c (remove_process): Free syscalls_to_catch.
9218 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
9219 syscall_return stops.
9220 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
9221 * server.c (handle_general_set): Handle QCatchSyscalls.
9222 (handle_query): Report support for QCatchSyscalls.
9223 * target.h (struct target_ops): Add supports_catch_syscall.
9224 (target_supports_catch_syscall): New macro.
9225 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
9226 (struct lwp_info): Add syscall_state.
9227 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
9228 Maintain syscall_state and syscalls_to_catch across exec.
9229 (get_syscall_trapinfo): New function, proxy to the_low_target.
9230 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
9231 (linux_low_filter_event): Toggle syscall_state entry/return for
9232 syscall traps, and set it ignored for all others.
9233 (gdb_catching_syscalls_p): New function.
9234 (gdb_catch_this_syscall_p): New function.
9235 (linux_wait_1): Handle SYSCALL_SIGTRAP.
9236 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
9237 (linux_supports_catch_syscall): New function.
9238 (linux_target_ops): Install it.
9239 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
9240 (the_low_target): Install it.
9241
9242 2016-01-12 Mike Frysinger <vapier@gentoo.org>
9243
9244 * acinclude.m4: Include new ../warning.m4 file.
9245 * configure: Regenerated.
9246 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
9247
9248 2016-01-12 Mike Frysinger <vapier@gentoo.org>
9249
9250 * ax.c (is_goto_target): Mark static.
9251 * linux-low.c (register_addr): Likewise.
9252 (linux_fetch_registers, linux_store_registers): Likewise.
9253 * mem-break.c (any_persistent_commands): Fix old prototype.
9254 (add_commands_to_breakpoint): Mark static.
9255 * regcache.c (find_register_by_name): Delete unused func.
9256 * remote-utils.c (hex_or_minus_one): Mark static.
9257 * server.c (monitor_show_help): Mark static.
9258 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
9259 handle_v_requests): Likewise.
9260
9261 2016-01-12 Pedro Alves <palves@redhat.com>
9262
9263 Remove use of the registered trademark symbol throughout.
9264
9265 2016-01-08 Yao Qi <yao.qi@linaro.org>
9266
9267 * remote-utils.c (getpkt): If c is '\003', call target hook
9268 request_interrupt.
9269
9270 2016-01-06 Yao Qi <yao.qi@linaro.org>
9271
9272 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
9273 linux-aarch32-low.c.
9274 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9275 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
9276 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9277 (thumb2_breakpoint): Declare.
9278 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
9279 linux-aarch32-low.h.
9280 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9281 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
9282 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9283
9284 2016-01-01 Joel Brobecker <brobecker@adacore.com>
9285
9286 * gdbreplay.c (gdbreplay_version): Change copyright year in
9287 version message.
9288 * server.c (gdbserver_version): Likewise.
9289
9290 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
9291
9292 * server.c (crc32_table): Delete.
9293 (crc32): Use libiberty's xcrc32 function.
9294
9295 2015-12-22 Joel Brobecker <brobecker@adacore.com>
9296
9297 * lynx-low.c (lynx_delete_thread_callback): New function.
9298 (lynx_mourn): Properly delete our process and all of its
9299 threads. Remove call to clear_inferiors.
9300
9301 2015-12-22 Joel Brobecker <brobecker@adacore.com>
9302
9303 * target.c (thread_search_callback): Add check that
9304 the thread_stopped target callback is not NULL before
9305 calling it.
9306
9307 2015-12-21 Yao Qi <yao.qi@linaro.org>
9308
9309 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
9310 arm breakpoint.
9311
9312 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9313
9314 * server.c (handle_query): Call target_supports_software_single_step.
9315
9316 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9317
9318 * linux-low.c (single_step): New function.
9319 (linux_resume_one_lwp_throw): Call single_step.
9320 (start_step_over): Likewise.
9321
9322 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9323
9324 * Makefile.in (SFILES): Append arch/arm-linux.c,
9325 arch/arm-get-next-pcs.c.
9326 (arm-linux.o): New rule.
9327 (arm-get-next-pcs.o): New rule.
9328 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
9329 arm-linux.o.
9330 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
9331 to linux-aarch32-low.c.
9332 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9333 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9334 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9335 (thumb2_breakpoint_len): Likewise.
9336 (arm_is_thumb_mode): Make non-static.
9337 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
9338 from linux-aarch32-low.c.
9339 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9340 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9341 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9342 (thumb2_breakpoint_len): Likewise.
9343 (arm_is_thumb_mode): New declaration.
9344 * linux-arm-low.c: Include arch/arm-linux.h
9345 aarch/arm-get-next-pcs.h, sys/syscall.h.
9346 (get_next_pcs_ops): New struct.
9347 (get_next_pcs_addr_bits_remove): New function.
9348 (get_next_pcs_is_thumb): New function.
9349 (get_next_pcs_read_memory_unsigned_integer): Likewise.
9350 (arm_sigreturn_next_pc): Likewise.
9351 (get_next_pcs_syscall_next_pc): Likewise.
9352 (arm_gdbserver_get_next_pcs): Likewise.
9353 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
9354 Initialize.
9355 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
9356 * server.h: Include gdb_vecs.h.
9357
9358 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9359
9360 * Makefile.in (SFILES): Append common/common-regcache.c.
9361 (OBS): Append common-regcache.o.
9362 (common-regcache.o): New rule.
9363 * regcache.c (init_register_cache): Initialize cache to
9364 REG_UNAVAILABLE.
9365 (regcache_raw_read_unsigned): New function.
9366 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
9367 register_status enum.
9368
9369 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9370
9371 * linux-aarch64-low.c (the_low_targets): Rename
9372 breakpoint_reinsert_addr to get_next_pcs.
9373 * linux-arm-low.c (the_low_targets): Likewise.
9374 * linux-bfin-low.c (the_low_targets): Likewise.
9375 * linux-cris-low.c (the_low_targets): Likewise.
9376 * linux-crisv32-low.c (the_low_targets): Likewise.
9377 * linux-low.c (can_software_single_step): Likewise.
9378 (install_software_single_step_breakpoints): New function.
9379 (start_step_over): Use install_software_single_step_breakpoints.
9380 * linux-low.h: New CORE_ADDR vector.
9381 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
9382 get_next_pcs.
9383 * linux-mips-low.c (the_low_targets): Likewise.
9384 * linux-nios2-low.c (the_low_targets): Likewise.
9385 * linux-sparc-low.c (the_low_targets): Likewise.
9386
9387 2015-12-17 Pedro Alves <palves@redhat.com>
9388
9389 * linux-low.c (linux_kill_one_lwp): Remove references to
9390 LinuxThreads.
9391 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
9392 to 'kill'.
9393 (linux_init_signals): Delete.
9394 (initialize_low): Adjust.
9395 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
9396
9397 2015-12-16 Pedro Alves <palves@redhat.com>
9398
9399 * configure.ac (compiler warning flags): When testing a
9400 -Wno-foo option, check whether -Wfoo works instead.
9401 * configure: Regenerate.
9402
9403 2015-12-11 Don Breazeal <donb@codesourcery.com>
9404
9405 * server.c (process_serial_event): Don't exit from gdbserver
9406 in remote mode if there are still active inferiors.
9407
9408 2015-12-11 Yao Qi <yao.qi@linaro.org>
9409
9410 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
9411 arm_breakpoint_at if the process is 32-bit.
9412
9413 2015-12-11 Yao Qi <yao.qi@linaro.org>
9414
9415 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
9416 arm breakpoint.
9417
9418 2015-12-07 Yao Qi <yao.qi@linaro.org>
9419
9420 * configure.srv: Append arm.o to srv_tgtobj for
9421 aarch64*-*-linux* target.
9422 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
9423 from linux-arm-low.c.
9424 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9425 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9426 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9427 (thumb2_breakpoint_len): Likewise.
9428 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
9429 (arm_breakpoint_kinds): Likewise.
9430 (arm_breakpoint_kind_from_pc): Likewise.
9431 (arm_sw_breakpoint_from_kind): Likewise.
9432 (arm_breakpoint_kind_from_current_state): Likewise.
9433 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
9434 (arm_sw_breakpoint_from_kind): Declare.
9435 (arm_breakpoint_kind_from_current_state): Declare.
9436 (arm_breakpoint_at): Declare.
9437 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
9438 arm_sw_breakpoint_from_kind if process is 32-bit.
9439 (aarch64_breakpoint_kind_from_pc): New function.
9440 (aarch64_breakpoint_kind_from_current_state): New function.
9441 (the_low_target): Initialize fields breakpoint_kind_from_pc
9442 and breakpoint_kind_from_current_state.
9443 * linux-arm-low.c (arm_breakpoint_kinds): Move to
9444 linux-aarch32-low.c.
9445 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
9446 (arm_breakpoint, arm_breakpoint_len): Likewise.
9447 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
9448 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9449 (arm_is_thumb_mode): Likewise.
9450 (arm_breakpoint_at): Likewise.
9451 (arm_breakpoint_kind_from_pc): Likewise.
9452 (arm_sw_breakpoint_from_kind): Likewise.
9453 (arm_breakpoint_kind_from_current_state): Likewise.
9454
9455 Revert:
9456 2015-08-04 Yao Qi <yao.qi@linaro.org>
9457
9458 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
9459 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
9460 * server.c (extended_protocol): Remove "static".
9461 * server.h (extended_protocol): Declare it.
9462
9463 2015-12-04 Josh Stone <jistone@redhat.com>
9464
9465 * target.h (struct target_ops) <arch_setup>: Rename to ...
9466 (struct target_ops) <post_create_inferior>: ... this.
9467 (target_arch_setup): Rename to ...
9468 (target_post_create_inferior): ... this, calling post_create_inferior.
9469 * server.c (start_inferior): Update target_arch_setup calls to
9470 target_post_create_inferior.
9471 * linux-low.c (linux_low_ptrace_options): Forward declare.
9472 (linux_arch_setup): Update its comment for general use.
9473 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
9474 (struct linux_target_ops): Use linux_post_create_inferior.
9475 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
9476 to post_create_inferior.
9477 * nto-low.c (struct nto_target_ops): Likewise.
9478 * spu-low.c (struct spu_target_ops): Likewise.
9479 * win32-low.c (struct win32_target_ops): Likewise.
9480
9481 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
9482
9483 * linux-arm-low.c: Remove duplicate arch/arm.h include.
9484
9485 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9486
9487 * linux-arm-low.c (arm_reinsert_addr): Remove function.
9488 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
9489 * linux-cris-low.c (cris_reinsert_addr> Remove function.
9490 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9491 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
9492 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9493 * linux-mips-low.c (mips_reinsert_addr): Remove function.
9494 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9495 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
9496 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9497 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
9498 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9499
9500 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9501
9502 * linux-low.c (linux_look_up_symbols): Don't call
9503 linux_supports_traceclone.
9504 * linux-low.h (thread_db_init): Remove use_events argument.
9505 * thread-db.c (thread_db_use_event): Remove global variable.
9506 (struct thread_db) <td_thr_event_enable_p>: Remove field.
9507 (struct thread_db) <td_create_bp>: Remove field.
9508 (thread_db_create_event): Remove function.
9509 (thread_db_enable_reporting): Likewise.
9510 (find_one_thread): Don't check for thread_db_use_events.
9511 (attach_thread): Likewise.
9512 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
9513 (try_thread_db_load_1): Don't check for thread_db_use_events.
9514 (thread_db_init): Remove use_events argument and thread events
9515 handling.
9516 (remove_thread_event_breakpoints): Remove function.
9517 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
9518
9519 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9520
9521 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
9522 New function.
9523 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9524 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
9525 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9526 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
9527 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
9528 Initialize.
9529 * linux-crisv32-low.c (cris_supports_hardware_single_step):
9530 New function.
9531 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9532 * linux-low.c (can_hardware_single_step): Use
9533 supports_hardware_single_step.
9534 (can_software_single_step): New function.
9535 (start_step_over): Call can_software_single_step.
9536 (linux_supports_hardware_single_step): New function.
9537 (struct target_ops) <supports_software_single_step>: Initialize.
9538 * linux-low.h (struct linux_target_ops)
9539 <supports_hardware_single_step>: Initialize.
9540 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
9541 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9542 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
9543 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
9544 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
9545 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9546 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
9547 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9548 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
9549 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
9550 Initialize.
9551 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
9552 (struct linux_target_ops) <tile_supports_hardware_single_step>:
9553 Initialize.
9554 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
9555 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9556 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
9557 New function.
9558 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9559 * target.h (struct target_ops): <supports_software_single_step>:
9560 New field.
9561 (target_supports_software_single_step): New macro.
9562
9563 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9564
9565 * linux-low.c (linux_wait_1): Fix pc advance condition.
9566 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
9567 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
9568
9569 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9570
9571 * linux-arm-low.c (arm_is_thumb_mode): New function.
9572 (arm_breakpoint_at): Use arm_is_thumb_mode.
9573 (arm_breakpoint_kind_from_current_state): New function.
9574 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
9575 Initialize.
9576 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
9577 (linux_breakpoint_kind_from_current_state): New function.
9578 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
9579 * linux-low.h (struct linux_target_ops)
9580 <breakpoint_kind_from_current_state>: New field.
9581 * target.h (struct target_ops): Likewise.
9582 (target_breakpoint_kind_from_current_state): New macro.
9583
9584 2015-11-30 Pedro Alves <palves@redhat.com>
9585
9586 * linux-low.c (linux_resume): Wake up the event loop before
9587 returning.
9588
9589 2015-11-30 Pedro Alves <palves@redhat.com>
9590
9591 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
9592 check.
9593 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
9594 to -1.
9595 * target.c (struct thread_search): New structure.
9596 (thread_search_callback): New function.
9597 (prev_general_thread): New global.
9598 (prepare_to_access_memory, done_accessing_memory): New functions.
9599 * target.h (prepare_to_access_memory, done_accessing_memory):
9600 Replace macros with function declarations.
9601
9602 2015-11-30 Pedro Alves <palves@redhat.com>
9603
9604 PR 14618
9605 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
9606 report TARGET_WAITKIND_NO_RESUMED.
9607 * remote-utils.c (prepare_resume_reply): Handle
9608 TARGET_WAITKIND_NO_RESUMED.
9609 * server.c (report_no_resumed): New global.
9610 (handle_query) <qSupported>: Handle "no-resumed+". Report
9611 "no-resumed+" support.
9612 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
9613 return error if the client doesn't support no-resumed events.
9614 (push_stop_notification): New function.
9615 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
9616 events if the client supports them.
9617
9618 2015-11-30 Pedro Alves <palves@redhat.com>
9619
9620 * linux-low.c (thread_still_has_status_pending_p): Don't check
9621 vCont;t here.
9622 (lwp_resumed): New function.
9623 (status_pending_p_callback): Return early if the LWP is not
9624 supposed to be resumed.
9625
9626 2015-11-30 Pedro Alves <palves@redhat.com>
9627
9628 * linux-low.c (handle_extended_wait): Assert that the LWP's
9629 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
9630 thread create events, leave the new child's status pending.
9631 (linux_low_filter_event): If GDB wants to hear about thread exit
9632 events, leave the LWP marked dead and don't delete it.
9633 (linux_wait_for_event_filtered): Don't check for thread exit.
9634 (filter_exit_event): New function.
9635 (linux_wait_1): Use it, when returning an exit event.
9636 (linux_resume_one_lwp_throw): Assert that the LWP's
9637 waitstatus is TARGET_WAITKIND_IGNORE.
9638 * remote-utils.c (prepare_resume_reply): Handle
9639 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
9640 * server.c (report_thread_events): New global.
9641 (handle_general_set): Handle QThreadEvents.
9642 (handle_query) <qSupported>: Handle and report QThreadEvents+;
9643 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
9644 TARGET_WAITKIND_THREAD_EXITED.
9645 * server.h (report_thread_events): Declare.
9646
9647 2015-11-30 Pedro Alves <palves@redhat.com>
9648
9649 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
9650 the thread's last_resume_kind was resume_stop.
9651
9652 2015-11-30 Pedro Alves <palves@redhat.com>
9653
9654 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
9655 before returning.
9656
9657 2015-11-30 Pedro Alves <palves@redhat.com>
9658
9659 * server.c (handle_v_requests): Handle vCtrlC.
9660
9661 2015-11-30 Pedro Alves <palves@redhat.com>
9662
9663 * gdbthread.h (find_any_thread_of_pid): Declare.
9664 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
9665 functions.
9666 * server.c (handle_query): If current_thread is NULL, look for
9667 another thread of the selected process.
9668
9669 2015-11-26 Daniel Colascione <dancol@dancol.org>
9670 Simon Marchi <simon.marchi@ericsson.com>
9671
9672 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
9673 * server.c (handle_qxfer_threads_worker): Refactor to include thread
9674 name in reply.
9675 * target.h (struct target_ops) <thread_name>: New field.
9676 (target_thread_name): New macro.
9677
9678 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9679
9680 * regcache.h (regcache_invalidate_pid): Add declaration.
9681 * regcache.c (regcache_invalidate_pid): New function, extracted
9682 from regcache_invalidate.
9683 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
9684 Add trivial documentation comment.
9685 * lynx-low.c: Use regcache_invalidate_pid instead of
9686 regcache_invalidate.
9687
9688 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9689
9690 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
9691 and Elf64_auxv_t if the target is Android.
9692
9693 2015-11-22 Doug Evans <xdje42@gmail.com>
9694
9695 * target.h: #include <sys/types.h>.
9696
9697 2015-11-19 Pedro Alves <palves@redhat.com>
9698
9699 * linux-low.c (linux_process_qsupported): Change prototype.
9700 Adjust.
9701 * linux-low.h (struct linux_target_ops) <process_qsupported>:
9702 Change prototype.
9703 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
9704 and adjust to loop over all features.
9705 * server.c (handle_query) <qSupported>: Adjust to call
9706 target_process_qsupported once, passing it a vector of unprocessed
9707 features.
9708 * target.h (struct target_ops) <process_qsupported>: Change
9709 prototype.
9710 (target_process_qsupported): Adjust.
9711
9712 2015-11-19 Pedro Alves <palves@redhat.com>
9713
9714 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
9715 mode.
9716 * configure: Regenerate.
9717
9718 2015-11-19 Pedro Alves <palves@redhat.com>
9719
9720 * configure: Regenerate.
9721
9722 2015-11-19 Yao Qi <yao.qi@linaro.org>
9723
9724 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
9725 type to uint32_t.
9726
9727 2015-11-19 Yao Qi <yao.qi@linaro.org>
9728
9729 * linux-aarch64-low.c (enum aarch64_operand_type): New.
9730 (struct aarch64_operand): Move enum out.
9731
9732 2015-11-19 Yao Qi <yao.qi@linaro.org>
9733
9734 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
9735 struct user_fpsimd_state *.
9736 (aarch64_store_fpregset): Likewise.
9737
9738 2015-11-19 Yao Qi <yao.qi@linaro.org>
9739
9740 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
9741 struct user_pt_regs *.
9742 (aarch64_store_gregset): Likewise.
9743
9744 2015-11-18 Pedro Alves <palves@redhat.com>
9745
9746 * Makefile.in (all_object_files): Add $IPA_OBJS.
9747
9748 2015-11-17 Pedro Alves <palves@redhat.com>
9749
9750 * win32-low.c (win32_resume): Use gdb_signal_from_host,
9751 GDB_SIGNAL_0 and gdb_signal_to_string.
9752
9753 2015-11-17 Pedro Alves <palves@redhat.com>
9754
9755 * win32-low.c (handle_output_debug_string): Remove parameter.
9756 (win32_kill): Remove our_status local and adjust call to
9757 handle_output_debug_string.
9758 (get_child_debug_event): Adjust call to
9759 handle_output_debug_string.
9760
9761 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9762
9763 * linux-mips-low.c (mips_fill_gregset): Add cast.
9764 (mips_store_gregset): Likewise.
9765 (mips_fill_fpregset): Likewise.
9766 (mips_store_fpregset): Likewise.
9767
9768 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9769
9770 * linux-mips-low.c (mips_add_watchpoint): Rename private to
9771 priv.
9772
9773 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9774
9775 * linux-mips-low.c (mips_linux_new_thread): Change type of
9776 watch_type to enum target_hw_bp_type.
9777
9778 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9779
9780 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
9781 Change return type to arm_hwbp_type.
9782
9783 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9784
9785 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
9786 (arm_store_gregset): Likewise.
9787 * linux-arm-low.c (arm_get_hwcap): Likewise.
9788 (arm_read_description): Likewise.
9789
9790 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9791
9792 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
9793
9794 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9795
9796 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
9797 (ppc_fill_vsxregset): Likewise.
9798 (ppc_store_vsxregset): Likewise.
9799 (ppc_fill_vrregset): Likewise.
9800 (ppc_store_vrregset): Likewise.
9801 (ppc_fill_evrregset): Likewise.
9802 (ppc_store_evrregset): Likewise.
9803
9804 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9805
9806 * linux-ppc-low.c (ppc_usrregs_info): Remove
9807 forward-declaration.
9808 (ppc_arch_setup): Move lower in file.
9809
9810 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
9811
9812 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
9813 (ps_pdwrite): Likewise.
9814
9815 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
9816
9817 * linux-arm-low.c (arm_new_thread): Move pointer dereference
9818 to after assert checks.
9819
9820 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
9821
9822 * proc-service.c (ps_pdread): Add/adjust casts.
9823 (ps_pdwrite): Add/adjust casts.
9824
9825 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9826
9827 * server.c (handle_search_memory_1): Cast return value of
9828 memmem.
9829
9830 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9831
9832 * server.c (write_qxfer_response): Change type of data to
9833 gdb_byte *.
9834
9835 2015-10-29 Pedro Alves <palves@redhat.com>
9836
9837 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
9838
9839 2015-10-29 Pedro Alves <palves@redhat.com>
9840
9841 * tracepoint.c (clear_installed_tracepoints): Add casts.
9842
9843 2015-10-29 Pedro Alves <palves@redhat.com>
9844
9845 * server.c (handle_v_cont, process_serial_event): Add enum
9846 gdb_signal casts to signal parsing code.
9847
9848 2015-10-29 Pedro Alves <palves@redhat.com>
9849
9850 * linux-low.h (NULL_REGSET): Define.
9851 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9852 * linux-arm-low.c (arm_regsets): Likewise.
9853 * linux-crisv32-low.c (cris_regsets): Likewise.
9854 * linux-m68k-low.c (m68k_regsets): Likewise.
9855 * linux-mips-low.c (mips_regsets): Likewise.
9856 * linux-nios2-low.c (nios2_regsets): Likewise.
9857 * linux-ppc-low.c (ppc_regsets): Likewise.
9858 * linux-s390-low.c (s390_regsets): Likewise.
9859 * linux-sh-low.c (sh_regsets): Likewise.
9860 * linux-sparc-low.c (sparc_regsets): Likewise.
9861 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9862 * linux-tile-low.c (tile_regsets): Likewise.
9863 * linux-x86-low.c (x86_regsets): Likewise.
9864 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9865
9866 2015-10-29 Pedro Alves <palves@redhat.com>
9867
9868 * linux-low.h (NULL_REGSET): Define.
9869 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9870 * linux-arm-low.c (arm_regsets): Likewise.
9871 * linux-crisv32-low.c (cris_regsets): Likewise.
9872 * linux-m68k-low.c (m68k_regsets): Likewise.
9873 * linux-mips-low.c (mips_regsets): Likewise.
9874 * linux-nios2-low.c (nios2_regsets): Likewise.
9875 * linux-ppc-low.c (ppc_regsets): Likewise.
9876 * linux-s390-low.c (s390_regsets): Likewise.
9877 * linux-sh-low.c (sh_regsets): Likewise.
9878 * linux-sparc-low.c (sparc_regsets): Likewise.
9879 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9880 * linux-tile-low.c (tile_regsets): Likewise.
9881 * linux-x86-low.c (x86_regsets): Likewise.
9882 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9883
9884 2015-10-26 Doug Evans <dje@google.com>
9885
9886 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
9887
9888 2015-10-26 Doug Evans <dje@google.com>
9889
9890 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
9891
9892 2015-10-26 Doug Evans <dje@google.com>
9893
9894 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
9895 for debug_printf.
9896 (attach_thread, find_new_threads_callback): Ditto.
9897
9898 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9899
9900 * mem-break.h (set_breakpoint_data): Remove.
9901
9902 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9903
9904 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
9905 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9906 (initialize_low): Remove set_breakpoint_data call.
9907 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
9908 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
9909 (initialize_low): Remove set_breakpoint_data call.
9910 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
9911 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9912 (initialize_low): Remove set_breakpoint_data call.
9913
9914 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9915
9916 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
9917 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
9918 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
9919 * target.h (target_breakpoint_kind_from_pc): New macro.
9920
9921 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
9922
9923 * linux-low.c (default_breakpoint_kind_from_pc): New function.
9924 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
9925 the default breakpoint kind.
9926
9927 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9928
9929 * linux-arm-low.c (arm_supports_z_point_type): Add software
9930 breakpoint support.
9931
9932 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9933
9934 * linux-arm-low.c: Refactor breakpoint definitions.
9935 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
9936 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
9937
9938 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9939
9940 * Makefile.in: Add arm.c/o.
9941 * configure.srv: Likewise.
9942 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
9943 (arm_breakpoint_kind_from_pc): New function.
9944 (arm_sw_breakpoint_from_kind): Return proper kind.
9945 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
9946
9947 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9948
9949 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
9950 removal.
9951 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
9952 (struct raw_breakpoint) <size>: Remove.
9953 (struct raw_breakpoint) <kind>: Add.
9954 (bp_size): New function.
9955 (bp_opcode): Likewise.
9956 (find_raw_breakpoint_at): Adjust for kind.
9957 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
9958 (remove_memory_breakpoint): Adjust for kind call bp_size.
9959 (set_raw_breakpoint_at): Adjust for kind.
9960 (set_breakpoint): Likewise.
9961 (set_breakpoint_at): Call breakpoint_kind_from_pc.
9962 (delete_raw_breakpoint): Adjust for kind.
9963 (delete_breakpoint): Likewise.
9964 (find_gdb_breakpoint): Likewise.
9965 (set_gdb_breakpoint_1): Likewise.
9966 (set_gdb_breakpoint): Likewise.
9967 (delete_gdb_breakpoint_1): Likewise.
9968 (delete_gdb_breakpoint): Likewise.
9969 (uninsert_raw_breakpoint): Likewise.
9970 (reinsert_raw_breakpoint): Likewise.
9971 (set_breakpoint_data): Remove.
9972 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
9973 (check_mem_read): Adjust for kind call bp_size.
9974 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
9975 (clone_one_breakpoint): Adjust for kind.
9976 * mem-break.h (set_gdb_breakpoint): Likewise.
9977 (delete_gdb_breakpoint): Likewise.
9978 * server.c (process_serial_event): Likewise.
9979
9980 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
9981
9982 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
9983 (struct linux_target_ops) <breakpoint>: Remove.
9984 (struct linux_target_ops) <breakpoint_len>: Remove.
9985 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9986 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9987 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
9988 (arm_sw_breakpoint_from_kind): New function.
9989 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
9990 (struct linux_target_ops) <breakpoint>: Remove.
9991 (struct linux_target_ops) <breakpoint_len>: Remove.
9992 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9993 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9994 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
9995 (struct linux_target_ops) <breakpoint>: Remove.
9996 (struct linux_target_ops) <breakpoint_len>: Remove.
9997 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
9998 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
9999 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
10000 (struct linux_target_ops) <breakpoint>: Remove.
10001 (struct linux_target_ops) <breakpoint_len>: Remove.
10002 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10003 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10004 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
10005 and sw_breakpoint_from_kind to increment the pc.
10006 (linux_breakpoint_kind_from_pc): New function.
10007 (linux_sw_breakpoint_from_kind): New function.
10008 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
10009 (initialize_low): Call breakpoint_kind_from_pc and
10010 sw_breakpoint_from_kind to replace breakpoint_data/len.
10011 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
10012 New field.
10013 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
10014 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
10015 (struct linux_target_ops) <breakpoint>: Remove.
10016 (struct linux_target_ops) <breakpoint_len>: Remove.
10017 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10018 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10019 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
10020 (struct linux_target_ops) <breakpoint>: Remove.
10021 (struct linux_target_ops) <breakpoint_len>: Remove.
10022 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10023 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10024 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
10025 (struct linux_target_ops) <breakpoint>: Remove.
10026 (struct linux_target_ops) <breakpoint_len>: Remove.
10027 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10028 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10029 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
10030 (struct linux_target_ops) <breakpoint>: Remove.
10031 (struct linux_target_ops) <breakpoint_len>: Remove.
10032 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10033 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10034 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
10035 (struct linux_target_ops) <breakpoint>: Remove.
10036 (struct linux_target_ops) <breakpoint_len>: Remove.
10037 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10038 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10039 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
10040 (struct linux_target_ops) <breakpoint>: Remove.
10041 (struct linux_target_ops) <breakpoint_len>: Remove.
10042 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10043 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10044 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
10045 (struct linux_target_ops) <breakpoint>: Remove.
10046 (struct linux_target_ops) <breakpoint_len>: Remove.
10047 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10048 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10049 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
10050 (struct linux_target_ops) <breakpoint>: Remove.
10051 (struct linux_target_ops) <breakpoint_len>: Remove.
10052 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10053 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10054 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
10055 (struct linux_target_ops) <breakpoint>: Remove.
10056 (struct linux_target_ops) <breakpoint_len>: Remove.
10057 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10058 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10059 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
10060 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
10061 (struct linux_target_ops) <breakpoint>: Remove.
10062 (struct linux_target_ops) <breakpoint_len>: Remove.
10063 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10064 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10065 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
10066 (struct linux_target_ops) <breakpoint>: Remove.
10067 (struct linux_target_ops) <breakpoint_len>: Remove.
10068 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10069 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10070
10071 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10072
10073 * linux-cris-low.c (cris_get_pc): Remove void arg.
10074
10075 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
10076
10077 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
10078 variable name.
10079
10080 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
10081
10082 * inferiors.c (thread_pid_matches_callback): New function.
10083 (find_thread_process): New function.
10084 (remove_thread): Reset current_thread.
10085 (remove_process): Assert threads have been removed first.
10086
10087 2015-10-15 Yao Qi <yao.qi@linaro.org>
10088
10089 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
10090 if it is 3.
10091 (aarch64_remove_point): Likewise.
10092 * regcache.c (regcache_register_size): New function.
10093
10094 2015-10-12 Yao Qi <yao.qi@linaro.org>
10095
10096 * linux-aarch64-low.c: Update all callers as emit_load_store
10097 is renamed to aarch64_emit_load_store.
10098
10099 2015-10-12 Yao Qi <yao.qi@linaro.org>
10100
10101 * linux-aarch64-low.c: Update all callers of function renaming
10102 from emit_insn to aarch64_emit_insn.
10103
10104 2015-10-12 Yao Qi <yao.qi@linaro.org>
10105
10106 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
10107 arch/aarch64-insn.h.
10108 (struct aarch64_memory_operand): Likewise.
10109 (ENCODE): Likewise.
10110 (emit_insn): Move to arch/aarch64-insn.c.
10111 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
10112 (emit_load_store): Move to arch/aarch64-insn.c.
10113 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
10114 (can_encode_int32): Remove.
10115
10116 2015-10-12 Yao Qi <yao.qi@linaro.org>
10117
10118 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
10119 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
10120 (aarch64_relocate_instruction): Likewise.
10121 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
10122 (struct aarch64_insn_visitor): Likewise.
10123
10124 2015-10-12 Yao Qi <yao.qi@linaro.org>
10125
10126 * linux-aarch64-low.c (struct aarch64_insn_data): New.
10127 (struct aarch64_insn_visitor): New.
10128 (struct aarch64_insn_relocation_data): New.
10129 (aarch64_ftrace_insn_reloc_b): New function.
10130 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
10131 (aarch64_ftrace_insn_reloc_cb): Likewise.
10132 (aarch64_ftrace_insn_reloc_tb): Likewise.
10133 (aarch64_ftrace_insn_reloc_adr): Likewise.
10134 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
10135 (aarch64_ftrace_insn_reloc_others): Likewise.
10136 (visitor): New.
10137 (aarch64_relocate_instruction): Use visitor.
10138
10139 2015-10-12 Yao Qi <yao.qi@linaro.org>
10140
10141 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
10142 int. Add argument buf.
10143 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
10144 aarch64_relocate_instruction.
10145
10146 2015-10-12 Yao Qi <yao.qi@linaro.org>
10147
10148 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
10149 argument insn. Remove local variable insn. Don't call
10150 target_read_uint32.
10151 (aarch64_install_fast_tracepoint_jump_pad): Call
10152 target_read_uint32.
10153
10154 2015-09-30 Yao Qi <yao.qi@linaro.org>
10155
10156 * linux-aarch64-low.c (emit_movk): Shorten a long line.
10157 (emit_load_store_pair): Likewise.
10158
10159 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
10160
10161 * dll.c (match_dll): Add cast(s).
10162 (unloaded_dll): Likewise.
10163 * linux-low.c (second_thread_of_pid_p): Likewise.
10164 (delete_lwp_callback): Likewise.
10165 (count_events_callback): Likewise.
10166 (select_event_lwp_callback): Likewise.
10167 (linux_set_resume_request): Likewise.
10168 * server.c (accumulate_file_name_length): Likewise.
10169 (emit_dll_description): Likewise.
10170 (handle_qxfer_threads_worker): Likewise.
10171 (visit_actioned_threads): Likewise.
10172 * thread-db.c (any_thread_of): Likewise.
10173 * tracepoint.c (same_process_p): Likewise.
10174 (match_blocktype): Likewise.
10175 (build_traceframe_info_xml): Likewise.
10176
10177 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
10178
10179 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
10180 assignment.
10181 (gdb_unparse_agent_expr): Likewise.
10182 * hostio.c (require_data): Likewise.
10183 (handle_pread): Likewise.
10184 * linux-low.c (disable_regset): Likewise.
10185 (fetch_register): Likewise.
10186 (store_register): Likewise.
10187 (get_dynamic): Likewise.
10188 (linux_qxfer_libraries_svr4): Likewise.
10189 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
10190 (set_fast_tracepoint_jump): Likewise.
10191 (uninsert_fast_tracepoint_jumps_at): Likewise.
10192 (reinsert_fast_tracepoint_jumps_at): Likewise.
10193 (validate_inserted_breakpoint): Likewise.
10194 (clone_agent_expr): Likewise.
10195 * regcache.c (init_register_cache): Likewise.
10196 * remote-utils.c (putpkt_binary_1): Likewise.
10197 (decode_M_packet): Likewise.
10198 (decode_X_packet): Likewise.
10199 (look_up_one_symbol): Likewise.
10200 (relocate_instruction): Likewise.
10201 (monitor_output): Likewise.
10202 * server.c (handle_search_memory): Likewise.
10203 (handle_qxfer_exec_file): Likewise.
10204 (handle_qxfer_libraries): Likewise.
10205 (handle_qxfer): Likewise.
10206 (handle_query): Likewise.
10207 (handle_v_cont): Likewise.
10208 (handle_v_run): Likewise.
10209 (captured_main): Likewise.
10210 * target.c (write_inferior_memory): Likewise.
10211 * thread-db.c (try_thread_db_load_from_dir): Likewise.
10212 * tracepoint.c (init_trace_buffer): Likewise.
10213 (add_tracepoint_action): Likewise.
10214 (add_traceframe): Likewise.
10215 (add_traceframe_block): Likewise.
10216 (cmd_qtdpsrc): Likewise.
10217 (cmd_qtdv): Likewise.
10218 (cmd_qtstatus): Likewise.
10219 (response_source): Likewise.
10220 (response_tsv): Likewise.
10221 (cmd_qtnotes): Likewise.
10222 (gdb_collect): Likewise.
10223 (initialize_tracepoint): Likewise.
10224
10225 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10226
10227 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
10228 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
10229 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
10230 <NOP>: New.
10231 (enum aarch64_condition_codes): New enum.
10232 (w0): New static global.
10233 (fp): Likewise.
10234 (lr): Likewise.
10235 (struct aarch64_memory_operand) <type>: New
10236 MEMORY_OPERAND_POSTINDEX type.
10237 (postindex_memory_operand): New helper function.
10238 (emit_ret): New function.
10239 (emit_load_store_pair): New function, factored out of emit_stp
10240 with support for MEMORY_OPERAND_POSTINDEX.
10241 (emit_stp): Rewrite using emit_load_store_pair.
10242 (emit_ldp): New function.
10243 (emit_load_store): Likewise.
10244 (emit_ldr): Mention post-index instruction in comment.
10245 (emit_ldrh): New function.
10246 (emit_ldrb): New function.
10247 (emit_ldrsw): Mention post-index instruction in comment.
10248 (emit_str): Likewise.
10249 (emit_subs): New function.
10250 (emit_cmp): Likewise.
10251 (emit_and): Likewise.
10252 (emit_orr): Likewise.
10253 (emit_orn): Likewise.
10254 (emit_eor): Likewise.
10255 (emit_mvn): Likewise.
10256 (emit_lslv): Likewise.
10257 (emit_lsrv): Likewise.
10258 (emit_asrv): Likewise.
10259 (emit_mul): Likewise.
10260 (emit_sbfm): Likewise.
10261 (emit_sbfx): Likewise.
10262 (emit_ubfm): Likewise.
10263 (emit_ubfx): Likewise.
10264 (emit_csinc): Likewise.
10265 (emit_cset): Likewise.
10266 (emit_nop): Likewise.
10267 (emit_ops_insns): New helper function.
10268 (emit_pop): Likewise.
10269 (emit_push): Likewise.
10270 (aarch64_emit_prologue): New function.
10271 (aarch64_emit_epilogue): Likewise.
10272 (aarch64_emit_add): Likewise.
10273 (aarch64_emit_sub): Likewise.
10274 (aarch64_emit_mul): Likewise.
10275 (aarch64_emit_lsh): Likewise.
10276 (aarch64_emit_rsh_signed): Likewise.
10277 (aarch64_emit_rsh_unsigned): Likewise.
10278 (aarch64_emit_ext): Likewise.
10279 (aarch64_emit_log_not): Likewise.
10280 (aarch64_emit_bit_and): Likewise.
10281 (aarch64_emit_bit_or): Likewise.
10282 (aarch64_emit_bit_xor): Likewise.
10283 (aarch64_emit_bit_not): Likewise.
10284 (aarch64_emit_equal): Likewise.
10285 (aarch64_emit_less_signed): Likewise.
10286 (aarch64_emit_less_unsigned): Likewise.
10287 (aarch64_emit_ref): Likewise.
10288 (aarch64_emit_if_goto): Likewise.
10289 (aarch64_emit_goto): Likewise.
10290 (aarch64_write_goto_address): Likewise.
10291 (aarch64_emit_const): Likewise.
10292 (aarch64_emit_call): Likewise.
10293 (aarch64_emit_reg): Likewise.
10294 (aarch64_emit_pop): Likewise.
10295 (aarch64_emit_stack_flush): Likewise.
10296 (aarch64_emit_zero_ext): Likewise.
10297 (aarch64_emit_swap): Likewise.
10298 (aarch64_emit_stack_adjust): Likewise.
10299 (aarch64_emit_int_call_1): Likewise.
10300 (aarch64_emit_void_call_2): Likewise.
10301 (aarch64_emit_eq_goto): Likewise.
10302 (aarch64_emit_ne_goto): Likewise.
10303 (aarch64_emit_lt_goto): Likewise.
10304 (aarch64_emit_le_goto): Likewise.
10305 (aarch64_emit_gt_goto): Likewise.
10306 (aarch64_emit_ge_got): Likewise.
10307 (aarch64_emit_ops_impl): New static global variable.
10308 (aarch64_emit_ops): New target function, return
10309 &aarch64_emit_ops_impl.
10310 (struct linux_target_ops): Install it.
10311
10312 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10313
10314 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
10315 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
10316 aarch64-ipa.o.
10317 * linux-aarch64-ipa.c: New file.
10318 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
10319 and endian.h.
10320 (aarch64_get_thread_area): New target method.
10321 (extract_signed_bitfield): New helper function.
10322 (aarch64_decode_ldr_literal): New function.
10323 (enum aarch64_opcodes): New enum.
10324 (struct aarch64_register): New struct.
10325 (struct aarch64_operand): New struct.
10326 (x0): New static global.
10327 (x1): Likewise.
10328 (x2): Likewise.
10329 (x3): Likewise.
10330 (x4): Likewise.
10331 (w2): Likewise.
10332 (ip0): Likewise.
10333 (sp): Likewise.
10334 (xzr): Likewise.
10335 (aarch64_register): New helper function.
10336 (register_operand): Likewise.
10337 (immediate_operand): Likewise.
10338 (struct aarch64_memory_operand): New struct.
10339 (offset_memory_operand): New helper function.
10340 (preindex_memory_operand): Likewise.
10341 (enum aarch64_system_control_registers): New enum.
10342 (ENCODE): New macro.
10343 (emit_insn): New helper function.
10344 (emit_b): New function.
10345 (emit_bcond): Likewise.
10346 (emit_cb): Likewise.
10347 (emit_tb): Likewise.
10348 (emit_blr): Likewise.
10349 (emit_stp): Likewise.
10350 (emit_ldp_q_offset): Likewise.
10351 (emit_stp_q_offset): Likewise.
10352 (emit_load_store): Likewise.
10353 (emit_ldr): Likewise.
10354 (emit_ldrsw): Likewise.
10355 (emit_str): Likewise.
10356 (emit_ldaxr): Likewise.
10357 (emit_stxr): Likewise.
10358 (emit_stlr): Likewise.
10359 (emit_data_processing_reg): Likewise.
10360 (emit_data_processing): Likewise.
10361 (emit_add): Likewise.
10362 (emit_sub): Likewise.
10363 (emit_mov): Likewise.
10364 (emit_movk): Likewise.
10365 (emit_mov_addr): Likewise.
10366 (emit_mrs): Likewise.
10367 (emit_msr): Likewise.
10368 (emit_sevl): Likewise.
10369 (emit_wfe): Likewise.
10370 (append_insns): Likewise.
10371 (can_encode_int32_in): New helper function.
10372 (aarch64_relocate_instruction): New function.
10373 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
10374 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
10375 (struct linux_target_ops): Install aarch64_get_thread_area,
10376 aarch64_install_fast_tracepoint_jump_pad and
10377 aarch64_get_min_fast_tracepoint_insn_len.
10378
10379 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10380
10381 * Makefile.in (aarch64-insn.o): New rule.
10382 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
10383
10384 2015-09-21 Yao Qi <yao.qi@linaro.org>
10385
10386 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
10387
10388 2015-09-21 Yao Qi <yao.qi@linaro.org>
10389
10390 * tracepoint.c (max_jump_pad_size): Remove.
10391
10392 2015-09-18 Yao Qi <yao.qi@linaro.org>
10393
10394 * linux-aarch64-low.c: Don't include sys/uio.h.
10395 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
10396
10397 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
10398
10399 * tracepoint.c (eval_result_type): Change prototype.
10400 (condition_true_at_tracepoint): Fix argument to compiled_cond.
10401
10402 2015-09-15 Pedro Alves <palves@redhat.com>
10403
10404 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
10405 Check whether to report exec events instead of checking whether
10406 multiprocess is enabled.
10407
10408 2015-09-15 Pedro Alves <palves@redhat.com>
10409
10410 PR remote/18965
10411 * remote-utils.c (prepare_resume_reply): Merge
10412 TARGET_WAITKIND_VFORK_DONE switch case with the
10413 TARGET_WAITKIND_FORKED case.
10414
10415 2015-09-15 Yao Qi <yao.qi@linaro.org>
10416
10417 * server.c (handle_query): Check string comparison using
10418 "else if" instead of "if".
10419
10420 2015-09-15 Yao Qi <yao.qi@linaro.org>
10421
10422 * server.c (vCont_supported): New global variable.
10423 (handle_query): Set vCont_supported to 1 if "vContSupported+"
10424 matches. Append ";vContSupported+" to own_buf.
10425 (handle_v_requests): Append ";s;S" to own_buf if target supports
10426 hardware single step or vCont_supported is false.
10427 (capture_main): Set vCont_supported to zero.
10428
10429 2015-09-15 Yao Qi <yao.qi@linaro.org>
10430
10431 * linux-low.c (linux_supports_conditional_breakpoints): Rename
10432 it to ...
10433 (linux_supports_hardware_single_step): ... New function.
10434 (linux_target_ops): Update.
10435 * lynx-low.c (lynx_target_ops): Set field
10436 supports_hardware_single_step to target_can_do_hardware_single_step.
10437 * nto-low.c (nto_target_ops): Likewise.
10438 * spu-low.c (spu_target_ops): Likewise.
10439 * win32-low.c (win32_target_ops): Likewise.
10440 * target.c (target_can_do_hardware_single_step): New function.
10441 * target.h (struct target_ops) <supports_conditional_breakpoints>:
10442 Remove. <supports_hardware_single_step>: New field.
10443 (target_supports_conditional_breakpoints): Remove.
10444 (target_supports_hardware_single_step): New macro.
10445 (target_can_do_hardware_single_step): Declare.
10446 * server.c (handle_query): Use target_supports_hardware_single_step
10447 instead of target_supports_conditional_breakpoints.
10448
10449 2015-09-15 Yao Qi <yao.qi@linaro.org>
10450
10451 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
10452 function.
10453 (struct linux_target_ops the_low_target): Install
10454 aarch64_linux_siginfo_fixup.
10455
10456 2015-09-11 Don Breazeal <donb@codesourcery.com>
10457 Luis Machado <lgustavo@codesourcery.com>
10458
10459 * linux-low.c (linux_mourn): Static declaration.
10460 (linux_arch_setup): Move in front of
10461 handle_extended_wait.
10462 (linux_arch_setup_thread): New function.
10463 (handle_extended_wait): Handle exec events. Call
10464 linux_arch_setup_thread. Make event_lwp argument a
10465 pointer-to-a-pointer.
10466 (check_zombie_leaders): Do not check stopped threads.
10467 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
10468 (linux_low_filter_event): Add lwp and thread for exec'ing
10469 non-leader thread if leader thread has been deleted.
10470 Refactor code into linux_arch_setup_thread and call it.
10471 Pass child lwp pointer by reference to handle_extended_wait.
10472 (linux_wait_for_event_filtered): Update comment.
10473 (linux_wait_1): Prevent clobbering exec event status.
10474 (linux_supports_exec_events): New function.
10475 (linux_target_ops) <supports_exec_events>: Initialize new member.
10476 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
10477 new member.
10478 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
10479 * server.c (report_exec_events): New global variable.
10480 (handle_query): Handle qSupported query for exec-events feature.
10481 (captured_main): Initialize report_exec_events.
10482 * server.h (report_exec_events): Declare new global variable.
10483 * target.h (struct target_ops) <supports_exec_events>: New
10484 member.
10485 (target_supports_exec_events): New macro.
10486 * win32-low.c (win32_target_ops) <supports_exec_events>:
10487 Initialize new member.
10488
10489 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
10490
10491 * linux-low.c (linux_low_enable_btrace): Remove.
10492 (linux_target_ops): Replace linux_low_enable_btrace with
10493 linux_enable_btrace.
10494
10495 2015-09-03 Yao Qi <yao.qi@linaro.org>
10496
10497 * linux-aarch64-low.c (aarch64_insert_point): Call
10498 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
10499 returns true.
10500
10501 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10502
10503 * linux-low.c (check_stopped_by_breakpoint): Use
10504 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
10505
10506 2015-08-27 Pedro Alves <palves@redhat.com>
10507
10508 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
10509
10510 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
10511
10512 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
10513 the XNEW-family equivalent.
10514 (compile_bytecodes): Likewise.
10515 * dll.c (loaded_dll): Likewise.
10516 * event-loop.c (append_callback_event): Likewise.
10517 (create_file_handler): Likewise.
10518 (create_file_event): Likewise.
10519 * hostio.c (handle_open): Likewise.
10520 * inferiors.c (add_thread): Likewise.
10521 (add_process): Likewise.
10522 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
10523 * linux-arm-low.c (arm_new_process): Likewise.
10524 (arm_new_thread): Likewise.
10525 * linux-low.c (add_to_pid_list): Likewise.
10526 (linux_add_process): Likewise.
10527 (handle_extended_wait): Likewise.
10528 (add_lwp): Likewise.
10529 (enqueue_one_deferred_signal): Likewise.
10530 (enqueue_pending_signal): Likewise.
10531 (linux_resume_one_lwp_throw): Likewise.
10532 (linux_resume_one_thread): Likewise.
10533 (linux_read_memory): Likewise.
10534 (linux_write_memory): Likewise.
10535 * linux-mips-low.c (mips_linux_new_process): Likewise.
10536 (mips_linux_new_thread): Likewise.
10537 (mips_add_watchpoint): Likewise.
10538 * linux-x86-low.c (initialize_low_arch): Likewise.
10539 * lynx-low.c (lynx_add_process): Likewise.
10540 * mem-break.c (set_raw_breakpoint_at): Likewise.
10541 (set_breakpoint): Likewise.
10542 (add_condition_to_breakpoint): Likewise.
10543 (add_commands_to_breakpoint): Likewise.
10544 (clone_agent_expr): Likewise.
10545 (clone_one_breakpoint): Likewise.
10546 * regcache.c (new_register_cache): Likewise.
10547 * remote-utils.c (look_up_one_symbol): Likewise.
10548 * server.c (queue_stop_reply): Likewise.
10549 (start_inferior): Likewise.
10550 (queue_stop_reply_callback): Likewise.
10551 (handle_target_event): Likewise.
10552 * spu-low.c (fetch_ppc_memory): Likewise.
10553 (store_ppc_memory): Likewise.
10554 * target.c (set_target_ops): Likewise.
10555 * thread-db.c (thread_db_load_search): Likewise.
10556 (try_thread_db_load_1): Likewise.
10557 * tracepoint.c (add_tracepoint): Likewise.
10558 (add_tracepoint_action): Likewise.
10559 (create_trace_state_variable): Likewise.
10560 (cmd_qtdpsrc): Likewise.
10561 (cmd_qtro): Likewise.
10562 (add_while_stepping_state): Likewise.
10563 * win32-low.c (child_add_thread): Likewise.
10564 (get_image_name): Likewise.
10565
10566 2015-08-25 Yao Qi <yao.qi@linaro.org>
10567
10568 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
10569
10570 2015-08-25 Yao Qi <yao.qi@linaro.org>
10571
10572 * Makefile.in (aarch64-linux.o): New rule.
10573 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
10574 srv_tgtobj.
10575 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
10576 (aarch64_init_debug_reg_state): Make it extern.
10577 (aarch64_linux_prepare_to_resume): Remove.
10578
10579 2015-08-25 Yao Qi <yao.qi@linaro.org>
10580
10581 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
10582 lwp_arch_private_info and ptid_of_lwp.
10583
10584 2015-08-25 Yao Qi <yao.qi@linaro.org>
10585
10586 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
10587 Find proc_info by find_process_pid. All callers updated.
10588
10589 2015-08-25 Yao Qi <yao.qi@linaro.org>
10590
10591 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
10592 Remove.
10593 (debug_reg_change_callback): Remove.
10594 (aarch64_notify_debug_reg_change): Remove.
10595
10596 2015-08-25 Yao Qi <yao.qi@linaro.org>
10597
10598 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
10599 Call current_lwp_ptid.
10600
10601 2015-08-25 Yao Qi <yao.qi@linaro.org>
10602
10603 * linux-aarch64-low.c (debug_reg_change_callback): Use
10604 debug_printf.
10605
10606 2015-08-25 Yao Qi <yao.qi@linaro.org>
10607
10608 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
10609
10610 2015-08-25 Yao Qi <yao.qi@linaro.org>
10611
10612 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
10613
10614 2015-08-25 Yao Qi <yao.qi@linaro.org>
10615
10616 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
10617 the code.
10618
10619 2015-08-25 Yao Qi <yao.qi@linaro.org>
10620
10621 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
10622 Remove.
10623 (debug_reg_change_callback): Remove argument entry and add argument
10624 lwp. Remove local variable thread. Don't print thread id in the
10625 debugging output. Don't check whether pid of thread equals to pid.
10626 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
10627 iterate_over_lwps instead find_inferior.
10628
10629 2015-08-24 Pedro Alves <palves@redhat.com>
10630
10631 * inferiors.c (get_first_process): New function.
10632 * inferiors.h (get_first_process): New declaration.
10633 * remote-utils.c (read_ptid): Default to the first process in the
10634 list, instead of to the current thread's process.
10635
10636 2015-08-24 Pedro Alves <palves@redhat.com>
10637
10638 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
10639 * event-loop.c: Likewise.
10640 * remote-utils.c: Likewise.
10641 * tracepoint.c: Likewise.
10642
10643 2015-08-24 Pedro Alves <palves@redhat.com>
10644
10645 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
10646 ptid_get_lwp.
10647
10648 2015-08-21 Pedro Alves <palves@redhat.com>
10649
10650 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
10651 instead of literal 1.
10652
10653 2015-08-21 Pedro Alves <palves@redhat.com>
10654
10655 * tdesc.c (default_description): Explicitly zero-initialize.
10656
10657 2015-08-21 Pedro Alves <palves@redhat.com>
10658
10659 PR gdb/18749
10660 * inferiors.c (remove_thread): Discard any pending stop reply for
10661 this thread.
10662 * server.c (remove_all_on_match_pid): Rename to ...
10663 (remove_all_on_match_ptid): ... this. Work with a filter ptid
10664 instead of a pid.
10665 (discard_queued_stop_replies): Change parameter to a ptid. Now
10666 extern.
10667 (handle_v_kill, kill_inferior_callback, captured_main)
10668 (process_serial_event): Adjust.
10669 * server.h (discard_queued_stop_replies): Declare.
10670
10671 2015-08-21 Pedro Alves <palves@redhat.com>
10672
10673 * linux-low.c (wait_for_sigstop): Always switch to no thread
10674 selected if the previously current thread dies.
10675 * lynx-low.c (lynx_request_interrupt): Use the first thread's
10676 process instead of the current thread's.
10677 * remote-utils.c (input_interrupt): Don't check if there's no
10678 current thread.
10679 * server.c (gdb_read_memory, gdb_write_memory): If setting the
10680 current thread to the general thread fails, error out.
10681 (handle_qxfer_auxv, handle_qxfer_libraries)
10682 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
10683 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
10684 (handle_query): Check if there's a thread selected instead of
10685 checking whether there's any thread in the thread list.
10686 (handle_qxfer_threads, handle_qxfer_btrace)
10687 (handle_qxfer_btrace_conf): Don't error out early if there's no
10688 thread in the thread list.
10689 (handle_v_cont, myresume): Don't set the current thread to the
10690 continue thread.
10691 (process_serial_event) <Hg handling>: Also set thread_id if the
10692 previous general thread is still alive.
10693 (process_serial_event) <g/G handling>: If setting the current
10694 thread to the general thread fails, error out.
10695 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
10696 thread's lwp instead of the current thread's.
10697 * target.c (set_desired_thread): If the desired thread was not
10698 found, leave the current thread pointing to NULL. Return an int
10699 (boolean) indicating success.
10700 * target.h (set_desired_thread): Change return type to int.
10701
10702 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
10703
10704 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
10705 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
10706 #includes.
10707 (ps_get_thread_area): New function.
10708
10709 2015-08-19 Gary Benson <gbenson@redhat.com>
10710
10711 * hostio.c (handle_pread): Do not attempt to read more data
10712 than hostio_reply_with_data can fit in a packet.
10713
10714 2015-08-18 Joel Brobecker <brobecker@adacore.com>
10715
10716 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
10717
10718 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
10719
10720 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
10721
10722 2015-08-06 Pedro Alves <palves@redhat.com>
10723
10724 * tracepoint.c (expr_eval_result): Now an int.
10725
10726 2015-08-06 Pedro Alves <palves@redhat.com>
10727
10728 * gdbthread.h (struct regcache): Forward declare.
10729 (struct thread_info) <regcache_data>: Now a struct regcache
10730 pointer.
10731 * inferiors.c (inferior_regcache_data)
10732 (set_inferior_regcache_data): Now work with struct regcache
10733 pointers.
10734 * inferiors.h (struct regcache): Forward declare.
10735 (inferior_regcache_data, set_inferior_regcache_data): Now work
10736 with struct regcache pointers.
10737 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
10738 (free_register_cache_thread): Remove struct regcache pointer
10739 casts.
10740
10741 2015-08-06 Pedro Alves <palves@redhat.com>
10742
10743 * server.c (captured_main): On error, print the exception message
10744 to stderr, and if run_once is set, throw a quit.
10745
10746 2015-08-06 Pedro Alves <palves@redhat.com>
10747
10748 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
10749 the current thread.
10750
10751 2015-08-06 Pedro Alves <palves@redhat.com>
10752
10753 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
10754 reading beyond the passed in buffer length.
10755
10756 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
10757
10758 * tracepoint.c (symbol_list) <required>: Remove.
10759
10760 2015-08-06 Pedro Alves <palves@redhat.com>
10761
10762 * linux-low.c (handle_extended_wait): Set the fork child's suspend
10763 count if stopping and suspending threads.
10764 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
10765 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
10766 (linux_detach): Complete an ongoing step-over.
10767 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
10768 throughout.
10769 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
10770 (linux_wait_1): If passing a signal to the inferior after
10771 finishing a step-over, unsuspend and re-resume all lwps. If we
10772 see a single-step event but the thread should be continuing, don't
10773 pass the trap to gdb.
10774 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
10775 internal_error instead of gdb_assert.
10776 (enqueue_pending_signal): New function.
10777 (check_ptrace_stopped_lwp_gone): Add debug output.
10778 (start_step_over): Use internal_error instead of gdb_assert.
10779 (complete_ongoing_step_over): New function.
10780 (linux_resume_one_thread): Don't resume a suspended thread.
10781 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
10782 it stepping.
10783
10784 2015-08-06 Pedro Alves <palves@redhat.com>
10785
10786 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
10787 (linux_thread_alive): Use lwp_is_marked_dead.
10788 (extended_event_reported): Delete.
10789 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
10790 instead of extended_event_reported.
10791 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
10792 as well.
10793 (lwp_is_marked_dead): New function.
10794 (lwp_running): Use lwp_is_marked_dead.
10795 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
10796 comment.
10797
10798 2015-08-06 Pedro Alves <palves@redhat.com>
10799
10800 * linux-low.c (linux_wait_1): Move fork event output out of the
10801 !report_to_gdb check. Pass event_child->waitstatus to
10802 target_waitstatus_to_string instead of ourstatus.
10803
10804 2015-08-04 Yao Qi <yao.qi@linaro.org>
10805
10806 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
10807 if current_thread is 32 bit.
10808
10809 2015-08-04 Yao Qi <yao.qi@linaro.org>
10810
10811 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
10812 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
10813 * server.c (extended_protocol): Remove "static".
10814 * server.h (extended_protocol): Declare it.
10815
10816 2015-08-04 Yao Qi <yao.qi@linaro.org>
10817
10818 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
10819 both aarch64 and aarch32.
10820 (aarch64_set_pc): Likewise.
10821
10822 2015-08-04 Yao Qi <yao.qi@linaro.org>
10823
10824 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
10825 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
10826 arm-with-neon.xml to srv_xmlfiles.
10827 * linux-aarch64-low.c: Include linux-aarch32-low.h.
10828 (is_64bit_tdesc): New function.
10829 (aarch64_linux_read_description): New function.
10830 (aarch64_arch_setup): Call aarch64_linux_read_description.
10831 (regs_info): Rename to regs_info_aarch64.
10832 (aarch64_regs_info): Return right regs_info.
10833 (initialize_low_arch): Call initialize_low_arch_aarch32.
10834
10835 2015-08-04 Yao Qi <yao.qi@linaro.org>
10836
10837 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
10838 * linux-aarch32-low.c: New file.
10839 * linux-aarch32-low.h: New file.
10840 * linux-arm-low.c (arm_fill_gregset): Move it to
10841 linux-aarch32-low.c.
10842 (arm_store_gregset): Likewise.
10843 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
10844 (arm_store_vfpregset): Call arm_store_vfpregset_num.
10845 (arm_arch_setup): Check if PTRACE_GETREGSET works.
10846 (regs_info): Rename to regs_info_arm.
10847 (arm_regs_info): Return regs_info_aarch32 if
10848 have_ptrace_getregset is 1 and target description is
10849 arm_with_neon or arm_with_vfpv3.
10850 (initialize_low_arch): Don't call init_registers_arm_with_neon.
10851 Call initialize_low_arch_aarch32 instead.
10852
10853 2015-08-04 Yao Qi <yao.qi@linaro.org>
10854
10855 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
10856 * linux-low.c: ... here.
10857 * linux-low.h (have_ptrace_getregset): Declare it.
10858
10859 2015-08-04 Pedro Alves <palves@redhat.com>
10860
10861 * thread-db.c (struct thread_db): Use new typedefs.
10862 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
10863 CHK calls.
10864 (disable_thread_event_reporting): Cast result of dlsym to
10865 destination function pointer type.
10866 (thread_db_mourn): Use td_ta_delete_ftype.
10867
10868 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
10869
10870 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
10871 arch variant.
10872 (CDX_BREAKPOINT): Define for R2.
10873 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
10874 (the_low_target): Add comments.
10875
10876 2015-07-30 Yao Qi <yao.qi@linaro.org>
10877
10878 * linux-arm-low.c (arm_hwcap): Remove it.
10879 (arm_read_description): New local variable arm_hwcap. Don't
10880 set arm_hwcap to zero.
10881
10882 2015-07-30 Yao Qi <yao.qi@linaro.org>
10883
10884 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
10885 Use regcache->tdesc instead.
10886 (arm_store_wmmxregset): Likewise.
10887 (arm_fill_vfpregset): Likewise.
10888 (arm_store_vfpregset): Likewise.
10889
10890 2015-07-30 Yao Qi <yao.qi@linaro.org>
10891
10892 * linux-arm-low.c: Include arch/arm.h.
10893 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
10894 (arm_store_gregset): Likewise.
10895
10896 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
10897
10898 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
10899 ptrace's 4th parameter.
10900
10901 2015-07-27 Yao Qi <yao.qi@linaro.org>
10902
10903 * configure.srv (case aarch64*-*-linux*): Don't set
10904 srv_linux_usrregs.
10905
10906 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
10907
10908 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
10909 sys/ptrace.h.
10910 * linux-arm-low.c: Likewise.
10911 * linux-cris-low.c: Likewise.
10912 * linux-crisv32-low.c: Likewise.
10913 * linux-low.c: Likewise.
10914 * linux-m68k-low.c: Likewise.
10915 * linux-mips-low.c: Likewise.
10916 * linux-nios2-low.c: Likewise.
10917 * linux-s390-low.c: Likewise.
10918 * linux-sparc-low.c: Likewise.
10919 * linux-tic6x-low.c: Likewise.
10920 * linux-tile-low.c: Likewise.
10921 * linux-x86-low.c: Likewise.
10922
10923 2015-07-24 Pedro Alves <palves@redhat.com>
10924
10925 * config.in: Regenerate.
10926 * configure: Regenerate.
10927
10928 2015-07-24 Pedro Alves <palves@redhat.com>
10929
10930 * acinclude.m4: Include ../ptrace.m4.
10931 * configure.ac: Call GDB_AC_PTRACE.
10932 * config.in, configure: Regenerate.
10933
10934 2015-07-24 Yao Qi <yao.qi@linaro.org>
10935
10936 * linux-low.c (linux_create_inferior): Remove setting to
10937 proc->priv->new_inferior.
10938 (linux_attach): Likewise.
10939 (linux_low_filter_event): Likewise.
10940 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
10941
10942 2015-07-24 Yao Qi <yao.qi@linaro.org>
10943
10944 * linux-low.c (linux_arch_setup): New function.
10945 (linux_low_filter_event): If proc->tdesc is NULL and
10946 proc->attached is true, call the_low_target.arch_setup.
10947 Otherwise, keep status pending, and return.
10948 (linux_resume_one_lwp_throw): Don't call get_pc if
10949 thread->while_stepping isn't NULL. Don't call
10950 get_thread_regcache if proc->tdesc is NULL.
10951 (need_step_over_p): Return 0 if proc->tdesc is NULL.
10952 (linux_target_ops): Install arch_setup.
10953 * server.c (start_inferior): Call the_target->arch_setup.
10954 * target.h (struct target_ops) <arch_setup>: New field.
10955 (target_arch_setup): New marco.
10956 * lynx-low.c (lynx_target_ops): Update.
10957 * nto-low.c (nto_target_ops): Update.
10958 * spu-low.c (spu_target_ops): Update.
10959 * win32-low.c (win32_target_ops): Update.
10960
10961 2015-07-24 Yao Qi <yao.qi@linaro.org>
10962
10963 * linux-low.c (linux_add_process): Don't set
10964 proc->priv->new_inferior.
10965 (linux_create_inferior): Set proc->priv->new_inferior to 1.
10966 (linux_attach): Likewise.
10967
10968 2015-07-24 Yao Qi <yao.qi@linaro.org>
10969
10970 * server.c (start_inferior): Code refactor.
10971
10972 2015-07-24 Yao Qi <yao.qi@linaro.org>
10973
10974 * server.c (process_serial_event): Set general_thread.
10975
10976 2015-07-21 Yao Qi <yao.qi@linaro.org>
10977
10978 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
10979 aarch64_linux_get_debug_reg_capacity.
10980
10981 2015-07-17 Yao Qi <yao.qi@linaro.org>
10982
10983 * Makefile.in (aarch64-linux-hw-point.o): New rule.
10984 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
10985 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
10986 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
10987 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
10988 (AARCH64_HWP_ALIGNMENT): Likewise.
10989 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
10990 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
10991 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
10992 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
10993 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
10994 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
10995 (struct aarch64_debug_reg_state): Likewise.
10996 (struct arch_lwp_info): Likewise.
10997 (aarch64_align_watchpoint): Likewise.
10998 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
10999 (aarch64_watchpoint_length): Likewise.
11000 (aarch64_point_encode_ctrl_reg): Likewise
11001 (aarch64_point_is_aligned): Likewise.
11002 (aarch64_align_watchpoint): Likewise.
11003 (aarch64_linux_set_debug_regs):
11004 (aarch64_dr_state_insert_one_point): Likewise.
11005 (aarch64_dr_state_remove_one_point): Likewise.
11006 (aarch64_handle_breakpoint): Likewise.
11007 (aarch64_handle_aligned_watchpoint): Likewise.
11008 (aarch64_handle_unaligned_watchpoint): Likewise.
11009 (aarch64_handle_watchpoint): Likewise.
11010
11011 2015-07-17 Yao Qi <yao.qi@linaro.org>
11012
11013 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
11014 and don't aarch64_get_debug_reg_state. All callers update.
11015 (aarch64_handle_aligned_watchpoint): Likewise.
11016 (aarch64_handle_unaligned_watchpoint): Likewise.
11017 (aarch64_handle_watchpoint): Likewise.
11018 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
11019 (aarch64_remove_point): Likewise.
11020
11021 2015-07-17 Yao Qi <yao.qi@linaro.org>
11022
11023 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
11024 debug_printf.
11025 (aarch64_handle_unaligned_watchpoint): Likewise.
11026
11027 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11028
11029 Revert the previous 3 commits:
11030 Move gdb_regex* to common/
11031 Move linux_find_memory_regions_full & co.
11032 gdbserver build-id attribute generator
11033
11034 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
11035 Jan Kratochvil <jan.kratochvil@redhat.com>
11036
11037 gdbserver build-id attribute generator.
11038 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
11039 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
11040 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
11041 (find_phdr): New.
11042 (get_dynamic): Use find_pdhr to traverse program headers.
11043 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
11044 (compare_mapping_entry_range, struct find_memory_region_callback_data)
11045 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
11046 (get_hex_build_id): New.
11047 (linux_qxfer_libraries_svr4): Add optional build-id attribute
11048 to reply XML document.
11049
11050 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
11051 Jan Kratochvil <jan.kratochvil@redhat.com>
11052
11053 * target.c: Include target/target-utils.h and fcntl.h.
11054 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
11055 (target_fileio_read_stralloc): New functions.
11056
11057 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11058
11059 * Makefile.in (OBS): Add gdb_regex.o.
11060 (gdb_regex.o): New.
11061 * config.in: Rebuilt.
11062 * configure: Rebuilt.
11063
11064 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
11065 Jan Kratochvil <jan.kratochvil@redhat.com>
11066
11067 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
11068 * Makefile.in (OBS): Add target-utils.o.
11069 (linux-maps.o, target-utils.o): New.
11070 * configure.srv (srv_linux_obj): Add linux-maps.o.
11071
11072 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
11073
11074 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
11075 function, return 1.
11076 (the_low_target): Install it.
11077
11078 2015-07-14 Pedro Alves <palves@redhat.com>
11079
11080 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
11081 Instead, ignore ECHILD, and throw an error for other errnos.
11082
11083 2015-07-10 Pedro Alves <palves@redhat.com>
11084
11085 * event-loop.c (struct callback_event) <data>: Change type to
11086 gdb_client_data instance instead of gdb_client_data pointer.
11087 (append_callback_event): Adjust.
11088
11089 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
11090
11091 * linux-aarch64-low.c: Add comments for each linux_target_ops
11092 method. Remove comments already covered in target_ops and
11093 linux_target_ops definitions.
11094 (the_low_target): Add comments for each unimplemented method.
11095
11096 2015-07-09 Yao Qi <yao.qi@linaro.org>
11097
11098 * linux-aarch64-low.c (aarch64_regmap): Remove.
11099 (aarch64_usrregs_info): Remove.
11100 (regs_info): Set field usrregs to NULL.
11101
11102 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
11103
11104 * linux-low.c: Include "rsp-low.h"
11105 (linux_low_encode_pt_config, linux_low_encode_raw): New.
11106 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
11107 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
11108 (handle_btrace_enable_pt): New.
11109 (handle_btrace_general_set): Support "pt".
11110 (handle_btrace_conf_general_set): Support "pt:size".
11111
11112 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
11113
11114 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
11115 Z_PACKET_SW_BP.
11116
11117 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
11118
11119 * linux-aarch64-low.c: Remove comment about endianness.
11120 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
11121 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
11122 memcmp.
11123
11124 2015-06-24 Gary Benson <gbenson@redhat.com>
11125
11126 * linux-i386-ipa.c (stdint.h): Do not include.
11127 * lynx-i386-low.c (stdint.h): Likewise.
11128 * lynx-ppc-low.c (stdint.h): Likewise.
11129 * mem-break.c (stdint.h): Likewise.
11130 * thread-db.c (stdint.h): Likewise.
11131 * tracepoint.c (stdint.h): Likewise.
11132 * win32-low.c (stdint.h): Likewise.
11133
11134 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
11135
11136 * server.c (write_qxfer_response): Update call to
11137 remote_escape_output.
11138
11139 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
11140 Jan Kratochvil <jan.kratochvil@redhat.com>
11141
11142 Merge multiple hex conversions.
11143 * gdbreplay.c (tohex): Rename to 'fromhex'.
11144 (logchar): Use fromhex.
11145
11146 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
11147
11148 * server.c (handle_qxfer_libraries): Set `version' attribute for
11149 <library-list>.
11150
11151 2015-06-10 Gary Benson <gbenson@redhat.com>
11152
11153 * target.h (struct target_ops) <multifs_open>: New field.
11154 <multifs_unlink>: Likewise.
11155 <multifs_readlink>: Likewise.
11156 * linux-low.c (nat/linux-namespaces.h): New include.
11157 (linux_target_ops): Initialize the_target->multifs_open,
11158 the_target->multifs_unlink and the_target->multifs_readlink.
11159 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
11160 * hostio.c (hostio_fs_pid): New static variable.
11161 (hostio_handle_new_gdb_connection): New function.
11162 (handle_setfs): Likewise.
11163 (handle_open): Use the_target->multifs_open as appropriate.
11164 (handle_unlink): Use the_target->multifs_unlink as appropriate.
11165 (handle_readlink): Use the_target->multifs_readlink as
11166 appropriate.
11167 (handle_vFile): Handle vFile:setfs packets.
11168 * server.c (handle_query): Call hostio_handle_new_gdb_connection
11169 after target_handle_new_gdb_connection.
11170
11171 2015-06-10 Gary Benson <gbenson@redhat.com>
11172
11173 * configure.ac (AC_CHECK_FUNCS): Add setns.
11174 * config.in: Regenerate.
11175 * configure: Likewise.
11176 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
11177 (linux-namespaces.o): New rule.
11178 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
11179
11180 2015-06-09 Gary Benson <gbenson@redhat.com>
11181
11182 * hostio.c (handle_open): Process mode argument with
11183 fileio_to_host_mode.
11184
11185 2015-06-01 Yao Qi <yao.qi@linaro.org>
11186
11187 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
11188 * linux-x86-low.c: Likewise.
11189
11190 2015-05-28 Don Breazeal <donb@codesourcery.com>
11191
11192 * linux-low.c (handle_extended_wait): Initialize
11193 thread_info.last_resume_kind for new fork children.
11194
11195 2015-05-15 Pedro Alves <palves@redhat.com>
11196
11197 * target.h (target_handle_new_gdb_connection): Rewrite using if
11198 wrapped in do/while.
11199
11200 2015-05-14 Joel Brobecker <brobecker@adacore.com>
11201
11202 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
11203 * configure, config.in: Regenerate.
11204 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
11205 Declare typedef.
11206
11207 2015-05-12 Don Breazeal <donb@codesourcery.com>
11208
11209 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
11210 PTRACE_EVENT_VFORK_DONE.
11211 (linux_low_ptrace_options, extended_event_reported): Add vfork
11212 events.
11213 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
11214 and "vforkdone" for RSP 'T' Stop Reply Packet.
11215 * server.h (report_vfork_events): Declare
11216 global variable.
11217
11218 2015-05-12 Don Breazeal <donb@codesourcery.com>
11219
11220 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
11221 (the_low_target) <new_fork>: Initialize new member.
11222 * linux-arm-low.c (arm_new_fork): New function.
11223 (the_low_target) <new_fork>: Initialize new member.
11224 * linux-low.c (handle_extended_wait): Call new target function
11225 new_fork.
11226 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
11227 * linux-mips-low.c (mips_add_watchpoint): New function
11228 extracted from mips_insert_point.
11229 (the_low_target) <new_fork>: Initialize new member.
11230 (mips_linux_new_fork): New function.
11231 (mips_insert_point): Call mips_add_watchpoint.
11232 * linux-x86-low.c (x86_linux_new_fork): New function.
11233 (the_low_target) <new_fork>: Initialize new member.
11234
11235 2015-05-12 Don Breazeal <donb@codesourcery.com>
11236
11237 * linux-low.c (handle_extended_wait): Implement return value,
11238 rename argument 'event_child' to 'event_lwp', handle
11239 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
11240 (linux_low_ptrace_options): New function.
11241 (linux_low_filter_event): Call linux_low_ptrace_options,
11242 use different argument fo linux_enable_event_reporting,
11243 use return value from handle_extended_wait.
11244 (extended_event_reported): New function.
11245 (linux_wait_1): Call extended_event_reported and set
11246 status to report fork events.
11247 (linux_write_memory): Add pid to debug message.
11248 (reset_lwp_ptrace_options_callback): New function.
11249 (linux_handle_new_gdb_connection): New function.
11250 (linux_target_ops): Initialize new structure member.
11251 * linux-low.h (struct lwp_info) <waitstatus>: New member.
11252 * lynx-low.c: Initialize new structure member.
11253 * remote-utils.c (prepare_resume_reply): Implement stop reason
11254 "fork" for "T" stop message.
11255 * server.c (handle_query): Call handle_new_gdb_connection.
11256 * server.h (report_fork_events): Declare global flag.
11257 * target.h (struct target_ops) <handle_new_gdb_connection>:
11258 New member.
11259 (target_handle_new_gdb_connection): New macro.
11260 * win32-low.c: Initialize new structure member.
11261
11262 2015-05-12 Don Breazeal <donb@codesourcery.com>
11263
11264 * mem-break.c (APPEND_TO_LIST): Define macro.
11265 (clone_agent_expr): New function.
11266 (clone_one_breakpoint): New function.
11267 (clone_all_breakpoints): New function.
11268 * mem-break.h: Declare new functions.
11269
11270 2015-05-12 Don Breazeal <donb@codesourcery.com>
11271
11272 * linux-low.c (linux_supports_fork_events): New function.
11273 (linux_supports_vfork_events): New function.
11274 (linux_target_ops): Initialize new structure members.
11275 (initialize_low): Call linux_check_ptrace_features.
11276 * lynx-low.c (lynx_target_ops): Initialize new structure
11277 members.
11278 * server.c (report_fork_events, report_vfork_events):
11279 New global flags.
11280 (handle_query): Add new features to qSupported packet and
11281 response.
11282 (captured_main): Initialize new global variables.
11283 * target.h (struct target_ops) <supports_fork_events>:
11284 New member.
11285 <supports_vfork_events>: New member.
11286 (target_supports_fork_events): New macro.
11287 (target_supports_vfork_events): New macro.
11288 * win32-low.c (win32_target_ops): Initialize new structure
11289 members.
11290
11291 2015-05-12 Gary Benson <gbenson@redhat.com>
11292
11293 * server.c (handle_qxfer_exec_file): Use current process
11294 if annex is empty.
11295
11296 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
11297
11298 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
11299 Remove HAVE_PTRACE_GETREGS conditionals.
11300 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
11301 instead of PTRACE_GETREGS and PTRACE_SETREGS.
11302
11303 2015-05-08 Yao Qi <yao.qi@linaro.org>
11304
11305 * linux-low.c (linux_supports_conditional_breakpoints): New
11306 function.
11307 (linux_target_ops): Install new target method.
11308 * lynx-low.c (lynx_target_ops): Install NULL hook for
11309 supports_conditional_breakpoints.
11310 * nto-low.c (nto_target_ops): Likewise.
11311 * spu-low.c (spu_target_ops): Likewise.
11312 * win32-low.c (win32_target_ops): Likewise.
11313 * server.c (handle_query): Check
11314 target_supports_conditional_breakpoints.
11315 * target.h (struct target_ops) <supports_conditional_breakpoints>:
11316 New field.
11317 (target_supports_conditional_breakpoints): New macro.
11318
11319 2015-05-06 Pedro Alves <palves@redhat.com>
11320
11321 PR server/18081
11322 * server.c (start_inferior): If the process exits, mourn it.
11323
11324 2015-04-21 Gary Benson <gbenson@redhat.com>
11325
11326 * hostio.c (fileio_open_flags_to_host): Factored out to
11327 fileio_to_host_openflags in common/fileio.c. Single use
11328 updated.
11329
11330 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
11331
11332 * linux-xtensa-low.c (xtensa_fill_gregset)
11333 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
11334 XCHAL_HAVE_LOOP.
11335
11336 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
11337
11338 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
11339 (regs_info): Replace usrregs pointer with NULL.
11340
11341 2015-04-17 Gary Benson <gbenson@redhat.com>
11342
11343 * target.h (struct target_ops) <pid_to_exec_file>: New field.
11344 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
11345 * server.c (handle_qxfer_exec_file): New function.
11346 (qxfer_packets): Add exec-file entry.
11347 (handle_query): Report qXfer:exec-file:read as supported packet.
11348
11349 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
11350
11351 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
11352
11353 2015-04-09 Gary Benson <gbenson@redhat.com>
11354
11355 * hostio-errno.c (errno_to_fileio_error): Remove function.
11356 Update caller to use remote_fileio_to_fio_error.
11357
11358 2015-04-09 Yao Qi <yao.qi@linaro.org>
11359
11360 * linux-low.c (linux_insert_point): Call
11361 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
11362 (linux_remove_point): Call remove_memory_breakpoint if type is
11363 raw_bkpt_type_sw.
11364 * linux-x86-low.c (x86_insert_point): Don't call
11365 insert_memory_breakpoint.
11366 (x86_remove_point): Don't call remove_memory_breakpoint.
11367
11368 2015-04-01 Pedro Alves <palves@redhat.com>
11369 Cleber Rosa <crosa@redhat.com>
11370
11371 * server.c (gdbserver_usage): Reorganize and extend the usage
11372 message.
11373
11374 2015-03-24 Pedro Alves <palves@redhat.com>
11375
11376 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
11377 output. Also dump TRAP_TRACE.
11378 (linux_low_filter_event): In debug output, distinguish a
11379 resume_stop SIGSTOP from a delayed SIGSTOP.
11380
11381 2015-03-24 Gary Benson <gbenson@redhat.com>
11382
11383 * linux-x86-low.c (x86_linux_new_thread): Moved to
11384 nat/x86-linux.c.
11385 (x86_linux_prepare_to_resume): Likewise.
11386
11387 2015-03-24 Gary Benson <gbenson@redhat.com>
11388
11389 * Makefile.in (x86-linux-dregs.o): New rule.
11390 * configure.srv: Add x86-linux-dregs.o to relevant targets.
11391 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
11392 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
11393 (x86_linux_dr_get): Likewise.
11394 (x86_linux_dr_set): Likewise.
11395 (update_debug_registers_callback): Likewise.
11396 (x86_linux_dr_set_addr): Likewise.
11397 (x86_linux_dr_get_addr): Likewise.
11398 (x86_linux_dr_set_control): Likewise.
11399 (x86_linux_dr_get_control): Likewise.
11400 (x86_linux_dr_get_status): Likewise.
11401 (x86_linux_update_debug_registers): Likewise.
11402
11403 2015-03-24 Gary Benson <gbenson@redhat.com>
11404
11405 * linux-x86-low.c (x86_linux_update_debug_registers):
11406 New function, factored out from...
11407 (x86_linux_prepare_to_resume): ...this.
11408
11409 2015-03-24 Gary Benson <gbenson@redhat.com>
11410
11411 * linux-x86-low.c (x86_linux_dr_get): Update comments.
11412 (x86_linux_dr_set): Likewise.
11413 (update_debug_registers_callback): Likewise.
11414 (x86_linux_dr_set_addr): Likewise.
11415 (x86_linux_dr_get_addr): Likewise.
11416 (x86_linux_dr_set_control): Likewise.
11417 (x86_linux_dr_get_control): Likewise.
11418 (x86_linux_dr_get_status): Likewise.
11419 (x86_linux_prepare_to_resume): Likewise.
11420
11421 2015-03-24 Gary Benson <gbenson@redhat.com>
11422
11423 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
11424 Use perror_with_name. Pass string through gettext.
11425 (x86_linux_dr_set): Likewise.
11426
11427 2015-03-24 Gary Benson <gbenson@redhat.com>
11428
11429 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
11430 (x86_linux_dr_set_addr): ...this.
11431 (x86_dr_low_get_addr): Rename to...
11432 (x86_linux_dr_get_addr): ...this.
11433 (x86_dr_low_set_control): Rename to...
11434 (x86_linux_dr_set_control): ...this.
11435 (x86_dr_low_get_control): Rename to...
11436 (x86_linux_dr_get_control): ...this.
11437 (x86_dr_low_get_status): Rename to...
11438 (x86_linux_dr_get_status): ...this.
11439 (x86_dr_low): Update with new function names.
11440
11441 2015-03-24 Gary Benson <gbenson@redhat.com>
11442
11443 * Makefile.in (x86-linux.o): New rule.
11444 * configure.srv: Add x86-linux.o to relevant targets.
11445 * linux-low.c (lwp_set_arch_private_info): New function.
11446 (lwp_arch_private_info): Likewise.
11447 * linux-x86-low.c: Include nat/x86-linux.h.
11448 (arch_lwp_info): Removed structure.
11449 (update_debug_registers_callback):
11450 Use lwp_set_debug_registers_changed.
11451 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
11452 and lwp_set_debug_registers_changed.
11453 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
11454
11455 2015-03-24 Gary Benson <gbenson@redhat.com>
11456
11457 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
11458 * linux-arm-low.c (arm_new_thread): Likewise.
11459 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
11460 * linux-mips-low.c (mips_linux_new_thread): Likewise.
11461 * linux-x86-low.c (x86_linux_new_thread): Likewise.
11462 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
11463
11464 2015-03-24 Gary Benson <gbenson@redhat.com>
11465
11466 * linux-low.c (ptid_of_lwp): New function.
11467 (lwp_is_stopped): Likewise.
11468 (lwp_stop_reason): Likewise.
11469 * linux-x86-low.c (update_debug_registers_callback):
11470 Use lwp_is_stopped.
11471 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
11472 lwp_stop_reason.
11473
11474 2015-03-24 Gary Benson <gbenson@redhat.com>
11475
11476 * linux-low.h (linux_stop_lwp): Remove declaration.
11477
11478 2015-03-24 Gary Benson <gbenson@redhat.com>
11479
11480 * linux-low.h: Include nat/linux-nat.h.
11481 * linux-low.c (iterate_over_lwps_args): New structure.
11482 (iterate_over_lwps_filter): New function.
11483 (iterate_over_lwps): Likewise.
11484 * linux-x86-low.c (update_debug_registers_callback):
11485 Update signature to what iterate_over_lwps expects.
11486 Remove PID check that iterate_over_lwps now performs.
11487 (x86_dr_low_set_addr): Use iterate_over_lwps.
11488 (x86_dr_low_set_control): Likewise.
11489
11490 2015-03-24 Gary Benson <gbenson@redhat.com>
11491
11492 * linux-x86-low.c (x86_debug_reg_state): New function.
11493 (x86_linux_prepare_to_resume): Use the above.
11494
11495 2015-03-24 Gary Benson <gbenson@redhat.com>
11496
11497 * linux-low.c (current_lwp_ptid): New function.
11498 * linux-x86-low.c: Include nat/linux-nat.h.
11499 (x86_dr_low_get_addr): Use current_lwp_ptid.
11500 (x86_dr_low_get_control): Likewise.
11501 (x86_dr_low_get_status): Likewise.
11502
11503 2015-03-20 Pedro Alves <palves@redhat.com>
11504
11505 * tracepoint.c (cmd_qtstatus): Make "str" const.
11506
11507 2015-03-20 Pedro Alves <palves@redhat.com>
11508
11509 * server.c (handle_general_set): Make "req_str" const.
11510
11511 2015-03-19 Pedro Alves <palves@redhat.com>
11512
11513 * linux-low.c (linux_resume_one_lwp): Rename to ...
11514 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
11515 instead call perror_with_name.
11516 (check_ptrace_stopped_lwp_gone): New function.
11517 (linux_resume_one_lwp): Reimplement as wrapper around
11518 linux_resume_one_lwp_throw that swallows errors if the LWP is
11519 gone.
11520
11521 2015-03-19 Pedro Alves <palves@redhat.com>
11522
11523 * linux-low.c (count_events_callback, select_event_lwp_callback):
11524 No longer check whether the thread has resume_stop as last resume
11525 kind.
11526
11527 2015-03-19 Pedro Alves <palves@redhat.com>
11528
11529 * linux-low.c (count_events_callback, select_event_lwp_callback):
11530 Use the lwp's status_pending_p field, not the thread's.
11531
11532 2015-03-19 Pedro Alves <palves@redhat.com>
11533
11534 * linux-low.c (select_event_lwp_callback): Update comments to
11535 no longer mention SIGTRAP.
11536
11537 2015-03-18 Gary Benson <gbenson@redhat.com>
11538
11539 * server.c (handle_query): Do not report vFile:fstat as supported.
11540
11541 2015-03-11 Gary Benson <gbenson@redhat.com>
11542
11543 * hostio.c (sys/types.h): New include.
11544 (sys/stat.h): Likewise.
11545 (common-remote-fileio.h): Likewise.
11546 (handle_fstat): New function.
11547 (handle_vFile): Handle vFile:fstat packets.
11548
11549 2015-03-11 Gary Benson <gbenson@redhat.com>
11550
11551 * configure.ac (AC_CHECK_MEMBERS): Add checks for
11552 struct stat.st_blocks and struct stat.st_blksize.
11553 * configure: Regenerate.
11554 * config.in: Likewise.
11555 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
11556 (OBS): Add common-remote-fileio.o.
11557 (common-remote-fileio.o): New rule.
11558
11559 2015-03-09 Pedro Alves <palves@redhat.com>
11560
11561 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
11562 'struct sockaddr' pointer in 'accept' call.
11563
11564 2015-03-09 Pedro Alves <palves@redhat.com>
11565
11566 Revert:
11567 2015-03-07 Pedro Alves <palves@redhat.com>
11568 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11569 or <winsock2.h> here. Instead include "gdb_socket.h".
11570 (remote_open): Use union gdb_sockaddr_u.
11571 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11572 or <winsock2.h> here. Instead include "gdb_socket.h".
11573 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11574 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11575 or <sys/un.h>.
11576 (init_named_socket, gdb_agent_helper_thread): Use union
11577 gdb_sockaddr_u.
11578
11579 2015-03-07 Pedro Alves <palves@redhat.com>
11580
11581 * configure.ac (build_warnings): Move
11582 -Wdeclaration-after-statement to the C-specific set.
11583 * configure: Regenerate.
11584
11585 2015-03-07 Pedro Alves <palves@redhat.com>
11586
11587 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11588 or <winsock2.h> here. Instead include "gdb_socket.h".
11589 (remote_open): Use union gdb_sockaddr_u.
11590 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11591 or <winsock2.h> here. Instead include "gdb_socket.h".
11592 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11593 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11594 or <sys/un.h>.
11595 (init_named_socket, gdb_agent_helper_thread): Use union
11596 gdb_sockaddr_u.
11597
11598 2015-03-07 Pedro Alves <palves@redhat.com>
11599
11600 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
11601 instead.
11602
11603 2015-03-06 Yao Qi <yao.qi@linaro.org>
11604
11605 * linux-aarch64-low.c (aarch64_insert_point): Use
11606 show_debug_regs as a boolean.
11607 (aarch64_remove_point): Likewise.
11608
11609 2015-03-05 Pedro Alves <palves@redhat.com>
11610
11611 * lynx-low.c (lynx_target_ops): Install NULL hooks for
11612 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
11613 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
11614 * nto-low.c (nto_target_ops): Likewise.
11615 * spu-low.c (spu_target_ops): Likewise.
11616 * win32-low.c (win32_target_ops): Likewise.
11617
11618 2015-03-04 Pedro Alves <palves@redhat.com>
11619
11620 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
11621 Decide whether a breakpoint triggered based on the SIGTRAP's
11622 siginfo.si_code.
11623 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
11624 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
11625 (linux_low_filter_event): Check for breakpoints before checking
11626 watchpoints.
11627 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
11628 siginfo.si_code.
11629 (linux_stopped_by_sw_breakpoint)
11630 (linux_supports_stopped_by_sw_breakpoint)
11631 (linux_stopped_by_hw_breakpoint)
11632 (linux_supports_stopped_by_hw_breakpoint): New functions.
11633 (linux_target_ops): Install new target methods.
11634
11635 2015-03-04 Pedro Alves <palves@redhat.com>
11636
11637 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
11638 * server.c (swbreak_feature, hwbreak_feature): New globals.
11639 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
11640 (captured_main): Clear swbreak_feature and hwbreak_feature.
11641 * server.h (swbreak_feature, hwbreak_feature): Declare.
11642 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
11643 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
11644 supports_stopped_by_hw_breakpoint>: New fields.
11645 (target_supports_stopped_by_sw_breakpoint)
11646 (target_stopped_by_sw_breakpoint)
11647 (target_supports_stopped_by_hw_breakpoint)
11648 (target_stopped_by_hw_breakpoint): Declare.
11649
11650 2015-03-04 Pedro Alves <palves@redhat.com>
11651
11652 enum lwp_stop_reason -> enum target_stop_reason
11653 * linux-low.c (check_stopped_by_breakpoint): Adjust.
11654 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
11655 (linux_wait_1, stuck_in_jump_pad_callback)
11656 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
11657 (linux_stopped_by_watchpoint):
11658 * linux-low.h (enum lwp_stop_reason): Delete.
11659 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
11660 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11661
11662 2015-03-04 Yao Qi <yao.qi@linaro.org>
11663
11664 * Makefile.in (SFILES): Add linux-aarch64-low.c.
11665
11666 2015-03-03 Gary Benson <gbenson@redhat.com>
11667
11668 * hostio.c (handle_vFile): Fix prefix lengths.
11669
11670 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
11671
11672 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
11673 ptr_bits.
11674
11675 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
11676
11677 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
11678 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
11679 (clean): Add "rm -f" for above C files.
11680 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
11681 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
11682 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
11683 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
11684 * linux-s390-low.c (HWCAP_S390_VX): New macro.
11685 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
11686 (init_registers_s390x_vx_linux64)
11687 (init_registers_s390x_tevx_linux64)
11688 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
11689 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
11690 declarations.
11691 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
11692 (s390_store_vxrs_high): New functions.
11693 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
11694 NT_S390_VXRS_HIGH.
11695 (s390_arch_setup): Add logic for selecting one of the new target
11696 descriptions. Activate the new vector regsets if applicable.
11697 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
11698 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
11699 and init_registers_s390x_tevx_linux64.
11700
11701 2015-03-01 Pedro Alves <palves@redhat.com>
11702
11703 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
11704 parameter.
11705
11706 2015-02-27 Pedro Alves <palves@redhat.com>
11707
11708 * linux-x86-low.c (u_debugreg_offset): New function.
11709 (x86_linux_dr_get, x86_linux_dr_set): Use it.
11710
11711 2015-02-27 Pedro Alves <palves@redhat.com>
11712
11713 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
11714 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
11715 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
11716 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
11717 (ps_lsetfpregs, ps_getpid)
11718 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
11719 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
11720 (ps_lsetxregs, ps_plog): Declare.
11721
11722 2015-02-27 Pedro Alves <palves@redhat.com>
11723
11724 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
11725 IP_AGENT_EXPORT_FUNC.
11726 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
11727 IP_AGENT_EXPORT_FUNC.
11728 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
11729 (IP_AGENT_EXPORT): Delete.
11730 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11731 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11732 (gdb_trampoline_buffer_error, collecting, gdb_collect)
11733 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
11734 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
11735 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
11736 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
11737 (traceframe_read_count, traceframe_write_count)
11738 (traceframes_created, trace_state_variables, get_raw_reg)
11739 (get_trace_state_variable_value, set_trace_state_variable_value)
11740 (ust_loaded, helper_thread_id, cmd_buf): Use
11741 IPA_SYM_EXPORTED_NAME.
11742 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
11743 (tracepoints) Use IP_AGENT_EXPORT_VAR.
11744 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
11745 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11746 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
11747 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
11748 EXTERN_C_PUSH/EXTERN_C_POP.
11749 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
11750 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
11751 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11752 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
11753 (traceframe_write_count, traceframe_read_count)
11754 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
11755 (about_to_request_buffer_space, get_trace_state_variable_value)
11756 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
11757 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
11758 EXTERN_C_PUSH/EXTERN_C_POP.
11759 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
11760 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
11761 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
11762 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11763 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11764 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11765 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
11766 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
11767 Define.
11768 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
11769 (IP_AGENT_EXPORT_VAR_DECL): Define.
11770 (tracing): Declare.
11771 (gdb_agent_get_raw_reg): Declare.
11772
11773 2015-02-27 Tom Tromey <tromey@redhat.com>
11774 Pedro Alves <palves@redhat.com>
11775
11776 Rename symbols whose names are reserved C++ keywords throughout.
11777
11778 2015-02-27 Pedro Alves <palves@redhat.com>
11779
11780 * Makefile.in (COMPILER): New, get it from autoconf.
11781 (CXX): Get from autoconf instead.
11782 (COMPILE.pre): Use COMPILER.
11783 (CC-LD): Rename to ...
11784 (CC_LD): ... this. Use COMPILER.
11785 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
11786 (CXX_FOR_TARGET): Default to g++ instead of gcc.
11787 * acinclude.m4: Include build-with-cxx.m4.
11788 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
11789 Disable -Werror by default if building in C++ mode.
11790 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
11791 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
11792 the C++ compiler. Save/restore CXXFLAGS too.
11793 * configure: Regenerate.
11794
11795 2015-02-27 Pedro Alves <palves@redhat.com>
11796
11797 * acinclude.m4: Include libiberty.m4.
11798 * configure.ac: Call libiberty_INIT.
11799 * config.in, configure: Regenerate.
11800
11801 2015-02-26 Pedro Alves <palves@redhat.com>
11802
11803 * linux-low.c (linux_wait_1): When incrementing the PC past a
11804 program breakpoint always use the_low_target.breakpoint_len as
11805 increment, rather than the maximum between that and
11806 the_low_target.decr_pc_after_break.
11807
11808 2015-02-23 Pedro Alves <palves@redhat.com>
11809
11810 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
11811 thread was doing a step-over; always adjust the PC if
11812 we stepped over a permanent breakpoint.
11813 (linux_wait_1): If we stepped over breakpoint that was on top of a
11814 permanent breakpoint, manually advance the PC past it.
11815
11816 2015-02-23 Pedro Alves <palves@redhat.com>
11817
11818 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
11819 modes.
11820 (x86_fill_gregset, x86_store_gregset): Use it when handling
11821 $orig_eax.
11822
11823 2015-02-20 Pedro Alves <palves@redhat.com>
11824
11825 * thread-db.c: Include "nat/linux-procfs.h".
11826 (thread_db_init): Skip listing new threads if the kernel supports
11827 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
11828
11829 2015-02-20 Pedro Alves <palves@redhat.com>
11830
11831 * linux-low.c (status_pending_p_callback): Use ptid_match.
11832
11833 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
11834
11835 PR breakpoints/16812
11836 * linux-low.c (wstatus_maybe_breakpoint): Remove.
11837 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
11838 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
11839
11840 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
11841
11842 PR breakpoints/15956
11843 * tracepoint.c (cmd_qtinit): Add check for current_thread.
11844
11845 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11846
11847 * linux-low.c (linux_low_btrace_conf): Print size.
11848 * server.c (handle_btrace_conf_general_set): New.
11849 (hanle_general_set): Call handle_btrace_conf_general_set.
11850 (handle_query): Report Qbtrace-conf:bts:size as supported.
11851
11852 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11853
11854 * linux-low.c (linux_low_enable_btrace): Update parameters.
11855 (linux_low_btrace_conf): New.
11856 (linux_target_ops)<to_btrace_conf>: Initialize.
11857 * server.c (current_btrace_conf): New.
11858 (handle_btrace_enable): Rename to ...
11859 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
11860 to target_enable_btrace. Update comment. Update users.
11861 (handle_qxfer_btrace_conf): New.
11862 (qxfer_packets): Add btrace-conf entry.
11863 (handle_query): Report qXfer:btrace-conf:read as supported packet.
11864 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
11865 (target_ops)<read_btrace_conf>: New.
11866 (target_enable_btrace): Update parameters.
11867 (target_read_btrace_conf): New.
11868
11869 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11870
11871 * server.c (handle_btrace_general_set): Remove call to
11872 target_supports_btrace.
11873 (supported_btrace_packets): New.
11874 (handle_query): Call supported_btrace_packets.
11875 * target.h: include btrace-common.h.
11876 (btrace_target_info): Removed.
11877 (supports_btrace, target_supports_btrace): Update parameters.
11878
11879 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11880
11881 * Makefile.in (SFILES): Add common/btrace-common.c.
11882 (OBS): Add common/btrace-common.o.
11883 (btrace-common.o): Add build rules.
11884 * linux-low: Include btrace-common.h.
11885 (linux_low_read_btrace): Use struct btrace_data. Call
11886 btrace_data_init and btrace_data_fini.
11887
11888 2015-02-06 Pedro Alves <palves@redhat.com>
11889
11890 * thread-db.c (find_new_threads_callback): Add debug output.
11891
11892 2015-02-04 Pedro Alves <palves@redhat.com>
11893
11894 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
11895 (resume_stopped_resumed_lwps): New function.
11896 (linux_wait_for_event_filtered): Use it.
11897
11898 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11899
11900 * Makefile.in (SFILES): Add linux-personality.c.
11901 (linux-personality.o): New rule.
11902 * configure.srv (srv_linux_obj): Add linux-personality.o to the
11903 list of objects to be built.
11904 * linux-low.c: Include nat/linux-personality.h.
11905 (linux_create_inferior): Remove code to disable address space
11906 randomization (moved to ../nat/linux-personality.c). Create
11907 cleanup to disable address space randomization.
11908
11909 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11910
11911 * Makefile.in (posix-strerror.o): New rule.
11912 (mingw-strerror.o): Likewise.
11913 * configure: Regenerated.
11914 * configure.ac: Source file ../common/common.host. Initialize new
11915 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
11916
11917 2015-01-14 Yao Qi <yao@codesourcery.com>
11918
11919 * Makefile.in (SFILES): Add nat/ppc-linux.c.
11920 (ppc-linux.o): New rule.
11921 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
11922 * configure.ac: AC_CHECK_FUNCS(getauxval).
11923 * config.in: Re-generated.
11924 * configure: Re-generated.
11925 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
11926 ppc64_64bit_inferior_p
11927
11928 2015-01-14 Yao Qi <yao@codesourcery.com>
11929
11930 * linux-ppc-low.c: Include "nat/ppc-linux.h".
11931 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
11932 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
11933 (PT_ORIG_R3, PT_TRAP): Likewise.
11934 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
11935 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
11936 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
11937
11938 2015-01-10 Joel Brobecker <brobecker@adacore.com>
11939
11940 * i387-fp.c (i387_cache_to_xsave): In look over
11941 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
11942 zmmh_low_space field by use of zmmh_high_space.
11943
11944 2015-01-09 Pedro Alves <palves@redhat.com>
11945
11946 * linux-low.c (step_over_bkpt): Move higher up in the file.
11947 (handle_extended_wait): Don't store the stop_pc here.
11948 (get_stop_pc): Adjust comments and rename to ...
11949 (check_stopped_by_breakpoint): ... this. Record whether the LWP
11950 stopped for a software breakpoint or hardware breakpoint.
11951 (thread_still_has_status_pending_p): New function.
11952 (status_pending_p_callback): Use
11953 thread_still_has_status_pending_p. If the event is no longer
11954 interesting, resume the LWP.
11955 (handle_tracepoints): Add assert.
11956 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
11957 (wstatus_maybe_breakpoint): New function.
11958 (cancel_breakpoint): Delete function.
11959 (check_stopped_by_watchpoint): New function, factored out from
11960 linux_low_filter_event.
11961 (lp_status_maybe_breakpoint): Delete function.
11962 (linux_low_filter_event): Remove filter_ptid argument.
11963 Leave thread group exits pending here. Store the LWP's stop PC.
11964 Always leave events pending.
11965 (linux_wait_for_event_filtered): Pull all events out of the
11966 kernel, and leave them all pending.
11967 (count_events_callback, select_event_lwp_callback): Consider all
11968 events.
11969 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
11970 (select_event_lwp): Only give preference to the stepping LWP in
11971 all-stop mode. Adjust comments.
11972 (ignore_event): New function.
11973 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
11974 references to cancel_breakpoints. Adjust to renames. Also give
11975 equal priority to all LWPs that have had events in non-stop mode.
11976 If reporting a software breakpoint event, unadjust the LWP's PC.
11977 (linux_wait): If linux_wait_1 returned an ignored event, retry.
11978 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
11979 Adjust.
11980 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
11981 (resume_status_pending_p): Use thread_still_has_status_pending_p.
11982 (linux_stopped_by_watchpoint): Adjust.
11983 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
11984 * linux-low.h (enum lwp_stop_reason): New.
11985 (struct lwp_info) <stop_pc>: Adjust comment.
11986 <stopped_by_watchpoint>: Delete field.
11987 <stop_reason>: New field.
11988 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11989 * mem-break.c (software_breakpoint_inserted_here)
11990 (hardware_breakpoint_inserted_here): New function.
11991 * mem-break.h (software_breakpoint_inserted_here)
11992 (hardware_breakpoint_inserted_here): Declare.
11993 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
11994 (cancel_breakpoints): Delete.
11995 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
11996 (upload_fast_traceframes): Remove references to
11997 cancel_breakpoints.
11998
11999 2015-01-09 Pedro Alves <palves@redhat.com>
12000
12001 * thread-db.c (find_new_threads_callback): Ignore thread if the
12002 kernel thread ID is -1.
12003
12004 2015-01-09 Pedro Alves <palves@redhat.com>
12005
12006 * linux-low.c (linux_attach_fail_reason_string): Move to
12007 nat/linux-ptrace.c, and rename.
12008 (linux_attach_lwp): Update comment.
12009 (attach_proc_task_lwp_callback): New function.
12010 (linux_attach): Adjust to rename and use
12011 linux_proc_attach_tgid_threads.
12012 (linux_attach_fail_reason_string): Delete declaration.
12013
12014 2015-01-01 Joel Brobecker <brobecker@adacore.com>
12015
12016 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
12017 * server.c (gdbserver_version): Likewise.
12018
12019 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
12020
12021 * remote-utils.c: Include ctype.h.
12022 (input_interrupt): Explicitly handle the case when the char
12023 received is the NUL byte. Improve the printing of non-ASCII
12024 characters.
12025
12026 2014-12-16 Joel Brobecker <brobecker@adacore.com>
12027
12028 * linux-low.c (linux_low_filter_event): Update call to
12029 linux_enable_event_reporting following the addition of
12030 a new parameter to that function.
12031
12032 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
12033
12034 PR server/17457
12035 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
12036 (AARCH64_FPCR_REGNO): Likewise.
12037 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
12038 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
12039 (aarch64_store_fpregset): Likewise.
12040
12041 2014-12-15 Joel Brobecker <brobecker@adacore.com>
12042
12043 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
12044 Remove FIXME comment about assumption about N.
12045
12046 2014-12-13 Joel Brobecker <brobecker@adacore.com>
12047
12048 * configure.ac: If large-file support is disabled in GDBserver,
12049 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
12050 * configure: Regenerate.
12051
12052 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12053
12054 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
12055 warning upon ENODATA from ptrace.
12056 * linux-s390-low.c (s390_store_tdb): New.
12057 (s390_regsets): Add regset for NT_S390_TDB.
12058
12059 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12060
12061 * linux-low.c (regsets_store_inferior_registers): Skip regsets
12062 without a fill_function.
12063 * linux-s390-low.c (s390_fill_last_break): Remove.
12064 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
12065 (s390_arch_setup): Use regset's size instead of fill_function for
12066 loop end condition.
12067
12068 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12069
12070 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
12071 the regset's store function when ptrace returned an error.
12072 * regcache.c (get_thread_regcache): Invalidate register cache
12073 before fetching inferior's registers.
12074
12075 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12076
12077 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
12078 while-loop as for-loop.
12079 (regsets_store_inferior_registers): Likewise.
12080
12081 2014-11-28 Yao Qi <yao@codesourcery.com>
12082
12083 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
12084 * config.in, configure: Re-generate.
12085 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
12086 is defined.
12087
12088 2014-11-21 Yao Qi <yao@codesourcery.com>
12089
12090 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
12091 (AC_CHECK_HEADERS): Remove malloc.h.
12092 * configure: Re-generated.
12093 * config.in: Re-generated.
12094 * server.h: Don't include alloca.h and malloc.h.
12095 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
12096 Don't include malloc.h.
12097
12098 2014-11-17 Joel Brobecker <brobecker@adacore.com>
12099
12100 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
12101 corresponding ERRNO check in same block.
12102
12103 2014-11-12 Pedro Alves <palves@redhat.com>
12104
12105 * server.c (cont_thread): Update comment.
12106 (start_inferior, attach_inferior): No longer clear cont_thread.
12107 (handle_v_cont): No longer set cont_thread.
12108 (captured_main): Clear cont_thread each time a GDB connects.
12109
12110 2014-11-12 Pedro Alves <palves@redhat.com>
12111
12112 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
12113 thread, and don't resume all threads if the Hc thread has exited.
12114
12115 2014-11-12 Pedro Alves <palves@redhat.com>
12116
12117 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
12118 the process group instead of to a specific LWP.
12119
12120 2014-10-15 Pedro Alves <palves@redhat.com>
12121
12122 PR server/17487
12123 * win32-arm-low.c (arm_set_thread_context): Remove current_event
12124 parameter.
12125 (arm_set_thread_context): Delete.
12126 (the_low_target): Adjust.
12127 * win32-i386-low.c (debug_registers_changed)
12128 (debug_registers_used): Delete.
12129 (update_debug_registers_callback): New function.
12130 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
12131 needing to update their debug registers.
12132 (win32_get_current_dr): New function.
12133 (x86_dr_low_get_addr, x86_dr_low_get_control)
12134 (x86_dr_low_get_status): Fetch the debug register from the thread
12135 record's context.
12136 (i386_initial_stuff): Adjust.
12137 (i386_get_thread_context): Remove current_event parameter. Don't
12138 clear debug_registers_changed nor copy DR values to
12139 debug_reg_state.
12140 (i386_set_thread_context): Delete.
12141 (i386_prepare_to_resume): New function.
12142 (i386_thread_added): Mark the thread as needing to update irs
12143 debug registers.
12144 (the_low_target): Remove i386_set_thread_context and install
12145 i386_prepare_to_resume.
12146 * win32-low.c (win32_get_thread_context): Adjust.
12147 (win32_set_thread_context): Use SetThreadContext
12148 directly.
12149 (win32_prepare_to_resume): New function.
12150 (win32_require_context): New function, factored out from ...
12151 (thread_rec): ... this.
12152 (continue_one_thread): Call win32_prepare_to_resume on each thread
12153 we're about to continue.
12154 (win32_resume): Call win32_prepare_to_resume on the event thread.
12155 * win32-low.h (struct win32_thread_info)
12156 <debug_registers_changed>: New field.
12157 (struct win32_target_ops): Change prototype of set_thread_context,
12158 delete set_thread_context and add prepare_to_resume.
12159 (win32_require_context): New declaration.
12160
12161 2014-10-08 Gary Benson <gbenson@redhat.com>
12162
12163 * server.h: Do not include common-exceptions.h.
12164
12165 2014-10-08 Gary Benson <gbenson@redhat.com>
12166
12167 * server.h: Do not include cleanups.h.
12168
12169 2014-09-30 James Hogan <james.hogan@imgtec.com>
12170
12171 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
12172 mips64-dsp-linux.c.
12173
12174 2014-09-23 Yao Qi <yao@codesourcery.com>
12175
12176 * linux-low.c (lp_status_maybe_breakpoint): New function.
12177 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
12178 (count_events_callback): Likewise.
12179 (select_event_lwp_callback): Likewise.
12180 (cancel_breakpoints_callback): Likewise.
12181
12182 2014-09-19 Don Breazeal <donb@codesourcery.com>
12183
12184 * linux-low.c (handle_extended_wait): Call
12185 linux_ptrace_get_extended_event.
12186 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
12187 linux_is_extended_waitstatus.
12188
12189 2014-09-16 Joel Brobecker <brobecker@adacore.com>
12190
12191 * Makefile.in (CPPFLAGS): Define.
12192 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
12193 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
12194
12195 2014-09-16 Gary Benson <gbenson@redhat.com>
12196
12197 * inferiors.h (current_inferior): Renamed as...
12198 (current_thread): New variable. All uses updated.
12199 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
12200 (maybe_move_out_of_jump_pad): Likewise.
12201 (cancel_breakpoint): Likewise.
12202 (linux_low_filter_event): Likewise.
12203 (wait_for_sigstop): Likewise.
12204 (linux_resume_one_lwp): Likewise.
12205 (need_step_over_p): Likewise.
12206 (start_step_over): Likewise.
12207 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
12208 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
12209 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
12210 and save_inferior as saved_thread.
12211 * regcache.c (get_thread_regcache): Renamed saved_inferior as
12212 saved_thread.
12213 (regcache_invalidate_thread): Likewise.
12214 * remote-utils.c (prepare_resume_reply): Likewise.
12215 * thread-db.c (thread_db_get_tls_address): Likewise.
12216 (disable_thread_event_reporting): Likewise.
12217 (remove_thread_event_breakpoints): Likewise.
12218 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
12219 as saved_thread.
12220 * target.h (set_desired_inferior): Renamed as...
12221 (set_desired_thread): New declaration. All uses updated.
12222 * server.c (myresume): Updated comment to reference thread instead
12223 of inferior.
12224 (handle_serial_event): Likewise.
12225 (handle_target_event): Likewise.
12226
12227 2014-09-12 Tom Tromey <tromey@redhat.com>
12228 Gary Benson <gbenson@redhat.com>
12229
12230 * regcache.h: Include common-regcache.h.
12231 (regcache_read_pc): Don't declare.
12232 * regcache.c (get_thread_regcache_for_ptid): New function.
12233
12234 2014-09-11 Tom Tromey <tromey@redhat.com>
12235 Gary Benson <gbenson@redhat.com>
12236
12237 * symbol.c: New file.
12238 * Makefile.in (SFILES): Add symbol.c.
12239 (OBS): Add symbol.o.
12240
12241 2014-09-11 Gary Benson <gbenson@redhat.com>
12242
12243 * target.c (target_stop_ptid, target_continue_ptid): New
12244 functions.
12245
12246 2014-09-11 Tom Tromey <tromey@redhat.com>
12247 Gary Benson <gbenson@redhat.com>
12248
12249 * target.h: Include target/target.h.
12250 * target.c (target_read_memory, target_read_uint32)
12251 (target_write_memory): New functions.
12252
12253 2014-09-11 Gary Benson <gbenson@redhat.com>
12254
12255 * server.h (debug_hw_points): Don't declare.
12256 * server.c (debug_hw_points): Don't define. Replace all uses
12257 with show_debug_regs.
12258 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
12259 all uses with show_debug_regs.
12260
12261 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
12262
12263 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
12264 endianness into account.
12265 (ppc_supply_ptrace_register): Likewise.
12266
12267 2014-09-03 James Hogan <james.hogan@imgtec.com>
12268
12269 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
12270 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
12271
12272 2014-09-03 Gary Benson <gbenson@redhat.com>
12273
12274 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
12275 ALL_DEBUG_ADDRESS_REGISTERS.
12276
12277 2014-09-02 Gary Benson <gbenson@redhat.com>
12278
12279 * i386-low.h: Renamed as...
12280 * x86-low.h: New file. All type, function and variable name
12281 prefixes changed from "i386_" to "x86_". All references updated.
12282 * i386-low.c: Renamed as...
12283 * x86-low.c: New file. All type, function and variable name
12284 prefixes changed from "i386_" to "x86_". All references updated.
12285
12286 2014-09-02 Gary Benson <gbenson@redhat.com>
12287
12288 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
12289 (x86_linux_new_thread): Likewise.
12290
12291 2014-08-29 Gary Benson <gbenson@redhat.com>
12292
12293 * server.h (setjmp.h): Do not include.
12294 (toplevel): Do not declare.
12295 (common-exceptions.h): Include.
12296 (cleanups.h): Likewise.
12297 * server.c (toplevel): Do not define.
12298 (exit_code): New static global.
12299 (detach_or_kill_for_exit_cleanup): New function.
12300 (main): New function. Original main renamed to...
12301 (captured_main): New function.
12302 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
12303
12304 2014-08-29 Gary Benson <gbenson@redhat.com>
12305
12306 * Makefile.in (SFILES): Add common/common-exceptions.c.
12307 (OBS): Add common-exceptions.o.
12308 (common-exceptions.o): New rule.
12309 * utils.c (prepare_to_throw_exception): New function.
12310
12311 2014-08-29 Gary Benson <gbenson@redhat.com>
12312
12313 * config.in: Regenerate.
12314 * configure: Likewise.
12315
12316 2014-08-29 Gary Benson <gbenson@redhat.com>
12317
12318 * Makefile.in (SFILES): Add common/cleanups.c.
12319 (OBS): cleanups.o.
12320 (cleanups.o): New rule.
12321
12322 2014-08-29 Gary Benson <gbenson@redhat.com>
12323
12324 * utils.c (internal_vwarning): New function.
12325
12326 2014-08-28 Gary Benson <gbenson@redhat.com>
12327
12328 * utils.h (fatal): Remove declaration.
12329 * utils.c (fatal): Remove function.
12330
12331 2014-08-28 Gary Benson <gbenson@redhat.com>
12332
12333 * tracepoint.c (gdb_agent_init): Replace fatal with
12334 perror_with_name.
12335 (initialize_tracepoint): Likewise.
12336
12337 2014-08-28 Gary Benson <gbenson@redhat.com>
12338
12339 * remote-utils.c (remote_prepare): Replace fatal with error.
12340
12341 2014-08-28 Gary Benson <gbenson@redhat.com>
12342
12343 * linux-low.c (linux_async): Replace fatal with warning.
12344 Tidy up and return.
12345 (linux_start_non_stop): Return -1 if linux_async failed.
12346
12347 2014-08-28 Gary Benson <gbenson@redhat.com>
12348
12349 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
12350 gdb_assert.
12351 (i386_dr_low_get_addr): Remove vague comment.
12352 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
12353 gdb_assert.
12354
12355 2014-08-28 Gary Benson <gbenson@redhat.com>
12356
12357 * inferiors.c (get_thread_process): Replace check with gdb_assert.
12358 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
12359 internal_error.
12360 (linux_resume_one_lwp): Likewise.
12361 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
12362 gdb_assert.
12363 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
12364 with internal_error.
12365 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
12366 (init_register_cache): Replace fatal with gdb_assert_not_reached.
12367 (find_register_by_name): Replace fatal with internal_error.
12368 (find_regno): Likewise.
12369 * tdesc.c (init_target_desc): Replace check with gdb_assert.
12370 * thread-db.c (thread_db_create_event): Likewise.
12371 (thread_db_load_search): Likewise.
12372 (try_thread_db_load_1): Likewise.
12373 * tracepoint.c (get_jump_space_head): Replace fatal with
12374 internal_error.
12375 (claim_trampoline_space): Likewise.
12376 (have_fast_tracepoint_trampoline_buffer): Likewise.
12377 (cmd_qtstart): Likewise.
12378 (stop_tracing): Likewise.
12379 (fast_tracepoint_collecting): Likewise.
12380 (target_malloc): Likewise.
12381 (download_tracepoint): Likewise.
12382 (download_trace_state_variables): Replace check with gdb_assert.
12383 (upload_fast_traceframes): Replace fatal with internal_error.
12384
12385 2014-08-19 Tom Tromey <tromey@redhat.com>
12386 Gary Benson <gbenson@redhat.com>
12387
12388 * Makefile.in (SFILES): Add common/common-debug.c.
12389 (OBS): Add common-debug.o.
12390 (common-debug.o): New rule.
12391 * debug.h (debug_printf): Don't declare.
12392 * debug.c (debug_printf): Renamed and rewritten as...
12393 (debug_vprintf): New function.
12394
12395 2014-08-19 Gary Benson <gbenson@redhat.com>
12396
12397 * utils.h: Do not include print-utils.h.
12398
12399 2014-08-19 Tom Tromey <tromey@redhat.com>
12400 Gary Benson <gbenson@redhat.com>
12401
12402 * server.h: Add static assertion.
12403 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
12404
12405 2014-08-19 Tom Tromey <tromey@redhat.com>
12406 Gary Benson <gbenson@redhat.com>
12407
12408 * Makefile.in (SFILES): Add common/errors.c.
12409 (OBS): Add errors.o.
12410 (IPA_OBS): Add errors-ipa.o.
12411 (errors.o): New rule.
12412 (errors-ipa.o): Likewise.
12413 * utils.h (perror_with_name, error, warning): Don't declare.
12414 * utils.c (warning): Renamed and rewritten as...
12415 (vwarning): New function.
12416 (error): Renamed and rewritten as...
12417 (verror): New function.
12418 (internal_error): Renamed and rewritten as...
12419 (internal_verror): New function.
12420
12421 2014-08-07 Gary Benson <gbenson@redhat.com>
12422
12423 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
12424 * configure: Regenerate.
12425 * config.in: Likewise.
12426 * server.h: Do not include errno.h.
12427 * event-loop.c: Likewise.
12428 * hostio-errno.c: Likewise.
12429 * linux-low.c: Likewise.
12430 * remote-utils.c: Likewise.
12431 * spu-low.c: Likewise.
12432 * utils.c: Likewise.
12433 * gdbreplay.c: Unconditionally include errno.h.
12434
12435 2014-08-07 Gary Benson <gbenson@redhat.com>
12436
12437 * server.h: Do not include string.h.
12438 * event-loop.c: Likewise.
12439 * linux-low.c: Likewise.
12440 * regcache.c: Likewise.
12441 * remote-utils.c: Likewise.
12442 * spu-low.c: Likewise.
12443 * utils.c: Likewise.
12444
12445 2014-08-07 Gary Benson <gbenson@redhat.com>
12446
12447 * server.h: Do not include gdb_assert.h.
12448
12449 2014-08-07 Gary Benson <gbenson@redhat.com>
12450
12451 * server.h: Do not include common-utils.h.
12452
12453 2014-08-07 Gary Benson <gbenson@redhat.com>
12454
12455 * server.h: Do not include ptid.h.
12456 * notif.h: Likewise.
12457
12458 2014-08-07 Gary Benson <gbenson@redhat.com>
12459
12460 * server.h: Do not include gdb_locale.h.
12461
12462 2014-08-07 Gary Benson <gbenson@redhat.com>
12463
12464 * server.h: Do not include gdb/signals.h.
12465 * win32-low.c: Likewise.
12466
12467 2014-08-07 Gary Benson <gbenson@redhat.com>
12468
12469 * server.h: Do not include pathmax.h.
12470
12471 2014-08-07 Gary Benson <gbenson@redhat.com>
12472
12473 * server.h: Do not include libiberty.h.
12474 * linux-bfin-low.c: Likewise.
12475
12476 2014-08-07 Gary Benson <gbenson@redhat.com>
12477
12478 * server.h: Do not include ansidecl.h.
12479
12480 2014-08-07 Gary Benson <gbenson@redhat.com>
12481
12482 * linux-x86-low.c: Do not include stddef.h.
12483 * lynx-ppc-low.c: Likewise.
12484 * tracepoint.c: Likewise.
12485
12486 2014-08-07 Gary Benson <gbenson@redhat.com>
12487
12488 * server.h: Do not include stdarg.h.
12489 * nto-low.c: Likewise.
12490
12491 2014-08-07 Gary Benson <gbenson@redhat.com>
12492
12493 * server.h: Do not include stdlib.h.
12494 * inferiors.c: Likewise.
12495 * linux-low.c: Likewise.
12496 * regcache.c: Likewise.
12497 * spu-low.c: Likewise.
12498 * tracepoint.c: Likewise.
12499 * utils.c: Likewise.
12500
12501 2014-08-07 Gary Benson <gbenson@redhat.com>
12502
12503 * server.h: Do not include stdio.h.
12504 * linux-low.c: Likewise.
12505 * remote-utils.c: Likewise.
12506 * spu-low.c: Likewise.
12507 * utils.c: Likewise.
12508 * wincecompat.c: Likewise.
12509
12510 2014-08-06 Gary Benson <gbenson@redhat.com>
12511
12512 * regcache.c (init_register_cache): Move conditionals inside if.
12513
12514 2014-08-06 Gary Benson <gbenson@redhat.com>
12515
12516 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
12517
12518 2014-07-31 Gary Benson <gbenson@redhat.com>
12519
12520 * ax.h: Do not include server.h.
12521 * gdbthread.h: Likewise.
12522 * lynx-low.h: Likewise.
12523 * notif.h: Likewise.
12524
12525 2014-07-30 Gary Benson <gbenson@redhat.com>
12526
12527 * server.h: Include common-defs.h.
12528 Do not include config.h or build-gnulib-gdbserver/config.h.
12529
12530 2014-07-30 Gary Benson <gbenson@redhat.com>
12531
12532 * hostio-errno.c: Move server.h to top of includes list.
12533 * inferiors.c: Likewise.
12534 * linux-x86-low.c: Likewise.
12535 * notif.c: Include server.h.
12536
12537 2014-07-24 Tom Tromey <tromey@redhat.com>
12538 Gary Benson <gbenson@redhat.com>
12539
12540 * server.h (CORE_ADDR): Now unsigned.
12541
12542 2014-07-16 Pedro Alves <palves@redhat.com>
12543
12544 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
12545
12546 2014-07-15 Pedro Alves <palves@redhat.com>
12547
12548 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
12549 copy.
12550
12551 2014-07-11 Pedro Alves <palves@redhat.com>
12552
12553 * linux-low.c (kill_wait_lwp): New function, based on
12554 kill_one_lwp_callback, but use my_waitpid directly.
12555 (kill_one_lwp_callback, linux_kill): Use it.
12556
12557 2014-06-23 Pedro Alves <palves@redhat.com>
12558
12559 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
12560 before setting DR0..DR3.
12561
12562 2014-06-20 Gary Benson <gbenson@redhat.com>
12563
12564 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
12565 * configure: Regenerated.
12566 * config.in: Likewise.
12567
12568 2014-06-20 Gary Benson <gbenson@redhat.com>
12569
12570 * Makefile.in (SFILES): Update locations for files moved
12571 from common to nat.
12572 (object file files): Reordered.
12573
12574 2014-06-20 Gary Benson <gbenson@redhat.com>
12575
12576 * i386-low.h (i386_dr_low_can_set_addr): Removed.
12577 (i386_dr_low_set_addr): Likewise.
12578 (i386_dr_low_get_addr): Likewise.
12579 (i386_dr_low_can_set_control): Likewise.
12580 (i386_dr_low_set_control): Likewise.
12581 (i386_dr_low_get_control): Likewise.
12582 (i386_dr_low_get_status): Likewise.
12583 (i386_get_debug_register_length): Likewise.
12584 * linux-x86-low.c (i386_dr_low_set_addr):
12585 Changed signature. Made static.
12586 (i386_dr_low_get_addr): Likewise.
12587 (i386_dr_low_set_control): Likewise.
12588 (i386_dr_low_get_control): Likewise.
12589 (i386_dr_low_get_status): Likewise.
12590 (i386_dr_low): New global variable.
12591 * win32-i386-low.c (i386_dr_low_set_addr):
12592 Changed signature. Made static.
12593 (i386_dr_low_get_addr): Likewise.
12594 (i386_dr_low_set_control): Likewise.
12595 (i386_dr_low_get_control): Likewise.
12596 (i386_dr_low_get_status): Likewise.
12597 (i386_dr_low): New global variable.
12598
12599 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
12600
12601 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
12602 * Makefile.in (AR, AR_FLAGS): Define.
12603 * configure: Regenerate.
12604
12605 2014-06-19 Gary Benson <gbenson@redhat.com>
12606
12607 * Makefile.in (i386-dregs.o): New rule.
12608 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
12609 * i386-low.c (target.h): Remove include.
12610 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
12611 (DR_CONTROL_SHIFT): Likewise.
12612 (DR_CONTROL_SIZE): Likewise.
12613 (DR_RW_EXECUTE): Likewise.
12614 (DR_RW_WRITE): Likewise.
12615 (DR_RW_READ): Likewise.
12616 (DR_RW_IORW): Likewise.
12617 (DR_LEN_1): Likewise.
12618 (DR_LEN_2): Likewise.
12619 (DR_LEN_4): Likewise.
12620 (DR_LEN_8): Likewise.
12621 (DR_LOCAL_ENABLE_SHIFT): Likewise.
12622 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
12623 (DR_ENABLE_SIZE): Likewise.
12624 (DR_LOCAL_SLOWDOWN): Likewise.
12625 (DR_GLOBAL_SLOWDOWN): Likewise.
12626 (DR_CONTROL_RESERVED): Likewise.
12627 (I386_DR_CONTROL_MASK): Likewise.
12628 (I386_DR_VACANT): Likewise.
12629 (I386_DR_LOCAL_ENABLE): Likewise.
12630 (I386_DR_GLOBAL_ENABLE): Likewise.
12631 (I386_DR_DISABLE): Likewise.
12632 (I386_DR_SET_RW_LEN): Likewise.
12633 (I386_DR_GET_RW_LEN): Likewise.
12634 (I386_DR_WATCH_HIT): Likewise.
12635 (i386_wp_op_t): Likewise.
12636 (i386_show_dr): Likewise.
12637 (i386_length_and_rw_bits): Likewise.
12638 (i386_insert_aligned_watchpoint): Likewise.
12639 (i386_remove_aligned_watchpoint): Likewise.
12640 (i386_handle_nonaligned_watchpoint): Likewise.
12641 i386_update_inferior_debug_regs(): Likewise.
12642 (i386_dr_insert_watchpoint): Likewise.
12643 (i386_dr_remove_watchpoint): Likewise.
12644 (i386_dr_region_ok_for_watchpoint): Likewise.
12645 (i386_dr_stopped_data_address): Likewise.
12646 (i386_dr_stopped_by_watchpoint): Likewise.
12647
12648 2014-06-19 Gary Benson <gbenson@redhat.com>
12649
12650 * i386-low.c (i386_dr_show): Renamed to
12651 i386_show_dr and made static. All uses updated.
12652 (i386_dr_length_and_rw_bits): Renamed to
12653 i386_length_and_rw_bits and made static.
12654 All uses updated.
12655 (i386_dr_insert_aligned_watchpoint): Renamed to
12656 i386_insert_aligned_watchpoint and made static.
12657 All uses updated.
12658 (i386_dr_remove_aligned_watchpoint): Renamed to
12659 i386_remove_aligned_watchpoint and made static.
12660 All uses updated.
12661 (i386_dr_update_inferior_debug_regs): Renamed to
12662 i386_update_inferior_debug_regs and made static.
12663 All uses updated.
12664
12665 2014-06-18 Gary Benson <gbenson@redhat.com>
12666
12667 * i386-low.h (i386_dr_low_can_set_addr): New macro.
12668 (i386_dr_low_can_set_control): Likewise.
12669 (i386_get_debug_register_length): Likewise.
12670 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
12671 (i386_dr_low_can_set_control): Likewise.
12672 (i386_get_debug_register_length): Likewise.
12673
12674 2014-06-17 Gary Benson <gbenson@redhat.com>
12675
12676 * i386-low.h (i386-dregs.h): New include.
12677 (DR_FIRSTADDR): Now in i386-dregs.h.
12678 (DR_LASTADDR): Likewise.
12679 (DR_NADDR): Likewise.
12680 (DR_STATUS): Likewise.
12681 (DR_CONTROL): Likewise.
12682 (i386_debug_reg_state): Likewise.
12683 (i386_dr_insert_watchpoint): Likewise.
12684 (i386_dr_remove_watchpoint): Likewise.
12685 (i386_dr_region_ok_for_watchpoint): Likewise.
12686 (i386_dr_stopped_data_address): Likewise.
12687 (i386_dr_stopped_by_watchpoint): Likewise.
12688 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
12689
12690 2014-06-18 Gary Benson <gbenson@redhat.com>
12691
12692 * i386-low.h (i386_low_insert_watchpoint): Renamed to
12693 i386_dr_insert_watchpoint.
12694 (i386_low_remove_watchpoint): Renamed to
12695 i386_dr_remove_watchpoint.
12696 (i386_low_region_ok_for_watchpoint): Renamed to
12697 i386_dr_region_ok_for_watchpoint.
12698 (i386_low_stopped_data_address): Renamed to
12699 i386_dr_stopped_data_address.
12700 (i386_low_stopped_by_watchpoint): Renamed to
12701 i386_dr_stopped_by_watchpoint.
12702 * i386-low.c (i386_show_dr): Renamed to
12703 i386_dr_show and made nonstatic. All uses updated.
12704 (i386_length_and_rw_bits): Renamed to
12705 i386_dr_length_and_rw_bits and made nonstatic.
12706 All uses updated.
12707 (i386_insert_aligned_watchpoint): Renamed to
12708 i386_dr_insert_aligned_watchpoint and made nonstatic.
12709 All uses updated.
12710 (i386_remove_aligned_watchpoint): Renamed to
12711 i386_dr_remove_aligned_watchpoint and made nonstatic.
12712 All uses updated.
12713 (i386_update_inferior_debug_regs): Renamed to
12714 i386_dr_update_inferior_debug_regs and made nonstatic.
12715 All uses updated.
12716 (i386_low_insert_watchpoint): Renamed to
12717 i386_dr_insert_watchpoint. All uses updated.
12718 (i386_low_remove_watchpoint): Renamed to
12719 i386_dr_remove_watchpoint. All uses updated.
12720 (i386_low_region_ok_for_watchpoint): Renamed to
12721 i386_dr_region_ok_for_watchpoint. All uses updated.
12722 (i386_low_stopped_data_address): Renamed to
12723 i386_dr_stopped_data_address. All uses updated.
12724 (i386_low_stopped_by_watchpoint): Renamed to
12725 i386_dr_stopped_by_watchpoint. All uses updated.
12726
12727 2014-06-18 Gary Benson <gbenson@redhat.com>
12728
12729 * i386-low.c (i386_dr_low_can_set_addr): New macro.
12730 (i386_dr_low_can_set_control): Likewise.
12731 (i386_insert_aligned_watchpoint): New check.
12732
12733 2014-06-18 Gary Benson <gbenson@redhat.com>
12734
12735 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
12736 Renamed to state.
12737
12738 2014-06-18 Gary Benson <gbenson@redhat.com>
12739
12740 * i386-low.c (i386_length_and_rw_bits): Use internal_error
12741 instead of fatal and error.
12742 (i386_handle_nonaligned_watchpoint): Likewise.
12743
12744 2014-06-18 Gary Benson <gbenson@redhat.com>
12745
12746 * i386-low.c (i386_get_debug_register_length): New macro.
12747 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
12748 (i386_show_dr): Use debug_printf instead of fprintf. Use
12749 phex to format values.
12750
12751 2014-06-18 Gary Benson <gbenson@redhat.com>
12752
12753 * i386-low.h: Comment changes.
12754 * i386-low.c: Likewise.
12755
12756 2014-06-18 Gary Benson <gbenson@redhat.com>
12757
12758 * i386-low.c: Whitespace changes.
12759
12760 2014-06-12 Tom Tromey <tromey@redhat.com>
12761
12762 * utils.c (freeargv): Remove.
12763
12764 2014-06-12 Tom Tromey <tromey@redhat.com>
12765
12766 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
12767 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
12768 (parse_debug_format_options): Likewise.
12769 (gdbserver_usage): Likewise.
12770 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
12771 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
12772 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
12773 against libiberty.
12774 ($(LIBGNU)): Depend on libiberty.
12775 (all-lib): Recurse into all subdirs.
12776 (install-only): Invoke "install" target in subdirs.
12777 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
12778 targets.
12779 * configure: Rebuild.
12780 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
12781 for vasprintf, vsnprintf, or gettimeofday.
12782 * configure.srv: Don't add safe-ctype.o or lbasename.o to
12783 srv_tgtobj.
12784
12785 2014-06-05 Joel Brobecker <brobecker@adacore.com>
12786
12787 * development.sh: Delete.
12788 * Makefile.in (config.status): Adjust dependency on development.sh.
12789 * configure.ac: Adjust development.sh source call.
12790 * configure: Regenerate.
12791
12792 2014-06-02 Pedro Alves <palves@redhat.com>
12793
12794 * ax.c (gdb_free_agent_expr): New function.
12795 * ax.h (gdb_free_agent_expr): New declaration.
12796 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
12797 list.
12798 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
12799 static.
12800 (clear_breakpoint_conditions_and_commands): New function.
12801 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
12802 (clear_breakpoint_conditions_and_commands): New declaration.
12803
12804 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12805
12806 * linux-aarch64-low.c (asm/ptrace.h): Include.
12807
12808 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12809
12810 Fix TLS access for -static -pthread.
12811 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
12812 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
12813 (thread_db_load_search, try_thread_db_load_1): Initialize it.
12814
12815 2014-05-20 Pedro Alves <palves@redhat.com>
12816
12817 * linux-aarch64-low.c (aarch64_insert_point)
12818 (aarch64_remove_point): No longer check whether the type is
12819 supported here. Adjust to new interface.
12820 (the_low_target): Install aarch64_supports_z_point_type as
12821 supports_z_point_type method.
12822 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
12823 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
12824 instead of a Z packet char. Adjust.
12825 (arm_supports_z_point_type): New function.
12826 (arm_insert_point, arm_remove_point): Adjust to new interface.
12827 (the_low_target): Install arm_supports_z_point_type.
12828 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
12829 (cris_insert_point, cris_remove_point): Adjust to new interface.
12830 Don't check whether the type is supported here.
12831 (the_low_target): Install cris_supports_z_point_type.
12832 * linux-low.c (linux_supports_z_point_type): New function.
12833 (linux_insert_point, linux_remove_point): Adjust to new interface.
12834 * linux-low.h (struct linux_target_ops) <insert_point,
12835 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
12836 raw_breakpoint pointer parameter.
12837 <supports_z_point_type>: New method.
12838 * linux-mips-low.c (mips_supports_z_point_type): New function.
12839 (mips_insert_point, mips_remove_point): Adjust to new interface.
12840 Use mips_supports_z_point_type.
12841 (the_low_target): Install mips_supports_z_point_type.
12842 * linux-ppc-low.c (the_low_target): Install NULL as
12843 supports_z_point_type method.
12844 * linux-s390-low.c (the_low_target): Install NULL as
12845 supports_z_point_type method.
12846 * linux-sparc-low.c (the_low_target): Install NULL as
12847 supports_z_point_type method.
12848 * linux-x86-low.c (x86_supports_z_point_type): New function.
12849 (x86_insert_point): Adjust to new insert_point interface. Use
12850 insert_memory_breakpoint. Adjust to new
12851 i386_low_insert_watchpoint interface.
12852 (x86_remove_point): Adjust to remove_point interface. Use
12853 remove_memory_breakpoint. Adjust to new
12854 i386_low_remove_watchpoint interface.
12855 (the_low_target): Install x86_supports_z_point_type.
12856 * lynx-low.c (lynx_target_ops): Install NULL as
12857 supports_z_point_type callback.
12858 * nto-low.c (nto_supports_z_point_type): New.
12859 (nto_insert_point, nto_remove_point): Adjust to new interface.
12860 (nto_target_ops): Install nto_supports_z_point_type.
12861 * mem-break.c: Adjust intro comment.
12862 (struct raw_breakpoint) <raw_type, size>: New fields.
12863 <inserted>: Update comment.
12864 <shlib_disabled>: Delete field.
12865 (enum bkpt_type) <gdb_breakpoint>: Delete value.
12866 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
12867 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
12868 (raw_bkpt_type_to_target_hw_bp_type): New function.
12869 (find_enabled_raw_code_breakpoint_at): New function.
12870 (find_raw_breakpoint_at): New type and size parameters. Use them.
12871 (insert_memory_breakpoint): New function, based off
12872 set_raw_breakpoint_at.
12873 (remove_memory_breakpoint): New function.
12874 (set_raw_breakpoint_at): Reimplement.
12875 (set_breakpoint): New, based on set_breakpoint_at.
12876 (set_breakpoint_at): Reimplement.
12877 (delete_raw_breakpoint): Go through the_target->remove_point
12878 instead of assuming memory breakpoints.
12879 (find_gdb_breakpoint_at): Delete.
12880 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
12881 (find_gdb_breakpoint): New function.
12882 (set_gdb_breakpoint_at): Delete.
12883 (z_type_supported): New function.
12884 (set_gdb_breakpoint_1): New function, loosely based off
12885 set_gdb_breakpoint_at.
12886 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
12887 (delete_gdb_breakpoint_at): Delete.
12888 (delete_gdb_breakpoint_1): New function, loosely based off
12889 delete_gdb_breakpoint_at.
12890 (delete_gdb_breakpoint): New function.
12891 (clear_gdb_breakpoint_conditions): Rename to ...
12892 (clear_breakpoint_conditions): ... this. Don't handle a NULL
12893 breakpoint.
12894 (add_condition_to_breakpoint): Make static.
12895 (add_breakpoint_condition): Take a struct breakpoint pointer
12896 instead of an address. Adjust.
12897 (gdb_condition_true_at_breakpoint): Rename to ...
12898 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
12899 z_type parameter.
12900 (gdb_condition_true_at_breakpoint): Reimplement.
12901 (add_breakpoint_commands): Take a struct breakpoint pointer
12902 instead of an address. Adjust.
12903 (gdb_no_commands_at_breakpoint): Rename to ...
12904 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
12905 parameter. Return true if no breakpoint was found. Change debug
12906 output.
12907 (gdb_no_commands_at_breakpoint): Reimplement.
12908 (run_breakpoint_commands): Rename to ...
12909 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
12910 and change return type to boolean.
12911 (run_breakpoint_commands): New function.
12912 (gdb_breakpoint_here): Also check for Z1 breakpoints.
12913 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
12914 breakpoint. Go through the_target->remove_point instead of
12915 assuming memory breakpoint.
12916 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
12917 software and hardware breakpoints.
12918 (reinsert_raw_breakpoint): Go through the_target->insert_point
12919 instead of assuming memory breakpoint.
12920 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
12921 software and hardware breakpoints.
12922 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
12923 Check both software and hardware breakpoints.
12924 (validate_inserted_breakpoint): Assert the breakpoint is a
12925 software breakpoint. Set the inserted flag to -1 instead of
12926 setting shlib_disabled.
12927 (delete_disabled_breakpoints): Adjust.
12928 (validate_breakpoints): Only validate software breakpoints.
12929 Adjust to inserted flag change.
12930 (check_mem_read, check_mem_write): Skip breakpoint types other
12931 than software breakpoints. Adjust to inserted flag change.
12932 * mem-break.h (enum raw_bkpt_type): New enum.
12933 (raw_breakpoint, struct process_info): Forward declare.
12934 (Z_packet_to_target_hw_bp_type): Delete declaration.
12935 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
12936 (set_gdb_breakpoint, delete_gdb_breakpoint)
12937 (clear_breakpoint_conditions): New declarations.
12938 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
12939 (breakpoint_inserted_here): Update comment.
12940 (add_breakpoint_condition, add_breakpoint_commands): Replace
12941 address parameter with a breakpoint pointer parameter.
12942 (gdb_breakpoint_here): Update comment.
12943 (delete_gdb_breakpoint_at): Delete.
12944 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
12945 * server.c (process_point_options): Take a struct breakpoint
12946 pointer instead of an address. Adjust.
12947 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
12948 delete_gdb_breakpoint.
12949 * spu-low.c (spu_target_ops): Install NULL as
12950 supports_z_point_type method.
12951 * target.h: Include mem-break.h.
12952 (struct target_ops) <prepare_to_access_memory>: Update comment.
12953 <supports_z_point_type>: New field.
12954 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12955 instead of a char. Also take a raw breakpoint pointer.
12956 * win32-arm-low.c (the_low_target): Install NULL as
12957 supports_z_point_type.
12958 * win32-i386-low.c (i386_supports_z_point_type): New function.
12959 (i386_insert_point, i386_remove_point): Adjust to new interface.
12960 (the_low_target): Install i386_supports_z_point_type.
12961 * win32-low.c (win32_supports_z_point_type): New function.
12962 (win32_insert_point, win32_remove_point): Adjust to new interface.
12963 (win32_target_ops): Install win32_supports_z_point_type.
12964 * win32-low.h (struct win32_target_ops):
12965 <supports_z_point_type>: New method.
12966 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
12967 instead of a char. Also take a raw breakpoint pointer.
12968
12969 2014-05-20 Pedro Alves <palves@redhat.com>
12970
12971 * mem-break.h: Include break-common.h.
12972 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12973 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
12974 (Z_packet_to_target_hw_bp_type): New declaration.
12975 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
12976 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
12977 (Z_PACKET_ACCESS_WP): Delete macros.
12978 (Z_packet_to_hw_type): Delete function.
12979 * i386-low.h: Don't include break-common.h here.
12980 (Z_packet_to_hw_type): Delete declaration.
12981 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
12982 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12983 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
12984 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
12985 * linux-aarch64-low.c: Don't include break-common.h here.
12986 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
12987 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
12988 (Z_packet_to_target_hw_bp_type): Delete function.
12989 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
12990 function.
12991 (mips_insert_point, mips_remove_point): Use
12992 Z_packet_to_target_hw_bp_type.
12993
12994 2014-05-20 Pedro Alves <palves@redhat.com>
12995
12996 * linux-aarch64-low.c: Include break-common.h.
12997 (enum target_point_type): Delete.
12998 (Z_packet_to_point_type): Rename to ...
12999 (Z_packet_to_target_hw_bp_type): ... this, and return a
13000 target_hw_bp_type instead.
13001 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
13002 instead of an enum target_point_type.
13003 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
13004 breakpoint type.
13005 (aarch64_dr_state_insert_one_point)
13006 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
13007 (aarch64_handle_aligned_watchpoint)
13008 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
13009 Take an enum target_hw_bp_type instead of an enum
13010 target_point_type.
13011 (aarch64_supports_z_point_type): New function.
13012 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
13013 use Z_packet_to_target_hw_bp_type.
13014
13015 2014-05-20 Joel Brobecker <brobecker@adacore.com>
13016
13017 * configure.ac: Only use -Werror by default when DEVELOPMENT
13018 is true.
13019 * configure: Regenerate.
13020
13021 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
13022
13023 Fix gdbserver qGetTLSAddr for x86_64 -m32.
13024 * linux-x86-low.c (X86_64_USER_REGS): New.
13025 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
13026
13027 2014-04-28 Yao Qi <yao@codesourcery.com>
13028
13029 * Makefile.in (i386-avx512.c): Fix the typo of generated file
13030 name.
13031
13032 2014-04-25 Pedro Alves <palves@redhat.com>
13033
13034 PR server/16255
13035 * linux-low.c (linux_attach_fail_reason_string): New function.
13036 (linux_attach_lwp): Delete.
13037 (linux_attach_lwp_1): Rename to ...
13038 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
13039 argument. Remove "initial" parameter. Return int instead of
13040 void. Don't error or warn here.
13041 (linux_attach): Adjust to call linux_attach_lwp. Call error on
13042 failure to attach to the tgid. Call warning when failing to
13043 attach to an lwp.
13044 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
13045 argument. Remove "initial" parameter. Return int instead of
13046 void. Don't error or warn here.
13047 (linux_attach_fail_reason_string): New declaration.
13048 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
13049 interface change. Use linux_attach_fail_reason_string.
13050
13051 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
13052 Walfred Tedeschi <walfred.tedeschi@intel.com>
13053
13054 * Makefile.in: Added rules to handle new files
13055 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
13056 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
13057 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
13058 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
13059 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
13060 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
13061 x32-avx512-linux.o.
13062 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
13063 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
13064 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
13065 i386/x32-avx512.xml.
13066 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
13067 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
13068 i386/x32-avx512-linux.xml.
13069 * i387-fp.c (num_avx512_k_registers): New constant for number
13070 of K registers.
13071 (num_avx512_zmmh_low_registers): New constant for number of
13072 lower ZMM registers (0-15).
13073 (num_avx512_zmmh_high_registers): New constant for number of
13074 higher ZMM registers (16-31).
13075 (num_avx512_ymmh_registers): New contant for number of higher
13076 YMM registers (ymm16-31 added by avx521 on x86_64).
13077 (num_avx512_xmm_registers): New constant for number of higher
13078 XMM registers (xmm16-31 added by AVX512 on x86_64).
13079 (struct i387_xsave): Add space for AVX512 registers.
13080 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
13081 Add code to handle AVX512 registers.
13082 (i387_xsave_to_cache): Add code to handle AVX512 registers.
13083 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
13084 prototypei from generated file.
13085 (tdesc_amd64_avx512_linux): Likewise.
13086 (init_registers_x32_avx512_linux): Likewise.
13087 (tdesc_x32_avx512_linux): Likewise.
13088 (init_registers_i386_avx512_linux): Likewise.
13089 (tdesc_i386_avx512_linux): Likewise.
13090 (x86_64_regmap): Add AVX512 registers.
13091 (x86_linux_read_description): Add code to handle AVX512 XSTATE
13092 mask.
13093 (initialize_low_arch): Add code to initialize AVX512 registers.
13094
13095 2014-04-23 Pedro Alves <palves@redhat.com>
13096
13097 * mem-break.c (find_gdb_breakpoint_at): Make static.
13098 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
13099
13100 2014-04-23 Pedro Alves <palves@redhat.com>
13101
13102 * i386-low.c: Don't include break-common.h here.
13103 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
13104 prototype to take target_hw_bp_type as argument instead of a Z
13105 packet char.
13106 * i386-low.h: Include break-common.h here.
13107 (Z_packet_to_hw_type): Declare.
13108 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
13109 prototypes.
13110 * linux-x86-low.c (x86_insert_point): Convert the packet number to
13111 a target_hw_bp_type before calling i386_low_insert_watchpoint.
13112 (x86_remove_point): Convert the packet number to a
13113 target_hw_bp_type before calling i386_low_remove_watchpoint.
13114 * win32-i386-low.c (i386_insert_point): Convert the packet number
13115 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
13116 (i386_remove_point): Convert the packet number to a
13117 target_hw_bp_type before calling i386_low_remove_watchpoint.
13118
13119 2014-04-23 Pedro Alves <palves@redhat.com>
13120
13121 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
13122
13123 2014-04-10 Pedro Alves <palves@redhat.com>
13124
13125 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
13126 Check if the condition or command is NULL before checking if the
13127 breakpoint is known. On success, return true.
13128 * mem-break.h (add_breakpoint_condition): Document return.
13129 (add_breakpoint_commands): Add describing comment.
13130 * server.c (skip_to_semicolon): New function.
13131 (process_point_options): Use it.
13132
13133 2014-04-09 Pedro Alves <palves@redhat.com>
13134
13135 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
13136 to lwpid_of.
13137
13138 2014-02-27 Pedro Alves <palves@redhat.com>
13139
13140 PR 12702
13141 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
13142 macros.
13143 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
13144 output.
13145 (last_thread_of_process_p): Take a PID argument instead of a
13146 thread pointer.
13147 (linux_wait_for_lwp): Delete.
13148 (num_lwps, check_zombie_leaders, not_stopped_callback): New
13149 functions.
13150 (linux_low_filter_event): New function, party factored out from
13151 linux_wait_for_event.
13152 (linux_wait_for_event): Rename to ...
13153 (linux_wait_for_event_filtered): ... this. Add new filter ptid
13154 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
13155 sigsuspend. Check for zombie leaders.
13156 (linux_wait_for_event): Reimplement as wrapper around
13157 linux_wait_for_event_filtered.
13158 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
13159 a normal or signal exit is seen, it's the whole process exiting.
13160 (wait_for_sigstop): No longer a for_each_inferior callback.
13161 Rewrite on top of linux_wait_for_event_filtered.
13162 (stop_all_lwps): Call wait_for_sigstop directly.
13163 * server.c (resume, handle_target_event): Handle
13164 TARGET_WAITKIND_NO_RESUMED.
13165
13166 2014-02-26 Joel Brobecker <brobecker@adacore.com>
13167
13168 * win32-low.c (psapi_get_dll_name,
13169 * win32_CreateToolhelp32Snapshot): Delete.
13170 (win32_CreateToolhelp32Snapshot, win32_Module32First)
13171 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
13172 Delete.
13173 (handle_load_dll): Add function description.
13174 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
13175
13176 2014-02-26 Joel Brobecker <brobecker@adacore.com>
13177
13178 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
13179 Add comment.
13180 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
13181 base address when calling win32_add_one_solib.
13182 (handle_load_dll): Delete local variable load_addr.
13183 Remove 0x1000 offset applied to DLL base address when calling
13184 win32_add_one_solib.
13185 (handle_unload_dll): Add comment.
13186
13187 2014-02-26 Joel Brobecker <brobecker@adacore.com>
13188
13189 * win32-low.c (win32_add_all_dlls): Renames
13190 win32_ensure_ntdll_loaded. Rewrite function documentation.
13191 Adjust implementation to always load all DLLs.
13192 Add 0x1000 offset to DLL base address when calling
13193 win32_add_one_solib.
13194 (child_initialization_done): New static global.
13195 (do_initial_child_stuff): Set child_initialization_done to
13196 zero during child initialization, and 1 after. Replace call
13197 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
13198 Add comment.
13199 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
13200 (handle_unload_dll): Add function documentation.
13201 (get_child_debug_event): Ignore load and unload DLL events
13202 during child initialization.
13203
13204 2014-02-20 Doug Evans <dje@google.com>
13205
13206 Remove global all_lwps.
13207 * inferiors.h (ptid_of): Move here from linux-low.h.
13208 (pid_of, lwpid_of): Ditto.
13209 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
13210 parameter is a struct thread_info * now.
13211 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
13212 directly. Pass &all_threads to find_inferior instead of &all_lwps.
13213 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
13214 directly.
13215 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
13216 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
13217 * linux-arm-low.c (update_registers_callback): Update, "entry"
13218 parameter is a struct thread_info * now.
13219 Fetch lwpid from current_inferior directly.
13220 (arm_insert_point): Pass &all_threads to find_inferior instead of
13221 &all_lwps.
13222 (arm_remove_point): Ditto.
13223 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
13224 (arm_prepare_to_resume): Fetch pid from thread.
13225 (arm_read_description): Fetch lwpid from current_inferior directly.
13226 * linux-low.c (all_lwps): Delete.
13227 (delete_lwp): Delete call to remove_inferior.
13228 (handle_extended_wait): Fetch lwpid from thread.
13229 (add_lwp): Don't set lwp->entry.id. Remove call to
13230 add_inferior_to_list.
13231 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
13232 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
13233 (kill_one_lwp_callback): Ditto.
13234 (linux_kill): Don't dereference NULL pointer.
13235 Fetch ptid,lwpid from thread.
13236 (get_detach_signal): Fetch ptid from thread.
13237 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
13238 Simplify call to regcache_invalidate_thread.
13239 (delete_lwp_callback): Update, "entry" parameter is a
13240 struct thread_info * now. Fetch pid from thread.
13241 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
13242 (status_pending_p_callback): Update, "entry" parameter is a
13243 struct thread_info * now. Fetch ptid from thread.
13244 (find_lwp_pid): Update, "entry" parameter is a
13245 struct thread_info * now.
13246 (linux_wait_for_lwp): Fetch pid from thread.
13247 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
13248 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
13249 (enqueue_one_deferred_signal): Fetch lwpid from thread.
13250 (dequeue_one_deferred_signal): Ditto.
13251 (cancel_breakpoint): Fetch ptid from current_inferior.
13252 (linux_wait_for_event): Pass &all_threads to find_inferior,
13253 not &all_lwps. Fetch ptid, lwpid from thread.
13254 (count_events_callback): Update, "entry" parameter is a
13255 struct thread_info * now.
13256 (select_singlestep_lwp_callback): Ditto.
13257 (select_event_lwp_callback): Ditto.
13258 (cancel_breakpoints_callback): Ditto.
13259 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
13260 not &all_lwps.
13261 (select_event_lwp): Ditto. Fetch ptid from event_thread.
13262 (unsuspend_one_lwp): Update, "entry" parameter is a
13263 struct thread_info * now.
13264 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
13265 not &all_lwps.
13266 (linux_stabilize_threads): Ditto. And for for_each_inferior.
13267 Fetch lwpid from thread, not lwp.
13268 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
13269 Pass &all_threads to find_inferior, not &all_lwps.
13270 (send_sigstop): Fetch lwpid from thread, not lwp.
13271 (send_sigstop_callback): Update, "entry" parameter is a
13272 struct thread_info * now.
13273 (suspend_and_send_sigstop_callback): Ditto.
13274 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
13275 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
13276 struct thread_info * now.
13277 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
13278 from thread, lwp.
13279 (lwp_running): Update, "entry" parameter is a
13280 struct thread_info * now.
13281 (stop_all_lwps): Fetch ptid from thread.
13282 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
13283 (linux_resume_one_lwp): Fetch lwpid from thread.
13284 (linux_set_resume_request): Update, "entry" parameter is a
13285 struct thread_info * now. Fetch pid, lwpid from thread.
13286 (resume_status_pending_p): Update, "entry" parameter is a
13287 struct thread_info * now.
13288 (need_step_over_p): Ditto. Fetch lwpid from thread.
13289 (start_step_over): Fetch lwpid from thread.
13290 (linux_resume_one_thread): Update, "entry" parameter is a
13291 struct thread_info * now. Fetch lwpid from thread.
13292 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
13293 (proceed_one_lwp): Update, "entry" parameter is a
13294 struct thread_info * now. Fetch lwpid from thread.
13295 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
13296 struct thread_info * now.
13297 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
13298 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
13299 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
13300 directly.
13301 (regsets_store_inferior_registers): Ditto.
13302 (fetch_register, store_register): Ditto.
13303 (linux_read_memory, linux_write_memory): Ditto.
13304 (linux_request_interrupt): Ditto.
13305 (linux_read_auxv): Ditto.
13306 (linux_xfer_siginfo): Ditto.
13307 (linux_qxfer_spu): Ditto.
13308 (linux_qxfer_libraries_svr4): Ditto.
13309 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
13310 moved to inferiors.h.
13311 (get_lwp): Delete.
13312 (get_thread_lwp): Update.
13313 (struct lwp_info): Delete member "entry". Simplify comment for
13314 member "thread".
13315 (all_lwps): Delete.
13316 * linux-mips-low.c (mips_read_description): Fetch lwpid from
13317 current_inferior directly.
13318 (update_watch_registers_callback): Update, "entry" parameter is a
13319 struct thread_info * now. Fetch pid from thread.
13320 (mips_linux_prepare_to_resume): Fetch ptid from thread.
13321 (mips_insert_point): Fetch lwpid from current_inferior.
13322 Pass &all_threads to find_inferior, not &all_lwps.
13323 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
13324 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
13325 directly.
13326 (mips_stopped_data_address): Ditto.
13327 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
13328 directly.
13329 * linux-tile-low.c (tile_arch_setup): Ditto.
13330 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
13331 (update_debug_registers_callback): Update, "entry" parameter is a
13332 struct thread_info * now. Fetch pid from thread.
13333 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
13334 Pass &all_threads to find_inferior, not &all_lwps.
13335 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
13336 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
13337 Pass &all_threads to find_inferior, not &all_lwps.
13338 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
13339 (i386_dr_low_get_status): Ditto.
13340 (x86_linux_prepare_to_resume): Fetch ptid from thread.
13341 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
13342 (x86_linux_read_description): Ditto.
13343 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
13344
13345 2014-02-20 Doug Evans <dje@google.com>
13346
13347 * inferiors.c (get_first_inferior): Fix buglet.
13348
13349 2014-02-19 Doug Evans <dje@google.com>
13350
13351 * gdbthread.h (add_thread): Change result type to struct thread_info *.
13352 * inferiors.c (add_thread): Change result type to struct thread_info *.
13353 All callers updated.
13354 (add_lwp): Call add_thread here instead of in callers.
13355 All callers updated.
13356 * linux-low.h (get_lwp_thread): Rewrite.
13357 (struct lwp_info): New member "thread".
13358
13359 2014-02-19 Doug Evans <dje@google.com>
13360
13361 * linux-low.c (add_lwp): Change result to struct lwp_info *.
13362 All callers updated.
13363
13364 2014-02-19 Doug Evans <dje@google.com>
13365
13366 * inferiors.c (add_thread): Fix whitespace.
13367
13368 2014-02-19 Doug Evans <dje@google.com>
13369
13370 * dll.c (clear_dlls): Replace accessing list implemention details
13371 with API function.
13372 * gdbthread.h (get_first_thread): Declare.
13373 * inferiors.c (for_each_inferior_with_data): New function.
13374 (get_first_thread): New function.
13375 (find_thread_ptid): Simplify.
13376 (get_first_inferior): New function.
13377 (clear_list): Delete.
13378 (one_inferior_p): New function.
13379 (clear_inferior_list): New function.
13380 (clear_inferiors): Update.
13381 * inferiors.h (for_each_inferior_with_data): Declare.
13382 (clear_inferior_list): Declare.
13383 (one_inferior_p): Declare.
13384 (get_first_inferior): Declare.
13385 * linux-low.c (linux_wait_for_event): Replace accessing list
13386 implemention details with API function.
13387 * server.c (target_running): Ditto.
13388 (accumulate_file_name_length): New function.
13389 (emit_dll_description): New function.
13390 (handle_qxfer_libraries): Replace accessing list implemention
13391 details with API function.
13392 (handle_qxfer_threads_worker): New function.
13393 (handle_qxfer_threads_proper): Replace accessing list implemention
13394 details with API function.
13395 (handle_query): Ditto.
13396 (visit_actioned_threads_callback_ftype): New typedef.
13397 (visit_actioned_threads_data): New struct.
13398 (visit_actioned_threads): Rewrite to be find_inferior callback.
13399 (resume): Call find_inferior.
13400 (handle_status): Replace accessing list implemention
13401 details with API function.
13402 (process_serial_event): Replace accessing list implemention details
13403 with API function.
13404 * target.c (set_desired_inferior): Replace accessing list implemention
13405 details with API function.
13406 * tracepoint.c (same_process_p): New function.
13407 (gdb_agent_about_to_close): Replace accessing list implemention
13408 details with API function.
13409 * win32-low.c (child_delete_thread): Replace accessing list
13410 implemention details with API function.
13411 (match_dll_by_basename): New function.
13412 (dll_is_loaded_by_basename): New function.
13413 (win32_ensure_ntdll_loaded): Replace accessing list implemention
13414 details call to dll_is_loaded_by_basename.
13415
13416 2014-02-19 Doug Evans <dje@google.com>
13417
13418 * dll.h (struct dll_info): Add comment.
13419 * gdbthread.h (struct thread_info): Add comment.
13420 (current_ptid): Simplify.
13421 * inferiors.c (add_process): Update.
13422 (remove_process): Update.
13423 * inferiors.h (struct process_info): Rename member "head" to "entry".
13424 * linux-low.c (delete_lwp): Update.
13425 (add_lwp): Update.
13426 (last_thread_of_process_p): Update.
13427 (kill_one_lwp_callback, linux_kill): Update.
13428 (status_pending_p_callback): Update.
13429 (wait_for_sigstop): Update. Simplify read of ptid.
13430 (start_step_over): Update.
13431 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
13432 (get_lwp_thread): Update.
13433 (struct lwp_info): Rename member "head" to "entry".
13434 * regcache.h (inferior_list_entry): Delete.
13435 * server.c (kill_inferior_callback): Update.
13436 (detach_or_kill_inferior_callback): Update.
13437 (print_started_pid): Update.
13438 (print_attached_pid): Update.
13439 (process_serial_event): Simplify read of ptid.
13440 * thread-db.c (thread_db_create_event): Update.
13441 (thread_db_get_tls_address): Update.
13442 * win32-low.c (current_inferior_ptid): Simplify.
13443
13444 2014-02-19 Tom Tromey <tromey@redhat.com>
13445
13446 * target.h (struct target_ops) <supports_btrace>: Add target_ops
13447 argument.
13448 (target_supports_btrace): Update.
13449
13450 2014-02-14 Yao Qi <yao@codesourcery.com>
13451
13452 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
13453 (rsp-low-ipa.o): New target.
13454
13455 2014-02-12 Tom Tromey <tromey@redhat.com>
13456
13457 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
13458 convert_ascii_to_int.
13459 * regcache.c (registers_to_string): Likewise.
13460 * remote-utils.c (decode_M_packet): Likewise.
13461 * server.c (process_serial_event): Likewise.
13462
13463 2014-02-12 Tom Tromey <tromey@redhat.com>
13464
13465 * server.c (handle_query, handle_v_run): Use hex2bin, not
13466 unhexify.
13467 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
13468
13469 2014-02-12 Tom Tromey <tromey@redhat.com>
13470
13471 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
13472 convert_int_to_ascii.
13473 * regcache.c (registers_to_string, collect_register_as_string):
13474 Likewise.
13475 * remote-utils.c (look_up_one_symbol, relocate_instruction):
13476 Likewise.
13477 * server.c (process_serial_event): Likewise.
13478 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
13479 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
13480
13481 2014-02-12 Tom Tromey <tromey@redhat.com>
13482
13483 * remote-utils.c (look_up_one_symbol, monitor_output): Use
13484 bin2hex, not hexify.
13485 * tracepoint.c (cmd_qtstatus): Likewise.
13486
13487 2014-02-12 Tom Tromey <tromey@redhat.com>
13488
13489 * remote-utils.c (monitor_output): Pass explicit length to
13490 hexify.
13491
13492 2014-02-12 Tom Tromey <tromey@redhat.com>
13493
13494 * tracepoint.c: Include rsp-low.h.
13495 * server.c: Include rsp-low.h.
13496 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
13497 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
13498 declare.
13499 * remote-utils.c: Include rsp-low.h.
13500 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
13501 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
13502 (convert_int_to_ascii, convert_ascii_to_int): Move to
13503 common/rsp-low.c.
13504 * regcache.c: Include rsp-low.h.
13505 * ax.c: Include rsp-low.h.
13506 * Makefile.in (SFILES): Add common/rsp-low.c.
13507 (OBS): Add rsp-low.o.
13508 (rsp-low.o): New target.
13509
13510 2014-02-12 Tom Tromey <tromey@redhat.com>
13511
13512 * utils.h (pulongest, plongest, phex_nz): Don't declare.
13513 Include print-utils.h.
13514 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
13515 (plongest, thirty_two, phex_nz): Remove.
13516 * Makefile.in (SFILES): Add common/print-utils.c.
13517 (OBS): Add print-utils.o.
13518 (print-utils-ipa.o): New target.
13519 (print-utils.o): New target.
13520 (IPA_OBJS): Add print-utils-ipa.o.
13521
13522 2014-02-06 Tom Tromey <tromey@redhat.com>
13523
13524 * Makefile.in (SFILES): Fix indentation.
13525
13526 2014-02-05 Doug Evans <dje@google.com>
13527
13528 * linux-low.c (linux_wait_for_event): Improve comment.
13529 (linux_wait_1): Keep current_inferior in sync with event_child.
13530
13531 2014-01-22 Doug Evans <dje@google.com>
13532
13533 * gdbthread.h (gdb_id_to_thread): Delete, unused.
13534
13535 2014-01-22 Doug Evans <dje@google.com>
13536
13537 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
13538 * configure: Regenerate.
13539 * config.in: Regenerate.
13540 * Makefile.in (SFILES): Add debug.c.
13541 (OBS): Add debug.o.
13542 * debug.c: New file.
13543 * debug.h: New file.
13544 * linux-aarch64-low.c (*): Update all debugging printfs to use
13545 debug_printf instead of fprintf.
13546 * linux-arm-low.c (*): Ditto.
13547 * linux-cris-low.c (*): Ditto.
13548 * linux-crisv32-low.c (*): Ditto.
13549 * linux-m32r-low.c (*): Ditto.
13550 * linux-sparc-low.c (*): Ditto.
13551 * linux-x86.c (*): Ditto.
13552 * linux-low.c (*): Ditto.
13553 (linux_wait_1): Add calls to debug_enter, debug_exit.
13554 (linux_wait): Remove redundant debugging printf.
13555 (stop_all_lwps): Add calls to debug_enter, debug_exit.
13556 (linux_resume, unstop_all_lwps): Ditto.
13557 * mem-break.c (*): Update all debugging printfs to use
13558 debug_printf instead of fprintf.
13559 * remote-utils.c (*): Ditto.
13560 * thread-db.c (*): Ditto.
13561 * server.c #include <ctype.h>, "gdb_vecs.h".
13562 (debug_threads): Moved to debug.c.
13563 (*): Update all debugging printfs to use debug_printf instead of
13564 fprintf.
13565 (start_inferior): Replace call to fflush with call to debug_flush.
13566 (monitor_show_help): Mention set debug-format.
13567 (parse_debug_format_options): New function.
13568 (handle_monitor_command): Handle "monitor set debug-format".
13569 (gdbserver_usage): Mention --debug-format.
13570 (main): Parse --debug-format.
13571 * server.h (debug_threads): Declaration moved to debug.h.
13572 #include "debug.h".
13573 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
13574 trace_debug_1 that uses debug_printf.
13575 (tracepoint_look_up_symbols): Update all debugging printfs to use
13576 debug_printf instead of fprintf.
13577
13578 2014-01-20 Baruch Siach <baruch@tkos.co.il>
13579
13580 * linux-xtensa-low.c: Include asm/ptrace.h instead of
13581 sys/ptrace.h.
13582
13583 2014-01-17 Pedro Alves <palves@redhat.com>
13584
13585 PR build/16445
13586 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
13587 defined after including gdb_proc_service.h.
13588
13589 2014-01-16 Doug Evans <dje@google.com>
13590
13591 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
13592 (match_dll): Use it.
13593
13594 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
13595
13596 * target.h (target_ops) <read_btrace>: Change parameters and
13597 return type to allow error reporting.
13598 * server.c (handle_qxfer_btrace): Support delta reads. Pass
13599 trace reading errors on.
13600 * linux-low.c (linux_low_read_btrace): Pass trace reading
13601 errors on.
13602 (linux_low_disable_btrace): New.
13603
13604 2014-01-15 Doug Evans <dje@google.com>
13605
13606 * inferiors.c (thread_id_to_gdb_id): Delete.
13607 * inferiors.h (thread_id_to_gdb_id): Delete.
13608
13609 2014-01-13 Eli Zaretskii <eliz@gnu.org>
13610
13611 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
13612 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
13613 versions.
13614
13615 2014-01-08 Pedro Alves <palves@redhat.com>
13616
13617 * server.c (handle_status): Don't discard previous queued stop
13618 replies or thread's pending status here.
13619 (main) <disconnection>: Do it here instead.
13620
13621 2014-01-08 Pedro Alves <palves@redhat.com>
13622
13623 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
13624 * server.c (visit_actioned_threads, handle_pending_status): New
13625 function.
13626 (handle_v_cont): Factor out parts to ...
13627 (resume): ... this new function. If in all-stop, and a thread
13628 being resumed has a pending status, report it without actually
13629 resuming.
13630 (myresume): Adjust to use the new 'resume' function.
13631 (clear_pending_status_callback, set_pending_status_callback)
13632 (find_status_pending_thread_callback): New functions.
13633 (handle_status): Handle the case of multiple threads having
13634 interesting statuses to report. Report threads' real last signal
13635 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
13636 with an interesting thread to report the status for, instead of
13637 always reporting the status of the first thread.
13638
13639 2014-01-01 Joel Brobecker <brobecker@adacore.com>
13640
13641 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
13642 * gdbreplay.c (gdbreplay_version): Likewise.
13643
13644 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
13645
13646 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
13647 iov.iov_len with the real length in use.
13648
13649 2013-12-13 Joel Brobecker <brobecker@adacore.com>
13650
13651 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
13652 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
13653 for all targets that use win32-low.c.
13654 * win32-low.c (win32_ensure_ntdll_loaded): New function.
13655 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
13656
13657 2013-12-13 Pedro Alves <palves@redhat.com>
13658
13659 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
13660 if equal to TARGET_WAITKIND_LOADED.
13661 * win32-low.c (cached_status): New static global.
13662 (win32_wait): Add declaration.
13663 (do_initial_child_stuff): Flush all initial pending debug events
13664 up to the initial breakpoint.
13665 (win32_wait): If CACHED_STATUS was set, return that instead
13666 of doing a real wait. Remove the code resuming the execution
13667 of the inferior after receiving a TARGET_WAITKIND_LOADED event
13668 during the initial phase. Also remove the code changing
13669 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
13670 TARGET_WAITKIND_STOPPED.
13671
13672 2013-12-11 Yao Qi <yao@codesourcery.com>
13673
13674 * notif.c (handle_notif_ack): Return 0 if no notification
13675 matches.
13676
13677 2013-11-20 Doug Evans <dje@google.com>
13678
13679 * linux-low.c (linux_set_resume_request): Fix comment.
13680
13681 2013-11-20 Doug Evans <dje@google.com>
13682
13683 * linux-low.c (resume_status_pending_p): Tweak comment.
13684
13685 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
13686
13687 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
13688 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
13689 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
13690 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
13691 (srv_amd64_regobj): Add amd64-mpx.o.
13692 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
13693 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
13694 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
13695 * i387-fp.c (num_pl_bnd_register) Added constant.
13696 (num_pl_bnd_cfg_registers) Added constant.
13697 (struct i387_xsave) Added reserved area and MPX fields.
13698 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
13699 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
13700 function.
13701 (tdesc_i386_mpx_linux): Add MPX amd64 target.
13702 (init_registers_amd64_mpx_linux): Declare new function.
13703 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
13704 (x86_64_regmap): Add MPX registers.
13705 (x86_linux_read_description): Add MPX case.
13706 (initialize_low_arch): Initialize MPX targets.
13707
13708 2013-11-18 Tom Tromey <tromey@redhat.com>
13709
13710 * configure: Rebuild.
13711 * configure.ac: Don't check for stdlib.h.
13712 * gdbreplay.c: Unconditionally include stdlib.h.
13713
13714 2013-11-18 Tom Tromey <tromey@redhat.com>
13715
13716 * config.in: Rebuild.
13717 * configure: Rebuild.
13718 * configure.ac: Don't use AC_HEADER_DIRENT.
13719
13720 2013-11-18 Tom Tromey <tromey@redhat.com>
13721
13722 * server.h: Don't check HAVE_STRING_H.
13723 * gdbreplay.c: Don't check HAVE_STRING_H.
13724 * configure: Rebuild.
13725
13726 2013-11-18 Tom Tromey <tromey@redhat.com>
13727
13728 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
13729 LIBGNU.
13730
13731 2013-11-08 Tom Tromey <tromey@redhat.com>
13732
13733 * configure, config.in: Rebuild.
13734 * configure.ac: Remove unused configury.
13735
13736 2013-11-08 Tom Tromey <tromey@redhat.com>
13737
13738 * acinclude.m4: Include common.m4, codeset.m4.
13739 * configure, config.in: Rebuild.
13740 * configure.ac: Use GDB_AC_COMMON.
13741
13742 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
13743
13744 * linux-s390-low.c (HWCAP_S390_TE): New define.
13745 (s390_arch_setup): Consider the TE field in the HWCAP for
13746 determining 'have_regset_tdb'.
13747
13748 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
13749
13750 PR gdb/16014
13751 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
13752 call to sizeof.
13753
13754 2013-10-02 Pedro Alves <palves@redhat.com>
13755
13756 * server.c (process_serial_event): Don't output "GDBserver
13757 exiting" if GDB is connected through stdio.
13758 * target.c (mywait): Likewise, be silent if GDB is connected
13759 through stdio.
13760
13761 2013-10-01 Joel Brobecker <brobecker@adacore.com>
13762
13763 * lynx-low.c (lynx_add_threads_after_attach): New function.
13764 (lynx_attach): Remove call to add_thread. Add call to
13765 lynx_add_threads_after_attach instead.
13766
13767 2013-09-28 Mike Frysinger <vapier@gentoo.org>
13768
13769 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
13770 * config.in, configure: Regenerated.
13771
13772 2013-09-18 Yao Qi <yao@codesourcery.com>
13773
13774 PR server/15959
13775 * server.c (start_inferior): Clear 'resume_info'.
13776
13777 2013-09-16 Jiong Wang <jiwang@tilera.com>
13778
13779 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
13780 for each register.
13781
13782 2013-09-16 Jiong Wang <jiwang@tilera.com>
13783
13784 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
13785 linux-tile-low.o to srv_tgtobj.
13786
13787 2013-09-16 Will Newton <will.newton@linaro.org>
13788
13789 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
13790 out regs.
13791
13792 2013-09-06 Pedro Alves <palves@redhat.com>
13793
13794 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
13795 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
13796 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
13797 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
13798 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
13799 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
13800
13801 2013-09-06 Pedro Alves <palves@redhat.com>
13802
13803 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
13804 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
13805
13806 2013-09-06 Pedro Alves <palves@redhat.com>
13807
13808 * linux-amd64-ipa.c: Include tracepoint.h.
13809 * linux-i386-ipa.c: Include tracepoint.h.
13810
13811 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13812
13813 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
13814 (ps_get_thread_area): New function.
13815
13816 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13817
13818 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
13819 (initialize_low_arch): Call init_registers_crisv32 rather than
13820 init_register_crisv32.
13821
13822 2013-09-05 Pedro Alves <palves@redhat.com>
13823
13824 * server.h (handle_vFile, hostio_last_error_from_errno): Move
13825 to ...
13826 * hostio.h: ... this new file.
13827 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
13828 win32-low.c: Include hostio.h.
13829
13830 2013-09-05 Pedro Alves <palves@redhat.com>
13831
13832 * server.h (gdb_client_data, handler_func, callback_handler_func)
13833 (delete_file_handler, add_file_handler, append_callback_event)
13834 (delete_callback_event, start_event_loop, initialize_event_loop):
13835 Move to event-loop.h and include it.
13836 * event-loop.h: New file.
13837
13838 2013-09-05 Pedro Alves <palves@redhat.com>
13839
13840 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
13841 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
13842 (loaded_dll, unloaded_dll): Move to ...
13843 * dll.h: ... this new file.
13844 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
13845
13846 2013-09-05 Pedro Alves <palves@redhat.com>
13847
13848 * server.h (current_process, get_thread_process, all_processes)
13849 (add_inferior_to_list, for_each_inferior, current_inferior)
13850 (remove_inferior, add_process, remove_process, find_process_pid)
13851 (have_started_inferiors_p, have_attached_inferiors_p)
13852 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
13853 (clear_inferiors, find_inferior, find_inferior_id)
13854 (inferior_target_data, set_inferior_target_data)
13855 (inferior_regcache_data, set_inferior_regcache_data): Move to
13856 inferiors.h, and include it.
13857 * inferiors.h: New file.
13858
13859 2013-09-05 Pedro Alves <palves@redhat.com>
13860
13861 * server.h (struct emit_ops, current_insn_ptr, emit_error):
13862 Move ...
13863 * ax.h: ... here.
13864
13865 2013-09-05 Pedro Alves <palves@redhat.com>
13866
13867 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
13868 tracepoint.h.
13869 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
13870 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
13871 (handle_tracepoint_general_set, handle_tracepoint_query)
13872 (tracepoint_finished_step, tracepoint_was_hit)
13873 (release_while_stepping_state_list, current_traceframe)
13874 (in_readonly_region, traceframe_read_mem)
13875 (fetch_traceframe_registers, traceframe_read_sdata)
13876 (traceframe_read_info, struct fast_tpoint_collect_status)
13877 (fast_tracepoint_collecting, force_unlock_trace_buffer)
13878 (handle_tracepoit_bkpts, initialize_low_tracepoint)
13879 (supply_fast_tracepoint_registers)
13880 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
13881 (ipa_tdesc, claim_trampoline_space)
13882 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
13883 (agent_mem_read, agent_get_trace_state_variable_value)
13884 (agent_set_trace_state_variable_value, agent_tsv_read)
13885 (agent_mem_read_string, get_raw_reg_func_addr)
13886 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
13887 * tracepoint.h: ... this new file.
13888
13889 2013-09-05 Pedro Alves <palves@redhat.com>
13890
13891 * server.h (perror_with_name, error, fatal, warning, paddress)
13892 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
13893 include it.
13894 * utils.h: New file.
13895
13896 2013-09-05 Pedro Alves <palves@redhat.com>
13897
13898 * server.h (remote_debug, noack_mode, transport_is_reliable)
13899 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
13900 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
13901 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
13902 (write_enn, initialize_async_io, enable_async_io)
13903 (disable_async_io, check_remote_input_interrupt_request)
13904 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
13905 (dead_thread_notify, prepare_resume_reply)
13906 (decode_address_to_semicolon, decode_address, decode_m_packet)
13907 (decode_M_packet, decode_X_packet, decode_xfer_write)
13908 (decode_search_memory_packet, unhexify, hexify)
13909 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
13910 (look_up_one_symbol, relocate_instruction)
13911 (monitor_output): Move to remote-utils.h, and include it.
13912 * remote-utils.h: New file.
13913
13914 2013-09-05 Pedro Alves <palves@redhat.com>
13915
13916 * server.h (_): Delete.
13917
13918 2013-09-02 Pedro Alves <palves@redhat.com>
13919
13920 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
13921 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
13922 allocated.
13923 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
13924
13925 2013-09-02 Pierre Muller <muller@sourceware.org>
13926
13927 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
13928 or WriteProcessMemory complete successfully and handle
13929 ERROR_PARTIAL_COPY error.
13930
13931 2013-09-02 Pedro Alves <palves@redhat.com>
13932
13933 * server.c (gdb_read_memory): Return -1 on traceframe memory read
13934 error instead of EIO.
13935
13936 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
13937
13938 PR server/15604
13939 * linux-low.c: Include filestuff.h.
13940 (linux_create_inferior) <pid == 0>: Call close_most_fds.
13941 * lynx-low.c: Include filestuff.h.
13942 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
13943 * server.c: Include filestuff.h.
13944 (main): Call notice_open_fds.
13945 * spu-low.c: Include filestuff.h.
13946 (spu_create_inferior) <pid == 0>: Call close_most_fds.
13947
13948 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
13949
13950 * Makefile.in: Explain why ../target and ../nat are not
13951 listed as include file search paths.
13952 (linux-waitpid.o): New object file rule.
13953 * configure.srv (srv_native_linux_obj): New variable.
13954 Replace all occurrences of linux native object files with
13955 $srv_native_linux_obj.
13956 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
13957 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
13958 (linux_enable_event_reporting): Remove declaration.
13959 (my_waitpid): Moved to common/linux-waitpid.c.
13960 (linux_wait_for_event): Pass ptid when calling
13961 linux_enable_event_reporting.
13962 (linux_supports_tracefork_flag): Remove.
13963 (linux_enable_event_reporting): Likewise.
13964 (linux_tracefork_grandchild): Remove.
13965 (STACK_SIZE): Moved to common/linux-ptrace.c.
13966 (linux_tracefork_child): Remove.
13967 (linux_test_for_tracefork): Remove.
13968 (linux_look_up_symbols): Call linux_supports_traceclone.
13969 (initialize_low): Remove call to linux_test_for_tracefork.
13970 * linux-low.h (PTRACE_TYPE_ARG3): Move to
13971 common/linux-ptrace.h.
13972 (PTRACE_TYPE_ARG4): Likewise.
13973 Include linux-ptrace.h.
13974
13975 2013-08-21 Pedro Alves <palves@redhat.com>
13976
13977 * config.in: Renegerate.
13978
13979 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
13980
13981 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
13982 (SFILES): Remove $(srcdir)/common/target-common.c and
13983 add $(srcdir)/target/waitstatus.c.
13984 (OBS): Remove target-common.o and add waitstatus.o.
13985 (server_h): Remove $(srcdir)/../common/target-common.h and
13986 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
13987 and $(srcdir)/../target/waitstatus.h.
13988 (target-common.o): Remove.
13989 (waitstatus.o): New target object file.
13990 * target.h: Do not include target-common.h and
13991 include target/resume.h, target/wait.h and
13992 target/waitstatus.h.
13993
13994 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
13995
13996 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13997 to PTRACE_TYPE_ARG3.
13998 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
13999 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
14000 PTRACE_TYPE_ARG4.
14001 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
14002 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
14003
14004 2013-07-27 Jie Zhang <jie@codesourcery.com>
14005 Daniel Jacobowitz <dan@codesourcery.com>
14006 Yao Qi <yao@codesourcery.com>
14007
14008 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
14009 (mips-linux-watch.o): New rule.
14010 (mips_linux_watch_h): New variable.
14011 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
14012 srv_tgtobj.
14013 * linux-mips-low.c: Include mips-linux-watch.h.
14014 (struct arch_process_info, struct arch_lwp_info): New.
14015 (update_watch_registers_callback): New function.
14016 (mips_linux_new_process, mips_linux_new_thread) New functions.
14017 (mips_linux_prepare_to_resume, mips_insert_point): New
14018 functions.
14019 (mips_remove_point, mips_stopped_by_watchpoint): New
14020 functions.
14021 (rsp_bp_type_to_target_hw_bp_type): New function.
14022 (mips_stopped_data_address): New function.
14023 (the_low_target): Add watchpoint support functions.
14024
14025 2013-07-27 Yao Qi <yao@codesourcery.com>
14026
14027 * i386-low.c: Include break-common.h.
14028 (enum target_hw_bp_type): Remove.
14029
14030 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
14031
14032 * Makefile.in (SFILES): /common/target-common.c.
14033 (OBS): Add target-common.o.
14034 (server_h): Add $(srcdir)/../common/target-common.h.
14035 (target-common.o): New target.
14036 * server.c (queue_stop_reply_callback): Free
14037 status string after use.
14038 * target.c (target_waitstatus_to_string): Remove.
14039 * target.h: Include target-common.h.
14040 (resume_kind): Likewise.
14041 (target_waitkind): Likewise.
14042 (target_waitstatus): Likewise.
14043 (TARGET_WNOHANG): Likewise.
14044
14045 2013-07-04 Yao Qi <yao@codesourcery.com>
14046
14047 * Makefile.in (host_alias): Use @host_noncanonical@.
14048 (target_alias): Use @target_noncanonical@.
14049 * configure.ac: Use ACX_NONCANONICAL_TARGET and
14050 ACX_NONCANONICAL_HOST.
14051 * configure: Regenerated.
14052
14053 Revert:
14054 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
14055
14056 * configure.ac (version_host, version_target): Set and AC_SUBST them.
14057 * configure: Rebuild.
14058 * Makefile.in (version_host, version_target): Get from configure.
14059 (version.c): Use $(version_host) and $(version_target).
14060
14061 2013-07-03 Pedro Alves <palves@redhat.com>
14062
14063 * Makefile.in (config.status): Depend on development.sh.
14064 * acinclude.m4: Include libmcheck.m4.
14065 * configure: Regenerate.
14066
14067 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
14068
14069 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
14070 attribute inside the parentheses.
14071 (winapi_DebugSetProcessKillOnExit): Ditto.
14072 (winapi_DebugBreakProcess): Ditto.
14073 (winapi_GenerateConsoleCtrlEvent): Ditto.
14074
14075 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
14076
14077 * notif.h (notif_event): Add a dummy member to avoid compiler
14078 errors.
14079
14080 2013-07-01 Pedro Alves <palves@redhat.com>
14081
14082 * hostio.c (HOSTIO_PATH_MAX): Define.
14083 (require_filename, handle_open, handle_unlink, handle_readlink):
14084 Use it.
14085
14086 2013-07-01 Pedro Alves <palves@redhat.com>
14087
14088 * server.h: Include "pathmax.h".
14089 * linux-low.c: Don't include sys/param.h.
14090 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
14091 MAXPATHLEN.
14092 * win32-low.c: Don't include sys/param.h.
14093 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
14094
14095 2013-07-01 Pedro Alves <palves@redhat.com>
14096
14097 * event-loop.c: Don't check HAVE_UNISTD_H before including
14098 <unistd.h>.
14099 * gdbreplay.c: Likewise.
14100 * remote-utils.c: Likewise.
14101 * server.c: Likewise.
14102 * configure.ac: Don't check for unistd.h.
14103 * configure: Regenerate.
14104
14105 2013-06-28 Tom Tromey <tromey@redhat.com>
14106
14107 * Makefile.in (version.c): Use version.in, not
14108 common/version.in.
14109
14110 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
14111
14112 * configure.ac (version_host, version_target): Set and AC_SUBST them.
14113 * configure: Rebuild.
14114 * Makefile.in (version_host, version_target): Get from configure.
14115 (version.c): Use $(version_host) and $(version_target).
14116
14117 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
14118
14119 Fix trace-status to output user name without trailing colon.
14120 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
14121
14122 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
14123
14124 Fix trace-status to output proper start-time and stop-time.
14125 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
14126 output start time and stop time in hex as gdb expects.
14127
14128 2013-06-26 Pedro Alves <pedro@codesourcery.com>
14129
14130 * tracepoint.c (build_traceframe_info_xml): Output trace state
14131 variables present in the trace buffer.
14132
14133 2013-06-24 Tom Tromey <tromey@redhat.com>
14134
14135 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
14136 create-version.sh.
14137 (version.o): Remove.
14138 * gdbreplay.c: Include version.h.
14139 (version, host_name): Don't declare.
14140 * server.h: Include version.h.
14141 (version, host_name): Don't declare.
14142
14143 2013-06-12 Pedro Alves <palves@redhat.com>
14144
14145 * linux-x86-low.c (linux_is_elf64): Delete global.
14146 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
14147 with local linux_pid_exe_is_elf_64_file use.
14148
14149 2013-06-11 Pedro Alves <palves@redhat.com>
14150
14151 * linux-low.c (regset_disabled, disable_regset): New functions.
14152 (regsets_fetch_inferior_registers)
14153 (regsets_store_inferior_registers): Use them.
14154 (initialize_regsets_info); Don't allocate the disabled_regsets
14155 array here.
14156 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
14157 comment.
14158
14159 2013-06-11 Pedro Alves <palves@redhat.com>
14160
14161 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
14162 xmalloc.
14163
14164 2013-06-11 Pedro Alves <palves@redhat.com>
14165
14166 * linux-x86-low.c (initialize_low_arch): Call
14167 init_registers_x32_avx_linux.
14168
14169 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
14170
14171 Fix compatibility with Android Bionic.
14172 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
14173 it is not empty.
14174
14175 2013-06-07 Pedro Alves <palves@redhat.com>
14176
14177 PR server/14823
14178 * Makefile.in (OBS): Add tdesc.o.
14179 (IPA_OBJS): Add tdesc-ipa.o.
14180 (tdesc-ipa.o): New rule.
14181 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
14182 interface.
14183 * linux-low.c (new_inferior): Delete.
14184 (disabled_regsets, num_regsets): Delete.
14185 (linux_add_process): Adjust to set the new per-process
14186 new_inferior flag.
14187 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
14188 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
14189 was a stop. When calling arch_setup, switch the current inferior
14190 to the thread that got an event.
14191 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
14192 (regsets_fetch_inferior_registers)
14193 (regsets_store_inferior_registers): New regsets_info parameter.
14194 Adjust to use it.
14195 (linux_register_in_regsets): New regs_info parameter. Adjust to
14196 use it.
14197 (register_addr, fetch_register, store_register): New usrregs_info
14198 parameter. Adjust to use it.
14199 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
14200 parameter regs_info. Adjust to use it.
14201 (linux_fetch_registers): Get the current inferior's regs_info, and
14202 adjust to use it.
14203 (linux_store_registers): Ditto.
14204 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
14205 (initialize_low): Don't initialize the target_regsets here. Call
14206 initialize_low_arch.
14207 * linux-low.h (target_regsets): Delete declaration.
14208 (struct regsets_info): New.
14209 (struct usrregs_info): New.
14210 (struct regs_info): New.
14211 (struct process_info_private) <new_inferior>: New field.
14212 (struct linux_target_ops): Delete the num_regs, regmap, and
14213 regset_bitmap fields. New field regs_info.
14214 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
14215 * i387-fp.c (num_xmm_registers): Delete.
14216 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
14217 calls to new interface.
14218 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
14219 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
14220 Infer the number of xmm registers from the regcache's target
14221 description.
14222 * i387-fp.h (num_xmm_registers): Delete.
14223 * inferiors.c (add_thread): Don't install the thread's regcache
14224 here.
14225 * proc-service.c (gregset_info): Fetch the current inferior's
14226 regs_info. Adjust to use it.
14227 * regcache.c: Include tdesc.h.
14228 (register_bytes, reg_defs, num_registers)
14229 (gdbserver_expedite_regs): Delete.
14230 (get_thread_regcache): If the thread doesn't have a regcache yet,
14231 create one, instead of aborting gdbserver.
14232 (regcache_invalidate_one): Rename to ...
14233 (regcache_invalidate_thread): ... this.
14234 (regcache_invalidate_one): New.
14235 (regcache_invalidate): Only invalidate registers of the current
14236 process.
14237 (init_register_cache): Add target_desc parameter, and use it.
14238 (new_register_cache): Ditto. Assert the target description has a
14239 non zero registers_size.
14240 (regcache_cpy): Add assertions. Adjust.
14241 (realloc_register_cache, set_register_cache): Delete.
14242 (registers_to_string, registers_from_string): Adjust.
14243 (find_register_by_name, find_regno, find_register_by_number)
14244 (register_cache_size): Add target_desc parameter, and use it.
14245 (free_register_cache_thread, free_register_cache_thread_one)
14246 (regcache_release, register_cache_size): New.
14247 (register_size): Add target_desc parameter, and use it.
14248 (register_data, supply_register, supply_register_zeroed)
14249 (supply_regblock, supply_register_by_name, collect_register)
14250 (collect_register_as_string, collect_register_by_name): Adjust.
14251 * regcache.h (struct target_desc): Forward declare.
14252 (struct regcache) <tdesc>: New field.
14253 (init_register_cache, new_register_cache): Add target_desc
14254 parameter.
14255 (regcache_invalidate_thread): Declare.
14256 (regcache_invalidate_one): Delete declaration.
14257 (regcache_release): Declare.
14258 (find_register_by_number, register_cache_size, register_size)
14259 (find_regno): Add target_desc parameter.
14260 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
14261 declarations.
14262 * remote-utils.c: Include tdesc.h.
14263 (outreg, prepare_resume_reply): Adjust.
14264 * server.c: Include tdesc.h.
14265 (gdbserver_xmltarget): Delete declaration.
14266 (get_features_xml, process_serial_event): Adjust.
14267 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
14268 declare.
14269 (struct process_info) <tdesc>: New field.
14270 (ipa_tdesc): Declare.
14271 * tdesc.c: New file.
14272 * tdesc.h: New file.
14273 * tracepoint.c: Include tdesc.h.
14274 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
14275 (get_context_regcache): Adjust to pass ipa_tdesc down.
14276 (do_action_at_tracepoint): Adjust to get the register cache size
14277 from the context regcache's description.
14278 (traceframe_walk_blocks): Adjust to get the register cache size
14279 from the current trace frame's description.
14280 (traceframe_get_pc): Adjust to get current trace frame's
14281 description and pass it down.
14282 (gdb_collect): Adjust to get the register cache size from the
14283 IPA's description.
14284 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
14285 (gdbserver_xmltarget): Delete.
14286 (initialize_low_tracepoint): Set the ipa's target description.
14287 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
14288 (initialize_low_tracepoint): Set the ipa's target description.
14289 * linux-x86-low.c: Include tdesc.h.
14290 [__x86_64__] (is_64bit_tdesc): New.
14291 (ps_get_thread_area, x86_get_thread_area): Use it.
14292 (i386_cannot_store_register): Rename to ...
14293 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
14294 (i386_cannot_fetch_register): Rename to ...
14295 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
14296 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
14297 to new interface.
14298 (target_regsets): Rename to ...
14299 (x86_regsets): ... this.
14300 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
14301 interface.
14302 (x86_siginfo_fixup): Use is_64bit_tdesc.
14303 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
14304 (tdesc_x32_avx_linux, tdesc_x32_linux)
14305 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
14306 Declare.
14307 (x86_linux_update_xmltarget): Delete.
14308 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
14309 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
14310 (AMD64_LINUX_USER64_CS): New.
14311 (x86_linux_read_description): New, based on
14312 x86_linux_update_xmltarget.
14313 (same_process_callback): New.
14314 (x86_arch_setup_process_callback): New.
14315 (x86_linux_update_xmltarget): New.
14316 (x86_regsets_info): New.
14317 (amd64_linux_regs_info): New.
14318 (i386_linux_usrregs_info): New.
14319 (i386_linux_regs_info): New.
14320 (x86_linux_regs_info): New.
14321 (x86_arch_setup): Reimplement.
14322 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
14323 (x86_emit_ops): Ditto.
14324 (the_low_target): Adjust. Install x86_linux_regs_info,
14325 x86_cannot_fetch_register, and x86_cannot_store_register.
14326 (initialize_low_arch): New.
14327 * linux-ia64-low.c (tdesc_ia64): Declare.
14328 (ia64_fetch_register): Adjust.
14329 (ia64_usrregs_info, regs_info): New globals.
14330 (ia64_regs_info): New function.
14331 (the_low_target): Adjust.
14332 (initialize_low_arch): New function.
14333 * linux-sparc-low.c (tdesc_sparc64): Declare.
14334 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
14335 Adjust.
14336 (sparc_arch_setup): New function.
14337 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
14338 (the_low_target): Adjust.
14339 (initialize_low_arch): New function.
14340 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
14341 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
14342 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
14343 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
14344 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
14345 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
14346 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
14347 (tdesc_powerpc_isa205_vsx64l): Declare.
14348 (ppc_cannot_store_register, ppc_collect_ptrace_register)
14349 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
14350 (ppc_set_pc, ppc_get_hwcap): Adjust.
14351 (ppc_usrregs_info): Forward declare.
14352 (!__powerpc64__) ppc_regmap_adjusted: New global.
14353 (ppc_arch_setup): Adjust to the current process'es target
14354 description.
14355 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
14356 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
14357 (ppc_store_evrregset): Adjust.
14358 (target_regsets): Rename to ...
14359 (ppc_regsets): ... this, and make static.
14360 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
14361 (ppc_regs_info): New function.
14362 (the_low_target): Adjust.
14363 (initialize_low_arch): New function.
14364 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
14365 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
14366 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
14367 (tdesc_s390x_linux64v2): Declare.
14368 (s390_collect_ptrace_register, s390_supply_ptrace_register)
14369 (s390_fill_gregset, s390_store_last_break): Adjust.
14370 (target_regsets): Rename to ...
14371 (s390_regsets): ... this, and make static.
14372 (s390_get_pc, s390_set_pc): Adjust.
14373 (s390_get_hwcap): New target_desc parameter, and use it.
14374 [__s390x__] (have_hwcap_s390_high_gprs): New global.
14375 (s390_arch_setup): Adjust to set the current process'es target
14376 description. Don't adjust the regmap.
14377 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
14378 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
14379 (regs_info_3264): New globals.
14380 (s390_regs_info): New function.
14381 (the_low_target): Adjust.
14382 (initialize_low_arch): New function.
14383 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
14384 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
14385 [__mips64] (init_registers_mips_linux)
14386 (init_registers_mips_dsp_linux): Delete defines.
14387 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
14388 (have_dsp): New global.
14389 (mips_read_description): New, based on mips_arch_setup.
14390 (mips_arch_setup): Reimplement.
14391 (get_usrregs_info): New function.
14392 (mips_cannot_fetch_register, mips_cannot_store_register)
14393 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
14394 (mips_fill_fpregset, mips_store_fpregset): Adjust.
14395 (target_regsets): Rename to ...
14396 (mips_regsets): ... this, and make static.
14397 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
14398 (dsp_regs_info, regs_info): New globals.
14399 (mips_regs_info): New function.
14400 (the_low_target): Adjust.
14401 (initialize_low_arch): New function.
14402 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
14403 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
14404 Declare.
14405 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
14406 (arm_read_description): New, with bits factored from
14407 arm_arch_setup.
14408 (arm_arch_setup): Reimplement.
14409 (target_regsets): Rename to ...
14410 (arm_regsets): ... this, and make static.
14411 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
14412 (arm_regs_info): New function.
14413 (the_low_target): Adjust.
14414 (initialize_low_arch): New function.
14415 * linux-m68k-low.c (tdesc_m68k): Declare.
14416 (target_regsets): Rename to ...
14417 (m68k_regsets): ... this, and make static.
14418 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
14419 (m68k_regs_info): New function.
14420 (m68k_arch_setup): New function.
14421 (the_low_target): Adjust.
14422 (initialize_low_arch): New function.
14423 * linux-sh-low.c (tdesc_sharch): Declare.
14424 (target_regsets): Rename to ...
14425 (sh_regsets): ... this, and make static.
14426 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
14427 (sh_regs_info, sh_arch_setup): New functions.
14428 (the_low_target): Adjust.
14429 (initialize_low_arch): New function.
14430 * linux-bfin-low.c (tdesc_bfin): Declare.
14431 (bfin_arch_setup): New function.
14432 (bfin_usrregs_info, regs_info): New globals.
14433 (bfin_regs_info): New function.
14434 (the_low_target): Adjust.
14435 (initialize_low_arch): New function.
14436 * linux-cris-low.c (tdesc_cris): Declare.
14437 (cris_arch_setup): New function.
14438 (cris_usrregs_info, regs_info): New globals.
14439 (cris_regs_info): New function.
14440 (the_low_target): Adjust.
14441 (initialize_low_arch): New function.
14442 * linux-cris-low.c (tdesc_crisv32): Declare.
14443 (cris_arch_setup): New function.
14444 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
14445 (cris_regs_info): New function.
14446 (the_low_target): Adjust.
14447 (initialize_low_arch): New function.
14448 * linux-m32r-low.c (tdesc_m32r): Declare.
14449 (m32r_arch_setup): New function.
14450 (m32r_usrregs_info, regs_info): New globals.
14451 (m32r_regs_info): Adjust.
14452 (initialize_low_arch): New function.
14453 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
14454 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
14455 (tic6x_usrregs_info): Forward declare.
14456 (tic6x_read_description): New function, based on ...
14457 (tic6x_arch_setup): ... this. Reimplement.
14458 (target_regsets): Rename to ...
14459 (tic6x_regsets): ... this, and make static.
14460 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
14461 (tic6x_regs_info): New function.
14462 (the_low_target): Adjust.
14463 (initialize_low_arch): New function.
14464 * linux-xtensa-low.c (tdesc_xtensa): Declare.
14465 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
14466 (target_regsets): Rename to ...
14467 (xtensa_regsets): ... this, and make static.
14468 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
14469 globals.
14470 (xtensa_arch_setup, xtensa_regs_info): New functions.
14471 (the_low_target): Adjust.
14472 (initialize_low_arch): New function.
14473 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
14474 (nios2_arch_setup): Set the current process'es tdesc.
14475 (target_regsets): Rename to ...
14476 (nios2_regsets): ... this.
14477 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
14478 (nios2_regs_info): New function.
14479 (the_low_target): Adjust.
14480 (initialize_low_arch): New function.
14481 * linux-aarch64-low.c (tdesc_aarch64): Declare.
14482 (aarch64_arch_setup): Set the current process'es tdesc.
14483 (target_regsets): Rename to ...
14484 (aarch64_regsets): ... this.
14485 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
14486 (aarch64_regs_info): New function.
14487 (the_low_target): Adjust.
14488 (initialize_low_arch): New function.
14489 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
14490 globals.
14491 (target_regsets): Rename to ...
14492 (tile_regsets): ... this.
14493 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
14494 (tile_regs_info): New function.
14495 (tile_arch_setup): Set the current process'es tdesc.
14496 (the_low_target): Adjust.
14497 (initialize_low_arch): New function.
14498 * spu-low.c (tdesc_spu): Declare.
14499 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
14500 * win32-arm-low.c (tdesc_arm): Declare.
14501 (arm_arch_setup): New function.
14502 (the_low_target): Install arm_arch_setup instead of
14503 init_registers_arm.
14504 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
14505 (init_windows_x86): Rename to ...
14506 (i386_arch_setup): ... this. Set `win32_tdesc'.
14507 (the_low_target): Adjust.
14508 * win32-low.c (win32_tdesc): New global.
14509 (child_add_thread): Don't create the thread cache here.
14510 (do_initial_child_stuff): Set the new process'es tdesc.
14511 * win32-low.h (struct target_desc): Forward declare.
14512 (win32_tdesc): Declare.
14513 * lynx-i386-low.c (tdesc_i386): Declare global.
14514 (lynx_i386_arch_setup): Set `lynx_tdesc'.
14515 * lynx-low.c (lynx_tdesc): New global.
14516 (lynx_add_process): Set the new process'es tdesc.
14517 * lynx-low.h (struct target_desc): Forward declare.
14518 (lynx_tdesc): Declare global.
14519 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
14520 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
14521 * nto-low.c (nto_tdesc): New global.
14522 (do_attach): Set the new process'es tdesc.
14523 * nto-low.h (struct target_desc): Forward declare.
14524 (nto_tdesc): Declare.
14525 * nto-x86-low.c (tdesc_i386): Declare.
14526 (nto_x86_arch_setup): Set `nto_tdesc'.
14527
14528 2013-06-04 Gary Benson <gbenson@redhat.com>
14529
14530 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
14531 to qSupported response when appropriate.
14532 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
14533 with nonzero-length annex.
14534 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
14535 arguments supplied in annex.
14536
14537 2013-05-31 Doug Evans <dje@google.com>
14538
14539 PR server/15594
14540 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
14541 64 bits in 64-cross-32 environment.
14542
14543 2013-05-28 Pedro Alves <palves@redhat.com>
14544
14545 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
14546 (aarch64-without-fpu.c): Delete rule.
14547 * configure.srv (aarch64*-*-linux*): Remove references to
14548 aarch64-without-fpu.o and aarch64-without-fpu.xml.
14549 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
14550 declaration.
14551
14552 2013-05-24 Pedro Alves <palves@redhat.com>
14553
14554 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
14555 instead of strchr/decode_address. Error if the range isn't split
14556 with a ','. Don't assume there's be a ':' in the action.
14557
14558 2013-05-23 Yao Qi <yao@codesourcery.com>
14559 Pedro Alves <palves@redhat.com>
14560
14561 * linux-low.c (lwp_in_step_range): New function.
14562 (linux_wait_1): If the thread was range stepping and stopped
14563 outside the stepping range, report the stop to GDB. Otherwise,
14564 continue stepping. Add range stepping debug output.
14565 (linux_set_resume_request): Copy the step range from the resume
14566 request to the lwp.
14567 (linux_supports_range_stepping): New.
14568 (linux_target_ops) <supports_range_stepping>: Set to
14569 linux_supports_range_stepping.
14570 * linux-low.h (struct linux_target_ops)
14571 <supports_range_stepping>: New field.
14572 (struct lwp_info) <step_range_start, step_range_end>: New fields.
14573 * linux-x86-low.c (x86_supports_range_stepping): New.
14574 (the_low_target) <supports_range_stepping>: Set to
14575 x86_supports_range_stepping.
14576 * server.c (handle_v_cont): Handle 'r' action.
14577 (handle_v_requests): Append ";r" if the target supports range
14578 stepping.
14579 * target.h (struct thread_resume) <step_range_start,
14580 step_range_end>: New fields.
14581 (struct target_ops) <supports_range_stepping>:
14582 New field.
14583 (target_supports_range_stepping): New macro.
14584
14585 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14586
14587 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
14588 confusion in comment.
14589
14590 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14591
14592 * lynx-low.c (struct process_info_private): New type.
14593 (lynx_add_process): New function.
14594 (lynx_create_inferior, lynx_attach): Replace calls to
14595 add_process by calls to lynx_add_process.
14596 (lynx_resume): If PTID is null, then try using
14597 current_process()->private->last_wait_event_ptid.
14598 Add comments.
14599 (lynx_clear_inferiors): Delete. The contents of that function
14600 has been inlined in lynx_mourn;
14601 (lynx_wait_1): Save the ptid in the process's private data.
14602 (lynx_mourn): Free the process' private data. Replace call
14603 to lynx_clear_inferiors by call to clear_inferiors.
14604
14605 2013-05-17 Yao Qi <yao@codesourcery.com>
14606
14607 * i386-low.c (i386_length_and_rw_bits): Move the comment to
14608 the right place.
14609
14610 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
14611
14612 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
14613 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
14614 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
14615 PT_TEXT_END_ADDR guards. Update comments.
14616 (linux_target_op) <read_offsets>: Conditionally define to
14617 linux_read_offsets if the target is UCLIBC and if it defines
14618 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
14619
14620 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
14621 Andrew Jenner <andrew@codesourcery.com>
14622
14623 * Makefile.in (SFILES): Add linux-nios2-low.c.
14624 (clean): Add action to delete nios2-linux.c.
14625 (nios2-linux.c): New rule.
14626 * configure.srv: Add nios2*-*-linux*.
14627 * linux-nios2-low.c: New.
14628
14629 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
14630
14631 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
14632
14633 2013-04-25 Hui Zhu <hui@codesourcery.com>
14634
14635 PR gdb/15186
14636 * ax.c (ax_printf): Add fflush.
14637
14638 2013-04-22 Tom Tromey <tromey@redhat.com>
14639
14640 * Makefile.in (SFILES): Add filestuff.c.
14641 (OBS): Add filestuff.o.
14642 (filestuff.o): New target.
14643 * config.in, configure: Rebuild.
14644 * configure.ac: Check for fdwalk, pipe2.
14645
14646 2013-04-17 Pedro Alves <palves@redhat.com>
14647
14648 * configure.ac (USE_THREAD_DB): Delete variable.
14649 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
14650 Don't AC_SUBST USE_THREAD_DB.
14651 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
14652 * config.in, configure: Regenerate.
14653
14654 2013-04-16 Pedro Alves <palves@redhat.com>
14655
14656 * linux-low.h (struct lwp_info) <thread_known>: Move under
14657 the USE_THREAD_DB #ifdef.
14658
14659 2013-04-16 Pedro Alves <palves@redhat.com>
14660
14661 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
14662 (linux-low.o): Delete rule.
14663 * linux-low.h: Always include "gdb_thread_db.h" instead of
14664 conditionally including thread_db.h.
14665 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
14666 HAVE_THREAD_DB_H.
14667
14668 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14669
14670 * Makefile.in (install-only): Fix make install regression.
14671
14672 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
14673
14674 Convert man pages to texinfo, new gdbinit.5 texinfo page.
14675 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
14676 installation.
14677 * gdbserver.1: Remove.
14678
14679 2013-03-22 Pedro Alves <palves@redhat.com>
14680
14681 * linux-low.c (handle_extended_wait): Don't call
14682 linux_enable_event_reporting.
14683
14684 2013-03-15 Tony Theodore <tonyt@logyst.com>
14685
14686 PR build/9098:
14687 * Makefile.in (SHELL): Use @SHELL@.
14688
14689 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
14690
14691 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
14692 compiler warning.
14693
14694 2013-03-13 Joel Brobecker <brobecker@adacore.com>
14695
14696 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
14697 Remove extraneous NULL element.
14698
14699 2013-03-13 Yao Qi <yao@codesourcery.com>
14700
14701 * tracepoint.c (traceframe_read_tsv): Look for the last matched
14702 'V' block in trace frame.
14703
14704 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14705
14706 * target.h (struct target_ops): Add btrace ops.
14707 (target_supports_btrace): New macro.
14708 (target_enable_btrace): New macro.
14709 (target_disable_btrace): New macro.
14710 (target_read_btrace): New macro.
14711 * gdbthread.h (struct thread_info): Add btrace field.
14712 * server.c: Include btrace-common.h.
14713 (handle_btrace_general_set): New function.
14714 (handle_btrace_enable): New function.
14715 (handle_btrace_disable): New function.
14716 (handle_general_set): Call handle_btrace_general_set.
14717 (handle_qxfer_btrace): New function.
14718 (struct qxfer qxfer_packets[]): Add btrace entry.
14719 * inferiors.c (remove_thread): Disable btrace.
14720 * linux-low: Include linux-btrace.h.
14721 (linux_low_enable_btrace): New function.
14722 (linux_low_read_btrace): New function.
14723 (linux_target_ops): Add btrace ops.
14724 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
14725 Add srv_linux_btrace=yes.
14726 (x86_64-*-linux*): Add linux-btrace.o.
14727 Add srv_linux_btrace=yes.
14728 * configure.ac: Define HAVE_LINUX_BTRACE.
14729 * config.in: Regenerated.
14730 * configure: Regenerated.
14731
14732 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14733
14734 * server.c (handle_qxfer): Preserve error message if -3 is
14735 returned.
14736 (qxfer): Document the -3 return value.
14737
14738 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14739
14740 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
14741 (linux_btrace_h): New variable.
14742 (linux-btrace.o): New rule.
14743
14744 2013-03-08 Stan Shebs <stan@codesourcery.com>
14745 Hafiz Abid Qadeer <abidh@codesourcery.com>
14746
14747 * tracepoint.c (trace_buffer_size): New global.
14748 (DEFAULT_TRACE_BUFFER_SIZE): New define.
14749 (init_trace_buffer): Change to one-argument function. Allocate
14750 trace buffer memory.
14751 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
14752 handle QTBuffer:size packet.
14753 (cmd_bigqtbuffer_size): New function.
14754 (initialize_tracepoint): Call init_trace_buffer with
14755 DEFAULT_TRACE_BUFFER_SIZE.
14756 * server.c (handle_query): Add QTBuffer:size in the
14757 supported packets.
14758
14759 2013-03-07 Yao Qi <yao@codesourcery.com>
14760
14761 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
14762 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
14763 of -1.
14764 (cmd_qtsp): Adjust condition. Do post increment.
14765 Set cur_action and cur_step_action back to 0.
14766
14767 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
14768
14769 PR server/15236
14770 * linux-low.c (linux_write_memory): Return early success if LEN is
14771 zero.
14772
14773 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
14774
14775 * configure.srv: Add x86_64-*-cygwin* as target.
14776
14777 2013-02-28 Tom Tromey <tromey@redhat.com>
14778
14779 * configure.ac: Invoke AC_SYS_LARGEFILE.
14780 * configure, config.in: Rebuild.
14781
14782 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
14783
14784 * win32-low.c: Throughout, fix format strings and casts of
14785 printf-like functions to avoid type related warnings on all
14786 platforms.
14787 (get_child_debug_event): Print dwDebugEventCode as hex since
14788 that's how it's usually documented.
14789
14790 2013-02-28 Yao Qi <yao@codesourcery.com>
14791
14792 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
14793 pulongest.
14794
14795 2013-02-27 Jiong Wang <jiwang@tilera.com>
14796
14797 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
14798 (reg-tilegx32.c): New rule.
14799 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
14800 * linux-tile-low.c (tile_arch_setup): New function. Invoke
14801 different register info initializer according to elf class.
14802 (init_registers_tilgx32): New function. The tilegx32 register info
14803 initializer.
14804 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
14805 (tile_store_gregset): Likewise.
14806
14807 2013-02-27 Yao Qi <yao@codesourcery.com>
14808
14809 * server.c (process_point_options): Print debug message when
14810 debug_threads is true.
14811
14812 2013-02-26 Yao Qi <yao@codesourcery.com>
14813
14814 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
14815
14816 2013-02-19 Pedro Alves <palves@redhat.com>
14817 Kai Tietz <ktietz@redhat.com>
14818
14819 PR gdb/15161
14820
14821 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
14822 instead of strtoul to extract address from packet.
14823 (process_serial_event) <'z'>: Likewise.
14824
14825 2013-02-18 Yao Qi <yao@codesourcery.com>
14826
14827 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
14828
14829 2013-02-14 Pedro Alves <palves@redhat.com>
14830
14831 Plug memory leak.
14832
14833 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
14834 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
14835
14836 2013-02-14 Pedro Alves <palves@redhat.com>
14837
14838 * tracepoint.c (cmd_qtdpsrc): Use savestring.
14839
14840 2013-02-14 Pedro Alves <palves@redhat.com>
14841
14842 * tracepoint.c (save_string): Delete.
14843 (add_tracepoint_action): Use savestring instead of save_string.
14844
14845 2013-02-12 Pedro Alves <palves@redhat.com>
14846
14847 * linux-xtensa-low.c: Ditto.
14848 * xtensa-xtregs.c: Ditto.
14849
14850 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
14851
14852 * thread-db.c (thread_db_get_tls_address): NULL pointer check
14853 thread_db.
14854
14855 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14856
14857 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
14858 aarch64_num_wp_regs and aarch64_num_bp_regs to
14859 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
14860
14861 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14862
14863 * linux-aarch64-low.c (ps_get_thread_area): Replace
14864 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
14865
14866 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
14867 Marcus Shawcroft <marcus.shawcroft@arm.com>
14868 Nigel Stephens <nigel.stephens@arm.com>
14869 Yufeng Zhang <yufeng.zhang@arm.com>
14870
14871 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
14872 (aarch64.c, aarch64-without-fpu.c): New targets.
14873 * configure.srv (aarch64*-*-linux*): New.
14874 * linux-aarch64-low.c: New file.
14875
14876 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
14877
14878 * linux-low.c (handle_extended_wait, linux_create_inferior)
14879 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
14880 (dequeue_one_deferred_signal, linux_resume_one_thread)
14881 (fetch_register, linux_write_memory, linux_enable_event_reporting)
14882 (linux_tracefork_grandchild, linux_test_for_tracefork)
14883 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
14884 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
14885 where the argument is 0.
14886
14887 2013-01-25 Yao Qi <yao@codesourcery.com>
14888
14889 * event-loop.c: Include "queue.h".
14890 (gdb_event_p): New typedef.
14891 (struct gdb_event) <next_event>: Remove.
14892 (event_queue): Change to QUEUE(gdb_event_p).
14893 (async_queue_event): Remove.
14894 (gdb_event_xfree): New.
14895 (initialize_event_loop): New.
14896 (process_event): Use API from QUEUE.
14897 (wait_for_event): Likewise.
14898 * server.c (main): Call initialize_event_loop.
14899 * server.h (initialize_event_loop): Declare.
14900
14901 2013-01-18 Yao Qi <yao@codesourcery.com>
14902
14903 * ax.h (struct eval_agent_expr_context): New.
14904 (gdb_eval_agent_expr): Update declaration.
14905 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
14906 TFRAME. Add new argument CTX.
14907 * server.h (struct eval_agent_expr_context): Declare.
14908 (agent_mem_read, agent_tsv_read): Update declaration.
14909 (agent_mem_read_string): Likewise.
14910 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
14911 (add_traceframe_block): Add new argument TPOINT.
14912 Increase TPOINT->traceframe_usage.
14913 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
14914 eval_tracepoint_agent_expr.
14915 (condition_true_at_tracepoint): Likewise.
14916 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
14917 (agent_mem_read_string, agent_tsv_read): Likewise.
14918
14919 2013-01-16 Yao Qi <yao@codesourcery.com>
14920
14921 * linux-low.c (linux_resume_one_lwp): Don't check
14922 'lwp->bp_reinsert != 0'.
14923
14924 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14925 Pedro Alves <palves@redhat.com>
14926
14927 * lynx-low.c (ptrace_request_to_str): Define a temporary
14928 macro and use it to simplify this function's implementation.
14929
14930 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14931
14932 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
14933 sets errno.
14934
14935 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14936
14937 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
14938
14939 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14940
14941 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
14942
14943 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14944
14945 * lynx-low.c (lynx_resume): Use the resume_info parameter
14946 to determine the ptid for the lynx_ptrace call, unless
14947 it is equal to minus_one_ptid, in which case we use the
14948 ptid of the current_inferior.
14949 (lynx_wait_1): After having received a thread create/exit
14950 event, resume the inferior's execution using the signaling
14951 thread's ptid, rather than the old ptid.
14952
14953 2013-01-07 Joel Brobecker <brobecker@adacore.com>
14954
14955 * lynx-low.c (lynx_resume): Delete variable ret.
14956
14957 2013-01-01 Joel Brobecker <brobecker@adacore.com>
14958
14959 * gdbreplay.c (gdbreplay_version): Update copyright year.
14960 * server.c (gdbserver_version): Likewise.
14961
14962 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14963
14964 * lynx-low.c (lynx_wait_1): Add debug trace before adding
14965 new thread.
14966
14967 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14968
14969 * lynx-low.c (ptrace_request_to_str): Add handling for
14970 PTRACE_GETTRACESIG.
14971
14972 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14973
14974 * lynx-low.c (lynx_attach): Delete variable new_process.
14975
14976 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14977
14978 * lynx-low.c (lynx_create_inferior): Delete variable
14979 new_process.
14980
14981 2012-12-17 Joel Brobecker <brobecker@adacore.com>
14982
14983 * lynx-low.c (ptrace_request_to_str): Do not handle
14984 PTRACE_GETTHREADLIST if this macro does not exist.
14985
14986 2012-12-15 Yao Qi <yao@codesourcery.com>
14987
14988 * Makefile.in (OBS): Add notif.o.
14989 * notif.c, notif.h: New.
14990 * server.c: Include "notif.h".
14991 (struct vstop_notif) <next>: Remove.
14992 <base>: New field.
14993 (queue_stop_reply): Update.
14994 (push_event, send_next_stop_reply): Remove.
14995 (discard_queued_stop_replies): Update.
14996 (notif_stop): New variable.
14997 (handle_v_stopped): Remove.
14998 (handle_v_requests): Don't call handle_v_stopped. Call
14999 handle_ack_notif instead.
15000 (queue_stop_reply_callback): Call notif_event_enque instead
15001 of queue_stop_reply.
15002 (handle_status): Don't call send_next_stop_reply, call
15003 notif_write_event instead.
15004 (kill_inferior_callback): Likewise.
15005 (detach_or_kill_inferior_callback): Likewise.
15006 (main): Call initialize_notif.
15007 (process_serial_event): Call QUEUE_is_empty.
15008 (handle_target_event): Call notif_push instead of push event.
15009 * server.h (push_event): Remove declaration.
15010
15011 2012-12-10 Tom Tromey <tromey@redhat.com>
15012
15013 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
15014 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
15015 macros.
15016 (.c.o): Rewrite.
15017 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
15018 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
15019 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
15020 (amd64-linux-ipa.o, ax.o): Rewrite.
15021 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
15022 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
15023 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
15024 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
15025 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
15026 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
15027 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
15028 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
15029 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
15030 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
15031 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
15032 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
15033 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
15034 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
15035 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
15036 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
15037 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
15038 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
15039 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
15040 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
15041 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
15042 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
15043 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
15044 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
15045 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
15046 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
15047 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
15048 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
15049 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
15050 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
15051 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
15052 (reg-tilegx.o): Remove.
15053 (all_object_files): New macro.
15054 Include .deps files.
15055 * aclocal.m4, configure: Rebuild.
15056 * acinclude.m4: Include depstand.m4, lead-dot.m4.
15057 * configure.ac: Invoke ZW_CREATE_DEPDIR,
15058 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
15059
15060 2012-12-05 Tom Tromey <tromey@redhat.com>
15061
15062 PR gdb/14917:
15063 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
15064
15065 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
15066
15067 * configure.ac: Check for linux/perf_event.h.
15068 * config.in: Regenerated.
15069 * configure: Regenerated.
15070
15071 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
15072
15073 * hostio.c (handle_readlink): Decrease buffer size
15074 parameter passed to readlink by one byte.
15075
15076 2012-11-26 Yao Qi <yao@codesourcery.com>
15077
15078 * configure.ac (build_warnings): Append '-Wempty-body'.
15079 * configure: Regenerated.
15080 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
15081 body.
15082
15083 2012-11-15 Pierre Muller <muller@sourceware.org>
15084
15085 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
15086 * config.in: Regenerate.
15087 * configure: Regenerate.
15088 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
15089 Use "gdb_wait.h" header instead of <sys/wait.h> header.
15090 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
15091 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
15092 header.
15093 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
15094 instead of <sys/wait.h> header.
15095 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
15096
15097 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
15098
15099 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
15100 (various make rules): Remove -DGDBSERVER
15101
15102 2012-11-09 Yao Qi <yao@codesourcery.com>
15103
15104 * spu-low.c (current_ptid): Move it to ..
15105 * gdbthread.h: ... here. New.
15106 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
15107 * server.c (myresume, process_serial_event): Likewise.
15108 * thread-db.c (thread_db_find_new_threads): Likewise.
15109 * tracepoint.c (run_inferior_command): Likewise.
15110
15111 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
15112
15113 * server.c (handle_search_memory_1): Include access length in
15114 warning message.
15115
15116 2012-09-05 Michael Brandt <michael.brandt@axis.com>
15117
15118 * linux-crisv32-low.c: Fix compile errors.
15119
15120 2012-09-04 Yao Qi <yao@codesourcery.com>
15121
15122 * tracepoint.c (cmd_qtsv): Adjust debug message.
15123 Don't check CUR_TPOINT.
15124
15125 2012-08-28 Yao Qi <yao@codesourcery.com>
15126
15127 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
15128 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
15129 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
15130 Remove declarations of xmalloc, xreallloc, xstrdup and
15131 freeargv.
15132 * Makefile.in (libiberty_h): New.
15133 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
15134 (linux-bfin-low.o): Append dependency 'libiberty.h'.
15135
15136 2012-08-23 Yao Qi <yao@codesourcery.com>
15137
15138 * server.h: Remove declaration of 'xsnprintf'.
15139
15140 2012-08-22 Keith Seitz <keiths@redhat.com>
15141
15142 * server.h: Include build-gnulib-gbserver/config.h.
15143 * gdbreplay.c: Likewise.
15144
15145 2012-08-08 Doug Evans <dje@google.com>
15146
15147 * Makefile.in (SFILES): Add gdb_vecs.c.
15148 (OBS): Add gdb_vecs.o.
15149 (gdb_vecs_h, host_defs_h): New variables.
15150 (thread-db.o): Add $(gdb_vecs_h) dependency.
15151 (gdb_vecs.o): New rule.
15152 * thread-db.c: #include "gdb_vecs.h".
15153 (thread_db_load_search): Use a vector to iterate over path elements.
15154 Handle text appearing after "$pdir".
15155
15156 * configure.ac: Add check for strstr.
15157 * config.in: Regenerate.
15158 * configure: Regenerate.
15159
15160 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
15161
15162 * hostio.c (handle_pread): If pread fails, fall back to attempting
15163 lseek/read.
15164 (handle_pwrite): Likewise for pwrite.
15165
15166 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
15167
15168 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
15169 between unsupported TYPE and unimplementable ADDR/LEN combination.
15170 (arm_insert_point): Act on new return value.
15171
15172 2012-07-31 Pedro Alves <palves@redhat.com>
15173
15174 * server.c (process_point_options): Only skip tokens if we find
15175 one that is unrecognized. Don't treat 'X' specially while
15176 skipping unrecognized tokens.
15177
15178 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
15179
15180 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
15181 to 4-byte-align HW breakpoint addresses for Thumb.
15182
15183 2012-07-27 Yao Qi <yao@codesourcery.com>
15184
15185 PR remote/14161.
15186
15187 * server.h: Declare gdb_agent_about_to_close.
15188 * target.c (kill_inferior): Include "agent.h".
15189 New. Send command 'kill'.
15190 * target.h (kill_inferior): Removed macro.
15191 * tracepoint.c (gdb_agent_about_to_close): New.
15192 (gdb_agent_helper_thread): Handle command 'close'.
15193 Wait endlessly until the inferior stops.
15194 Install gdb_agent_remove_socket to atexit hook.
15195 (agent_socket_name): New static variable.
15196 (gdb_agent_socket_init): Replace local variable 'name' with
15197 'agent_socket_name'.
15198 (gdb_agent_remove_socket): New.
15199
15200 2012-07-27 Yao Qi <yao@codesourcery.com>
15201
15202 * server.c (process_point_options): Stop at 'X' when parsing.
15203
15204 2012-07-19 Michael Eager <eager@eagercon.com>
15205
15206 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
15207 to hw_execute.
15208 * linux-x86-low.c (x86_insert_point, x86_remove_point):
15209 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
15210 hardware breakpoint.
15211
15212 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
15213
15214 * gdbserver/linux-low.c (initialize_low): Call
15215 linux_ptrace_init_warnings.
15216
15217 2012-07-02 Doug Evans <dje@google.com>
15218
15219 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
15220 pointer to int.
15221
15222 2012-07-02 Stan Shebs <stan@codesourcery.com>
15223
15224 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
15225 (ax.o): Add it to build rule.
15226 (ax-ipa.o): Ditto.
15227 (OBS): Add format.o.
15228 (IPA_OBS): Add format.o.
15229 * server.c (handle_query): Claim support for breakpoint commands.
15230 (process_point_options): Add command case.
15231 (process_serial_event): Leave running if there are printfs in
15232 effect.
15233 * mem-break.h (any_persistent_commands): Declare.
15234 (add_breakpoint_commands): Declare.
15235 (gdb_no_commands_at_breakpoint): Declare.
15236 (run_breakpoint_commands): Declare.
15237 * mem-break.c (struct point_command_list): New struct.
15238 (struct breakpoint): New field command_list.
15239 (any_persistent_commands): New function.
15240 (add_commands_to_breakpoint): New function.
15241 (add_breakpoint_commands): New function.
15242 (gdb_no_commands_at_breakpoint): New function.
15243 (run_breakpoint_commands): New function.
15244 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
15245 locally.
15246 * ax.c: Include format.h.
15247 (ax_printf): New function.
15248 (gdb_eval_agent_expr): Add printf opcode.
15249
15250 2012-06-13 Yao Qi <yao@codesourcery.com>
15251
15252 * server.c (start_inferior): Remove duplicated writes to fields
15253 'last_resume_kind' and 'last_status' of 'current_inferior'.
15254
15255 2012-06-12 Yao Qi <yao@codesourcery.com>
15256 Pedro Alves <palves@redhat.com>
15257
15258 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
15259 comment.
15260 * server.c (handle_v_cont): Extend comment.
15261
15262 2012-06-11 Yao Qi <yao@codesourcery.com>
15263
15264 * linux-low.c (linux_attach): Add 'static'.
15265
15266 2012-06-06 Yao Qi <yao@codesourcery.com>
15267
15268 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
15269
15270 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
15271
15272 Fix gcc -flto compilation warning.
15273 * server.c (main): Make variable multi_mode and attach volatile.
15274
15275 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15276
15277 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
15278 if the platform doesn't know about it.
15279
15280 2012-05-30 Jeff Kenton <jkenton@tilera.com>
15281
15282 * Makefile.in (SFILES): Add linux-tile-low.c.
15283 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
15284 * configure.srv: Handle tilegx-*-linux*.
15285 * linux-tile-low.c: New file.
15286
15287 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15288
15289 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
15290
15291 2012-05-24 Pedro Alves <palves@redhat.com>
15292
15293 PR gdb/7205
15294
15295 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
15296
15297 2012-05-24 Pedro Alves <palves@redhat.com>
15298
15299 PR gdb/7205
15300
15301 Replace target_signal with gdb_signal throughout.
15302
15303 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
15304
15305 * linux-low.c (linux_store_registers): Avoid the copying sequence
15306 when no data has been retrieved by ptrace.
15307
15308 2012-05-22 Will Deacon <will.deacon@arm.com>
15309
15310 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
15311 Include asm/ptrace.h.
15312 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
15313 already defined.
15314
15315 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
15316
15317 * linux-low.c (linux_store_registers): Don't re-retrieve data
15318 with ptrace that has already been obtained from /proc. Always
15319 copy any data retrieved with ptrace to the buffer supplied.
15320
15321 2012-05-11 Yao Qi <yao@codesourcery.com>
15322 Pedro Alves <palves@redhat.com>
15323
15324 * linux-low.c (enum stopping_threads_kind): New.
15325 (stopping_threads): Change type to `enum stopping_threads_kind'.
15326 (handle_extended_wait): If stopping and suspending threads, leave
15327 the new_lwp suspended too.
15328 (linux_wait_for_event): Adjust.
15329 (stop_all_lwps): Set `stopping_threads' to
15330 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
15331 whether we're suspending threads or just stopping them. Assert no
15332 recursion happens.
15333
15334 2012-04-29 Yao Qi <yao@codesourcery.com>
15335
15336 * server.h: Move some code to ...
15337 * gdbthread.h: ... here. New.
15338 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
15339 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
15340 (nto-low.o, win32-low.o): Likewise.
15341 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
15342 * regcache.c, remote-utils.c, server.c: Likewise.
15343 * target.c, tracepoint.c, win32-low.c: Likewise.
15344
15345 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15346
15347 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
15348 (PTRACE_ARG4_TYPE): Likewise.
15349 (PTRACE_XFER_TYPE): Likewise.
15350 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
15351 ptrace to PTRACE_ARG3_TYPE.
15352 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
15353 (PTRACE_ARG4_TYPE): Likewise.
15354 (PTRACE_XFER_TYPE): Likewise.
15355 (linux_detach_one_lwp): Cast fourth argument of
15356 ptrace to long then PTRACE_ARG4_TYPE.
15357 (regsets_fetch_inferior_registers): Cast third argument of
15358 ptrace to long then PTRACE_ARG3_TYPE.
15359 (regsets_store_inferior_registers): Likewise.
15360
15361 2012-04-20 Pedro Alves <palves@redhat.com>
15362
15363 * configure: Regenerate.
15364
15365 2012-04-19 Pedro Alves <palves@redhat.com>
15366
15367 * Makefile.in (GNULIB_BUILDDIR): New.
15368 (LIBGNU, INCGNU, GNULIB_H): Adjust.
15369 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
15370 (all, install-only, uninstall, clean-info, all-lib, clean): No
15371 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
15372 (maintainer-clean realclean distclean): Use subdir_do.
15373 (subdir_do): New.
15374 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
15375 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
15376 * acinclude.m4: Include acx_configure_dir.m4.
15377 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
15378 calls. Call AC_PROG_RANLIB. Configure gnulib using
15379 ACX_CONFIGURE_DIR.
15380 (GNULIB): New.
15381 (GNULIB_STDINT_H): Adjust.
15382 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
15383 * gdbreplay.c: Include build-gnulib/config.h.
15384 * server.h: Likewise.
15385 * aclocal.m4: Regenerate.
15386 * config.in: Regenerate.
15387 * configure: Regenerate.
15388
15389 2012-04-19 Pedro Alves <palves@redhat.com>
15390
15391 * Makefile.in (LIBGNU, INCGNU): Adjust.
15392 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
15393 (all, install-only, uninstall, clean-info, all-lib, clean)
15394 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
15395 * configure.ac: Adjust AC_OUTPUT output.
15396 * aclocal.m4: Regenerate.
15397 * configure: Regenerate.
15398
15399 2012-04-19 Pedro Alves <palves@redhat.com>
15400
15401 * Makefile.in (generated_files): New.
15402 (server_h): Remove the explicit dependency on config.h, and depend
15403 on $generated_files.
15404
15405 2012-04-19 Pedro Alves <palves@redhat.com>
15406
15407 * Makefile.in (INCGNU): Add -Ignulib.
15408
15409 2012-04-19 Pedro Alves <palves@redhat.com>
15410
15411 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
15412 (INCGNU): ... this, and spell out -I here.
15413 (GNULIB_LIB): Rename to ...
15414 (LIBGNU): ... this.
15415 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
15416
15417 2012-04-19 Pedro Alves <palves@redhat.com>
15418
15419 * config.in: Regenerate.
15420
15421 2012-04-19 Pedro Alves <palves@redhat.com>
15422
15423 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
15424 * server.h (memmem): Remove declaration.
15425 * config.in: Regenerate.
15426 * configure: Regenerate.
15427
15428 2012-04-19 Yao Qi <yao@codesourcery.com>
15429
15430 * Makefile.in (SFILES): Add common/vec.c.
15431 (OBS): Add vec.o.
15432 (vec.o): New rule.
15433
15434 2012-04-19 Yao Qi <yao@codesourcery.com>
15435
15436 * remote-utils.c (prepare_resume_reply): Replace with macro
15437 target_core_of_thread.
15438 * server.c (handle_qxfer_threads_proper): Likewise.
15439 * target.h (traget_core_of_thread): New macro.
15440
15441 2012-04-18 Pedro Alves <palves@redhat.com>
15442
15443 * aclocal.m4: Regenerate.
15444 * configure: Regenerate.
15445
15446 2012-04-16 Yao Qi <yao@codesourcery.com>
15447
15448 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
15449 duplicated on address.
15450
15451 2012-04-16 Yao Qi <yao@codesourcery.com>
15452
15453 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
15454 (struct tracepoint_action_ops) <send>: New field.
15455 (m_tracepoint_action_send, r_tracepoint_action_send): New.
15456 (agent_expr_send, x_tracepoint_action_send): New.
15457 (l_tracepoint_action_send): New.
15458 (cmd_qtdp): Download and install tracepoint
15459 according to `use_agent'.
15460 (run_inferior_command): Add one more parameter `len'.
15461 Update callers.
15462 (tracepoint_send_agent): New.
15463 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
15464
15465 2012-04-16 Yao Qi <yao@codesourcery.com>
15466
15467 * tracepoint.c (download_tracepoints): Moved to ...
15468 (cmd_qtstart): ... here.
15469
15470 2012-04-14 Yao Qi <yao@codesourcery.com>
15471
15472 * tracepoint.c: Include inttypes.h.
15473 (struct collect_memory_action): Use sized types.
15474 (struct tracepoint): Likewise.
15475 (cmd_qtdp, stop_tracing): Update print specifiers.
15476 (cmd_qtp, response_tracepoint): Likewise.
15477 (collect_data_at_tracepoint): Likewise.
15478 (collect_data_at_step): Likewise.
15479
15480 2012-04-14 Yao Qi <yao@codesourcery.com>
15481
15482 Import gnulib module inttypes.
15483 * aclocal.m4, config.in, configure: Regenerated.
15484
15485 2012-04-14 Yao Qi <yao@codesourcery.com>
15486
15487 * Makefile.in (maintainer-clean, realclean, distclean): Remove
15488 Makefile and config.status at last.
15489
15490 2012-04-13 Yao Qi <yao@codesourcery.com>
15491
15492 * tracepoint.c: Include stdint.h unconditionally.
15493
15494 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15495
15496 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
15497 on BFD_HAVE_SYS_PROCFS_TYPE.
15498 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
15499 * configure: Regenerate.
15500 * config.in: Likewise.
15501
15502 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
15503
15504 * Makefile.in (clean): Also remove x32.c x32-linux.c
15505 x32-avx.c x32-avx-linux.c.
15506 (x32.o): New target.
15507 (x32.c): Likewise.
15508 (x32-linux.o): Likewise.
15509 (x32-linux.c): Likewise.
15510 (x32-avx.o): Likewise.
15511 (x32-avx.c): Likewise.
15512 (x32-avx-linux.o): Likewise.
15513 (x32-avx-linux.c): Likewise.
15514
15515 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
15516 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
15517 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
15518 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
15519 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
15520 i386/x32-avx-linux.xml.
15521
15522 * linux-x86-low.c (init_registers_x32_linux): New prototype.
15523 (init_registers_x32_avx_linux): Likwise.
15524 (x86_linux_update_xmltarget): Call init_registers_x32_linux
15525 or init_registers_x32_avx_linux if linux_is_elf64 is false.
15526
15527 2012-04-13 Pedro Alves <palves@redhat.com>
15528
15529 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
15530 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
15531 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
15532 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
15533 the sub-make.
15534
15535 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15536
15537 * linux-x86-low.c (compat_x32_clock_t): New.
15538 (compat_x32_siginfo_t): Likewise.
15539 (compat_x32_siginfo_from_siginfo): Likewise.
15540 (siginfo_from_compat_x32_siginfo): Likewise.
15541 (linux_is_elf64): Likewise.
15542 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
15543 and siginfo_from_compat_x32_siginfo for x32.
15544 (x86_arch_setup): Set linux_is_elf64.
15545
15546 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15547
15548 PR gdb/13969
15549 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
15550 e_machine field.
15551 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
15552 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
15553 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
15554 compatible with process.
15555
15556 2012-04-12 Yao Qi <yao@codesourcery.com>
15557
15558 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
15559 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
15560 (install-only, install-info, clean): Handle sub dir gnulib.
15561 (all-lib, am--refresh): New targets.
15562 (memmem.o): Remove target.
15563 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
15564 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
15565 (AC_REPLACE_FUNCS): Remove memmem.
15566 Invoke gl_INIT and AM_INIT_AUTOMAKE.
15567 (AC_OUTPUT): Generate Makefile in gnulib/.
15568 * aclocal.m4, config.in, configure: Regenerated.
15569
15570 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
15571
15572 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
15573
15574 2012-04-05 Pedro Alves <palves@redhat.com>
15575
15576 -Werror=strict-aliasing
15577
15578 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
15579 pointer.
15580
15581 2012-04-04 Pedro Alves <palves@redhat.com>
15582
15583 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15584 (sparc_store_gregset_from_stack, sparc_store_gregset)
15585 (sparc_breakpoint_at): Fix formatting.
15586
15587 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15588
15589 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
15590 are available.
15591 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
15592 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
15593 * config.in: Regenerate.
15594 * configure: Likewise.
15595
15596 2012-03-29 Pedro Alves <palves@redhat.com>
15597
15598 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
15599 Correct ptrace arguments.
15600
15601 2012-03-28 Pedro Alves <palves@redhat.com>
15602
15603 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
15604 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
15605 (IA64_FR1_REGNUM): New defines.
15606 (ia64_fetch_register): New.
15607 (the_low_target): Install it.
15608 * linux-low.h (struct linux_target_ops) <fetch_register>: New
15609 field.
15610 * linux-low.c (linux_fetch_registers): Try the
15611 the_low_target.fetch_register hook first.
15612
15613 * linux-arm-low.c (the_low_target): Adjust.
15614 * linux-bfin-low.c (the_low_target): Adjust.
15615 * linux-cris-low.c (the_low_target): Adjust.
15616 * linux-crisv32-low.c (the_low_target): Adjust.
15617 * linux-m32r-low.c (the_low_target): Adjust.
15618 * linux-m68k-low.c (the_low_target): Adjust.
15619 * linux-mips-low.c (the_low_target): Adjust.
15620 * linux-ppc-low.c (the_low_target): Adjust.
15621 * linux-s390-low.c (the_low_target): Adjust.
15622 * linux-sh-low.c (the_low_target): Adjust.
15623 * linux-sparc-low.c (the_low_target): Adjust.
15624 * linux-tic6x-low.c (the_low_target): Adjust.
15625 * linux-x86-low.c (the_low_target): Adjust.
15626 * linux-xtensa-low.c (the_low_target): Adjust.
15627
15628 2012-03-26 Pedro Alves <palves@redhat.com>
15629
15630 * server.c (handle_qxfer_libraries): Don't bail early if
15631 the_target->qxfer_libraries_svr4 is not NULL.
15632
15633 2012-03-26 Pedro Alves <palves@redhat.com>
15634
15635 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
15636
15637 2012-03-23 Pedro Alves <palves@redhat.com>
15638
15639 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
15640 "library-list-svr4" element's start tag when the the DSO list is
15641 empty.
15642
15643 2012-03-23 Pedro Alves <palves@redhat.com>
15644
15645 * linux-low.c (read_one_ptr): Read the inferior's pointer through
15646 a variable whose type size is the same as the inferior's pointer
15647 size.
15648
15649 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
15650
15651 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
15652 struct siginfo.
15653 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
15654 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
15655 * linux-low.h: Include <signal.h>.
15656 (struct siginfo): Remove forward declaration.
15657 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
15658 struct siginfo.
15659
15660 2012-03-21 Mike Frysinger <vapier@gentoo.org>
15661
15662 * .gitignore: Ignore more files.
15663
15664 2012-03-19 Pedro Alves <palves@redhat.com>
15665 Jan Kratochvil <jan.kratochvil@redhat.com>
15666
15667 * server.c (cont_thread, general_thread): Add describing comments.
15668 (start_inferior): Clear `cont_thread'.
15669 (handle_v_cont): Don't set `cont_thread' if resuming all threads
15670 of a process.
15671
15672 2012-03-15 Yao Qi <yao@codesourcery.com>
15673
15674 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
15675 handling to ...
15676 (cmd_qtdp): ... here.
15677
15678 2012-03-15 Yao Qi <yao@codesourcery.com>
15679
15680 * tracepoint.c (struct tracepoint_action_ops): New.
15681 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
15682 (m_tracepoint_action_download): New.
15683 (r_tracepoint_action_download): New.
15684 (x_tracepoint_action_download): New.
15685 (l_tracepoint_action_download): New.
15686 (add_tracepoint_action): Install `action->ops' according type.
15687 (download_tracepoint_1): Move code `download' function pointer
15688 of various tracepoint_action_ops.
15689
15690 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15691
15692 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
15693 linux_ptrace_attach_warnings.
15694
15695 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15696
15697 * Makefile.in (linux-ptrace.o): New.
15698 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
15699 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
15700 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
15701 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
15702 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
15703 of these targets.
15704 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
15705
15706 2012-03-08 Yao Qi <yao@codesourcery.com>
15707 Pedro Alves <palves@redhat.com>
15708
15709 Fix PR server/13392.
15710 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
15711 offset of JMP insn.
15712 * tracepoint.c (remove_tracepoint): New.
15713 (cmd_qtdp): Call remove_tracepoint when failed to install.
15714
15715 2012-03-07 Pedro Alves <palves@redhat.com>
15716
15717 * linux-low.c (get_detach_signal): New.
15718 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
15719 Pass on pending signals to PTRACE_DETACH. Check the result of the
15720 ptrace call.
15721 * server.c (program_signals, program_signals_p): New.
15722 (handle_general_set): Handle QProgramSignals.
15723 * server.h (program_signals, program_signals_p): Declare.
15724
15725 2012-03-05 Pedro Alves <palves@redhat.com>
15726 Jan Kratochvil <jan.kratochvil@redhat.com>
15727
15728 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
15729 New comment why.
15730
15731 2012-03-03 Yao Qi <yao@codesourcery.com>
15732
15733 * tracepoint.c (tracepoint_look_up_symbols): Update call to
15734 agent_look_up_symbols.
15735
15736 2012-03-03 Yao Qi <yao@codesourcery.com>
15737
15738 * Makefile.in (linux-low.o): Keep dependence on agent.h.
15739 (linux-x86-low.o): Likewise.
15740 * server.h: Remove in_process_agent_loaded.
15741 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
15742 common/agent.c.
15743 Update callers.
15744
15745 2012-03-03 Yao Qi <yao@codesourcery.com>
15746
15747 * tracepoint.c (gdb_agent_capability): New global.
15748 (in_process_agent_loaded_ust): Renamed to
15749 `in_process_agent_supports_ust'.
15750 Update callers.
15751 (in_process_agent_supports_ust): Call agent_capability_check.
15752 (clear_installed_tracepoints): Assert that agent supports
15753 agent.
15754
15755 2012-03-03 Yao Qi <yao@codesourcery.com>
15756
15757 * linux-low.c (linux_supports_agent): New.
15758 (linux_target_ops): Initialize field `supports_agent' with
15759 linux_supports_agent.
15760 * target.h (struct target_ops) <supports_agent>: New.
15761 (target_supports_agent): New macro.
15762 * server.c (handle_general_set): Handle packet 'QAgent'.
15763 (handle_query): Send `QAgent+'.
15764 * Makefile.in (server.o): Depends on agent.h.
15765
15766 2012-03-03 Yao Qi <yao@codesourcery.com>
15767
15768 * Makefile.in (OBS): Add agent.o.
15769 Add new rule for agent.o.
15770 Track dependence of tracepoint.c on agent.h.
15771 * tracepoint.c (run_inferior_command_1):
15772 (run_inferior_command): Call agent_run_command.
15773 (gdb_ust_connect_sync_socket): Deleted. Move it to
15774 common/agent.c.
15775 (resume_thread, stop_thread): Likewise.
15776 (gdb_ust_socket_init): Renamed to ...
15777 (gdb_agent_socket_init): ... New.
15778 (gdb_ust_thread): Renamed to ...
15779 (gdb_agent_helper_thread): ... New.
15780 (gdb_ust_init): Move some code to ...
15781 (gdb_agent_init): ... here. New.
15782 [HAVE_UST]: Call gdb_ust_init.
15783 (initialize_tracepoint_ftlib): Call gdb_agent_init.
15784 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
15785 * config.in, configure: Regenerated.
15786
15787 2012-03-02 Pedro Alves <palves@redhat.com>
15788
15789 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
15790 * linux-low.c (struct simple_pid_list): New.
15791 (stopped_pids): New a struct simple_pid_list pointer.
15792 (add_to_pid_list, pull_pid_from_list): New.
15793 (handle_extended_wait): Don't assume the first signal new children
15794 report is SIGSTOP. Adjust call to pull_pid_from_list.
15795 (linux_wait_for_lwp): Adjust.
15796
15797 2012-03-02 Yao Qi <yao@codesourcery.com>
15798
15799 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
15800 debug log.
15801
15802 2012-03-02 Yao Qi <yao@codesourcery.com>
15803
15804 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
15805 `stop_pc' and `tpoint'. Update caller.
15806
15807 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
15808
15809 * linux-low.h (linux_target_ops): Add regset_bitmap member.
15810 * linux-low.c (use_linux_regsets): New macro.
15811 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
15812 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
15813 (linux_register_in_regsets): New function.
15814 (usr_fetch_inferior_registers): Skip registers covered by
15815 regsets.
15816 (usr_store_inferior_registers): Likewise.
15817 (usr_fetch_inferior_registers): New macro.
15818 (usr_store_inferior_registers): Likewise.
15819 (linux_fetch_registers): Handle mixed regset/non-regset targets.
15820 (linux_store_registers): Likewise.
15821 * linux-mips-low.c (init_registers_mips_dsp_linux): New
15822 prototype.
15823 (init_registers_mips64_dsp_linux): Likewise.
15824 (init_registers_mips_linux): New macro.
15825 (init_registers_mips_dsp_linux): Likewise.
15826 (mips_dsp_num_regs): Likewise.
15827 (DSP_BASE, DSP_CONTROL): New fallback macros.
15828 (mips_base_regs): New macro.
15829 (mips_regmap): Use it. Fix the size.
15830 (mips_dsp_regmap): New variable.
15831 (mips_dsp_regset_bitmap): Likewise.
15832 (mips_arch_setup): New function.
15833 (mips_cannot_fetch_register): Use the_low_target.regmap rather
15834 than mips_regmap.
15835 (mips_cannot_store_register): Likewise.
15836 (the_low_target): Update .arch_setup, .num_regs and .regmap
15837 initializers. Add .regset_bitmap initializer.
15838 * linux-arm-low.c (the_low_target): Add .regset_bitmap
15839 initializer.
15840 * linux-bfin-low.c (the_low_target): Likewise.
15841 * linux-cris-low.c (the_low_target): Likewise.
15842 * linux-crisv32-low.c (the_low_target): Likewise.
15843 * linux-ia64-low.c (the_low_target): Likewise.
15844 * linux-m32r-low.c (the_low_target): Likewise.
15845 * linux-m68k-low.c (the_low_target): Likewise.
15846 * linux-ppc-low.c (the_low_target): Likewise.
15847 * linux-s390-low.c (the_low_target): Likewise.
15848 * linux-sh-low.c (the_low_target): Likewise.
15849 * linux-sparc-low.c (the_low_target): Likewise.
15850 * linux-tic6x-low.c (the_low_target): Likewise.
15851 * linux-x86-low.c (the_low_target): Likewise.
15852 * linux-xtensa-low.c (the_low_target): Likewise.
15853 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
15854 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
15855 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
15856 srv_xmlfiles.
15857 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
15858 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
15859
15860 2012-02-29 Yao Qi <yao@codesourcery.com>
15861 Pedro Alves <palves@redhat.com>
15862
15863 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
15864 `step_over_finished' is true.
15865
15866 2012-02-27 Pedro Alves <palves@redhat.com>
15867
15868 * linux-low.c (pid_is_stopped): Delete, moved to common/.
15869 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
15870
15871 2012-02-27 Pedro Alves <palves@redhat.com>
15872
15873 PR server/9684
15874 * linux-low.c (pid_is_stopped): New.
15875 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
15876
15877 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
15878
15879 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
15880 of conditions.
15881
15882 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
15883
15884 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
15885
15886 2012-02-24 Luis Machado <lgustavo@codesourcery>
15887
15888 * server.c (handle_query): Advertise support for target-side
15889 breakpoint condition evaluation.
15890 (process_point_options): New function.
15891 (process_serial_event): When inserting a breakpoint, check for
15892 a target-side condition that should be evaluated.
15893
15894 * mem-break.c: Include regcache.h and ax.h.
15895 (point_cond_list_t): New data structure.
15896 (breakpoint) <cond_list>: New field.
15897 (find_gdb_breakpoint_at): Make non-static.
15898 (delete_gdb_breakpoint_at): Clear any target-side
15899 conditions.
15900 (clear_gdb_breakpoint_conditions): New function.
15901 (add_condition_to_breakpoint): Likewise.
15902 (add_breakpoint_condition): Likewise.
15903 (gdb_condition_true_at_breakpoint): Likewise.
15904 (gdb_breakpoint_here): Return result directly instead
15905 of going through a local variable.
15906
15907 * mem-break.h (find_gdb_breakpoint_at): New prototype.
15908 (clear_gdb_breakpoint_conditions): Likewise.
15909 (add_breakpoint_condition): Likewise.
15910 (gdb_condition_true_at_breakpoint): Likewise.
15911
15912 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
15913 (need_step_over_p): Take target-side breakpoint condition into
15914 consideration.
15915
15916 2012-02-24 Luis Machado <lgustavo@codesourcery>
15917
15918 * server.h: Include tracepoint.h.
15919 (agent_mem_read, agent_get_trace_state_variable_value,
15920 agent_set_trace_state_variable_value,
15921 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
15922 get_set_tsv_func_addr): New prototypes.
15923
15924 * ax.h: New include file.
15925 * ax.c: New source file.
15926
15927 * tracepoint.c: Include ax.h.
15928 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
15929 agent_expr, eval_result_type): Move to ax.h.
15930 (parse_agent_expr): Rename to ...
15931 (gdb_parse_agent_expr): ... this, make it non-static and move
15932 to ax.h.
15933 (unparse_agent_expr) Rename to ...
15934 (gdb_unparse_agent_expr): ... this, make it non-static and move
15935 to ax.h.
15936 (eval_agent_expr): Rename to ...
15937 (eval_tracepoint_agent_expr): ... this.
15938 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
15939 forward declarations.
15940 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
15941 (agent_get_trace_state_variable_value): New function.
15942 (agent_set_trace_state_variable_value): New function.
15943 (cmd_qtdp): Call gdb_parse_agent_expr (...).
15944 (response_tracepoint): Call gdb_unparse_agent_expr (...).
15945 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
15946 (condition_true_at_tracepoint): Likewise.
15947 (parse_agent_expr): Rename to ...
15948 (gdb_parse_agent_expr): ... this and move to ax.c.
15949 (unparse_agent_expr): Rename to ...
15950 (gdb_unparse_agent_expr): ... this and move to ax.c.
15951 (gdb_agent_op_name): Move to ax.c.
15952 (eval_agent_expr): Rename to ...
15953 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
15954 and move to ax.c.
15955 (eval_tracepoint_agent_expr): New function.
15956 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
15957 non-static.
15958 (current_insn_ptr, emit_error, struct bytecode_address): Move to
15959 ax.c.
15960 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
15961 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
15962 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
15963 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
15964 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
15965 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
15966 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
15967 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
15968 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
15969 (compile_bytecodes): Remove forward declaration.
15970 (is_goto_target): Move to ax.c.
15971 (compile_bytecodes): Move to ax.c and call
15972 agent_get_trace_state_variable_value (...) and
15973 agent_set_trace_state_variable_value (...).
15974
15975 * Makefile.in: Update ax.c and IPA dependencies.
15976
15977 2012-02-24 Pedro Alves <palves@redhat.com>
15978
15979 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
15980 (cmd_bigqtbuffer_circular): ... this. Only handle
15981 'QTBuffer:circular:'.
15982 (handle_tracepoint_general_set): Adjust.
15983
15984 2012-02-16 Yao Qi <yao@codesourcery.com>
15985
15986 * inferiors.c: Move code to ...
15987 * dll.c: .... here. New.
15988 * server.h: Declare clear_dlls.
15989 * Makefile.in (SFILES): Add dll.c.
15990 (OBS): Add dll.o
15991 (dll.o): New rule.
15992
15993 2012-02-11 Yao Qi <yao@codesourcery.com>
15994
15995 * server.c: (handle_monitor_command): Add a new parameter
15996 `own_buf'.
15997 (handle_query): Update caller.
15998
15999 2012-02-09 Joel Brobecker <brobecker@adacore.com>
16000
16001 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
16002 * configure, config.in: Regenerate.
16003 * hostio.c: Provide an alternate implementation if HAVE_READLINK
16004 is not defined.
16005
16006 2012-02-02 Pedro Alves <palves@redhat.com>
16007
16008 Try SIGKILL first, then PTRACE_KILL.
16009 * linux-low.c (linux_kill_one_lwp): New.
16010 (linux_kill_one_lwp): Rename to ...
16011 (kill_one_lwp_callback): ... this. Use the new
16012 linux_kill_one_lwp.
16013
16014 2012-02-02 Pedro Alves <palves@redhat.com>
16015
16016 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
16017 inferior.
16018
16019 2012-01-27 Pedro Alves <palves@redhat.com>
16020
16021 * linux-low.c (linux_child_pid_to_exec_file): Delete.
16022 (elf_64_file_p): Make static.
16023 (linux_pid_exe_is_elf_64_file): New.
16024 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
16025 Delete declarations.
16026 (linux_pid_exe_is_elf_64_file): Declare.
16027 * linux-x86-low.c (x86_arch_setup): Use
16028 linux_pid_exe_is_elf_64_file.
16029
16030 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
16031
16032 * linux-low.c (linux_wait_for_event_1): Rename to ...
16033 (linux_wait_for_event): ... here and merge it with former
16034 linux_wait_for_event - new variable wait_ptid, use it.
16035 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
16036
16037 2012-01-23 Pedro Alves <palves@redhat.com>
16038
16039 * server.c (main): Avoid yet another case of infinite loop while
16040 detaching/killing after a longjmp.
16041
16042 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16043
16044 Code cleanup.
16045 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
16046
16047 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
16048
16049 * hostio.c (handle_readlink): New function.
16050 (handle_vFile): Call it to handle "vFile:readlink" packets.
16051
16052 2012-01-20 Pedro Alves <palves@redhat.com>
16053 Ulrich Weigand <ulrich.weigand@linaro.org>
16054
16055 * server.c (handle_v_requests): Only support vAttach and vRun to
16056 start multiple processes when in extended protocol mode.
16057
16058 2012-01-17 Pedro Alves <palves@redhat.com>
16059
16060 * tracepoint.c (initialize_tracepoint): Use mmap instead of
16061 memalign plus mprotect to allocate the scratch buffer.
16062
16063 2012-01-13 Pedro Alves <palves@redhat.com>
16064
16065 * server.c (attach_inferior): Clear `cont_thread'.
16066
16067 2012-01-13 Pedro Alves <palves@redhat.com>
16068
16069 * server.c (main): Avoid infinite loop while detaching/killing
16070 after a longjmp.
16071
16072 2012-01-09 Doug Evans <dje@google.com>
16073
16074 * server.c (start_inferior): Set last_ptid in --wrapper case.
16075
16076 2012-01-06 Yao Qi <yao@codesourcery.com>
16077
16078 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
16079 defined.
16080 [IN_PROCESS_AGENT] (debug_agent): New global variable.
16081
16082 2012-01-04 Yao Qi <yao@codesourcery.com>
16083
16084 * tracepoint.c (cmd_qtdp): Print debug message
16085 for static tracepoint.
16086
16087 2012-01-04 Yao Qi <yao@codesourcery.com>
16088
16089 * tracepoint.c (trace_vdebug): Differentiate debug message
16090 between gdbserver and IPA.
16091
16092 2012-01-03 Yao Qi <yao@codesourcery.com>
16093
16094 * tracepoint.c (tracepoint_was_hit): Don't collect for
16095 static tracepoint.
16096
16097 2012-01-02 Joel Brobecker <brobecker@adacore.com>
16098
16099 * terminal.h: Reformat copyright header.
16100
16101 2012-01-02 Joel Brobecker <brobecker@adacore.com>
16102
16103 * server.c (gdbserver_version): Update copyright year.
16104 * gdbreplay.c (gdbreplay_version): Likewise.
16105
16106 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
16107
16108 * linux-low.c (linux_create_inferior): Put empty if clause for write.
16109
16110 Revert:
16111 2011-12-18 Hui Zhu <teawater@gmail.com>
16112 * linux-low.c (linux_create_inferior): Save return value to ret.
16113
16114 2011-12-18 Hui Zhu <teawater@gmail.com>
16115
16116 * linux-low.c (linux_create_inferior): Save return value to ret.
16117
16118 2011-12-16 Doug Evans <dje@google.com>
16119
16120 * linux-low.c (linux_create_inferior): If stdio connection,
16121 redirect stdin from /dev/null, stdout to stderr.
16122 * remote-utils.c (remote_is_stdio): New static global.
16123 (remote_connection_is_stdio): New function.
16124 (remote_prepare): Handle stdio connection.
16125 (remote_open): Ditto.
16126 (remote_close): Don't close stdin for stdio connections.
16127 (read_prim,write_prim): New functions. Replace all calls to
16128 read/write to these.
16129 * server.c (main): Watch for "-" argument. Move call to
16130 remote_prepare before start_inferior.
16131 * server.h (STDIO_CONNECTION_NAME): New macro.
16132 (remote_connection_is_stdio): Declare.
16133
16134 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
16135 in debugging output.
16136
16137 2011-12-15 Yao Qi <yao@codesourcery.com>
16138
16139 * tracepoint.c: Include sys/syscall.h.
16140 (gdb_ust_thread): Remove preprocessor conditional.
16141
16142 2011-12-14 Pedro Alves <pedro@codesourcery.com>
16143
16144 * linux-low.c (linux_detach_one_lwp): Call
16145 the_low_target.prepare_to_resume before detaching.
16146
16147 2011-12-14 Yao Qi <yao@codesourcery.com>
16148
16149 * tracepoint.c (gdb_ust_thread): Don't ignore return value
16150 of write.
16151
16152 2011-12-14 Yao Qi <yao@codesourcery.com>
16153
16154 * i386-low.c (i386_low_stopped_data_address): Initialize local
16155 variable `control'.
16156
16157 2011-12-13 Pedro Alves <pedro@codesourcery.com>
16158
16159 PR remote/13492
16160
16161 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
16162 DR_CONTROL unless necessary. Extend comments.
16163 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
16164 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
16165
16166 2011-12-13 Yao Qi <yao@codesourcery.com>
16167
16168 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
16169 macros.
16170 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
16171
16172 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
16173
16174 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
16175 Print new debug message for such case.
16176
16177 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
16178
16179 Fix overlapping memcpy.
16180 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
16181 the read_inferior_memory transfer.
16182 (delete_fast_tracepoint_jump): New variable buf. Use it for the
16183 write_inferior_memory transfer.
16184 (set_fast_tracepoint_jump): New variable buf. Use it for the
16185 read_inferior_memory and write_inferior_memory transfers.
16186 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
16187 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
16188 Use it for the write_inferior_memory transfer.
16189 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
16190 buffers.
16191
16192 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
16193
16194 * linux-low.c (fetch_register, store_register): Make code
16195 consistent, fix formatting.
16196
16197 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
16198
16199 * linux-low.c (usr_store_inferior_registers): Factor out code
16200 to handle individual registers into...
16201 (store_register): ... this new function.
16202
16203 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
16204
16205 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
16206 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
16207 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
16208 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
16209 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
16210 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
16211 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
16212 (srv_xmlfiles): Add new XML files.
16213
16214 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
16215 and <sys/uio.h>.
16216 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
16217 (init_registers_s390_linux32v1): Add prototype.
16218 (init_registers_s390_linux32v2): Likewise.
16219 (init_registers_s390_linux64v1): Likewise.
16220 (init_registers_s390_linux64v2): Likewise.
16221 (init_registers_s390x_linux64v1): Likewise.
16222 (init_registers_s390x_linux64v2): Likewise.
16223 (s390_num_regs): Increment to 52.
16224 (s390_regmap): Add orig_r2 register.
16225 (s390_num_regs_3264): Increment to 68.
16226 (s390_regmap_3264): Add orig_r2 register.
16227 (s390_collect_ptrace_register): Handle orig_r2 register.
16228 (s390_supply_ptrace_register): Likewise.
16229 (s390_fill_last_break): New function.
16230 (s390_store_last_break): Likewise.
16231 (s390_fill_system_call): New function.
16232 (s390_store_system_call): Likewise.
16233 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
16234 register sets.
16235 (s390_check_regset): New function.
16236 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
16237 NT_S390_SYSTEM_CALL regsets and use appropriate description.
16238 Update target_regsets for available register sets.
16239
16240 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
16241 Jan Kratochvil <jan.kratochvil@redhat.com>
16242
16243 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
16244 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
16245 New.
16246 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
16247 * linux-low.h (struct process_info_private): New member r_debug.
16248 * server.c (handle_qxfer_libraries): Call
16249 the_target->qxfer_libraries_svr4.
16250 (handle_qxfer_libraries_svr4): New function.
16251 (qxfer_packets): New entry "libraries-svr4".
16252 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
16253 * target.h (struct target_ops): New member qxfer_libraries_svr4.
16254 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
16255 PACKET_qXfer_libraries_svr4.
16256
16257 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
16258
16259 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
16260 PSW address/mask between 8-byte and 16-byte formats.
16261 (s390_supply_ptrace_register): Likewise.
16262 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
16263 basic addressing mode bit.
16264
16265 2011-11-24 Stan Shebs <stan@codesourcery.com>
16266
16267 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
16268
16269 2011-11-17 Stan Shebs <stan@codesourcery.com>
16270
16271 * tracepoint.c (struct tracepoint): New field traceframe_usage.
16272 (tracing_start_time): New global.
16273 (tracing_stop_time): New global.
16274 (tracing_user_name): New global.
16275 (tracing_notes): New global.
16276 (tracing_stop_note): New global.
16277 (cmd_qtstart): Set traceframe_usage, start_time.
16278 (stop_tracing): Set stop_time.
16279 (cmd_qtstatus): Report additional status.
16280 (cmd_qtp): New function.
16281 (handle_tracepoint_query): Call it.
16282 (cmd_qtnotes): New function.
16283 (handle_tracepoint_general_set): Call it.
16284 (get_timestamp): Rename from tsv_get_timestamp.
16285
16286 2011-11-14 Stan Shebs <stan@codesourcery.com>
16287 Kwok Cheung Yeung <kcy@codesourcery.com>
16288
16289 * linux-x86-low.c (small_jump_insn): New.
16290 (i386_install_fast_tracepoint_jump_pad): Add arguments for
16291 trampoline and error message, build a trampoline and issue a small
16292 jump instruction to it.
16293 (x86_install_fast_tracepoint_jump_pad): Add arguments for
16294 trampoline and error message.
16295 (x86_get_min_fast_tracepoint_insn_len): New.
16296 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
16297 * linux-low.h (struct linux_target_ops): Add arguments to
16298 install_fast_tracepoint_jump_pad operation, add new operation.
16299 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
16300 arguments.
16301 (linux_get_min_fast_tracepoint_insn_len): New function.
16302 (linux_target_op): Add new operation.
16303 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
16304 (gdb_trampoline_buffer_end): Ditto.
16305 (gdb_trampoline_buffer_error): Ditto.
16306 (struct ipa_sym_addresses): Add fields for new IPA variables.
16307 (symbol_list): Add entries for new IPA variables.
16308 (struct tracepoint): Add fields to hold the address range of the
16309 trampoline used by the tracepoint.
16310 (trampoline_buffer_head): New static variable.
16311 (trampoline_buffer_tail): Ditto.
16312 (claim_trampoline_space): New function.
16313 (have_fast_tracepoint_trampoline_buffer): New function.
16314 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
16315 structure.
16316 (install_fast_tracepoint): Ditto, also add error buffer argument.
16317 (cmd_qtminftpilen): New function.
16318 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
16319 (fast_tracepoint_from_trampoline_address): New function.
16320 (fast_tracepoint_collecting): Handle trampoline as part of jump
16321 pad space.
16322 (set_trampoline_buffer_space): New function.
16323 (initialize_tracepoint): Initialize new IPA variables.
16324 * target.h (struct target_ops): Add arguments to
16325 install_fast_tracepoint_jump_pad operation, add new
16326 get_min_fast_tracepoint_insn_len operation.
16327 (target_get_min_fast_tracepoint_insn_len): New.
16328 (install_fast_tracepoint_jump_pad): Add arguments.
16329 * server.h (IPA_BUFSIZ): Define.
16330 * linux-i386-ipa.c: Include extra header files.
16331 (initialize_fast_tracepoint_trampoline_buffer): New function.
16332 (initialize_low_tracepoint): Call it.
16333 * server.h (set_trampoline_buffer_space): Declare.
16334 (claim_trampoline_space): Ditto.
16335 (have_fast_tracepoint_trampoline_buffer): Ditto.
16336
16337 2011-11-14 Yao Qi <yao@codesourcery.com>
16338
16339 * server.c (handle_query): Handle InstallInTrace for qSupported.
16340 * tracepoint.c (add_tracepoint): Sort list.
16341 (install_tracepoint, download_tracepoint): New.
16342 (cmd_qtdp): Call them to install and download tracepoints.
16343 (sort_tracepoints): Removed.
16344 (cmd_qtstart): Update.
16345
16346 2011-11-14 Yao Qi <yao@codesourcery.com>
16347
16348 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
16349 * mem-break.h: Declare.
16350 * tracepoint.c (cmd_qtstart): Move some code to ...
16351 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
16352 New.
16353 (download_tracepoints): Move some code to ...
16354 (download_tracepoint_1): ... here. New.
16355
16356 2011-11-08 Yao Qi <yao@codesourcery.com>
16357
16358 * remote-utils.c (relocate_instruction): A comment fix.
16359
16360 2011-11-07 Joel Brobecker <brobecker@adacore.com>
16361
16362 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
16363 (i386_dr_low_get_control, i386_dr_low_get_status): Use
16364 dr_status_mirror and dr_control_mirror from debug_reg_state.
16365 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
16366 (i386_initial_stuff): Remove use of deleted globals.
16367 (i386_get_thread_context, i386_set_thread_context,
16368 i386_thread_added): Use dr_status_mirror and dr_control_mirror
16369 from debug_reg_state.
16370
16371 2011-11-05 Yao Qi <yao@codesourcery.com>
16372
16373 * tracepoint.c (gdb_collect): Loop over tracepoints of same
16374 address as TPOINT's.
16375
16376 2011-11-02 Stan Shebs <stan@codesourcery.com>
16377
16378 * tracepoint.c (agent_mem_read_string): New function.
16379 (eval_agent_expr): Call it for tracenz.
16380 * server.c (handle_query): Report support for tracenz.
16381
16382 2011-11-02 Yao Qi <yao@codesourcery.com>
16383
16384 * tracepoint.c (cmd_qtstart): Remove unused local variables.
16385
16386 2011-11-02 Yao Qi <yao@codesourcery.com>
16387
16388 * target.h: Fix a typo in comment.
16389
16390 2011-10-31 Pedro Alves <pedro@codesourcery.com>
16391
16392 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
16393 clobber the breakpoints' shadows with fast tracepoint jumps.
16394 * mem-break.h (check_mem_write): Add `myaddr' parameter.
16395 * target.c (write_inferior_memory): Also pass MYADDR down to
16396 check_mem_write.
16397
16398 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
16399
16400 * configure.ac: Check support for personality routine.
16401 * configure: Regenerate.
16402 * config.in: Likewise.
16403 * linux-low.c: Include <sys/personality.h>.
16404 Define ADDR_NO_RANDOMIZE if necessary.
16405 (linux_create_inferior): Disable address space randomization when
16406 forking inferior, if requested.
16407 (linux_supports_disable_randomization): New function.
16408 (linux_target_ops): Install it.
16409 * server.h (disable_randomization): Declare.
16410 * server.c (disable_randomization): New global variable.
16411 (handle_general_set): Handle QDisableRandomization.
16412 (handle_query): Likewise for qSupported.
16413 (main): Support --disable-randomization and --no-disable-randomization
16414 command line arguments.
16415 * target.h (struct target_ops): Add supports_disable_randomization.
16416 (target_supports_disable_randomization): New macro.
16417
16418 2011-09-29 Mike Frysinger <vapier@gentoo.org>
16419
16420 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
16421 ifdef check.
16422 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
16423 [!PT_GETDSBT] (target_loadmap): New definition.
16424 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
16425 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
16426 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
16427 and PT_GETDSBT to LINUX_LOADMAP.
16428 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
16429 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
16430
16431 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
16432
16433 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
16434 (arm_linux_hwbp_cap): New static variable.
16435 (arm_linux_get_hwbp_cap): Replace by ...
16436 (arm_linux_init_hwbp_cap): ... this new function.
16437 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
16438 (arm_linux_get_hw_watchpoint_count): Likewise.
16439 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16440 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
16441 (arm_prepare_to_resume): Use perror_with_name instead of error.
16442
16443 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
16444
16445 * linux-arm-low.c: Include <signal.h>.
16446 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
16447 (struct arm_linux_hwbp_cap): New data type.
16448 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
16449 (struct arm_linux_hw_breakpoint): New data type.
16450 (MAX_BPTS, MAX_WPTS): Define.
16451 (struct arch_process_info, struct arch_lwp_info): New data types.
16452 (arm_linux_get_hwbp_cap): New function.
16453 (arm_linux_get_hw_breakpoint_count): Likewise.
16454 (arm_linux_get_hw_watchpoint_count): Likewise.
16455 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16456 (arm_hwbp_control_initialize): Likewise.
16457 (arm_hwbp_control_is_enabled): Likewise.
16458 (arm_hwbp_control_is_initialized): Likewise.
16459 (arm_hwbp_control_disable): Likewise.
16460 (arm_linux_hw_breakpoint_equal): Likewise.
16461 (arm_linux_hw_point_initialize): Likewise.
16462 (struct update_registers_data): New data structure.
16463 (update_registers_callback: New function.
16464 (arm_insert_point): Likewise.
16465 (arm_remove_point): Likewise.
16466 (arm_stopped_by_watchpoint): Likewise.
16467 (arm_stopped_data_address): Likewise.
16468 (arm_new_process): Likewise.
16469 (arm_new_thread): Likewise.
16470 (arm_prepare_to_resume): Likewise.
16471 (the_low_target): Register arm_insert_point, arm_remove_point,
16472 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
16473 arm_new_thread, and arm_prepare_to_resume.
16474
16475 2011-09-15 Stan Shebs <stan@codesourcery.com>
16476
16477 * server.h (struct emit_ops): Add compare-goto fields.
16478 * tracepoint.c (gdb_agent_op_sizes): New table.
16479 (emit_eq_goto): New function.
16480 (emit_ne_goto): New function.
16481 (emit_lt_goto): New function.
16482 (emit_le_goto): New function.
16483 (emit_gt_goto): New function.
16484 (emit_ge_goto): New function.
16485 (is_goto_target): New function.
16486 (compile_bytecodes): Recognize special cases of compare-goto
16487 combinations and call specialized emitters for them.
16488 * linux-x86-low.c (amd64_emit_eq_goto): New function.
16489 (amd64_emit_ne_goto): New function.
16490 (amd64_emit_lt_goto): New function.
16491 (amd64_emit_le_goto): New function.
16492 (amd64_emit_gt_goto): New function.
16493 (amd64_emit_ge_goto): New function.
16494 (amd64_emit_ops): Add the new functions.
16495 (i386_emit_eq_goto): New function.
16496 (i386_emit_ne_goto): New function.
16497 (i386_emit_lt_goto): New function.
16498 (i386_emit_le_goto): New function.
16499 (i386_emit_gt_goto): New function.
16500 (i386_emit_ge_goto): New function.
16501 (i386_emit_ops): Add the new functions.
16502
16503 2011-09-08 Stan Shebs <stan@codesourcery.com>
16504
16505 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
16506 (i386_emit_epilogue): Restore %ebx.
16507
16508 2011-08-31 Jie Zhang <jzhang918@gmail.com>
16509
16510 * server.c (step_thread): Remove definition.
16511 (process_serial_event): Don't handle Hs.
16512 * server.h (step_thread): Remove declaration.
16513 * target.c (set_desired_inferior): Remove use of step_thread.
16514
16515 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16516
16517 * linux-low.c: Include linux-procfs.h.
16518 (linux_attach_lwp_1): Update comments.
16519 (linux_attach): Scan for existing threads when attaching to a
16520 process that is the tgid.
16521 * Makefile.in: Update dependencies.
16522
16523 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16524
16525 * configure.srv: Add linux-procfs.o dependencies.
16526
16527 2011-08-14 Yao Qi <yao@codesourcery.com>
16528
16529 * target.h (struct target_ops): Fix indent.
16530 * win32-low.c (win32_target_ops): Fix comment.
16531
16532 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
16533 Yao Qi <yao@codesourcery.com>
16534
16535 * Makefile.in (clean): Remove tic6x-*.c files.
16536 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
16537 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
16538 (tic6x-c64xp-linux.c): Likewise.
16539 * configure.srv: Add support for tic6x-*-uclinux.
16540 * linux-tic6x-low.c: New.
16541 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
16542
16543 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
16544 Yao Qi <yao@codesourcery.com>
16545
16546 * target.h (struct target_ops): Add read_loadmap.
16547 * linux-low.c (struct target_loadseg): New type.
16548 (struct target_loadmap): New type.
16549 (linux_read_loadmap): New function.
16550 (linux_target_ops): Add linux_read_loadmap.
16551 * server.c (handle_query): Support qXfer:fdpic:read packet.
16552 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
16553 to NULL.
16554
16555 2011-08-05 Eli Zaretskii <eliz@gnu.org>
16556
16557 * win32-low.c: Include <stdint.h>.
16558
16559 2011-07-22 Pedro Alves <pedro@codesourcery.com>
16560
16561 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
16562 to the inferior here.
16563 (i386_remove_aligned_watchpoint): Ditto.
16564 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
16565 fit part of the watchpoint in the debug registers.
16566 (i386_update_inferior_debug_regs): New.
16567 (i386_low_insert_watchpoint): Work on a local mirror of the debug
16568 registers, and only update the inferior on success.
16569 (i386_low_remove_watchpoint): Ditto.
16570
16571 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
16572
16573 * linux-low.c (compare_ints, unique, list_threads, show_process,
16574 linux_core_of_thread): Delete.
16575 (linux_target_ops): Change linux_core_of_thread to
16576 linux_common_core_of_thread.
16577 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
16578 * utils.c (malloc_failure): Change type of argument.
16579 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
16580 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
16581 common/linux-osdata.c, common/ptid.c and common/buffer.c.
16582 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
16583 (IPA_OBJS): Add common-utils-ipa.o.
16584 (ptid_h, linux_osdata_h): New macros.
16585 (server_h): Add common/common-utils.h, common/xml-utils.h,
16586 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
16587 common/ptid.h.
16588 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
16589 ptid.o, buffer.o): New rules.
16590 (linux-low.o): Add common/linux-osdata.h as a dependency.
16591 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
16592 * configure.ac: Add AC_HEADER_DIRENT check.
16593 * config.in: Regenerate.
16594 * configure: Regenerate.
16595 * remote-utils.c (xml_escape_text): Delete.
16596 (buffer_grow, buffer_free, buffer_init, buffer_finish,
16597 buffer_xml_printf): Move to common/buffer.c.
16598 * server.c (main): Remove call to initialize_inferiors.
16599 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
16600 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
16601 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
16602 internal_error, gdb_assert, gdb_assert_fail): Delete.
16603 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
16604 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
16605 common/buffer.h.
16606 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
16607 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
16608 initialize_inferiors): Delete.
16609
16610 2011-07-20 Pedro Alves <pedro@codesourcery.com>
16611
16612 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
16613 symbol error.
16614
16615 2011-05-31 Pedro Alves <pedro@codesourcery.com>
16616
16617 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
16618 assertion.
16619 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
16620
16621 2011-05-26 Yao Qi <yao@codesourcery.com>
16622
16623 * Makefile.in (thread-db.o): Track dependence to
16624 common/gdb_thread_db.h.
16625 * thread-db.c: include gdb_thread_db.h from right place.
16626
16627 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
16628
16629 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
16630 __FILE__ and __LINE__ to internal_error.
16631
16632 2011-05-13 Doug Evans <dje@google.com>
16633
16634 * thread-db.c (try_thread_db_load_from_sdir): New function.
16635 (try_thread_db_load_from_dir): New function.
16636 (thread_db_load_search): Handle $sdir, ignore $pdir.
16637 Remove trying of system directories if search of
16638 libthread-db-search-path fails, that is now done via $sdir.
16639
16640 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
16641
16642 * server.c (handle_query): Add EnableDisableTracepoints to the list
16643 of supported features.
16644 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
16645 tracepoints.
16646 (cmd_qtenable_disable): New.
16647 (cmd_qtstart): Install tracepoints even if disabled.
16648 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
16649 receiving a QTEnable or QTDisable packet.
16650 (gdb_collect): Skip data collection if fast tracepoint is disabled.
16651 (ust_marker_to_static_tracepoint): Do not ignore disabled static
16652 tracepoints.
16653 (gdb_probe): Skip data collection if static tracepoint is disabled.
16654
16655 2011-05-10 Doug Evans <dje@google.com>
16656
16657 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
16658
16659 2011-05-04 Doug Evans <dje@google.com>
16660
16661 * linux-low.c (linux_join): Skip process lookup.
16662 * spu-low.c (spu_join): Ditto.
16663 * server.c (join_inferiors_callback): Delete.
16664 (process_serial_event): For 'D' packet (detach) call join_inferior
16665 directly.
16666
16667 2011-05-04 Joseph Myers <joseph@codesourcery.com>
16668
16669 * README: Don't mention xscale*-*-linux*.
16670 * configure.srv (xscale*-*-linux*): Don't handle target.
16671
16672 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
16673
16674 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
16675 casting pointers.
16676 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
16677 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
16678 (i386_emit_void_call_2): Likewise.
16679
16680 2011-04-26 Yao Qi <yao@codesourcery.com>
16681
16682 * linux-low.c: Move common macros to linux-ptrace.h.
16683 Include linux-ptrace.h.
16684 * Makefile.in (linux_ptrace_h): New.
16685 (linux-low.o): Depends on linux-ptrace.h.
16686
16687 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
16688
16689 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
16690 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
16691 (remote_prepare): New function with most of the TCP code from ...
16692 (remote_open): ... here. Detect PORT here unconditionally. Move also
16693 setting transport_is_reliable.
16694 * server.c (run_once): New variable.
16695 (gdbserver_usage): Document it.
16696 (main): Set run_once for `--once'. Call remote_prepare. Exit after
16697 the first run if RUN_ONCE.
16698 * server.h (run_once, remote_prepare): New declarations.
16699
16700 2011-04-19 Tom Tromey <tromey@redhat.com>
16701
16702 * win32-low.c (handle_load_dll): Remove duplicate "the".
16703
16704 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
16705
16706 Remove support for old Cygwin 1.5 versions.
16707 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
16708 function to avoid warning.
16709 (win32_add_one_solib): Use cygwin_conv_path function to avoid
16710 warning.
16711
16712 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
16713
16714 * gdbserver/server.h (Macro _): Define it if not available.
16715
16716 2011-03-14 Michael Snyder <msnyder@vmware.com>
16717
16718 * hostio.c (handle_close): Remove unnecessary null test.
16719
16720 2011-03-10 Joel Brobecker <brobecker@adacore.com>
16721
16722 * Makefile.in (maintainer-clean realclean distclean): Remove
16723 "make ... subdir_do" command.
16724
16725 2011-03-10 Michael Snyder <msnyder@vmware.com>
16726
16727 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
16728
16729 * server.c (handle_v_run): Free alloced buffer on early return.
16730
16731 2011-03-09 Yao Qi <yao@codesourcery.com>
16732
16733 Revert:
16734 2011-03-04 Yao Qi <yao@codesourcery.com>
16735
16736 * Makefile.in: Remove GNU make feature --directory.
16737
16738 2011-03-05 Yao Qi <yao@codesourcery.com>
16739
16740 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16741 (subdir_do): New make target. Copied from gdb/Makefile.
16742 (maintainer-clean, realclean, distclean, clean): Call corresponding
16743 make targets in common/Makefile.
16744
16745 2011-02-11 Yao Qi <yao@codesourcery.com>
16746
16747 * configure.ac: Call AC_PROG_RANLIB.
16748 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16749 * configure: Regenerate.
16750
16751 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
16752
16753 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
16754
16755 2011-03-06 Yao Qi <yao@codesourcery.com>
16756
16757 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
16758
16759 2011-03-05 Yao Qi <yao@codesourcery.com>
16760
16761 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16762 (subdir_do): New make target. Copied from gdb/Makefile.
16763 (maintainer-clean, realclean, distclean, clean): Call corresponding
16764 make targets in common/Makefile.
16765
16766 2011-03-04 Yao Qi <yao@codesourcery.com>
16767
16768 * Makefile.in: Remove GNU make feature --directory.
16769
16770 2011-03-04 Michael Snyder <msnyder@vmware.com>
16771
16772 * server.c (queue_stop_reply): Call xmalloc not malloc.
16773
16774 2011-03-02 Michael Snyder <msnyder@vmware.com>
16775
16776 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
16777
16778 2011-02-28 Michael Snyder <msnyder@vmware.com>
16779
16780 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
16781 (cmd_qtframe): Ditto.
16782 (cmd_qtbuffer): Ditto.
16783 (cmd_bigqtbuffer): Ditto.
16784
16785 * utils.c (decimal2str): Initialize 'width' to nine, then
16786 don't mess with it.
16787
16788 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16789
16790 * hostio.c (require_data): Free *data, not data.
16791
16792 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16793
16794 * hostio.c (require_data): Use free, not xfree.
16795
16796 2011-02-27 Michael Snyder <msnyder@vmware.com>
16797
16798 * server.c (handle_query): Discard unused value.
16799
16800 * hostio.c (require_data): Free malloc memory before returning
16801 error.
16802
16803 2011-02-26 Michael Snyder <msnyder@vmware.com>
16804
16805 * linux-low.c (list_threads): Call closedir for dirent.
16806
16807 2011-02-27 Michael Snyder <msnyder@vmware.com>
16808
16809 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
16810 a case statement falls through.
16811
16812 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
16813
16814 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
16815 in comparison.
16816
16817 2011-02-26 Michael Snyder <msnyder@vmware.com>
16818
16819 * utils.c (decimal2str): Eliminate dead code and dead param.
16820 (pulongest): Drop dead param from call to decimal2str.
16821 (plongest): Ditto.
16822
16823 2011-02-24 Joel Brobecker <brobecker@adacore.com>
16824
16825 Revert the following patch (not approved yet):
16826 2011-02-21 Hui Zhu <teawater@gmail.com>
16827 * tracepoint.c (tp_printf): New function.
16828 (eval_agent_expr): Handle gdb_agent_op_printf.
16829
16830 2011-02-21 Hui Zhu <teawater@gmail.com>
16831
16832 * tracepoint.c (tp_printf): New function.
16833 (eval_agent_expr): Handle gdb_agent_op_printf.
16834
16835 2011-02-18 Tom Tromey <tromey@redhat.com>
16836
16837 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
16838 (tracepoint.o): Likewise.
16839 * tracepoint.c (enum gdb_agent_op): Use ax.def.
16840 (gdb_agent_op_names): Likewise.
16841
16842 2011-02-18 Tom Tromey <tromey@redhat.com>
16843
16844 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
16845 gdb_agent_op_rot>: New constants.
16846 (gdb_agent_op_names): Add pick and roll.
16847 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
16848 cases.
16849
16850 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
16851
16852 * aclocal.m4: Regenerated with aclocal-1.11.1.
16853
16854 2011-02-14 Pedro Alves <pedro@codesourcery.com>
16855
16856 * server.c (handle_qxfer_traceframe_info): New.
16857 (qxfer_packets): Register "traceframe-info".
16858 (handle_query): Report support for qXfer:traceframe-info:read+.
16859 * tracepoint.c (match_blocktype): New.
16860 (traceframe_find_block_type): Rename to ...
16861 (traceframe_walk_blocks): ... this. Add callback filter argument,
16862 and use it.
16863 (traceframe_find_block_type): New, reimplemented on top of
16864 traceframe_walk_blocks.
16865 (build_traceframe_info_xml): New.
16866 (traceframe_read_info): New.
16867 * server.h (traceframe_read_info): Declare.
16868
16869 2011-02-11 Yao Qi <yao@codesourcery.com>
16870
16871 * configure.ac: Call AC_PROG_RANLIB.
16872 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16873 * configure: Regenerate.
16874
16875 2011-02-07 Pedro Alves <pedro@codesourcery.com>
16876
16877 * server.c (gdb_read_memory): Change return semantics to allow
16878 partial transfers.
16879 (handle_search_memory_1): Adjust.
16880 (process_serial_event) <'m' packet>: Handle partial transfers.
16881 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
16882
16883 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16884
16885 * regcache.c (init_register_cache): Initialize
16886 regcache->register_status.
16887 (free_register_cache): Release regcache->register_status.
16888 (regcache_cpy): Copy register_status.
16889 (registers_to_string): Print 'x's for unavailable registers.
16890 (supply_register): Mark the register's status valid or
16891 unavailable, depending on whether a buffer was passed in or not.
16892 (supply_register_zeroed): New.
16893 (supply_regblock): Mark the registers' status valid or
16894 unavailable, depending on whether a buffer was passed in or not.
16895 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
16896 (struct regcache): New `register_status' field.
16897 (supply_register_zeroed): Declare.
16898 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
16899 supply_register_zeroed, rather than passing a NULL buffer to
16900 supply_register.
16901 * tracepoint.c (fetch_traceframe_registers): Update comment.
16902
16903 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16904
16905 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
16906 buffer explicit.
16907
16908 2011-01-25 Pedro Alves <pedro@codesourcery.com>
16909
16910 * server.h (decode_xfer_write): Change prototype.
16911 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
16912 and don't extract the annex here.
16913 * server.c (decode_xfer_read): Remove `annex' parameter,
16914 and don't extract the annex here.
16915 (decode_xfer): New.
16916 (struct qxfer): New.
16917 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
16918 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
16919 (handle_qxfer_statictrace): New functions, abstracted out from
16920 handle_query, and made to use the struct qxfer interface.
16921 (handle_threads_qxfer_proper): Rename to ...
16922 (handle_qxfer_threads_proper): ... this.
16923 (handle_threads_qxfer): Rename to ...
16924 (handle_qxfer_threads): ... this. Adjust.
16925 (qxfer_packets): New array.
16926 (handle_qxfer): New function.
16927 (handle_query): Use handle_qxfer.
16928
16929 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
16930
16931 * gdbreplay.c: Shorten lines of >= 80 columns.
16932 * linux-low.c: Ditto.
16933 * linux-ppc-low.c: Ditto.
16934 * linux-s390-low.c: Ditto.
16935 * linux-sparc-low.c: Ditto.
16936 * linux-x86-low.c: Ditto.
16937 * linux-xtensa-low.c: Ditto.
16938 * mem-break.c: Ditto.
16939 * nto-low.c: Ditto.
16940 * regcache.h: Ditto.
16941 * remote-utils.c: Ditto.
16942 * server.c: Ditto.
16943 * server.h: Ditto.
16944 * thread-db.c: Ditto.
16945 * tracepoint.c: Ditto.
16946 * utils.c: Ditto.
16947 * win32-low.h: Ditto.
16948
16949 2011-01-05 Joel Brobecker <brobecker@adacore.com>
16950
16951 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
16952 update.
16953
16954 2011-01-01 Joel Brobecker <brobecker@adacore.com>
16955
16956 * server.c (gdbserver_version): Update copyright year in version
16957 output.
16958 * gdbreplay.c (gdbreplay_version): Ditto.
16959
16960 2010-12-29 Jie Zhang <jie.zhang@analog.com>
16961
16962 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
16963 * linux-bfin-low.c: New file.
16964 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
16965 PT_DATA_ADDR for BFIN targets.
16966 * Makefile.in (SFILES): Add linux-bfin-low.c.
16967 (clean): Remove reg-bfin.c.
16968 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
16969 * README: Mention supported Blackfin targets.
16970
16971 2010-12-23 Mike Frysinger <vapier@gentoo.org>
16972
16973 * .gitignore: New file.
16974
16975 2010-11-16 Mike Frysinger <vapier@gentoo.org>
16976
16977 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
16978
16979 2010-10-22 Jie Zhang <jie@codesourcery.com>
16980
16981 * Makefile.in: Add FLAGS_TO_PASS variable.
16982 (install): Remove dependency of install-only and recursively
16983 invoke make for install-only.
16984
16985 2010-10-04 Doug Evans <dje@google.com>
16986
16987 * Makefile.in (uninstall): Use $(DESTDIR).
16988
16989 2010-09-24 Pedro Alves <pedro@codesourcery.com>
16990
16991 PR gdb/11842
16992
16993 * linux-x86-low.c (compat_siginfo_from_siginfo)
16994 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
16995 si_code is < 0. Check for si_code == SI_TIMER before checking for
16996 si_code < 0.
16997
16998 2010-09-13 Joel Brobecker <brobecker@adacore.com>
16999
17000 * lynx-i386-low.c: New file.
17001 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
17002
17003 2010-09-13 Joel Brobecker <brobecker@adacore.com>
17004
17005 * lynx-low.c (ptrace_request_to_str): Remove handling for
17006 request values that have been removed in LynxOS 5.x.
17007
17008 2010-09-13 Joel Brobecker <brobecker@adacore.com>
17009
17010 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
17011 <ptrace.h>
17012
17013 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
17014
17015 * configure.ac: Add --enable-inprocess-agent option.
17016 * configure: Rebuilt.
17017
17018 2010-09-06 Yao Qi <yao@codesourcery.com>
17019
17020 * linux-low.c (linux_kill): Remove unused variable.
17021 (linux_stabilize_threads): Likewise.
17022 * server.c (start_inferior): Likewise.
17023 (queue_stop_reply_callback): Likewise.
17024 * tracepoint.c (do_action_at_tracepoint): Likewise.
17025
17026 2010-09-06 Yao Qi <yao@codesourcery.com>
17027
17028 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
17029 on return.
17030
17031 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
17032
17033 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
17034
17035 2010-09-06 Pedro Alves <pedro@codesourcery.com>
17036
17037 * Makefile.in (install-only): Replace $IPA_DEPFILES with
17038 "$(IPA_DEPFILES)".
17039
17040 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17041
17042 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
17043 gdbserver/lynx-ppc-low.c: New files.
17044 * Makefile.in (lynx_low_h): New variable.
17045 (lynx-low.o, lynx-ppc-low.o): New rules.
17046 * configure.ac: On LynxOS, link with -lnetinet.
17047 * configure.srv: Add handling of powerpc-*-lynxos* targets.
17048 * configure: regenerate.
17049
17050 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17051
17052 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
17053 * configure.ac: Add check for vasprintf and vsnprintf.
17054 * configure, config.in: Regenerate.
17055 * server.h (vasprintf, vsnprintf): Add conditional declarations.
17056
17057 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17058
17059 * gdbreplay.c: Move include of alloca.h up, next to include of
17060 malloc.h.
17061 * server.h: Add include of malloc.h.
17062 * mem-break.c: Remove include of malloc.h.
17063 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
17064
17065 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17066
17067 * Makefile.in (memmem.o): Build with -Wno-error.
17068
17069 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17070
17071 * utils.c (xsnprintf): Make non-static.
17072 * server.h: Add xsnprintf declaration.
17073 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
17074 replace calls to snprintf by calls to xsnprintf throughout.
17075
17076 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17077
17078 * configure.ac: Add configure check for alloca.
17079 * configure, config.in: Regenerate.
17080 * server.h: Include alloca.h if it exists.
17081 * gdbreplay.c: Include alloca.h if it exists.
17082
17083 2010-08-28 Pedro Alves <pedro@codesourcery.com>
17084
17085 * linux-low.c (__SIGRTMIN): Define if not already defined.
17086 (linux_create_inferior): Check for __ANDROID__ rather than
17087 __SIGRTMIN.
17088 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
17089 are already deferred.
17090 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
17091 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
17092 stopped and already has a pending signal to report.
17093 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
17094 a pending signal to report or is moving out of a jump pad.
17095 (linux_init_signals): Check for __ANDROID__ rather than
17096 __SIGRTMIN.
17097
17098 2010-08-28 Pedro Alves <pedro@codesourcery.com>
17099
17100 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
17101 debug_threads check. Avoid a linear search when not doing debug
17102 output.
17103
17104 2010-08-27 Pedro Alves <pedro@codesourcery.com>
17105
17106 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
17107 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
17108 (struct file_handler) <fd>: Change type to gdb_fildes_t.
17109 (process_event): Change local fd's type to gdb_fildes_t.
17110 (create_file_handler): Adjust prototype.
17111 (delete_file_handler): Adjust prototype.
17112 (handle_file_event): Adjust prototype. Use pfildes.
17113 (create_file_event): Adjsut prototype.
17114 * remote-utils.c (remote_desc, listen_desc): Change type to
17115 gdb_fildes_t.
17116 * server.h: New gdb_fildes_t typedef.
17117 [USE_WIN32API]: Include winsock2.h.
17118 (delete_file_handler, add_file_handler): Adjust prototypes.
17119 (pfildes): Declare.
17120 * utils.c (pfildes): New.
17121
17122 2010-08-27 Pedro Alves <pedro@codesourcery.com>
17123
17124 * configure.ac (build_warnings): Add -Wno-char-subscripts.
17125 * configure: Regenerate.
17126
17127 2010-08-27 Pedro Alves <pedro@codesourcery.com>
17128
17129 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
17130 (linux_done_accessing_memory): ... this.
17131 (linux_target_ops): Adjust.
17132 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
17133 * nto-low.c (nto_target_ops): Adjust comment.
17134 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
17135 * spu-low.c (spu_target_ops): Adjust comment.
17136 * target.h (target_ops): Rename unprepare_to_access_memory field
17137 to done_accessing_memory.
17138 (unprepare_to_access_memory): Rename to ...
17139 (done_accessing_memory): ... this.
17140
17141 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17142
17143 * linux-low.c (linux_prepare_to_access_memory): New.
17144 (linux_unprepare_to_access_memory): New.
17145 (linux_target_ops): Install them.
17146 * server.c (read_memory): Rename to ...
17147 (gdb_read_memory): ... this. Use
17148 prepare_to_access_memory/prepare_to_access_memory.
17149 (write_memory): Rename to ...
17150 (gdb_write_memory): ... this. Use
17151 prepare_to_access_memory/prepare_to_access_memory.
17152 (handle_search_memory_1): Adjust.
17153 (process_serial_event): Adjust.
17154 * target.h (struct target_ops): New fields
17155 prepare_to_access_memory and unprepare_to_access_memory.
17156 (prepare_to_access_memory, unprepare_to_access_memory): New.
17157 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
17158 prepare_to_access_memory/prepare_to_access_memory.
17159 * nto-low.c (nto_target_ops): Adjust.
17160 * spu-low.c (spu_target_ops): Adjust.
17161 * win32-low.c (win32_target_ops): Adjust.
17162
17163 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17164
17165 * Makefile.in (WARN_CFLAGS): Get it from configure.
17166 (WERROR_CFLAGS): New.
17167 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
17168 * configure.ac: Introduce --enable-werror, which adds -Werror to
17169 the compiler command line. Enabled by default. Disable with
17170 --disable-werror. Add -Wdeclaration-after-statement
17171 Wpointer-arith and -Wformat-nonliteral to warning flags.
17172 * configure: Regenerate.
17173
17174 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17175
17176 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
17177
17178 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17179
17180 * gdbreplay.c (remote_error): New.
17181 (gdbchar): New.
17182 (expect): Use gdbchar. Check for error reading from GDB.
17183 Clarify sync error output.
17184 (play): Check for errors writing to GDB.
17185 * linux-low.c (sigchld_handler): Really ignore `write' errors.
17186 * remote-utils.c (getpkt): Check for errors writing to the remote
17187 descriptor.
17188
17189 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17190
17191 * linux-low.c (linux_wait_1): Move non-debugging code out of
17192 `debug_threads' control.
17193
17194 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17195
17196 * linux-low.c (linux_wait_1): Don't set last_status here.
17197 * server.c (push_event, queue_stop_reply_callback): Assert we're
17198 not pushing a TARGET_WAITKIND_IGNORE event.
17199 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
17200 (myresume, handle_target_event): Set the thread's last_resume_kind
17201 and last_status from the target returned status.
17202
17203 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17204
17205 PR threads/10729
17206
17207 * linux-x86-low.c (update_debug_registers_callback): New.
17208 (i386_dr_low_set_addr): Use it.
17209 (i386_dr_low_get_addr): New.
17210 (i386_dr_low_set_control): Use update_debug_registers_callback.
17211 (i386_dr_low_get_control): New.
17212 (i386_dr_low_get_status): Adjust.
17213 * linux-low.c (linux_stop_lwp): New.
17214 * linux-low.h (linux_stop_lwp): Declare.
17215
17216 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
17217 argument instead of a i386_debug_reg_state.
17218 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
17219 a i386_debug_reg_state.
17220 (i386_insert_aligned_watchpoint): Adjust.
17221 (i386_remove_aligned_watchpoint): Adjust.
17222 (i386_low_stopped_data_address): Read the debug registers from the
17223 inferior instead of from the mirrors.
17224 * i386-low.h (struct i386_debug_reg_state): Extend comment.
17225 (i386_dr_low_get_addr): Declare.
17226 (i386_dr_low_get_control): Declare.
17227 (i386_dr_low_get_status): Change prototype.
17228
17229 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
17230 (i386_dr_low_get_addr): New.
17231 (i386_dr_low_get_control): New.
17232 (i386_dr_low_get_status): Adjust prototype. Return
17233 dr_status_mirror.
17234 (i386_initial_stuff): Clear dr_status_mirror and
17235 dr_control_mirror.
17236 (i386_get_thread_context): Adjust.
17237 (i386_set_thread_context): Adjust.
17238 (i386_thread_added): Adjust.
17239
17240 2010-08-24 Pedro Alves <pedro@codesourcery.com>
17241
17242 * linux-low.h (linux_thread_area): Delete declaration.
17243
17244 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
17245
17246 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
17247 after its termination.
17248
17249 2010-08-09 Pedro Alves <pedro@codesourcery.com>
17250
17251 * linux-low.c (gdb_wants_lwp_stopped): Delete.
17252 (gdb_wants_all_stopped): Delete.
17253 (linux_wait_1): Don't call them.
17254 * server.c (handle_v_cont): Tag all threads as want-stopped.
17255 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
17256 stopped as "client-wants-stopped".
17257
17258 2010-07-31 Pedro Alves <pedro@codesourcery.com>
17259
17260 * Makefile.in (signals_h): New.
17261 (server_h): Depend on it.
17262 (server.o): Don't depend on $(signals_def).
17263 (signals.o): Depend on $(signals_def).
17264
17265 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
17266
17267 * Makefile.in (signals_def): New.
17268 (server_h): Append include/gdb/signals.h and signals_def.
17269 (server.o): Append signals_def.
17270
17271 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
17272
17273 * server.c (handle_target_event): Use target_signal_to_host for
17274 resume_info.sig initialization.
17275 * target.h (struct thread_resume) <sig>: New comment.
17276
17277 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
17278
17279 * server.c (handle_query): strcpy() the returned string from paddress()
17280 instead of sprintf().
17281 * utils.c (paddress): Return phex_nz().
17282
17283 2010-07-07 Joel Brobecker <brobecker@adacore.com>
17284
17285 * server.c (handle_v_cont): Call mourn_inferior if process
17286 just exited.
17287 (myresume): Likewise.
17288
17289 2010-07-01 Pedro Alves <pedro@codesourcery.com>
17290
17291 Static tracepoints, and integration with UST.
17292
17293 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
17294 * mem-break.c (uninsert_all_breakpoints)
17295 (reinsert_all_breakpoints): New.
17296 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
17297 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
17298 (gdb_agent_ust_loaded, helper_thread_id)
17299 (gdb_agent_helper_thread_id): New macros.
17300 (struct ipa_sym_addresses): Add addr_ust_loaded,
17301 addr_helper_thread_id, addr_cmd_buf.
17302 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
17303 (in_process_agent_loaded_ust): New.
17304 (write_e_ust_not_loaded): New.
17305 (maybe_write_ipa_ust_not_loaded): New.
17306 (struct collect_static_trace_data_action): New.
17307 (enum tracepoint_type) <static_tracepoint>: New.
17308 (struct tracepoint) <handle>: Mention static tracepoints.
17309 (struct static_tracepoint_ctx): New.
17310 (CMD_BUF_SIZE): New.
17311 (add_tracepoint_action): Handle static tracepoint actions.
17312 (unprobe_marker_at): New.
17313 (clear_installed_tracepoints): Handle static tracepoints.
17314 (cmd_qtdp): Handle static tracepoints.
17315 (probe_marker_at): New.
17316 (cmd_qtstart): Handle static tracepoints.
17317 (response_tracepoint): Handle static tracepoints.
17318 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
17319 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
17320 (get_context_regcache): Handle static tracepoints.
17321 (do_action_at_tracepoint): Handle static tracepoint actions.
17322 (traceframe_find_block_type): Handle static trace data blocks.
17323 (traceframe_read_sdata): New.
17324 (download_tracepoints): Download static tracepoint actions.
17325 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
17326 (GDB_PROBE_NAME): New.
17327 (ust_ops): New.
17328 (GET_UST_SYM): New.
17329 (USTF): New.
17330 (dlsym_ust): New.
17331 (ust_marker_to_static_tracepoint): New.
17332 (gdb_probe): New.
17333 (collect_ust_data_at_tracepoint): New.
17334 (gdb_ust_probe): New.
17335 (UNIX_PATH_MAX, SOCK_DIR): New.
17336 (gdb_ust_connect_sync_socket): New.
17337 (resume_thread, stop_thread): New.
17338 (run_inferior_command): New.
17339 (init_named_socket): New.
17340 (gdb_ust_socket_init): New.
17341 (cstr_to_hexstr): New.
17342 (next_st): New.
17343 (first_marker, next_marker): New.
17344 (response_ust_marker): New.
17345 (cmd_qtfstm, cmd_qtsstm): New.
17346 (unprobe_marker_at, probe_marker_at): New.
17347 (cmd_qtstmat, gdb_ust_thread): New.
17348 (gdb_ust_init): New.
17349 (initialize_tracepoint_ftlib): Call gdb_ust_init.
17350 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
17351 (ST_REGENTRY): New.
17352 (x86_64_st_collect_regmap): New.
17353 (X86_64_NUM_ST_COLLECT_GREGS): New.
17354 (AMD64_RIP_REGNUM): New.
17355 (supply_static_tracepoint_registers): New.
17356 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
17357 (ST_REGENTRY): New.
17358 (i386_st_collect_regmap): New.
17359 (i386_NUM_ST_COLLECT_GREGS): New.
17360 (supply_static_tracepoint_registers): New.
17361 * server.c (handle_query): Handle qXfer:statictrace:read.
17362 <qSupported>: Report support for StaticTracepoints, and
17363 qXfer:statictrace:read features.
17364 * server.h (traceframe_read_sdata)
17365 (supply_static_tracepoint_registers): Declare.
17366 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
17367 (unpack_varlen_hex): Include in IPA build.
17368 * Makefile.in (ustlibs, ustinc): New.
17369 (IPA_OBJS): Add remote-utils-ipa.o.
17370 ($(IPA_LIB)): Link -ldl and -lpthread.
17371 (UST_CFLAGS): New.
17372 (IPAGENT_CFLAGS): Add UST_CFLAGS.
17373 * config.in, configure: Regenerate.
17374
17375 2010-06-20 Ian Lance Taylor <iant@google.com>
17376 Pedro Alves <pedro@codesourcery.com>
17377
17378 * linux-x86-low.c (always_true): Delete.
17379 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
17380 trying to fool the compiler with always_true.
17381
17382 2010-06-20 Pedro Alves <pedro@codesourcery.com>
17383
17384 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
17385 conditions in gdbserver.
17386
17387 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
17388
17389 * spu-low.c (spu_read_memory): Wrap around local store limit.
17390 (spu_write_memory): Likewise.
17391
17392 2010-06-15 Pedro Alves <pedro@codesourcery.com>
17393
17394 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
17395 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
17396 LONGEST uses.
17397 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
17398 uses.
17399 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
17400 uses with LONGEST uses.
17401
17402 2010-06-14 Stan Shebs <stan@codesourcery.com>
17403 Pedro Alves <pedro@codesourcery.com>
17404
17405 Bytecode compiler.
17406
17407 * linux-x86-low.c: Include limits.h.
17408 (add_insns): New.
17409 (always_true): New.
17410 (EMIT_ASM): New.
17411 (EMIT_ASM32): New.
17412 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
17413 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
17414 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
17415 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
17416 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
17417 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
17418 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
17419 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
17420 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
17421 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
17422 (amd64_emit_void_call_2): New.
17423 (amd64_emit_ops): New.
17424 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
17425 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
17426 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
17427 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
17428 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
17429 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
17430 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
17431 (i386_emit_call, i386_emit_reg, i386_emit_pop)
17432 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
17433 (i386_emit_stack_adjust, i386_emit_int_call_1)
17434 (i386_emit_void_call_2): New.
17435 (i386_emit_ops): New.
17436 (x86_emit_ops): New.
17437 (the_low_target): Install x86_emit_ops.
17438 * server.h (struct emit_ops): New.
17439 (get_raw_reg_func_addr): Declare.
17440 (current_insn_ptr, emit_error): Declare.
17441 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
17442 (set_trace_state_variable_value): New defines.
17443 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
17444 addr_get_trace_state_variable_value and
17445 addr_set_trace_state_variable_value.
17446 (symbol_list): New fields for get_raw_reg,
17447 get_trace_state_variable_value and set_trace_state_variable_value.
17448 (condfn): New typedef.
17449 (struct tracepoint): New field `compiled_cond'.
17450 (do_action_at_tracepoint): Clear compiled_cond.
17451 (get_trace_state_variable_value, set_trace_state_variable_value):
17452 Export in the IPA.
17453 (condition_true_at_tracepoint): If there's a compiled condition,
17454 run that.
17455 (current_insn_ptr, emit_error): New globals.
17456 (struct bytecode_address): New.
17457 (get_raw_reg_func_addr): New.
17458 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
17459 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
17460 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
17461 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
17462 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
17463 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
17464 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
17465 (compile_tracepoint_condition, compile_bytecodes): New.
17466 * target.h (emit_ops): Forward declare.
17467 (struct target_ops): New field emit_ops.
17468 (target_emit_ops): New.
17469 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
17470 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
17471 * linux-low.c (linux_emit_ops): New.
17472 (linux_target_ops): Install it.
17473 * linux-low.h (struct linux_target_ops): New field emit_ops.
17474
17475 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
17476
17477 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
17478 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
17479
17480 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17481 Stan Shebs <stan@codesourcery.com>
17482
17483 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
17484 (all): Depend on $(extra_libraries).
17485 (install-only): Install the IPA.
17486 (IPA_OBJS, IPA_LIB): New.
17487 (clean): Remove the IPA lib.
17488 (IPAGENT_CFLAGS): New.
17489 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
17490 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
17491 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
17492 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
17493 * configure.ac: Check for atomic builtins support in the compiler.
17494 (IPA_DEPFILES, extra_libraries): Define.
17495 * configure.srv (ipa_obj): Add description.
17496 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
17497 (i[34567]86-*-linux*): Set ipa_obj.
17498 (x86_64-*-linux*): Set ipa_obj.
17499 * linux-low.c (stabilizing_threads): New.
17500 (supports_fast_tracepoints): New.
17501 (linux_detach): Stabilize threads before detaching.
17502 (handle_tracepoints): Handle internal tracing breakpoints. Assert
17503 the lwp is either not stabilizing, or is moving out of a jump pad.
17504 (linux_fast_tracepoint_collecting): New.
17505 (maybe_move_out_of_jump_pad): New.
17506 (enqueue_one_deferred_signal): New.
17507 (dequeue_one_deferred_signal): New.
17508 (linux_wait_for_event_1): If moving out of a jump pad, defer
17509 pending signals to later.
17510 (linux_stabilize_threads): New.
17511 (linux_wait_1): Check if threads need moving out of jump pads, and
17512 do it if so.
17513 (stuck_in_jump_pad_callback): New.
17514 (move_out_of_jump_pad_callback): New.
17515 (lwp_running): New.
17516 (linux_resume_one_lwp): Handle moving out of jump pads.
17517 (linux_set_resume_request): Dequeue deferred signals.
17518 (need_step_over_p): Also step over fast tracepoint jumps.
17519 (start_step_over): Also uninsert fast tracepoint jumps.
17520 (finish_step_over): Also reinsert fast tracepoint jumps.
17521 (linux_install_fast_tracepoint_jump): New.
17522 (linux_target_ops): Install linux_stabilize_threads and
17523 linux_install_fast_tracepoint_jump_pad.
17524 * linux-low.h (linux_target_ops) <get_thread_area,
17525 install_fast_tracepoint_jump_pad>: New fields.
17526 (struct lwp_info) <collecting_fast_tracepoint,
17527 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
17528 (linux_get_thread_area): Declare.
17529 * linux-x86-low.c (jump_insn): New.
17530 (x86_get_thread_area): New.
17531 (append_insns): New.
17532 (push_opcode): New.
17533 (amd64_install_fast_tracepoint_jump_pad): New.
17534 (i386_install_fast_tracepoint_jump_pad): New.
17535 (x86_install_fast_tracepoint_jump_pad): New.
17536 (the_low_target): Install x86_get_thread_area and
17537 x86_install_fast_tracepoint_jump_pad.
17538 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
17539 (struct fast_tracepoint_jump): New.
17540 (fast_tracepoint_jump_insn): New.
17541 (fast_tracepoint_jump_shadow): New.
17542 (find_fast_tracepoint_jump_at): New.
17543 (fast_tracepoint_jump_here): New.
17544 (delete_fast_tracepoint_jump): New.
17545 (set_fast_tracepoint_jump): New.
17546 (uninsert_fast_tracepoint_jumps_at): New.
17547 (reinsert_fast_tracepoint_jumps_at): New.
17548 (set_breakpoint_at): Use write_inferior_memory.
17549 (uninsert_raw_breakpoint): Use write_inferior_memory.
17550 (check_mem_read): Mask out fast tracepoint jumps.
17551 (check_mem_write): Mask out fast tracepoint jumps.
17552 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
17553 (set_fast_tracepoint_jump): Declare.
17554 (delete_fast_tracepoint_jump)
17555 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
17556 (reinsert_fast_tracepoint_jumps_at): Declare.
17557 * regcache.c: Don't compile many functions when building the
17558 in-process agent library.
17559 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
17560 the register buffer in the heap.
17561 (free_register_cache): If the register buffer isn't owned by the
17562 regcache, don't free it.
17563 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
17564 pre-existing register caches.
17565 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
17566 type.
17567 (convert_ascii_to_int): : Constify `from' parameter type.
17568 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
17569 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
17570 the needed buffer in-place.
17571 (relocate_instruction): New.
17572 * server.c (handle_query) <qSymbols>: If the target supports
17573 tracepoints, give it a chance of looking up symbols. Report
17574 support for fast tracepoints.
17575 (handle_status): Stabilize threads.
17576 (process_serial_event): Adjust.
17577 * server.h (struct fast_tracepoint_jump): Forward declare.
17578 (struct process_info) <fast_tracepoint_jumps>: New field.
17579 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
17580 (decode_X_packet, decode_M_packet): Adjust.
17581 (relocate_instruction): Declare.
17582 (in_process_agent_loaded): Declare.
17583 (tracepoint_look_up_symbols): Declare.
17584 (struct fast_tpoint_collect_status): Declare.
17585 (fast_tracepoint_collecting): Declare.
17586 (force_unlock_trace_buffer): Declare.
17587 (handle_tracepoint_bkpts): Declare.
17588 (initialize_low_tracepoint)
17589 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
17590 * target.h (struct target_ops) <stabilize_threads,
17591 install_fast_tracepoint_jump_pad>: New fields.
17592 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
17593 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
17594 [HAVE_STDINT_H]: Include stdint.h.
17595 (trace_debug_1): Rename to ...
17596 (trace_vdebug): ... this.
17597 (trace_debug): Rename to ...
17598 (trace_debug_1): ... this. Add `level' parameter.
17599 (trace_debug): New.
17600 (ATTR_USED, ATTR_NOINLINE): New.
17601 (IP_AGENT_EXPORT): New.
17602 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
17603 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
17604 (about_to_request_buffer_space, trace_buffer_is_full)
17605 (stopping_tracepoint, expr_eval_result, error_tracepoint)
17606 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
17607 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
17608 (traceframe_write_count, traceframes_created)
17609 (trace_state_variables)
17610 New renaming defines.
17611 (struct ipa_sym_addresses): New.
17612 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
17613 (symbol_list): New.
17614 (ipa_sym_addrs): New.
17615 (all_tracepoint_symbols_looked_up): New.
17616 (in_process_agent_loaded): New.
17617 (write_e_ipa_not_loaded): New.
17618 (maybe_write_ipa_not_loaded): New.
17619 (tracepoint_look_up_symbols): New.
17620 (debug_threads) [IN_PROCESS_AGENT]: New.
17621 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
17622 (UNKNOWN_SIDE_EFFECTS): New.
17623 (stop_tracing): New.
17624 (flush_trace_buffer): New.
17625 (stop_tracing_bkpt): New.
17626 (flush_trace_buffer_bkpt): New.
17627 (read_inferior_integer): New.
17628 (read_inferior_uinteger): New.
17629 (read_inferior_data_pointer): New.
17630 (write_inferior_data_pointer): New.
17631 (write_inferior_integer): New.
17632 (write_inferior_uinteger): New.
17633 (struct collect_static_trace_data_action): Delete.
17634 (enum tracepoint_type): New.
17635 (struct tracepoint) <type>: New field `type'.
17636 <actions_str, step_actions, step_actions_str>: Only include in
17637 GDBserver.
17638 <orig_size, obj_addr_on_target, adjusted_insn_addr>
17639 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
17640 (tracepoints): Use IP_AGENT_EXPORT.
17641 (last_tracepoint): Don't include in the IPA.
17642 (stopping_tracepoint): Use IP_AGENT_EXPORT.
17643 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
17644 (alloced_trace_state_variables): New.
17645 (trace_state_variables): Use IP_AGENT_EXPORT.
17646 (traceframe_t): Delete unused variable.
17647 (circular_trace_buffer): Don't include in the IPA.
17648 (trace_buffer_start): Delete.
17649 (struct trace_buffer_control): New.
17650 (trace_buffer_free): Delete.
17651 (struct ipa_trace_buffer_control): New.
17652 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
17653 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
17654 New.
17655 (trace_buffer_ctrl): New.
17656 (TRACE_BUFFER_CTRL_CURR): New.
17657 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
17658 Reimplement as macros.
17659 (trace_buffer_wrap): Delete.
17660 (traceframe_write_count, traceframe_read_count)
17661 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
17662 (struct tracepoint_hit_ctx) <type>: New field.
17663 (struct fast_tracepoint_ctx): New.
17664 (memory_barrier): New.
17665 (cmpxchg): New.
17666 (record_tracepoint_error): Update atomically in the IPA.
17667 (clear_inferior_trace_buffer): New.
17668 (about_to_request_buffer_space): New.
17669 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
17670 updating the same buffer.
17671 (add_tracepoint): Default the tracepoint's type to trap
17672 tracepoint, and orig_size to -1.
17673 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
17674 internal variables.
17675 (create_trace_state_variable): New parameter `gdb'. Handle it.
17676 (clear_installed_tracepoints): Clear fast tracepoint jumps.
17677 (cmd_qtdp): Handle fast tracepoints.
17678 (cmd_qtdv): Adjust.
17679 (max_jump_pad_size): New.
17680 (gdb_jump_pad_head): New.
17681 (get_jump_space_head): New.
17682 (claim_jump_space): New.
17683 (sort_tracepoints): New.
17684 (MAX_JUMP_SIZE): New.
17685 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
17686 IPA.
17687 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
17688 support. Upload fast traceframes, and delete internal IPA
17689 breakpoints.
17690 (stop_tracing_handler): New.
17691 (flush_trace_buffer_handler): New.
17692 (cmd_qtstop): Upload fast tracepoints.
17693 (response_tracepoint): Handle fast tracepoints.
17694 (tracepoint_finished_step): Upload fast traceframes. Set the
17695 tracepoint hit context's tracepoint type.
17696 (handle_tracepoint_bkpts): New.
17697 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
17698 type. Add comment about fast tracepoints.
17699 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
17700 non-existing action_str field.
17701 (get_context_regcache): Handle fast tracepoints.
17702 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
17703 to the regcache.
17704 (fast_tracepoint_from_jump_pad_address): New.
17705 (fast_tracepoint_from_ipa_tpoint_address): New.
17706 (collecting_t): New.
17707 (force_unlock_trace_buffer): New.
17708 (fast_tracepoint_collecting): New.
17709 (collecting): New.
17710 (gdb_collect): New.
17711 (write_inferior_data_ptr): New.
17712 (target_tp_heap): New.
17713 (target_malloc): New.
17714 (download_agent_expr): New.
17715 (UALIGN): New.
17716 (download_tracepoints): New.
17717 (download_trace_state_variables): New.
17718 (upload_fast_traceframes): New.
17719 (IPA_FIRST_TRACEFRAME): New.
17720 (IPA_NEXT_TRACEFRAME_1): New.
17721 (IPA_NEXT_TRACEFRAME): New.
17722 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
17723 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
17724 (gdb_jump_pad_buffer_end): New.
17725 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
17726 (initialize_tracepoint): Adjust.
17727 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
17728 buffer. Initialize the low module.
17729 * utils.c (PREFIX, TOOLNAME): New.
17730 (malloc_failure): Use PREFIX.
17731 (error): In the IPA, an error causes an exit.
17732 (fatal, warning): Use PREFIX.
17733 (internal_error): Use TOOLNAME.
17734 (NUMCELLS): Increase to 10.
17735 * configure, config.in: Regenerate.
17736
17737 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17738
17739 * server.c (handle_query) <qSupported>: Do two passes over the
17740 qSupported string to avoid nesting strtok.
17741
17742 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17743
17744 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
17745 (CDEPS): New.
17746 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
17747 -Wl,--dynamic-list.
17748 * configure: Regenerate.
17749 * proc-service.list: New.
17750
17751 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17752
17753 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
17754 New comment.
17755
17756 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
17757
17758 * gdbreplay.c (remote_open): Check error return from socket() call by
17759 its equality to -1 not by it being negative.
17760 * remote-utils.c (remote_open): Likewise.
17761
17762 2010-05-23 Pedro Alves <pedro@codesourcery.com>
17763
17764 * config.h: Regenerate.
17765
17766 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17767
17768 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
17769 doesn't provide PTRACE_GET_THREAD_AREA.
17770
17771 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17772
17773 * linux-m68k-low.c: Include <asm/ptrace.h>
17774 (ps_get_thread_area): Implement.
17775
17776 2010-05-03 Doug Evans <dje@google.com>
17777
17778 * event-loop.c (struct callback_event): New struct.
17779 (callback_list): New global.
17780 (append_callback_event, delete_callback_event): New functions.
17781 (process_callback): New function.
17782 (start_event_loop): Call it.
17783 * remote-utils.c (NOT_SCHEDULED): Define.
17784 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
17785 moved out of readchar.
17786 (readchar): Rewrite. Call reschedule before returning.
17787 (reset_readchar): New function.
17788 (remote_close): Call it.
17789 (process_remaining, reschedule): New functions.
17790 * server.h (callback_handler_func): New typedef.
17791 (append_callback_event, delete_callback_event): Declare.
17792
17793 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17794
17795 * proc-service.c (ps_pglobal_lookup): Use
17796 thread_db_look_up_one_symbol.
17797 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
17798 parameter. Use it instead of all_symbols_looked_up.
17799 * server.h (struct process_info) <all_symbols_looked_up>: Delete
17800 field.
17801 (all_symbols_looked_up): Don't declare.
17802 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
17803 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
17804 field.
17805 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
17806 Set all_symbols_looked_up here.
17807 (thread_db_look_up_one_symbol): New.
17808 (thread_db_get_tls_address): Adjust.
17809 (thread_db_load_search, try_thread_db_load_1): Always allocate the
17810 thread_db object on the heap, and tentatively set it in the
17811 process structure.
17812 (thread_db_init): Don't set all_symbols_looked_up here.
17813 * linux-low.h (thread_db_look_up_one_symbol): Declare.
17814
17815 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17816
17817 * linux-low.c (linux_kill, linux_detach): Adjust.
17818 (status_pending_p_callback): Remove redundant statement. Check
17819 for !TARGET_WAITIKIND_IGNORE, instead of
17820 TARGET_WAITKIND_STOPPED.
17821 (handle_tracepoints): Make sure LWP is locked. Adjust.
17822 (linux_wait_for_event_1): Adjust.
17823 (linux_cancel_breakpoints): New.
17824 (unsuspend_one_lwp): New.
17825 (unsuspend_all_lwps): New.
17826 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
17827 (send_sigstop_callback): Change return type to int, add new
17828 `except' parameter and handle it.
17829 (suspend_and_send_sigstop_callback): New.
17830 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
17831 pass them down. If SUSPEND, also increment the lwp's suspend
17832 count.
17833 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
17834 (need_step_over_p): Don't consider suspended LWPs.
17835 (start_step_over): Adjust.
17836 (proceed_one_lwp): Change return type to int, add new `except'
17837 parameter and handle it.
17838 (unsuspend_and_proceed_one_lwp): New.
17839 (proceed_all_lwps): Use find_inferior instead of
17840 for_each_inferior.
17841 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
17842 also decrement the suspend count of LWPs. Pass `except' down,
17843 instead of hacking its suspend count.
17844 (linux_pause_all): Add `freeze' parameter. Adjust.
17845 (linux_unpause_all): New.
17846 (linux_target_ops): Install linux_unpause_all.
17847 * server.c (handle_status): Adjust.
17848 * target.h (struct target_ops): New fields `unpause_all' and
17849 `cancel_breakpoints'. Add new parameter to `pause_all'.
17850 (pause_all): Add new `freeze' parameter.
17851 (unpause_all): New.
17852 (cancel_breakpoints): New.
17853 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
17854 cancel breakpoints.
17855 (cmd_qtstart): Pause threads.
17856 (stop_tracing): Pause threads, and cancel breakpoints.
17857 * win32-low.c (win32_target_ops): Adjust.
17858
17859 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17860
17861 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
17862 the inferior right away from here...
17863 (linux_wait_1): ... to here, and adjust to check the thread's
17864 last_resume_kind instead of the lwp's step or stop_expected flags.
17865
17866 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17867
17868 * README: Use consistent `GDB' and `GDBserver' spellings.
17869
17870 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17871
17872 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
17873 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
17874 (linux_detach_one_lwp): Assume the lwp is stopped.
17875 (any_thread_of): Delete.
17876 (linux_detach): Stop all lwps here. Don't blindly delete all
17877 breakpoints.
17878 (delete_lwp_callback): New.
17879 (linux_mourn): Delete all lwps of the process that is gone.
17880 (linux_wait_1): Don't delete the last lwp of the process here.
17881 * mem-break.h (mark_breakpoints_out): Declare.
17882 * mem-break.c (mark_breakpoints_out): New.
17883 (free_all_breakpoints): Use it.
17884 * server.c (handle_target_event): If the process is gone, mark
17885 breakpoints out.
17886 * thread-db.c (struct thread_db) <create_bp>: New field.
17887 (thread_db_enable_reporting): Fix prototype. Store a thread event
17888 breakpoint reference in the thread_db struct.
17889 (thread_db_load_search): Clear the thread_db object.
17890 (try_thread_db_load_1): Ditto.
17891 (switch_to_process): New.
17892 (disable_thread_event_reporting): Use it.
17893 (remove_thread_event_breakpoints): New.
17894 (thread_db_detach, thread_db_mourn): Use it.
17895
17896 2010-05-01 Pedro Alves <pedro@codesourcery.com>
17897
17898 * linux-low.c (linux_enable_event_reporting): New.
17899 (linux_wait_for_event_1, handle_extended_wait): Use it.
17900
17901 2010-04-30 Pedro Alves <pedro@codesourcery.com>
17902
17903 * linux-low.c (linux_kill_one_lwp, linux_kill)
17904 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
17905 (send_sigstop): Take an lwp_info as parameter instead. Queue a
17906 SIGSTOP even if the LWP is stopped.
17907 (send_sigstop_callback): New.
17908 (stop_all_lwps): Use send_sigstop_callback instead.
17909 (linux_resume_one_thread): Adjust.
17910 (proceed_one_lwp): Still proceed an LWP that the client has
17911 requested to stop, if we haven't reported it as stopped yet. Make
17912 sure that LWPs the client want stopped, have a pending SIGSTOP.
17913
17914 2010-04-26 Doug Evans <dje@google.com>
17915
17916 * server.c (handle_general_set): Make static.
17917
17918 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
17919 Print received char after testing for error/eof instead of before.
17920 (input_interrupt): Tweak comment.
17921
17922 2010-04-23 Doug Evans <dje@google.com>
17923
17924 * server.c (start_inferior): Print inferior argv if --debug.
17925
17926 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
17927
17928 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
17929 * nto-x86-low.c: Include server.h
17930
17931 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
17932
17933 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
17934 be consistent with other sources of this directory.
17935 (init_registers_amd64): Correct name of source file of this function
17936 in the comment.
17937
17938 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17939
17940 * configure.srv (x86_64-*-mingw*): New configuration for Windows
17941 64-bit executables.
17942
17943 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17944
17945 * win32-i386-low.c: Add 64-bit support.
17946 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
17947 (init_registers_amd64): Declare.
17948 (mappings): Add 64-bit version of array.
17949 (init_windows_x86): New function.
17950 (the_low_target): Change init_arch field to init_windows_x86.
17951
17952 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17953
17954 * win32-low.c: Adapt to support also 64-bit architecture.
17955 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
17956 (get_image_name): Use SIZE_T type for local variable `done'.
17957 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
17958 (toolhelp_get_dll_name): Idem.
17959 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
17960 Use uintptr_t typecast to avoid warning.
17961 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
17962 (handle_exception): Use phex_nz to avoid warning.
17963 (win32_wait): Remove unused local variable `process'.
17964
17965 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
17966
17967 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
17968 `amd64-avx.o'.
17969
17970 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
17971
17972 * configure.ac: Use `ws2_32' library for srv_mingw.
17973 * configure: Regenerate.
17974 * gdbreplay.c: Include winsock2.h instead of winsock.h.
17975 * remote-utils.c: Likewise.
17976
17977 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
17978
17979 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
17980 if __x86_64__ is defined.
17981
17982 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17983
17984 * configure: Regenerate.
17985
17986 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
17987
17988 * server.c (handle_query): Handle 'qGetTIBAddr' query.
17989 * target.h (target_ops): New get_tib_address field.
17990 * win32-low.h (win32_thread_info): Add thread_local_base field.
17991 * win32-low.c (child_add_thread): Add tlb argument.
17992 Set thread_local_base field to TLB.
17993 (get_child_debug_event): Adapt to child_add_thread change.
17994 (win32_get_tib_address): New function.
17995 (win32_target_ops): Set get_tib_address field to
17996 win32_get_tib_address.
17997 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
17998
17999 2010-04-12 Pedro Alves <pedro@codesourcery.com>
18000
18001 * linux-low.c (linux_mourn): Also remove the process.
18002 * server.c (handle_target_event): Don't remove the process here.
18003 * nto-low.c (nto_mourn): New.
18004 (nto_target_ops): Install it.
18005 * spu-low.c (spu_mourn): New.
18006 (spu_target_ops): Install it.
18007 * win32-low.c (win32_mourn): New.
18008 (win32_target_ops): Install it.
18009
18010 2010-04-12 Pedro Alves <pedro@codesourcery.com>
18011
18012 * server.h (buffer_xml_printf): Remove redundant `;'.
18013
18014 2010-04-12 Pedro Alves <pedro@codesourcery.com>
18015
18016 * regcache.c (set_register_cache): Invalidate regcaches before
18017 changing the register cache layout.
18018 (regcache_invalidate_one): Allow a NULL regcache.
18019 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
18020 regcaches before changing the register cache layout or the target
18021 regsets.
18022
18023 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
18024
18025 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
18026 variable warning on Linux/x86-64.
18027
18028 2010-04-11 Pedro Alves <pedro@codesourcery.com>
18029
18030 GDBserver disconnected tracing support.
18031
18032 * linux-low.c (linux_remove_process): Delete.
18033 (add_lwp): Don't set last_resume_kind here.
18034 (linux_kill): Use `mourn'.
18035 (linux_detach): Use `thread_db_detach', and `mourn'.
18036 (linux_mourn): New.
18037 (linux_attach_lwp_1): Adjust comment.
18038 (linux_attach): last_resume_kind moved the thread_info; adjust.
18039 (status_pending_p_callback): Adjust.
18040 (linux_wait_for_event_1): Adjust.
18041 (count_events_callback, select_singlestep_lwp_callback)
18042 (select_event_lwp_callback, cancel_breakpoints_callback)
18043 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
18044 (proceed_one_lwp): Adjust.
18045 (linux_async): Add debug output.
18046 (linux_thread_stopped): New.
18047 (linux_pause_all): New.
18048 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
18049 linux_pause_all.
18050 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
18051 (thread_db_free): Delete declaration.
18052 (thread_db_detach, thread_db_mourn): Declare.
18053 * thread-db.c (thread_db_init): Use thread_db_mourn.
18054 (thread_db_free): Delete, split in two.
18055 (disable_thread_event_reporting): New.
18056 (thread_db_detach): New.
18057 (thread_db_mourn): New.
18058
18059 * server.h (struct thread_info) <last_resume_kind>: New field.
18060 <attached>: Add comment.
18061 <gdb_detached>: New field.
18062 (handler_func): Change return type to int.
18063 (handle_serial_event, handle_target_event): Ditto.
18064 (gdb_connected): Declare.
18065 (tracing): Delete.
18066 (disconnected_tracing): Declare.
18067 (stop_tracing): Declare.
18068
18069 * server.c (handle_query) <qSupported>: Report support for
18070 disconnected tracing.
18071 (queue_stop_reply_callback): Account for running threads.
18072 (gdb_wants_thread_stopped): New.
18073 (gdb_wants_all_threads_stopped): New.
18074 (gdb_reattached_process): New.
18075 (handle_status): Clear the `gdb_detached' flag of all processes.
18076 In all-stop, stop all threads.
18077 (main): Be sure to leave tfind mode. Handle disconnected tracing.
18078 (process_serial_event): If the remote connection breaks, or if an
18079 exit was forced with "monitor exit", force an event loop exit.
18080 Handle disconnected tracing on detach.
18081 (handle_serial_event): Adjust.
18082 (handle_target_event): If GDB isn't connected, forward events back
18083 to the inferior, unless the last process exited, in which case,
18084 exit gdbserver. Adjust interface.
18085
18086 * remote-utils.c (remote_open): Don't block in accept. Instead
18087 register an event loop source on the listen socket file
18088 descriptor. Refactor bits into ...
18089 (listen_desc): ... this new global.
18090 (gdb_connected): ... this new function.
18091 (enable_async_notification): ... this new function.
18092 (handle_accept_event): ... this new function.
18093 (remote_close): Clear remote_desc.
18094
18095 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
18096
18097 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
18098 New fields.
18099 (mourn_inferior): Define.
18100 (target_process_qsupported): Avoid the dangling else problem.
18101 (thread_stopped): Define.
18102 (pause_all): Define.
18103 (target_waitstatus_to_string): Declare.
18104 * target.c (target_waitstatus_to_string): New.
18105
18106 * tracepoint.c (tracing): Make extern.
18107 (disconnected_tracing): New.
18108 (stop_tracing): Make extern. Handle tracing stops due to GDB
18109 disconnecting.
18110 (cmd_qtdisconnected): New.
18111 (cmd_qtstatus): Report disconnected tracing status in trace reply.
18112 (handle_tracepoint_general_set): Handle QTDisconnected.
18113
18114 * event-loop.c (event_handler_func): Change return type to int.
18115 (process_event): Bail out if the event handler wants the event
18116 loop to stop.
18117 (handle_file_event): Ditto.
18118 (start_event_loop): Bail out if the event handler wants the event
18119 loop to stop.
18120
18121 * nto-low.c (nto_target_ops): Adjust.
18122 * spu-low.c (spu_wait): Don't remove the process here.
18123 (spu_target_ops): Adjust.
18124 * win32-low.c (win32_wait): Don't remove the process here.
18125 (win32_target_ops): Adjust.
18126
18127 2010-04-11 Pedro Alves <pedro@codesourcery.com>
18128
18129 * regcache.c (realloc_register_cache): Invalidate inferior's
18130 regcache before recreating it.
18131
18132 2010-04-09 Pedro Alves <pedro@codesourcery.com>
18133
18134 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
18135
18136 2010-04-09 Stan Shebs <stan@codesourcery.com>
18137 Pedro Alves <pedro@codesourcery.com>
18138
18139 * server.h (LONGEST): New.
18140 (struct thread_info) <while_stepping>: New field.
18141 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
18142 Declare.
18143 (initialize_tracepoint, handle_tracepoint_general_set)
18144 (handle_tracepoint_query, tracepoint_finished_step)
18145 (tracepoint_was_hit, release_while_stepping_state_list):
18146 (current_traceframe): Declare.
18147 * server.c (handle_general_set): Handle tracepoint packets.
18148 (read_memory): New.
18149 (write_memory): New.
18150 (handle_search_memory_1): Use read_memory.
18151 (handle_query): Report support for conditional tracepoints, trace
18152 state variables, and tracepoint sources. Handle tracepoint
18153 queries.
18154 (main): Initialize the tracepoints module.
18155 (process_serial_event): Handle traceframe reads/writes.
18156
18157 * linux-low.c (handle_tracepoints): New.
18158 (linux_wait_1): Call it.
18159 (linux_resume_one_lwp): Handle while-stepping.
18160 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
18161 (linux_target_ops): Install them.
18162 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
18163 New field.
18164 * linux-x86-low.c (x86_supports_tracepoints): New.
18165 (the_low_target). Install it.
18166
18167 * mem-break.h (delete_breakpoint): Declare.
18168 * mem-break.c (delete_breakpoint): Make external.
18169
18170 * target.h (struct target_ops): Add `supports_tracepoints',
18171 `read_pc', and `write_pc' fields.
18172 (target_supports_tracepoints): Define.
18173 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
18174 (phex_nz): New.
18175
18176 * regcache.h (struct regcache) <registers_owned>: New field.
18177 (init_register_cache, regcache_cpy): Declare.
18178 (regcache_read_pc, regcache_write_pc): Declare.
18179 (register_cache_size): Declare.
18180 (supply_regblock): Declare.
18181 * regcache.c (init_register_cache): New.
18182 (new_register_cache): Use it.
18183 (regcache_cpy): New.
18184 (register_cache_size): New.
18185 (supply_regblock): New.
18186 (regcache_read_pc, regcache_write_pc): New.
18187
18188 * tracepoint.c: New.
18189
18190 * Makefile.in (OBS): Add tracepoint.o.
18191 (tracepoint.o): New rule.
18192
18193 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
18194
18195 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
18196 (i386-mmx.o): New.
18197 (i386-mmx.c): Likewise.
18198 (i386-mmx-linux.o): Likewise.
18199 (i386-mmx-linux.c): Likewise.
18200
18201 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
18202 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
18203 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
18204 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
18205
18206 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
18207 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
18208 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
18209
18210 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
18211
18212 * Makefile.in (clean): Updated.
18213 (i386-avx.o): New.
18214 (i386-avx.c): Likewise.
18215 (i386-avx-linux.o): Likewise.
18216 (i386-avx-linux.c): Likewise.
18217 (amd64-avx.o): Likewise.
18218 (amd64-avx.c): Likewise.
18219 (amd64-avx-linux.o): Likewise.
18220 (amd64-avx-linux.c): Likewise.
18221
18222 * configure.srv (srv_i386_regobj): Add i386-avx.o.
18223 (srv_i386_linux_regobj): Add i386-avx-linux.o.
18224 (srv_amd64_regobj): Add amd64-avx.o.
18225 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
18226 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
18227 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
18228 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
18229 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
18230 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
18231 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
18232
18233 * i387-fp.c: Include "i386-xstate.h".
18234 (i387_xsave): New.
18235 (i387_cache_to_xsave): Likewise.
18236 (i387_xsave_to_cache): Likewise.
18237 (x86_xcr0): Likewise.
18238
18239 * i387-fp.h (i387_cache_to_xsave): Likewise.
18240 (i387_xsave_to_cache): Likewise.
18241 (x86_xcr0): Likewise.
18242
18243 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
18244 * linux-crisv32-low.c (target_regsets): Likewise.
18245 * linux-m68k-low.c (target_regsets): Likewise.
18246 * linux-mips-low.c (target_regsets): Likewise.
18247 * linux-ppc-low.c (target_regsets): Likewise.
18248 * linux-s390-low.c (target_regsets): Likewise.
18249 * linux-sh-low.c (target_regsets): Likewise.
18250 * linux-sparc-low.c (target_regsets): Likewise.
18251 * linux-xtensa-low.c (target_regsets): Likewise.
18252
18253 * linux-low.c: Include <sys/uio.h>.
18254 (regsets_fetch_inferior_registers): Support nt_type.
18255 (regsets_store_inferior_registers): Likewise.
18256 (linux_process_qsupported): New.
18257 (linux_target_ops): Add linux_process_qsupported.
18258
18259 * linux-low.h (regset_info): Add nt_type.
18260 (linux_target_ops): Add process_qsupported.
18261
18262 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
18263 and <sys/uio.h>.
18264 (init_registers_i386_avx_linux): New.
18265 (init_registers_amd64_avx_linux): Likewise.
18266 (xmltarget_i386_linux_no_xml): Likewise.
18267 (xmltarget_amd64_linux_no_xml): Likewise.
18268 (PTRACE_GETREGSET): Likewise.
18269 (PTRACE_SETREGSET): Likewise.
18270 (x86_fill_xstateregset): Likewise.
18271 (x86_store_xstateregset): Likewise.
18272 (use_xml): Likewise.
18273 (x86_linux_update_xmltarget): Likewise.
18274 (x86_linux_process_qsupported): Likewise.
18275 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
18276 (x86_arch_setup): Don't call init_registers_amd64_linux nor
18277 init_registers_i386_linux here. Call
18278 x86_linux_update_xmltarget.
18279 (the_low_target): Add x86_linux_process_qsupported.
18280
18281 * server.c (handle_query): Call target_process_qsupported.
18282
18283 * target.h (target_ops): Add process_qsupported.
18284 (target_process_qsupported): New.
18285
18286 2010-04-03 Pedro Alves <pedro@codesourcery.com>
18287
18288 * inferiors.c (add_thread): Set last_status kind to
18289 TARGET_WAITKIND_IGNORE.
18290 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
18291 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
18292 (linux_wait_1): Move `thread' local definition to block that uses
18293 it. Don't NULL initialize `event_child'.
18294 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
18295 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
18296 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
18297
18298 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18299
18300 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
18301 an extended waitstatus, or by a watchpoint.
18302 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
18303 thread was stepping or has been stopped by a watchpoint.
18304
18305 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18306
18307 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
18308 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
18309 of another, then delete the previous, and validate all
18310 breakpoints.
18311 (validate_inserted_breakpoint): New.
18312 (delete_disabled_breakpoints): New.
18313 (validate_breakpoints): New.
18314 (check_mem_read): Validate breakpoints before trusting their
18315 shadow. Delete disabled breakpoints.
18316 (check_mem_write): Validate breakpoints before trusting they
18317 should be inserted. Delete disabled breakpoints.
18318 * mem-break.h (validate_breakpoints):
18319 * server.c (handle_query): Validate breakpoints when we see a
18320 qSymbol query.
18321
18322 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18323
18324 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
18325 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
18326 if we could tell there's a GDB breakpoint at stop_pc.
18327 (need_step_over_p): Don't do a step over if we find a GDB
18328 breakpoint at the resume PC.
18329
18330 * mem-break.c (struct raw_breakpoint): New.
18331 (enum bkpt_type): New type `gdb_breakpoint'.
18332 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
18333 fields. New field `raw'.
18334 (find_raw_breakpoint_at): New.
18335 (set_raw_breakpoint_at): Handle refcounting. Create a raw
18336 breakpoint instead.
18337 (set_breakpoint_at): Adjust.
18338 (delete_raw_breakpoint): New.
18339 (release_breakpoint): New.
18340 (delete_breakpoint): Rename to...
18341 (delete_breakpoint_1): ... this. Add proc parameter. Use
18342 release_breakpoint. Return ENOENT.
18343 (delete_breakpoint): Reimplement.
18344 (find_breakpoint_at): Delete.
18345 (find_gdb_breakpoint_at): New.
18346 (delete_breakpoint_at): Delete.
18347 (set_gdb_breakpoint_at): New.
18348 (delete_gdb_breakpoint_at): New.
18349 (gdb_breakpoint_here): New.
18350 (set_reinsert_breakpoint): Use release_breakpoint.
18351 (uninsert_breakpoint): Rename to ...
18352 (uninsert_raw_breakpoint): ... this.
18353 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
18354 (reinsert_raw_breakpoint): Change parameter type to
18355 raw_breakpoint.
18356 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
18357 instead.
18358 (check_breakpoints): Adjust. Use release_breakpoint.
18359 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
18360 (breakpoint_inserted_here): Ditto.
18361 (check_mem_read): Adjust to iterate over raw breakpoints instead.
18362 Don't trust the breakpoint's shadow if it is not inserted.
18363 (check_mem_write): Adjust to iterate over raw breakpoints instead.
18364 (delete_all_breakpoints): Adjust.
18365 (free_all_breakpoints): Mark all breakpoints as uninserted, and
18366 use delete_breakpoint_1.
18367
18368 * mem-break.h (breakpoints_supported): Delete declaration.
18369 (set_gdb_breakpoint_at): Declare.
18370 (gdb_breakpoint_here): Declare.
18371 (delete_breakpoint_at): Delete.
18372 (delete_gdb_breakpoint_at): Declare.
18373
18374 * server.h (struct raw_breakpoint): Forward declare.
18375 (struct process_info): New field `raw_breakpoints'.
18376
18377 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
18378 breakpoints.
18379
18380 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18381
18382 * linux-low.c (status_pending_p_callback): Fix comment.
18383 (linux_wait_for_event_1): Move most of the internal breakpoint
18384 handling from here...
18385 (linux_wait_1): ... to here.
18386 (count_events_callback): New.
18387 (select_singlestep_lwp_callback): New.
18388 (select_event_lwp_callback): New.
18389 (cancel_breakpoints_callback): New.
18390 (select_event_lwp): New.
18391 (linux_wait_1): Simplify internal breakpoint handling. Give equal
18392 priority to all LWPs that have had events that should be reported
18393 to the client. Cancel breakpoints when about to reporting the
18394 event to the client, not while stopping lwps. No longer cancel
18395 finished single-steps here.
18396 (cancel_finished_single_step): Delete.
18397 (cancel_finished_single_steps): Delete.
18398
18399 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18400
18401 * mem-break.c (enum bkpt_type): New.
18402 (struct breakpoint): New field `type'.
18403 (set_breakpoint_at): Change return type to struct breakpoint
18404 pointer. Set type to `other_breakpoint' by default.
18405 (delete_breakpoint): Rewrite, supporting more than one breakpoint
18406 in the breakpoint list.
18407 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
18408 (reinsert_breakpoint): Rename to ...
18409 (reinsert_raw_breakpoint): ... this.
18410 (reinsert_breakpoints_at): Adjust.
18411 * mem-break.h (struct breakpoint): Declare.
18412 (set_breakpoint_at): Change return type to struct breakpoint
18413 pointer.
18414
18415 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18416
18417 * server.c (handle_query): Assign, not compare.
18418
18419 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18420
18421 Teach linux gdbserver to step-over-breakpoints.
18422
18423 * linux-low.c (can_hardware_single_step): New.
18424 (supports_breakpoints): New.
18425 (handle_extended_wait): If stopping threads, read the stop pc of
18426 the new cloned LWP.
18427 (get_pc): New.
18428 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
18429 low target doesn't support retrieving the PC.
18430 (add_lwp): Set last_resume_kind to resume_continue.
18431 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
18432 (linux_attach): Don't clear stop_expected. Set the lwp's
18433 last_resume_kind to resume_stop.
18434 (linux_detach_one_lwp): Don't check for removed breakpoints.
18435 (check_removed_breakpoint): Delete.
18436 (status_pending_p): Rename to ...
18437 (status_pending_p_callback): ... this. Don't check for removed
18438 breakpoints. Don't consider threads that are stopped from GDB's
18439 perspective.
18440 (linux_wait_for_lwp): Always read the stop_pc here.
18441 (cancel_breakpoint): New.
18442 (step_over_bkpt): New global.
18443 (linux_wait_for_event_1): Implement stepping over breakpoints.
18444 (gdb_wants_lwp_stopped): New.
18445 (gdb_wants_all_stopped): New.
18446 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
18447 single-step traps here. Store the thread's last reported target
18448 wait status.
18449 (send_sigstop): Don't clear stop_expected. Always set it,
18450 instead.
18451 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
18452 (cancel_finished_single_step): New.
18453 (cancel_finished_single_steps): New.
18454 (wait_for_sigstop): Don't cancel finished single-step traps here.
18455 (linux_resume_one_lwp): Don't check for removed breakpoints.
18456 Don't set `step' on non-hardware step archs.
18457 (linux_set_resume_request): Ignore resume_stop requests if already
18458 stopping or stopped. Set the lwp's last_resume_kind.
18459 (resume_status_pending_p): Don't check for removed breakpoints.
18460 (need_step_over_p): New.
18461 (start_step_over): New.
18462 (finish_step_over): New.
18463 (linux_resume_one_thread): Always queue a sigstop for resume_stop
18464 requests. Clear the thread's last reported target waitstatus.
18465 Don't use the `suspended' flag. Don't consider pending breakpoints.
18466 (linux_resume): Start a step-over if necessary.
18467 (proceed_one_lwp): New.
18468 (proceed_all_lwps): New.
18469 (unstop_all_lwps): New.
18470 * linux-low.h (struct lwp_info): Rewrite comment for the
18471 `suspended' flag. Add the `stop_pc' field. Delete the
18472 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
18473 Add `'last_resume_kind' and `need_step_over' fields.
18474 * inferiors.c (struct thread_info): Delete, moved elsewhere.
18475 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
18476 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
18477 (set_raw_breakpoint_at): New.
18478 (set_breakpoint_at): Rewrite to use it.
18479 (reinsert_breakpoint_handler): Delete.
18480 (set_reinsert_breakpoint): New.
18481 (reinsert_breakpoint_by_bp): Delete.
18482 (delete_reinsert_breakpoints): New.
18483 (uninsert_breakpoint): Rewrite.
18484 (uninsert_breakpoints_at): New.
18485 (reinsert_breakpoint): Rewrite.
18486 (reinsert_breakpoints_at): New.
18487 (check_breakpoints): Rewrite.
18488 (breakpoint_here): New.
18489 (breakpoint_inserted_here): New.
18490 (check_mem_read): Adjust.
18491 * mem-break.h (breakpoints_supported, breakpoint_here)
18492 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
18493 (reinsert_breakpoint_by_bp): Delete declaration.
18494 (delete_reinsert_breakpoints): Declare.
18495 (reinsert_breakpoint): Delete declaration.
18496 (reinsert_breakpoints_at): Declare.
18497 (uninsert_breakpoint): Delete declaration.
18498 (uninsert_breakpoints_at): Declare.
18499 (check_breakpoints): Adjust prototype.
18500 * server.h: Adjust include order.
18501 (struct thread_info): Declare here. Add a `last_status' field.
18502
18503 2010-03-23 Michael Snyder <msnyder@vmware.com>
18504
18505 * server.c (crc32): New function.
18506 (handle_query): Add handling for 'qCRC:' request.
18507
18508 2010-03-23 Pedro Alves <pedro@codesourcery.com>
18509
18510 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
18511 lwp had been stopped by a watchpoint.
18512
18513 2010-03-16 Pedro Alves <pedro@codesourcery.com>
18514
18515 * server.h (internal_error): Declare.
18516 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
18517 * utils.c (internal_error): New function.
18518
18519 2010-03-15 Andreas Schwab <schwab@redhat.com>
18520
18521 * configure.srv: Fix typo setting srv_regobj.
18522
18523 2010-03-15 Pedro Alves <pedro@codesourcery.com>
18524
18525 * linux-low.c (fetch_register): Avoid passing a non string literal
18526 format to `error'.
18527 (usr_store_inferior_registers): Ditto.
18528
18529 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18530
18531 * linux-low.c (linux_write_memory): Bail out early if peeking
18532 memory failed.
18533
18534 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18535
18536 * linux-low.h (struct lwp_info): New fields
18537 `stopped_by_watchpoint' and `stopped_data_address'.
18538 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
18539 here, and cache them in the lwp object.
18540 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
18541 directly.
18542 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
18543 field.
18544 (linux_stopped_by_watchpoint): Rewrite.
18545 (linux_stopped_data_address): Rewrite.
18546
18547 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
18548
18549 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
18550 switching the current inferior, not before.
18551
18552 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
18553
18554 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
18555 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
18556 i386-linux.c and amd64-linux.c.
18557 (reg-i386.o): Removed.
18558 (reg-i386.c): Likewise.
18559 (reg-i386-linux.o): Likewise.
18560 (reg-i386-linux.c): Likewise.
18561 (reg-x86-64.o): Likewise.
18562 (reg-x86-64.c): Likewise.
18563 (reg-x86-64-linux.o): Likewise.
18564 (reg-x86-64-linux.c): Likewise.
18565 (i386.o): New.
18566 (i386.c): Likewise.
18567 (i386-linux.o): Likewise.
18568 (i386-linux.c): Likewise.
18569 (amd64.o): Likewise.
18570 (amd64.c): Likewise.
18571 (amd64-linux.o): Likewise.
18572 (amd64-linux.c): Likewise.
18573
18574 * configure.srv (srv_i386_regobj): New.
18575 (srv_i386_linux_regobj): Likewise.
18576 (srv_amd64_regobj): Likewise.
18577 (srv_amd64_linux_regobj): Likewise.
18578 (srv_i386_32bit_xmlfiles): Likewise.
18579 (srv_i386_64bit_xmlfiles): Likewise.
18580 (srv_i386_xmlfiles): Likewise.
18581 (srv_amd64_xmlfiles): Likewise.
18582 (srv_i386_linux_xmlfiles): Likewise.
18583 (srv_amd64_linux_xmlfiles): Likewise.
18584 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
18585 srv_xmlfiles to $srv_i386_xmlfiles.
18586 (i[34567]86-*-mingw32ce*): Likewise.
18587 (i[34567]86-*-mingw*): Likewise.
18588 (i[34567]86-*-nto*): Likewise.
18589 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
18590 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
18591 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
18592 (x86_64-*-linux*): Likewise.
18593
18594 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
18595 (init_registers_amd64_linux): New.
18596 (x86_arch_setup): Replace init_registers_x86_64_linux with
18597 init_registers_amd64_linux.
18598
18599 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
18600
18601 * configure.ac: Check for libdl. If it is not available link against
18602 static libthread_db.
18603 * configure: Regenerate.
18604
18605 2010-02-22 Pedro Alves <pedro@codesourcery.com>
18606
18607 PR9605
18608
18609 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
18610 handing a read watchpoint.
18611 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
18612
18613 2010-02-12 Doug Evans <dje@google.com>
18614
18615 * linux-low.c (linux_supports_tracefork_flag): Document.
18616 (linux_look_up_symbols): Add comment.
18617
18618 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
18619
18620 * regcache.c (supply_register): Clear regcache if buf is NULL.
18621
18622 2010-02-02 Nicolas Roche <roche@sourceware.org>
18623 Joel Brobecker <brobecker@adacore.com>
18624
18625 * inferiors.c (find_inferior): Add function documentation.
18626 (unloaded_dll): Handle the case where the unloaded dll has not
18627 been previously registered in the dll list.
18628
18629 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18630
18631 * linux-arm-low.c (thumb_breakpoint_len): Delete.
18632 (thumb2_breakpoint): New.
18633 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
18634
18635 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18636
18637 * linux-low.c (get_stop_pc): Check for SIGTRAP.
18638 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
18639 breakpoints.
18640
18641 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18642
18643 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
18644
18645 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
18646
18647 * linux-s390-low.c (s390_collect_ptrace_register)
18648 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
18649
18650 2010-01-21 Doug Evans <dje@google.com>
18651
18652 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
18653 (PTRACE_ARG4_TYPE): New macro.
18654 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
18655 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
18656 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
18657 (usr_store_inferior_registers): Ditto.
18658 (linux_read_memory, linux_write_memory): Ditto.
18659 (linux_test_for_tracefork): Ditto.
18660
18661 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
18662 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
18663
18664 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18665
18666 * proc-service.c (ps_lgetregs): Don't refetch registers from the
18667 target.
18668
18669 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18670
18671 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
18672 prototype to take a regcache. Adjust.
18673
18674 2010-01-20 Pedro Alves <pedro@codesourcery.com>
18675
18676 * regcache.h (struct thread_info): Forward declare.
18677 (struct regcache): New.
18678 (new_register_cache): Adjust prototype.
18679 (get_thread_regcache): Declare.
18680 (free_register_cache): Adjust prototype.
18681 (registers_to_string, registers_from_string): Ditto.
18682 (supply_register, supply_register_by_name, collect_register)
18683 (collect_register_as_string, collect_register_by_name): Ditto.
18684 * regcache.c (struct inferior_regcache_data): Delete.
18685 (get_regcache): Rename to ...
18686 (get_thread_regcache): ... this. Adjust. Switch inferior before
18687 fetching registers.
18688 (regcache_invalidate_one): Adjust.
18689 (regcache_invalidate): Fix prototype.
18690 (new_register_cache): Return the new register cache.
18691 (free_register_cache): Change prototype.
18692 (realloc_register_cache): Adjust.
18693 (registers_to_string): Change prototype to take a regcache. Adjust.
18694 (registers_from_string): Ditto.
18695 (register_data): Ditto.
18696 (supply_register): Ditto.
18697 (supply_register_by_name): Ditto.
18698 (collect_register): Ditto.
18699 (collect_register_as_string): Ditto.
18700 (collect_register_by_name): Ditto.
18701 * server.c (process_serial_event): Adjust.
18702 * linux-low.h (regset_fill_func, regset_store_func): Change
18703 prototype.
18704 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
18705 Change prototype.
18706 * linux-low.c (get_stop_pc): Adjust.
18707 (check_removed_breakpoint): Adjust.
18708 (linux_wait_for_event): Adjust.
18709 (linux_resume_one_lwp): Adjust.
18710 (fetch_register): Add regcache parameter. Adjust.
18711 (usr_store_inferior_registers): Ditto.
18712 (regsets_fetch_inferior_registers): Ditto.
18713 (regsets_store_inferior_registers): Ditto.
18714 (linux_fetch_registers, linux_store_registers): Ditto.
18715 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
18716 regcache. Adjust.
18717 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
18718 Ditto.
18719 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
18720 prototype to take a regcache.
18721 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
18722 * remote-utils.c (convert_ascii_to_int, outreg)
18723 (prepare_resume_reply): Change prototype to take a regcache.
18724 Adjust.
18725 * target.h (struct target_ops) <fetch_registers, store_registers>:
18726 Change prototype to take a regcache.
18727 (fetch_inferior_registers, store_inferior_registers): Change
18728 prototype to take a regcache. Adjust.
18729 * proc-service.c (ps_lgetregs): Adjust.
18730 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
18731 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
18732 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
18733 take a regcache. Adjust.
18734 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
18735 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
18736 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
18737 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
18738 * linux-cris-low.c (cris_get_pc, cris_set_pc)
18739 (cris_cannot_fetch_register):
18740 (cris_breakpoint_at): Change prototype to take a regcache.
18741 Adjust.
18742 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
18743 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
18744 to take a regcache. Adjust.
18745 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
18746 Adjust.
18747 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
18748 take a regcache. Adjust.
18749 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
18750 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
18751 (m68k_set_pc): Change prototype to take a regcache. Adjust.
18752 * linux-mips-low.c (mips_get_pc):
18753 (mips_set_pc): Change prototype to take a regcache. Adjust.
18754 (mips_reinsert_addr): Adjust.
18755 (mips_collect_register): Change prototype to take a regcache.
18756 Adjust.
18757 (mips_supply_register):
18758 (mips_collect_register_32bit, mips_supply_register_32bit)
18759 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18760 (mips_store_fpregset): Ditto.
18761 * linux-ppc-low.c (ppc_supply_ptrace_register)
18762 (ppc_supply_ptrace_register): Ditto.
18763 (parse_spufs_run): Adjust.
18764 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
18765 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
18766 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
18767 take a regcache. Adjust.
18768 * linux-s390-low.c (s390_collect_ptrace_register)
18769 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
18770 (s390_set_pc): Change prototype to take a regcache. Adjust.
18771 (s390_arch_setup): Adjust.
18772 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
18773 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
18774 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
18775 (sparc_fill_gregset, sparc_store_gregset_from_stack)
18776 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
18777 regcache. Adjust.
18778 (sparc_breakpoint_at): Adjust.
18779 * linux-xtensa-low.c (xtensa_fill_gregset):
18780 (xtensa_store_gregset):
18781 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
18782 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
18783 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
18784 prototype to take a regcache. Adjust.
18785 * win32-arm-low.c (arm_fetch_inferior_register)
18786 (arm_store_inferior_register): Change prototype to take a
18787 regcache. Adjust.
18788 * win32-i386-low.c (i386_fetch_inferior_register)
18789 (i386_store_inferior_register): Change prototype to take a
18790 regcache. Adjust.
18791 * win32-low.c (child_fetch_inferior_registers)
18792 (child_store_inferior_registers): Change prototype to take a
18793 regcache. Adjust.
18794 (win32_wait): Adjust.
18795 (win32_fetch_inferior_registers): Change prototype to take a
18796 regcache. Adjust.
18797 (win32_store_inferior_registers): Adjust.
18798 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
18799 store_inferior_register>: Change prototype to take a regcache.
18800
18801 2010-01-20 Doug Evans <dje@google.com>
18802
18803 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
18804 #ifdef.
18805 (linux_wait_for_event1, linux_init_signals): Ditto.
18806 (W_STOPCODE): Provide definition if missing.
18807
18808 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
18809
18810 * linux-low.c (linux_core_of_thread): New.
18811 (compare_ints, show_process, list_threads): New.
18812 (linux_qxfer_osdata): Report threads and cores.
18813 (linux_target_op): Register linux_core_of_thread.
18814 * remote-utils.c (prepare_resume_reply): Report the core.
18815 (buffer_xml_printf): Support %d specifier.
18816 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
18817 New.
18818 (handle_query): Handle qXfer:threads. Announce availability
18819 thereof.
18820 * target.h (struct target_ops): New field core_of_thread.
18821
18822 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
18823
18824 * Makefile.in (clean): Remove new generated files.
18825 (reg-s390.o, reg-s390.c): Remove rules.
18826 (reg-s390x.o, reg-s390x.c): Likewise.
18827 (s390-linux32.o, s390-linux32.c): Add rules.
18828 (s390-linux64.o, s390-linux64.c): Likewise.
18829 (s390x-linux64.o, s390x-linux64.c): Likewise.
18830 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
18831 * linux-s390-low.c: Include <elf.h>.
18832 (HWCAP_S390_HIGH_GPRS): Define if undefined.
18833 (init_registers_s390): Remove prototype.
18834 (init_registers_s390x): Likewise.
18835 (init_registers_s390_linux32): Add prototype.
18836 (init_registers_s390_linux64): Likewise.
18837 (init_registers_s390x_linux64): Likewise.
18838 (s390_num_regs_3264): New define.
18839 (s390_regmap_3264): New global variable.
18840 (s390_cannot_fetch_register): Remove obsolete check.
18841 (s390_cannot_store_register): Likewise.
18842 (s390_collect_ptrace_register): Handle upper/lower register halves.
18843 (s390_supply_ptrace_register): Likewise.
18844 (s390_fill_gregset): Update to register number changes.
18845 (s390_get_hwcap): New routine.
18846 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
18847 Install appropriate regmap and register set.
18848
18849 2010-01-01 Joel Brobecker <brobecker@adacore.com>
18850
18851 * server.c (gdbserver_version): Update copyright year to 2010.
18852 * gdbreplay.c (gdbreplay_version): Likewise.
18853
18854 2009-12-28 Doug Evans <dje@google.com>
18855
18856 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
18857 elf/external.h. Include <elf.h> instead but only if necessary.
18858
18859 2009-12-28 Pedro Alves <pedro@codesourcery.com>
18860
18861 * linux-low.c (linux_remove_process): Remove `detaching'
18862 parameter. Don't release/detach from thread_db here.
18863 (linux_kill): Release/detach from thread_db here, ...
18864 (linux_detach): ... and here, before actually detaching.
18865 (linux_wait_1): ... and here, when a process exits.
18866 * thread-db.c (any_thread_of): New.
18867 (thread_db_free): Switch the current inferior to a thread of the
18868 passed in process.
18869
18870 2009-12-21 Doug Evans <dje@google.com>
18871
18872 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
18873
18874 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
18875 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
18876 warning ifndef __NR_tkill. Move setting of errno there too.
18877 Delete unnecessary resetting of errno after syscall.
18878 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
18879
18880 * configure.ac: Check for dladdr.
18881 * config.in: Regenerate.
18882 * configure: Regenerate.
18883 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
18884 (try_thread_db_load): Update.
18885
18886 * linux-low.c (my_waitpid): Delete unnecessary prototype.
18887
18888 2009-12-18 Doug Evans <dje@google.com>
18889
18890 * event-loop.c: Include unistd.h if it exists.
18891
18892 * linux-low.c (my_waitpid): Move definition away from being in
18893 between linux_tracefork_child/linux_test_for_tracefork.
18894
18895 * gdb_proc_service.h (psaddr_t): Fix type.
18896 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
18897 signature to match glibc.
18898
18899 2009-12-16 Doug Evans <dje@google.com>
18900
18901 * linux-low.c (linux_read_memory): Fix argument to read.
18902
18903 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18904
18905 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
18906 events, don't leave current_inferior pointing at null.
18907
18908 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18909
18910 * win32-low.c (LOG): Delete.
18911 (OUTMSG): Output to stderr.
18912 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
18913 on compile time LOG macro.
18914 (win32_wait): Fix debug output.
18915
18916 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18917
18918 * win32-low.c (win32_add_one_solib): If the dll name is
18919 "ntdll.dll", prepend the system directory to the dll path.
18920
18921 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
18922
18923 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
18924
18925 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
18926 Vladimir Prus <vladimir@codesourcery.com>
18927
18928 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
18929 * configure.ac: Check for __mcoldfire__ and set
18930 gdb_cv_m68k_is_coldfire.
18931 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
18932 reg-cf.o and reg-m68k.o.
18933 * configure: Regenerated.
18934
18935 2009-11-16 Pedro Alves <pedro@codesourcery.com>
18936
18937 * linux-low.c (linux_remove_process): Add `detaching' parameter.
18938 Pass it to thread_db_free.
18939 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
18940 proper `detaching' argument to linux_remove_process.
18941 * linux-low.h (thread_db_free): Add `detaching' parameter.
18942 * thread-db.c (thread_db_init): Pass false as `detaching' argument
18943 to thread_db_free.
18944 (thread_db_free): Add `detaching' parameter. Only
18945 call td_ta_clear_event if detaching from process.
18946
18947 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
18948
18949 * thread-db.c (thread_db_free): Fix typo.
18950
18951 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
18952
18953 PR gdb/10838
18954 * thread-db.c (thread_db_free): Call td_ta_clear_event.
18955
18956 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
18957
18958 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
18959 with an i686 compiler.
18960 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
18961 needed.
18962 * configure: Rebuilt.
18963
18964 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
18965
18966 PR gdb/10783
18967
18968 * server.c (handle_search_memory_1): Correct read_addr initialization
18969 in loop for searching subsequent chunks.
18970
18971 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
18972
18973 * configure.ac: New --with-libthread-db option.
18974 * thread-db.c: Allow direct dependence on libthread_db.
18975 (thread_db_free): Adjust.
18976 * config.in: Regenerate.
18977 * configure: Likewise.
18978
18979 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
18980
18981 PR gdb/10757
18982 * thread-db.c (attach_thread): New function.
18983 (maybe_attach_thread): Return success/failure.
18984 (find_new_threads_callback): Adjust.
18985 (thread_db_find_new_threads): Loop until no new threads.
18986
18987 2009-10-13 Pedro Alves <pedro@codesourcery.com>
18988
18989 * proc-service.c (ps_lgetregs): Formatting.
18990
18991 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
18992
18993 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
18994 * configure.ac: Adjust.
18995 * linux-low.h (struct process_info_private): Move members to struct
18996 thread_db.
18997 (thread_db_free, thread_db_handle_monitor_command): New prototype.
18998 * linux-low.c (linux_remove_process): Adjust.
18999 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
19000 * server.c (handle_query): Move code ...
19001 (handle_monitor_command): ... here. New function.
19002 * target.h (struct target_ops): New member.
19003 * thread-db.c (struct thread_db): New.
19004 (libthread_db_search_path): New variable.
19005 (thread_db_create_event, thread_db_enable_reporting)
19006 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
19007 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
19008 (try_thread_db_load_1, dladdr_to_soname): New functions.
19009 (try_thread_db_load, thread_db_load_search): New functions.
19010 (thread_db_init): Search for libthread_db.
19011 (thread_db_free): New function.
19012 (thread_db_handle_monitor_command): Likewise.
19013 * config.in: Regenerate.
19014 * configure: Regenerate.
19015
19016 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
19017
19018 * spu-low.c (spu_kill): Wait for inferior to terminate.
19019 Call clear_inferiors.
19020 (spu_detach): Call clear_inferiors.
19021
19022 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19023
19024 * aclocal.m4: Regenerate.
19025 * config.in: Likewise.
19026 * configure: Likewise.
19027
19028 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
19029
19030 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
19031 (parse_spufs_run): New function.
19032 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
19033 (ppc_breakpoint_at): Handle SPU breakpoints.
19034
19035 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
19036
19037 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
19038 (SPUFS_MAGIC): Define.
19039 (spu_enumerate_spu_ids): New function.
19040 (linux_qxfer_spu): New function.
19041 (linux_target_ops): Install linux_qxfer_spu.
19042
19043 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
19044
19045 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
19046 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
19047 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
19048 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
19049 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
19050 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
19051 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
19052 (init_registers_powerpc_cell32l): Add prototype.
19053 (init_registers_powerpc_cell64l): Likewise.
19054 (ppc_arch_setup): Detect Cell/B.E. architecture.
19055
19056 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19057
19058 * Makefile.in (datarootdir): New variable.
19059
19060 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
19061
19062 * linux-low.c (linux_write_memory): Update debugging output.
19063 * Makefile.in (clean): Add new descriptions.
19064 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
19065 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
19066 * configure.srv: Add new files for arm*-*-linux*.
19067 * linux-arm-low.c: Add new declarations.
19068 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
19069 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
19070 (HWCAP_VFPv3D16): New.
19071 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
19072 instead of __IWMMXT__.
19073 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
19074 (arm_arch_setup): New.
19075 (target_regsets): Remove #ifdef. Add VFP regset.
19076 (the_low_target): Use arm_arch_setup.
19077
19078 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
19079
19080 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
19081 the main thread again.
19082
19083 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
19084
19085 Adding Neutrino gdbserver.
19086 * configure: Regenerated.
19087 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
19088 * configure.srv (i[34567]86-*-nto*): New target.
19089 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
19090 * remote-utils.c [__QNX__]: Include sys/iomgr.h
19091 (nto_comctrl) [__QNX__]: New function.
19092 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
19093
19094 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
19095
19096 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
19097 srv_tgtobj.
19098
19099 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
19100 Pedro Alves <pedro@codesourcery.com>
19101
19102 * win32-i386-low.c (i386_get_thread_context): Handle systems that
19103 don't support CONTEXT_EXTENDED_REGISTERS.
19104 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
19105 (the_low_target): Install them.
19106 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
19107 failing with ERROR_PIPE_NOT_CONNECTED.
19108
19109 2009-06-30 Doug Evans <dje@google.com>
19110 Pierre Muller <muller@ics.u-strasbg.fr>
19111
19112 Add h/w watchpoint support to x86-linux, win32-i386.
19113 * Makefile.in (SFILES): Add i386-low.c
19114 (i386_low_h): Define.
19115 (i386-low.o): Add dependencies.
19116 (linux-x86-low.o): Add i386-low.h dependency.
19117 (win32-i386-low.o): Ditto.
19118 * i386-low.c: New file.
19119 * i386-low.h: New file.
19120 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
19121 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
19122 * linux-low.c (linux_add_process): Initialize arch_private.
19123 (linux_remove_process): Free arch_private.
19124 (add_lwp): Initialize arch_private.
19125 (delete_lwp): Free arch_private.
19126 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
19127 provided.
19128 * linux-low.h (process_info_private): New member arch_private.
19129 (lwp_info): New member arch_private.
19130 (linux_target_ops): New members new_process, new_thread,
19131 prepare_to_resume.
19132 (ptid_of): New macro.
19133 * linux-x86-low.c: Include stddef.h, i386-low.h.
19134 (arch_process_info): New struct.
19135 (arch_lwp_info): New struct.
19136 (x86_linux_dr_get, x86_linux_dr_set): New functions.
19137 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
19138 (i386_dr_low_get_status): New function.
19139 (x86_insert_point, x86_remove_point): New functions.
19140 (x86_stopped_by_watchpoint): New function.
19141 (x86_stopped_data_address): New function.
19142 (x86_linux_new_process, x86_linux_new_thread): New functions.
19143 (x86_linux_prepare_to_resume): New function.
19144 (the_low_target): Add entries for insert_point, remove_point,
19145 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
19146 prepare_to_resume.
19147 * server.c (debug_hw_points): New global.
19148 (monitor_show_help): Document set debug-hw-points.
19149 (handle_query): Process "set debug-hw-points".
19150 * server.h (debug_hw_points): Declare.
19151 (paddress): Declare.
19152 * utils.c (NUMCELLS, CELLSIZE): New macros.
19153 (get_sell, xsnprintf, paddress): New functions.
19154 * win32-arm-low.c (the_low_target): Add entries for insert_point,
19155 remove_point, stopped_by_watchpoint, stopped_data_address.
19156 * win32-i386-low.c: Include i386-low.h.
19157 (debug_reg_state): Replaces dr.
19158 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
19159 (i386_dr_low_get_status): New function.
19160 (i386_insert_point, i386_remove_point): New functions.
19161 (i386_stopped_by_watchpoint): New function.
19162 (i386_stopped_data_address): New function.
19163 (i386_initial_stuff): Update.
19164 (get_thread_context,set_thread_context,i386_thread_added): Update.
19165 (the_low_target): Add entries for insert_point,
19166 remove_point, stopped_by_watchpoint, stopped_data_address.
19167 * win32-low.c (win32_insert_watchpoint): New function.
19168 (win32_remove_watchpoint): New function.
19169 (win32_stopped_by_watchpoint): New function.
19170 (win32_stopped_data_address): New function.
19171 (win32_target_ops): Add entries for insert_watchpoint,
19172 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
19173 * win32-low.h (win32_target_ops): New members insert_point,
19174 remove_point, stopped_by_watchpoint, stopped_data_address.
19175
19176 2009-06-25 Pedro Alves <pedro@codesourcery.com>
19177
19178 * server.c (process_serial_event): Re-return unsupported, not
19179 error, if the type isn't recognized. Re-allow supporting only
19180 insert or remove packets. Also call require_running for
19181 breakpoints. Add missing break statement to default case. Tidy.
19182 * target.h (struct target_ops): Rename insert_watchpoint to
19183 insert_point, and remove_watchpoint to remove_point.
19184
19185 * linux-low.h (struct linux_target_ops): Likewise.
19186 * linux-low.c (linux_insert_watchpoint): Rename to ...
19187 (linux_insert_point): ... this. Adjust.
19188 (linux_remove_watchpoint): Rename to ...
19189 (linux_remove_point): ... this. Adjust.
19190 (linux_target_ops): Adjust.
19191 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
19192 (cris_insert_point): ... this.
19193 (cris_remove_watchpoint): Rename to ...
19194 (cris_remove_point): ... this.
19195 (the_low_target): Adjust.
19196
19197 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
19198
19199 * server.c (handle_v_kill): Pass signal_pid to
19200 kill_inferior if multi_process is zero.
19201
19202 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
19203
19204 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
19205 * target.h (target_ops): Comment for *_watchpoint to make it clear
19206 the functions can get types '0' and '1'.
19207
19208 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
19209
19210 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
19211 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
19212 * regcache.c (get_regcache): Likewise.
19213 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
19214 * win32-low.c (child_fetch_inferior_registers): Remove check for
19215 regno 0.
19216
19217 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
19218 Pedro Alves <pedro@codesourcery.com>
19219
19220 * target.h (struct target_ops) <supports_multi_process>: New
19221 callback.
19222 (target_supports_multi_process): New.
19223 * server.c (handle_query): Even if GDB reports support, only
19224 enable multi-process if the target also supports it. Report
19225 multi-process support only if the target backend supports it.
19226 * linux-low.c (linux_supports_multi_process): New function.
19227 (linux_target_ops): Install it as target_supports_multi_process
19228 callback.
19229
19230 2009-05-24 Doug Evans <dje@google.com>
19231
19232 Global renaming of find_thread_pid to find_thread_ptid.
19233 * server.h (find_thread_ptid): Renamed from find_thread_pid.
19234 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
19235 All callers updated.
19236
19237 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
19238 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
19239 directly.
19240
19241 * linux-low.c (get_stop_pc): Print pc if debug_threads.
19242 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
19243 (linux_resume_one_lwp): Ditto.
19244
19245 2009-05-23 Doug Evans <dje@google.com>
19246
19247 * linux-low.c (linux_resume_one_lwp): Change type of first arg
19248 from struct inferior_list_entry * to struct lwp_info *.
19249 All callers updated.
19250
19251 2009-05-13 Doug Evans <dje@google.com>
19252
19253 * linux-x86-low.c: Don't include assert.h.
19254 (x86_siginfo_fixup): Use fatal, not assert.
19255 (x86_arch_setup): Fix comment.
19256
19257 2009-05-12 Doug Evans <dje@google.com>
19258
19259 Biarch support for i386/amd64 gdbserver.
19260 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
19261 Add linux-x86-low.c.
19262 (linux-i386-low.o, linux-x86-64-low.o): Delete.
19263 (linux-x86-low.o): Add.
19264 * linux-x86-64-low.c: Delete.
19265 * linux-i386-low.c: Delete.
19266 * linux-x86-low.c: New file.
19267 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
19268 linux-x86-low.o.
19269 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
19270 linux-x86-low.o.
19271 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
19272 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
19273 (linux_child_pid_to_exec_file): New function.
19274 (elf_64_header_p, elf_64_file_p): New functions.
19275 (siginfo_fixup): New function.
19276 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
19277 give target a chance to convert layout.
19278 * linux-low.h (linux_target_ops): New member siginfo_fixup.
19279 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
19280
19281 2009-05-07 Doug Evans <dje@google.com>
19282
19283 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
19284 (regsets_store_inferior_registers): Ditto.
19285
19286 2009-05-06 Pedro Alves <pedro@codesourcery.com>
19287
19288 PR server/10048
19289
19290 * linux-low.c (must_set_ptrace_flags): Delete.
19291 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
19292 of the global.
19293 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
19294 `lwp->must_set_ptrace_flags' instead.
19295 (linux_wait_for_event_1): Set ptrace options here.
19296 (linux_wait_1): ... not here.
19297
19298 2009-04-30 Doug Evans <dje@google.com>
19299
19300 * inferiors.c (started_inferior_callback): New function.
19301 (attached_inferior_callback): New function.
19302 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
19303 * server.c (print_started_pid, print_attached_pid): New functions.
19304 (detach_or_kill_for_exit): New function.
19305 (main): Call it instead of for_each_inferior (kill_inferior_callback).
19306 * server.h (have_started_inferiors_p): Declare.
19307 (have_attached_inferiors_p): Declare.
19308
19309 * inferiors.c (remove_process): Fix memory leak, free process.
19310 * linux-low.c (linux_remove_process): New function.
19311 (linux_kill): Call it instead of remove_process.
19312 (linux_detach, linux_wait_1): Ditto.
19313
19314 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
19315
19316 * configure.srv: Add x86 Windows CE target.
19317
19318 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
19319
19320 * inferiors.c (get_thread_process): Make global.
19321 * server.h (get_thread_process): Add prototype.
19322 * thread-db.c (find_one_thread): Use get_thread_process
19323 instead of current_process.
19324 (thread_db_get_tls_address): Do not crash if called when
19325 thread layer is not yet initialized.
19326
19327 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
19328
19329 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
19330 * spu-low.c (current_tid): Rename to ...
19331 (current_ptid): ... this.
19332 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
19333 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
19334 ptid_get_lwp (current_ptid) instead of current_tid.
19335 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
19336 instead of current_tid. Use find_process_pid to verify pid
19337 argument is valid. Pass proper argument to remove_process.
19338 (spu_thread_alive): Compare current_ptid instead of current_tid.
19339 (spu_resume): Likewise.
19340
19341 2009-04-02 Pedro Alves <pedro@codesourcery.com>
19342
19343 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
19344 variable.
19345
19346 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19347
19348 Implement the multiprocess extensions, and add linux multiprocess
19349 support.
19350
19351 * server.h (ULONGEST): Declare.
19352 (struct ptid, ptid_t): New.
19353 (minus_one_ptid, null_ptid): Declare.
19354 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
19355 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
19356 (struct inferior_list_entry): Change `id' type from unsigned from
19357 to ptid_t.
19358 (struct sym_cache, struct breakpoint, struct
19359 process_info_private): Forward declare.
19360 (struct process_info): Declare.
19361 (current_process): Declare.
19362 (all_processes): Declare.
19363 (initialize_inferiors): Declare.
19364 (add_thread): Adjust to use ptid_t.
19365 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
19366 (add_process, remove_process, find_thread_pid): Declare.
19367 (find_inferior_id): Adjust to use ptid_t.
19368 (cont_thread, general_thread, step_thread): Change type to ptid_t.
19369 (multi_process): Declare.
19370 (push_event): Adjust to use ptid_t.
19371 (read_ptid, write_ptid): Declare.
19372 (prepare_resume_reply): Adjust to use ptid_t.
19373 (clear_symbol_cache): Declare.
19374 * inferiors.c (all_processes): New.
19375 (null_ptid, minus_one_ptid): New.
19376 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
19377 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
19378 (add_thread): Change unsigned long to ptid. Remove gdb_id
19379 parameter. Adjust.
19380 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
19381 (gdb_id_to_thread): Rename to ...
19382 (find_thread_pid): ... this. Change unsigned long to ptid.
19383 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
19384 (loaded_dll, pull_pid_from_list): Adjust.
19385 (add_process, remove_process, find_process_pid)
19386 (get_thread_process, current_process, initialize_inferiors): New.
19387 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
19388 (struct target_waitstatus) <related_pid>: Ditto.
19389 (struct target_ops) <kill, detach>: Add `pid' argument. Change
19390 return type to int.
19391 (struct target_ops) <join>: Add `pid' argument.
19392 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
19393 (struct target_ops) <wait>: Add `ptid' field. Change return type
19394 to ptid.
19395 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
19396 (mywait): Add `ptid' argument. Change return type to ptid_t.
19397 (target_pid_to_str): Declare.
19398 * target.c (set_desired_inferior): Adjust to use ptids.
19399 (mywait): Add new `ptid' argument. Adjust.
19400 (target_pid_to_str): New.
19401 * mem-break.h (free_all_breakpoints): Declare.
19402 * mem-break.c (breakpoints): Delelete.
19403 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
19404 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
19405 to use per-process breakpoint list.
19406 (free_all_breakpoints): New.
19407 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
19408 (symbol_cache, all_symbols_looked_up): Delete.
19409 (hexchars): New.
19410 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
19411 read_ptid): New.
19412 (prepare_resume_reply): Change ptid argument's type from unsigned
19413 long to ptid_t. Adjust. Implement W;process and X;process.
19414 (free_sym_cache, clear_symbol_cache): New.
19415 (look_up_one_symbol): Adjust to per-process symbol cache. *
19416 * server.c (cont_thread, general_thread, step_thread): Change type
19417 to ptid_t.
19418 (attached): Delete.
19419 (multi_process): New.
19420 (last_ptid): Change type to ptid_t.
19421 (struct vstop_notif) <ptid>: Change type to ptid_t.
19422 (queue_stop_reply, push_event): Change `ptid' argument's type to
19423 ptid_t.
19424 (discard_queued_stop_replies): Add `pid' argument.
19425 (start_inferior): Adjust to use ptids. Adjust to mywait interface
19426 changes. Don't reference the `attached' global.
19427 (attach_inferior): Adjust to mywait interface changes.
19428 (handle_query): Adjust to use ptids. Parse GDB's qSupported
19429 features. Handle and report "multiprocess+". Handle
19430 "qAttached:PID".
19431 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
19432 changes.
19433 (handle_v_kill): New.
19434 (handle_v_stopped): Adjust to use target_pid_to_str.
19435 (handle_v_requests): Allow multiple attaches and runs when
19436 multiprocess extensions are in effect. Handle "vKill".
19437 (myresume): Adjust to use ptids.
19438 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
19439 (handle_status): Adjust to discard_queued_stop_replies interface
19440 change.
19441 (first_thread_of, kill_inferior_callback)
19442 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
19443 (main): Call initialize_inferiors. Adjust to use ptids, killing
19444 and detaching from all inferiors. Handle multiprocess packet
19445 variants.
19446 * linux-low.h: Include gdb_proc_service.h.
19447 (struct process_info_private): New.
19448 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
19449 <lwpid_of>: Use ptid_get_lwp.
19450 (get_lwp_thread): Adjust.
19451 (struct lwp_info): Add `dead' member.
19452 (find_lwp_pid): Declare.
19453 * linux-low.c (thread_db_active): Delete.
19454 (new_inferior): Adjust comment.
19455 (inferior_pid): Delete.
19456 (linux_add_process): New.
19457 (handle_extended_wait): Adjust.
19458 (add_lwp): Change unsigned long to ptid.
19459 (linux_create_inferior): Add process to processes table. Adjust
19460 to use ptids. Don't set new_inferior here.
19461 (linux_attach_lwp): Rename to ...
19462 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
19463 it. Adjust to use ptids.
19464 (linux_attach_lwp): New.
19465 (linux_attach): Add process to processes table. Don't set
19466 new_inferior here.
19467 (struct counter): New.
19468 (second_thread_of_pid_p, last_thread_of_process_p): New.
19469 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
19470 multiple processes.
19471 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
19472 processes. Remove process from process table.
19473 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
19474 to multiple processes.
19475 (any_thread_of): New.
19476 (linux_detach): Add `pid' argument, and handle it. Remove process
19477 from processes table.
19478 (linux_join): Add `pid' argument. Handle it.
19479 (linux_thread_alive): Change unsighed long argument to ptid_t.
19480 Consider dead lwps as not being alive.
19481 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
19482 threads we're not interested in.
19483 (same_lwp, find_lwp_pid): New.
19484 (linux_wait_for_lwp): Change `pid' argument's type from int to
19485 ptid_t. Adjust.
19486 (linux_wait_for_event): Rename to ...
19487 (linux_wait_for_event_1): ... this. Change `pid' argument's type
19488 from int to ptid_t. Adjust.
19489 (linux_wait_for_event): New.
19490 (linux_wait_1): Add `ptid' argument. Change return type to
19491 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
19492 that exit from the process table.
19493 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
19494 Adjust.
19495 (mark_lwp_dead): New.
19496 (wait_for_sigstop): Adjust to use ptids. If a process exits while
19497 stopping all threads, mark its main lwp as dead.
19498 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
19499 ptids.
19500 (fetch_register, usr_store_inferior_registers)
19501 (regsets_fetch_inferior_registers)
19502 (regsets_store_inferior_registers, linux_read_memory)
19503 (linux_write_memory): Inline `inferior_pid'.
19504 (linux_look_up_symbols): Adjust to use per-process
19505 `thread_db_active'.
19506 (linux_request_interrupt): Adjust to use ptids.
19507 (linux_read_auxv): Inline `inferior_pid'.
19508 (initialize_low): Don't reference thread_db_active.
19509 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
19510 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
19511 (ps_getpid): Return the pid of the current inferior.
19512 * thread-db.c (proc_handle, thread_agent): Delete.
19513 (thread_db_create_event, thread_db_enable_reporting): Adjust to
19514 per-process data.
19515 (find_one_thread): Change argument type to ptid_t. Adjust to
19516 per-process data.
19517 (maybe_attach_thread): Adjust to per-process data and ptids.
19518 (thread_db_find_new_threads): Ditto.
19519 (thread_db_init): Ditto.
19520 * spu-low.c (spu_create_inferior, spu_attach): Add process to
19521 processes table. Adjust to use ptids.
19522 (spu_kill, spu_detach): Adjust interface. Remove process from
19523 processes table.
19524 (spu_join, spu_thread_alive): Adjust interface.
19525 (spu_wait): Adjust interface. Remove process from processes
19526 table. Adjust to use ptids.
19527 * win32-low.c (current_inferior_tid): Delete.
19528 (current_inferior_ptid): New.
19529 (debug_event_ptid): New.
19530 (thread_rec): Take a ptid. Adjust.
19531 (child_add_thread): Add `pid' argument. Adjust to use ptids.
19532 (child_delete_thread): Ditto.
19533 (do_initial_child_stuff): Add `attached' argument. Add process to
19534 processes table.
19535 (child_fetch_inferior_registers, child_store_inferior_registers):
19536 Adjust.
19537 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
19538 (win32_attach): Pass 1 to do_initial_child_stuff.
19539 (win32_kill): Adjust interface. Remove process from processes
19540 table.
19541 (win32_detach): Ditto.
19542 (win32_join): Adjust interface.
19543 (win32_thread_alive): Take a ptid.
19544 (win32_resume): Adjust to use ptids.
19545 (get_child_debug_event): Ditto.
19546 (win32_wait): Adjust interface. Remove exiting process from
19547 processes table.
19548
19549 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19550
19551 Non-stop mode support.
19552
19553 * server.h (non_stop): Declare.
19554 (gdb_client_data, handler_func): Declare.
19555 (delete_file_handler, add_file_handler, start_event_loop):
19556 Declare.
19557 (handle_serial_event, handle_target_event, push_event)
19558 (putpkt_notif): Declare.
19559 * target.h (enum resume_kind): New.
19560 (struct thread_resume): Replace `step' field by `kind' field.
19561 (TARGET_WNOHANG): Define.
19562 (struct target_ops) <wait>: Add `options' argument.
19563 <supports_non_stop, async, start_non_stop>: New fields.
19564 (target_supports_non_stop, target_async): New.
19565 (start_non_stop): Declare.
19566 (mywait): Add `options' argument.
19567 * target.c (mywait): Add `options' argument. Print child exit
19568 notifications here.
19569 (start_non_stop): New.
19570 * server.c (non_stop, own_buf, mem_buf): New globals.
19571 (struct vstop_notif): New.
19572 (notif_queue): New global.
19573 (queue_stop_reply, push_event, discard_queued_stop_replies)
19574 (send_next_stop_reply): New.
19575 (start_inferior): Adjust to use resume_kind. Adjust to mywait
19576 interface changes.
19577 (attach_inferior): In non-stop mode, don't wait for the target
19578 here.
19579 (handle_general_set): Handle QNonStop.
19580 (handle_query): When handling qC, return the current general
19581 thread, instead of the first thread of the list.
19582 (handle_query): If the backend supports non-stop mode, include
19583 QNonStop+ in the qSupported query response.
19584 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
19585 and non-stop mode.
19586 (handle_v_attach, handle_v_run): Handle non-stop mode.
19587 (handle_v_stopped): New.
19588 (handle_v_requests): Report support for vCont;t. Handle vStopped.
19589 (myresume): Adjust to use resume_kind. Handle non-stop.
19590 (queue_stop_reply_callback): New.
19591 (handle_status): Handle non-stop mode.
19592 (main): Clear non_stop flag on reconnection. Use the event-loop.
19593 Refactor serial protocol handling from here ...
19594 (process_serial_event): ... to this new function. When GDB
19595 selects any thread, select one here. In non-stop mode, wait until
19596 GDB acks all pending events before exiting.
19597 (handle_serial_event, handle_target_event): New.
19598 * remote-utils.c (remote_open): Install remote_desc in the event
19599 loop.
19600 (remote_close): Remove remote_desc from the event loop.
19601 (putpkt_binary): Rename to...
19602 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
19603 (putpkt_binary): New as wrapper around putpkt_binary_1.
19604 (putpkt_notif): New.
19605 (prepare_resume_reply): In non-stop mode, don't change the
19606 general_thread.
19607 * event-loop.c: New.
19608 * Makefile.in (OBJ): Add event-loop.o.
19609 (event-loop.o): New rule.
19610
19611 * linux-low.h (pid_of): Moved here.
19612 (lwpid_of): New.
19613 (get_lwp_thread): Use lwpid_of.
19614 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
19615 * linux-low.c (pid_of): Delete.
19616 (inferior_pid): Use lwpid_of.
19617 (linux_event_pipe): New.
19618 (target_is_async_p): New.
19619 (delete_lwp): New.
19620 (handle_extended_wait): Use lwpid_of.
19621 (add_lwp): Don't set lwpid field.
19622 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
19623 (linux_kill_one_lwp): If killing a running lwp, stop it first.
19624 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
19625 (linux_detach_one_lwp): If detaching from a running lwp, stop it
19626 first. Adjust to linux_wait_for_event interface changes. Use
19627 lwpid_of.
19628 (linux_detach): Don't delete the main lwp here.
19629 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
19630 (status_pending_p): Don't consider explicitly suspended lwps.
19631 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
19632 pointer. Add OPTIONS argument. Change return type to int. Use
19633 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
19634 (linux_wait_for_event): Take an integer pid instead of a lwp_info
19635 pointer. Add status pointer argument. Return a pid instead of a
19636 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
19637 changes. In non-stop mode, don't switch to a random thread.
19638 (linux_wait): Rename to...
19639 (linux_wait_1): ... this. Add target_options argument, and handle
19640 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
19641 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
19642 clean exit and signal exit code. Don't stop all threads in
19643 non-stop mode. In all-stop mode, only stop all threads when
19644 reporting a stop to GDB. Handle explicit thread stop requests.
19645 (async_file_flush, async_file_mark): New.
19646 (linux_wait): New.
19647 (send_sigstop): Use lwpid_of.
19648 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
19649 interface changes. In non-stop mode, don't switch to a random
19650 thread.
19651 (linux_resume_one_lwp): Use lwpid_of.
19652 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
19653 (linux_resume_one_thread): ... this. Handle resume_stop. In
19654 non-stop mode, don't look for pending flag in all threads.
19655 (resume_status_pending_p): Don't consider explicitly suspended
19656 threads.
19657 (my_waitpid): Reimplement. Emulate __WALL.
19658 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19659 Use lwpid_of.
19660 (sigchld_handler, linux_supports_non_stop, linux_async)
19661 (linux_start_non_stop): New.
19662 (linux_target_ops): Register linux_supports_non_stop, linux_async
19663 and linux_start_non_stop.
19664 (initialize_low): Install SIGCHLD handler.
19665 * thread-db.c (thread_db_create_event, find_one_thread)
19666 (thread_db_get_tls_address): Use lwpid_of.
19667 * win32-low.c (win32_detach): Adjust to use resume_kind.
19668 (win32_wait): Add `options' argument.
19669 * spu-low.c (spu_resume): Adjust to use resume_kind.
19670 (spu_wait): Add `options' argument.
19671
19672 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19673
19674 Decouple target code from remote protocol.
19675
19676 * target.h (enum target_waitkind): New.
19677 (struct target_waitstatus): New.
19678 (struct target_ops) <wait>: Return an unsigned long. Take a
19679 target_waitstatus pointer instead of a char pointer.
19680 (mywait): Likewise.
19681 * target.c (mywait): Change prototype to return an unsigned long.
19682 Take a target_waitstatus pointer instead of a char pointer. Adjust.
19683 * server.h (thread_from_wait, old_thread_from_wait): Delete
19684 declarations.
19685 (prepare_resume_reply): Change prototype to take a
19686 target_waitstatus.
19687 * server.c (thread_from_wait, old_thread_from_wait): Delete.
19688 (last_status, last_ptid): New.
19689 (start_inferior): Remove "statusptr" argument. Adjust. Return a
19690 pid instead of a signal.
19691 (attach_inferior): Remove "status" and "signal" parameters.
19692 Adjust.
19693 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
19694 not as an address.
19695 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
19696 (handle_v_requests, myresume): Remove "status" and "signal"
19697 parameters. Adjust.
19698 (handle_status): New.
19699 (main): Delete local `status'. Adjust.
19700 * remote-utils.c: Include target.h.
19701 (prepare_resume_reply): Change prototype to take a
19702 target_waitstatus. Adjust.
19703
19704 * linux-low.c (linux_wait): Adjust to new target_ops->wait
19705 interface.
19706 * spu-low.c (spu_wait): Adjust.
19707 * win32-low.c (enum target_waitkind, struct target_waitstatus):
19708 Delete.
19709 (win32_wait): Adjust.
19710
19711 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19712
19713 * target.h (struct thread_resume): Delete leave_stopped member.
19714 (struct target_ops): Add a `n' argument to the `resume' callback.
19715 * server.c (start_inferior): Adjust.
19716 (handle_v_cont, myresume): Adjust.
19717 * linux-low.c (check_removed_breakpoint): Adjust to resume
19718 interface change, and to removed leave_stopped field.
19719 (resume_ptr): Delete.
19720 (struct thread_resume_array): New.
19721 (linux_set_resume_request): Add new `arg' parameter. Adjust to
19722 resume interface change.
19723 (linux_continue_one_thread, linux_queue_one_thread)
19724 (resume_status_pending_p): Check if the resume field is NULL
19725 instead of checking the leave_stopped member.
19726 (linux_resume): Adjust to the target resume interface change.
19727 * spu-low.c (spu_resume): Adjust to the target resume interface
19728 change.
19729 * win32-low.c (win32_detach, win32_resume): Ditto.
19730
19731 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19732
19733 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
19734 flag.
19735 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
19736 pending.
19737 (linux_continue_one_thread): Only preserve the stepping flag if
19738 there's a pending breakpoint.
19739
19740 2009-03-31 Pedro Alves <pedro@codesourcery.com>
19741
19742 * server.c (main): After the inferior having exited, call
19743 remote_close before exiting gdbserver.
19744
19745 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
19746
19747 Fix size of FPSCR in Power 7 processors.
19748 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
19749 (PPC_FEATURE_HAS_DFP): New #define.
19750 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
19751 size of the FPSCR.
19752
19753 2009-03-23 Pedro Alves <pedro@codesourcery.com>
19754
19755 * server.c (handle_query) Whitespace and formatting.
19756
19757 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19758
19759 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
19760 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
19761 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
19762 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
19763 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
19764 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
19765 Makefile.in, configure.ac: Fix whitespace throughout.
19766 * configure: Regenerate.
19767
19768 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19769
19770 * inferiors.c (find_inferior): Make it safe for the callback
19771 function to delete the currently iterated inferior.
19772
19773 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19774
19775 * Makefile.in (linuw_low_h): Move higher.
19776 (thread-db.o): Depend on $(linux_low_h).
19777
19778 2009-03-17 Pedro Alves <pedro@codesourcery.com>
19779
19780 Rename "process" to "lwp" throughout.
19781
19782 * linux-low.c (all_processes): Rename to...
19783 (all_lwps): ... this.
19784 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
19785 (add_process): Rename to ...
19786 (add_lwp): ... this. Adjust.
19787 (linux_create_inferior): Adjust.
19788 (linux_attach_lwp): Adjust.
19789 (linux_attach): Adjust.
19790 (linux_kill_one_process): Rename to ...
19791 (linux_kill_one_lwp): ... this. Adjust.
19792 (linux_kill): Adjust.
19793 (linux_detach_one_process): Rename to ...
19794 (linux_detach_one_lwp): ... this. Adjust.
19795 (linux_detach): Adjust.
19796 (check_removed_breakpoint): Adjust.
19797 (status_pending_p): Adjust.
19798 (linux_wait_for_process): Rename to ...
19799 (linux_wait_for_lwp): ... this. Adjust.
19800 (linux_wait_for_event): Adjust.
19801 (send_sigstop): Adjust.
19802 (wait_for_sigstop): Adjust.
19803 (stop_all_processes): Rename to ...
19804 (stop_all_lwps): ... this.
19805 (linux_resume_one_process): Rename to ...
19806 (linux_resume_one_lwp): ... this. Adjust.
19807 (linux_set_resume_request, linux_continue_one_thread)
19808 (linux_queue_one_thread, resume_status_pending_p)
19809 (usr_store_inferior_registers, regsets_store_inferior_registers)
19810 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19811 Adjust.
19812 * linux-low.h (get_process): Rename to ...
19813 (get_lwp): ... this. Adjust.
19814 (get_thread_process): Rename to ...
19815 (get_thread_lwp): ... this. Adjust.
19816 (get_process_thread): Rename to ...
19817 (get_lwp_thread): ... this. Adjust.
19818 (struct process_info): Rename to ...
19819 (struct lwp_info): ... this.
19820 (all_processes): Rename to ...
19821 (all_lwps): ... this.
19822 * proc-service.c (ps_lgetregs): Adjust.
19823 * thread-db.c (thread_db_create_event, find_one_thread)
19824 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
19825
19826 2009-03-14 Pedro Alves <pedro@codesourcery.com>
19827
19828 * server.c (handle_query): Handle "qAttached".
19829
19830 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
19831
19832 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
19833 GPLv3, update license URL.
19834
19835 2009-03-01 Doug Evans <dje@google.com>
19836
19837 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
19838 (server_h): Add gdb_signals.h.
19839 (signals.o): Update.
19840 * server.h (target_signal_from_host,target_signal_to_host_p)
19841 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
19842
19843 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
19844
19845 * remote-utils.c (getpkt): Also generate remote-debug
19846 information if noack_mode is set.
19847
19848 2009-02-06 Pedro Alves <pedro@codesourcery.com>
19849
19850 * server.c (handle_query): Report qXfer:siginfo:read and
19851 qXfer:siginfo:write as supported and handle them.
19852 * target.h (struct target_ops) <qxfer_siginfo>: New field.
19853 * linux-low.c (linux_xfer_siginfo): New.
19854 (linux_target_ops): Set it.
19855
19856 2009-01-26 Pedro Alves <pedro@codesourcery.com>
19857
19858 * server.c (gdbserver_usage): Mention --remote-debug.
19859 (main): Accept '--remote-debug' switch.
19860
19861 2009-01-18 Doug Evans <dje@google.com>
19862
19863 * regcache.c (new_register_cache): No need to check result of xcalloc.
19864 * server.c (handle_search_memory): Back out calls to xmalloc,
19865 result is checked and error is returned to user upon failure.
19866 (handle_query): Ditto. Add more checks for result of malloc.
19867 (handle_v_cont): Check result of malloc, report error back to
19868 user upon failure.
19869 (handle_v_run): Ditto. Call freeargv.
19870 * server.h (freeargv): Declare.
19871 * utils.c (freeargv): New fn.
19872
19873 2009-01-15 Doug Evans <dje@google.com>
19874
19875 * gdbreplay.c (perror_with_name): Make arg const char *.
19876 * server.h (target_signal_to_name): Make return type const char *.
19877 * thread-db.c (thread_db_err_str): Make return type const char *.
19878 * utils.c (perror_with_name): Make arg const char *.
19879
19880 2009-01-14 Pedro Alves <pedro@codesourcery.com>
19881
19882 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
19883 when handling a EXIT_PROCESS_DEBUG_EVENT.
19884
19885 2009-01-06 Joel Brobecker <brobecker@adacore.com>
19886
19887 * gdbreplay.c (gdbreplay_version): Update copyright year.
19888 * server.c (gdbserver_version): Likewise.
19889
19890 2009-01-05 Doug Evans <dje@google.com>
19891
19892 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
19893 (handle_extended_wait): Improve comment.
19894
19895 2008-12-13 Doug Evans <dje@google.com>
19896
19897 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
19898 * server.h (ATTR_MALLOC): New macro.
19899 (xmalloc,xcalloc,xstrdup): Declare.
19900 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
19901 * inferiors.c: Ditto.
19902 * linux-low.c: Ditto.
19903 * mem-break.c: Ditto.
19904 * regcache.c: Ditto.
19905 * remote-utils.c: Ditto.
19906 * server.c: Ditto.
19907 * target.c: Ditto.
19908 * win32-low.c: Ditto.
19909
19910 2008-12-12 Doug Evans <dje@google.com>
19911
19912 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
19913 in debugging printf.
19914
19915 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
19916
19917 2008-12-09 Doug Evans <dje@google.com>
19918
19919 * linux-low.h (struct process_info): Delete member tid, unused.
19920 * thread-db.c (find_one_thread): Update.
19921 (maybe_attach_thread): Update.
19922
19923 2008-12-02 Pedro Alves <pedro@codesourcery.com>
19924
19925 * target.h (struct target_ops): Add qxfer_osdata member.
19926 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
19927 and dirent.h.
19928 (linux_qxfer_osdata): New functions.
19929 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
19930 callback.
19931 * server.c (handle_query): Handle "qXfer:osdata:read:".
19932 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
19933 (buffer_xml_printf): New functions.
19934 * server.h (struct buffer): New.
19935 (buffer_grow_str, buffer_grow_str0): New macros.
19936 (buffer_grow, buffer_free, buffer_init, buffer_finish)
19937 (buffer_xml_printf): Declare.
19938
19939 2008-11-24 Doug Evans <dje@google.com>
19940
19941 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
19942
19943 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
19944
19945 * server.c (handle_v_run): Always use the supplied argument list.
19946
19947 2008-11-19 Bob Wilson <bob.wilson@acm.org>
19948
19949 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
19950 (xtensa_regmap_table): Add entry for scompare1.
19951
19952 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
19953
19954 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
19955 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
19956 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
19957 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
19958 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
19959 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
19960 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
19961 XML target descriptions.
19962 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
19963 when inferior is running on an ISA 2.05 or later processor. Add
19964 special case to return offset for full 64-bit slot of FPSCR when
19965 in 32-bits.
19966
19967 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
19968
19969 * Makefile.in (SFILES, clean): Added sparc64 files.
19970 (reg-sparc64.o, reg-sparc64.c): New.
19971 * configure.srv (sparc*-*-linux*): New configuration.
19972 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
19973 syscall arguments for SPARC.
19974 (regsets_store_inferior_registers): Likewise.
19975 * linux-sparc-low.c: New file.
19976
19977 2008-10-21 Doug Evans <dje@google.com>
19978
19979 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
19980 (READLINE_DIR,READLINE_DEP): Delete.
19981 (INTERNAL_CFLAGS): Update.
19982 (LINTFLAGS): Update.
19983
19984 2008-10-10 Pedro Alves <pedro@codesourcery.com>
19985
19986 * server.c (handle_v_run): If GDB didn't specify an argv, use the
19987 whole argv from the last run, not just argv[0].
19988
19989 2008-09-08 Pedro Alves <pedro@codesourcery.com>
19990
19991 * regcache.c (new_register_cache): Return NULL if the register
19992 cache size isn't known yet.
19993 (free_register_cache): Avoid dereferencing a NULL regcache.
19994
19995 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
19996
19997 * configure.srv: Merge MIPS and MIPS64.
19998
19999 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
20000
20001 * Makefile.in (uninstall): Apply $(EXEEXT) too.
20002
20003 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
20004
20005 * Makefile.in: Add required vsx dependencies.
20006
20007 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
20008 Declare init_registers_powerpc_vsx32l.
20009 Declare init_registers_powerpc_vsx64l.
20010 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
20011 (ppc_arch_setup): Check for VSX in hwcap.
20012 (ppc_fill_vsxregset): New function.
20013 (ppc_store_vsxregset): New function.
20014 Add new VSX entry in regset_info target_regsets.
20015
20016 * configure.srv: Add new VSX dependencies.
20017
20018 2008-08-12 Pedro Alves <pedro@codesourcery.com>
20019
20020 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
20021 (remote_open): Set or clear transport_is_reliable.
20022 (putpkt_binary): Don't expect acks in noack mode.
20023 (getpkt): Don't send ack/nac in noack mode.
20024 * server.c (handle_general_set): Handle QStartNoAckMode.
20025 (handle_query): If connected by tcp pass QStartNoAckMode+ in
20026 qSupported.
20027 (main): Reset noack_mode on every connection.
20028 * server.h (noack_mode): Declare.
20029
20030 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
20031
20032 * Makefile.in (GDBREPLAY_OBS): New variable.
20033 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
20034
20035 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
20036 Daniel Jacobowitz <dan@codesourcery.com>
20037
20038 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
20039 (usr_store_inferior_registers): Likewise.
20040 (regsets_store_inferior_registers): Likewise.
20041
20042 2008-07-31 Rolf Jansen <rj@surtec.com>
20043 Pedro Alves <pedro@codesourcery.com>
20044
20045 * configure.ac: Check for memmem declaration.
20046 * server.c [HAVE_MALLOC_H]: Include malloc.h.
20047 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
20048 (disable_packet_qfThreadInfo): Unconditionally compile.
20049 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
20050 * configure, config.in: Regenerate.
20051
20052 2008-07-28 Doug Kwan <dougkwan@google.com>
20053
20054 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
20055 (linux_write_memory): Remove declaration of errno.
20056
20057 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
20058
20059 * linux-low.c (handle_extended_wait): Do not use "status"
20060 variable uninitialized.
20061
20062 2008-07-07 Pedro Alves <pedro@codesourcery.com>
20063
20064 * server.c (handle_v_attach): Inhibit reporting dll changes.
20065
20066 2008-06-27 Pedro Alves <pedro@codesourcery.com>
20067
20068 * remote-utils.c (prepare_resume_reply): If requested, don't
20069 output "thread:TID" in the T stop reply.
20070
20071 * server.c (disable_packet_vCont, disable_packet_Tthread)
20072 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
20073 (handle_query): If requested, disable support for qC, qfThreadInfo
20074 and qsThreadInfo.
20075 (handle_v_requests): If requested, disable support for vCont.
20076 (gdbserver_show_disableable): New.
20077 (main): Handle --disable-packet and --disable-packet=LIST.
20078
20079 * server.h (disable_packet_vCont, disable_packet_Tthread)
20080 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
20081
20082 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
20083
20084 * server.c (gdbserver_usage): Mention --version.
20085
20086 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
20087
20088 * Makefile.in (gdbreplay.o): New rule.
20089
20090 2008-06-06 Joseph Myers <joseph@codesourcery.com>
20091
20092 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
20093 message, not gdbserver.
20094
20095 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
20096 Nathan Sidwell <nathan@codesourcery.com>
20097 Joseph Myers <joseph@codesourcery.com>
20098
20099 * acinclude.m4: Include ../../config/acx.m4.
20100 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
20101 * configure, config.in: Regenerate.
20102 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
20103 * server.c (gdbserver_version): Print PKGVERSION.
20104 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
20105 (main): Adjust gdbserver_usage calls.
20106 * gdbreplay.c (version, host_name): Add declarations.
20107 (gdbreplay_version, gdbreplay_usage): New.
20108 (main): Accept --version and --help options.
20109
20110 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
20111
20112 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
20113 (arm_breakpoint_at): Handle Thumb.
20114 (the_low_target): Add comment.
20115
20116 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
20117
20118 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
20119
20120 2008-05-09 Doug Evans <dje@google.com>
20121
20122 * server.h (decode_search_memory_packet): Declare.
20123 * remote-utils.c (decode_search_memory_packet): New fn.
20124 * server.c (handle_search_memory_1): New fn.
20125 (handle_search_memory): New fn.
20126 (handle_query): Process qSearch:memory packets.
20127
20128 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
20129
20130 * regcache.c (registers_length): Remove.
20131 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
20132 full register packet.
20133 * regcache.h (registers_length): Remove prototype.
20134 * server.h (PBUFSIZ): Define to 16384.
20135
20136 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
20137
20138 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
20139 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
20140 powerpc-64l.o, and powerpc-altivec64l.o.
20141 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
20142 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
20143 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
20144 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
20145 rs6000/power-linux.xml, and rs6000/power64-linux.xml
20146 to srv_xmlfiles.
20147
20148 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
20149 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
20150 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
20151 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
20152 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
20153 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
20154 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
20155 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
20156 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
20157 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
20158 (clean): Update.
20159
20160 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
20161 (init_registers_powerpc_32l): ... this new prototype.
20162 (init_registers_powerpc_32): Remove, replace by ...
20163 (init_registers_powerpc_altivec32l): ... this new prototype.
20164 (init_registers_powerpc_e500): Remove, replace by ...
20165 (init_registers_powerpc_e500l): ... this new prototype.
20166 (init_registers_ppc64): Remove, replace by ...
20167 (init_registers_powerpc_64l): ... this new prototype.
20168 (init_registers_powerpc_64): Remove, replace by ...
20169 (init_registers_powerpc_altivec64l): ... this new prototype.
20170 (ppc_num_regs): Set to 73.
20171 (PT_ORIG_R3, PT_TRAP): Define if necessary.
20172 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
20173 (ppc_cannot_store_register): Handle orig_r3 and trap.
20174 (ppc_arch_setup): Update init_registers_... calls.
20175 (ppc_fill_gregset): Handle orig_r3 and trap.
20176
20177 * inferiors.c (clear_inferiors): Reset current_inferior.
20178
20179 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
20180
20181 * acinclude.m4: Add override.m4.
20182 * configure: Regenerate.
20183
20184 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
20185
20186 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
20187 initial call to init_register_ppc64.
20188
20189 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
20190
20191 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
20192 single powerpc*-*-linux* case.
20193 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
20194
20195 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
20196
20197 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
20198 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
20199 from reg_xmlfiles.
20200 * linux-ppc-low.c: Include <elf.h>.
20201 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
20202 (ppc_hwcap): New global variable.
20203 (ppc_regmap): Remove __SPE__ #ifdef sections.
20204 (ppc_regmap_e500): New global variable.
20205 (ppc_cannot_store_register): Update __SPE__ special case.
20206 (ppc_get_hwcap): New function.
20207 (ppc_arch_setup): Use it to determine whether inferior supports
20208 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
20209 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
20210 Do not access registers if target does not support AltiVec.
20211 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
20212 Do not access registers if target does not support SPE.
20213 (target_regsets): Unconditionally include AltiVec and SPE regsets.
20214
20215 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
20216
20217 * linux-low.c (disabled_regsets, num_regsets): New.
20218 (use_regsets_p): Delete.
20219 (linux_wait_for_process): Clear disabled_regsets.
20220 (regsets_fetch_inferior_registers): Check and set it.
20221 (regsets_store_inferior_registers): Likewise.
20222 (linux_fetch_registers, linux_store_registers): Do not use
20223 use_regsets_p.
20224 (initialize_low): Allocate disabled_regsets.
20225
20226 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
20227
20228 * Makefile.in (LIBOBJS): New.
20229 (OBS): Use LIBOBJS.
20230 (memmem.o): New rule.
20231 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
20232 * configure: Regenerated.
20233
20234 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
20235
20236 * server.c (handle_query): Never return "unsupported" for
20237 qXfer:features:read queries.
20238
20239 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
20240
20241 * server.c (get_features_xml): Fix inverted condition.
20242 (handle_query): Always support qXfer:feature:read.
20243
20244 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
20245
20246 * server.c (wrapper_argv): New.
20247 (start_inferior): Handle wrapper_argv. If set, expect an extra
20248 trap.
20249 (gdbserver_usage): Document --wrapper.
20250 (main): Parse --wrapper.
20251
20252 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20253
20254 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
20255 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
20256 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
20257 (ppc_set_pc): Likewise.
20258 (ppc_arch_setup): New function.
20259 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
20260 of collect_register.
20261 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
20262
20263 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20264
20265 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
20266 instead of linux-ppc64-low.o.
20267 * linux-ppc64-low.c: Remove file.
20268 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
20269 (linux-ppc64-low.o): Remove rule.
20270
20271 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
20272 (init_registers_powerpc_64): Likewise.
20273 (ppc_regmap): Conditionally define depending on __powerpc64__.
20274 (ppc_cannot_store_register): Do not special-case "fpscr" when
20275 compiled on __powerpc64__.
20276 (ppc_collect_ptrace_register): New function.
20277 (ppc_supply_ptrace_register): New function.
20278 (ppc_breakpoint): Change type to "unsigned int".
20279 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
20280 (the_low_target): Conditionally provide initializers for the
20281 arch_setup member depending on __powerpc64__. Install
20282 collect_ptrace_register and supply_ptrace_register members.
20283
20284 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20285
20286 * regcache.h (gdbserver_xmltarget): Add extern declaration.
20287 * server.c (gdbserver_xmltarget): Define.
20288 (get_features_xml): Use it to replace "target.xml" and arch_string.
20289
20290 * configure.srv: Remove srv_xmltarget. Add XML files that were
20291 mentioned there to srv_xmlfiles instead. Remove conditional tests
20292 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
20293 srv_xmlfiles and srv_regobj to include all possible choices.
20294 * configure.ac (srv_xmltarget): Remove.
20295 (srv_xmlfiles): Do not add "target.xml".
20296 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
20297 checks for supplementary target information.
20298 * configure: Regenerate.
20299 * Makefile.in (XML_TARGET): Remove.
20300 (target.xml): Remove rule.
20301 (clean): Do not clean up target.xml.
20302 (.PRECIOUS): Do not mention target.xml.
20303
20304 * target.h (struct target_ops): Remove arch_string member.
20305 * linux-low.c (linux_arch_string): Remove.
20306 (linux_target_ops): Remove arch_string initializer.
20307 * linux-low.h (struct linux_target_ops): Remove arch_string member.
20308 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
20309 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
20310 * spu-low.c (spu_arch_string): Remove.
20311 (spu_target_ops): Remove arch_string initializer.
20312 * win32-low.c (win32_arch_string): Remove.
20313 (win32_target_ops): Remove arch_string initializer.
20314 * win32-low.h (struct win32_target_ops): Remove arch_string member.
20315 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
20316 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
20317
20318 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20319
20320 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
20321 by collect_ptrace_register and supply_ptrace_register hooks.
20322 * linux-low.c (fetch_register): Use supply_ptrace_register callback
20323 instead of checking for the_low_target.left_pad_xfer.
20324 (usr_store_inferior_registers): Use collect_ptrace_register callback
20325 instead of checking for the_low_target.left_pad_xfer.
20326
20327 * linux-s390-low.c (s390_collect_ptrace_register): New function.
20328 (s390_supply_ptrace_register): Likewise.
20329 (s390_fill_gregset): Call s390_collect_ptrace_register.
20330 (the_low_target): Update.
20331
20332 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
20333 (ppc_supply_ptrace_register): Likewise.
20334 (the_low_target): Update.
20335
20336 * linux-i386-low.c (the_low_target): Update.
20337 * linux-x86-64-low.c (the_low_target): Update.
20338
20339 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20340
20341 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
20342 reg-s390.o and reg-s390x.o.
20343
20344 * linux-low.c (new_inferior): New global variable.
20345 (linux_create_inferior, linux_attach): Set it.
20346 (linux_wait_for_process): Call the_low_target.arch_setup after the
20347 target has stopped for the first time.
20348 (initialize_low): Do not call the_low_target.arch_setup.
20349
20350 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
20351 (s390_set_pc): Likewise.
20352 (s390_arch_setup): New function.
20353 (the_low_target): Use s390_arch_setup as arch_setup routine.
20354
20355 * regcache.c (realloc_register_cache): New function.
20356 (set_register_cache): Call it for each existing regcache.
20357
20358 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20359
20360 * server.h (init_registers): Remove prototype.
20361
20362 * linux-low.h (struct linux_target_ops): Add arch_setup field.
20363 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
20364 instead of init_registers ().
20365 * linux-arm-low.c (init_registers_arm): Add prototype.
20366 (init_registers_arm_with_iwmmxt): Likewise.
20367 (the_low_target): Add initializer for arch_setup field.
20368 * linux-cris-low.c (init_registers_cris): Add prototype.
20369 (the_low_target): Add initializer for arch_setup field.
20370 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
20371 (the_low_target): Add initializer for arch_setup field.
20372 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
20373 (the_low_target): Add initializer for arch_setup field.
20374 * linux-ia64-low.c (init_registers_ia64): Add prototype.
20375 (the_low_target): Add initializer for arch_setup field.
20376 * linux-m32r-low.c (init_registers_m32r): Add prototype.
20377 (the_low_target): Add initializer for arch_setup field.
20378 * linux-m68k-low.c (init_registers_m68k): Add prototype.
20379 (the_low_target): Add initializer for arch_setup field.
20380 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
20381 (init_registers_mips64_linux): Likewise.
20382 (the_low_target): Add initializer for arch_setup field.
20383 * linux-ppc-low.c (init_registers_ppc): Add prototype.
20384 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
20385 (the_low_target): Add initializer for arch_setup field.
20386 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
20387 (init_registers_powerpc_64): Likewise.
20388 (the_low_target): Add initializer for arch_setup field.
20389 * linux-s390-low.c (init_registers_s390): Add prototype.
20390 (init_registers_s390x): Likewise.
20391 (the_low_target): Add initializer for arch_setup field.
20392 * linux-sh-low.c (init_registers_sh): Add prototype.
20393 (the_low_target): Add initializer for arch_setup field.
20394 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
20395 (the_low_target): Add initializer for arch_setup field.
20396 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
20397 (the_low_target): Add initializer for arch_setup field.
20398
20399 * win32-low.h (struct win32_target_ops): Add arch_setup field.
20400 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
20401 instead of init_registers ().
20402 * win32-arm-low.c (init_registers_arm): Add prototype.
20403 (the_low_target): Add initializer for arch_setup field.
20404 * win32-i386-low.c (init_registers_i386): Add prototype.
20405 (the_low_target): Add initializer for arch_setup field.
20406
20407 * spu-low.c (init_registers_spu): Add prototype.
20408 (initialize_low): Call initialie_registers_spu () instead of
20409 initialize_registers ().
20410
20411 2008-02-19 Pedro Alves <pedro@codesourcery.com>
20412
20413 * server.c (handle_v_requests): When handling the vRun and vAttach
20414 packets, if already debugging a process, don't kill it. Return an
20415 error instead.
20416
20417 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
20418
20419 * server.c (handle_query): Correct length check.
20420
20421 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
20422
20423 * win32-low.c (do_initial_child_stuff): Add process handle
20424 parameter. Set current_process_handle and current_process_id from the
20425 parameters. Clear globals.
20426 (win32_create_inferior): Don't set current_process_handle and
20427 current_process_id here. Instead pass them on the call to
20428 do_initial_child_stuff.
20429 (win32_attach): Likewise.
20430 (win32_clear_inferiors): New.
20431 (win32_kill): Don't close the current process handle or the
20432 current thread handle here. Instead call win32_clear_inferiors.
20433 (win32_detach): Don't open a new handle to the process. Call
20434 win32_clear_inferiors.
20435 (win32_join): Don't rely on current_process_handle; open a new
20436 handle using the process id.
20437 (win32_wait): Call win32_clear_inferiors when the inferior process
20438 has exited.
20439
20440 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
20441
20442 * server.c (monitor_show_help): Add "exit".
20443
20444 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
20445
20446 * Makefile.in (SFILES): Add linux-xtensa-low.c.
20447 (clean): Add reg-xtensa.c.
20448 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
20449 * configure.srv (xtensa*-*-linux*) New target.
20450 * linux-xtensa-low.c: New.
20451 * xtensa-xtregs.c: New.
20452
20453 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
20454
20455 * hostio.c: Don't include errno.h.
20456 (errno_to_fileio_errno): Move to hostio-errno.
20457 * hostio.c: (hostio_error): Remove the error parameter. Defer the
20458 error number outputting to the target->hostio_last_error callback.
20459 (hostio_packet_error): Use FILEIO_EINVAL directly.
20460 (handle_open, handle_pread, hostio_error, handle_unlink): Update
20461 calls to hostio_error.
20462 * hostio-errno.c: New.
20463 * server.h (hostio_last_error_from_errno): Declare.
20464 * target.h (target_ops): Add hostio_last_error member.
20465 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
20466 as hostio_last_error handler.
20467 * spu-low.c (spu_target_ops): Likewise.
20468 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
20469 (wince_hostio_last_error): New functions.
20470 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
20471 as hostio_last_error handler.
20472 (win32_target_ops) [!_WIN32_WCE]: Register
20473 hostio_last_error_from_errno as hostio_last_error handler.
20474 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
20475 (hostio-errno.o): New rule.
20476 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
20477 * configure.srv (srv_hostio_err_objs): New variable. Default to
20478 hostio-errno.o.
20479 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
20480 * configure: Regenerate.
20481
20482 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
20483
20484 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
20485 (linux_kill, linux_detach): Clean up the process list.
20486 * remote-utils.c (remote_open): Improve port number parsing.
20487 (putpkt_binary, input_interrupt): Only send interrupts if the target
20488 is running.
20489 * server.c (extended_protocol): Make static.
20490 (attached): Define earlier.
20491 (exit_requested, response_needed, program_argv): New variables.
20492 (target_running): New.
20493 (start_inferior): Clear attached here.
20494 (attach_inferior): Set attached here.
20495 (require_running): Define.
20496 (handle_query): Use require_running and target_running. Implement
20497 "monitor exit".
20498 (handle_v_attach, handle_v_run): New.
20499 (handle_v_requests): Use require_running. Handle vAttach and vRun.
20500 (gdbserver_usage): Update.
20501 (main): Redo argument parsing. Handle --debug and --multi. Handle
20502 --attach along with other options or after the port. Save
20503 program_argv. Support no initial program. Resynchronize
20504 communication with GDB after an error. Handle "monitor exit".
20505 Use require_running and target_running. Always allow the extended
20506 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
20507 restart in extended mode.
20508 * README: Refer to the GDB manual. Update --attach usage.
20509
20510 2007-12-20 Andreas Schwab <schwab@suse.de>
20511
20512 * linux-low.c (STACK_SIZE): Define.
20513 (linux_tracefork_child): Use it. Use __clone2 on ia64.
20514 (linux_test_for_tracefork): Likewise.
20515
20516 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
20517
20518 * linux-low.c (linux_wait_for_event): Update messages. Do not
20519 reinsert auto-delete breakpoints.
20520 * mem-break.c (struct breakpoint): Change return type of handler to
20521 int.
20522 (set_breakpoint_at): Update handler type.
20523 (reinsert_breakpoint_handler): Return 1 instead of calling
20524 delete_breakpoint.
20525 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
20526 setting a new one.
20527 (check_breakpoints): Delete auto-delete breakpoints and return 2.
20528 * mem-break.h (set_breakpoint_at): Update handler type.
20529 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
20530 * win32-low.c (auto_delete_breakpoint): New.
20531 (get_child_debug_event): Use it.
20532
20533 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
20534
20535 * configure.ac: Check for pread and pwrite.
20536 * hostio.c (handle_pread): Fall back to lseek and read.
20537 (handle_pwrite): Fall back to lseek and write.
20538 * config.in, configure: Regenerated.
20539
20540 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
20541
20542 * server.c (myresume): Add own_buf argument.
20543 (main): Update calls.
20544
20545 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
20546
20547 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
20548 * remote-utils.c (remote_open): Do not call disable_async_io.
20549 (block_async_io): Delete.
20550 (unblock_async_io): Make static.
20551 (initialize_async_io): New.
20552 * server.c (handle_v_cont): Handle async I/O here.
20553 (myresume): Likewise. Move other common resume tasks here...
20554 (main): ... from here. Call initialize_async_io. Disable async
20555 I/O before the main loop.
20556 * server.h (initialize_async_io): Declare.
20557 (block_async_io, unblock_async_io): Delete prototypes.
20558 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
20559
20560 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
20561
20562 * remote-utils.c (readchar): Allow binary data in received messages.
20563
20564 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20565
20566 * win32-low.c (attaching): New global.
20567 (win32_create_inferior): Clear the `attaching' global.
20568 (win32_attach): Set the `attaching' global.
20569 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
20570 attaching. Only set a breakpoint at the entry point if not
20571 attaching.
20572
20573 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20574
20575 * server.c (main): Don't report dll events on the initial
20576 connection on attaches.
20577
20578 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20579
20580 * server.c (main): Relax numerical bases supported for the pid of
20581 the --attach command line argument.
20582
20583 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20584
20585 * win32-low.c (win32_attach): Call OpenProcess before
20586 DebugActiveProcess, not after. Add last error output to error
20587 call.
20588
20589 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20590
20591 * win32-low.c (win32_get_thread_context)
20592 (win32_set_thread_context): New functions.
20593 (thread_rec): Use win32_get_thread_context.
20594 (continue_one_thread, win32_resume): Use win32_set_thread_context.
20595 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
20596 field.
20597
20598 2007-12-03 Leo Zayas
20599 Pedro Alves <pedro_alves@portugalmail.pt>
20600
20601 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
20602 global variables.
20603 (child_add_thread): Minor cleanup.
20604 (child_continue): Resume artificially suspended threads before
20605 calling ContinueDebugEvent.
20606 (suspend_one_thread): New.
20607 (fake_breakpoint_event): New.
20608 (get_child_debug_event): Change return type to int. Check here if
20609 gdb sent an interrupt request. If a soft interrupt was requested,
20610 fake a breakpoint event. Return 0 if there is no event to handle,
20611 and 1 otherwise.
20612 (win32_wait): Don't check here if gdb sent an interrupt request.
20613 Ensure there is a valid event to handle.
20614 (win32_request_interrupt): Add soft interruption method as last
20615 resort.
20616
20617 2007-12-03 Leo Zayas
20618 Pedro Alves <pedro_alves@portugalmail.pt>
20619
20620 * win32-low.h (win32_thread_info): Add descriptions to the
20621 structure members. Replace `suspend_count' counter by a
20622 `suspended' flag.
20623 * win32-low.c (thread_rec): Update condition of when to get the
20624 context from the inferior. Rely on ContextFlags being set if it
20625 has already been retrieved. Only suspend the inferior thread if
20626 we haven't already. Warn if that fails.
20627 (continue_one_thread): s/suspend_count/suspended/. Only call
20628 ResumeThread once. Warn if that fails.
20629
20630 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20631
20632 * win32-low.c (win32_wait): Don't read from the inferior when it
20633 has already exited.
20634
20635 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20636
20637 * Makefile.in (win32_low_h): New variable.
20638 (win32-low.o): Add dependency on $(win32_low_h).
20639 (win32-arm-low.o, win32-i386-low.o): New rules.
20640
20641 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20642
20643 * hostio.c: Correct copyright year.
20644
20645 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20646
20647 * Makefile.in (OBS): Add hostio.o.
20648 (hostio.o): New rule.
20649 * server.h (handle_vFile): Declare.
20650 * hostio.c: New file.
20651 * server.c (handle_v_requests): Take packet_len and new_packet_len
20652 for binary packets. Call handle_vFile.
20653 (main): Update call to handle_v_requests.
20654
20655 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
20656
20657 * linux-low.c: Include <sched.h>.
20658
20659 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
20660
20661 * linux-low.c (linux_tracefork_grandchild): New.
20662 (linux_tracefork_child): Use clone.
20663 (linux_test_for_tracefork): Use clone; allocate and free a stack.
20664
20665 2007-10-31 Joel Brobecker <brobecker@adacore.com>
20666
20667 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
20668
20669 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
20670
20671 * linux-low.c (handle_extended_wait): Handle unexpected signals.
20672
20673 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
20674
20675 * inferiors.c (change_inferior_id): Delete.
20676 (add_pid_to_list, pull_pid_from_list): New.
20677 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
20678 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
20679 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
20680 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
20681 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
20682 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
20683 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
20684 (using_threads): Always set to 1.
20685 (handle_extended_wait): New.
20686 (add_process): Do not set TID.
20687 (linux_create_inferior): Set must_set_ptrace_flags.
20688 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
20689 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
20690 (linux_thread_alive): Rename TID argument to LWPID.
20691 (linux_wait_for_process): Handle unknown processes. Do not use TID.
20692 (linux_wait_for_event): Do not use TID or check using_threads. Update
20693 call to dead_thread_notify. Call handle_extended_wait.
20694 (linux_create_inferior): Use PTRACE_SETOPTIONS.
20695 (send_sigstop): Delete sigstop_sent.
20696 (wait_for_sigstop): Avoid TID.
20697 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
20698 (linux_test_for_tracefork): New.
20699 (linux_lookup_signals): Use thread_db_active and
20700 linux_supports_tracefork_flag.
20701 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
20702 * linux-low.h (get_process_thread): Avoid TID.
20703 (struct process_ifo): Move thread_known and tid to the end. Remove
20704 sigstop_sent.
20705 (linux_attach_lwp, thread_db_init): Update prototypes.
20706 * server.h (change_inferior_id): Delete prototype.
20707 (add_pid_to_list, pull_pid_from_list): New prototypes.
20708 * thread-db.c (thread_db_use_events): New.
20709 (find_first_thread): Rename to...
20710 (find_one_thread): ...this. Update callers and messages. Do not
20711 call fatal. Check thread_db_use_events. Do not call
20712 change_inferior_id or new_thread_notify.
20713 (maybe_attach_thread): Update. Do not call new_thread_notify.
20714 (thread_db_init): Set thread_db_use_events. Check use_events.
20715 * utils.c (fatal, warning): Correct message prefix.
20716
20717 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
20718
20719 * Makefile.in (clean): Remove new files.
20720 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
20721 (powerpc-64.o, powerpc-64.c): New rules.
20722 * configure.srv: Use alternate register sets for powerpc64-*-linux*
20723 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
20724 with SPE.
20725 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
20726 SPE targets.
20727 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
20728 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
20729 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
20730 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
20731 (target_regsets): Add AltiVec and SPE register sets.
20732 * configure.ac: Check for AltiVec and SPE.
20733 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
20734 (ppc_fill_vrregset, ppc_store_vrregset): New.
20735 (target_regsets): Add AltiVec register set.
20736 * configure: Regenerated.
20737
20738 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
20739
20740 * linux-low.c (O_LARGEFILE): Define.
20741 (linux_read_memory): Use /proc/PID/mem.
20742 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
20743 * configure, config.in: Regenerated.
20744
20745 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
20746
20747 * linux-low.c (linux_wait_for_event): Do not pass signals while
20748 single-stepping.
20749
20750 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20751
20752 * win32-low.c (create_process): New.
20753 (win32_create_inferior): Use create_process instead of
20754 CreateProcess. If create_process failed retry appending an ".exe"
20755 suffix. Store the GetLastError result immediatelly after
20756 create_process calls and use it on the call to error.
20757
20758 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20759
20760 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
20761
20762 2007-08-23 Joel Brobecker <brobecker@adacore.com>
20763
20764 * configure.ac: Switch license to GPLv3.
20765
20766 2007-08-01 Michael Snyder <msnyder@access-company.com>
20767
20768 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
20769
20770 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
20771
20772 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
20773 typedef.
20774 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
20775 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
20776 CloseToolhelp32Snapshot.
20777 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
20778 CloseToolhelp32Snapshot.
20779
20780 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
20781
20782 * server.c (main): Check for inferior exit before main loop.
20783
20784 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
20785
20786 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
20787 instead of on tmp_desc.
20788
20789 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
20790 Daniel Jacobowitz <dan@codesourcery.com>
20791
20792 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
20793 (add_thread): Minor cleanups.
20794 (clear_inferiors): Move lower in the file. Clear the DLL
20795 list.
20796 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
20797 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
20798 (xml_escape_text): New.
20799 * server.c (handle_query): Handle qXfer:libraries:read. Report it
20800 for qSupported.
20801 (handle_v_cont): Report errors.
20802 (gdbserver_version): Update.
20803 (main): Correct size of own_buf. Do not report initial DLL events.
20804 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
20805 (unloaded_dll, xml_escape_text): New.
20806 * win32-low.c (enum target_waitkind): Update comments.
20807 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
20808 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
20809 (win32_EnumProcessModules, win32_GetModuleInformation)
20810 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
20811 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
20812 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
20813 (win32_Module32First, win32_Module32Next, load_toolhelp)
20814 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
20815 (get_child_debug_event): Handle DLL events.
20816 (win32_wait): Likewise.
20817
20818 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
20819
20820 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
20821 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
20822
20823 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20824
20825 * win32-low.c (handle_output_debug_string): Ignore event if not
20826 waiting.
20827
20828 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20829
20830 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
20831
20832 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
20833
20834 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
20835
20836 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
20837
20838 * inferiors.c (change_inferior_id): Add comment.
20839 * linux-low.c (check_removed_breakpoint): Add an early
20840 prototype. Improve debug output.
20841 (linux_attach): Doc update.
20842 (linux_detach_one_process, linux_detach): Clean up before releasing
20843 each process.
20844 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
20845 * linux-low.h (struct process_info): Doc improvement.
20846 * mem-break.c (delete_all_breakpoints): New.
20847 * mem-break.h (delete_all_breakpoints): New prototype.
20848 * thread-db.c (find_first_thread): New.
20849 (thread_db_create_event): Call it instead of
20850 thread_db_find_new_threads. Clean up unused variables.
20851 (maybe_attach_thread): Remove first thread handling.
20852 (thread_db_find_new_threads): Use find_first_thread.
20853 (thread_db_get_tls_address): Likewise.
20854
20855 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
20856
20857 * thread-db.c (thread_db_find_new_threads): Add prototype.
20858 (thread_db_create_event): Check for the main thread before adding
20859 a new thread.
20860 (maybe_attach_thread): Only enable event reporting if TID == 0.
20861 (thread_db_get_tls_address): Check for new threads.
20862
20863 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
20864
20865 * linux-low.c (linux_create_inferior): Try execv before execvp.
20866 * spu-low.c (spu_create_inferior): Likewise.
20867
20868 2007-06-13 Mike Frysinger <vapier@gentoo.org>
20869
20870 * linux-low.c (linux_create_inferior): Change execv to execvp.
20871 * spu-low.c (spu_create_inferior): Likewies.
20872
20873 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
20874
20875 * Makefile.in (clean): Clean new files instead of deleted ones.
20876 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
20877 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
20878 rules.
20879 * configure.srv: Specify XML files and new regformats for MIPS and
20880 MIPS64 GNU/Linux.
20881 * linux-mips-low.c (mips_num_regs): Set to only used registers.
20882 (mips_regmap): Do not fetch $0. Remove unused registers. Add
20883 an entry for the restart register.
20884 (mips_cannot_fetch_register, mips_cannot_store_register)
20885 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
20886 register names to match the XML descriptions.
20887 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
20888 restart register instead of $0.
20889
20890 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20891 Markus Deuling <deuling@de.ibm.com>
20892
20893 * remote-utils.c (decode_xfer_write): New function.
20894 * server.h (decode_xfer_write): Add prototype.
20895 * server.c (handle_query): Add PACKET_LEN argument. Support
20896 qXfer:spu:read and qXfer:spu:write packets.
20897 (main): Pass packet_len to handle_query.
20898 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
20899 * target.h (target_ops): Add qxfer_spu.
20900
20901 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20902
20903 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
20904 accessing non-seekable spufs files.
20905
20906 2007-05-16 Markus Deuling <deuling@de.ibm.com>
20907
20908 * server.c (handle_query): Add reply for qC packet.
20909
20910 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20911 Leo Zayas <lerele@champenstudios@com>
20912
20913 * server.h (check_remote_input_interrupt_request): New function.
20914 * remote_utils.c (INVALID_DESCRIPTOR): New define.
20915 (remote_desc): Initialize with INVALID_DESCRIPTOR.
20916 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
20917 (check_remote_input_interrupt_request): New function.
20918 * server.h (check_remote_input_interrupt_request): Declare.
20919 * win32-low.c (winapi_DebugBreakProcess,
20920 winapi_GenerateConsoleCtrlEvent): New typedefs.
20921 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
20922 to 250 ms.
20923 (win32_wait): Check for remote interrupt request
20924 with check_remote_input_interrupt_request.
20925 (win32_request_interrupt): New function.
20926 (win32_target_op): Set request_interrupt to win32_request_interrupt.
20927
20928 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20929
20930 * win32-low.c (debug_registers_changed,
20931 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
20932 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
20933 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
20934 (thread_rec): Get context using the low target.
20935 (child_add_thread): Call thread_added on the low target,
20936 which does the same thing.
20937 (regptr): Delete.
20938 (do_initial_child_stuff): Remove debug registers references.
20939 Set context using the low target. Resume threads after
20940 setting the contexts.
20941 (child_continue): Remove dead variable. Remove debug
20942 registers references.
20943 (child_fetch_inferior_registers): Go through the low target.
20944 (do_child_store_inferior_registers): Remove.
20945 (child_store_inferior_registers): Go through the low target.
20946 (win32_resume): Remove debug registers references.
20947 Set context using the low target.
20948 (handle_exception): Change return type to void. Don't record
20949 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
20950 first chance exception.
20951 (get_child_debug_event): Change return type to void. Remove
20952 goto loop. Always return after waiting for debug event.
20953 (win32_wait): Convert to switch statement. Handle spurious
20954 events.
20955
20956 * win32-i386-low.c (debug_registers_changed,
20957 debug_registers_used): New.
20958 (initial_stuff): Rename to ...
20959 (i386_initial_stuff): ... this. Clear debug registers
20960 state variables.
20961 (store_debug_registers): Delete.
20962 (i386_get_thread_context): New.
20963 (load_debug_registers): Delete.
20964 (i386_set_thread_context): New.
20965 (i386_thread_added): New.
20966 (single_step): Rename to ...
20967 (i386_single_step): ... this.
20968 (do_fetch_inferior_registers): Rename to ...
20969 (i386_fetch_inferior_register): ... this.
20970 (i386_store_inferior_register): New.
20971 (the_low_target): Adapt to new interface.
20972
20973 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
20974 (arm_get_thread_context): New.
20975 (arm_set_thread_context): New.
20976 (regptr): New.
20977 (do_fetch_inferior_registers): Rename to ...
20978 (arm_fetch_inferior_register): ... this.
20979 (arm_store_inferior_register): New.
20980 (arm_wince_breakpoint): Reimplement as unsigned long.
20981 (arm_wince_breakpoint_len): Define.
20982 (the_low_target): Adapt to new interface.
20983
20984 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
20985 load_debug_registers. Add get_thread_context, set_thread_context,
20986 thread_added and store_inferior_register. Rename
20987 fetch_inferior_registers to fetch_inferior_register.
20988 (regptr): Remove declaration.
20989
20990 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20991
20992 * linux-low.c (linux_detach): Change return type to int. Return 0.
20993 * spu-low.c (spu_detach): Likewise.
20994
20995 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20996
20997 * target.h (target_ops): Change return type of detach to int.
20998 Add join.
20999 (join_inferior): New.
21000 * server.c (main): Don't skip detach support on mingw32.
21001 If the inferior doesn't support detaching return error.
21002 Call join_inferior instead of using waitpid.
21003 * linux-low.c (linux_join): New.
21004 (linux_target_op): Add linux_join.
21005 * spu-low.c (spu_join): New.
21006 (spu_target_ops): Add spu_join.
21007 * win32-low.c (win32_detach): Adapt to new interface.
21008 Reopen current_process_handle before detaching. Issue a child
21009 resume before detaching.
21010 (win32_join): New.
21011 (win32_target_op): Add win32_join.
21012
21013 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21014
21015 * win32-low.c (win32-attach): Fix return value.
21016 * target.h (target_ops): Describe ATTACH return values.
21017
21018 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21019
21020 * win32-low.c (GETPROCADDRESS): Define.
21021 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
21022 (winapi_DebugSetProcessKillOnExit): Likewise.
21023 (win32_create_inferior): Force usage of ansi CreateProcessA.
21024 (win32_attach): Use GETPROCADDRESS.
21025 (win32_detach): Likewise.
21026
21027 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21028
21029 * win32-low.c (win32_wait): Don't use WSTOPSIG.
21030
21031 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
21032
21033 * win32-low.c: Commit leftover changes from 2007-03-29.
21034
21035 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
21036
21037 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
21038 fields short instead of int. Add explicit padding.
21039 (i387_cache_to_fsave): Remove unnecessary casts.
21040 (i387_fsave_to_cache): Doc fix.
21041 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
21042
21043 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
21044
21045 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
21046 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
21047
21048 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
21049
21050 * configure.srv (arm*-*-mingw32ce*): Move near the other
21051 arm targets.
21052
21053 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
21054
21055 * configure.ac: Add errno checking.
21056 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
21057 sys/file.h and malloc.h.
21058 (AC_CHECK_DECLS): Add perror.
21059 (srv_mingwce): Handle.
21060 * configure.srv (i[34567]86-*-cygwin*): Add
21061 win32-i386-low.o to srv_tgtobj.
21062 (i[34567]86-*-mingw*): Likewise.
21063 (arm*-*-mingw32ce*): Add case.
21064 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
21065 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
21066 [__MINGW32CE__] (strerror): New function.
21067 [__MINGW32CE__] (errno): Define to GetLastError.
21068 [__MINGW32CE__] (COUNTOF): New macro.
21069 (remote_open): Remove extra close call.
21070 * mem-break.c (delete_breakpoint_at): New function.
21071 * mem-break.h (delete_breakpoint_at): Declare.
21072 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
21073 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
21074 [USE_WIN32API] (read, write): Add char* casts.
21075 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
21076 * server.h: Include wincecompat.h on Windows CE.
21077 [HAVE_ERRNO_H]: Check.
21078 (perror): Declare if not declared.
21079 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
21080 (perror_with_name): Remove errno declaration.
21081 * wincecompat.h: New.
21082 * wincecompat.c: New.
21083 * win32-low.h: New.
21084 * win32-arm-low.c: New.
21085 * win32-i386-low.c: New.
21086 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
21087 (OUTMSG2): Make it safe.
21088 (_T): New macro.
21089 (COUNTOF): New macro.
21090 (NUM_REGS): Get it from the low target.
21091 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
21092 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
21093 (thread_rec): Let low target handle debug registers.
21094 (child_add_thread): Likewise.
21095 (child_init_thread_list): Likewise.
21096 (continue_one_thread): Likewise.
21097 (regptr): New.
21098 (do_child_fetch_inferior_registers): Move to ...
21099 * win32-i386-low.c: ... here, and rename to ...
21100 (do_fetch_inferior_registers): ... this.
21101 * win32-low.c (child_fetch_inferior_registers):
21102 Go through the low target.
21103 (do_child_store_inferior_registers): Use regptr.
21104 (strwinerror): New function.
21105 (win32_create_inferior): Handle Windows CE.
21106 Use strwinerror instead of strerror on Windows error
21107 codes. Add program to the error output.
21108 Don't close the main thread handle on Windows CE.
21109 (win32_attach): Use coredll.dll on Windows CE.
21110 (win32_kill): Close current process and current
21111 thread handles.
21112 (win32_detach): Use coredll.dll on Windows CE.
21113 (win32_resume): Let low target handle debug registers, and
21114 step request.
21115 (handle_exception): Add/Remove initial breakpoint. Avoid
21116 non-existant WSTOPSIG on Windows CE.
21117 (win32_read_inferior_memory): Cast to remove warning.
21118 (win32_arch_string): Go through the low target.
21119 (initialize_low): Call set_breakpoint_data with the low
21120 target's breakpoint.
21121 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
21122 FOP_REGNUM, mappings): Move to ...
21123 * win32-i386-low.c: ... here.
21124 * win32-low.c (win32_thread_info): Move to ...
21125 * win32-low.h: ... here.
21126 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
21127 win32-arm-low.c and wincecompat.c.
21128 (all:): Add $EXEEXT.
21129 (install-only:): Likewise.
21130 (gdbserver:): Likewise.
21131 (gdbreplay:): Likewise.
21132 * config.in: Regenerate.
21133 * configure: Regenerate.
21134
21135 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
21136
21137 * win32-low.c: Rename typedef thread_info to
21138 win32_thread_info throughout.
21139
21140 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
21141
21142 * win32-i386-low.c: Rename to ...
21143 * win32-low.c: ... this.
21144 * configure.srv: Replace win32-i386-low.o with win32-low.o.
21145 * Makefile.in: Likewise.
21146
21147 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
21148
21149 * remote-utils.c (monitor_output): Constify msg parameter.
21150 * server.h (monitor_output): Likewise.
21151 * win32-i386-low.c (handle_output_debug_string): New.
21152 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
21153 handle_output_debug_string.
21154 (get_child_debug_event): Likewise.
21155
21156 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
21157
21158 * server.c (main): Correct strtoul check.
21159
21160 2007-03-27 Jon Ringle <jon@ringle.org>
21161
21162 * linux-low.c: Check __ARCH_HAS_MMU__ also.
21163
21164 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
21165
21166 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
21167
21168 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
21169
21170 * terminal.h: Check HAVE_SGTTY_H.
21171
21172 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
21173
21174 * remote-utils.c (remote_open): Print out the assigned port number.
21175
21176 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
21177
21178 * remote-utils.c (monitor_output): New function.
21179 * server.c (debug_threads): Define here.
21180 (monitor_show_help): New function.
21181 (handle_query): Handle qRcmd.
21182 (main): Do not handle 'd' packet.
21183 * server.h (debug_threads, remote_debug, monitor_output): Declare.
21184 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
21185 of debug_threads.
21186
21187 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21188
21189 * Makefile.in (EXEEXT): New.
21190 (clean): Use $(EXEEXT).
21191
21192 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21193
21194 * target.h (target_ops): Rename send_signal to request_interrupt,
21195 and remove enum target_signal parameter.
21196 * linux-low.c (linux_request_interrupt): Rename from
21197 linux_send_signal, and always send SIGINT.
21198 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
21199 and always send SIGINT.
21200 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
21201 of send_signal.
21202 (input_interrupt): Likewise.
21203
21204 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21205
21206 * server.c (get_features_xml): Check if target implemented
21207 arch_string.
21208 * win32-i386-low.c (win32_arch_string): New.
21209 (win32_target_ops): Add win32_arch_string as arch_string member.
21210
21211 2007-02-22 Markus Deuling <deuling@de.ibm.com>
21212
21213 * spu-low.c (spu_arch_string): New.
21214 (spu_target_ops): Add spu_arch_string.
21215
21216 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
21217
21218 * remote-utils.c: Remove HAVE_TERMINAL_H check.
21219 * configure.ac: Do not check for terminal.h.
21220 * configure, config.in: Regenerated.
21221
21222 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
21223
21224 * Makefile.in (OBS): Add $(XML_BUILTIN).
21225 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
21226 (clean): Update.
21227 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
21228 (arm-with-iwmmxt.c): New.
21229 * config.in, configure: Regenerate.
21230 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
21231 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
21232 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
21233 (arm*-*-linux*): Add iWMMXt and regset support.
21234 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
21235 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
21236 (arm_store_wmmxregset, target_regsets): New.
21237 * server.c (get_features_xml): Take annex argument. Check builtin
21238 XML documents.
21239 (handle_query): Handle multiple annexes.
21240
21241 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
21242
21243 * remote-utils.c [USE_WIN32API] (read, write): Define.
21244 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
21245 write.
21246
21247 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
21248
21249 * linux-i386-low.c (the_low_target): Set arch_string.
21250 * linux-x86-64-low.c (the_low_target): Likewise.
21251 * linux-low.c (linux_arch_string): New.
21252 (linux_target_ops): Add it.
21253 * linux-low.h (struct linux_target_ops): Add arch_string.
21254 * server.c (write_qxfer_response): Use const void * for DATA.
21255 (get_features_xml): New.
21256 (handle_query): Handle qXfer:features:read. Report it for qSupported.
21257 * target.h (struct target_ops): Add arch_string method.
21258
21259 2007-01-03 Denis Pilat <denis.pilat@st.com>
21260 Daniel Jacobowitz <dan@codesourcery.com>
21261
21262 * linux-low.c (linux_kill): Handle being called with no threads.
21263 * win32-i386-low.c (win32_kill): Likewise.
21264 (get_child_debug_event): Clear current_process_handle.
21265
21266 2006-12-30 Denis PILAT <denis.pilat@st.com>
21267 Daniel Jacobowitz <dan@codesourcery.com>
21268
21269 * remote-utils.c (remote_open): Check the type of specified
21270 serial port devices before opening them.
21271 * server.c (main): Kill the inferior if an error occurs during
21272 the first remote_open.
21273
21274 2006-12-05 Markus Deuling <deuling@de.ibm.com>
21275
21276 * README: Update supported targets.
21277
21278 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
21279
21280 * Makefile.in (clean): Remove reg-mips64.c.
21281 (reg-mips64.c, reg-mips64.o): New rules.
21282 * configure.srv: Handle mips64. Include regset support for mips.
21283 * linux-mips-low.c (union mips_register): New.
21284 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
21285 (mips_breakpoint, mips_breakpoint_at): Use int.
21286 (mips_collect_register, mips_supply_register)
21287 (mips_collect_register_32bit, mips_supply_register_32bit)
21288 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
21289 (mips_store_fpregset, target_regsets): New.
21290 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
21291
21292 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
21293
21294 * configure.srv: Add target "spu*-*-*".
21295 * Makefile.in (clean): Remove reg-spu.c.
21296 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
21297 * spu-low.c: New file.
21298
21299 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
21300
21301 * configure.ac: Correct td_thr_tls_get_addr test.
21302 * configure: Regenerated.
21303
21304 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
21305
21306 * linux-low.c (linux_wait_for_event): Reformat. Use the
21307 pass_signals array.
21308 * remote-utils.c (decode_address_to_semicolon): New.
21309 * server.c (pass_signals, handle_general_set): New.
21310 (handle_query): Mention QPassSignals for qSupported.
21311 (main): Call handle_general_set.
21312 * server.h (pass_signals, decode_address_to_semicolon): New.
21313
21314 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
21315
21316 * server.c (handle_query): Correct error handling for read_auxv.
21317
21318 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
21319
21320 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
21321 and srv_linux_thread_db to yes.
21322 * linux-s390-low.c (s390_fill_gregset): New function.
21323 (target_regsets): Define data structure.
21324
21325 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
21326
21327 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
21328 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
21329 * config.in, configure: Regenerated.
21330 * inferiors.c (gdb_id_to_thread): New function.
21331 (gdb_id_to_thread_id): Use it.
21332 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
21333 * linux-low.h (struct process_info): Add th member.
21334 (thread_db_get_tls_address): New prototype.
21335 * remote-utils.c (decode_address): Make non-static.
21336 * server.c (handle_query): Handle qGetTLSAddr.
21337 * server.h (gdb_id_to_thread, decode_address): New prototypes.
21338 * target.h (struct target_ops): Add get_tls_address.
21339 * thread-db.c (maybe_attach_thread): Save the thread handle.
21340 (thread_db_get_tls_address): New.
21341
21342 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
21343
21344 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
21345 (linux_resume_one_process): Take a siginfo_t *. Update all
21346 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
21347 (struct pending_signals): Add a siginfo_t.
21348 (linux_wait_for_process): Always set last_status.
21349 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
21350 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
21351 * linux-low.h (struct process_info): Add last_status.
21352
21353 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
21354
21355 * remote-utils.c (try_rle): New function.
21356 (putpkt_binary): Use it.
21357
21358 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
21359
21360 * Makefile.in (clean): Clean reg-x86-64-linux.c.
21361 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
21362 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
21363 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
21364 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
21365 point registers.
21366
21367 2006-08-08 Richard Sandiford <richard@codesourcery.com>
21368
21369 * server.c (terminal_fd): New variable.
21370 (old_foreground_pgrp): Likewise.
21371 (restore_old_foreground_pgrp): New function.
21372 (start_inferior): Record the terminal file descriptor in terminal_fd
21373 and its original foreground group in old_foreground_pgrp. Register
21374 restore_old_foreground_pgrp with atexit().
21375
21376 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
21377
21378 * server.c (handle_query): Correct qPart to qXfer.
21379
21380 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
21381
21382 * configure.ac: Check for more headers which are missing on
21383 Windows. Automatically supply -lwsock32 and USE_WIN32API.
21384 * configure.srv: Add Cygwin and mingw32.
21385 * remote-utils.c: Don't include headers unconditionally which
21386 are missing on mingw32. Include <winsock.h> for mingw32.
21387 (remote_open): Adjust for mingw32 support. Flush
21388 standard error after writing to it.
21389 (remote_close, putpkt_binary, input_interrupt, block_async_io)
21390 (unblock_async_io, enable_async_io, disable_async_io)
21391 (readchar, getpkt): Update for Winsock support.
21392 (prepare_resume_reply): Expect a protocol signal number.
21393 * server.c: Disable <sys/wait.h> on mingw32.
21394 (start_inferior): Adjust for mingw32 support. Flush
21395 standard error after writing to it.
21396 (attach_inferior): Likewise. Use protocol signal
21397 numbers.
21398 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
21399 and names.
21400 * win32-i386-low.c: New file.
21401 * Makefile.in (XM_CLIBS): Set.
21402 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
21403 (win32-i386-low.o): New dependency rule.
21404 * linux-low.c (linux_wait): Use target signal numbers.
21405 * target.h (struct target_ops): Doc fix.
21406 * server.h (target_signal_to_name): New prototype.
21407 * gdbreplay.c: Don't include headers unconditionally which
21408 are missing on mingw32. Include <winsock.h> for mingw32.
21409 (remote_close, remote_open): Adjust for Winsock support.
21410 * configure, config.in: Regenerated.
21411
21412 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
21413
21414 * server.c (decode_xfer_read, write_qxfer_response): New.
21415 (handle_query): Take a packet length argument. Handle
21416 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
21417 the qSupported response.
21418 (main): Update call to handle_query.
21419
21420 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
21421
21422 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
21423 (putpkt_binary): Renamed from putpkt and adjusted for binary
21424 data.
21425 (putpkt): New wrapper for putpkt_binary.
21426 (readchar): Don't mask off the high bit.
21427 (decode_X_packet): New function.
21428 * server.c (main): Call putpkt_binary if a handler sets the packet
21429 length. Save the length of the incoming packet. Handle 'X'.
21430 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
21431
21432 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
21433
21434 * server.c (handle_query): Handle qSupported.
21435
21436 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21437
21438 * remote-utils.c (all_symbols_looked_up): New variable.
21439 (look_up_one_symbol): Check it.
21440 * server.h (look_up_one_symbol): New declaration.
21441 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
21442
21443 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21444
21445 * Makefile.in (linux-arm-low.o): Update dependencies.
21446 * linux-arm-low.c: Include "gdb_proc_service.h".
21447 (PTRACE_GET_THREAD_AREA): Define.
21448 (ps_get_thread_area): New function.
21449
21450 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
21451
21452 * configure.srv (m68k*-*-uclinux*): New target.
21453 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
21454 (linux_resume_one_process): Remove extraneous cast.
21455 (linux_read_offsets): New.
21456 (linux_target_op): Add linux_read_offsets on mmuless systems.
21457 * server.c (handle_query): Add qOffsets logic.
21458 * target.h (struct target_ops): Add read_offsets.
21459
21460 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21461
21462 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
21463 (PTRACE_GET_THREAD_AREA): Define.
21464 (ps_get_thread_area): New function.
21465 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
21466 (linux-x86-64-low.o): Update.
21467
21468 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21469
21470 * configure.ac: Remove checks for prfpregset_t.
21471 * gdb_proc_service.h: New file.
21472 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
21473 new "gdb_proc_service.h".
21474 * proc-service.c: Likewise.
21475 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
21476 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
21477 * Makefile.in (gdb_proc_service_h): Updated.
21478 * configure, config.in: Regenerated.
21479
21480 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21481
21482 * remote-utils.c (prepare_resume_reply): Move declaration
21483 of gdb_id_from_wait to the top of the block.
21484
21485 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
21486
21487 * linux-low.c (regsets_store_inferior_registers): Read the regset
21488 from the target before filling it.
21489
21490 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
21491
21492 * server.c (attach_inferior): Return SIGTRAP for a successful
21493 attach.
21494
21495 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
21496
21497 * Makefile.in (OBS): Add version.o.
21498 (STAGESTUFF): Delete.
21499 (version.o): Add dependencies.
21500 (version.c): Replace rule.
21501 (clean): Remove version.c.
21502 * server.c (gdbserver_version): New.
21503 (gdbserver_usage): Use printf.
21504 (main): Handle --version and --help.
21505 * server.h (version, host_name): Add declarations.
21506
21507 2005-12-23 Eli Zaretskii <eliz@gnu.org>
21508
21509 * linux-arm-low.c:
21510 * linux-arm-low.c:
21511 * inferiors.c:
21512 * i387-fp.h:
21513 * i387-fp.c:
21514 * gdbreplay.c:
21515 * regcache.c:
21516 * proc-service.c:
21517 * mem-break.h:
21518 * mem-break.c:
21519 * linux-x86-64-low.c:
21520 * linux-sh-low.c:
21521 * linux-s390-low.c:
21522 * linux-ppc64-low.c:
21523 * linux-ppc-low.c:
21524 * linux-mips-low.c:
21525 * linux-m68k-low.c:
21526 * linux-m32r-low.c:
21527 * linux-low.h:
21528 * linux-low.c:
21529 * linux-ia64-low.c:
21530 * linux-i386-low.c:
21531 * linux-crisv32-low.c:
21532 * thread-db.c:
21533 * terminal.h:
21534 * target.h:
21535 * target.c:
21536 * server.h:
21537 * server.c:
21538 * remote-utils.c:
21539 * regcache.h:
21540 * utils.c:
21541 * Makefile.in:
21542 * configure.ac:
21543 * gdbserver.1: Add (C) after Copyright. Update the FSF
21544 address.
21545
21546 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
21547
21548 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
21549 (arm_breakpoint_at): Recognize both breakpoints.
21550 (the_low_target): Use the correct breakpoint instruction.
21551
21552 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
21553
21554 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
21555 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
21556 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
21557 (the_low_target): Update.
21558
21559 2005-10-25 Andreas Schwab <schwab@suse.de>
21560
21561 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
21562
21563 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
21564 (ia64_num_regs): Reduce to 462.
21565
21566 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
21567
21568 * acinclude.m4: Correct quoting.
21569 * aclocal.m4: Regenerated.
21570
21571 Suggested by SZOKOVACS Robert <szo@ies.hu>:
21572 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
21573 (thread_db_init): Call thread_db_err_str.
21574 * configure.ac: Check for TD_VERSION.
21575 * config.in, configure: Regenerated.
21576
21577 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21578
21579 * server.h (error, fatal, warning): Add ATTR_FORMAT.
21580
21581 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21582
21583 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
21584 is not available. Define HAVE_PTRACE_GETREGS if it is.
21585 * config.in, configure: Regenerated.
21586 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
21587 * linux-i386-low.c, linux-m68k-low.c: Update to use
21588 HAVE_PTRACE_GETREGS.
21589 * linux-low.c (regsets_fetch_inferior_registers)
21590 (regsets_store_inferior_registers): Only return 0 if we processed
21591 GENERAL_REGS.
21592 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
21593 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
21594
21595 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21596
21597 * inferiors.c (struct thread_info): Add gdb_id.
21598 (add_thread): Add gdb_id argument.
21599 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
21600 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
21601 calls to add_thread.
21602 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
21603 * server.c (handle_query): Use thread_to_gdb_id.
21604 (handle_v_cont, main): Use gdb_id_to_thread_id.
21605 * server.h (add_thread): Update prototype.
21606 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
21607 prototypes.
21608
21609 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21610
21611 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
21612 left-padded registers.
21613 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
21614 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
21615
21616 2005-07-01 Steve Ellcey <sje@cup.hp.com>
21617
21618 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
21619 * configure: Regenerate.
21620 * config.in: Regenerate.
21621 * server.h (NEED_DECLARATION_STRERROR):
21622 Replace with !HAVE_DECL_STRERROR.
21623
21624 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
21625
21626 * linux-low.c (linux_wait, linux_send_signal): Don't test
21627 an unsigned long variable for > 0 if it could be MAX_ULONG.
21628 * server.c (myresume): Likewise.
21629 * target.c (set_desired_inferior): Likewise.
21630
21631 2005-06-13 Mark Kettenis <kettenis@gnu.org>
21632
21633 * configure.ac: Simplify and improve check for socklen_t.
21634 * configure, config.in: Regenerate.
21635
21636 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
21637
21638 * acconfig.h: Remove.
21639 * configure.ac: Add a test for socklen_t. Use three-argument
21640 AC_DEFINE throughout.
21641 * config.in: Regenerated using autoheader 2.59.
21642 * configure: Regenerated.
21643
21644 * gdbreplay.c (socklen_t): Provide a default.
21645 (remote_open): Use socklen_t.
21646 * remote-utils.c (socklen_t): Provide a default.
21647 (remote_open): Use socklen_t.
21648 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
21649 unsigned char.
21650
21651 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
21652 char for buffers.
21653 * linux-low.c (linux_read_memory, linux_write_memory)
21654 (linux_read_auxv): Likewise.
21655 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
21656 (check_mem_write): Likewise.
21657 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
21658 Likewise.
21659 * regcache.c (struct inferior_rgcache_data, registers_to_string)
21660 (registers_from_string, register_data): Likewise.
21661 * server.c (handle_query, main): Likewise.
21662 * server.h (convert_ascii_to_int, convert_int_to_ascii)
21663 (decode_M_packet): Likewise.
21664 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
21665 * target.h (struct target_ops): Update read_memory, write_memory,
21666 and read_auxv.
21667 (read_inferior_memory, write_inferior_memory): Update.
21668 * linux-low.h (struct linux_target_ops): Change type of breakpoint
21669 to unsigned char *.
21670 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
21671 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
21672 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
21673 linux-s390-low.c, linux-sh-low.c: Update for changes in
21674 read_inferior_memory and the_low_target->breakpoint.
21675
21676 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
21677
21678 * Makefile.in (SFILES): Add linux-ppc64-low.c.
21679 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
21680 * configure.srv: Add powerpc64-*-linux*.
21681 * linux-ppc64-low.c: New file.
21682
21683 2005-05-23 Orjan Friberg <orjanf@axis.com>
21684
21685 * linux-cris-low.c: New file with support for CRIS.
21686 * linux-crisv32-low.c: Ditto for CRISv32.
21687 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
21688 (clean): Add reg-cris.c and reg-crisv32.c.
21689 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
21690 reg-crisv32.o, and reg-crisv32.c to make rules.
21691 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
21692 recognized targets.
21693
21694 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
21695
21696 * linux-low.c (fetch_register): Ensure buffer size is a multiple
21697 of sizeof (PTRACE_XFER_TYPE).
21698 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
21699
21700 2005-05-12 Orjan Friberg <orjanf@axis.com>
21701
21702 * target.h (struct target_ops): Add insert_watchpoint,
21703 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
21704 pointers for hardware watchpoint support.
21705 * linux-low.h (struct linux_target_ops): Ditto.
21706 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
21707 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
21708 to linux_target_ops.
21709 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
21710 reply packet.
21711 * server.c (main): Recognize 'Z' and 'z' packets.
21712
21713 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
21714
21715 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
21716 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
21717 (the_low_target): Add new members.
21718
21719 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21720
21721 * proc-service.c (ps_lgetregs): Search all_processes instead of
21722 all_threads.
21723
21724 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21725
21726 * server.c (start_inferior): Change return type to int.
21727 (attach_inferior): Change sigptr to int *.
21728 (handle_v_cont, handle_v_requests): Change signal to int *.
21729 (main): Change signal to int.
21730
21731 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
21732
21733 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
21734 * configure.srv: Add m32r*-*-linux*.
21735 * linux-m32r-low.c: New file.
21736
21737 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
21738
21739 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
21740
21741 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21742
21743 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
21744 Take unsigned long arguments for PIDs.
21745 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
21746 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
21747 (wait_for_sigstop, linux_resume_one_process)
21748 (regsets_fetch_inferior_registers, linux_send_signal)
21749 (linux_read_auxv): Likewise. Update the types of variables holding
21750 PIDs. Update format string specifiers.
21751 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
21752 * remote-utils.c (prepare_resume_reply): Likewise.
21753 * server.c (cont_thread, general_thread, step_thread)
21754 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
21755 unsigned long.
21756 (handle_query): Update format specifiers.
21757 (handle_v_cont, main): Use strtoul for thread IDs.
21758 * server.h (struct inferior_list_entry): Use unsigned long for ID.
21759 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
21760 (general_thread, step_thread, thread_from_wait)
21761 (old_thread_from_wait): Update.
21762 * target.h (struct thread_resume): Use unsigned long for THREAD.
21763 (struct target_ops): Use unsigned long for arguments to attach and
21764 thread_alive.
21765
21766 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
21767
21768 * acinclude.m4: Include bfd/bfd.m4 directly.
21769 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
21770 <agriffis@toolchain.org>.
21771 * aclocal.m4, configure: Regenerated.
21772
21773 2005-01-07 Andrew Cagney <cagney@gnu.org>
21774
21775 * configure.ac: Rename configure.in, require autoconf 2.59.
21776 * configure: Re-generate.
21777
21778 2004-12-08 Daniel Jacobowitz <dan@debian.org>
21779
21780 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
21781 LIBS when finished.
21782 * aclocal.m4: Regenerated.
21783 * configure: Regenerated.
21784
21785 2004-11-21 Andreas Schwab <schwab@suse.de>
21786
21787 * linux-m68k-low.c (m68k_num_gregs): Define.
21788 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
21789 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
21790 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
21791 (m68k_breakpoint_at): New. Add to the_low_target.
21792
21793 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
21794 srv_linux_thread_db to yes.
21795
21796 2004-10-20 Joel Brobecker <brobecker@gnat.com>
21797
21798 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
21799 (ARCH_SET_FS): Likewise.
21800 (ARCH_GET_FS): Likewise.
21801 (ARCH_GET_GS): Likewise.
21802
21803 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21804
21805 * linux-i386-low.c (ps_get_thread_area): New.
21806 * linux-x86-64-low.c (ps_get_thread_area): New.
21807 * linux-low.c: Include <sys/syscall.h>.
21808 (linux_kill_one_process): Don't kill the first thread here.
21809 (linux_kill): Kill the first thread here.
21810 (kill_lwp): New function.
21811 (send_sigstop, linux_send_signal): Use it.
21812 * proc-service.c: Clean up #ifdefs.
21813 (fpregset_info): Delete.
21814 (ps_lgetregs): Update and enable implementation.
21815 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
21816 implementations.
21817 * remote-utils.c (struct sym_cache, symbol_cache): New.
21818 (input_interrupt): Print a clearer message.
21819 (async_io_enabled): New variable.
21820 (enable_async_io, disable_async_io): Use it. Update comments.
21821 (look_up_one_symbol): Use the symbol cache.
21822 * thread-db.c (thread_db_look_up_symbols): New function.
21823 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
21824
21825 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21826
21827 * configure.in: Test for -rdynamic.
21828 * configure: Regenerated.
21829 * Makefile (INTERNAL_LDFLAGS): New.
21830 (gdbserver, gdbreplay): Use it.
21831
21832 2004-09-02 Andrew Cagney <cagney@gnu.org>
21833
21834 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
21835
21836 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
21837
21838 * linux-low.c (linux_wait): Clear all_processes list also.
21839
21840 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21841
21842 * linux-low.c: Include <errno.h>. Remove extern declaration of
21843 errno.
21844
21845 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21846
21847 * gdbreplay.c, server.h, utils.c: Update copyright years.
21848
21849 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21850
21851 * server.c (main): Print child status or termination signal from
21852 variable 'signal', not 'sig'.
21853
21854 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21855
21856 * linux-low.c (linux_read_memory): Change return type to
21857 int. Check for and return error from ptrace().
21858 * target.c (read_inferior_memory): Change return type to int. Pass
21859 back return status from the_target->read_memory().
21860 * target.h (struct target_ops): Adapt *read_memory() prototype.
21861 Update comment.
21862 (read_inferior_memory): Adapt prototype.
21863 * server.c (main): Return an error packet if
21864 read_inferior_memory() returns an error.
21865
21866 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
21867
21868 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
21869 Unify with other clean targets.
21870
21871 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21872
21873 * server.c (handle_v_cont): Call set_desired_inferior.
21874
21875 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21876
21877 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
21878
21879 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21880
21881 * linux-low.c (linux_wait): Unblock async I/O.
21882 (linux_resume): Block and enable async I/O.
21883 * remote-utils.c (block_async_io, unblock_async_io): New functions.
21884 * server.h (block_async_io, unblock_async_io): Add prototypes.
21885
21886 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21887
21888 * remote-utils.c (remote_open): Print a status notice after
21889 opening a TCP port.
21890 * server.c (attach_inferior): Print a status notice after
21891 attaching.
21892
21893 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21894
21895 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
21896
21897 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
21898
21899 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
21900 error packet.
21901 * server.c, target.h: Update copyright years.
21902
21903 2004-02-25 Roland McGrath <roland@redhat.com>
21904
21905 * target.h (struct target_ops): New member `read_auxv'.
21906 * server.c (handle_query): Handle qPart:auxv:read: query using that.
21907 * linux-low.c (linux_read_auxv): New function.
21908 (linux_target_ops): Initialize `read_auxv' member to that.
21909
21910 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
21911
21912 Committed by Jim Blandy <jimb@redhat.com>.
21913
21914 * linux-s390-low.c (s390_num_regs): Update.
21915 (s390_regmap): Remove control registers. Use __s390x__ predefine
21916 instead of GPR_SIZE to distiguish s390 and s390x targets.
21917
21918 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
21919
21920 * linux-low.c: Update copyright year.
21921 (check_removed_breakpoint): Clear pending_is_breakpoint.
21922 (linux_set_resume_request, linux_queue_one_thread)
21923 (resume_status_pending_p): New functions.
21924 (linux_continue_one_thread): Use process->resume.
21925 (linux_resume): Only resume threads if there are no pending events.
21926 * linux-low.h (struct process_info): Add resume request
21927 pointer.
21928
21929 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
21930
21931 * regcache.c (new_register_cache): Clear the allocated register
21932 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
21933
21934 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
21935
21936 * linux-low.c (linux_resume): Take a struct thread_resume *
21937 argument.
21938 (linux_wait): Update call.
21939 (resume_ptr): New static variable.
21940 (linux_continue_one_thread): Renamed from
21941 linux_continue_one_process. Use resume_ptr.
21942 (linux_resume): Use linux_continue_one_thread.
21943 * server.c (handle_v_cont, handle_v_requests): New functions.
21944 (myresume): New function.
21945 (main): Handle 'v' case.
21946 * target.h (struct thread_resume): New type.
21947 (struct target_ops): Change argument of "resume" to struct
21948 thread_resume *.
21949 (myresume): Delete macro.
21950
21951 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
21952
21953 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
21954 (uninstall): Support DESTDIR.
21955
21956 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
21957
21958 * configure.srv: Add xscale*linux copy of arm*linux entry.
21959
21960 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
21961
21962 * linux-arm-low.c (arm_reinsert_addr): New function.
21963 (the_low_target): Add arm_reinsert_addr.
21964
21965 2003-07-08 Mark Kettenis <kettenis@gnu.org>
21966
21967 * mem-break.c: Remove whitespace at end of file.
21968
21969 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
21970
21971 * configure.in: Check whether we need to prototype strerror.
21972 * server.h: Optionally prototype strerror.
21973 * gdbreplay.c (perror_with_name): Use strerror.
21974 * linux-low.c (linux_attach_lwp): Use strerror.
21975 * utils.c (perror_with_name): Use strerror.
21976 * config.in, configure: Regenerated.
21977
21978 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
21979
21980 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
21981 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
21982
21983 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
21984
21985 * Makefile.in (SFILES): Update.
21986 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
21987 low-sun3.c: Remove files.
21988
21989 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
21990
21991 * linux-low.c: Move comment to linux_thread_alive where it belonged.
21992 (linux_detach_one_process, linux_detach): New functions.
21993 (linux_target_ops): Add linux_detach.
21994 * server.c (main): Handle 'D' packet.
21995 * target.h (struct target_ops): Add "detach" member.
21996 (detach_inferior): Define.
21997
21998 2003-06-13 Mark Kettenis <kettenis@gnu.org>
21999
22000 From Kelley Cook <kelleycook@wideopenwest.com>:
22001 * configure.srv: Accept i[34567]86 variants.
22002
22003 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
22004
22005 * linux-low.c (linux_wait_for_event): Correct comment typos.
22006 (linux_resume_one_process): Call check_removed_breakpoint.
22007 (linux_send_signal): New function.
22008 (linux_target_ops): Add linux_send_signal.
22009 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
22010 of kill.
22011 * target.h (struct target_ops): Add send_signal.
22012
22013 2003-05-29 Jim Blandy <jimb@redhat.com>
22014
22015 * linux-low.c (usr_store_inferior_registers): Transfer buf in
22016 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
22017 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
22018 away part of the register's value.
22019
22020 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
22021
22022 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
22023 (linux_wait_for_event, linux_init_signals): Likewise.
22024
22025 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
22026
22027 * configure.in: Check for stdlib.h.
22028 * configure: Regenerated.
22029 * config.in: Regenerated.
22030
22031 2003-01-04 Andreas Schwab <schwab@suse.de>
22032
22033 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
22034
22035 2003-01-02 Andrew Cagney <ac131313@redhat.com>
22036
22037 * Makefile.in: Remove obsolete code.
22038
22039 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
22040
22041 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
22042 defined(PT_FPR0_HI).
22043
22044 2002-11-17 Stuart Hughes <seh@zee2.com>
22045
22046 * linux-arm-low.c (arm_num_regs): Increase.
22047 (arm_regmap): Include status register.
22048
22049 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
22050
22051 * linux-low.c (register_addr): Remove incorrect -1 check.
22052
22053 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
22054
22055 * linux-low.c (linux_create_inferior): Call setpgid. Return
22056 the new PID.
22057 (unstopped_p, linux_signal_pid): Remove.
22058 (linux_target_ops): Remove linux_signal_pid.
22059 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
22060 global instead of target method.
22061 * target.h (struct target_ops): Remove signal_pid. Update comment
22062 for create_inferior.
22063 * server.c (signal_pid): New variable.
22064 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
22065 gdbserver. Set the child to be the foreground process group.
22066 (attach_inferior): Set signal_pid.
22067
22068 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
22069
22070 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
22071
22072 2002-08-20 Jim Blandy <jimb@redhat.com>
22073
22074 * Makefile.in (LDFLAGS): Allow the configure script to establish a
22075 default for this.
22076
22077 2002-08-01 Andrew Cagney <cagney@redhat.com>
22078
22079 * Makefile.in: Make chill references obsolete.
22080
22081 2002-07-24 Kevin Buettner <kevinb@redhat.com>
22082
22083 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
22084 * configure: Regenerate.
22085 * config.in: Regenerate.
22086
22087 2002-07-09 David O'Brien <obrien@FreeBSD.org>
22088
22089 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
22090 (perror_with_name, remote_close, remote_open, expect, play): Static.
22091
22092 2002-07-04 Michal Ludvig <mludvig@suse.cz>
22093
22094 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
22095 byte offsets instead of an array of indexes.
22096 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
22097
22098 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
22099
22100 * regcache.c: Add comment.
22101
22102 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
22103
22104 * thread-db.c: New file.
22105 * proc-service.c: New file.
22106 * acinclude.m4: New file.
22107 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
22108 proc-service.o, and thread-db.o.
22109 (linux-low.o): Add USE_THREAD_DB.
22110 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
22111 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
22112 * aclocal.m4: Regenerated.
22113 * config.in: Regenerated.
22114 * configure: Regenerated.
22115 * configure.in: Check for proc_service.h, sys/procfs.h,
22116 thread_db.h, and linux/elf.h headrs.
22117 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
22118 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
22119 Check for -lthread_db and thread support.
22120 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
22121 PowerPC, and SuperH.
22122 * i387-fp.c: Constify arguments.
22123 * i387-fp.h: Likewise.
22124 * inferiors.c: (struct thread_info): Renamed from
22125 `struct inferior_info'. Remove PID member. Use generic inferior
22126 list header. All uses updated.
22127 (inferiors, signal_pid): Removed.
22128 (all_threads): New variable.
22129 (get_thread): Define.
22130 (add_inferior_to_list): New function.
22131 (for_each_inferior): New function.
22132 (change_inferior_id): New function.
22133 (add_inferior): Removed.
22134 (remove_inferior): New function.
22135 (add_thread): New function.
22136 (free_one_thread): New function.
22137 (remove_thread): New function.
22138 (clear_inferiors): Use for_each_inferior and free_one_thread.
22139 (find_inferior): New function.
22140 (find_inferior_id): New function.
22141 (inferior_target_data): Update argument type.
22142 (set_inferior_target_data): Likewise.
22143 (inferior_regcache_data): Likewise.
22144 (set_inferior_regcache_data): Likewise.
22145 * linux-low.c (linux_bp_reinsert): Remove.
22146 (all_processes, stopping_threads, using_thrads)
22147 (struct pending_signals, debug_threads, pid_of): New.
22148 (inferior_pid): Replace with macro.
22149 (struct inferior_linux_data): Remove.
22150 (get_stop_pc, add_process): New functions.
22151 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
22152 Use add_process and add_thread.
22153 (linux_attach_lwp): New function, based on old linux_attach. Use
22154 add_process and add_thread. Set stop_expected for new threads.
22155 (linux_attach): New function.
22156 (linux_kill_one_process): New function.
22157 (linux_kill): Kill all LWPs.
22158 (linux_thread_alive): Use find_inferior_id.
22159 (check_removed_breakpoints, status_pending_p): New functions.
22160 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
22161 Update. Use WNOHANG. Wait for cloned processes also. Update process
22162 struct for the found process.
22163 (linux_wait_for_event): New function.
22164 (linux_wait): Use it. Support LWPs.
22165 (send_sigstop, wait_for_sigstop, stop_all_processes)
22166 (linux_resume_one_process, linux_continue_one_process): New functions.
22167 (linux_resume): Support LWPs.
22168 (REGISTER_RAW_SIZE): Remove.
22169 (fetch_register): Use register_size instead. Call supply_register.
22170 (usr_store_inferior_registers): Likewise. Call collect_register.
22171 Fix recursive case.
22172 (regsets_fetch_inferior_registers): Improve error message.
22173 (regsets_store_inferior_registers): Add debugging.
22174 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
22175 (unstopped_p, linux_signal_pid): New functions.
22176 (linux_target_ops): Add linux_signal_pid.
22177 (linux_init_signals): New function.
22178 (initialize_low): Call it. Initialize using_threads.
22179 * regcache.c (inferior_regcache_data): Add valid
22180 flag.
22181 (get_regcache): Fetch registers lazily. Add fetch argument
22182 and update all callers.
22183 (regcache_invalidate_one, regcache_invalidate): New
22184 functions.
22185 (new_register_cache): Renamed from create_register_cache.
22186 Return the new regcache.
22187 (free_register_cache): Change argument to a void *.
22188 (registers_to_string, registers_from_string): Call get_regcache
22189 with fetch flag set.
22190 (register_data): Make static. Pass fetch flag to get_regcache.
22191 (supply_register): Call get_regcache with fetch flag clear.
22192 (collect_register): Call get_regcache with fetch flag set.
22193 (collect_register_as_string): New function.
22194 * regcache.h: Update.
22195 * remote-utils.c (putpkt): Flush after debug output and use
22196 stderr.
22197 Handle input interrupts while waiting for an ACK.
22198 (input_interrupt): Use signal_pid method.
22199 (getpkt): Flush after debug output and use stderr.
22200 (outreg): Use collect_register_as_string.
22201 (new_thread_notify, dead_thread_notify): New functions.
22202 (prepare_resume_reply): Check using_threads. Set thread_from_wait
22203 and general_thread.
22204 (look_up_one_symbol): Flush after debug output.
22205 * server.c (step_thread, server_waiting): New variables.
22206 (start_inferior): Don't use signal_pid. Update call to mywait.
22207 (attach_inferior): Update call to mywait.
22208 (handle_query): Handle qfThreadInfo and qsThreadInfo.
22209 (main): Don't fetch/store registers explicitly. Use
22210 set_desired_inferior. Support proposed ``Hs'' packet. Update
22211 calls to mywait.
22212 * server.h: Update.
22213 (struct inferior_list, struct_inferior_list_entry): New.
22214 * target.c (set_desired_inferior): New.
22215 (write_inferior_memory): Constify.
22216 (mywait): New function.
22217 * target.h: Update.
22218 (struct target_ops): New signal_pid method.
22219 (mywait): Removed macro, added prototype.
22220
22221 * linux-low.h (regset_func): Removed.
22222 (regset_fill_func, regset_store_func): New.
22223 (enum regset_type): New.
22224 (struct regset_info): Add type field. Use new operation types.
22225 (struct linux_target_ops): stop_pc renamed to get_pc.
22226 Add decr_pc_after_break and breakpoint_at.
22227 (get_process, get_thread_proess, get_process_thread)
22228 (strut process_info, all_processes, linux_attach_lwp)
22229 (thread_db_init): New.
22230
22231 * linux-arm-low.c (arm_get_pc, arm_set_pc,
22232 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
22233 (the_low_target): Add new members.
22234 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
22235 (i386_store_fpxregset): Constify.
22236 (target_regsets): Add new kind identifier.
22237 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
22238 (i386_set_pc): Add debugging.
22239 (i386_breakpoint_at): New function.
22240 (the_low_target): Add new members.
22241 * linux-mips-low.c (mips_get_pc, mips_set_pc)
22242 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
22243 (mips_breakpoint_at): New.
22244 (the_low_target): Add new members.
22245 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
22246 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
22247 (the_low_target): Add new members.
22248 * linux-sh-low.c (sh_get_pc, sh_set_pc)
22249 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
22250 (the_low_target): Add new members.
22251 * linux-x86-64-low.c (target_regsets): Add new kind
22252 identifier.
22253
22254 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
22255
22256 From Martin Pool <mbp@samba.org>:
22257 * server.c (gdbserver_usage): New function.
22258 (main): Call it.
22259
22260 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
22261
22262 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
22263 stop_at -> stop_pc.
22264
22265 2002-05-04 Andrew Cagney <ac131313@redhat.com>
22266
22267 * Makefile.in: Remove obsolete code.
22268
22269 2002-04-24 Michal Ludvig <mludvig@suse.cz>
22270
22271 * linux-low.c (regsets_fetch_inferior_registers),
22272 (regsets_store_inferior_registers): Removed cast to int from
22273 ptrace() calls.
22274 * regcache.h: Added declaration of struct inferior_info.
22275
22276 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
22277
22278 * inferiors.c (struct inferior_info): Add regcache_data.
22279 (add_inferior): Call create_register_cache.
22280 (clear_inferiors): Call free_register_cache.
22281 (inferior_regcache_data, set_inferior_regcache_data): New functions.
22282 * regcache.c (struct inferior_regcache_data): New.
22283 (registers): Remove.
22284 (get_regcache): New function.
22285 (create_register_cache, free_register_cache): New functions.
22286 (set_register_cache): Don't initialize the register cache here.
22287 (registers_to_string, registers_from_string, register_data): Call
22288 get_regcache.
22289 * regcache.h: Add prototypes.
22290 * server.h: Likewise.
22291
22292 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
22293
22294 * mem-break.c: New file.
22295 * mem-break.h: New file.
22296 * Makefile.in: Add mem-break.o rule; update server.h
22297 dependencies.
22298 * inferiors.c (struct inferior_info): Add target_data
22299 member.
22300 (clear_inferiors): Free target_data member if set.
22301 (inferior_target_data, set_inferior_target_data): New functions.
22302 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
22303 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
22304 * linux-low.c (linux_bp_reinsert): New variable.
22305 (struct inferior_linux_data): New.
22306 (linux_create_inferior): Use set_inferior_target_data.
22307 (linux_attach): Likewise. Call add_inferior.
22308 (linux_wait_for_one_inferior): New function.
22309 (linux_wait): Call it.
22310 (linux_write_memory): Add const.
22311 (initialize_low): Call set_breakpoint_data.
22312 * linux-low.h (struct linux_target_ops): Add breakpoint
22313 handling members.
22314 * server.c (attach_inferior): Remove extra add_inferior
22315 call.
22316 * server.h: Include mem-break.h. Update inferior.c
22317 prototypes.
22318 * target.c (read_inferior_memory)
22319 (write_inferior_memory): New functions.
22320 * target.h (read_inferior_memory)
22321 (write_inferior_memory): Change macros to prototypes.
22322 (struct target_ops): Update comments. Add const to write_memory
22323 definition.
22324
22325 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
22326
22327 * linux-low.c (usr_store_inferior_registers): Support
22328 registers which are allowed to fail to store.
22329 * linux-low.h (linux_target_ops): Likewise.
22330 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
22331 (ppc_cannot_store_register): FPSCR may not be storable.
22332
22333 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22334
22335 * server.h: Include <string.h> if HAVE_STRING_H.
22336 * ChangeLog: Correct paths in last ChangeLog entry.
22337
22338 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22339
22340 * linux-low.h: Remove obsolete prototypes.
22341 (struct linux_target_ops): New.
22342 (extern the_low_target): New.
22343 * linux-low.c (num_regs, regmap): Remove declarations.
22344 (register_addr): Use the_low_target explicitly.
22345 (fetch_register): Likewise.
22346 (usr_fetch_inferior_registers): Likewise.
22347 (usr_store_inferior_registers): Likewise.
22348 * linux-arm-low.c (num_regs): Remove.
22349 (arm_num_regs): Define.
22350 (arm_regmap): Renamed from regmap, made static.
22351 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
22352 made static.
22353 (arm_cannot_store_register): Renamed from cannot_store_register,
22354 made static.
22355 (the_low_target): New.
22356 * linux-i386-low.c (num_regs): Remove.
22357 (i386_num_regs): Define.
22358 (i386_regmap): Renamed from regmap, made static.
22359 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
22360 made static.
22361 (i386_cannot_store_register): Renamed from cannot_store_register,
22362 made static.
22363 (the_low_target): New.
22364 * linux-ia64-low.c (num_regs): Remove.
22365 (ia64_num_regs): Define.
22366 (ia64_regmap): Renamed from regmap, made static.
22367 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
22368 made static.
22369 (ia64_cannot_store_register): Renamed from cannot_store_register,
22370 made static.
22371 (the_low_target): New.
22372 * linux-m68k-low.c (num_regs): Remove.
22373 (m68k_num_regs): Define.
22374 (m68k_regmap): Renamed from regmap, made static.
22375 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
22376 made static.
22377 (m68k_cannot_store_register): Renamed from cannot_store_register,
22378 made static.
22379 (the_low_target): New.
22380 * linux-mips-low.c (num_regs): Remove.
22381 (mips_num_regs): Define.
22382 (mips_regmap): Renamed from regmap, made static.
22383 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
22384 made static.
22385 (mips_cannot_store_register): Renamed from cannot_store_register,
22386 made static.
22387 (the_low_target): New.
22388 * linux-ppc-low.c (num_regs): Remove.
22389 (ppc_num_regs): Define.
22390 (ppc_regmap): Renamed from regmap, made static.
22391 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
22392 made static.
22393 (ppc_cannot_store_register): Renamed from cannot_store_register,
22394 made static.
22395 (the_low_target): New.
22396 * linux-s390-low.c (num_regs): Remove.
22397 (s390_num_regs): Define.
22398 (s390_regmap): Renamed from regmap, made static.
22399 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
22400 made static.
22401 (s390_cannot_store_register): Renamed from cannot_store_register,
22402 made static.
22403 (the_low_target): New.
22404 * linux-sh-low.c (num_regs): Remove.
22405 (sh_num_regs): Define.
22406 (sh_regmap): Renamed from regmap, made static.
22407 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
22408 made static.
22409 (sh_cannot_store_register): Renamed from cannot_store_register,
22410 made static.
22411 (the_low_target): New.
22412 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
22413 (the_low_target): New.
22414
22415 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22416
22417 * Makefile.in: Add stamp-h target.
22418 * configure.in: Create stamp-h.
22419 * configure: Regenerated.
22420
22421 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22422
22423 * inferiors.c: New file.
22424 * target.c: New file.
22425 * target.h: New file.
22426 * Makefile.in: Add target.o and inferiors.o. Update
22427 dependencies.
22428 * linux-low.c (inferior_pid): New static variable,
22429 moved from server.c.
22430 (linux_create_inferior): Renamed from create_inferior.
22431 Call add_inferior. Return 0 on success instead of a PID.
22432 (linux_attach): Renamed from myattach.
22433 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
22434 (linux_thread_alive): Renamed from mythread_alive.
22435 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
22436 child dies.
22437 (linux_resume): Renamed from myresume. Add missing ``return 0''.
22438 (regsets_store_inferior_registers): Correct error message.
22439 Add missing ``return 0''.
22440 (linux_fetch_registers): Renamed from fetch_inferior_registers.
22441 (linux_store_registers): Renamed from store_inferior_registers.
22442 (linux_read_memory): Renamed from read_inferior_memory.
22443 (linux_write_memory): Renamed from write_inferior_memory.
22444 (linux_target_ops): New structure.
22445 (initialize_low): Call set_target_ops ().
22446 * remote-utils.c (unhexify): New function.
22447 (hexify): New function.
22448 (input_interrupt): Send signals to ``signal_pid''.
22449 * server.c (inferior_pid): Remove.
22450 (start_inferior): Update create_inferior call.
22451 (attach_inferior): Call add_inferior.
22452 (handle_query): New function.
22453 (main): Call handle_query for `q' packets.
22454 * server.h: Include "target.h". Remove obsolete prototypes.
22455 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
22456
22457 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22458
22459 * Makefile.in: Add WARN_CFLAGS. Update configury
22460 dependencies.
22461 * configure.in: Check for <string.h>
22462 * configure: Regenerate.
22463 * config.in: Regenerate.
22464 * gdbreplay.c: Include needed system headers.
22465 (remote_open): Remove strchr prototype.
22466 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
22467 * regcache.c (supply_register): Change buf argument to const void *.
22468 (supply_register_by_name): Likewise.
22469 (collect_register): Change buf argument to void *.
22470 (collect_register_by_name): Likewise.
22471 * regcache.h: Add missing prototypes.
22472 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
22473 * server.c (handle_query): New function.
22474 (attached): New static variable, moved out of main.
22475 (main): Quiet longjmp clobber warnings.
22476 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
22477 * utils.c (error): Remove NORETURN.
22478 (fatal): Likewise.
This page took 0.520351 seconds and 4 git commands to generate.