[AArch64] SVE/FPSIMD fixup for big endian
[deliverable/binutils-gdb.git] / gdbserver / ChangeLog
1 2020-11-11 Andrew Burgess <andrew.burgess@embecosm.com>
2
3 * server.cc (gdbserver_usage): Add missing option to usage text.
4 (gdbserver_show_disableable): Likewise.
5
6 2020-11-02 Simon Marchi <simon.marchi@efficios.com>
7
8 * ax.cc: Fix indentation.
9 * dll.cc: Fix indentation.
10 * inferiors.h: Fix indentation.
11 * linux-low.cc: Fix indentation.
12 * linux-nios2-low.cc: Fix indentation.
13 * linux-ppc-ipa.cc: Fix indentation.
14 * linux-ppc-low.cc: Fix indentation.
15 * linux-x86-low.cc: Fix indentation.
16 * linux-xtensa-low.cc: Fix indentation.
17 * regcache.cc: Fix indentation.
18 * server.cc: Fix indentation.
19 * tracepoint.cc: Fix indentation.
20
21 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
22
23 * acinclude.m4: Replace AC_TRY_COMPILE with AC_COMPILE_IFELSE +
24 AC_LANG_PROGRAM.
25 * configure: Re-generate.
26
27 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
28
29 * configure: Re-generate.
30
31 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
32
33 * configure: Re-generate.
34
35 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
36
37 * configure: Re-generate.
38
39 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
40
41 * configure: Re-generate.
42
43 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
44
45 * configure.ac: Modernize.
46 * configure: Re-generate.
47
48 2020-10-31 Simon Marchi <simon.marchi@polymtl.ca>
49
50 * configure.ac: Use AC_CANONICAL_{BUILD,HOST,TARGET} instead of
51 AC_CANONICAL_SYSTEM.
52 * configure: Re-generate.
53
54 2020-10-26 Pedro Alves <pedro@palves.net>
55
56 * netbsd-low.cc (netbsd_waitpid, netbsd_process_target::kill)
57 (netbsd_qxfer_libraries_svr4): Use gdb::handle_eintr without
58 explicit type.
59
60 2020-10-25 Simon Marchi <simon.marchi@polymtl.ca>
61
62 * acinclude.m4: Update ptrace.m4 path.
63
64 2020-10-24 Simon Marchi <simon.marchi@polymtl.ca>
65
66 * config.in: Re-generate.
67 * configure: Re-generate.
68
69 2020-10-21 Simon Marchi <simon.marchi@polymtl.ca>
70
71 * server.cc (handle_general_set): Don't use sprintf with
72 argument overlapping buffer.
73
74 2020-10-20 Tom Tromey <tromey@adacore.com>
75
76 PR gdb/26742:
77 * inferiors.cc (remove_thread): Clear current_thread before
78 freeing the thread.
79
80 2020-10-13 Kamil Rytarowski <n54@gmx.com>x
81
82 * netbsd-low.cc (netbsd_tdesc): Remove.
83 (netbsd_add_process): Likewise.
84 (netbsd_process_target::create_inferior): Update.
85
86 2020-10-09 Andrew Burgess <andrew.burgess@embecosm.com>
87
88 * linux-arc-low.cc (arc_linux_read_description): Release the
89 unique_ptr returned from arc_create_target_description.
90
91 2020-10-09 Andrew Burgess <andrew.burgess@embecosm.com>
92
93 * Makefile.in: Include Makefile.gnulib.inc. Don't define LIBGNU
94 or INCGNU. Make use of LIBGNU_EXTRA_LIBS when linking.
95
96 2020-10-08 Andrew Burgess <andrew.burgess@embecosm.com>
97
98 * linux-low.cc (linux_process_target::handle_extended_wait):
99 Release the unique_ptr returned from allocate_target_description.
100 * linux-riscv-low.cc (riscv_target::low_arch_setup): Likewise.
101 * linux-x86-low.cc (tdesc_amd64_linux_no_xml): Change type.
102 (tdesc_i386_linux_no_xml): Change type.
103 (x86_linux_read_description): Borrow pointer from unique_ptr
104 object.
105 (x86_target::get_ipa_tdesc_idx): Likewise.
106 (initialize_low_arch): Likewise.
107 * tdesc.cc (allocate_target_description): Update return type.
108
109 2020-10-07 Tom Tromey <tromey@adacore.com>
110
111 * server.cc (handle_search_memory): Remove dead code.
112
113 2020-10-07 Tom Tromey <tromey@adacore.com>
114
115 * server.cc (handle_search_memory_1): Remove.
116 (handle_search_memory): Use simple_search_memory.
117
118 2020-10-07 Simon Marchi <simon.marchi@efficios.com>
119
120 * Makefile.in (COMPILE): Add CXXFLAGS.
121 (INTERNAL_CFLAGS_BASE): Remove CXXFLAGS.
122 (gdbserver$(EXEEXT)): Add CXXFLAGS.
123 (gdbreplay$(EXEEXT)): Add CXXFLAGS.
124 ($(IPA_LIB)): Add CXXFLAGS.
125 (IPAGENT_COMPILE): Add CXXFLAGS.
126
127 2020-10-07 Anton Kolesov <anton.kolesov@synopsys.com>
128
129 * configure.srv: Support ARC architecture.
130 * Makefile.in: Add linux-arc-low.cc and arch/arc.o.
131 * linux-arc-low.cc: New file.
132
133 2020-10-07 Kamil Rytarowski <n54@gmx.com>
134
135 * netbsd-low.cc (get_dynamic, get_r_debug, read_one_ptr)
136 (netbsd_qxfer_libraries_svr4): Remove "target" argument and update.
137 (netbsd_process_target::qxfer_libraries_svr4): Update.
138
139 2020-10-07 Kamil Rytarowski <n54@gmx.com>
140
141 * netbsd-low.cc: Fix whitespace formatting.
142 * netbsd-amd64-low.cc: Likewise.
143
144 2020-10-07 Kamil Rytarowski <n54@gmx.com>
145
146 * netbsd-low.cc (netbsd_process_target::read_memory)
147 (netbsd_process_target::write_memory): Update.
148
149 2020-10-07 Kamil Rytarowski <n54@gmx.com>
150
151 * netbsd-aarch64-low.cc: Add.
152 * Makefile.in (SFILES): Register "netbsd-aarch64-low.c".
153 * configure.srv: Add aarch64*-*-netbsd*.
154
155 2020-10-06 Shahab Vahedi <shahab@synopsys.com>
156
157 * regcache.cc (register_data): Remove unused "fetch" argument.
158
159 2020-10-02 Simon Marchi <simon.marchi@polymtl.ca>
160
161 * server.cc (handle_monitor_command): Handle "set
162 debug-event-loop".
163 (captured_main): Handle "--debug-event-loop".
164 (monitor_show_help): Mention new setting.
165 (gdbserver_usage): Mention new flag.
166
167 2020-10-02 Simon Marchi <simon.marchi@polymtl.ca>
168
169 * linux-low.cc (linux_process_target::async): Pass name to
170 add_file_handler.
171 * remote-utils.cc (handle_accept_event): Likewise.
172 (remote_open): Likewise.
173
174 2020-10-01 Kamil Rytarowski <n54@gmx.com>
175
176 * netbsd-i386-low.cc: Add.
177 * Makefile.in (SFILES): Register "netbsd-i386-low.c".
178 * configure.srv: Add i[34567]86-*-netbsd*.
179
180 2020-10-01 Kamil Rytarowski <n54@gmx.com>
181
182 * netbsd-amd64-low.cc (netbsd_x86_64_arch_setup): Remove.
183 (netbsd_target_regsets): Now const.
184 (the_low_target): Remove.
185 (class netbsd_amd64_target, the_netbsd_amd64_target)
186 (the_netbsd_target): Add.
187 * netbsd-low.cc (netbsd_process_target::post_create_inferior): Call
188 low_arch_setup ().
189 (netbsd_process_target::fetch_registers)
190 (netbsd_process_target::store_registers, initialize_low): Update.
191 (the_netbsd_target): Remove.
192 * netbsd-low.h (netbsd_target_regsets, netbsd_target_ops)
193 (the_low_target, netbsd_tdesc): Remove.
194 (netbsd_process_target::get_regs_info)
195 (netbsd_process_target::low_arch_setup): Add.
196
197 2020-09-23 Hannes Domani <ssbssa@yahoo.de>
198
199 * win32-low.cc: Remove local wow64_process variable.
200 * win32-low.h: Remove local wow64_process variable.
201
202 2020-09-18 Tom Tromey <tromey@adacore.com>
203
204 * netbsd-low.h (class netbsd_process_target) <wait>: Update.
205 * netbsd-low.cc (netbsd_waitpid, netbsd_wait)
206 (netbsd_process_target::wait): Change type of target_options.
207 * win32-low.h (class win32_process_target) <wait>: Update.
208 * win32-low.cc (win32_process_target::wait): Update.
209 * target.h (class process_stratum_target) <wait>: Update.
210 (mywait): Update.
211 * target.cc (mywait, target_wait): Change type of "options".
212 * linux-low.h (class linux_process_target) <wait, wait_1>:
213 Update.
214 * linux-low.cc (linux_process_target::wait)
215 (linux_process_target::wait_1): Update.
216
217 2020-09-15 Tom Tromey <tromey@adacore.com>
218
219 * linux-x86-low.cc (xmltarget_i386_linux_no_xml)
220 (xmltarget_amd64_linux_no_xml): Now arrays.
221
222 2020-09-14 Tom Tromey <tromey@adacore.com>
223
224 * tracepoint.cc (eval_result_names): Now const.
225 * ax.cc (gdb_agent_op_names): Now const.
226
227 2020-09-10 Kamil Rytarowski <n54@gmx.com>
228
229 * netbsd-low.cc: Add.
230 * netbsd-low.h: Likewise.
231 * netbsd-amd64-low.cc: Likewise.
232 * Makefile.in (SFILES): Register "netbsd-low.cc", "netbsd-low.h",
233 "netbsd-amd64-low.cc".
234 * configure.srv: Add x86_64-*-netbsd*.
235
236 2020-08-13 Simon Marchi <simon.marchi@polymtl.ca>
237
238 * server.cc (captured_main): Accept multiple `--selftest=`
239 options. Pass all `--selftest=` arguments to run_tests.
240
241 2020-07-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
242
243 * configure, config.in: Regenerate.
244
245 2020-07-26 Eli Zaretskii <eliz@gnu.org>
246
247 * configure.ac (AC_CHECK_HEADERS): Add ws2tcpip.h.
248 When checking whether socklen_t type is defined, use ws2tcpip.h if
249 it is available and sys/socket.h isn't.
250 * configure: Regenerate.
251 * config.in: Regenerate.
252
253 2020-07-22 Pedro Alves <pedro@palves.net>
254
255 * inferiors.cc (switch_to_process): New, moved here from
256 thread-db.cc, and made extern.
257 * inferiors.h (switch_to_process): Declare.
258 * server.cc: Include "gdbsupport/scoped_restore.h".
259 (handle_qxfer_threads_proper): Now returns bool. Prepare to
260 access memory around target calls.
261 (handle_qxfer_threads): Handle errors.
262 * thread-db.cc (switch_to_process): Moved to inferiors.cc.
263
264 2020-07-21 Simon Marchi <simon.marchi@efficios.com>
265
266 * linux-low.cc (stopped_pids): Make static.
267
268 2020-07-17 Andrew Burgess <andrew.burgess@embecosm.com>
269
270 * tdesc.cc (allocate_target_description): Add header comment.
271 (target_desc_deleter::operator()): New function.
272 * tdesc.h (struct target_desc): Declare as final.
273
274 2020-07-13 Simon Marchi <simon.marchi@polymtl.ca>
275
276 * server.cc (handle_query): Use std::vector of
277 std::string for `qsupported` vector. Use separate
278 vector for unknowns.
279 * target.h (class process_stratum_target) <process_qsupported>:
280 Change parameters to array_view of const char *.
281 (target_process_qsupported): Remove `count` parameter.
282 * target.cc (process_stratum_target::process_qsupported): Change
283 parameters to array_view of const char *.
284 * linux-x86-low.cc (class x86_target) <process_qsupported>:
285 Likewise.
286
287 2020-06-29 Tom de Vries <tdevries@suse.de>
288
289 * ax.h: Include gdbsupport/debug_agent.h.
290
291 2020-06-23 Andrew Burgess <andrew.burgess@embecosm.com>
292
293 * tdesc.cc (struct tdesc_compatible_info): New struct.
294 (tdesc_compatible_info_list): New function.
295 (tdesc_compatible_info_arch_name): New function.
296
297 2020-06-22 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
298
299 Use std::list to stop pending signal instead of manually-created
300 linked list.
301 * linux-low.h: Include <list>.
302 (struct pending_signal): Move here from linux-low.cc.
303 (struct lwp_info) <pending_signals>
304 <pending_signals_to_report>: Update the type.
305 * linux-low.cc (struct pending_signals): Remove.
306 (linux_process_target::delete_lwp)
307 (linux_process_target::add_lwp)
308 (enqueue_one_deferred_signal)
309 (dequeue_one_deferred_signal)
310 (enqueue_pending_signal)
311 (linux_process_target::resume_one_lwp_throw)
312 (linux_process_target::thread_needs_step_over)
313 (linux_process_target::resume_one_thread)
314 (linux_process_target::proceed_one_lwp): Update the use of pending
315 signal list.
316
317 2020-06-17 Simon Marchi <simon.marchi@efficios.com>
318
319 * Makefile.in (%-generated.cc: ../gdb/regformats/arm/%.dat):
320 Remove.
321
322 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
323
324 * Makefile.in (SFILES): Remove win32-arm-low.cc, wincecompat.cc.
325 * configure.srv: Remove mingw32ce cases.
326 * server.h, win32-low.cc: Remove __MINGW32CE__-guarded code.
327 * win32-low.h (to_back_slashes): Remove.
328 * win32-arm-low.cc, wincecompat.cc, wincecompat.h: Remove.
329
330 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
331
332 * Makefile.in (SFILES): linux-tile-low.cc.
333 * configure.srv: Remove tilegx case.
334 * linux-tile-low.cc: Remove.
335
336 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
337
338 * Makefile.in (SFILES): Remove linux-m32r-low.cc.
339 * configure.srv: Remove m32r case.
340 * linux-m32r-low.cc: Remove.
341
342 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
343
344 * Makefile.in (SFILES): Remove linux-cris-low.c.
345 * configure.srv: Remove cris cases.
346 * linux-cris-low.cc, linux-crisv32-low.cc: Remove.
347
348 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
349
350 * Makefile.in (SFILES): Remove linux-bfin-low.c.
351 * configure.srv: Remove bfin case.
352 * linux-bfin-low.cc: Remove.
353 * linux-low.cc: Remove BFIN-conditional code.
354
355 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
356
357 * configure: Re-generate.
358 * configure.ac: Remove srv_qnx test.
359 * configure.srv: Remove nto case.
360 * nto-low.cc, nto-low.h, nto-x86-low.cc: Remove.
361 * remote-utils.c: Remove __QNX__-guarded code.
362
363 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
364
365 * configure: Re-generate.
366 * configure.ac: Remove srv_lynxos test.
367 * configure.srv: Remove lynxos cases.
368 * lynx-i386-low.cc, lynx-low.cc, lynx-low.h, lynx-ppc-low.c:
369 Remove.
370
371 2020-06-12 Simon Marchi <simon.marchi@efficios.com>
372
373 * README: Fix a few outdated or incoherent things.
374
375 2020-05-27 Hannes Domani <ssbssa@yahoo.de>
376
377 * win32-low.cc (do_initial_child_stuff): Set open_process_used.
378 (win32_clear_inferiors): Use open_process_used.
379 (get_child_debug_event): Likewise.
380
381 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
382
383 PR gdbserver/25893
384 * linux-low.cc (linux_process_target::create_inferior),
385 lynx-low.cc (lynx_process_target::create_inferior),
386 win32-low.cc (win32_process_target::create_inferior): Use
387 construct_inferior_arguments instead of stringify_argv
388 to get string representation which properly escapes
389 special characters.
390 * server.cc (handle_v_run): Just pass empty program arg
391 as such, since any further processing is now handled via
392 construct_inferior_arguments.
393
394 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
395
396 * nto-low.cc (nto_process_target::create_inferior): Pass
397 argv to spawnp function as char **.
398
399 2020-05-25 Michael Weghorn <m.weghorn@posteo.de>
400
401 * server.cc (captured_main), (handle_v_run): No longer
402 insert extra NULL element to args vector.
403
404 2020-05-23 Pedro Alves <palves@redhat.com>
405
406 * gdb-safe-ctype.h: New.
407
408 2020-05-16 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
409
410 * linux-ia64-low.cc (ia64_target::sw_breakpoint_from_kind):
411 Fix incorrect 'gdb_assert_no_reached' to 'gdb_assert_not_reached'.
412 (ia64_target::low_breakpoint_at): Ditto.
413
414 2020-05-15 Hannes Domani <ssbssa@yahoo.de>
415
416 * win32-i386-low.cc (i386_supports_z_point_type): Handle
417 Z_PACKET_HW_BP z_type.
418 (i386_insert_point): Handle raw_bkpt_type type.
419 (i386_remove_point): Likewise.
420
421 2020-04-30 Hannes Domani <ssbssa@yahoo.de>
422
423 * configure.srv <x86_64-*-mingw*, x86_64-*-cygwin*> (srv_tgtobj):
424 Add arch/i386.o.
425 * win32-arm-low.cc (arm_num_regs): New function.
426 (struct win32_target_ops): Use arm_num_regs.
427 * win32-i386-low.cc (win32_get_current_dr): Adapt for WOW64
428 processes.
429 (i386_get_thread_context): Likewise.
430 (i386_prepare_to_resume): Likewise.
431 (i386_thread_added): Likewise.
432 (i386_single_step): Likewise.
433 (i386_fetch_inferior_register): Likewise.
434 (i386_store_inferior_register): Likewise.
435 (i386_arch_setup): Likewise.
436 (i386_win32_num_regs): New function.
437 (struct win32_target_ops): Use i386_win32_num_regs.
438 * win32-low.cc (win32_get_thread_context): Adapt for WOW64
439 processes.
440 (win32_require_context): Likewise.
441 (child_add_thread): Likewise.
442 (do_initial_child_stuff): Likewise.
443 (continue_one_thread): Likewise.
444 (win32_process_target::resume): Likewise.
445 (load_psapi): Likewise.
446 (win32_add_all_dlls): Likewise.
447 (maybe_adjust_pc): Likewise.
448 (win32_process_target::qxfer_siginfo): Likewise.
449 (initialize_low): Likewise.
450 * win32-low.h (struct win32_target_ops): Change num_regs to
451 callback function.
452
453 2020-04-27 Simon Marchi <simon.marchi@efficios.com>
454
455 * configure.ac: Remove check for fs_base/gs_base in
456 user_regs_struct.
457 * configure: Re-generate.
458 * config.in: Re-generate.
459 * linux-x86-low.cc (x86_64_regmap, x86_fill_gregset,
460 x86_store_gregset): Adjust.
461
462 2020-04-22 Hannes Domani <ssbssa@yahoo.de>
463
464 * server.cc (handle_search_memory_1): Fix gdb_read_memory return value
465 comparison.
466
467 2020-04-16 Tom Tromey <tromey@adacore.com>
468
469 * win32-low.cc (windows_nat::handle_access_violation): New
470 function.
471
472 2020-04-15 Simon Marchi <simon.marchi@polymtl.ca>
473
474 * win32-low.cc (get_child_debug_event): Fix format string warning.
475
476 2020-04-13 Tom Tromey <tom@tromey.com>
477
478 * server.h (gdb_fildes_t): Remove typedef.
479 * remote-utils.c (remote_desc, list_desc): Now int.
480 (INVALID_DESCRIPTOR): Remove.
481 (gdb_connected, remote_close)
482 (check_remote_input_interrupt_request): Update.
483 * utils.h (pfildes): Don't declare.
484 * utils.c (pfildes): Remove.
485
486 2020-04-13 Tom Tromey <tom@tromey.com>
487
488 * server.h (handle_serial_event, handle_target_event): Update.
489 * server.c: Don't call initialize_event_loop.
490 (keep_processing_events): New global.
491 (handle_serial_event): Return void. Set keep_processing_events.
492 (handle_target_event): Return void.
493 (start_event_loop): Move from event-loop.c. Rewrite.
494 * remote-utils.c (handle_accept_event): Return void.
495 (reset_readchar): Use delete_timer.
496 (process_remaining): Return void.
497 (reschedule): Use create_timer.
498 * event-loop.h: Remove.
499 * event-loop.cc: Remove.
500 * Makefile.in (OBS): Use gdbsupport/event-loop.o, not event-loop.o.
501
502 2020-04-13 Tom Tromey <tom@tromey.com>
503
504 * server.c (invoke_async_signal_handlers)
505 (check_async_event_handlers, flush_streams, gdb_select): New
506 functions.
507
508 2020-04-13 Tom Tromey <tom@tromey.com>
509
510 * configure: Rebuild.
511 * config.in: Rebuild.
512
513 2020-04-08 Tom Tromey <tromey@adacore.com>
514
515 PR gdb/22992
516 * win32-low.c (child_continue): Call matching_pending_stop.
517 (get_child_debug_event): Call fetch_pending_stop. Push pending
518 stop when needed.
519
520 2020-04-08 Tom Tromey <tromey@adacore.com>
521
522 * win32-low.h (win32_process_target::stopped_by_sw_breakpoint)
523 (win32_process_target::supports_stopped_by_sw_breakpoint):
524 Declare.
525 * win32-low.c (win32_supports_z_point_type): Always handle
526 Z_PACKET_SW_BP.
527 (win32_insert_point): Call insert_memory_breakpoint when needed.
528 (win32_remove_point): Call remove_memory_breakpoint when needed.
529 (win32_process_target::stopped_by_sw_breakpoint)
530 (win32_process_target::supports_stopped_by_sw_breakpoint): New
531 methods.
532 (win32_target_ops): Update.
533 (maybe_adjust_pc): New function.
534 (win32_wait): Call maybe_adjust_pc.
535
536 2020-04-08 Tom Tromey <tromey@adacore.com>
537
538 * win32-low.h (struct win32_target_ops) <decr_pc_after_break>: New
539 field.
540 * win32-i386-low.c (the_low_target): Update.
541 * win32-arm-low.c (the_low_target): Update.
542
543 2020-04-08 Tom Tromey <tromey@adacore.com>
544
545 * win32-low.h (win32_process_target::read_pc)
546 (win32_process_target::write_pc): Declare.
547 * win32-low.c (win32_process_target::read_pc)
548 (win32_process_target::write_pc): New methods.
549 * win32-i386-low.c (i386_win32_get_pc, i386_win32_set_pc): New
550 functions.
551 (the_low_target): Update.
552 * win32-arm-low.c (arm_win32_get_pc, arm_win32_set_pc): New
553 functions.
554 (the_low_target): Update.
555
556 2020-04-08 Tom Tromey <tromey@adacore.com>
557
558 * win32-low.c (win32_kill, get_child_debug_event): Use
559 wait_for_debug_event.
560
561 2020-04-08 Tom Tromey <tromey@adacore.com>
562
563 * win32-low.c (child_continue): Call continue_last_debug_event.
564
565 2020-04-08 Tom Tromey <tromey@adacore.com>
566
567 * win32-low.c (handle_exception): Remove.
568 (windows_nat::handle_ms_vc_exception): New function.
569 (get_child_debug_event): Add "continue_status" parameter.
570 Update.
571 (win32_wait): Update.
572
573 2020-04-08 Tom Tromey <tromey@adacore.com>
574
575 * win32-low.c (windows_nat::handle_load_dll): Rename from
576 handle_load_dll. No longer static.
577 (windows_nat::handle_unload_dll): Rename from handle_unload_dll.
578 No longer static.
579
580 2020-04-08 Tom Tromey <tromey@adacore.com>
581
582 * win32-low.c (handle_output_debug_string): Add parameter. Change
583 return type.
584 (win32_kill, get_child_debug_event): Update.
585
586 2020-04-08 Tom Tromey <tromey@adacore.com>
587
588 * win32-low.c (current_process_handle, current_process_id)
589 (main_thread_id, last_sig, current_event, siginfo_er): Move to
590 nat/windows-nat.c.
591
592 2020-04-08 Tom Tromey <tromey@adacore.com>
593
594 * win32-low.c (get_image_name): Remove.
595 (handle_load_dll): Update.
596
597 2020-04-08 Tom Tromey <tromey@adacore.com>
598
599 * win32-low.c (windows_nat::thread_rec): Rename from thread_rec.
600 No longer static. Change parameters.
601 (child_add_thread, child_fetch_inferior_registers)
602 (child_store_inferior_registers, win32_resume)
603 (win32_get_tib_address): Update.
604
605 2020-04-08 Tom Tromey <tromey@adacore.com>
606
607 * win32-low.h (struct win32_target_ops): Use qualified names where
608 needed.
609 * win32-i386-low.c: Add "using namespace".
610 * win32-low.c: Add "using namespace".
611 * win32-arm-low.c: Add "using namespace".
612
613 2020-04-08 Tom Tromey <tromey@adacore.com>
614
615 * win32-low.c (delete_thread_info): Don't call CloseHandle.
616
617 2020-04-08 Tom Tromey <tromey@adacore.com>
618
619 * win32-low.c (win32_require_context, suspend_one_thread): Use
620 windows_thread_info::suspend.
621 (continue_one_thread): Use windows_thread_info::resume.
622 * configure.srv (srv_tgtobj): Add windows-nat.o when needed.
623
624 2020-04-08 Tom Tromey <tromey@adacore.com>
625
626 * win32-i386-low.c (update_debug_registers)
627 (i386_prepare_to_resume, i386_thread_added): Update.
628
629 2020-04-08 Tom Tromey <tromey@adacore.com>
630
631 * win32-low.c (child_add_thread): Use new.
632 (delete_thread_info): Use delete.
633
634 2020-04-08 Tom Tromey <tromey@adacore.com>
635
636 * win32-low.h (struct windows_thread_info): Remove.
637
638 2020-04-08 Tom Tromey <tromey@adacore.com>
639
640 * win32-low.h (struct windows_thread_info): Rename from
641 win32_thread_info. Remove typedef.
642 (struct win32_target_ops, win32_require_context): Update.
643 * win32-low.c (win32_get_thread_context)
644 (win32_set_thread_context, win32_prepare_to_resume)
645 (win32_require_context, thread_rec, child_add_thread)
646 (delete_thread_info, continue_one_thread)
647 (child_fetch_inferior_registers, child_store_inferior_registers)
648 (win32_resume, suspend_one_thread, win32_get_tib_address):
649 Update.
650 * win32-i386-low.c (update_debug_registers)
651 (win32_get_current_dr, i386_get_thread_context)
652 (i386_prepare_to_resume, i386_thread_added, i386_single_step)
653 (i386_fetch_inferior_register, i386_store_inferior_register):
654 Update.
655 * win32-arm-low.c (arm_get_thread_context)
656 (arm_fetch_inferior_register, arm_store_inferior_register):
657 Update.
658
659 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
660
661 * linux-low.h (struct linux_target_ops): Remove.
662 (the_low_target): Remove.
663 * linux-x86-low.cc (the_low_target): Remove.
664 * linux-aarch64-low.cc (the_low_target): Ditto.
665 * linux-arm-low.cc (the_low_target): Ditto.
666 * linux-bfin-low.cc (the_low_target): Ditto.
667 * linux-cris-low.cc (the_low_target): Ditto.
668 * linux-crisv32-low.cc (the_low_target): Ditto.
669 * linux-ia64-low.cc (the_low_target): Ditto.
670 * linux-m32r-low.cc (the_low_target): Ditto.
671 * linux-m68k-low.cc (the_low_target): Ditto.
672 * linux-mips-low.cc (the_low_target): Ditto.
673 * linux-nios2-low.cc (the_low_target): Ditto.
674 * linux-ppc-low.cc (the_low_target): Ditto.
675 * linux-riscv-low.cc (the_low_target): Ditto.
676 * linux-s390-low.cc (the_low_target): Ditto.
677 * linux-sh-low.cc (the_low_target): Ditto.
678 * linux-sparc-low.cc (the_low_target): Ditto.
679 * linux-tic6x-low.cc (the_low_target): Ditto.
680 * linux-tile-low.cc (the_low_target): Ditto.
681 * linux-xtensa-low.cc (the_low_target): Ditto.
682
683 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
684
685 Remove the 'get_ipa_tdesc_idx' linux target op and let a concrete
686 linux target define the op by overriding the declaration in
687 process_stratum_target.
688
689 * linux-low.h (struct linux_target_ops): Remove the op.
690 (class linux_process_target) <get_ipa_tdesc_idx>: Remove.
691 * linux-low.cc (linux_process_target::get_ipa_tdesc_idx): Remove.
692 * linux-x86-low.cc (class x86_target) <get_ipa_tdesc_idx>: Declare.
693 (x86_get_ipa_tdesc_idx): Turn into...
694 (x86_target::get_ipa_tdesc_idx): ...this.
695 (the_low_target): Remove the op field.
696 * linux-ppc-low.cc (class ppc_target) <get_ipa_tdesc_idx>: Declare.
697 (ppc_get_ipa_tdesc_idx): Turn into...
698 (ppc_target::get_ipa_tdesc_idx): ...this.
699 (the_low_target): Remove the op field.
700 * linux-s390-low.cc (class s390_target) <get_ipa_tdesc_idx>: Declare.
701 (s390_get_ipa_tdesc_idx): Turn into...
702 (s390_target::get_ipa_tdesc_idx): ...this.
703 (the_low_target): Remove the op field.
704
705 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
706
707 Turn the 'get_syscall_trapinfo' linux target op into a method
708 of process_stratum_target.
709
710 * linux-low.h (struct linux_target_ops): Remove the op.
711 (class linux_process_target) <get_syscall_trapinfo>
712 <gdb_catch_this_syscall>
713 <low_supports_catch_syscall>
714 <low_get_syscall_trapinfo>: Declare.
715 * linux-low.cc (get_syscall_trapinfo): Turn into...
716 (linux_process_target::get_syscall_trapinfo): ...this.
717 (linux_process_target::low_get_syscall_trapinfo): Define.
718 (gdb_catch_this_syscall_p): Turn into...
719 (linux_process_target::gdb_catch_this_syscall): ...this.
720 (linux_process_target::low_supports_catch_syscall): Define.
721
722 Update the callers below.
723
724 (linux_process_target::wait_1)
725 (linux_process_target::supports_catch_syscall)
726
727 * linux-x86-low.cc (class x86_target) <low_supports_catch_syscall>
728 <low_get_syscall_trapinfo>: Declare.
729 (x86_target::low_supports_catch_syscall): Define.
730 (x86_get_syscall_trapinfo): Turn into...
731 (x86_target::low_get_syscall_trapinfo): ...this.
732 (the_low_target): Remove the op field.
733 * linux-aarch64-low.cc (class aarch64_target)
734 <low_supports_catch_syscall>
735 <low_get_syscall_trapinfo>: Declare.
736 (aarch64_target::low_supports_catch_syscall): Define.
737 (aarch64_get_syscall_trapinfo): Turn into...
738 (aarch64_target::low_get_syscall_trapinfo): ...this.
739 (the_low_target): Remove the op field.
740 * linux-arm-low.cc (class arm_target) <low_supports_catch_syscall>
741 <low_get_syscall_trapinfo>: Declare.
742 (arm_target::low_supports_catch_syscall): Define.
743 (arm_get_syscall_trapinfo): Turn into...
744 (arm_target::low_get_syscall_trapinfo): ...this.
745 (the_low_target): Remove the op field.
746 * linux-ppc-low.cc (the_low_target): Remove the op field.
747 * linux-s390-low.cc (the_low_target): Remove the op field.
748
749 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
750
751 Remove the 'supports_hardware_single_step' linux target op and
752 override the process_stratum_target's op definition in
753 linux_process_target to return true.
754
755 * linux-low.h (struct linux_target_ops): Remove the op.
756 (class linux_process_target) <finish_step_over>
757 <maybe_hw_step>: Declare.
758 * linux-low.cc (can_hardware_single_step): Remove.
759 (maybe_hw_step): Turn into...
760 (linux_process_target::maybe_hw_step): ...this.
761 (finish_step_over): Turn into...
762 (linux_process_target::finish_step_over): ...this.
763 (linux_process_target::supports_hardware_single_step): Update
764 to return true.
765
766 Update the callers below.
767
768 (linux_process_target::single_step)
769 (linux_process_target::resume_one_lwp_throw)
770
771 * linux-arm-low.cc (class arm_target)
772 <supports_hardware_single_step>: Declare.
773 (arm_supports_hardware_single_step): Turn into...
774 (arm_target::supports_hardware_single_step): ...this.
775 (the_low_target): Remove the op field.
776 * linux-x86-low.cc (x86_supports_hardware_single_step): Remove.
777 (the_low_target): Remove the op field.
778 * linux-aarch64-low.cc (aarch64_supports_hardware_single_step):
779 Remove.
780 (the_low_target): Remove the op field.
781 * linux-bfin-low.cc (bfin_supports_hardware_single_step): Remove.
782 (the_low_target): Remove the op field.
783 * linux-crisv32-low.cc (cris_supports_hardware_single_step): Remove.
784 (the_low_target): Remove the op field.
785 * linux-m32r-low.cc (m32r_supports_hardware_single_step): Remove.
786 (the_low_target): Remove the op field.
787 * linux-m68k-low.cc (m68k_supports_hardware_single_step): Remove.
788 (the_low_target): Remove the op field.
789 * linux-ppc-low.cc (ppc_supports_hardware_single_step): Remove.
790 (the_low_target): Remove the op field.
791 * linux-s390-low.cc (s390_supports_hardware_single_step): Remove.
792 (the_low_target): Remove the op field.
793 * linux-sh-low.cc (sh_supports_hardware_single_step): Remove.
794 (the_low_target): Remove the op field.
795 * linux-tic6x-low.cc (tic6x_supports_hardware_single_step): Remove.
796 (the_low_target): Remove the op field.
797 * linux-tile-low.cc (tile_supports_hardware_single_step): Remove.
798 (the_low_target): Remove the op field.
799 * linux-xtensa-low.cc (xtensa_supports_hardware_single_step):
800 Remove.
801 (the_low_target): Remove the op field.
802
803 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
804
805 Turn the 'supports_range_stepping' linux target op into a method
806 of linux_process_target.
807
808 * linux-low.h (struct linux_target_ops): Remove the op.
809 (class linux_process_target) <low_supports_range_stepping>: Declare.
810 * linux-low.cc (linux_process_target::low_supports_range_stepping):
811 Define.
812 (linux_process_target::supports_range_stepping): Update the call
813 site.
814 * linux-x86-low.cc (class x86_target)
815 <low_supports_range_stepping>: Declare.
816 (x86_supports_range_stepping): Turn into...
817 (x86_target::low_supports_range_stepping): ...this.
818 (the_low_target): Remove the op field.
819 * linux-aarch64-low.cc (class aarch64_target)
820 <low_supports_range_stepping>: Declare.
821 (aarch64_supports_range_stepping): Turn into...
822 (aarch64_target::low_supports_range_stepping): ...this.
823 (the_low_target): Remove the op field.
824 * linux-arm-low.cc (the_low_target): Remove the op field.
825 * linux-bfin-low.cc (the_low_target): Ditto.
826 * linux-crisv32-low.cc (the_low_target): Ditto.
827 * linux-m32r-low.cc (the_low_target): Ditto.
828 * linux-m68k-low.cc (the_low_target): Ditto.
829 * linux-ppc-low.cc (the_low_target): Ditto.
830 * linux-s390-low.cc (the_low_target): Ditto.
831 * linux-sh-low.cc (the_low_target): Ditto.
832 * linux-tic6x-low.cc (the_low_target): Ditto.
833 * linux-tile-low.cc (the_low_target): Ditto.
834 * linux-xtensa-low.cc (the_low_target): Ditto.
835
836 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
837
838 Remove the 'emit_ops' linux target ops and let the concrete
839 linux target define the op by overriding the declaration of
840 process_stratum_target.
841
842 * linux-low.h (struct linux_target_ops): Remove the op.
843 (class linux_process_target) <emit_ops>: Remove.
844 * linux-low.cc (linux_process_target::emit_ops): Remove.
845 * linux-x86-low.cc (class x86_target) <emit_ops>: Declare.
846 (x86_emit_ops): Turn into...
847 (x86_target::emit_ops): ...this.
848 (the_low_target): Remove the op field.
849 * linux-aarch64-low.cc (class aarch64_target) <emit_ops>: Declare.
850 (aarch64_emit_ops): Turn into...
851 (aarch64_target::emit_ops): ...this.
852 (the_low_target): Remove the op field.
853 * linux-ppc-low.cc (class ppc_target) <emit_ops>: Declare.
854 (ppc_emit_ops): Turn into...
855 (ppc_target::emit_ops): ...this.
856 (the_low_target): Remove the op field.
857 * linux-s390-low.cc (class s390_target) <emit_ops>: Declare.
858 (s390_emit_ops): Turn into...
859 (s390_target::emit_ops): ...this.
860 (the_low_target): Remove the op field.
861 * linux-arm-low.cc (the_low_target): Remove the op field.
862 * linux-bfin-low.cc (the_low_target): Ditto.
863 * linux-crisv32-low.cc (the_low_target): Ditto.
864 * linux-m32r-low.cc (the_low_target): Ditto.
865 * linux-m68k-low.cc (the_low_target): Ditto.
866 * linux-sh-low.cc (the_low_target): Ditto.
867 * linux-tic6x-low.cc (the_low_target): Ditto.
868 * linux-tile-low.cc (the_low_target): Ditto.
869 * linux-xtensa-low.cc (the_low_target): Ditto.
870
871 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
872
873 Remove the 'install_fast_tracepoint_jump_pad' and
874 'get_min_fast_tracepoint_insn_len' linux target ops to let the
875 concrete linux target define the ops by overriding the declarations
876 of process_stratum_target.
877
878 * linux-low.h (struct linux_target_ops): Remove the ops.
879 (class linux_process_target) <supports_fast_tracepoints>
880 <install_fast_tracepoint_jump_pad>
881 <get_min_fast_tracepoint_insn_len>: Remove.
882 * linux-low.cc (linux_process_target::supports_fast_tracepoints)
883 (linux_process_target::install_fast_tracepoint_jump_pad)
884 (linux_process_target::get_min_fast_tracepoint_insn_len): Remove.
885 * linux-x86-low.cc (class x86_target) <supports_fast_tracepoints>
886 <install_fast_tracepoint_jump_pad>
887 <get_min_fast_tracepoint_insn_len>: Declare.
888 (x86_target::supports_fast_tracepoints): Define.
889 (x86_install_fast_tracepoint_jump_pad): Turn into...
890 (x86_target::install_fast_tracepoint_jump_pad): ...this.
891 (x86_get_min_fast_tracepoint_insn_len): Turn into...
892 (x86_target::get_min_fast_tracepoint_insn_len): ...this.
893 (the_low_target): Remove the op fields.
894 * linux-aarch64-low.cc (class aarch64_target)
895 <supports_fast_tracepoints>
896 <install_fast_tracepoint_jump_pad>
897 <get_min_fast_tracepoint_insn_len>: Declare.
898 (aarch64_target::supports_fast_tracepoints): Define.
899 (aarch64_install_fast_tracepoint_jump_pad): Turn into...
900 (aarch64_target::install_fast_tracepoint_jump_pad): ...this.
901 (aarch64_get_min_fast_tracepoint_insn_len): Turn into...
902 (aarch64_target::get_min_fast_tracepoint_insn_len): ...this.
903 (the_low_target): Remove the op fields.
904 * linux-ppc-low.cc (class ppc_target) <supports_fast_tracepoints>
905 <install_fast_tracepoint_jump_pad>
906 <get_min_fast_tracepoint_insn_len>: Declare.
907 (ppc_target::supports_fast_tracepoints): Define.
908 (ppc_install_fast_tracepoint_jump_pad): Turn into...
909 (ppc_target::install_fast_tracepoint_jump_pad): ...this.
910 (ppc_get_min_fast_tracepoint_insn_len): Turn into...
911 (ppc_target::get_min_fast_tracepoint_insn_len): ...this.
912 (the_low_target): Remove the op fields.
913 * linux-s390-low.cc (class s390_target) <supports_fast_tracepoints>
914 <install_fast_tracepoint_jump_pad>
915 <get_min_fast_tracepoint_insn_len>: Declare.
916 (s390_target::supports_fast_tracepoints): Define.
917 (s390_install_fast_tracepoint_jump_pad): Turn into...
918 (s390_target::install_fast_tracepoint_jump_pad): ...this.
919 (s390_get_min_fast_tracepoint_insn_len): Turn into...
920 (s390_target::get_min_fast_tracepoint_insn_len): ...this.
921 (the_low_target): Remove the op fields.
922 * linux-arm-low.cc (the_low_target): Remove the op fields.
923 * linux-bfin-low.cc (the_low_target): Ditto.
924 * linux-crisv32-low.cc (the_low_target): Ditto.
925 * linux-m32r-low.cc (the_low_target): Ditto.
926 * linux-m68k-low.cc (the_low_target): Ditto.
927 * linux-sh-low.cc (the_low_target): Ditto.
928 * linux-tic6x-low.cc (the_low_target): Ditto.
929 * linux-tile-low.cc (the_low_target): Ditto.
930 * linux-xtensa-low.cc (the_low_target): Ditto.
931
932 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
933
934 Turn the 'get_thread_area' linux target op into a method of
935 process_stratum_target.
936
937 * linux-low.h (struct linux_target_ops): Remove the op.
938 (class linux_process_target) <stuck_in_jump_pad>
939 <linux_fast_tracepoint_collecting>
940 <low_get_thread_area>: Declare.
941 * linux-low.cc (supports_fast_tracepoints): Remove.
942 (linux_fast_tracepoint_collecting): Turn into...
943 (linux_process_target::linux_fast_tracepoint_collecting): ...this.
944 (linux_process_target::low_get_thread_area): Define.
945 (stuck_in_jump_pad_callback): Turn into...
946 (linux_process_target::stuck_in_jump_pad): ...this.
947
948 Update the caller below.
949
950 (linux_process_target::stabilize_threads)
951
952 * linux-x86-low.cc (class x86_target) <low_get_thread_area>:
953 Declare.
954 (x86_get_thread_area): Turn into...
955 (x86_target::low_get_thread_area): ...this.
956 (the_low_target): Remove the op field.
957 * linux-aarch64-low.cc (class aarch64_target) <low_get_thread_area>:
958 Declare.
959 (aarch64_get_thread_area): Turn into...
960 (aarch64_target::low_get_thread_area): ...this.
961 (the_low_target): Remove the op field.
962 * linux-ppc-low.cc (class ppc_target) <low_get_thread_area>:
963 Declare.
964 (ppc_get_thread_area): Turn into...
965 (ppc_target::low_get_thread_area): ...this.
966 (the_low_target): Remove the op field.
967 * linux-s390-low.cc (class s390_target) <low_get_thread_area>:
968 Declare.
969 (s390_get_thread_area): Turn into...
970 (s390_target::low_get_thread_area): ...this.
971 (the_low_target): Remove the op field.
972 * linux-arm-low.cc (the_low_target): Remove the op field.
973 * linux-bfin-low.cc (the_low_target): Ditto.
974 * linux-crisv32-low.cc (the_low_target): Ditto.
975 * linux-m32r-low.cc (the_low_target): Ditto.
976 * linux-m68k-low.cc (the_low_target): Ditto.
977 * linux-sh-low.cc (the_low_target): Ditto.
978 * linux-tic6x-low.cc (the_low_target): Ditto.
979 * linux-tile-low.cc (the_low_target): Ditto.
980 * linux-xtensa-low.cc (the_low_target): Ditto.
981
982 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
983
984 Remote the 'supports_tracepoints' linux target op and let the
985 concrete linux target define it by overriding the op declared in
986 process_stratum_target.
987
988 * linux-low.h (struct linux_target_ops): Remove the op.
989 (class linux_process_target) <supports_tracepoints>: Remove.
990 * linux-low.cc (linux_process_target::supports_tracepoints): Remove.
991 * linux-x86-low.cc (class x86_target) <supports_tracepoints>:
992 Declare.
993 (x86_supports_tracepoints): Turn into...
994 (x86_target::supports_tracepoints): ...this.
995 (the_low_target): Remove the op field.
996 * linux-aarch64-low.cc (class aarch64_target)
997 <supports_tracepoints>: Declare.
998 (aarch64_supports_tracepoints): Turn into...
999 (aarch64_target::supports_tracepoints): ...this.
1000 (the_low_target): Remove the op field.
1001 * linux-ppc-low.cc (class ppc_target) <supports_tracepoints>:
1002 Declare.
1003 (ppc_supports_tracepoints): Turn into...
1004 (ppc_target::supports_tracepoints): ...this.
1005 (the_low_target): Remove the op field.
1006 * linux-s390-low.cc (class s390_target) <supports_tracepoints>:
1007 Declare.
1008 (s390_supports_tracepoints): Turn into...
1009 (s390_target::supports_tracepoints): ...this.
1010 (the_low_target): Remove the op field.
1011 * linux-arm-low.cc (the_low_target): Remove the op field.
1012 * linux-bfin-low.cc (the_low_target): Ditto.
1013 * linux-crisv32-low.cc (the_low_target): Ditto.
1014 * linux-m32r-low.cc (the_low_target): Ditto.
1015 * linux-m68k-low.cc (the_low_target): Ditto.
1016 * linux-sh-low.cc (the_low_target): Ditto.
1017 * linux-tic6x-low.cc (the_low_target): Ditto.
1018 * linux-tile-low.cc (the_low_target): Ditto.
1019 * linux-xtensa-low.cc (the_low_target): Ditto.
1020
1021 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1022
1023 Remove the 'process_qsupported' linux target op and let a concrete
1024 linux target define the op by overriding the op declaration in
1025 process_stratum_target.
1026
1027 * linux-low.h (struct linux_target_ops): Remove the op.
1028 (class linux_process_target) <process_qsupported>: Remove.
1029 * linux-low.cc (linux_process_target::process_qsupported): Remove.
1030 * linux-x86-low.cc (class x86_target) <process_qsupported>: Declare.
1031 (x86_linux_process_qsupported): Turn into...
1032 (x86_target::process_qsupported): ...this.
1033 (the_low_target): Remove the op field.
1034 * linux-aarch64-low.cc (the_low_target): Remove the op
1035 field.
1036 * linux-arm-low.cc (the_low_target): Ditto.
1037 * linux-bfin-low.cc (the_low_target): Ditto.
1038 * linux-crisv32-low.cc (the_low_target): Ditto.
1039 * linux-m32r-low.cc (the_low_target): Ditto.
1040 * linux-m68k-low.cc (the_low_target): Ditto.
1041 * linux-ppc-low.cc (the_low_target): Ditto.
1042 * linux-s390-low.cc (the_low_target): Ditto.
1043 * linux-sh-low.cc (the_low_target): Ditto.
1044 * linux-tic6x-low.cc (the_low_target): Ditto.
1045 * linux-tile-low.cc (the_low_target): Ditto.
1046 * linux-xtensa-low.cc (the_low_target): Ditto.
1047
1048 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1049
1050 Turn the 'prepare_to_resume' linux target op into a method of
1051 linux_process_target.
1052
1053 * linux-low.h (struct linux_target_ops): Remove the op.
1054 (class linux_process_target) <low_prepare_to_resume>: Declare.
1055 * linux-low.cc (linux_process_target::low_prepare_to_resume):
1056 Define.
1057
1058 Update the callers below:
1059
1060 (linux_process_target::resume_one_lwp_throw)
1061 (linux_process_target::low_prepare_to_resume)
1062
1063 * linux-x86-low.cc (class x86_target) <low_prepare_to_resume>:
1064 Declare.
1065 (x86_target::low_prepare_to_resume): Define.
1066 (the_low_target): Remove the op field.
1067 * linux-aarch64-low.cc (class aarch64_target)
1068 <low_prepare_to_resume>: Declare.
1069 (aarch64_target::low_prepare_to_resume): Define.
1070 (the_low_target): Remove the op field.
1071 * linux-arm-low.cc (class arm_target) <low_prepare_to_resume>:
1072 Declare.
1073 (arm_prepare_to_resume): Turn into...
1074 (arm_target::low_prepare_to_resume): ...this.
1075 (the_low_target): Remove the op field.
1076 * linux-mips-low.cc (class mips_target) <low_prepare_to_resume>:
1077 Declare.
1078 (mips_linux_prepare_to_resume): Turn into...
1079 (mips_target::low_prepare_to_resume): ...this.
1080 (the_low_target): Remove the op field.
1081 * linux-bfin-low.cc (the_low_target): Remove the op field.
1082 * linux-crisv32-low.cc (the_low_target): Ditto.
1083 * linux-m32r-low.cc (the_low_target): Ditto.
1084 * linux-m68k-low.cc (the_low_target): Ditto.
1085 * linux-ppc-low.cc (the_low_target): Ditto.
1086 * linux-s390-low.cc (the_low_target): Ditto.
1087 * linux-sh-low.cc (the_low_target): Ditto.
1088 * linux-tic6x-low.cc (the_low_target): Ditto.
1089 * linux-tile-low.cc (the_low_target): Ditto.
1090 * linux-xtensa-low.cc (the_low_target): Ditto.
1091
1092 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1093
1094 Turn the 'new_process', 'delete_process', 'new_thread',
1095 'delete_thread', and 'new_fork' linux target ops into methods
1096 of linux_process_target.
1097
1098 * linux-low.h (struct linux_target_ops): Remove the ops.
1099 (class linux_process_target) <add_linux_process>
1100 <add_lwp>
1101 <delete_lwp>
1102 <attach_lwp>
1103 <detach_one_lwp>
1104 <check_zombie_leaders>
1105 <filter_exit_event>
1106 <low_new_process>
1107 <low_delete_process>
1108 <low_new_thread>
1109 <low_delete_thread>
1110 <low_new_fork>: Declare.
1111 * linux-low.cc (delete_lwp): Turn into...
1112 (linux_process_target::delete_lwp): ...this.
1113 (linux_process_target::low_delete_thread): Define.
1114 (linux_add_process): Turn into...
1115 (linux_process_target::add_linux_process): ...this.
1116 (linux_process_target::low_new_process): Define.
1117 (linux_process_target::low_delete_process): Define.
1118 (linux_process_target::low_new_fork): Define.
1119 (add_lwp): Turn into...
1120 (linux_process_target::add_lwp): ...this.
1121 (linux_process_target::low_new_thread): Define.
1122 (linux_attach_lwp): Turn into...
1123 (linux_process_target::attach_lwp): ...this.
1124 (linux_detach_one_lwp): Turn into...
1125 (linux_process_target::detach_one_lwp): ...this.
1126 (linux_detach_lwp_callback): Remove and inline...
1127 (linux_process_target::detach): ...here.
1128 (check_zombie_leaders): Turn into...
1129 (linux_process_target::check_zombie_leaders): ...this.
1130 (filter_exit_event): Turn into...
1131 (linux_process_target::filter_exit_event): ...this.
1132
1133 Update the callers below.
1134
1135 (linux_process_target::handle_extended_wait)
1136 (linux_process_target::create_inferior)
1137 (attach_proc_task_lwp_callback)
1138 (linux_process_target::attach)
1139 (linux_process_target::detach)
1140 (linux_process_target::mourn)
1141 * thread-db.cc (attach_thread)
1142
1143 * linux-x86-low.cc (class x86_target) <low_new_process>
1144 <low_delete_process>
1145 <low_new_thread>
1146 <low_delete_thread>
1147 <low_new_fork>: Declare.
1148 (x86_linux_new_process): Turn into...
1149 (x86_target::low_new_process): ...this.
1150 (x86_linux_delete_process): Turn into...
1151 (x86_target::low_delete_process): ...this.
1152 (x86_target::low_new_thread): Define.
1153 (x86_target::low_delete_thread): Define.
1154 (x86_linux_new_fork): Turn into...
1155 (x86_target::low_new_fork): ...this.
1156 (the_low_target): Remove the op fields.
1157 * linux-aarch64-low.cc (class aarch64_target) <low_new_process>
1158 <low_delete_process>
1159 <low_new_thread>
1160 <low_delete_thread>
1161 <low_new_fork>: Declare.
1162 (aarch64_linux_new_process): Turn into...
1163 (aarch64_target::low_new_process): ...this.
1164 (aarch64_linux_delete_process): Turn into...
1165 (aarch64_target::low_delete_process): ...this.
1166 (aarch64_target::low_new_thread): Define.
1167 (aarch64_target::low_delete_thread): Define.
1168 (aarch64_linux_new_fork): Turn into...
1169 (aarch64_target::low_new_fork): ...this.
1170 (the_low_target): Remove the op fields.
1171 * linux-arm-low.cc (class arm_target) <low_new_process>
1172 <low_delete_process>
1173 <low_new_thread>
1174 <low_delete_thread>
1175 <low_new_fork>: Declare.
1176 (arm_new_process): Turn into...
1177 (arm_target::low_new_process): ...this.
1178 (arm_delete_process): Turn into...
1179 (arm_target::low_delete_process): ...this.
1180 (arm_new_thread): Turn into...
1181 (arm_target::low_new_thread): ...this.
1182 (arm_delete_thread): Turn into...
1183 (arm_target::low_delete_thread): ...this.
1184 (arm_new_fork): Turn into...
1185 (arm_target::low_new_fork): ...this.
1186 (the_low_target): Remove the op fields.
1187 * linux-mips-low.cc (class mips_target) <low_new_process>
1188 <low_delete_process>
1189 <low_new_thread>
1190 <low_delete_thread>
1191 <low_new_fork>: Declare.
1192 (mips_linux_new_process): Turn into...
1193 (mips_target::low_new_process): ...this.
1194 (mips_linux_delete_process): Turn into...
1195 (mips_target::low_delete_process): ...this.
1196 (mips_linux_new_thread): Turn into...
1197 (mips_target::low_new_thread): ...this.
1198 (mips_linux_delete_thread): Turn into...
1199 (mips_target::low_delete_thread): ...this.
1200 (mips_linux_new_fork): Turn into...
1201 (mips_target::low_new_fork): ...this.
1202 (the_low_target): Remove the op fields.
1203 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1204 * linux-crisv32-low.cc (the_low_target): Ditto.
1205 * linux-m32r-low.cc (the_low_target): Ditto.
1206 * linux-m68k-low.cc (the_low_target): Ditto.
1207 * linux-ppc-low.cc (the_low_target): Ditto.
1208 * linux-s390-low.cc (the_low_target): Ditto.
1209 * linux-sh-low.cc (the_low_target): Ditto.
1210 * linux-tic6x-low.cc (the_low_target): Ditto.
1211 * linux-tile-low.cc (the_low_target): Ditto.
1212 * linux-xtensa-low.cc (the_low_target): Ditto.
1213
1214 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1215
1216 Turn the 'siginfo_fixup' linux target op into a method of
1217 linux_process_target.
1218
1219 * linux-low.h (struct linux_target_ops): Remove the op.
1220 (class linux_process_target) <siginfo_fixup>
1221 <low_siginfo_fixup>: Declare.
1222 * linux-low.cc (siginfo_fixup): Turn into...
1223 (linux_process_target::siginfo_fixup): ...this.
1224 (linux_process_target::low_siginfo_fixup): Define.
1225 * linux-x86-low.cc (class x86_target) <low_siginfo_fixup>: Declare.
1226 (x86_siginfo_fixup): Turn into...
1227 (x86_target::low_siginfo_fixup): ...this.
1228 (the_low_target): Remove the op field.
1229 * linux-aarch64-low.cc (class aarch64_target):
1230 <low_siginfo_fixup>: Declare.
1231 (aarch64_linux_siginfo_fixup): Turn into...
1232 (aarch64_target::low_siginfo_fixup): ...this.
1233 (the_low_target): Remove the op field.
1234 * linux-arm-low.cc (the_low_target): Remove the op field.
1235 * linux-bfin-low.cc (the_low_target): Ditto.
1236 * linux-crisv32-low.cc (the_low_target): Ditto.
1237 * linux-m32r-low.cc (the_low_target): Ditto.
1238 * linux-m68k-low.cc (the_low_target): Ditto.
1239 * linux-mips-low.cc (the_low_target): Ditto.
1240 * linux-ppc-low.cc (the_low_target): Ditto.
1241 * linux-s390-low.cc (the_low_target): Ditto.
1242 * linux-sh-low.cc (the_low_target): Ditto.
1243 * linux-tic6x-low.cc (the_low_target): Ditto.
1244 * linux-tile-low.cc (the_low_target): Ditto.
1245 * linux-xtensa-low.cc (the_low_target): Ditto.
1246
1247 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1248
1249 Turn the 'collect_ptrace_register' and 'supply_ptrace_register'
1250 linux target ops into methods of linux_process_target.
1251
1252 * linux-low.h (struct linux_target_ops): Remove the ops.
1253 (class linux_process_target) <low_collect_ptrace_register>
1254 <low_store_ptrace_register>: Declare.
1255 * linux-low.cc (linux_process_target::low_collect_ptrace_register)
1256 (linux_process_target::low_supply_ptrace_register): Define.
1257
1258 Update the callers below.
1259
1260 (linux_process_target::fetch_register)
1261 (linux_process_target::store_register)
1262
1263 * linux-x86-low.cc (the_low_target): Remove the op fields.
1264 * linux-aarch64-low.cc (the_low_target): Ditto.
1265 * linux-arm-low.cc (the_low_target): Ditto.
1266 * linux-bfin-low.cc (the_low_target): Ditto.
1267 * linux-crisv32-low.cc (the_low_target): Ditto.
1268 * linux-m32r-low.cc (the_low_target): Ditto.
1269 * linux-m68k-low.cc (the_low_target): Ditto.
1270 * linux-sh-low.cc (the_low_target): Ditto.
1271 * linux-sparc-low.cc (the_low_target): Ditto.
1272 * linux-tic6x-low.cc (the_low_target): Ditto.
1273 * linux-tile-low.cc (the_low_target): Ditto.
1274 * linux-xtensa-low.cc (the_low_target): Ditto.
1275 * linux-mips-low.cc (class mips_target)
1276 <low_collect_ptrace_register>
1277 <low_supply_ptrace_register>: Declare.
1278 (mips_collect_ptrace_register): Turn into ...
1279 (mips_target::low_collect_ptrace_register): ...this.
1280 (mips_supply_ptrace_register): Turn into...
1281 (mips_target::low_supply_ptrace_register): ...this.
1282 (the_low_target): Remove the op fields.
1283 * linux-ppc-low.cc (class ppc_target)
1284 <low_collect_ptrace_register>
1285 <low_supply_ptrace_register>: Declare.
1286 (ppc_collect_ptrace_register): Turn into ...
1287 (ppc_target::low_collect_ptrace_register): ...this.
1288 (ppc_supply_ptrace_register): Turn into ...
1289 (ppc_target::low_supply_ptrace_register): ...this.
1290 (ppc_fill_gregset): Update for the calls to
1291 low_collect_ptrace_register.
1292 (the_low_target): Remove the op fields.
1293 * linux-s390-low.cc (class s390_target)
1294 <low_collect_ptrace_register>
1295 <low_supply_ptrace_register>: Declare.
1296 (s390_collect_ptrace_register): Turn into ...
1297 (s390_target::low_collect_ptrace_register): ...this.
1298 (s390_supply_ptrace_register): Turn into ...
1299 (s390_target::low_supply_ptrace_register): ...this.
1300 (s390_fill_gregset): Update for the calls to
1301 low_collect_ptrace_register.
1302 (the_low_target): Remove the op fields.
1303
1304 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1305
1306 Turn the 'stopped_by_watchpoint' and 'stopped_data_address' linux
1307 target ops into methods of linux_process_target.
1308
1309 * linux-low.h (struct linux_target_ops): Remove the ops.
1310 (class linux_process_target) <check_stopped_by_watchpoint>
1311 <low_stopped_by_watchpoint>
1312 <low_stopped_data_address>: Declare.
1313 * linux-low.cc (check_stopped_by_watchpoint): Turn into...
1314 (linux_process_target::check_stopped_by_watchpoint): ...this.
1315 (linux_process_target::low_stopped_by_watchpoint): Define.
1316 (linux_process_target::low_stopped_data_address): Define.
1317 * linux-x86-low.cc (class x86_target) <low_stopped_by_watchpoint>
1318 <low_stopped_data_address>: Declare.
1319 (x86_stopped_by_watchpoint): Turn into...
1320 (x86_target::low_stopped_by_watchpoint): ...this.
1321 (x86_stopped_data_address): Turn into...
1322 (x86_target::low_stopped_data_address): ...this.
1323 (the_low_target): Remove the op fields.
1324 * linux-aarch64-low.cc (class aarch64_target)
1325 <low_stopped_by_watchpoint>
1326 <low_stopped_data_address>: Declare.
1327 (aarch64_stopped_by_watchpoint): Turn into...
1328 (aarch64_target::low_stopped_by_watchpoint): ...this.
1329 (aarch64_stopped_data_address): Turn into...
1330 (aarch64_target::low_stopped_data_address): ...this.
1331 (the_low_target): Remove the op fields.
1332 * linux-arm-low.cc (class arm_target) <low_stopped_by_watchpoint>
1333 <low_stopped_data_address>: Declare.
1334 (arm_stopped_by_watchpoint): Turn into...
1335 (arm_target::low_stopped_by_watchpoint): ...this.
1336 (arm_stopped_data_address): Turn into...
1337 (arm_target::low_stopped_data_address): ...this.
1338 (the_low_target): Remove the op fields.
1339 * linux-crisv32-low.cc (class crisv32_target)
1340 <low_stopped_by_watchpoint>
1341 <low_stopped_data_address>: Declare.
1342 (cris_stopped_by_watchpoint): Turn into...
1343 (crisv32_target::low_stopped_by_watchpoint): ...this.
1344 (cris_stopped_data_address): Turn into...
1345 (crisv32_target::low_stopped_data_address): ...this.
1346 (the_low_target): Remove the op fields.
1347 * linux-mips-low.cc (class mips_target) <low_stopped_by_watchpoint>
1348 <low_stopped_data_address>: Declare.
1349 (mips_stopped_by_watchpoint): Turn into...
1350 (mips_target::low_stopped_by_watchpoint): ...this.
1351 (mips_stopped_data_address): Turn into...
1352 (mips_target::low_stopped_data_address): ...this.
1353 (the_low_target): Remove the op fields.
1354 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1355 * linux-m32r-low.cc (the_low_target): Ditto.
1356 * linux-m68k-low.cc (the_low_target): Ditto.
1357 * linux-ppc-low.cc (the_low_target): Ditto.
1358 * linux-s390-low.cc (the_low_target): Ditto.
1359 * linux-sh-low.cc (the_low_target): Ditto.
1360 * linux-sparc-low.cc (the_low_target): Ditto.
1361 * linux-tic6x-low.cc (the_low_target): Ditto.
1362 * linux-tile-low.cc (the_low_target): Ditto.
1363 * linux-xtensa-low.cc (the_low_target): Ditto.
1364
1365 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1366
1367 Turn the 'insert_point' and 'remove_point' linux target ops into
1368 methods of linux_process_target.
1369
1370 * linux-low.h (struct linux_target_ops): Remove the ops.
1371 (class linux_process_target) <low_insert_point>
1372 <low_remove_point>: Declare.
1373 * linux-low.cc (linux_process_target::low_insert_point)
1374 (linux_process_target::low_remove_point): Define.
1375 (linux_process_target::insert_point)
1376 (linux_process_target::remove_point): Update for calls to
1377 low_insert_point and low_remove_point.
1378 * linux-x86-low.cc (class x86_target) <low_insert_point>
1379 <low_remove_point>: Declare.
1380 (x86_insert_point): Turn into...
1381 (x86_target::low_insert_point): ...this.
1382 (x86_remove_point): Turn into...
1383 (x86_target::low_remove_point): ...this.
1384 (the_low_target): Remove the op fields.
1385 * linux-aarch64-low.cc (class aarch64_target) <low_insert_point>
1386 <low_remove_point>: Declare.
1387 (aarch64_insert_point): Turn into...
1388 (aarch64_target::low_insert_point): ...this.
1389 (aarch64_remove_point): Turn into...
1390 (aarch64_target::low_remove_point): ...this.
1391 (the_low_target): Remove the op fields.
1392 * linux-arm-low.cc (class arm_target) <low_insert_point>
1393 <low_remove_point>: Declare.
1394 (arm_insert_point): Turn into...
1395 (arm_target::low_insert_point): ...this.
1396 (arm_remove_point): Turn into...
1397 (arm_target::low_remove_point): ...this.
1398 (the_low_target): Remove the op fields.
1399 * linux-crisv32-low.cc (class crisv32_target) <low_insert_point>
1400 <low_remove_point>: Declare.
1401 (crisv32_insert_point): Turn into...
1402 (crisv32_target::low_insert_point): ...this.
1403 (crisv32_remove_point): Turn into...
1404 (crisv32_target::low_remove_point): ...this.
1405 (the_low_target): Remove the op fields.
1406 * linux-mips-low.cc (class mips_target) <low_insert_point>
1407 <low_remove_point>: Declare.
1408 (mips_insert_point): Turn into...
1409 (mips_target::low_insert_point): ...this.
1410 (mips_remove_point): Turn into...
1411 (mips_target::low_remove_point): ...this.
1412 (the_low_target): Remove the op fields.
1413 * linux-ppc-low.cc (class ppc_target) <low_insert_point>
1414 <low_remove_point>: Declare.
1415 (ppc_insert_point): Turn into...
1416 (ppc_target::low_insert_point): ...this.
1417 (ppc_remove_point): Turn into...
1418 (ppc_target::low_remove_point): ...this.
1419 (the_low_target): Remove the op fields.
1420 * linux-bfin-low.cc (the_low_target): Remove the op fields.
1421 * linux-m32r-low.cc (the_low_target): Ditto.
1422 * linux-m68k-low.cc (the_low_target): Ditto.
1423 * linux-s390-low.cc (the_low_target): Ditto.
1424 * linux-sh-low.cc (the_low_target): Ditto.
1425 * linux-sparc-low.cc (the_low_target): Ditto.
1426 * linux-tic6x-low.cc (the_low_target): Ditto.
1427 * linux-tile-low.cc (the_low_target): Ditto.
1428 * linux-xtensa-low.cc (the_low_target): Ditto.
1429
1430 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1431
1432 Remove the 'supports_z_point_type' linux target op and let the
1433 concrete linux target define it by overriding the op declared in
1434 process_stratum_target.
1435
1436 * linux-low.cc (linux_process_target::supports_z_point_type):
1437 Remove.
1438 * linux-low.h (struct linux_target_ops): Remove the op.
1439 (class linux_process_target) <supports_z_point_type>: Remove.
1440 * linux-x86-low.cc (class x86_target) <supports_z_point_type>:
1441 Declare.
1442 (x86_supports_z_point_type): Turn into...
1443 (x86_target::supports_z_point_type): ...this.
1444 (the_low_target): Remove the op field.
1445 * linux-aarch64-low.cc (class aarch64_target)
1446 <supports_z_point_type>: Declare.
1447 (aarch64_supports_z_point_type): Turn into...
1448 (aarch64_target::supports_z_point_type): ...this.
1449 (the_low_target): Remove the op field.
1450 * linux-arm-low.cc (class arm_target) <supports_z_point_type>:
1451 Declare.
1452 (arm_supports_z_point_type): Turn into...
1453 (arm_target::supports_z_point_type): ...this.
1454 (the_low_target): Remove the op field.
1455 * linux-crisv32-low.cc (class crisv32_target)
1456 <supports_z_point_type>: Declare.
1457 (cris_supports_z_point_type): Turn into...
1458 (crisv32_target::supports_z_point_type): ...this.
1459 (the_low_target): Remove the op field.
1460 * linux-mips-low.cc (class mips_target) <supports_z_point_type>:
1461 Declare.
1462 (mips_supports_z_point_type): Turn into...
1463 (mips_target::supports_z_point_type): ...this.
1464 (the_low_target): Remove the op field.
1465 * linux-ppc-low.cc (class ppc_target) <supports_z_point_type>:
1466 Declare.
1467 (ppc_supports_z_point_type): Turn into...
1468 (ppc_target::supports_z_point_type): ...this.
1469 (the_low_target): Remove the op field.
1470 * linux-s390-low.cc (class s390_target) <supports_z_point_type>:
1471 Declare.
1472 (s390_supports_z_point_type): Turn into...
1473 (s390_target::supports_z_point_type): ...this.
1474 (the_low_target): Remove the op field.
1475 * linux-bfin-low.cc (the_low_target): Remove the op field.
1476 * linux-m32r-low.cc (the_low_target): Ditto.
1477 * linux-m68k-low.cc (the_low_target): Ditto.
1478 * linux-sh-low.cc (the_low_target): Ditto.
1479 * linux-sparc-low.cc (the_low_target): Ditto.
1480 * linux-tic6x-low.cc (the_low_target): Ditto.
1481 * linux-tile-low.cc (the_low_target): Ditto.
1482 * linux-xtensa-low.cc (the_low_target): Ditto.
1483
1484 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1485
1486 Turn the 'breakpoint_at' linux target op into a method of
1487 linux_process_target.
1488
1489 * linux-low.h (struct linux_target_ops): Remove the op.
1490 (class linux_process_target) <low_breakpoint_at>: Declare.
1491
1492 Update the callers below:
1493
1494 * linux-low.cc (linux_process_target::save_stop_reason)
1495 (linux_process_target::thread_still_has_status_pending)
1496 (linux_process_target::wait_1)
1497
1498 * linux-x86-low.cc (class x86_target)
1499 <low_breakpoint_at>: Declare.
1500 (x86_breakpoint_at): Turn into...
1501 (x86_target::low_breakpoint_at): ...this.
1502 (the_low_target): Remove the op field.
1503 * linux-aarch64-low.cc (class aarch64_target)
1504 <low_breakpoint_at>: Declare.
1505 (aarch64_breakpoint_at): Turn into...
1506 (aarch64_target::low_breakpoint_at): ...this.
1507 (the_low_target): Remove the op field.
1508 * linux-arm-low.cc (class arm_target)
1509 <low_breakpoint_at>: Declare.
1510 (arm_target::low_breakpoint_at): Define.
1511 (the_low_target): Remove the op field.
1512 * linux-bfin-low.cc (class bfin_target)
1513 <low_breakpoint_at>: Declare.
1514 (bfin_breakpoint_at): Turn into...
1515 (bfin_target::low_breakpoint_at): ...this.
1516 (the_low_target): Remove the op field.
1517 * linux-cris-low.cc (class cris_target)
1518 <low_breakpoint_at>: Declare.
1519 (cris_breakpoint_at): Turn into...
1520 (cris_target::low_breakpoint_at): ...this.
1521 (the_low_target): Remove the op field.
1522 * linux-crisv32-low.cc (class crisv32_target)
1523 <low_breakpoint_at>: Declare.
1524 (crisv32_breakpoint_at): Turn into...
1525 (crisv32_target::low_breakpoint_at): ...this.
1526 (the_low_target): Remove the op field.
1527 * linux-ia64-low.cc (class ia64_target)
1528 <low_breakpoint_at>: Declare.
1529 (ia64_target::low_breakpoint_at): Define.
1530 * linux-m32r-low.cc (class m32r_target)
1531 <low_breakpoint_at>: Declare.
1532 (m32r_breakpoint_at): Turn into...
1533 (m32r_target::low_breakpoint_at): ...this.
1534 (the_low_target): Remove the op field.
1535 * linux-m68k-low.cc (class m68k_target)
1536 <low_breakpoint_at>: Declare.
1537 (m68k_breakpoint_at): Turn into...
1538 (m68k_target::low_breakpoint_at): ...this.
1539 (the_low_target): Remove the op field.
1540 * linux-mips-low.cc (class mips_target)
1541 <low_breakpoint_at>: Declare.
1542 (mips_breakpoint_at): Turn into...
1543 (mips_target::low_breakpoint_at): ...this.
1544 (the_low_target): Remove the op field.
1545 * linux-nios2-low.cc (class nios2_target)
1546 <low_breakpoint_at>: Declare.
1547 (nios2_breakpoint_at): Turn into...
1548 (nios2_target::low_breakpoint_at): ...this.
1549 (the_low_target): Remove the op field.
1550 * linux-ppc-low.cc (class ppc_target)
1551 <low_breakpoint_at>: Declare.
1552 (ppc_breakpoint_at): Turn into...
1553 (ppc_target::low_breakpoint_at): ...this.
1554 (the_low_target): Remove the op field.
1555 * linux-riscv-low.cc (class riscv_target)
1556 <low_breakpoint_at>: Declare.
1557 (riscv_breakpoint_at): Turn into...
1558 (riscv_target::low_breakpoint_at): ...this.
1559 (the_low_target): Remove the op field.
1560 * linux-s390-low.cc (class s390_target)
1561 <low_breakpoint_at>: Declare.
1562 (s390_breakpoint_at): Turn into...
1563 (s390_target::low_breakpoint_at): ...this.
1564 (the_low_target): Remove the op field.
1565 * linux-sh-low.cc (class sh_target)
1566 <low_breakpoint_at>: Declare.
1567 (sh_breakpoint_at): Turn into...
1568 (sh_target::low_breakpoint_at): ...this.
1569 (the_low_target): Remove the op field.
1570 * linux-sparc-low.cc (class sparc_target)
1571 <low_breakpoint_at>: Declare.
1572 (sparc_breakpoint_at): Turn into...
1573 (sparc_target::low_breakpoint_at): ...this.
1574 (the_low_target): Remove the op field.
1575 * linux-tic6x-low.cc (class tic6x_target)
1576 <low_breakpoint_at>: Declare.
1577 (tic6x_breakpoint_at): Turn into...
1578 (tic6x_target::low_breakpoint_at): ...this.
1579 (the_low_target): Remove the op field.
1580 * linux-tile-low.cc (class tile_target)
1581 <low_breakpoint_at>: Declare.
1582 (tile_breakpoint_at): Turn into...
1583 (tile_target::low_breakpoint_at): ...this.
1584 (the_low_target): Remove the op field.
1585 * linux-xtensa-low.cc (class xtensa_target)
1586 <low_breakpoint_at>: Declare.
1587 (xtensa_breakpoint_at): Turn into...
1588 (xtensa_target::low_breakpoint_at): ...this.
1589 (the_low_target): Remove the op field.
1590
1591 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1592
1593 Turn the 'decr_pc_after_break' linux_target_ops field into
1594 a method of linux_process_target.
1595
1596 * linux-low.h (struct linux_target_ops)
1597 <decr_pc_after_break>: Remove.
1598 (class linux_process_target) <low_decr_pc_after_break>: New method
1599 declaration.
1600 * linux-low.cc (linux_process_target::low_decr_pc_after_break):
1601 New method implementation.
1602
1603 Update the users below.
1604
1605 (linux_process_target::save_stop_reason)
1606 (linux_process_target::wait_1)
1607 * linux-x86-low.cc (class x86_target) <low_decr_pc_after_break>:
1608 New declaration.
1609 (x86_target::low_decr_pc_after_break): New method implementation.
1610 (the_low_target): Remove the field.
1611 * linux-bfin-low.cc (class bfin_target) <low_decr_pc_after_break>:
1612 New declaration.
1613 (bfin_target::low_decr_pc_after_break): New method implementation.
1614 (the_low_target): Remove the field.
1615 * linux-m68k-low.cc (class m68k_target) <low_decr_pc_after_break>:
1616 New declaration.
1617 (m68k_target::low_decr_pc_after_break): New method implementation.
1618 (the_low_target): Remove the field.
1619 * linux-s390-low.cc (class s390_target) <low_decr_pc_after_break>:
1620 New declaration.
1621 (s390_target::low_decr_pc_after_break): New method implementation.
1622 (the_low_target): Remove the field.
1623 * linux-aarch64-low.cc (the_low_target): Remove the field.
1624 * linux-arm-low.cc (the_low_target): Remove the field.
1625 * linux-cris-low.cc (the_low_target): Remove the field.
1626 * linux-crisv32-low.cc (the_low_target): Remove the field.
1627 * linux-m32r-low.cc (the_low_target): Remove the field.
1628 * linux-mips-low.cc (the_low_target): Remove the field.
1629 * linux-nios2-low.cc (the_low_target): Remove the field.
1630 * linux-ppc-low.cc (the_low_target): Remove the field.
1631 * linux-riscv-low.cc (the_low_target): Remove the field.
1632 * linux-sh-low.cc (the_low_target): Remove the field.
1633 * linux-sparc-low.cc (the_low_target): Remove the field.
1634 * linux-tic6x-low.cc (the_low_target): Remove the field.
1635 * linux-tile-low.cc (the_low_target): Remove the field.
1636 * linux-xtensa-low.cc (the_low_target): Remove the field.
1637
1638 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1639
1640 Remove the 'supports_software_single_step' linux target op and let
1641 the concrete linux target define it by overriding the op in
1642 process_stratum_target.
1643 Turn the 'get_next_pcs' linux target op into a method of
1644 linux_process_target.
1645
1646 * linux-low.h (struct linux_target_ops): Remove the ops.
1647 (class linux_process_target) <supports_software_single_step>:
1648 Remove.
1649 <low_get_next_pcs>: Declare.
1650 * linux-low.cc (can_software_single_step): Remove.
1651 (linux_process_target::low_get_next_pcs): Define.
1652 (linux_process_target::supports_software_single_step): Remove.
1653
1654 Update the callers below.
1655
1656 (linux_process_target::handle_extended_wait)
1657 (linux_process_target::wait_1)
1658 (linux_process_target::install_software_single_step_breakpoints)
1659 (linux_process_target::single_step)
1660 (linux_process_target::thread_needs_step_over)
1661 (linux_process_target::proceed_one_lwp)
1662 (linux_process_target::supports_range_stepping)
1663
1664 * linux-x86-low.cc (the_low_target): Remove the op field.
1665 * linux-aarch64-low.cc (the_low_target): Ditto.
1666 * linux-bfin-low.cc (the_low_target): Ditto.
1667 * linux-cris-low.cc (the_low_target): Ditto.
1668 * linux-crisv32-low.cc (the_low_target): Ditto.
1669 * linux-m32r-low.cc (the_low_target): Ditto.
1670 * linux-m68k-low.cc (the_low_target): Ditto.
1671 * linux-mips-low.cc (the_low_target): Ditto.
1672 * linux-nios2-low.cc (the_low_target): Ditto.
1673 * linux-ppc-low.cc (the_low_target): Ditto.
1674 * linux-riscv-low.cc (the_low_target): Ditto.
1675 * linux-s390-low.cc (the_low_target): Ditto.
1676 * linux-sh-low.cc (the_low_target): Ditto.
1677 * linux-sparc-low.cc (the_low_target): Ditto.
1678 * linux-tic6x-low.cc (the_low_target): Ditto.
1679 * linux-tile-low.cc (the_low_target): Ditto.
1680 * linux-xtensa-low.cc (the_low_target): Ditto.
1681 * linux-arm-low.cc (class arm_target) <low_get_next_pcs>
1682 <supports_software_single_step>: Declare.
1683 (arm_target::supports_software_single_step): Define.
1684 (arm_gdbserver_get_next_pcs): Turn into...
1685 (arm_target::low_get_next_pcs): ...this.
1686 (the_low_target): Remove the op field.
1687
1688 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1689
1690 Remove the 'sw_breakpoint_from_kind' linux target op, and let
1691 the concrete linux target define it by overriding the op
1692 in process_stratum_target.
1693
1694 * linux-low.cc (linux_process_target::sw_breakpoint_from_kind):
1695 Remove.
1696 * linux-low.h (struct linux_target_ops): Remove the op.
1697 (class linux_process_target) <sw_breakpoint_from_kind>: Remove.
1698 * linux-x86-low.cc (class x86_target) <sw_breakpoint_from_kind>:
1699 Declare.
1700 (x86_sw_breakpoint_from_kind): Turn into...
1701 (x86_target::sw_breakpoint_from_kind): ...this.
1702 (the_low_target): Remove the op field.
1703 * linux-aarch64-low.cc (class aarch64_target)
1704 <sw_breakpoint_from_kind>: Declare.
1705 (aarch64_sw_breakpoint_from_kind): Turn into...
1706 (aarch64_target::sw_breakpoint_from_kind): ...this.
1707 (the_low_target): Remove the op field.
1708 * linux-arm-low.cc (class arm_target) <sw_breakpoint_from_kind>:
1709 Declare.
1710 (arm_target::sw_breakpoint_from_kind): Define.
1711 (the_low_target): Remove the op field.
1712 * linux-bfin-low.cc (class bfin_target) <sw_breakpoint_from_kind>:
1713 Declare.
1714 (bfin_sw_breakpoint_from_kind): Turn into...
1715 (bfin_target::sw_breakpoint_from_kind): ...this.
1716 (the_low_target): Remove the op field.
1717 * linux-cris-low.cc (class cris_target) <sw_breakpoint_from_kind>:
1718 Declare.
1719 (cris_sw_breakpoint_from_kind): Turn into...
1720 (cris_target::sw_breakpoint_from_kind): ...this.
1721 (the_low_target): Remove the op field.
1722 * linux-crisv32-low.cc (class crisv32_target)
1723 <sw_breakpoint_from_kind>: Declare.
1724 (cris_sw_breakpoint_from_kind): Turn into...
1725 (crisv32_target::sw_breakpoint_from_kind): ...this.
1726 (the_low_target): Remove the op field.
1727 * linux-ia64-low.cc (class ia64_target) <sw_breakpoint_from_kind>:
1728 Declare.
1729 (ia64_target::sw_breakpoint_from_kind): Define.
1730 * linux-m32r-low.cc (class m32r_target) <sw_breakpoint_from_kind>:
1731 Declare.
1732 (m32r_sw_breakpoint_from_kind): Turn into...
1733 (m32r_target::sw_breakpoint_from_kind): ...this.
1734 (the_low_target): Remove the op field.
1735 * linux-m68k-low.cc (class m68k_target) <sw_breakpoint_from_kind>:
1736 Declare.
1737 (m68k_sw_breakpoint_from_kind): Turn into...
1738 (m68k_target::sw_breakpoint_from_kind): ...this.
1739 (the_low_target): Remove the op field.
1740 * linux-mips-low.cc (class mips_target) <sw_breakpoint_from_kind>:
1741 Declare.
1742 (mips_sw_breakpoint_from_kind): Turn into...
1743 (mips_target::sw_breakpoint_from_kind): ...this.
1744 (the_low_target): Remove the op field.
1745 * linux-nios2-low.cc (class nios2_target) <sw_breakpoint_from_kind>:
1746 Declare.
1747 (nios2_sw_breakpoint_from_kind): Turn into...
1748 (nios2_target::sw_breakpoint_from_kind): ...this.
1749 (the_low_target): Remove the op field.
1750 * linux-ppc-low.cc (class ppc_target) <sw_breakpoint_from_kind>:
1751 Declare.
1752 (ppc_sw_breakpoint_from_kind): Turn into...
1753 (ppc_target::sw_breakpoint_from_kind): ...this.
1754 (the_low_target): Remove the op field.
1755 * linux-riscv-low.cc (class riscv_target) <sw_breakpoint_from_kind>:
1756 Declare.
1757 (riscv_sw_breakpoint_from_kind): Turn into...
1758 (riscv_target::sw_breakpoint_from_kind): ...this.
1759 (the_low_target): Remove the op field.
1760 * linux-s390-low.cc (class s390_target) <sw_breakpoint_from_kind>:
1761 Declare.
1762 (s390_sw_breakpoint_from_kind): Turn into...
1763 (s390_target::sw_breakpoint_from_kind): ...this.
1764 (the_low_target): Remove the op field.
1765 * linux-sh-low.cc (class sh_target) <sw_breakpoint_from_kind>:
1766 Declare.
1767 (sh_sw_breakpoint_from_kind): Turn into...
1768 (sh_target::sw_breakpoint_from_kind): ...this.
1769 (the_low_target): Remove the op field.
1770 * linux-sparc-low.cc (class sparc_target) <sw_breakpoint_from_kind>:
1771 Declare.
1772 (sparc_sw_breakpoint_from_kind): Turn into...
1773 (sparc_target::sw_breakpoint_from_kind): ...this.
1774 (the_low_target): Remove the op field.
1775 * linux-tic6x-low.cc (class tic6x_target) <sw_breakpoint_from_kind>:
1776 Declare.
1777 (tic6x_sw_breakpoint_from_kind): Turn into...
1778 (tic6x_target::sw_breakpoint_from_kind): ...this.
1779 (the_low_target): Remove the op field.
1780 * linux-tile-low.cc (class tile_target) <sw_breakpoint_from_kind>:
1781 Declare.
1782 (tile_sw_breakpoint_from_kind): Turn into...
1783 (tile_target::sw_breakpoint_from_kind): ...this.
1784 (the_low_target): Remove the op field.
1785 * linux-xtensa-low.cc (class xtensa_target)
1786 <sw_breakpoint_from_kind>: Declare.
1787 (xtensa_sw_breakpoint_from_kind): Turn into...
1788 (xtensa_target::sw_breakpoint_from_kind): ...this.
1789 (the_low_target): Remove the op field.
1790
1791 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1792
1793 Remove the 'breakpoint_kind_from_pc' and
1794 'breakpoint_kind_from_current_state' linux target ops, and let the
1795 concrete linux target define them by overriding the ops of
1796 process_stratum_target.
1797
1798 * linux-low.cc (linux_process_target::breakpoint_kind_from_pc):
1799 Remove.
1800 (linux_process_target::breakpoint_kind_from_current_state): Remove.
1801 * linux-low.h (struct linux_target_ops): Remove ops.
1802 (class linux_process_target) <breakpoint_kind_from_pc>: Remove.
1803 <breakpoint_kind_from_current_state>: Remove.
1804 * linux-x86-low.cc (the_low_target): Remove the op fields.
1805 * linux-bfin-low.cc (the_low_target): Ditto.
1806 * linux-cris-low.cc (the_low_target): Ditto.
1807 * linux-crisv32-low.cc (the_low_target): Ditto.
1808 * linux-m32r-low.cc (the_low_target): Ditto.
1809 * linux-m68k-low.cc (the_low_target): Ditto.
1810 * linux-mips-low.cc (the_low_target): Ditto.
1811 * linux-nios2-low.cc (the_low_target): Ditto.
1812 * linux-ppc-low.cc (the_low_target): Ditto.
1813 * linux-s390-low.cc (the_low_target): Ditto.
1814 * linux-sh-low.cc (the_low_target): Ditto.
1815 * linux-sparc-low.cc (the_low_target): Ditto.
1816 * linux-tic6x-low.cc (the_low_target): Ditto.
1817 * linux-tile-low.cc (the_low_target): Ditto.
1818 * linux-xtensa-low.cc (the_low_target): Ditto.
1819 * linux-aarch64-low.cc (class aarch64_target)
1820 <breakpoint_kind_from_pc>
1821 <breakpoint_kind_from_current_state>: Declare.
1822 (aarch64_breakpoint_kind_from_pc): Turn into...
1823 (aarch64_target::breakpoint_kind_from_pc): ...this.
1824 (aarch64_breakpoint_kind_from_current_state): Turn into...
1825 (aarch64_target::breakpoint_kind_from_current_state): ...this.
1826 (the_low_target): Remove the op fields.
1827 * linux-arm-low.cc (class arm_target):
1828 <breakpoint_kind_from_pc>
1829 <breakpoint_kind_from_current_state>: Declare.
1830 (arm_target::breakpoint_kind_from_pc): Define.
1831 (arm_target::breakpoint_kind_from_current_state): Define.
1832 (the_low_target): Remove the op fields.
1833 * linux-riscv-low.cc (class riscv_target):
1834 <breakpoint_kind_from_pc>: Declare.
1835 (riscv_breakpoint_kind_from_pc): Turn into...
1836 (riscv_target::breakpoint_kind_from_pc): ...this.
1837 (the_low_target): Remove the op fields.
1838
1839 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
1840
1841 Turn the 'get_pc' and 'set_pc' linux target ops into methods
1842 of linux_process_target.
1843
1844 * linux-low.h (struct linux_target_ops): Remove the ops.
1845 (class linux_process_target) <low_supports_breakpoints>
1846 <low_get_pc>
1847 <low_set_pc>: Declare.
1848 * linux-low.cc (supports_breakpoints): Turn into...
1849 (linux_process_target::low_supports_breakpoints): ...this.
1850 (linux_process_target::low_get_pc): Define.
1851 (linux_process_target::low_set_pc): Define.
1852
1853 Update the callers below.
1854
1855 (linux_process_target::get_pc)
1856 (linux_process_target::save_stop_reason)
1857 (linux_process_target::maybe_move_out_of_jump_pad)
1858 (linux_process_target::wait_1)
1859 (linux_process_target::resume_one_lwp_throw)
1860 (linux_process_target::resume)
1861 (linux_process_target::proceed_all_lwps)
1862 (linux_process_target::read_pc)
1863 (linux_process_target::write_pc)
1864
1865 * linux-x86-low.cc (class linux_process_target)
1866 <low_supports_breakpoints>
1867 <low_get_pc>
1868 <low_set_pc>: Declare.
1869 (x86_target::low_supports_breakpoints): Define.
1870 (x86_get_pc): Turn into...
1871 (x86_target::low_get_pc): ...this.
1872 (x86_set_pc): Turn into...
1873 (x86_target::low_set_pc): ...this.
1874 (the_low_target): Remove the op fields.
1875 * linux-arm-low.cc (class arm_target)
1876 <low_supports_breakpoints>
1877 <low_get_pc>
1878 <low_set_pc>: Declare.
1879 (arm_target::low_supports_breakpoints)
1880 (arm_target::low_get_pc)
1881 (arm_target::low_set_pc): Define.
1882 (the_low_target): Remove the op fields.
1883 * linux-bfin-low.cc (class bfin_target)
1884 <low_supports_breakpoints>
1885 <low_get_pc>
1886 <low_set_pc>: Declare.
1887 (bfin_target::low_supports_breakpoints)
1888 (bfin_target::low_get_pc)
1889 (bfin_target::low_set_pc): Define.
1890 (the_low_target): Remove the op fields.
1891 * linux-cris-low.cc (class cris_target)
1892 <low_supports_breakpoints>
1893 <low_get_pc>
1894 <low_set_pc>: Declare.
1895 (cris_target::low_supports_breakpoints)
1896 (cris_target::low_get_pc)
1897 (cris_target::low_set_pc): Define.
1898 (the_low_target): Remove the op fields.
1899 * linux-crisv32-low.cc (class crisv32_target)
1900 <low_supports_breakpoints>
1901 <low_get_pc>
1902 <low_set_pc>: Declare.
1903 (crisv32_target::low_supports_breakpoints)
1904 (crisv32_target::low_get_pc)
1905 (crisv32_target::low_set_pc): Define.
1906 (the_low_target): Remove the op fields.
1907 * linux-m32r-low.cc (class m32r_target)
1908 <low_supports_breakpoints>
1909 <low_get_pc>
1910 <low_set_pc>: Declare.
1911 (m32r_target::low_supports_breakpoints)
1912 (m32r_target::low_get_pc)
1913 (m32r_target::low_set_pc): Define.
1914 (the_low_target): Remove the op fields.
1915 * linux-m68k-low.cc (class m68k_target)
1916 <low_supports_breakpoints>
1917 <low_get_pc>
1918 <low_set_pc>: Declare.
1919 (m68k_target::low_supports_breakpoints)
1920 (m68k_target::low_get_pc)
1921 (m68k_target::low_set_pc): Define.
1922 (the_low_target): Remove the op fields.
1923 * linux-nios2-low.cc (class nios2_target)
1924 <low_supports_breakpoints>
1925 <low_get_pc>
1926 <low_set_pc>: Declare.
1927 (nios2_target::low_supports_breakpoints)
1928 (nios2_target::low_get_pc)
1929 (nios2_target::low_set_pc): Define.
1930 (the_low_target): Remove the op fields.
1931 * linux-sh-low.cc (class sh_target)
1932 <low_supports_breakpoints>
1933 <low_get_pc>
1934 <low_set_pc>: Declare.
1935 (sh_target::low_supports_breakpoints)
1936 (sh_target::low_get_pc)
1937 (sh_target::low_set_pc): Define.
1938 (the_low_target): Remove the op fields.
1939 * linux-xtensa-low.cc (class xtensa_target)
1940 <low_supports_breakpoints>
1941 <low_get_pc>
1942 <low_set_pc>: Declare.
1943 (xtensa_target::low_supports_breakpoints)
1944 (xtensa_target::low_get_pc)
1945 (xtensa_target::low_set_pc): Define.
1946 (the_low_target): Remove the op fields.
1947 * linux-sparc-low.cc (class sparc_target)
1948 <low_supports_breakpoints>
1949 <low_get_pc>: Declare.
1950 (sparc_target::low_supports_breakpoints)
1951 (sparc_target::low_get_pc): Define.
1952 (the_low_target): Remove the op fields.
1953 * linux-tile-low.cc (class tile_target)
1954 <low_supports_breakpoints>
1955 <low_get_pc>
1956 <low_set_pc>: Declare.
1957 (tile_target::low_supports_breakpoints)
1958 (tile_target::low_get_pc)
1959 (tile_target::low_set_pc): Define.
1960 (the_low_target): Remove the op fields.
1961 * linux-aarch64-low.cc (class aarch64_target)
1962 <low_supports_breakpoints>
1963 <low_get_pc>
1964 <low_set_pc>: Declare.
1965 (aarch64_target::low_supports_breakpoints): Define.
1966 (aarch64_get_pc): Turn into...
1967 (aarch64_target::low_get_pc): ...this.
1968 (aarch64_set_pc): Turn into...
1969 (aarch64_target::low_set_pc): ...this.
1970 (the_low_target): Remove the op fields.
1971 * linux-mips-low.cc (class mips_target)
1972 <low_supports_breakpoints>
1973 <low_get_pc>
1974 <low_set_pc>: Declare.
1975 (mips_target::low_supports_breakpoints): Define.
1976 (mips_get_pc): Turn into...
1977 (mips_target::low_get_pc): ...this.
1978 (mips_set_pc): Turn into...
1979 (mips_target::low_set_pc): ...this.
1980 (the_low_target): Remove the op fields.
1981 * linux-ppc-low.cc (class ppc_target)
1982 <low_supports_breakpoints>
1983 <low_get_pc>
1984 <low_set_pc>: Declare.
1985 (ppc_target::low_supports_breakpoints): Define.
1986 (ppc_get_pc): Turn into...
1987 (ppc_target::low_get_pc): ...this.
1988 (ppc_set_pc): Turn into...
1989 (ppc_target::low_set_pc): ...this.
1990 (the_low_target): Remove the op fields.
1991 * linux-riscv-low.cc (class riscv_target)
1992 <low_supports_breakpoints>
1993 <low_get_pc>
1994 <low_set_pc>: Declare.
1995 (riscv_target::low_supports_breakpoints): Define.
1996 (riscv_get_pc): Turn into...
1997 (riscv_target::low_get_pc): ...this.
1998 (riscv_set_pc): Turn into...
1999 (riscv_target::low_set_pc): ...this.
2000 (the_low_target): Remove the op fields.
2001 * linux-s390-low.cc (class s390_target)
2002 <low_supports_breakpoints>
2003 <low_get_pc>
2004 <low_set_pc>: Declare.
2005 (s390_target::low_supports_breakpoints): Define.
2006 (s390_get_pc): Turn into...
2007 (s390_target::low_get_pc): ...this.
2008 (s390_set_pc): Turn into...
2009 (s390_target::low_set_pc): ...this.
2010 (the_low_target): Remove the op fields.
2011 * linux-tic6x-low.cc (class tic6x_target)
2012 <low_supports_breakpoints>
2013 <low_get_pc>
2014 <low_set_pc>: Declare.
2015 (tic6x_target::low_supports_breakpoints): Define.
2016 (tic6x_get_pc): Turn into...
2017 (tic6x_target::low_get_pc): ...this.
2018 (tic6x_set_pc): Turn into...
2019 (tic6x_target::low_set_pc): ...this.
2020 (the_low_target): Remove the op fields.
2021
2022 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2023
2024 Turn some more static methods in linux-low into private methods
2025 of linux_process_target.
2026
2027 * linux-low.cc (get_pc): Turn into...
2028 (linux_process_target::get_pc): ...this.
2029 (save_stop_reason): Turn into...
2030 (linux_process_target::save_stop_reason): ...this.
2031 (thread_still_has_status_pending_p): Turn into...
2032 (linux_process_target::thread_still_has_status_pending): ...this.
2033 (status_pending_p_callback): Turn into...
2034 (linux_process_target::status_pending_p_callback): ...this.
2035 (resume_stopped_resumed_lwps): Turn into...
2036 (linux_process_target::resume_stopped_resumed_lwps): ...this.
2037 (install_software_single_step_breakpoints): Turn into...
2038 (linux_process_target::install_software_single_step_breakpoints):
2039 ...this.
2040 (single_step): Turn into...
2041 (linux_process_target::single_step): ...this.
2042 (linux_resume_one_lwp_throw): Turn into...
2043 (linux_process_target::resume_one_lwp_throw): ...this.
2044 (linux_resume_one_lwp): Turn into...
2045 (linux_process_target::resume_one_lwp): ...this.
2046 (resume_status_pending_p): Turn into...
2047 (linux_process_target::resume_status_pending): ...this.
2048 (need_step_over_p): Turn into...
2049 (linux_process_target::thread_needs_step_over): ...this.
2050 (linux_resume_one_thread): Turn into...
2051 (linux_process_target::resume_one_thread): ...this.
2052 (proceed_one_lwp): Turn into...
2053 (linux_process_target::proceed_one_lwp): ...this.
2054 (unsuspend_and_proceed_one_lwp): Turn into...
2055 (linux_process_target::unsuspend_and_proceed_one_lwp): ...this.
2056
2057 Update the calls/references to the above functions below.
2058
2059 (linux_process_target::handle_extended_wait)
2060 (linux_process_target::filter_event)
2061 (linux_process_target::wait_for_event_filtered)
2062 (linux_process_target::wait_1)
2063 (linux_process_target::move_out_of_jump_pad)
2064 (linux_process_target::start_step_over)
2065 (linux_process_target::resume)
2066 (linux_process_target::proceed_all_lwps)
2067 (regsets_store_inferior_registers)
2068 (linux_process_target::store_register)
2069
2070 * linux-low.h (class linux_process_target)
2071 <get_pc>
2072 <save_stop_reason>
2073 <thread_still_has_status_pending>
2074 <status_pending_p_callback>
2075 <resume_stopped_resumed_lwps>
2076 <install_software_single_step_breakpoints>
2077 <single_step>
2078 <resume_one_lwp_throw>
2079 <resume_one_lwp>
2080 <resume_status_pending>
2081 <thread_needs_step_over>
2082 <resume_one_thread>
2083 <proceed_one_lwp>
2084 <unsuspend_and_proceed_one_lwp>: Declare.
2085
2086 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2087
2088 Turn the 'fetch_register' linux target op into a method of
2089 linux_process_target.
2090
2091 * linux-low.h (struct linux_target_ops) <fetch_register>: Remove.
2092 (class linux_process_target) <low_fetch_register>: Declare.
2093 * linux-x86-low.cc (the_low_target)
2094 * linux-aarch64-low.cc (the_low_target)
2095 * linux-arm-low.cc (the_low_target)
2096 * linux-bfin-low.cc (the_low_target)
2097 * linux-cris-low.cc (the_low_target)
2098 * linux-crisv32-low.cc (the_low_target)
2099 * linux-m32r-low.cc (the_low_target)
2100 * linux-m68k-low.cc (the_low_target)
2101 * linux-nios2-low.cc (the_low_target)
2102 * linux-ppc-low.cc (the_low_target)
2103 * linux-s390-low.cc (the_low_target)
2104 * linux-sh-low.cc (the_low_target)
2105 * linux-sparc-low.cc (the_low_target)
2106 * linux-tic6x-low.cc (the_low_target)
2107 * linux-tile-low.cc (the_low_target)
2108 * linux-xtensa-low.cc (the_low_target): Remove the op field.
2109 * linux-ia64-low.cc (class ia64_target) <low_fetch_register>:
2110 Declare.
2111 (ia64_fetch_register): Turn into...
2112 (ia64_target::low_fetch_register): ...this.
2113 (the_low_target): Remove the op field.
2114 * linux-mips-low.cc (class mips_target) <low_fetch_register>:
2115 Declare.
2116 (mips_fetch_register): Turn into...
2117 (mips_target::low_fetch_register): ...this.
2118 (the_low_target): Remove the op field.
2119 * linux-riscv-low.cc (class riscv_target) <low_fetch_register>:
2120 Declare.
2121 (riscv_fetch_register): Turn into...
2122 (riscv_target::low_fetch_register): ...this.
2123 (the_low_target): Remove the op field.
2124
2125 Update the callers below.
2126
2127 * linux-low.cc (linux_process_target::fetch_registers)
2128 (linux_process_target::low_fetch_register)
2129
2130 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2131
2132 Turn the 'cannot_fetch_register' and 'cannot_store_register'
2133 linux target ops into methods of linux_process_target.
2134
2135 * linux-low.h (struct linux_target_ops): Remove the low target ops.
2136 (class linux_process_target) <fetch_register>
2137 <store_register>
2138 <usr_fetch_inferior_registers>
2139 <usr_store_inferior_registers>
2140 <low_cannot_fetch_register>
2141 <low_cannot_fetch_register> Declare.
2142 * linux-low.cc (fetch_register): Turn into...
2143 (linux_process_target::fetch_register): ...this.
2144 (store_register): Turn into ...
2145 (linux_process_target::store_register): ...this.
2146 (usr_fetch_inferior_registers): Turn into...
2147 (linux_process_target::usr_fetch_inferior_registers): ...this.
2148 (usr_store_inferior_registers): Turn into...
2149 (linux_process_target::usr_store_inferior_registers): ...this.
2150 * linux-x86-low.cc (class x86_target)
2151 <low_cannot_fetch_register>
2152 <low_cannot_store_register>: Declare.
2153 (x86_cannot_store_register): Turn into...
2154 (x86_target::low_cannot_store_register): ...this.
2155 (x86_cannot_fetch_register): Turn into...
2156 (x86_target::low_cannot_fetch_register): ...this.
2157 (the_low_target): Remove the target op fields.
2158 * linux-aarch64-low.cc (class aarch64_target)
2159 <low_cannot_fetch_register>
2160 <low_cannot_store_register>: Declare.
2161 (aarch64_target::low_cannot_fetch_register)
2162 (aarch64_target::low_cannot_store_register): Define.
2163 (the_low_target): Remove the op fields.
2164 * linux-arm-low.cc (class arm_target)
2165 <low_cannot_fetch_register>
2166 <low_cannot_store_register>: Declare.
2167 (arm_cannot_fetch_register): Turn into...
2168 (arm_target::low_cannot_fetch_register): ...this.
2169 (arm_cannot_store_register): Turn into...
2170 (arm_target::low_cannot_store_register): ...this.
2171 (the_low_target): Remove the op fields.
2172 * linux-bfin-low.cc (class bfin_target)
2173 <low_cannot_fetch_register>
2174 <low_cannot_store_register>: Declare.
2175 (bfin_cannot_fetch_register): Turn into...
2176 (bfin_target::low_cannot_fetch_register): ...this.
2177 (bfin_cannot_store_register): Turn into...
2178 (bfin_target::low_cannot_store_register): ...this.
2179 (the_low_target): Remove the op fields.
2180 * linux-cris-low.cc (class cris_target)
2181 <low_cannot_fetch_register>
2182 <low_cannot_store_register>: Declare.
2183 (cris_cannot_fetch_register): Turn into...
2184 (cris_target::low_cannot_fetch_register): ...this.
2185 (cris_cannot_store_register): Turn into...
2186 (cris_target::low_cannot_store_register): ...this.
2187 (the_low_target): Remove the op fields.
2188 * linux-crisv32-low.cc (class crisv32_target)
2189 <low_cannot_fetch_register>
2190 <low_cannot_store_register>: Declare.
2191 (crisv32_target::low_cannot_fetch_register)
2192 (crisv32_target::low_cannot_store_register): Define.
2193 (the_low_target): Remove the op fields.
2194 * linux-ia64-low.cc (class ia64_target)
2195 <low_cannot_fetch_register>
2196 <low_cannot_store_register>: Declare.
2197 (ia64_cannot_fetch_register): Turn into...
2198 (ia64_target::low_cannot_fetch_register): ...this.
2199 (ia64_cannot_store_register): Turn into...
2200 (ia64_target::low_cannot_store_register): ...this.
2201 (the_low_target): Remove the op fields.
2202 * linux-m32r-low.cc (class m32r_target)
2203 <low_cannot_fetch_register>
2204 <low_cannot_store_register>: Declare.
2205 (m32r_cannot_fetch_register): Turn into...
2206 (m32r_target::low_cannot_fetch_register): ...this.
2207 (m32r_cannot_store_register): Turn into...
2208 (m32r_target::low_cannot_store_register): ...this.
2209 (the_low_target): Remove the op fields.
2210 * linux-m68k-low.cc (class m68k_target)
2211 <low_cannot_fetch_register>
2212 <low_cannot_store_register>: Declare.
2213 (m68k_cannot_fetch_register): Turn into...
2214 (m68k_target::low_cannot_fetch_register): ...this.
2215 (m68k_cannot_store_register): Turn into...
2216 (m68k_target::low_cannot_store_register): ...this.
2217 (the_low_target): Remove the op fields.
2218 * linux-mips-low.cc (class mips_target)
2219 <low_cannot_fetch_register>
2220 <low_cannot_store_register>: Declare.
2221 (mips_cannot_fetch_register): Turn into...
2222 (mips_target::low_cannot_fetch_register): ...this.
2223 (mips_cannot_store_register): Turn into...
2224 (mips_target::low_cannot_store_register): ...this.
2225 (get_usrregs_info): Inline at the call sites in
2226 low_cannot_fetch_register and low_cannot_store_register,
2227 and remove.
2228 (the_low_target): Remove the op fields.
2229 * linux-nios2-low.cc (class nios2_target)
2230 <low_cannot_fetch_register>
2231 <low_cannot_store_register>: Declare.
2232 (nios2_cannot_fetch_register): Turn into...
2233 (nios2_target::low_cannot_fetch_register): ...this.
2234 (nios2_cannot_store_register): Turn into...
2235 (nios2_target::low_cannot_store_register): ...this.
2236 (the_low_target): Remove the op fields.
2237 * linux-ppc-low.cc (class ppc_target)
2238 <low_cannot_fetch_register>
2239 <low_cannot_store_register>: Declare.
2240 (ppc_cannot_fetch_register): Turn into...
2241 (ppc_target::low_cannot_fetch_register): ...this.
2242 (ppc_cannot_store_register): Turn into...
2243 (ppc_target::low_cannot_store_register): ...this.
2244 (the_low_target): Remove the op fields.
2245 * linux-riscv-low.cc (class riscv_target)
2246 <low_cannot_fetch_register>
2247 <low_cannot_store_register>: Declare.
2248 (riscv_target::low_cannot_fetch_register)
2249 (riscv_target::low_cannot_store_register): Define.
2250 (the_low_target): Remove the op fields.
2251 * linux-s390-low.cc (class s390_target)
2252 <low_cannot_fetch_register>
2253 <low_cannot_store_register>: Declare.
2254 (s390_cannot_fetch_register): Turn into...
2255 (s390_target::low_cannot_fetch_register): ...this.
2256 (s390_cannot_store_register): Turn into...
2257 (s390_target::low_cannot_store_register): ...this.
2258 (the_low_target): Remove the op fields.
2259 * linux-sh-low.cc (class sh_target)
2260 <low_cannot_fetch_register>
2261 <low_cannot_store_register>: Declare.
2262 (sh_cannot_fetch_register): Turn into...
2263 (sh_target::low_cannot_fetch_register): ...this.
2264 (sh_cannot_store_register): Turn into...
2265 (sh_target::low_cannot_store_register): ...this.
2266 (the_low_target): Remove the op fields.
2267 * linux-sparc-low.cc (class sparc_target)
2268 <low_cannot_fetch_register>
2269 <low_cannot_store_register>: Declare.
2270 (sparc_cannot_fetch_register): Turn into...
2271 (sparc_target::low_cannot_fetch_register): ...this.
2272 (sparc_cannot_store_register): Turn into...
2273 (sparc_target::low_cannot_store_register): ...this.
2274 (the_low_target): Remove the op fields.
2275 * linux-tic6x-low.cc (class tic6x_target)
2276 <low_cannot_fetch_register>
2277 <low_cannot_store_register>: Declare.
2278 (tic6x_cannot_fetch_register): Turn into...
2279 (tic6x_target::low_cannot_fetch_register): ...this.
2280 (tic6x_cannot_store_register): Turn into...
2281 (tic6x_target::low_cannot_store_register): ...this.
2282 (the_low_target): Remove the op fields.
2283 * linux-tile-low.cc (class tile_target)
2284 <low_cannot_fetch_register>
2285 <low_cannot_store_register>: Declare.
2286 (tile_cannot_fetch_register): Turn into...
2287 (tile_target::low_cannot_fetch_register): ...this.
2288 (tile_cannot_store_register): Turn into...
2289 (tile_target::low_cannot_store_register): ...this.
2290 (the_low_target): Remove the op fields.
2291 * linux-xtensa-low.cc (class xtensa_target)
2292 <low_cannot_fetch_register>
2293 <low_cannot_store_register>: Declare.
2294 (xtensa_target::low_cannot_fetch_register)
2295 (xtensa_target::low_cannot_store_register): Define.
2296 (the_low_target): Remove the op fields.
2297
2298 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2299
2300 Turn the 'regs_info' linux target op into a method of
2301 linux_process_target.
2302
2303 * linux-low.h (struct linux_target_ops) <regs_info>: Remove.
2304 (class linux_process_target) <get_regs_info>: Define.
2305
2306 Update the callers below.
2307
2308 * linux-low.cc (linux_process_target::fetch_registers)
2309 (linux_process_target::store_registers)
2310 * proc-service.cc (gregset_info)
2311
2312 * linux-x86-low.cc (class x86_target) <get_regs_info>: Declare.
2313 (x86_linux_regs_info): Turn into ...
2314 (x86_target::get_regs_info): ...this.
2315 (the_low_target): Remove the op field.
2316 * linux-aarch64-low.cc (class aarch64_target) <get_regs_info>:
2317 Declare.
2318 (aarch64_regs_info): Turn into ...
2319 (aarch64_target::get_regs_info): ...this.
2320 (the_low_target): Remove the op field.
2321 * linux-arm-low.cc (class arm_target) <get_regs_info>: Declare.
2322 (arm_regs_info): Turn into ...
2323 (arm_target::get_regs_info): ...this.
2324 (the_low_target): Remove the op field.
2325 * linux-bfin-low.cc (class bfin_target) <get_regs_info>: Declare.
2326 (bfin_regs_info): Turn into ...
2327 (bfin_target::get_regs_info): ...this.
2328 (the_low_target): Remove the op field.
2329 * linux-cris-low.cc (class cris_target) <get_regs_info>: Declare.
2330 (cris_regs_info): Turn into ...
2331 (cris_target::get_regs_info): ...this.
2332 (the_low_target): Remove the op field.
2333 * linux-crisv32-low.cc (class crisv32_target) <get_regs_info>:
2334 Declare.
2335 (crisv32_regs_info): Turn into ...
2336 (crisv32_target::get_regs_info): ...this.
2337 (the_low_target): Remove the op field.
2338 * linux-ia64-low.cc (class ia64_target) <get_regs_info>: Declare.
2339 (ia64_regs_info): Turn into ...
2340 (ia64_target::get_regs_info): ...this.
2341 (the_low_target): Remove the op field.
2342 * linux-m32r-low.cc (class m32r_target) <get_regs_info>: Declare.
2343 (m32r_regs_info): Turn into ...
2344 (m32r_target::get_regs_info): ...this.
2345 (the_low_target): Remove the op field.
2346 * linux-m68k-low.cc (class m68k_target) <get_regs_info>: Declare.
2347 (m68k_regs_info): Turn into ...
2348 (m68k_target::get_regs_info): ...this.
2349 (the_low_target): Remove the op field.
2350 * linux-mips-low.cc (class mips_target) <get_regs_info>: Declare.
2351 (mips_regs_info): Turn into ...
2352 (mips_target::get_regs_info): ...this.
2353 (the_low_target): Remove the op field.
2354 (get_usrregs_info): Update the call to the op.
2355 * linux-nios2-low.cc (class nios2_target) <get_regs_info>: Declare.
2356 (nios2_regs_info): Turn into ...
2357 (nios2_target::get_regs_info): ...this.
2358 (the_low_target): Remove the op field.
2359 * linux-ppc-low.cc (class ppc_target) <get_regs_info>: Declare.
2360 (ppc_regs_info): Turn into ...
2361 (ppc_target::get_regs_info): ...this.
2362 (the_low_target): Remove the op field.
2363 * linux-riscv-low.cc (class riscv_target) <get_regs_info>: Declare.
2364 (riscv_regs_info): Turn into ...
2365 (riscv_target::get_regs_info): ...this.
2366 (the_low_target): Remove the op field.
2367 * linux-s390-low.cc (class s390_target) <get_regs_info>: Declare.
2368 (s390_regs_info): Turn into ...
2369 (s390_target::get_regs_info): ...this.
2370 (the_low_target): Remove the op field.
2371 (s390_collect_ptrace_register)
2372 (s390_supply_ptrace_register)
2373 (s390_fill_gregset): Update the call to the op.
2374 * linux-sh-low.cc (class sh_target) <get_regs_info>: Declare.
2375 (sh_regs_info): Turn into ...
2376 (sh_target::get_regs_info): ...this.
2377 (the_low_target): Remove the op field.
2378 * linux-sparc-low.cc (class sparc_target) <get_regs_info>: Declare.
2379 (sparc_regs_info): Turn into ...
2380 (sparc_target::get_regs_info): ...this.
2381 (the_low_target): Remove the op field.
2382 * linux-tic6x-low.cc (class tic6x_target) <get_regs_info>: Declare.
2383 (tic6x_regs_info): Turn into ...
2384 (tic6x_target::get_regs_info): ...this.
2385 (the_low_target): Remove the op field.
2386 * linux-tile-low.cc (class tile_target) <get_regs_info>: Declare.
2387 (tile_regs_info): Turn into ...
2388 (tile_target::get_regs_info): ...this.
2389 (the_low_target): Remove the op field.
2390 * linux-xtensa-low.cc (class xtensa_target) <get_regs_info>:
2391 Declare.
2392 (xtensa_regs_info): Turn into ...
2393 (xtensa_target::get_regs_info): ...this.
2394 (the_low_target): Remove the op field.
2395
2396 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2397
2398 Turn the 'arch_setup' linux target op into a method of
2399 linux_process_target.
2400
2401 * linux-low.h (struct linux_target_ops) <arch_setup>: Delete.
2402 (class linux_process_target) <arch_setup_thread>
2403 <low_arch_setup>: New declarations.
2404 * linux-low.cc (linux_arch_setup): Delete.
2405 (linux_arch_setup_thread): Turn into...
2406 (linux_process_target::arch_setup_thread): ... this.
2407
2408 Update the callers below.
2409
2410 (linux_process_target::handle_extended_wait)
2411 (linux_process_target::post_create_inferior)
2412 (linux_process_target::filter_event)
2413
2414 * linux-x86-low.cc (class x86_target) <low_arch_setup>: New
2415 declaration.
2416 (x86_linux_update_xmltarget): Turn into...
2417 (x86_target::update_xmltarget): ...this.
2418 (x86_linux_process_qsupported): Update the call to
2419 x86_linux_update_xmltarget.
2420 (x86_arch_setup): Turn into ...
2421 (x86_target::low_arch_setup): ...this.
2422 (the_low_target): Remove the op field.
2423 * linux-aarch64-low.cc (class aarch64_target) <low_arch_setup>: New
2424 declaration.
2425 (aarch64_arch_setup): Turn into ...
2426 (aarch64_target::low_arch_setup): ...this.
2427 (the_low_target): Remove the op field.
2428 * linux-arm-low.cc (class arm_target) <low_arch_setup>: New
2429 declaration.
2430 (arm_arch_setup): Turn into ...
2431 (arm_target::low_arch_setup): ...this.
2432 (the_low_target): Remove the op field.
2433 * linux-bfin-low.cc (class bfin_target) <low_arch_setup>: New
2434 declaration.
2435 (bfin_arch_setup): Turn into ...
2436 (bfin_target::low_arch_setup): ...this.
2437 (the_low_target): Remove the op field.
2438 * linux-cris-low.cc (class cris_target) <low_arch_setup>: New
2439 declaration.
2440 (cris_arch_setup): Turn into ...
2441 (cris_target::low_arch_setup): ...this.
2442 (the_low_target): Remove the op field.
2443 * linux-crisv32-low.cc (class crisv32_target) <low_arch_setup>: New
2444 declaration.
2445 (crisv32_arch_setup): Turn into ...
2446 (crisv32_target::low_arch_setup): ...this.
2447 (the_low_target): Remove the op field.
2448 * linux-ia64-low.cc (class ia64_target) <low_arch_setup>: New
2449 declaration.
2450 (ia64_arch_setup): Turn into ...
2451 (ia64_target::low_arch_setup): ...this.
2452 (the_low_target): Remove the op field.
2453 * linux-m32r-low.cc (class m32r_target) <low_arch_setup>: New
2454 declaration.
2455 (m32r_arch_setup): Turn into ...
2456 (m32r_target::low_arch_setup): ...this.
2457 (the_low_target): Remove the op field.
2458 * linux-m68k-low.cc (class m68k_target) <low_arch_setup>: New
2459 declaration.
2460 (m68k_arch_setup): Turn into ...
2461 (m68k_target::low_arch_setup): ...this.
2462 (the_low_target): Remove the op field.
2463 * linux-mips-low.cc (class mips_target) <low_arch_setup>: New
2464 declaration.
2465 (mips_arch_setup): Turn into ...
2466 (mips_target::low_arch_setup): ...this.
2467 (the_low_target): Remove the op field.
2468 * linux-nios2-low.cc (class nios2_target) <low_arch_setup>: New
2469 declaration.
2470 (nios2_arch_setup): Turn into ...
2471 (nios2_target::low_arch_setup): ...this.
2472 (the_low_target): Remove the op field.
2473 * linux-ppc-low.cc (class ppc_target) <low_arch_setup>: New
2474 declaration.
2475 (ppc_arch_setup): Turn into ...
2476 (ppc_target::low_arch_setup): ...this.
2477 (the_low_target): Remove the op field.
2478 * linux-riscv-low.cc (class riscv_target) <low_arch_setup>: New
2479 declaration.
2480 (riscv_arch_setup): Turn into ...
2481 (riscv_target::low_arch_setup): ...this.
2482 (the_low_target): Remove the op field.
2483 * linux-s390-low.cc (class s390_target) <low_arch_setup>: New
2484 declaration.
2485 (s390_arch_setup): Turn into ...
2486 (s390_target::low_arch_setup): ...this.
2487 (the_low_target): Remove the op field.
2488 * linux-sh-low.cc (class sh_target) <low_arch_setup>: New
2489 declaration.
2490 (sh_arch_setup): Turn into ...
2491 (sh_target::low_arch_setup): ...this.
2492 (the_low_target): Remove the op field.
2493 * linux-sparc-low.cc (class sparc_target) <low_arch_setup>: New
2494 declaration.
2495 (sparc_arch_setup): Turn into ...
2496 (sparc_target::low_arch_setup): ...this.
2497 (the_low_target): Remove the op field.
2498 * linux-tic6x-low.cc (class tic6x_target) <low_arch_setup>: New
2499 declaration.
2500 (tic6x_arch_setup): Turn into ...
2501 (tic6x_target::low_arch_setup): ...this.
2502 (the_low_target): Remove the op field.
2503 * linux-tile-low.cc (class tile_target) <low_arch_setup>: New
2504 declaration.
2505 (tile_arch_setup): Turn into ...
2506 (tile_target::low_arch_setup): ...this.
2507 (the_low_target): Remove the op field.
2508 * linux-xtensa-low.cc (class xtensa_target) <low_arch_setup>: New
2509 declaration.
2510 (xtensa_arch_setup): Turn into ...
2511 (xtensa_target::low_arch_setup): ...this.
2512 (the_low_target): Remove the op field.
2513
2514 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2515
2516 * linux-low.h (the_linux_target): New extern declaration.
2517 * linux-low.cc (initialize_low): Use 'the_linux_target' to set
2518 'the_target'.
2519 (the_linux_target): Remove.
2520 * linux-x86-low.cc (class x86_target): New class.
2521 (the_x86_target): New static object.
2522 (the_linux_target): Define as pointer to the_x86_target.
2523 * linux-aarch64-low.cc (class aarch64_target): New class.
2524 (the_aarch64_target): New static object.
2525 (the_linux_target): Define as pointer to the_aarch64_target.
2526 * linux-arm-low.cc (class arm_target): New class.
2527 (the_arm_target): New static object.
2528 (the_linux_target): Define as pointer to the_arm_target.
2529 * linux-bfin-low.cc (class bfin_target): New class.
2530 (the_bfin_target): New static object.
2531 (the_linux_target): Define as pointer to the_bfin_target.
2532 * linux-cris-low.cc (class cris_target): New class.
2533 (the_cris_target): New static object.
2534 (the_linux_target): Define as pointer to the_cris_target.
2535 * linux-crisv32-low.cc (class crisv32_target): New class.
2536 (the_crisv32_target): New static object.
2537 (the_linux_target): Define as pointer to the_crisv32_target.
2538 * linux-ia64-low.cc (class ia64_target): New class.
2539 (the_ia64_target): New static object.
2540 (the_linux_target): Define as pointer to the_ia64_target.
2541 * linux-m32r-low.cc (class m32r_target): New class.
2542 (the_m32r_target): New static object.
2543 (the_linux_target): Define as pointer to the_m32r_target.
2544 * linux-m68k-low.cc (class m68k_target): New class.
2545 (the_m68k_target): New static object.
2546 (the_linux_target): Define as pointer to the_m68k_target.
2547 * linux-mips-low.cc (class mips_target): New class.
2548 (the_mips_target): New static object.
2549 (the_linux_target): Define as pointer to the_mips_target.
2550 * linux-nios2-low.cc (class nios2_target): New class.
2551 (the_nios2_target): New static object.
2552 (the_linux_target): Define as pointer to the_nios2_target.
2553 * linux-ppc-low.cc (class ppc_target): New class.
2554 (the_ppc_target): New static object.
2555 (the_linux_target): Define as pointer to the_ppc_target.
2556 * linux-riscv-low.cc (class riscv_target): New class.
2557 (the_riscv_target): New static object.
2558 (the_linux_target): Define as pointer to the_riscv_target.
2559 * linux-s390-low.cc (class s390_target): New class.
2560 (the_s390_target): New static object.
2561 (the_linux_target): Define as pointer to the_s390_target.
2562 * linux-sh-low.cc (class sh_target): New class.
2563 (the_sh_target): New static object.
2564 (the_linux_target): Define as pointer to the_sh_target.
2565 * linux-sparc-low.cc (class sparc_target): New class.
2566 (the_sparc_target): New static object.
2567 (the_linux_target): Define as pointer to the_sparc_target.
2568 * linux-tic6x-low.cc (class tic6x_target): New class.
2569 (the_tic6x_target): New static object.
2570 (the_linux_target): Define as pointer to the_tic6x_target.
2571 * linux-tile-low.cc (class tile_target): New class.
2572 (the_tile_target): New static object.
2573 (the_linux_target): Define as pointer to the_tile_target.
2574 * linux-xtensa-low.cc (class xtensa_target): New class.
2575 (the_xtensa_target): New static object.
2576 (the_linux_target): Define as pointer to the_xtensa_target.
2577
2578 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2579
2580 Turn some static functions in linux-low.cc into private methods of
2581 linux_process_target.
2582
2583 * linux-low.cc (handle_extended_wait): Turn into ...
2584 (linux_process_target::handle_extended_wait): ...this. Call
2585 'mourn' on 'this' object instead of 'the_target'.
2586 (maybe_move_out_of_jump_pad): Turn into...
2587 (linux_process_target::maybe_move_out_of_jump_pad): ...this.
2588 (linux_low_filter_event): Turn into...
2589 (linux_process_target::filter_event): ...this.
2590 (linux_wait_for_event_filtered): Turn into...
2591 (linux_process_target::wait_for_event_filtered): ...this.
2592 (linux_wait_for_event): Turn into...
2593 (linux_process_target::wait_for_event): ...this.
2594 (linux_wait_1): Turn into...
2595 (linux_process_target::wait_1): ...this.
2596 (wait_for_sigstop): Turn into...
2597 (linux_process_target::wait_for_sigstop): ...this.
2598 (move_out_of_jump_pad_callback): Turn into...
2599 (linux_process_target::move_out_of_jump_pad): ...this.
2600 (stop_all_lwps): Turn into...
2601 (linux_process_target::stop_all_lwps): ...this.
2602 (start_step_over): Turn into...
2603 (linux_process_target::start_step_over): ...this.
2604 (complete_ongoing_step_over): Turn into...
2605 (linux_process_target::complete_ongoing_step_over): ...this.
2606 (proceed_all_lwps): Turn into...
2607 (linux_process_target::proceed_all_lwps): ...this.
2608 (unstop_all_lwps): Turn into...
2609 (linux_process_target::unstop_all_lwps): ...this.
2610
2611 * linux-low.h (class linux_process_target)
2612 <handle_extended_wait>
2613 <maybe_move_out_of_jump_pad>
2614 filter_event>
2615 <wait_for_event_filtered>
2616 <wait_for_event>
2617 <wait_1>
2618 <wait_for_sigstop>
2619 <move_out_of_jump_pad>
2620 <stop_all_lwps>
2621 <start_step_over>
2622 <complete_ongoing_step_over>
2623 <proceed_all_lwps>
2624 <unstop_all_lwps>: Declare.
2625
2626 Update the callers below.
2627
2628 * linux-low.cc (linux_process_target::attach): Update.
2629 (linux_process_target::stabilize_threads): Ditto.
2630 (linux_process_target::wait): Ditto.
2631
2632 2020-04-02 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2633
2634 * linux-low.h (struct linux_target_ops): Update the comment for
2635 'cannot_store_register' to return 0 or 1.
2636 * linux-ppc-low.cc (ppc_cannot_store_register): Return 1 instead
2637 of 2.
2638
2639 2020-03-20 Simon Marchi <simon.marchi@efficios.com>
2640
2641 * config.in: Re-generate.
2642 * configure: Re-generate.
2643
2644 2020-03-17 Kamil Rytarowski <n54@gmx.com>
2645
2646 * regcache.cc (find_register_by_number): Update.
2647 * tdesc.cc (init_target_desc): Likewise.
2648 * tdesc.h (target_desc::reg_defs): Likewise.
2649
2650 2020-03-12 Tom Tromey <tom@tromey.com>
2651
2652 * configure: Rebuild.
2653 * configure.ac (GDBSERVER_DEPFILES): Remove srv_selftest_objs.
2654 (WIN32APILIBS): New subst.
2655 * Makefile.in (SFILES, OBS, TAGS, GDBREPLAY_OBS): Remove
2656 gdbsupport files.
2657 (gdbsupport/%.o): Remove target.
2658 (GDBSUPPORT_BUILDDIR, GDBSUPPORT): New variables.
2659 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Add GDBSUPPORT.
2660 (WIN32APILIBS): New variable.
2661 (gdbserver$(EXEEXT)): Add WIN32APILIBS.
2662 (gdbreplay$(EXEEXT)): Likewise.
2663
2664 2020-03-12 Tom Tromey <tom@tromey.com>
2665
2666 * config.in, configure: Rebuild.
2667 * configure.ac: Call ZW_GNU_GETTEXT_SISTER_DIR.
2668 * acinclude.m4: Include gettext-sister.m4.
2669 * Makefile.in (top_builddir, INTL, INTL_DEPS, INTL_CFLAGS): New
2670 variables.
2671 (INCLUDE_CFLAGS): Add INTL_CFLAGS.
2672 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Use INTL_DEPS, INTL.
2673
2674 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2675
2676 * acinclude.m4: Update path to selftest.m4.
2677
2678 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2679
2680 * configure.ac: Don't source bfd/development.sh, move
2681 GDB_AC_COMMON higher.
2682 * configure: Re-generate.
2683
2684 2020-03-12 Simon Marchi <simon.marchi@efficios.com>
2685
2686 * configure: Re-generate.
2687
2688 2020-03-11 Simon Marchi <simon.marchi@efficios.com>
2689
2690 * configure: Re-generate.
2691
2692 2020-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
2693
2694 * .dir-locals.el: New file.
2695
2696 2020-03-05 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2697
2698 * .gitattributes: New file.
2699
2700 2020-03-02 Andrew Burgess <andrew.burgess@embecosm.com>
2701
2702 * remote-utils.cc (prepare_resume_reply): Add ability to convert T
2703 reply into an S reply.
2704 * server.cc (disable_packet_T): New global.
2705 (captured_main): Set new global when appropriate.
2706 * server.h (disable_packet_T): Declare.
2707
2708 2020-02-21 Tom Tromey <tom@tromey.com>
2709
2710 * Makefile.in (mostlyclean): New target.
2711
2712 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
2713
2714 * target.h (struct process_stratum_target): Remove.
2715 (class process_target): Rename to ...
2716 (class process_stratum_target): ... this.
2717 * linux-low.h (class linux_process_target): Derive from
2718 'process_stratum_target'.
2719 * linux-low.cc (linux_target_ops): Remove.
2720 (initialize_low): Set the_target to the singleton instance of
2721 linux_process_target.
2722 * lynx-low.h (class lynx_process_target): Derive from
2723 'process_stratum_target'.
2724 * lynx-low.cc (lynx_target_ops): Remove.
2725 (initialize_low): Set the_target to the singleton instance of
2726 lynx_process_target.
2727 * nto-low.h (class nto_process_target): Derive from
2728 'process_stratum_target'.
2729 * nto-low.cc (nto_target_ops): Remove.
2730 (initialize_low): Set the_target to the singleton instance of
2731 nto_process_target.
2732 * win32-low.h (class win32_process_target): Derive from
2733 'process_stratum_target'.
2734 * win32-low.cc (win32_target_ops): Remove.
2735 (initialize_low): Set the_target to the singleton instance of
2736 win32_process_target.
2737
2738 Replace 'the_target->pt' with 'the_target' in the uses below.
2739
2740 * hostio.cc (hostio_error)
2741 (handle_setfs)
2742 (handle_open)
2743 (handle_unlink)
2744 (handle_readlink)
2745 * linux-aarch32-low.cc (arm_breakpoint_at)
2746 * linux-aarch64-low.cc (aarch64_breakpoint_at)
2747 * linux-arm-low.cc (arm_sigreturn_next_pc)
2748 (arm_get_hwcap)
2749 (arm_get_syscall_trapinfo)
2750 * linux-cris-low.cc (cris_breakpoint_at)
2751 * linux-crisv32-low.cc (cris_breakpoint_at)
2752 * linux-low.cc (handle_extended_wait)
2753 (linux_wait_1)
2754 (linux_read_memory)
2755 (linux_process_target::breakpoint_kind_from_pc)
2756 (linux_get_auxv)
2757 * linux-m32r-low.cc (m32r_breakpoint_at)
2758 * linux-mips-low.cc (mips_breakpoint_at)
2759 * linux-nios2-low.cc (nios2_breakpoint_at)
2760 * linux-ppc-low.cc (ppc_breakpoint_at)
2761 * linux-s390-low.cc (s390_get_hwcap)
2762 * linux-sh-low.cc (sh_breakpoint_at)
2763 * linux-sparc-low.cc (sparc_fill_gregset_to_stack)
2764 (sparc_store_gregset_from_stack)
2765 (sparc_breakpoint_at)
2766 * linux-tic6x-low.cc (tic6x_breakpoint_at)
2767 * linux-tile-low.cc (tile_breakpoint_at)
2768 * linux-x86-low.cc (x86_breakpoint_at)
2769 * linux-xtensa-low.cc (xtensa_breakpoint_at)
2770 * mem-break.cc (bp_size)
2771 (bp_opcode)
2772 (insert_memory_breakpoint)
2773 (set_raw_breakpoint_at)
2774 (delete_raw_breakpoint)
2775 (z_type_supported)
2776 (uninsert_raw_breakpoint)
2777 (reinsert_raw_breakpoint)
2778 (validate_inserted_breakpoint)
2779 * regcache.cc (regcache_read_pc)
2780 (regcache_write_pc)
2781 * remote-utils.cc (putpkt_binary_1)
2782 (input_interrupt)
2783 (getpkt)
2784 (prepare_resume_reply)
2785 * server.cc (handle_general_set)
2786 (handle_detach)
2787 (handle_qxfer_auxv)
2788 (handle_qxfer_exec_file)
2789 (handle_qxfer_libraries_svr4)
2790 (handle_qxfer_osdata)
2791 (handle_qxfer_siginfo)
2792 (handle_qxfer_fdpic)
2793 (handle_query)
2794 (resume)
2795 (handle_v_requests)
2796 (queue_stop_reply_callback)
2797 (captured_main)
2798 * target.cc (prepare_to_access_memory)
2799 (done_accessing_memory)
2800 (read_inferior_memory)
2801 (target_write_memory)
2802 (target_stop_and_wait)
2803 (target_wait)
2804 (target_mourn_inferior)
2805 (target_continue_no_signal)
2806 (target_continue)
2807 (target_supports_multi_process)
2808 (kill_inferior)
2809 * target.h
2810 (target_create_inferior)
2811 (target_post_create_inferior)
2812 (myattach)
2813 (target_supports_fork_events)
2814 (target_supports_vfork_events)
2815 (target_supports_exec_events)
2816 (target_handle_new_gdb_connection)
2817 (detach_inferior)
2818 (mythread_alive)
2819 (fetch_inferior_registers)
2820 (store_inferior_registers)
2821 (join_inferior)
2822 (target_supports_non_stop)
2823 (target_async)
2824 (target_process_qsupported)
2825 (target_supports_catch_syscall)
2826 (target_get_ipa_tdesc_idx)
2827 (target_supports_tracepoints)
2828 (target_supports_fast_tracepoints)
2829 (target_get_min_fast_tracepoint_insn_len)
2830 (target_thread_stopped)
2831 (target_pause_all)
2832 (target_unpause_all)
2833 (target_stabilize_threads)
2834 (target_install_fast_tracepoint_jump_pad)
2835 (target_emit_ops)
2836 (target_supports_disable_randomization)
2837 (target_supports_agent)
2838 (target_enable_btrace)
2839 (target_disable_btrace)
2840 (target_read_btrace)
2841 (target_read_btrace_conf)
2842 (target_supports_range_stepping)
2843 (target_supports_stopped_by_sw_breakpoint)
2844 (target_stopped_by_sw_breakpoint)
2845 (target_supports_stopped_by_hw_breakpoint)
2846 (target_supports_hardware_single_step)
2847 (target_stopped_by_hw_breakpoint)
2848 (target_breakpoint_kind_from_pc)
2849 (target_breakpoint_kind_from_current_state)
2850 (target_supports_software_single_step)
2851 (target_core_of_thread)
2852 (target_thread_name)
2853 (target_thread_handle)
2854 * win32-low.cc (do_initial_child_stuff)
2855
2856 Rename target op default definitions listed below.
2857
2858 * target.cc (process_target::post_create_inferior): Rename as ...
2859 (process_stratum_target::post_create_inferior): ... this.
2860 (process_target::prepare_to_access_memory): Rename as ...
2861 (process_stratum_target::prepare_to_access_memory): ... this.
2862 (process_target::done_accessing_memory): Rename as ...
2863 (process_stratum_target::done_accessing_memory): ... this.
2864 (process_target::look_up_symbols): Rename as ...
2865 (process_stratum_target::look_up_symbols): ... this.
2866 (process_target::supports_read_auxv): Rename as ...
2867 (process_stratum_target::supports_read_auxv): ... this.
2868 (process_target::read_auxv): Rename as ...
2869 (process_stratum_target::read_auxv): ... this.
2870 (process_target::supports_z_point_type): Rename as ...
2871 (process_stratum_target::supports_z_point_type): ... this.
2872 (process_target::insert_point): Rename as ...
2873 (process_stratum_target::insert_point): ... this.
2874 (process_target::remove_point): Rename as ...
2875 (process_stratum_target::remove_point): ... this.
2876 (process_target::stopped_by_sw_breakpoint): Rename as ...
2877 (process_stratum_target::stopped_by_sw_breakpoint): ... this.
2878 (process_target::supports_stopped_by_sw_breakpoint): Rename as ...
2879 (process_stratum_target::supports_stopped_by_sw_breakpoint): ... this.
2880 (process_target::stopped_by_hw_breakpoint): Rename as ...
2881 (process_stratum_target::stopped_by_hw_breakpoint): ... this.
2882 (process_target::supports_stopped_by_hw_breakpoint): Rename as ...
2883 (process_stratum_target::supports_stopped_by_hw_breakpoint): ... this.
2884 (process_target::supports_hardware_single_step): Rename as ...
2885 (process_stratum_target::supports_hardware_single_step): ... this.
2886 (process_target::stopped_by_watchpoint): Rename as ...
2887 (process_stratum_target::stopped_by_watchpoint): ... this.
2888 (process_target::stopped_data_address): Rename as ...
2889 (process_stratum_target::stopped_data_address): ... this.
2890 (process_target::supports_read_offsets): Rename as ...
2891 (process_stratum_target::supports_read_offsets): ... this.
2892 (process_target::read_offsets): Rename as ...
2893 (process_stratum_target::read_offsets): ... this.
2894 (process_target::supports_get_tls_address): Rename as ...
2895 (process_stratum_target::supports_get_tls_address): ... this.
2896 (process_target::get_tls_address): Rename as ...
2897 (process_stratum_target::get_tls_address): ... this.
2898 (process_target::hostio_last_error): Rename as ...
2899 (process_stratum_target::hostio_last_error): ... this.
2900 (process_target::supports_qxfer_osdata): Rename as ...
2901 (process_stratum_target::supports_qxfer_osdata): ... this.
2902 (process_target::qxfer_osdata): Rename as ...
2903 (process_stratum_target::qxfer_osdata): ... this.
2904 (process_target::supports_qxfer_siginfo): Rename as ...
2905 (process_stratum_target::supports_qxfer_siginfo): ... this.
2906 (process_target::qxfer_siginfo): Rename as ...
2907 (process_stratum_target::qxfer_siginfo): ... this.
2908 (process_target::supports_non_stop): Rename as ...
2909 (process_stratum_target::supports_non_stop): ... this.
2910 (process_target::async): Rename as ...
2911 (process_stratum_target::async): ... this.
2912 (process_target::start_non_stop): Rename as ...
2913 (process_stratum_target::start_non_stop): ... this.
2914 (process_target::supports_multi_process): Rename as ...
2915 (process_stratum_target::supports_multi_process): ... this.
2916 (process_target::supports_fork_events): Rename as ...
2917 (process_stratum_target::supports_fork_events): ... this.
2918 (process_target::supports_vfork_events): Rename as ...
2919 (process_stratum_target::supports_vfork_events): ... this.
2920 (process_target::supports_exec_events): Rename as ...
2921 (process_stratum_target::supports_exec_events): ... this.
2922 (process_target::handle_new_gdb_connection): Rename as ...
2923 (process_stratum_target::handle_new_gdb_connection): ... this.
2924 (process_target::handle_monitor_command): Rename as ...
2925 (process_stratum_target::handle_monitor_command): ... this.
2926 (process_target::core_of_thread): Rename as ...
2927 (process_stratum_target::core_of_thread): ... this.
2928 (process_target::supports_read_loadmap): Rename as ...
2929 (process_stratum_target::supports_read_loadmap): ... this.
2930 (process_target::read_loadmap): Rename as ...
2931 (process_stratum_target::read_loadmap): ... this.
2932 (process_target::process_qsupported): Rename as ...
2933 (process_stratum_target::process_qsupported): ... this.
2934 (process_target::supports_tracepoints): Rename as ...
2935 (process_stratum_target::supports_tracepoints): ... this.
2936 (process_target::read_pc): Rename as ...
2937 (process_stratum_target::read_pc): ... this.
2938 (process_target::write_pc): Rename as ...
2939 (process_stratum_target::write_pc): ... this.
2940 (process_target::supports_thread_stopped): Rename as ...
2941 (process_stratum_target::supports_thread_stopped): ... this.
2942 (process_target::thread_stopped): Rename as ...
2943 (process_stratum_target::thread_stopped): ... this.
2944 (process_target::supports_get_tib_address): Rename as ...
2945 (process_stratum_target::supports_get_tib_address): ... this.
2946 (process_target::get_tib_address): Rename as ...
2947 (process_stratum_target::get_tib_address): ... this.
2948 (process_target::pause_all): Rename as ...
2949 (process_stratum_target::pause_all): ... this.
2950 (process_target::unpause_all): Rename as ...
2951 (process_stratum_target::unpause_all): ... this.
2952 (process_target::stabilize_threads): Rename as ...
2953 (process_stratum_target::stabilize_threads): ... this.
2954 (process_target::supports_fast_tracepoints): Rename as ...
2955 (process_stratum_target::supports_fast_tracepoints): ... this.
2956 (process_target::get_min_fast_tracepoint_insn_len): Rename as ...
2957 (process_stratum_target::get_min_fast_tracepoint_insn_len): ... this.
2958 (process_target::emit_ops): Rename as ...
2959 (process_stratum_target::emit_ops): ... this.
2960 (process_target::supports_disable_randomization): Rename as ...
2961 (process_stratum_target::supports_disable_randomization): ... this.
2962 (process_target::supports_qxfer_libraries_svr4): Rename as ...
2963 (process_stratum_target::supports_qxfer_libraries_svr4): ... this.
2964 (process_target::qxfer_libraries_svr4): Rename as ...
2965 (process_stratum_target::qxfer_libraries_svr4): ... this.
2966 (process_target::supports_agent): Rename as ...
2967 (process_stratum_target::supports_agent): ... this.
2968 (process_target::enable_btrace): Rename as ...
2969 (process_stratum_target::enable_btrace): ... this.
2970 (process_target::disable_btrace): Rename as ...
2971 (process_stratum_target::disable_btrace): ... this.
2972 (process_target::read_btrace): Rename as ...
2973 (process_stratum_target::read_btrace): ... this.
2974 (process_target::read_btrace_conf): Rename as ...
2975 (process_stratum_target::read_btrace_conf): ... this.
2976 (process_target::supports_range_stepping): Rename as ...
2977 (process_stratum_target::supports_range_stepping): ... this.
2978 (process_target::supports_pid_to_exec_file): Rename as ...
2979 (process_stratum_target::supports_pid_to_exec_file): ... this.
2980 (process_target::pid_to_exec_file): Rename as ...
2981 (process_stratum_target::pid_to_exec_file): ... this.
2982 (process_target::supports_multifs): Rename as ...
2983 (process_stratum_target::supports_multifs): ... this.
2984 (process_target::multifs_open): Rename as ...
2985 (process_stratum_target::multifs_open): ... this.
2986 (process_target::multifs_unlink): Rename as ...
2987 (process_stratum_target::multifs_unlink): ... this.
2988 (process_target::multifs_readlink): Rename as ...
2989 (process_stratum_target::multifs_readlink): ... this.
2990 (process_target::breakpoint_kind_from_pc): Rename as ...
2991 (process_stratum_target::breakpoint_kind_from_pc): ... this.
2992 (process_target::breakpoint_kind_from_current_state): Rename as ...
2993 (process_stratum_target::breakpoint_kind_from_current_state): ... this.
2994 (process_target::thread_name): Rename as ...
2995 (process_stratum_target::thread_name): ... this.
2996 (process_target::thread_handle): Rename as ...
2997 (process_stratum_target::thread_handle): ... this.
2998 (process_target::supports_software_single_step): Rename as ...
2999 (process_stratum_target::supports_software_single_step): ... this.
3000 (process_target::supports_catch_syscall): Rename as ...
3001 (process_stratum_target::supports_catch_syscall): ... this.
3002 (process_target::get_ipa_tdesc_idx): Rename as ...
3003 (process_stratum_target::get_ipa_tdesc_idx): ... this.
3004
3005 2020-02-20 Pedro Alves <palves@redhat.com>
3006
3007 * target.cc (set_target_ops): Simply copy the given target pointer
3008 instead of creating a copy of the pointed object.
3009
3010 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3011
3012 Turn process_stratum_target's get_ipa_tdesc_idx op into a method
3013 of process_target.
3014
3015 * target.h (struct process_stratum_target): Remove the target op.
3016 (class process_target): Add the target op.
3017 (target_get_ipa_tdesc_idx): Update the macro.
3018 * target.cc (process_target::get_ipa_tdesc_idx): Define.
3019
3020 Update the derived classes and callers below.
3021
3022 * linux-low.cc (linux_target_ops): Update.
3023 (linux_get_ipa_tdesc_idx): Turn into ...
3024 (linux_process_target::get_ipa_tdesc_idx): ... this.
3025 * linux-low.h (class linux_process_target): Update.
3026 * lynx-low.cc (lynx_target_ops): Update.
3027 * nto-low.cc (nto_target_ops): Update.
3028 * win32-low.cc (win32_target_ops): Update.
3029
3030 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3031
3032 Turn process_stratum_target's supports_catch_syscall op into a
3033 method of process_target.
3034
3035 * target.h (struct process_stratum_target): Remove the target op.
3036 (class process_target): Add the target op.
3037 (target_supports_catch_syscall): Update the macro.
3038 * target.cc (process_target::supports_catch_syscall): Define.
3039
3040 Update the derived classes and callers below.
3041
3042 * linux-low.cc (linux_target_ops): Update.
3043 (linux_supports_catch_syscall): Turn into ...
3044 (linux_process_target::supports_catch_syscall): ... this.
3045 * linux-low.h (class linux_process_target): Update.
3046 * lynx-low.cc (lynx_target_ops): Update.
3047 * nto-low.cc (nto_target_ops): Update.
3048 * win32-low.cc (win32_target_ops): Update.
3049
3050 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3051
3052 Turn process_stratum_target's supports_software_single_step op
3053 into a method of process_target.
3054
3055 * target.h (struct process_stratum_target): Remove the target op.
3056 (class process_target): Add the target op.
3057 (target_supports_software_single_step): Update the macro.
3058 * target.cc (process_target::supports_software_single_step): Define.
3059
3060 Update the derived classes and callers below.
3061
3062 * linux-low.cc (linux_target_ops): Update.
3063 (linux_supports_software_single_step): Turn into ...
3064 (linux_process_target::supports_software_single_step): ... this.
3065 * linux-low.h (class linux_process_target): Update.
3066 * lynx-low.cc (lynx_target_ops): Update.
3067 * nto-low.cc (nto_target_ops): Update.
3068 * win32-low.cc (win32_target_ops): Update.
3069
3070 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3071
3072 Turn process_stratum_target's thread_name and thread_handle ops
3073 into methods of process_target.
3074
3075 * target.h (struct process_stratum_target): Remove the target ops.
3076 (class process_target): Add the target ops.
3077 (target_thread_name): Update the macro.
3078 (target_thread_handle): Update the macro.
3079 * target.cc (process_target::thread_name): Define.
3080 (process_target::thread_handle): Define.
3081
3082 Update the derived classes and callers below.
3083
3084 * linux-low.cc (linux_target_ops): Update.
3085 (linux_process_target::thread_name): Define.
3086 (linux_process_target::thread_handle): Define.
3087 * linux-low.h (class linux_process_target): Update.
3088 * lynx-low.cc (lynx_target_ops): Update.
3089 * nto-low.cc (nto_target_ops): Update.
3090 * win32-low.cc (win32_target_ops): Update.
3091
3092 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3093
3094 Turn process_stratum_target's breakpoint_kind_from_pc,
3095 sw_breakpoint_from_kind, and breakpoint_kind_from_current_state
3096 ops into methods of process_target.
3097
3098 * target.h (struct process_stratum_target): Remove the target op.
3099 (class process_target): Add the target op.
3100 (target_breakpoint_kind_from_pc): Update the macro.
3101 (target_breakpoint_kind_from_current_state): Update the macro.
3102 (default_breakpoint_kind_from_pc): Remove declaration.
3103 * target.cc (default_breakpoint_kind_from_pc): Turn into ...
3104 (process_target::breakpoint_kind_from_pc): ... this.
3105 (process_target::breakpoint_kind_from_current_state): Define.
3106
3107 Update the derived classes and callers below.
3108
3109 * mem-break.cc (bp_size): Update.
3110 (bp_opcode): Update.
3111 * linux-low.cc (linux_target_ops): Update.
3112 (linux_wait_1): Update.
3113 (linux_breakpoint_kind_from_pc): Turn into ...
3114 (linux_process_target::breakpoint_kind_from_pc): ... this.
3115 (linux_sw_breakpoint_from_kind): Turn into ...
3116 (linux_process_target::sw_breakpoint_from_kind): ... this.
3117 (linux_breakpoint_kind_from_current_state): Turn into ...
3118 (linux_process_target::breakpoint_kind_from_current_state): ... this.
3119 * linux-low.h (class linux_process_target): Update.
3120 * lynx-low.cc (lynx_target_ops): Update.
3121 (lynx_process_target::sw_breakpoint_from_kind): Define.
3122 * lynx-low.h (class lynx_process_target): Update.
3123 * nto-low.cc (nto_target_ops): Update.
3124 (nto_sw_breakpoint_from_kind): Turn into ...
3125 (nto_process_target::sw_breakpoint_from_kind): ... this.
3126 * nto-low.h (class nto_process_target): Update.
3127 * win32-low.cc (win32_target_ops): Update.
3128 (win32_sw_breakpoint_from_kind): Turn into ...
3129 (win32_process_target::sw_breakpoint_from_kind): ... this.
3130 * win32-low.h (class win32_process_target): Update.
3131
3132 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3133
3134 Turn process_stratum_target's multifs_open, multifs_readlink,
3135 multifs_unlink ops into methods of process_target.
3136
3137 * target.h (struct process_stratum_target): Remove the target ops.
3138 (class process_target): Add the target ops. Also add
3139 'supports_multifs'.
3140 * target.cc: Include "fcntl.h", "unistd.h", "sys/types.h", and
3141 "sys/stat.h".
3142 (process_target::supports_multifs): Define.
3143 (process_target::multifs_open): Define.
3144 (process_target::multifs_readlink): Define.
3145 (process_target::multifs_unlink): Define.
3146
3147 Update the derived classes and callers below.
3148
3149 * hostio.cc (handle_setfs): Update.
3150 (handle_open): Update.
3151 (handle_unlink): Update.
3152 (handle_readlink): Update.
3153 * linux-low.cc (linux_target_ops): Update.
3154 (linux_process_target::supports_multifs): Define.
3155 (linux_process_target::multifs_open): Define.
3156 (linux_process_target::multifs_readlink): Define.
3157 (linux_process_target::multifs_unlink): Define.
3158 * linux-low.h (class linux_process_target): Update.
3159 * lynx-low.cc (lynx_target_ops): Update.
3160 * nto-low.cc (nto_target_ops): Update.
3161 * win32-low.cc (win32_target_ops): Update.
3162
3163 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3164
3165 Turn process_stratum_target's pid_to_exec_file op into a method
3166 of process_target.
3167
3168 * target.h (struct process_stratum_target): Remove the target op.
3169 (class process_target): Add the target op. Also add
3170 'supports_pid_to_exec_file'.
3171 * target.cc (process_target::pid_to_exec_file): Define.
3172 (process_target::supports_pid_to_exec_file): Define.
3173
3174 Update the derived classes and callers below.
3175
3176 * server.cc (handle_qxfer_exec_file): Update.
3177 (handle_query): Update.
3178 * linux-low.cc (linux_target_ops): Update.
3179 (linux_process_target::supports_pid_to_exec_file): Define.
3180 (linux_process_target::pid_to_exec_file): Define.
3181 * linux-low.h (class linux_process_target): Update.
3182 * lynx-low.cc (lynx_target_ops): Update.
3183 * nto-low.cc (nto_target_ops): Update.
3184 * win32-low.cc (win32_target_ops): Update.
3185
3186 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3187
3188 Turn process_stratum_target's supports_range_stepping op into a
3189 method of process_target.
3190
3191 * target.h (struct process_stratum_target): Remove the target op.
3192 (class process_target): Add the target op.
3193 (target_supports_range_stepping): Update the macro.
3194 * target.cc (process_target::supports_range_stepping): Define.
3195
3196 Update the derived classes and callers below.
3197
3198 * linux-low.cc (linux_target_ops): Update.
3199 (linux_supports_range_stepping): Turn into ...
3200 (linux_process_target::supports_range_stepping): ... this.
3201 * linux-low.h (class linux_process_target): Update.
3202 * lynx-low.cc (lynx_target_ops): Update.
3203 * nto-low.cc (nto_target_ops): Update.
3204 * win32-low.cc (win32_target_ops): Update.
3205
3206 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3207
3208 Turn process_stratum_target's btrace-related ops (enable_btrace,
3209 disable_btrace, read_btrace, read_btrace_conf) into methods of
3210 process_target.
3211
3212 * target.h (struct process_stratum_target): Remove the target ops.
3213 (class process_target): Add the target ops.
3214 (target_enable_btrace): Update.
3215 (target_disable_btrace): Update.
3216 (target_read_btrace): Update.
3217 (target_read_btrace_conf): Update.
3218 * target.cc (process_target::enable_btrace): Define.
3219 (process_target::disable_btrace): Define.
3220 (process_target::read_btrace): Define.
3221 (process_target::read_btrace_conf): Define.
3222
3223 Update the derived classes and callers below.
3224
3225 * linux-low.cc (linux_target_ops): Update.
3226 (linux_process_target:enable_btrace): Define as a wrapper around
3227 linux_enable_btrace.
3228 (linux_low_disable_btrace): Turn into ...
3229 (linux_process_target::disable_btrace): ... this.
3230 (linux_low_read_btrace): Turn into ...
3231 (linux_process_target::read_btrace): ... this.
3232 (linux_low_btrace_conf): Turn into ...
3233 (linux_process_target::read_btrace_conf): ... this.
3234 * linux-low.h (class linux_process_target): Update.
3235 * lynx-low.cc (lynx_target_ops): Update.
3236 * nto-low.cc (nto_target_ops): Update.
3237 * win32-low.cc (win32_target_ops): Update.
3238
3239 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3240
3241 Turn process_stratum_target's supports_agent op into a method of
3242 process_target.
3243
3244 * target.h (struct process_stratum_target): Remove the target op.
3245 (class process_target): Add the target op.
3246 (target_supports_agent): Update the macro.
3247 * target.cc (process_target::supports_agent): Define.
3248
3249 Update the derived classes and callers below.
3250
3251 * linux-low.cc (linux_target_ops): Update.
3252 (linux_supports_agent): Turn into ...
3253 (linux_process_target::supports_agent): ... this.
3254 * linux-low.h (class linux_process_target): Update.
3255 * lynx-low.cc (lynx_target_ops): Update.
3256 * nto-low.cc (nto_target_ops): Update.
3257 * win32-low.cc (win32_target_ops): Update.
3258
3259 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3260
3261 Turn process_stratum_target's qxfer_libraries_svr4 op into a
3262 method of process_target.
3263
3264 * target.h (struct process_stratum_target): Remove the target op.
3265 (class process_target): Add the target op. Also add
3266 'supports_qxfer_libraries_svr4'.
3267 * target.cc (process_target::qxfer_libraries_svr4): Define.
3268 (process_target::supports_qxfer_libraries_svr4): Define.
3269
3270 Update the derived classes and callers below.
3271
3272 * server.cc (handle_qxfer_libraries_svr4): Update.
3273 (handle_query): Update.
3274 * linux-low.cc (linux_target_ops): Update.
3275 (linux_process_target::supports_qxfer_libraries_svr4): Define.
3276 (linux_qxfer_libraries_svr4): Turn into ...
3277 (linux_process_target::qxfer_libraries_svr4): ... this.
3278 * linux-low.h (class linux_process_target): Update.
3279 * lynx-low.cc (lynx_target_ops): Update.
3280 * nto-low.cc (nto_target_ops): Update.
3281 * win32-low.cc (win32_target_ops): Update.
3282
3283 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3284
3285 Turn process_stratum_target's supports_disable_randomization op
3286 into a method of process_target.
3287
3288 * target.h (struct process_stratum_target): Remove the target op.
3289 (class process_target): Add the target op.
3290 (target_supports_disable_randomization): Update the macro.
3291 * target.cc (process_target::supports_disable_randomization): Define.
3292
3293 Update the derived classes and callers below.
3294
3295 * linux-low.cc (linux_target_ops): Update.
3296 (linux_supports_disable_randomization): Turn into ...
3297 (linux_process_target::supports_disable_randomization): ... this.
3298 * linux-low.h (class linux_process_target): Update.
3299 * lynx-low.cc (lynx_target_ops): Update.
3300 * nto-low.cc (nto_target_ops): Update.
3301 * win32-low.cc (win32_target_ops): Update.
3302
3303 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3304
3305 Turn process_stratum_target's emit_ops op into a method of
3306 process_target.
3307
3308 * target.h (struct process_stratum_target): Remove the target op.
3309 (class process_target): Add the target op.
3310 (target_emit_ops): Update the macro.
3311 * target.cc (process_target::emit_ops): Define.
3312
3313 Update the derived classes and callers below.
3314
3315 * linux-low.cc (linux_target_ops): Update.
3316 (linux_emit_ops): Turn into ...
3317 (linux_process_target::emit_ops): ... this.
3318 * linux-low.h (class linux_process_target): Update.
3319 * lynx-low.cc (lynx_target_ops): Update.
3320 * nto-low.cc (nto_target_ops): Update.
3321 * win32-low.cc (win32_target_ops): Update.
3322
3323 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3324
3325 Turn process_stratum_target's install_fast_tracepoint_jump_pad
3326 and get_min_fast_tracepoint_insn_len ops into methods of
3327 process_target.
3328
3329 * target.h (struct process_stratum_target): Remove the target ops.
3330 (class process_target): Add the target ops. Also add
3331 'supports_fast_tracepoints'.
3332 (target_supports_fast_tracepoints): Update the macro.
3333 (target_get_min_fast_tracepoint_insn_len): Update the macro.
3334 (install_fast_tracepoint_jump_pad): Update and rename the macro
3335 to ...
3336 (target_install_fast_tracepoint_jump_pad): ... this.
3337 * target.cc (process_target::supports_fast_tracepoints): Define.
3338 (process_target::install_fast_tracepoint_jump_pad): Define.
3339 (process_target::get_min_fast_tracepoint_insn_len): Define.
3340
3341 Update the derived classes and callers below.
3342
3343 * tracepoint.cc (install_fast_tracepoint): Update.
3344 * linux-low.cc (linux_target_ops): Update.
3345 (linux_process_target::supports_fast_tracepoints): Define.
3346 (linux_install_fast_tracepoint_jump_pad): Turn into ...
3347 (linux_process_target::install_fast_tracepoint_jump_pad): ... this.
3348 (linux_get_min_fast_tracepoint_insn_len): Turn into ...
3349 (linux_process_target::get_min_fast_tracepoint_insn_len): ... this.
3350 * linux-low.h (class linux_process_target): 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
3355 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3356
3357 Turn process_stratum_target's stabilize_threads op into a
3358 method of process_target.
3359
3360 * target.h (struct process_stratum_target): Remove the target op.
3361 (class process_target): Add the target op.
3362 (target_stabilize_threads): Update the macro.
3363 * target.cc (process_target::stabilize_threads): Define.
3364
3365 Update the derived classes and callers below.
3366
3367 * server.cc (handle_status): Update.
3368 * tracepoint.cc (cmd_qtdp): Update.
3369 (cmd_qtstart): Update.
3370 * linux-low.cc (linux_target_ops): Update.
3371 (linux_stabilize_threads): Turn into ...
3372 (linux_process_target::stabilize_threads): ... this.
3373 (linux_wait_1): Update.
3374 * linux-low.h (class linux_process_target): Update.
3375 * lynx-low.cc (lynx_target_ops): Update.
3376 * nto-low.cc (nto_target_ops): Update.
3377 * win32-low.cc (win32_target_ops): Update.
3378
3379 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3380
3381 Turn process_stratum_target's pause_all and unpause_all ops
3382 into methods of process_target.
3383
3384 * target.h (struct process_stratum_target): Remove the target ops.
3385 (class process_target): Add the target ops.
3386 (pause_all): Update the macro and rename to...
3387 (target_pause_all): ... this.
3388 (unpause_all): Update the macro and rename to...
3389 (target_unpause_all): ... this.
3390 * target.cc (process_target::pause_all): Define.
3391 (process_target::unpause_all): Define.
3392
3393 Update the derived classes and callers below.
3394
3395 * server.cc (handle_status): Update.
3396 * tracepoint.cc (clear_installed_tracepoints): Update.
3397 (cmd_qtdp): Update.
3398 (cmd_qtstart): Update.
3399 (stop_tracing): Update.
3400 (cmd_qtstatus): Update.
3401 (upload_fast_traceframes): Update.
3402 (run_inferior_command): Update.
3403 * linux-low.cc (linux_target_ops): Update.
3404 (linux_pause_all): Turn into ...
3405 (linux_process_target::pause_all): ... this.
3406 (linux_unpause_all): Turn into ...
3407 (linux_process_target::unpause_all): ... this.
3408 (linux_process_target::prepare_to_access_memory): Update.
3409 (linux_process_target::done_accessing_memory): Update.
3410 * linux-low.h (class linux_process_target): Update.
3411 * lynx-low.cc (lynx_target_ops): Update.
3412 * nto-low.cc (nto_target_ops): Update.
3413 * win32-low.cc (win32_target_ops): Update.
3414
3415 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3416
3417 Turn process_stratum_target's get_tib_address op into a method of
3418 process_target.
3419
3420 * target.h (struct process_stratum_target): Remove the target op.
3421 (class process_target): Add the target op. Also add
3422 'supports_get_tib_address'.
3423 * target.cc (process_target::get_tib_address): Define.
3424 (process_target::supports_get_tib_address): Define.
3425
3426 Update the derived classes and callers below.
3427
3428 * server.cc (handle_query): Update.
3429 * linux-low.cc (win32_target_ops): Update.
3430 * lynx-low.cc (lynx_target_ops): Update.
3431 * nto-low.cc (nto_target_ops): Update.
3432 * win32-low.cc (win32_target_ops): Update.
3433 (win32_process_target::supports_get_tib_address): Define.
3434 (win32_get_tib_address): Turn into ...
3435 (win32_process_target::get_tib_address): ... this.
3436 * win32-low.h (class win32_process_target): Update.
3437
3438 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3439
3440 Turn process_stratum_target's thread_stopped op into a method of
3441 process_target.
3442
3443 * target.h (struct process_stratum_target): Remove the target op.
3444 (class process_target): Add the target op. Also add
3445 'supports_thread_stopped'.
3446 (target_thread_stopped): Update the macro.
3447 * target.cc (process_target::thread_stopped): Define.
3448 (process_target::supports_thread_stopped): Define.
3449 (prepare_to_access_memory): Update.
3450
3451 Update the derived classes and callers below.
3452
3453 * server.cc (queue_stop_reply_callback): Update.
3454 * linux-low.cc (linux_target_ops): Update.
3455 (linux_process_target::supports_thread_stopped): Define.
3456 (linux_thread_stopped): Turn into ...
3457 (linux_process_target::thread_stopped): ... this.
3458 * linux-low.h (class linux_process_target): Update.
3459 * lynx-low.cc (lynx_target_ops): Update.
3460 * nto-low.cc (nto_target_ops): Update.
3461 * win32-low.cc (win32_target_ops): Update.
3462
3463 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3464
3465 Turn process_stratum_target's read_pc and write_pc ops into
3466 methods of process_target.
3467
3468 * target.h (struct process_stratum_target): Remove the target ops.
3469 (class process_target): Add the target ops.
3470 * target.cc (process_target::read_pc): Define.
3471 (process_target::write_pc): Define.
3472
3473 Update the derived classes and callers below.
3474
3475 * regcache.cc (regcache_read_pc): Update.
3476 (regcache_write_pc): Update.
3477 * linux-low.cc (linux_target_ops): Update.
3478 (linux_read_pc): Turn into ...
3479 (linux_process_target::read_pc): ... this.
3480 (linux_write_pc): Turn into ...
3481 (linux_process_target::write_pc): ... this.
3482 * linux-low.h (class linux_process_target): Update.
3483 * lynx-low.cc (lynx_target_ops): Update.
3484 * nto-low.cc (nto_target_ops): Update.
3485 * win32-low.cc (win32_target_ops): Update.
3486
3487 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3488
3489 Turn process_stratum_target's supports_tracepoints op into a
3490 method of process_target.
3491
3492 * target.h (struct process_stratum_target): Remove the target op.
3493 (class process_target): Add the target op.
3494 (target_supports_tracepoints): Update the macro.
3495 * target.cc (process_target::supports_tracepoints): Define.
3496
3497 Update the derived classes and callers below.
3498
3499 * linux-low.cc (linux_target_ops): Update.
3500 (linux_supports_tracepoints): Turn into ...
3501 (linux_process_target::supports_tracepoints): ... this.
3502 * linux-low.h (class linux_process_target): Update.
3503 * lynx-low.cc (lynx_target_ops): Update.
3504 * nto-low.cc (nto_target_ops): Update.
3505 * win32-low.cc (win32_target_ops): Update.
3506
3507 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3508
3509 Turn process_stratum_target's process_qsupported op into a method
3510 of process_target.
3511
3512 * target.h (struct process_stratum_target): Remove the target op.
3513 (class process_target): Add the target op.
3514 (target_process_qsupported): Update the macro.
3515 * target.cc (process_target::process_qsupported): Define.
3516
3517 Update the derived classes and callers below.
3518
3519 * linux-low.cc (linux_target_ops): Update.
3520 (linux_process_qsupported): Turn into ...
3521 (linux_process_target::process_qsupported): ... this.
3522 * linux-low.h (class linux_process_target): Update.
3523 * lynx-low.cc (lynx_target_ops): Update.
3524 * nto-low.cc (nto_target_ops): Update.
3525 * win32-low.cc (win32_target_ops): Update.
3526
3527 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3528
3529 Turn process_stratum_target's read_loadmap op into a method of
3530 process_target.
3531
3532 * target.h (struct process_stratum_target): Remove the target op.
3533 (class process_target): Add the target op. Also add
3534 'supports_read_loadmap'.
3535 * target.cc (process_target::read_loadmap): Define.
3536 (process_target::supports_read_loadmap): Define.
3537
3538 Update the derived classes and callers below.
3539
3540 * server.cc (handle_qxfer_fdpic): Update.
3541 (handle_query): Update.
3542 * linux-low.cc (linux_target_ops): Update.
3543 (linux_process_target::supports_read_loadmap): Define.
3544 (linux_read_loadmap): Turn into ...
3545 (linux_process_target::read_loadmap): ... this.
3546 * linux-low.h (class linux_process_target): Update.
3547 * lynx-low.cc (lynx_target_ops): Update.
3548 * nto-low.cc (nto_target_ops): Update.
3549 * win32-low.cc (win32_target_ops): Update.
3550
3551 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3552
3553 Turn process_stratum_target's core_of_thread op into a method of
3554 process_target.
3555
3556 * target.h (struct process_stratum_target): Remove the target op.
3557 (class process_target): Add the target op.
3558 (target_core_of_thread): Update the macro.
3559 * target.cc (process_target::core_of_thread): Define.
3560
3561 Update the derived classes and callers below.
3562
3563 * linux-low.cc (linux_target_ops): Update.
3564 (linux_process_target::core_of_thread): Define.
3565 * linux-low.h (class linux_process_target): Update.
3566 * lynx-low.cc (lynx_target_ops): Update.
3567 * nto-low.cc (nto_target_ops): Update.
3568 * win32-low.cc (win32_target_ops): Update.
3569
3570 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3571
3572 Turn process_stratum_target's handle_monitor_command op into a
3573 method of process_target.
3574
3575 * target.h (struct process_stratum_target): Remove the target op.
3576 (class process_target): Add the target op.
3577 (target_handle_monitor_command): Update the macro.
3578 * target.cc (process_target::handle_monitor_command): Define.
3579
3580 Update the derived classes and callers below.
3581
3582 * server.cc (handle_query): Update.
3583 * linux-low.cc (linux_target_ops): Update.
3584 (linux_process_target::handle_monitor_command): Define.
3585 * linux-low.h (class linux_process_target): Update.
3586 * lynx-low.cc (lynx_target_ops): Update.
3587 * nto-low.cc (nto_target_ops): Update.
3588 * win32-low.cc (win32_target_ops): Update.
3589
3590 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3591
3592 Turn process_stratum_target's handle_new_gdb_connection op into a
3593 method of process_target.
3594
3595 * target.h (struct process_stratum_target): Remove the target op.
3596 (class process_target): Add the target op.
3597 (target_handle_new_gdb_connection): Update the macro.
3598 * target.cc (process_target::handle_new_gdb_connection): Define.
3599
3600 Update the derived classes and callers below.
3601
3602 * linux-low.cc (linux_target_ops): Update.
3603 (linux_handle_new_gdb_connection): Turn into ...
3604 (linux_process_target::handle_new_gdb_connection): ... this.
3605 * linux-low.h (class linux_process_target): Update.
3606 * lynx-low.cc (lynx_target_ops): Update.
3607 * nto-low.cc (nto_target_ops): Update.
3608 * win32-low.cc (win32_target_ops): Update.
3609
3610 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3611
3612 Turn process_stratum_target's supports_fork_events,
3613 supports_vfork_events, and supports_exec_events ops into methods
3614 of process_target.
3615
3616 * target.h (struct process_stratum_target): Remove the target ops.
3617 (class process_target): Add the target ops.
3618 (target_supports_fork_events): Update the macro.
3619 (target_supports_vfork_events): Update the macro.
3620 (target_supports_exec_events): Update the macro.
3621 * target.cc (process_target::supports_fork_events): Define.
3622 (process_target::supports_vfork_events): Define.
3623 (process_target::supports_exec_events): Define.
3624
3625 Update the derived classes and callers below.
3626
3627 * linux-low.cc (linux_target_ops): Update.
3628 (linux_supports_fork_events): Turn into ...
3629 (linux_process_target::supports_fork_events): ... this.
3630 (linux_supports_vfork_events): Turn into ...
3631 (linux_process_target::supports_vfork_events): ... this.
3632 (linux_supports_exec_events): Turn into ...
3633 (linux_process_target::supports_exec_events): ... this.
3634 * linux-low.h (class linux_process_target): Update.
3635 * lynx-low.cc (lynx_target_ops): Update.
3636 * nto-low.cc (nto_target_ops): Update.
3637 * win32-low.cc (win32_target_ops): Update.
3638
3639 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3640
3641 Turn process_stratum_target's supports_multi_process op into a
3642 method of process_target.
3643
3644 * target.h (struct process_stratum_target): Remove the target op.
3645 (class process_target): Add the target op.
3646 * target.cc (process_target::supports_multi_process): Define.
3647 (target_supports_multi_process): Update.
3648
3649 Update the derived classes and callers below.
3650
3651 * linux-low.cc (linux_target_ops): Update.
3652 (linux_supports_multi_process): Turn into ...
3653 (linux_process_target::supports_multi_process): ... this.
3654 * linux-low.h (class linux_process_target): Update.
3655 * lynx-low.cc (lynx_target_ops): Update.
3656 * nto-low.cc (nto_target_ops): Update.
3657 * win32-low.cc (win32_target_ops): Update.
3658
3659 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3660
3661 Turn process_stratum_target's supports_non_stop, async, and
3662 start_non_stop ops into methods of process_target.
3663
3664 * target.h (struct process_stratum_target): Remove the target ops.
3665 (class process_target): Add the target ops.
3666 (target_supports_non_stop): Update the macro.
3667 (target_async): Update the macro.
3668 (start_non_stop): Remove declaration.
3669 * target.cc (process_target::supports_non_stop): Define.
3670 (process_target::async): Define.
3671 (process_target::start_non_stop): Define.
3672 (start_non_stop): Remove.
3673
3674 Update the derived classes and callers below.
3675
3676 * server.cc (handle_qxfer_siginfo): Update.
3677 (handle_query): Update.
3678 * linux-low.cc (linux_target_ops): Update.
3679 (linux_supports_non_stop): Turn into ...
3680 (linux_process_target::supports_non_stop): ... this.
3681 (linux_async): Turn into ...
3682 (linux_process_target::async): ... this.
3683 (linux_start_non_stop): Turn into ...
3684 (linux_process_target::start_non_stop): ... this.
3685 * linux-low.h (class linux_process_target): Update.
3686 * lynx-low.cc (lynx_target_ops): Update.
3687 * nto-low.cc (nto_target_ops): Update.
3688 (nto_supports_non_stop): Remove; rely on the default behavior
3689 instead.
3690 * win32-low.cc (win32_target_ops): Update.
3691
3692 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3693
3694 Turn process_stratum_target's qxfer_siginfo op into a method of
3695 process_target.
3696
3697 * target.h (struct process_stratum_target): Remove the target op.
3698 (class process_target): Add the target op. Also add
3699 'supports_qxfer_siginfo'.
3700 * target.cc (process_target::qxfer_siginfo): Define.
3701 (process_target::supports_qxfer_siginfo): Define.
3702
3703 Update the derived classes and callers below.
3704
3705 * server.cc (handle_qxfer_siginfo): Update.
3706 (handle_query): Update.
3707 * linux-low.cc (linux_target_ops): Update.
3708 (linux_process_target::supports_qxfer_siginfo): Define.
3709 (linux_xfer_siginfo): Turn into ...
3710 (linux_process_target::qxfer_siginfo): ... this.
3711 * linux-low.h (class linux_process_target): Update.
3712 * lynx-low.cc (lynx_target_ops): Update.
3713 * nto-low.cc (nto_target_ops): Update.
3714 * win32-low.cc (win32_target_ops): Update.
3715
3716 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3717
3718 Turn process_stratum_target's qxfer_osdata op into a method of
3719 process_target.
3720
3721 * target.h (struct process_stratum_target): Remove the target op.
3722 (class process_target): Add the target op. Also add
3723 'supports_qxfer_osdata'.
3724 * target.cc (process_target::qxfer_osdata): Define.
3725 (process_target::supports_qxfer_osdata): Define.
3726
3727 Update the derived classes and callers below.
3728
3729 * server.cc (handle_qxfer_osdata): Update.
3730 (handle_query): Update.
3731 * linux-low.cc (linux_target_ops): Update.
3732 (linux_process_target::supports_qxfer_osdata): Define.
3733 (linux_qxfer_osdata): Turn into ...
3734 (linux_process_target::qxfer_osdata): ... this.
3735 * linux-low.h (class linux_process_target): Update.
3736 * lynx-low.cc (lynx_target_ops): Update.
3737 * nto-low.cc (nto_target_ops): Update.
3738 * win32-low.cc (win32_target_ops): Update.
3739
3740 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3741
3742 Turn process_stratum_target's hostio_last_error op into a
3743 method of process_target.
3744
3745 * target.h (struct process_stratum_target): Remove the target op.
3746 (class process_target): Add the target op.
3747 * target.cc: Add "hostio.h" to includes.
3748 (process_target::hostio_last_error): Define.
3749
3750 Update the derived classes and callers below.
3751
3752 * hostio.cc (hostio_error): Update.
3753 * linux-low.cc: Remove "hostio.h" from includes.
3754 (linux_target_ops): Update.
3755 * lynx-low.cc (lynx_target_ops): Update.
3756 * nto-low.cc (nto_target_ops): Update.
3757 * win32-low.h (class win32_process_target): Update.
3758 * win32-low.cc (win32_target_ops): Update.
3759 (wince_hostio_last_error): Turn into ...
3760 (win32_process_target::hostio_last_error): ... this.
3761
3762 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3763
3764 Turn process_stratum_target's get_tls_address op into a method of
3765 process_target.
3766
3767 * target.h (struct process_stratum_target): Remove the target op.
3768 (class process_target): Add the target op. Also add
3769 'supports_get_tls_address'.
3770 * target.cc (process_target::get_tls_address): Define.
3771 (process_target::supports_get_tls_address): Define.
3772
3773 Update the derived classes and callers below.
3774
3775 * server.cc (handle_query): Update.
3776 * linux-low.cc (linux_target_ops): Update.
3777 (linux_process_target::supports_get_tls_address): Define.
3778 (linux_process_target::get_tls_address): Define.
3779 * linux-low.h (class linux_process_target): Update.
3780 * lynx-low.cc (lynx_target_ops): Update.
3781 * nto-low.cc (nto_target_ops): Update.
3782 * win32-low.cc (win32_target_ops): Update.
3783
3784 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3785
3786 Turn process_stratum_target's read_offsets op into a method of
3787 process_target.
3788
3789 * target.h (struct process_stratum_target): Remove the target op.
3790 (class process_target): Add the target op. Also add
3791 'supports_read_offsets'.
3792 * target.cc (process_target::read_offsets): Define.
3793 (process_target::supports_read_offsets): Define.
3794
3795 Update the derived classes and callers below.
3796
3797 * server.cc (handle_query): Update.
3798 * linux-low.cc (SUPPORTS_READ_OFFSETS): New #define directive.
3799 (linux_target_ops): Update.
3800 (linux_process_target::supports_read_offsets): Define.
3801 (linux_read_offsets): Turn into ...
3802 (linux_process_target::read_offsets): ... this.
3803 * linux-low.h (class linux_process_target): Update.
3804 * lynx-low.cc (lynx_target_ops): Update.
3805 * nto-low.cc (nto_target_ops): Update.
3806 * win32-low.cc (win32_target_ops): Update.
3807
3808 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3809
3810 Turn process_stratum_target's stopped_by_watchpoint and
3811 stopped_data_address ops into methods of process_target.
3812
3813 * target.h (struct process_stratum_target): Remove the target ops.
3814 (class process_target): Add the target ops.
3815 * target.cc (process_target::stopped_by_watchpoint): Define.
3816 (process_target::stopped_data_address): Define.
3817
3818 Update the derived classes and callers below.
3819
3820 * remote-utils.cc (prepare_resume_reply): Update.
3821 * linux-low.cc (linux_target_ops): Update.
3822 (linux_stopped_by_watchpoint): Turn into ...
3823 (linux_process_target::stopped_by_watchpoint): ... this.
3824 (linux_stopped_data_address): Turn into ...
3825 (linux_process_target::stopped_data_address): ... this.
3826 * linux-low.h (class linux_process_target): Update.
3827 * lynx-low.cc (lynx_target_ops): Update.
3828 * nto-low.cc (nto_target_ops): Update.
3829 (nto_stopped_by_watchpoint): Turn into ...
3830 (nto_process_target::stopped_by_watchpoint): ... this.
3831 (nto_stopped_data_address): Turn into ...
3832 (nto_process_target::stopped_data_address): ... this.
3833 * nto-low.h (class nto_process_target): Update.
3834 * win32-low.cc (win32_target_ops): Update.
3835 (win32_stopped_by_watchpoint): Turn into ...
3836 (win32_process_target::stopped_by_watchpoint): ... this.
3837 (win32_stopped_data_address): Turn into ...
3838 (win32_process_target::stopped_data_address): ... this.
3839 * win32-low.h (class win32_process_target): Update.
3840
3841 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3842
3843 Turn process_stratum_target's supports_hardware_single_step op into
3844 a method of process_target.
3845
3846 * target.h (struct process_stratum_target): Remove the target op.
3847 (class process_target): Add the target op.
3848 (target_supports_hardware_single_step): Update the macro.
3849 (target_can_do_hardware_single_step): Remove declaration.
3850 * target.cc (process_target::supports_hardware_single_step): Define.
3851 (target_can_do_hardware_single_step): Remove.
3852
3853 Update the derived classes and callers below.
3854
3855 * linux-low.h (class linux_process_target): Update.
3856 * linux-low.cc (linux_target_ops): Update.
3857 (linux_supports_hardware_single_step): Turn into ...
3858 (linux_process_target::supports_hardware_single_step): ... this.
3859 * lynx-low.h (class lynx_process_target): Update.
3860 * lynx-low.cc (lynx_target_ops): Update.
3861 (lynx_process_target::supports_hardware_single_step): Define.
3862 * nto-low.h (class nto_process_target): Update.
3863 * nto-low.cc (nto_target_ops): Update.
3864 (nto_process_target::supports_hardware_single_step): Define.
3865 * win32-low.h (class win32_process_target): Update.
3866 * win32-low.cc (win32_target_ops): Update.
3867 (win32_process_target::supports_hardware_single_step): Define.
3868
3869 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3870
3871 Turn process_stratum_target's {supports_}stopped_by_hw_breakpoint
3872 ops into methods of process_target.
3873
3874 * target.h (struct process_stratum_target): Remove the target ops.
3875 (class process_target): Add the target ops.
3876 (target_stopped_by_hw_breakpoint): Update the macro.
3877 (target_supports_stopped_by_hw_breakpoint): Update the macro.
3878 * target.cc (process_target::stopped_by_hw_breakpoint): Define.
3879 (process_target::supports_stopped_by_hw_breakpoint): Define.
3880
3881 Update the derived classes and callers below.
3882
3883 * linux-low.cc (linux_target_ops): Update.
3884 (linux_stopped_by_hw_breakpoint): Turn into ...
3885 (linux_process_target::stopped_by_hw_breakpoint): ... this.
3886 (linux_supports_stopped_by_hw_breakpoint): Turn into ...
3887 (linux_process_target::supports_stopped_by_hw_breakpoint): ... this.
3888 * linux-low.h (class linux_process_target): Update.
3889 * lynx-low.cc (lynx_target_ops): Update.
3890 * nto-low.cc (nto_target_ops): Update.
3891 * win32-low.cc (win32_target_ops): Update.
3892
3893 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3894
3895 Turn process_stratum_target's {supports_}stopped_by_sw_breakpoint
3896 ops into methods of process_target.
3897
3898 * target.h (struct process_stratum_target): Remove the target ops.
3899 (class process_target): Add the target ops.
3900 (target_stopped_by_sw_breakpoint): Update the macro.
3901 (target_supports_stopped_by_sw_breakpoint): Update the macro.
3902 * target.cc (process_target::stopped_by_sw_breakpoint): Define.
3903 (process_target::supports_stopped_by_sw_breakpoint): Define.
3904
3905 Update the derived classes and callers below.
3906
3907 * linux-low.cc (linux_target_ops): Update.
3908 (linux_stopped_by_sw_breakpoint): Turn into ...
3909 (linux_process_target::stopped_by_sw_breakpoint): ... this.
3910 (linux_supports_stopped_by_sw_breakpoint): Turn into ...
3911 (linux_process_target::supports_stopped_by_sw_breakpoint): ... this.
3912 * linux-low.h (class linux_process_target): Update.
3913 * lynx-low.cc (lynx_target_ops): Update.
3914 * nto-low.cc (nto_target_ops): Update.
3915 * win32-low.cc (win32_target_ops): Update.
3916
3917 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3918
3919 Turn process_stratum_target's insert_point and remove_point ops
3920 into methods of process_target.
3921
3922 * target.h (struct process_stratum_target): Remove the target ops.
3923 (class process_target): Add the target ops.
3924 * target.cc (process_target::insert_point): Define.
3925 (process_target::remove_point): Define.
3926
3927 Update the derived classes and callers below.
3928
3929 * mem-break.cc (set_raw_breakpoint_at): Update.
3930 (delete_raw_breakpoint): Update.
3931 (uninsert_raw_breakpoint): Update.
3932 (reinsert_raw_breakpoint): Update.
3933 * linux-low.cc (linux_target_ops): Update.
3934 (linux_insert_point): Turn into ...
3935 (linux_process_target::insert_point): ... this.
3936 (linux_remove_point): Turn into ...
3937 (linux_process_target::remove_point): ... this.
3938 * linux-low.h (class linux_process_target): Update.
3939 * lynx-low.cc (lynx_target_ops): Update.
3940 * nto-low.cc (nto_target_ops): Update.
3941 (nto_insert_point): Turn into ...
3942 (nto_process_target::insert_point): ... this.
3943 (nto_remove_point): Turn into ...
3944 (nto_process_target::remove_point): ... this.
3945 * nto-low.h (class nto_process_target): Update.
3946 * win32-low.cc (win32_target_ops): Update.
3947 (win32_insert_point): Turn into ...
3948 (win32_process_target::insert_point): ... this.
3949 (win32_remove_point): Turn into ...
3950 (win32_process_target::remove_point): ... this.
3951 * win32-low.h (class win32_process_target): Update.
3952
3953 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3954
3955 Turn process_stratum_target's supports_z_point_type op into a
3956 method of process_target.
3957
3958 * target.h (struct process_stratum_target): Remove the target op.
3959 (class process_target): Add the target op.
3960 * target.cc (process_target::supports_z_point_type): Define.
3961
3962 Update the derived classes and callers below.
3963
3964 * mem-break.cc (z_type_supported): Update.
3965 * linux-low.cc (linux_target_ops): Update.
3966 (linux_supports_z_point_type): Turn into ...
3967 (linux_process_target::supports_z_point_type): ... this.
3968 * linux-low.h (class linux_process_target): Update.
3969 * lynx-low.cc (lynx_target_ops): Update.
3970 * nto-low.cc (nto_target_ops): Update.
3971 (nto_supports_z_point_type): Turn into ...
3972 (nto_process_target::supports_z_point_type): ... this.
3973 * nto-low.h (class nto_process_target): Update.
3974 * win32-low.cc (win32_target_ops): Update.
3975 (win32_supports_z_point_type): Turn into ...
3976 (win32_process_target::supports_z_point_type): ... this.
3977 * win32-low.h (class win32_process_target): Update.
3978
3979 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
3980
3981 Turn process_stratum_target's read_auxv op into a method of
3982 process_target.
3983
3984 * target.h (class process_stratum_target): Remove the target op.
3985 (struct process_target): Add the target op. Also add
3986 'supports_read_auxv'.
3987 * target.cc (process_target::read_auxv): Define.
3988 (process_target::supports_read_auxv): Define.
3989
3990 Update the derived classes and callers below.
3991
3992 * server.cc (handle_qxfer_auxv): Update.
3993 (handle_query): Update.
3994 * linux-low.cc (linux_target_ops): Update.
3995 (linux_process_target::supports_read_auxv): Define.
3996 (linux_read_auxv): Turn into ...
3997 (linux_process_target::read_auxv): ... this.
3998 * linux-low.h (class linux_process_target): Update.
3999 * lynx-low.cc (lynx_target_ops): Update.
4000 * nto-low.cc (nto_target_ops): Update.
4001 (nto_process_target::supports_read_auxv): Define.
4002 (nto_read_auxv): Turn into ...
4003 (nto_process_target::read_auxv): ... this.
4004 * nto-low.h (class nto_process_target): Update.
4005 * win32-low.cc (win32_target_ops): Update.
4006
4007 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4008
4009 Turn process_stratum_target's request_interrupt op into a method of
4010 process_target.
4011
4012 * target.h (struct process_stratum_target): Remove the target op.
4013 (class process_target): Add the target op.
4014
4015 Update the derived classes and callers below.
4016
4017 * remote-utils.cc (putpkt_binary_1): Update.
4018 (input_interrupt): Update.
4019 (getpkt): Update.
4020 * server.cc (handle_v_requests): Update.
4021 * linux-low.cc (linux_target_ops): Update.
4022 (linux_request_interrupt): Turn into ...
4023 (linux_process_target::request_interrupt): ... this.
4024 * linux-low.h (class linux_process_target): Update.
4025 * lynx-low.cc (lynx_target_ops): Update.
4026 (lynx_request_interrupt): Turn into ...
4027 (lynx_process_target::request_interrupt): ... this.
4028 * lynx-low.h (class lynx_process_target): Update.
4029 * nto-low.cc (nto_target_ops): Update.
4030 (nto_request_interrupt): Turn into ...
4031 (nto_process_target::request_interrupt): ... this.
4032 * nto-low.h (class nto_process_target): Update.
4033 * win32-low.cc (win32_target_ops): Update.
4034 (win32_request_interrupt): Turn into ...
4035 (win32_process_target::request_interrupt): ... this.
4036 * win32-low.h (class win32_process_target): Update.
4037
4038 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4039
4040 Turn process_stratum_target's look_up_symbols op into a method of
4041 process_target.
4042
4043 * target.h (struct process_stratum_target): Remove the target op.
4044 (class process_target): Add the target op.
4045 * target.cc (process_target::look_up_symbols): Define.
4046
4047 Update the derived classes and callers below.
4048
4049 * server.cc (handle_query): Update.
4050 * linux-low.cc (linux_target_ops): Update.
4051 (linux_look_up_symbols): Turn into ...
4052 (linux_process_target::look_up_symbols): ... this.
4053 * linux-low.h (class linux_process_target): Update.
4054 * lynx-low.cc (lynx_target_ops): Update.
4055 * nto-low.cc (nto_target_ops): Update.
4056 * win32-low.cc (win32_target_ops): Update.
4057
4058 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4059
4060 Turn process_stratum_target's read_memory and write_memory
4061 ops into methods of process_target.
4062
4063 * target.h (struct process_stratum_target): Remove the target ops.
4064 (class process_target): Add the target ops.
4065
4066 Update the derived classes and callers below.
4067
4068 * linux-aarch32-low.cc (arm_breakpoint_at): Update.
4069 * linux-aarch64-low.cc (aarch64_breakpoint_at): Update.
4070 * linux-arm-low.cc (arm_sigreturn_next_pc): Update.
4071 (arm_get_syscall_trapinfo): Update.
4072 * linux-cris-low.cc (cris_breakpoint_at): Update.
4073 * linux-crisv32-low.cc (cris_breakpoint_at): Update.
4074 * linux-m32r-low.cc (m32r_breakpoint_at): Update.
4075 * linux-mips-low.cc (mips_breakpoint_at): Update.
4076 * linux-nios2-low.cc (nios2_breakpoint_at): Update.
4077 * linux-ppc-low.cc (ppc_breakpoint_at): Update.
4078 * linux-sh-low.cc (sh_breakpoint_at): Update.
4079 * linux-sparc-low.cc (sparc_fill_gregset_to_stack): Update.
4080 (sparc_store_gregset_from_stack): Update.
4081 (sparc_breakpoint_at): Update.
4082 * linux-tic6x-low.cc (tic6x_breakpoint_at): Update.
4083 * linux-tile-low.cc (tile_breakpoint_at): Update.
4084 * linux-x86-low.cc (x86_breakpoint_at): Update.
4085 * linux-xtensa-low.cc (xtensa_breakpoint_at): Update.
4086 * mem-brea.cc (insert_memory_breakpoint): Update.
4087 (validate_inserted_breakpoint): Update.
4088 * target.cc (read_inferior_memory): Update.
4089 (target_write_memory): Update.
4090 * linux-low.cc (linux_target_ops): Update.
4091 (linux_read_memory): Make a wrapper around the read_memory target
4092 op call.
4093 (linux_process_target::read_memory): Rename from linux_read_memory.
4094 (linux_write_memory): Turn into ...
4095 (linux_process_target::write_memory): ... this.
4096 * linux-low.h (class linux_process_target): Update.
4097 * lynx-low.cc (lynx_target_ops): Update.
4098 (lynx_read_memory): Turn into ...
4099 (lynx_process_target::read_memory): ... this.
4100 (lynx_write_memory): Turn into ...
4101 (lynx_process_target::write_memory): ... this.
4102 * lynx-low.h (class lynx_process_target): Update.
4103 * nto-low.cc (nto_target_ops): Update.
4104 (nto_read_memory): Turn into ...
4105 (nto_process_target::read_memory): ... this.
4106 (nto_write_memory): Turn into ...
4107 (nto_process_target::write_memory): ... this.
4108 * nto-low.h (class nto_process_target): Update.
4109 * win32-low.cc (win32_target_ops): Update.
4110 (win32_read_inferior_memory): Turn into ...
4111 (win32_process_target::read_memory): ... this.
4112 (win32_write_inferior_memory): Turn into ...
4113 (win32_process_target::write_memory): ... this.
4114 * win32-low.h (class win32_process_target): Update.
4115
4116 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4117
4118 Turn process_stratum_target's prepare_to_access_memory and
4119 done_accessing_memory ops into methods of process_target.
4120
4121 * target.h (struct process_stratum_target): Remove the target ops.
4122 (class process_target): Add the target ops.
4123 * target.cc (process_target::prepare_to_access_memory): Define.
4124 (process_target::done_accessing_memory): Define.
4125 (prepare_to_access_memory): Update.
4126 (done_accessing_memory): Update.
4127
4128 Update the derived classes and callers below.
4129
4130 * linux-low.cc (linux_target_ops): Update.
4131 (linux_prepare_to_access_memory): Turn into ...
4132 (linux_process_target::prepare_to_access_memory): ... this.
4133 (linux_done_accessing_memory): Turn into ...
4134 (linux_process_target::done_accessing_memory): ... this.
4135 * linux-low.h (class linux_process_target): Update.
4136 * lynx-low.cc (lynx_target_ops): Update.
4137 * nto-low.cc (nto_target_ops): Update.
4138 * win32-low.cc (win32_target_ops): Update.
4139
4140 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4141
4142 Turn process_stratum_target's fetch_registers and store_registers
4143 ops into methods of process_target.
4144
4145 * target.h (struct process_stratum_target): Remove the target ops.
4146 (class process_target): Add the target ops.
4147 (fetch_inferior_registers): Update the macro.
4148 (store_inferior_registers): Update the macro.
4149
4150 Update the derived classes and callers below.
4151
4152 * linux-low.cc (linux_target_ops): Update.
4153 (linux_fetch_registers): Turn into ...
4154 (linux_process_target::fetch_registers): ... this.
4155 (linux_store_registers): Turn into ...
4156 (linux_process_target::store_registers): ... this.
4157 * linux-low.h (class linux_process_target): Update.
4158 * lynx-low.cc (lynx_target_ops): Update.
4159 (lynx_fetch_registers): Turn into ...
4160 (lynx_process_target::fetch_registers): ... this.
4161 (lynx_store_registers): Turn into ...
4162 (lynx_process_target::store_registers): ... this.
4163 * lynx-low.h (class lynx_process_target): Update.
4164 * nto-low.cc (nto_target_ops): Update.
4165 (nto_fetch_registers): Turn into ...
4166 (nto_process_target::fetch_registers): ... this.
4167 (nto_store_registers): Turn into ...
4168 (nto_process_target::store_registers): ... this.
4169 * nto-low.h (class nto_process_target): Update.
4170 * win32-low.cc (win32_target_ops): Update.
4171 (win32_fetch_inferior_registers): Turn into ...
4172 (win32_process_target::fetch_registers): ... this.
4173 (win32_store_inferior_registers): Turn into ...
4174 (win32_process_target::store_registers): ... this.
4175 * win32-low.h (class win32_process_target): Update.
4176
4177 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4178
4179 Turn process_stratum_target's wait op into a method of
4180 process_target.
4181
4182 * target.h (struct process_stratum_target): Remove the target op.
4183 (class process_target): Add the target op.
4184
4185 Update the derived classes and callers below.
4186
4187 * target.cc (target_wait): Update.
4188 * linux-low.cc (linux_target_ops): Update.
4189 (linux_wait): Turn into ...
4190 (linux_process_target::wait): ... this.
4191 * linux-low.h (class linux_process_target): Update.
4192 * lynx-low.cc (lynx_target_ops): Update.
4193 (lynx_wait): Turn into ...
4194 (lynx_process_target::wait): ... this.
4195 * lynx-low.h (class lynx_process_target): Update.
4196 * nto-low.cc (nto_target_ops): Update.
4197 (nto_wait): Turn into ...
4198 (nto_process_target::wait): ... this.
4199 * nto-low.h (class nto_process_target): Update.
4200 * win32-low.cc (win32_target_ops): Update.
4201 (win32_wait): Turn into ...
4202 (win32_process_target::wait): ... this.
4203 (do_initial_child_stuff): Update.
4204 * win32-low.h (class win32_process_target): Update.
4205
4206 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4207
4208 Turn process_stratum_target's resume op into a method of
4209 process_target.
4210
4211 * target.h (struct process_stratum_target): Remove the target op.
4212 (class process_target): Add the target op.
4213
4214 Update the derived classes and callers below.
4215
4216 * server.cc (resume): Update.
4217 * target.cc (target_stop_and_wait): Update.
4218 (target_continue_no_signal): Update.
4219 (target_continue): Update.
4220 * linux-low.cc (linux_target_ops): Update.
4221 (linux_resume): Turn into ...
4222 (linux_process_target::resume): ... this.
4223 * linux-low.h (class linux_process_target): Update.
4224 * lynx-low.cc (lynx_target_ops): Update.
4225 (lynx_resume): Turn into ...
4226 (lynx_process_target::resume): ... this.
4227 * lynx-low.h (class lynx_process_target): Update.
4228 * nto-low.cc (nto_target_ops): Update.
4229 (nto_resume): Turn into ...
4230 (nto_process_target::resume): ... this.
4231 * nto-low.h (class nto_process_target): Update.
4232 * win32-low.cc (win32_target_ops): Update.
4233 (win32_resume): Turn into ...
4234 (win32_process_target::resume): ... this.
4235 (win32_process_target::detach): Update.
4236 (do_initial_child_stuff): Update.
4237 * win32-low.h (class win32_process_target): Update.
4238
4239 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4240
4241 Turn process_stratum_target's thread_alive op into a method of
4242 process_target.
4243
4244 * target.h (struct process_stratum_target): Remove the target op.
4245 (class process_target): Add the target op.
4246 (mythread_alive): Update the macro.
4247
4248 Update the derived classes and callers below.
4249
4250 * linux-low.cc (linux_target_ops): Update.
4251 (linux_thread_alive): Turn into ...
4252 (linux_process_target::thread_alive): ... this.
4253 (wait_for_sigstop): Update.
4254 * linux-low.h (class linux_process_target): Update.
4255 * lynx-low.cc (lynx_target_ops): Update.
4256 (lynx_thread_alive): Turn into ...
4257 (lynx_process_target::thread_alive): ... this.
4258 * lynx-low.h (class lynx_process_target): Update.
4259 * nto-low.cc (nto_target_ops): Update.
4260 (nto_thread_alive): Turn into ...
4261 (nto_process_target::thread_alive): ... this.
4262 * nto-low.h (class nto_process_target): Update.
4263 * win32-low.cc (win32_target_ops): Update.
4264 (win32_thread_alive): Turn into ...
4265 (win32_process_target::thread_alive): ... this.
4266 * win32-low.h (class win32_process_target): Update.
4267
4268 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4269
4270 Turn process_stratum_target's join op into a method of
4271 process_target.
4272
4273 * target.h (struct process_stratum_target): Remove the target op.
4274 (class process_target): Add the target op.
4275 (join_inferior): Update the macro.
4276
4277 Update the derived classes and callers below.
4278
4279 * linux-low.cc (linux_target_ops): Update.
4280 (linux_join): Turn into ...
4281 (linux_process_target::join): ... this.
4282 * linux-low.h (class linux_process_target): Update.
4283 * lynx-low.cc (lynx_target_ops): Update.
4284 (lynx_join): Turn into ...
4285 (lynx_process_target::join): ... this.
4286 * lynx-low.h (class lynx_process_target): Update.
4287 * nto-low.cc (nto_target_ops): Update.
4288 (nto_process_target::join): Define.
4289 * nto-low.h (class nto_process_target): Update.
4290 * win32-low.cc (win32_target_ops): Update.
4291 (win32_join): Turn into ...
4292 (win32_process_target::join): ... this.
4293 * win32-low.h (class win32_process_target): Update.
4294
4295 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4296
4297 Turn process_stratum_target's mourn op into a method of
4298 process_target.
4299
4300 * target.h (struct process_stratum_target): Remove the target op.
4301 (class process_target): Add the target op.
4302
4303 Update the derived classes and callers below.
4304
4305 * target.cc (target_mourn_inferior): Update.
4306 * linux-low.cc (linux_target_ops): Update.
4307 (linux_mourn): Turn into ...
4308 (linux_process_target::mourn): ... this.
4309 (handle_extended_wait): Update.
4310 (linux_process_target::kill): Update.
4311 (linux_process_target::detach): Update.
4312 * linux-low.h (class linux_process_target): Update.
4313 * lynx-low.cc (lynx_target_ops): Update.
4314 (lynx_mourn): Turn into ...
4315 (lynx_process_target::mourn): ... this.
4316 * lynx-low.h (class lynx_process_target): Update.
4317 * nto-low.cc (nto_target_ops): Update.
4318 (nto_mourn): Turn into ...
4319 (nto_process_target::mourn): ... this.
4320 * nto-low.h (class nto_process_target): Update.
4321 * win32-low.cc (win32_target_ops): Update.
4322 (win32_mourn): Turn into ...
4323 (win32_process_target::mourn): ... this.
4324 * win32-low.h (class win32_process_target): Update.
4325
4326 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4327
4328 Turn process_stratum_target's detach op into a method of
4329 process_target.
4330
4331 * target.h (struct process_stratum_target): Remove the target op.
4332 (class process_target): Add the target op.
4333 (detach_inferior): Update the macro.
4334
4335 Update the derived classes and callers below.
4336
4337 * linux-low.cc (linux_target_ops): Update.
4338 (linux_detach): Turn into ...
4339 (linux_process_target::detach): ... this.
4340 * linux-low.h (class linux_process_target): Update.
4341 * lynx-low.cc (lynx_target_ops): Update.
4342 (lynx_detach): Turn into ...
4343 (lynx_process_target::detach): ... this.
4344 * lynx-low.h (class lynx_process_target): Update.
4345 * nto-low.cc (nto_target_ops): Update.
4346 (nto_detach): Turn into ...
4347 (nto_process_target::detach): ... this.
4348 * nto-low.h (class nto_process_target): Update.
4349 * win32-low.cc (win32_target_ops): Update.
4350 (win32_detach): Turn into ...
4351 (win32_process_target::detach): ... this.
4352 * win32-low.h (class win32_process_target): Update.
4353
4354 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4355
4356 Turn process_stratum_target's kill op into a method of
4357 process_target.
4358
4359 * target.h (struct process_stratum_target): Remove the target op.
4360 (class process_target): Add the target op.
4361
4362 Update the derived classes and callers below.
4363
4364 * target.cc (kill_inferior): Update.
4365 * linux-low.cc (linux_target_ops): Update.
4366 (linux_kill): Turn into ...
4367 (linux_process_target::kill): ... this.
4368 * linux-low.h (class linux_process_target): Update.
4369 * lynx-low.cc (lynx_target_ops): Update.
4370 (lynx_kill): Turn into ...
4371 (lynx_process_target::kill): ... this.
4372 * lynx-low.h (class lynx_process_target): Update.
4373 * nto-low.cc (nto_target_ops): Update.
4374 (nto_kill): Turn into ...
4375 (nto_process_target::kill): ... this.
4376 * nto-low.h (class nto_process_target): Update.
4377 * win32-low.cc (win32_target_ops): Update.
4378 (win32_kill): Turn into ...
4379 (win32_process_target::kill): ... this.
4380 * win32-low.h (class win32_process_target): Update.
4381
4382 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4383
4384 Turn process_stratum_target's attach op into a method of
4385 process_target.
4386
4387 * target.h (struct process_stratum_target): Remove the target op.
4388 (class process_target): Add the target op.
4389 (myattach): Update the macro.
4390
4391 Update the derived classes and callers below.
4392
4393 * linux-low.cc (linux_target_ops): Update.
4394 (linux_attach): Turn into ...
4395 (linux_process_target::attach): ... this.
4396 * linux-low.h (class linux_process_target): Update.
4397 * lynx-low.cc (lynx_target_ops): Update.
4398 (lynx_attach): Turn into ...
4399 (lynx_process_target::attach): ... this.
4400 * lynx-low.h (class lynx_process_target): Update.
4401 * nto-low.cc (nto_target_ops): Update.
4402 (nto_attach): Turn into ...
4403 (nto_process_target::attach): ... this.
4404 * nto-low.h (class nto_process_target): Update.
4405 * win32-low.cc (win32_target_ops): Update.
4406 (win32_attach): Turn into ...
4407 (win32_process_target::attach): ... this.
4408 * win32-low.h (class win32_process_target): Update.
4409
4410 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4411
4412 Turn process_stratum_target's post_create_inferior op into a method
4413 of process_target.
4414
4415 * target.h (struct process_stratum_target): Remove the target op.
4416 (class process_target): Add the target op.
4417 (target_post_create_inferior): Update the macro.
4418 * target.cc (process_target::post_create_inferior): Define.
4419
4420 Update the derived classes and callers below.
4421
4422 * linux-low.cc (linux_target_ops): Update.
4423 (linux_post_create_inferior): Turn into ...
4424 (linux_process_target::post_create_inferior): ... this.
4425 * linux-low.h (class linux_process_target): Update.
4426 * lynx-low.cc (lynx_target_ops): Update.
4427 * nto-low.cc (nto_target_ops): Update.
4428 * win32-low.cc (win32_target_ops): Update.
4429
4430 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4431
4432 Turn process_stratum_target's create_inferior op into a method of
4433 process_target.
4434
4435 * target.h (struct process_stratum_target): Remove the target op.
4436 (class process_target): Add the target op.
4437 (create_inferior): Rename the macro to ...
4438 (target_create_inferior): ... this.
4439
4440 Update the derived classes and callers below.
4441
4442 * server.cc (handle_v_run): Update.
4443 (captured_main): Update.
4444 (process_serial_event): Update.
4445 * linux-low.cc (linux_target_ops): Update.
4446 (linux_create_inferior): Turn into ...
4447 (linux_process_target::create_inferior): ... this.
4448 * linux-low.h (class linux_process_target): Update.
4449 * lynx-low.cc (lynx_target_ops): Update.
4450 (lynx_create_inferior): Turn into ...
4451 (lynx_process_target::create_inferior): ... this.
4452 * lynx-low.h (class lynx_process_target): Update.
4453 * nto-low.cc (nto_target_ops): Update.
4454 (nto_create_inferior): Turn into ...
4455 (nto_process_target::create_inferior): ... this.
4456 * nto-low.h (class nto_process_target): Update.
4457 * win32-low.cc (win32_target_ops): Update.
4458 (win32_create_inferior): Turn into ...
4459 (win32_process_target::create_inferior): ... this.
4460 * win32-low.h (class win32_process_target): Update.
4461
4462 2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
4463
4464 * target.h (class process_target): New class definition.
4465 (struct process_stratum_target) <pt>: New field with type
4466 'process_target*'.
4467 * linux-low.h (class linux_process_target): Define as a derived
4468 class of 'process_target'.
4469 * linux-low.cc (linux_target_ops): Add a linux_process_target*
4470 as the 'pt' field.
4471 * lynx-low.h (class lynx_process_target): Define as a derived
4472 class of 'process_target'.
4473 * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
4474 as the 'pt' field.
4475 * nto-low.h (class nto_process_target): Define as a derived
4476 class of 'process_target'.
4477 * nto-low.cc (nto_target_ops): Add an nto_process_target*
4478 as the 'pt' field.
4479 * win32-low.h (class win32_process_target): Define as a derived
4480 class of 'process_target'.
4481 * win32-low.cc (win32_target_ops): Add a win32_process_target*
4482 as the 'pt' field.
4483
4484 2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
4485
4486 * configure: Regenerate.
4487
4488 2020-02-19 Maciej W. Rozycki <macro@wdc.com>
4489 Andrew Burgess <andrew.burgess@embecosm.com>
4490
4491 * linux-riscv-low.cc: New file.
4492 * Makefile.in (SFILES): Add linux-riscv-low.cc, arch/riscv.c,
4493 and nat/riscv-linux-tdesc.c.
4494 * configure.srv <riscv*-*-linux*> (srv_tgtobj)
4495 (srv_linux_regsets, srv_linux_usrregs, srv_linux_thread_db):
4496 Define.
4497
4498 2020-02-14 Tom Tromey <tom@tromey.com>
4499
4500 * acinclude.m4: Don't include acx_configure_dir.m4.
4501 * Makefile.in (LIBIBERTY_BUILDDIR, GNULIB_BUILDDIR): Update.
4502 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): Remove.
4503 (all, install-only, uninstall, clean-info, clean)
4504 (maintainer-clean): Don't recurse.
4505 (subdir_do, all-lib): Remove.
4506 ($(LIBGNU) $(LIBIBERTY) $(GNULIB_H)): Remove rule.
4507 (GNULIB_H): Remove.
4508 (generated_files): Update.
4509 ($(GNULIB_BUILDDIR)/Makefile): Remove rule.
4510 * configure: Rebuild.
4511 * configure.ac: Don't configure gnulib or libiberty.
4512 (GNULIB): Update.
4513
4514 2020-02-14 Eli Zaretskii <eliz@gnu.org>
4515
4516 * win32-low.c (create_process): Prepend PROGRAM to ARGS when
4517 preparing the command line for CreateProcess.
4518 (win32_create_inferior): Reflect the program name in debugging
4519 output that shows the process and its command line.
4520
4521 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
4522
4523 * Makefile.in: Rename source files from .c to .cc.
4524 * %.c: Rename to %.cc.
4525 * configure.ac: Rename server.c to server.cc.
4526 * configure: Re-generate.
4527
4528 2020-02-13 Simon Marchi <simon.marchi@efficios.com>
4529
4530 * Makefile.in: Rename gdbsupport source files from .c to .cc.
4531
4532 2020-02-12 Hannes Domani <ssbssa@yahoo.de>
4533
4534 * win32-low.c (win32_create_inferior): Set signal_pid.
4535
4536 2020-02-12 Maciej W. Rozycki <macro@wdc.com>
4537 Pedro Alves <palves@redhat.com>
4538
4539 Skip building gdbserver in a cross-configuration.
4540 * configure.srv: Set $gdbserver_host depending on whether $target
4541 is $host. Use $gdbserver_host instead of $host.
4542
4543 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4544
4545 * configure: Re-generate.
4546
4547 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4548
4549 * configure: Re-generate.
4550
4551 2020-02-11 Simon Marchi <simon.marchi@efficios.com>
4552
4553 * acinclude.m4: Update warning.m4 path.
4554
4555 2020-02-09 Hannes Domani <ssbssa@yahoo.de>
4556
4557 * win32-low.c (win32_clear_inferiors): Reset siginfo_er.
4558 (handle_exception): Set siginfo_er.
4559 (win32_xfer_siginfo): New function.
4560
4561 2020-02-07 Tom Tromey <tom@tromey.com>
4562 Pedro Alves <palves@redhat.com>
4563
4564 * README: Update build documentation.
4565 * configure.srv: Set UNSUPPORTED if host is unsupported. Check
4566 host, not target.
4567 * configure.ac: Update paths.
4568 * configure: Rebuild.
4569 * acinclude.m4: Update paths.
4570 * Makefile.in: Update include paths.
4571 (depcomp, INCLUDE_DIR, INCGNU, INCSUPPORT, INCLUDE_CFLAGS)
4572 (SFILES, XML_DIR, n, $(GNULIB_BUILDDIR)/Makefile, config.status)
4573 (version-generated.c, stamp-xml, regdat_sh, arch/%-ipa.o)
4574 (gdbsupport/%-ipa.o, %-ipa.o, arch/%.o, gdbsupport/%.o, %.o)
4575 (%-generated.c): Update paths.
4576 * Move entire directory from ../gdb/gdbserver.
4577
4578 2020-01-29 Maciej W. Rozycki <macro@wdc.com>
4579
4580 * configure.srv <i[34567]86-*-mingw*>: Fix whitespace damage.
4581
4582 2020-01-29 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
4583
4584 * configure.srv (powerpc*-*-linux*): Use srv_tgtobj in second
4585 assignment instead of srv_linux_obj.
4586
4587 2020-01-28 Hannes Domani <ssbssa@yahoo.de>
4588
4589 * server.c (handle_qxfer_libraries): Write segment-address with
4590 paddress.
4591
4592 2020-01-24 Hannes Domani <ssbssa@yahoo.de>
4593
4594 * Makefile.in (install-strip): New target.
4595 (install_sh, INSTALL_STRIP_PROGRAM, STRIP): New variables.
4596 * aclocal.m4: Regenerate.
4597 * configure: Regenerate.
4598 * configure.ac: Add AM_PROG_INSTALL_STRIP.
4599
4600 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4601
4602 * Makefile.in (SFILES): Adjust paths to point to real files.
4603 (OBS): Move waitstatus.o to target/waitstatus.o.
4604 (TAGS): Transform paths appropriately.
4605 (%.o): Rename to...
4606 (nat/%.o): ... this pattern rule.
4607 (%.o): Rename to...
4608 (target/%.o): ... this pattern rule.
4609 * configure.srv: Adjust paths throughout to include nat/ prefix
4610 with the revant files.
4611 * configure.ac: Add `nat' and `target' to CONFIG_SRC_SUBDIR.
4612 * configure: Regenerate.
4613
4614 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
4615
4616 * Makefile.in (TAGS): Remove config files from the recipe.
4617
4618 2020-01-14 Tom Tromey <tom@tromey.com>
4619
4620 * configure: Rebuild.
4621 * configure.ac: Remove any checks that were added to common.m4.
4622 * acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
4623 lib-link.m4.
4624
4625 2020-01-14 Tom Tromey <tom@tromey.com>
4626
4627 * server.h: Include config.h.
4628 * gdbreplay.c: Include config.h.
4629 * configure: Rebuild.
4630 * configure.ac: Don't source common.host.
4631 * acinclude.m4: Update path.
4632 * Makefile.in (INCSUPPORT): New variable.
4633 (INCLUDE_CFLAGS): Add INCSUPPORT.
4634 (SFILES): Update paths.
4635 (version-generated.c): Update path to create-version.sh.
4636 (gdbsupport/%-ipa.o, gdbsupport/%.o): Update paths.
4637
4638 2020-01-14 Tom Tromey <tom@tromey.com>
4639
4640 * configure.ac (LIBS): Use WIN32APILIBS.
4641 (USE_WIN32API): Don't define.
4642 * configure: Rebuild.
4643
4644 2020-01-14 Tom Tromey <tom@tromey.com>
4645
4646 * configure: Rebuild.
4647
4648 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4649
4650 * Makefile.in (%-generated.c): Remove rule for files from
4651 regformats/i386.
4652
4653 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4654
4655 * configure: Re-generate.
4656
4657 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4658
4659 * tracepoint.h (IP_AGENT_EXPORT_FUNC) [!IN_PROCESS_AGENT]:
4660 Define to static.
4661 * tracepoint.c (stop_tracing, flush_trace_buffer,
4662 about_to_request_buffer_space, get_trace_state_variable_value,
4663 set_trace_state_variable_value, gdb_collect): Add declaration.
4664
4665 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4666
4667 * linux-x86-low.c (x86_linux_regs_info, amd64_emit_eq_goto,
4668 amd64_emit_ne_goto, amd64_emit_lt_goto, amd64_emit_le_goto,
4669 amd64_emit_gt_goto, amd64_emit_ge_goto, amd64_emit_ge_goto,
4670 i386_emit_eq_goto, i386_emit_ne_goto, i386_emit_lt_goto,
4671 i386_emit_le_goto, i386_emit_gt_goto, i386_emit_ge_goto): Make
4672 static.
4673
4674 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4675
4676 * inferiors.c: Include gdbsupport/common-inferior.h.
4677
4678 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4679
4680 * hostio-errno.c: Include hostio.h.
4681
4682 2020-01-13 Simon Marchi <simon.marchi@efficios.com>
4683
4684 * Makefile.in (%-generated.c): Make $(regdat_sh) a regular
4685 prerequisite.
4686
4687 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4688
4689 * linux-arm-tdesc.c: Include linux-arm-tdesc.h.
4690 * linux-arm-tdesc.h: Include arch/arm.h.
4691
4692 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4693
4694 * linux-aarch64-low.c (aarch64_write_goto_address): Make static.
4695
4696 2020-01-12 Simon Marchi <simon.marchi@polymtl.ca>
4697
4698 * linux-aarch32-tdesc.c: Include linux-aarch32-tdesc.h.
4699 * linux-aarch64-tdesc.c: Include linux-aarch64-tdesc.h.
4700
4701 2020-01-10 Pedro Alves <palves@redhat.com>
4702
4703 * fork-child.c (post_fork_inferior): Pass target down to
4704 startup_inferior.
4705 * inferiors.c (switch_to_thread): Add process_stratum_target
4706 parameter.
4707 * lynx-low.c (lynx_target_ops): Now a process_stratum_target.
4708 * nto-low.c (nto_target_ops): Now a process_stratum_target.
4709 * linux-low.c (linux_target_ops): Now a process_stratum_target.
4710 * remote-utils.c (prepare_resume_reply): Pass the target to
4711 switch_to_thread.
4712 * target.c (the_target): Now a process_stratum_target.
4713 (done_accessing_memory): Pass the target to switch_to_thread.
4714 (set_target_ops): Ajust to use process_stratum_target.
4715 * target.h (struct target_ops): Rename to ...
4716 (struct process_stratum_target): ... this.
4717 (the_target, set_target_ops): Adjust.
4718 (prepare_to_access_memory): Adjust comment.
4719 * win32-low.c (child_xfer_memory): Adjust to use
4720 process_stratum_target.
4721 (win32_target_ops): Now a process_stratum_target.
4722
4723 2020-01-06 Eli Zaretskii <eliz@gnu.org>
4724 Pedro Alves <palves@redhat.com>
4725
4726 * win32-low.c (get_child_debug_event): Extract the fatal exception
4727 from the exit status and convert to the equivalent Posix signal
4728 number.
4729 (win32_wait): Allow TARGET_WAITKIND_SIGNALLED status as well.
4730 * Makefile.in (OBS, SFILES): Add gdb_wait.[co].
4731
4732 2020-01-01 Hannes Domani <ssbssa@yahoo.de>
4733
4734 * Makefile.in: Use INSTALL_PROGRAM_ENV.
4735
4736 2020-01-01 Joel Brobecker <brobecker@adacore.com>
4737
4738 * server.c (gdbserver_version): Change copyright year to 2020.
4739 * gdbreplay.c (gdbreplay_version): Likewise.
4740
4741 2019-12-19 Christian Biesinger <cbiesinger@google.com>
4742
4743 * configure: Regenerate.
4744 * configure.ac: Quote variable arguments of test.
4745
4746 2019-12-16 Bernd Edlinger <bernd.edlinger@hotmail.de>
4747
4748 * Makefile.in: Fix build with GNU Make 3.81
4749
4750 2019-12-16 Tom Tromey <tromey@adacore.com>
4751
4752 * server.c (get_exec_file): Constify result.
4753
4754 2019-12-10 Christian Biesinger <cbiesinger@google.com>
4755
4756 * Makefile.in: Add safe-strerror.c to gdbreplay and IPA, and change
4757 UNDO_GNULIB_CFLAGS to undo strerror_r instead of strerror.
4758 * config.in: Regenerate.
4759 * configure: Regenerate.
4760 * configure.ac: Don't check for strerror.
4761 * linux-i386-ipa.c (initialize_fast_tracepoint_trampoline_buffer):
4762 Call safe_strerror instead of strerror.
4763 * server.h (strerror): Remove this now-unnecessary declaration.
4764 * tracepoint.c (init_named_socket): Call safe_strerror instead of
4765 strerror.
4766 (gdb_agent_helper_thread): Likewise.
4767 * utils.c (perror_with_name): Likewise.
4768
4769 2019-11-26 Tom Tromey <tom@tromey.com>
4770
4771 * configure, config.in: Rebuild.
4772
4773 2019-11-26 Tom Tromey <tom@tromey.com>
4774
4775 * remote-utils.c (block_unblock_async_io): Use gdb_sigmask.
4776 * linux-low.c (linux_wait_for_event_filtered, linux_async): Use
4777 gdb_sigmask.
4778 * configure, config.in: Rebuild.
4779
4780 2019-11-26 Tom Tromey <tom@tromey.com>
4781
4782 * Makefile.in (PTHREAD_CFLAGS, PTHREAD_LIBS): New variables.
4783 (INTERNAL_CFLAGS_BASE): Use PTHREAD_CFLAGS.
4784 (GDBSERVER_LIBS): Use PTHREAD_LIBS.
4785 * acinclude.m4: Include ax_pthread.m4.
4786 * config.in, configure: Rebuild.
4787
4788 2019-11-26 Christian Biesinger <cbiesinger@google.com>
4789
4790 * debug.c (debug_set_output): Call safe_strerror instead of
4791 strerror.
4792 * linux-low.c (attach_proc_task_lwp_callback): Likewise.
4793 (linux_kill_one_lwp): Likewise.
4794 (linux_detach_one_lwp): Likewise.
4795 (linux_wait_for_event_filtered): Likewise.
4796 (store_register): Likewise.
4797 * lynx-low.c (lynx_attach): Likewise.
4798 * mem-break.c (insert_memory_breakpoint): Likewise.
4799 (remove_memory_breakpoint): Likewise.
4800 (delete_fast_tracepoint_jump): Likewise.
4801 (set_fast_tracepoint_jump): Likewise.
4802 (uninsert_fast_tracepoint_jumps_at): Likewise.
4803 (reinsert_fast_tracepoint_jumps_at): Likewise.
4804 * nto-low.c (nto_xfer_memory): Likewise.
4805 (nto_resume): Likewise.
4806
4807 2019-11-20 Luis Machado <luis.machado@linaro.org>
4808
4809 * linux-aarch64-low.c (is_sve_tdesc): Check against target feature
4810 instead of register count.
4811 * tdesc.c (tdesc_contains_feature): New function.
4812 * tdesc.h (tdesc_contains_feature): New prototype.
4813
4814 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4815
4816 * Makefile.in: Add safe-strerror.c.
4817 * configure: Regenerate.
4818 * configure.ac: Don't source common.host.
4819
4820 2019-11-15 Christian Biesinger <cbiesinger@google.com>
4821
4822 * config.in: Regenerate.
4823 * configure: Regenerate.
4824
4825 2019-11-12 Andrew Burgess <andrew.burgess@embecosm.com>
4826
4827 * ax.c (ax_printf): Handle size_t_arg.
4828
4829 2019-11-06 Christian Biesinger <cbiesinger@google.com>
4830
4831 * linux-tdep.c (linux_info_proc): Use strtok_r instead of strtok.
4832 * mi/mi-main.c (output_cores): Likewise.
4833 * nat/linux-osdata.c (linux_xfer_osdata_cpus): Likewise.
4834 (linux_xfer_osdata_modules): Likewise.
4835 * remote.c (register_remote_support_xml): Likewise.
4836 * sparc64-tdep.c (adi_is_addr_mapped): Likewise.
4837 * xml-syscall.c (syscall_create_syscall_desc): Likewise.
4838
4839 2019-11-01 Christian Biesinger <cbiesinger@google.com>
4840
4841 * configure: Regenerate.
4842 * configure.ac: Remove check for strerror_r.
4843
4844 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4845
4846 * config.in: Regenerate.
4847 * configure: Regenerate.
4848 * configure.ac: Also check for strerror_r.
4849
4850 2019-10-31 Christian Biesinger <cbiesinger@google.com>
4851
4852 * ax.h (debug_agent): Remove duplicate declaration.
4853
4854 2019-10-26 Tom de Vries <tdevries@suse.de>
4855
4856 * linux-aarch64-low.c: Fix typos in comments.
4857 * linux-arm-low.c: Same.
4858 * linux-low.c: Same.
4859 * linux-ppc-low.c: Same.
4860 * proc-service.c: Same.
4861 * regcache.h: Same.
4862 * server.c: Same.
4863 * tracepoint.c: Same.
4864 * win32-low.c: Same.
4865
4866 2019-10-25 Tom Tromey <tromey@adacore.com>
4867
4868 * utils.c (xstrdup): Remove.
4869
4870 2019-10-23 Tom Tromey <tom@tromey.com>
4871
4872 * configure, config.in: Rebuild.
4873
4874 2019-10-23 Tom Tromey <tom@tromey.com>
4875
4876 * configure: Rebuild.
4877 * acinclude.m4: Use m4_include, not sinclude.
4878
4879 2019-10-17 Tom Tromey <tromey@adacore.com>
4880
4881 * configure: Rebuild.
4882 * configure.ac: Use AC_CONFIG_HEADERS. Create stamp-h there, not
4883 in AC_CONFIG_FILES invocation.
4884 * Makefile.in (stamp-h, Makefile): Use new-style config.status
4885 invocation.
4886
4887 2019-10-16 Christian Biesinger <cbiesinger@google.com>
4888
4889 * server.c: Include xml-builtin.h.
4890 (get_xml_features): Don't declare xml_builtins here.
4891
4892 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4893
4894 * Makefile.in: Remove references to vec-ipa.o.
4895
4896 2019-10-15 Andrew Burgess <andrew.burgess@embecosm.com>
4897
4898 * Makefile.in: Remove references to vec.c.
4899
4900 2019-10-02 Christian Biesinger <cbiesinger@google.com>
4901
4902 * server.c (server_waiting): Change to bool.
4903 (extended_protocol): Likewise.
4904 (response_needed): Likewise.
4905 (exit_requested): Likewise.
4906 (run_once): Likewise.
4907 (report_no_resumed): Likewise.
4908 (non_stop): Likewise.
4909 (disable_packet_vCont): Likewise.
4910 (disable_packet_Tthread): Likewise.
4911 (disable_packet_qC): Likewise.
4912 (disable_packet_qfThreadInfo): Likewise.
4913 (handle_general_set): Update.
4914 (handle_detach): Update.
4915 (handle_monitor_command): Update.
4916 (handle_query): Update.
4917 (captured_main): Update.
4918 (process_serial_event): Update.
4919 * server.h (server_waiting): Change to bool.
4920 (disable_packet_vCont): Likewise.
4921 (disable_packet_Tthread): Likewise.
4922 (disable_packet_qC): Likewise.
4923 (disable_packet_qfThreadInfo): Likewise.
4924 (run_once): Likewise.
4925 (non_stop): Likewise.
4926 * target.c (target_stop_and_wait): Update.
4927
4928 2019-10-02 Tom Tromey <tromey@adacore.com>
4929
4930 * Makefile.in (SFILES): Add common-inferior.c.
4931 (OBS): Add common-inferior.o.
4932 * server.c (startup_with_shell): Don't define.
4933
4934 2019-10-02 Andrew Burgess <andrew.burgess@embecosm.com>
4935
4936 * linux-low.c (linux_low_read_btrace): Update for change to
4937 std::vector.
4938
4939 2019-09-20 Christian Biesinger <cbiesinger@google.com>
4940
4941 * debug.c (debug_threads): Remove comment in favor of the header.
4942 * debug.h (using_threads): Add declaration.
4943 (debug_threads): Add comment.
4944 * linux-aarch64-low.c: Include debug.h and remove declaration of
4945 debug_threads.
4946 * nto-low.c: Likewise.
4947 * remote-utils.c: Likewise.
4948 * thread-db.c: Likewise.
4949
4950 2019-09-20 Ulrich Weigand <uweigand@de.ibm.com>
4951
4952 * configure.srv (ipa_ppc_linux_regobj): Remove powerpc-cell32l-ipa.o
4953 and powerpc-cell64l-ipa.o.
4954 (powerpc*-*-linux*): Remove powerpc-cell32l.o and powerpc-cell64l.o
4955 from srv_regobj. Remove rs6000/powerpc-cell32l.xml and
4956 rs6000/powerpc-cell64l.xml from srv_xmlfiles.
4957 (spu*-*-*): Remove.
4958
4959 * spu-low.c: Remove file.
4960
4961 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Remove.
4962 (parse_spufs_run): Remove.
4963 (ppc_get_pc): Remove Cell/B.E. support.
4964 (ppc_set_pc): Likewise.
4965 (ppc_breakpoint_at): Likewise.
4966 (ppc_arch_setup): Likewise.
4967 (ppc_get_ipa_tdesc_idx): Do not handle tdesc_powerpc_cell64l or
4968 tdesc_powerpc_cell32l.
4969 (initialize_low_arch): Do not call init_registers_powerpc_cell64l
4970 or init_registers_powerpc_cell32l.
4971 * linux-ppc-ipa.c (get_ipa_tdesc): Do not handle PPC_TDESC_CELL.
4972 (initialize_low_tracepoint): Do not call init_registers_powerpc_cell64l
4973 or init_registers_powerpc_cell32l.
4974 * linux-ppc-tdesc-init.h (PPC_TDESC_CELL): Mark as unused.
4975 (init_registers_powerpc_cell32l): Remove prototype.
4976 (init_registers_powerpc_cell64l): Likewise.
4977
4978 * target.h (struct target_ops): Remove qxfer_spu member.
4979 * server.c (handle_qxfer_spu): Remove.
4980 (qxfer_packets): Remove entry for "spu".
4981 (handle_query): No longer support qXfer:spu:read or qXfer:spu:write.
4982 * linux-low.c (SPUFS_MAGIC): Remove.
4983 (spu_enumerate_spu_ids): Remove.
4984 (linux_qxfer_spu): Remove.
4985 (linux_target_ops): Remove qxfer_spu member.
4986 * lynx-low.c (lynx_target_ops): Remove qxfer_spu member.
4987 * nto-low.c (nto_target_ops): Remove qxfer_spu member.
4988 * win32-low.c (win32_target_ops): Remove qxfer_spu member.
4989
4990 2019-08-23 Sergio Durigan Junior <sergiodj@redhat.com>
4991
4992 * Makefile.in (SFILES): Add 'gdbsupport/gdb-dlfcn.c'.
4993 (OBS): Add 'gdbsupport/gdb-dlfcn.o'.
4994 * config.in: Regenerate.
4995 * configure: Regenerate.
4996
4997 2019-08-15 Tom Tromey <tromey@adacore.com>
4998
4999 * target.c (target_write_memory): Use gdb::byte_vector.
5000
5001 2019-08-15 Tom Tromey <tromey@adacore.com>
5002
5003 * tracepoint.c (write_inferior_data_pointer)
5004 (write_inferior_integer, write_inferior_int8)
5005 (write_inferior_uinteger, m_tracepoint_action_download)
5006 (r_tracepoint_action_download, x_tracepoint_action_download)
5007 (l_tracepoint_action_download, clear_inferior_trace_buffer)
5008 (download_agent_expr, download_tracepoint_1)
5009 (download_trace_state_variables, upload_fast_traceframes): Update.
5010 * server.c (gdb_write_memory): Update.
5011 * remote-utils.c (relocate_instruction): Update.
5012 * proc-service.c (ps_pdwrite): Update.
5013 * mem-break.c (remove_memory_breakpoint)
5014 (delete_fast_tracepoint_jump, set_fast_tracepoint_jump)
5015 (uninsert_fast_tracepoint_jumps_at)
5016 (reinsert_fast_tracepoint_jumps_at): Update.
5017 * linux-x86-low.c (append_insns)
5018 (i386_install_fast_tracepoint_jump_pad)
5019 (amd64_write_goto_address, i386_write_goto_address): Update.
5020 * linux-s390-low.c (append_insns, s390_write_goto_address):
5021 Update.
5022 * linux-ppc-low.c (ppc_relocate_instruction)
5023 (ppc_install_fast_tracepoint_jump_pad, emit_insns)
5024 (ppc_write_goto_address): Update.
5025 * linux-aarch64-low.c (append_insns): Update.
5026 * target.h (struct target_ops): Update.
5027 (write_inferior_memory): Don't declare.
5028 * target.c (target_write_memory): Rename from
5029 write_inferior_memory. Remove old target_write_memory.
5030
5031 2019-08-15 Tom Tromey <tromey@adacore.com>
5032
5033 * target.c (write_inferior_memory): Use std::vector.
5034
5035 2019-08-06 Frank Ch. Eigler <fche@redhat.com>
5036
5037 PR build/24886
5038 * configure.ac: Drop enable-libmcheck support.
5039 * configure, config.in: Rebuild.
5040 * acinclude.m4: Don't include it.
5041
5042 2019-07-19 Alan Hayward <alan.hayward@arm.com>
5043
5044 * configure.srv: Remove Arm xml files.
5045
5046 2019-07-19 Alan Hayward <alan.hayward@arm.com>
5047
5048 * configure.srv: Add new files. Remove xml generated files.
5049 * linux-aarch32-low.c (initialize_low_arch_aarch32): Don't init
5050 registers.
5051 * linux-aarch32-low.h (tdesc_arm_with_neon): Remove.
5052 * linux-aarch32-tdesc.c: New file.
5053 * linux-aarch32-tdesc.h: New file.
5054 * linux-aarch64-low.c (aarch64_arch_setup): Call aarch32_linux_read_description.
5055 * linux-arm-low.c (init_registers_arm, tdesc_arm)
5056 (init_registers_arm_with_iwmmxt, tdesc_arm_with_iwmmxt)
5057 (init_registers_arm_with_vfpv2, tdesc_arm_with_vfpv2)
5058 (init_registers_arm_with_vfpv3, tdesc_arm_with_vfpv3): Remove.
5059 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
5060 (arm_store_vfpregset): Call arm_linux_get_tdesc_fp_type.
5061 (arm_read_description): Call arm_linux_read_description.
5062 (initialize_low_arch): Don't init registers.
5063 * linux-arm-tdesc.c: New file.
5064 * linux-arm-tdesc.h: New file.
5065
5066 2019-07-10 Alan Hayward <alan.hayward@arm.com>
5067
5068 * linux-arm-low.c (arm_fill_wmmxregset, arm_store_wmmxregset):
5069 Move counter inside for.
5070 (arm_read_description): Check ptrace earlier.
5071 (arm_arch_setup): Call arm_linux_init_hwbp_cap here.
5072
5073 2019-07-09 Tom Tromey <tom@tromey.com>
5074
5075 * configure: Rebuild.
5076 * configure.ac: Change common to gdbsupport.
5077 * acinclude.m4: Change common to gdbsupport.
5078 * Makefile.in (SFILES, OBS, GDBREPLAY_OBS, IPA_OBJS)
5079 (version-generated.c, gdbsupport/%-ipa.o, gdbsupport/%.o): Change
5080 common to gdbsupport.
5081 * ax.c, event-loop.c, fork-child.c, gdb_proc_service.h,
5082 gdbreplay.c, gdbthread.h, hostio-errno.c, hostio.c, i387-fp.c,
5083 inferiors.c, inferiors.h, linux-aarch64-tdesc-selftest.c,
5084 linux-amd64-ipa.c, linux-i386-ipa.c, linux-low.c,
5085 linux-tic6x-low.c, linux-x86-low.c, linux-x86-tdesc-selftest.c,
5086 linux-x86-tdesc.c, lynx-i386-low.c, lynx-low.c, mem-break.h,
5087 nto-x86-low.c, regcache.c, regcache.h, remote-utils.c, server.c,
5088 server.h, spu-low.c, symbol.c, target.h, tdesc.c, tdesc.h,
5089 thread-db.c, tracepoint.c, win32-i386-low.c, win32-low.c: Change
5090 common to gdbsupport.
5091
5092 2019-07-04 Alan Hayward <alan.hayward@arm.com>
5093
5094 * linux-aarch32-low.c (arm_read_description, arm_regsets): Use new
5095 defines.
5096 * linux-arm-low.c (arm_read_description, arm_regsets): Likewise.
5097
5098 2019-07-04 Alan Hayward <alan.hayward@arm.com>
5099
5100 * configure.srv: Remove legacy xml.
5101 * linux-aarch64-low.c (initialize_low_arch): Remove
5102 initialize_low_tdesc call.
5103 * linux-aarch64-tdesc-selftest.c: Remove file.
5104 * linux-aarch64-tdesc.h (initialize_low_tdesc): Remove.
5105 * linux-x86-low.c (initialize_low_arch): Remove
5106 initialize_low_tdesc call.
5107 * linux-x86-tdesc-selftest.c: Remove file.
5108 * linux-x86-tdesc.h (initialize_low_tdesc): Remove.
5109
5110 2019-06-20 Tom de Vries <tdevries@suse.de>
5111
5112 * linux-s390-ipa.c (get_ipa_tdesc)[!__s390x__]: Use
5113 s390_te_linux64_ft_collect_regmap for S390_TDESC_GS.
5114
5115 2019-06-19 Tom de Vries <tdevries@suse.de>
5116
5117 * debug.h (debug_write): Change return type to ssize_t.
5118 * debug.c (debug_write): Same.
5119
5120 2019-06-14 Tom Tromey <tom@tromey.com>
5121
5122 * configure.ac: Use new path to gnulib.
5123 * configure: Rebuild.
5124 * Makefile.in (INCGNU, $(GNULIB_BUILDDIR)/Makefile): Use new path
5125 to gnulib.
5126
5127 2019-06-11 Tom Tromey <tom@tromey.com>
5128
5129 * Makefile.in (SFILES): Add alloc.c.
5130 (OBS): Add alloc.o.
5131 (IPA_OBJS): Add alloc-ipa.o.
5132 (alloc-ipa.o): New target.
5133 (%.o: ../%.c): New pattern rule.
5134
5135 2019-06-10 Tom Tromey <tromey@adacore.com>
5136
5137 * remote-utils.c (look_up_one_symbol, relocate_instruction): Don't
5138 end warning with a newline.
5139 * linux-s390-low.c (s390_get_wordsize): Don't end warning with a
5140 newline.
5141 * thread-db.c (attach_thread): Don't end warning with a newline.
5142 (thread_db_notice_clone): Likewise.
5143 * tracepoint.c (gdb_agent_helper_thread): Don't end warning with a
5144 newline.
5145 * linux-x86-low.c (x86_get_min_fast_tracepoint_insn_len): Don't
5146 end warning with a newline.
5147
5148 2019-06-04 Pedro Alves <palves@redhat.com>
5149
5150 * server.c (captured_main): Use make_unique_xstrdup.
5151
5152 2019-06-02 Tom Tromey <tom@tromey.com>
5153
5154 * gdbreplay.c (fromhex): Remove.
5155 * Makefile.in (GDBREPLAY_OBS): Add rsp-low.o.
5156
5157 2019-05-29 Tom Tromey <tromey@adacore.com>
5158
5159 * configure: Rebuild.
5160
5161 2019-05-06 Kevin Buettner <kevinb@redhat.com>
5162
5163 * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
5164 sign extension code on 32-bit builds.
5165
5166 2019-05-03 Eli Zaretskii <eliz@gnu.org>
5167
5168 * remote-utils.c:
5169 * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
5170
5171 2019-04-19 Tom Tromey <tom@tromey.com>
5172
5173 * server.c (struct vstop_notif): Derive from notif_event.
5174 <base>: Remove.
5175 (queue_stop_reply): Update.
5176 (remove_all_on_match_ptid): Change type. Rewrite.
5177 (discard_queued_stop_replies): Rewrite.
5178 (in_queued_stop_replies_ptid): Change type.
5179 (in_queued_stop_replies): Rewrite.
5180 (notif_stop): Update.
5181 (queue_stop_reply_callback): Update.
5182 (captured_main): Don't call initialize_notif.
5183 (push_stop_notification): Update.
5184 * notif.c (notif_write_event, handle_notif_ack)
5185 (notif_event_enque, notif_push): Update.
5186 (notif_event_xfree, initialize_notif): Remove.
5187 * notif.h (struct notif_event): Include <list>, not
5188 "common/queue.h".
5189 (struct notif_server) <queue>: Now a std::list.
5190 (notif_event_p): Remove typedef.
5191 (initialize_notif): Don't declare.
5192 (struct notif_event): Add virtual destructor.
5193
5194 2019-04-17 Alan Hayward <alan.hayward@arm.com>
5195
5196 * ax.c (ax_vdebug): Call debug_printf.
5197 * debug.c (debug_write): New function.
5198 * debug.h (debug_write): New declaration.
5199 * linux-low.c (sigchld_handler): Call debug_write.
5200
5201 2019-04-17 Alan Hayward <alan.hayward@arm.com>
5202
5203 * debug.c (debug_set_output): New function.
5204 (debug_vprintf): Send output to debug_file.
5205 (debug_flush): Likewise.
5206 * debug.h (debug_set_output): New declaration.
5207 * server.c (handle_monitor_command): Add debug-file option.
5208 (captured_main): Likewise.
5209
5210 2019-04-17 Alan Hayward <alan.hayward@arm.com>
5211
5212 * debug.c (remote_debug): Add definition.
5213 * debug.h (remote_debug): Add declaration.
5214 * hostio.c (remote_debug): Remove declaration.
5215 * remote-utils.c (struct ui_file): Likewise.
5216 (remote_debug): Likewise.
5217 * remote-utils.h (remote_debug): Likewise,
5218 * server.c (remote_debug): Remove definition.
5219
5220 2019-04-10 Kevin Buettner <kevinb@redhat.com>
5221
5222 * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
5223 when using a 64-bit gdbserver.
5224
5225 2019-04-09 Tom Tromey <tromey@adacore.com>
5226
5227 * linux-low.c (select_event_lwp): Use find_thread_in_random.
5228
5229 2019-04-08 Tom Tromey <tom@tromey.com>
5230
5231 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
5232 throw.
5233 (linux_resume_one_lwp): Likewise.
5234
5235 2019-04-08 Tom Tromey <tom@tromey.com>
5236
5237 * gdbreplay.c: Update.
5238 * linux-low.c: Update.
5239 * server.c: Update.
5240
5241 2019-04-08 Tom Tromey <tom@tromey.com>
5242
5243 * server.c: Use C++ exception handling.
5244 * linux-low.c: Use C++ exception handling.
5245 * gdbreplay.c: Use C++ exception handling.
5246
5247 2019-04-08 Tom Tromey <tom@tromey.com>
5248
5249 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
5250 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
5251 (captured_main, main): Update.
5252 * gdbreplay.c (main): Update.
5253
5254 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5255
5256 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
5257 value in argument pointer, return 1 if the entry is found and 0
5258 otherwise. Move comment.
5259 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
5260 * linux-low.h (linux_get_auxv): Declare.
5261 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
5262
5263 2019-04-05 Tom Tromey <tromey@adacore.com>
5264
5265 * server.c (gdbserver_usage): Use upper-case for metasyntactic
5266 variables.
5267
5268 2019-03-28 Alan Hayward <alan.hayward@arm.com>
5269
5270 * linux-low.c (AT_HWCAP2): Add define if not already included.
5271
5272 2019-03-26 Alan Hayward <alan.hayward@arm.com>
5273
5274 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
5275 (aarch64_arch_setup): Call linux_get_hwcap.
5276 * linux-arm-low.c (arm_get_hwcap): Remove function.
5277 (arm_read_description): Call linux_get_hwcap.
5278 * linux-low.c (linux_get_auxv): New function.
5279 (linux_get_hwcap): Likewise.
5280 (linux_get_hwcap2): Likewise.
5281 * linux-low.h (linux_get_hwcap): New declaration.
5282 (linux_get_hwcap2): Likewise.
5283 * linux-ppc-low.c (ppc_get_auxv): Remove function.
5284 (ppc_arch_setup): Call linux_get_hwcap.
5285 * linux-s390-low.c (s390_get_hwcap): Remove function.
5286 (s390_arch_setup): Call linux_get_hwcap.
5287
5288 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5289 Jiong Wang <jiong.wang@arm.com>
5290
5291 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
5292 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
5293 to fail.
5294 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
5295
5296 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5297 Jiong Wang <jiong.wang@arm.com>
5298
5299 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
5300 (aarch64_get_hwcap): New function.
5301 (aarch64_arch_setup): Read APIA hwcap.
5302
5303 2019-03-22 Alan Hayward <alan.hayward@arm.com>
5304 Jiong Wang <jiong.wang@arm.com>
5305
5306 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
5307 (initialize_low_tracepoint): Likewise.
5308 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
5309 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
5310 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
5311 (aarch64_linux_read_description): Likewise.
5312 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
5313
5314 2019-03-12 John Baldwin <jhb@FreeBSD.org>
5315
5316 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
5317 i386_create_target_description for 'segments' parameter.
5318 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
5319 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
5320 * win32-i386-low.c (i386_arch_setup): Likewise.
5321
5322 2019-03-12 Tom Tromey <tromey@adacore.com>
5323
5324 * linux-low.c (iterate_over_lwps): Update.
5325
5326 2019-03-06 Tom Tromey <tom@tromey.com>
5327
5328 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
5329 (captured_main): Use SCOPE_EXIT.
5330
5331 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
5332
5333 * configure.srv: Use '$enable_unittest' instead of '$development'
5334 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
5335 case.
5336
5337 2019-02-27 Tom Tromey <tromey@adacore.com>
5338
5339 * gdbreplay.c (logchar): Handle \r\n.
5340
5341 2019-02-07 Alan Hayward <alan.hayward@arm.com>
5342
5343 * linux-low.c (linux_attach): Add process before lwp.
5344 * server.c (attach_inferior): Check if already attached.
5345
5346 2019-02-07 Tom Tromey <tom@tromey.com>
5347
5348 * x86-tdesc.h: Rename include guard.
5349 * x86-low.h: Add include guard.
5350 * wincecompat.h: Rename include guard.
5351 * win32-low.h: Add include guard.
5352 * utils.h: Rename include guard.
5353 * tracepoint.h: Rename include guard.
5354 * tdesc.h: Rename include guard.
5355 * target.h: Rename include guard.
5356 * server.h: Rename include guard.
5357 * remote-utils.h: Rename include guard.
5358 * regcache.h: Rename include guard.
5359 * nto-low.h: Rename include guard.
5360 * notif.h: Add include guard.
5361 * mem-break.h: Rename include guard.
5362 * lynx-low.h: Add include guard.
5363 * linux-x86-tdesc.h: Add include guard.
5364 * linux-s390-tdesc.h: Add include guard.
5365 * linux-ppc-tdesc-init.h: Add include guard.
5366 * linux-low.h: Add include guard.
5367 * linux-aarch64-tdesc.h: Add include guard.
5368 * linux-aarch32-low.h: Add include guard.
5369 * inferiors.h: Rename include guard.
5370 * i387-fp.h: Rename include guard.
5371 * hostio.h: Rename include guard.
5372 * gdbthread.h: Rename include guard.
5373 * gdb_proc_service.h: Rename include guard.
5374 * event-loop.h: Rename include guard.
5375 * dll.h: Rename include guard.
5376 * debug.h: Rename include guard.
5377 * ax.h: Rename include guard.
5378
5379 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
5380
5381 PR gdb/23985
5382 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
5383 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
5384
5385 2019-01-25 Tom Tromey <tom@tromey.com>
5386
5387 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
5388
5389 2019-01-25 Tom Tromey <tom@tromey.com>
5390
5391 * win32-low.c: Fix common/ includes.
5392 * win32-i386-low.c: Fix common/ includes.
5393 * tracepoint.c: Fix common/ includes.
5394 * thread-db.c: Fix common/ includes.
5395 * target.h: Fix common/ includes.
5396 * symbol.c: Fix common/ includes.
5397 * spu-low.c: Fix common/ includes.
5398 * server.h: Fix common/ includes.
5399 * server.c: Fix common/ includes.
5400 * remote-utils.c: Fix common/ includes.
5401 * regcache.h: Fix common/ includes.
5402 * regcache.c: Fix common/ includes.
5403 * nto-x86-low.c: Fix common/ includes.
5404 * notif.h: Fix common/ includes.
5405 * mem-break.h: Fix common/ includes.
5406 * lynx-low.c: Fix common/ includes.
5407 * lynx-i386-low.c: Fix common/ includes.
5408 * linux-x86-tdesc-selftest.c: Fix common/ includes.
5409 * linux-x86-low.c: Fix common/ includes.
5410 * linux-low.c: Fix common/ includes.
5411 * inferiors.h: Fix common/ includes.
5412 * i387-fp.c: Fix common/ includes.
5413 * hostio.c: Fix common/ includes.
5414 * hostio-errno.c: Fix common/ includes.
5415 * gdbthread.h: Fix common/ includes.
5416 * gdbreplay.c: Fix common/ includes.
5417 * fork-child.c: Fix common/ includes.
5418 * event-loop.c: Fix common/ includes.
5419 * ax.c:
5420 (enum gdb_agent_op): Fix common/ includes.
5421
5422 2019-01-21 Tom Tromey <tom@tromey.com>
5423
5424 * tracepoint.c: Fix includes.
5425 * remote-utils.c: Fix includes.
5426 * linux-x86-low.c: Fix includes.
5427
5428 2019-01-01 Joel Brobecker <brobecker@adacore.com>
5429
5430 * gdbreplay.c (gdbreplay_version): Update copyright year in
5431 version message.
5432 * server.c (gdbserver_version): Likewise.
5433
5434 2018-12-05 Alan Hayward <alan.hayward@arm.com>
5435
5436 * linux-low.c (add_lwp): Switch ordering.
5437
5438 2018-11-29 Tom Tromey <tom@tromey.com>
5439
5440 * win32-low.c (win32_join): Take pid, not process.
5441 * target.h (struct target_ops) <join>: Change argument type.
5442 (join_inferior): Change argument name.
5443 * spu-low.c (spu_join): Take pid, not process.
5444 * server.c (handle_detach): Preserve pid before destroying
5445 process.
5446 * lynx-low.c (lynx_join): Take pid, not process.
5447 * linux-low.c (linux_join): Take pid, not process.
5448
5449 2018-11-23 Alan Hayward <alan.hayward@arm.com>
5450
5451 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
5452 (aarch64_cannot_fetch_register): Likewise.
5453 (struct linux_target_ops): Update references.
5454
5455 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5456
5457 * linux-ppc-low.c: Include nat/linux-ptrace.h.
5458
5459 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5460
5461 * configure.srv (ipa_ppc_linux_regobj): Add
5462 powerpc-isa207-htm-vsx32l-ipa.o and
5463 powerpc-isa207-htm-vsx64l-ipa.o.
5464 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
5465 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
5466 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
5467 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
5468 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
5469 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
5470 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
5471 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
5472 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5473 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
5474 (init_registers_powerpc_isa207_htm_vsx32l)
5475 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
5476 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
5477 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
5478 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
5479 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
5480 (ppc_store_tm_ctarregset): New functions.
5481 (ppc_regsets): Add entries for HTM regsets.
5482 (ppc_arch_setup): Set htm in features struct when needed. Set
5483 sizes for the HTM regsets.
5484 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
5485 (initialize_low_arch): Call
5486 init_registers_powerpc_isa207_htm_vsx32l and
5487 init_registers_powerpc_isa207_htm_vsx64l.
5488 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5489 PPC_TDESC_ISA207_HTM_VSX.
5490 (initialize_low_tracepoint): Call
5491 init_registers_powerpc_isa207_htm_vsx32l and
5492 init_registers_powerpc_isa207_htm_vsx64l.
5493
5494 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5495
5496 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
5497 rs6000/power-linux-pmu.xml to srv_xmlfiles.
5498 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
5499 (ppc_store_pmuregset): New functions.
5500 (ppc_regsets): Add entries for ebb and pmu regsets.
5501 (ppc_arch_setup): Set isa207 in features struct if the ebb and
5502 pmu regsets are available. Set sizes for these regsets.
5503
5504 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5505
5506 * configure.srv (ipa_ppc_linux_regobj): Add
5507 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
5508 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
5509 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
5510 rs6000/powerpc-isa207-vsx32l.xml, and
5511 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
5512 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5513 <PPC_TDESC_ISA207_VSX>: New enum value.
5514 (init_registers_powerpc_isa207_vsx32l): Declare.
5515 (init_registers_powerpc_isa207_vsx64l): Declare.
5516 * linux-ppc-low.c (ppc_fill_tarregset): New function.
5517 (ppc_store_tarregset): New function.
5518 (ppc_regsets): Add entry for the TAR regset.
5519 (ppc_arch_setup): Set isa207 in features struct when needed. Set
5520 size for the TAR regsets.
5521 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
5522 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
5523 and init_registers_powerpc_isa207_vsx64l.
5524 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
5525 (initialize_low_tracepoint): Call
5526 init_registers_powerpc_isa207_vsx32l and
5527 init_registers_powerpc_isa207_vsx64l.
5528
5529 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5530 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5531
5532 * configure.srv (ipa_ppc_linux_regobj): Add
5533 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
5534 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
5535 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
5536 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
5537 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
5538 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
5539 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
5540 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
5541 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
5542 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
5543 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
5544 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
5545 (ppc_hwcap): Add comment.
5546 (ppc_hwcap2): New global.
5547 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
5548 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
5549 (ppc_regsets): Add entries for the DSCR and PPR regsets.
5550 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
5551 when needed. Set sizes for the the DSCR and PPR regsets.
5552 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
5553 (initialize_low_arch): Call
5554 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5555 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5556 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
5557 PPC_TDESC_ISA205_PPR_DSCR_VSX.
5558 (initialize_low_tracepoint): Call
5559 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
5560 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
5561
5562 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
5563
5564 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
5565
5566 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
5567 Simon Marchi <simark@simark.ca>
5568
5569 * acinclude.m4: Include "../selftest.m4".
5570 * configure: Regenerate.
5571 * configure.ac: Use "GDB_AC_SELFTEST".
5572 * configure.srv: Use "$enable_unittests" instead of
5573 "$development" when checking whether unit tests have been
5574 enabled.
5575 * server.c (captured_main): Update message informing that
5576 selftests have been disabled.
5577
5578 2018-10-04 Tom Tromey <tom@tromey.com>
5579
5580 * configure: Rebuild.
5581
5582 2018-10-04 Tom Tromey <tom@tromey.com>
5583
5584 * server.c (handle_status): Rename inner "thread".
5585 (process_serial_event): Declare "res" in 'm' case.
5586 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
5587 (iterate_over_lwps): Rename inner "thread".
5588 (linux_qxfer_libraries_svr4): Rename inner "len".
5589 * gdbthread.h (find_thread_in_random): Rename inner "thread".
5590
5591 2018-10-01 Gary Benson <gbenson@redhat.com>
5592
5593 * gdb_proc_service.h: Moved common code to
5594 common/gdb_proc_service.h.
5595
5596 2018-10-01 Gary Benson <gbenson@redhat.com>
5597
5598 * gdb_proc_service.h: Synchronize comments and whitespace with
5599 GDB's version of this file.
5600
5601 2018-09-25 Tom Tromey <tom@tromey.com>
5602
5603 * configure: Rebuild.
5604 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
5605
5606 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5607
5608 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
5609 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
5610 ($(IPA_LIB)): Sort IPA_OBJS.
5611
5612 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
5613
5614 * Makefile.in: Remove references to $(ADD_DEPS).
5615
5616 2018-09-16 Tom Tromey <tom@tromey.com>
5617
5618 * remote-utils.c (remote_open): Use GNU style for metasyntactic
5619 variables.
5620 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
5621 variables.
5622
5623 2018-09-05 Tom Tromey <tom@tromey.com>
5624
5625 * configure: Rebuild.
5626
5627 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
5628
5629 PR build/23399
5630 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
5631
5632 2018-08-27 Tom Tromey <tom@tromey.com>
5633
5634 PR build/23087:
5635 * configure: Rebuild.
5636
5637 2018-08-27 Tom Tromey <tom@tromey.com>
5638
5639 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
5640 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
5641 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
5642 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
5643 (s390x_emit_stack_adjust): Add casts to unsigned char.
5644
5645 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
5646
5647 PR gdb/23374
5648 PR gdb/23375
5649 * server.h (struct client_state) <disable_randomization>:
5650 Initialize to 1.
5651
5652 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
5653
5654 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
5655 variable.
5656 (mips_supply_ptrace_register): Likewise.
5657
5658 2018-07-22 Tom Tromey <tom@tromey.com>
5659
5660 * configure: Rebuild.
5661
5662 2018-07-22 Tom Tromey <tom@tromey.com>
5663
5664 * win32-low.c (win32_create_inferior): Remove unused variables.
5665 * gdbreplay.c (remote_open): Remove unused variable.
5666 * remote-utils.c (remote_prepare): Remove unused variable.
5667 * x86-tdesc.h (X86_TDESC_H): Define.
5668 (amd64_expedite_regs): Define conditionally.
5669 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
5670 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
5671 * remote-utils.c (readchar): Remove unused variable.
5672
5673 2018-07-13 Pedro Alves <palves@redhat.com>
5674
5675 * linux-low.c (linux_kill): Change parameter to process_info
5676 pointer instead of pid. Adjust.
5677 * lynx-low.c (lynx_kill): Likewise.
5678 * nto-low.c (nto_kill): Likewise.
5679 * spu-low.c (spu_kill): Likewise.
5680 * win32-low.c (win32_kill): Likewise.
5681 * server.c (handle_v_kill, kill_inferior_callback)
5682 (detach_or_kill_for_exit): Adjust.
5683 * target.c (kill_inferior): Change parameter to process_info
5684 pointer instead of pid. Adjust.
5685 * target.h (struct target_ops) <kill>: Change parameter to
5686 process_info pointer instead of pid. Adjust all implementations
5687 and callers.
5688 (kill_inferior): Likewise.
5689
5690 2018-07-13 Pedro Alves <palves@redhat.com>
5691
5692 * linux-low.c (linux_detach, linux_join): Change parameter to
5693 process_info pointer instead of pid. Adjust.
5694 * lynx-low.c (lynx_detach, lynx_join): Likewise.
5695 * nto-low.c (nto_detach): Likewise.
5696 * spu-low.c (spu_detach, spu_join): Likewise.
5697 * win32-low.c (win32_detach, win32_join): Likewise.
5698 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
5699 * target.h (struct target_ops) <detach, join>: Change parameter to
5700 process_info pointer instead of pid. Adjust all implementations
5701 and callers.
5702 (detach_inferior, join_inferior): Rename 'pid' parameter to
5703 'proc'.
5704
5705 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
5706 Jan Kratochvil <jan.kratochvil@redhat.com>
5707 Paul Fertser <fercerpav@gmail.com>
5708 Tsutomu Seki <sekiriki@gmail.com>
5709
5710 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
5711 (OBS): Add 'common/netstuff.o'.
5712 (GDBREPLAY_OBS): Likewise.
5713 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
5714 (remote_open): Implement support for IPv6
5715 connections.
5716 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
5717 and 'wspiapi.h'.
5718 (handle_accept_event): Accept connections from IPv6 sources.
5719 (remote_prepare): Handle IPv6-style hostnames; implement
5720 support for IPv6 connections.
5721 (remote_open): Implement support for printing connections from
5722 IPv6 sources.
5723
5724 2018-07-11 Pedro Alves <palves@redhat.com>
5725
5726 PR gdb/23377
5727 * mem-break.c (any_persistent_commands): Add process_info
5728 parameter and use it instead of relying on the current process.
5729 Change return type to bool.
5730 * mem-break.h (any_persistent_commands): Add process_info
5731 parameter and change return type to bool.
5732 * server.c (handle_detach): Remove require_running_or_return call.
5733 Look up the process_info for the process we're about to detach.
5734 If not found, return back error to GDB. Adjust
5735 any_persistent_commands call to pass down a process pointer.
5736
5737 2018-07-11 Pedro Alves <palves@redhat.com>
5738
5739 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
5740 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
5741 instead of collect_register_by_name.
5742 * regcache.c (regcache_raw_get_unsigned_by_name): New.
5743 * regcache.h (regcache_raw_get_unsigned_by_name): New.
5744
5745 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
5746 Pedro Alves <palves@redhat.com>
5747
5748 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
5749
5750 2018-07-03 Tom Tromey <tom@tromey.com>
5751
5752 * linux-low.c: Update.
5753 * lynx-low.c: Update.
5754 * mem-break.c: Update.
5755 * nto-low.c: Update.
5756 * remote-utils.c: Update.
5757 * server.c: Update.
5758 * spu-low.c: Update.
5759 * target.c: Update.
5760 * win32-low.c: Update.
5761
5762 2018-07-03 Tom Tromey <tom@tromey.com>
5763
5764 * server.c: Update.
5765
5766 2018-07-03 Tom Tromey <tom@tromey.com>
5767
5768 * linux-low.c: Update.
5769
5770 2018-07-03 Tom Tromey <tom@tromey.com>
5771
5772 * target.c: Update.
5773
5774 2018-07-03 Tom Tromey <tom@tromey.com>
5775
5776 * linux-low.c: Update.
5777 * linux-mips-low.c: Update.
5778 * lynx-low.c: Update.
5779 * nto-low.c: Update.
5780 * remote-utils.c: Update.
5781 * server.c: Update.
5782 * spu-low.c: Update.
5783 * target.c: Update.
5784 * thread-db.c: Update.
5785
5786 2018-07-03 Tom Tromey <tom@tromey.com>
5787
5788 * linux-low.c: Update.
5789 * linux-mips-low.c: Update.
5790 * lynx-low.c: Update.
5791 * mem-break.c: Update.
5792 * nto-low.c: Update.
5793 * remote-utils.c: Update.
5794 * server.c: Update.
5795 * spu-low.c: Update.
5796 * target.c: Update.
5797 * tracepoint.c: Update.
5798
5799 2018-07-03 Tom Tromey <tom@tromey.com>
5800
5801 * linux-low.c: Update.
5802 * linux-ppc-low.c: Update.
5803 * linux-x86-low.c: Update.
5804 * proc-service.c: Update.
5805 * server.c: Update.
5806 * spu-low.c: Update.
5807 * thread-db.c: Update.
5808 * win32-low.c: Update.
5809
5810 2018-07-03 Tom Tromey <tom@tromey.com>
5811
5812 * linux-low.c: Update.
5813 * lynx-low.c: Update.
5814 * nto-low.c: Update.
5815 * remote-utils.c: Update.
5816 * spu-low.c: Update.
5817 * thread-db.c: Update.
5818 * win32-low.c: Update.
5819
5820 2018-06-29 Joel Brobecker <brobecker@adacore.com>
5821
5822 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
5823 parameter in call to 'amd64_create_target_description'.
5824
5825 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5826
5827 * x86-tdesc.h: Remove executable permission flag.
5828
5829 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
5830
5831 * configure.ac: Remove AC_PREREQ, add missing quoting.
5832 * configure: Re-generate.
5833 * config.in: Re-generate.
5834 * aclocal.m4: Re-generate.
5835
5836 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
5837
5838 * tracepoint.h (current_traceframe): Remove declaration.
5839
5840 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5841
5842 * linux-aarch64-low.c (is_sve_tdesc): New function.
5843 (aarch64_sve_regs_copy_to_regcache): Likewise.
5844 (aarch64_sve_regs_copy_from_regcache): Likewise.
5845 (aarch64_regs_info): Add SVE checks.
5846 (initialize_low_arch): Initialize SVE.
5847
5848 2018-06-18 Alan Hayward <alan.hayward@arm.com>
5849
5850 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
5851
5852 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5853
5854 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
5855 (initialize_low_tracepoint): Likewise
5856 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
5857 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
5858 param.
5859 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
5860 checks.
5861 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
5862
5863 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5864
5865 * server.h (PBUFSIZ): Increase size
5866
5867 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5868
5869 * regcache.c (regcache::raw_compare): New function.
5870 * regcache.h (regcache::raw_compare): New declaration.
5871
5872 2018-06-11 Alan Hayward <alan.hayward@arm.com>
5873
5874 * regcache.c (new_register_cache): Use new.
5875 (free_register_cache): Use delete.
5876 (register_data): Use const.
5877 (supply_register): Move body inside regcache.
5878 (regcache::raw_supply): New override function.
5879 (collect_register): Move body inside regcache.
5880 (regcache::raw_collect): New override function.
5881 (regcache::get_register_status): New override function.
5882 * regcache.h (struct regcache): Inherit from reg_buffer_common.
5883
5884 2018-06-09 Tom Tromey <tom@tromey.com>
5885
5886 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
5887 declare queue.
5888 (event_queue): Use std::queue.
5889 (gdb_event_xfree): Remove.
5890 (initialize_event_loop, process_event, wait_for_event): Update.
5891
5892 2018-06-08 Stan Cox <scox@redhat.com>
5893
5894 * win32-low.c (win32_create_inferior): last_ptid and last_status
5895 moved to client_state.
5896
5897 2018-06-08 Pedro Alves <palves@redhat.com>
5898
5899 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
5900 common/common-exceptions.o, common/common-utils.o,
5901 common/errors.o, common/print-utils.o and utils.o.
5902 * gdbreplay.c: Include "common-defs.h" instead of the two
5903 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
5904 string.h or alloca.h.
5905 (perror_with_name): Delete.
5906 (remote_open): Use xstrdup instead of strdup.
5907 (main): Rename to ...
5908 (captured_main): ... this.
5909 (main): New.
5910
5911 2018-06-08 Tom Tromey <tom@tromey.com>
5912
5913 * linux-low.c (linux_low_read_btrace): Update.
5914
5915 2018-06-04 Stan Cox <scox@redhat.com>
5916
5917 * server.h (struct client_state): New.
5918 * server.c (cont_thread, general_thread, multi_process)
5919 (report_fork_events, report_vfork_events, report_exec_events)
5920 (report_thread_events, swbreak_feature, hwbreak_feature)
5921 (vCont_supported, disable_randomization, pass_signals)
5922 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
5923 Moved to client_state.
5924 * remote-utils.c (remote_debug, noack_mode)
5925 (transport_is_reliable): Moved to client_state.
5926 * tracepoint.c (current_traceframe): Moved to client_state.
5927
5928 Update all callers.
5929 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
5930 linux-low.c, remote-utils.h, target.c: Use client_state.
5931
5932 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5933
5934 * configure.srv: Add new c/h file.
5935
5936 2018-05-31 Alan Hayward <alan.hayward@arm.com>
5937
5938 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
5939 null VQ.
5940
5941 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5942
5943 * gdb.arch/mips-fpregset-core.exp: New test.
5944 * gdb.arch/mips-fpregset-core.c: New test source.
5945
5946 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
5947
5948 PR server/23198
5949 * hostio.c (require_int): Do not report overflow for integers
5950 between 0xfffffff and 0x7fffffff.
5951
5952 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5953
5954 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
5955 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
5956 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
5957 functions.
5958 (the_low_target): Wire them.
5959
5960 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5961
5962 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
5963 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
5964 mode. Call collect_register_by_name with vscr using
5965 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
5966 (ppc_store_vrregset): Add and set vscr_offset variable as in
5967 ppc_fill_vrregset. Call supply_register_by_name with vscr using
5968 vscr_offset.
5969
5970 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5971
5972 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5973 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
5974 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
5975
5976 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5977
5978 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
5979 (ppc_store_vsxregset): Likewise.
5980 (ppc_fill_vrregset): Likewise.
5981 (ppc_store_vrregset): Likewise.
5982 (ppc_fill_evrregset): Likewise.
5983 (ppc_store_evrregset): Likewise.
5984 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
5985 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
5986 needed.
5987
5988 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5989
5990 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
5991 wordsize of the inferior. Call ppc_linux_target_wordsize.
5992
5993 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5994
5995 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
5996 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
5997 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
5998 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5999 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
6000 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
6001 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
6002 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
6003 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
6004 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
6005 (tdesc_powerpc_e500l): Remove.
6006 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
6007 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
6008 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
6009 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
6010 linux-ppc-tdesc.h.
6011 (ppc_arch_setup): Remove target description matching code. Fill a
6012 ppc_linux_features struct and call ppc_linux_match_description
6013 with it.
6014
6015 2018-05-22 Maciej W. Rozycki <macro@mips.com>
6016
6017 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
6018 width of the requested register exceeds the width of the
6019 `ptrace' data type.
6020 (mips_cannot_store_register): Likewise.
6021
6022 2018-05-21 Maciej W. Rozycki <macro@mips.com>
6023
6024 * linux-mips-low.c (mips_fetch_register): New function. Update
6025 preceding comment.
6026 (mips_store_gregset): Supply 0 rather than $restart for $zero.
6027 (the_low_target): Wire `mips_fetch_register'.
6028
6029 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6030
6031 * lynx-i386-low.c (LYNXOS_178): New macro.
6032 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
6033 the layout on LynxOS-178.
6034 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
6035 handle floating point registers that are not supported by
6036 LynxOS-178.
6037
6038 2018-05-10 Tom Tromey <tom@tromey.com>
6039
6040 * configure: Rebuild.
6041
6042 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6043
6044 PR server/23158:
6045 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
6046 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
6047 Use it to set the expedite_regs field in the given tdesc.
6048 * x86-tdesc.h: New file.
6049 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
6050 Adjust following the addition of the new expedite_regs parameter
6051 to init_target_desc.
6052 * linux-tic6x-low.c (tic6x_read_description): Likewise.
6053 * linux-x86-tdesc.c: #include "x86-tdesc.h".
6054 (i386_linux_read_description, amd64_linux_read_description):
6055 Adjust following the addition of the new expedite_regs parameter
6056 to init_target_desc.
6057 * lynx-i386-low.c: #include "x86-tdesc.h".
6058 (lynx_i386_arch_setup): Adjust following the addition of the new
6059 expedite_regs parameter to init_target_desc.
6060 * nto-x86-low.c: #include "x86-tdesc.h".
6061 (nto_x86_arch_setup): Adjust following the addition of the new
6062 expedite_regs parameter to init_target_desc.
6063 * win32-i386-low.c: #include "x86-tdesc.h".
6064 (i386_arch_setup): Adjust following the addition of the new
6065 expedite_regs parameter to init_target_desc.
6066
6067 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6068
6069 PR server/23158:
6070 * win32-low.c (win32_create_inferior): Add call to my_wait
6071 setting last_status global.
6072
6073 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6074
6075 PR server/23158:
6076 * win32-low.c (create_process): Only call gdb_tilde_expand if
6077 inferior_cwd is not NULL.
6078
6079 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
6080
6081 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
6082 registers to the cache if their values have changed.
6083 (i387_xsave_to_cache): Provide default values for x87 control
6084 registers when these features are available, but disabled.
6085 * regcache.c (supply_register_by_name_zeroed): New function.
6086 * regcache.h (supply_register_by_name_zeroed): Declare new
6087 function.
6088
6089 2018-05-07 Tom Tromey <tom@tromey.com>
6090
6091 * configure: Rebuild.
6092
6093 2018-05-04 Tom Tromey <tom@tromey.com>
6094
6095 * configure: Rebuild.
6096
6097 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
6098 Pedro Alves <palves@redhat.com>
6099
6100 * linux-aarch64-low.c (aarch64_stopped_data_address):
6101 Likewise.
6102
6103 2018-04-27 Tom Tromey <tom@tromey.com>
6104
6105 * configure: Rebuild.
6106
6107 2018-04-23 Tom Tromey <tom@tromey.com>
6108
6109 * configure: Rebuild.
6110
6111 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
6112
6113 * Makefile.in (depcomp): Add "..".
6114 (all_deps_files): New and use it.
6115
6116 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6117
6118 * configure.srv (aarch64*-*-linux*): Don't include xml.
6119 (i[34567]86-*-cygwin*): Likewise.
6120 (i[34567]86-*-linux*): Likewise.
6121 (i[34567]86-*-lynxos*): Likewise.
6122 (i[34567]86-*-mingw32ce*): Likewise.
6123 (i[34567]86-*-mingw*): Likewise.
6124 (i[34567]86-*-nto*): Likewise.
6125 (tic6x-*-uclinux): Likewise.
6126 (x86_64-*-linux*): Likewise.
6127 (x86_64-*-mingw*): Likewise.
6128 (x86_64-*-cygwin*): Likewise.
6129
6130 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6131
6132 * tdesc.c: Remove xml parameter.
6133
6134 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6135
6136 * server.c (get_features_xml): Remove cast.
6137 * tdesc.c (void target_desc::accept): Fill in function.
6138 (tdesc_get_features_xml): Remove old xml creation.
6139 (print_xml_feature::visit_pre): Add xml vistor.
6140 * tdesc.h (struct target_desc): Make xmltarget mutable.
6141 (tdesc_get_features_xml): Remove declaration.
6142
6143 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6144
6145 * tdesc.c (tdesc_architecture_name): Add new function.
6146 (tdesc_osabi_name): Likewise.
6147 (tdesc_get_features_xml): Use new functions.
6148
6149 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6150
6151 * tdesc.c (tdesc_create_flags): Remove.
6152 (tdesc_add_flag): Likewise.
6153 (tdesc_named_type): Likewise.
6154 (tdesc_create_union): Likewise.
6155 (tdesc_create_struct): Likewise.
6156 (tdesc_create_vector): Likewise.
6157 (tdesc_add_bitfield): Likewise.
6158 (tdesc_add_field): Likewise.
6159 (tdesc_set_struct_size): Likewise.
6160
6161 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6162
6163 * tdesc.c (~target_desc): Remove implictly deleted items.
6164 (init_target_desc): Iterate all features.
6165 (tdesc_get_features_xml): Use vector.
6166 (tdesc_create_feature): Create feature.
6167 * tdesc.h (tdesc_feature) Remove
6168 (target_desc): Add features.
6169
6170 2018-04-18 Alan Hayward <alan.hayward@arm.com>
6171
6172 * Makefile.in: Add common/tdesc.c
6173 * tdesc.c (init_target_desc): init all reg_defs from register
6174 vector.
6175 (tdesc_create_reg): Create tdesc_reg.
6176 * tdesc.h (tdesc_feature): Add register vector.
6177
6178 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6179
6180 * tdesc.h (struct target_desc) <features>: Change type to
6181 std::vector<std::string>.
6182 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
6183 changes.
6184 (tdesc_get_features_xml): Likewise.
6185 (tdesc_create_feature): Likewise.
6186
6187 2018-03-26 Alan Hayward <alan.hayward@arm.com>
6188
6189 * regcache.c (find_register_by_number): Return a ref.
6190 (find_regno): Use references.
6191 (register_size): Likewise.
6192 (register_data): Likewise.
6193 * tdesc.c (target_desc::~target_desc): Remove free calls.
6194 (target_desc::operator==): Use std::vector compare.
6195 (init_target_desc): Use reference.
6196 (tdesc_create_reg): Use reg constructors.
6197 * tdesc.h (struct target_desc): Replace pointer with object.
6198
6199 2018-03-23 Alan Hayward <alan.hayward@arm.com>
6200
6201 * regcache.c (find_register_by_number): Make static.
6202 (find_regno): Use find_register_by_number
6203 * regcache.h (struct reg): Remove declaration.
6204
6205 2018-03-23 Alan Hayward <alan.hayward@arm.com>
6206
6207 * tdesc.c (target_desc::~target_desc): Move to here.
6208 (target_desc::operator==): Likewise.
6209 * tdesc.h (target_desc::~target_desc): Move from here.
6210 (target_desc::operator==): Likewise.
6211
6212 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
6213
6214 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
6215
6216 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6217
6218 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
6219 S390_TDESC_GS.
6220 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
6221 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
6222 and init_registers_s390_gs_linux64.
6223
6224 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6225
6226 * linux-s390-low.c (s390_fill_gs): Remove function.
6227 (s390_fill_gsbc): Remove function.
6228 (s390_regsets): Set fill functions for the guarded storage regsets
6229 to NULL.
6230
6231 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
6232
6233 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
6234 the word size. Add comment.
6235 (s390_get_wordsize): New function.
6236 (s390_arch_setup): No longer select a temporary tdesc to fetch the
6237 pswm with it. Instead, use s390_get_wordsize to determine the
6238 word size first and derive the correct tdesc from that directly.
6239
6240 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
6241
6242 * Makefile.in: Include silent-rules.mk.
6243 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
6244 (COMPILE): Add ECHO_CXX.
6245 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
6246 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
6247 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
6248 (version-generated.c): Add ECHO_GEN.
6249 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
6250 (IPAGENT_COMPILE): Add ECHO_CXX.
6251 (%-generated.c): Add ECHO_REGDAT.
6252
6253 2018-03-14 Tom Tromey <tom@tromey.com>
6254
6255 PR cli/14977:
6256 * ax.c (ax_printf): Special case for NULL.
6257
6258 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6259
6260 * linux-low.c (linux_qxfer_libraries_svr4): Use
6261 xml_escape_text_append.
6262
6263 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
6264
6265 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
6266
6267 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6268
6269 * server.c (handle_general_set): Remove unnecessary xstrdup.
6270
6271 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
6272
6273 * server.c (parse_debug_format_options): Adjust to
6274 delim_string_to_char_ptr_vec changes.
6275 * thread-db.c (thread_db_load_search): Adjust to
6276 dirnames_to_char_ptr_vec changes.
6277
6278 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
6279
6280 * target.h (target_enable_btrace, target_disable_btrace)
6281 (target_read_btrace, target_read_btrace_conf): Turn macro into
6282 inline function. Throw error if target method is not defined.
6283 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
6284 check for btrace target method. Be prepared to handle exceptions
6285 from btrace target methods.
6286
6287 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6288
6289 * server.c (captured_main): Change order of error message printed
6290 when the current working directory cannot be found.
6291
6292 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6293
6294 * server.c: Include "filenames.h" and "pathstuff.h".
6295 (program_name): Delete variable.
6296 (program_path): New anonymous class.
6297 (get_exec_wrapper): Use "program_path" instead of
6298 "program_name".
6299 (handle_v_run): Likewise.
6300 (captured_main): Likewise.
6301 (process_serial_event): Likewise.
6302
6303 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
6304
6305 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
6306 (OBJS): Add "pathstuff.o".
6307 * server.c (current_directory): New global variable.
6308 (captured_main): Initialize "current_directory".
6309
6310 2018-02-26 Alan Hayward <alan.hayward@arm.com>
6311
6312 * tdesc.c: Use common/tdesc.h.
6313 * tdesc.h: Likewise.
6314
6315 2018-02-20 Alan Hayward <alan.hayward@arm.com>
6316 Simon Marchi <simon.marchi@ericsson.com>
6317
6318 * Makefile.in: Switch order of make rules.
6319
6320 2018-02-19 Alan Hayward <alan.hayward@arm.com>
6321
6322 * Makefile.in: Add common directory in build.
6323 * configure.ac: Add common reference.
6324 * configure: Regenerate.
6325
6326 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6327
6328 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
6329 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
6330 * spu-low.c (spu_target_ops): Likewise.
6331 * win32-low.c (win32_target_ops): Likewise.
6332 * server.c (supported_btrace_packets): Report packets unconditionally.
6333 * target.h (target_ops) <supports_btrace>: Remove.
6334 (target_supports_btrace): Remove.
6335
6336 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
6337
6338 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
6339 (handle_btrace_disable): Change return type to void. Use exceptions
6340 to report errors.
6341 (handle_btrace_general_set): Catch exception and copy message to
6342 return message.
6343
6344 2018-02-08 Tom Tromey <tom@tromey.com>
6345
6346 * linux-low.c (install_software_single_step_breakpoints): Use
6347 make_scoped_restore.
6348 * inferiors.c (make_cleanup_restore_current_thread): Remove.
6349 (do_restore_current_thread_cleanup): Remove.
6350 * gdbthread.h (make_cleanup_restore_current_thread): Don't
6351 declare.
6352
6353 2018-02-08 Tom Tromey <tom@tromey.com>
6354
6355 * mem-break.c (set_raw_breakpoint_at): Use
6356 gdb::unique_xmalloc_ptr.
6357
6358 2018-01-30 Pedro Alves <palves@redhat.com>
6359
6360 PR gdb/13211
6361 * target.c (target_terminal::terminal_state): Rename to ...
6362 (target_terminal::m_terminal_state): ... this.
6363
6364 2018-01-19 James Clarke <jrtc27@jrtc27.com>
6365
6366 * linux-low.c (handle_extended_wait): Surround call to
6367 thread_db_notice_clone with #ifdef USE_THREAD_DB.
6368
6369 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
6370
6371 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
6372 linux_ptrace_attach_fail_reason_string now returning an
6373 std::string.
6374 (linux_attach): Likewise.
6375 * thread-db.c (attach_thread): Likewise.
6376
6377 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
6378
6379 PR gdb/21559
6380 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
6381 checking for fs_base/gs_base fields in struct user_regs_struct.
6382 * configure: Regenerate.
6383
6384 2018-01-16 Yao Qi <yao.qi@linaro.org>
6385
6386 PR gdb/18749
6387 * linux-low.c (fetch_register): Call supply_register instead of
6388 error.
6389
6390 2018-01-08 Yao Qi <yao.qi@linaro.org>
6391 Simon Marchi <simon.marchi@ericsson.com>
6392
6393 * Makefile.in (OBS): Remove selftest.o.
6394 * configure.ac: Set srv_selftest_objs if $development is true.
6395 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
6396 * configure: Re-generated.
6397 * server.c (captured_main): Wrap variable selftest_filter with
6398 GDB_SELF_TEST.
6399
6400 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
6401
6402 * server.c (parse_debug_format_options): Return std::string.
6403 (handle_monitor_command, captured_main): Adjust.
6404
6405 2018-01-05 Pedro Alves <palves@redhat.com>
6406
6407 PR gdb/18653
6408 * server.c (captured_main): Pass quiet=false to
6409 save_original_signals_state.
6410
6411 2018-01-01 Joel Brobecker <brobecker@adacore.com>
6412
6413 * gdbreplay.c (gdbreplay_version): Update copyright year in
6414 version message.
6415 * server.c (gdbserver_version): Likewise.
6416
6417 2017-12-08 Tom Tromey <tom@tromey.com>
6418
6419 * ax.c (ax_printf): Update.
6420
6421 2017-12-07 Yao Qi <yao.qi@linaro.org>
6422
6423 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
6424 aarch64_linux_read_description.
6425 * linux-amd64-ipa.c (idx2mask): New array.
6426 (get_ipa_tdesc): Move idx2mask out.
6427 (initialize_low_tracepoint): Initialize target descriptions.
6428 * linux-i386-ipa.c (idx2mask): New array.
6429 (get_ipa_tdesc): Move idx2mask out.
6430 (initialize_low_tracepoint): Initialize target descriptions.
6431
6432 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
6433
6434 * tdesc.c (struct tdesc_type): Change return type.
6435 (tdesc_add_flag): Change parameter type.
6436 (tdesc_add_bitfield): Likewise.
6437 (tdesc_add_field): Likewise.
6438 (tdesc_set_struct_size): Likewise.
6439
6440 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
6441
6442 * regcache.c (registers_to_string): Remove unused variable.
6443
6444 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6445
6446 * inferiors.c (for_each_inferior_with_data): Remove.
6447 * inferiors.h (for_each_inferior_with_data): Remove.
6448 * server.c (handle_qxfer_threads_worker): Change parameter type.
6449 (handle_qxfer_threads_proper): Use for_each_thread.
6450
6451 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6452
6453 * inferiors.c (for_each_inferior): Remove.
6454 (clear_inferiors): Use for_each_thread.
6455 * inferiors.h (for_each_inferior): Remove.
6456 * linux-low.c (linux_wait_for_event_filtered): Use
6457 for_each_thread.
6458 (linux_stabilize_threads): Likewise.
6459 * regcache.c (regcache_release): Likewise.
6460 * server.c (gdb_wants_all_threads_stopped): Likewise.
6461 (clear_pending_status_callback): Remove.
6462 (handle_status): Use for_each_thread.
6463 (captured_main): Likewise.
6464 * win32-low.c (child_init_thread_list): Likewise.
6465 (win32_clear_inferiors): Likewise.
6466 (fake_breakpoint_event): Likewise.
6467
6468 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6469
6470 * inferiors.h (find_inferior): Remove.
6471 * inferiors.c (find_inferior): Remove.
6472
6473 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6474
6475 * linux-low.c (resume_status_pending_p): Update comment.
6476 (need_step_over_p): Update comment.
6477
6478 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6479
6480 * linux-low.c (proceed_one_lwp): Return void, change parameter
6481 type.
6482 (unsuspend_and_proceed_one_lwp): Likewise.
6483 (proceed_all_lwps): Use for_each_thread.
6484 (unstop_all_lwps): Likewise.
6485
6486 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6487
6488 * linux-low.c (linux_resume_one_thread): Return void, take
6489 parameter directly.
6490 (linux_resume): Use for_each_thread.
6491
6492 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6493
6494 * linux-low.c (send_sigstop_callback): Return void, change
6495 parameter type. Rename to...
6496 (send_sigstop): ... this.
6497 (suspend_and_send_sigstop_callback): Return void, change parameter
6498 type. Rename to...
6499 (suspend_and_send_sigstop): ... this.
6500 (stop_all_lwps): Use for_each_thread.
6501
6502 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6503
6504 * linux-low.c (lwp_running): Return bool, remove unused
6505 argument.
6506 (linux_stabilize_threads): Use find_thread.
6507
6508 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6509
6510 * linux-low.c (select_singlestep_lwp_callback): Remove.
6511 (count_events_callback): Remove.
6512 (select_event_lwp_callback): Remove.
6513 (select_event_lwp): Use find_thread/for_each_thread.
6514
6515 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6516
6517 * linux-low.c (not_stopped_callback): Return bool, take filter
6518 argument directly.
6519 (linux_wait_for_event_filtered): Use find_thread.
6520 (linux_wait_1): Likewise.
6521
6522 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6523
6524 * linux-low.c (same_lwp): Remove.
6525 (find_lwp_pid): Use find_thread.
6526
6527 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6528
6529 * linux-low.c (delete_lwp_callback): Remove.
6530 (linux_mourn): Use for_each_thread.
6531
6532 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6533
6534 * linux-low.c (linux_detach_lwp_callback): Return void, remove
6535 args parameter, don't check for pid.
6536 (linux_detach): Use for_each_thread.
6537
6538 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6539
6540 * linux-low.c (struct counter): Remove.
6541 (second_thread_of_pid_p): Remove.
6542 (last_thread_of_process_p): Use find_thread.
6543
6544 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6545
6546 * inferiors.c (find_inferior_in_random): Remove.
6547 * inferiors.h (find_inferior_in_random): Remove.
6548 * linux-low.c (status_pending_p_callback): Return bool, accept
6549 parameter ptid directly.
6550 (linux_wait_for_event_filtered): Use find_thread_in_random.
6551 (linux_wait_1): Likewise.
6552
6553 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6554
6555 * inferiors.c (find_inferior_id): Remove.
6556 (find_thread_ptid): Move implemention from find_inferior_id to
6557 here.
6558 * inferiors.h (find_inferior_id): Remove.
6559 * server.c (handle_status): Use find_thread_ptid.
6560 (process_serial_event): Likewise.
6561 * thread-db.c (find_one_thread): Likewise.
6562 (thread_db_thread_handle): Likewise.
6563 * win32-low.c (thread_rec): Likewise.
6564 (child_delete_thread): Likewise.
6565 (win32_thread_alive): Likewise.
6566 (get_child_debug_event): Likewise.
6567
6568 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6569
6570 * linux-mips-low.c (update_watch_registers_callback): Return
6571 void, remove pid_p parameter, don't check for pid.
6572 (mips_insert_point, mips_remove_point): Use for_each_thread.
6573
6574 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6575
6576 * lynx.low (lynx_delete_thread_callback): Remove.
6577 (lynx_mourn): Use for_each_thread.
6578
6579 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
6580
6581 * regcache.c (regcache_invalidate_one): Remove.
6582 (regcache_invalidate_pid): use for_each_thread.
6583
6584 2017-11-26 Tom Tromey <tom@tromey.com>
6585
6586 * linux-low.c (linux_create_inferior): Update.
6587
6588 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
6589
6590 * spu-low.c (spu_create_inferior): Fix typo in argument name.
6591
6592 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6593
6594 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
6595 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6596 * linux-aarch64-tdesc-selftest.c: New file.
6597 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6598
6599 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6600
6601 * configure.srv: Add new file.
6602 * linux-aarch64-low.c (initialize_low_arch): Call init func.
6603 * linux-aarch64-tdesc-selftest.c: New file.
6604 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
6605
6606 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6607
6608 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
6609 * linux-aarch64-low.c (initialize_low_arch): Remove init.
6610 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
6611
6612 2017-11-24 Alan Hayward <alan.hayward@arm.com>
6613
6614 * configure.srv: Add new files.
6615 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
6616 aarch64_linux_read_description.
6617 * linux-aarch64-low.c (aarch64_linux_read_description):
6618 Merge with aarch64_arch_setup.
6619 (aarch64_arch_setup): Call aarch64_linux_read_description.
6620 * linux-aarch64-tdesc.c: New file.
6621 * linux-aarch64-tdesc.h: New file.
6622
6623 2017-11-24 Yao Qi <yao.qi@linaro.org>
6624
6625 * configure.srv: Set $srv_regobj for tic6x-linux.
6626 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
6627 (tic6x_read_description): Move some code to tic6x_arch_setup.
6628 (tic6x_tdesc_test): New function.
6629 (initialize_low_arch): Call selftests::register_test.
6630
6631 2017-11-22 Yao Qi <yao.qi@linaro.org>
6632
6633 * remote-utils.c (prepare_resume_reply): Use memcpy.
6634
6635 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6636
6637 * linux-low.c (kill_one_lwp_callback): Return void, take
6638 argument directly, don't filter on pid.
6639 (linux_kill): Use for_each_thread.
6640
6641 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6642
6643 * linux-low.c (need_step_over_p): Return bool, remove dummy
6644 argument.
6645 (linux_resume, proceed_all_lwps): Use find_thread.
6646
6647 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6648
6649 * linux-low.c (resume_status_pending_p): Return bool, remove
6650 flag_p argument.
6651 (linux_resume): Use find_thread.
6652
6653 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6654
6655 * linux-low.c (struct thread_resume_array): Remove.
6656 (linux_set_resume_request): Return void, take arguments
6657 directly.
6658 (linux_resume): Use for_each_thread.
6659
6660 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6661
6662 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
6663 return bool, remove data argument.
6664 (linux_stabilize_threads): Use find_thread.
6665
6666 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6667
6668 * linux-low.c (unsuspend_one_lwp): Remove.
6669 (unsuspend_all_lwps): Use for_each_thread, inline code from
6670 unsuspend_one_lwp.
6671
6672 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6673
6674 * gdbthread.h (find_thread): Add overload with ptid_t filter.
6675 * linux-low.c (struct iterate_over_lwps_args): Remove.
6676 (iterate_over_lwps_filter): Remove.
6677 (iterate_over_lwps): Use find_thread.
6678
6679 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6680
6681 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
6682 (linux_handle_new_gdb_connection): Use for_each_thread, inline
6683 code from reset_lwp_ptrace_options_callback.
6684
6685 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6686
6687 * linux-arm-low.c (struct update_registers_data): Remove.
6688 (update_registers_callback): Return void, take arguments
6689 directly, don't check thread's pid.
6690 (arm_insert_point, arm_remove_point): Use for_each_thread.
6691
6692 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6693
6694 * win32-low.c (continue_one_thread): Return void, take argument
6695 directly.
6696 (child_continue): Use for_each_thread.
6697
6698 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
6699
6700 * win32-i386-low.c (update_debug_registers_callback): Rename
6701 to ...
6702 (update_debug_registers): ... this, return void, remove pid_p arg.
6703 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
6704
6705 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
6706
6707 * inferiors.h (struct process_info): Add constructor, initialize
6708 fields..
6709 <syscalls_to_catch>: Change type to std::vector<int>.
6710 * inferiors.c (add_process): Allocate process_info with new.
6711 (remove_process): Free process_info with delete.
6712 * linux-low.c (handle_extended_wait): Adjust.
6713 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
6714 * server.c (handle_general_set): Adjust.
6715
6716 2017-11-16 Pedro Alves <palves@redhat.com>
6717
6718 * remote-utils.c (remote_close): Block SIGIO signals instead of
6719 uninstalling the SIGIO handler.
6720
6721 2017-11-16 Alan Hayward <alan.hayward@arm.com>
6722
6723 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
6724
6725 2017-11-16 Yao Qi <yao.qi@linaro.org>
6726
6727 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
6728 (tic6x_store_gregset): Likewise.
6729 (tic6x_usrregs_info): Move it up.
6730
6731 2017-11-15 Alan Hayward <alan.hayward@arm.com>
6732
6733 * Makefile.in: Update arch rules.
6734 * configure.srv: Explicitly mark arch/ files.
6735
6736 2017-11-13 Andreas Schwab <schwab@suse.de>
6737
6738 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
6739 function.
6740 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
6741
6742 2017-11-06 Pedro Alves <palves@redhat.com>
6743
6744 * config.in, configure: Regenerate.
6745
6746 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6747
6748 * target.c (struct thread_search): Remove.
6749 (thread_search_callback): Remove.
6750 (prepare_to_access_memory): Use for_each_thread instead of
6751 find_inferior. Inline code from thread_search_callback.
6752
6753 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6754
6755 * server.c (struct visit_actioned_threads_data): Remove.
6756 (visit_actioned_threads): Change prototype to take arguments
6757 directly.
6758 (resume): Use find_thread instead of find_inferior.
6759
6760 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
6761
6762 * server.c (queue_stop_reply_callback): Change prototype, return
6763 void.
6764 (find_status_pending_thread_callback): Remove.
6765 (handle_status): Replace find_inferior with find_thread and
6766 for_each_thread.
6767
6768 2017-10-25 Alan Hayward <alan.hayward@arm.com>
6769
6770 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
6771 with REGNO.
6772 (aarch64_store_gregset): Likewise.
6773 (aarch64_fill_fpregset): Likewise.
6774 (aarch64_store_fpregset): Likewise.
6775
6776 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
6777
6778 * gdbthread.h (find_thread, for_each_thread): New functions.
6779 * inferiors.c (thread_of_pid): Remove.
6780 (find_any_thread_of_pid): Use find_thread.
6781 * linux-low.c (num_lwps): Use for_each_thread.
6782
6783 2017-10-17 Yao Qi <yao.qi@linaro.org>
6784
6785 * Makefile.in: Remove one rule.
6786 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
6787
6788 2017-10-17 Yao Qi <yao.qi@linaro.org>
6789
6790 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
6791 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
6792
6793 2017-10-17 Yao Qi <yao.qi@linaro.org>
6794
6795 * configure.srv: Rename arm.o with arch/arm.o.
6796
6797 2017-10-17 Yao Qi <yao.qi@linaro.org>
6798
6799 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
6800 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
6801 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
6802 (arch-i386.o, arch-amd64.o): Remove rules.
6803 (arch/%.o): New rule.
6804 Update POSTCOMPILE and COMPILE.pre.
6805 * configure.ac: Invoke AC_CONFIG_COMMANDS.
6806 * configure: Re-generated.
6807 * configure.srv: Replace arch-i386.o with arch/i386.o.
6808 Replace arch-amd64.o with arch/amd64.o.
6809
6810 2017-10-16 Yao Qi <yao.qi@linaro.org>
6811
6812 * configure: Regenerated.
6813
6814 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6815
6816 * inferiors.h: (struct inferior_list): Remove.
6817 (struct inferior_list_entry); Remove.
6818 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
6819 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
6820 get_first_inferior): Remove.
6821 (for_each_inferior, for_each_inferior_with_data, find_inferior,
6822 find_inferior_id, find_inferior_in_random): Change signature.
6823 * inferiors.c (all_threads): Change type to
6824 std::list<thread_info *>.
6825 (get_thread): Remove macro.
6826 (find_inferior, find_inferior_id): Change signature, implement
6827 using find_thread.
6828 (find_inferior_in_random): Change signature, implement using
6829 find_thread_in_random.
6830 (for_each_inferior, for_each_inferior_with_data): Change
6831 signature, implement using for_each_thread.
6832 (add_inferior_to_list, remove_inferior): Remove.
6833 (add_thread, get_first_thread, thread_of_pid,
6834 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
6835 (get_first_inferior, one_inferior_p, clear_inferior_list):
6836 Remove.
6837 (clear_inferiors, get_thread_process): Update.
6838 * gdbthread.h: Include <list>.
6839 (struct thread_info) <entry>: Remove field.
6840 <id>: New field.
6841 (all_threads): Change type to std::list<thread_info *>.
6842 (get_first_inferior): Add doc.
6843 (find_thread, for_each_thread, find_thread_in_random): New
6844 functions.
6845 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
6846 * linux-arm-low.c (update_registers_callback): Update.
6847 * linux-low.c (second_thread_of_pid_p): Update.
6848 (kill_one_lwp_callback, linux_detach_lwp_callback,
6849 delete_lwp_callback, status_pending_p_callback, same_lwp,
6850 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
6851 iterate_over_lwps, not_stopped_callback,
6852 resume_stopped_resumed_lwps, count_events_callback,
6853 select_singlestep_lwp_callback, select_event_lwp_callback,
6854 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
6855 suspend_and_send_sigstop_callback, wait_for_sigstop,
6856 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
6857 lwp_running, linux_set_resume_request, resume_status_pending_p,
6858 need_step_over_p, start_step_over, linux_resume_one_thread,
6859 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
6860 reset_lwp_ptrace_options_callback): Update.
6861 * linux-mips-low.c (update_watch_registers_callback): Update.
6862 * regcache.c (regcache_invalidate_one, regcache_invalidate):
6863 Update.
6864 (free_register_cache_thread_one): Remove.
6865 (regcache_release): Update.
6866 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
6867 handle_qxfer_threads_worker): Update.
6868 (handle_query): Update, use list iterator.
6869 (visit_actioned_threads, handle_pending_status,
6870 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
6871 clear_pending_status_callback, set_pending_status_callback,
6872 find_status_pending_thread_callback, handle_status,
6873 process_serial_event): Update.
6874 * target.c (thread_search_callback): Update.
6875 * thread-db.c (thread_db_get_tls_address): Update.
6876 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
6877 Update.
6878 * win32-i386-low.c (update_debug_registers_callback): Update.
6879 * win32-low.c (delete_thread_info, child_delete_thread,
6880 continue_one_thread, suspend_one_thread,
6881 get_child_debug_event): Adjust.
6882
6883 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6884
6885 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
6886 * inferiors.h: Include <list>.
6887 (struct process_info) <entry>: Remove field.
6888 <pid>: New field.
6889 (pid_of): Change macro to function.
6890 (ptid_of, lwpid_of): Remove macro.
6891 (all_processes): Change type to std::list<process_info *>.
6892 (ALL_PROCESSES): Remove macro.
6893 (for_each_process, find_process): New function.
6894 * inferiors.c (all_processes): Change type to
6895 std::list<process_info *>.
6896 (find_thread_process): Adjust.
6897 (add_process): Likewise.
6898 (remove_process): Likewise.
6899 (find_process_pid): Likewise.
6900 (get_first_process): Likewise.
6901 (started_inferior_callback): Remove.
6902 (have_started_inferiors_p): Adjust.
6903 (attached_inferior_callback): Remove.
6904 (have_attached_inferiors_p): Adjust.
6905 * linux-low.c (check_zombie_leaders): Likewise.
6906 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
6907 (x86_linux_update_xmltarget): Adjust.
6908 * server.c (handle_query): Likewise.
6909 (gdb_reattached_process): Remove.
6910 (handle_status): Adjust.
6911 (kill_inferior_callback): Likewise.
6912 (detach_or_kill_inferior): Remove.
6913 (print_started_pid): Likewise.
6914 (print_attached_pid): Likewise.
6915 (detach_or_kill_for_exit): Update.
6916 (process_serial_event): Likewise.
6917 * linux-arm-low.c (arm_new_fork): Likewise.
6918
6919 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
6920
6921 * dll.h: Include <list>.
6922 (struct dll_info): Add constructor.
6923 <entry>: Remove field.
6924 (all_dlls): Change type to std::list<dll_info>.
6925 * dll.c: Include <algorithm>.
6926 (get_dll): Remove macro.
6927 (all_dlls): Change type to std::list<dll_info *>.
6928 (free_one_dll): Remove.
6929 (match_dll): Likewise.
6930 (loaded_dll): Adjust.
6931 (unloaded_dll): Adjust to all_dlls type change, use
6932 std::find_if. Inline code from match_dll.
6933 (clear_dlls): Adjust to all_dlls type change.
6934 * server.c (emit_dll_description): Remove.
6935 (handle_qxfer_libraries): Adjust to all_dlls type change,
6936 integrate emit_dll_description's functionality.
6937
6938 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6939
6940 * linux-low.h (struct linux_target_ops) <delete_process>: New
6941 field.
6942 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
6943 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
6944 (struct linux_target_ops): Add delete_process callback.
6945 * linux-arm-low.c (arm_delete_process): New.
6946 (struct linux_target_ops): Add delete_process callback.
6947 * linux-bfin-low.c (struct linux_target_ops): Likewise.
6948 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
6949 * linux-m32r-low.c (struct linux_target_ops): Likewise.
6950 * linux-mips-low.c (mips_linux_delete_process): New.
6951 (struct linux_target_ops): Add delete_process callback.
6952 * linux-ppc-low.c (struct linux_target_ops): Likewise.
6953 * linux-s390-low.c (struct linux_target_ops): Likewise.
6954 * linux-sh-low.c (struct linux_target_ops): Likewise.
6955 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
6956 * linux-tile-low.c (struct linux_target_ops): Likewise.
6957 * linux-x86-low.c (x86_linux_delete_process): New.
6958 (struct linux_target_ops): Add delete_process callback.
6959 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
6960
6961 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
6962
6963 * linux-aarch64-low.c (the_low_target): Add thread delete
6964 callback.
6965 * linux-arm-low.c (arm_delete_thread): New function.
6966 (the_low_target): Add thread delete callback.
6967 * linux-bfin-low.c (the_low_target): Likewise.
6968 * linux-crisv32-low.c (the_low_target): Likewise.
6969 * linux-low.c (delete_lwp): Invoke delete_thread callback if
6970 set.
6971 * linux-low.h (struct linux_target_ops) <delete_thread>: New
6972 field.
6973 * linux-m32r-low.c (the_low_target): Add thread delete callback.
6974 * linux-mips-low.c (mips_linux_delete_thread): New function.
6975 (the_low_target): Add thread delete callback.
6976 * linux-ppc-low.c (the_low_target): Likewise.
6977 * linux-s390-low.c (the_low_target): Likewise.
6978 * linux-sh-low.c (the_low_target): Likewise.
6979 * linux-tic6x-low.c (the_low_target): Likewise.
6980 * linux-tile-low.c (the_low_target): Likewise.
6981 * linux-x86-low.c (the_low_target): Likewise.
6982 * linux-xtensa-low.c (the_low_target): Likewise.
6983
6984 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
6985
6986 * win32-low.c: Include "common-inferior.h".
6987
6988 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6989
6990 * inferiors.c (set_inferior_cwd): New function.
6991 * server.c (handle_general_set): Handle QSetWorkingDir packet.
6992 (handle_query): Inform that QSetWorkingDir is supported.
6993 * win32-low.c (create_process): Pass the inferior's cwd to
6994 CreateProcess.
6995
6996 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6997
6998 * inferiors.c (current_inferior_cwd): New global variable.
6999 (get_inferior_cwd): New function.
7000 * inferiors.h (struct process_info) <cwd>: New field.
7001
7002 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
7003
7004 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
7005 (OBS): Add gdb_tilde_expand.o.
7006
7007 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
7008
7009 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
7010 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
7011
7012 2017-09-29 Pedro Alves <palves@redhat.com>
7013
7014 * ax.c (gdb_parse_agent_expr): Constify.
7015 * ax.h (gdb_parse_agent_expr): Constify.
7016 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7017 Constify.
7018 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
7019 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
7020 * remote-utils.h (read_ptid): Constify.
7021 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
7022 (process_point_options, process_serial_event): Constify.
7023 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
7024 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
7025 (cmd_qtbuffer): Constify.
7026
7027 2017-09-29 Pedro Alves <palves@redhat.com>
7028
7029 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
7030 fails.
7031
7032 2017-09-29 Pedro Alves <palves@redhat.com>
7033
7034 * linux-low.c (handle_extended_wait): Pass parent thread instead
7035 of process to thread_db_notice_clone.
7036 * linux-low.h (thread_db_notice_clone): Replace parent process
7037 parameter with parent thread parameter.
7038 * thread-db.c (find_one_thread): Add comment.
7039 (thread_db_notice_clone): Replace parent process parameter with
7040 parent thread parameter. Temporarily switch to the parent thread.
7041
7042 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
7043
7044 * gdbthread.h: Include "common-gdbthread.h".
7045 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
7046 "if" when validating the ptid.
7047 * remote-utils.c: Include "gdbthread.h".
7048 (prepare_resume_reply): Use "switch_to_thread".
7049 * target.c (done_accessing_memory): Likewise.
7050
7051 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
7052
7053 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
7054 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
7055 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
7056 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
7057 s390x-gs-linux64-ipa.o to ipa_obj.
7058 * linux-s390-low.c (HWCAP_S390_GS): New define.
7059 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
7060 New functions.
7061 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
7062 (s390_arch_setup): Check for guarded-storage support and choose
7063 appropriate tdesc.
7064 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
7065 init_registers_s390x_gs_linux64.
7066 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
7067 enum value.
7068 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
7069 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
7070
7071 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
7072
7073 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
7074
7075 2017-09-21 Kevin Buettner <kevinb@redhat.com>
7076
7077 * linux-low.h (struct lwp_info): Add new field, thread_handle.
7078 (thread_db_thread_handle): Declare.
7079 * linux-low.c (linux_target_ops): Initialize thread_handle.
7080 * server.c (handle_qxfer_threads_worker): Add support for
7081 "handle" attribute.
7082 * target.h (struct target_ops): Add new function pointer,
7083 thread_handle.
7084 (target_thread_handle): Define.
7085 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
7086 field in lwp.
7087 (thread_db_thread_handle): New function.
7088
7089 2017-09-21 Kevin Buettner <kevinb@redhat.com>
7090
7091 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
7092 * linux-low.h (thread_db_notice_clone): Declare.
7093 * thread-db.c (thread_db_notice_clone): New function.
7094
7095 2017-09-21 Pedro Alves <palves@redhat.com>
7096
7097 * server.c (gdb_read_memory, handle_status, process_serial_event)
7098 (handle_serial_event, handle_target_event): Adjust to
7099 set_desired_thread prototype change.
7100 * target.c (set_desired_thread): Remove 'use_general' parameter
7101 and adjust.
7102 * target.h (set_desired_thread): Remove 'use_general' parameter.
7103
7104 2017-09-20 Tom Tromey <tom@tromey.com>
7105
7106 * target.c (target_terminal::terminal_state): Define.
7107 (target_terminal::init): Rename from target_terminal_init.
7108 (target_terminal::inferior): Rename from
7109 target_terminal_inferior.
7110 (target_terminal::ours): Rename from target_terminal_ours.
7111 (target_terminal::ours_for_output, target_terminal::info): New.
7112
7113 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7114
7115 * server.c (accumulate_file_name_length): Remove.
7116 (emit_dll_description): Adjust to std::string change.
7117 (handle_qxfer_libraries): Use std::string to hold document.
7118
7119 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7120
7121 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
7122 return type of xml_escape_text.
7123 * server.c (emit_dll_description): Likewise.
7124
7125 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7126
7127 * server.c (captured_main): Accept argument for --selftest.
7128 Update run_tests call.
7129 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
7130 when registering selftests.
7131
7132 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
7133
7134 * regcache.c (get_thread_regcache): Update code to use "std::vector"
7135 instead of "VEC" for "target_desc.reg_defs".
7136 (regcache_cpy): Likewise.
7137 (registers_to_string): Likewise.
7138 (registers_from_string): Likewise.
7139 (find_regno): Likewise.
7140 (supply_regblock): Likewise.
7141 (regcache_raw_read_unsigned): Likewise.
7142 * tdesc.c (init_target_desc): Likewise.
7143 (tdesc_create_reg): Likewise.
7144 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
7145 (struct target_desc) <reg_defs>: Convert to "std::vector".
7146 (target_desc): Do not initialize "reg_defs".
7147 (~target_desc): Update code to use "std::vector" instead of "VEC"
7148 for "target_desc.reg_defs".
7149 (operator==): Likewise.
7150
7151 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7152
7153 * inferiors.h (thread_to_gdb_id): Remove.
7154 * inferiors.c (thread_to_gdb_id): Remove.
7155 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
7156 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
7157 lynx_store_registers, lynx_read_memory, lynx_write_memory):
7158 Likewise.
7159 * nto-low.c (nto_fetch_registers, nto_store_registers,
7160 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
7161
7162 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7163
7164 * inferiors.h (gdb_id_to_thread_id): Remove.
7165 * inferiors.c (gdb_id_to_thread_id): Remove.
7166 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
7167 removal. Move pid declaration closer to where it's used.
7168
7169 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7170
7171 * server.c (handle_detach): New function.
7172 (process_serial_event): Move code out, call handle_detach.
7173
7174 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7175
7176 * server.c (require_running): Rename to ...
7177 (require_running_or_return): ... this ...
7178 (require_running_or_break): ... and this.
7179 (handle_query, process_serial_event): Adjust.
7180
7181 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7182
7183 * linux-low.c (linux_set_resume_request): Remove unused
7184 variables.
7185
7186 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7187
7188 * server.c (first_thread_of): Remove.
7189 (process_serial_event): Replace usage of first_thread_of with
7190 find_any_thread_of_pid.
7191 * tracepoint.c (same_process_p): Remove.
7192 (gdb_agent_about_to_close): Replace usage of same_process_p with
7193 find_any_thread_of_pid.
7194 * linux-x86-low.c (same_process_callback): Remove.
7195 (x86_arch_setup_process_callback): Replace usage of
7196 same_process_callback with find_any_thread_of_pid.
7197 * thread-db.c (any_thread_of): Remove.
7198 (switch_to_process): Replace usage of any_thread_of with
7199 find_any_thread_of_pid.
7200 * inferiors.c (thread_pid_matches_callback): Remove.
7201 (find_thread_process): Adjust to use find_any_thread_of_pid.
7202
7203 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
7204
7205 * regcache.c (get_thread_regcache): Guard calls to "memset"
7206 with "!VEC_empty".
7207
7208 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
7209
7210 * linux-low.c (handle_extended_wait): Use
7211 "allocate_target_description" instead of "XNEW".
7212 * linux-x86-low.c (initialize_low_arch): Likewise.
7213
7214 2017-09-05 Yao Qi <yao.qi@linaro.org>
7215
7216 * configure.srv (srv_i386_regobj): Remove.
7217 (srv_amd64_regobj): Remove.
7218 (srv_regobj): Set it to "" for x86 non-linux targets.
7219 * linux-x86-tdesc.c (i386_linux_read_description):
7220 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
7221 (init_registers_i386): Remove the declaration.
7222 (tdesc_i386): Remove the declaration.
7223 (lynx_i386_arch_setup): Call i386_create_target_description.
7224 * nto-x86-low.c: Likewise.
7225 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
7226 [!__x86_64__]: include arch/i386.h.
7227 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
7228
7229 2017-09-05 Yao Qi <yao.qi@linaro.org>
7230
7231 * configure.srv (srv_amd64_linux_xmlfiles): Remove
7232 i386/amd64-XXX-linux from it.
7233
7234 2017-09-05 Yao Qi <yao.qi@linaro.org>
7235
7236 * configure.srv: Empty srv_amd64_linux_regobj if $development is
7237 false.
7238 (ipa_amd64_linux_regobj): Remove.
7239 (ipa_x32_linux_regobj): Remove.
7240
7241 2017-09-05 Yao Qi <yao.qi@linaro.org>
7242
7243 * Makefile.in (arch-amd64.o): New rule.
7244 * configure.srv: Append arch-amd64.o.
7245 * linux-amd64-ipa.c: Include common/x86-xstate.h.
7246 (get_ipa_tdesc): Call amd64_linux_read_description.
7247 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
7248 and init_registers_amd64_XXX.
7249 * linux-x86-low.c (x86_linux_read_description): Call
7250 amd64_linux_read_description.
7251 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
7252 (initialize_low_arch): Don't call init_registers_x32_XXX and
7253 init_registers_amd64_XXX.
7254 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
7255 and tdesc_amd64_XXX.
7256 [__x86_64__] (amd64_tdesc_test): New function.
7257 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
7258 and init_registers_amd64_XXX.
7259 * linux-x86-tdesc.c: Include arch/amd64.h.
7260 (xcr0_to_tdesc_idx): New function.
7261 (i386_linux_read_description): New function.
7262 (amd64_get_ipa_tdesc_idx): New function.
7263 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
7264 (amd64_get_ipa_tdesc): Declare.
7265
7266 2017-09-05 Yao Qi <yao.qi@linaro.org>
7267
7268 * configure.srv (srv_i386_linux_xmlfiles): Remove
7269 i386/i386-XXX-linux.xml from it.
7270
7271 2017-09-05 Yao Qi <yao.qi@linaro.org>
7272
7273 * configure.srv: Set srv_i386_linux_regobj empty if $development
7274 is false.
7275 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
7276 initialize_low_tdesc.
7277 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
7278 with #if initialize_low_tdesc.
7279 * linux-x86-tdesc-selftest.c: New file.
7280 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
7281
7282 2017-09-05 Yao Qi <yao.qi@linaro.org>
7283
7284 * Makefile.in (arch-i386.o): New rule.
7285 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
7286 (x86_64-*-linux*): Likewise.
7287 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
7288 include arch/i386.h.
7289 (i386_linux_read_description): Remove code and call
7290 i386_create_target_description.
7291 * tdesc.c (allocate_target_description): New function.
7292 * tdesc.h (set_tdesc_architecture): Remove declaration.
7293 (set_tdesc_osabi): Likewise.
7294
7295 2017-09-05 Yao Qi <yao.qi@linaro.org>
7296
7297 * linux-x86-tdesc.c: Don't include <inttypes.h>.
7298 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
7299 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
7300 .xmltarget.
7301 * server.c (get_features_xml): Call tdesc_get_features_xml.
7302 * tdesc.c (set_tdesc_architecture): New function.
7303 (set_tdesc_osabi): New function.
7304 (tdesc_get_features_xml): New function.
7305 (tdesc_create_feature): Add an argument.
7306 * tdesc.h (struct target_desc) <features>: New field.
7307 <arch, osabi>: New field.
7308 (~target_desc): xfree features, arch, and osabi.
7309 (target_desc::oerator==): Don't compare .xmltarget.
7310 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
7311 (set_tdesc_osabi): Likewise.
7312 (tdesc_get_features_xml): Likewise.
7313
7314 2017-09-05 Yao Qi <yao.qi@linaro.org>
7315
7316 * linux-x86-tdesc.c: Include selftest.h.
7317 (i386_tdesc_test): New function.
7318 (initialize_low_tdesc): Call selftests::register_test.
7319 * tdesc.h: Include regdef.h.
7320 (target_desc): Override operator == and !=.
7321
7322 2017-09-05 Yao Qi <yao.qi@linaro.org>
7323
7324 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
7325 (ipa_obj): Likewise.
7326 * linux-i386-ipa.c: Include common/x86-xstate.h
7327 (get_ipa_tdesc): Call i386_linux_read_description.
7328 (initialize_low_tracepoint): Don't call init_registers_XXX
7329 functions, call initialize_low_tdesc instead.
7330 * linux-x86-low.c (x86_linux_read_description): Call
7331 i386_linux_read_description.
7332 (initialize_low_arch): Don't call init_registers_i386_XXX
7333 functions, call initialize_low_tdesc.
7334 * linux-x86-tdesc.c: New file.
7335 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
7336 (i386_get_ipa_tdesc_idx): Declare.
7337 (i386_get_ipa_tdesc): Declare.
7338 (initialize_low_tdesc): Declare.
7339
7340 2017-09-05 Yao Qi <yao.qi@linaro.org>
7341
7342 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
7343 instead of 0.
7344
7345 2017-09-05 Yao Qi <yao.qi@linaro.org>
7346
7347 * Makefile.in (IPA_OBJS): Add vec-ipa.o
7348 * regcache.c (get_thread_regcache): Use VEC_length.
7349 (init_register_cache): Likewise.
7350 (regcache_cpy): Likewise.
7351 (registers_to_string): Iterate reg_defs via VEC_iterate.
7352 (find_regno): Likewise.
7353 (find_register_by_number): Use VEC_index.
7354 (register_size): Call find_register_by_number.
7355 (register_data): Call find_register_by_number.
7356 (supply_regblock): Use VEC_length.
7357 (regcache_raw_read_unsigned): Likewise.
7358 * tdesc.c (init_target_desc): Iterate reg_defs via
7359 VEC_iterate.
7360 (default_description): Update initializer.
7361 (copy_target_description): Don't update field num_registers.
7362 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
7363 <num_registers>: Remove.
7364
7365 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
7366
7367 * Makefile.in (.SECONDARY): Define target.
7368
7369 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
7370
7371 * linux-low.c (linux_wait_1): Adjust.
7372 * server.c (queue_stop_reply_callback): Adjust.
7373
7374 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
7375
7376 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
7377 QEnvironmentUnset and QEnvironmentReset packets.
7378 (handle_query): Inform remote that QEnvironmentHexEncoded,
7379 QEnvironmentUnset and QEnvironmentReset are supported.
7380
7381 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
7382
7383 * inferiors.h (inferior_target_data): Rename to ...
7384 (thread_target_data): ... this.
7385 (inferior_regcache_data): Rename to ...
7386 (thread_regcache_data): ... this.
7387 (set_inferior_regcache_data): Rename to ...
7388 (set_thread_regcache_data): ... this.
7389 * inferiors.c (inferior_target_data): Rename to ...
7390 (thread_target_data): ... this.
7391 (inferior_regcache_data): Rename to ...
7392 (thread_regcache_data): ... this.
7393 (set_inferior_regcache_data): Rename to ...
7394 (set_thread_regcache_data): ... this.
7395 (free_one_thread): Update.
7396 * linux-low.h (get_thread_lwp): Update.
7397 * regcache.c (get_thread_regcache): Update.
7398 (regcache_invalidate_thread): Update.
7399 (free_register_cache_thread): Update.
7400 * win32-i386-low.c (update_debug_registers_callback): Update.
7401 (win32_get_current_dr): Update.
7402 * win32-low.c (thread_rec): Update.
7403 (delete_thread_info): Update.
7404 (continue_one_thread): Update.
7405 (suspend_one_thread): Update.
7406
7407 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
7408
7409 * inferiors.c (set_inferior_target_data): Remove.
7410 * inferiors.h (set_inferior_target_data): Remove.
7411
7412 2017-08-18 Yao Qi <yao.qi@linaro.org>
7413
7414 * Makefile.in (OBS): Add selftest.o.
7415 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
7416 * configure, config.in: Re-generated.
7417 * server.c: Include common/sefltest.h.
7418 (captured_main): Handle option --selftest.
7419
7420 2017-08-09 Yao Qi <yao.qi@linaro.org>
7421
7422 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
7423 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
7424 i386-avx-mpx.o and i386-mmx.o.
7425 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
7426 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
7427 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
7428 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
7429 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
7430 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
7431 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
7432 i386/amd64-avx-mpx.xml.
7433
7434 2017-08-09 Yao Qi <yao.qi@linaro.org>
7435
7436 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
7437 and x32-avx-avx512.o.
7438 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
7439 i386/x32-avx-avx512.xml.
7440
7441 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
7442
7443 * tracepoint.h (enum class fast_tpoint_collect_result): New
7444 enumeration.
7445 (fast_tracepoint_collecting): Change return type to
7446 fast_tpoint_collect_result.
7447 * tracepoint.c (fast_tracepoint_collecting): Likewise.
7448 * linux-low.h: Include tracepoint.h.
7449 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
7450 fast_tpoint_collect_result.
7451 * linux-low.c (handle_tracepoints): Adjust.
7452 (linux_fast_tracepoint_collecting): Change return type to
7453 fast_tpoint_collect_result.
7454 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
7455 linux_wait_1, stuck_in_jump_pad_callback,
7456 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
7457 proceed_one_lwp): Adjust to type change.
7458
7459 2017-07-10 Yao Qi <yao.qi@linaro.org>
7460
7461 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
7462
7463 2017-06-29 Yao Qi <yao.qi@linaro.org>
7464
7465 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
7466 Remove.
7467 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
7468
7469 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
7470
7471 * Makefile.in (IPA_OBJS): Sort and format one item per line.
7472
7473 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
7474
7475 * linux-low.c (linux_create_inferior): Adjust code to access the
7476 environment information via 'gdb_environ' class.
7477 * lynx-low.c (lynx_create_inferior): Likewise.
7478 * server.c (our_environ): Make it an instance of 'gdb_environ'.
7479 (get_environ): Return a pointer to 'our_environ'.
7480 (captured_main): Initialize 'our_environ'.
7481 * server.h (get_environ): Adjust prototype.
7482 * spu-low.c (spu_create_inferior): Adjust code to access the
7483 environment information via 'gdb_environ' class.
7484
7485 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7486
7487 * linux-low.c (linux_read_memory, linux_write_memory): Remove
7488 usage of "register" keyword.
7489
7490 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7491
7492 * configure: Re-generate.
7493
7494 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7495
7496 * configure: Re-generate.
7497
7498 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
7499
7500 * Makefile.in (COMPILE.pre): Add "-x c++".
7501
7502 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
7503
7504 * fork-child.c: Conditionally include <signal.h>.
7505
7506 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7507
7508 * server.c (handle_general_set): Handle new packet
7509 "QStartupWithShell".
7510 (handle_query): Add "QStartupWithShell" to the list of supported
7511 packets.
7512 (gdbserver_usage): Add help text explaining the
7513 new "--startup-with-shell" and "--no-startup-with-shell" CLI
7514 options.
7515 (captured_main): Recognize and act upon the presence of the new
7516 CLI options.
7517
7518 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7519 Pedro Alves <palves@redhat.com>
7520
7521 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
7522 * configure: Regenerate.
7523 * configure.srv (srv_linux_obj): Add "fork-child.o" and
7524 "fork-inferior.o".
7525 (i[34567]86-*-lynxos*): Likewise.
7526 (spu*-*-*): Likewise.
7527 * fork-child.c: New file.
7528 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
7529 and "environ.h".
7530 (linux_ptrace_fun): New function.
7531 (linux_create_inferior): Adjust function prototype to reflect
7532 change on "target.h". Adjust function code to use
7533 "fork_inferior".
7534 (linux_request_interrupt): Delete "signal_pid".
7535 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7536 (lynx_ptrace_fun): New function.
7537 (lynx_create_inferior): Adjust function prototype to reflect
7538 change on "target.h". Adjust function code to use
7539 "fork_inferior".
7540 * nto-low.c (nto_create_inferior): Adjust function prototype and
7541 code to reflect change on "target.h". Update comments.
7542 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
7543 "common-terminal.h" and "environ.h".
7544 (terminal_fd): Moved to fork-child.c.
7545 (old_foreground_pgrp): Likewise.
7546 (restore_old_foreground_pgrp): Likewise.
7547 (last_status): Make it global.
7548 (last_ptid): Likewise.
7549 (our_environ): New variable.
7550 (startup_with_shell): Likewise.
7551 (program_name): Likewise.
7552 (program_argv): Rename to...
7553 (program_args): ...this.
7554 (wrapper_argv): New variable.
7555 (start_inferior): Delete function.
7556 (get_exec_wrapper): New function.
7557 (get_exec_file): Likewise.
7558 (get_environ): Likewise.
7559 (prefork_hook): Likewise.
7560 (post_fork_inferior): Likewise.
7561 (postfork_hook): Likewise.
7562 (postfork_child_hook): Likewise.
7563 (handle_v_run): Update code to deal with arguments coming from the
7564 remote host. Update calls from "start_inferior" to
7565 "create_inferior".
7566 (captured_main): Likewise. Initialize environment variable. Call
7567 "have_job_control".
7568 * server.h (post_fork_inferior): New prototype.
7569 (get_environ): Likewise.
7570 (last_status): Declare.
7571 (last_ptid): Likewise.
7572 (signal_pid): Likewise.
7573 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
7574 (spu_ptrace_fun): New function.
7575 (spu_create_inferior): Adjust function prototype to reflect change
7576 on "target.h". Adjust function code to use "fork_inferior".
7577 * target.c (target_terminal_init): New function.
7578 (target_terminal_inferior): Likewise.
7579 (target_terminal_ours): Likewise.
7580 * target.h: Include <vector>.
7581 (struct target_ops) <create_inferior>: Update prototype.
7582 (create_inferior): Update macro.
7583 * utils.c (gdb_flush_out_err): New function.
7584 * win32-low.c (win32_create_inferior): Adjust function prototype
7585 and code to reflect change on "target.h".
7586
7587 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7588
7589 * inferiors.c (switch_to_thread): New function.
7590
7591 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
7592
7593 * Makefile.in (SFILE): Add "common/job-control.c".
7594 (OBS): Add "job-control.o".
7595
7596 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
7597
7598 * Makefile: Remove "@host_makefile_frag@".
7599
7600 2017-05-05 Pedro Alves <palves@redhat.com>
7601
7602 * configure: Regenerate.
7603
7604 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
7605
7606 * configure: Regenerate.
7607
7608 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
7609
7610 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
7611 software_single_step change of return type to
7612 std::vector<CORE_ADDR>.
7613 * linux-low.c (install_software_single_step_breakpoints):
7614 Likewise.
7615 * linux-low.h (install_software_single_step_breakpoints):
7616 Likewise.
7617
7618 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7619
7620 * remote-utils.c: Include "gdb_termios.h" instead of
7621 "terminal.h".
7622 * terminal.h: Delete file.
7623
7624 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
7625
7626 * server.c: Include <vector>.
7627 <program_argv, wrapper_argv>: Convert to std::vector.
7628 (start_inferior): Rewrite function to use C++.
7629 (handle_v_run): Likewise. Update code that calculates the argv
7630 based on the vRun packet; use C++.
7631 (captured_main): Likewise.
7632
7633 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
7634
7635 * server.c (handle_v_cont): Initialize thread_resume::thread
7636 with null_ptid.
7637
7638 2017-04-05 Pedro Alves <palves@redhat.com>
7639
7640 * configure: Regenerate.
7641
7642 2017-04-05 Pedro Alves <palves@redhat.com>
7643
7644 * gdbreplay.c (sync_error): Constify.
7645 * linux-x86-low.c (push_opcode): Constify.
7646
7647 2017-04-05 Pedro Alves <palves@redhat.com>
7648
7649 * win32-low.c (get_child_debug_event)
7650 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
7651 Report TARGET_WAITKIND_SPURIOUS instead.
7652
7653 2017-04-05 Pedro Alves <palves@redhat.com>
7654
7655 * remote-utils.c (remote_prepare, remote_open): Constify.
7656 * remote-utils.h (remote_prepare, remote_open): Constify.
7657 * server.c (captured_main): Constify 'port' handling.
7658
7659 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
7660
7661 * Makefile.in (clean): Clear .deps.
7662
7663 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
7664
7665 * .gitignore: Remove generated files, replace with wildcard.
7666 * (clean): Replace removal of generated files with wildcard.
7667 (version.c): Replace with...
7668 (version-generated.c): ...this.
7669 (xml-builtin.c): Replace with...
7670 (xml-builtin-generated.c): ...this.
7671 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
7672 (%.c: *regformats*): Replace with...
7673 (%-generated.c: *regformats*): ...this.
7674
7675 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7676
7677 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
7678 (xtensa_fill_gregset): Call collect_register_by_name for
7679 threadptr register.
7680 (xtensa_store_gregset): Call supply_register_by_name for
7681 threadptr register.
7682
7683 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
7684
7685 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
7686 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
7687 (xtensa_store_gregset): Call supply_register for all registers in
7688 a0_regnum..a0_regnum + C0_NREGS range.
7689
7690 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7691
7692 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
7693 (ax-ipa.o: ax.c): Remove.
7694 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
7695 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
7696 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
7697 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
7698 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
7699
7700 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7701
7702 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
7703 (print-utils-ipa.o: ../common/print-utils.c): Remove.
7704 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
7705 (errors-ipa.o: ../common/errors.c): Remove.
7706 (format-ipa.o: ../common/format.c): Remove.
7707 (common-utils-ipa.o: ../common/common-utils.c): Remove.
7708
7709 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7710
7711 * Makefile.in (%-ipa.o: %.c): New rule.
7712 (tracepoint-ipa.o: tracepoint.c): Remove.
7713 (utils-ipa.o: utils.c): Remove.
7714 (remote-utils-ipa.o: remote-utils.c): Remove.
7715 (regcache-ipa.o: regcache.c): Remove.
7716 (i386-linux-ipa.o: i386-linux.c): Remove.
7717 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
7718 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
7719 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
7720 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
7721 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
7722 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
7723 (amd64-linux-ipa.o: amd64-linux.c): Remove.
7724 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
7725 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
7726 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
7727 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
7728 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
7729 (aarch64-ipa.o: aarch64.c): Remove.
7730 (s390-linux32-ipa.o: s390-linux32.c): Remove.
7731 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
7732 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
7733 (s390-linux64-ipa.o: s390-linux64.c): Remove.
7734 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
7735 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
7736 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
7737 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
7738 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
7739 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
7740 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
7741 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
7742 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
7743 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
7744 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
7745 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
7746 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
7747 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
7748 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
7749 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
7750 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
7751 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
7752 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
7753 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
7754 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
7755 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
7756 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
7757 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
7758 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
7759 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
7760 (tdesc-ipa.o: tdesc.c): Remove.
7761 (x32-linux-ipa.o: x32-linux.c): Remove.
7762 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
7763 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
7764
7765 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7766
7767 * Makefile.in (%.o: ../arch/%.c): New rule.
7768 (arm.o: ../arch/arm.c): Remove.
7769 (arm-linux.o: ../arch/arm-linux.c): Remove.
7770 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
7771 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
7772
7773 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7774
7775 * Makefile.in (%.o: ../nat/%.c): New rule.
7776 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
7777 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
7778 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
7779 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
7780 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
7781 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
7782 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
7783 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
7784 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
7785 (linux-personality.o: ../nat/linux-personality.c): Remove.
7786 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
7787 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
7788 (x86-linux.o: ../nat/x86-linux.c): Remove.
7789 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
7790 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
7791
7792 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7793
7794 * Makefile.in (%.o: ../common/%.c): New rule.
7795 (signals.o: ../common/signals.c): Remove.
7796 (print-utils.o: ../common/print-utils.c): Remove.
7797 (rsp-low.o: ../common/rsp-low.c): Remove.
7798 (common-utils.o: ../common/common-utils.c): Remove.
7799 (posix-strerror.o: ../common/posix-strerror.c): Remove.
7800 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
7801 (vec.o: ../common/vec.c): Remove.
7802 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
7803 (xml-utils.o: ../common/xml-utils.c): Remove.
7804 (ptid.o: ../common/ptid.c): Remove.
7805 (buffer.o: ../common/buffer.c): Remove.
7806 (format.o: ../common/format.c): Remove.
7807 (filestuff.o: ../common/filestuff.c): Remove.
7808 (agent.o: ../common/agent.c): Remove.
7809 (errors.o: ../common/errors.c): Remove.
7810 (environ.o: ../common/environ.c): Remove.
7811 (common-debug.o: ../common/common-debug.c): Remove.
7812 (cleanups.o: ../common/cleanups.c): Remove.
7813 (common-exceptions.o: ../common/common-exceptions.c): Remove.
7814 (fileio.o: ../common/fileio.c): Remove.
7815 (common-regcache.o: ../common/common-regcache.c): Remove.
7816 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
7817 (new-op.o: ../common/new-op.c): Remove.
7818 (btrace-common.o: ../common/btrace-common.c): Remove.
7819
7820 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7821
7822 * Makefile.in (%.o: ../target/%.c): New rule.
7823 (waitstatus.o: ../target/waitstatus.c): Remove.
7824
7825 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
7826
7827 * Makefile.in
7828 (%.c: ../regformats/%.dat,
7829 (%.c: ../regformats/arm/%.dat,
7830 (%.c: ../regformats/i386/%.dat,
7831 (%.c: ../regformats/rs6000/%.dat): New rules.
7832 (aarch64.c): Remove.
7833 (reg-arm.c): Remove.
7834 (arm-with-iwmmxt.c): Remove.
7835 (arm-with-vfpv2.c): Remove.
7836 (arm-with-vfpv3.c): Remove.
7837 (arm-with-neon.c): Remove.
7838 (reg-bfin.c): Remove.
7839 (reg-cris.c): Remove.
7840 (reg-crisv32.c): Remove.
7841 (i386.c): Remove.
7842 (i386-linux.c): Remove.
7843 (i386-avx.c): Remove.
7844 (i386-avx-linux.c): Remove.
7845 (i386-avx-avx512.c): Remove.
7846 (i386-avx-avx512-linux.c): Remove.
7847 (i386-mpx.c): Remove.
7848 (i386-mpx-linux.c): Remove.
7849 (i386-avx-mpx-avx512-pku.c): Remove.
7850 (i386-avx-mpx-avx512-pku-linux.c): Remove.
7851 (i386-avx-mpx.c): Remove.
7852 (i386-avx-mpx-linux.c): Remove.
7853 (i386-mmx.c): Remove.
7854 (i386-mmx-linux.c): Remove.
7855 (reg-ia64.c): Remove.
7856 (reg-m32r.c): Remove.
7857 (reg-m68k.c): Remove.
7858 (reg-cf.c): Remove.
7859 (mips-linux.c): Remove.
7860 (mips-dsp-linux.c): Remove.
7861 (mips64-linux.c): Remove.
7862 (mips64-dsp-linux.c): Remove.
7863 (nios2-linux.c): Remove.
7864 (powerpc-32.c): Remove.
7865 (powerpc-32l.c): Remove.
7866 (powerpc-altivec32l.c): Remove.
7867 (powerpc-cell32l.c): Remove.
7868 (powerpc-vsx32l.c): Remove.
7869 (powerpc-isa205-32l.c): Remove.
7870 (powerpc-isa205-altivec32l.c): Remove.
7871 (powerpc-isa205-vsx32l.c): Remove.
7872 (powerpc-e500l.c): Remove.
7873 (powerpc-64l.c): Remove.
7874 (powerpc-altivec64l.c): Remove.
7875 (powerpc-cell64l.c): Remove.
7876 (powerpc-vsx64l.c): Remove.
7877 (powerpc-isa205-64l.c): Remove.
7878 (powerpc-isa205-altivec64l.c): Remove.
7879 (powerpc-isa205-vsx64l.c): Remove.
7880 (s390-linux32.c): Remove.
7881 (s390-linux32v1.c): Remove.
7882 (s390-linux32v2.c): Remove.
7883 (s390-linux64.c): Remove.
7884 (s390-linux64v1.c): Remove.
7885 (s390-linux64v2.c): Remove.
7886 (s390-te-linux64.c): Remove.
7887 (s390-vx-linux64.c): Remove.
7888 (s390-tevx-linux64.c): Remove.
7889 (s390x-linux64.c): Remove.
7890 (s390x-linux64v1.c): Remove.
7891 (s390x-linux64v2.c): Remove.
7892 (s390x-te-linux64.c): Remove.
7893 (s390x-vx-linux64.c): Remove.
7894 (s390x-tevx-linux64.c): Remove.
7895 (tic6x-c64xp-linux.c): Remove.
7896 (tic6x-c64x-linux.c): Remove.
7897 (tic6x-c62x-linux.c): Remove.
7898 (reg-sh.c): Remove.
7899 (reg-sparc64.c): Remove.
7900 (reg-spu.c): Remove.
7901 (amd64.c): Remove.
7902 (amd64-linux.c): Remove.
7903 (amd64-avx.c): Remove.
7904 (amd64-avx-linux.c): Remove.
7905 (amd64-avx-avx512.c): Remove.
7906 (amd64-avx-avx512-linux.c): Remove.
7907 (amd64-mpx.c): Remove.
7908 (amd64-mpx-linux.c): Remove.
7909 (amd64-avx-mpx-avx512-pku.c): Remove.
7910 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
7911 (amd64-avx-mpx.c): Remove.
7912 (amd64-avx-mpx-linux.c): Remove.
7913 (x32.c): Remove.
7914 (x32-linux.c): Remove.
7915 (x32-avx.c): Remove.
7916 (x32-avx-linux.c): Remove.
7917 (x32-avx-avx512.c): Remove.
7918 (x32-avx-avx512-linux.c): Remove.
7919 (reg-xtensa.c): Remove.
7920 (reg-tilegx.c): Remove.
7921 (reg-tilegx32.c): Remove.
7922
7923 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
7924
7925 * Makefile.in (SFILES): Add "common/environ.c".
7926 (OBJS): Add "common/environ.h".
7927
7928 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
7929
7930 * configure.ac: Check if the fs_base and gs_base members of
7931 `struct user_regs_struct' exist.
7932 * config.in: Regenerated.
7933 * configure: Likewise.
7934
7935 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
7936
7937 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
7938 target_read_memory.
7939 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
7940 (get_next_pcs_syscall_next_pc): Likewise.
7941
7942 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
7943
7944 * win32-i386-low.c: Fix incorrect reference to a couple source files.
7945 * nto-x86-low.c: Likewise.
7946
7947 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
7948
7949 * Makefile.in: Include disable-implicit-rules.mk.
7950
7951 2016-11-23 Pedro Alves <palves@redhat.com>
7952
7953 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
7954 (debug_vprintf): Use std::chrono::steady_clock instead of
7955 gettimeofday. Use '.' instead of ':'.
7956 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
7957 (get_timestamp): Use std::chrono::steady_clock instead of
7958 gettimeofday.
7959
7960 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7961
7962 * Makefile.in: Fix whitespace formatting.
7963
7964 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
7965
7966 * Makefile.in (SFILES, OBS): Flatten list and order
7967 alphabetically.
7968
7969 2016-11-23 Pedro Alves <palves@redhat.com>
7970
7971 * event-loop.c (handle_file_event): Use warning.
7972 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
7973 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7974 Use warning.
7975
7976 2016-11-23 Pedro Alves <palves@redhat.com>
7977
7978 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
7979 output.
7980 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
7981 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
7982 debug_printf and debug_flush for debug output.
7983 * server.c (handle_general_set): Likewise.
7984 * thread-db.c (try_thread_db_load): Use debug_printf for debug
7985 output.
7986
7987 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7988
7989 * Makefile.in (.c.o): Replace rule with ...
7990 (%.o: %.c): ... this one.
7991
7992 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
7993
7994 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
7995 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
7996 make.
7997 * configure.ac: Remove checks for the make program.
7998 * configure: Re-generate.
7999
8000 2016-10-28 Pedro Alves <palves@redhat.com>
8001
8002 * Makefile.in (CXX_DIALECT): Get from configure.
8003 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
8004 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
8005 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
8006 * config.in: Regenerate.
8007 * configure: Regenerate.
8008
8009 2016-10-27 Yao Qi <yao.qi@linaro.org>
8010
8011 * linux-low.c (linux_supports_range_stepping): Return true if
8012 can_software_single_step return true.
8013
8014 2016-10-27 Yao Qi <yao.qi@linaro.org>
8015
8016 * inferiors.c (find_inferior_in_random): New function.
8017 * inferiors.h (find_inferior_in_random): Declare.
8018 * linux-low.c (linux_wait_for_event_filtered): Call
8019 find_inferior_in_random instead of find_inferior.
8020
8021 2016-10-27 Yao Qi <yao.qi@linaro.org>
8022
8023 * linux-low.c (linux_wait_1): If single-step breakpoints are
8024 inserted, remove them.
8025
8026 2016-10-26 Pedro Alves <palves@redhat.com>
8027
8028 * linux-low.c (handle_extended_wait): Link parent/child fork
8029 threads.
8030 (linux_wait_1): Unlink them.
8031 (linux_set_resume_request): Ignore resume requests for
8032 already-resumed and unhandled fork child threads.
8033 * linux-low.h (struct lwp_info) <fork_relative>: New field.
8034 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
8035 New functions.
8036 (handle_v_requests) <vCont>: Don't call require_running.
8037 * server.h (in_queued_stop_replies): New declaration.
8038
8039 2016-10-24 Yao Qi <yao.qi@linaro.org>
8040
8041 PR server/20733
8042 * linux-aarch64-low.c (append_insns): Cast the return value to
8043 'uint32_t *'.
8044
8045 2016-10-10 Yao Qi <yao.qi@linaro.org>
8046
8047 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
8048
8049 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
8050
8051 * target.c (target_supports_multi_process): New function, moved
8052 from...
8053 * target.h (target_supports_multi_process): ... here. Remove
8054 macro.
8055
8056 2016-10-05 Tom Tromey <tom@tromey.com>
8057
8058 PR remote/20655:
8059 * tracepoint.c (handle_tracepoint_bkpts): Check
8060 ipa_error_tracepoint, not ipa_stopping_tracepoint.
8061
8062 2016-10-05 Yao Qi <yao.qi@linaro.org>
8063
8064 * configure.srv: Update the path of arm-*.xml files.
8065
8066 2016-10-05 Terry Guo <terry.guo@arm.com>
8067 Yao Qi <yao.qi@linaro.org>
8068
8069 * Makefile.in: Adjust the path of rules.
8070 * configure.srv: Update the path of xml files.
8071 * regformats/arm-with-iwmmxt.dat: Regenerated.
8072 * regformats/arm-with-neon.dat: Likewise.
8073 * regformats/arm-with-vfpv2.dat: Likewise.
8074 * regformats/arm-with-vfpv3.dat Likewise.
8075
8076 2016-09-30 Yao Qi <yao.qi@linaro.org>
8077
8078 PR gdbserver/20627
8079 * target.c (target_stop_and_wait): Don't call
8080 target_continue_no_signal, use resume_stop instead.
8081
8082 2016-09-26 Yao Qi <yao.qi@linaro.org>
8083
8084 * linux-low.c (linux_wait_1): Call debug_exit.
8085
8086 2016-09-23 Pedro Alves <palves@redhat.com>
8087
8088 * Makefile.in (SFILES): Add common/new-op.c.
8089 (OBS): Add common/new-op.o.
8090 (new-op.o): New rule.
8091
8092 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
8093
8094 * .gitinore: Ignore more files.
8095
8096 2016-09-21 Yao Qi <yao.qi@linaro.org>
8097
8098 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
8099 23.
8100
8101 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
8102
8103 * server.c (start_inferior): Call target_mourn_inferior instead of
8104 mourn_inferior; pass ptid_t argument to it.
8105 (resume): Likewise.
8106 (handle_target_event): Likewise.
8107 * target.c (target_mourn_inferior): New function.
8108 * target.h (mourn_inferior): Delete macro.
8109
8110 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
8111
8112 * linux-low.c (lwp_is_stepping): New function.
8113
8114 2016-09-06 Carl Love <cel@us.ibm.com>
8115
8116 * server.c (start_inferior): Fixed comment, requested comment change
8117 didn't get updated correctly. Removed reference to ptrace () call as
8118 it is only true on Linux systems.
8119
8120 2016-09-06 Carl Love <cel@us.ibm.com>
8121
8122 * server.c (start_inferior): Do not call
8123 function target_post_create_inferior () if the
8124 inferior process has already exited.
8125
8126 2016-09-05 Pedro Alves <palves@redhat.com>
8127
8128 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
8129 (COMPILE.pre, CC_LD): Use CXX directly.
8130 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
8131 * acinclude.m4: Don't include build-with-cxx.m4.
8132 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
8133 * configure: Regenerate.
8134
8135 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
8136
8137 PR gdb/19495
8138 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
8139 call writing data to own_buf.
8140
8141 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
8142
8143 * target.c (mywait): Call target_wait instead of
8144 the_target->wait.
8145 (target_wait): New function.
8146
8147 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
8148
8149 * server.c (start_inferior): New variable 'ptid'. Replace calls
8150 to the_target->resume by target_continue{,_no_signal}, depending
8151 on the case.
8152 * target.c (target_stop_and_wait): Call target_continue_no_signal
8153 instead of the_target->resume.
8154 (target_continue): New function.
8155
8156 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
8157
8158 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
8159
8160 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
8161
8162 PR server/20491
8163 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
8164 ps_prochandle.
8165 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
8166 * linux-arm-low.c (ps_get_thread_area): Likewise.
8167 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
8168 * linux-m68k-low.c (ps_get_thread_area): Likewise.
8169 * linux-mips-low.c (ps_get_thread_area): Likewise.
8170 * linux-nios2-low.c (ps_get_thread_area): Likewise.
8171 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
8172 * linux-x86-low.c (ps_get_thread_area): Likewise.
8173 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
8174
8175 2016-08-19 Pedro Alves <palves@redhat.com>
8176
8177 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
8178
8179 2016-08-19 Pedro Alves <palves@redhat.com>
8180
8181 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
8182 comment. Use memcpy instead of casting through unsigned long.
8183
8184 2016-08-19 Pedro Alves <palves@redhat.com>
8185
8186 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
8187 allocating around 0x80000000.
8188
8189 2016-08-19 Pedro Alves <palves@redhat.com>
8190
8191 PR gdb/20415
8192 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
8193 (x32-avx512-linux-ipa.o): New rules.
8194 * configure.ac (x86_64-*-linux*): New x32 check.
8195 * configure.srv (ipa_x32_linux_regobj): New.
8196 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
8197 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
8198 descriptions.
8199 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
8200 descriptions.
8201 * configure: Regenerate.
8202
8203 2016-08-09 Pedro Alves <palves@redhat.com>
8204
8205 PR gdb/18653
8206 * Makefile.in (OBS): Add signals-state-save-restore.o.
8207 (signals-state-save-restore.o): New rule.
8208 * config.in: Regenerate.
8209 * configure: Regenerate.
8210 * linux-low.c: Include "signals-state-save-restore.h".
8211 (linux_create_inferior): Call
8212 restore_original_signals_state.
8213 * server.c: Include "dispositions-save-restore.h".
8214 (captured_main): Call save_original_signals_state.
8215
8216 2016-08-05 Pedro Alves <palves@redhat.com>
8217
8218 * configure: Regenerate.
8219
8220 2016-08-04 Yao Qi <yao.qi@linaro.org>
8221
8222 * linux-low.c (regsets_fetch_inferior_registers): Check
8223 errno is ESRCH or not.
8224
8225 2016-08-02 Yao Qi <yao.qi@linaro.org>
8226
8227 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
8228 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
8229 (thread_db_load_search): Update.
8230 (try_thread_db_load_1): Don't look for td_ta_event_addr,
8231 td_ta_set_event and td_ta_event_getmsg.
8232
8233 2016-07-26 Pedro Alves <palves@redhat.com>
8234
8235 PR server/20414
8236 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
8237 of unsigned long for 64-bit registers and use uint32_t instead of
8238 unsigned int for 32-bit registers.
8239
8240 2016-07-26 Pedro Alves <palves@redhat.com>
8241
8242 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
8243 to 'ptrace'.
8244
8245 2016-07-21 Tom Tromey <tom@tromey.com>
8246
8247 * configure: Rebuild.
8248
8249 2016-07-21 Yao Qi <yao.qi@linaro.org>
8250
8251 * mem-break.c (find_gdb_breakpoint): Cast bp to
8252 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
8253
8254 2016-07-21 Yao Qi <yao.qi@linaro.org>
8255
8256 * server.c (handle_v_requests): Support s and S actions
8257 if target_supports_software_single_step return true.
8258
8259 2016-07-21 Yao Qi <yao.qi@linaro.org>
8260
8261 * linux-low.c (resume_stopped_resumed_lwps): If resume request
8262 is resume_step, call maybe_hw_step.
8263 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
8264 and unstop them.
8265 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
8266 breakpoints or not.
8267 (proceed_one_lwp): If resume request is resume_step, install
8268 reinsert breakpoints and call maybe_hw_step.
8269
8270 2016-07-21 Yao Qi <yao.qi@linaro.org>
8271
8272 * linux-low.c (proceed_one_lwp): Declare.
8273 (linux_resume_one_thread): Remove local variable 'step'.
8274 Lift code enqueue signal. Call proceed_one_lwp instead of
8275 linux_resume_one_lwp.
8276
8277 2016-07-21 Yao Qi <yao.qi@linaro.org>
8278
8279 * linux-low.c (linux_resume_one_thread): Call
8280 enqueue_pending_signal.
8281
8282 2016-07-21 Yao Qi <yao.qi@linaro.org>
8283
8284 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
8285 * inferiors.c (do_restore_current_thread_cleanup): New function.
8286 (make_cleanup_restore_current_thread): Likewise.
8287 * linux-low.c (install_software_single_step_breakpoints): Call
8288 make_cleanup_restore_current_thread. Switch current_thread to
8289 thread.
8290
8291 2016-07-21 Yao Qi <yao.qi@linaro.org>
8292
8293 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
8294 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
8295 (clone_one_breakpoint): Likewise.
8296 (delete_reinsert_breakpoints): Change parameter to thread.
8297 Callers updated.
8298 (has_reinsert_breakpoints): Likewise.
8299 (uninsert_reinsert_breakpoints): Likewise.
8300 (reinsert_reinsert_breakpoints): Likewise.
8301 * mem-break.h (set_reinsert_breakpoint): Update declaration.
8302 (delete_reinsert_breakpoints): Likewise.
8303 (reinsert_reinsert_breakpoints): Likewise.
8304 (uninsert_reinsert_breakpoints): Likewise.
8305 (has_reinsert_breakpoints): Likewise.
8306
8307 2016-07-21 Yao Qi <yao.qi@linaro.org>
8308
8309 * inferiors.c (get_thread_process): Make parameter const.
8310 * inferiors.h (get_thread_process): Update declaration.
8311 * mem-break.c (clone_all_breakpoints): Remove all parameters.
8312 Add new parameters child_thread and parent_thread. Callers
8313 updated.
8314 * mem-break.h (clone_all_breakpoints): Update declaration.
8315
8316 2016-07-21 Yao Qi <yao.qi@linaro.org>
8317
8318 * mem-break.c (struct breakpoint) <cond_list>: Remove.
8319 <command_list, handler>: Remove.
8320 (struct gdb_breakpoint): New.
8321 (struct other_breakpoint): New.
8322 (struct reinsert_breakpoint): New.
8323 (is_gdb_breakpoint): New function.
8324 (any_persistent_commands): Update command_list if
8325 is_gdb_breakpoint returns true.
8326 (set_breakpoint): Create breakpoints according to their types.
8327 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
8328 (set_gdb_breakpoint_1): Likewise.
8329 (set_gdb_breakpoint): Likewise.
8330 (clear_breakpoint_conditions): Change parameter type to
8331 'struct gdb_breakpoint *'.
8332 (clear_breakpoint_commands): Likewise.
8333 (clear_breakpoint_conditions_and_commands): Likewise.
8334 (add_condition_to_breakpoint): Likewise.
8335 (add_breakpoint_condition): Likewise.
8336 (add_commands_to_breakpoint): Likewise.
8337 (check_breakpoints): Check other_breakpoint.
8338 (clone_one_breakpoint): Clone breakpopint according to its type.
8339 * mem-break.h (struct gdb_breakpoint): Declare.
8340 (set_gdb_breakpoint): Update declaration.
8341 (clear_breakpoint_conditions_and_commands): Likewise.
8342 (add_breakpoint_condition): Likewise.
8343 (add_breakpoint_commands): Likewise.
8344 * server.c (process_point_options): Change parameter type to
8345 'struct gdb_breakpoint *'.
8346
8347 2016-07-21 Yao Qi <yao.qi@linaro.org>
8348
8349 * mem-break.c (set_breakpoint_at): Rename it to ...
8350 (set_breakpoint_type_at): ... it.
8351 (set_breakpoint_at): Call set_breakpoint_type_at.
8352 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
8353 * mem-break.h (set_breakpoint_at): Update comments.
8354
8355 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
8356
8357 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
8358 to buf parameter.
8359 (nios2_store_gregset): Likewise.
8360
8361 2016-07-01 Pedro Alves <palves@redhat.com>
8362 Antoine Tremblay <antoine.tremblay@ericsson.com>
8363
8364 * linux-low.c: Change interface to take the target lwp_info
8365 pointer directly and return void. Handle detaching from a zombie
8366 thread.
8367 (linux_detach_lwp_callback): New function.
8368 (linux_detach): Detach from the leader thread after detaching from
8369 the clone threads.
8370
8371 2016-06-28 Yao Qi <yao.qi@linaro.org>
8372
8373 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
8374 for variable new_offset.
8375 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
8376 (aarch64_ftrace_insn_reloc_cb): Likewise.
8377 (aarch64_ftrace_insn_reloc_tb): Likewise.
8378 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
8379 PRIx64 instead of PRIx32.
8380
8381 2016-06-28 Yao Qi <yao.qi@linaro.org>
8382
8383 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
8384 (the_low_target): Install arm_get_syscall_trapinfo.
8385
8386 2016-06-28 Yao Qi <yao.qi@linaro.org>
8387
8388 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
8389 function.
8390 (the_low_target): Install aarch64_get_syscall_trapinfo.
8391
8392 2016-06-28 Yao Qi <yao.qi@linaro.org>
8393
8394 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
8395 Callers updated.
8396 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
8397 Remove parameter sysno.
8398 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
8399 sysret.
8400
8401 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
8402
8403 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
8404 (s390_emit_ne_goto): Likewise.
8405 (s390_emit_lt_goto): Likewise.
8406 (s390_emit_le_goto): Likewise.
8407 (s390_emit_gt_goto): Likewise.
8408 (s390_emit_ge_goto): Likewise.
8409 (s390x_emit_eq_goto): Likewise.
8410 (s390x_emit_ne_goto): Likewise.
8411 (s390x_emit_lt_goto): Likewise.
8412 (s390x_emit_le_goto): Likewise.
8413 (s390x_emit_gt_goto): Likewise.
8414 (s390x_emit_ge_goto): Likewise.
8415 (s390_emit_ops_impl): Mark variable static.
8416 (s390x_emit_ops): Likewise.
8417
8418 2016-06-17 Yao Qi <yao.qi@linaro.org>
8419
8420 * linux-low.c (handle_extended_wait): Call
8421 uninsert_reinsert_breakpoints for the parent process. Remove
8422 reinsert breakpoints from the child process. Reinsert them to
8423 the parent process when vfork is done.
8424 * mem-break.c (uninsert_reinsert_breakpoints): New function.
8425 (reinsert_reinsert_breakpoints): New function.
8426 * mem-break.h (uninsert_reinsert_breakpoints): Declare
8427 (reinsert_reinsert_breakpoints): Declare.
8428
8429 2016-06-17 Yao Qi <yao.qi@linaro.org>
8430
8431 * linux-low.c (handle_extended_wait): If the parent is doing
8432 step-over, remove the reinsert breakpoints from the forked child.
8433
8434 2016-06-17 Yao Qi <yao.qi@linaro.org>
8435
8436 * linux-low.c (unsuspend_all_lwps): Declare.
8437 (linux_low_filter_event): If thread exited, call finish_step_over.
8438 If step-over is finished, unsuspend other threads.
8439
8440 2016-06-17 Yao Qi <yao.qi@linaro.org>
8441
8442 * linux-low.c (linux_resume_one_lwp_throw): Assert
8443 has_reinsert_breakpoints returns false.
8444 * mem-break.c (delete_disabled_breakpoints): Assert
8445 bp type isn't reinsert_breakpoint.
8446
8447 2016-06-17 Yao Qi <yao.qi@linaro.org>
8448
8449 * linux-low.c (maybe_hw_step): New function.
8450 (linux_resume_one_lwp_throw): Call maybe_hw_step.
8451 (finish_step_over): Switch current_thread to lwp temporarily,
8452 and assert has_reinsert_breakpoints returns true.
8453 (proceed_one_lwp): Call maybe_hw_step.
8454 * mem-break.c (has_reinsert_breakpoints): New function.
8455 * mem-break.h (has_reinsert_breakpoints): Declare.
8456
8457 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
8458
8459 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
8460
8461 2016-05-17 Yao Qi <yao.qi@linaro.org>
8462
8463 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
8464 instead of find_inferior.
8465
8466 2016-05-05 Yao Qi <yao.qi@linaro.org>
8467
8468 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
8469 Initialize res to zero.
8470
8471 2016-05-05 Yao Qi <yao.qi@linaro.org>
8472
8473 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
8474 to uint32_t.
8475
8476 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
8477
8478 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
8479 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
8480 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
8481
8482 2016-04-28 Par Olsson <par.olsson@windriver.com>
8483 Simon Marchi <simon.marchi@ericsson.com>
8484
8485 * tracepoint.c (write_inferior_int8): New function.
8486 (cmd_qtenable_disable): Write enable flag using
8487 write_inferior_int8.
8488
8489 2016-04-25 Yao Qi <yao.qi@linaro.org>
8490
8491 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
8492 (need_step_over_p): Return zero if the LWP has pending signals
8493 can be delivered on software single step target.
8494
8495 2016-04-25 Yao Qi <yao.qi@linaro.org>
8496
8497 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
8498 return instead of error.
8499
8500 2016-04-22 Yao Qi <yao.qi@linaro.org>
8501
8502 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
8503 to 23.
8504
8505 2016-04-22 Yao Qi <yao.qi@linaro.org>
8506
8507 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
8508 signal when stepping over breakpoint with software single
8509 step.
8510
8511 2016-04-21 Pedro Alves <palves@redhat.com>
8512
8513 * linux-s390-low.c (s390_collect_ptrace_register)
8514 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
8515 add casts.
8516 (s390_check_regset): Use void * instead of gdb_byte *.
8517
8518 2016-04-20 Pedro Alves <palves@redhat.com>
8519
8520 * configure: Renegerate.
8521
8522 2016-04-20 Yao Qi <yao.qi@linaro.org>
8523
8524 * linux-aarch32-low.c: Include "arch/arm-linux.h".
8525 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
8526 number 16.
8527 (arm_store_gregset): Likewise.
8528
8529 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
8530
8531 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
8532 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
8533 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
8534 (amd64-avx-mpx-linux.c): New rules.
8535 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
8536 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
8537 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
8538 (srv_amd64_regobj): Add amd64-avx-mpx.o.
8539 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
8540 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
8541 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
8542 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
8543 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
8544 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
8545 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
8546 * linux-x86-low.c (x86_linux_read_description): Add case for
8547 X86_XSTATE_AVX_MPX_MASK.
8548 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
8549 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
8550 init_registers_i386_avx_mpx_linux.
8551 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8552 (initialize_low_tracepoint): Call
8553 init_registers_i386_avx_mpx_linux.
8554 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
8555 (initialize_low_tracepoint): Call
8556 init_registers_amd64_avx_mpx_linux.
8557 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
8558 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
8559 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
8560 declarations.
8561
8562 2016-04-18 Pedro Alves <palves@redhat.com>
8563
8564 * configure: Regenerate.
8565
8566 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
8567
8568 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
8569 (aarch64_emit_sub): Likewise.
8570
8571 2016-04-12 Pedro Alves <palves@redhat.com>
8572
8573 * utils.c (prepare_to_throw_exception): Delete.
8574
8575 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
8576
8577 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
8578
8579 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
8580
8581 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
8582
8583 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
8584
8585 * linux-aarch64-ipa.c: Add <elf.h> include.
8586 * linux-ppc-ipa.c: Add <elf.h> include.
8587 * linux-s390-ipa.c: Add <elf.h> include.
8588
8589 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8590
8591 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
8592 (get_raw_reg_ptr): Likewise.
8593 (get_trace_state_variable_value_ptr): Likewise.
8594 (set_trace_state_variable_value_ptr): Likewise.
8595 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
8596 char *.
8597
8598 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8599 Marcin Kościelnicki <koriakin@0x04.net>
8600
8601 PR/17221
8602 * linux-ppc-low.c (emit_insns): New function.
8603 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
8604 (ppc_emit_prologue): New function.
8605 (ppc_emit_epilogue): New function.
8606 (ppc_emit_add): New function.
8607 (ppc_emit_sub): New function.
8608 (ppc_emit_mul): New function.
8609 (ppc_emit_lsh): New function.
8610 (ppc_emit_rsh_signed): New function.
8611 (ppc_emit_rsh_unsigned): New function.
8612 (ppc_emit_ext): New function.
8613 (ppc_emit_zero_ext): New function.
8614 (ppc_emit_log_not): New function.
8615 (ppc_emit_bit_and): New function.
8616 (ppc_emit_bit_or): New function.
8617 (ppc_emit_bit_xor): New function.
8618 (ppc_emit_bit_not): New function.
8619 (ppc_emit_equal): New function.
8620 (ppc_emit_less_signed): New function.
8621 (ppc_emit_less_unsigned): New function.
8622 (ppc_emit_ref): New function.
8623 (ppc_emit_const): New function.
8624 (ppc_emit_reg): New function.
8625 (ppc_emit_pop): New function.
8626 (ppc_emit_stack_flush): New function.
8627 (ppc_emit_swap): New function.
8628 (ppc_emit_stack_adjust): New function.
8629 (ppc_emit_call): New function.
8630 (ppc_emit_int_call_1): New function.
8631 (ppc_emit_void_call_2): New function.
8632 (ppc_emit_if_goto): New function.
8633 (ppc_emit_goto): New function.
8634 (ppc_emit_eq_goto): New function.
8635 (ppc_emit_ne_goto): New function.
8636 (ppc_emit_lt_goto): New function.
8637 (ppc_emit_le_goto): New function.
8638 (ppc_emit_gt_goto): New function.
8639 (ppc_emit_ge_goto): New function.
8640 (ppc_write_goto_address): New function.
8641 (ppc_emit_ops_impl): New static variable.
8642 (ppc64v1_emit_prologue): New function.
8643 (ppc64v2_emit_prologue): New function.
8644 (ppc64_emit_epilogue): New function.
8645 (ppc64_emit_add): New function.
8646 (ppc64_emit_sub): New function.
8647 (ppc64_emit_mul): New function.
8648 (ppc64_emit_lsh): New function.
8649 (ppc64_emit_rsh_signed): New function.
8650 (ppc64_emit_rsh_unsigned): New function.
8651 (ppc64_emit_ext): New function.
8652 (ppc64_emit_zero_ext): New function.
8653 (ppc64_emit_log_not): New function.
8654 (ppc64_emit_bit_and): New function.
8655 (ppc64_emit_bit_or): New function.
8656 (ppc64_emit_bit_xor): New function.
8657 (ppc64_emit_bit_not): New function.
8658 (ppc64_emit_equal): New function.
8659 (ppc64_emit_less_signed): New function.
8660 (ppc64_emit_less_unsigned): New function.
8661 (ppc64_emit_ref): New function.
8662 (ppc64_emit_const): New function.
8663 (ppc64v1_emit_reg): New function.
8664 (ppc64v2_emit_reg): New function.
8665 (ppc64_emit_pop): New function.
8666 (ppc64_emit_stack_flush): New function.
8667 (ppc64_emit_swap): New function.
8668 (ppc64v1_emit_call): New function.
8669 (ppc64v2_emit_call): New function.
8670 (ppc64v1_emit_int_call_1): New function.
8671 (ppc64v2_emit_int_call_1): New function.
8672 (ppc64v1_emit_void_call_2): New function.
8673 (ppc64v2_emit_void_call_2): New function.
8674 (ppc64_emit_if_goto): New function.
8675 (ppc64_emit_eq_goto): New function.
8676 (ppc64_emit_ne_goto): New function.
8677 (ppc64_emit_lt_goto): New function.
8678 (ppc64_emit_le_goto): New function.
8679 (ppc64_emit_gt_goto): New function.
8680 (ppc64_emit_ge_goto): New function.
8681 (ppc64v1_emit_ops_impl): New static variable.
8682 (ppc64v2_emit_ops_impl): New static variable.
8683 (ppc_emit_ops): New function.
8684 (linux_low_target): Wire in ppc_emit_ops.
8685
8686 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
8687 Marcin Kościelnicki <koriakin@0x04.net>
8688
8689 PR/17221
8690 * Makefile.in: Add powerpc-*-ipa.o
8691 * configure.srv: Add ipa_obj for powerpc*-linux.
8692 * linux-ppc-ipa.c: New file.
8693 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
8694 includes.
8695 (PPC_FIELD): New macro.
8696 (PPC_SEXT): New macro.
8697 (PPC_OP6): New macro.
8698 (PPC_BO): New macro.
8699 (PPC_LI): New macro.
8700 (PPC_BD): New macro.
8701 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
8702 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
8703 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
8704 (ppc_get_thread_area): New function.
8705 (is_elfv2_inferior): New function.
8706 (gen_ds_form): New function.
8707 (GEN_STD): New macro.
8708 (GEN_STDU): New macro.
8709 (GEN_LD): New macro.
8710 (GEN_LDU): New macro.
8711 (gen_d_form): New function.
8712 (GEN_ADDI): New macro.
8713 (GEN_ADDIS): New macro.
8714 (GEN_LI): New macro.
8715 (GEN_LIS): New macro.
8716 (GEN_ORI): New macro.
8717 (GEN_ORIS): New macro.
8718 (GEN_LWZ): New macro.
8719 (GEN_STW): New macro.
8720 (GEN_STWU): New macro.
8721 (gen_xfx_form): New function.
8722 (GEN_MFSPR): New macro.
8723 (GEN_MTSPR): New macro.
8724 (GEN_MFCR): New macro.
8725 (GEN_MTCR): New macro.
8726 (GEN_SYNC): New macro.
8727 (GEN_LWSYNC): New macro.
8728 (gen_x_form): New function.
8729 (GEN_OR): New macro.
8730 (GEN_MR): New macro.
8731 (GEN_LWARX): New macro.
8732 (GEN_STWCX): New macro.
8733 (GEN_CMPW): New macro.
8734 (gen_md_form): New function.
8735 (GEN_RLDICL): New macro.
8736 (GEN_RLDICR): New macro.
8737 (gen_i_form): New function.
8738 (GEN_B): New macro.
8739 (GEN_BL): New macro.
8740 (gen_b_form): New function.
8741 (GEN_BNE): New macro.
8742 (GEN_LOAD): New macro.
8743 (GEN_STORE): New macro.
8744 (gen_limm): New function.
8745 (gen_atomic_xchg): New function.
8746 (gen_call): New function.
8747 (ppc_relocate_instruction): New function.
8748 (ppc_install_fast_tracepoint_jump_pad): New function.
8749 (ppc_get_min_fast_tracepoint_insn_len): New function.
8750 (ppc_get_ipa_tdesc_idx): New function.
8751 (the_low_target): Wire in the new functions.
8752 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
8753 tdescs.
8754 * linux-ppc-tdesc.h: New file.
8755
8756 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8757
8758 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8759 (alloc_jump_pad_buffer): New function.
8760 * linux-amd64-ipa.c: Add <sys/mman.h> include.
8761 (alloc_jump_pad_buffer): New function.
8762 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
8763 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
8764 (alloc_jump_pad_buffer): New function.
8765 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
8766 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
8767 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
8768 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
8769
8770 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8771
8772 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
8773 * linux-amd64-ipa.c: Likewise.
8774 * linux-i386-ipa.c: Likewise.
8775 * linux-s390-ipa.c: Likewise.
8776 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
8777 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
8778 set_trace_state_variable_value_ptr.
8779 (struct ipa_sym_addresses): Likewise.
8780 (symbol_list): Likewise.
8781 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
8782 accessing gdb_collect directly.
8783 (gdb_collect_ptr_type): New typedef.
8784 (get_raw_reg_ptr_type): New typedef.
8785 (get_trace_state_variable_value_ptr_type): New typedef.
8786 (set_trace_state_variable_value_ptr_type): New typedef.
8787 (gdb_collect_ptr): New global.
8788 (get_raw_reg_ptr): New global.
8789 (get_trace_state_variable_value_ptr): New global.
8790 (set_trace_state_variable_value_ptr): New global.
8791 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
8792 accessing get_raw_reg directly.
8793 (get_get_tsv_func_addr): Likewise for
8794 get_trace_state_variable_value_ptr.
8795 (get_set_tsv_func_addr): Likewise for
8796 set_trace_state_variable_value_ptr.
8797 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
8798
8799 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
8800
8801 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
8802
8803 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
8804
8805 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
8806 packets.
8807 (relocate_instruction): Remove own_buf.
8808 * server.c (own_buf): Make global.
8809 (handle_v_requests): Make global.
8810 * server.h (own_buf): New declaration.
8811 (handle_v_requests): New prototype.
8812
8813 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8814
8815 PR 18377
8816 * linux-s390-low.c (add_insns): New function.
8817 (s390_emit_prologue): New function.
8818 (s390_emit_epilogue): New function.
8819 (s390_emit_add): New function.
8820 (s390_emit_sub): New function.
8821 (s390_emit_mul): New function.
8822 (s390_emit_lsh): New function.
8823 (s390_emit_rsh_signed): New function.
8824 (s390_emit_rsh_unsigned): New function.
8825 (s390_emit_ext): New function.
8826 (s390_emit_log_not): New function.
8827 (s390_emit_bit_and): New function.
8828 (s390_emit_bit_or): New function.
8829 (s390_emit_bit_xor): New function.
8830 (s390_emit_bit_not): New function.
8831 (s390_emit_equal): New function.
8832 (s390_emit_less_signed): New function.
8833 (s390_emit_less_unsigned): New function.
8834 (s390_emit_ref): New function.
8835 (s390_emit_if_goto): New function.
8836 (s390_emit_goto): New function.
8837 (s390_write_goto_address): New function.
8838 (s390_emit_litpool): New function.
8839 (s390_emit_const): New function.
8840 (s390_emit_call): New function.
8841 (s390_emit_reg): New function.
8842 (s390_emit_pop): New function.
8843 (s390_emit_stack_flush): New function.
8844 (s390_emit_zero_ext): New function.
8845 (s390_emit_swap): New function.
8846 (s390_emit_stack_adjust): New function.
8847 (s390_emit_set_r2): New function.
8848 (s390_emit_int_call_1): New function.
8849 (s390_emit_void_call_2): New function.
8850 (s390_emit_eq_goto): New function.
8851 (s390_emit_ne_goto): New function.
8852 (s390_emit_lt_goto): New function.
8853 (s390_emit_le_goto): New function.
8854 (s390_emit_gt_goto): New function.
8855 (s390_emit_ge_goto): New function.
8856 (s390x_emit_prologue): New function.
8857 (s390x_emit_epilogue): New function.
8858 (s390x_emit_add): New function.
8859 (s390x_emit_sub): New function.
8860 (s390x_emit_mul): New function.
8861 (s390x_emit_lsh): New function.
8862 (s390x_emit_rsh_signed): New function.
8863 (s390x_emit_rsh_unsigned): New function.
8864 (s390x_emit_ext): New function.
8865 (s390x_emit_log_not): New function.
8866 (s390x_emit_bit_and): New function.
8867 (s390x_emit_bit_or): New function.
8868 (s390x_emit_bit_xor): New function.
8869 (s390x_emit_bit_not): New function.
8870 (s390x_emit_equal): New function.
8871 (s390x_emit_less_signed): New function.
8872 (s390x_emit_less_unsigned): New function.
8873 (s390x_emit_ref): New function.
8874 (s390x_emit_if_goto): New function.
8875 (s390x_emit_const): New function.
8876 (s390x_emit_call): New function.
8877 (s390x_emit_reg): New function.
8878 (s390x_emit_pop): New function.
8879 (s390x_emit_stack_flush): New function.
8880 (s390x_emit_zero_ext): New function.
8881 (s390x_emit_swap): New function.
8882 (s390x_emit_stack_adjust): New function.
8883 (s390x_emit_int_call_1): New function.
8884 (s390x_emit_void_call_2): New function.
8885 (s390x_emit_eq_goto): New function.
8886 (s390x_emit_ne_goto): New function.
8887 (s390x_emit_lt_goto): New function.
8888 (s390x_emit_le_goto): New function.
8889 (s390x_emit_gt_goto): New function.
8890 (s390x_emit_ge_goto): New function.
8891 (s390_emit_ops): New function.
8892 (struct linux_target_ops): Fill in emit_ops hook.
8893
8894 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8895
8896 PR 18377
8897 * Makefile.in: Add s390 IPA files.
8898 * configure.srv: Build IPA for s390.
8899 * linux-s390-ipa.c: New file.
8900 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
8901 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
8902 (tdesc_s390_linux32): Likewise.
8903 (init_registers_s390_linux32v1): Likewise.
8904 (tdesc_s390_linux32v1): Likewise.
8905 (init_registers_s390_linux32v2): Likewise.
8906 (tdesc_s390_linux32v2): Likewise.
8907 (init_registers_s390_linux64): Likewise.
8908 (tdesc_s390_linux64): Likewise.
8909 (init_registers_s390_linux64v1): Likewise.
8910 (tdesc_s390_linux64v1): Likewise.
8911 (init_registers_s390_linux64v2): Likewise.
8912 (tdesc_s390_linux64v2): Likewise.
8913 (init_registers_s390_te_linux64): Likewise.
8914 (tdesc_s390_te_linux64): Likewise.
8915 (init_registers_s390_vx_linux64): Likewise.
8916 (tdesc_s390_vx_linux64): Likewise.
8917 (init_registers_s390_tevx_linux64): Likewise.
8918 (tdesc_s390_tevx_linux64): Likewise.
8919 (init_registers_s390x_linux64): Likewise.
8920 (tdesc_s390x_linux64): Likewise.
8921 (init_registers_s390x_linux64v1): Likewise.
8922 (tdesc_s390x_linux64v1): Likewise.
8923 (init_registers_s390x_linux64v2): Likewise.
8924 (tdesc_s390x_linux64v2): Likewise.
8925 (init_registers_s390x_te_linux64): Likewise.
8926 (tdesc_s390x_te_linux64): Likewise.
8927 (init_registers_s390x_vx_linux64): Likewise.
8928 (tdesc_s390x_vx_linux64): Likewise.
8929 (init_registers_s390x_tevx_linux64): Likewise.
8930 (tdesc_s390x_tevx_linux64): Likewise.
8931 (have_hwcap_s390_vx): New static variable.
8932 (s390_arch_setup): Fill have_hwcap_s390_vx.
8933 (s390_get_thread_area): New function.
8934 (s390_ft_entry_gpr_esa): New const.
8935 (s390_ft_entry_gpr_zarch): New const.
8936 (s390_ft_entry_misc): New const.
8937 (s390_ft_entry_fr): New const.
8938 (s390_ft_entry_vr): New const.
8939 (s390_ft_main_31): New const.
8940 (s390_ft_main_64): New const.
8941 (s390_ft_exit_fr): New const.
8942 (s390_ft_exit_vr): New const.
8943 (s390_ft_exit_misc): New const.
8944 (s390_ft_exit_gpr_esa): New const.
8945 (s390_ft_exit_gpr_zarch): New const.
8946 (append_insns): New function.
8947 (s390_relocate_instruction): New function.
8948 (s390_install_fast_tracepoint_jump_pad): New function.
8949 (s390_get_min_fast_tracepoint_insn_len): New function.
8950 (s390_get_ipa_tdesc_idx): New function.
8951 (struct linux_target_ops): Wire in the above functions.
8952 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
8953 * linux-s390-tdesc.h: New file.
8954
8955 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
8956
8957 * linux-s390-low.c (s390_supports_tracepoints): New function.
8958 (struct linux_target_ops): Fill supports_tracepoints hook.
8959
8960 2016-03-18 Yao Qi <yao.qi@linaro.org>
8961
8962 * linux-low.c (lwp_signal_can_be_delivered): New function.
8963 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
8964
8965 2016-03-18 Yao Qi <yao.qi@linaro.org>
8966
8967 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
8968 0 if signal is enqueued. Remove 'signal' from one debugging
8969 message. Move one debugging message to some lines below.
8970 Remove code setting 'signal' to 0.
8971
8972 2016-03-18 Yao Qi <yao.qi@linaro.org>
8973
8974 * linux-low.c (linux_low_filter_event): Remove redundant
8975 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
8976
8977 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
8978
8979 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
8980 (struct linux_target_ops): Wire in the above.
8981
8982 2016-03-03 Yao Qi <yao.qi@linaro.org>
8983
8984 * linux-low.c: Update comments to start_step_over.
8985
8986 2016-03-03 Yao Qi <yao.qi@linaro.org>
8987
8988 PR server/19736
8989 * linux-low.c (handle_extended_wait): Set child suspended
8990 if event_lwp->bp_reinsert isn't zero.
8991
8992 2016-03-02 Yao Qi <yao.qi@linaro.org>
8993
8994 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
8995 enqueue_pending_signal.
8996
8997 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
8998
8999 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
9000 is actually loaded.
9001
9002 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
9003
9004 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
9005 (s390_regmap_3264) [!__s390x__]: New global.
9006 (s390_collect_ptrace_register): Skip map entries containing -1.
9007 (s390_supply_ptrace_register): Ditto.
9008 (s390_fill_gprs_high): New function.
9009 (s390_store_gprs_high): New function.
9010 (s390_regsets): Add NT_S390_HIGH_GPRS.
9011 (s390_get_hwcap): Enable on 31-bit.
9012 (have_hwcap_s390_high_gprs): Enable on 31-bit.
9013 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
9014 Detect NT_S390_HIGH_GPRS.
9015 (s390_usrregs_info_3264): Enable on 31-bit.
9016 (s390_regs_info): Enable regs_info_3264 on 31-bit.
9017 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
9018
9019 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
9020
9021 PR gdb/13808
9022 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
9023 * configure.srv: Ditto.
9024 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
9025 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
9026 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
9027 (init_registers_amd64_linux): Remove prototype.
9028 (tdesc_amd64_linux): Remove declaration.
9029 (get_ipa_tdesc): New function.
9030 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
9031 initialize remaining tdescs.
9032 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
9033 (init_registers_i386_linux): Remove prototype.
9034 (tdesc_i386_linux): Remove declaration.
9035 (get_ipa_tdesc): New function.
9036 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
9037 initialize remaining tdescs.
9038 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
9039 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
9040 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
9041 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
9042 (x86_get_ipa_tdesc_idx): New function.
9043 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
9044 * linux-x86-tdesc.h: New file.
9045 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
9046 (target_get_ipa_tdesc_idx): New macro.
9047 * tracepoint.c (ipa_tdesc_idx): New macro.
9048 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
9049 (symbol_list): Add ipa_tdesc_idx.
9050 (cmd_qtstart): Write ipa_tdesc_idx in the target.
9051 (ipa_tdesc): Remove.
9052 (ipa_tdesc_idx): New variable.
9053 (get_context_regcache): Use get_ipa_tdesc.
9054 (gdb_collect): Ditto.
9055 (gdb_probe): Ditto.
9056 * tracepoint.h (get_ipa_tdesc): New prototype.
9057 (ipa_tdesc): Remove.
9058
9059 2016-02-24 Pedro Alves <palves@redhat.com>
9060
9061 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
9062 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
9063 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
9064 Factor out common code between the USE_SIGTRAP_SIGINFO and
9065 !USE_SIGTRAP_SIGINFO blocks.
9066 (linux_low_filter_event): Call save_stop_reason instead of
9067 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
9068 Update comments.
9069 (linux_wait_1): Update comments.
9070
9071 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
9072
9073 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
9074 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
9075 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
9076 ppc_insert_point, ppc_remove_point.
9077
9078 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
9079
9080 * linux-s390-low.c (s390_supports_z_point_type): New function.
9081 (struct linux_target_ops): Wire s390_supports_z_point_type in.
9082
9083 2016-02-16 Yao Qi <yao.qi@linaro.org>
9084
9085 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
9086 PC. Get pc from regcache_read_pc.
9087
9088 2016-02-12 Yao Qi <yao.qi@linaro.org>
9089
9090 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
9091 or linux_get_pc_32bit.
9092 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
9093
9094 2016-02-12 Yao Qi <yao.qi@linaro.org>
9095
9096 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
9097 arm_linux_get_next_pcs_fixup.
9098
9099 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
9100
9101 * tracepoint.c (x_tracepoint_action_download): Change
9102 write_inferior_data_ptr to write_inferior_data_pointer.
9103 (cmd_qtstart): Likewise.
9104 (write_inferior_data_ptr): Remove.
9105 (download_agent_expr): Change write_inferior_data_ptr to
9106 write_inferior_data_pointer.
9107 (download_tracepoint_1): Likewise.
9108 (download_tracepoint): Likewise.
9109 (download_trace_state_variables): Likewise.
9110
9111 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
9112 Marcin Kościelnicki <koriakin@0x04.net>
9113
9114 * tracepoint.c (struct tracepoint_action_ops): Remove.
9115 (struct tracepoint_action): Remove ops.
9116 (m_tracepoint_action_download, r_tracepoint_action_download)
9117 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
9118 size and offset accordingly.
9119 (m_tracepoint_action_ops, r_tracepoint_action_ops)
9120 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
9121 (tracepoint_action_send, tracepoint_action_download): New functions.
9122 Helpers for trace action handlers.
9123 (add_tracepoint_action): Remove setup actions ops.
9124 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
9125
9126 2016-02-10 Yao Qi <yao.qi@linaro.org>
9127
9128 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
9129
9130 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
9131
9132 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
9133 to AC_OUTPUT.
9134 * configure: Regenerate.
9135
9136 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
9137
9138 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
9139 void * to gdb_byte *.
9140 * linux-low.c (siginfo_fixup): Likewise.
9141 (linux_xfer_siginfo): Likewise.
9142 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
9143 Likewise.
9144 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9145
9146 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
9147
9148 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
9149 to srv_tgtobj.
9150 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
9151 to srv_tgtobj.
9152 * linux-x86-low.c [__x86_64__]: Include
9153 "nat/amd64-linux-siginfo.h".
9154 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
9155 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
9156 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
9157 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
9158 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
9159 (cpt_si_fd, si_timerid, si_overrun): Move from
9160 nat/amd64-linux-siginfo.c.
9161 * Makefile.in (amd64-linux-siginfo.o:): New rule.
9162
9163 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
9164
9165 * server.c (skip_to_semicolon): Remove.
9166 (process_point_options): Use strchrnul instead of
9167 skip_to_semicolon.
9168
9169 2016-01-26 Yao Qi <yao.qi@linaro.org>
9170
9171 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
9172 * linux-low.c (install_software_single_step_breakpoints): Don't
9173 call regcache_read_pc.
9174 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
9175 argument pc.
9176
9177 2016-01-26 Yao Qi <yao.qi@linaro.org>
9178
9179 * linux-low.c (install_software_single_step_breakpoints): Call
9180 regcache_read_pc instead of get_pc.
9181
9182 2016-01-26 Yao Qi <yao.qi@linaro.org>
9183
9184 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
9185 (unblock_async_io): Rename to ...
9186 (block_unblock_async_io): ... it. New function.
9187 (enable_async_io): Don't install SIGIO handler. Unblock it
9188 instead.
9189 (disable_async_io): Don't ignore SIGIO. Block it instead.
9190 (initialize_async_io): Install SIGIO handler. Don't call
9191 unblock_async_io.
9192
9193 2016-01-26 Yao Qi <yao.qi@linaro.org>
9194
9195 * remote-utils.c (getpkt): If the buffer isn't empty, and the
9196 first character is '\003', call *the_target->request_interrupt.
9197
9198 2016-01-25 Yao Qi <yao.qi@linaro.org>
9199
9200 * remote-utils.c (new_thread_notify): Remove.
9201 (dead_thread_notify): Likewise.
9202 * remote-utils.h (new_thread_notify): Remove declaration.
9203 (dead_thread_notify): Likewise.
9204
9205 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
9206
9207 * gdb.trace/pending.exp: Fix expected message on continue.
9208
9209 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
9210
9211 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
9212 it works properly on big-endian machines where sizeof (CORE_ADDR)
9213 != sizeof (void *).
9214
9215 2016-01-21 Pedro Alves <palves@redhat.com>
9216
9217 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
9218 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
9219 * configure: Regenerate.
9220
9221 2016-01-21 Yao Qi <yao.qi@linaro.org>
9222
9223 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
9224 is_thumb and set it according to CPSR saved on the stack.
9225 (get_next_pcs_syscall_next_pc): Pass is_thumb to
9226 arm_sigreturn_next_pc.
9227
9228 2016-01-18 Yao Qi <yao.qi@linaro.org>
9229
9230 * linux-low.c (linux_set_pc_64bit): New function.
9231 (linux_get_pc_64bit): New function.
9232 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
9233 Declare.
9234 * linux-sparc-low.c (debug_threads): Remove declaration.
9235 (sparc_get_pc): Remove.
9236 (the_low_target): Use linux_get_pc_64bit instead of
9237 sparc_get_pc.
9238 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
9239 (the_low_target): Use linux_get_pc_64bit and
9240 linux_set_pc_64bit.
9241
9242 2016-01-18 Yao Qi <yao.qi@linaro.org>
9243
9244 * linux-arm-low.c (debug_threads): Remove declaration.
9245 (arm_get_pc, arm_set_pc): Remove.
9246 (the_low_target): Use linux_get_pc_32bit and
9247 linux_set_pc_32bit.
9248 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
9249 (the_low_target): Use linux_get_pc_32bit and
9250 linux_set_pc_32bit.
9251 * linux-cris-low.c (debug_threads): Remove declaration.
9252 (cris_get_pc, cris_set_pc,): Remove.
9253 (the_low_target): Use linux_get_pc_32bit and
9254 linux_set_pc_32bit.
9255 * linux-crisv32-low.c (debug_threads): Remove declaration.
9256 (cris_get_pc, cris_set_pc): Remove.
9257 (the_low_target): Use linux_get_pc_32bit and
9258 linux_set_pc_32bit.
9259 * linux-low.c: Include inttypes.h.
9260 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
9261 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
9262 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
9263 (the_low_target): Use linux_get_pc_32bit and
9264 linux_set_pc_32bit.
9265 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
9266 (the_low_target): Use linux_get_pc_32bit and
9267 linux_set_pc_32bit.
9268 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
9269 (the_low_target): Use linux_get_pc_32bit and
9270 linux_set_pc_32bit.
9271 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
9272 (the_low_target): Use linux_get_pc_32bit and
9273 linux_set_pc_32bit.
9274 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
9275 (the_low_target): Use linux_get_pc_32bit and
9276 linux_set_pc_32bit.
9277
9278 2016-01-18 Gary Benson <gbenson@redhat.com>
9279
9280 * configure.ac (AC_FUNC_FORK): New check.
9281 * config.in: Regenerate.
9282 * configure: Likewise.
9283
9284 2016-01-14 Yao Qi <yao.qi@linaro.org>
9285
9286 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
9287 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
9288 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
9289 arm_get_next_pcs_ctor.
9290
9291 2016-01-12 Josh Stone <jistone@redhat.com>
9292 Philippe Waroquiers <philippe.waroquiers@skynet.be>
9293
9294 * inferiors.h: Include "gdb_vecs.h".
9295 (struct process_info): Add syscalls_to_catch.
9296 * inferiors.c (remove_process): Free syscalls_to_catch.
9297 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
9298 syscall_return stops.
9299 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
9300 * server.c (handle_general_set): Handle QCatchSyscalls.
9301 (handle_query): Report support for QCatchSyscalls.
9302 * target.h (struct target_ops): Add supports_catch_syscall.
9303 (target_supports_catch_syscall): New macro.
9304 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
9305 (struct lwp_info): Add syscall_state.
9306 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
9307 Maintain syscall_state and syscalls_to_catch across exec.
9308 (get_syscall_trapinfo): New function, proxy to the_low_target.
9309 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
9310 (linux_low_filter_event): Toggle syscall_state entry/return for
9311 syscall traps, and set it ignored for all others.
9312 (gdb_catching_syscalls_p): New function.
9313 (gdb_catch_this_syscall_p): New function.
9314 (linux_wait_1): Handle SYSCALL_SIGTRAP.
9315 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
9316 (linux_supports_catch_syscall): New function.
9317 (linux_target_ops): Install it.
9318 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
9319 (the_low_target): Install it.
9320
9321 2016-01-12 Mike Frysinger <vapier@gentoo.org>
9322
9323 * acinclude.m4: Include new ../warning.m4 file.
9324 * configure: Regenerated.
9325 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
9326
9327 2016-01-12 Mike Frysinger <vapier@gentoo.org>
9328
9329 * ax.c (is_goto_target): Mark static.
9330 * linux-low.c (register_addr): Likewise.
9331 (linux_fetch_registers, linux_store_registers): Likewise.
9332 * mem-break.c (any_persistent_commands): Fix old prototype.
9333 (add_commands_to_breakpoint): Mark static.
9334 * regcache.c (find_register_by_name): Delete unused func.
9335 * remote-utils.c (hex_or_minus_one): Mark static.
9336 * server.c (monitor_show_help): Mark static.
9337 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
9338 handle_v_requests): Likewise.
9339
9340 2016-01-12 Pedro Alves <palves@redhat.com>
9341
9342 Remove use of the registered trademark symbol throughout.
9343
9344 2016-01-08 Yao Qi <yao.qi@linaro.org>
9345
9346 * remote-utils.c (getpkt): If c is '\003', call target hook
9347 request_interrupt.
9348
9349 2016-01-06 Yao Qi <yao.qi@linaro.org>
9350
9351 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
9352 linux-aarch32-low.c.
9353 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9354 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
9355 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9356 (thumb2_breakpoint): Declare.
9357 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
9358 linux-aarch32-low.h.
9359 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9360 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
9361 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9362
9363 2016-01-01 Joel Brobecker <brobecker@adacore.com>
9364
9365 * gdbreplay.c (gdbreplay_version): Change copyright year in
9366 version message.
9367 * server.c (gdbserver_version): Likewise.
9368
9369 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
9370
9371 * server.c (crc32_table): Delete.
9372 (crc32): Use libiberty's xcrc32 function.
9373
9374 2015-12-22 Joel Brobecker <brobecker@adacore.com>
9375
9376 * lynx-low.c (lynx_delete_thread_callback): New function.
9377 (lynx_mourn): Properly delete our process and all of its
9378 threads. Remove call to clear_inferiors.
9379
9380 2015-12-22 Joel Brobecker <brobecker@adacore.com>
9381
9382 * target.c (thread_search_callback): Add check that
9383 the thread_stopped target callback is not NULL before
9384 calling it.
9385
9386 2015-12-21 Yao Qi <yao.qi@linaro.org>
9387
9388 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
9389 arm breakpoint.
9390
9391 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9392
9393 * server.c (handle_query): Call target_supports_software_single_step.
9394
9395 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9396
9397 * linux-low.c (single_step): New function.
9398 (linux_resume_one_lwp_throw): Call single_step.
9399 (start_step_over): Likewise.
9400
9401 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9402
9403 * Makefile.in (SFILES): Append arch/arm-linux.c,
9404 arch/arm-get-next-pcs.c.
9405 (arm-linux.o): New rule.
9406 (arm-get-next-pcs.o): New rule.
9407 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
9408 arm-linux.o.
9409 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
9410 to linux-aarch32-low.c.
9411 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9412 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9413 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9414 (thumb2_breakpoint_len): Likewise.
9415 (arm_is_thumb_mode): Make non-static.
9416 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
9417 from linux-aarch32-low.c.
9418 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9419 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9420 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9421 (thumb2_breakpoint_len): Likewise.
9422 (arm_is_thumb_mode): New declaration.
9423 * linux-arm-low.c: Include arch/arm-linux.h
9424 aarch/arm-get-next-pcs.h, sys/syscall.h.
9425 (get_next_pcs_ops): New struct.
9426 (get_next_pcs_addr_bits_remove): New function.
9427 (get_next_pcs_is_thumb): New function.
9428 (get_next_pcs_read_memory_unsigned_integer): Likewise.
9429 (arm_sigreturn_next_pc): Likewise.
9430 (get_next_pcs_syscall_next_pc): Likewise.
9431 (arm_gdbserver_get_next_pcs): Likewise.
9432 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
9433 Initialize.
9434 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
9435 * server.h: Include gdb_vecs.h.
9436
9437 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9438
9439 * Makefile.in (SFILES): Append common/common-regcache.c.
9440 (OBS): Append common-regcache.o.
9441 (common-regcache.o): New rule.
9442 * regcache.c (init_register_cache): Initialize cache to
9443 REG_UNAVAILABLE.
9444 (regcache_raw_read_unsigned): New function.
9445 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
9446 register_status enum.
9447
9448 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
9449
9450 * linux-aarch64-low.c (the_low_targets): Rename
9451 breakpoint_reinsert_addr to get_next_pcs.
9452 * linux-arm-low.c (the_low_targets): Likewise.
9453 * linux-bfin-low.c (the_low_targets): Likewise.
9454 * linux-cris-low.c (the_low_targets): Likewise.
9455 * linux-crisv32-low.c (the_low_targets): Likewise.
9456 * linux-low.c (can_software_single_step): Likewise.
9457 (install_software_single_step_breakpoints): New function.
9458 (start_step_over): Use install_software_single_step_breakpoints.
9459 * linux-low.h: New CORE_ADDR vector.
9460 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
9461 get_next_pcs.
9462 * linux-mips-low.c (the_low_targets): Likewise.
9463 * linux-nios2-low.c (the_low_targets): Likewise.
9464 * linux-sparc-low.c (the_low_targets): Likewise.
9465
9466 2015-12-17 Pedro Alves <palves@redhat.com>
9467
9468 * linux-low.c (linux_kill_one_lwp): Remove references to
9469 LinuxThreads.
9470 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
9471 to 'kill'.
9472 (linux_init_signals): Delete.
9473 (initialize_low): Adjust.
9474 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
9475
9476 2015-12-16 Pedro Alves <palves@redhat.com>
9477
9478 * configure.ac (compiler warning flags): When testing a
9479 -Wno-foo option, check whether -Wfoo works instead.
9480 * configure: Regenerate.
9481
9482 2015-12-11 Don Breazeal <donb@codesourcery.com>
9483
9484 * server.c (process_serial_event): Don't exit from gdbserver
9485 in remote mode if there are still active inferiors.
9486
9487 2015-12-11 Yao Qi <yao.qi@linaro.org>
9488
9489 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
9490 arm_breakpoint_at if the process is 32-bit.
9491
9492 2015-12-11 Yao Qi <yao.qi@linaro.org>
9493
9494 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
9495 arm breakpoint.
9496
9497 2015-12-07 Yao Qi <yao.qi@linaro.org>
9498
9499 * configure.srv: Append arm.o to srv_tgtobj for
9500 aarch64*-*-linux* target.
9501 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
9502 from linux-arm-low.c.
9503 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
9504 (arm_breakpoint_len, thumb_breakpoint): Likewise.
9505 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
9506 (thumb2_breakpoint_len): Likewise.
9507 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
9508 (arm_breakpoint_kinds): Likewise.
9509 (arm_breakpoint_kind_from_pc): Likewise.
9510 (arm_sw_breakpoint_from_kind): Likewise.
9511 (arm_breakpoint_kind_from_current_state): Likewise.
9512 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
9513 (arm_sw_breakpoint_from_kind): Declare.
9514 (arm_breakpoint_kind_from_current_state): Declare.
9515 (arm_breakpoint_at): Declare.
9516 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
9517 arm_sw_breakpoint_from_kind if process is 32-bit.
9518 (aarch64_breakpoint_kind_from_pc): New function.
9519 (aarch64_breakpoint_kind_from_current_state): New function.
9520 (the_low_target): Initialize fields breakpoint_kind_from_pc
9521 and breakpoint_kind_from_current_state.
9522 * linux-arm-low.c (arm_breakpoint_kinds): Move to
9523 linux-aarch32-low.c.
9524 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
9525 (arm_breakpoint, arm_breakpoint_len): Likewise.
9526 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
9527 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
9528 (arm_is_thumb_mode): Likewise.
9529 (arm_breakpoint_at): Likewise.
9530 (arm_breakpoint_kind_from_pc): Likewise.
9531 (arm_sw_breakpoint_from_kind): Likewise.
9532 (arm_breakpoint_kind_from_current_state): Likewise.
9533
9534 Revert:
9535 2015-08-04 Yao Qi <yao.qi@linaro.org>
9536
9537 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
9538 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
9539 * server.c (extended_protocol): Remove "static".
9540 * server.h (extended_protocol): Declare it.
9541
9542 2015-12-04 Josh Stone <jistone@redhat.com>
9543
9544 * target.h (struct target_ops) <arch_setup>: Rename to ...
9545 (struct target_ops) <post_create_inferior>: ... this.
9546 (target_arch_setup): Rename to ...
9547 (target_post_create_inferior): ... this, calling post_create_inferior.
9548 * server.c (start_inferior): Update target_arch_setup calls to
9549 target_post_create_inferior.
9550 * linux-low.c (linux_low_ptrace_options): Forward declare.
9551 (linux_arch_setup): Update its comment for general use.
9552 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
9553 (struct linux_target_ops): Use linux_post_create_inferior.
9554 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
9555 to post_create_inferior.
9556 * nto-low.c (struct nto_target_ops): Likewise.
9557 * spu-low.c (struct spu_target_ops): Likewise.
9558 * win32-low.c (struct win32_target_ops): Likewise.
9559
9560 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
9561
9562 * linux-arm-low.c: Remove duplicate arch/arm.h include.
9563
9564 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9565
9566 * linux-arm-low.c (arm_reinsert_addr): Remove function.
9567 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
9568 * linux-cris-low.c (cris_reinsert_addr> Remove function.
9569 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9570 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
9571 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9572 * linux-mips-low.c (mips_reinsert_addr): Remove function.
9573 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9574 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
9575 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9576 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
9577 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
9578
9579 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9580
9581 * linux-low.c (linux_look_up_symbols): Don't call
9582 linux_supports_traceclone.
9583 * linux-low.h (thread_db_init): Remove use_events argument.
9584 * thread-db.c (thread_db_use_event): Remove global variable.
9585 (struct thread_db) <td_thr_event_enable_p>: Remove field.
9586 (struct thread_db) <td_create_bp>: Remove field.
9587 (thread_db_create_event): Remove function.
9588 (thread_db_enable_reporting): Likewise.
9589 (find_one_thread): Don't check for thread_db_use_events.
9590 (attach_thread): Likewise.
9591 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
9592 (try_thread_db_load_1): Don't check for thread_db_use_events.
9593 (thread_db_init): Remove use_events argument and thread events
9594 handling.
9595 (remove_thread_event_breakpoints): Remove function.
9596 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
9597
9598 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9599
9600 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
9601 New function.
9602 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9603 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
9604 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9605 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
9606 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
9607 Initialize.
9608 * linux-crisv32-low.c (cris_supports_hardware_single_step):
9609 New function.
9610 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9611 * linux-low.c (can_hardware_single_step): Use
9612 supports_hardware_single_step.
9613 (can_software_single_step): New function.
9614 (start_step_over): Call can_software_single_step.
9615 (linux_supports_hardware_single_step): New function.
9616 (struct target_ops) <supports_software_single_step>: Initialize.
9617 * linux-low.h (struct linux_target_ops)
9618 <supports_hardware_single_step>: Initialize.
9619 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
9620 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9621 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
9622 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
9623 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
9624 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9625 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
9626 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9627 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
9628 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
9629 Initialize.
9630 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
9631 (struct linux_target_ops) <tile_supports_hardware_single_step>:
9632 Initialize.
9633 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
9634 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9635 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
9636 New function.
9637 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
9638 * target.h (struct target_ops): <supports_software_single_step>:
9639 New field.
9640 (target_supports_software_single_step): New macro.
9641
9642 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9643
9644 * linux-low.c (linux_wait_1): Fix pc advance condition.
9645 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
9646 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
9647
9648 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
9649
9650 * linux-arm-low.c (arm_is_thumb_mode): New function.
9651 (arm_breakpoint_at): Use arm_is_thumb_mode.
9652 (arm_breakpoint_kind_from_current_state): New function.
9653 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
9654 Initialize.
9655 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
9656 (linux_breakpoint_kind_from_current_state): New function.
9657 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
9658 * linux-low.h (struct linux_target_ops)
9659 <breakpoint_kind_from_current_state>: New field.
9660 * target.h (struct target_ops): Likewise.
9661 (target_breakpoint_kind_from_current_state): New macro.
9662
9663 2015-11-30 Pedro Alves <palves@redhat.com>
9664
9665 * linux-low.c (linux_resume): Wake up the event loop before
9666 returning.
9667
9668 2015-11-30 Pedro Alves <palves@redhat.com>
9669
9670 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
9671 check.
9672 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
9673 to -1.
9674 * target.c (struct thread_search): New structure.
9675 (thread_search_callback): New function.
9676 (prev_general_thread): New global.
9677 (prepare_to_access_memory, done_accessing_memory): New functions.
9678 * target.h (prepare_to_access_memory, done_accessing_memory):
9679 Replace macros with function declarations.
9680
9681 2015-11-30 Pedro Alves <palves@redhat.com>
9682
9683 PR 14618
9684 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
9685 report TARGET_WAITKIND_NO_RESUMED.
9686 * remote-utils.c (prepare_resume_reply): Handle
9687 TARGET_WAITKIND_NO_RESUMED.
9688 * server.c (report_no_resumed): New global.
9689 (handle_query) <qSupported>: Handle "no-resumed+". Report
9690 "no-resumed+" support.
9691 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
9692 return error if the client doesn't support no-resumed events.
9693 (push_stop_notification): New function.
9694 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
9695 events if the client supports them.
9696
9697 2015-11-30 Pedro Alves <palves@redhat.com>
9698
9699 * linux-low.c (thread_still_has_status_pending_p): Don't check
9700 vCont;t here.
9701 (lwp_resumed): New function.
9702 (status_pending_p_callback): Return early if the LWP is not
9703 supposed to be resumed.
9704
9705 2015-11-30 Pedro Alves <palves@redhat.com>
9706
9707 * linux-low.c (handle_extended_wait): Assert that the LWP's
9708 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
9709 thread create events, leave the new child's status pending.
9710 (linux_low_filter_event): If GDB wants to hear about thread exit
9711 events, leave the LWP marked dead and don't delete it.
9712 (linux_wait_for_event_filtered): Don't check for thread exit.
9713 (filter_exit_event): New function.
9714 (linux_wait_1): Use it, when returning an exit event.
9715 (linux_resume_one_lwp_throw): Assert that the LWP's
9716 waitstatus is TARGET_WAITKIND_IGNORE.
9717 * remote-utils.c (prepare_resume_reply): Handle
9718 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
9719 * server.c (report_thread_events): New global.
9720 (handle_general_set): Handle QThreadEvents.
9721 (handle_query) <qSupported>: Handle and report QThreadEvents+;
9722 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
9723 TARGET_WAITKIND_THREAD_EXITED.
9724 * server.h (report_thread_events): Declare.
9725
9726 2015-11-30 Pedro Alves <palves@redhat.com>
9727
9728 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
9729 the thread's last_resume_kind was resume_stop.
9730
9731 2015-11-30 Pedro Alves <palves@redhat.com>
9732
9733 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
9734 before returning.
9735
9736 2015-11-30 Pedro Alves <palves@redhat.com>
9737
9738 * server.c (handle_v_requests): Handle vCtrlC.
9739
9740 2015-11-30 Pedro Alves <palves@redhat.com>
9741
9742 * gdbthread.h (find_any_thread_of_pid): Declare.
9743 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
9744 functions.
9745 * server.c (handle_query): If current_thread is NULL, look for
9746 another thread of the selected process.
9747
9748 2015-11-26 Daniel Colascione <dancol@dancol.org>
9749 Simon Marchi <simon.marchi@ericsson.com>
9750
9751 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
9752 * server.c (handle_qxfer_threads_worker): Refactor to include thread
9753 name in reply.
9754 * target.h (struct target_ops) <thread_name>: New field.
9755 (target_thread_name): New macro.
9756
9757 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9758
9759 * regcache.h (regcache_invalidate_pid): Add declaration.
9760 * regcache.c (regcache_invalidate_pid): New function, extracted
9761 from regcache_invalidate.
9762 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
9763 Add trivial documentation comment.
9764 * lynx-low.c: Use regcache_invalidate_pid instead of
9765 regcache_invalidate.
9766
9767 2015-11-23 Joel Brobecker <brobecker@adacore.com>
9768
9769 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
9770 and Elf64_auxv_t if the target is Android.
9771
9772 2015-11-22 Doug Evans <xdje42@gmail.com>
9773
9774 * target.h: #include <sys/types.h>.
9775
9776 2015-11-19 Pedro Alves <palves@redhat.com>
9777
9778 * linux-low.c (linux_process_qsupported): Change prototype.
9779 Adjust.
9780 * linux-low.h (struct linux_target_ops) <process_qsupported>:
9781 Change prototype.
9782 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
9783 and adjust to loop over all features.
9784 * server.c (handle_query) <qSupported>: Adjust to call
9785 target_process_qsupported once, passing it a vector of unprocessed
9786 features.
9787 * target.h (struct target_ops) <process_qsupported>: Change
9788 prototype.
9789 (target_process_qsupported): Adjust.
9790
9791 2015-11-19 Pedro Alves <palves@redhat.com>
9792
9793 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
9794 mode.
9795 * configure: Regenerate.
9796
9797 2015-11-19 Pedro Alves <palves@redhat.com>
9798
9799 * configure: Regenerate.
9800
9801 2015-11-19 Yao Qi <yao.qi@linaro.org>
9802
9803 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
9804 type to uint32_t.
9805
9806 2015-11-19 Yao Qi <yao.qi@linaro.org>
9807
9808 * linux-aarch64-low.c (enum aarch64_operand_type): New.
9809 (struct aarch64_operand): Move enum out.
9810
9811 2015-11-19 Yao Qi <yao.qi@linaro.org>
9812
9813 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
9814 struct user_fpsimd_state *.
9815 (aarch64_store_fpregset): Likewise.
9816
9817 2015-11-19 Yao Qi <yao.qi@linaro.org>
9818
9819 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
9820 struct user_pt_regs *.
9821 (aarch64_store_gregset): Likewise.
9822
9823 2015-11-18 Pedro Alves <palves@redhat.com>
9824
9825 * Makefile.in (all_object_files): Add $IPA_OBJS.
9826
9827 2015-11-17 Pedro Alves <palves@redhat.com>
9828
9829 * win32-low.c (win32_resume): Use gdb_signal_from_host,
9830 GDB_SIGNAL_0 and gdb_signal_to_string.
9831
9832 2015-11-17 Pedro Alves <palves@redhat.com>
9833
9834 * win32-low.c (handle_output_debug_string): Remove parameter.
9835 (win32_kill): Remove our_status local and adjust call to
9836 handle_output_debug_string.
9837 (get_child_debug_event): Adjust call to
9838 handle_output_debug_string.
9839
9840 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9841
9842 * linux-mips-low.c (mips_fill_gregset): Add cast.
9843 (mips_store_gregset): Likewise.
9844 (mips_fill_fpregset): Likewise.
9845 (mips_store_fpregset): Likewise.
9846
9847 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9848
9849 * linux-mips-low.c (mips_add_watchpoint): Rename private to
9850 priv.
9851
9852 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9853
9854 * linux-mips-low.c (mips_linux_new_thread): Change type of
9855 watch_type to enum target_hw_bp_type.
9856
9857 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9858
9859 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
9860 Change return type to arm_hwbp_type.
9861
9862 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9863
9864 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
9865 (arm_store_gregset): Likewise.
9866 * linux-arm-low.c (arm_get_hwcap): Likewise.
9867 (arm_read_description): Likewise.
9868
9869 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9870
9871 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
9872
9873 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9874
9875 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
9876 (ppc_fill_vsxregset): Likewise.
9877 (ppc_store_vsxregset): Likewise.
9878 (ppc_fill_vrregset): Likewise.
9879 (ppc_store_vrregset): Likewise.
9880 (ppc_fill_evrregset): Likewise.
9881 (ppc_store_evrregset): Likewise.
9882
9883 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
9884
9885 * linux-ppc-low.c (ppc_usrregs_info): Remove
9886 forward-declaration.
9887 (ppc_arch_setup): Move lower in file.
9888
9889 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
9890
9891 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
9892 (ps_pdwrite): Likewise.
9893
9894 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
9895
9896 * linux-arm-low.c (arm_new_thread): Move pointer dereference
9897 to after assert checks.
9898
9899 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
9900
9901 * proc-service.c (ps_pdread): Add/adjust casts.
9902 (ps_pdwrite): Add/adjust casts.
9903
9904 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9905
9906 * server.c (handle_search_memory_1): Cast return value of
9907 memmem.
9908
9909 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
9910
9911 * server.c (write_qxfer_response): Change type of data to
9912 gdb_byte *.
9913
9914 2015-10-29 Pedro Alves <palves@redhat.com>
9915
9916 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
9917
9918 2015-10-29 Pedro Alves <palves@redhat.com>
9919
9920 * tracepoint.c (clear_installed_tracepoints): Add casts.
9921
9922 2015-10-29 Pedro Alves <palves@redhat.com>
9923
9924 * server.c (handle_v_cont, process_serial_event): Add enum
9925 gdb_signal casts to signal parsing code.
9926
9927 2015-10-29 Pedro Alves <palves@redhat.com>
9928
9929 * linux-low.h (NULL_REGSET): Define.
9930 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9931 * linux-arm-low.c (arm_regsets): Likewise.
9932 * linux-crisv32-low.c (cris_regsets): Likewise.
9933 * linux-m68k-low.c (m68k_regsets): Likewise.
9934 * linux-mips-low.c (mips_regsets): Likewise.
9935 * linux-nios2-low.c (nios2_regsets): Likewise.
9936 * linux-ppc-low.c (ppc_regsets): Likewise.
9937 * linux-s390-low.c (s390_regsets): Likewise.
9938 * linux-sh-low.c (sh_regsets): Likewise.
9939 * linux-sparc-low.c (sparc_regsets): Likewise.
9940 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9941 * linux-tile-low.c (tile_regsets): Likewise.
9942 * linux-x86-low.c (x86_regsets): Likewise.
9943 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9944
9945 2015-10-29 Pedro Alves <palves@redhat.com>
9946
9947 * linux-low.h (NULL_REGSET): Define.
9948 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
9949 * linux-arm-low.c (arm_regsets): Likewise.
9950 * linux-crisv32-low.c (cris_regsets): Likewise.
9951 * linux-m68k-low.c (m68k_regsets): Likewise.
9952 * linux-mips-low.c (mips_regsets): Likewise.
9953 * linux-nios2-low.c (nios2_regsets): Likewise.
9954 * linux-ppc-low.c (ppc_regsets): Likewise.
9955 * linux-s390-low.c (s390_regsets): Likewise.
9956 * linux-sh-low.c (sh_regsets): Likewise.
9957 * linux-sparc-low.c (sparc_regsets): Likewise.
9958 * linux-tic6x-low.c (tic6x_regsets): Likewise.
9959 * linux-tile-low.c (tile_regsets): Likewise.
9960 * linux-x86-low.c (x86_regsets): Likewise.
9961 * linux-xtensa-low.c (xtensa_regsets): Likewise.
9962
9963 2015-10-26 Doug Evans <dje@google.com>
9964
9965 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
9966
9967 2015-10-26 Doug Evans <dje@google.com>
9968
9969 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
9970
9971 2015-10-26 Doug Evans <dje@google.com>
9972
9973 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
9974 for debug_printf.
9975 (attach_thread, find_new_threads_callback): Ditto.
9976
9977 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9978
9979 * mem-break.h (set_breakpoint_data): Remove.
9980
9981 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9982
9983 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
9984 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9985 (initialize_low): Remove set_breakpoint_data call.
9986 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
9987 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
9988 (initialize_low): Remove set_breakpoint_data call.
9989 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
9990 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
9991 (initialize_low): Remove set_breakpoint_data call.
9992
9993 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9994
9995 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
9996 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
9997 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
9998 * target.h (target_breakpoint_kind_from_pc): New macro.
9999
10000 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
10001
10002 * linux-low.c (default_breakpoint_kind_from_pc): New function.
10003 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
10004 the default breakpoint kind.
10005
10006 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10007
10008 * linux-arm-low.c (arm_supports_z_point_type): Add software
10009 breakpoint support.
10010
10011 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10012
10013 * linux-arm-low.c: Refactor breakpoint definitions.
10014 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
10015 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
10016
10017 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10018
10019 * Makefile.in: Add arm.c/o.
10020 * configure.srv: Likewise.
10021 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
10022 (arm_breakpoint_kind_from_pc): New function.
10023 (arm_sw_breakpoint_from_kind): Return proper kind.
10024 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
10025
10026 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10027
10028 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
10029 removal.
10030 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
10031 (struct raw_breakpoint) <size>: Remove.
10032 (struct raw_breakpoint) <kind>: Add.
10033 (bp_size): New function.
10034 (bp_opcode): Likewise.
10035 (find_raw_breakpoint_at): Adjust for kind.
10036 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
10037 (remove_memory_breakpoint): Adjust for kind call bp_size.
10038 (set_raw_breakpoint_at): Adjust for kind.
10039 (set_breakpoint): Likewise.
10040 (set_breakpoint_at): Call breakpoint_kind_from_pc.
10041 (delete_raw_breakpoint): Adjust for kind.
10042 (delete_breakpoint): Likewise.
10043 (find_gdb_breakpoint): Likewise.
10044 (set_gdb_breakpoint_1): Likewise.
10045 (set_gdb_breakpoint): Likewise.
10046 (delete_gdb_breakpoint_1): Likewise.
10047 (delete_gdb_breakpoint): Likewise.
10048 (uninsert_raw_breakpoint): Likewise.
10049 (reinsert_raw_breakpoint): Likewise.
10050 (set_breakpoint_data): Remove.
10051 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
10052 (check_mem_read): Adjust for kind call bp_size.
10053 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
10054 (clone_one_breakpoint): Adjust for kind.
10055 * mem-break.h (set_gdb_breakpoint): Likewise.
10056 (delete_gdb_breakpoint): Likewise.
10057 * server.c (process_serial_event): Likewise.
10058
10059 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10060
10061 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
10062 (struct linux_target_ops) <breakpoint>: Remove.
10063 (struct linux_target_ops) <breakpoint_len>: Remove.
10064 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10065 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10066 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
10067 (arm_sw_breakpoint_from_kind): New function.
10068 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
10069 (struct linux_target_ops) <breakpoint>: Remove.
10070 (struct linux_target_ops) <breakpoint_len>: Remove.
10071 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10072 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10073 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
10074 (struct linux_target_ops) <breakpoint>: Remove.
10075 (struct linux_target_ops) <breakpoint_len>: Remove.
10076 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10077 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10078 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
10079 (struct linux_target_ops) <breakpoint>: Remove.
10080 (struct linux_target_ops) <breakpoint_len>: Remove.
10081 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10082 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10083 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
10084 and sw_breakpoint_from_kind to increment the pc.
10085 (linux_breakpoint_kind_from_pc): New function.
10086 (linux_sw_breakpoint_from_kind): New function.
10087 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
10088 (initialize_low): Call breakpoint_kind_from_pc and
10089 sw_breakpoint_from_kind to replace breakpoint_data/len.
10090 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
10091 New field.
10092 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
10093 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
10094 (struct linux_target_ops) <breakpoint>: Remove.
10095 (struct linux_target_ops) <breakpoint_len>: Remove.
10096 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10097 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10098 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
10099 (struct linux_target_ops) <breakpoint>: Remove.
10100 (struct linux_target_ops) <breakpoint_len>: Remove.
10101 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10102 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10103 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
10104 (struct linux_target_ops) <breakpoint>: Remove.
10105 (struct linux_target_ops) <breakpoint_len>: Remove.
10106 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10107 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10108 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
10109 (struct linux_target_ops) <breakpoint>: Remove.
10110 (struct linux_target_ops) <breakpoint_len>: Remove.
10111 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10112 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10113 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
10114 (struct linux_target_ops) <breakpoint>: Remove.
10115 (struct linux_target_ops) <breakpoint_len>: Remove.
10116 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10117 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10118 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
10119 (struct linux_target_ops) <breakpoint>: Remove.
10120 (struct linux_target_ops) <breakpoint_len>: Remove.
10121 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10122 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10123 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
10124 (struct linux_target_ops) <breakpoint>: Remove.
10125 (struct linux_target_ops) <breakpoint_len>: Remove.
10126 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10127 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10128 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
10129 (struct linux_target_ops) <breakpoint>: Remove.
10130 (struct linux_target_ops) <breakpoint_len>: Remove.
10131 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10132 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10133 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
10134 (struct linux_target_ops) <breakpoint>: Remove.
10135 (struct linux_target_ops) <breakpoint_len>: Remove.
10136 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10137 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10138 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
10139 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
10140 (struct linux_target_ops) <breakpoint>: Remove.
10141 (struct linux_target_ops) <breakpoint_len>: Remove.
10142 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10143 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10144 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
10145 (struct linux_target_ops) <breakpoint>: Remove.
10146 (struct linux_target_ops) <breakpoint_len>: Remove.
10147 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
10148 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
10149
10150 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
10151
10152 * linux-cris-low.c (cris_get_pc): Remove void arg.
10153
10154 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
10155
10156 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
10157 variable name.
10158
10159 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
10160
10161 * inferiors.c (thread_pid_matches_callback): New function.
10162 (find_thread_process): New function.
10163 (remove_thread): Reset current_thread.
10164 (remove_process): Assert threads have been removed first.
10165
10166 2015-10-15 Yao Qi <yao.qi@linaro.org>
10167
10168 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
10169 if it is 3.
10170 (aarch64_remove_point): Likewise.
10171 * regcache.c (regcache_register_size): New function.
10172
10173 2015-10-12 Yao Qi <yao.qi@linaro.org>
10174
10175 * linux-aarch64-low.c: Update all callers as emit_load_store
10176 is renamed to aarch64_emit_load_store.
10177
10178 2015-10-12 Yao Qi <yao.qi@linaro.org>
10179
10180 * linux-aarch64-low.c: Update all callers of function renaming
10181 from emit_insn to aarch64_emit_insn.
10182
10183 2015-10-12 Yao Qi <yao.qi@linaro.org>
10184
10185 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
10186 arch/aarch64-insn.h.
10187 (struct aarch64_memory_operand): Likewise.
10188 (ENCODE): Likewise.
10189 (emit_insn): Move to arch/aarch64-insn.c.
10190 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
10191 (emit_load_store): Move to arch/aarch64-insn.c.
10192 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
10193 (can_encode_int32): Remove.
10194
10195 2015-10-12 Yao Qi <yao.qi@linaro.org>
10196
10197 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
10198 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
10199 (aarch64_relocate_instruction): Likewise.
10200 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
10201 (struct aarch64_insn_visitor): Likewise.
10202
10203 2015-10-12 Yao Qi <yao.qi@linaro.org>
10204
10205 * linux-aarch64-low.c (struct aarch64_insn_data): New.
10206 (struct aarch64_insn_visitor): New.
10207 (struct aarch64_insn_relocation_data): New.
10208 (aarch64_ftrace_insn_reloc_b): New function.
10209 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
10210 (aarch64_ftrace_insn_reloc_cb): Likewise.
10211 (aarch64_ftrace_insn_reloc_tb): Likewise.
10212 (aarch64_ftrace_insn_reloc_adr): Likewise.
10213 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
10214 (aarch64_ftrace_insn_reloc_others): Likewise.
10215 (visitor): New.
10216 (aarch64_relocate_instruction): Use visitor.
10217
10218 2015-10-12 Yao Qi <yao.qi@linaro.org>
10219
10220 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
10221 int. Add argument buf.
10222 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
10223 aarch64_relocate_instruction.
10224
10225 2015-10-12 Yao Qi <yao.qi@linaro.org>
10226
10227 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
10228 argument insn. Remove local variable insn. Don't call
10229 target_read_uint32.
10230 (aarch64_install_fast_tracepoint_jump_pad): Call
10231 target_read_uint32.
10232
10233 2015-09-30 Yao Qi <yao.qi@linaro.org>
10234
10235 * linux-aarch64-low.c (emit_movk): Shorten a long line.
10236 (emit_load_store_pair): Likewise.
10237
10238 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
10239
10240 * dll.c (match_dll): Add cast(s).
10241 (unloaded_dll): Likewise.
10242 * linux-low.c (second_thread_of_pid_p): Likewise.
10243 (delete_lwp_callback): Likewise.
10244 (count_events_callback): Likewise.
10245 (select_event_lwp_callback): Likewise.
10246 (linux_set_resume_request): Likewise.
10247 * server.c (accumulate_file_name_length): Likewise.
10248 (emit_dll_description): Likewise.
10249 (handle_qxfer_threads_worker): Likewise.
10250 (visit_actioned_threads): Likewise.
10251 * thread-db.c (any_thread_of): Likewise.
10252 * tracepoint.c (same_process_p): Likewise.
10253 (match_blocktype): Likewise.
10254 (build_traceframe_info_xml): Likewise.
10255
10256 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
10257
10258 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
10259 assignment.
10260 (gdb_unparse_agent_expr): Likewise.
10261 * hostio.c (require_data): Likewise.
10262 (handle_pread): Likewise.
10263 * linux-low.c (disable_regset): Likewise.
10264 (fetch_register): Likewise.
10265 (store_register): Likewise.
10266 (get_dynamic): Likewise.
10267 (linux_qxfer_libraries_svr4): Likewise.
10268 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
10269 (set_fast_tracepoint_jump): Likewise.
10270 (uninsert_fast_tracepoint_jumps_at): Likewise.
10271 (reinsert_fast_tracepoint_jumps_at): Likewise.
10272 (validate_inserted_breakpoint): Likewise.
10273 (clone_agent_expr): Likewise.
10274 * regcache.c (init_register_cache): Likewise.
10275 * remote-utils.c (putpkt_binary_1): Likewise.
10276 (decode_M_packet): Likewise.
10277 (decode_X_packet): Likewise.
10278 (look_up_one_symbol): Likewise.
10279 (relocate_instruction): Likewise.
10280 (monitor_output): Likewise.
10281 * server.c (handle_search_memory): Likewise.
10282 (handle_qxfer_exec_file): Likewise.
10283 (handle_qxfer_libraries): Likewise.
10284 (handle_qxfer): Likewise.
10285 (handle_query): Likewise.
10286 (handle_v_cont): Likewise.
10287 (handle_v_run): Likewise.
10288 (captured_main): Likewise.
10289 * target.c (write_inferior_memory): Likewise.
10290 * thread-db.c (try_thread_db_load_from_dir): Likewise.
10291 * tracepoint.c (init_trace_buffer): Likewise.
10292 (add_tracepoint_action): Likewise.
10293 (add_traceframe): Likewise.
10294 (add_traceframe_block): Likewise.
10295 (cmd_qtdpsrc): Likewise.
10296 (cmd_qtdv): Likewise.
10297 (cmd_qtstatus): Likewise.
10298 (response_source): Likewise.
10299 (response_tsv): Likewise.
10300 (cmd_qtnotes): Likewise.
10301 (gdb_collect): Likewise.
10302 (initialize_tracepoint): Likewise.
10303
10304 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10305
10306 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
10307 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
10308 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
10309 <NOP>: New.
10310 (enum aarch64_condition_codes): New enum.
10311 (w0): New static global.
10312 (fp): Likewise.
10313 (lr): Likewise.
10314 (struct aarch64_memory_operand) <type>: New
10315 MEMORY_OPERAND_POSTINDEX type.
10316 (postindex_memory_operand): New helper function.
10317 (emit_ret): New function.
10318 (emit_load_store_pair): New function, factored out of emit_stp
10319 with support for MEMORY_OPERAND_POSTINDEX.
10320 (emit_stp): Rewrite using emit_load_store_pair.
10321 (emit_ldp): New function.
10322 (emit_load_store): Likewise.
10323 (emit_ldr): Mention post-index instruction in comment.
10324 (emit_ldrh): New function.
10325 (emit_ldrb): New function.
10326 (emit_ldrsw): Mention post-index instruction in comment.
10327 (emit_str): Likewise.
10328 (emit_subs): New function.
10329 (emit_cmp): Likewise.
10330 (emit_and): Likewise.
10331 (emit_orr): Likewise.
10332 (emit_orn): Likewise.
10333 (emit_eor): Likewise.
10334 (emit_mvn): Likewise.
10335 (emit_lslv): Likewise.
10336 (emit_lsrv): Likewise.
10337 (emit_asrv): Likewise.
10338 (emit_mul): Likewise.
10339 (emit_sbfm): Likewise.
10340 (emit_sbfx): Likewise.
10341 (emit_ubfm): Likewise.
10342 (emit_ubfx): Likewise.
10343 (emit_csinc): Likewise.
10344 (emit_cset): Likewise.
10345 (emit_nop): Likewise.
10346 (emit_ops_insns): New helper function.
10347 (emit_pop): Likewise.
10348 (emit_push): Likewise.
10349 (aarch64_emit_prologue): New function.
10350 (aarch64_emit_epilogue): Likewise.
10351 (aarch64_emit_add): Likewise.
10352 (aarch64_emit_sub): Likewise.
10353 (aarch64_emit_mul): Likewise.
10354 (aarch64_emit_lsh): Likewise.
10355 (aarch64_emit_rsh_signed): Likewise.
10356 (aarch64_emit_rsh_unsigned): Likewise.
10357 (aarch64_emit_ext): Likewise.
10358 (aarch64_emit_log_not): Likewise.
10359 (aarch64_emit_bit_and): Likewise.
10360 (aarch64_emit_bit_or): Likewise.
10361 (aarch64_emit_bit_xor): Likewise.
10362 (aarch64_emit_bit_not): Likewise.
10363 (aarch64_emit_equal): Likewise.
10364 (aarch64_emit_less_signed): Likewise.
10365 (aarch64_emit_less_unsigned): Likewise.
10366 (aarch64_emit_ref): Likewise.
10367 (aarch64_emit_if_goto): Likewise.
10368 (aarch64_emit_goto): Likewise.
10369 (aarch64_write_goto_address): Likewise.
10370 (aarch64_emit_const): Likewise.
10371 (aarch64_emit_call): Likewise.
10372 (aarch64_emit_reg): Likewise.
10373 (aarch64_emit_pop): Likewise.
10374 (aarch64_emit_stack_flush): Likewise.
10375 (aarch64_emit_zero_ext): Likewise.
10376 (aarch64_emit_swap): Likewise.
10377 (aarch64_emit_stack_adjust): Likewise.
10378 (aarch64_emit_int_call_1): Likewise.
10379 (aarch64_emit_void_call_2): Likewise.
10380 (aarch64_emit_eq_goto): Likewise.
10381 (aarch64_emit_ne_goto): Likewise.
10382 (aarch64_emit_lt_goto): Likewise.
10383 (aarch64_emit_le_goto): Likewise.
10384 (aarch64_emit_gt_goto): Likewise.
10385 (aarch64_emit_ge_got): Likewise.
10386 (aarch64_emit_ops_impl): New static global variable.
10387 (aarch64_emit_ops): New target function, return
10388 &aarch64_emit_ops_impl.
10389 (struct linux_target_ops): Install it.
10390
10391 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10392
10393 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
10394 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
10395 aarch64-ipa.o.
10396 * linux-aarch64-ipa.c: New file.
10397 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
10398 and endian.h.
10399 (aarch64_get_thread_area): New target method.
10400 (extract_signed_bitfield): New helper function.
10401 (aarch64_decode_ldr_literal): New function.
10402 (enum aarch64_opcodes): New enum.
10403 (struct aarch64_register): New struct.
10404 (struct aarch64_operand): New struct.
10405 (x0): New static global.
10406 (x1): Likewise.
10407 (x2): Likewise.
10408 (x3): Likewise.
10409 (x4): Likewise.
10410 (w2): Likewise.
10411 (ip0): Likewise.
10412 (sp): Likewise.
10413 (xzr): Likewise.
10414 (aarch64_register): New helper function.
10415 (register_operand): Likewise.
10416 (immediate_operand): Likewise.
10417 (struct aarch64_memory_operand): New struct.
10418 (offset_memory_operand): New helper function.
10419 (preindex_memory_operand): Likewise.
10420 (enum aarch64_system_control_registers): New enum.
10421 (ENCODE): New macro.
10422 (emit_insn): New helper function.
10423 (emit_b): New function.
10424 (emit_bcond): Likewise.
10425 (emit_cb): Likewise.
10426 (emit_tb): Likewise.
10427 (emit_blr): Likewise.
10428 (emit_stp): Likewise.
10429 (emit_ldp_q_offset): Likewise.
10430 (emit_stp_q_offset): Likewise.
10431 (emit_load_store): Likewise.
10432 (emit_ldr): Likewise.
10433 (emit_ldrsw): Likewise.
10434 (emit_str): Likewise.
10435 (emit_ldaxr): Likewise.
10436 (emit_stxr): Likewise.
10437 (emit_stlr): Likewise.
10438 (emit_data_processing_reg): Likewise.
10439 (emit_data_processing): Likewise.
10440 (emit_add): Likewise.
10441 (emit_sub): Likewise.
10442 (emit_mov): Likewise.
10443 (emit_movk): Likewise.
10444 (emit_mov_addr): Likewise.
10445 (emit_mrs): Likewise.
10446 (emit_msr): Likewise.
10447 (emit_sevl): Likewise.
10448 (emit_wfe): Likewise.
10449 (append_insns): Likewise.
10450 (can_encode_int32_in): New helper function.
10451 (aarch64_relocate_instruction): New function.
10452 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
10453 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
10454 (struct linux_target_ops): Install aarch64_get_thread_area,
10455 aarch64_install_fast_tracepoint_jump_pad and
10456 aarch64_get_min_fast_tracepoint_insn_len.
10457
10458 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
10459
10460 * Makefile.in (aarch64-insn.o): New rule.
10461 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
10462
10463 2015-09-21 Yao Qi <yao.qi@linaro.org>
10464
10465 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
10466
10467 2015-09-21 Yao Qi <yao.qi@linaro.org>
10468
10469 * tracepoint.c (max_jump_pad_size): Remove.
10470
10471 2015-09-18 Yao Qi <yao.qi@linaro.org>
10472
10473 * linux-aarch64-low.c: Don't include sys/uio.h.
10474 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
10475
10476 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
10477
10478 * tracepoint.c (eval_result_type): Change prototype.
10479 (condition_true_at_tracepoint): Fix argument to compiled_cond.
10480
10481 2015-09-15 Pedro Alves <palves@redhat.com>
10482
10483 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
10484 Check whether to report exec events instead of checking whether
10485 multiprocess is enabled.
10486
10487 2015-09-15 Pedro Alves <palves@redhat.com>
10488
10489 PR remote/18965
10490 * remote-utils.c (prepare_resume_reply): Merge
10491 TARGET_WAITKIND_VFORK_DONE switch case with the
10492 TARGET_WAITKIND_FORKED case.
10493
10494 2015-09-15 Yao Qi <yao.qi@linaro.org>
10495
10496 * server.c (handle_query): Check string comparison using
10497 "else if" instead of "if".
10498
10499 2015-09-15 Yao Qi <yao.qi@linaro.org>
10500
10501 * server.c (vCont_supported): New global variable.
10502 (handle_query): Set vCont_supported to 1 if "vContSupported+"
10503 matches. Append ";vContSupported+" to own_buf.
10504 (handle_v_requests): Append ";s;S" to own_buf if target supports
10505 hardware single step or vCont_supported is false.
10506 (capture_main): Set vCont_supported to zero.
10507
10508 2015-09-15 Yao Qi <yao.qi@linaro.org>
10509
10510 * linux-low.c (linux_supports_conditional_breakpoints): Rename
10511 it to ...
10512 (linux_supports_hardware_single_step): ... New function.
10513 (linux_target_ops): Update.
10514 * lynx-low.c (lynx_target_ops): Set field
10515 supports_hardware_single_step to target_can_do_hardware_single_step.
10516 * nto-low.c (nto_target_ops): Likewise.
10517 * spu-low.c (spu_target_ops): Likewise.
10518 * win32-low.c (win32_target_ops): Likewise.
10519 * target.c (target_can_do_hardware_single_step): New function.
10520 * target.h (struct target_ops) <supports_conditional_breakpoints>:
10521 Remove. <supports_hardware_single_step>: New field.
10522 (target_supports_conditional_breakpoints): Remove.
10523 (target_supports_hardware_single_step): New macro.
10524 (target_can_do_hardware_single_step): Declare.
10525 * server.c (handle_query): Use target_supports_hardware_single_step
10526 instead of target_supports_conditional_breakpoints.
10527
10528 2015-09-15 Yao Qi <yao.qi@linaro.org>
10529
10530 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
10531 function.
10532 (struct linux_target_ops the_low_target): Install
10533 aarch64_linux_siginfo_fixup.
10534
10535 2015-09-11 Don Breazeal <donb@codesourcery.com>
10536 Luis Machado <lgustavo@codesourcery.com>
10537
10538 * linux-low.c (linux_mourn): Static declaration.
10539 (linux_arch_setup): Move in front of
10540 handle_extended_wait.
10541 (linux_arch_setup_thread): New function.
10542 (handle_extended_wait): Handle exec events. Call
10543 linux_arch_setup_thread. Make event_lwp argument a
10544 pointer-to-a-pointer.
10545 (check_zombie_leaders): Do not check stopped threads.
10546 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
10547 (linux_low_filter_event): Add lwp and thread for exec'ing
10548 non-leader thread if leader thread has been deleted.
10549 Refactor code into linux_arch_setup_thread and call it.
10550 Pass child lwp pointer by reference to handle_extended_wait.
10551 (linux_wait_for_event_filtered): Update comment.
10552 (linux_wait_1): Prevent clobbering exec event status.
10553 (linux_supports_exec_events): New function.
10554 (linux_target_ops) <supports_exec_events>: Initialize new member.
10555 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
10556 new member.
10557 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
10558 * server.c (report_exec_events): New global variable.
10559 (handle_query): Handle qSupported query for exec-events feature.
10560 (captured_main): Initialize report_exec_events.
10561 * server.h (report_exec_events): Declare new global variable.
10562 * target.h (struct target_ops) <supports_exec_events>: New
10563 member.
10564 (target_supports_exec_events): New macro.
10565 * win32-low.c (win32_target_ops) <supports_exec_events>:
10566 Initialize new member.
10567
10568 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
10569
10570 * linux-low.c (linux_low_enable_btrace): Remove.
10571 (linux_target_ops): Replace linux_low_enable_btrace with
10572 linux_enable_btrace.
10573
10574 2015-09-03 Yao Qi <yao.qi@linaro.org>
10575
10576 * linux-aarch64-low.c (aarch64_insert_point): Call
10577 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
10578 returns true.
10579
10580 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
10581
10582 * linux-low.c (check_stopped_by_breakpoint): Use
10583 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
10584
10585 2015-08-27 Pedro Alves <palves@redhat.com>
10586
10587 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
10588
10589 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
10590
10591 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
10592 the XNEW-family equivalent.
10593 (compile_bytecodes): Likewise.
10594 * dll.c (loaded_dll): Likewise.
10595 * event-loop.c (append_callback_event): Likewise.
10596 (create_file_handler): Likewise.
10597 (create_file_event): Likewise.
10598 * hostio.c (handle_open): Likewise.
10599 * inferiors.c (add_thread): Likewise.
10600 (add_process): Likewise.
10601 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
10602 * linux-arm-low.c (arm_new_process): Likewise.
10603 (arm_new_thread): Likewise.
10604 * linux-low.c (add_to_pid_list): Likewise.
10605 (linux_add_process): Likewise.
10606 (handle_extended_wait): Likewise.
10607 (add_lwp): Likewise.
10608 (enqueue_one_deferred_signal): Likewise.
10609 (enqueue_pending_signal): Likewise.
10610 (linux_resume_one_lwp_throw): Likewise.
10611 (linux_resume_one_thread): Likewise.
10612 (linux_read_memory): Likewise.
10613 (linux_write_memory): Likewise.
10614 * linux-mips-low.c (mips_linux_new_process): Likewise.
10615 (mips_linux_new_thread): Likewise.
10616 (mips_add_watchpoint): Likewise.
10617 * linux-x86-low.c (initialize_low_arch): Likewise.
10618 * lynx-low.c (lynx_add_process): Likewise.
10619 * mem-break.c (set_raw_breakpoint_at): Likewise.
10620 (set_breakpoint): Likewise.
10621 (add_condition_to_breakpoint): Likewise.
10622 (add_commands_to_breakpoint): Likewise.
10623 (clone_agent_expr): Likewise.
10624 (clone_one_breakpoint): Likewise.
10625 * regcache.c (new_register_cache): Likewise.
10626 * remote-utils.c (look_up_one_symbol): Likewise.
10627 * server.c (queue_stop_reply): Likewise.
10628 (start_inferior): Likewise.
10629 (queue_stop_reply_callback): Likewise.
10630 (handle_target_event): Likewise.
10631 * spu-low.c (fetch_ppc_memory): Likewise.
10632 (store_ppc_memory): Likewise.
10633 * target.c (set_target_ops): Likewise.
10634 * thread-db.c (thread_db_load_search): Likewise.
10635 (try_thread_db_load_1): Likewise.
10636 * tracepoint.c (add_tracepoint): Likewise.
10637 (add_tracepoint_action): Likewise.
10638 (create_trace_state_variable): Likewise.
10639 (cmd_qtdpsrc): Likewise.
10640 (cmd_qtro): Likewise.
10641 (add_while_stepping_state): Likewise.
10642 * win32-low.c (child_add_thread): Likewise.
10643 (get_image_name): Likewise.
10644
10645 2015-08-25 Yao Qi <yao.qi@linaro.org>
10646
10647 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
10648
10649 2015-08-25 Yao Qi <yao.qi@linaro.org>
10650
10651 * Makefile.in (aarch64-linux.o): New rule.
10652 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
10653 srv_tgtobj.
10654 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
10655 (aarch64_init_debug_reg_state): Make it extern.
10656 (aarch64_linux_prepare_to_resume): Remove.
10657
10658 2015-08-25 Yao Qi <yao.qi@linaro.org>
10659
10660 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
10661 lwp_arch_private_info and ptid_of_lwp.
10662
10663 2015-08-25 Yao Qi <yao.qi@linaro.org>
10664
10665 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
10666 Find proc_info by find_process_pid. All callers updated.
10667
10668 2015-08-25 Yao Qi <yao.qi@linaro.org>
10669
10670 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
10671 Remove.
10672 (debug_reg_change_callback): Remove.
10673 (aarch64_notify_debug_reg_change): Remove.
10674
10675 2015-08-25 Yao Qi <yao.qi@linaro.org>
10676
10677 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
10678 Call current_lwp_ptid.
10679
10680 2015-08-25 Yao Qi <yao.qi@linaro.org>
10681
10682 * linux-aarch64-low.c (debug_reg_change_callback): Use
10683 debug_printf.
10684
10685 2015-08-25 Yao Qi <yao.qi@linaro.org>
10686
10687 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
10688
10689 2015-08-25 Yao Qi <yao.qi@linaro.org>
10690
10691 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
10692
10693 2015-08-25 Yao Qi <yao.qi@linaro.org>
10694
10695 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
10696 the code.
10697
10698 2015-08-25 Yao Qi <yao.qi@linaro.org>
10699
10700 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
10701 Remove.
10702 (debug_reg_change_callback): Remove argument entry and add argument
10703 lwp. Remove local variable thread. Don't print thread id in the
10704 debugging output. Don't check whether pid of thread equals to pid.
10705 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
10706 iterate_over_lwps instead find_inferior.
10707
10708 2015-08-24 Pedro Alves <palves@redhat.com>
10709
10710 * inferiors.c (get_first_process): New function.
10711 * inferiors.h (get_first_process): New declaration.
10712 * remote-utils.c (read_ptid): Default to the first process in the
10713 list, instead of to the current thread's process.
10714
10715 2015-08-24 Pedro Alves <palves@redhat.com>
10716
10717 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
10718 * event-loop.c: Likewise.
10719 * remote-utils.c: Likewise.
10720 * tracepoint.c: Likewise.
10721
10722 2015-08-24 Pedro Alves <palves@redhat.com>
10723
10724 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
10725 ptid_get_lwp.
10726
10727 2015-08-21 Pedro Alves <palves@redhat.com>
10728
10729 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
10730 instead of literal 1.
10731
10732 2015-08-21 Pedro Alves <palves@redhat.com>
10733
10734 * tdesc.c (default_description): Explicitly zero-initialize.
10735
10736 2015-08-21 Pedro Alves <palves@redhat.com>
10737
10738 PR gdb/18749
10739 * inferiors.c (remove_thread): Discard any pending stop reply for
10740 this thread.
10741 * server.c (remove_all_on_match_pid): Rename to ...
10742 (remove_all_on_match_ptid): ... this. Work with a filter ptid
10743 instead of a pid.
10744 (discard_queued_stop_replies): Change parameter to a ptid. Now
10745 extern.
10746 (handle_v_kill, kill_inferior_callback, captured_main)
10747 (process_serial_event): Adjust.
10748 * server.h (discard_queued_stop_replies): Declare.
10749
10750 2015-08-21 Pedro Alves <palves@redhat.com>
10751
10752 * linux-low.c (wait_for_sigstop): Always switch to no thread
10753 selected if the previously current thread dies.
10754 * lynx-low.c (lynx_request_interrupt): Use the first thread's
10755 process instead of the current thread's.
10756 * remote-utils.c (input_interrupt): Don't check if there's no
10757 current thread.
10758 * server.c (gdb_read_memory, gdb_write_memory): If setting the
10759 current thread to the general thread fails, error out.
10760 (handle_qxfer_auxv, handle_qxfer_libraries)
10761 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
10762 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
10763 (handle_query): Check if there's a thread selected instead of
10764 checking whether there's any thread in the thread list.
10765 (handle_qxfer_threads, handle_qxfer_btrace)
10766 (handle_qxfer_btrace_conf): Don't error out early if there's no
10767 thread in the thread list.
10768 (handle_v_cont, myresume): Don't set the current thread to the
10769 continue thread.
10770 (process_serial_event) <Hg handling>: Also set thread_id if the
10771 previous general thread is still alive.
10772 (process_serial_event) <g/G handling>: If setting the current
10773 thread to the general thread fails, error out.
10774 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
10775 thread's lwp instead of the current thread's.
10776 * target.c (set_desired_thread): If the desired thread was not
10777 found, leave the current thread pointing to NULL. Return an int
10778 (boolean) indicating success.
10779 * target.h (set_desired_thread): Change return type to int.
10780
10781 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
10782
10783 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
10784 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
10785 #includes.
10786 (ps_get_thread_area): New function.
10787
10788 2015-08-19 Gary Benson <gbenson@redhat.com>
10789
10790 * hostio.c (handle_pread): Do not attempt to read more data
10791 than hostio_reply_with_data can fit in a packet.
10792
10793 2015-08-18 Joel Brobecker <brobecker@adacore.com>
10794
10795 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
10796
10797 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
10798
10799 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
10800
10801 2015-08-06 Pedro Alves <palves@redhat.com>
10802
10803 * tracepoint.c (expr_eval_result): Now an int.
10804
10805 2015-08-06 Pedro Alves <palves@redhat.com>
10806
10807 * gdbthread.h (struct regcache): Forward declare.
10808 (struct thread_info) <regcache_data>: Now a struct regcache
10809 pointer.
10810 * inferiors.c (inferior_regcache_data)
10811 (set_inferior_regcache_data): Now work with struct regcache
10812 pointers.
10813 * inferiors.h (struct regcache): Forward declare.
10814 (inferior_regcache_data, set_inferior_regcache_data): Now work
10815 with struct regcache pointers.
10816 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
10817 (free_register_cache_thread): Remove struct regcache pointer
10818 casts.
10819
10820 2015-08-06 Pedro Alves <palves@redhat.com>
10821
10822 * server.c (captured_main): On error, print the exception message
10823 to stderr, and if run_once is set, throw a quit.
10824
10825 2015-08-06 Pedro Alves <palves@redhat.com>
10826
10827 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
10828 the current thread.
10829
10830 2015-08-06 Pedro Alves <palves@redhat.com>
10831
10832 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
10833 reading beyond the passed in buffer length.
10834
10835 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
10836
10837 * tracepoint.c (symbol_list) <required>: Remove.
10838
10839 2015-08-06 Pedro Alves <palves@redhat.com>
10840
10841 * linux-low.c (handle_extended_wait): Set the fork child's suspend
10842 count if stopping and suspending threads.
10843 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
10844 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
10845 (linux_detach): Complete an ongoing step-over.
10846 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
10847 throughout.
10848 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
10849 (linux_wait_1): If passing a signal to the inferior after
10850 finishing a step-over, unsuspend and re-resume all lwps. If we
10851 see a single-step event but the thread should be continuing, don't
10852 pass the trap to gdb.
10853 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
10854 internal_error instead of gdb_assert.
10855 (enqueue_pending_signal): New function.
10856 (check_ptrace_stopped_lwp_gone): Add debug output.
10857 (start_step_over): Use internal_error instead of gdb_assert.
10858 (complete_ongoing_step_over): New function.
10859 (linux_resume_one_thread): Don't resume a suspended thread.
10860 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
10861 it stepping.
10862
10863 2015-08-06 Pedro Alves <palves@redhat.com>
10864
10865 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
10866 (linux_thread_alive): Use lwp_is_marked_dead.
10867 (extended_event_reported): Delete.
10868 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
10869 instead of extended_event_reported.
10870 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
10871 as well.
10872 (lwp_is_marked_dead): New function.
10873 (lwp_running): Use lwp_is_marked_dead.
10874 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
10875 comment.
10876
10877 2015-08-06 Pedro Alves <palves@redhat.com>
10878
10879 * linux-low.c (linux_wait_1): Move fork event output out of the
10880 !report_to_gdb check. Pass event_child->waitstatus to
10881 target_waitstatus_to_string instead of ourstatus.
10882
10883 2015-08-04 Yao Qi <yao.qi@linaro.org>
10884
10885 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
10886 if current_thread is 32 bit.
10887
10888 2015-08-04 Yao Qi <yao.qi@linaro.org>
10889
10890 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
10891 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
10892 * server.c (extended_protocol): Remove "static".
10893 * server.h (extended_protocol): Declare it.
10894
10895 2015-08-04 Yao Qi <yao.qi@linaro.org>
10896
10897 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
10898 both aarch64 and aarch32.
10899 (aarch64_set_pc): Likewise.
10900
10901 2015-08-04 Yao Qi <yao.qi@linaro.org>
10902
10903 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
10904 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
10905 arm-with-neon.xml to srv_xmlfiles.
10906 * linux-aarch64-low.c: Include linux-aarch32-low.h.
10907 (is_64bit_tdesc): New function.
10908 (aarch64_linux_read_description): New function.
10909 (aarch64_arch_setup): Call aarch64_linux_read_description.
10910 (regs_info): Rename to regs_info_aarch64.
10911 (aarch64_regs_info): Return right regs_info.
10912 (initialize_low_arch): Call initialize_low_arch_aarch32.
10913
10914 2015-08-04 Yao Qi <yao.qi@linaro.org>
10915
10916 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
10917 * linux-aarch32-low.c: New file.
10918 * linux-aarch32-low.h: New file.
10919 * linux-arm-low.c (arm_fill_gregset): Move it to
10920 linux-aarch32-low.c.
10921 (arm_store_gregset): Likewise.
10922 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
10923 (arm_store_vfpregset): Call arm_store_vfpregset_num.
10924 (arm_arch_setup): Check if PTRACE_GETREGSET works.
10925 (regs_info): Rename to regs_info_arm.
10926 (arm_regs_info): Return regs_info_aarch32 if
10927 have_ptrace_getregset is 1 and target description is
10928 arm_with_neon or arm_with_vfpv3.
10929 (initialize_low_arch): Don't call init_registers_arm_with_neon.
10930 Call initialize_low_arch_aarch32 instead.
10931
10932 2015-08-04 Yao Qi <yao.qi@linaro.org>
10933
10934 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
10935 * linux-low.c: ... here.
10936 * linux-low.h (have_ptrace_getregset): Declare it.
10937
10938 2015-08-04 Pedro Alves <palves@redhat.com>
10939
10940 * thread-db.c (struct thread_db): Use new typedefs.
10941 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
10942 CHK calls.
10943 (disable_thread_event_reporting): Cast result of dlsym to
10944 destination function pointer type.
10945 (thread_db_mourn): Use td_ta_delete_ftype.
10946
10947 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
10948
10949 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
10950 arch variant.
10951 (CDX_BREAKPOINT): Define for R2.
10952 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
10953 (the_low_target): Add comments.
10954
10955 2015-07-30 Yao Qi <yao.qi@linaro.org>
10956
10957 * linux-arm-low.c (arm_hwcap): Remove it.
10958 (arm_read_description): New local variable arm_hwcap. Don't
10959 set arm_hwcap to zero.
10960
10961 2015-07-30 Yao Qi <yao.qi@linaro.org>
10962
10963 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
10964 Use regcache->tdesc instead.
10965 (arm_store_wmmxregset): Likewise.
10966 (arm_fill_vfpregset): Likewise.
10967 (arm_store_vfpregset): Likewise.
10968
10969 2015-07-30 Yao Qi <yao.qi@linaro.org>
10970
10971 * linux-arm-low.c: Include arch/arm.h.
10972 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
10973 (arm_store_gregset): Likewise.
10974
10975 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
10976
10977 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
10978 ptrace's 4th parameter.
10979
10980 2015-07-27 Yao Qi <yao.qi@linaro.org>
10981
10982 * configure.srv (case aarch64*-*-linux*): Don't set
10983 srv_linux_usrregs.
10984
10985 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
10986
10987 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
10988 sys/ptrace.h.
10989 * linux-arm-low.c: Likewise.
10990 * linux-cris-low.c: Likewise.
10991 * linux-crisv32-low.c: Likewise.
10992 * linux-low.c: Likewise.
10993 * linux-m68k-low.c: Likewise.
10994 * linux-mips-low.c: Likewise.
10995 * linux-nios2-low.c: Likewise.
10996 * linux-s390-low.c: Likewise.
10997 * linux-sparc-low.c: Likewise.
10998 * linux-tic6x-low.c: Likewise.
10999 * linux-tile-low.c: Likewise.
11000 * linux-x86-low.c: Likewise.
11001
11002 2015-07-24 Pedro Alves <palves@redhat.com>
11003
11004 * config.in: Regenerate.
11005 * configure: Regenerate.
11006
11007 2015-07-24 Pedro Alves <palves@redhat.com>
11008
11009 * acinclude.m4: Include ../ptrace.m4.
11010 * configure.ac: Call GDB_AC_PTRACE.
11011 * config.in, configure: Regenerate.
11012
11013 2015-07-24 Yao Qi <yao.qi@linaro.org>
11014
11015 * linux-low.c (linux_create_inferior): Remove setting to
11016 proc->priv->new_inferior.
11017 (linux_attach): Likewise.
11018 (linux_low_filter_event): Likewise.
11019 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
11020
11021 2015-07-24 Yao Qi <yao.qi@linaro.org>
11022
11023 * linux-low.c (linux_arch_setup): New function.
11024 (linux_low_filter_event): If proc->tdesc is NULL and
11025 proc->attached is true, call the_low_target.arch_setup.
11026 Otherwise, keep status pending, and return.
11027 (linux_resume_one_lwp_throw): Don't call get_pc if
11028 thread->while_stepping isn't NULL. Don't call
11029 get_thread_regcache if proc->tdesc is NULL.
11030 (need_step_over_p): Return 0 if proc->tdesc is NULL.
11031 (linux_target_ops): Install arch_setup.
11032 * server.c (start_inferior): Call the_target->arch_setup.
11033 * target.h (struct target_ops) <arch_setup>: New field.
11034 (target_arch_setup): New marco.
11035 * lynx-low.c (lynx_target_ops): Update.
11036 * nto-low.c (nto_target_ops): Update.
11037 * spu-low.c (spu_target_ops): Update.
11038 * win32-low.c (win32_target_ops): Update.
11039
11040 2015-07-24 Yao Qi <yao.qi@linaro.org>
11041
11042 * linux-low.c (linux_add_process): Don't set
11043 proc->priv->new_inferior.
11044 (linux_create_inferior): Set proc->priv->new_inferior to 1.
11045 (linux_attach): Likewise.
11046
11047 2015-07-24 Yao Qi <yao.qi@linaro.org>
11048
11049 * server.c (start_inferior): Code refactor.
11050
11051 2015-07-24 Yao Qi <yao.qi@linaro.org>
11052
11053 * server.c (process_serial_event): Set general_thread.
11054
11055 2015-07-21 Yao Qi <yao.qi@linaro.org>
11056
11057 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
11058 aarch64_linux_get_debug_reg_capacity.
11059
11060 2015-07-17 Yao Qi <yao.qi@linaro.org>
11061
11062 * Makefile.in (aarch64-linux-hw-point.o): New rule.
11063 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
11064 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
11065 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
11066 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
11067 (AARCH64_HWP_ALIGNMENT): Likewise.
11068 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
11069 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
11070 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
11071 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
11072 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
11073 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
11074 (struct aarch64_debug_reg_state): Likewise.
11075 (struct arch_lwp_info): Likewise.
11076 (aarch64_align_watchpoint): Likewise.
11077 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
11078 (aarch64_watchpoint_length): Likewise.
11079 (aarch64_point_encode_ctrl_reg): Likewise
11080 (aarch64_point_is_aligned): Likewise.
11081 (aarch64_align_watchpoint): Likewise.
11082 (aarch64_linux_set_debug_regs):
11083 (aarch64_dr_state_insert_one_point): Likewise.
11084 (aarch64_dr_state_remove_one_point): Likewise.
11085 (aarch64_handle_breakpoint): Likewise.
11086 (aarch64_handle_aligned_watchpoint): Likewise.
11087 (aarch64_handle_unaligned_watchpoint): Likewise.
11088 (aarch64_handle_watchpoint): Likewise.
11089
11090 2015-07-17 Yao Qi <yao.qi@linaro.org>
11091
11092 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
11093 and don't aarch64_get_debug_reg_state. All callers update.
11094 (aarch64_handle_aligned_watchpoint): Likewise.
11095 (aarch64_handle_unaligned_watchpoint): Likewise.
11096 (aarch64_handle_watchpoint): Likewise.
11097 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
11098 (aarch64_remove_point): Likewise.
11099
11100 2015-07-17 Yao Qi <yao.qi@linaro.org>
11101
11102 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
11103 debug_printf.
11104 (aarch64_handle_unaligned_watchpoint): Likewise.
11105
11106 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11107
11108 Revert the previous 3 commits:
11109 Move gdb_regex* to common/
11110 Move linux_find_memory_regions_full & co.
11111 gdbserver build-id attribute generator
11112
11113 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
11114 Jan Kratochvil <jan.kratochvil@redhat.com>
11115
11116 gdbserver build-id attribute generator.
11117 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
11118 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
11119 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
11120 (find_phdr): New.
11121 (get_dynamic): Use find_pdhr to traverse program headers.
11122 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
11123 (compare_mapping_entry_range, struct find_memory_region_callback_data)
11124 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
11125 (get_hex_build_id): New.
11126 (linux_qxfer_libraries_svr4): Add optional build-id attribute
11127 to reply XML document.
11128
11129 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
11130 Jan Kratochvil <jan.kratochvil@redhat.com>
11131
11132 * target.c: Include target/target-utils.h and fcntl.h.
11133 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
11134 (target_fileio_read_stralloc): New functions.
11135
11136 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11137
11138 * Makefile.in (OBS): Add gdb_regex.o.
11139 (gdb_regex.o): New.
11140 * config.in: Rebuilt.
11141 * configure: Rebuilt.
11142
11143 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
11144 Jan Kratochvil <jan.kratochvil@redhat.com>
11145
11146 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
11147 * Makefile.in (OBS): Add target-utils.o.
11148 (linux-maps.o, target-utils.o): New.
11149 * configure.srv (srv_linux_obj): Add linux-maps.o.
11150
11151 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
11152
11153 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
11154 function, return 1.
11155 (the_low_target): Install it.
11156
11157 2015-07-14 Pedro Alves <palves@redhat.com>
11158
11159 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
11160 Instead, ignore ECHILD, and throw an error for other errnos.
11161
11162 2015-07-10 Pedro Alves <palves@redhat.com>
11163
11164 * event-loop.c (struct callback_event) <data>: Change type to
11165 gdb_client_data instance instead of gdb_client_data pointer.
11166 (append_callback_event): Adjust.
11167
11168 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
11169
11170 * linux-aarch64-low.c: Add comments for each linux_target_ops
11171 method. Remove comments already covered in target_ops and
11172 linux_target_ops definitions.
11173 (the_low_target): Add comments for each unimplemented method.
11174
11175 2015-07-09 Yao Qi <yao.qi@linaro.org>
11176
11177 * linux-aarch64-low.c (aarch64_regmap): Remove.
11178 (aarch64_usrregs_info): Remove.
11179 (regs_info): Set field usrregs to NULL.
11180
11181 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
11182
11183 * linux-low.c: Include "rsp-low.h"
11184 (linux_low_encode_pt_config, linux_low_encode_raw): New.
11185 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
11186 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
11187 (handle_btrace_enable_pt): New.
11188 (handle_btrace_general_set): Support "pt".
11189 (handle_btrace_conf_general_set): Support "pt:size".
11190
11191 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
11192
11193 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
11194 Z_PACKET_SW_BP.
11195
11196 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
11197
11198 * linux-aarch64-low.c: Remove comment about endianness.
11199 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
11200 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
11201 memcmp.
11202
11203 2015-06-24 Gary Benson <gbenson@redhat.com>
11204
11205 * linux-i386-ipa.c (stdint.h): Do not include.
11206 * lynx-i386-low.c (stdint.h): Likewise.
11207 * lynx-ppc-low.c (stdint.h): Likewise.
11208 * mem-break.c (stdint.h): Likewise.
11209 * thread-db.c (stdint.h): Likewise.
11210 * tracepoint.c (stdint.h): Likewise.
11211 * win32-low.c (stdint.h): Likewise.
11212
11213 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
11214
11215 * server.c (write_qxfer_response): Update call to
11216 remote_escape_output.
11217
11218 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
11219 Jan Kratochvil <jan.kratochvil@redhat.com>
11220
11221 Merge multiple hex conversions.
11222 * gdbreplay.c (tohex): Rename to 'fromhex'.
11223 (logchar): Use fromhex.
11224
11225 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
11226
11227 * server.c (handle_qxfer_libraries): Set `version' attribute for
11228 <library-list>.
11229
11230 2015-06-10 Gary Benson <gbenson@redhat.com>
11231
11232 * target.h (struct target_ops) <multifs_open>: New field.
11233 <multifs_unlink>: Likewise.
11234 <multifs_readlink>: Likewise.
11235 * linux-low.c (nat/linux-namespaces.h): New include.
11236 (linux_target_ops): Initialize the_target->multifs_open,
11237 the_target->multifs_unlink and the_target->multifs_readlink.
11238 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
11239 * hostio.c (hostio_fs_pid): New static variable.
11240 (hostio_handle_new_gdb_connection): New function.
11241 (handle_setfs): Likewise.
11242 (handle_open): Use the_target->multifs_open as appropriate.
11243 (handle_unlink): Use the_target->multifs_unlink as appropriate.
11244 (handle_readlink): Use the_target->multifs_readlink as
11245 appropriate.
11246 (handle_vFile): Handle vFile:setfs packets.
11247 * server.c (handle_query): Call hostio_handle_new_gdb_connection
11248 after target_handle_new_gdb_connection.
11249
11250 2015-06-10 Gary Benson <gbenson@redhat.com>
11251
11252 * configure.ac (AC_CHECK_FUNCS): Add setns.
11253 * config.in: Regenerate.
11254 * configure: Likewise.
11255 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
11256 (linux-namespaces.o): New rule.
11257 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
11258
11259 2015-06-09 Gary Benson <gbenson@redhat.com>
11260
11261 * hostio.c (handle_open): Process mode argument with
11262 fileio_to_host_mode.
11263
11264 2015-06-01 Yao Qi <yao.qi@linaro.org>
11265
11266 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
11267 * linux-x86-low.c: Likewise.
11268
11269 2015-05-28 Don Breazeal <donb@codesourcery.com>
11270
11271 * linux-low.c (handle_extended_wait): Initialize
11272 thread_info.last_resume_kind for new fork children.
11273
11274 2015-05-15 Pedro Alves <palves@redhat.com>
11275
11276 * target.h (target_handle_new_gdb_connection): Rewrite using if
11277 wrapped in do/while.
11278
11279 2015-05-14 Joel Brobecker <brobecker@adacore.com>
11280
11281 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
11282 * configure, config.in: Regenerate.
11283 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
11284 Declare typedef.
11285
11286 2015-05-12 Don Breazeal <donb@codesourcery.com>
11287
11288 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
11289 PTRACE_EVENT_VFORK_DONE.
11290 (linux_low_ptrace_options, extended_event_reported): Add vfork
11291 events.
11292 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
11293 and "vforkdone" for RSP 'T' Stop Reply Packet.
11294 * server.h (report_vfork_events): Declare
11295 global variable.
11296
11297 2015-05-12 Don Breazeal <donb@codesourcery.com>
11298
11299 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
11300 (the_low_target) <new_fork>: Initialize new member.
11301 * linux-arm-low.c (arm_new_fork): New function.
11302 (the_low_target) <new_fork>: Initialize new member.
11303 * linux-low.c (handle_extended_wait): Call new target function
11304 new_fork.
11305 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
11306 * linux-mips-low.c (mips_add_watchpoint): New function
11307 extracted from mips_insert_point.
11308 (the_low_target) <new_fork>: Initialize new member.
11309 (mips_linux_new_fork): New function.
11310 (mips_insert_point): Call mips_add_watchpoint.
11311 * linux-x86-low.c (x86_linux_new_fork): New function.
11312 (the_low_target) <new_fork>: Initialize new member.
11313
11314 2015-05-12 Don Breazeal <donb@codesourcery.com>
11315
11316 * linux-low.c (handle_extended_wait): Implement return value,
11317 rename argument 'event_child' to 'event_lwp', handle
11318 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
11319 (linux_low_ptrace_options): New function.
11320 (linux_low_filter_event): Call linux_low_ptrace_options,
11321 use different argument fo linux_enable_event_reporting,
11322 use return value from handle_extended_wait.
11323 (extended_event_reported): New function.
11324 (linux_wait_1): Call extended_event_reported and set
11325 status to report fork events.
11326 (linux_write_memory): Add pid to debug message.
11327 (reset_lwp_ptrace_options_callback): New function.
11328 (linux_handle_new_gdb_connection): New function.
11329 (linux_target_ops): Initialize new structure member.
11330 * linux-low.h (struct lwp_info) <waitstatus>: New member.
11331 * lynx-low.c: Initialize new structure member.
11332 * remote-utils.c (prepare_resume_reply): Implement stop reason
11333 "fork" for "T" stop message.
11334 * server.c (handle_query): Call handle_new_gdb_connection.
11335 * server.h (report_fork_events): Declare global flag.
11336 * target.h (struct target_ops) <handle_new_gdb_connection>:
11337 New member.
11338 (target_handle_new_gdb_connection): New macro.
11339 * win32-low.c: Initialize new structure member.
11340
11341 2015-05-12 Don Breazeal <donb@codesourcery.com>
11342
11343 * mem-break.c (APPEND_TO_LIST): Define macro.
11344 (clone_agent_expr): New function.
11345 (clone_one_breakpoint): New function.
11346 (clone_all_breakpoints): New function.
11347 * mem-break.h: Declare new functions.
11348
11349 2015-05-12 Don Breazeal <donb@codesourcery.com>
11350
11351 * linux-low.c (linux_supports_fork_events): New function.
11352 (linux_supports_vfork_events): New function.
11353 (linux_target_ops): Initialize new structure members.
11354 (initialize_low): Call linux_check_ptrace_features.
11355 * lynx-low.c (lynx_target_ops): Initialize new structure
11356 members.
11357 * server.c (report_fork_events, report_vfork_events):
11358 New global flags.
11359 (handle_query): Add new features to qSupported packet and
11360 response.
11361 (captured_main): Initialize new global variables.
11362 * target.h (struct target_ops) <supports_fork_events>:
11363 New member.
11364 <supports_vfork_events>: New member.
11365 (target_supports_fork_events): New macro.
11366 (target_supports_vfork_events): New macro.
11367 * win32-low.c (win32_target_ops): Initialize new structure
11368 members.
11369
11370 2015-05-12 Gary Benson <gbenson@redhat.com>
11371
11372 * server.c (handle_qxfer_exec_file): Use current process
11373 if annex is empty.
11374
11375 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
11376
11377 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
11378 Remove HAVE_PTRACE_GETREGS conditionals.
11379 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
11380 instead of PTRACE_GETREGS and PTRACE_SETREGS.
11381
11382 2015-05-08 Yao Qi <yao.qi@linaro.org>
11383
11384 * linux-low.c (linux_supports_conditional_breakpoints): New
11385 function.
11386 (linux_target_ops): Install new target method.
11387 * lynx-low.c (lynx_target_ops): Install NULL hook for
11388 supports_conditional_breakpoints.
11389 * nto-low.c (nto_target_ops): Likewise.
11390 * spu-low.c (spu_target_ops): Likewise.
11391 * win32-low.c (win32_target_ops): Likewise.
11392 * server.c (handle_query): Check
11393 target_supports_conditional_breakpoints.
11394 * target.h (struct target_ops) <supports_conditional_breakpoints>:
11395 New field.
11396 (target_supports_conditional_breakpoints): New macro.
11397
11398 2015-05-06 Pedro Alves <palves@redhat.com>
11399
11400 PR server/18081
11401 * server.c (start_inferior): If the process exits, mourn it.
11402
11403 2015-04-21 Gary Benson <gbenson@redhat.com>
11404
11405 * hostio.c (fileio_open_flags_to_host): Factored out to
11406 fileio_to_host_openflags in common/fileio.c. Single use
11407 updated.
11408
11409 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
11410
11411 * linux-xtensa-low.c (xtensa_fill_gregset)
11412 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
11413 XCHAL_HAVE_LOOP.
11414
11415 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
11416
11417 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
11418 (regs_info): Replace usrregs pointer with NULL.
11419
11420 2015-04-17 Gary Benson <gbenson@redhat.com>
11421
11422 * target.h (struct target_ops) <pid_to_exec_file>: New field.
11423 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
11424 * server.c (handle_qxfer_exec_file): New function.
11425 (qxfer_packets): Add exec-file entry.
11426 (handle_query): Report qXfer:exec-file:read as supported packet.
11427
11428 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
11429
11430 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
11431
11432 2015-04-09 Gary Benson <gbenson@redhat.com>
11433
11434 * hostio-errno.c (errno_to_fileio_error): Remove function.
11435 Update caller to use remote_fileio_to_fio_error.
11436
11437 2015-04-09 Yao Qi <yao.qi@linaro.org>
11438
11439 * linux-low.c (linux_insert_point): Call
11440 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
11441 (linux_remove_point): Call remove_memory_breakpoint if type is
11442 raw_bkpt_type_sw.
11443 * linux-x86-low.c (x86_insert_point): Don't call
11444 insert_memory_breakpoint.
11445 (x86_remove_point): Don't call remove_memory_breakpoint.
11446
11447 2015-04-01 Pedro Alves <palves@redhat.com>
11448 Cleber Rosa <crosa@redhat.com>
11449
11450 * server.c (gdbserver_usage): Reorganize and extend the usage
11451 message.
11452
11453 2015-03-24 Pedro Alves <palves@redhat.com>
11454
11455 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
11456 output. Also dump TRAP_TRACE.
11457 (linux_low_filter_event): In debug output, distinguish a
11458 resume_stop SIGSTOP from a delayed SIGSTOP.
11459
11460 2015-03-24 Gary Benson <gbenson@redhat.com>
11461
11462 * linux-x86-low.c (x86_linux_new_thread): Moved to
11463 nat/x86-linux.c.
11464 (x86_linux_prepare_to_resume): Likewise.
11465
11466 2015-03-24 Gary Benson <gbenson@redhat.com>
11467
11468 * Makefile.in (x86-linux-dregs.o): New rule.
11469 * configure.srv: Add x86-linux-dregs.o to relevant targets.
11470 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
11471 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
11472 (x86_linux_dr_get): Likewise.
11473 (x86_linux_dr_set): Likewise.
11474 (update_debug_registers_callback): Likewise.
11475 (x86_linux_dr_set_addr): Likewise.
11476 (x86_linux_dr_get_addr): Likewise.
11477 (x86_linux_dr_set_control): Likewise.
11478 (x86_linux_dr_get_control): Likewise.
11479 (x86_linux_dr_get_status): Likewise.
11480 (x86_linux_update_debug_registers): Likewise.
11481
11482 2015-03-24 Gary Benson <gbenson@redhat.com>
11483
11484 * linux-x86-low.c (x86_linux_update_debug_registers):
11485 New function, factored out from...
11486 (x86_linux_prepare_to_resume): ...this.
11487
11488 2015-03-24 Gary Benson <gbenson@redhat.com>
11489
11490 * linux-x86-low.c (x86_linux_dr_get): Update comments.
11491 (x86_linux_dr_set): Likewise.
11492 (update_debug_registers_callback): Likewise.
11493 (x86_linux_dr_set_addr): Likewise.
11494 (x86_linux_dr_get_addr): Likewise.
11495 (x86_linux_dr_set_control): Likewise.
11496 (x86_linux_dr_get_control): Likewise.
11497 (x86_linux_dr_get_status): Likewise.
11498 (x86_linux_prepare_to_resume): Likewise.
11499
11500 2015-03-24 Gary Benson <gbenson@redhat.com>
11501
11502 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
11503 Use perror_with_name. Pass string through gettext.
11504 (x86_linux_dr_set): Likewise.
11505
11506 2015-03-24 Gary Benson <gbenson@redhat.com>
11507
11508 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
11509 (x86_linux_dr_set_addr): ...this.
11510 (x86_dr_low_get_addr): Rename to...
11511 (x86_linux_dr_get_addr): ...this.
11512 (x86_dr_low_set_control): Rename to...
11513 (x86_linux_dr_set_control): ...this.
11514 (x86_dr_low_get_control): Rename to...
11515 (x86_linux_dr_get_control): ...this.
11516 (x86_dr_low_get_status): Rename to...
11517 (x86_linux_dr_get_status): ...this.
11518 (x86_dr_low): Update with new function names.
11519
11520 2015-03-24 Gary Benson <gbenson@redhat.com>
11521
11522 * Makefile.in (x86-linux.o): New rule.
11523 * configure.srv: Add x86-linux.o to relevant targets.
11524 * linux-low.c (lwp_set_arch_private_info): New function.
11525 (lwp_arch_private_info): Likewise.
11526 * linux-x86-low.c: Include nat/x86-linux.h.
11527 (arch_lwp_info): Removed structure.
11528 (update_debug_registers_callback):
11529 Use lwp_set_debug_registers_changed.
11530 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
11531 and lwp_set_debug_registers_changed.
11532 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
11533
11534 2015-03-24 Gary Benson <gbenson@redhat.com>
11535
11536 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
11537 * linux-arm-low.c (arm_new_thread): Likewise.
11538 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
11539 * linux-mips-low.c (mips_linux_new_thread): Likewise.
11540 * linux-x86-low.c (x86_linux_new_thread): Likewise.
11541 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
11542
11543 2015-03-24 Gary Benson <gbenson@redhat.com>
11544
11545 * linux-low.c (ptid_of_lwp): New function.
11546 (lwp_is_stopped): Likewise.
11547 (lwp_stop_reason): Likewise.
11548 * linux-x86-low.c (update_debug_registers_callback):
11549 Use lwp_is_stopped.
11550 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
11551 lwp_stop_reason.
11552
11553 2015-03-24 Gary Benson <gbenson@redhat.com>
11554
11555 * linux-low.h (linux_stop_lwp): Remove declaration.
11556
11557 2015-03-24 Gary Benson <gbenson@redhat.com>
11558
11559 * linux-low.h: Include nat/linux-nat.h.
11560 * linux-low.c (iterate_over_lwps_args): New structure.
11561 (iterate_over_lwps_filter): New function.
11562 (iterate_over_lwps): Likewise.
11563 * linux-x86-low.c (update_debug_registers_callback):
11564 Update signature to what iterate_over_lwps expects.
11565 Remove PID check that iterate_over_lwps now performs.
11566 (x86_dr_low_set_addr): Use iterate_over_lwps.
11567 (x86_dr_low_set_control): Likewise.
11568
11569 2015-03-24 Gary Benson <gbenson@redhat.com>
11570
11571 * linux-x86-low.c (x86_debug_reg_state): New function.
11572 (x86_linux_prepare_to_resume): Use the above.
11573
11574 2015-03-24 Gary Benson <gbenson@redhat.com>
11575
11576 * linux-low.c (current_lwp_ptid): New function.
11577 * linux-x86-low.c: Include nat/linux-nat.h.
11578 (x86_dr_low_get_addr): Use current_lwp_ptid.
11579 (x86_dr_low_get_control): Likewise.
11580 (x86_dr_low_get_status): Likewise.
11581
11582 2015-03-20 Pedro Alves <palves@redhat.com>
11583
11584 * tracepoint.c (cmd_qtstatus): Make "str" const.
11585
11586 2015-03-20 Pedro Alves <palves@redhat.com>
11587
11588 * server.c (handle_general_set): Make "req_str" const.
11589
11590 2015-03-19 Pedro Alves <palves@redhat.com>
11591
11592 * linux-low.c (linux_resume_one_lwp): Rename to ...
11593 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
11594 instead call perror_with_name.
11595 (check_ptrace_stopped_lwp_gone): New function.
11596 (linux_resume_one_lwp): Reimplement as wrapper around
11597 linux_resume_one_lwp_throw that swallows errors if the LWP is
11598 gone.
11599
11600 2015-03-19 Pedro Alves <palves@redhat.com>
11601
11602 * linux-low.c (count_events_callback, select_event_lwp_callback):
11603 No longer check whether the thread has resume_stop as last resume
11604 kind.
11605
11606 2015-03-19 Pedro Alves <palves@redhat.com>
11607
11608 * linux-low.c (count_events_callback, select_event_lwp_callback):
11609 Use the lwp's status_pending_p field, not the thread's.
11610
11611 2015-03-19 Pedro Alves <palves@redhat.com>
11612
11613 * linux-low.c (select_event_lwp_callback): Update comments to
11614 no longer mention SIGTRAP.
11615
11616 2015-03-18 Gary Benson <gbenson@redhat.com>
11617
11618 * server.c (handle_query): Do not report vFile:fstat as supported.
11619
11620 2015-03-11 Gary Benson <gbenson@redhat.com>
11621
11622 * hostio.c (sys/types.h): New include.
11623 (sys/stat.h): Likewise.
11624 (common-remote-fileio.h): Likewise.
11625 (handle_fstat): New function.
11626 (handle_vFile): Handle vFile:fstat packets.
11627
11628 2015-03-11 Gary Benson <gbenson@redhat.com>
11629
11630 * configure.ac (AC_CHECK_MEMBERS): Add checks for
11631 struct stat.st_blocks and struct stat.st_blksize.
11632 * configure: Regenerate.
11633 * config.in: Likewise.
11634 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
11635 (OBS): Add common-remote-fileio.o.
11636 (common-remote-fileio.o): New rule.
11637
11638 2015-03-09 Pedro Alves <palves@redhat.com>
11639
11640 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
11641 'struct sockaddr' pointer in 'accept' call.
11642
11643 2015-03-09 Pedro Alves <palves@redhat.com>
11644
11645 Revert:
11646 2015-03-07 Pedro Alves <palves@redhat.com>
11647 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11648 or <winsock2.h> here. Instead include "gdb_socket.h".
11649 (remote_open): Use union gdb_sockaddr_u.
11650 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11651 or <winsock2.h> here. Instead include "gdb_socket.h".
11652 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11653 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11654 or <sys/un.h>.
11655 (init_named_socket, gdb_agent_helper_thread): Use union
11656 gdb_sockaddr_u.
11657
11658 2015-03-07 Pedro Alves <palves@redhat.com>
11659
11660 * configure.ac (build_warnings): Move
11661 -Wdeclaration-after-statement to the C-specific set.
11662 * configure: Regenerate.
11663
11664 2015-03-07 Pedro Alves <palves@redhat.com>
11665
11666 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
11667 or <winsock2.h> here. Instead include "gdb_socket.h".
11668 (remote_open): Use union gdb_sockaddr_u.
11669 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
11670 or <winsock2.h> here. Instead include "gdb_socket.h".
11671 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
11672 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
11673 or <sys/un.h>.
11674 (init_named_socket, gdb_agent_helper_thread): Use union
11675 gdb_sockaddr_u.
11676
11677 2015-03-07 Pedro Alves <palves@redhat.com>
11678
11679 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
11680 instead.
11681
11682 2015-03-06 Yao Qi <yao.qi@linaro.org>
11683
11684 * linux-aarch64-low.c (aarch64_insert_point): Use
11685 show_debug_regs as a boolean.
11686 (aarch64_remove_point): Likewise.
11687
11688 2015-03-05 Pedro Alves <palves@redhat.com>
11689
11690 * lynx-low.c (lynx_target_ops): Install NULL hooks for
11691 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
11692 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
11693 * nto-low.c (nto_target_ops): Likewise.
11694 * spu-low.c (spu_target_ops): Likewise.
11695 * win32-low.c (win32_target_ops): Likewise.
11696
11697 2015-03-04 Pedro Alves <palves@redhat.com>
11698
11699 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
11700 Decide whether a breakpoint triggered based on the SIGTRAP's
11701 siginfo.si_code.
11702 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
11703 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
11704 (linux_low_filter_event): Check for breakpoints before checking
11705 watchpoints.
11706 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
11707 siginfo.si_code.
11708 (linux_stopped_by_sw_breakpoint)
11709 (linux_supports_stopped_by_sw_breakpoint)
11710 (linux_stopped_by_hw_breakpoint)
11711 (linux_supports_stopped_by_hw_breakpoint): New functions.
11712 (linux_target_ops): Install new target methods.
11713
11714 2015-03-04 Pedro Alves <palves@redhat.com>
11715
11716 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
11717 * server.c (swbreak_feature, hwbreak_feature): New globals.
11718 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
11719 (captured_main): Clear swbreak_feature and hwbreak_feature.
11720 * server.h (swbreak_feature, hwbreak_feature): Declare.
11721 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
11722 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
11723 supports_stopped_by_hw_breakpoint>: New fields.
11724 (target_supports_stopped_by_sw_breakpoint)
11725 (target_stopped_by_sw_breakpoint)
11726 (target_supports_stopped_by_hw_breakpoint)
11727 (target_stopped_by_hw_breakpoint): Declare.
11728
11729 2015-03-04 Pedro Alves <palves@redhat.com>
11730
11731 enum lwp_stop_reason -> enum target_stop_reason
11732 * linux-low.c (check_stopped_by_breakpoint): Adjust.
11733 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
11734 (linux_wait_1, stuck_in_jump_pad_callback)
11735 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
11736 (linux_stopped_by_watchpoint):
11737 * linux-low.h (enum lwp_stop_reason): Delete.
11738 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
11739 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
11740
11741 2015-03-04 Yao Qi <yao.qi@linaro.org>
11742
11743 * Makefile.in (SFILES): Add linux-aarch64-low.c.
11744
11745 2015-03-03 Gary Benson <gbenson@redhat.com>
11746
11747 * hostio.c (handle_vFile): Fix prefix lengths.
11748
11749 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
11750
11751 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
11752 ptr_bits.
11753
11754 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
11755
11756 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
11757 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
11758 (clean): Add "rm -f" for above C files.
11759 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
11760 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
11761 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
11762 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
11763 * linux-s390-low.c (HWCAP_S390_VX): New macro.
11764 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
11765 (init_registers_s390x_vx_linux64)
11766 (init_registers_s390x_tevx_linux64)
11767 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
11768 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
11769 declarations.
11770 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
11771 (s390_store_vxrs_high): New functions.
11772 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
11773 NT_S390_VXRS_HIGH.
11774 (s390_arch_setup): Add logic for selecting one of the new target
11775 descriptions. Activate the new vector regsets if applicable.
11776 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
11777 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
11778 and init_registers_s390x_tevx_linux64.
11779
11780 2015-03-01 Pedro Alves <palves@redhat.com>
11781
11782 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
11783 parameter.
11784
11785 2015-02-27 Pedro Alves <palves@redhat.com>
11786
11787 * linux-x86-low.c (u_debugreg_offset): New function.
11788 (x86_linux_dr_get, x86_linux_dr_set): Use it.
11789
11790 2015-02-27 Pedro Alves <palves@redhat.com>
11791
11792 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
11793 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
11794 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
11795 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
11796 (ps_lsetfpregs, ps_getpid)
11797 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
11798 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
11799 (ps_lsetxregs, ps_plog): Declare.
11800
11801 2015-02-27 Pedro Alves <palves@redhat.com>
11802
11803 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
11804 IP_AGENT_EXPORT_FUNC.
11805 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
11806 IP_AGENT_EXPORT_FUNC.
11807 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
11808 (IP_AGENT_EXPORT): Delete.
11809 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11810 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11811 (gdb_trampoline_buffer_error, collecting, gdb_collect)
11812 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
11813 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
11814 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
11815 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
11816 (traceframe_read_count, traceframe_write_count)
11817 (traceframes_created, trace_state_variables, get_raw_reg)
11818 (get_trace_state_variable_value, set_trace_state_variable_value)
11819 (ust_loaded, helper_thread_id, cmd_buf): Use
11820 IPA_SYM_EXPORTED_NAME.
11821 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
11822 (tracepoints) Use IP_AGENT_EXPORT_VAR.
11823 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
11824 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11825 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
11826 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
11827 EXTERN_C_PUSH/EXTERN_C_POP.
11828 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
11829 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
11830 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11831 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
11832 (traceframe_write_count, traceframe_read_count)
11833 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
11834 (about_to_request_buffer_space, get_trace_state_variable_value)
11835 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
11836 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
11837 EXTERN_C_PUSH/EXTERN_C_POP.
11838 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
11839 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
11840 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
11841 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
11842 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11843 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
11844 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
11845 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
11846 Define.
11847 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
11848 (IP_AGENT_EXPORT_VAR_DECL): Define.
11849 (tracing): Declare.
11850 (gdb_agent_get_raw_reg): Declare.
11851
11852 2015-02-27 Tom Tromey <tromey@redhat.com>
11853 Pedro Alves <palves@redhat.com>
11854
11855 Rename symbols whose names are reserved C++ keywords throughout.
11856
11857 2015-02-27 Pedro Alves <palves@redhat.com>
11858
11859 * Makefile.in (COMPILER): New, get it from autoconf.
11860 (CXX): Get from autoconf instead.
11861 (COMPILE.pre): Use COMPILER.
11862 (CC-LD): Rename to ...
11863 (CC_LD): ... this. Use COMPILER.
11864 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
11865 (CXX_FOR_TARGET): Default to g++ instead of gcc.
11866 * acinclude.m4: Include build-with-cxx.m4.
11867 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
11868 Disable -Werror by default if building in C++ mode.
11869 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
11870 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
11871 the C++ compiler. Save/restore CXXFLAGS too.
11872 * configure: Regenerate.
11873
11874 2015-02-27 Pedro Alves <palves@redhat.com>
11875
11876 * acinclude.m4: Include libiberty.m4.
11877 * configure.ac: Call libiberty_INIT.
11878 * config.in, configure: Regenerate.
11879
11880 2015-02-26 Pedro Alves <palves@redhat.com>
11881
11882 * linux-low.c (linux_wait_1): When incrementing the PC past a
11883 program breakpoint always use the_low_target.breakpoint_len as
11884 increment, rather than the maximum between that and
11885 the_low_target.decr_pc_after_break.
11886
11887 2015-02-23 Pedro Alves <palves@redhat.com>
11888
11889 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
11890 thread was doing a step-over; always adjust the PC if
11891 we stepped over a permanent breakpoint.
11892 (linux_wait_1): If we stepped over breakpoint that was on top of a
11893 permanent breakpoint, manually advance the PC past it.
11894
11895 2015-02-23 Pedro Alves <palves@redhat.com>
11896
11897 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
11898 modes.
11899 (x86_fill_gregset, x86_store_gregset): Use it when handling
11900 $orig_eax.
11901
11902 2015-02-20 Pedro Alves <palves@redhat.com>
11903
11904 * thread-db.c: Include "nat/linux-procfs.h".
11905 (thread_db_init): Skip listing new threads if the kernel supports
11906 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
11907
11908 2015-02-20 Pedro Alves <palves@redhat.com>
11909
11910 * linux-low.c (status_pending_p_callback): Use ptid_match.
11911
11912 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
11913
11914 PR breakpoints/16812
11915 * linux-low.c (wstatus_maybe_breakpoint): Remove.
11916 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
11917 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
11918
11919 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
11920
11921 PR breakpoints/15956
11922 * tracepoint.c (cmd_qtinit): Add check for current_thread.
11923
11924 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11925
11926 * linux-low.c (linux_low_btrace_conf): Print size.
11927 * server.c (handle_btrace_conf_general_set): New.
11928 (hanle_general_set): Call handle_btrace_conf_general_set.
11929 (handle_query): Report Qbtrace-conf:bts:size as supported.
11930
11931 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11932
11933 * linux-low.c (linux_low_enable_btrace): Update parameters.
11934 (linux_low_btrace_conf): New.
11935 (linux_target_ops)<to_btrace_conf>: Initialize.
11936 * server.c (current_btrace_conf): New.
11937 (handle_btrace_enable): Rename to ...
11938 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
11939 to target_enable_btrace. Update comment. Update users.
11940 (handle_qxfer_btrace_conf): New.
11941 (qxfer_packets): Add btrace-conf entry.
11942 (handle_query): Report qXfer:btrace-conf:read as supported packet.
11943 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
11944 (target_ops)<read_btrace_conf>: New.
11945 (target_enable_btrace): Update parameters.
11946 (target_read_btrace_conf): New.
11947
11948 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11949
11950 * server.c (handle_btrace_general_set): Remove call to
11951 target_supports_btrace.
11952 (supported_btrace_packets): New.
11953 (handle_query): Call supported_btrace_packets.
11954 * target.h: include btrace-common.h.
11955 (btrace_target_info): Removed.
11956 (supports_btrace, target_supports_btrace): Update parameters.
11957
11958 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
11959
11960 * Makefile.in (SFILES): Add common/btrace-common.c.
11961 (OBS): Add common/btrace-common.o.
11962 (btrace-common.o): Add build rules.
11963 * linux-low: Include btrace-common.h.
11964 (linux_low_read_btrace): Use struct btrace_data. Call
11965 btrace_data_init and btrace_data_fini.
11966
11967 2015-02-06 Pedro Alves <palves@redhat.com>
11968
11969 * thread-db.c (find_new_threads_callback): Add debug output.
11970
11971 2015-02-04 Pedro Alves <palves@redhat.com>
11972
11973 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
11974 (resume_stopped_resumed_lwps): New function.
11975 (linux_wait_for_event_filtered): Use it.
11976
11977 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11978
11979 * Makefile.in (SFILES): Add linux-personality.c.
11980 (linux-personality.o): New rule.
11981 * configure.srv (srv_linux_obj): Add linux-personality.o to the
11982 list of objects to be built.
11983 * linux-low.c: Include nat/linux-personality.h.
11984 (linux_create_inferior): Remove code to disable address space
11985 randomization (moved to ../nat/linux-personality.c). Create
11986 cleanup to disable address space randomization.
11987
11988 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
11989
11990 * Makefile.in (posix-strerror.o): New rule.
11991 (mingw-strerror.o): Likewise.
11992 * configure: Regenerated.
11993 * configure.ac: Source file ../common/common.host. Initialize new
11994 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
11995
11996 2015-01-14 Yao Qi <yao@codesourcery.com>
11997
11998 * Makefile.in (SFILES): Add nat/ppc-linux.c.
11999 (ppc-linux.o): New rule.
12000 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
12001 * configure.ac: AC_CHECK_FUNCS(getauxval).
12002 * config.in: Re-generated.
12003 * configure: Re-generated.
12004 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
12005 ppc64_64bit_inferior_p
12006
12007 2015-01-14 Yao Qi <yao@codesourcery.com>
12008
12009 * linux-ppc-low.c: Include "nat/ppc-linux.h".
12010 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
12011 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
12012 (PT_ORIG_R3, PT_TRAP): Likewise.
12013 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
12014 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
12015 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
12016
12017 2015-01-10 Joel Brobecker <brobecker@adacore.com>
12018
12019 * i387-fp.c (i387_cache_to_xsave): In look over
12020 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
12021 zmmh_low_space field by use of zmmh_high_space.
12022
12023 2015-01-09 Pedro Alves <palves@redhat.com>
12024
12025 * linux-low.c (step_over_bkpt): Move higher up in the file.
12026 (handle_extended_wait): Don't store the stop_pc here.
12027 (get_stop_pc): Adjust comments and rename to ...
12028 (check_stopped_by_breakpoint): ... this. Record whether the LWP
12029 stopped for a software breakpoint or hardware breakpoint.
12030 (thread_still_has_status_pending_p): New function.
12031 (status_pending_p_callback): Use
12032 thread_still_has_status_pending_p. If the event is no longer
12033 interesting, resume the LWP.
12034 (handle_tracepoints): Add assert.
12035 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
12036 (wstatus_maybe_breakpoint): New function.
12037 (cancel_breakpoint): Delete function.
12038 (check_stopped_by_watchpoint): New function, factored out from
12039 linux_low_filter_event.
12040 (lp_status_maybe_breakpoint): Delete function.
12041 (linux_low_filter_event): Remove filter_ptid argument.
12042 Leave thread group exits pending here. Store the LWP's stop PC.
12043 Always leave events pending.
12044 (linux_wait_for_event_filtered): Pull all events out of the
12045 kernel, and leave them all pending.
12046 (count_events_callback, select_event_lwp_callback): Consider all
12047 events.
12048 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
12049 (select_event_lwp): Only give preference to the stepping LWP in
12050 all-stop mode. Adjust comments.
12051 (ignore_event): New function.
12052 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
12053 references to cancel_breakpoints. Adjust to renames. Also give
12054 equal priority to all LWPs that have had events in non-stop mode.
12055 If reporting a software breakpoint event, unadjust the LWP's PC.
12056 (linux_wait): If linux_wait_1 returned an ignored event, retry.
12057 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
12058 Adjust.
12059 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
12060 (resume_status_pending_p): Use thread_still_has_status_pending_p.
12061 (linux_stopped_by_watchpoint): Adjust.
12062 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
12063 * linux-low.h (enum lwp_stop_reason): New.
12064 (struct lwp_info) <stop_pc>: Adjust comment.
12065 <stopped_by_watchpoint>: Delete field.
12066 <stop_reason>: New field.
12067 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
12068 * mem-break.c (software_breakpoint_inserted_here)
12069 (hardware_breakpoint_inserted_here): New function.
12070 * mem-break.h (software_breakpoint_inserted_here)
12071 (hardware_breakpoint_inserted_here): Declare.
12072 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
12073 (cancel_breakpoints): Delete.
12074 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
12075 (upload_fast_traceframes): Remove references to
12076 cancel_breakpoints.
12077
12078 2015-01-09 Pedro Alves <palves@redhat.com>
12079
12080 * thread-db.c (find_new_threads_callback): Ignore thread if the
12081 kernel thread ID is -1.
12082
12083 2015-01-09 Pedro Alves <palves@redhat.com>
12084
12085 * linux-low.c (linux_attach_fail_reason_string): Move to
12086 nat/linux-ptrace.c, and rename.
12087 (linux_attach_lwp): Update comment.
12088 (attach_proc_task_lwp_callback): New function.
12089 (linux_attach): Adjust to rename and use
12090 linux_proc_attach_tgid_threads.
12091 (linux_attach_fail_reason_string): Delete declaration.
12092
12093 2015-01-01 Joel Brobecker <brobecker@adacore.com>
12094
12095 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
12096 * server.c (gdbserver_version): Likewise.
12097
12098 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
12099
12100 * remote-utils.c: Include ctype.h.
12101 (input_interrupt): Explicitly handle the case when the char
12102 received is the NUL byte. Improve the printing of non-ASCII
12103 characters.
12104
12105 2014-12-16 Joel Brobecker <brobecker@adacore.com>
12106
12107 * linux-low.c (linux_low_filter_event): Update call to
12108 linux_enable_event_reporting following the addition of
12109 a new parameter to that function.
12110
12111 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
12112
12113 PR server/17457
12114 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
12115 (AARCH64_FPCR_REGNO): Likewise.
12116 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
12117 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
12118 (aarch64_store_fpregset): Likewise.
12119
12120 2014-12-15 Joel Brobecker <brobecker@adacore.com>
12121
12122 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
12123 Remove FIXME comment about assumption about N.
12124
12125 2014-12-13 Joel Brobecker <brobecker@adacore.com>
12126
12127 * configure.ac: If large-file support is disabled in GDBserver,
12128 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
12129 * configure: Regenerate.
12130
12131 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12132
12133 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
12134 warning upon ENODATA from ptrace.
12135 * linux-s390-low.c (s390_store_tdb): New.
12136 (s390_regsets): Add regset for NT_S390_TDB.
12137
12138 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12139
12140 * linux-low.c (regsets_store_inferior_registers): Skip regsets
12141 without a fill_function.
12142 * linux-s390-low.c (s390_fill_last_break): Remove.
12143 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
12144 (s390_arch_setup): Use regset's size instead of fill_function for
12145 loop end condition.
12146
12147 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12148
12149 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
12150 the regset's store function when ptrace returned an error.
12151 * regcache.c (get_thread_regcache): Invalidate register cache
12152 before fetching inferior's registers.
12153
12154 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12155
12156 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
12157 while-loop as for-loop.
12158 (regsets_store_inferior_registers): Likewise.
12159
12160 2014-11-28 Yao Qi <yao@codesourcery.com>
12161
12162 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
12163 * config.in, configure: Re-generate.
12164 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
12165 is defined.
12166
12167 2014-11-21 Yao Qi <yao@codesourcery.com>
12168
12169 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
12170 (AC_CHECK_HEADERS): Remove malloc.h.
12171 * configure: Re-generated.
12172 * config.in: Re-generated.
12173 * server.h: Don't include alloca.h and malloc.h.
12174 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
12175 Don't include malloc.h.
12176
12177 2014-11-17 Joel Brobecker <brobecker@adacore.com>
12178
12179 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
12180 corresponding ERRNO check in same block.
12181
12182 2014-11-12 Pedro Alves <palves@redhat.com>
12183
12184 * server.c (cont_thread): Update comment.
12185 (start_inferior, attach_inferior): No longer clear cont_thread.
12186 (handle_v_cont): No longer set cont_thread.
12187 (captured_main): Clear cont_thread each time a GDB connects.
12188
12189 2014-11-12 Pedro Alves <palves@redhat.com>
12190
12191 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
12192 thread, and don't resume all threads if the Hc thread has exited.
12193
12194 2014-11-12 Pedro Alves <palves@redhat.com>
12195
12196 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
12197 the process group instead of to a specific LWP.
12198
12199 2014-10-15 Pedro Alves <palves@redhat.com>
12200
12201 PR server/17487
12202 * win32-arm-low.c (arm_set_thread_context): Remove current_event
12203 parameter.
12204 (arm_set_thread_context): Delete.
12205 (the_low_target): Adjust.
12206 * win32-i386-low.c (debug_registers_changed)
12207 (debug_registers_used): Delete.
12208 (update_debug_registers_callback): New function.
12209 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
12210 needing to update their debug registers.
12211 (win32_get_current_dr): New function.
12212 (x86_dr_low_get_addr, x86_dr_low_get_control)
12213 (x86_dr_low_get_status): Fetch the debug register from the thread
12214 record's context.
12215 (i386_initial_stuff): Adjust.
12216 (i386_get_thread_context): Remove current_event parameter. Don't
12217 clear debug_registers_changed nor copy DR values to
12218 debug_reg_state.
12219 (i386_set_thread_context): Delete.
12220 (i386_prepare_to_resume): New function.
12221 (i386_thread_added): Mark the thread as needing to update irs
12222 debug registers.
12223 (the_low_target): Remove i386_set_thread_context and install
12224 i386_prepare_to_resume.
12225 * win32-low.c (win32_get_thread_context): Adjust.
12226 (win32_set_thread_context): Use SetThreadContext
12227 directly.
12228 (win32_prepare_to_resume): New function.
12229 (win32_require_context): New function, factored out from ...
12230 (thread_rec): ... this.
12231 (continue_one_thread): Call win32_prepare_to_resume on each thread
12232 we're about to continue.
12233 (win32_resume): Call win32_prepare_to_resume on the event thread.
12234 * win32-low.h (struct win32_thread_info)
12235 <debug_registers_changed>: New field.
12236 (struct win32_target_ops): Change prototype of set_thread_context,
12237 delete set_thread_context and add prepare_to_resume.
12238 (win32_require_context): New declaration.
12239
12240 2014-10-08 Gary Benson <gbenson@redhat.com>
12241
12242 * server.h: Do not include common-exceptions.h.
12243
12244 2014-10-08 Gary Benson <gbenson@redhat.com>
12245
12246 * server.h: Do not include cleanups.h.
12247
12248 2014-09-30 James Hogan <james.hogan@imgtec.com>
12249
12250 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
12251 mips64-dsp-linux.c.
12252
12253 2014-09-23 Yao Qi <yao@codesourcery.com>
12254
12255 * linux-low.c (lp_status_maybe_breakpoint): New function.
12256 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
12257 (count_events_callback): Likewise.
12258 (select_event_lwp_callback): Likewise.
12259 (cancel_breakpoints_callback): Likewise.
12260
12261 2014-09-19 Don Breazeal <donb@codesourcery.com>
12262
12263 * linux-low.c (handle_extended_wait): Call
12264 linux_ptrace_get_extended_event.
12265 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
12266 linux_is_extended_waitstatus.
12267
12268 2014-09-16 Joel Brobecker <brobecker@adacore.com>
12269
12270 * Makefile.in (CPPFLAGS): Define.
12271 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
12272 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
12273
12274 2014-09-16 Gary Benson <gbenson@redhat.com>
12275
12276 * inferiors.h (current_inferior): Renamed as...
12277 (current_thread): New variable. All uses updated.
12278 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
12279 (maybe_move_out_of_jump_pad): Likewise.
12280 (cancel_breakpoint): Likewise.
12281 (linux_low_filter_event): Likewise.
12282 (wait_for_sigstop): Likewise.
12283 (linux_resume_one_lwp): Likewise.
12284 (need_step_over_p): Likewise.
12285 (start_step_over): Likewise.
12286 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
12287 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
12288 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
12289 and save_inferior as saved_thread.
12290 * regcache.c (get_thread_regcache): Renamed saved_inferior as
12291 saved_thread.
12292 (regcache_invalidate_thread): Likewise.
12293 * remote-utils.c (prepare_resume_reply): Likewise.
12294 * thread-db.c (thread_db_get_tls_address): Likewise.
12295 (disable_thread_event_reporting): Likewise.
12296 (remove_thread_event_breakpoints): Likewise.
12297 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
12298 as saved_thread.
12299 * target.h (set_desired_inferior): Renamed as...
12300 (set_desired_thread): New declaration. All uses updated.
12301 * server.c (myresume): Updated comment to reference thread instead
12302 of inferior.
12303 (handle_serial_event): Likewise.
12304 (handle_target_event): Likewise.
12305
12306 2014-09-12 Tom Tromey <tromey@redhat.com>
12307 Gary Benson <gbenson@redhat.com>
12308
12309 * regcache.h: Include common-regcache.h.
12310 (regcache_read_pc): Don't declare.
12311 * regcache.c (get_thread_regcache_for_ptid): New function.
12312
12313 2014-09-11 Tom Tromey <tromey@redhat.com>
12314 Gary Benson <gbenson@redhat.com>
12315
12316 * symbol.c: New file.
12317 * Makefile.in (SFILES): Add symbol.c.
12318 (OBS): Add symbol.o.
12319
12320 2014-09-11 Gary Benson <gbenson@redhat.com>
12321
12322 * target.c (target_stop_ptid, target_continue_ptid): New
12323 functions.
12324
12325 2014-09-11 Tom Tromey <tromey@redhat.com>
12326 Gary Benson <gbenson@redhat.com>
12327
12328 * target.h: Include target/target.h.
12329 * target.c (target_read_memory, target_read_uint32)
12330 (target_write_memory): New functions.
12331
12332 2014-09-11 Gary Benson <gbenson@redhat.com>
12333
12334 * server.h (debug_hw_points): Don't declare.
12335 * server.c (debug_hw_points): Don't define. Replace all uses
12336 with show_debug_regs.
12337 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
12338 all uses with show_debug_regs.
12339
12340 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
12341
12342 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
12343 endianness into account.
12344 (ppc_supply_ptrace_register): Likewise.
12345
12346 2014-09-03 James Hogan <james.hogan@imgtec.com>
12347
12348 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
12349 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
12350
12351 2014-09-03 Gary Benson <gbenson@redhat.com>
12352
12353 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
12354 ALL_DEBUG_ADDRESS_REGISTERS.
12355
12356 2014-09-02 Gary Benson <gbenson@redhat.com>
12357
12358 * i386-low.h: Renamed as...
12359 * x86-low.h: New file. All type, function and variable name
12360 prefixes changed from "i386_" to "x86_". All references updated.
12361 * i386-low.c: Renamed as...
12362 * x86-low.c: New file. All type, function and variable name
12363 prefixes changed from "i386_" to "x86_". All references updated.
12364
12365 2014-09-02 Gary Benson <gbenson@redhat.com>
12366
12367 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
12368 (x86_linux_new_thread): Likewise.
12369
12370 2014-08-29 Gary Benson <gbenson@redhat.com>
12371
12372 * server.h (setjmp.h): Do not include.
12373 (toplevel): Do not declare.
12374 (common-exceptions.h): Include.
12375 (cleanups.h): Likewise.
12376 * server.c (toplevel): Do not define.
12377 (exit_code): New static global.
12378 (detach_or_kill_for_exit_cleanup): New function.
12379 (main): New function. Original main renamed to...
12380 (captured_main): New function.
12381 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
12382
12383 2014-08-29 Gary Benson <gbenson@redhat.com>
12384
12385 * Makefile.in (SFILES): Add common/common-exceptions.c.
12386 (OBS): Add common-exceptions.o.
12387 (common-exceptions.o): New rule.
12388 * utils.c (prepare_to_throw_exception): New function.
12389
12390 2014-08-29 Gary Benson <gbenson@redhat.com>
12391
12392 * config.in: Regenerate.
12393 * configure: Likewise.
12394
12395 2014-08-29 Gary Benson <gbenson@redhat.com>
12396
12397 * Makefile.in (SFILES): Add common/cleanups.c.
12398 (OBS): cleanups.o.
12399 (cleanups.o): New rule.
12400
12401 2014-08-29 Gary Benson <gbenson@redhat.com>
12402
12403 * utils.c (internal_vwarning): New function.
12404
12405 2014-08-28 Gary Benson <gbenson@redhat.com>
12406
12407 * utils.h (fatal): Remove declaration.
12408 * utils.c (fatal): Remove function.
12409
12410 2014-08-28 Gary Benson <gbenson@redhat.com>
12411
12412 * tracepoint.c (gdb_agent_init): Replace fatal with
12413 perror_with_name.
12414 (initialize_tracepoint): Likewise.
12415
12416 2014-08-28 Gary Benson <gbenson@redhat.com>
12417
12418 * remote-utils.c (remote_prepare): Replace fatal with error.
12419
12420 2014-08-28 Gary Benson <gbenson@redhat.com>
12421
12422 * linux-low.c (linux_async): Replace fatal with warning.
12423 Tidy up and return.
12424 (linux_start_non_stop): Return -1 if linux_async failed.
12425
12426 2014-08-28 Gary Benson <gbenson@redhat.com>
12427
12428 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
12429 gdb_assert.
12430 (i386_dr_low_get_addr): Remove vague comment.
12431 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
12432 gdb_assert.
12433
12434 2014-08-28 Gary Benson <gbenson@redhat.com>
12435
12436 * inferiors.c (get_thread_process): Replace check with gdb_assert.
12437 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
12438 internal_error.
12439 (linux_resume_one_lwp): Likewise.
12440 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
12441 gdb_assert.
12442 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
12443 with internal_error.
12444 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
12445 (init_register_cache): Replace fatal with gdb_assert_not_reached.
12446 (find_register_by_name): Replace fatal with internal_error.
12447 (find_regno): Likewise.
12448 * tdesc.c (init_target_desc): Replace check with gdb_assert.
12449 * thread-db.c (thread_db_create_event): Likewise.
12450 (thread_db_load_search): Likewise.
12451 (try_thread_db_load_1): Likewise.
12452 * tracepoint.c (get_jump_space_head): Replace fatal with
12453 internal_error.
12454 (claim_trampoline_space): Likewise.
12455 (have_fast_tracepoint_trampoline_buffer): Likewise.
12456 (cmd_qtstart): Likewise.
12457 (stop_tracing): Likewise.
12458 (fast_tracepoint_collecting): Likewise.
12459 (target_malloc): Likewise.
12460 (download_tracepoint): Likewise.
12461 (download_trace_state_variables): Replace check with gdb_assert.
12462 (upload_fast_traceframes): Replace fatal with internal_error.
12463
12464 2014-08-19 Tom Tromey <tromey@redhat.com>
12465 Gary Benson <gbenson@redhat.com>
12466
12467 * Makefile.in (SFILES): Add common/common-debug.c.
12468 (OBS): Add common-debug.o.
12469 (common-debug.o): New rule.
12470 * debug.h (debug_printf): Don't declare.
12471 * debug.c (debug_printf): Renamed and rewritten as...
12472 (debug_vprintf): New function.
12473
12474 2014-08-19 Gary Benson <gbenson@redhat.com>
12475
12476 * utils.h: Do not include print-utils.h.
12477
12478 2014-08-19 Tom Tromey <tromey@redhat.com>
12479 Gary Benson <gbenson@redhat.com>
12480
12481 * server.h: Add static assertion.
12482 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
12483
12484 2014-08-19 Tom Tromey <tromey@redhat.com>
12485 Gary Benson <gbenson@redhat.com>
12486
12487 * Makefile.in (SFILES): Add common/errors.c.
12488 (OBS): Add errors.o.
12489 (IPA_OBS): Add errors-ipa.o.
12490 (errors.o): New rule.
12491 (errors-ipa.o): Likewise.
12492 * utils.h (perror_with_name, error, warning): Don't declare.
12493 * utils.c (warning): Renamed and rewritten as...
12494 (vwarning): New function.
12495 (error): Renamed and rewritten as...
12496 (verror): New function.
12497 (internal_error): Renamed and rewritten as...
12498 (internal_verror): New function.
12499
12500 2014-08-07 Gary Benson <gbenson@redhat.com>
12501
12502 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
12503 * configure: Regenerate.
12504 * config.in: Likewise.
12505 * server.h: Do not include errno.h.
12506 * event-loop.c: Likewise.
12507 * hostio-errno.c: Likewise.
12508 * linux-low.c: Likewise.
12509 * remote-utils.c: Likewise.
12510 * spu-low.c: Likewise.
12511 * utils.c: Likewise.
12512 * gdbreplay.c: Unconditionally include errno.h.
12513
12514 2014-08-07 Gary Benson <gbenson@redhat.com>
12515
12516 * server.h: Do not include string.h.
12517 * event-loop.c: Likewise.
12518 * linux-low.c: Likewise.
12519 * regcache.c: Likewise.
12520 * remote-utils.c: Likewise.
12521 * spu-low.c: Likewise.
12522 * utils.c: Likewise.
12523
12524 2014-08-07 Gary Benson <gbenson@redhat.com>
12525
12526 * server.h: Do not include gdb_assert.h.
12527
12528 2014-08-07 Gary Benson <gbenson@redhat.com>
12529
12530 * server.h: Do not include common-utils.h.
12531
12532 2014-08-07 Gary Benson <gbenson@redhat.com>
12533
12534 * server.h: Do not include ptid.h.
12535 * notif.h: Likewise.
12536
12537 2014-08-07 Gary Benson <gbenson@redhat.com>
12538
12539 * server.h: Do not include gdb_locale.h.
12540
12541 2014-08-07 Gary Benson <gbenson@redhat.com>
12542
12543 * server.h: Do not include gdb/signals.h.
12544 * win32-low.c: Likewise.
12545
12546 2014-08-07 Gary Benson <gbenson@redhat.com>
12547
12548 * server.h: Do not include pathmax.h.
12549
12550 2014-08-07 Gary Benson <gbenson@redhat.com>
12551
12552 * server.h: Do not include libiberty.h.
12553 * linux-bfin-low.c: Likewise.
12554
12555 2014-08-07 Gary Benson <gbenson@redhat.com>
12556
12557 * server.h: Do not include ansidecl.h.
12558
12559 2014-08-07 Gary Benson <gbenson@redhat.com>
12560
12561 * linux-x86-low.c: Do not include stddef.h.
12562 * lynx-ppc-low.c: Likewise.
12563 * tracepoint.c: Likewise.
12564
12565 2014-08-07 Gary Benson <gbenson@redhat.com>
12566
12567 * server.h: Do not include stdarg.h.
12568 * nto-low.c: Likewise.
12569
12570 2014-08-07 Gary Benson <gbenson@redhat.com>
12571
12572 * server.h: Do not include stdlib.h.
12573 * inferiors.c: Likewise.
12574 * linux-low.c: Likewise.
12575 * regcache.c: Likewise.
12576 * spu-low.c: Likewise.
12577 * tracepoint.c: Likewise.
12578 * utils.c: Likewise.
12579
12580 2014-08-07 Gary Benson <gbenson@redhat.com>
12581
12582 * server.h: Do not include stdio.h.
12583 * linux-low.c: Likewise.
12584 * remote-utils.c: Likewise.
12585 * spu-low.c: Likewise.
12586 * utils.c: Likewise.
12587 * wincecompat.c: Likewise.
12588
12589 2014-08-06 Gary Benson <gbenson@redhat.com>
12590
12591 * regcache.c (init_register_cache): Move conditionals inside if.
12592
12593 2014-08-06 Gary Benson <gbenson@redhat.com>
12594
12595 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
12596
12597 2014-07-31 Gary Benson <gbenson@redhat.com>
12598
12599 * ax.h: Do not include server.h.
12600 * gdbthread.h: Likewise.
12601 * lynx-low.h: Likewise.
12602 * notif.h: Likewise.
12603
12604 2014-07-30 Gary Benson <gbenson@redhat.com>
12605
12606 * server.h: Include common-defs.h.
12607 Do not include config.h or build-gnulib-gdbserver/config.h.
12608
12609 2014-07-30 Gary Benson <gbenson@redhat.com>
12610
12611 * hostio-errno.c: Move server.h to top of includes list.
12612 * inferiors.c: Likewise.
12613 * linux-x86-low.c: Likewise.
12614 * notif.c: Include server.h.
12615
12616 2014-07-24 Tom Tromey <tromey@redhat.com>
12617 Gary Benson <gbenson@redhat.com>
12618
12619 * server.h (CORE_ADDR): Now unsigned.
12620
12621 2014-07-16 Pedro Alves <palves@redhat.com>
12622
12623 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
12624
12625 2014-07-15 Pedro Alves <palves@redhat.com>
12626
12627 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
12628 copy.
12629
12630 2014-07-11 Pedro Alves <palves@redhat.com>
12631
12632 * linux-low.c (kill_wait_lwp): New function, based on
12633 kill_one_lwp_callback, but use my_waitpid directly.
12634 (kill_one_lwp_callback, linux_kill): Use it.
12635
12636 2014-06-23 Pedro Alves <palves@redhat.com>
12637
12638 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
12639 before setting DR0..DR3.
12640
12641 2014-06-20 Gary Benson <gbenson@redhat.com>
12642
12643 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
12644 * configure: Regenerated.
12645 * config.in: Likewise.
12646
12647 2014-06-20 Gary Benson <gbenson@redhat.com>
12648
12649 * Makefile.in (SFILES): Update locations for files moved
12650 from common to nat.
12651 (object file files): Reordered.
12652
12653 2014-06-20 Gary Benson <gbenson@redhat.com>
12654
12655 * i386-low.h (i386_dr_low_can_set_addr): Removed.
12656 (i386_dr_low_set_addr): Likewise.
12657 (i386_dr_low_get_addr): Likewise.
12658 (i386_dr_low_can_set_control): Likewise.
12659 (i386_dr_low_set_control): Likewise.
12660 (i386_dr_low_get_control): Likewise.
12661 (i386_dr_low_get_status): Likewise.
12662 (i386_get_debug_register_length): Likewise.
12663 * linux-x86-low.c (i386_dr_low_set_addr):
12664 Changed signature. Made static.
12665 (i386_dr_low_get_addr): Likewise.
12666 (i386_dr_low_set_control): Likewise.
12667 (i386_dr_low_get_control): Likewise.
12668 (i386_dr_low_get_status): Likewise.
12669 (i386_dr_low): New global variable.
12670 * win32-i386-low.c (i386_dr_low_set_addr):
12671 Changed signature. Made static.
12672 (i386_dr_low_get_addr): Likewise.
12673 (i386_dr_low_set_control): Likewise.
12674 (i386_dr_low_get_control): Likewise.
12675 (i386_dr_low_get_status): Likewise.
12676 (i386_dr_low): New global variable.
12677
12678 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
12679
12680 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
12681 * Makefile.in (AR, AR_FLAGS): Define.
12682 * configure: Regenerate.
12683
12684 2014-06-19 Gary Benson <gbenson@redhat.com>
12685
12686 * Makefile.in (i386-dregs.o): New rule.
12687 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
12688 * i386-low.c (target.h): Remove include.
12689 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
12690 (DR_CONTROL_SHIFT): Likewise.
12691 (DR_CONTROL_SIZE): Likewise.
12692 (DR_RW_EXECUTE): Likewise.
12693 (DR_RW_WRITE): Likewise.
12694 (DR_RW_READ): Likewise.
12695 (DR_RW_IORW): Likewise.
12696 (DR_LEN_1): Likewise.
12697 (DR_LEN_2): Likewise.
12698 (DR_LEN_4): Likewise.
12699 (DR_LEN_8): Likewise.
12700 (DR_LOCAL_ENABLE_SHIFT): Likewise.
12701 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
12702 (DR_ENABLE_SIZE): Likewise.
12703 (DR_LOCAL_SLOWDOWN): Likewise.
12704 (DR_GLOBAL_SLOWDOWN): Likewise.
12705 (DR_CONTROL_RESERVED): Likewise.
12706 (I386_DR_CONTROL_MASK): Likewise.
12707 (I386_DR_VACANT): Likewise.
12708 (I386_DR_LOCAL_ENABLE): Likewise.
12709 (I386_DR_GLOBAL_ENABLE): Likewise.
12710 (I386_DR_DISABLE): Likewise.
12711 (I386_DR_SET_RW_LEN): Likewise.
12712 (I386_DR_GET_RW_LEN): Likewise.
12713 (I386_DR_WATCH_HIT): Likewise.
12714 (i386_wp_op_t): Likewise.
12715 (i386_show_dr): Likewise.
12716 (i386_length_and_rw_bits): Likewise.
12717 (i386_insert_aligned_watchpoint): Likewise.
12718 (i386_remove_aligned_watchpoint): Likewise.
12719 (i386_handle_nonaligned_watchpoint): Likewise.
12720 i386_update_inferior_debug_regs(): Likewise.
12721 (i386_dr_insert_watchpoint): Likewise.
12722 (i386_dr_remove_watchpoint): Likewise.
12723 (i386_dr_region_ok_for_watchpoint): Likewise.
12724 (i386_dr_stopped_data_address): Likewise.
12725 (i386_dr_stopped_by_watchpoint): Likewise.
12726
12727 2014-06-19 Gary Benson <gbenson@redhat.com>
12728
12729 * i386-low.c (i386_dr_show): Renamed to
12730 i386_show_dr and made static. All uses updated.
12731 (i386_dr_length_and_rw_bits): Renamed to
12732 i386_length_and_rw_bits and made static.
12733 All uses updated.
12734 (i386_dr_insert_aligned_watchpoint): Renamed to
12735 i386_insert_aligned_watchpoint and made static.
12736 All uses updated.
12737 (i386_dr_remove_aligned_watchpoint): Renamed to
12738 i386_remove_aligned_watchpoint and made static.
12739 All uses updated.
12740 (i386_dr_update_inferior_debug_regs): Renamed to
12741 i386_update_inferior_debug_regs and made static.
12742 All uses updated.
12743
12744 2014-06-18 Gary Benson <gbenson@redhat.com>
12745
12746 * i386-low.h (i386_dr_low_can_set_addr): New macro.
12747 (i386_dr_low_can_set_control): Likewise.
12748 (i386_get_debug_register_length): Likewise.
12749 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
12750 (i386_dr_low_can_set_control): Likewise.
12751 (i386_get_debug_register_length): Likewise.
12752
12753 2014-06-17 Gary Benson <gbenson@redhat.com>
12754
12755 * i386-low.h (i386-dregs.h): New include.
12756 (DR_FIRSTADDR): Now in i386-dregs.h.
12757 (DR_LASTADDR): Likewise.
12758 (DR_NADDR): Likewise.
12759 (DR_STATUS): Likewise.
12760 (DR_CONTROL): Likewise.
12761 (i386_debug_reg_state): Likewise.
12762 (i386_dr_insert_watchpoint): Likewise.
12763 (i386_dr_remove_watchpoint): Likewise.
12764 (i386_dr_region_ok_for_watchpoint): Likewise.
12765 (i386_dr_stopped_data_address): Likewise.
12766 (i386_dr_stopped_by_watchpoint): Likewise.
12767 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
12768
12769 2014-06-18 Gary Benson <gbenson@redhat.com>
12770
12771 * i386-low.h (i386_low_insert_watchpoint): Renamed to
12772 i386_dr_insert_watchpoint.
12773 (i386_low_remove_watchpoint): Renamed to
12774 i386_dr_remove_watchpoint.
12775 (i386_low_region_ok_for_watchpoint): Renamed to
12776 i386_dr_region_ok_for_watchpoint.
12777 (i386_low_stopped_data_address): Renamed to
12778 i386_dr_stopped_data_address.
12779 (i386_low_stopped_by_watchpoint): Renamed to
12780 i386_dr_stopped_by_watchpoint.
12781 * i386-low.c (i386_show_dr): Renamed to
12782 i386_dr_show and made nonstatic. All uses updated.
12783 (i386_length_and_rw_bits): Renamed to
12784 i386_dr_length_and_rw_bits and made nonstatic.
12785 All uses updated.
12786 (i386_insert_aligned_watchpoint): Renamed to
12787 i386_dr_insert_aligned_watchpoint and made nonstatic.
12788 All uses updated.
12789 (i386_remove_aligned_watchpoint): Renamed to
12790 i386_dr_remove_aligned_watchpoint and made nonstatic.
12791 All uses updated.
12792 (i386_update_inferior_debug_regs): Renamed to
12793 i386_dr_update_inferior_debug_regs and made nonstatic.
12794 All uses updated.
12795 (i386_low_insert_watchpoint): Renamed to
12796 i386_dr_insert_watchpoint. All uses updated.
12797 (i386_low_remove_watchpoint): Renamed to
12798 i386_dr_remove_watchpoint. All uses updated.
12799 (i386_low_region_ok_for_watchpoint): Renamed to
12800 i386_dr_region_ok_for_watchpoint. All uses updated.
12801 (i386_low_stopped_data_address): Renamed to
12802 i386_dr_stopped_data_address. All uses updated.
12803 (i386_low_stopped_by_watchpoint): Renamed to
12804 i386_dr_stopped_by_watchpoint. All uses updated.
12805
12806 2014-06-18 Gary Benson <gbenson@redhat.com>
12807
12808 * i386-low.c (i386_dr_low_can_set_addr): New macro.
12809 (i386_dr_low_can_set_control): Likewise.
12810 (i386_insert_aligned_watchpoint): New check.
12811
12812 2014-06-18 Gary Benson <gbenson@redhat.com>
12813
12814 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
12815 Renamed to state.
12816
12817 2014-06-18 Gary Benson <gbenson@redhat.com>
12818
12819 * i386-low.c (i386_length_and_rw_bits): Use internal_error
12820 instead of fatal and error.
12821 (i386_handle_nonaligned_watchpoint): Likewise.
12822
12823 2014-06-18 Gary Benson <gbenson@redhat.com>
12824
12825 * i386-low.c (i386_get_debug_register_length): New macro.
12826 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
12827 (i386_show_dr): Use debug_printf instead of fprintf. Use
12828 phex to format values.
12829
12830 2014-06-18 Gary Benson <gbenson@redhat.com>
12831
12832 * i386-low.h: Comment changes.
12833 * i386-low.c: Likewise.
12834
12835 2014-06-18 Gary Benson <gbenson@redhat.com>
12836
12837 * i386-low.c: Whitespace changes.
12838
12839 2014-06-12 Tom Tromey <tromey@redhat.com>
12840
12841 * utils.c (freeargv): Remove.
12842
12843 2014-06-12 Tom Tromey <tromey@redhat.com>
12844
12845 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
12846 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
12847 (parse_debug_format_options): Likewise.
12848 (gdbserver_usage): Likewise.
12849 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
12850 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
12851 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
12852 against libiberty.
12853 ($(LIBGNU)): Depend on libiberty.
12854 (all-lib): Recurse into all subdirs.
12855 (install-only): Invoke "install" target in subdirs.
12856 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
12857 targets.
12858 * configure: Rebuild.
12859 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
12860 for vasprintf, vsnprintf, or gettimeofday.
12861 * configure.srv: Don't add safe-ctype.o or lbasename.o to
12862 srv_tgtobj.
12863
12864 2014-06-05 Joel Brobecker <brobecker@adacore.com>
12865
12866 * development.sh: Delete.
12867 * Makefile.in (config.status): Adjust dependency on development.sh.
12868 * configure.ac: Adjust development.sh source call.
12869 * configure: Regenerate.
12870
12871 2014-06-02 Pedro Alves <palves@redhat.com>
12872
12873 * ax.c (gdb_free_agent_expr): New function.
12874 * ax.h (gdb_free_agent_expr): New declaration.
12875 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
12876 list.
12877 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
12878 static.
12879 (clear_breakpoint_conditions_and_commands): New function.
12880 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
12881 (clear_breakpoint_conditions_and_commands): New declaration.
12882
12883 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
12884
12885 * linux-aarch64-low.c (asm/ptrace.h): Include.
12886
12887 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12888
12889 Fix TLS access for -static -pthread.
12890 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
12891 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
12892 (thread_db_load_search, try_thread_db_load_1): Initialize it.
12893
12894 2014-05-20 Pedro Alves <palves@redhat.com>
12895
12896 * linux-aarch64-low.c (aarch64_insert_point)
12897 (aarch64_remove_point): No longer check whether the type is
12898 supported here. Adjust to new interface.
12899 (the_low_target): Install aarch64_supports_z_point_type as
12900 supports_z_point_type method.
12901 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
12902 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
12903 instead of a Z packet char. Adjust.
12904 (arm_supports_z_point_type): New function.
12905 (arm_insert_point, arm_remove_point): Adjust to new interface.
12906 (the_low_target): Install arm_supports_z_point_type.
12907 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
12908 (cris_insert_point, cris_remove_point): Adjust to new interface.
12909 Don't check whether the type is supported here.
12910 (the_low_target): Install cris_supports_z_point_type.
12911 * linux-low.c (linux_supports_z_point_type): New function.
12912 (linux_insert_point, linux_remove_point): Adjust to new interface.
12913 * linux-low.h (struct linux_target_ops) <insert_point,
12914 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
12915 raw_breakpoint pointer parameter.
12916 <supports_z_point_type>: New method.
12917 * linux-mips-low.c (mips_supports_z_point_type): New function.
12918 (mips_insert_point, mips_remove_point): Adjust to new interface.
12919 Use mips_supports_z_point_type.
12920 (the_low_target): Install mips_supports_z_point_type.
12921 * linux-ppc-low.c (the_low_target): Install NULL as
12922 supports_z_point_type method.
12923 * linux-s390-low.c (the_low_target): Install NULL as
12924 supports_z_point_type method.
12925 * linux-sparc-low.c (the_low_target): Install NULL as
12926 supports_z_point_type method.
12927 * linux-x86-low.c (x86_supports_z_point_type): New function.
12928 (x86_insert_point): Adjust to new insert_point interface. Use
12929 insert_memory_breakpoint. Adjust to new
12930 i386_low_insert_watchpoint interface.
12931 (x86_remove_point): Adjust to remove_point interface. Use
12932 remove_memory_breakpoint. Adjust to new
12933 i386_low_remove_watchpoint interface.
12934 (the_low_target): Install x86_supports_z_point_type.
12935 * lynx-low.c (lynx_target_ops): Install NULL as
12936 supports_z_point_type callback.
12937 * nto-low.c (nto_supports_z_point_type): New.
12938 (nto_insert_point, nto_remove_point): Adjust to new interface.
12939 (nto_target_ops): Install nto_supports_z_point_type.
12940 * mem-break.c: Adjust intro comment.
12941 (struct raw_breakpoint) <raw_type, size>: New fields.
12942 <inserted>: Update comment.
12943 <shlib_disabled>: Delete field.
12944 (enum bkpt_type) <gdb_breakpoint>: Delete value.
12945 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
12946 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
12947 (raw_bkpt_type_to_target_hw_bp_type): New function.
12948 (find_enabled_raw_code_breakpoint_at): New function.
12949 (find_raw_breakpoint_at): New type and size parameters. Use them.
12950 (insert_memory_breakpoint): New function, based off
12951 set_raw_breakpoint_at.
12952 (remove_memory_breakpoint): New function.
12953 (set_raw_breakpoint_at): Reimplement.
12954 (set_breakpoint): New, based on set_breakpoint_at.
12955 (set_breakpoint_at): Reimplement.
12956 (delete_raw_breakpoint): Go through the_target->remove_point
12957 instead of assuming memory breakpoints.
12958 (find_gdb_breakpoint_at): Delete.
12959 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
12960 (find_gdb_breakpoint): New function.
12961 (set_gdb_breakpoint_at): Delete.
12962 (z_type_supported): New function.
12963 (set_gdb_breakpoint_1): New function, loosely based off
12964 set_gdb_breakpoint_at.
12965 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
12966 (delete_gdb_breakpoint_at): Delete.
12967 (delete_gdb_breakpoint_1): New function, loosely based off
12968 delete_gdb_breakpoint_at.
12969 (delete_gdb_breakpoint): New function.
12970 (clear_gdb_breakpoint_conditions): Rename to ...
12971 (clear_breakpoint_conditions): ... this. Don't handle a NULL
12972 breakpoint.
12973 (add_condition_to_breakpoint): Make static.
12974 (add_breakpoint_condition): Take a struct breakpoint pointer
12975 instead of an address. Adjust.
12976 (gdb_condition_true_at_breakpoint): Rename to ...
12977 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
12978 z_type parameter.
12979 (gdb_condition_true_at_breakpoint): Reimplement.
12980 (add_breakpoint_commands): Take a struct breakpoint pointer
12981 instead of an address. Adjust.
12982 (gdb_no_commands_at_breakpoint): Rename to ...
12983 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
12984 parameter. Return true if no breakpoint was found. Change debug
12985 output.
12986 (gdb_no_commands_at_breakpoint): Reimplement.
12987 (run_breakpoint_commands): Rename to ...
12988 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
12989 and change return type to boolean.
12990 (run_breakpoint_commands): New function.
12991 (gdb_breakpoint_here): Also check for Z1 breakpoints.
12992 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
12993 breakpoint. Go through the_target->remove_point instead of
12994 assuming memory breakpoint.
12995 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
12996 software and hardware breakpoints.
12997 (reinsert_raw_breakpoint): Go through the_target->insert_point
12998 instead of assuming memory breakpoint.
12999 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
13000 software and hardware breakpoints.
13001 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
13002 Check both software and hardware breakpoints.
13003 (validate_inserted_breakpoint): Assert the breakpoint is a
13004 software breakpoint. Set the inserted flag to -1 instead of
13005 setting shlib_disabled.
13006 (delete_disabled_breakpoints): Adjust.
13007 (validate_breakpoints): Only validate software breakpoints.
13008 Adjust to inserted flag change.
13009 (check_mem_read, check_mem_write): Skip breakpoint types other
13010 than software breakpoints. Adjust to inserted flag change.
13011 * mem-break.h (enum raw_bkpt_type): New enum.
13012 (raw_breakpoint, struct process_info): Forward declare.
13013 (Z_packet_to_target_hw_bp_type): Delete declaration.
13014 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
13015 (set_gdb_breakpoint, delete_gdb_breakpoint)
13016 (clear_breakpoint_conditions): New declarations.
13017 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
13018 (breakpoint_inserted_here): Update comment.
13019 (add_breakpoint_condition, add_breakpoint_commands): Replace
13020 address parameter with a breakpoint pointer parameter.
13021 (gdb_breakpoint_here): Update comment.
13022 (delete_gdb_breakpoint_at): Delete.
13023 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
13024 * server.c (process_point_options): Take a struct breakpoint
13025 pointer instead of an address. Adjust.
13026 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
13027 delete_gdb_breakpoint.
13028 * spu-low.c (spu_target_ops): Install NULL as
13029 supports_z_point_type method.
13030 * target.h: Include mem-break.h.
13031 (struct target_ops) <prepare_to_access_memory>: Update comment.
13032 <supports_z_point_type>: New field.
13033 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
13034 instead of a char. Also take a raw breakpoint pointer.
13035 * win32-arm-low.c (the_low_target): Install NULL as
13036 supports_z_point_type.
13037 * win32-i386-low.c (i386_supports_z_point_type): New function.
13038 (i386_insert_point, i386_remove_point): Adjust to new interface.
13039 (the_low_target): Install i386_supports_z_point_type.
13040 * win32-low.c (win32_supports_z_point_type): New function.
13041 (win32_insert_point, win32_remove_point): Adjust to new interface.
13042 (win32_target_ops): Install win32_supports_z_point_type.
13043 * win32-low.h (struct win32_target_ops):
13044 <supports_z_point_type>: New method.
13045 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
13046 instead of a char. Also take a raw breakpoint pointer.
13047
13048 2014-05-20 Pedro Alves <palves@redhat.com>
13049
13050 * mem-break.h: Include break-common.h.
13051 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
13052 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
13053 (Z_packet_to_target_hw_bp_type): New declaration.
13054 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
13055 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
13056 (Z_PACKET_ACCESS_WP): Delete macros.
13057 (Z_packet_to_hw_type): Delete function.
13058 * i386-low.h: Don't include break-common.h here.
13059 (Z_packet_to_hw_type): Delete declaration.
13060 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
13061 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
13062 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
13063 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
13064 * linux-aarch64-low.c: Don't include break-common.h here.
13065 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
13066 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
13067 (Z_packet_to_target_hw_bp_type): Delete function.
13068 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
13069 function.
13070 (mips_insert_point, mips_remove_point): Use
13071 Z_packet_to_target_hw_bp_type.
13072
13073 2014-05-20 Pedro Alves <palves@redhat.com>
13074
13075 * linux-aarch64-low.c: Include break-common.h.
13076 (enum target_point_type): Delete.
13077 (Z_packet_to_point_type): Rename to ...
13078 (Z_packet_to_target_hw_bp_type): ... this, and return a
13079 target_hw_bp_type instead.
13080 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
13081 instead of an enum target_point_type.
13082 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
13083 breakpoint type.
13084 (aarch64_dr_state_insert_one_point)
13085 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
13086 (aarch64_handle_aligned_watchpoint)
13087 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
13088 Take an enum target_hw_bp_type instead of an enum
13089 target_point_type.
13090 (aarch64_supports_z_point_type): New function.
13091 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
13092 use Z_packet_to_target_hw_bp_type.
13093
13094 2014-05-20 Joel Brobecker <brobecker@adacore.com>
13095
13096 * configure.ac: Only use -Werror by default when DEVELOPMENT
13097 is true.
13098 * configure: Regenerate.
13099
13100 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
13101
13102 Fix gdbserver qGetTLSAddr for x86_64 -m32.
13103 * linux-x86-low.c (X86_64_USER_REGS): New.
13104 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
13105
13106 2014-04-28 Yao Qi <yao@codesourcery.com>
13107
13108 * Makefile.in (i386-avx512.c): Fix the typo of generated file
13109 name.
13110
13111 2014-04-25 Pedro Alves <palves@redhat.com>
13112
13113 PR server/16255
13114 * linux-low.c (linux_attach_fail_reason_string): New function.
13115 (linux_attach_lwp): Delete.
13116 (linux_attach_lwp_1): Rename to ...
13117 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
13118 argument. Remove "initial" parameter. Return int instead of
13119 void. Don't error or warn here.
13120 (linux_attach): Adjust to call linux_attach_lwp. Call error on
13121 failure to attach to the tgid. Call warning when failing to
13122 attach to an lwp.
13123 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
13124 argument. Remove "initial" parameter. Return int instead of
13125 void. Don't error or warn here.
13126 (linux_attach_fail_reason_string): New declaration.
13127 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
13128 interface change. Use linux_attach_fail_reason_string.
13129
13130 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
13131 Walfred Tedeschi <walfred.tedeschi@intel.com>
13132
13133 * Makefile.in: Added rules to handle new files
13134 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
13135 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
13136 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
13137 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
13138 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
13139 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
13140 x32-avx512-linux.o.
13141 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
13142 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
13143 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
13144 i386/x32-avx512.xml.
13145 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
13146 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
13147 i386/x32-avx512-linux.xml.
13148 * i387-fp.c (num_avx512_k_registers): New constant for number
13149 of K registers.
13150 (num_avx512_zmmh_low_registers): New constant for number of
13151 lower ZMM registers (0-15).
13152 (num_avx512_zmmh_high_registers): New constant for number of
13153 higher ZMM registers (16-31).
13154 (num_avx512_ymmh_registers): New contant for number of higher
13155 YMM registers (ymm16-31 added by avx521 on x86_64).
13156 (num_avx512_xmm_registers): New constant for number of higher
13157 XMM registers (xmm16-31 added by AVX512 on x86_64).
13158 (struct i387_xsave): Add space for AVX512 registers.
13159 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
13160 Add code to handle AVX512 registers.
13161 (i387_xsave_to_cache): Add code to handle AVX512 registers.
13162 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
13163 prototypei from generated file.
13164 (tdesc_amd64_avx512_linux): Likewise.
13165 (init_registers_x32_avx512_linux): Likewise.
13166 (tdesc_x32_avx512_linux): Likewise.
13167 (init_registers_i386_avx512_linux): Likewise.
13168 (tdesc_i386_avx512_linux): Likewise.
13169 (x86_64_regmap): Add AVX512 registers.
13170 (x86_linux_read_description): Add code to handle AVX512 XSTATE
13171 mask.
13172 (initialize_low_arch): Add code to initialize AVX512 registers.
13173
13174 2014-04-23 Pedro Alves <palves@redhat.com>
13175
13176 * mem-break.c (find_gdb_breakpoint_at): Make static.
13177 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
13178
13179 2014-04-23 Pedro Alves <palves@redhat.com>
13180
13181 * i386-low.c: Don't include break-common.h here.
13182 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
13183 prototype to take target_hw_bp_type as argument instead of a Z
13184 packet char.
13185 * i386-low.h: Include break-common.h here.
13186 (Z_packet_to_hw_type): Declare.
13187 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
13188 prototypes.
13189 * linux-x86-low.c (x86_insert_point): Convert the packet number to
13190 a target_hw_bp_type before calling i386_low_insert_watchpoint.
13191 (x86_remove_point): Convert the packet number to a
13192 target_hw_bp_type before calling i386_low_remove_watchpoint.
13193 * win32-i386-low.c (i386_insert_point): Convert the packet number
13194 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
13195 (i386_remove_point): Convert the packet number to a
13196 target_hw_bp_type before calling i386_low_remove_watchpoint.
13197
13198 2014-04-23 Pedro Alves <palves@redhat.com>
13199
13200 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
13201
13202 2014-04-10 Pedro Alves <palves@redhat.com>
13203
13204 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
13205 Check if the condition or command is NULL before checking if the
13206 breakpoint is known. On success, return true.
13207 * mem-break.h (add_breakpoint_condition): Document return.
13208 (add_breakpoint_commands): Add describing comment.
13209 * server.c (skip_to_semicolon): New function.
13210 (process_point_options): Use it.
13211
13212 2014-04-09 Pedro Alves <palves@redhat.com>
13213
13214 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
13215 to lwpid_of.
13216
13217 2014-02-27 Pedro Alves <palves@redhat.com>
13218
13219 PR 12702
13220 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
13221 macros.
13222 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
13223 output.
13224 (last_thread_of_process_p): Take a PID argument instead of a
13225 thread pointer.
13226 (linux_wait_for_lwp): Delete.
13227 (num_lwps, check_zombie_leaders, not_stopped_callback): New
13228 functions.
13229 (linux_low_filter_event): New function, party factored out from
13230 linux_wait_for_event.
13231 (linux_wait_for_event): Rename to ...
13232 (linux_wait_for_event_filtered): ... this. Add new filter ptid
13233 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
13234 sigsuspend. Check for zombie leaders.
13235 (linux_wait_for_event): Reimplement as wrapper around
13236 linux_wait_for_event_filtered.
13237 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
13238 a normal or signal exit is seen, it's the whole process exiting.
13239 (wait_for_sigstop): No longer a for_each_inferior callback.
13240 Rewrite on top of linux_wait_for_event_filtered.
13241 (stop_all_lwps): Call wait_for_sigstop directly.
13242 * server.c (resume, handle_target_event): Handle
13243 TARGET_WAITKIND_NO_RESUMED.
13244
13245 2014-02-26 Joel Brobecker <brobecker@adacore.com>
13246
13247 * win32-low.c (psapi_get_dll_name,
13248 * win32_CreateToolhelp32Snapshot): Delete.
13249 (win32_CreateToolhelp32Snapshot, win32_Module32First)
13250 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
13251 Delete.
13252 (handle_load_dll): Add function description.
13253 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
13254
13255 2014-02-26 Joel Brobecker <brobecker@adacore.com>
13256
13257 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
13258 Add comment.
13259 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
13260 base address when calling win32_add_one_solib.
13261 (handle_load_dll): Delete local variable load_addr.
13262 Remove 0x1000 offset applied to DLL base address when calling
13263 win32_add_one_solib.
13264 (handle_unload_dll): Add comment.
13265
13266 2014-02-26 Joel Brobecker <brobecker@adacore.com>
13267
13268 * win32-low.c (win32_add_all_dlls): Renames
13269 win32_ensure_ntdll_loaded. Rewrite function documentation.
13270 Adjust implementation to always load all DLLs.
13271 Add 0x1000 offset to DLL base address when calling
13272 win32_add_one_solib.
13273 (child_initialization_done): New static global.
13274 (do_initial_child_stuff): Set child_initialization_done to
13275 zero during child initialization, and 1 after. Replace call
13276 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
13277 Add comment.
13278 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
13279 (handle_unload_dll): Add function documentation.
13280 (get_child_debug_event): Ignore load and unload DLL events
13281 during child initialization.
13282
13283 2014-02-20 Doug Evans <dje@google.com>
13284
13285 Remove global all_lwps.
13286 * inferiors.h (ptid_of): Move here from linux-low.h.
13287 (pid_of, lwpid_of): Ditto.
13288 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
13289 parameter is a struct thread_info * now.
13290 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
13291 directly. Pass &all_threads to find_inferior instead of &all_lwps.
13292 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
13293 directly.
13294 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
13295 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
13296 * linux-arm-low.c (update_registers_callback): Update, "entry"
13297 parameter is a struct thread_info * now.
13298 Fetch lwpid from current_inferior directly.
13299 (arm_insert_point): Pass &all_threads to find_inferior instead of
13300 &all_lwps.
13301 (arm_remove_point): Ditto.
13302 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
13303 (arm_prepare_to_resume): Fetch pid from thread.
13304 (arm_read_description): Fetch lwpid from current_inferior directly.
13305 * linux-low.c (all_lwps): Delete.
13306 (delete_lwp): Delete call to remove_inferior.
13307 (handle_extended_wait): Fetch lwpid from thread.
13308 (add_lwp): Don't set lwp->entry.id. Remove call to
13309 add_inferior_to_list.
13310 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
13311 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
13312 (kill_one_lwp_callback): Ditto.
13313 (linux_kill): Don't dereference NULL pointer.
13314 Fetch ptid,lwpid from thread.
13315 (get_detach_signal): Fetch ptid from thread.
13316 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
13317 Simplify call to regcache_invalidate_thread.
13318 (delete_lwp_callback): Update, "entry" parameter is a
13319 struct thread_info * now. Fetch pid from thread.
13320 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
13321 (status_pending_p_callback): Update, "entry" parameter is a
13322 struct thread_info * now. Fetch ptid from thread.
13323 (find_lwp_pid): Update, "entry" parameter is a
13324 struct thread_info * now.
13325 (linux_wait_for_lwp): Fetch pid from thread.
13326 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
13327 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
13328 (enqueue_one_deferred_signal): Fetch lwpid from thread.
13329 (dequeue_one_deferred_signal): Ditto.
13330 (cancel_breakpoint): Fetch ptid from current_inferior.
13331 (linux_wait_for_event): Pass &all_threads to find_inferior,
13332 not &all_lwps. Fetch ptid, lwpid from thread.
13333 (count_events_callback): Update, "entry" parameter is a
13334 struct thread_info * now.
13335 (select_singlestep_lwp_callback): Ditto.
13336 (select_event_lwp_callback): Ditto.
13337 (cancel_breakpoints_callback): Ditto.
13338 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
13339 not &all_lwps.
13340 (select_event_lwp): Ditto. Fetch ptid from event_thread.
13341 (unsuspend_one_lwp): Update, "entry" parameter is a
13342 struct thread_info * now.
13343 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
13344 not &all_lwps.
13345 (linux_stabilize_threads): Ditto. And for for_each_inferior.
13346 Fetch lwpid from thread, not lwp.
13347 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
13348 Pass &all_threads to find_inferior, not &all_lwps.
13349 (send_sigstop): Fetch lwpid from thread, not lwp.
13350 (send_sigstop_callback): Update, "entry" parameter is a
13351 struct thread_info * now.
13352 (suspend_and_send_sigstop_callback): Ditto.
13353 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
13354 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
13355 struct thread_info * now.
13356 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
13357 from thread, lwp.
13358 (lwp_running): Update, "entry" parameter is a
13359 struct thread_info * now.
13360 (stop_all_lwps): Fetch ptid from thread.
13361 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
13362 (linux_resume_one_lwp): Fetch lwpid from thread.
13363 (linux_set_resume_request): Update, "entry" parameter is a
13364 struct thread_info * now. Fetch pid, lwpid from thread.
13365 (resume_status_pending_p): Update, "entry" parameter is a
13366 struct thread_info * now.
13367 (need_step_over_p): Ditto. Fetch lwpid from thread.
13368 (start_step_over): Fetch lwpid from thread.
13369 (linux_resume_one_thread): Update, "entry" parameter is a
13370 struct thread_info * now. Fetch lwpid from thread.
13371 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
13372 (proceed_one_lwp): Update, "entry" parameter is a
13373 struct thread_info * now. Fetch lwpid from thread.
13374 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
13375 struct thread_info * now.
13376 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
13377 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
13378 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
13379 directly.
13380 (regsets_store_inferior_registers): Ditto.
13381 (fetch_register, store_register): Ditto.
13382 (linux_read_memory, linux_write_memory): Ditto.
13383 (linux_request_interrupt): Ditto.
13384 (linux_read_auxv): Ditto.
13385 (linux_xfer_siginfo): Ditto.
13386 (linux_qxfer_spu): Ditto.
13387 (linux_qxfer_libraries_svr4): Ditto.
13388 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
13389 moved to inferiors.h.
13390 (get_lwp): Delete.
13391 (get_thread_lwp): Update.
13392 (struct lwp_info): Delete member "entry". Simplify comment for
13393 member "thread".
13394 (all_lwps): Delete.
13395 * linux-mips-low.c (mips_read_description): Fetch lwpid from
13396 current_inferior directly.
13397 (update_watch_registers_callback): Update, "entry" parameter is a
13398 struct thread_info * now. Fetch pid from thread.
13399 (mips_linux_prepare_to_resume): Fetch ptid from thread.
13400 (mips_insert_point): Fetch lwpid from current_inferior.
13401 Pass &all_threads to find_inferior, not &all_lwps.
13402 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
13403 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
13404 directly.
13405 (mips_stopped_data_address): Ditto.
13406 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
13407 directly.
13408 * linux-tile-low.c (tile_arch_setup): Ditto.
13409 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
13410 (update_debug_registers_callback): Update, "entry" parameter is a
13411 struct thread_info * now. Fetch pid from thread.
13412 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
13413 Pass &all_threads to find_inferior, not &all_lwps.
13414 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
13415 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
13416 Pass &all_threads to find_inferior, not &all_lwps.
13417 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
13418 (i386_dr_low_get_status): Ditto.
13419 (x86_linux_prepare_to_resume): Fetch ptid from thread.
13420 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
13421 (x86_linux_read_description): Ditto.
13422 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
13423
13424 2014-02-20 Doug Evans <dje@google.com>
13425
13426 * inferiors.c (get_first_inferior): Fix buglet.
13427
13428 2014-02-19 Doug Evans <dje@google.com>
13429
13430 * gdbthread.h (add_thread): Change result type to struct thread_info *.
13431 * inferiors.c (add_thread): Change result type to struct thread_info *.
13432 All callers updated.
13433 (add_lwp): Call add_thread here instead of in callers.
13434 All callers updated.
13435 * linux-low.h (get_lwp_thread): Rewrite.
13436 (struct lwp_info): New member "thread".
13437
13438 2014-02-19 Doug Evans <dje@google.com>
13439
13440 * linux-low.c (add_lwp): Change result to struct lwp_info *.
13441 All callers updated.
13442
13443 2014-02-19 Doug Evans <dje@google.com>
13444
13445 * inferiors.c (add_thread): Fix whitespace.
13446
13447 2014-02-19 Doug Evans <dje@google.com>
13448
13449 * dll.c (clear_dlls): Replace accessing list implemention details
13450 with API function.
13451 * gdbthread.h (get_first_thread): Declare.
13452 * inferiors.c (for_each_inferior_with_data): New function.
13453 (get_first_thread): New function.
13454 (find_thread_ptid): Simplify.
13455 (get_first_inferior): New function.
13456 (clear_list): Delete.
13457 (one_inferior_p): New function.
13458 (clear_inferior_list): New function.
13459 (clear_inferiors): Update.
13460 * inferiors.h (for_each_inferior_with_data): Declare.
13461 (clear_inferior_list): Declare.
13462 (one_inferior_p): Declare.
13463 (get_first_inferior): Declare.
13464 * linux-low.c (linux_wait_for_event): Replace accessing list
13465 implemention details with API function.
13466 * server.c (target_running): Ditto.
13467 (accumulate_file_name_length): New function.
13468 (emit_dll_description): New function.
13469 (handle_qxfer_libraries): Replace accessing list implemention
13470 details with API function.
13471 (handle_qxfer_threads_worker): New function.
13472 (handle_qxfer_threads_proper): Replace accessing list implemention
13473 details with API function.
13474 (handle_query): Ditto.
13475 (visit_actioned_threads_callback_ftype): New typedef.
13476 (visit_actioned_threads_data): New struct.
13477 (visit_actioned_threads): Rewrite to be find_inferior callback.
13478 (resume): Call find_inferior.
13479 (handle_status): Replace accessing list implemention
13480 details with API function.
13481 (process_serial_event): Replace accessing list implemention details
13482 with API function.
13483 * target.c (set_desired_inferior): Replace accessing list implemention
13484 details with API function.
13485 * tracepoint.c (same_process_p): New function.
13486 (gdb_agent_about_to_close): Replace accessing list implemention
13487 details with API function.
13488 * win32-low.c (child_delete_thread): Replace accessing list
13489 implemention details with API function.
13490 (match_dll_by_basename): New function.
13491 (dll_is_loaded_by_basename): New function.
13492 (win32_ensure_ntdll_loaded): Replace accessing list implemention
13493 details call to dll_is_loaded_by_basename.
13494
13495 2014-02-19 Doug Evans <dje@google.com>
13496
13497 * dll.h (struct dll_info): Add comment.
13498 * gdbthread.h (struct thread_info): Add comment.
13499 (current_ptid): Simplify.
13500 * inferiors.c (add_process): Update.
13501 (remove_process): Update.
13502 * inferiors.h (struct process_info): Rename member "head" to "entry".
13503 * linux-low.c (delete_lwp): Update.
13504 (add_lwp): Update.
13505 (last_thread_of_process_p): Update.
13506 (kill_one_lwp_callback, linux_kill): Update.
13507 (status_pending_p_callback): Update.
13508 (wait_for_sigstop): Update. Simplify read of ptid.
13509 (start_step_over): Update.
13510 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
13511 (get_lwp_thread): Update.
13512 (struct lwp_info): Rename member "head" to "entry".
13513 * regcache.h (inferior_list_entry): Delete.
13514 * server.c (kill_inferior_callback): Update.
13515 (detach_or_kill_inferior_callback): Update.
13516 (print_started_pid): Update.
13517 (print_attached_pid): Update.
13518 (process_serial_event): Simplify read of ptid.
13519 * thread-db.c (thread_db_create_event): Update.
13520 (thread_db_get_tls_address): Update.
13521 * win32-low.c (current_inferior_ptid): Simplify.
13522
13523 2014-02-19 Tom Tromey <tromey@redhat.com>
13524
13525 * target.h (struct target_ops) <supports_btrace>: Add target_ops
13526 argument.
13527 (target_supports_btrace): Update.
13528
13529 2014-02-14 Yao Qi <yao@codesourcery.com>
13530
13531 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
13532 (rsp-low-ipa.o): New target.
13533
13534 2014-02-12 Tom Tromey <tromey@redhat.com>
13535
13536 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
13537 convert_ascii_to_int.
13538 * regcache.c (registers_to_string): Likewise.
13539 * remote-utils.c (decode_M_packet): Likewise.
13540 * server.c (process_serial_event): Likewise.
13541
13542 2014-02-12 Tom Tromey <tromey@redhat.com>
13543
13544 * server.c (handle_query, handle_v_run): Use hex2bin, not
13545 unhexify.
13546 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
13547
13548 2014-02-12 Tom Tromey <tromey@redhat.com>
13549
13550 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
13551 convert_int_to_ascii.
13552 * regcache.c (registers_to_string, collect_register_as_string):
13553 Likewise.
13554 * remote-utils.c (look_up_one_symbol, relocate_instruction):
13555 Likewise.
13556 * server.c (process_serial_event): Likewise.
13557 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
13558 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
13559
13560 2014-02-12 Tom Tromey <tromey@redhat.com>
13561
13562 * remote-utils.c (look_up_one_symbol, monitor_output): Use
13563 bin2hex, not hexify.
13564 * tracepoint.c (cmd_qtstatus): Likewise.
13565
13566 2014-02-12 Tom Tromey <tromey@redhat.com>
13567
13568 * remote-utils.c (monitor_output): Pass explicit length to
13569 hexify.
13570
13571 2014-02-12 Tom Tromey <tromey@redhat.com>
13572
13573 * tracepoint.c: Include rsp-low.h.
13574 * server.c: Include rsp-low.h.
13575 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
13576 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
13577 declare.
13578 * remote-utils.c: Include rsp-low.h.
13579 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
13580 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
13581 (convert_int_to_ascii, convert_ascii_to_int): Move to
13582 common/rsp-low.c.
13583 * regcache.c: Include rsp-low.h.
13584 * ax.c: Include rsp-low.h.
13585 * Makefile.in (SFILES): Add common/rsp-low.c.
13586 (OBS): Add rsp-low.o.
13587 (rsp-low.o): New target.
13588
13589 2014-02-12 Tom Tromey <tromey@redhat.com>
13590
13591 * utils.h (pulongest, plongest, phex_nz): Don't declare.
13592 Include print-utils.h.
13593 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
13594 (plongest, thirty_two, phex_nz): Remove.
13595 * Makefile.in (SFILES): Add common/print-utils.c.
13596 (OBS): Add print-utils.o.
13597 (print-utils-ipa.o): New target.
13598 (print-utils.o): New target.
13599 (IPA_OBJS): Add print-utils-ipa.o.
13600
13601 2014-02-06 Tom Tromey <tromey@redhat.com>
13602
13603 * Makefile.in (SFILES): Fix indentation.
13604
13605 2014-02-05 Doug Evans <dje@google.com>
13606
13607 * linux-low.c (linux_wait_for_event): Improve comment.
13608 (linux_wait_1): Keep current_inferior in sync with event_child.
13609
13610 2014-01-22 Doug Evans <dje@google.com>
13611
13612 * gdbthread.h (gdb_id_to_thread): Delete, unused.
13613
13614 2014-01-22 Doug Evans <dje@google.com>
13615
13616 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
13617 * configure: Regenerate.
13618 * config.in: Regenerate.
13619 * Makefile.in (SFILES): Add debug.c.
13620 (OBS): Add debug.o.
13621 * debug.c: New file.
13622 * debug.h: New file.
13623 * linux-aarch64-low.c (*): Update all debugging printfs to use
13624 debug_printf instead of fprintf.
13625 * linux-arm-low.c (*): Ditto.
13626 * linux-cris-low.c (*): Ditto.
13627 * linux-crisv32-low.c (*): Ditto.
13628 * linux-m32r-low.c (*): Ditto.
13629 * linux-sparc-low.c (*): Ditto.
13630 * linux-x86.c (*): Ditto.
13631 * linux-low.c (*): Ditto.
13632 (linux_wait_1): Add calls to debug_enter, debug_exit.
13633 (linux_wait): Remove redundant debugging printf.
13634 (stop_all_lwps): Add calls to debug_enter, debug_exit.
13635 (linux_resume, unstop_all_lwps): Ditto.
13636 * mem-break.c (*): Update all debugging printfs to use
13637 debug_printf instead of fprintf.
13638 * remote-utils.c (*): Ditto.
13639 * thread-db.c (*): Ditto.
13640 * server.c #include <ctype.h>, "gdb_vecs.h".
13641 (debug_threads): Moved to debug.c.
13642 (*): Update all debugging printfs to use debug_printf instead of
13643 fprintf.
13644 (start_inferior): Replace call to fflush with call to debug_flush.
13645 (monitor_show_help): Mention set debug-format.
13646 (parse_debug_format_options): New function.
13647 (handle_monitor_command): Handle "monitor set debug-format".
13648 (gdbserver_usage): Mention --debug-format.
13649 (main): Parse --debug-format.
13650 * server.h (debug_threads): Declaration moved to debug.h.
13651 #include "debug.h".
13652 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
13653 trace_debug_1 that uses debug_printf.
13654 (tracepoint_look_up_symbols): Update all debugging printfs to use
13655 debug_printf instead of fprintf.
13656
13657 2014-01-20 Baruch Siach <baruch@tkos.co.il>
13658
13659 * linux-xtensa-low.c: Include asm/ptrace.h instead of
13660 sys/ptrace.h.
13661
13662 2014-01-17 Pedro Alves <palves@redhat.com>
13663
13664 PR build/16445
13665 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
13666 defined after including gdb_proc_service.h.
13667
13668 2014-01-16 Doug Evans <dje@google.com>
13669
13670 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
13671 (match_dll): Use it.
13672
13673 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
13674
13675 * target.h (target_ops) <read_btrace>: Change parameters and
13676 return type to allow error reporting.
13677 * server.c (handle_qxfer_btrace): Support delta reads. Pass
13678 trace reading errors on.
13679 * linux-low.c (linux_low_read_btrace): Pass trace reading
13680 errors on.
13681 (linux_low_disable_btrace): New.
13682
13683 2014-01-15 Doug Evans <dje@google.com>
13684
13685 * inferiors.c (thread_id_to_gdb_id): Delete.
13686 * inferiors.h (thread_id_to_gdb_id): Delete.
13687
13688 2014-01-13 Eli Zaretskii <eliz@gnu.org>
13689
13690 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
13691 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
13692 versions.
13693
13694 2014-01-08 Pedro Alves <palves@redhat.com>
13695
13696 * server.c (handle_status): Don't discard previous queued stop
13697 replies or thread's pending status here.
13698 (main) <disconnection>: Do it here instead.
13699
13700 2014-01-08 Pedro Alves <palves@redhat.com>
13701
13702 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
13703 * server.c (visit_actioned_threads, handle_pending_status): New
13704 function.
13705 (handle_v_cont): Factor out parts to ...
13706 (resume): ... this new function. If in all-stop, and a thread
13707 being resumed has a pending status, report it without actually
13708 resuming.
13709 (myresume): Adjust to use the new 'resume' function.
13710 (clear_pending_status_callback, set_pending_status_callback)
13711 (find_status_pending_thread_callback): New functions.
13712 (handle_status): Handle the case of multiple threads having
13713 interesting statuses to report. Report threads' real last signal
13714 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
13715 with an interesting thread to report the status for, instead of
13716 always reporting the status of the first thread.
13717
13718 2014-01-01 Joel Brobecker <brobecker@adacore.com>
13719
13720 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
13721 * gdbreplay.c (gdbreplay_version): Likewise.
13722
13723 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
13724
13725 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
13726 iov.iov_len with the real length in use.
13727
13728 2013-12-13 Joel Brobecker <brobecker@adacore.com>
13729
13730 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
13731 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
13732 for all targets that use win32-low.c.
13733 * win32-low.c (win32_ensure_ntdll_loaded): New function.
13734 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
13735
13736 2013-12-13 Pedro Alves <palves@redhat.com>
13737
13738 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
13739 if equal to TARGET_WAITKIND_LOADED.
13740 * win32-low.c (cached_status): New static global.
13741 (win32_wait): Add declaration.
13742 (do_initial_child_stuff): Flush all initial pending debug events
13743 up to the initial breakpoint.
13744 (win32_wait): If CACHED_STATUS was set, return that instead
13745 of doing a real wait. Remove the code resuming the execution
13746 of the inferior after receiving a TARGET_WAITKIND_LOADED event
13747 during the initial phase. Also remove the code changing
13748 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
13749 TARGET_WAITKIND_STOPPED.
13750
13751 2013-12-11 Yao Qi <yao@codesourcery.com>
13752
13753 * notif.c (handle_notif_ack): Return 0 if no notification
13754 matches.
13755
13756 2013-11-20 Doug Evans <dje@google.com>
13757
13758 * linux-low.c (linux_set_resume_request): Fix comment.
13759
13760 2013-11-20 Doug Evans <dje@google.com>
13761
13762 * linux-low.c (resume_status_pending_p): Tweak comment.
13763
13764 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
13765
13766 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
13767 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
13768 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
13769 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
13770 (srv_amd64_regobj): Add amd64-mpx.o.
13771 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
13772 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
13773 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
13774 * i387-fp.c (num_pl_bnd_register) Added constant.
13775 (num_pl_bnd_cfg_registers) Added constant.
13776 (struct i387_xsave) Added reserved area and MPX fields.
13777 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
13778 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
13779 function.
13780 (tdesc_i386_mpx_linux): Add MPX amd64 target.
13781 (init_registers_amd64_mpx_linux): Declare new function.
13782 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
13783 (x86_64_regmap): Add MPX registers.
13784 (x86_linux_read_description): Add MPX case.
13785 (initialize_low_arch): Initialize MPX targets.
13786
13787 2013-11-18 Tom Tromey <tromey@redhat.com>
13788
13789 * configure: Rebuild.
13790 * configure.ac: Don't check for stdlib.h.
13791 * gdbreplay.c: Unconditionally include stdlib.h.
13792
13793 2013-11-18 Tom Tromey <tromey@redhat.com>
13794
13795 * config.in: Rebuild.
13796 * configure: Rebuild.
13797 * configure.ac: Don't use AC_HEADER_DIRENT.
13798
13799 2013-11-18 Tom Tromey <tromey@redhat.com>
13800
13801 * server.h: Don't check HAVE_STRING_H.
13802 * gdbreplay.c: Don't check HAVE_STRING_H.
13803 * configure: Rebuild.
13804
13805 2013-11-18 Tom Tromey <tromey@redhat.com>
13806
13807 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
13808 LIBGNU.
13809
13810 2013-11-08 Tom Tromey <tromey@redhat.com>
13811
13812 * configure, config.in: Rebuild.
13813 * configure.ac: Remove unused configury.
13814
13815 2013-11-08 Tom Tromey <tromey@redhat.com>
13816
13817 * acinclude.m4: Include common.m4, codeset.m4.
13818 * configure, config.in: Rebuild.
13819 * configure.ac: Use GDB_AC_COMMON.
13820
13821 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
13822
13823 * linux-s390-low.c (HWCAP_S390_TE): New define.
13824 (s390_arch_setup): Consider the TE field in the HWCAP for
13825 determining 'have_regset_tdb'.
13826
13827 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
13828
13829 PR gdb/16014
13830 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
13831 call to sizeof.
13832
13833 2013-10-02 Pedro Alves <palves@redhat.com>
13834
13835 * server.c (process_serial_event): Don't output "GDBserver
13836 exiting" if GDB is connected through stdio.
13837 * target.c (mywait): Likewise, be silent if GDB is connected
13838 through stdio.
13839
13840 2013-10-01 Joel Brobecker <brobecker@adacore.com>
13841
13842 * lynx-low.c (lynx_add_threads_after_attach): New function.
13843 (lynx_attach): Remove call to add_thread. Add call to
13844 lynx_add_threads_after_attach instead.
13845
13846 2013-09-28 Mike Frysinger <vapier@gentoo.org>
13847
13848 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
13849 * config.in, configure: Regenerated.
13850
13851 2013-09-18 Yao Qi <yao@codesourcery.com>
13852
13853 PR server/15959
13854 * server.c (start_inferior): Clear 'resume_info'.
13855
13856 2013-09-16 Jiong Wang <jiwang@tilera.com>
13857
13858 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
13859 for each register.
13860
13861 2013-09-16 Jiong Wang <jiwang@tilera.com>
13862
13863 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
13864 linux-tile-low.o to srv_tgtobj.
13865
13866 2013-09-16 Will Newton <will.newton@linaro.org>
13867
13868 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
13869 out regs.
13870
13871 2013-09-06 Pedro Alves <palves@redhat.com>
13872
13873 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
13874 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
13875 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
13876 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
13877 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
13878 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
13879
13880 2013-09-06 Pedro Alves <palves@redhat.com>
13881
13882 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
13883 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
13884
13885 2013-09-06 Pedro Alves <palves@redhat.com>
13886
13887 * linux-amd64-ipa.c: Include tracepoint.h.
13888 * linux-i386-ipa.c: Include tracepoint.h.
13889
13890 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13891
13892 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
13893 (ps_get_thread_area): New function.
13894
13895 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
13896
13897 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
13898 (initialize_low_arch): Call init_registers_crisv32 rather than
13899 init_register_crisv32.
13900
13901 2013-09-05 Pedro Alves <palves@redhat.com>
13902
13903 * server.h (handle_vFile, hostio_last_error_from_errno): Move
13904 to ...
13905 * hostio.h: ... this new file.
13906 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
13907 win32-low.c: Include hostio.h.
13908
13909 2013-09-05 Pedro Alves <palves@redhat.com>
13910
13911 * server.h (gdb_client_data, handler_func, callback_handler_func)
13912 (delete_file_handler, add_file_handler, append_callback_event)
13913 (delete_callback_event, start_event_loop, initialize_event_loop):
13914 Move to event-loop.h and include it.
13915 * event-loop.h: New file.
13916
13917 2013-09-05 Pedro Alves <palves@redhat.com>
13918
13919 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
13920 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
13921 (loaded_dll, unloaded_dll): Move to ...
13922 * dll.h: ... this new file.
13923 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
13924
13925 2013-09-05 Pedro Alves <palves@redhat.com>
13926
13927 * server.h (current_process, get_thread_process, all_processes)
13928 (add_inferior_to_list, for_each_inferior, current_inferior)
13929 (remove_inferior, add_process, remove_process, find_process_pid)
13930 (have_started_inferiors_p, have_attached_inferiors_p)
13931 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
13932 (clear_inferiors, find_inferior, find_inferior_id)
13933 (inferior_target_data, set_inferior_target_data)
13934 (inferior_regcache_data, set_inferior_regcache_data): Move to
13935 inferiors.h, and include it.
13936 * inferiors.h: New file.
13937
13938 2013-09-05 Pedro Alves <palves@redhat.com>
13939
13940 * server.h (struct emit_ops, current_insn_ptr, emit_error):
13941 Move ...
13942 * ax.h: ... here.
13943
13944 2013-09-05 Pedro Alves <palves@redhat.com>
13945
13946 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
13947 tracepoint.h.
13948 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
13949 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
13950 (handle_tracepoint_general_set, handle_tracepoint_query)
13951 (tracepoint_finished_step, tracepoint_was_hit)
13952 (release_while_stepping_state_list, current_traceframe)
13953 (in_readonly_region, traceframe_read_mem)
13954 (fetch_traceframe_registers, traceframe_read_sdata)
13955 (traceframe_read_info, struct fast_tpoint_collect_status)
13956 (fast_tracepoint_collecting, force_unlock_trace_buffer)
13957 (handle_tracepoit_bkpts, initialize_low_tracepoint)
13958 (supply_fast_tracepoint_registers)
13959 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
13960 (ipa_tdesc, claim_trampoline_space)
13961 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
13962 (agent_mem_read, agent_get_trace_state_variable_value)
13963 (agent_set_trace_state_variable_value, agent_tsv_read)
13964 (agent_mem_read_string, get_raw_reg_func_addr)
13965 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
13966 * tracepoint.h: ... this new file.
13967
13968 2013-09-05 Pedro Alves <palves@redhat.com>
13969
13970 * server.h (perror_with_name, error, fatal, warning, paddress)
13971 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
13972 include it.
13973 * utils.h: New file.
13974
13975 2013-09-05 Pedro Alves <palves@redhat.com>
13976
13977 * server.h (remote_debug, noack_mode, transport_is_reliable)
13978 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
13979 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
13980 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
13981 (write_enn, initialize_async_io, enable_async_io)
13982 (disable_async_io, check_remote_input_interrupt_request)
13983 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
13984 (dead_thread_notify, prepare_resume_reply)
13985 (decode_address_to_semicolon, decode_address, decode_m_packet)
13986 (decode_M_packet, decode_X_packet, decode_xfer_write)
13987 (decode_search_memory_packet, unhexify, hexify)
13988 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
13989 (look_up_one_symbol, relocate_instruction)
13990 (monitor_output): Move to remote-utils.h, and include it.
13991 * remote-utils.h: New file.
13992
13993 2013-09-05 Pedro Alves <palves@redhat.com>
13994
13995 * server.h (_): Delete.
13996
13997 2013-09-02 Pedro Alves <palves@redhat.com>
13998
13999 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
14000 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
14001 allocated.
14002 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
14003
14004 2013-09-02 Pierre Muller <muller@sourceware.org>
14005
14006 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
14007 or WriteProcessMemory complete successfully and handle
14008 ERROR_PARTIAL_COPY error.
14009
14010 2013-09-02 Pedro Alves <palves@redhat.com>
14011
14012 * server.c (gdb_read_memory): Return -1 on traceframe memory read
14013 error instead of EIO.
14014
14015 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
14016
14017 PR server/15604
14018 * linux-low.c: Include filestuff.h.
14019 (linux_create_inferior) <pid == 0>: Call close_most_fds.
14020 * lynx-low.c: Include filestuff.h.
14021 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
14022 * server.c: Include filestuff.h.
14023 (main): Call notice_open_fds.
14024 * spu-low.c: Include filestuff.h.
14025 (spu_create_inferior) <pid == 0>: Call close_most_fds.
14026
14027 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
14028
14029 * Makefile.in: Explain why ../target and ../nat are not
14030 listed as include file search paths.
14031 (linux-waitpid.o): New object file rule.
14032 * configure.srv (srv_native_linux_obj): New variable.
14033 Replace all occurrences of linux native object files with
14034 $srv_native_linux_obj.
14035 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
14036 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
14037 (linux_enable_event_reporting): Remove declaration.
14038 (my_waitpid): Moved to common/linux-waitpid.c.
14039 (linux_wait_for_event): Pass ptid when calling
14040 linux_enable_event_reporting.
14041 (linux_supports_tracefork_flag): Remove.
14042 (linux_enable_event_reporting): Likewise.
14043 (linux_tracefork_grandchild): Remove.
14044 (STACK_SIZE): Moved to common/linux-ptrace.c.
14045 (linux_tracefork_child): Remove.
14046 (linux_test_for_tracefork): Remove.
14047 (linux_look_up_symbols): Call linux_supports_traceclone.
14048 (initialize_low): Remove call to linux_test_for_tracefork.
14049 * linux-low.h (PTRACE_TYPE_ARG3): Move to
14050 common/linux-ptrace.h.
14051 (PTRACE_TYPE_ARG4): Likewise.
14052 Include linux-ptrace.h.
14053
14054 2013-08-21 Pedro Alves <palves@redhat.com>
14055
14056 * config.in: Renegerate.
14057
14058 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
14059
14060 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
14061 (SFILES): Remove $(srcdir)/common/target-common.c and
14062 add $(srcdir)/target/waitstatus.c.
14063 (OBS): Remove target-common.o and add waitstatus.o.
14064 (server_h): Remove $(srcdir)/../common/target-common.h and
14065 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
14066 and $(srcdir)/../target/waitstatus.h.
14067 (target-common.o): Remove.
14068 (waitstatus.o): New target object file.
14069 * target.h: Do not include target-common.h and
14070 include target/resume.h, target/wait.h and
14071 target/waitstatus.h.
14072
14073 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
14074
14075 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
14076 to PTRACE_TYPE_ARG3.
14077 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
14078 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
14079 PTRACE_TYPE_ARG4.
14080 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
14081 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
14082
14083 2013-07-27 Jie Zhang <jie@codesourcery.com>
14084 Daniel Jacobowitz <dan@codesourcery.com>
14085 Yao Qi <yao@codesourcery.com>
14086
14087 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
14088 (mips-linux-watch.o): New rule.
14089 (mips_linux_watch_h): New variable.
14090 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
14091 srv_tgtobj.
14092 * linux-mips-low.c: Include mips-linux-watch.h.
14093 (struct arch_process_info, struct arch_lwp_info): New.
14094 (update_watch_registers_callback): New function.
14095 (mips_linux_new_process, mips_linux_new_thread) New functions.
14096 (mips_linux_prepare_to_resume, mips_insert_point): New
14097 functions.
14098 (mips_remove_point, mips_stopped_by_watchpoint): New
14099 functions.
14100 (rsp_bp_type_to_target_hw_bp_type): New function.
14101 (mips_stopped_data_address): New function.
14102 (the_low_target): Add watchpoint support functions.
14103
14104 2013-07-27 Yao Qi <yao@codesourcery.com>
14105
14106 * i386-low.c: Include break-common.h.
14107 (enum target_hw_bp_type): Remove.
14108
14109 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
14110
14111 * Makefile.in (SFILES): /common/target-common.c.
14112 (OBS): Add target-common.o.
14113 (server_h): Add $(srcdir)/../common/target-common.h.
14114 (target-common.o): New target.
14115 * server.c (queue_stop_reply_callback): Free
14116 status string after use.
14117 * target.c (target_waitstatus_to_string): Remove.
14118 * target.h: Include target-common.h.
14119 (resume_kind): Likewise.
14120 (target_waitkind): Likewise.
14121 (target_waitstatus): Likewise.
14122 (TARGET_WNOHANG): Likewise.
14123
14124 2013-07-04 Yao Qi <yao@codesourcery.com>
14125
14126 * Makefile.in (host_alias): Use @host_noncanonical@.
14127 (target_alias): Use @target_noncanonical@.
14128 * configure.ac: Use ACX_NONCANONICAL_TARGET and
14129 ACX_NONCANONICAL_HOST.
14130 * configure: Regenerated.
14131
14132 Revert:
14133 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
14134
14135 * configure.ac (version_host, version_target): Set and AC_SUBST them.
14136 * configure: Rebuild.
14137 * Makefile.in (version_host, version_target): Get from configure.
14138 (version.c): Use $(version_host) and $(version_target).
14139
14140 2013-07-03 Pedro Alves <palves@redhat.com>
14141
14142 * Makefile.in (config.status): Depend on development.sh.
14143 * acinclude.m4: Include libmcheck.m4.
14144 * configure: Regenerate.
14145
14146 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
14147
14148 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
14149 attribute inside the parentheses.
14150 (winapi_DebugSetProcessKillOnExit): Ditto.
14151 (winapi_DebugBreakProcess): Ditto.
14152 (winapi_GenerateConsoleCtrlEvent): Ditto.
14153
14154 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
14155
14156 * notif.h (notif_event): Add a dummy member to avoid compiler
14157 errors.
14158
14159 2013-07-01 Pedro Alves <palves@redhat.com>
14160
14161 * hostio.c (HOSTIO_PATH_MAX): Define.
14162 (require_filename, handle_open, handle_unlink, handle_readlink):
14163 Use it.
14164
14165 2013-07-01 Pedro Alves <palves@redhat.com>
14166
14167 * server.h: Include "pathmax.h".
14168 * linux-low.c: Don't include sys/param.h.
14169 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
14170 MAXPATHLEN.
14171 * win32-low.c: Don't include sys/param.h.
14172 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
14173
14174 2013-07-01 Pedro Alves <palves@redhat.com>
14175
14176 * event-loop.c: Don't check HAVE_UNISTD_H before including
14177 <unistd.h>.
14178 * gdbreplay.c: Likewise.
14179 * remote-utils.c: Likewise.
14180 * server.c: Likewise.
14181 * configure.ac: Don't check for unistd.h.
14182 * configure: Regenerate.
14183
14184 2013-06-28 Tom Tromey <tromey@redhat.com>
14185
14186 * Makefile.in (version.c): Use version.in, not
14187 common/version.in.
14188
14189 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
14190
14191 * configure.ac (version_host, version_target): Set and AC_SUBST them.
14192 * configure: Rebuild.
14193 * Makefile.in (version_host, version_target): Get from configure.
14194 (version.c): Use $(version_host) and $(version_target).
14195
14196 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
14197
14198 Fix trace-status to output user name without trailing colon.
14199 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
14200
14201 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
14202
14203 Fix trace-status to output proper start-time and stop-time.
14204 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
14205 output start time and stop time in hex as gdb expects.
14206
14207 2013-06-26 Pedro Alves <pedro@codesourcery.com>
14208
14209 * tracepoint.c (build_traceframe_info_xml): Output trace state
14210 variables present in the trace buffer.
14211
14212 2013-06-24 Tom Tromey <tromey@redhat.com>
14213
14214 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
14215 create-version.sh.
14216 (version.o): Remove.
14217 * gdbreplay.c: Include version.h.
14218 (version, host_name): Don't declare.
14219 * server.h: Include version.h.
14220 (version, host_name): Don't declare.
14221
14222 2013-06-12 Pedro Alves <palves@redhat.com>
14223
14224 * linux-x86-low.c (linux_is_elf64): Delete global.
14225 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
14226 with local linux_pid_exe_is_elf_64_file use.
14227
14228 2013-06-11 Pedro Alves <palves@redhat.com>
14229
14230 * linux-low.c (regset_disabled, disable_regset): New functions.
14231 (regsets_fetch_inferior_registers)
14232 (regsets_store_inferior_registers): Use them.
14233 (initialize_regsets_info); Don't allocate the disabled_regsets
14234 array here.
14235 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
14236 comment.
14237
14238 2013-06-11 Pedro Alves <palves@redhat.com>
14239
14240 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
14241 xmalloc.
14242
14243 2013-06-11 Pedro Alves <palves@redhat.com>
14244
14245 * linux-x86-low.c (initialize_low_arch): Call
14246 init_registers_x32_avx_linux.
14247
14248 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
14249
14250 Fix compatibility with Android Bionic.
14251 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
14252 it is not empty.
14253
14254 2013-06-07 Pedro Alves <palves@redhat.com>
14255
14256 PR server/14823
14257 * Makefile.in (OBS): Add tdesc.o.
14258 (IPA_OBJS): Add tdesc-ipa.o.
14259 (tdesc-ipa.o): New rule.
14260 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
14261 interface.
14262 * linux-low.c (new_inferior): Delete.
14263 (disabled_regsets, num_regsets): Delete.
14264 (linux_add_process): Adjust to set the new per-process
14265 new_inferior flag.
14266 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
14267 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
14268 was a stop. When calling arch_setup, switch the current inferior
14269 to the thread that got an event.
14270 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
14271 (regsets_fetch_inferior_registers)
14272 (regsets_store_inferior_registers): New regsets_info parameter.
14273 Adjust to use it.
14274 (linux_register_in_regsets): New regs_info parameter. Adjust to
14275 use it.
14276 (register_addr, fetch_register, store_register): New usrregs_info
14277 parameter. Adjust to use it.
14278 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
14279 parameter regs_info. Adjust to use it.
14280 (linux_fetch_registers): Get the current inferior's regs_info, and
14281 adjust to use it.
14282 (linux_store_registers): Ditto.
14283 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
14284 (initialize_low): Don't initialize the target_regsets here. Call
14285 initialize_low_arch.
14286 * linux-low.h (target_regsets): Delete declaration.
14287 (struct regsets_info): New.
14288 (struct usrregs_info): New.
14289 (struct regs_info): New.
14290 (struct process_info_private) <new_inferior>: New field.
14291 (struct linux_target_ops): Delete the num_regs, regmap, and
14292 regset_bitmap fields. New field regs_info.
14293 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
14294 * i387-fp.c (num_xmm_registers): Delete.
14295 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
14296 calls to new interface.
14297 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
14298 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
14299 Infer the number of xmm registers from the regcache's target
14300 description.
14301 * i387-fp.h (num_xmm_registers): Delete.
14302 * inferiors.c (add_thread): Don't install the thread's regcache
14303 here.
14304 * proc-service.c (gregset_info): Fetch the current inferior's
14305 regs_info. Adjust to use it.
14306 * regcache.c: Include tdesc.h.
14307 (register_bytes, reg_defs, num_registers)
14308 (gdbserver_expedite_regs): Delete.
14309 (get_thread_regcache): If the thread doesn't have a regcache yet,
14310 create one, instead of aborting gdbserver.
14311 (regcache_invalidate_one): Rename to ...
14312 (regcache_invalidate_thread): ... this.
14313 (regcache_invalidate_one): New.
14314 (regcache_invalidate): Only invalidate registers of the current
14315 process.
14316 (init_register_cache): Add target_desc parameter, and use it.
14317 (new_register_cache): Ditto. Assert the target description has a
14318 non zero registers_size.
14319 (regcache_cpy): Add assertions. Adjust.
14320 (realloc_register_cache, set_register_cache): Delete.
14321 (registers_to_string, registers_from_string): Adjust.
14322 (find_register_by_name, find_regno, find_register_by_number)
14323 (register_cache_size): Add target_desc parameter, and use it.
14324 (free_register_cache_thread, free_register_cache_thread_one)
14325 (regcache_release, register_cache_size): New.
14326 (register_size): Add target_desc parameter, and use it.
14327 (register_data, supply_register, supply_register_zeroed)
14328 (supply_regblock, supply_register_by_name, collect_register)
14329 (collect_register_as_string, collect_register_by_name): Adjust.
14330 * regcache.h (struct target_desc): Forward declare.
14331 (struct regcache) <tdesc>: New field.
14332 (init_register_cache, new_register_cache): Add target_desc
14333 parameter.
14334 (regcache_invalidate_thread): Declare.
14335 (regcache_invalidate_one): Delete declaration.
14336 (regcache_release): Declare.
14337 (find_register_by_number, register_cache_size, register_size)
14338 (find_regno): Add target_desc parameter.
14339 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
14340 declarations.
14341 * remote-utils.c: Include tdesc.h.
14342 (outreg, prepare_resume_reply): Adjust.
14343 * server.c: Include tdesc.h.
14344 (gdbserver_xmltarget): Delete declaration.
14345 (get_features_xml, process_serial_event): Adjust.
14346 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
14347 declare.
14348 (struct process_info) <tdesc>: New field.
14349 (ipa_tdesc): Declare.
14350 * tdesc.c: New file.
14351 * tdesc.h: New file.
14352 * tracepoint.c: Include tdesc.h.
14353 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
14354 (get_context_regcache): Adjust to pass ipa_tdesc down.
14355 (do_action_at_tracepoint): Adjust to get the register cache size
14356 from the context regcache's description.
14357 (traceframe_walk_blocks): Adjust to get the register cache size
14358 from the current trace frame's description.
14359 (traceframe_get_pc): Adjust to get current trace frame's
14360 description and pass it down.
14361 (gdb_collect): Adjust to get the register cache size from the
14362 IPA's description.
14363 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
14364 (gdbserver_xmltarget): Delete.
14365 (initialize_low_tracepoint): Set the ipa's target description.
14366 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
14367 (initialize_low_tracepoint): Set the ipa's target description.
14368 * linux-x86-low.c: Include tdesc.h.
14369 [__x86_64__] (is_64bit_tdesc): New.
14370 (ps_get_thread_area, x86_get_thread_area): Use it.
14371 (i386_cannot_store_register): Rename to ...
14372 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
14373 (i386_cannot_fetch_register): Rename to ...
14374 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
14375 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
14376 to new interface.
14377 (target_regsets): Rename to ...
14378 (x86_regsets): ... this.
14379 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
14380 interface.
14381 (x86_siginfo_fixup): Use is_64bit_tdesc.
14382 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
14383 (tdesc_x32_avx_linux, tdesc_x32_linux)
14384 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
14385 Declare.
14386 (x86_linux_update_xmltarget): Delete.
14387 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
14388 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
14389 (AMD64_LINUX_USER64_CS): New.
14390 (x86_linux_read_description): New, based on
14391 x86_linux_update_xmltarget.
14392 (same_process_callback): New.
14393 (x86_arch_setup_process_callback): New.
14394 (x86_linux_update_xmltarget): New.
14395 (x86_regsets_info): New.
14396 (amd64_linux_regs_info): New.
14397 (i386_linux_usrregs_info): New.
14398 (i386_linux_regs_info): New.
14399 (x86_linux_regs_info): New.
14400 (x86_arch_setup): Reimplement.
14401 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
14402 (x86_emit_ops): Ditto.
14403 (the_low_target): Adjust. Install x86_linux_regs_info,
14404 x86_cannot_fetch_register, and x86_cannot_store_register.
14405 (initialize_low_arch): New.
14406 * linux-ia64-low.c (tdesc_ia64): Declare.
14407 (ia64_fetch_register): Adjust.
14408 (ia64_usrregs_info, regs_info): New globals.
14409 (ia64_regs_info): New function.
14410 (the_low_target): Adjust.
14411 (initialize_low_arch): New function.
14412 * linux-sparc-low.c (tdesc_sparc64): Declare.
14413 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
14414 Adjust.
14415 (sparc_arch_setup): New function.
14416 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
14417 (the_low_target): Adjust.
14418 (initialize_low_arch): New function.
14419 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
14420 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
14421 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
14422 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
14423 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
14424 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
14425 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
14426 (tdesc_powerpc_isa205_vsx64l): Declare.
14427 (ppc_cannot_store_register, ppc_collect_ptrace_register)
14428 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
14429 (ppc_set_pc, ppc_get_hwcap): Adjust.
14430 (ppc_usrregs_info): Forward declare.
14431 (!__powerpc64__) ppc_regmap_adjusted: New global.
14432 (ppc_arch_setup): Adjust to the current process'es target
14433 description.
14434 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
14435 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
14436 (ppc_store_evrregset): Adjust.
14437 (target_regsets): Rename to ...
14438 (ppc_regsets): ... this, and make static.
14439 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
14440 (ppc_regs_info): New function.
14441 (the_low_target): Adjust.
14442 (initialize_low_arch): New function.
14443 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
14444 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
14445 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
14446 (tdesc_s390x_linux64v2): Declare.
14447 (s390_collect_ptrace_register, s390_supply_ptrace_register)
14448 (s390_fill_gregset, s390_store_last_break): Adjust.
14449 (target_regsets): Rename to ...
14450 (s390_regsets): ... this, and make static.
14451 (s390_get_pc, s390_set_pc): Adjust.
14452 (s390_get_hwcap): New target_desc parameter, and use it.
14453 [__s390x__] (have_hwcap_s390_high_gprs): New global.
14454 (s390_arch_setup): Adjust to set the current process'es target
14455 description. Don't adjust the regmap.
14456 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
14457 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
14458 (regs_info_3264): New globals.
14459 (s390_regs_info): New function.
14460 (the_low_target): Adjust.
14461 (initialize_low_arch): New function.
14462 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
14463 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
14464 [__mips64] (init_registers_mips_linux)
14465 (init_registers_mips_dsp_linux): Delete defines.
14466 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
14467 (have_dsp): New global.
14468 (mips_read_description): New, based on mips_arch_setup.
14469 (mips_arch_setup): Reimplement.
14470 (get_usrregs_info): New function.
14471 (mips_cannot_fetch_register, mips_cannot_store_register)
14472 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
14473 (mips_fill_fpregset, mips_store_fpregset): Adjust.
14474 (target_regsets): Rename to ...
14475 (mips_regsets): ... this, and make static.
14476 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
14477 (dsp_regs_info, regs_info): New globals.
14478 (mips_regs_info): New function.
14479 (the_low_target): Adjust.
14480 (initialize_low_arch): New function.
14481 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
14482 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
14483 Declare.
14484 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
14485 (arm_read_description): New, with bits factored from
14486 arm_arch_setup.
14487 (arm_arch_setup): Reimplement.
14488 (target_regsets): Rename to ...
14489 (arm_regsets): ... this, and make static.
14490 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
14491 (arm_regs_info): New function.
14492 (the_low_target): Adjust.
14493 (initialize_low_arch): New function.
14494 * linux-m68k-low.c (tdesc_m68k): Declare.
14495 (target_regsets): Rename to ...
14496 (m68k_regsets): ... this, and make static.
14497 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
14498 (m68k_regs_info): New function.
14499 (m68k_arch_setup): New function.
14500 (the_low_target): Adjust.
14501 (initialize_low_arch): New function.
14502 * linux-sh-low.c (tdesc_sharch): Declare.
14503 (target_regsets): Rename to ...
14504 (sh_regsets): ... this, and make static.
14505 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
14506 (sh_regs_info, sh_arch_setup): New functions.
14507 (the_low_target): Adjust.
14508 (initialize_low_arch): New function.
14509 * linux-bfin-low.c (tdesc_bfin): Declare.
14510 (bfin_arch_setup): New function.
14511 (bfin_usrregs_info, regs_info): New globals.
14512 (bfin_regs_info): New function.
14513 (the_low_target): Adjust.
14514 (initialize_low_arch): New function.
14515 * linux-cris-low.c (tdesc_cris): Declare.
14516 (cris_arch_setup): New function.
14517 (cris_usrregs_info, regs_info): New globals.
14518 (cris_regs_info): New function.
14519 (the_low_target): Adjust.
14520 (initialize_low_arch): New function.
14521 * linux-cris-low.c (tdesc_crisv32): Declare.
14522 (cris_arch_setup): New function.
14523 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
14524 (cris_regs_info): New function.
14525 (the_low_target): Adjust.
14526 (initialize_low_arch): New function.
14527 * linux-m32r-low.c (tdesc_m32r): Declare.
14528 (m32r_arch_setup): New function.
14529 (m32r_usrregs_info, regs_info): New globals.
14530 (m32r_regs_info): Adjust.
14531 (initialize_low_arch): New function.
14532 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
14533 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
14534 (tic6x_usrregs_info): Forward declare.
14535 (tic6x_read_description): New function, based on ...
14536 (tic6x_arch_setup): ... this. Reimplement.
14537 (target_regsets): Rename to ...
14538 (tic6x_regsets): ... this, and make static.
14539 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
14540 (tic6x_regs_info): New function.
14541 (the_low_target): Adjust.
14542 (initialize_low_arch): New function.
14543 * linux-xtensa-low.c (tdesc_xtensa): Declare.
14544 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
14545 (target_regsets): Rename to ...
14546 (xtensa_regsets): ... this, and make static.
14547 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
14548 globals.
14549 (xtensa_arch_setup, xtensa_regs_info): New functions.
14550 (the_low_target): Adjust.
14551 (initialize_low_arch): New function.
14552 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
14553 (nios2_arch_setup): Set the current process'es tdesc.
14554 (target_regsets): Rename to ...
14555 (nios2_regsets): ... this.
14556 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
14557 (nios2_regs_info): New function.
14558 (the_low_target): Adjust.
14559 (initialize_low_arch): New function.
14560 * linux-aarch64-low.c (tdesc_aarch64): Declare.
14561 (aarch64_arch_setup): Set the current process'es tdesc.
14562 (target_regsets): Rename to ...
14563 (aarch64_regsets): ... this.
14564 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
14565 (aarch64_regs_info): New function.
14566 (the_low_target): Adjust.
14567 (initialize_low_arch): New function.
14568 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
14569 globals.
14570 (target_regsets): Rename to ...
14571 (tile_regsets): ... this.
14572 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
14573 (tile_regs_info): New function.
14574 (tile_arch_setup): Set the current process'es tdesc.
14575 (the_low_target): Adjust.
14576 (initialize_low_arch): New function.
14577 * spu-low.c (tdesc_spu): Declare.
14578 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
14579 * win32-arm-low.c (tdesc_arm): Declare.
14580 (arm_arch_setup): New function.
14581 (the_low_target): Install arm_arch_setup instead of
14582 init_registers_arm.
14583 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
14584 (init_windows_x86): Rename to ...
14585 (i386_arch_setup): ... this. Set `win32_tdesc'.
14586 (the_low_target): Adjust.
14587 * win32-low.c (win32_tdesc): New global.
14588 (child_add_thread): Don't create the thread cache here.
14589 (do_initial_child_stuff): Set the new process'es tdesc.
14590 * win32-low.h (struct target_desc): Forward declare.
14591 (win32_tdesc): Declare.
14592 * lynx-i386-low.c (tdesc_i386): Declare global.
14593 (lynx_i386_arch_setup): Set `lynx_tdesc'.
14594 * lynx-low.c (lynx_tdesc): New global.
14595 (lynx_add_process): Set the new process'es tdesc.
14596 * lynx-low.h (struct target_desc): Forward declare.
14597 (lynx_tdesc): Declare global.
14598 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
14599 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
14600 * nto-low.c (nto_tdesc): New global.
14601 (do_attach): Set the new process'es tdesc.
14602 * nto-low.h (struct target_desc): Forward declare.
14603 (nto_tdesc): Declare.
14604 * nto-x86-low.c (tdesc_i386): Declare.
14605 (nto_x86_arch_setup): Set `nto_tdesc'.
14606
14607 2013-06-04 Gary Benson <gbenson@redhat.com>
14608
14609 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
14610 to qSupported response when appropriate.
14611 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
14612 with nonzero-length annex.
14613 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
14614 arguments supplied in annex.
14615
14616 2013-05-31 Doug Evans <dje@google.com>
14617
14618 PR server/15594
14619 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
14620 64 bits in 64-cross-32 environment.
14621
14622 2013-05-28 Pedro Alves <palves@redhat.com>
14623
14624 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
14625 (aarch64-without-fpu.c): Delete rule.
14626 * configure.srv (aarch64*-*-linux*): Remove references to
14627 aarch64-without-fpu.o and aarch64-without-fpu.xml.
14628 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
14629 declaration.
14630
14631 2013-05-24 Pedro Alves <palves@redhat.com>
14632
14633 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
14634 instead of strchr/decode_address. Error if the range isn't split
14635 with a ','. Don't assume there's be a ':' in the action.
14636
14637 2013-05-23 Yao Qi <yao@codesourcery.com>
14638 Pedro Alves <palves@redhat.com>
14639
14640 * linux-low.c (lwp_in_step_range): New function.
14641 (linux_wait_1): If the thread was range stepping and stopped
14642 outside the stepping range, report the stop to GDB. Otherwise,
14643 continue stepping. Add range stepping debug output.
14644 (linux_set_resume_request): Copy the step range from the resume
14645 request to the lwp.
14646 (linux_supports_range_stepping): New.
14647 (linux_target_ops) <supports_range_stepping>: Set to
14648 linux_supports_range_stepping.
14649 * linux-low.h (struct linux_target_ops)
14650 <supports_range_stepping>: New field.
14651 (struct lwp_info) <step_range_start, step_range_end>: New fields.
14652 * linux-x86-low.c (x86_supports_range_stepping): New.
14653 (the_low_target) <supports_range_stepping>: Set to
14654 x86_supports_range_stepping.
14655 * server.c (handle_v_cont): Handle 'r' action.
14656 (handle_v_requests): Append ";r" if the target supports range
14657 stepping.
14658 * target.h (struct thread_resume) <step_range_start,
14659 step_range_end>: New fields.
14660 (struct target_ops) <supports_range_stepping>:
14661 New field.
14662 (target_supports_range_stepping): New macro.
14663
14664 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14665
14666 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
14667 confusion in comment.
14668
14669 2013-05-17 Joel Brobecker <brobecker@adacore.com>
14670
14671 * lynx-low.c (struct process_info_private): New type.
14672 (lynx_add_process): New function.
14673 (lynx_create_inferior, lynx_attach): Replace calls to
14674 add_process by calls to lynx_add_process.
14675 (lynx_resume): If PTID is null, then try using
14676 current_process()->private->last_wait_event_ptid.
14677 Add comments.
14678 (lynx_clear_inferiors): Delete. The contents of that function
14679 has been inlined in lynx_mourn;
14680 (lynx_wait_1): Save the ptid in the process's private data.
14681 (lynx_mourn): Free the process' private data. Replace call
14682 to lynx_clear_inferiors by call to clear_inferiors.
14683
14684 2013-05-17 Yao Qi <yao@codesourcery.com>
14685
14686 * i386-low.c (i386_length_and_rw_bits): Move the comment to
14687 the right place.
14688
14689 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
14690
14691 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
14692 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
14693 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
14694 PT_TEXT_END_ADDR guards. Update comments.
14695 (linux_target_op) <read_offsets>: Conditionally define to
14696 linux_read_offsets if the target is UCLIBC and if it defines
14697 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
14698
14699 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
14700 Andrew Jenner <andrew@codesourcery.com>
14701
14702 * Makefile.in (SFILES): Add linux-nios2-low.c.
14703 (clean): Add action to delete nios2-linux.c.
14704 (nios2-linux.c): New rule.
14705 * configure.srv: Add nios2*-*-linux*.
14706 * linux-nios2-low.c: New.
14707
14708 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
14709
14710 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
14711
14712 2013-04-25 Hui Zhu <hui@codesourcery.com>
14713
14714 PR gdb/15186
14715 * ax.c (ax_printf): Add fflush.
14716
14717 2013-04-22 Tom Tromey <tromey@redhat.com>
14718
14719 * Makefile.in (SFILES): Add filestuff.c.
14720 (OBS): Add filestuff.o.
14721 (filestuff.o): New target.
14722 * config.in, configure: Rebuild.
14723 * configure.ac: Check for fdwalk, pipe2.
14724
14725 2013-04-17 Pedro Alves <palves@redhat.com>
14726
14727 * configure.ac (USE_THREAD_DB): Delete variable.
14728 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
14729 Don't AC_SUBST USE_THREAD_DB.
14730 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
14731 * config.in, configure: Regenerate.
14732
14733 2013-04-16 Pedro Alves <palves@redhat.com>
14734
14735 * linux-low.h (struct lwp_info) <thread_known>: Move under
14736 the USE_THREAD_DB #ifdef.
14737
14738 2013-04-16 Pedro Alves <palves@redhat.com>
14739
14740 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
14741 (linux-low.o): Delete rule.
14742 * linux-low.h: Always include "gdb_thread_db.h" instead of
14743 conditionally including thread_db.h.
14744 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
14745 HAVE_THREAD_DB_H.
14746
14747 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
14748
14749 * Makefile.in (install-only): Fix make install regression.
14750
14751 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
14752
14753 Convert man pages to texinfo, new gdbinit.5 texinfo page.
14754 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
14755 installation.
14756 * gdbserver.1: Remove.
14757
14758 2013-03-22 Pedro Alves <palves@redhat.com>
14759
14760 * linux-low.c (handle_extended_wait): Don't call
14761 linux_enable_event_reporting.
14762
14763 2013-03-15 Tony Theodore <tonyt@logyst.com>
14764
14765 PR build/9098:
14766 * Makefile.in (SHELL): Use @SHELL@.
14767
14768 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
14769
14770 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
14771 compiler warning.
14772
14773 2013-03-13 Joel Brobecker <brobecker@adacore.com>
14774
14775 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
14776 Remove extraneous NULL element.
14777
14778 2013-03-13 Yao Qi <yao@codesourcery.com>
14779
14780 * tracepoint.c (traceframe_read_tsv): Look for the last matched
14781 'V' block in trace frame.
14782
14783 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14784
14785 * target.h (struct target_ops): Add btrace ops.
14786 (target_supports_btrace): New macro.
14787 (target_enable_btrace): New macro.
14788 (target_disable_btrace): New macro.
14789 (target_read_btrace): New macro.
14790 * gdbthread.h (struct thread_info): Add btrace field.
14791 * server.c: Include btrace-common.h.
14792 (handle_btrace_general_set): New function.
14793 (handle_btrace_enable): New function.
14794 (handle_btrace_disable): New function.
14795 (handle_general_set): Call handle_btrace_general_set.
14796 (handle_qxfer_btrace): New function.
14797 (struct qxfer qxfer_packets[]): Add btrace entry.
14798 * inferiors.c (remove_thread): Disable btrace.
14799 * linux-low: Include linux-btrace.h.
14800 (linux_low_enable_btrace): New function.
14801 (linux_low_read_btrace): New function.
14802 (linux_target_ops): Add btrace ops.
14803 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
14804 Add srv_linux_btrace=yes.
14805 (x86_64-*-linux*): Add linux-btrace.o.
14806 Add srv_linux_btrace=yes.
14807 * configure.ac: Define HAVE_LINUX_BTRACE.
14808 * config.in: Regenerated.
14809 * configure: Regenerated.
14810
14811 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14812
14813 * server.c (handle_qxfer): Preserve error message if -3 is
14814 returned.
14815 (qxfer): Document the -3 return value.
14816
14817 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
14818
14819 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
14820 (linux_btrace_h): New variable.
14821 (linux-btrace.o): New rule.
14822
14823 2013-03-08 Stan Shebs <stan@codesourcery.com>
14824 Hafiz Abid Qadeer <abidh@codesourcery.com>
14825
14826 * tracepoint.c (trace_buffer_size): New global.
14827 (DEFAULT_TRACE_BUFFER_SIZE): New define.
14828 (init_trace_buffer): Change to one-argument function. Allocate
14829 trace buffer memory.
14830 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
14831 handle QTBuffer:size packet.
14832 (cmd_bigqtbuffer_size): New function.
14833 (initialize_tracepoint): Call init_trace_buffer with
14834 DEFAULT_TRACE_BUFFER_SIZE.
14835 * server.c (handle_query): Add QTBuffer:size in the
14836 supported packets.
14837
14838 2013-03-07 Yao Qi <yao@codesourcery.com>
14839
14840 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
14841 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
14842 of -1.
14843 (cmd_qtsp): Adjust condition. Do post increment.
14844 Set cur_action and cur_step_action back to 0.
14845
14846 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
14847
14848 PR server/15236
14849 * linux-low.c (linux_write_memory): Return early success if LEN is
14850 zero.
14851
14852 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
14853
14854 * configure.srv: Add x86_64-*-cygwin* as target.
14855
14856 2013-02-28 Tom Tromey <tromey@redhat.com>
14857
14858 * configure.ac: Invoke AC_SYS_LARGEFILE.
14859 * configure, config.in: Rebuild.
14860
14861 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
14862
14863 * win32-low.c: Throughout, fix format strings and casts of
14864 printf-like functions to avoid type related warnings on all
14865 platforms.
14866 (get_child_debug_event): Print dwDebugEventCode as hex since
14867 that's how it's usually documented.
14868
14869 2013-02-28 Yao Qi <yao@codesourcery.com>
14870
14871 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
14872 pulongest.
14873
14874 2013-02-27 Jiong Wang <jiwang@tilera.com>
14875
14876 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
14877 (reg-tilegx32.c): New rule.
14878 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
14879 * linux-tile-low.c (tile_arch_setup): New function. Invoke
14880 different register info initializer according to elf class.
14881 (init_registers_tilgx32): New function. The tilegx32 register info
14882 initializer.
14883 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
14884 (tile_store_gregset): Likewise.
14885
14886 2013-02-27 Yao Qi <yao@codesourcery.com>
14887
14888 * server.c (process_point_options): Print debug message when
14889 debug_threads is true.
14890
14891 2013-02-26 Yao Qi <yao@codesourcery.com>
14892
14893 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
14894
14895 2013-02-19 Pedro Alves <palves@redhat.com>
14896 Kai Tietz <ktietz@redhat.com>
14897
14898 PR gdb/15161
14899
14900 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
14901 instead of strtoul to extract address from packet.
14902 (process_serial_event) <'z'>: Likewise.
14903
14904 2013-02-18 Yao Qi <yao@codesourcery.com>
14905
14906 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
14907
14908 2013-02-14 Pedro Alves <palves@redhat.com>
14909
14910 Plug memory leak.
14911
14912 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
14913 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
14914
14915 2013-02-14 Pedro Alves <palves@redhat.com>
14916
14917 * tracepoint.c (cmd_qtdpsrc): Use savestring.
14918
14919 2013-02-14 Pedro Alves <palves@redhat.com>
14920
14921 * tracepoint.c (save_string): Delete.
14922 (add_tracepoint_action): Use savestring instead of save_string.
14923
14924 2013-02-12 Pedro Alves <palves@redhat.com>
14925
14926 * linux-xtensa-low.c: Ditto.
14927 * xtensa-xtregs.c: Ditto.
14928
14929 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
14930
14931 * thread-db.c (thread_db_get_tls_address): NULL pointer check
14932 thread_db.
14933
14934 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14935
14936 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
14937 aarch64_num_wp_regs and aarch64_num_bp_regs to
14938 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
14939
14940 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
14941
14942 * linux-aarch64-low.c (ps_get_thread_area): Replace
14943 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
14944
14945 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
14946 Marcus Shawcroft <marcus.shawcroft@arm.com>
14947 Nigel Stephens <nigel.stephens@arm.com>
14948 Yufeng Zhang <yufeng.zhang@arm.com>
14949
14950 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
14951 (aarch64.c, aarch64-without-fpu.c): New targets.
14952 * configure.srv (aarch64*-*-linux*): New.
14953 * linux-aarch64-low.c: New file.
14954
14955 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
14956
14957 * linux-low.c (handle_extended_wait, linux_create_inferior)
14958 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
14959 (dequeue_one_deferred_signal, linux_resume_one_thread)
14960 (fetch_register, linux_write_memory, linux_enable_event_reporting)
14961 (linux_tracefork_grandchild, linux_test_for_tracefork)
14962 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
14963 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
14964 where the argument is 0.
14965
14966 2013-01-25 Yao Qi <yao@codesourcery.com>
14967
14968 * event-loop.c: Include "queue.h".
14969 (gdb_event_p): New typedef.
14970 (struct gdb_event) <next_event>: Remove.
14971 (event_queue): Change to QUEUE(gdb_event_p).
14972 (async_queue_event): Remove.
14973 (gdb_event_xfree): New.
14974 (initialize_event_loop): New.
14975 (process_event): Use API from QUEUE.
14976 (wait_for_event): Likewise.
14977 * server.c (main): Call initialize_event_loop.
14978 * server.h (initialize_event_loop): Declare.
14979
14980 2013-01-18 Yao Qi <yao@codesourcery.com>
14981
14982 * ax.h (struct eval_agent_expr_context): New.
14983 (gdb_eval_agent_expr): Update declaration.
14984 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
14985 TFRAME. Add new argument CTX.
14986 * server.h (struct eval_agent_expr_context): Declare.
14987 (agent_mem_read, agent_tsv_read): Update declaration.
14988 (agent_mem_read_string): Likewise.
14989 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
14990 (add_traceframe_block): Add new argument TPOINT.
14991 Increase TPOINT->traceframe_usage.
14992 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
14993 eval_tracepoint_agent_expr.
14994 (condition_true_at_tracepoint): Likewise.
14995 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
14996 (agent_mem_read_string, agent_tsv_read): Likewise.
14997
14998 2013-01-16 Yao Qi <yao@codesourcery.com>
14999
15000 * linux-low.c (linux_resume_one_lwp): Don't check
15001 'lwp->bp_reinsert != 0'.
15002
15003 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15004 Pedro Alves <palves@redhat.com>
15005
15006 * lynx-low.c (ptrace_request_to_str): Define a temporary
15007 macro and use it to simplify this function's implementation.
15008
15009 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15010
15011 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
15012 sets errno.
15013
15014 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15015
15016 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
15017
15018 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15019
15020 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
15021
15022 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15023
15024 * lynx-low.c (lynx_resume): Use the resume_info parameter
15025 to determine the ptid for the lynx_ptrace call, unless
15026 it is equal to minus_one_ptid, in which case we use the
15027 ptid of the current_inferior.
15028 (lynx_wait_1): After having received a thread create/exit
15029 event, resume the inferior's execution using the signaling
15030 thread's ptid, rather than the old ptid.
15031
15032 2013-01-07 Joel Brobecker <brobecker@adacore.com>
15033
15034 * lynx-low.c (lynx_resume): Delete variable ret.
15035
15036 2013-01-01 Joel Brobecker <brobecker@adacore.com>
15037
15038 * gdbreplay.c (gdbreplay_version): Update copyright year.
15039 * server.c (gdbserver_version): Likewise.
15040
15041 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15042
15043 * lynx-low.c (lynx_wait_1): Add debug trace before adding
15044 new thread.
15045
15046 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15047
15048 * lynx-low.c (ptrace_request_to_str): Add handling for
15049 PTRACE_GETTRACESIG.
15050
15051 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15052
15053 * lynx-low.c (lynx_attach): Delete variable new_process.
15054
15055 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15056
15057 * lynx-low.c (lynx_create_inferior): Delete variable
15058 new_process.
15059
15060 2012-12-17 Joel Brobecker <brobecker@adacore.com>
15061
15062 * lynx-low.c (ptrace_request_to_str): Do not handle
15063 PTRACE_GETTHREADLIST if this macro does not exist.
15064
15065 2012-12-15 Yao Qi <yao@codesourcery.com>
15066
15067 * Makefile.in (OBS): Add notif.o.
15068 * notif.c, notif.h: New.
15069 * server.c: Include "notif.h".
15070 (struct vstop_notif) <next>: Remove.
15071 <base>: New field.
15072 (queue_stop_reply): Update.
15073 (push_event, send_next_stop_reply): Remove.
15074 (discard_queued_stop_replies): Update.
15075 (notif_stop): New variable.
15076 (handle_v_stopped): Remove.
15077 (handle_v_requests): Don't call handle_v_stopped. Call
15078 handle_ack_notif instead.
15079 (queue_stop_reply_callback): Call notif_event_enque instead
15080 of queue_stop_reply.
15081 (handle_status): Don't call send_next_stop_reply, call
15082 notif_write_event instead.
15083 (kill_inferior_callback): Likewise.
15084 (detach_or_kill_inferior_callback): Likewise.
15085 (main): Call initialize_notif.
15086 (process_serial_event): Call QUEUE_is_empty.
15087 (handle_target_event): Call notif_push instead of push event.
15088 * server.h (push_event): Remove declaration.
15089
15090 2012-12-10 Tom Tromey <tromey@redhat.com>
15091
15092 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
15093 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
15094 macros.
15095 (.c.o): Rewrite.
15096 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
15097 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
15098 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
15099 (amd64-linux-ipa.o, ax.o): Rewrite.
15100 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
15101 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
15102 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
15103 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
15104 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
15105 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
15106 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
15107 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
15108 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
15109 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
15110 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
15111 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
15112 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
15113 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
15114 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
15115 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
15116 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
15117 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
15118 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
15119 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
15120 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
15121 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
15122 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
15123 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
15124 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
15125 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
15126 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
15127 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
15128 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
15129 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
15130 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
15131 (reg-tilegx.o): Remove.
15132 (all_object_files): New macro.
15133 Include .deps files.
15134 * aclocal.m4, configure: Rebuild.
15135 * acinclude.m4: Include depstand.m4, lead-dot.m4.
15136 * configure.ac: Invoke ZW_CREATE_DEPDIR,
15137 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
15138
15139 2012-12-05 Tom Tromey <tromey@redhat.com>
15140
15141 PR gdb/14917:
15142 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
15143
15144 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
15145
15146 * configure.ac: Check for linux/perf_event.h.
15147 * config.in: Regenerated.
15148 * configure: Regenerated.
15149
15150 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
15151
15152 * hostio.c (handle_readlink): Decrease buffer size
15153 parameter passed to readlink by one byte.
15154
15155 2012-11-26 Yao Qi <yao@codesourcery.com>
15156
15157 * configure.ac (build_warnings): Append '-Wempty-body'.
15158 * configure: Regenerated.
15159 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
15160 body.
15161
15162 2012-11-15 Pierre Muller <muller@sourceware.org>
15163
15164 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
15165 * config.in: Regenerate.
15166 * configure: Regenerate.
15167 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
15168 Use "gdb_wait.h" header instead of <sys/wait.h> header.
15169 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
15170 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
15171 header.
15172 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
15173 instead of <sys/wait.h> header.
15174 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
15175
15176 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
15177
15178 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
15179 (various make rules): Remove -DGDBSERVER
15180
15181 2012-11-09 Yao Qi <yao@codesourcery.com>
15182
15183 * spu-low.c (current_ptid): Move it to ..
15184 * gdbthread.h: ... here. New.
15185 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
15186 * server.c (myresume, process_serial_event): Likewise.
15187 * thread-db.c (thread_db_find_new_threads): Likewise.
15188 * tracepoint.c (run_inferior_command): Likewise.
15189
15190 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
15191
15192 * server.c (handle_search_memory_1): Include access length in
15193 warning message.
15194
15195 2012-09-05 Michael Brandt <michael.brandt@axis.com>
15196
15197 * linux-crisv32-low.c: Fix compile errors.
15198
15199 2012-09-04 Yao Qi <yao@codesourcery.com>
15200
15201 * tracepoint.c (cmd_qtsv): Adjust debug message.
15202 Don't check CUR_TPOINT.
15203
15204 2012-08-28 Yao Qi <yao@codesourcery.com>
15205
15206 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
15207 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
15208 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
15209 Remove declarations of xmalloc, xreallloc, xstrdup and
15210 freeargv.
15211 * Makefile.in (libiberty_h): New.
15212 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
15213 (linux-bfin-low.o): Append dependency 'libiberty.h'.
15214
15215 2012-08-23 Yao Qi <yao@codesourcery.com>
15216
15217 * server.h: Remove declaration of 'xsnprintf'.
15218
15219 2012-08-22 Keith Seitz <keiths@redhat.com>
15220
15221 * server.h: Include build-gnulib-gbserver/config.h.
15222 * gdbreplay.c: Likewise.
15223
15224 2012-08-08 Doug Evans <dje@google.com>
15225
15226 * Makefile.in (SFILES): Add gdb_vecs.c.
15227 (OBS): Add gdb_vecs.o.
15228 (gdb_vecs_h, host_defs_h): New variables.
15229 (thread-db.o): Add $(gdb_vecs_h) dependency.
15230 (gdb_vecs.o): New rule.
15231 * thread-db.c: #include "gdb_vecs.h".
15232 (thread_db_load_search): Use a vector to iterate over path elements.
15233 Handle text appearing after "$pdir".
15234
15235 * configure.ac: Add check for strstr.
15236 * config.in: Regenerate.
15237 * configure: Regenerate.
15238
15239 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
15240
15241 * hostio.c (handle_pread): If pread fails, fall back to attempting
15242 lseek/read.
15243 (handle_pwrite): Likewise for pwrite.
15244
15245 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
15246
15247 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
15248 between unsupported TYPE and unimplementable ADDR/LEN combination.
15249 (arm_insert_point): Act on new return value.
15250
15251 2012-07-31 Pedro Alves <palves@redhat.com>
15252
15253 * server.c (process_point_options): Only skip tokens if we find
15254 one that is unrecognized. Don't treat 'X' specially while
15255 skipping unrecognized tokens.
15256
15257 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
15258
15259 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
15260 to 4-byte-align HW breakpoint addresses for Thumb.
15261
15262 2012-07-27 Yao Qi <yao@codesourcery.com>
15263
15264 PR remote/14161.
15265
15266 * server.h: Declare gdb_agent_about_to_close.
15267 * target.c (kill_inferior): Include "agent.h".
15268 New. Send command 'kill'.
15269 * target.h (kill_inferior): Removed macro.
15270 * tracepoint.c (gdb_agent_about_to_close): New.
15271 (gdb_agent_helper_thread): Handle command 'close'.
15272 Wait endlessly until the inferior stops.
15273 Install gdb_agent_remove_socket to atexit hook.
15274 (agent_socket_name): New static variable.
15275 (gdb_agent_socket_init): Replace local variable 'name' with
15276 'agent_socket_name'.
15277 (gdb_agent_remove_socket): New.
15278
15279 2012-07-27 Yao Qi <yao@codesourcery.com>
15280
15281 * server.c (process_point_options): Stop at 'X' when parsing.
15282
15283 2012-07-19 Michael Eager <eager@eagercon.com>
15284
15285 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
15286 to hw_execute.
15287 * linux-x86-low.c (x86_insert_point, x86_remove_point):
15288 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
15289 hardware breakpoint.
15290
15291 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
15292
15293 * gdbserver/linux-low.c (initialize_low): Call
15294 linux_ptrace_init_warnings.
15295
15296 2012-07-02 Doug Evans <dje@google.com>
15297
15298 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
15299 pointer to int.
15300
15301 2012-07-02 Stan Shebs <stan@codesourcery.com>
15302
15303 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
15304 (ax.o): Add it to build rule.
15305 (ax-ipa.o): Ditto.
15306 (OBS): Add format.o.
15307 (IPA_OBS): Add format.o.
15308 * server.c (handle_query): Claim support for breakpoint commands.
15309 (process_point_options): Add command case.
15310 (process_serial_event): Leave running if there are printfs in
15311 effect.
15312 * mem-break.h (any_persistent_commands): Declare.
15313 (add_breakpoint_commands): Declare.
15314 (gdb_no_commands_at_breakpoint): Declare.
15315 (run_breakpoint_commands): Declare.
15316 * mem-break.c (struct point_command_list): New struct.
15317 (struct breakpoint): New field command_list.
15318 (any_persistent_commands): New function.
15319 (add_commands_to_breakpoint): New function.
15320 (add_breakpoint_commands): New function.
15321 (gdb_no_commands_at_breakpoint): New function.
15322 (run_breakpoint_commands): New function.
15323 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
15324 locally.
15325 * ax.c: Include format.h.
15326 (ax_printf): New function.
15327 (gdb_eval_agent_expr): Add printf opcode.
15328
15329 2012-06-13 Yao Qi <yao@codesourcery.com>
15330
15331 * server.c (start_inferior): Remove duplicated writes to fields
15332 'last_resume_kind' and 'last_status' of 'current_inferior'.
15333
15334 2012-06-12 Yao Qi <yao@codesourcery.com>
15335 Pedro Alves <palves@redhat.com>
15336
15337 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
15338 comment.
15339 * server.c (handle_v_cont): Extend comment.
15340
15341 2012-06-11 Yao Qi <yao@codesourcery.com>
15342
15343 * linux-low.c (linux_attach): Add 'static'.
15344
15345 2012-06-06 Yao Qi <yao@codesourcery.com>
15346
15347 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
15348
15349 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
15350
15351 Fix gcc -flto compilation warning.
15352 * server.c (main): Make variable multi_mode and attach volatile.
15353
15354 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15355
15356 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
15357 if the platform doesn't know about it.
15358
15359 2012-05-30 Jeff Kenton <jkenton@tilera.com>
15360
15361 * Makefile.in (SFILES): Add linux-tile-low.c.
15362 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
15363 * configure.srv: Handle tilegx-*-linux*.
15364 * linux-tile-low.c: New file.
15365
15366 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
15367
15368 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
15369
15370 2012-05-24 Pedro Alves <palves@redhat.com>
15371
15372 PR gdb/7205
15373
15374 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
15375
15376 2012-05-24 Pedro Alves <palves@redhat.com>
15377
15378 PR gdb/7205
15379
15380 Replace target_signal with gdb_signal throughout.
15381
15382 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
15383
15384 * linux-low.c (linux_store_registers): Avoid the copying sequence
15385 when no data has been retrieved by ptrace.
15386
15387 2012-05-22 Will Deacon <will.deacon@arm.com>
15388
15389 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
15390 Include asm/ptrace.h.
15391 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
15392 already defined.
15393
15394 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
15395
15396 * linux-low.c (linux_store_registers): Don't re-retrieve data
15397 with ptrace that has already been obtained from /proc. Always
15398 copy any data retrieved with ptrace to the buffer supplied.
15399
15400 2012-05-11 Yao Qi <yao@codesourcery.com>
15401 Pedro Alves <palves@redhat.com>
15402
15403 * linux-low.c (enum stopping_threads_kind): New.
15404 (stopping_threads): Change type to `enum stopping_threads_kind'.
15405 (handle_extended_wait): If stopping and suspending threads, leave
15406 the new_lwp suspended too.
15407 (linux_wait_for_event): Adjust.
15408 (stop_all_lwps): Set `stopping_threads' to
15409 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
15410 whether we're suspending threads or just stopping them. Assert no
15411 recursion happens.
15412
15413 2012-04-29 Yao Qi <yao@codesourcery.com>
15414
15415 * server.h: Move some code to ...
15416 * gdbthread.h: ... here. New.
15417 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
15418 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
15419 (nto-low.o, win32-low.o): Likewise.
15420 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
15421 * regcache.c, remote-utils.c, server.c: Likewise.
15422 * target.c, tracepoint.c, win32-low.c: Likewise.
15423
15424 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15425
15426 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
15427 (PTRACE_ARG4_TYPE): Likewise.
15428 (PTRACE_XFER_TYPE): Likewise.
15429 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
15430 ptrace to PTRACE_ARG3_TYPE.
15431 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
15432 (PTRACE_ARG4_TYPE): Likewise.
15433 (PTRACE_XFER_TYPE): Likewise.
15434 (linux_detach_one_lwp): Cast fourth argument of
15435 ptrace to long then PTRACE_ARG4_TYPE.
15436 (regsets_fetch_inferior_registers): Cast third argument of
15437 ptrace to long then PTRACE_ARG3_TYPE.
15438 (regsets_store_inferior_registers): Likewise.
15439
15440 2012-04-20 Pedro Alves <palves@redhat.com>
15441
15442 * configure: Regenerate.
15443
15444 2012-04-19 Pedro Alves <palves@redhat.com>
15445
15446 * Makefile.in (GNULIB_BUILDDIR): New.
15447 (LIBGNU, INCGNU, GNULIB_H): Adjust.
15448 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
15449 (all, install-only, uninstall, clean-info, all-lib, clean): No
15450 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
15451 (maintainer-clean realclean distclean): Use subdir_do.
15452 (subdir_do): New.
15453 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
15454 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
15455 * acinclude.m4: Include acx_configure_dir.m4.
15456 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
15457 calls. Call AC_PROG_RANLIB. Configure gnulib using
15458 ACX_CONFIGURE_DIR.
15459 (GNULIB): New.
15460 (GNULIB_STDINT_H): Adjust.
15461 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
15462 * gdbreplay.c: Include build-gnulib/config.h.
15463 * server.h: Likewise.
15464 * aclocal.m4: Regenerate.
15465 * config.in: Regenerate.
15466 * configure: Regenerate.
15467
15468 2012-04-19 Pedro Alves <palves@redhat.com>
15469
15470 * Makefile.in (LIBGNU, INCGNU): Adjust.
15471 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
15472 (all, install-only, uninstall, clean-info, all-lib, clean)
15473 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
15474 * configure.ac: Adjust AC_OUTPUT output.
15475 * aclocal.m4: Regenerate.
15476 * configure: Regenerate.
15477
15478 2012-04-19 Pedro Alves <palves@redhat.com>
15479
15480 * Makefile.in (generated_files): New.
15481 (server_h): Remove the explicit dependency on config.h, and depend
15482 on $generated_files.
15483
15484 2012-04-19 Pedro Alves <palves@redhat.com>
15485
15486 * Makefile.in (INCGNU): Add -Ignulib.
15487
15488 2012-04-19 Pedro Alves <palves@redhat.com>
15489
15490 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
15491 (INCGNU): ... this, and spell out -I here.
15492 (GNULIB_LIB): Rename to ...
15493 (LIBGNU): ... this.
15494 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
15495
15496 2012-04-19 Pedro Alves <palves@redhat.com>
15497
15498 * config.in: Regenerate.
15499
15500 2012-04-19 Pedro Alves <palves@redhat.com>
15501
15502 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
15503 * server.h (memmem): Remove declaration.
15504 * config.in: Regenerate.
15505 * configure: Regenerate.
15506
15507 2012-04-19 Yao Qi <yao@codesourcery.com>
15508
15509 * Makefile.in (SFILES): Add common/vec.c.
15510 (OBS): Add vec.o.
15511 (vec.o): New rule.
15512
15513 2012-04-19 Yao Qi <yao@codesourcery.com>
15514
15515 * remote-utils.c (prepare_resume_reply): Replace with macro
15516 target_core_of_thread.
15517 * server.c (handle_qxfer_threads_proper): Likewise.
15518 * target.h (traget_core_of_thread): New macro.
15519
15520 2012-04-18 Pedro Alves <palves@redhat.com>
15521
15522 * aclocal.m4: Regenerate.
15523 * configure: Regenerate.
15524
15525 2012-04-16 Yao Qi <yao@codesourcery.com>
15526
15527 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
15528 duplicated on address.
15529
15530 2012-04-16 Yao Qi <yao@codesourcery.com>
15531
15532 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
15533 (struct tracepoint_action_ops) <send>: New field.
15534 (m_tracepoint_action_send, r_tracepoint_action_send): New.
15535 (agent_expr_send, x_tracepoint_action_send): New.
15536 (l_tracepoint_action_send): New.
15537 (cmd_qtdp): Download and install tracepoint
15538 according to `use_agent'.
15539 (run_inferior_command): Add one more parameter `len'.
15540 Update callers.
15541 (tracepoint_send_agent): New.
15542 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
15543
15544 2012-04-16 Yao Qi <yao@codesourcery.com>
15545
15546 * tracepoint.c (download_tracepoints): Moved to ...
15547 (cmd_qtstart): ... here.
15548
15549 2012-04-14 Yao Qi <yao@codesourcery.com>
15550
15551 * tracepoint.c: Include inttypes.h.
15552 (struct collect_memory_action): Use sized types.
15553 (struct tracepoint): Likewise.
15554 (cmd_qtdp, stop_tracing): Update print specifiers.
15555 (cmd_qtp, response_tracepoint): Likewise.
15556 (collect_data_at_tracepoint): Likewise.
15557 (collect_data_at_step): Likewise.
15558
15559 2012-04-14 Yao Qi <yao@codesourcery.com>
15560
15561 Import gnulib module inttypes.
15562 * aclocal.m4, config.in, configure: Regenerated.
15563
15564 2012-04-14 Yao Qi <yao@codesourcery.com>
15565
15566 * Makefile.in (maintainer-clean, realclean, distclean): Remove
15567 Makefile and config.status at last.
15568
15569 2012-04-13 Yao Qi <yao@codesourcery.com>
15570
15571 * tracepoint.c: Include stdint.h unconditionally.
15572
15573 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15574
15575 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
15576 on BFD_HAVE_SYS_PROCFS_TYPE.
15577 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
15578 * configure: Regenerate.
15579 * config.in: Likewise.
15580
15581 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
15582
15583 * Makefile.in (clean): Also remove x32.c x32-linux.c
15584 x32-avx.c x32-avx-linux.c.
15585 (x32.o): New target.
15586 (x32.c): Likewise.
15587 (x32-linux.o): Likewise.
15588 (x32-linux.c): Likewise.
15589 (x32-avx.o): Likewise.
15590 (x32-avx.c): Likewise.
15591 (x32-avx-linux.o): Likewise.
15592 (x32-avx-linux.c): Likewise.
15593
15594 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
15595 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
15596 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
15597 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
15598 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
15599 i386/x32-avx-linux.xml.
15600
15601 * linux-x86-low.c (init_registers_x32_linux): New prototype.
15602 (init_registers_x32_avx_linux): Likwise.
15603 (x86_linux_update_xmltarget): Call init_registers_x32_linux
15604 or init_registers_x32_avx_linux if linux_is_elf64 is false.
15605
15606 2012-04-13 Pedro Alves <palves@redhat.com>
15607
15608 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
15609 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
15610 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
15611 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
15612 the sub-make.
15613
15614 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15615
15616 * linux-x86-low.c (compat_x32_clock_t): New.
15617 (compat_x32_siginfo_t): Likewise.
15618 (compat_x32_siginfo_from_siginfo): Likewise.
15619 (siginfo_from_compat_x32_siginfo): Likewise.
15620 (linux_is_elf64): Likewise.
15621 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
15622 and siginfo_from_compat_x32_siginfo for x32.
15623 (x86_arch_setup): Set linux_is_elf64.
15624
15625 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
15626
15627 PR gdb/13969
15628 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
15629 e_machine field.
15630 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
15631 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
15632 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
15633 compatible with process.
15634
15635 2012-04-12 Yao Qi <yao@codesourcery.com>
15636
15637 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
15638 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
15639 (install-only, install-info, clean): Handle sub dir gnulib.
15640 (all-lib, am--refresh): New targets.
15641 (memmem.o): Remove target.
15642 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
15643 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
15644 (AC_REPLACE_FUNCS): Remove memmem.
15645 Invoke gl_INIT and AM_INIT_AUTOMAKE.
15646 (AC_OUTPUT): Generate Makefile in gnulib/.
15647 * aclocal.m4, config.in, configure: Regenerated.
15648
15649 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
15650
15651 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
15652
15653 2012-04-05 Pedro Alves <palves@redhat.com>
15654
15655 -Werror=strict-aliasing
15656
15657 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
15658 pointer.
15659
15660 2012-04-04 Pedro Alves <palves@redhat.com>
15661
15662 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
15663 (sparc_store_gregset_from_stack, sparc_store_gregset)
15664 (sparc_breakpoint_at): Fix formatting.
15665
15666 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
15667
15668 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
15669 are available.
15670 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
15671 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
15672 * config.in: Regenerate.
15673 * configure: Likewise.
15674
15675 2012-03-29 Pedro Alves <palves@redhat.com>
15676
15677 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
15678 Correct ptrace arguments.
15679
15680 2012-03-28 Pedro Alves <palves@redhat.com>
15681
15682 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
15683 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
15684 (IA64_FR1_REGNUM): New defines.
15685 (ia64_fetch_register): New.
15686 (the_low_target): Install it.
15687 * linux-low.h (struct linux_target_ops) <fetch_register>: New
15688 field.
15689 * linux-low.c (linux_fetch_registers): Try the
15690 the_low_target.fetch_register hook first.
15691
15692 * linux-arm-low.c (the_low_target): Adjust.
15693 * linux-bfin-low.c (the_low_target): Adjust.
15694 * linux-cris-low.c (the_low_target): Adjust.
15695 * linux-crisv32-low.c (the_low_target): Adjust.
15696 * linux-m32r-low.c (the_low_target): Adjust.
15697 * linux-m68k-low.c (the_low_target): Adjust.
15698 * linux-mips-low.c (the_low_target): Adjust.
15699 * linux-ppc-low.c (the_low_target): Adjust.
15700 * linux-s390-low.c (the_low_target): Adjust.
15701 * linux-sh-low.c (the_low_target): Adjust.
15702 * linux-sparc-low.c (the_low_target): Adjust.
15703 * linux-tic6x-low.c (the_low_target): Adjust.
15704 * linux-x86-low.c (the_low_target): Adjust.
15705 * linux-xtensa-low.c (the_low_target): Adjust.
15706
15707 2012-03-26 Pedro Alves <palves@redhat.com>
15708
15709 * server.c (handle_qxfer_libraries): Don't bail early if
15710 the_target->qxfer_libraries_svr4 is not NULL.
15711
15712 2012-03-26 Pedro Alves <palves@redhat.com>
15713
15714 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
15715
15716 2012-03-23 Pedro Alves <palves@redhat.com>
15717
15718 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
15719 "library-list-svr4" element's start tag when the the DSO list is
15720 empty.
15721
15722 2012-03-23 Pedro Alves <palves@redhat.com>
15723
15724 * linux-low.c (read_one_ptr): Read the inferior's pointer through
15725 a variable whose type size is the same as the inferior's pointer
15726 size.
15727
15728 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
15729
15730 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
15731 struct siginfo.
15732 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
15733 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
15734 * linux-low.h: Include <signal.h>.
15735 (struct siginfo): Remove forward declaration.
15736 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
15737 struct siginfo.
15738
15739 2012-03-21 Mike Frysinger <vapier@gentoo.org>
15740
15741 * .gitignore: Ignore more files.
15742
15743 2012-03-19 Pedro Alves <palves@redhat.com>
15744 Jan Kratochvil <jan.kratochvil@redhat.com>
15745
15746 * server.c (cont_thread, general_thread): Add describing comments.
15747 (start_inferior): Clear `cont_thread'.
15748 (handle_v_cont): Don't set `cont_thread' if resuming all threads
15749 of a process.
15750
15751 2012-03-15 Yao Qi <yao@codesourcery.com>
15752
15753 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
15754 handling to ...
15755 (cmd_qtdp): ... here.
15756
15757 2012-03-15 Yao Qi <yao@codesourcery.com>
15758
15759 * tracepoint.c (struct tracepoint_action_ops): New.
15760 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
15761 (m_tracepoint_action_download): New.
15762 (r_tracepoint_action_download): New.
15763 (x_tracepoint_action_download): New.
15764 (l_tracepoint_action_download): New.
15765 (add_tracepoint_action): Install `action->ops' according type.
15766 (download_tracepoint_1): Move code `download' function pointer
15767 of various tracepoint_action_ops.
15768
15769 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15770
15771 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
15772 linux_ptrace_attach_warnings.
15773
15774 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
15775
15776 * Makefile.in (linux-ptrace.o): New.
15777 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
15778 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
15779 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
15780 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
15781 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
15782 of these targets.
15783 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
15784
15785 2012-03-08 Yao Qi <yao@codesourcery.com>
15786 Pedro Alves <palves@redhat.com>
15787
15788 Fix PR server/13392.
15789 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
15790 offset of JMP insn.
15791 * tracepoint.c (remove_tracepoint): New.
15792 (cmd_qtdp): Call remove_tracepoint when failed to install.
15793
15794 2012-03-07 Pedro Alves <palves@redhat.com>
15795
15796 * linux-low.c (get_detach_signal): New.
15797 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
15798 Pass on pending signals to PTRACE_DETACH. Check the result of the
15799 ptrace call.
15800 * server.c (program_signals, program_signals_p): New.
15801 (handle_general_set): Handle QProgramSignals.
15802 * server.h (program_signals, program_signals_p): Declare.
15803
15804 2012-03-05 Pedro Alves <palves@redhat.com>
15805 Jan Kratochvil <jan.kratochvil@redhat.com>
15806
15807 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
15808 New comment why.
15809
15810 2012-03-03 Yao Qi <yao@codesourcery.com>
15811
15812 * tracepoint.c (tracepoint_look_up_symbols): Update call to
15813 agent_look_up_symbols.
15814
15815 2012-03-03 Yao Qi <yao@codesourcery.com>
15816
15817 * Makefile.in (linux-low.o): Keep dependence on agent.h.
15818 (linux-x86-low.o): Likewise.
15819 * server.h: Remove in_process_agent_loaded.
15820 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
15821 common/agent.c.
15822 Update callers.
15823
15824 2012-03-03 Yao Qi <yao@codesourcery.com>
15825
15826 * tracepoint.c (gdb_agent_capability): New global.
15827 (in_process_agent_loaded_ust): Renamed to
15828 `in_process_agent_supports_ust'.
15829 Update callers.
15830 (in_process_agent_supports_ust): Call agent_capability_check.
15831 (clear_installed_tracepoints): Assert that agent supports
15832 agent.
15833
15834 2012-03-03 Yao Qi <yao@codesourcery.com>
15835
15836 * linux-low.c (linux_supports_agent): New.
15837 (linux_target_ops): Initialize field `supports_agent' with
15838 linux_supports_agent.
15839 * target.h (struct target_ops) <supports_agent>: New.
15840 (target_supports_agent): New macro.
15841 * server.c (handle_general_set): Handle packet 'QAgent'.
15842 (handle_query): Send `QAgent+'.
15843 * Makefile.in (server.o): Depends on agent.h.
15844
15845 2012-03-03 Yao Qi <yao@codesourcery.com>
15846
15847 * Makefile.in (OBS): Add agent.o.
15848 Add new rule for agent.o.
15849 Track dependence of tracepoint.c on agent.h.
15850 * tracepoint.c (run_inferior_command_1):
15851 (run_inferior_command): Call agent_run_command.
15852 (gdb_ust_connect_sync_socket): Deleted. Move it to
15853 common/agent.c.
15854 (resume_thread, stop_thread): Likewise.
15855 (gdb_ust_socket_init): Renamed to ...
15856 (gdb_agent_socket_init): ... New.
15857 (gdb_ust_thread): Renamed to ...
15858 (gdb_agent_helper_thread): ... New.
15859 (gdb_ust_init): Move some code to ...
15860 (gdb_agent_init): ... here. New.
15861 [HAVE_UST]: Call gdb_ust_init.
15862 (initialize_tracepoint_ftlib): Call gdb_agent_init.
15863 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
15864 * config.in, configure: Regenerated.
15865
15866 2012-03-02 Pedro Alves <palves@redhat.com>
15867
15868 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
15869 * linux-low.c (struct simple_pid_list): New.
15870 (stopped_pids): New a struct simple_pid_list pointer.
15871 (add_to_pid_list, pull_pid_from_list): New.
15872 (handle_extended_wait): Don't assume the first signal new children
15873 report is SIGSTOP. Adjust call to pull_pid_from_list.
15874 (linux_wait_for_lwp): Adjust.
15875
15876 2012-03-02 Yao Qi <yao@codesourcery.com>
15877
15878 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
15879 debug log.
15880
15881 2012-03-02 Yao Qi <yao@codesourcery.com>
15882
15883 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
15884 `stop_pc' and `tpoint'. Update caller.
15885
15886 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
15887
15888 * linux-low.h (linux_target_ops): Add regset_bitmap member.
15889 * linux-low.c (use_linux_regsets): New macro.
15890 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
15891 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
15892 (linux_register_in_regsets): New function.
15893 (usr_fetch_inferior_registers): Skip registers covered by
15894 regsets.
15895 (usr_store_inferior_registers): Likewise.
15896 (usr_fetch_inferior_registers): New macro.
15897 (usr_store_inferior_registers): Likewise.
15898 (linux_fetch_registers): Handle mixed regset/non-regset targets.
15899 (linux_store_registers): Likewise.
15900 * linux-mips-low.c (init_registers_mips_dsp_linux): New
15901 prototype.
15902 (init_registers_mips64_dsp_linux): Likewise.
15903 (init_registers_mips_linux): New macro.
15904 (init_registers_mips_dsp_linux): Likewise.
15905 (mips_dsp_num_regs): Likewise.
15906 (DSP_BASE, DSP_CONTROL): New fallback macros.
15907 (mips_base_regs): New macro.
15908 (mips_regmap): Use it. Fix the size.
15909 (mips_dsp_regmap): New variable.
15910 (mips_dsp_regset_bitmap): Likewise.
15911 (mips_arch_setup): New function.
15912 (mips_cannot_fetch_register): Use the_low_target.regmap rather
15913 than mips_regmap.
15914 (mips_cannot_store_register): Likewise.
15915 (the_low_target): Update .arch_setup, .num_regs and .regmap
15916 initializers. Add .regset_bitmap initializer.
15917 * linux-arm-low.c (the_low_target): Add .regset_bitmap
15918 initializer.
15919 * linux-bfin-low.c (the_low_target): Likewise.
15920 * linux-cris-low.c (the_low_target): Likewise.
15921 * linux-crisv32-low.c (the_low_target): Likewise.
15922 * linux-ia64-low.c (the_low_target): Likewise.
15923 * linux-m32r-low.c (the_low_target): Likewise.
15924 * linux-m68k-low.c (the_low_target): Likewise.
15925 * linux-ppc-low.c (the_low_target): Likewise.
15926 * linux-s390-low.c (the_low_target): Likewise.
15927 * linux-sh-low.c (the_low_target): Likewise.
15928 * linux-sparc-low.c (the_low_target): Likewise.
15929 * linux-tic6x-low.c (the_low_target): Likewise.
15930 * linux-x86-low.c (the_low_target): Likewise.
15931 * linux-xtensa-low.c (the_low_target): Likewise.
15932 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
15933 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
15934 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
15935 srv_xmlfiles.
15936 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
15937 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
15938
15939 2012-02-29 Yao Qi <yao@codesourcery.com>
15940 Pedro Alves <palves@redhat.com>
15941
15942 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
15943 `step_over_finished' is true.
15944
15945 2012-02-27 Pedro Alves <palves@redhat.com>
15946
15947 * linux-low.c (pid_is_stopped): Delete, moved to common/.
15948 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
15949
15950 2012-02-27 Pedro Alves <palves@redhat.com>
15951
15952 PR server/9684
15953 * linux-low.c (pid_is_stopped): New.
15954 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
15955
15956 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
15957
15958 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
15959 of conditions.
15960
15961 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
15962
15963 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
15964
15965 2012-02-24 Luis Machado <lgustavo@codesourcery>
15966
15967 * server.c (handle_query): Advertise support for target-side
15968 breakpoint condition evaluation.
15969 (process_point_options): New function.
15970 (process_serial_event): When inserting a breakpoint, check for
15971 a target-side condition that should be evaluated.
15972
15973 * mem-break.c: Include regcache.h and ax.h.
15974 (point_cond_list_t): New data structure.
15975 (breakpoint) <cond_list>: New field.
15976 (find_gdb_breakpoint_at): Make non-static.
15977 (delete_gdb_breakpoint_at): Clear any target-side
15978 conditions.
15979 (clear_gdb_breakpoint_conditions): New function.
15980 (add_condition_to_breakpoint): Likewise.
15981 (add_breakpoint_condition): Likewise.
15982 (gdb_condition_true_at_breakpoint): Likewise.
15983 (gdb_breakpoint_here): Return result directly instead
15984 of going through a local variable.
15985
15986 * mem-break.h (find_gdb_breakpoint_at): New prototype.
15987 (clear_gdb_breakpoint_conditions): Likewise.
15988 (add_breakpoint_condition): Likewise.
15989 (gdb_condition_true_at_breakpoint): Likewise.
15990
15991 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
15992 (need_step_over_p): Take target-side breakpoint condition into
15993 consideration.
15994
15995 2012-02-24 Luis Machado <lgustavo@codesourcery>
15996
15997 * server.h: Include tracepoint.h.
15998 (agent_mem_read, agent_get_trace_state_variable_value,
15999 agent_set_trace_state_variable_value,
16000 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
16001 get_set_tsv_func_addr): New prototypes.
16002
16003 * ax.h: New include file.
16004 * ax.c: New source file.
16005
16006 * tracepoint.c: Include ax.h.
16007 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
16008 agent_expr, eval_result_type): Move to ax.h.
16009 (parse_agent_expr): Rename to ...
16010 (gdb_parse_agent_expr): ... this, make it non-static and move
16011 to ax.h.
16012 (unparse_agent_expr) Rename to ...
16013 (gdb_unparse_agent_expr): ... this, make it non-static and move
16014 to ax.h.
16015 (eval_agent_expr): Rename to ...
16016 (eval_tracepoint_agent_expr): ... this.
16017 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
16018 forward declarations.
16019 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
16020 (agent_get_trace_state_variable_value): New function.
16021 (agent_set_trace_state_variable_value): New function.
16022 (cmd_qtdp): Call gdb_parse_agent_expr (...).
16023 (response_tracepoint): Call gdb_unparse_agent_expr (...).
16024 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
16025 (condition_true_at_tracepoint): Likewise.
16026 (parse_agent_expr): Rename to ...
16027 (gdb_parse_agent_expr): ... this and move to ax.c.
16028 (unparse_agent_expr): Rename to ...
16029 (gdb_unparse_agent_expr): ... this and move to ax.c.
16030 (gdb_agent_op_name): Move to ax.c.
16031 (eval_agent_expr): Rename to ...
16032 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
16033 and move to ax.c.
16034 (eval_tracepoint_agent_expr): New function.
16035 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
16036 non-static.
16037 (current_insn_ptr, emit_error, struct bytecode_address): Move to
16038 ax.c.
16039 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
16040 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
16041 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
16042 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
16043 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
16044 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
16045 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
16046 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
16047 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
16048 (compile_bytecodes): Remove forward declaration.
16049 (is_goto_target): Move to ax.c.
16050 (compile_bytecodes): Move to ax.c and call
16051 agent_get_trace_state_variable_value (...) and
16052 agent_set_trace_state_variable_value (...).
16053
16054 * Makefile.in: Update ax.c and IPA dependencies.
16055
16056 2012-02-24 Pedro Alves <palves@redhat.com>
16057
16058 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
16059 (cmd_bigqtbuffer_circular): ... this. Only handle
16060 'QTBuffer:circular:'.
16061 (handle_tracepoint_general_set): Adjust.
16062
16063 2012-02-16 Yao Qi <yao@codesourcery.com>
16064
16065 * inferiors.c: Move code to ...
16066 * dll.c: .... here. New.
16067 * server.h: Declare clear_dlls.
16068 * Makefile.in (SFILES): Add dll.c.
16069 (OBS): Add dll.o
16070 (dll.o): New rule.
16071
16072 2012-02-11 Yao Qi <yao@codesourcery.com>
16073
16074 * server.c: (handle_monitor_command): Add a new parameter
16075 `own_buf'.
16076 (handle_query): Update caller.
16077
16078 2012-02-09 Joel Brobecker <brobecker@adacore.com>
16079
16080 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
16081 * configure, config.in: Regenerate.
16082 * hostio.c: Provide an alternate implementation if HAVE_READLINK
16083 is not defined.
16084
16085 2012-02-02 Pedro Alves <palves@redhat.com>
16086
16087 Try SIGKILL first, then PTRACE_KILL.
16088 * linux-low.c (linux_kill_one_lwp): New.
16089 (linux_kill_one_lwp): Rename to ...
16090 (kill_one_lwp_callback): ... this. Use the new
16091 linux_kill_one_lwp.
16092
16093 2012-02-02 Pedro Alves <palves@redhat.com>
16094
16095 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
16096 inferior.
16097
16098 2012-01-27 Pedro Alves <palves@redhat.com>
16099
16100 * linux-low.c (linux_child_pid_to_exec_file): Delete.
16101 (elf_64_file_p): Make static.
16102 (linux_pid_exe_is_elf_64_file): New.
16103 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
16104 Delete declarations.
16105 (linux_pid_exe_is_elf_64_file): Declare.
16106 * linux-x86-low.c (x86_arch_setup): Use
16107 linux_pid_exe_is_elf_64_file.
16108
16109 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
16110
16111 * linux-low.c (linux_wait_for_event_1): Rename to ...
16112 (linux_wait_for_event): ... here and merge it with former
16113 linux_wait_for_event - new variable wait_ptid, use it.
16114 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
16115
16116 2012-01-23 Pedro Alves <palves@redhat.com>
16117
16118 * server.c (main): Avoid yet another case of infinite loop while
16119 detaching/killing after a longjmp.
16120
16121 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16122
16123 Code cleanup.
16124 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
16125
16126 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
16127
16128 * hostio.c (handle_readlink): New function.
16129 (handle_vFile): Call it to handle "vFile:readlink" packets.
16130
16131 2012-01-20 Pedro Alves <palves@redhat.com>
16132 Ulrich Weigand <ulrich.weigand@linaro.org>
16133
16134 * server.c (handle_v_requests): Only support vAttach and vRun to
16135 start multiple processes when in extended protocol mode.
16136
16137 2012-01-17 Pedro Alves <palves@redhat.com>
16138
16139 * tracepoint.c (initialize_tracepoint): Use mmap instead of
16140 memalign plus mprotect to allocate the scratch buffer.
16141
16142 2012-01-13 Pedro Alves <palves@redhat.com>
16143
16144 * server.c (attach_inferior): Clear `cont_thread'.
16145
16146 2012-01-13 Pedro Alves <palves@redhat.com>
16147
16148 * server.c (main): Avoid infinite loop while detaching/killing
16149 after a longjmp.
16150
16151 2012-01-09 Doug Evans <dje@google.com>
16152
16153 * server.c (start_inferior): Set last_ptid in --wrapper case.
16154
16155 2012-01-06 Yao Qi <yao@codesourcery.com>
16156
16157 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
16158 defined.
16159 [IN_PROCESS_AGENT] (debug_agent): New global variable.
16160
16161 2012-01-04 Yao Qi <yao@codesourcery.com>
16162
16163 * tracepoint.c (cmd_qtdp): Print debug message
16164 for static tracepoint.
16165
16166 2012-01-04 Yao Qi <yao@codesourcery.com>
16167
16168 * tracepoint.c (trace_vdebug): Differentiate debug message
16169 between gdbserver and IPA.
16170
16171 2012-01-03 Yao Qi <yao@codesourcery.com>
16172
16173 * tracepoint.c (tracepoint_was_hit): Don't collect for
16174 static tracepoint.
16175
16176 2012-01-02 Joel Brobecker <brobecker@adacore.com>
16177
16178 * terminal.h: Reformat copyright header.
16179
16180 2012-01-02 Joel Brobecker <brobecker@adacore.com>
16181
16182 * server.c (gdbserver_version): Update copyright year.
16183 * gdbreplay.c (gdbreplay_version): Likewise.
16184
16185 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
16186
16187 * linux-low.c (linux_create_inferior): Put empty if clause for write.
16188
16189 Revert:
16190 2011-12-18 Hui Zhu <teawater@gmail.com>
16191 * linux-low.c (linux_create_inferior): Save return value to ret.
16192
16193 2011-12-18 Hui Zhu <teawater@gmail.com>
16194
16195 * linux-low.c (linux_create_inferior): Save return value to ret.
16196
16197 2011-12-16 Doug Evans <dje@google.com>
16198
16199 * linux-low.c (linux_create_inferior): If stdio connection,
16200 redirect stdin from /dev/null, stdout to stderr.
16201 * remote-utils.c (remote_is_stdio): New static global.
16202 (remote_connection_is_stdio): New function.
16203 (remote_prepare): Handle stdio connection.
16204 (remote_open): Ditto.
16205 (remote_close): Don't close stdin for stdio connections.
16206 (read_prim,write_prim): New functions. Replace all calls to
16207 read/write to these.
16208 * server.c (main): Watch for "-" argument. Move call to
16209 remote_prepare before start_inferior.
16210 * server.h (STDIO_CONNECTION_NAME): New macro.
16211 (remote_connection_is_stdio): Declare.
16212
16213 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
16214 in debugging output.
16215
16216 2011-12-15 Yao Qi <yao@codesourcery.com>
16217
16218 * tracepoint.c: Include sys/syscall.h.
16219 (gdb_ust_thread): Remove preprocessor conditional.
16220
16221 2011-12-14 Pedro Alves <pedro@codesourcery.com>
16222
16223 * linux-low.c (linux_detach_one_lwp): Call
16224 the_low_target.prepare_to_resume before detaching.
16225
16226 2011-12-14 Yao Qi <yao@codesourcery.com>
16227
16228 * tracepoint.c (gdb_ust_thread): Don't ignore return value
16229 of write.
16230
16231 2011-12-14 Yao Qi <yao@codesourcery.com>
16232
16233 * i386-low.c (i386_low_stopped_data_address): Initialize local
16234 variable `control'.
16235
16236 2011-12-13 Pedro Alves <pedro@codesourcery.com>
16237
16238 PR remote/13492
16239
16240 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
16241 DR_CONTROL unless necessary. Extend comments.
16242 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
16243 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
16244
16245 2011-12-13 Yao Qi <yao@codesourcery.com>
16246
16247 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
16248 macros.
16249 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
16250
16251 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
16252
16253 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
16254 Print new debug message for such case.
16255
16256 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
16257
16258 Fix overlapping memcpy.
16259 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
16260 the read_inferior_memory transfer.
16261 (delete_fast_tracepoint_jump): New variable buf. Use it for the
16262 write_inferior_memory transfer.
16263 (set_fast_tracepoint_jump): New variable buf. Use it for the
16264 read_inferior_memory and write_inferior_memory transfers.
16265 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
16266 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
16267 Use it for the write_inferior_memory transfer.
16268 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
16269 buffers.
16270
16271 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
16272
16273 * linux-low.c (fetch_register, store_register): Make code
16274 consistent, fix formatting.
16275
16276 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
16277
16278 * linux-low.c (usr_store_inferior_registers): Factor out code
16279 to handle individual registers into...
16280 (store_register): ... this new function.
16281
16282 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
16283
16284 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
16285 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
16286 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
16287 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
16288 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
16289 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
16290 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
16291 (srv_xmlfiles): Add new XML files.
16292
16293 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
16294 and <sys/uio.h>.
16295 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
16296 (init_registers_s390_linux32v1): Add prototype.
16297 (init_registers_s390_linux32v2): Likewise.
16298 (init_registers_s390_linux64v1): Likewise.
16299 (init_registers_s390_linux64v2): Likewise.
16300 (init_registers_s390x_linux64v1): Likewise.
16301 (init_registers_s390x_linux64v2): Likewise.
16302 (s390_num_regs): Increment to 52.
16303 (s390_regmap): Add orig_r2 register.
16304 (s390_num_regs_3264): Increment to 68.
16305 (s390_regmap_3264): Add orig_r2 register.
16306 (s390_collect_ptrace_register): Handle orig_r2 register.
16307 (s390_supply_ptrace_register): Likewise.
16308 (s390_fill_last_break): New function.
16309 (s390_store_last_break): Likewise.
16310 (s390_fill_system_call): New function.
16311 (s390_store_system_call): Likewise.
16312 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
16313 register sets.
16314 (s390_check_regset): New function.
16315 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
16316 NT_S390_SYSTEM_CALL regsets and use appropriate description.
16317 Update target_regsets for available register sets.
16318
16319 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
16320 Jan Kratochvil <jan.kratochvil@redhat.com>
16321
16322 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
16323 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
16324 New.
16325 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
16326 * linux-low.h (struct process_info_private): New member r_debug.
16327 * server.c (handle_qxfer_libraries): Call
16328 the_target->qxfer_libraries_svr4.
16329 (handle_qxfer_libraries_svr4): New function.
16330 (qxfer_packets): New entry "libraries-svr4".
16331 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
16332 * target.h (struct target_ops): New member qxfer_libraries_svr4.
16333 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
16334 PACKET_qXfer_libraries_svr4.
16335
16336 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
16337
16338 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
16339 PSW address/mask between 8-byte and 16-byte formats.
16340 (s390_supply_ptrace_register): Likewise.
16341 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
16342 basic addressing mode bit.
16343
16344 2011-11-24 Stan Shebs <stan@codesourcery.com>
16345
16346 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
16347
16348 2011-11-17 Stan Shebs <stan@codesourcery.com>
16349
16350 * tracepoint.c (struct tracepoint): New field traceframe_usage.
16351 (tracing_start_time): New global.
16352 (tracing_stop_time): New global.
16353 (tracing_user_name): New global.
16354 (tracing_notes): New global.
16355 (tracing_stop_note): New global.
16356 (cmd_qtstart): Set traceframe_usage, start_time.
16357 (stop_tracing): Set stop_time.
16358 (cmd_qtstatus): Report additional status.
16359 (cmd_qtp): New function.
16360 (handle_tracepoint_query): Call it.
16361 (cmd_qtnotes): New function.
16362 (handle_tracepoint_general_set): Call it.
16363 (get_timestamp): Rename from tsv_get_timestamp.
16364
16365 2011-11-14 Stan Shebs <stan@codesourcery.com>
16366 Kwok Cheung Yeung <kcy@codesourcery.com>
16367
16368 * linux-x86-low.c (small_jump_insn): New.
16369 (i386_install_fast_tracepoint_jump_pad): Add arguments for
16370 trampoline and error message, build a trampoline and issue a small
16371 jump instruction to it.
16372 (x86_install_fast_tracepoint_jump_pad): Add arguments for
16373 trampoline and error message.
16374 (x86_get_min_fast_tracepoint_insn_len): New.
16375 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
16376 * linux-low.h (struct linux_target_ops): Add arguments to
16377 install_fast_tracepoint_jump_pad operation, add new operation.
16378 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
16379 arguments.
16380 (linux_get_min_fast_tracepoint_insn_len): New function.
16381 (linux_target_op): Add new operation.
16382 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
16383 (gdb_trampoline_buffer_end): Ditto.
16384 (gdb_trampoline_buffer_error): Ditto.
16385 (struct ipa_sym_addresses): Add fields for new IPA variables.
16386 (symbol_list): Add entries for new IPA variables.
16387 (struct tracepoint): Add fields to hold the address range of the
16388 trampoline used by the tracepoint.
16389 (trampoline_buffer_head): New static variable.
16390 (trampoline_buffer_tail): Ditto.
16391 (claim_trampoline_space): New function.
16392 (have_fast_tracepoint_trampoline_buffer): New function.
16393 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
16394 structure.
16395 (install_fast_tracepoint): Ditto, also add error buffer argument.
16396 (cmd_qtminftpilen): New function.
16397 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
16398 (fast_tracepoint_from_trampoline_address): New function.
16399 (fast_tracepoint_collecting): Handle trampoline as part of jump
16400 pad space.
16401 (set_trampoline_buffer_space): New function.
16402 (initialize_tracepoint): Initialize new IPA variables.
16403 * target.h (struct target_ops): Add arguments to
16404 install_fast_tracepoint_jump_pad operation, add new
16405 get_min_fast_tracepoint_insn_len operation.
16406 (target_get_min_fast_tracepoint_insn_len): New.
16407 (install_fast_tracepoint_jump_pad): Add arguments.
16408 * server.h (IPA_BUFSIZ): Define.
16409 * linux-i386-ipa.c: Include extra header files.
16410 (initialize_fast_tracepoint_trampoline_buffer): New function.
16411 (initialize_low_tracepoint): Call it.
16412 * server.h (set_trampoline_buffer_space): Declare.
16413 (claim_trampoline_space): Ditto.
16414 (have_fast_tracepoint_trampoline_buffer): Ditto.
16415
16416 2011-11-14 Yao Qi <yao@codesourcery.com>
16417
16418 * server.c (handle_query): Handle InstallInTrace for qSupported.
16419 * tracepoint.c (add_tracepoint): Sort list.
16420 (install_tracepoint, download_tracepoint): New.
16421 (cmd_qtdp): Call them to install and download tracepoints.
16422 (sort_tracepoints): Removed.
16423 (cmd_qtstart): Update.
16424
16425 2011-11-14 Yao Qi <yao@codesourcery.com>
16426
16427 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
16428 * mem-break.h: Declare.
16429 * tracepoint.c (cmd_qtstart): Move some code to ...
16430 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
16431 New.
16432 (download_tracepoints): Move some code to ...
16433 (download_tracepoint_1): ... here. New.
16434
16435 2011-11-08 Yao Qi <yao@codesourcery.com>
16436
16437 * remote-utils.c (relocate_instruction): A comment fix.
16438
16439 2011-11-07 Joel Brobecker <brobecker@adacore.com>
16440
16441 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
16442 (i386_dr_low_get_control, i386_dr_low_get_status): Use
16443 dr_status_mirror and dr_control_mirror from debug_reg_state.
16444 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
16445 (i386_initial_stuff): Remove use of deleted globals.
16446 (i386_get_thread_context, i386_set_thread_context,
16447 i386_thread_added): Use dr_status_mirror and dr_control_mirror
16448 from debug_reg_state.
16449
16450 2011-11-05 Yao Qi <yao@codesourcery.com>
16451
16452 * tracepoint.c (gdb_collect): Loop over tracepoints of same
16453 address as TPOINT's.
16454
16455 2011-11-02 Stan Shebs <stan@codesourcery.com>
16456
16457 * tracepoint.c (agent_mem_read_string): New function.
16458 (eval_agent_expr): Call it for tracenz.
16459 * server.c (handle_query): Report support for tracenz.
16460
16461 2011-11-02 Yao Qi <yao@codesourcery.com>
16462
16463 * tracepoint.c (cmd_qtstart): Remove unused local variables.
16464
16465 2011-11-02 Yao Qi <yao@codesourcery.com>
16466
16467 * target.h: Fix a typo in comment.
16468
16469 2011-10-31 Pedro Alves <pedro@codesourcery.com>
16470
16471 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
16472 clobber the breakpoints' shadows with fast tracepoint jumps.
16473 * mem-break.h (check_mem_write): Add `myaddr' parameter.
16474 * target.c (write_inferior_memory): Also pass MYADDR down to
16475 check_mem_write.
16476
16477 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
16478
16479 * configure.ac: Check support for personality routine.
16480 * configure: Regenerate.
16481 * config.in: Likewise.
16482 * linux-low.c: Include <sys/personality.h>.
16483 Define ADDR_NO_RANDOMIZE if necessary.
16484 (linux_create_inferior): Disable address space randomization when
16485 forking inferior, if requested.
16486 (linux_supports_disable_randomization): New function.
16487 (linux_target_ops): Install it.
16488 * server.h (disable_randomization): Declare.
16489 * server.c (disable_randomization): New global variable.
16490 (handle_general_set): Handle QDisableRandomization.
16491 (handle_query): Likewise for qSupported.
16492 (main): Support --disable-randomization and --no-disable-randomization
16493 command line arguments.
16494 * target.h (struct target_ops): Add supports_disable_randomization.
16495 (target_supports_disable_randomization): New macro.
16496
16497 2011-09-29 Mike Frysinger <vapier@gentoo.org>
16498
16499 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
16500 ifdef check.
16501 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
16502 [!PT_GETDSBT] (target_loadmap): New definition.
16503 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
16504 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
16505 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
16506 and PT_GETDSBT to LINUX_LOADMAP.
16507 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
16508 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
16509
16510 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
16511
16512 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
16513 (arm_linux_hwbp_cap): New static variable.
16514 (arm_linux_get_hwbp_cap): Replace by ...
16515 (arm_linux_init_hwbp_cap): ... this new function.
16516 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
16517 (arm_linux_get_hw_watchpoint_count): Likewise.
16518 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16519 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
16520 (arm_prepare_to_resume): Use perror_with_name instead of error.
16521
16522 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
16523
16524 * linux-arm-low.c: Include <signal.h>.
16525 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
16526 (struct arm_linux_hwbp_cap): New data type.
16527 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
16528 (struct arm_linux_hw_breakpoint): New data type.
16529 (MAX_BPTS, MAX_WPTS): Define.
16530 (struct arch_process_info, struct arch_lwp_info): New data types.
16531 (arm_linux_get_hwbp_cap): New function.
16532 (arm_linux_get_hw_breakpoint_count): Likewise.
16533 (arm_linux_get_hw_watchpoint_count): Likewise.
16534 (arm_linux_get_hw_watchpoint_max_length): Likewise.
16535 (arm_hwbp_control_initialize): Likewise.
16536 (arm_hwbp_control_is_enabled): Likewise.
16537 (arm_hwbp_control_is_initialized): Likewise.
16538 (arm_hwbp_control_disable): Likewise.
16539 (arm_linux_hw_breakpoint_equal): Likewise.
16540 (arm_linux_hw_point_initialize): Likewise.
16541 (struct update_registers_data): New data structure.
16542 (update_registers_callback: New function.
16543 (arm_insert_point): Likewise.
16544 (arm_remove_point): Likewise.
16545 (arm_stopped_by_watchpoint): Likewise.
16546 (arm_stopped_data_address): Likewise.
16547 (arm_new_process): Likewise.
16548 (arm_new_thread): Likewise.
16549 (arm_prepare_to_resume): Likewise.
16550 (the_low_target): Register arm_insert_point, arm_remove_point,
16551 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
16552 arm_new_thread, and arm_prepare_to_resume.
16553
16554 2011-09-15 Stan Shebs <stan@codesourcery.com>
16555
16556 * server.h (struct emit_ops): Add compare-goto fields.
16557 * tracepoint.c (gdb_agent_op_sizes): New table.
16558 (emit_eq_goto): New function.
16559 (emit_ne_goto): New function.
16560 (emit_lt_goto): New function.
16561 (emit_le_goto): New function.
16562 (emit_gt_goto): New function.
16563 (emit_ge_goto): New function.
16564 (is_goto_target): New function.
16565 (compile_bytecodes): Recognize special cases of compare-goto
16566 combinations and call specialized emitters for them.
16567 * linux-x86-low.c (amd64_emit_eq_goto): New function.
16568 (amd64_emit_ne_goto): New function.
16569 (amd64_emit_lt_goto): New function.
16570 (amd64_emit_le_goto): New function.
16571 (amd64_emit_gt_goto): New function.
16572 (amd64_emit_ge_goto): New function.
16573 (amd64_emit_ops): Add the new functions.
16574 (i386_emit_eq_goto): New function.
16575 (i386_emit_ne_goto): New function.
16576 (i386_emit_lt_goto): New function.
16577 (i386_emit_le_goto): New function.
16578 (i386_emit_gt_goto): New function.
16579 (i386_emit_ge_goto): New function.
16580 (i386_emit_ops): Add the new functions.
16581
16582 2011-09-08 Stan Shebs <stan@codesourcery.com>
16583
16584 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
16585 (i386_emit_epilogue): Restore %ebx.
16586
16587 2011-08-31 Jie Zhang <jzhang918@gmail.com>
16588
16589 * server.c (step_thread): Remove definition.
16590 (process_serial_event): Don't handle Hs.
16591 * server.h (step_thread): Remove declaration.
16592 * target.c (set_desired_inferior): Remove use of step_thread.
16593
16594 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16595
16596 * linux-low.c: Include linux-procfs.h.
16597 (linux_attach_lwp_1): Update comments.
16598 (linux_attach): Scan for existing threads when attaching to a
16599 process that is the tgid.
16600 * Makefile.in: Update dependencies.
16601
16602 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
16603
16604 * configure.srv: Add linux-procfs.o dependencies.
16605
16606 2011-08-14 Yao Qi <yao@codesourcery.com>
16607
16608 * target.h (struct target_ops): Fix indent.
16609 * win32-low.c (win32_target_ops): Fix comment.
16610
16611 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
16612 Yao Qi <yao@codesourcery.com>
16613
16614 * Makefile.in (clean): Remove tic6x-*.c files.
16615 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
16616 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
16617 (tic6x-c64xp-linux.c): Likewise.
16618 * configure.srv: Add support for tic6x-*-uclinux.
16619 * linux-tic6x-low.c: New.
16620 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
16621
16622 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
16623 Yao Qi <yao@codesourcery.com>
16624
16625 * target.h (struct target_ops): Add read_loadmap.
16626 * linux-low.c (struct target_loadseg): New type.
16627 (struct target_loadmap): New type.
16628 (linux_read_loadmap): New function.
16629 (linux_target_ops): Add linux_read_loadmap.
16630 * server.c (handle_query): Support qXfer:fdpic:read packet.
16631 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
16632 to NULL.
16633
16634 2011-08-05 Eli Zaretskii <eliz@gnu.org>
16635
16636 * win32-low.c: Include <stdint.h>.
16637
16638 2011-07-22 Pedro Alves <pedro@codesourcery.com>
16639
16640 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
16641 to the inferior here.
16642 (i386_remove_aligned_watchpoint): Ditto.
16643 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
16644 fit part of the watchpoint in the debug registers.
16645 (i386_update_inferior_debug_regs): New.
16646 (i386_low_insert_watchpoint): Work on a local mirror of the debug
16647 registers, and only update the inferior on success.
16648 (i386_low_remove_watchpoint): Ditto.
16649
16650 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
16651
16652 * linux-low.c (compare_ints, unique, list_threads, show_process,
16653 linux_core_of_thread): Delete.
16654 (linux_target_ops): Change linux_core_of_thread to
16655 linux_common_core_of_thread.
16656 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
16657 * utils.c (malloc_failure): Change type of argument.
16658 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
16659 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
16660 common/linux-osdata.c, common/ptid.c and common/buffer.c.
16661 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
16662 (IPA_OBJS): Add common-utils-ipa.o.
16663 (ptid_h, linux_osdata_h): New macros.
16664 (server_h): Add common/common-utils.h, common/xml-utils.h,
16665 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
16666 common/ptid.h.
16667 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
16668 ptid.o, buffer.o): New rules.
16669 (linux-low.o): Add common/linux-osdata.h as a dependency.
16670 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
16671 * configure.ac: Add AC_HEADER_DIRENT check.
16672 * config.in: Regenerate.
16673 * configure: Regenerate.
16674 * remote-utils.c (xml_escape_text): Delete.
16675 (buffer_grow, buffer_free, buffer_init, buffer_finish,
16676 buffer_xml_printf): Move to common/buffer.c.
16677 * server.c (main): Remove call to initialize_inferiors.
16678 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
16679 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
16680 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
16681 internal_error, gdb_assert, gdb_assert_fail): Delete.
16682 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
16683 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
16684 common/buffer.h.
16685 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
16686 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
16687 initialize_inferiors): Delete.
16688
16689 2011-07-20 Pedro Alves <pedro@codesourcery.com>
16690
16691 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
16692 symbol error.
16693
16694 2011-05-31 Pedro Alves <pedro@codesourcery.com>
16695
16696 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
16697 assertion.
16698 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
16699
16700 2011-05-26 Yao Qi <yao@codesourcery.com>
16701
16702 * Makefile.in (thread-db.o): Track dependence to
16703 common/gdb_thread_db.h.
16704 * thread-db.c: include gdb_thread_db.h from right place.
16705
16706 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
16707
16708 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
16709 __FILE__ and __LINE__ to internal_error.
16710
16711 2011-05-13 Doug Evans <dje@google.com>
16712
16713 * thread-db.c (try_thread_db_load_from_sdir): New function.
16714 (try_thread_db_load_from_dir): New function.
16715 (thread_db_load_search): Handle $sdir, ignore $pdir.
16716 Remove trying of system directories if search of
16717 libthread-db-search-path fails, that is now done via $sdir.
16718
16719 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
16720
16721 * server.c (handle_query): Add EnableDisableTracepoints to the list
16722 of supported features.
16723 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
16724 tracepoints.
16725 (cmd_qtenable_disable): New.
16726 (cmd_qtstart): Install tracepoints even if disabled.
16727 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
16728 receiving a QTEnable or QTDisable packet.
16729 (gdb_collect): Skip data collection if fast tracepoint is disabled.
16730 (ust_marker_to_static_tracepoint): Do not ignore disabled static
16731 tracepoints.
16732 (gdb_probe): Skip data collection if static tracepoint is disabled.
16733
16734 2011-05-10 Doug Evans <dje@google.com>
16735
16736 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
16737
16738 2011-05-04 Doug Evans <dje@google.com>
16739
16740 * linux-low.c (linux_join): Skip process lookup.
16741 * spu-low.c (spu_join): Ditto.
16742 * server.c (join_inferiors_callback): Delete.
16743 (process_serial_event): For 'D' packet (detach) call join_inferior
16744 directly.
16745
16746 2011-05-04 Joseph Myers <joseph@codesourcery.com>
16747
16748 * README: Don't mention xscale*-*-linux*.
16749 * configure.srv (xscale*-*-linux*): Don't handle target.
16750
16751 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
16752
16753 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
16754 casting pointers.
16755 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
16756 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
16757 (i386_emit_void_call_2): Likewise.
16758
16759 2011-04-26 Yao Qi <yao@codesourcery.com>
16760
16761 * linux-low.c: Move common macros to linux-ptrace.h.
16762 Include linux-ptrace.h.
16763 * Makefile.in (linux_ptrace_h): New.
16764 (linux-low.o): Depends on linux-ptrace.h.
16765
16766 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
16767
16768 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
16769 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
16770 (remote_prepare): New function with most of the TCP code from ...
16771 (remote_open): ... here. Detect PORT here unconditionally. Move also
16772 setting transport_is_reliable.
16773 * server.c (run_once): New variable.
16774 (gdbserver_usage): Document it.
16775 (main): Set run_once for `--once'. Call remote_prepare. Exit after
16776 the first run if RUN_ONCE.
16777 * server.h (run_once, remote_prepare): New declarations.
16778
16779 2011-04-19 Tom Tromey <tromey@redhat.com>
16780
16781 * win32-low.c (handle_load_dll): Remove duplicate "the".
16782
16783 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
16784
16785 Remove support for old Cygwin 1.5 versions.
16786 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
16787 function to avoid warning.
16788 (win32_add_one_solib): Use cygwin_conv_path function to avoid
16789 warning.
16790
16791 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
16792
16793 * gdbserver/server.h (Macro _): Define it if not available.
16794
16795 2011-03-14 Michael Snyder <msnyder@vmware.com>
16796
16797 * hostio.c (handle_close): Remove unnecessary null test.
16798
16799 2011-03-10 Joel Brobecker <brobecker@adacore.com>
16800
16801 * Makefile.in (maintainer-clean realclean distclean): Remove
16802 "make ... subdir_do" command.
16803
16804 2011-03-10 Michael Snyder <msnyder@vmware.com>
16805
16806 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
16807
16808 * server.c (handle_v_run): Free alloced buffer on early return.
16809
16810 2011-03-09 Yao Qi <yao@codesourcery.com>
16811
16812 Revert:
16813 2011-03-04 Yao Qi <yao@codesourcery.com>
16814
16815 * Makefile.in: Remove GNU make feature --directory.
16816
16817 2011-03-05 Yao Qi <yao@codesourcery.com>
16818
16819 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16820 (subdir_do): New make target. Copied from gdb/Makefile.
16821 (maintainer-clean, realclean, distclean, clean): Call corresponding
16822 make targets in common/Makefile.
16823
16824 2011-02-11 Yao Qi <yao@codesourcery.com>
16825
16826 * configure.ac: Call AC_PROG_RANLIB.
16827 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16828 * configure: Regenerate.
16829
16830 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
16831
16832 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
16833
16834 2011-03-06 Yao Qi <yao@codesourcery.com>
16835
16836 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
16837
16838 2011-03-05 Yao Qi <yao@codesourcery.com>
16839
16840 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
16841 (subdir_do): New make target. Copied from gdb/Makefile.
16842 (maintainer-clean, realclean, distclean, clean): Call corresponding
16843 make targets in common/Makefile.
16844
16845 2011-03-04 Yao Qi <yao@codesourcery.com>
16846
16847 * Makefile.in: Remove GNU make feature --directory.
16848
16849 2011-03-04 Michael Snyder <msnyder@vmware.com>
16850
16851 * server.c (queue_stop_reply): Call xmalloc not malloc.
16852
16853 2011-03-02 Michael Snyder <msnyder@vmware.com>
16854
16855 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
16856
16857 2011-02-28 Michael Snyder <msnyder@vmware.com>
16858
16859 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
16860 (cmd_qtframe): Ditto.
16861 (cmd_qtbuffer): Ditto.
16862 (cmd_bigqtbuffer): Ditto.
16863
16864 * utils.c (decimal2str): Initialize 'width' to nine, then
16865 don't mess with it.
16866
16867 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
16868
16869 * hostio.c (require_data): Free *data, not data.
16870
16871 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
16872
16873 * hostio.c (require_data): Use free, not xfree.
16874
16875 2011-02-27 Michael Snyder <msnyder@vmware.com>
16876
16877 * server.c (handle_query): Discard unused value.
16878
16879 * hostio.c (require_data): Free malloc memory before returning
16880 error.
16881
16882 2011-02-26 Michael Snyder <msnyder@vmware.com>
16883
16884 * linux-low.c (list_threads): Call closedir for dirent.
16885
16886 2011-02-27 Michael Snyder <msnyder@vmware.com>
16887
16888 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
16889 a case statement falls through.
16890
16891 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
16892
16893 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
16894 in comparison.
16895
16896 2011-02-26 Michael Snyder <msnyder@vmware.com>
16897
16898 * utils.c (decimal2str): Eliminate dead code and dead param.
16899 (pulongest): Drop dead param from call to decimal2str.
16900 (plongest): Ditto.
16901
16902 2011-02-24 Joel Brobecker <brobecker@adacore.com>
16903
16904 Revert the following patch (not approved yet):
16905 2011-02-21 Hui Zhu <teawater@gmail.com>
16906 * tracepoint.c (tp_printf): New function.
16907 (eval_agent_expr): Handle gdb_agent_op_printf.
16908
16909 2011-02-21 Hui Zhu <teawater@gmail.com>
16910
16911 * tracepoint.c (tp_printf): New function.
16912 (eval_agent_expr): Handle gdb_agent_op_printf.
16913
16914 2011-02-18 Tom Tromey <tromey@redhat.com>
16915
16916 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
16917 (tracepoint.o): Likewise.
16918 * tracepoint.c (enum gdb_agent_op): Use ax.def.
16919 (gdb_agent_op_names): Likewise.
16920
16921 2011-02-18 Tom Tromey <tromey@redhat.com>
16922
16923 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
16924 gdb_agent_op_rot>: New constants.
16925 (gdb_agent_op_names): Add pick and roll.
16926 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
16927 cases.
16928
16929 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
16930
16931 * aclocal.m4: Regenerated with aclocal-1.11.1.
16932
16933 2011-02-14 Pedro Alves <pedro@codesourcery.com>
16934
16935 * server.c (handle_qxfer_traceframe_info): New.
16936 (qxfer_packets): Register "traceframe-info".
16937 (handle_query): Report support for qXfer:traceframe-info:read+.
16938 * tracepoint.c (match_blocktype): New.
16939 (traceframe_find_block_type): Rename to ...
16940 (traceframe_walk_blocks): ... this. Add callback filter argument,
16941 and use it.
16942 (traceframe_find_block_type): New, reimplemented on top of
16943 traceframe_walk_blocks.
16944 (build_traceframe_info_xml): New.
16945 (traceframe_read_info): New.
16946 * server.h (traceframe_read_info): Declare.
16947
16948 2011-02-11 Yao Qi <yao@codesourcery.com>
16949
16950 * configure.ac: Call AC_PROG_RANLIB.
16951 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
16952 * configure: Regenerate.
16953
16954 2011-02-07 Pedro Alves <pedro@codesourcery.com>
16955
16956 * server.c (gdb_read_memory): Change return semantics to allow
16957 partial transfers.
16958 (handle_search_memory_1): Adjust.
16959 (process_serial_event) <'m' packet>: Handle partial transfers.
16960 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
16961
16962 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16963
16964 * regcache.c (init_register_cache): Initialize
16965 regcache->register_status.
16966 (free_register_cache): Release regcache->register_status.
16967 (regcache_cpy): Copy register_status.
16968 (registers_to_string): Print 'x's for unavailable registers.
16969 (supply_register): Mark the register's status valid or
16970 unavailable, depending on whether a buffer was passed in or not.
16971 (supply_register_zeroed): New.
16972 (supply_regblock): Mark the registers' status valid or
16973 unavailable, depending on whether a buffer was passed in or not.
16974 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
16975 (struct regcache): New `register_status' field.
16976 (supply_register_zeroed): Declare.
16977 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
16978 supply_register_zeroed, rather than passing a NULL buffer to
16979 supply_register.
16980 * tracepoint.c (fetch_traceframe_registers): Update comment.
16981
16982 2011-01-28 Pedro Alves <pedro@codesourcery.com>
16983
16984 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
16985 buffer explicit.
16986
16987 2011-01-25 Pedro Alves <pedro@codesourcery.com>
16988
16989 * server.h (decode_xfer_write): Change prototype.
16990 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
16991 and don't extract the annex here.
16992 * server.c (decode_xfer_read): Remove `annex' parameter,
16993 and don't extract the annex here.
16994 (decode_xfer): New.
16995 (struct qxfer): New.
16996 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
16997 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
16998 (handle_qxfer_statictrace): New functions, abstracted out from
16999 handle_query, and made to use the struct qxfer interface.
17000 (handle_threads_qxfer_proper): Rename to ...
17001 (handle_qxfer_threads_proper): ... this.
17002 (handle_threads_qxfer): Rename to ...
17003 (handle_qxfer_threads): ... this. Adjust.
17004 (qxfer_packets): New array.
17005 (handle_qxfer): New function.
17006 (handle_query): Use handle_qxfer.
17007
17008 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
17009
17010 * gdbreplay.c: Shorten lines of >= 80 columns.
17011 * linux-low.c: Ditto.
17012 * linux-ppc-low.c: Ditto.
17013 * linux-s390-low.c: Ditto.
17014 * linux-sparc-low.c: Ditto.
17015 * linux-x86-low.c: Ditto.
17016 * linux-xtensa-low.c: Ditto.
17017 * mem-break.c: Ditto.
17018 * nto-low.c: Ditto.
17019 * regcache.h: Ditto.
17020 * remote-utils.c: Ditto.
17021 * server.c: Ditto.
17022 * server.h: Ditto.
17023 * thread-db.c: Ditto.
17024 * tracepoint.c: Ditto.
17025 * utils.c: Ditto.
17026 * win32-low.h: Ditto.
17027
17028 2011-01-05 Joel Brobecker <brobecker@adacore.com>
17029
17030 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
17031 update.
17032
17033 2011-01-01 Joel Brobecker <brobecker@adacore.com>
17034
17035 * server.c (gdbserver_version): Update copyright year in version
17036 output.
17037 * gdbreplay.c (gdbreplay_version): Ditto.
17038
17039 2010-12-29 Jie Zhang <jie.zhang@analog.com>
17040
17041 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
17042 * linux-bfin-low.c: New file.
17043 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
17044 PT_DATA_ADDR for BFIN targets.
17045 * Makefile.in (SFILES): Add linux-bfin-low.c.
17046 (clean): Remove reg-bfin.c.
17047 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
17048 * README: Mention supported Blackfin targets.
17049
17050 2010-12-23 Mike Frysinger <vapier@gentoo.org>
17051
17052 * .gitignore: New file.
17053
17054 2010-11-16 Mike Frysinger <vapier@gentoo.org>
17055
17056 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
17057
17058 2010-10-22 Jie Zhang <jie@codesourcery.com>
17059
17060 * Makefile.in: Add FLAGS_TO_PASS variable.
17061 (install): Remove dependency of install-only and recursively
17062 invoke make for install-only.
17063
17064 2010-10-04 Doug Evans <dje@google.com>
17065
17066 * Makefile.in (uninstall): Use $(DESTDIR).
17067
17068 2010-09-24 Pedro Alves <pedro@codesourcery.com>
17069
17070 PR gdb/11842
17071
17072 * linux-x86-low.c (compat_siginfo_from_siginfo)
17073 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
17074 si_code is < 0. Check for si_code == SI_TIMER before checking for
17075 si_code < 0.
17076
17077 2010-09-13 Joel Brobecker <brobecker@adacore.com>
17078
17079 * lynx-i386-low.c: New file.
17080 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
17081
17082 2010-09-13 Joel Brobecker <brobecker@adacore.com>
17083
17084 * lynx-low.c (ptrace_request_to_str): Remove handling for
17085 request values that have been removed in LynxOS 5.x.
17086
17087 2010-09-13 Joel Brobecker <brobecker@adacore.com>
17088
17089 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
17090 <ptrace.h>
17091
17092 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
17093
17094 * configure.ac: Add --enable-inprocess-agent option.
17095 * configure: Rebuilt.
17096
17097 2010-09-06 Yao Qi <yao@codesourcery.com>
17098
17099 * linux-low.c (linux_kill): Remove unused variable.
17100 (linux_stabilize_threads): Likewise.
17101 * server.c (start_inferior): Likewise.
17102 (queue_stop_reply_callback): Likewise.
17103 * tracepoint.c (do_action_at_tracepoint): Likewise.
17104
17105 2010-09-06 Yao Qi <yao@codesourcery.com>
17106
17107 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
17108 on return.
17109
17110 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
17111
17112 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
17113
17114 2010-09-06 Pedro Alves <pedro@codesourcery.com>
17115
17116 * Makefile.in (install-only): Replace $IPA_DEPFILES with
17117 "$(IPA_DEPFILES)".
17118
17119 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17120
17121 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
17122 gdbserver/lynx-ppc-low.c: New files.
17123 * Makefile.in (lynx_low_h): New variable.
17124 (lynx-low.o, lynx-ppc-low.o): New rules.
17125 * configure.ac: On LynxOS, link with -lnetinet.
17126 * configure.srv: Add handling of powerpc-*-lynxos* targets.
17127 * configure: regenerate.
17128
17129 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17130
17131 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
17132 * configure.ac: Add check for vasprintf and vsnprintf.
17133 * configure, config.in: Regenerate.
17134 * server.h (vasprintf, vsnprintf): Add conditional declarations.
17135
17136 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17137
17138 * gdbreplay.c: Move include of alloca.h up, next to include of
17139 malloc.h.
17140 * server.h: Add include of malloc.h.
17141 * mem-break.c: Remove include of malloc.h.
17142 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
17143
17144 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17145
17146 * Makefile.in (memmem.o): Build with -Wno-error.
17147
17148 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17149
17150 * utils.c (xsnprintf): Make non-static.
17151 * server.h: Add xsnprintf declaration.
17152 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
17153 replace calls to snprintf by calls to xsnprintf throughout.
17154
17155 2010-09-01 Joel Brobecker <brobecker@adacore.com>
17156
17157 * configure.ac: Add configure check for alloca.
17158 * configure, config.in: Regenerate.
17159 * server.h: Include alloca.h if it exists.
17160 * gdbreplay.c: Include alloca.h if it exists.
17161
17162 2010-08-28 Pedro Alves <pedro@codesourcery.com>
17163
17164 * linux-low.c (__SIGRTMIN): Define if not already defined.
17165 (linux_create_inferior): Check for __ANDROID__ rather than
17166 __SIGRTMIN.
17167 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
17168 are already deferred.
17169 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
17170 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
17171 stopped and already has a pending signal to report.
17172 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
17173 a pending signal to report or is moving out of a jump pad.
17174 (linux_init_signals): Check for __ANDROID__ rather than
17175 __SIGRTMIN.
17176
17177 2010-08-28 Pedro Alves <pedro@codesourcery.com>
17178
17179 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
17180 debug_threads check. Avoid a linear search when not doing debug
17181 output.
17182
17183 2010-08-27 Pedro Alves <pedro@codesourcery.com>
17184
17185 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
17186 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
17187 (struct file_handler) <fd>: Change type to gdb_fildes_t.
17188 (process_event): Change local fd's type to gdb_fildes_t.
17189 (create_file_handler): Adjust prototype.
17190 (delete_file_handler): Adjust prototype.
17191 (handle_file_event): Adjust prototype. Use pfildes.
17192 (create_file_event): Adjsut prototype.
17193 * remote-utils.c (remote_desc, listen_desc): Change type to
17194 gdb_fildes_t.
17195 * server.h: New gdb_fildes_t typedef.
17196 [USE_WIN32API]: Include winsock2.h.
17197 (delete_file_handler, add_file_handler): Adjust prototypes.
17198 (pfildes): Declare.
17199 * utils.c (pfildes): New.
17200
17201 2010-08-27 Pedro Alves <pedro@codesourcery.com>
17202
17203 * configure.ac (build_warnings): Add -Wno-char-subscripts.
17204 * configure: Regenerate.
17205
17206 2010-08-27 Pedro Alves <pedro@codesourcery.com>
17207
17208 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
17209 (linux_done_accessing_memory): ... this.
17210 (linux_target_ops): Adjust.
17211 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
17212 * nto-low.c (nto_target_ops): Adjust comment.
17213 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
17214 * spu-low.c (spu_target_ops): Adjust comment.
17215 * target.h (target_ops): Rename unprepare_to_access_memory field
17216 to done_accessing_memory.
17217 (unprepare_to_access_memory): Rename to ...
17218 (done_accessing_memory): ... this.
17219
17220 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17221
17222 * linux-low.c (linux_prepare_to_access_memory): New.
17223 (linux_unprepare_to_access_memory): New.
17224 (linux_target_ops): Install them.
17225 * server.c (read_memory): Rename to ...
17226 (gdb_read_memory): ... this. Use
17227 prepare_to_access_memory/prepare_to_access_memory.
17228 (write_memory): Rename to ...
17229 (gdb_write_memory): ... this. Use
17230 prepare_to_access_memory/prepare_to_access_memory.
17231 (handle_search_memory_1): Adjust.
17232 (process_serial_event): Adjust.
17233 * target.h (struct target_ops): New fields
17234 prepare_to_access_memory and unprepare_to_access_memory.
17235 (prepare_to_access_memory, unprepare_to_access_memory): New.
17236 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
17237 prepare_to_access_memory/prepare_to_access_memory.
17238 * nto-low.c (nto_target_ops): Adjust.
17239 * spu-low.c (spu_target_ops): Adjust.
17240 * win32-low.c (win32_target_ops): Adjust.
17241
17242 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17243
17244 * Makefile.in (WARN_CFLAGS): Get it from configure.
17245 (WERROR_CFLAGS): New.
17246 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
17247 * configure.ac: Introduce --enable-werror, which adds -Werror to
17248 the compiler command line. Enabled by default. Disable with
17249 --disable-werror. Add -Wdeclaration-after-statement
17250 Wpointer-arith and -Wformat-nonliteral to warning flags.
17251 * configure: Regenerate.
17252
17253 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17254
17255 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
17256
17257 2010-08-26 Pedro Alves <pedro@codesourcery.com>
17258
17259 * gdbreplay.c (remote_error): New.
17260 (gdbchar): New.
17261 (expect): Use gdbchar. Check for error reading from GDB.
17262 Clarify sync error output.
17263 (play): Check for errors writing to GDB.
17264 * linux-low.c (sigchld_handler): Really ignore `write' errors.
17265 * remote-utils.c (getpkt): Check for errors writing to the remote
17266 descriptor.
17267
17268 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17269
17270 * linux-low.c (linux_wait_1): Move non-debugging code out of
17271 `debug_threads' control.
17272
17273 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17274
17275 * linux-low.c (linux_wait_1): Don't set last_status here.
17276 * server.c (push_event, queue_stop_reply_callback): Assert we're
17277 not pushing a TARGET_WAITKIND_IGNORE event.
17278 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
17279 (myresume, handle_target_event): Set the thread's last_resume_kind
17280 and last_status from the target returned status.
17281
17282 2010-08-25 Pedro Alves <pedro@codesourcery.com>
17283
17284 PR threads/10729
17285
17286 * linux-x86-low.c (update_debug_registers_callback): New.
17287 (i386_dr_low_set_addr): Use it.
17288 (i386_dr_low_get_addr): New.
17289 (i386_dr_low_set_control): Use update_debug_registers_callback.
17290 (i386_dr_low_get_control): New.
17291 (i386_dr_low_get_status): Adjust.
17292 * linux-low.c (linux_stop_lwp): New.
17293 * linux-low.h (linux_stop_lwp): Declare.
17294
17295 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
17296 argument instead of a i386_debug_reg_state.
17297 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
17298 a i386_debug_reg_state.
17299 (i386_insert_aligned_watchpoint): Adjust.
17300 (i386_remove_aligned_watchpoint): Adjust.
17301 (i386_low_stopped_data_address): Read the debug registers from the
17302 inferior instead of from the mirrors.
17303 * i386-low.h (struct i386_debug_reg_state): Extend comment.
17304 (i386_dr_low_get_addr): Declare.
17305 (i386_dr_low_get_control): Declare.
17306 (i386_dr_low_get_status): Change prototype.
17307
17308 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
17309 (i386_dr_low_get_addr): New.
17310 (i386_dr_low_get_control): New.
17311 (i386_dr_low_get_status): Adjust prototype. Return
17312 dr_status_mirror.
17313 (i386_initial_stuff): Clear dr_status_mirror and
17314 dr_control_mirror.
17315 (i386_get_thread_context): Adjust.
17316 (i386_set_thread_context): Adjust.
17317 (i386_thread_added): Adjust.
17318
17319 2010-08-24 Pedro Alves <pedro@codesourcery.com>
17320
17321 * linux-low.h (linux_thread_area): Delete declaration.
17322
17323 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
17324
17325 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
17326 after its termination.
17327
17328 2010-08-09 Pedro Alves <pedro@codesourcery.com>
17329
17330 * linux-low.c (gdb_wants_lwp_stopped): Delete.
17331 (gdb_wants_all_stopped): Delete.
17332 (linux_wait_1): Don't call them.
17333 * server.c (handle_v_cont): Tag all threads as want-stopped.
17334 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
17335 stopped as "client-wants-stopped".
17336
17337 2010-07-31 Pedro Alves <pedro@codesourcery.com>
17338
17339 * Makefile.in (signals_h): New.
17340 (server_h): Depend on it.
17341 (server.o): Don't depend on $(signals_def).
17342 (signals.o): Depend on $(signals_def).
17343
17344 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
17345
17346 * Makefile.in (signals_def): New.
17347 (server_h): Append include/gdb/signals.h and signals_def.
17348 (server.o): Append signals_def.
17349
17350 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
17351
17352 * server.c (handle_target_event): Use target_signal_to_host for
17353 resume_info.sig initialization.
17354 * target.h (struct thread_resume) <sig>: New comment.
17355
17356 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
17357
17358 * server.c (handle_query): strcpy() the returned string from paddress()
17359 instead of sprintf().
17360 * utils.c (paddress): Return phex_nz().
17361
17362 2010-07-07 Joel Brobecker <brobecker@adacore.com>
17363
17364 * server.c (handle_v_cont): Call mourn_inferior if process
17365 just exited.
17366 (myresume): Likewise.
17367
17368 2010-07-01 Pedro Alves <pedro@codesourcery.com>
17369
17370 Static tracepoints, and integration with UST.
17371
17372 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
17373 * mem-break.c (uninsert_all_breakpoints)
17374 (reinsert_all_breakpoints): New.
17375 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
17376 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
17377 (gdb_agent_ust_loaded, helper_thread_id)
17378 (gdb_agent_helper_thread_id): New macros.
17379 (struct ipa_sym_addresses): Add addr_ust_loaded,
17380 addr_helper_thread_id, addr_cmd_buf.
17381 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
17382 (in_process_agent_loaded_ust): New.
17383 (write_e_ust_not_loaded): New.
17384 (maybe_write_ipa_ust_not_loaded): New.
17385 (struct collect_static_trace_data_action): New.
17386 (enum tracepoint_type) <static_tracepoint>: New.
17387 (struct tracepoint) <handle>: Mention static tracepoints.
17388 (struct static_tracepoint_ctx): New.
17389 (CMD_BUF_SIZE): New.
17390 (add_tracepoint_action): Handle static tracepoint actions.
17391 (unprobe_marker_at): New.
17392 (clear_installed_tracepoints): Handle static tracepoints.
17393 (cmd_qtdp): Handle static tracepoints.
17394 (probe_marker_at): New.
17395 (cmd_qtstart): Handle static tracepoints.
17396 (response_tracepoint): Handle static tracepoints.
17397 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
17398 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
17399 (get_context_regcache): Handle static tracepoints.
17400 (do_action_at_tracepoint): Handle static tracepoint actions.
17401 (traceframe_find_block_type): Handle static trace data blocks.
17402 (traceframe_read_sdata): New.
17403 (download_tracepoints): Download static tracepoint actions.
17404 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
17405 (GDB_PROBE_NAME): New.
17406 (ust_ops): New.
17407 (GET_UST_SYM): New.
17408 (USTF): New.
17409 (dlsym_ust): New.
17410 (ust_marker_to_static_tracepoint): New.
17411 (gdb_probe): New.
17412 (collect_ust_data_at_tracepoint): New.
17413 (gdb_ust_probe): New.
17414 (UNIX_PATH_MAX, SOCK_DIR): New.
17415 (gdb_ust_connect_sync_socket): New.
17416 (resume_thread, stop_thread): New.
17417 (run_inferior_command): New.
17418 (init_named_socket): New.
17419 (gdb_ust_socket_init): New.
17420 (cstr_to_hexstr): New.
17421 (next_st): New.
17422 (first_marker, next_marker): New.
17423 (response_ust_marker): New.
17424 (cmd_qtfstm, cmd_qtsstm): New.
17425 (unprobe_marker_at, probe_marker_at): New.
17426 (cmd_qtstmat, gdb_ust_thread): New.
17427 (gdb_ust_init): New.
17428 (initialize_tracepoint_ftlib): Call gdb_ust_init.
17429 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
17430 (ST_REGENTRY): New.
17431 (x86_64_st_collect_regmap): New.
17432 (X86_64_NUM_ST_COLLECT_GREGS): New.
17433 (AMD64_RIP_REGNUM): New.
17434 (supply_static_tracepoint_registers): New.
17435 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
17436 (ST_REGENTRY): New.
17437 (i386_st_collect_regmap): New.
17438 (i386_NUM_ST_COLLECT_GREGS): New.
17439 (supply_static_tracepoint_registers): New.
17440 * server.c (handle_query): Handle qXfer:statictrace:read.
17441 <qSupported>: Report support for StaticTracepoints, and
17442 qXfer:statictrace:read features.
17443 * server.h (traceframe_read_sdata)
17444 (supply_static_tracepoint_registers): Declare.
17445 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
17446 (unpack_varlen_hex): Include in IPA build.
17447 * Makefile.in (ustlibs, ustinc): New.
17448 (IPA_OBJS): Add remote-utils-ipa.o.
17449 ($(IPA_LIB)): Link -ldl and -lpthread.
17450 (UST_CFLAGS): New.
17451 (IPAGENT_CFLAGS): Add UST_CFLAGS.
17452 * config.in, configure: Regenerate.
17453
17454 2010-06-20 Ian Lance Taylor <iant@google.com>
17455 Pedro Alves <pedro@codesourcery.com>
17456
17457 * linux-x86-low.c (always_true): Delete.
17458 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
17459 trying to fool the compiler with always_true.
17460
17461 2010-06-20 Pedro Alves <pedro@codesourcery.com>
17462
17463 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
17464 conditions in gdbserver.
17465
17466 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
17467
17468 * spu-low.c (spu_read_memory): Wrap around local store limit.
17469 (spu_write_memory): Likewise.
17470
17471 2010-06-15 Pedro Alves <pedro@codesourcery.com>
17472
17473 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
17474 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
17475 LONGEST uses.
17476 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
17477 uses.
17478 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
17479 uses with LONGEST uses.
17480
17481 2010-06-14 Stan Shebs <stan@codesourcery.com>
17482 Pedro Alves <pedro@codesourcery.com>
17483
17484 Bytecode compiler.
17485
17486 * linux-x86-low.c: Include limits.h.
17487 (add_insns): New.
17488 (always_true): New.
17489 (EMIT_ASM): New.
17490 (EMIT_ASM32): New.
17491 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
17492 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
17493 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
17494 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
17495 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
17496 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
17497 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
17498 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
17499 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
17500 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
17501 (amd64_emit_void_call_2): New.
17502 (amd64_emit_ops): New.
17503 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
17504 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
17505 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
17506 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
17507 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
17508 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
17509 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
17510 (i386_emit_call, i386_emit_reg, i386_emit_pop)
17511 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
17512 (i386_emit_stack_adjust, i386_emit_int_call_1)
17513 (i386_emit_void_call_2): New.
17514 (i386_emit_ops): New.
17515 (x86_emit_ops): New.
17516 (the_low_target): Install x86_emit_ops.
17517 * server.h (struct emit_ops): New.
17518 (get_raw_reg_func_addr): Declare.
17519 (current_insn_ptr, emit_error): Declare.
17520 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
17521 (set_trace_state_variable_value): New defines.
17522 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
17523 addr_get_trace_state_variable_value and
17524 addr_set_trace_state_variable_value.
17525 (symbol_list): New fields for get_raw_reg,
17526 get_trace_state_variable_value and set_trace_state_variable_value.
17527 (condfn): New typedef.
17528 (struct tracepoint): New field `compiled_cond'.
17529 (do_action_at_tracepoint): Clear compiled_cond.
17530 (get_trace_state_variable_value, set_trace_state_variable_value):
17531 Export in the IPA.
17532 (condition_true_at_tracepoint): If there's a compiled condition,
17533 run that.
17534 (current_insn_ptr, emit_error): New globals.
17535 (struct bytecode_address): New.
17536 (get_raw_reg_func_addr): New.
17537 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
17538 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
17539 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
17540 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
17541 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
17542 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
17543 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
17544 (compile_tracepoint_condition, compile_bytecodes): New.
17545 * target.h (emit_ops): Forward declare.
17546 (struct target_ops): New field emit_ops.
17547 (target_emit_ops): New.
17548 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
17549 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
17550 * linux-low.c (linux_emit_ops): New.
17551 (linux_target_ops): Install it.
17552 * linux-low.h (struct linux_target_ops): New field emit_ops.
17553
17554 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
17555
17556 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
17557 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
17558
17559 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17560 Stan Shebs <stan@codesourcery.com>
17561
17562 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
17563 (all): Depend on $(extra_libraries).
17564 (install-only): Install the IPA.
17565 (IPA_OBJS, IPA_LIB): New.
17566 (clean): Remove the IPA lib.
17567 (IPAGENT_CFLAGS): New.
17568 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
17569 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
17570 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
17571 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
17572 * configure.ac: Check for atomic builtins support in the compiler.
17573 (IPA_DEPFILES, extra_libraries): Define.
17574 * configure.srv (ipa_obj): Add description.
17575 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
17576 (i[34567]86-*-linux*): Set ipa_obj.
17577 (x86_64-*-linux*): Set ipa_obj.
17578 * linux-low.c (stabilizing_threads): New.
17579 (supports_fast_tracepoints): New.
17580 (linux_detach): Stabilize threads before detaching.
17581 (handle_tracepoints): Handle internal tracing breakpoints. Assert
17582 the lwp is either not stabilizing, or is moving out of a jump pad.
17583 (linux_fast_tracepoint_collecting): New.
17584 (maybe_move_out_of_jump_pad): New.
17585 (enqueue_one_deferred_signal): New.
17586 (dequeue_one_deferred_signal): New.
17587 (linux_wait_for_event_1): If moving out of a jump pad, defer
17588 pending signals to later.
17589 (linux_stabilize_threads): New.
17590 (linux_wait_1): Check if threads need moving out of jump pads, and
17591 do it if so.
17592 (stuck_in_jump_pad_callback): New.
17593 (move_out_of_jump_pad_callback): New.
17594 (lwp_running): New.
17595 (linux_resume_one_lwp): Handle moving out of jump pads.
17596 (linux_set_resume_request): Dequeue deferred signals.
17597 (need_step_over_p): Also step over fast tracepoint jumps.
17598 (start_step_over): Also uninsert fast tracepoint jumps.
17599 (finish_step_over): Also reinsert fast tracepoint jumps.
17600 (linux_install_fast_tracepoint_jump): New.
17601 (linux_target_ops): Install linux_stabilize_threads and
17602 linux_install_fast_tracepoint_jump_pad.
17603 * linux-low.h (linux_target_ops) <get_thread_area,
17604 install_fast_tracepoint_jump_pad>: New fields.
17605 (struct lwp_info) <collecting_fast_tracepoint,
17606 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
17607 (linux_get_thread_area): Declare.
17608 * linux-x86-low.c (jump_insn): New.
17609 (x86_get_thread_area): New.
17610 (append_insns): New.
17611 (push_opcode): New.
17612 (amd64_install_fast_tracepoint_jump_pad): New.
17613 (i386_install_fast_tracepoint_jump_pad): New.
17614 (x86_install_fast_tracepoint_jump_pad): New.
17615 (the_low_target): Install x86_get_thread_area and
17616 x86_install_fast_tracepoint_jump_pad.
17617 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
17618 (struct fast_tracepoint_jump): New.
17619 (fast_tracepoint_jump_insn): New.
17620 (fast_tracepoint_jump_shadow): New.
17621 (find_fast_tracepoint_jump_at): New.
17622 (fast_tracepoint_jump_here): New.
17623 (delete_fast_tracepoint_jump): New.
17624 (set_fast_tracepoint_jump): New.
17625 (uninsert_fast_tracepoint_jumps_at): New.
17626 (reinsert_fast_tracepoint_jumps_at): New.
17627 (set_breakpoint_at): Use write_inferior_memory.
17628 (uninsert_raw_breakpoint): Use write_inferior_memory.
17629 (check_mem_read): Mask out fast tracepoint jumps.
17630 (check_mem_write): Mask out fast tracepoint jumps.
17631 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
17632 (set_fast_tracepoint_jump): Declare.
17633 (delete_fast_tracepoint_jump)
17634 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
17635 (reinsert_fast_tracepoint_jumps_at): Declare.
17636 * regcache.c: Don't compile many functions when building the
17637 in-process agent library.
17638 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
17639 the register buffer in the heap.
17640 (free_register_cache): If the register buffer isn't owned by the
17641 regcache, don't free it.
17642 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
17643 pre-existing register caches.
17644 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
17645 type.
17646 (convert_ascii_to_int): : Constify `from' parameter type.
17647 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
17648 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
17649 the needed buffer in-place.
17650 (relocate_instruction): New.
17651 * server.c (handle_query) <qSymbols>: If the target supports
17652 tracepoints, give it a chance of looking up symbols. Report
17653 support for fast tracepoints.
17654 (handle_status): Stabilize threads.
17655 (process_serial_event): Adjust.
17656 * server.h (struct fast_tracepoint_jump): Forward declare.
17657 (struct process_info) <fast_tracepoint_jumps>: New field.
17658 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
17659 (decode_X_packet, decode_M_packet): Adjust.
17660 (relocate_instruction): Declare.
17661 (in_process_agent_loaded): Declare.
17662 (tracepoint_look_up_symbols): Declare.
17663 (struct fast_tpoint_collect_status): Declare.
17664 (fast_tracepoint_collecting): Declare.
17665 (force_unlock_trace_buffer): Declare.
17666 (handle_tracepoint_bkpts): Declare.
17667 (initialize_low_tracepoint)
17668 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
17669 * target.h (struct target_ops) <stabilize_threads,
17670 install_fast_tracepoint_jump_pad>: New fields.
17671 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
17672 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
17673 [HAVE_STDINT_H]: Include stdint.h.
17674 (trace_debug_1): Rename to ...
17675 (trace_vdebug): ... this.
17676 (trace_debug): Rename to ...
17677 (trace_debug_1): ... this. Add `level' parameter.
17678 (trace_debug): New.
17679 (ATTR_USED, ATTR_NOINLINE): New.
17680 (IP_AGENT_EXPORT): New.
17681 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
17682 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
17683 (about_to_request_buffer_space, trace_buffer_is_full)
17684 (stopping_tracepoint, expr_eval_result, error_tracepoint)
17685 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
17686 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
17687 (traceframe_write_count, traceframes_created)
17688 (trace_state_variables)
17689 New renaming defines.
17690 (struct ipa_sym_addresses): New.
17691 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
17692 (symbol_list): New.
17693 (ipa_sym_addrs): New.
17694 (all_tracepoint_symbols_looked_up): New.
17695 (in_process_agent_loaded): New.
17696 (write_e_ipa_not_loaded): New.
17697 (maybe_write_ipa_not_loaded): New.
17698 (tracepoint_look_up_symbols): New.
17699 (debug_threads) [IN_PROCESS_AGENT]: New.
17700 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
17701 (UNKNOWN_SIDE_EFFECTS): New.
17702 (stop_tracing): New.
17703 (flush_trace_buffer): New.
17704 (stop_tracing_bkpt): New.
17705 (flush_trace_buffer_bkpt): New.
17706 (read_inferior_integer): New.
17707 (read_inferior_uinteger): New.
17708 (read_inferior_data_pointer): New.
17709 (write_inferior_data_pointer): New.
17710 (write_inferior_integer): New.
17711 (write_inferior_uinteger): New.
17712 (struct collect_static_trace_data_action): Delete.
17713 (enum tracepoint_type): New.
17714 (struct tracepoint) <type>: New field `type'.
17715 <actions_str, step_actions, step_actions_str>: Only include in
17716 GDBserver.
17717 <orig_size, obj_addr_on_target, adjusted_insn_addr>
17718 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
17719 (tracepoints): Use IP_AGENT_EXPORT.
17720 (last_tracepoint): Don't include in the IPA.
17721 (stopping_tracepoint): Use IP_AGENT_EXPORT.
17722 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
17723 (alloced_trace_state_variables): New.
17724 (trace_state_variables): Use IP_AGENT_EXPORT.
17725 (traceframe_t): Delete unused variable.
17726 (circular_trace_buffer): Don't include in the IPA.
17727 (trace_buffer_start): Delete.
17728 (struct trace_buffer_control): New.
17729 (trace_buffer_free): Delete.
17730 (struct ipa_trace_buffer_control): New.
17731 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
17732 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
17733 New.
17734 (trace_buffer_ctrl): New.
17735 (TRACE_BUFFER_CTRL_CURR): New.
17736 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
17737 Reimplement as macros.
17738 (trace_buffer_wrap): Delete.
17739 (traceframe_write_count, traceframe_read_count)
17740 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
17741 (struct tracepoint_hit_ctx) <type>: New field.
17742 (struct fast_tracepoint_ctx): New.
17743 (memory_barrier): New.
17744 (cmpxchg): New.
17745 (record_tracepoint_error): Update atomically in the IPA.
17746 (clear_inferior_trace_buffer): New.
17747 (about_to_request_buffer_space): New.
17748 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
17749 updating the same buffer.
17750 (add_tracepoint): Default the tracepoint's type to trap
17751 tracepoint, and orig_size to -1.
17752 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
17753 internal variables.
17754 (create_trace_state_variable): New parameter `gdb'. Handle it.
17755 (clear_installed_tracepoints): Clear fast tracepoint jumps.
17756 (cmd_qtdp): Handle fast tracepoints.
17757 (cmd_qtdv): Adjust.
17758 (max_jump_pad_size): New.
17759 (gdb_jump_pad_head): New.
17760 (get_jump_space_head): New.
17761 (claim_jump_space): New.
17762 (sort_tracepoints): New.
17763 (MAX_JUMP_SIZE): New.
17764 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
17765 IPA.
17766 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
17767 support. Upload fast traceframes, and delete internal IPA
17768 breakpoints.
17769 (stop_tracing_handler): New.
17770 (flush_trace_buffer_handler): New.
17771 (cmd_qtstop): Upload fast tracepoints.
17772 (response_tracepoint): Handle fast tracepoints.
17773 (tracepoint_finished_step): Upload fast traceframes. Set the
17774 tracepoint hit context's tracepoint type.
17775 (handle_tracepoint_bkpts): New.
17776 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
17777 type. Add comment about fast tracepoints.
17778 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
17779 non-existing action_str field.
17780 (get_context_regcache): Handle fast tracepoints.
17781 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
17782 to the regcache.
17783 (fast_tracepoint_from_jump_pad_address): New.
17784 (fast_tracepoint_from_ipa_tpoint_address): New.
17785 (collecting_t): New.
17786 (force_unlock_trace_buffer): New.
17787 (fast_tracepoint_collecting): New.
17788 (collecting): New.
17789 (gdb_collect): New.
17790 (write_inferior_data_ptr): New.
17791 (target_tp_heap): New.
17792 (target_malloc): New.
17793 (download_agent_expr): New.
17794 (UALIGN): New.
17795 (download_tracepoints): New.
17796 (download_trace_state_variables): New.
17797 (upload_fast_traceframes): New.
17798 (IPA_FIRST_TRACEFRAME): New.
17799 (IPA_NEXT_TRACEFRAME_1): New.
17800 (IPA_NEXT_TRACEFRAME): New.
17801 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
17802 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
17803 (gdb_jump_pad_buffer_end): New.
17804 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
17805 (initialize_tracepoint): Adjust.
17806 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
17807 buffer. Initialize the low module.
17808 * utils.c (PREFIX, TOOLNAME): New.
17809 (malloc_failure): Use PREFIX.
17810 (error): In the IPA, an error causes an exit.
17811 (fatal, warning): Use PREFIX.
17812 (internal_error): Use TOOLNAME.
17813 (NUMCELLS): Increase to 10.
17814 * configure, config.in: Regenerate.
17815
17816 2010-06-01 Pedro Alves <pedro@codesourcery.com>
17817
17818 * server.c (handle_query) <qSupported>: Do two passes over the
17819 qSupported string to avoid nesting strtok.
17820
17821 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17822
17823 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
17824 (CDEPS): New.
17825 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
17826 -Wl,--dynamic-list.
17827 * configure: Regenerate.
17828 * proc-service.list: New.
17829
17830 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
17831
17832 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
17833 New comment.
17834
17835 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
17836
17837 * gdbreplay.c (remote_open): Check error return from socket() call by
17838 its equality to -1 not by it being negative.
17839 * remote-utils.c (remote_open): Likewise.
17840
17841 2010-05-23 Pedro Alves <pedro@codesourcery.com>
17842
17843 * config.h: Regenerate.
17844
17845 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17846
17847 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
17848 doesn't provide PTRACE_GET_THREAD_AREA.
17849
17850 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
17851
17852 * linux-m68k-low.c: Include <asm/ptrace.h>
17853 (ps_get_thread_area): Implement.
17854
17855 2010-05-03 Doug Evans <dje@google.com>
17856
17857 * event-loop.c (struct callback_event): New struct.
17858 (callback_list): New global.
17859 (append_callback_event, delete_callback_event): New functions.
17860 (process_callback): New function.
17861 (start_event_loop): Call it.
17862 * remote-utils.c (NOT_SCHEDULED): Define.
17863 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
17864 moved out of readchar.
17865 (readchar): Rewrite. Call reschedule before returning.
17866 (reset_readchar): New function.
17867 (remote_close): Call it.
17868 (process_remaining, reschedule): New functions.
17869 * server.h (callback_handler_func): New typedef.
17870 (append_callback_event, delete_callback_event): Declare.
17871
17872 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17873
17874 * proc-service.c (ps_pglobal_lookup): Use
17875 thread_db_look_up_one_symbol.
17876 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
17877 parameter. Use it instead of all_symbols_looked_up.
17878 * server.h (struct process_info) <all_symbols_looked_up>: Delete
17879 field.
17880 (all_symbols_looked_up): Don't declare.
17881 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
17882 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
17883 field.
17884 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
17885 Set all_symbols_looked_up here.
17886 (thread_db_look_up_one_symbol): New.
17887 (thread_db_get_tls_address): Adjust.
17888 (thread_db_load_search, try_thread_db_load_1): Always allocate the
17889 thread_db object on the heap, and tentatively set it in the
17890 process structure.
17891 (thread_db_init): Don't set all_symbols_looked_up here.
17892 * linux-low.h (thread_db_look_up_one_symbol): Declare.
17893
17894 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17895
17896 * linux-low.c (linux_kill, linux_detach): Adjust.
17897 (status_pending_p_callback): Remove redundant statement. Check
17898 for !TARGET_WAITIKIND_IGNORE, instead of
17899 TARGET_WAITKIND_STOPPED.
17900 (handle_tracepoints): Make sure LWP is locked. Adjust.
17901 (linux_wait_for_event_1): Adjust.
17902 (linux_cancel_breakpoints): New.
17903 (unsuspend_one_lwp): New.
17904 (unsuspend_all_lwps): New.
17905 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
17906 (send_sigstop_callback): Change return type to int, add new
17907 `except' parameter and handle it.
17908 (suspend_and_send_sigstop_callback): New.
17909 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
17910 pass them down. If SUSPEND, also increment the lwp's suspend
17911 count.
17912 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
17913 (need_step_over_p): Don't consider suspended LWPs.
17914 (start_step_over): Adjust.
17915 (proceed_one_lwp): Change return type to int, add new `except'
17916 parameter and handle it.
17917 (unsuspend_and_proceed_one_lwp): New.
17918 (proceed_all_lwps): Use find_inferior instead of
17919 for_each_inferior.
17920 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
17921 also decrement the suspend count of LWPs. Pass `except' down,
17922 instead of hacking its suspend count.
17923 (linux_pause_all): Add `freeze' parameter. Adjust.
17924 (linux_unpause_all): New.
17925 (linux_target_ops): Install linux_unpause_all.
17926 * server.c (handle_status): Adjust.
17927 * target.h (struct target_ops): New fields `unpause_all' and
17928 `cancel_breakpoints'. Add new parameter to `pause_all'.
17929 (pause_all): Add new `freeze' parameter.
17930 (unpause_all): New.
17931 (cancel_breakpoints): New.
17932 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
17933 cancel breakpoints.
17934 (cmd_qtstart): Pause threads.
17935 (stop_tracing): Pause threads, and cancel breakpoints.
17936 * win32-low.c (win32_target_ops): Adjust.
17937
17938 2010-05-03 Pedro Alves <pedro@codesourcery.com>
17939
17940 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
17941 the inferior right away from here...
17942 (linux_wait_1): ... to here, and adjust to check the thread's
17943 last_resume_kind instead of the lwp's step or stop_expected flags.
17944
17945 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17946
17947 * README: Use consistent `GDB' and `GDBserver' spellings.
17948
17949 2010-05-02 Pedro Alves <pedro@codesourcery.com>
17950
17951 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
17952 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
17953 (linux_detach_one_lwp): Assume the lwp is stopped.
17954 (any_thread_of): Delete.
17955 (linux_detach): Stop all lwps here. Don't blindly delete all
17956 breakpoints.
17957 (delete_lwp_callback): New.
17958 (linux_mourn): Delete all lwps of the process that is gone.
17959 (linux_wait_1): Don't delete the last lwp of the process here.
17960 * mem-break.h (mark_breakpoints_out): Declare.
17961 * mem-break.c (mark_breakpoints_out): New.
17962 (free_all_breakpoints): Use it.
17963 * server.c (handle_target_event): If the process is gone, mark
17964 breakpoints out.
17965 * thread-db.c (struct thread_db) <create_bp>: New field.
17966 (thread_db_enable_reporting): Fix prototype. Store a thread event
17967 breakpoint reference in the thread_db struct.
17968 (thread_db_load_search): Clear the thread_db object.
17969 (try_thread_db_load_1): Ditto.
17970 (switch_to_process): New.
17971 (disable_thread_event_reporting): Use it.
17972 (remove_thread_event_breakpoints): New.
17973 (thread_db_detach, thread_db_mourn): Use it.
17974
17975 2010-05-01 Pedro Alves <pedro@codesourcery.com>
17976
17977 * linux-low.c (linux_enable_event_reporting): New.
17978 (linux_wait_for_event_1, handle_extended_wait): Use it.
17979
17980 2010-04-30 Pedro Alves <pedro@codesourcery.com>
17981
17982 * linux-low.c (linux_kill_one_lwp, linux_kill)
17983 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
17984 (send_sigstop): Take an lwp_info as parameter instead. Queue a
17985 SIGSTOP even if the LWP is stopped.
17986 (send_sigstop_callback): New.
17987 (stop_all_lwps): Use send_sigstop_callback instead.
17988 (linux_resume_one_thread): Adjust.
17989 (proceed_one_lwp): Still proceed an LWP that the client has
17990 requested to stop, if we haven't reported it as stopped yet. Make
17991 sure that LWPs the client want stopped, have a pending SIGSTOP.
17992
17993 2010-04-26 Doug Evans <dje@google.com>
17994
17995 * server.c (handle_general_set): Make static.
17996
17997 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
17998 Print received char after testing for error/eof instead of before.
17999 (input_interrupt): Tweak comment.
18000
18001 2010-04-23 Doug Evans <dje@google.com>
18002
18003 * server.c (start_inferior): Print inferior argv if --debug.
18004
18005 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
18006
18007 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
18008 * nto-x86-low.c: Include server.h
18009
18010 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
18011
18012 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
18013 be consistent with other sources of this directory.
18014 (init_registers_amd64): Correct name of source file of this function
18015 in the comment.
18016
18017 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
18018
18019 * configure.srv (x86_64-*-mingw*): New configuration for Windows
18020 64-bit executables.
18021
18022 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
18023
18024 * win32-i386-low.c: Add 64-bit support.
18025 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
18026 (init_registers_amd64): Declare.
18027 (mappings): Add 64-bit version of array.
18028 (init_windows_x86): New function.
18029 (the_low_target): Change init_arch field to init_windows_x86.
18030
18031 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
18032
18033 * win32-low.c: Adapt to support also 64-bit architecture.
18034 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
18035 (get_image_name): Use SIZE_T type for local variable `done'.
18036 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
18037 (toolhelp_get_dll_name): Idem.
18038 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
18039 Use uintptr_t typecast to avoid warning.
18040 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
18041 (handle_exception): Use phex_nz to avoid warning.
18042 (win32_wait): Remove unused local variable `process'.
18043
18044 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
18045
18046 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
18047 `amd64-avx.o'.
18048
18049 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
18050
18051 * configure.ac: Use `ws2_32' library for srv_mingw.
18052 * configure: Regenerate.
18053 * gdbreplay.c: Include winsock2.h instead of winsock.h.
18054 * remote-utils.c: Likewise.
18055
18056 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
18057
18058 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
18059 if __x86_64__ is defined.
18060
18061 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
18062
18063 * configure: Regenerate.
18064
18065 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
18066
18067 * server.c (handle_query): Handle 'qGetTIBAddr' query.
18068 * target.h (target_ops): New get_tib_address field.
18069 * win32-low.h (win32_thread_info): Add thread_local_base field.
18070 * win32-low.c (child_add_thread): Add tlb argument.
18071 Set thread_local_base field to TLB.
18072 (get_child_debug_event): Adapt to child_add_thread change.
18073 (win32_get_tib_address): New function.
18074 (win32_target_ops): Set get_tib_address field to
18075 win32_get_tib_address.
18076 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
18077
18078 2010-04-12 Pedro Alves <pedro@codesourcery.com>
18079
18080 * linux-low.c (linux_mourn): Also remove the process.
18081 * server.c (handle_target_event): Don't remove the process here.
18082 * nto-low.c (nto_mourn): New.
18083 (nto_target_ops): Install it.
18084 * spu-low.c (spu_mourn): New.
18085 (spu_target_ops): Install it.
18086 * win32-low.c (win32_mourn): New.
18087 (win32_target_ops): Install it.
18088
18089 2010-04-12 Pedro Alves <pedro@codesourcery.com>
18090
18091 * server.h (buffer_xml_printf): Remove redundant `;'.
18092
18093 2010-04-12 Pedro Alves <pedro@codesourcery.com>
18094
18095 * regcache.c (set_register_cache): Invalidate regcaches before
18096 changing the register cache layout.
18097 (regcache_invalidate_one): Allow a NULL regcache.
18098 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
18099 regcaches before changing the register cache layout or the target
18100 regsets.
18101
18102 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
18103
18104 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
18105 variable warning on Linux/x86-64.
18106
18107 2010-04-11 Pedro Alves <pedro@codesourcery.com>
18108
18109 GDBserver disconnected tracing support.
18110
18111 * linux-low.c (linux_remove_process): Delete.
18112 (add_lwp): Don't set last_resume_kind here.
18113 (linux_kill): Use `mourn'.
18114 (linux_detach): Use `thread_db_detach', and `mourn'.
18115 (linux_mourn): New.
18116 (linux_attach_lwp_1): Adjust comment.
18117 (linux_attach): last_resume_kind moved the thread_info; adjust.
18118 (status_pending_p_callback): Adjust.
18119 (linux_wait_for_event_1): Adjust.
18120 (count_events_callback, select_singlestep_lwp_callback)
18121 (select_event_lwp_callback, cancel_breakpoints_callback)
18122 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
18123 (proceed_one_lwp): Adjust.
18124 (linux_async): Add debug output.
18125 (linux_thread_stopped): New.
18126 (linux_pause_all): New.
18127 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
18128 linux_pause_all.
18129 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
18130 (thread_db_free): Delete declaration.
18131 (thread_db_detach, thread_db_mourn): Declare.
18132 * thread-db.c (thread_db_init): Use thread_db_mourn.
18133 (thread_db_free): Delete, split in two.
18134 (disable_thread_event_reporting): New.
18135 (thread_db_detach): New.
18136 (thread_db_mourn): New.
18137
18138 * server.h (struct thread_info) <last_resume_kind>: New field.
18139 <attached>: Add comment.
18140 <gdb_detached>: New field.
18141 (handler_func): Change return type to int.
18142 (handle_serial_event, handle_target_event): Ditto.
18143 (gdb_connected): Declare.
18144 (tracing): Delete.
18145 (disconnected_tracing): Declare.
18146 (stop_tracing): Declare.
18147
18148 * server.c (handle_query) <qSupported>: Report support for
18149 disconnected tracing.
18150 (queue_stop_reply_callback): Account for running threads.
18151 (gdb_wants_thread_stopped): New.
18152 (gdb_wants_all_threads_stopped): New.
18153 (gdb_reattached_process): New.
18154 (handle_status): Clear the `gdb_detached' flag of all processes.
18155 In all-stop, stop all threads.
18156 (main): Be sure to leave tfind mode. Handle disconnected tracing.
18157 (process_serial_event): If the remote connection breaks, or if an
18158 exit was forced with "monitor exit", force an event loop exit.
18159 Handle disconnected tracing on detach.
18160 (handle_serial_event): Adjust.
18161 (handle_target_event): If GDB isn't connected, forward events back
18162 to the inferior, unless the last process exited, in which case,
18163 exit gdbserver. Adjust interface.
18164
18165 * remote-utils.c (remote_open): Don't block in accept. Instead
18166 register an event loop source on the listen socket file
18167 descriptor. Refactor bits into ...
18168 (listen_desc): ... this new global.
18169 (gdb_connected): ... this new function.
18170 (enable_async_notification): ... this new function.
18171 (handle_accept_event): ... this new function.
18172 (remote_close): Clear remote_desc.
18173
18174 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
18175
18176 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
18177 New fields.
18178 (mourn_inferior): Define.
18179 (target_process_qsupported): Avoid the dangling else problem.
18180 (thread_stopped): Define.
18181 (pause_all): Define.
18182 (target_waitstatus_to_string): Declare.
18183 * target.c (target_waitstatus_to_string): New.
18184
18185 * tracepoint.c (tracing): Make extern.
18186 (disconnected_tracing): New.
18187 (stop_tracing): Make extern. Handle tracing stops due to GDB
18188 disconnecting.
18189 (cmd_qtdisconnected): New.
18190 (cmd_qtstatus): Report disconnected tracing status in trace reply.
18191 (handle_tracepoint_general_set): Handle QTDisconnected.
18192
18193 * event-loop.c (event_handler_func): Change return type to int.
18194 (process_event): Bail out if the event handler wants the event
18195 loop to stop.
18196 (handle_file_event): Ditto.
18197 (start_event_loop): Bail out if the event handler wants the event
18198 loop to stop.
18199
18200 * nto-low.c (nto_target_ops): Adjust.
18201 * spu-low.c (spu_wait): Don't remove the process here.
18202 (spu_target_ops): Adjust.
18203 * win32-low.c (win32_wait): Don't remove the process here.
18204 (win32_target_ops): Adjust.
18205
18206 2010-04-11 Pedro Alves <pedro@codesourcery.com>
18207
18208 * regcache.c (realloc_register_cache): Invalidate inferior's
18209 regcache before recreating it.
18210
18211 2010-04-09 Pedro Alves <pedro@codesourcery.com>
18212
18213 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
18214
18215 2010-04-09 Stan Shebs <stan@codesourcery.com>
18216 Pedro Alves <pedro@codesourcery.com>
18217
18218 * server.h (LONGEST): New.
18219 (struct thread_info) <while_stepping>: New field.
18220 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
18221 Declare.
18222 (initialize_tracepoint, handle_tracepoint_general_set)
18223 (handle_tracepoint_query, tracepoint_finished_step)
18224 (tracepoint_was_hit, release_while_stepping_state_list):
18225 (current_traceframe): Declare.
18226 * server.c (handle_general_set): Handle tracepoint packets.
18227 (read_memory): New.
18228 (write_memory): New.
18229 (handle_search_memory_1): Use read_memory.
18230 (handle_query): Report support for conditional tracepoints, trace
18231 state variables, and tracepoint sources. Handle tracepoint
18232 queries.
18233 (main): Initialize the tracepoints module.
18234 (process_serial_event): Handle traceframe reads/writes.
18235
18236 * linux-low.c (handle_tracepoints): New.
18237 (linux_wait_1): Call it.
18238 (linux_resume_one_lwp): Handle while-stepping.
18239 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
18240 (linux_target_ops): Install them.
18241 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
18242 New field.
18243 * linux-x86-low.c (x86_supports_tracepoints): New.
18244 (the_low_target). Install it.
18245
18246 * mem-break.h (delete_breakpoint): Declare.
18247 * mem-break.c (delete_breakpoint): Make external.
18248
18249 * target.h (struct target_ops): Add `supports_tracepoints',
18250 `read_pc', and `write_pc' fields.
18251 (target_supports_tracepoints): Define.
18252 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
18253 (phex_nz): New.
18254
18255 * regcache.h (struct regcache) <registers_owned>: New field.
18256 (init_register_cache, regcache_cpy): Declare.
18257 (regcache_read_pc, regcache_write_pc): Declare.
18258 (register_cache_size): Declare.
18259 (supply_regblock): Declare.
18260 * regcache.c (init_register_cache): New.
18261 (new_register_cache): Use it.
18262 (regcache_cpy): New.
18263 (register_cache_size): New.
18264 (supply_regblock): New.
18265 (regcache_read_pc, regcache_write_pc): New.
18266
18267 * tracepoint.c: New.
18268
18269 * Makefile.in (OBS): Add tracepoint.o.
18270 (tracepoint.o): New rule.
18271
18272 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
18273
18274 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
18275 (i386-mmx.o): New.
18276 (i386-mmx.c): Likewise.
18277 (i386-mmx-linux.o): Likewise.
18278 (i386-mmx-linux.c): Likewise.
18279
18280 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
18281 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
18282 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
18283 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
18284
18285 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
18286 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
18287 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
18288
18289 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
18290
18291 * Makefile.in (clean): Updated.
18292 (i386-avx.o): New.
18293 (i386-avx.c): Likewise.
18294 (i386-avx-linux.o): Likewise.
18295 (i386-avx-linux.c): Likewise.
18296 (amd64-avx.o): Likewise.
18297 (amd64-avx.c): Likewise.
18298 (amd64-avx-linux.o): Likewise.
18299 (amd64-avx-linux.c): Likewise.
18300
18301 * configure.srv (srv_i386_regobj): Add i386-avx.o.
18302 (srv_i386_linux_regobj): Add i386-avx-linux.o.
18303 (srv_amd64_regobj): Add amd64-avx.o.
18304 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
18305 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
18306 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
18307 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
18308 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
18309 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
18310 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
18311
18312 * i387-fp.c: Include "i386-xstate.h".
18313 (i387_xsave): New.
18314 (i387_cache_to_xsave): Likewise.
18315 (i387_xsave_to_cache): Likewise.
18316 (x86_xcr0): Likewise.
18317
18318 * i387-fp.h (i387_cache_to_xsave): Likewise.
18319 (i387_xsave_to_cache): Likewise.
18320 (x86_xcr0): Likewise.
18321
18322 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
18323 * linux-crisv32-low.c (target_regsets): Likewise.
18324 * linux-m68k-low.c (target_regsets): Likewise.
18325 * linux-mips-low.c (target_regsets): Likewise.
18326 * linux-ppc-low.c (target_regsets): Likewise.
18327 * linux-s390-low.c (target_regsets): Likewise.
18328 * linux-sh-low.c (target_regsets): Likewise.
18329 * linux-sparc-low.c (target_regsets): Likewise.
18330 * linux-xtensa-low.c (target_regsets): Likewise.
18331
18332 * linux-low.c: Include <sys/uio.h>.
18333 (regsets_fetch_inferior_registers): Support nt_type.
18334 (regsets_store_inferior_registers): Likewise.
18335 (linux_process_qsupported): New.
18336 (linux_target_ops): Add linux_process_qsupported.
18337
18338 * linux-low.h (regset_info): Add nt_type.
18339 (linux_target_ops): Add process_qsupported.
18340
18341 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
18342 and <sys/uio.h>.
18343 (init_registers_i386_avx_linux): New.
18344 (init_registers_amd64_avx_linux): Likewise.
18345 (xmltarget_i386_linux_no_xml): Likewise.
18346 (xmltarget_amd64_linux_no_xml): Likewise.
18347 (PTRACE_GETREGSET): Likewise.
18348 (PTRACE_SETREGSET): Likewise.
18349 (x86_fill_xstateregset): Likewise.
18350 (x86_store_xstateregset): Likewise.
18351 (use_xml): Likewise.
18352 (x86_linux_update_xmltarget): Likewise.
18353 (x86_linux_process_qsupported): Likewise.
18354 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
18355 (x86_arch_setup): Don't call init_registers_amd64_linux nor
18356 init_registers_i386_linux here. Call
18357 x86_linux_update_xmltarget.
18358 (the_low_target): Add x86_linux_process_qsupported.
18359
18360 * server.c (handle_query): Call target_process_qsupported.
18361
18362 * target.h (target_ops): Add process_qsupported.
18363 (target_process_qsupported): New.
18364
18365 2010-04-03 Pedro Alves <pedro@codesourcery.com>
18366
18367 * inferiors.c (add_thread): Set last_status kind to
18368 TARGET_WAITKIND_IGNORE.
18369 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
18370 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
18371 (linux_wait_1): Move `thread' local definition to block that uses
18372 it. Don't NULL initialize `event_child'.
18373 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
18374 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
18375 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
18376
18377 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18378
18379 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
18380 an extended waitstatus, or by a watchpoint.
18381 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
18382 thread was stepping or has been stopped by a watchpoint.
18383
18384 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18385
18386 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
18387 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
18388 of another, then delete the previous, and validate all
18389 breakpoints.
18390 (validate_inserted_breakpoint): New.
18391 (delete_disabled_breakpoints): New.
18392 (validate_breakpoints): New.
18393 (check_mem_read): Validate breakpoints before trusting their
18394 shadow. Delete disabled breakpoints.
18395 (check_mem_write): Validate breakpoints before trusting they
18396 should be inserted. Delete disabled breakpoints.
18397 * mem-break.h (validate_breakpoints):
18398 * server.c (handle_query): Validate breakpoints when we see a
18399 qSymbol query.
18400
18401 2010-04-01 Pedro Alves <pedro@codesourcery.com>
18402
18403 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
18404 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
18405 if we could tell there's a GDB breakpoint at stop_pc.
18406 (need_step_over_p): Don't do a step over if we find a GDB
18407 breakpoint at the resume PC.
18408
18409 * mem-break.c (struct raw_breakpoint): New.
18410 (enum bkpt_type): New type `gdb_breakpoint'.
18411 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
18412 fields. New field `raw'.
18413 (find_raw_breakpoint_at): New.
18414 (set_raw_breakpoint_at): Handle refcounting. Create a raw
18415 breakpoint instead.
18416 (set_breakpoint_at): Adjust.
18417 (delete_raw_breakpoint): New.
18418 (release_breakpoint): New.
18419 (delete_breakpoint): Rename to...
18420 (delete_breakpoint_1): ... this. Add proc parameter. Use
18421 release_breakpoint. Return ENOENT.
18422 (delete_breakpoint): Reimplement.
18423 (find_breakpoint_at): Delete.
18424 (find_gdb_breakpoint_at): New.
18425 (delete_breakpoint_at): Delete.
18426 (set_gdb_breakpoint_at): New.
18427 (delete_gdb_breakpoint_at): New.
18428 (gdb_breakpoint_here): New.
18429 (set_reinsert_breakpoint): Use release_breakpoint.
18430 (uninsert_breakpoint): Rename to ...
18431 (uninsert_raw_breakpoint): ... this.
18432 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
18433 (reinsert_raw_breakpoint): Change parameter type to
18434 raw_breakpoint.
18435 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
18436 instead.
18437 (check_breakpoints): Adjust. Use release_breakpoint.
18438 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
18439 (breakpoint_inserted_here): Ditto.
18440 (check_mem_read): Adjust to iterate over raw breakpoints instead.
18441 Don't trust the breakpoint's shadow if it is not inserted.
18442 (check_mem_write): Adjust to iterate over raw breakpoints instead.
18443 (delete_all_breakpoints): Adjust.
18444 (free_all_breakpoints): Mark all breakpoints as uninserted, and
18445 use delete_breakpoint_1.
18446
18447 * mem-break.h (breakpoints_supported): Delete declaration.
18448 (set_gdb_breakpoint_at): Declare.
18449 (gdb_breakpoint_here): Declare.
18450 (delete_breakpoint_at): Delete.
18451 (delete_gdb_breakpoint_at): Declare.
18452
18453 * server.h (struct raw_breakpoint): Forward declare.
18454 (struct process_info): New field `raw_breakpoints'.
18455
18456 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
18457 breakpoints.
18458
18459 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18460
18461 * linux-low.c (status_pending_p_callback): Fix comment.
18462 (linux_wait_for_event_1): Move most of the internal breakpoint
18463 handling from here...
18464 (linux_wait_1): ... to here.
18465 (count_events_callback): New.
18466 (select_singlestep_lwp_callback): New.
18467 (select_event_lwp_callback): New.
18468 (cancel_breakpoints_callback): New.
18469 (select_event_lwp): New.
18470 (linux_wait_1): Simplify internal breakpoint handling. Give equal
18471 priority to all LWPs that have had events that should be reported
18472 to the client. Cancel breakpoints when about to reporting the
18473 event to the client, not while stopping lwps. No longer cancel
18474 finished single-steps here.
18475 (cancel_finished_single_step): Delete.
18476 (cancel_finished_single_steps): Delete.
18477
18478 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18479
18480 * mem-break.c (enum bkpt_type): New.
18481 (struct breakpoint): New field `type'.
18482 (set_breakpoint_at): Change return type to struct breakpoint
18483 pointer. Set type to `other_breakpoint' by default.
18484 (delete_breakpoint): Rewrite, supporting more than one breakpoint
18485 in the breakpoint list.
18486 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
18487 (reinsert_breakpoint): Rename to ...
18488 (reinsert_raw_breakpoint): ... this.
18489 (reinsert_breakpoints_at): Adjust.
18490 * mem-break.h (struct breakpoint): Declare.
18491 (set_breakpoint_at): Change return type to struct breakpoint
18492 pointer.
18493
18494 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18495
18496 * server.c (handle_query): Assign, not compare.
18497
18498 2010-03-24 Pedro Alves <pedro@codesourcery.com>
18499
18500 Teach linux gdbserver to step-over-breakpoints.
18501
18502 * linux-low.c (can_hardware_single_step): New.
18503 (supports_breakpoints): New.
18504 (handle_extended_wait): If stopping threads, read the stop pc of
18505 the new cloned LWP.
18506 (get_pc): New.
18507 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
18508 low target doesn't support retrieving the PC.
18509 (add_lwp): Set last_resume_kind to resume_continue.
18510 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
18511 (linux_attach): Don't clear stop_expected. Set the lwp's
18512 last_resume_kind to resume_stop.
18513 (linux_detach_one_lwp): Don't check for removed breakpoints.
18514 (check_removed_breakpoint): Delete.
18515 (status_pending_p): Rename to ...
18516 (status_pending_p_callback): ... this. Don't check for removed
18517 breakpoints. Don't consider threads that are stopped from GDB's
18518 perspective.
18519 (linux_wait_for_lwp): Always read the stop_pc here.
18520 (cancel_breakpoint): New.
18521 (step_over_bkpt): New global.
18522 (linux_wait_for_event_1): Implement stepping over breakpoints.
18523 (gdb_wants_lwp_stopped): New.
18524 (gdb_wants_all_stopped): New.
18525 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
18526 single-step traps here. Store the thread's last reported target
18527 wait status.
18528 (send_sigstop): Don't clear stop_expected. Always set it,
18529 instead.
18530 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
18531 (cancel_finished_single_step): New.
18532 (cancel_finished_single_steps): New.
18533 (wait_for_sigstop): Don't cancel finished single-step traps here.
18534 (linux_resume_one_lwp): Don't check for removed breakpoints.
18535 Don't set `step' on non-hardware step archs.
18536 (linux_set_resume_request): Ignore resume_stop requests if already
18537 stopping or stopped. Set the lwp's last_resume_kind.
18538 (resume_status_pending_p): Don't check for removed breakpoints.
18539 (need_step_over_p): New.
18540 (start_step_over): New.
18541 (finish_step_over): New.
18542 (linux_resume_one_thread): Always queue a sigstop for resume_stop
18543 requests. Clear the thread's last reported target waitstatus.
18544 Don't use the `suspended' flag. Don't consider pending breakpoints.
18545 (linux_resume): Start a step-over if necessary.
18546 (proceed_one_lwp): New.
18547 (proceed_all_lwps): New.
18548 (unstop_all_lwps): New.
18549 * linux-low.h (struct lwp_info): Rewrite comment for the
18550 `suspended' flag. Add the `stop_pc' field. Delete the
18551 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
18552 Add `'last_resume_kind' and `need_step_over' fields.
18553 * inferiors.c (struct thread_info): Delete, moved elsewhere.
18554 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
18555 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
18556 (set_raw_breakpoint_at): New.
18557 (set_breakpoint_at): Rewrite to use it.
18558 (reinsert_breakpoint_handler): Delete.
18559 (set_reinsert_breakpoint): New.
18560 (reinsert_breakpoint_by_bp): Delete.
18561 (delete_reinsert_breakpoints): New.
18562 (uninsert_breakpoint): Rewrite.
18563 (uninsert_breakpoints_at): New.
18564 (reinsert_breakpoint): Rewrite.
18565 (reinsert_breakpoints_at): New.
18566 (check_breakpoints): Rewrite.
18567 (breakpoint_here): New.
18568 (breakpoint_inserted_here): New.
18569 (check_mem_read): Adjust.
18570 * mem-break.h (breakpoints_supported, breakpoint_here)
18571 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
18572 (reinsert_breakpoint_by_bp): Delete declaration.
18573 (delete_reinsert_breakpoints): Declare.
18574 (reinsert_breakpoint): Delete declaration.
18575 (reinsert_breakpoints_at): Declare.
18576 (uninsert_breakpoint): Delete declaration.
18577 (uninsert_breakpoints_at): Declare.
18578 (check_breakpoints): Adjust prototype.
18579 * server.h: Adjust include order.
18580 (struct thread_info): Declare here. Add a `last_status' field.
18581
18582 2010-03-23 Michael Snyder <msnyder@vmware.com>
18583
18584 * server.c (crc32): New function.
18585 (handle_query): Add handling for 'qCRC:' request.
18586
18587 2010-03-23 Pedro Alves <pedro@codesourcery.com>
18588
18589 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
18590 lwp had been stopped by a watchpoint.
18591
18592 2010-03-16 Pedro Alves <pedro@codesourcery.com>
18593
18594 * server.h (internal_error): Declare.
18595 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
18596 * utils.c (internal_error): New function.
18597
18598 2010-03-15 Andreas Schwab <schwab@redhat.com>
18599
18600 * configure.srv: Fix typo setting srv_regobj.
18601
18602 2010-03-15 Pedro Alves <pedro@codesourcery.com>
18603
18604 * linux-low.c (fetch_register): Avoid passing a non string literal
18605 format to `error'.
18606 (usr_store_inferior_registers): Ditto.
18607
18608 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18609
18610 * linux-low.c (linux_write_memory): Bail out early if peeking
18611 memory failed.
18612
18613 2010-03-14 Pedro Alves <pedro@codesourcery.com>
18614
18615 * linux-low.h (struct lwp_info): New fields
18616 `stopped_by_watchpoint' and `stopped_data_address'.
18617 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
18618 here, and cache them in the lwp object.
18619 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
18620 directly.
18621 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
18622 field.
18623 (linux_stopped_by_watchpoint): Rewrite.
18624 (linux_stopped_data_address): Rewrite.
18625
18626 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
18627
18628 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
18629 switching the current inferior, not before.
18630
18631 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
18632
18633 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
18634 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
18635 i386-linux.c and amd64-linux.c.
18636 (reg-i386.o): Removed.
18637 (reg-i386.c): Likewise.
18638 (reg-i386-linux.o): Likewise.
18639 (reg-i386-linux.c): Likewise.
18640 (reg-x86-64.o): Likewise.
18641 (reg-x86-64.c): Likewise.
18642 (reg-x86-64-linux.o): Likewise.
18643 (reg-x86-64-linux.c): Likewise.
18644 (i386.o): New.
18645 (i386.c): Likewise.
18646 (i386-linux.o): Likewise.
18647 (i386-linux.c): Likewise.
18648 (amd64.o): Likewise.
18649 (amd64.c): Likewise.
18650 (amd64-linux.o): Likewise.
18651 (amd64-linux.c): Likewise.
18652
18653 * configure.srv (srv_i386_regobj): New.
18654 (srv_i386_linux_regobj): Likewise.
18655 (srv_amd64_regobj): Likewise.
18656 (srv_amd64_linux_regobj): Likewise.
18657 (srv_i386_32bit_xmlfiles): Likewise.
18658 (srv_i386_64bit_xmlfiles): Likewise.
18659 (srv_i386_xmlfiles): Likewise.
18660 (srv_amd64_xmlfiles): Likewise.
18661 (srv_i386_linux_xmlfiles): Likewise.
18662 (srv_amd64_linux_xmlfiles): Likewise.
18663 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
18664 srv_xmlfiles to $srv_i386_xmlfiles.
18665 (i[34567]86-*-mingw32ce*): Likewise.
18666 (i[34567]86-*-mingw*): Likewise.
18667 (i[34567]86-*-nto*): Likewise.
18668 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
18669 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
18670 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
18671 (x86_64-*-linux*): Likewise.
18672
18673 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
18674 (init_registers_amd64_linux): New.
18675 (x86_arch_setup): Replace init_registers_x86_64_linux with
18676 init_registers_amd64_linux.
18677
18678 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
18679
18680 * configure.ac: Check for libdl. If it is not available link against
18681 static libthread_db.
18682 * configure: Regenerate.
18683
18684 2010-02-22 Pedro Alves <pedro@codesourcery.com>
18685
18686 PR9605
18687
18688 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
18689 handing a read watchpoint.
18690 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
18691
18692 2010-02-12 Doug Evans <dje@google.com>
18693
18694 * linux-low.c (linux_supports_tracefork_flag): Document.
18695 (linux_look_up_symbols): Add comment.
18696
18697 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
18698
18699 * regcache.c (supply_register): Clear regcache if buf is NULL.
18700
18701 2010-02-02 Nicolas Roche <roche@sourceware.org>
18702 Joel Brobecker <brobecker@adacore.com>
18703
18704 * inferiors.c (find_inferior): Add function documentation.
18705 (unloaded_dll): Handle the case where the unloaded dll has not
18706 been previously registered in the dll list.
18707
18708 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
18709
18710 * linux-arm-low.c (thumb_breakpoint_len): Delete.
18711 (thumb2_breakpoint): New.
18712 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
18713
18714 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
18715
18716 * linux-low.c (get_stop_pc): Check for SIGTRAP.
18717 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
18718 breakpoints.
18719
18720 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18721
18722 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
18723
18724 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
18725
18726 * linux-s390-low.c (s390_collect_ptrace_register)
18727 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
18728
18729 2010-01-21 Doug Evans <dje@google.com>
18730
18731 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
18732 (PTRACE_ARG4_TYPE): New macro.
18733 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
18734 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
18735 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
18736 (usr_store_inferior_registers): Ditto.
18737 (linux_read_memory, linux_write_memory): Ditto.
18738 (linux_test_for_tracefork): Ditto.
18739
18740 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
18741 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
18742
18743 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18744
18745 * proc-service.c (ps_lgetregs): Don't refetch registers from the
18746 target.
18747
18748 2010-01-21 Pedro Alves <pedro@codesourcery.com>
18749
18750 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
18751 prototype to take a regcache. Adjust.
18752
18753 2010-01-20 Pedro Alves <pedro@codesourcery.com>
18754
18755 * regcache.h (struct thread_info): Forward declare.
18756 (struct regcache): New.
18757 (new_register_cache): Adjust prototype.
18758 (get_thread_regcache): Declare.
18759 (free_register_cache): Adjust prototype.
18760 (registers_to_string, registers_from_string): Ditto.
18761 (supply_register, supply_register_by_name, collect_register)
18762 (collect_register_as_string, collect_register_by_name): Ditto.
18763 * regcache.c (struct inferior_regcache_data): Delete.
18764 (get_regcache): Rename to ...
18765 (get_thread_regcache): ... this. Adjust. Switch inferior before
18766 fetching registers.
18767 (regcache_invalidate_one): Adjust.
18768 (regcache_invalidate): Fix prototype.
18769 (new_register_cache): Return the new register cache.
18770 (free_register_cache): Change prototype.
18771 (realloc_register_cache): Adjust.
18772 (registers_to_string): Change prototype to take a regcache. Adjust.
18773 (registers_from_string): Ditto.
18774 (register_data): Ditto.
18775 (supply_register): Ditto.
18776 (supply_register_by_name): Ditto.
18777 (collect_register): Ditto.
18778 (collect_register_as_string): Ditto.
18779 (collect_register_by_name): Ditto.
18780 * server.c (process_serial_event): Adjust.
18781 * linux-low.h (regset_fill_func, regset_store_func): Change
18782 prototype.
18783 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
18784 Change prototype.
18785 * linux-low.c (get_stop_pc): Adjust.
18786 (check_removed_breakpoint): Adjust.
18787 (linux_wait_for_event): Adjust.
18788 (linux_resume_one_lwp): Adjust.
18789 (fetch_register): Add regcache parameter. Adjust.
18790 (usr_store_inferior_registers): Ditto.
18791 (regsets_fetch_inferior_registers): Ditto.
18792 (regsets_store_inferior_registers): Ditto.
18793 (linux_fetch_registers, linux_store_registers): Ditto.
18794 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
18795 regcache. Adjust.
18796 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
18797 Ditto.
18798 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
18799 prototype to take a regcache.
18800 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
18801 * remote-utils.c (convert_ascii_to_int, outreg)
18802 (prepare_resume_reply): Change prototype to take a regcache.
18803 Adjust.
18804 * target.h (struct target_ops) <fetch_registers, store_registers>:
18805 Change prototype to take a regcache.
18806 (fetch_inferior_registers, store_inferior_registers): Change
18807 prototype to take a regcache. Adjust.
18808 * proc-service.c (ps_lgetregs): Adjust.
18809 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
18810 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
18811 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
18812 take a regcache. Adjust.
18813 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
18814 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
18815 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
18816 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
18817 * linux-cris-low.c (cris_get_pc, cris_set_pc)
18818 (cris_cannot_fetch_register):
18819 (cris_breakpoint_at): Change prototype to take a regcache.
18820 Adjust.
18821 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
18822 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
18823 to take a regcache. Adjust.
18824 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
18825 Adjust.
18826 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
18827 take a regcache. Adjust.
18828 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
18829 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
18830 (m68k_set_pc): Change prototype to take a regcache. Adjust.
18831 * linux-mips-low.c (mips_get_pc):
18832 (mips_set_pc): Change prototype to take a regcache. Adjust.
18833 (mips_reinsert_addr): Adjust.
18834 (mips_collect_register): Change prototype to take a regcache.
18835 Adjust.
18836 (mips_supply_register):
18837 (mips_collect_register_32bit, mips_supply_register_32bit)
18838 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
18839 (mips_store_fpregset): Ditto.
18840 * linux-ppc-low.c (ppc_supply_ptrace_register)
18841 (ppc_supply_ptrace_register): Ditto.
18842 (parse_spufs_run): Adjust.
18843 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
18844 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
18845 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
18846 take a regcache. Adjust.
18847 * linux-s390-low.c (s390_collect_ptrace_register)
18848 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
18849 (s390_set_pc): Change prototype to take a regcache. Adjust.
18850 (s390_arch_setup): Adjust.
18851 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
18852 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
18853 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
18854 (sparc_fill_gregset, sparc_store_gregset_from_stack)
18855 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
18856 regcache. Adjust.
18857 (sparc_breakpoint_at): Adjust.
18858 * linux-xtensa-low.c (xtensa_fill_gregset):
18859 (xtensa_store_gregset):
18860 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
18861 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
18862 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
18863 prototype to take a regcache. Adjust.
18864 * win32-arm-low.c (arm_fetch_inferior_register)
18865 (arm_store_inferior_register): Change prototype to take a
18866 regcache. Adjust.
18867 * win32-i386-low.c (i386_fetch_inferior_register)
18868 (i386_store_inferior_register): Change prototype to take a
18869 regcache. Adjust.
18870 * win32-low.c (child_fetch_inferior_registers)
18871 (child_store_inferior_registers): Change prototype to take a
18872 regcache. Adjust.
18873 (win32_wait): Adjust.
18874 (win32_fetch_inferior_registers): Change prototype to take a
18875 regcache. Adjust.
18876 (win32_store_inferior_registers): Adjust.
18877 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
18878 store_inferior_register>: Change prototype to take a regcache.
18879
18880 2010-01-20 Doug Evans <dje@google.com>
18881
18882 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
18883 #ifdef.
18884 (linux_wait_for_event1, linux_init_signals): Ditto.
18885 (W_STOPCODE): Provide definition if missing.
18886
18887 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
18888
18889 * linux-low.c (linux_core_of_thread): New.
18890 (compare_ints, show_process, list_threads): New.
18891 (linux_qxfer_osdata): Report threads and cores.
18892 (linux_target_op): Register linux_core_of_thread.
18893 * remote-utils.c (prepare_resume_reply): Report the core.
18894 (buffer_xml_printf): Support %d specifier.
18895 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
18896 New.
18897 (handle_query): Handle qXfer:threads. Announce availability
18898 thereof.
18899 * target.h (struct target_ops): New field core_of_thread.
18900
18901 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
18902
18903 * Makefile.in (clean): Remove new generated files.
18904 (reg-s390.o, reg-s390.c): Remove rules.
18905 (reg-s390x.o, reg-s390x.c): Likewise.
18906 (s390-linux32.o, s390-linux32.c): Add rules.
18907 (s390-linux64.o, s390-linux64.c): Likewise.
18908 (s390x-linux64.o, s390x-linux64.c): Likewise.
18909 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
18910 * linux-s390-low.c: Include <elf.h>.
18911 (HWCAP_S390_HIGH_GPRS): Define if undefined.
18912 (init_registers_s390): Remove prototype.
18913 (init_registers_s390x): Likewise.
18914 (init_registers_s390_linux32): Add prototype.
18915 (init_registers_s390_linux64): Likewise.
18916 (init_registers_s390x_linux64): Likewise.
18917 (s390_num_regs_3264): New define.
18918 (s390_regmap_3264): New global variable.
18919 (s390_cannot_fetch_register): Remove obsolete check.
18920 (s390_cannot_store_register): Likewise.
18921 (s390_collect_ptrace_register): Handle upper/lower register halves.
18922 (s390_supply_ptrace_register): Likewise.
18923 (s390_fill_gregset): Update to register number changes.
18924 (s390_get_hwcap): New routine.
18925 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
18926 Install appropriate regmap and register set.
18927
18928 2010-01-01 Joel Brobecker <brobecker@adacore.com>
18929
18930 * server.c (gdbserver_version): Update copyright year to 2010.
18931 * gdbreplay.c (gdbreplay_version): Likewise.
18932
18933 2009-12-28 Doug Evans <dje@google.com>
18934
18935 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
18936 elf/external.h. Include <elf.h> instead but only if necessary.
18937
18938 2009-12-28 Pedro Alves <pedro@codesourcery.com>
18939
18940 * linux-low.c (linux_remove_process): Remove `detaching'
18941 parameter. Don't release/detach from thread_db here.
18942 (linux_kill): Release/detach from thread_db here, ...
18943 (linux_detach): ... and here, before actually detaching.
18944 (linux_wait_1): ... and here, when a process exits.
18945 * thread-db.c (any_thread_of): New.
18946 (thread_db_free): Switch the current inferior to a thread of the
18947 passed in process.
18948
18949 2009-12-21 Doug Evans <dje@google.com>
18950
18951 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
18952
18953 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
18954 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
18955 warning ifndef __NR_tkill. Move setting of errno there too.
18956 Delete unnecessary resetting of errno after syscall.
18957 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
18958
18959 * configure.ac: Check for dladdr.
18960 * config.in: Regenerate.
18961 * configure: Regenerate.
18962 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
18963 (try_thread_db_load): Update.
18964
18965 * linux-low.c (my_waitpid): Delete unnecessary prototype.
18966
18967 2009-12-18 Doug Evans <dje@google.com>
18968
18969 * event-loop.c: Include unistd.h if it exists.
18970
18971 * linux-low.c (my_waitpid): Move definition away from being in
18972 between linux_tracefork_child/linux_test_for_tracefork.
18973
18974 * gdb_proc_service.h (psaddr_t): Fix type.
18975 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
18976 signature to match glibc.
18977
18978 2009-12-16 Doug Evans <dje@google.com>
18979
18980 * linux-low.c (linux_read_memory): Fix argument to read.
18981
18982 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18983
18984 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
18985 events, don't leave current_inferior pointing at null.
18986
18987 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18988
18989 * win32-low.c (LOG): Delete.
18990 (OUTMSG): Output to stderr.
18991 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
18992 on compile time LOG macro.
18993 (win32_wait): Fix debug output.
18994
18995 2009-11-26 Pedro Alves <pedro@codesourcery.com>
18996
18997 * win32-low.c (win32_add_one_solib): If the dll name is
18998 "ntdll.dll", prepend the system directory to the dll path.
18999
19000 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
19001
19002 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
19003
19004 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
19005 Vladimir Prus <vladimir@codesourcery.com>
19006
19007 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
19008 * configure.ac: Check for __mcoldfire__ and set
19009 gdb_cv_m68k_is_coldfire.
19010 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
19011 reg-cf.o and reg-m68k.o.
19012 * configure: Regenerated.
19013
19014 2009-11-16 Pedro Alves <pedro@codesourcery.com>
19015
19016 * linux-low.c (linux_remove_process): Add `detaching' parameter.
19017 Pass it to thread_db_free.
19018 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
19019 proper `detaching' argument to linux_remove_process.
19020 * linux-low.h (thread_db_free): Add `detaching' parameter.
19021 * thread-db.c (thread_db_init): Pass false as `detaching' argument
19022 to thread_db_free.
19023 (thread_db_free): Add `detaching' parameter. Only
19024 call td_ta_clear_event if detaching from process.
19025
19026 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
19027
19028 * thread-db.c (thread_db_free): Fix typo.
19029
19030 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
19031
19032 PR gdb/10838
19033 * thread-db.c (thread_db_free): Call td_ta_clear_event.
19034
19035 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
19036
19037 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
19038 with an i686 compiler.
19039 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
19040 needed.
19041 * configure: Rebuilt.
19042
19043 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
19044
19045 PR gdb/10783
19046
19047 * server.c (handle_search_memory_1): Correct read_addr initialization
19048 in loop for searching subsequent chunks.
19049
19050 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
19051
19052 * configure.ac: New --with-libthread-db option.
19053 * thread-db.c: Allow direct dependence on libthread_db.
19054 (thread_db_free): Adjust.
19055 * config.in: Regenerate.
19056 * configure: Likewise.
19057
19058 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
19059
19060 PR gdb/10757
19061 * thread-db.c (attach_thread): New function.
19062 (maybe_attach_thread): Return success/failure.
19063 (find_new_threads_callback): Adjust.
19064 (thread_db_find_new_threads): Loop until no new threads.
19065
19066 2009-10-13 Pedro Alves <pedro@codesourcery.com>
19067
19068 * proc-service.c (ps_lgetregs): Formatting.
19069
19070 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
19071
19072 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
19073 * configure.ac: Adjust.
19074 * linux-low.h (struct process_info_private): Move members to struct
19075 thread_db.
19076 (thread_db_free, thread_db_handle_monitor_command): New prototype.
19077 * linux-low.c (linux_remove_process): Adjust.
19078 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
19079 * server.c (handle_query): Move code ...
19080 (handle_monitor_command): ... here. New function.
19081 * target.h (struct target_ops): New member.
19082 * thread-db.c (struct thread_db): New.
19083 (libthread_db_search_path): New variable.
19084 (thread_db_create_event, thread_db_enable_reporting)
19085 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
19086 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
19087 (try_thread_db_load_1, dladdr_to_soname): New functions.
19088 (try_thread_db_load, thread_db_load_search): New functions.
19089 (thread_db_init): Search for libthread_db.
19090 (thread_db_free): New function.
19091 (thread_db_handle_monitor_command): Likewise.
19092 * config.in: Regenerate.
19093 * configure: Regenerate.
19094
19095 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
19096
19097 * spu-low.c (spu_kill): Wait for inferior to terminate.
19098 Call clear_inferiors.
19099 (spu_detach): Call clear_inferiors.
19100
19101 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19102
19103 * aclocal.m4: Regenerate.
19104 * config.in: Likewise.
19105 * configure: Likewise.
19106
19107 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
19108
19109 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
19110 (parse_spufs_run): New function.
19111 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
19112 (ppc_breakpoint_at): Handle SPU breakpoints.
19113
19114 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
19115
19116 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
19117 (SPUFS_MAGIC): Define.
19118 (spu_enumerate_spu_ids): New function.
19119 (linux_qxfer_spu): New function.
19120 (linux_target_ops): Install linux_qxfer_spu.
19121
19122 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
19123
19124 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
19125 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
19126 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
19127 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
19128 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
19129 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
19130 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
19131 (init_registers_powerpc_cell32l): Add prototype.
19132 (init_registers_powerpc_cell64l): Likewise.
19133 (ppc_arch_setup): Detect Cell/B.E. architecture.
19134
19135 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19136
19137 * Makefile.in (datarootdir): New variable.
19138
19139 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
19140
19141 * linux-low.c (linux_write_memory): Update debugging output.
19142 * Makefile.in (clean): Add new descriptions.
19143 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
19144 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
19145 * configure.srv: Add new files for arm*-*-linux*.
19146 * linux-arm-low.c: Add new declarations.
19147 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
19148 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
19149 (HWCAP_VFPv3D16): New.
19150 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
19151 instead of __IWMMXT__.
19152 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
19153 (arm_arch_setup): New.
19154 (target_regsets): Remove #ifdef. Add VFP regset.
19155 (the_low_target): Use arm_arch_setup.
19156
19157 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
19158
19159 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
19160 the main thread again.
19161
19162 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
19163
19164 Adding Neutrino gdbserver.
19165 * configure: Regenerated.
19166 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
19167 * configure.srv (i[34567]86-*-nto*): New target.
19168 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
19169 * remote-utils.c [__QNX__]: Include sys/iomgr.h
19170 (nto_comctrl) [__QNX__]: New function.
19171 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
19172
19173 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
19174
19175 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
19176 srv_tgtobj.
19177
19178 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
19179 Pedro Alves <pedro@codesourcery.com>
19180
19181 * win32-i386-low.c (i386_get_thread_context): Handle systems that
19182 don't support CONTEXT_EXTENDED_REGISTERS.
19183 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
19184 (the_low_target): Install them.
19185 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
19186 failing with ERROR_PIPE_NOT_CONNECTED.
19187
19188 2009-06-30 Doug Evans <dje@google.com>
19189 Pierre Muller <muller@ics.u-strasbg.fr>
19190
19191 Add h/w watchpoint support to x86-linux, win32-i386.
19192 * Makefile.in (SFILES): Add i386-low.c
19193 (i386_low_h): Define.
19194 (i386-low.o): Add dependencies.
19195 (linux-x86-low.o): Add i386-low.h dependency.
19196 (win32-i386-low.o): Ditto.
19197 * i386-low.c: New file.
19198 * i386-low.h: New file.
19199 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
19200 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
19201 * linux-low.c (linux_add_process): Initialize arch_private.
19202 (linux_remove_process): Free arch_private.
19203 (add_lwp): Initialize arch_private.
19204 (delete_lwp): Free arch_private.
19205 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
19206 provided.
19207 * linux-low.h (process_info_private): New member arch_private.
19208 (lwp_info): New member arch_private.
19209 (linux_target_ops): New members new_process, new_thread,
19210 prepare_to_resume.
19211 (ptid_of): New macro.
19212 * linux-x86-low.c: Include stddef.h, i386-low.h.
19213 (arch_process_info): New struct.
19214 (arch_lwp_info): New struct.
19215 (x86_linux_dr_get, x86_linux_dr_set): New functions.
19216 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
19217 (i386_dr_low_get_status): New function.
19218 (x86_insert_point, x86_remove_point): New functions.
19219 (x86_stopped_by_watchpoint): New function.
19220 (x86_stopped_data_address): New function.
19221 (x86_linux_new_process, x86_linux_new_thread): New functions.
19222 (x86_linux_prepare_to_resume): New function.
19223 (the_low_target): Add entries for insert_point, remove_point,
19224 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
19225 prepare_to_resume.
19226 * server.c (debug_hw_points): New global.
19227 (monitor_show_help): Document set debug-hw-points.
19228 (handle_query): Process "set debug-hw-points".
19229 * server.h (debug_hw_points): Declare.
19230 (paddress): Declare.
19231 * utils.c (NUMCELLS, CELLSIZE): New macros.
19232 (get_sell, xsnprintf, paddress): New functions.
19233 * win32-arm-low.c (the_low_target): Add entries for insert_point,
19234 remove_point, stopped_by_watchpoint, stopped_data_address.
19235 * win32-i386-low.c: Include i386-low.h.
19236 (debug_reg_state): Replaces dr.
19237 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
19238 (i386_dr_low_get_status): New function.
19239 (i386_insert_point, i386_remove_point): New functions.
19240 (i386_stopped_by_watchpoint): New function.
19241 (i386_stopped_data_address): New function.
19242 (i386_initial_stuff): Update.
19243 (get_thread_context,set_thread_context,i386_thread_added): Update.
19244 (the_low_target): Add entries for insert_point,
19245 remove_point, stopped_by_watchpoint, stopped_data_address.
19246 * win32-low.c (win32_insert_watchpoint): New function.
19247 (win32_remove_watchpoint): New function.
19248 (win32_stopped_by_watchpoint): New function.
19249 (win32_stopped_data_address): New function.
19250 (win32_target_ops): Add entries for insert_watchpoint,
19251 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
19252 * win32-low.h (win32_target_ops): New members insert_point,
19253 remove_point, stopped_by_watchpoint, stopped_data_address.
19254
19255 2009-06-25 Pedro Alves <pedro@codesourcery.com>
19256
19257 * server.c (process_serial_event): Re-return unsupported, not
19258 error, if the type isn't recognized. Re-allow supporting only
19259 insert or remove packets. Also call require_running for
19260 breakpoints. Add missing break statement to default case. Tidy.
19261 * target.h (struct target_ops): Rename insert_watchpoint to
19262 insert_point, and remove_watchpoint to remove_point.
19263
19264 * linux-low.h (struct linux_target_ops): Likewise.
19265 * linux-low.c (linux_insert_watchpoint): Rename to ...
19266 (linux_insert_point): ... this. Adjust.
19267 (linux_remove_watchpoint): Rename to ...
19268 (linux_remove_point): ... this. Adjust.
19269 (linux_target_ops): Adjust.
19270 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
19271 (cris_insert_point): ... this.
19272 (cris_remove_watchpoint): Rename to ...
19273 (cris_remove_point): ... this.
19274 (the_low_target): Adjust.
19275
19276 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
19277
19278 * server.c (handle_v_kill): Pass signal_pid to
19279 kill_inferior if multi_process is zero.
19280
19281 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
19282
19283 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
19284 * target.h (target_ops): Comment for *_watchpoint to make it clear
19285 the functions can get types '0' and '1'.
19286
19287 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
19288
19289 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
19290 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
19291 * regcache.c (get_regcache): Likewise.
19292 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
19293 * win32-low.c (child_fetch_inferior_registers): Remove check for
19294 regno 0.
19295
19296 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
19297 Pedro Alves <pedro@codesourcery.com>
19298
19299 * target.h (struct target_ops) <supports_multi_process>: New
19300 callback.
19301 (target_supports_multi_process): New.
19302 * server.c (handle_query): Even if GDB reports support, only
19303 enable multi-process if the target also supports it. Report
19304 multi-process support only if the target backend supports it.
19305 * linux-low.c (linux_supports_multi_process): New function.
19306 (linux_target_ops): Install it as target_supports_multi_process
19307 callback.
19308
19309 2009-05-24 Doug Evans <dje@google.com>
19310
19311 Global renaming of find_thread_pid to find_thread_ptid.
19312 * server.h (find_thread_ptid): Renamed from find_thread_pid.
19313 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
19314 All callers updated.
19315
19316 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
19317 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
19318 directly.
19319
19320 * linux-low.c (get_stop_pc): Print pc if debug_threads.
19321 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
19322 (linux_resume_one_lwp): Ditto.
19323
19324 2009-05-23 Doug Evans <dje@google.com>
19325
19326 * linux-low.c (linux_resume_one_lwp): Change type of first arg
19327 from struct inferior_list_entry * to struct lwp_info *.
19328 All callers updated.
19329
19330 2009-05-13 Doug Evans <dje@google.com>
19331
19332 * linux-x86-low.c: Don't include assert.h.
19333 (x86_siginfo_fixup): Use fatal, not assert.
19334 (x86_arch_setup): Fix comment.
19335
19336 2009-05-12 Doug Evans <dje@google.com>
19337
19338 Biarch support for i386/amd64 gdbserver.
19339 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
19340 Add linux-x86-low.c.
19341 (linux-i386-low.o, linux-x86-64-low.o): Delete.
19342 (linux-x86-low.o): Add.
19343 * linux-x86-64-low.c: Delete.
19344 * linux-i386-low.c: Delete.
19345 * linux-x86-low.c: New file.
19346 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
19347 linux-x86-low.o.
19348 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
19349 linux-x86-low.o.
19350 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
19351 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
19352 (linux_child_pid_to_exec_file): New function.
19353 (elf_64_header_p, elf_64_file_p): New functions.
19354 (siginfo_fixup): New function.
19355 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
19356 give target a chance to convert layout.
19357 * linux-low.h (linux_target_ops): New member siginfo_fixup.
19358 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
19359
19360 2009-05-07 Doug Evans <dje@google.com>
19361
19362 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
19363 (regsets_store_inferior_registers): Ditto.
19364
19365 2009-05-06 Pedro Alves <pedro@codesourcery.com>
19366
19367 PR server/10048
19368
19369 * linux-low.c (must_set_ptrace_flags): Delete.
19370 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
19371 of the global.
19372 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
19373 `lwp->must_set_ptrace_flags' instead.
19374 (linux_wait_for_event_1): Set ptrace options here.
19375 (linux_wait_1): ... not here.
19376
19377 2009-04-30 Doug Evans <dje@google.com>
19378
19379 * inferiors.c (started_inferior_callback): New function.
19380 (attached_inferior_callback): New function.
19381 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
19382 * server.c (print_started_pid, print_attached_pid): New functions.
19383 (detach_or_kill_for_exit): New function.
19384 (main): Call it instead of for_each_inferior (kill_inferior_callback).
19385 * server.h (have_started_inferiors_p): Declare.
19386 (have_attached_inferiors_p): Declare.
19387
19388 * inferiors.c (remove_process): Fix memory leak, free process.
19389 * linux-low.c (linux_remove_process): New function.
19390 (linux_kill): Call it instead of remove_process.
19391 (linux_detach, linux_wait_1): Ditto.
19392
19393 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
19394
19395 * configure.srv: Add x86 Windows CE target.
19396
19397 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
19398
19399 * inferiors.c (get_thread_process): Make global.
19400 * server.h (get_thread_process): Add prototype.
19401 * thread-db.c (find_one_thread): Use get_thread_process
19402 instead of current_process.
19403 (thread_db_get_tls_address): Do not crash if called when
19404 thread layer is not yet initialized.
19405
19406 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
19407
19408 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
19409 * spu-low.c (current_tid): Rename to ...
19410 (current_ptid): ... this.
19411 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
19412 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
19413 ptid_get_lwp (current_ptid) instead of current_tid.
19414 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
19415 instead of current_tid. Use find_process_pid to verify pid
19416 argument is valid. Pass proper argument to remove_process.
19417 (spu_thread_alive): Compare current_ptid instead of current_tid.
19418 (spu_resume): Likewise.
19419
19420 2009-04-02 Pedro Alves <pedro@codesourcery.com>
19421
19422 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
19423 variable.
19424
19425 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19426
19427 Implement the multiprocess extensions, and add linux multiprocess
19428 support.
19429
19430 * server.h (ULONGEST): Declare.
19431 (struct ptid, ptid_t): New.
19432 (minus_one_ptid, null_ptid): Declare.
19433 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
19434 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
19435 (struct inferior_list_entry): Change `id' type from unsigned from
19436 to ptid_t.
19437 (struct sym_cache, struct breakpoint, struct
19438 process_info_private): Forward declare.
19439 (struct process_info): Declare.
19440 (current_process): Declare.
19441 (all_processes): Declare.
19442 (initialize_inferiors): Declare.
19443 (add_thread): Adjust to use ptid_t.
19444 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
19445 (add_process, remove_process, find_thread_pid): Declare.
19446 (find_inferior_id): Adjust to use ptid_t.
19447 (cont_thread, general_thread, step_thread): Change type to ptid_t.
19448 (multi_process): Declare.
19449 (push_event): Adjust to use ptid_t.
19450 (read_ptid, write_ptid): Declare.
19451 (prepare_resume_reply): Adjust to use ptid_t.
19452 (clear_symbol_cache): Declare.
19453 * inferiors.c (all_processes): New.
19454 (null_ptid, minus_one_ptid): New.
19455 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
19456 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
19457 (add_thread): Change unsigned long to ptid. Remove gdb_id
19458 parameter. Adjust.
19459 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
19460 (gdb_id_to_thread): Rename to ...
19461 (find_thread_pid): ... this. Change unsigned long to ptid.
19462 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
19463 (loaded_dll, pull_pid_from_list): Adjust.
19464 (add_process, remove_process, find_process_pid)
19465 (get_thread_process, current_process, initialize_inferiors): New.
19466 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
19467 (struct target_waitstatus) <related_pid>: Ditto.
19468 (struct target_ops) <kill, detach>: Add `pid' argument. Change
19469 return type to int.
19470 (struct target_ops) <join>: Add `pid' argument.
19471 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
19472 (struct target_ops) <wait>: Add `ptid' field. Change return type
19473 to ptid.
19474 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
19475 (mywait): Add `ptid' argument. Change return type to ptid_t.
19476 (target_pid_to_str): Declare.
19477 * target.c (set_desired_inferior): Adjust to use ptids.
19478 (mywait): Add new `ptid' argument. Adjust.
19479 (target_pid_to_str): New.
19480 * mem-break.h (free_all_breakpoints): Declare.
19481 * mem-break.c (breakpoints): Delelete.
19482 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
19483 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
19484 to use per-process breakpoint list.
19485 (free_all_breakpoints): New.
19486 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
19487 (symbol_cache, all_symbols_looked_up): Delete.
19488 (hexchars): New.
19489 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
19490 read_ptid): New.
19491 (prepare_resume_reply): Change ptid argument's type from unsigned
19492 long to ptid_t. Adjust. Implement W;process and X;process.
19493 (free_sym_cache, clear_symbol_cache): New.
19494 (look_up_one_symbol): Adjust to per-process symbol cache. *
19495 * server.c (cont_thread, general_thread, step_thread): Change type
19496 to ptid_t.
19497 (attached): Delete.
19498 (multi_process): New.
19499 (last_ptid): Change type to ptid_t.
19500 (struct vstop_notif) <ptid>: Change type to ptid_t.
19501 (queue_stop_reply, push_event): Change `ptid' argument's type to
19502 ptid_t.
19503 (discard_queued_stop_replies): Add `pid' argument.
19504 (start_inferior): Adjust to use ptids. Adjust to mywait interface
19505 changes. Don't reference the `attached' global.
19506 (attach_inferior): Adjust to mywait interface changes.
19507 (handle_query): Adjust to use ptids. Parse GDB's qSupported
19508 features. Handle and report "multiprocess+". Handle
19509 "qAttached:PID".
19510 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
19511 changes.
19512 (handle_v_kill): New.
19513 (handle_v_stopped): Adjust to use target_pid_to_str.
19514 (handle_v_requests): Allow multiple attaches and runs when
19515 multiprocess extensions are in effect. Handle "vKill".
19516 (myresume): Adjust to use ptids.
19517 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
19518 (handle_status): Adjust to discard_queued_stop_replies interface
19519 change.
19520 (first_thread_of, kill_inferior_callback)
19521 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
19522 (main): Call initialize_inferiors. Adjust to use ptids, killing
19523 and detaching from all inferiors. Handle multiprocess packet
19524 variants.
19525 * linux-low.h: Include gdb_proc_service.h.
19526 (struct process_info_private): New.
19527 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
19528 <lwpid_of>: Use ptid_get_lwp.
19529 (get_lwp_thread): Adjust.
19530 (struct lwp_info): Add `dead' member.
19531 (find_lwp_pid): Declare.
19532 * linux-low.c (thread_db_active): Delete.
19533 (new_inferior): Adjust comment.
19534 (inferior_pid): Delete.
19535 (linux_add_process): New.
19536 (handle_extended_wait): Adjust.
19537 (add_lwp): Change unsigned long to ptid.
19538 (linux_create_inferior): Add process to processes table. Adjust
19539 to use ptids. Don't set new_inferior here.
19540 (linux_attach_lwp): Rename to ...
19541 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
19542 it. Adjust to use ptids.
19543 (linux_attach_lwp): New.
19544 (linux_attach): Add process to processes table. Don't set
19545 new_inferior here.
19546 (struct counter): New.
19547 (second_thread_of_pid_p, last_thread_of_process_p): New.
19548 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
19549 multiple processes.
19550 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
19551 processes. Remove process from process table.
19552 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
19553 to multiple processes.
19554 (any_thread_of): New.
19555 (linux_detach): Add `pid' argument, and handle it. Remove process
19556 from processes table.
19557 (linux_join): Add `pid' argument. Handle it.
19558 (linux_thread_alive): Change unsighed long argument to ptid_t.
19559 Consider dead lwps as not being alive.
19560 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
19561 threads we're not interested in.
19562 (same_lwp, find_lwp_pid): New.
19563 (linux_wait_for_lwp): Change `pid' argument's type from int to
19564 ptid_t. Adjust.
19565 (linux_wait_for_event): Rename to ...
19566 (linux_wait_for_event_1): ... this. Change `pid' argument's type
19567 from int to ptid_t. Adjust.
19568 (linux_wait_for_event): New.
19569 (linux_wait_1): Add `ptid' argument. Change return type to
19570 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
19571 that exit from the process table.
19572 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
19573 Adjust.
19574 (mark_lwp_dead): New.
19575 (wait_for_sigstop): Adjust to use ptids. If a process exits while
19576 stopping all threads, mark its main lwp as dead.
19577 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
19578 ptids.
19579 (fetch_register, usr_store_inferior_registers)
19580 (regsets_fetch_inferior_registers)
19581 (regsets_store_inferior_registers, linux_read_memory)
19582 (linux_write_memory): Inline `inferior_pid'.
19583 (linux_look_up_symbols): Adjust to use per-process
19584 `thread_db_active'.
19585 (linux_request_interrupt): Adjust to use ptids.
19586 (linux_read_auxv): Inline `inferior_pid'.
19587 (initialize_low): Don't reference thread_db_active.
19588 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
19589 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
19590 (ps_getpid): Return the pid of the current inferior.
19591 * thread-db.c (proc_handle, thread_agent): Delete.
19592 (thread_db_create_event, thread_db_enable_reporting): Adjust to
19593 per-process data.
19594 (find_one_thread): Change argument type to ptid_t. Adjust to
19595 per-process data.
19596 (maybe_attach_thread): Adjust to per-process data and ptids.
19597 (thread_db_find_new_threads): Ditto.
19598 (thread_db_init): Ditto.
19599 * spu-low.c (spu_create_inferior, spu_attach): Add process to
19600 processes table. Adjust to use ptids.
19601 (spu_kill, spu_detach): Adjust interface. Remove process from
19602 processes table.
19603 (spu_join, spu_thread_alive): Adjust interface.
19604 (spu_wait): Adjust interface. Remove process from processes
19605 table. Adjust to use ptids.
19606 * win32-low.c (current_inferior_tid): Delete.
19607 (current_inferior_ptid): New.
19608 (debug_event_ptid): New.
19609 (thread_rec): Take a ptid. Adjust.
19610 (child_add_thread): Add `pid' argument. Adjust to use ptids.
19611 (child_delete_thread): Ditto.
19612 (do_initial_child_stuff): Add `attached' argument. Add process to
19613 processes table.
19614 (child_fetch_inferior_registers, child_store_inferior_registers):
19615 Adjust.
19616 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
19617 (win32_attach): Pass 1 to do_initial_child_stuff.
19618 (win32_kill): Adjust interface. Remove process from processes
19619 table.
19620 (win32_detach): Ditto.
19621 (win32_join): Adjust interface.
19622 (win32_thread_alive): Take a ptid.
19623 (win32_resume): Adjust to use ptids.
19624 (get_child_debug_event): Ditto.
19625 (win32_wait): Adjust interface. Remove exiting process from
19626 processes table.
19627
19628 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19629
19630 Non-stop mode support.
19631
19632 * server.h (non_stop): Declare.
19633 (gdb_client_data, handler_func): Declare.
19634 (delete_file_handler, add_file_handler, start_event_loop):
19635 Declare.
19636 (handle_serial_event, handle_target_event, push_event)
19637 (putpkt_notif): Declare.
19638 * target.h (enum resume_kind): New.
19639 (struct thread_resume): Replace `step' field by `kind' field.
19640 (TARGET_WNOHANG): Define.
19641 (struct target_ops) <wait>: Add `options' argument.
19642 <supports_non_stop, async, start_non_stop>: New fields.
19643 (target_supports_non_stop, target_async): New.
19644 (start_non_stop): Declare.
19645 (mywait): Add `options' argument.
19646 * target.c (mywait): Add `options' argument. Print child exit
19647 notifications here.
19648 (start_non_stop): New.
19649 * server.c (non_stop, own_buf, mem_buf): New globals.
19650 (struct vstop_notif): New.
19651 (notif_queue): New global.
19652 (queue_stop_reply, push_event, discard_queued_stop_replies)
19653 (send_next_stop_reply): New.
19654 (start_inferior): Adjust to use resume_kind. Adjust to mywait
19655 interface changes.
19656 (attach_inferior): In non-stop mode, don't wait for the target
19657 here.
19658 (handle_general_set): Handle QNonStop.
19659 (handle_query): When handling qC, return the current general
19660 thread, instead of the first thread of the list.
19661 (handle_query): If the backend supports non-stop mode, include
19662 QNonStop+ in the qSupported query response.
19663 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
19664 and non-stop mode.
19665 (handle_v_attach, handle_v_run): Handle non-stop mode.
19666 (handle_v_stopped): New.
19667 (handle_v_requests): Report support for vCont;t. Handle vStopped.
19668 (myresume): Adjust to use resume_kind. Handle non-stop.
19669 (queue_stop_reply_callback): New.
19670 (handle_status): Handle non-stop mode.
19671 (main): Clear non_stop flag on reconnection. Use the event-loop.
19672 Refactor serial protocol handling from here ...
19673 (process_serial_event): ... to this new function. When GDB
19674 selects any thread, select one here. In non-stop mode, wait until
19675 GDB acks all pending events before exiting.
19676 (handle_serial_event, handle_target_event): New.
19677 * remote-utils.c (remote_open): Install remote_desc in the event
19678 loop.
19679 (remote_close): Remove remote_desc from the event loop.
19680 (putpkt_binary): Rename to...
19681 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
19682 (putpkt_binary): New as wrapper around putpkt_binary_1.
19683 (putpkt_notif): New.
19684 (prepare_resume_reply): In non-stop mode, don't change the
19685 general_thread.
19686 * event-loop.c: New.
19687 * Makefile.in (OBJ): Add event-loop.o.
19688 (event-loop.o): New rule.
19689
19690 * linux-low.h (pid_of): Moved here.
19691 (lwpid_of): New.
19692 (get_lwp_thread): Use lwpid_of.
19693 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
19694 * linux-low.c (pid_of): Delete.
19695 (inferior_pid): Use lwpid_of.
19696 (linux_event_pipe): New.
19697 (target_is_async_p): New.
19698 (delete_lwp): New.
19699 (handle_extended_wait): Use lwpid_of.
19700 (add_lwp): Don't set lwpid field.
19701 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
19702 (linux_kill_one_lwp): If killing a running lwp, stop it first.
19703 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
19704 (linux_detach_one_lwp): If detaching from a running lwp, stop it
19705 first. Adjust to linux_wait_for_event interface changes. Use
19706 lwpid_of.
19707 (linux_detach): Don't delete the main lwp here.
19708 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
19709 (status_pending_p): Don't consider explicitly suspended lwps.
19710 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
19711 pointer. Add OPTIONS argument. Change return type to int. Use
19712 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
19713 (linux_wait_for_event): Take an integer pid instead of a lwp_info
19714 pointer. Add status pointer argument. Return a pid instead of a
19715 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
19716 changes. In non-stop mode, don't switch to a random thread.
19717 (linux_wait): Rename to...
19718 (linux_wait_1): ... this. Add target_options argument, and handle
19719 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
19720 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
19721 clean exit and signal exit code. Don't stop all threads in
19722 non-stop mode. In all-stop mode, only stop all threads when
19723 reporting a stop to GDB. Handle explicit thread stop requests.
19724 (async_file_flush, async_file_mark): New.
19725 (linux_wait): New.
19726 (send_sigstop): Use lwpid_of.
19727 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
19728 interface changes. In non-stop mode, don't switch to a random
19729 thread.
19730 (linux_resume_one_lwp): Use lwpid_of.
19731 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
19732 (linux_resume_one_thread): ... this. Handle resume_stop. In
19733 non-stop mode, don't look for pending flag in all threads.
19734 (resume_status_pending_p): Don't consider explicitly suspended
19735 threads.
19736 (my_waitpid): Reimplement. Emulate __WALL.
19737 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19738 Use lwpid_of.
19739 (sigchld_handler, linux_supports_non_stop, linux_async)
19740 (linux_start_non_stop): New.
19741 (linux_target_ops): Register linux_supports_non_stop, linux_async
19742 and linux_start_non_stop.
19743 (initialize_low): Install SIGCHLD handler.
19744 * thread-db.c (thread_db_create_event, find_one_thread)
19745 (thread_db_get_tls_address): Use lwpid_of.
19746 * win32-low.c (win32_detach): Adjust to use resume_kind.
19747 (win32_wait): Add `options' argument.
19748 * spu-low.c (spu_resume): Adjust to use resume_kind.
19749 (spu_wait): Add `options' argument.
19750
19751 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19752
19753 Decouple target code from remote protocol.
19754
19755 * target.h (enum target_waitkind): New.
19756 (struct target_waitstatus): New.
19757 (struct target_ops) <wait>: Return an unsigned long. Take a
19758 target_waitstatus pointer instead of a char pointer.
19759 (mywait): Likewise.
19760 * target.c (mywait): Change prototype to return an unsigned long.
19761 Take a target_waitstatus pointer instead of a char pointer. Adjust.
19762 * server.h (thread_from_wait, old_thread_from_wait): Delete
19763 declarations.
19764 (prepare_resume_reply): Change prototype to take a
19765 target_waitstatus.
19766 * server.c (thread_from_wait, old_thread_from_wait): Delete.
19767 (last_status, last_ptid): New.
19768 (start_inferior): Remove "statusptr" argument. Adjust. Return a
19769 pid instead of a signal.
19770 (attach_inferior): Remove "status" and "signal" parameters.
19771 Adjust.
19772 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
19773 not as an address.
19774 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
19775 (handle_v_requests, myresume): Remove "status" and "signal"
19776 parameters. Adjust.
19777 (handle_status): New.
19778 (main): Delete local `status'. Adjust.
19779 * remote-utils.c: Include target.h.
19780 (prepare_resume_reply): Change prototype to take a
19781 target_waitstatus. Adjust.
19782
19783 * linux-low.c (linux_wait): Adjust to new target_ops->wait
19784 interface.
19785 * spu-low.c (spu_wait): Adjust.
19786 * win32-low.c (enum target_waitkind, struct target_waitstatus):
19787 Delete.
19788 (win32_wait): Adjust.
19789
19790 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19791
19792 * target.h (struct thread_resume): Delete leave_stopped member.
19793 (struct target_ops): Add a `n' argument to the `resume' callback.
19794 * server.c (start_inferior): Adjust.
19795 (handle_v_cont, myresume): Adjust.
19796 * linux-low.c (check_removed_breakpoint): Adjust to resume
19797 interface change, and to removed leave_stopped field.
19798 (resume_ptr): Delete.
19799 (struct thread_resume_array): New.
19800 (linux_set_resume_request): Add new `arg' parameter. Adjust to
19801 resume interface change.
19802 (linux_continue_one_thread, linux_queue_one_thread)
19803 (resume_status_pending_p): Check if the resume field is NULL
19804 instead of checking the leave_stopped member.
19805 (linux_resume): Adjust to the target resume interface change.
19806 * spu-low.c (spu_resume): Adjust to the target resume interface
19807 change.
19808 * win32-low.c (win32_detach, win32_resume): Ditto.
19809
19810 2009-04-01 Pedro Alves <pedro@codesourcery.com>
19811
19812 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
19813 flag.
19814 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
19815 pending.
19816 (linux_continue_one_thread): Only preserve the stepping flag if
19817 there's a pending breakpoint.
19818
19819 2009-03-31 Pedro Alves <pedro@codesourcery.com>
19820
19821 * server.c (main): After the inferior having exited, call
19822 remote_close before exiting gdbserver.
19823
19824 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
19825
19826 Fix size of FPSCR in Power 7 processors.
19827 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
19828 (PPC_FEATURE_HAS_DFP): New #define.
19829 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
19830 size of the FPSCR.
19831
19832 2009-03-23 Pedro Alves <pedro@codesourcery.com>
19833
19834 * server.c (handle_query) Whitespace and formatting.
19835
19836 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19837
19838 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
19839 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
19840 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
19841 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
19842 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
19843 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
19844 Makefile.in, configure.ac: Fix whitespace throughout.
19845 * configure: Regenerate.
19846
19847 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19848
19849 * inferiors.c (find_inferior): Make it safe for the callback
19850 function to delete the currently iterated inferior.
19851
19852 2009-03-22 Pedro Alves <pedro@codesourcery.com>
19853
19854 * Makefile.in (linuw_low_h): Move higher.
19855 (thread-db.o): Depend on $(linux_low_h).
19856
19857 2009-03-17 Pedro Alves <pedro@codesourcery.com>
19858
19859 Rename "process" to "lwp" throughout.
19860
19861 * linux-low.c (all_processes): Rename to...
19862 (all_lwps): ... this.
19863 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
19864 (add_process): Rename to ...
19865 (add_lwp): ... this. Adjust.
19866 (linux_create_inferior): Adjust.
19867 (linux_attach_lwp): Adjust.
19868 (linux_attach): Adjust.
19869 (linux_kill_one_process): Rename to ...
19870 (linux_kill_one_lwp): ... this. Adjust.
19871 (linux_kill): Adjust.
19872 (linux_detach_one_process): Rename to ...
19873 (linux_detach_one_lwp): ... this. Adjust.
19874 (linux_detach): Adjust.
19875 (check_removed_breakpoint): Adjust.
19876 (status_pending_p): Adjust.
19877 (linux_wait_for_process): Rename to ...
19878 (linux_wait_for_lwp): ... this. Adjust.
19879 (linux_wait_for_event): Adjust.
19880 (send_sigstop): Adjust.
19881 (wait_for_sigstop): Adjust.
19882 (stop_all_processes): Rename to ...
19883 (stop_all_lwps): ... this.
19884 (linux_resume_one_process): Rename to ...
19885 (linux_resume_one_lwp): ... this. Adjust.
19886 (linux_set_resume_request, linux_continue_one_thread)
19887 (linux_queue_one_thread, resume_status_pending_p)
19888 (usr_store_inferior_registers, regsets_store_inferior_registers)
19889 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
19890 Adjust.
19891 * linux-low.h (get_process): Rename to ...
19892 (get_lwp): ... this. Adjust.
19893 (get_thread_process): Rename to ...
19894 (get_thread_lwp): ... this. Adjust.
19895 (get_process_thread): Rename to ...
19896 (get_lwp_thread): ... this. Adjust.
19897 (struct process_info): Rename to ...
19898 (struct lwp_info): ... this.
19899 (all_processes): Rename to ...
19900 (all_lwps): ... this.
19901 * proc-service.c (ps_lgetregs): Adjust.
19902 * thread-db.c (thread_db_create_event, find_one_thread)
19903 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
19904
19905 2009-03-14 Pedro Alves <pedro@codesourcery.com>
19906
19907 * server.c (handle_query): Handle "qAttached".
19908
19909 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
19910
19911 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
19912 GPLv3, update license URL.
19913
19914 2009-03-01 Doug Evans <dje@google.com>
19915
19916 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
19917 (server_h): Add gdb_signals.h.
19918 (signals.o): Update.
19919 * server.h (target_signal_from_host,target_signal_to_host_p)
19920 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
19921
19922 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
19923
19924 * remote-utils.c (getpkt): Also generate remote-debug
19925 information if noack_mode is set.
19926
19927 2009-02-06 Pedro Alves <pedro@codesourcery.com>
19928
19929 * server.c (handle_query): Report qXfer:siginfo:read and
19930 qXfer:siginfo:write as supported and handle them.
19931 * target.h (struct target_ops) <qxfer_siginfo>: New field.
19932 * linux-low.c (linux_xfer_siginfo): New.
19933 (linux_target_ops): Set it.
19934
19935 2009-01-26 Pedro Alves <pedro@codesourcery.com>
19936
19937 * server.c (gdbserver_usage): Mention --remote-debug.
19938 (main): Accept '--remote-debug' switch.
19939
19940 2009-01-18 Doug Evans <dje@google.com>
19941
19942 * regcache.c (new_register_cache): No need to check result of xcalloc.
19943 * server.c (handle_search_memory): Back out calls to xmalloc,
19944 result is checked and error is returned to user upon failure.
19945 (handle_query): Ditto. Add more checks for result of malloc.
19946 (handle_v_cont): Check result of malloc, report error back to
19947 user upon failure.
19948 (handle_v_run): Ditto. Call freeargv.
19949 * server.h (freeargv): Declare.
19950 * utils.c (freeargv): New fn.
19951
19952 2009-01-15 Doug Evans <dje@google.com>
19953
19954 * gdbreplay.c (perror_with_name): Make arg const char *.
19955 * server.h (target_signal_to_name): Make return type const char *.
19956 * thread-db.c (thread_db_err_str): Make return type const char *.
19957 * utils.c (perror_with_name): Make arg const char *.
19958
19959 2009-01-14 Pedro Alves <pedro@codesourcery.com>
19960
19961 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
19962 when handling a EXIT_PROCESS_DEBUG_EVENT.
19963
19964 2009-01-06 Joel Brobecker <brobecker@adacore.com>
19965
19966 * gdbreplay.c (gdbreplay_version): Update copyright year.
19967 * server.c (gdbserver_version): Likewise.
19968
19969 2009-01-05 Doug Evans <dje@google.com>
19970
19971 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
19972 (handle_extended_wait): Improve comment.
19973
19974 2008-12-13 Doug Evans <dje@google.com>
19975
19976 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
19977 * server.h (ATTR_MALLOC): New macro.
19978 (xmalloc,xcalloc,xstrdup): Declare.
19979 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
19980 * inferiors.c: Ditto.
19981 * linux-low.c: Ditto.
19982 * mem-break.c: Ditto.
19983 * regcache.c: Ditto.
19984 * remote-utils.c: Ditto.
19985 * server.c: Ditto.
19986 * target.c: Ditto.
19987 * win32-low.c: Ditto.
19988
19989 2008-12-12 Doug Evans <dje@google.com>
19990
19991 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
19992 in debugging printf.
19993
19994 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
19995
19996 2008-12-09 Doug Evans <dje@google.com>
19997
19998 * linux-low.h (struct process_info): Delete member tid, unused.
19999 * thread-db.c (find_one_thread): Update.
20000 (maybe_attach_thread): Update.
20001
20002 2008-12-02 Pedro Alves <pedro@codesourcery.com>
20003
20004 * target.h (struct target_ops): Add qxfer_osdata member.
20005 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
20006 and dirent.h.
20007 (linux_qxfer_osdata): New functions.
20008 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
20009 callback.
20010 * server.c (handle_query): Handle "qXfer:osdata:read:".
20011 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
20012 (buffer_xml_printf): New functions.
20013 * server.h (struct buffer): New.
20014 (buffer_grow_str, buffer_grow_str0): New macros.
20015 (buffer_grow, buffer_free, buffer_init, buffer_finish)
20016 (buffer_xml_printf): Declare.
20017
20018 2008-11-24 Doug Evans <dje@google.com>
20019
20020 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
20021
20022 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
20023
20024 * server.c (handle_v_run): Always use the supplied argument list.
20025
20026 2008-11-19 Bob Wilson <bob.wilson@acm.org>
20027
20028 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
20029 (xtensa_regmap_table): Add entry for scompare1.
20030
20031 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
20032
20033 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
20034 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
20035 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
20036 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
20037 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
20038 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
20039 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
20040 XML target descriptions.
20041 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
20042 when inferior is running on an ISA 2.05 or later processor. Add
20043 special case to return offset for full 64-bit slot of FPSCR when
20044 in 32-bits.
20045
20046 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
20047
20048 * Makefile.in (SFILES, clean): Added sparc64 files.
20049 (reg-sparc64.o, reg-sparc64.c): New.
20050 * configure.srv (sparc*-*-linux*): New configuration.
20051 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
20052 syscall arguments for SPARC.
20053 (regsets_store_inferior_registers): Likewise.
20054 * linux-sparc-low.c: New file.
20055
20056 2008-10-21 Doug Evans <dje@google.com>
20057
20058 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
20059 (READLINE_DIR,READLINE_DEP): Delete.
20060 (INTERNAL_CFLAGS): Update.
20061 (LINTFLAGS): Update.
20062
20063 2008-10-10 Pedro Alves <pedro@codesourcery.com>
20064
20065 * server.c (handle_v_run): If GDB didn't specify an argv, use the
20066 whole argv from the last run, not just argv[0].
20067
20068 2008-09-08 Pedro Alves <pedro@codesourcery.com>
20069
20070 * regcache.c (new_register_cache): Return NULL if the register
20071 cache size isn't known yet.
20072 (free_register_cache): Avoid dereferencing a NULL regcache.
20073
20074 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
20075
20076 * configure.srv: Merge MIPS and MIPS64.
20077
20078 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
20079
20080 * Makefile.in (uninstall): Apply $(EXEEXT) too.
20081
20082 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
20083
20084 * Makefile.in: Add required vsx dependencies.
20085
20086 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
20087 Declare init_registers_powerpc_vsx32l.
20088 Declare init_registers_powerpc_vsx64l.
20089 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
20090 (ppc_arch_setup): Check for VSX in hwcap.
20091 (ppc_fill_vsxregset): New function.
20092 (ppc_store_vsxregset): New function.
20093 Add new VSX entry in regset_info target_regsets.
20094
20095 * configure.srv: Add new VSX dependencies.
20096
20097 2008-08-12 Pedro Alves <pedro@codesourcery.com>
20098
20099 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
20100 (remote_open): Set or clear transport_is_reliable.
20101 (putpkt_binary): Don't expect acks in noack mode.
20102 (getpkt): Don't send ack/nac in noack mode.
20103 * server.c (handle_general_set): Handle QStartNoAckMode.
20104 (handle_query): If connected by tcp pass QStartNoAckMode+ in
20105 qSupported.
20106 (main): Reset noack_mode on every connection.
20107 * server.h (noack_mode): Declare.
20108
20109 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
20110
20111 * Makefile.in (GDBREPLAY_OBS): New variable.
20112 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
20113
20114 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
20115 Daniel Jacobowitz <dan@codesourcery.com>
20116
20117 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
20118 (usr_store_inferior_registers): Likewise.
20119 (regsets_store_inferior_registers): Likewise.
20120
20121 2008-07-31 Rolf Jansen <rj@surtec.com>
20122 Pedro Alves <pedro@codesourcery.com>
20123
20124 * configure.ac: Check for memmem declaration.
20125 * server.c [HAVE_MALLOC_H]: Include malloc.h.
20126 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
20127 (disable_packet_qfThreadInfo): Unconditionally compile.
20128 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
20129 * configure, config.in: Regenerate.
20130
20131 2008-07-28 Doug Kwan <dougkwan@google.com>
20132
20133 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
20134 (linux_write_memory): Remove declaration of errno.
20135
20136 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
20137
20138 * linux-low.c (handle_extended_wait): Do not use "status"
20139 variable uninitialized.
20140
20141 2008-07-07 Pedro Alves <pedro@codesourcery.com>
20142
20143 * server.c (handle_v_attach): Inhibit reporting dll changes.
20144
20145 2008-06-27 Pedro Alves <pedro@codesourcery.com>
20146
20147 * remote-utils.c (prepare_resume_reply): If requested, don't
20148 output "thread:TID" in the T stop reply.
20149
20150 * server.c (disable_packet_vCont, disable_packet_Tthread)
20151 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
20152 (handle_query): If requested, disable support for qC, qfThreadInfo
20153 and qsThreadInfo.
20154 (handle_v_requests): If requested, disable support for vCont.
20155 (gdbserver_show_disableable): New.
20156 (main): Handle --disable-packet and --disable-packet=LIST.
20157
20158 * server.h (disable_packet_vCont, disable_packet_Tthread)
20159 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
20160
20161 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
20162
20163 * server.c (gdbserver_usage): Mention --version.
20164
20165 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
20166
20167 * Makefile.in (gdbreplay.o): New rule.
20168
20169 2008-06-06 Joseph Myers <joseph@codesourcery.com>
20170
20171 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
20172 message, not gdbserver.
20173
20174 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
20175 Nathan Sidwell <nathan@codesourcery.com>
20176 Joseph Myers <joseph@codesourcery.com>
20177
20178 * acinclude.m4: Include ../../config/acx.m4.
20179 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
20180 * configure, config.in: Regenerate.
20181 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
20182 * server.c (gdbserver_version): Print PKGVERSION.
20183 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
20184 (main): Adjust gdbserver_usage calls.
20185 * gdbreplay.c (version, host_name): Add declarations.
20186 (gdbreplay_version, gdbreplay_usage): New.
20187 (main): Accept --version and --help options.
20188
20189 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
20190
20191 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
20192 (arm_breakpoint_at): Handle Thumb.
20193 (the_low_target): Add comment.
20194
20195 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
20196
20197 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
20198
20199 2008-05-09 Doug Evans <dje@google.com>
20200
20201 * server.h (decode_search_memory_packet): Declare.
20202 * remote-utils.c (decode_search_memory_packet): New fn.
20203 * server.c (handle_search_memory_1): New fn.
20204 (handle_search_memory): New fn.
20205 (handle_query): Process qSearch:memory packets.
20206
20207 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
20208
20209 * regcache.c (registers_length): Remove.
20210 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
20211 full register packet.
20212 * regcache.h (registers_length): Remove prototype.
20213 * server.h (PBUFSIZ): Define to 16384.
20214
20215 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
20216
20217 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
20218 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
20219 powerpc-64l.o, and powerpc-altivec64l.o.
20220 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
20221 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
20222 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
20223 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
20224 rs6000/power-linux.xml, and rs6000/power64-linux.xml
20225 to srv_xmlfiles.
20226
20227 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
20228 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
20229 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
20230 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
20231 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
20232 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
20233 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
20234 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
20235 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
20236 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
20237 (clean): Update.
20238
20239 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
20240 (init_registers_powerpc_32l): ... this new prototype.
20241 (init_registers_powerpc_32): Remove, replace by ...
20242 (init_registers_powerpc_altivec32l): ... this new prototype.
20243 (init_registers_powerpc_e500): Remove, replace by ...
20244 (init_registers_powerpc_e500l): ... this new prototype.
20245 (init_registers_ppc64): Remove, replace by ...
20246 (init_registers_powerpc_64l): ... this new prototype.
20247 (init_registers_powerpc_64): Remove, replace by ...
20248 (init_registers_powerpc_altivec64l): ... this new prototype.
20249 (ppc_num_regs): Set to 73.
20250 (PT_ORIG_R3, PT_TRAP): Define if necessary.
20251 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
20252 (ppc_cannot_store_register): Handle orig_r3 and trap.
20253 (ppc_arch_setup): Update init_registers_... calls.
20254 (ppc_fill_gregset): Handle orig_r3 and trap.
20255
20256 * inferiors.c (clear_inferiors): Reset current_inferior.
20257
20258 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
20259
20260 * acinclude.m4: Add override.m4.
20261 * configure: Regenerate.
20262
20263 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
20264
20265 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
20266 initial call to init_register_ppc64.
20267
20268 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
20269
20270 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
20271 single powerpc*-*-linux* case.
20272 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
20273
20274 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
20275
20276 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
20277 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
20278 from reg_xmlfiles.
20279 * linux-ppc-low.c: Include <elf.h>.
20280 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
20281 (ppc_hwcap): New global variable.
20282 (ppc_regmap): Remove __SPE__ #ifdef sections.
20283 (ppc_regmap_e500): New global variable.
20284 (ppc_cannot_store_register): Update __SPE__ special case.
20285 (ppc_get_hwcap): New function.
20286 (ppc_arch_setup): Use it to determine whether inferior supports
20287 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
20288 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
20289 Do not access registers if target does not support AltiVec.
20290 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
20291 Do not access registers if target does not support SPE.
20292 (target_regsets): Unconditionally include AltiVec and SPE regsets.
20293
20294 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
20295
20296 * linux-low.c (disabled_regsets, num_regsets): New.
20297 (use_regsets_p): Delete.
20298 (linux_wait_for_process): Clear disabled_regsets.
20299 (regsets_fetch_inferior_registers): Check and set it.
20300 (regsets_store_inferior_registers): Likewise.
20301 (linux_fetch_registers, linux_store_registers): Do not use
20302 use_regsets_p.
20303 (initialize_low): Allocate disabled_regsets.
20304
20305 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
20306
20307 * Makefile.in (LIBOBJS): New.
20308 (OBS): Use LIBOBJS.
20309 (memmem.o): New rule.
20310 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
20311 * configure: Regenerated.
20312
20313 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
20314
20315 * server.c (handle_query): Never return "unsupported" for
20316 qXfer:features:read queries.
20317
20318 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
20319
20320 * server.c (get_features_xml): Fix inverted condition.
20321 (handle_query): Always support qXfer:feature:read.
20322
20323 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
20324
20325 * server.c (wrapper_argv): New.
20326 (start_inferior): Handle wrapper_argv. If set, expect an extra
20327 trap.
20328 (gdbserver_usage): Document --wrapper.
20329 (main): Parse --wrapper.
20330
20331 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20332
20333 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
20334 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
20335 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
20336 (ppc_set_pc): Likewise.
20337 (ppc_arch_setup): New function.
20338 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
20339 of collect_register.
20340 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
20341
20342 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20343
20344 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
20345 instead of linux-ppc64-low.o.
20346 * linux-ppc64-low.c: Remove file.
20347 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
20348 (linux-ppc64-low.o): Remove rule.
20349
20350 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
20351 (init_registers_powerpc_64): Likewise.
20352 (ppc_regmap): Conditionally define depending on __powerpc64__.
20353 (ppc_cannot_store_register): Do not special-case "fpscr" when
20354 compiled on __powerpc64__.
20355 (ppc_collect_ptrace_register): New function.
20356 (ppc_supply_ptrace_register): New function.
20357 (ppc_breakpoint): Change type to "unsigned int".
20358 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
20359 (the_low_target): Conditionally provide initializers for the
20360 arch_setup member depending on __powerpc64__. Install
20361 collect_ptrace_register and supply_ptrace_register members.
20362
20363 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
20364
20365 * regcache.h (gdbserver_xmltarget): Add extern declaration.
20366 * server.c (gdbserver_xmltarget): Define.
20367 (get_features_xml): Use it to replace "target.xml" and arch_string.
20368
20369 * configure.srv: Remove srv_xmltarget. Add XML files that were
20370 mentioned there to srv_xmlfiles instead. Remove conditional tests
20371 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
20372 srv_xmlfiles and srv_regobj to include all possible choices.
20373 * configure.ac (srv_xmltarget): Remove.
20374 (srv_xmlfiles): Do not add "target.xml".
20375 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
20376 checks for supplementary target information.
20377 * configure: Regenerate.
20378 * Makefile.in (XML_TARGET): Remove.
20379 (target.xml): Remove rule.
20380 (clean): Do not clean up target.xml.
20381 (.PRECIOUS): Do not mention target.xml.
20382
20383 * target.h (struct target_ops): Remove arch_string member.
20384 * linux-low.c (linux_arch_string): Remove.
20385 (linux_target_ops): Remove arch_string initializer.
20386 * linux-low.h (struct linux_target_ops): Remove arch_string member.
20387 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
20388 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
20389 * spu-low.c (spu_arch_string): Remove.
20390 (spu_target_ops): Remove arch_string initializer.
20391 * win32-low.c (win32_arch_string): Remove.
20392 (win32_target_ops): Remove arch_string initializer.
20393 * win32-low.h (struct win32_target_ops): Remove arch_string member.
20394 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
20395 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
20396
20397 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20398
20399 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
20400 by collect_ptrace_register and supply_ptrace_register hooks.
20401 * linux-low.c (fetch_register): Use supply_ptrace_register callback
20402 instead of checking for the_low_target.left_pad_xfer.
20403 (usr_store_inferior_registers): Use collect_ptrace_register callback
20404 instead of checking for the_low_target.left_pad_xfer.
20405
20406 * linux-s390-low.c (s390_collect_ptrace_register): New function.
20407 (s390_supply_ptrace_register): Likewise.
20408 (s390_fill_gregset): Call s390_collect_ptrace_register.
20409 (the_low_target): Update.
20410
20411 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
20412 (ppc_supply_ptrace_register): Likewise.
20413 (the_low_target): Update.
20414
20415 * linux-i386-low.c (the_low_target): Update.
20416 * linux-x86-64-low.c (the_low_target): Update.
20417
20418 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20419
20420 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
20421 reg-s390.o and reg-s390x.o.
20422
20423 * linux-low.c (new_inferior): New global variable.
20424 (linux_create_inferior, linux_attach): Set it.
20425 (linux_wait_for_process): Call the_low_target.arch_setup after the
20426 target has stopped for the first time.
20427 (initialize_low): Do not call the_low_target.arch_setup.
20428
20429 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
20430 (s390_set_pc): Likewise.
20431 (s390_arch_setup): New function.
20432 (the_low_target): Use s390_arch_setup as arch_setup routine.
20433
20434 * regcache.c (realloc_register_cache): New function.
20435 (set_register_cache): Call it for each existing regcache.
20436
20437 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
20438
20439 * server.h (init_registers): Remove prototype.
20440
20441 * linux-low.h (struct linux_target_ops): Add arch_setup field.
20442 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
20443 instead of init_registers ().
20444 * linux-arm-low.c (init_registers_arm): Add prototype.
20445 (init_registers_arm_with_iwmmxt): Likewise.
20446 (the_low_target): Add initializer for arch_setup field.
20447 * linux-cris-low.c (init_registers_cris): Add prototype.
20448 (the_low_target): Add initializer for arch_setup field.
20449 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
20450 (the_low_target): Add initializer for arch_setup field.
20451 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
20452 (the_low_target): Add initializer for arch_setup field.
20453 * linux-ia64-low.c (init_registers_ia64): Add prototype.
20454 (the_low_target): Add initializer for arch_setup field.
20455 * linux-m32r-low.c (init_registers_m32r): Add prototype.
20456 (the_low_target): Add initializer for arch_setup field.
20457 * linux-m68k-low.c (init_registers_m68k): Add prototype.
20458 (the_low_target): Add initializer for arch_setup field.
20459 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
20460 (init_registers_mips64_linux): Likewise.
20461 (the_low_target): Add initializer for arch_setup field.
20462 * linux-ppc-low.c (init_registers_ppc): Add prototype.
20463 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
20464 (the_low_target): Add initializer for arch_setup field.
20465 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
20466 (init_registers_powerpc_64): Likewise.
20467 (the_low_target): Add initializer for arch_setup field.
20468 * linux-s390-low.c (init_registers_s390): Add prototype.
20469 (init_registers_s390x): Likewise.
20470 (the_low_target): Add initializer for arch_setup field.
20471 * linux-sh-low.c (init_registers_sh): Add prototype.
20472 (the_low_target): Add initializer for arch_setup field.
20473 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
20474 (the_low_target): Add initializer for arch_setup field.
20475 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
20476 (the_low_target): Add initializer for arch_setup field.
20477
20478 * win32-low.h (struct win32_target_ops): Add arch_setup field.
20479 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
20480 instead of init_registers ().
20481 * win32-arm-low.c (init_registers_arm): Add prototype.
20482 (the_low_target): Add initializer for arch_setup field.
20483 * win32-i386-low.c (init_registers_i386): Add prototype.
20484 (the_low_target): Add initializer for arch_setup field.
20485
20486 * spu-low.c (init_registers_spu): Add prototype.
20487 (initialize_low): Call initialie_registers_spu () instead of
20488 initialize_registers ().
20489
20490 2008-02-19 Pedro Alves <pedro@codesourcery.com>
20491
20492 * server.c (handle_v_requests): When handling the vRun and vAttach
20493 packets, if already debugging a process, don't kill it. Return an
20494 error instead.
20495
20496 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
20497
20498 * server.c (handle_query): Correct length check.
20499
20500 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
20501
20502 * win32-low.c (do_initial_child_stuff): Add process handle
20503 parameter. Set current_process_handle and current_process_id from the
20504 parameters. Clear globals.
20505 (win32_create_inferior): Don't set current_process_handle and
20506 current_process_id here. Instead pass them on the call to
20507 do_initial_child_stuff.
20508 (win32_attach): Likewise.
20509 (win32_clear_inferiors): New.
20510 (win32_kill): Don't close the current process handle or the
20511 current thread handle here. Instead call win32_clear_inferiors.
20512 (win32_detach): Don't open a new handle to the process. Call
20513 win32_clear_inferiors.
20514 (win32_join): Don't rely on current_process_handle; open a new
20515 handle using the process id.
20516 (win32_wait): Call win32_clear_inferiors when the inferior process
20517 has exited.
20518
20519 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
20520
20521 * server.c (monitor_show_help): Add "exit".
20522
20523 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
20524
20525 * Makefile.in (SFILES): Add linux-xtensa-low.c.
20526 (clean): Add reg-xtensa.c.
20527 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
20528 * configure.srv (xtensa*-*-linux*) New target.
20529 * linux-xtensa-low.c: New.
20530 * xtensa-xtregs.c: New.
20531
20532 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
20533
20534 * hostio.c: Don't include errno.h.
20535 (errno_to_fileio_errno): Move to hostio-errno.
20536 * hostio.c: (hostio_error): Remove the error parameter. Defer the
20537 error number outputting to the target->hostio_last_error callback.
20538 (hostio_packet_error): Use FILEIO_EINVAL directly.
20539 (handle_open, handle_pread, hostio_error, handle_unlink): Update
20540 calls to hostio_error.
20541 * hostio-errno.c: New.
20542 * server.h (hostio_last_error_from_errno): Declare.
20543 * target.h (target_ops): Add hostio_last_error member.
20544 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
20545 as hostio_last_error handler.
20546 * spu-low.c (spu_target_ops): Likewise.
20547 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
20548 (wince_hostio_last_error): New functions.
20549 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
20550 as hostio_last_error handler.
20551 (win32_target_ops) [!_WIN32_WCE]: Register
20552 hostio_last_error_from_errno as hostio_last_error handler.
20553 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
20554 (hostio-errno.o): New rule.
20555 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
20556 * configure.srv (srv_hostio_err_objs): New variable. Default to
20557 hostio-errno.o.
20558 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
20559 * configure: Regenerate.
20560
20561 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
20562
20563 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
20564 (linux_kill, linux_detach): Clean up the process list.
20565 * remote-utils.c (remote_open): Improve port number parsing.
20566 (putpkt_binary, input_interrupt): Only send interrupts if the target
20567 is running.
20568 * server.c (extended_protocol): Make static.
20569 (attached): Define earlier.
20570 (exit_requested, response_needed, program_argv): New variables.
20571 (target_running): New.
20572 (start_inferior): Clear attached here.
20573 (attach_inferior): Set attached here.
20574 (require_running): Define.
20575 (handle_query): Use require_running and target_running. Implement
20576 "monitor exit".
20577 (handle_v_attach, handle_v_run): New.
20578 (handle_v_requests): Use require_running. Handle vAttach and vRun.
20579 (gdbserver_usage): Update.
20580 (main): Redo argument parsing. Handle --debug and --multi. Handle
20581 --attach along with other options or after the port. Save
20582 program_argv. Support no initial program. Resynchronize
20583 communication with GDB after an error. Handle "monitor exit".
20584 Use require_running and target_running. Always allow the extended
20585 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
20586 restart in extended mode.
20587 * README: Refer to the GDB manual. Update --attach usage.
20588
20589 2007-12-20 Andreas Schwab <schwab@suse.de>
20590
20591 * linux-low.c (STACK_SIZE): Define.
20592 (linux_tracefork_child): Use it. Use __clone2 on ia64.
20593 (linux_test_for_tracefork): Likewise.
20594
20595 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
20596
20597 * linux-low.c (linux_wait_for_event): Update messages. Do not
20598 reinsert auto-delete breakpoints.
20599 * mem-break.c (struct breakpoint): Change return type of handler to
20600 int.
20601 (set_breakpoint_at): Update handler type.
20602 (reinsert_breakpoint_handler): Return 1 instead of calling
20603 delete_breakpoint.
20604 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
20605 setting a new one.
20606 (check_breakpoints): Delete auto-delete breakpoints and return 2.
20607 * mem-break.h (set_breakpoint_at): Update handler type.
20608 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
20609 * win32-low.c (auto_delete_breakpoint): New.
20610 (get_child_debug_event): Use it.
20611
20612 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
20613
20614 * configure.ac: Check for pread and pwrite.
20615 * hostio.c (handle_pread): Fall back to lseek and read.
20616 (handle_pwrite): Fall back to lseek and write.
20617 * config.in, configure: Regenerated.
20618
20619 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
20620
20621 * server.c (myresume): Add own_buf argument.
20622 (main): Update calls.
20623
20624 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
20625
20626 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
20627 * remote-utils.c (remote_open): Do not call disable_async_io.
20628 (block_async_io): Delete.
20629 (unblock_async_io): Make static.
20630 (initialize_async_io): New.
20631 * server.c (handle_v_cont): Handle async I/O here.
20632 (myresume): Likewise. Move other common resume tasks here...
20633 (main): ... from here. Call initialize_async_io. Disable async
20634 I/O before the main loop.
20635 * server.h (initialize_async_io): Declare.
20636 (block_async_io, unblock_async_io): Delete prototypes.
20637 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
20638
20639 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
20640
20641 * remote-utils.c (readchar): Allow binary data in received messages.
20642
20643 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20644
20645 * win32-low.c (attaching): New global.
20646 (win32_create_inferior): Clear the `attaching' global.
20647 (win32_attach): Set the `attaching' global.
20648 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
20649 attaching. Only set a breakpoint at the entry point if not
20650 attaching.
20651
20652 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20653
20654 * server.c (main): Don't report dll events on the initial
20655 connection on attaches.
20656
20657 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20658
20659 * server.c (main): Relax numerical bases supported for the pid of
20660 the --attach command line argument.
20661
20662 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20663
20664 * win32-low.c (win32_attach): Call OpenProcess before
20665 DebugActiveProcess, not after. Add last error output to error
20666 call.
20667
20668 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
20669
20670 * win32-low.c (win32_get_thread_context)
20671 (win32_set_thread_context): New functions.
20672 (thread_rec): Use win32_get_thread_context.
20673 (continue_one_thread, win32_resume): Use win32_set_thread_context.
20674 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
20675 field.
20676
20677 2007-12-03 Leo Zayas
20678 Pedro Alves <pedro_alves@portugalmail.pt>
20679
20680 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
20681 global variables.
20682 (child_add_thread): Minor cleanup.
20683 (child_continue): Resume artificially suspended threads before
20684 calling ContinueDebugEvent.
20685 (suspend_one_thread): New.
20686 (fake_breakpoint_event): New.
20687 (get_child_debug_event): Change return type to int. Check here if
20688 gdb sent an interrupt request. If a soft interrupt was requested,
20689 fake a breakpoint event. Return 0 if there is no event to handle,
20690 and 1 otherwise.
20691 (win32_wait): Don't check here if gdb sent an interrupt request.
20692 Ensure there is a valid event to handle.
20693 (win32_request_interrupt): Add soft interruption method as last
20694 resort.
20695
20696 2007-12-03 Leo Zayas
20697 Pedro Alves <pedro_alves@portugalmail.pt>
20698
20699 * win32-low.h (win32_thread_info): Add descriptions to the
20700 structure members. Replace `suspend_count' counter by a
20701 `suspended' flag.
20702 * win32-low.c (thread_rec): Update condition of when to get the
20703 context from the inferior. Rely on ContextFlags being set if it
20704 has already been retrieved. Only suspend the inferior thread if
20705 we haven't already. Warn if that fails.
20706 (continue_one_thread): s/suspend_count/suspended/. Only call
20707 ResumeThread once. Warn if that fails.
20708
20709 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20710
20711 * win32-low.c (win32_wait): Don't read from the inferior when it
20712 has already exited.
20713
20714 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
20715
20716 * Makefile.in (win32_low_h): New variable.
20717 (win32-low.o): Add dependency on $(win32_low_h).
20718 (win32-arm-low.o, win32-i386-low.o): New rules.
20719
20720 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20721
20722 * hostio.c: Correct copyright year.
20723
20724 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
20725
20726 * Makefile.in (OBS): Add hostio.o.
20727 (hostio.o): New rule.
20728 * server.h (handle_vFile): Declare.
20729 * hostio.c: New file.
20730 * server.c (handle_v_requests): Take packet_len and new_packet_len
20731 for binary packets. Call handle_vFile.
20732 (main): Update call to handle_v_requests.
20733
20734 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
20735
20736 * linux-low.c: Include <sched.h>.
20737
20738 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
20739
20740 * linux-low.c (linux_tracefork_grandchild): New.
20741 (linux_tracefork_child): Use clone.
20742 (linux_test_for_tracefork): Use clone; allocate and free a stack.
20743
20744 2007-10-31 Joel Brobecker <brobecker@adacore.com>
20745
20746 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
20747
20748 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
20749
20750 * linux-low.c (handle_extended_wait): Handle unexpected signals.
20751
20752 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
20753
20754 * inferiors.c (change_inferior_id): Delete.
20755 (add_pid_to_list, pull_pid_from_list): New.
20756 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
20757 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
20758 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
20759 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
20760 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
20761 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
20762 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
20763 (using_threads): Always set to 1.
20764 (handle_extended_wait): New.
20765 (add_process): Do not set TID.
20766 (linux_create_inferior): Set must_set_ptrace_flags.
20767 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
20768 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
20769 (linux_thread_alive): Rename TID argument to LWPID.
20770 (linux_wait_for_process): Handle unknown processes. Do not use TID.
20771 (linux_wait_for_event): Do not use TID or check using_threads. Update
20772 call to dead_thread_notify. Call handle_extended_wait.
20773 (linux_create_inferior): Use PTRACE_SETOPTIONS.
20774 (send_sigstop): Delete sigstop_sent.
20775 (wait_for_sigstop): Avoid TID.
20776 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
20777 (linux_test_for_tracefork): New.
20778 (linux_lookup_signals): Use thread_db_active and
20779 linux_supports_tracefork_flag.
20780 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
20781 * linux-low.h (get_process_thread): Avoid TID.
20782 (struct process_ifo): Move thread_known and tid to the end. Remove
20783 sigstop_sent.
20784 (linux_attach_lwp, thread_db_init): Update prototypes.
20785 * server.h (change_inferior_id): Delete prototype.
20786 (add_pid_to_list, pull_pid_from_list): New prototypes.
20787 * thread-db.c (thread_db_use_events): New.
20788 (find_first_thread): Rename to...
20789 (find_one_thread): ...this. Update callers and messages. Do not
20790 call fatal. Check thread_db_use_events. Do not call
20791 change_inferior_id or new_thread_notify.
20792 (maybe_attach_thread): Update. Do not call new_thread_notify.
20793 (thread_db_init): Set thread_db_use_events. Check use_events.
20794 * utils.c (fatal, warning): Correct message prefix.
20795
20796 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
20797
20798 * Makefile.in (clean): Remove new files.
20799 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
20800 (powerpc-64.o, powerpc-64.c): New rules.
20801 * configure.srv: Use alternate register sets for powerpc64-*-linux*
20802 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
20803 with SPE.
20804 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
20805 SPE targets.
20806 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
20807 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
20808 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
20809 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
20810 (target_regsets): Add AltiVec and SPE register sets.
20811 * configure.ac: Check for AltiVec and SPE.
20812 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
20813 (ppc_fill_vrregset, ppc_store_vrregset): New.
20814 (target_regsets): Add AltiVec register set.
20815 * configure: Regenerated.
20816
20817 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
20818
20819 * linux-low.c (O_LARGEFILE): Define.
20820 (linux_read_memory): Use /proc/PID/mem.
20821 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
20822 * configure, config.in: Regenerated.
20823
20824 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
20825
20826 * linux-low.c (linux_wait_for_event): Do not pass signals while
20827 single-stepping.
20828
20829 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20830
20831 * win32-low.c (create_process): New.
20832 (win32_create_inferior): Use create_process instead of
20833 CreateProcess. If create_process failed retry appending an ".exe"
20834 suffix. Store the GetLastError result immediatelly after
20835 create_process calls and use it on the call to error.
20836
20837 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
20838
20839 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
20840
20841 2007-08-23 Joel Brobecker <brobecker@adacore.com>
20842
20843 * configure.ac: Switch license to GPLv3.
20844
20845 2007-08-01 Michael Snyder <msnyder@access-company.com>
20846
20847 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
20848
20849 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
20850
20851 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
20852 typedef.
20853 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
20854 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
20855 CloseToolhelp32Snapshot.
20856 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
20857 CloseToolhelp32Snapshot.
20858
20859 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
20860
20861 * server.c (main): Check for inferior exit before main loop.
20862
20863 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
20864
20865 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
20866 instead of on tmp_desc.
20867
20868 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
20869 Daniel Jacobowitz <dan@codesourcery.com>
20870
20871 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
20872 (add_thread): Minor cleanups.
20873 (clear_inferiors): Move lower in the file. Clear the DLL
20874 list.
20875 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
20876 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
20877 (xml_escape_text): New.
20878 * server.c (handle_query): Handle qXfer:libraries:read. Report it
20879 for qSupported.
20880 (handle_v_cont): Report errors.
20881 (gdbserver_version): Update.
20882 (main): Correct size of own_buf. Do not report initial DLL events.
20883 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
20884 (unloaded_dll, xml_escape_text): New.
20885 * win32-low.c (enum target_waitkind): Update comments.
20886 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
20887 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
20888 (win32_EnumProcessModules, win32_GetModuleInformation)
20889 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
20890 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
20891 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
20892 (win32_Module32First, win32_Module32Next, load_toolhelp)
20893 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
20894 (get_child_debug_event): Handle DLL events.
20895 (win32_wait): Likewise.
20896
20897 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
20898
20899 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
20900 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
20901
20902 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20903
20904 * win32-low.c (handle_output_debug_string): Ignore event if not
20905 waiting.
20906
20907 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
20908
20909 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
20910
20911 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
20912
20913 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
20914
20915 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
20916
20917 * inferiors.c (change_inferior_id): Add comment.
20918 * linux-low.c (check_removed_breakpoint): Add an early
20919 prototype. Improve debug output.
20920 (linux_attach): Doc update.
20921 (linux_detach_one_process, linux_detach): Clean up before releasing
20922 each process.
20923 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
20924 * linux-low.h (struct process_info): Doc improvement.
20925 * mem-break.c (delete_all_breakpoints): New.
20926 * mem-break.h (delete_all_breakpoints): New prototype.
20927 * thread-db.c (find_first_thread): New.
20928 (thread_db_create_event): Call it instead of
20929 thread_db_find_new_threads. Clean up unused variables.
20930 (maybe_attach_thread): Remove first thread handling.
20931 (thread_db_find_new_threads): Use find_first_thread.
20932 (thread_db_get_tls_address): Likewise.
20933
20934 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
20935
20936 * thread-db.c (thread_db_find_new_threads): Add prototype.
20937 (thread_db_create_event): Check for the main thread before adding
20938 a new thread.
20939 (maybe_attach_thread): Only enable event reporting if TID == 0.
20940 (thread_db_get_tls_address): Check for new threads.
20941
20942 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
20943
20944 * linux-low.c (linux_create_inferior): Try execv before execvp.
20945 * spu-low.c (spu_create_inferior): Likewise.
20946
20947 2007-06-13 Mike Frysinger <vapier@gentoo.org>
20948
20949 * linux-low.c (linux_create_inferior): Change execv to execvp.
20950 * spu-low.c (spu_create_inferior): Likewies.
20951
20952 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
20953
20954 * Makefile.in (clean): Clean new files instead of deleted ones.
20955 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
20956 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
20957 rules.
20958 * configure.srv: Specify XML files and new regformats for MIPS and
20959 MIPS64 GNU/Linux.
20960 * linux-mips-low.c (mips_num_regs): Set to only used registers.
20961 (mips_regmap): Do not fetch $0. Remove unused registers. Add
20962 an entry for the restart register.
20963 (mips_cannot_fetch_register, mips_cannot_store_register)
20964 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
20965 register names to match the XML descriptions.
20966 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
20967 restart register instead of $0.
20968
20969 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20970 Markus Deuling <deuling@de.ibm.com>
20971
20972 * remote-utils.c (decode_xfer_write): New function.
20973 * server.h (decode_xfer_write): Add prototype.
20974 * server.c (handle_query): Add PACKET_LEN argument. Support
20975 qXfer:spu:read and qXfer:spu:write packets.
20976 (main): Pass packet_len to handle_query.
20977 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
20978 * target.h (target_ops): Add qxfer_spu.
20979
20980 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
20981
20982 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
20983 accessing non-seekable spufs files.
20984
20985 2007-05-16 Markus Deuling <deuling@de.ibm.com>
20986
20987 * server.c (handle_query): Add reply for qC packet.
20988
20989 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
20990 Leo Zayas <lerele@champenstudios@com>
20991
20992 * server.h (check_remote_input_interrupt_request): New function.
20993 * remote_utils.c (INVALID_DESCRIPTOR): New define.
20994 (remote_desc): Initialize with INVALID_DESCRIPTOR.
20995 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
20996 (check_remote_input_interrupt_request): New function.
20997 * server.h (check_remote_input_interrupt_request): Declare.
20998 * win32-low.c (winapi_DebugBreakProcess,
20999 winapi_GenerateConsoleCtrlEvent): New typedefs.
21000 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
21001 to 250 ms.
21002 (win32_wait): Check for remote interrupt request
21003 with check_remote_input_interrupt_request.
21004 (win32_request_interrupt): New function.
21005 (win32_target_op): Set request_interrupt to win32_request_interrupt.
21006
21007 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21008
21009 * win32-low.c (debug_registers_changed,
21010 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
21011 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
21012 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
21013 (thread_rec): Get context using the low target.
21014 (child_add_thread): Call thread_added on the low target,
21015 which does the same thing.
21016 (regptr): Delete.
21017 (do_initial_child_stuff): Remove debug registers references.
21018 Set context using the low target. Resume threads after
21019 setting the contexts.
21020 (child_continue): Remove dead variable. Remove debug
21021 registers references.
21022 (child_fetch_inferior_registers): Go through the low target.
21023 (do_child_store_inferior_registers): Remove.
21024 (child_store_inferior_registers): Go through the low target.
21025 (win32_resume): Remove debug registers references.
21026 Set context using the low target.
21027 (handle_exception): Change return type to void. Don't record
21028 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
21029 first chance exception.
21030 (get_child_debug_event): Change return type to void. Remove
21031 goto loop. Always return after waiting for debug event.
21032 (win32_wait): Convert to switch statement. Handle spurious
21033 events.
21034
21035 * win32-i386-low.c (debug_registers_changed,
21036 debug_registers_used): New.
21037 (initial_stuff): Rename to ...
21038 (i386_initial_stuff): ... this. Clear debug registers
21039 state variables.
21040 (store_debug_registers): Delete.
21041 (i386_get_thread_context): New.
21042 (load_debug_registers): Delete.
21043 (i386_set_thread_context): New.
21044 (i386_thread_added): New.
21045 (single_step): Rename to ...
21046 (i386_single_step): ... this.
21047 (do_fetch_inferior_registers): Rename to ...
21048 (i386_fetch_inferior_register): ... this.
21049 (i386_store_inferior_register): New.
21050 (the_low_target): Adapt to new interface.
21051
21052 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
21053 (arm_get_thread_context): New.
21054 (arm_set_thread_context): New.
21055 (regptr): New.
21056 (do_fetch_inferior_registers): Rename to ...
21057 (arm_fetch_inferior_register): ... this.
21058 (arm_store_inferior_register): New.
21059 (arm_wince_breakpoint): Reimplement as unsigned long.
21060 (arm_wince_breakpoint_len): Define.
21061 (the_low_target): Adapt to new interface.
21062
21063 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
21064 load_debug_registers. Add get_thread_context, set_thread_context,
21065 thread_added and store_inferior_register. Rename
21066 fetch_inferior_registers to fetch_inferior_register.
21067 (regptr): Remove declaration.
21068
21069 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21070
21071 * linux-low.c (linux_detach): Change return type to int. Return 0.
21072 * spu-low.c (spu_detach): Likewise.
21073
21074 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21075
21076 * target.h (target_ops): Change return type of detach to int.
21077 Add join.
21078 (join_inferior): New.
21079 * server.c (main): Don't skip detach support on mingw32.
21080 If the inferior doesn't support detaching return error.
21081 Call join_inferior instead of using waitpid.
21082 * linux-low.c (linux_join): New.
21083 (linux_target_op): Add linux_join.
21084 * spu-low.c (spu_join): New.
21085 (spu_target_ops): Add spu_join.
21086 * win32-low.c (win32_detach): Adapt to new interface.
21087 Reopen current_process_handle before detaching. Issue a child
21088 resume before detaching.
21089 (win32_join): New.
21090 (win32_target_op): Add win32_join.
21091
21092 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21093
21094 * win32-low.c (win32-attach): Fix return value.
21095 * target.h (target_ops): Describe ATTACH return values.
21096
21097 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21098
21099 * win32-low.c (GETPROCADDRESS): Define.
21100 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
21101 (winapi_DebugSetProcessKillOnExit): Likewise.
21102 (win32_create_inferior): Force usage of ansi CreateProcessA.
21103 (win32_attach): Use GETPROCADDRESS.
21104 (win32_detach): Likewise.
21105
21106 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
21107
21108 * win32-low.c (win32_wait): Don't use WSTOPSIG.
21109
21110 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
21111
21112 * win32-low.c: Commit leftover changes from 2007-03-29.
21113
21114 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
21115
21116 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
21117 fields short instead of int. Add explicit padding.
21118 (i387_cache_to_fsave): Remove unnecessary casts.
21119 (i387_fsave_to_cache): Doc fix.
21120 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
21121
21122 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
21123
21124 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
21125 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
21126
21127 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
21128
21129 * configure.srv (arm*-*-mingw32ce*): Move near the other
21130 arm targets.
21131
21132 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
21133
21134 * configure.ac: Add errno checking.
21135 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
21136 sys/file.h and malloc.h.
21137 (AC_CHECK_DECLS): Add perror.
21138 (srv_mingwce): Handle.
21139 * configure.srv (i[34567]86-*-cygwin*): Add
21140 win32-i386-low.o to srv_tgtobj.
21141 (i[34567]86-*-mingw*): Likewise.
21142 (arm*-*-mingw32ce*): Add case.
21143 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
21144 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
21145 [__MINGW32CE__] (strerror): New function.
21146 [__MINGW32CE__] (errno): Define to GetLastError.
21147 [__MINGW32CE__] (COUNTOF): New macro.
21148 (remote_open): Remove extra close call.
21149 * mem-break.c (delete_breakpoint_at): New function.
21150 * mem-break.h (delete_breakpoint_at): Declare.
21151 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
21152 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
21153 [USE_WIN32API] (read, write): Add char* casts.
21154 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
21155 * server.h: Include wincecompat.h on Windows CE.
21156 [HAVE_ERRNO_H]: Check.
21157 (perror): Declare if not declared.
21158 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
21159 (perror_with_name): Remove errno declaration.
21160 * wincecompat.h: New.
21161 * wincecompat.c: New.
21162 * win32-low.h: New.
21163 * win32-arm-low.c: New.
21164 * win32-i386-low.c: New.
21165 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
21166 (OUTMSG2): Make it safe.
21167 (_T): New macro.
21168 (COUNTOF): New macro.
21169 (NUM_REGS): Get it from the low target.
21170 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
21171 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
21172 (thread_rec): Let low target handle debug registers.
21173 (child_add_thread): Likewise.
21174 (child_init_thread_list): Likewise.
21175 (continue_one_thread): Likewise.
21176 (regptr): New.
21177 (do_child_fetch_inferior_registers): Move to ...
21178 * win32-i386-low.c: ... here, and rename to ...
21179 (do_fetch_inferior_registers): ... this.
21180 * win32-low.c (child_fetch_inferior_registers):
21181 Go through the low target.
21182 (do_child_store_inferior_registers): Use regptr.
21183 (strwinerror): New function.
21184 (win32_create_inferior): Handle Windows CE.
21185 Use strwinerror instead of strerror on Windows error
21186 codes. Add program to the error output.
21187 Don't close the main thread handle on Windows CE.
21188 (win32_attach): Use coredll.dll on Windows CE.
21189 (win32_kill): Close current process and current
21190 thread handles.
21191 (win32_detach): Use coredll.dll on Windows CE.
21192 (win32_resume): Let low target handle debug registers, and
21193 step request.
21194 (handle_exception): Add/Remove initial breakpoint. Avoid
21195 non-existant WSTOPSIG on Windows CE.
21196 (win32_read_inferior_memory): Cast to remove warning.
21197 (win32_arch_string): Go through the low target.
21198 (initialize_low): Call set_breakpoint_data with the low
21199 target's breakpoint.
21200 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
21201 FOP_REGNUM, mappings): Move to ...
21202 * win32-i386-low.c: ... here.
21203 * win32-low.c (win32_thread_info): Move to ...
21204 * win32-low.h: ... here.
21205 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
21206 win32-arm-low.c and wincecompat.c.
21207 (all:): Add $EXEEXT.
21208 (install-only:): Likewise.
21209 (gdbserver:): Likewise.
21210 (gdbreplay:): Likewise.
21211 * config.in: Regenerate.
21212 * configure: Regenerate.
21213
21214 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
21215
21216 * win32-low.c: Rename typedef thread_info to
21217 win32_thread_info throughout.
21218
21219 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
21220
21221 * win32-i386-low.c: Rename to ...
21222 * win32-low.c: ... this.
21223 * configure.srv: Replace win32-i386-low.o with win32-low.o.
21224 * Makefile.in: Likewise.
21225
21226 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
21227
21228 * remote-utils.c (monitor_output): Constify msg parameter.
21229 * server.h (monitor_output): Likewise.
21230 * win32-i386-low.c (handle_output_debug_string): New.
21231 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
21232 handle_output_debug_string.
21233 (get_child_debug_event): Likewise.
21234
21235 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
21236
21237 * server.c (main): Correct strtoul check.
21238
21239 2007-03-27 Jon Ringle <jon@ringle.org>
21240
21241 * linux-low.c: Check __ARCH_HAS_MMU__ also.
21242
21243 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
21244
21245 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
21246
21247 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
21248
21249 * terminal.h: Check HAVE_SGTTY_H.
21250
21251 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
21252
21253 * remote-utils.c (remote_open): Print out the assigned port number.
21254
21255 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
21256
21257 * remote-utils.c (monitor_output): New function.
21258 * server.c (debug_threads): Define here.
21259 (monitor_show_help): New function.
21260 (handle_query): Handle qRcmd.
21261 (main): Do not handle 'd' packet.
21262 * server.h (debug_threads, remote_debug, monitor_output): Declare.
21263 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
21264 of debug_threads.
21265
21266 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21267
21268 * Makefile.in (EXEEXT): New.
21269 (clean): Use $(EXEEXT).
21270
21271 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21272
21273 * target.h (target_ops): Rename send_signal to request_interrupt,
21274 and remove enum target_signal parameter.
21275 * linux-low.c (linux_request_interrupt): Rename from
21276 linux_send_signal, and always send SIGINT.
21277 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
21278 and always send SIGINT.
21279 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
21280 of send_signal.
21281 (input_interrupt): Likewise.
21282
21283 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
21284
21285 * server.c (get_features_xml): Check if target implemented
21286 arch_string.
21287 * win32-i386-low.c (win32_arch_string): New.
21288 (win32_target_ops): Add win32_arch_string as arch_string member.
21289
21290 2007-02-22 Markus Deuling <deuling@de.ibm.com>
21291
21292 * spu-low.c (spu_arch_string): New.
21293 (spu_target_ops): Add spu_arch_string.
21294
21295 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
21296
21297 * remote-utils.c: Remove HAVE_TERMINAL_H check.
21298 * configure.ac: Do not check for terminal.h.
21299 * configure, config.in: Regenerated.
21300
21301 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
21302
21303 * Makefile.in (OBS): Add $(XML_BUILTIN).
21304 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
21305 (clean): Update.
21306 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
21307 (arm-with-iwmmxt.c): New.
21308 * config.in, configure: Regenerate.
21309 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
21310 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
21311 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
21312 (arm*-*-linux*): Add iWMMXt and regset support.
21313 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
21314 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
21315 (arm_store_wmmxregset, target_regsets): New.
21316 * server.c (get_features_xml): Take annex argument. Check builtin
21317 XML documents.
21318 (handle_query): Handle multiple annexes.
21319
21320 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
21321
21322 * remote-utils.c [USE_WIN32API] (read, write): Define.
21323 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
21324 write.
21325
21326 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
21327
21328 * linux-i386-low.c (the_low_target): Set arch_string.
21329 * linux-x86-64-low.c (the_low_target): Likewise.
21330 * linux-low.c (linux_arch_string): New.
21331 (linux_target_ops): Add it.
21332 * linux-low.h (struct linux_target_ops): Add arch_string.
21333 * server.c (write_qxfer_response): Use const void * for DATA.
21334 (get_features_xml): New.
21335 (handle_query): Handle qXfer:features:read. Report it for qSupported.
21336 * target.h (struct target_ops): Add arch_string method.
21337
21338 2007-01-03 Denis Pilat <denis.pilat@st.com>
21339 Daniel Jacobowitz <dan@codesourcery.com>
21340
21341 * linux-low.c (linux_kill): Handle being called with no threads.
21342 * win32-i386-low.c (win32_kill): Likewise.
21343 (get_child_debug_event): Clear current_process_handle.
21344
21345 2006-12-30 Denis PILAT <denis.pilat@st.com>
21346 Daniel Jacobowitz <dan@codesourcery.com>
21347
21348 * remote-utils.c (remote_open): Check the type of specified
21349 serial port devices before opening them.
21350 * server.c (main): Kill the inferior if an error occurs during
21351 the first remote_open.
21352
21353 2006-12-05 Markus Deuling <deuling@de.ibm.com>
21354
21355 * README: Update supported targets.
21356
21357 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
21358
21359 * Makefile.in (clean): Remove reg-mips64.c.
21360 (reg-mips64.c, reg-mips64.o): New rules.
21361 * configure.srv: Handle mips64. Include regset support for mips.
21362 * linux-mips-low.c (union mips_register): New.
21363 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
21364 (mips_breakpoint, mips_breakpoint_at): Use int.
21365 (mips_collect_register, mips_supply_register)
21366 (mips_collect_register_32bit, mips_supply_register_32bit)
21367 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
21368 (mips_store_fpregset, target_regsets): New.
21369 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
21370
21371 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
21372
21373 * configure.srv: Add target "spu*-*-*".
21374 * Makefile.in (clean): Remove reg-spu.c.
21375 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
21376 * spu-low.c: New file.
21377
21378 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
21379
21380 * configure.ac: Correct td_thr_tls_get_addr test.
21381 * configure: Regenerated.
21382
21383 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
21384
21385 * linux-low.c (linux_wait_for_event): Reformat. Use the
21386 pass_signals array.
21387 * remote-utils.c (decode_address_to_semicolon): New.
21388 * server.c (pass_signals, handle_general_set): New.
21389 (handle_query): Mention QPassSignals for qSupported.
21390 (main): Call handle_general_set.
21391 * server.h (pass_signals, decode_address_to_semicolon): New.
21392
21393 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
21394
21395 * server.c (handle_query): Correct error handling for read_auxv.
21396
21397 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
21398
21399 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
21400 and srv_linux_thread_db to yes.
21401 * linux-s390-low.c (s390_fill_gregset): New function.
21402 (target_regsets): Define data structure.
21403
21404 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
21405
21406 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
21407 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
21408 * config.in, configure: Regenerated.
21409 * inferiors.c (gdb_id_to_thread): New function.
21410 (gdb_id_to_thread_id): Use it.
21411 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
21412 * linux-low.h (struct process_info): Add th member.
21413 (thread_db_get_tls_address): New prototype.
21414 * remote-utils.c (decode_address): Make non-static.
21415 * server.c (handle_query): Handle qGetTLSAddr.
21416 * server.h (gdb_id_to_thread, decode_address): New prototypes.
21417 * target.h (struct target_ops): Add get_tls_address.
21418 * thread-db.c (maybe_attach_thread): Save the thread handle.
21419 (thread_db_get_tls_address): New.
21420
21421 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
21422
21423 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
21424 (linux_resume_one_process): Take a siginfo_t *. Update all
21425 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
21426 (struct pending_signals): Add a siginfo_t.
21427 (linux_wait_for_process): Always set last_status.
21428 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
21429 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
21430 * linux-low.h (struct process_info): Add last_status.
21431
21432 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
21433
21434 * remote-utils.c (try_rle): New function.
21435 (putpkt_binary): Use it.
21436
21437 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
21438
21439 * Makefile.in (clean): Clean reg-x86-64-linux.c.
21440 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
21441 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
21442 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
21443 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
21444 point registers.
21445
21446 2006-08-08 Richard Sandiford <richard@codesourcery.com>
21447
21448 * server.c (terminal_fd): New variable.
21449 (old_foreground_pgrp): Likewise.
21450 (restore_old_foreground_pgrp): New function.
21451 (start_inferior): Record the terminal file descriptor in terminal_fd
21452 and its original foreground group in old_foreground_pgrp. Register
21453 restore_old_foreground_pgrp with atexit().
21454
21455 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
21456
21457 * server.c (handle_query): Correct qPart to qXfer.
21458
21459 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
21460
21461 * configure.ac: Check for more headers which are missing on
21462 Windows. Automatically supply -lwsock32 and USE_WIN32API.
21463 * configure.srv: Add Cygwin and mingw32.
21464 * remote-utils.c: Don't include headers unconditionally which
21465 are missing on mingw32. Include <winsock.h> for mingw32.
21466 (remote_open): Adjust for mingw32 support. Flush
21467 standard error after writing to it.
21468 (remote_close, putpkt_binary, input_interrupt, block_async_io)
21469 (unblock_async_io, enable_async_io, disable_async_io)
21470 (readchar, getpkt): Update for Winsock support.
21471 (prepare_resume_reply): Expect a protocol signal number.
21472 * server.c: Disable <sys/wait.h> on mingw32.
21473 (start_inferior): Adjust for mingw32 support. Flush
21474 standard error after writing to it.
21475 (attach_inferior): Likewise. Use protocol signal
21476 numbers.
21477 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
21478 and names.
21479 * win32-i386-low.c: New file.
21480 * Makefile.in (XM_CLIBS): Set.
21481 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
21482 (win32-i386-low.o): New dependency rule.
21483 * linux-low.c (linux_wait): Use target signal numbers.
21484 * target.h (struct target_ops): Doc fix.
21485 * server.h (target_signal_to_name): New prototype.
21486 * gdbreplay.c: Don't include headers unconditionally which
21487 are missing on mingw32. Include <winsock.h> for mingw32.
21488 (remote_close, remote_open): Adjust for Winsock support.
21489 * configure, config.in: Regenerated.
21490
21491 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
21492
21493 * server.c (decode_xfer_read, write_qxfer_response): New.
21494 (handle_query): Take a packet length argument. Handle
21495 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
21496 the qSupported response.
21497 (main): Update call to handle_query.
21498
21499 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
21500
21501 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
21502 (putpkt_binary): Renamed from putpkt and adjusted for binary
21503 data.
21504 (putpkt): New wrapper for putpkt_binary.
21505 (readchar): Don't mask off the high bit.
21506 (decode_X_packet): New function.
21507 * server.c (main): Call putpkt_binary if a handler sets the packet
21508 length. Save the length of the incoming packet. Handle 'X'.
21509 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
21510
21511 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
21512
21513 * server.c (handle_query): Handle qSupported.
21514
21515 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21516
21517 * remote-utils.c (all_symbols_looked_up): New variable.
21518 (look_up_one_symbol): Check it.
21519 * server.h (look_up_one_symbol): New declaration.
21520 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
21521
21522 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
21523
21524 * Makefile.in (linux-arm-low.o): Update dependencies.
21525 * linux-arm-low.c: Include "gdb_proc_service.h".
21526 (PTRACE_GET_THREAD_AREA): Define.
21527 (ps_get_thread_area): New function.
21528
21529 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
21530
21531 * configure.srv (m68k*-*-uclinux*): New target.
21532 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
21533 (linux_resume_one_process): Remove extraneous cast.
21534 (linux_read_offsets): New.
21535 (linux_target_op): Add linux_read_offsets on mmuless systems.
21536 * server.c (handle_query): Add qOffsets logic.
21537 * target.h (struct target_ops): Add read_offsets.
21538
21539 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21540
21541 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
21542 (PTRACE_GET_THREAD_AREA): Define.
21543 (ps_get_thread_area): New function.
21544 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
21545 (linux-x86-64-low.o): Update.
21546
21547 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
21548
21549 * configure.ac: Remove checks for prfpregset_t.
21550 * gdb_proc_service.h: New file.
21551 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
21552 new "gdb_proc_service.h".
21553 * proc-service.c: Likewise.
21554 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
21555 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
21556 * Makefile.in (gdb_proc_service_h): Updated.
21557 * configure, config.in: Regenerated.
21558
21559 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21560
21561 * remote-utils.c (prepare_resume_reply): Move declaration
21562 of gdb_id_from_wait to the top of the block.
21563
21564 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
21565
21566 * linux-low.c (regsets_store_inferior_registers): Read the regset
21567 from the target before filling it.
21568
21569 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
21570
21571 * server.c (attach_inferior): Return SIGTRAP for a successful
21572 attach.
21573
21574 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
21575
21576 * Makefile.in (OBS): Add version.o.
21577 (STAGESTUFF): Delete.
21578 (version.o): Add dependencies.
21579 (version.c): Replace rule.
21580 (clean): Remove version.c.
21581 * server.c (gdbserver_version): New.
21582 (gdbserver_usage): Use printf.
21583 (main): Handle --version and --help.
21584 * server.h (version, host_name): Add declarations.
21585
21586 2005-12-23 Eli Zaretskii <eliz@gnu.org>
21587
21588 * linux-arm-low.c:
21589 * linux-arm-low.c:
21590 * inferiors.c:
21591 * i387-fp.h:
21592 * i387-fp.c:
21593 * gdbreplay.c:
21594 * regcache.c:
21595 * proc-service.c:
21596 * mem-break.h:
21597 * mem-break.c:
21598 * linux-x86-64-low.c:
21599 * linux-sh-low.c:
21600 * linux-s390-low.c:
21601 * linux-ppc64-low.c:
21602 * linux-ppc-low.c:
21603 * linux-mips-low.c:
21604 * linux-m68k-low.c:
21605 * linux-m32r-low.c:
21606 * linux-low.h:
21607 * linux-low.c:
21608 * linux-ia64-low.c:
21609 * linux-i386-low.c:
21610 * linux-crisv32-low.c:
21611 * thread-db.c:
21612 * terminal.h:
21613 * target.h:
21614 * target.c:
21615 * server.h:
21616 * server.c:
21617 * remote-utils.c:
21618 * regcache.h:
21619 * utils.c:
21620 * Makefile.in:
21621 * configure.ac:
21622 * gdbserver.1: Add (C) after Copyright. Update the FSF
21623 address.
21624
21625 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
21626
21627 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
21628 (arm_breakpoint_at): Recognize both breakpoints.
21629 (the_low_target): Use the correct breakpoint instruction.
21630
21631 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
21632
21633 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
21634 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
21635 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
21636 (the_low_target): Update.
21637
21638 2005-10-25 Andreas Schwab <schwab@suse.de>
21639
21640 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
21641
21642 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
21643 (ia64_num_regs): Reduce to 462.
21644
21645 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
21646
21647 * acinclude.m4: Correct quoting.
21648 * aclocal.m4: Regenerated.
21649
21650 Suggested by SZOKOVACS Robert <szo@ies.hu>:
21651 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
21652 (thread_db_init): Call thread_db_err_str.
21653 * configure.ac: Check for TD_VERSION.
21654 * config.in, configure: Regenerated.
21655
21656 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
21657
21658 * server.h (error, fatal, warning): Add ATTR_FORMAT.
21659
21660 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21661
21662 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
21663 is not available. Define HAVE_PTRACE_GETREGS if it is.
21664 * config.in, configure: Regenerated.
21665 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
21666 * linux-i386-low.c, linux-m68k-low.c: Update to use
21667 HAVE_PTRACE_GETREGS.
21668 * linux-low.c (regsets_fetch_inferior_registers)
21669 (regsets_store_inferior_registers): Only return 0 if we processed
21670 GENERAL_REGS.
21671 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
21672 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
21673
21674 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21675
21676 * inferiors.c (struct thread_info): Add gdb_id.
21677 (add_thread): Add gdb_id argument.
21678 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
21679 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
21680 calls to add_thread.
21681 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
21682 * server.c (handle_query): Use thread_to_gdb_id.
21683 (handle_v_cont, main): Use gdb_id_to_thread_id.
21684 * server.h (add_thread): Update prototype.
21685 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
21686 prototypes.
21687
21688 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
21689
21690 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
21691 left-padded registers.
21692 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
21693 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
21694
21695 2005-07-01 Steve Ellcey <sje@cup.hp.com>
21696
21697 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
21698 * configure: Regenerate.
21699 * config.in: Regenerate.
21700 * server.h (NEED_DECLARATION_STRERROR):
21701 Replace with !HAVE_DECL_STRERROR.
21702
21703 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
21704
21705 * linux-low.c (linux_wait, linux_send_signal): Don't test
21706 an unsigned long variable for > 0 if it could be MAX_ULONG.
21707 * server.c (myresume): Likewise.
21708 * target.c (set_desired_inferior): Likewise.
21709
21710 2005-06-13 Mark Kettenis <kettenis@gnu.org>
21711
21712 * configure.ac: Simplify and improve check for socklen_t.
21713 * configure, config.in: Regenerate.
21714
21715 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
21716
21717 * acconfig.h: Remove.
21718 * configure.ac: Add a test for socklen_t. Use three-argument
21719 AC_DEFINE throughout.
21720 * config.in: Regenerated using autoheader 2.59.
21721 * configure: Regenerated.
21722
21723 * gdbreplay.c (socklen_t): Provide a default.
21724 (remote_open): Use socklen_t.
21725 * remote-utils.c (socklen_t): Provide a default.
21726 (remote_open): Use socklen_t.
21727 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
21728 unsigned char.
21729
21730 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
21731 char for buffers.
21732 * linux-low.c (linux_read_memory, linux_write_memory)
21733 (linux_read_auxv): Likewise.
21734 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
21735 (check_mem_write): Likewise.
21736 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
21737 Likewise.
21738 * regcache.c (struct inferior_rgcache_data, registers_to_string)
21739 (registers_from_string, register_data): Likewise.
21740 * server.c (handle_query, main): Likewise.
21741 * server.h (convert_ascii_to_int, convert_int_to_ascii)
21742 (decode_M_packet): Likewise.
21743 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
21744 * target.h (struct target_ops): Update read_memory, write_memory,
21745 and read_auxv.
21746 (read_inferior_memory, write_inferior_memory): Update.
21747 * linux-low.h (struct linux_target_ops): Change type of breakpoint
21748 to unsigned char *.
21749 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
21750 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
21751 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
21752 linux-s390-low.c, linux-sh-low.c: Update for changes in
21753 read_inferior_memory and the_low_target->breakpoint.
21754
21755 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
21756
21757 * Makefile.in (SFILES): Add linux-ppc64-low.c.
21758 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
21759 * configure.srv: Add powerpc64-*-linux*.
21760 * linux-ppc64-low.c: New file.
21761
21762 2005-05-23 Orjan Friberg <orjanf@axis.com>
21763
21764 * linux-cris-low.c: New file with support for CRIS.
21765 * linux-crisv32-low.c: Ditto for CRISv32.
21766 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
21767 (clean): Add reg-cris.c and reg-crisv32.c.
21768 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
21769 reg-crisv32.o, and reg-crisv32.c to make rules.
21770 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
21771 recognized targets.
21772
21773 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
21774
21775 * linux-low.c (fetch_register): Ensure buffer size is a multiple
21776 of sizeof (PTRACE_XFER_TYPE).
21777 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
21778
21779 2005-05-12 Orjan Friberg <orjanf@axis.com>
21780
21781 * target.h (struct target_ops): Add insert_watchpoint,
21782 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
21783 pointers for hardware watchpoint support.
21784 * linux-low.h (struct linux_target_ops): Ditto.
21785 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
21786 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
21787 to linux_target_ops.
21788 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
21789 reply packet.
21790 * server.c (main): Recognize 'Z' and 'z' packets.
21791
21792 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
21793
21794 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
21795 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
21796 (the_low_target): Add new members.
21797
21798 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21799
21800 * proc-service.c (ps_lgetregs): Search all_processes instead of
21801 all_threads.
21802
21803 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
21804
21805 * server.c (start_inferior): Change return type to int.
21806 (attach_inferior): Change sigptr to int *.
21807 (handle_v_cont, handle_v_requests): Change signal to int *.
21808 (main): Change signal to int.
21809
21810 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
21811
21812 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
21813 * configure.srv: Add m32r*-*-linux*.
21814 * linux-m32r-low.c: New file.
21815
21816 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
21817
21818 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
21819
21820 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
21821
21822 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
21823 Take unsigned long arguments for PIDs.
21824 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
21825 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
21826 (wait_for_sigstop, linux_resume_one_process)
21827 (regsets_fetch_inferior_registers, linux_send_signal)
21828 (linux_read_auxv): Likewise. Update the types of variables holding
21829 PIDs. Update format string specifiers.
21830 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
21831 * remote-utils.c (prepare_resume_reply): Likewise.
21832 * server.c (cont_thread, general_thread, step_thread)
21833 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
21834 unsigned long.
21835 (handle_query): Update format specifiers.
21836 (handle_v_cont, main): Use strtoul for thread IDs.
21837 * server.h (struct inferior_list_entry): Use unsigned long for ID.
21838 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
21839 (general_thread, step_thread, thread_from_wait)
21840 (old_thread_from_wait): Update.
21841 * target.h (struct thread_resume): Use unsigned long for THREAD.
21842 (struct target_ops): Use unsigned long for arguments to attach and
21843 thread_alive.
21844
21845 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
21846
21847 * acinclude.m4: Include bfd/bfd.m4 directly.
21848 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
21849 <agriffis@toolchain.org>.
21850 * aclocal.m4, configure: Regenerated.
21851
21852 2005-01-07 Andrew Cagney <cagney@gnu.org>
21853
21854 * configure.ac: Rename configure.in, require autoconf 2.59.
21855 * configure: Re-generate.
21856
21857 2004-12-08 Daniel Jacobowitz <dan@debian.org>
21858
21859 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
21860 LIBS when finished.
21861 * aclocal.m4: Regenerated.
21862 * configure: Regenerated.
21863
21864 2004-11-21 Andreas Schwab <schwab@suse.de>
21865
21866 * linux-m68k-low.c (m68k_num_gregs): Define.
21867 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
21868 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
21869 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
21870 (m68k_breakpoint_at): New. Add to the_low_target.
21871
21872 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
21873 srv_linux_thread_db to yes.
21874
21875 2004-10-20 Joel Brobecker <brobecker@gnat.com>
21876
21877 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
21878 (ARCH_SET_FS): Likewise.
21879 (ARCH_GET_FS): Likewise.
21880 (ARCH_GET_GS): Likewise.
21881
21882 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21883
21884 * linux-i386-low.c (ps_get_thread_area): New.
21885 * linux-x86-64-low.c (ps_get_thread_area): New.
21886 * linux-low.c: Include <sys/syscall.h>.
21887 (linux_kill_one_process): Don't kill the first thread here.
21888 (linux_kill): Kill the first thread here.
21889 (kill_lwp): New function.
21890 (send_sigstop, linux_send_signal): Use it.
21891 * proc-service.c: Clean up #ifdefs.
21892 (fpregset_info): Delete.
21893 (ps_lgetregs): Update and enable implementation.
21894 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
21895 implementations.
21896 * remote-utils.c (struct sym_cache, symbol_cache): New.
21897 (input_interrupt): Print a clearer message.
21898 (async_io_enabled): New variable.
21899 (enable_async_io, disable_async_io): Use it. Update comments.
21900 (look_up_one_symbol): Use the symbol cache.
21901 * thread-db.c (thread_db_look_up_symbols): New function.
21902 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
21903
21904 2004-10-16 Daniel Jacobowitz <dan@debian.org>
21905
21906 * configure.in: Test for -rdynamic.
21907 * configure: Regenerated.
21908 * Makefile (INTERNAL_LDFLAGS): New.
21909 (gdbserver, gdbreplay): Use it.
21910
21911 2004-09-02 Andrew Cagney <cagney@gnu.org>
21912
21913 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
21914
21915 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
21916
21917 * linux-low.c (linux_wait): Clear all_processes list also.
21918
21919 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21920
21921 * linux-low.c: Include <errno.h>. Remove extern declaration of
21922 errno.
21923
21924 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
21925
21926 * gdbreplay.c, server.h, utils.c: Update copyright years.
21927
21928 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21929
21930 * server.c (main): Print child status or termination signal from
21931 variable 'signal', not 'sig'.
21932
21933 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
21934
21935 * linux-low.c (linux_read_memory): Change return type to
21936 int. Check for and return error from ptrace().
21937 * target.c (read_inferior_memory): Change return type to int. Pass
21938 back return status from the_target->read_memory().
21939 * target.h (struct target_ops): Adapt *read_memory() prototype.
21940 Update comment.
21941 (read_inferior_memory): Adapt prototype.
21942 * server.c (main): Return an error packet if
21943 read_inferior_memory() returns an error.
21944
21945 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
21946
21947 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
21948 Unify with other clean targets.
21949
21950 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21951
21952 * server.c (handle_v_cont): Call set_desired_inferior.
21953
21954 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21955
21956 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
21957
21958 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21959
21960 * linux-low.c (linux_wait): Unblock async I/O.
21961 (linux_resume): Block and enable async I/O.
21962 * remote-utils.c (block_async_io, unblock_async_io): New functions.
21963 * server.h (block_async_io, unblock_async_io): Add prototypes.
21964
21965 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21966
21967 * remote-utils.c (remote_open): Print a status notice after
21968 opening a TCP port.
21969 * server.c (attach_inferior): Print a status notice after
21970 attaching.
21971
21972 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
21973
21974 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
21975
21976 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
21977
21978 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
21979 error packet.
21980 * server.c, target.h: Update copyright years.
21981
21982 2004-02-25 Roland McGrath <roland@redhat.com>
21983
21984 * target.h (struct target_ops): New member `read_auxv'.
21985 * server.c (handle_query): Handle qPart:auxv:read: query using that.
21986 * linux-low.c (linux_read_auxv): New function.
21987 (linux_target_ops): Initialize `read_auxv' member to that.
21988
21989 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
21990
21991 Committed by Jim Blandy <jimb@redhat.com>.
21992
21993 * linux-s390-low.c (s390_num_regs): Update.
21994 (s390_regmap): Remove control registers. Use __s390x__ predefine
21995 instead of GPR_SIZE to distiguish s390 and s390x targets.
21996
21997 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
21998
21999 * linux-low.c: Update copyright year.
22000 (check_removed_breakpoint): Clear pending_is_breakpoint.
22001 (linux_set_resume_request, linux_queue_one_thread)
22002 (resume_status_pending_p): New functions.
22003 (linux_continue_one_thread): Use process->resume.
22004 (linux_resume): Only resume threads if there are no pending events.
22005 * linux-low.h (struct process_info): Add resume request
22006 pointer.
22007
22008 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
22009
22010 * regcache.c (new_register_cache): Clear the allocated register
22011 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
22012
22013 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
22014
22015 * linux-low.c (linux_resume): Take a struct thread_resume *
22016 argument.
22017 (linux_wait): Update call.
22018 (resume_ptr): New static variable.
22019 (linux_continue_one_thread): Renamed from
22020 linux_continue_one_process. Use resume_ptr.
22021 (linux_resume): Use linux_continue_one_thread.
22022 * server.c (handle_v_cont, handle_v_requests): New functions.
22023 (myresume): New function.
22024 (main): Handle 'v' case.
22025 * target.h (struct thread_resume): New type.
22026 (struct target_ops): Change argument of "resume" to struct
22027 thread_resume *.
22028 (myresume): Delete macro.
22029
22030 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
22031
22032 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
22033 (uninstall): Support DESTDIR.
22034
22035 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
22036
22037 * configure.srv: Add xscale*linux copy of arm*linux entry.
22038
22039 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
22040
22041 * linux-arm-low.c (arm_reinsert_addr): New function.
22042 (the_low_target): Add arm_reinsert_addr.
22043
22044 2003-07-08 Mark Kettenis <kettenis@gnu.org>
22045
22046 * mem-break.c: Remove whitespace at end of file.
22047
22048 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
22049
22050 * configure.in: Check whether we need to prototype strerror.
22051 * server.h: Optionally prototype strerror.
22052 * gdbreplay.c (perror_with_name): Use strerror.
22053 * linux-low.c (linux_attach_lwp): Use strerror.
22054 * utils.c (perror_with_name): Use strerror.
22055 * config.in, configure: Regenerated.
22056
22057 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
22058
22059 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
22060 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
22061
22062 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
22063
22064 * Makefile.in (SFILES): Update.
22065 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
22066 low-sun3.c: Remove files.
22067
22068 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
22069
22070 * linux-low.c: Move comment to linux_thread_alive where it belonged.
22071 (linux_detach_one_process, linux_detach): New functions.
22072 (linux_target_ops): Add linux_detach.
22073 * server.c (main): Handle 'D' packet.
22074 * target.h (struct target_ops): Add "detach" member.
22075 (detach_inferior): Define.
22076
22077 2003-06-13 Mark Kettenis <kettenis@gnu.org>
22078
22079 From Kelley Cook <kelleycook@wideopenwest.com>:
22080 * configure.srv: Accept i[34567]86 variants.
22081
22082 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
22083
22084 * linux-low.c (linux_wait_for_event): Correct comment typos.
22085 (linux_resume_one_process): Call check_removed_breakpoint.
22086 (linux_send_signal): New function.
22087 (linux_target_ops): Add linux_send_signal.
22088 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
22089 of kill.
22090 * target.h (struct target_ops): Add send_signal.
22091
22092 2003-05-29 Jim Blandy <jimb@redhat.com>
22093
22094 * linux-low.c (usr_store_inferior_registers): Transfer buf in
22095 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
22096 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
22097 away part of the register's value.
22098
22099 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
22100
22101 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
22102 (linux_wait_for_event, linux_init_signals): Likewise.
22103
22104 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
22105
22106 * configure.in: Check for stdlib.h.
22107 * configure: Regenerated.
22108 * config.in: Regenerated.
22109
22110 2003-01-04 Andreas Schwab <schwab@suse.de>
22111
22112 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
22113
22114 2003-01-02 Andrew Cagney <ac131313@redhat.com>
22115
22116 * Makefile.in: Remove obsolete code.
22117
22118 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
22119
22120 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
22121 defined(PT_FPR0_HI).
22122
22123 2002-11-17 Stuart Hughes <seh@zee2.com>
22124
22125 * linux-arm-low.c (arm_num_regs): Increase.
22126 (arm_regmap): Include status register.
22127
22128 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
22129
22130 * linux-low.c (register_addr): Remove incorrect -1 check.
22131
22132 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
22133
22134 * linux-low.c (linux_create_inferior): Call setpgid. Return
22135 the new PID.
22136 (unstopped_p, linux_signal_pid): Remove.
22137 (linux_target_ops): Remove linux_signal_pid.
22138 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
22139 global instead of target method.
22140 * target.h (struct target_ops): Remove signal_pid. Update comment
22141 for create_inferior.
22142 * server.c (signal_pid): New variable.
22143 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
22144 gdbserver. Set the child to be the foreground process group.
22145 (attach_inferior): Set signal_pid.
22146
22147 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
22148
22149 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
22150
22151 2002-08-20 Jim Blandy <jimb@redhat.com>
22152
22153 * Makefile.in (LDFLAGS): Allow the configure script to establish a
22154 default for this.
22155
22156 2002-08-01 Andrew Cagney <cagney@redhat.com>
22157
22158 * Makefile.in: Make chill references obsolete.
22159
22160 2002-07-24 Kevin Buettner <kevinb@redhat.com>
22161
22162 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
22163 * configure: Regenerate.
22164 * config.in: Regenerate.
22165
22166 2002-07-09 David O'Brien <obrien@FreeBSD.org>
22167
22168 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
22169 (perror_with_name, remote_close, remote_open, expect, play): Static.
22170
22171 2002-07-04 Michal Ludvig <mludvig@suse.cz>
22172
22173 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
22174 byte offsets instead of an array of indexes.
22175 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
22176
22177 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
22178
22179 * regcache.c: Add comment.
22180
22181 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
22182
22183 * thread-db.c: New file.
22184 * proc-service.c: New file.
22185 * acinclude.m4: New file.
22186 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
22187 proc-service.o, and thread-db.o.
22188 (linux-low.o): Add USE_THREAD_DB.
22189 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
22190 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
22191 * aclocal.m4: Regenerated.
22192 * config.in: Regenerated.
22193 * configure: Regenerated.
22194 * configure.in: Check for proc_service.h, sys/procfs.h,
22195 thread_db.h, and linux/elf.h headrs.
22196 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
22197 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
22198 Check for -lthread_db and thread support.
22199 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
22200 PowerPC, and SuperH.
22201 * i387-fp.c: Constify arguments.
22202 * i387-fp.h: Likewise.
22203 * inferiors.c: (struct thread_info): Renamed from
22204 `struct inferior_info'. Remove PID member. Use generic inferior
22205 list header. All uses updated.
22206 (inferiors, signal_pid): Removed.
22207 (all_threads): New variable.
22208 (get_thread): Define.
22209 (add_inferior_to_list): New function.
22210 (for_each_inferior): New function.
22211 (change_inferior_id): New function.
22212 (add_inferior): Removed.
22213 (remove_inferior): New function.
22214 (add_thread): New function.
22215 (free_one_thread): New function.
22216 (remove_thread): New function.
22217 (clear_inferiors): Use for_each_inferior and free_one_thread.
22218 (find_inferior): New function.
22219 (find_inferior_id): New function.
22220 (inferior_target_data): Update argument type.
22221 (set_inferior_target_data): Likewise.
22222 (inferior_regcache_data): Likewise.
22223 (set_inferior_regcache_data): Likewise.
22224 * linux-low.c (linux_bp_reinsert): Remove.
22225 (all_processes, stopping_threads, using_thrads)
22226 (struct pending_signals, debug_threads, pid_of): New.
22227 (inferior_pid): Replace with macro.
22228 (struct inferior_linux_data): Remove.
22229 (get_stop_pc, add_process): New functions.
22230 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
22231 Use add_process and add_thread.
22232 (linux_attach_lwp): New function, based on old linux_attach. Use
22233 add_process and add_thread. Set stop_expected for new threads.
22234 (linux_attach): New function.
22235 (linux_kill_one_process): New function.
22236 (linux_kill): Kill all LWPs.
22237 (linux_thread_alive): Use find_inferior_id.
22238 (check_removed_breakpoints, status_pending_p): New functions.
22239 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
22240 Update. Use WNOHANG. Wait for cloned processes also. Update process
22241 struct for the found process.
22242 (linux_wait_for_event): New function.
22243 (linux_wait): Use it. Support LWPs.
22244 (send_sigstop, wait_for_sigstop, stop_all_processes)
22245 (linux_resume_one_process, linux_continue_one_process): New functions.
22246 (linux_resume): Support LWPs.
22247 (REGISTER_RAW_SIZE): Remove.
22248 (fetch_register): Use register_size instead. Call supply_register.
22249 (usr_store_inferior_registers): Likewise. Call collect_register.
22250 Fix recursive case.
22251 (regsets_fetch_inferior_registers): Improve error message.
22252 (regsets_store_inferior_registers): Add debugging.
22253 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
22254 (unstopped_p, linux_signal_pid): New functions.
22255 (linux_target_ops): Add linux_signal_pid.
22256 (linux_init_signals): New function.
22257 (initialize_low): Call it. Initialize using_threads.
22258 * regcache.c (inferior_regcache_data): Add valid
22259 flag.
22260 (get_regcache): Fetch registers lazily. Add fetch argument
22261 and update all callers.
22262 (regcache_invalidate_one, regcache_invalidate): New
22263 functions.
22264 (new_register_cache): Renamed from create_register_cache.
22265 Return the new regcache.
22266 (free_register_cache): Change argument to a void *.
22267 (registers_to_string, registers_from_string): Call get_regcache
22268 with fetch flag set.
22269 (register_data): Make static. Pass fetch flag to get_regcache.
22270 (supply_register): Call get_regcache with fetch flag clear.
22271 (collect_register): Call get_regcache with fetch flag set.
22272 (collect_register_as_string): New function.
22273 * regcache.h: Update.
22274 * remote-utils.c (putpkt): Flush after debug output and use
22275 stderr.
22276 Handle input interrupts while waiting for an ACK.
22277 (input_interrupt): Use signal_pid method.
22278 (getpkt): Flush after debug output and use stderr.
22279 (outreg): Use collect_register_as_string.
22280 (new_thread_notify, dead_thread_notify): New functions.
22281 (prepare_resume_reply): Check using_threads. Set thread_from_wait
22282 and general_thread.
22283 (look_up_one_symbol): Flush after debug output.
22284 * server.c (step_thread, server_waiting): New variables.
22285 (start_inferior): Don't use signal_pid. Update call to mywait.
22286 (attach_inferior): Update call to mywait.
22287 (handle_query): Handle qfThreadInfo and qsThreadInfo.
22288 (main): Don't fetch/store registers explicitly. Use
22289 set_desired_inferior. Support proposed ``Hs'' packet. Update
22290 calls to mywait.
22291 * server.h: Update.
22292 (struct inferior_list, struct_inferior_list_entry): New.
22293 * target.c (set_desired_inferior): New.
22294 (write_inferior_memory): Constify.
22295 (mywait): New function.
22296 * target.h: Update.
22297 (struct target_ops): New signal_pid method.
22298 (mywait): Removed macro, added prototype.
22299
22300 * linux-low.h (regset_func): Removed.
22301 (regset_fill_func, regset_store_func): New.
22302 (enum regset_type): New.
22303 (struct regset_info): Add type field. Use new operation types.
22304 (struct linux_target_ops): stop_pc renamed to get_pc.
22305 Add decr_pc_after_break and breakpoint_at.
22306 (get_process, get_thread_proess, get_process_thread)
22307 (strut process_info, all_processes, linux_attach_lwp)
22308 (thread_db_init): New.
22309
22310 * linux-arm-low.c (arm_get_pc, arm_set_pc,
22311 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
22312 (the_low_target): Add new members.
22313 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
22314 (i386_store_fpxregset): Constify.
22315 (target_regsets): Add new kind identifier.
22316 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
22317 (i386_set_pc): Add debugging.
22318 (i386_breakpoint_at): New function.
22319 (the_low_target): Add new members.
22320 * linux-mips-low.c (mips_get_pc, mips_set_pc)
22321 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
22322 (mips_breakpoint_at): New.
22323 (the_low_target): Add new members.
22324 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
22325 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
22326 (the_low_target): Add new members.
22327 * linux-sh-low.c (sh_get_pc, sh_set_pc)
22328 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
22329 (the_low_target): Add new members.
22330 * linux-x86-64-low.c (target_regsets): Add new kind
22331 identifier.
22332
22333 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
22334
22335 From Martin Pool <mbp@samba.org>:
22336 * server.c (gdbserver_usage): New function.
22337 (main): Call it.
22338
22339 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
22340
22341 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
22342 stop_at -> stop_pc.
22343
22344 2002-05-04 Andrew Cagney <ac131313@redhat.com>
22345
22346 * Makefile.in: Remove obsolete code.
22347
22348 2002-04-24 Michal Ludvig <mludvig@suse.cz>
22349
22350 * linux-low.c (regsets_fetch_inferior_registers),
22351 (regsets_store_inferior_registers): Removed cast to int from
22352 ptrace() calls.
22353 * regcache.h: Added declaration of struct inferior_info.
22354
22355 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
22356
22357 * inferiors.c (struct inferior_info): Add regcache_data.
22358 (add_inferior): Call create_register_cache.
22359 (clear_inferiors): Call free_register_cache.
22360 (inferior_regcache_data, set_inferior_regcache_data): New functions.
22361 * regcache.c (struct inferior_regcache_data): New.
22362 (registers): Remove.
22363 (get_regcache): New function.
22364 (create_register_cache, free_register_cache): New functions.
22365 (set_register_cache): Don't initialize the register cache here.
22366 (registers_to_string, registers_from_string, register_data): Call
22367 get_regcache.
22368 * regcache.h: Add prototypes.
22369 * server.h: Likewise.
22370
22371 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
22372
22373 * mem-break.c: New file.
22374 * mem-break.h: New file.
22375 * Makefile.in: Add mem-break.o rule; update server.h
22376 dependencies.
22377 * inferiors.c (struct inferior_info): Add target_data
22378 member.
22379 (clear_inferiors): Free target_data member if set.
22380 (inferior_target_data, set_inferior_target_data): New functions.
22381 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
22382 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
22383 * linux-low.c (linux_bp_reinsert): New variable.
22384 (struct inferior_linux_data): New.
22385 (linux_create_inferior): Use set_inferior_target_data.
22386 (linux_attach): Likewise. Call add_inferior.
22387 (linux_wait_for_one_inferior): New function.
22388 (linux_wait): Call it.
22389 (linux_write_memory): Add const.
22390 (initialize_low): Call set_breakpoint_data.
22391 * linux-low.h (struct linux_target_ops): Add breakpoint
22392 handling members.
22393 * server.c (attach_inferior): Remove extra add_inferior
22394 call.
22395 * server.h: Include mem-break.h. Update inferior.c
22396 prototypes.
22397 * target.c (read_inferior_memory)
22398 (write_inferior_memory): New functions.
22399 * target.h (read_inferior_memory)
22400 (write_inferior_memory): Change macros to prototypes.
22401 (struct target_ops): Update comments. Add const to write_memory
22402 definition.
22403
22404 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
22405
22406 * linux-low.c (usr_store_inferior_registers): Support
22407 registers which are allowed to fail to store.
22408 * linux-low.h (linux_target_ops): Likewise.
22409 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
22410 (ppc_cannot_store_register): FPSCR may not be storable.
22411
22412 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22413
22414 * server.h: Include <string.h> if HAVE_STRING_H.
22415 * ChangeLog: Correct paths in last ChangeLog entry.
22416
22417 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22418
22419 * linux-low.h: Remove obsolete prototypes.
22420 (struct linux_target_ops): New.
22421 (extern the_low_target): New.
22422 * linux-low.c (num_regs, regmap): Remove declarations.
22423 (register_addr): Use the_low_target explicitly.
22424 (fetch_register): Likewise.
22425 (usr_fetch_inferior_registers): Likewise.
22426 (usr_store_inferior_registers): Likewise.
22427 * linux-arm-low.c (num_regs): Remove.
22428 (arm_num_regs): Define.
22429 (arm_regmap): Renamed from regmap, made static.
22430 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
22431 made static.
22432 (arm_cannot_store_register): Renamed from cannot_store_register,
22433 made static.
22434 (the_low_target): New.
22435 * linux-i386-low.c (num_regs): Remove.
22436 (i386_num_regs): Define.
22437 (i386_regmap): Renamed from regmap, made static.
22438 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
22439 made static.
22440 (i386_cannot_store_register): Renamed from cannot_store_register,
22441 made static.
22442 (the_low_target): New.
22443 * linux-ia64-low.c (num_regs): Remove.
22444 (ia64_num_regs): Define.
22445 (ia64_regmap): Renamed from regmap, made static.
22446 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
22447 made static.
22448 (ia64_cannot_store_register): Renamed from cannot_store_register,
22449 made static.
22450 (the_low_target): New.
22451 * linux-m68k-low.c (num_regs): Remove.
22452 (m68k_num_regs): Define.
22453 (m68k_regmap): Renamed from regmap, made static.
22454 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
22455 made static.
22456 (m68k_cannot_store_register): Renamed from cannot_store_register,
22457 made static.
22458 (the_low_target): New.
22459 * linux-mips-low.c (num_regs): Remove.
22460 (mips_num_regs): Define.
22461 (mips_regmap): Renamed from regmap, made static.
22462 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
22463 made static.
22464 (mips_cannot_store_register): Renamed from cannot_store_register,
22465 made static.
22466 (the_low_target): New.
22467 * linux-ppc-low.c (num_regs): Remove.
22468 (ppc_num_regs): Define.
22469 (ppc_regmap): Renamed from regmap, made static.
22470 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
22471 made static.
22472 (ppc_cannot_store_register): Renamed from cannot_store_register,
22473 made static.
22474 (the_low_target): New.
22475 * linux-s390-low.c (num_regs): Remove.
22476 (s390_num_regs): Define.
22477 (s390_regmap): Renamed from regmap, made static.
22478 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
22479 made static.
22480 (s390_cannot_store_register): Renamed from cannot_store_register,
22481 made static.
22482 (the_low_target): New.
22483 * linux-sh-low.c (num_regs): Remove.
22484 (sh_num_regs): Define.
22485 (sh_regmap): Renamed from regmap, made static.
22486 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
22487 made static.
22488 (sh_cannot_store_register): Renamed from cannot_store_register,
22489 made static.
22490 (the_low_target): New.
22491 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
22492 (the_low_target): New.
22493
22494 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22495
22496 * Makefile.in: Add stamp-h target.
22497 * configure.in: Create stamp-h.
22498 * configure: Regenerated.
22499
22500 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22501
22502 * inferiors.c: New file.
22503 * target.c: New file.
22504 * target.h: New file.
22505 * Makefile.in: Add target.o and inferiors.o. Update
22506 dependencies.
22507 * linux-low.c (inferior_pid): New static variable,
22508 moved from server.c.
22509 (linux_create_inferior): Renamed from create_inferior.
22510 Call add_inferior. Return 0 on success instead of a PID.
22511 (linux_attach): Renamed from myattach.
22512 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
22513 (linux_thread_alive): Renamed from mythread_alive.
22514 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
22515 child dies.
22516 (linux_resume): Renamed from myresume. Add missing ``return 0''.
22517 (regsets_store_inferior_registers): Correct error message.
22518 Add missing ``return 0''.
22519 (linux_fetch_registers): Renamed from fetch_inferior_registers.
22520 (linux_store_registers): Renamed from store_inferior_registers.
22521 (linux_read_memory): Renamed from read_inferior_memory.
22522 (linux_write_memory): Renamed from write_inferior_memory.
22523 (linux_target_ops): New structure.
22524 (initialize_low): Call set_target_ops ().
22525 * remote-utils.c (unhexify): New function.
22526 (hexify): New function.
22527 (input_interrupt): Send signals to ``signal_pid''.
22528 * server.c (inferior_pid): Remove.
22529 (start_inferior): Update create_inferior call.
22530 (attach_inferior): Call add_inferior.
22531 (handle_query): New function.
22532 (main): Call handle_query for `q' packets.
22533 * server.h: Include "target.h". Remove obsolete prototypes.
22534 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
22535
22536 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
22537
22538 * Makefile.in: Add WARN_CFLAGS. Update configury
22539 dependencies.
22540 * configure.in: Check for <string.h>
22541 * configure: Regenerate.
22542 * config.in: Regenerate.
22543 * gdbreplay.c: Include needed system headers.
22544 (remote_open): Remove strchr prototype.
22545 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
22546 * regcache.c (supply_register): Change buf argument to const void *.
22547 (supply_register_by_name): Likewise.
22548 (collect_register): Change buf argument to void *.
22549 (collect_register_by_name): Likewise.
22550 * regcache.h: Add missing prototypes.
22551 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
22552 * server.c (handle_query): New function.
22553 (attached): New static variable, moved out of main.
22554 (main): Quiet longjmp clobber warnings.
22555 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
22556 * utils.c (error): Remove NORETURN.
22557 (fatal): Likewise.
This page took 0.524538 seconds and 4 git commands to generate.